:root {
  --paper: #f2efe7;
  --ink: #282a25;
  --muted: #77786e;
  --line: #d9d6cc;
  --orange: #bd4528;
  --coral: #ec6945;
  --dark: #1a2525;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", sans-serif;
  --mono: "IBM Plex Mono", monospace;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button,
input {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.42;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  background: none;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 5px;
}
button:not(:disabled),
a {
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}
button:not(:disabled):active {
  transform: translateY(1px);
}
.masthead {
  height: 96px;
  margin: 0 42px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 30px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-family: var(--serif);
  font-size: 43px;
  letter-spacing: -1.8px;
}
.brand svg {
  width: 36px;
  height: 40px;
  stroke: var(--orange);
  stroke-width: 1.6;
  fill: none;
}
.brand-dot {
  color: var(--orange);
}
.masthead-caption,
.eyebrow {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  line-height: 1.5;
  font-weight: 400;
}
.masthead-caption {
  margin: 8px 0 0 5px;
  color: var(--muted);
}
.header-actions {
  margin-left: auto;
  display: flex;
  gap: 30px;
  align-items: center;
  font-size: 12px;
}
.header-actions span {
  color: var(--orange);
  margin-left: 8px;
}
.text-button {
  padding: 12px 0;
}
.back-link {
  border: 1px solid #bebeb2;
  border-radius: 4px;
  padding: 12px 16px;
}
.back-link:hover {
  background: #e6e3d9;
}
.text-button:hover {
  color: var(--orange);
}
main {
  max-width: 1740px;
  margin: auto;
  padding: 0 42px;
}
.introduction {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 39px 0 31px;
  gap: 30px;
}
.introduction .eyebrow {
  margin: 0 0 7px;
}
.tiny-star {
  font-size: 16px;
  margin-right: 6px;
  color: var(--orange);
  vertical-align: middle;
}
h1 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -2px;
  font-size: clamp(46px, 4.5vw, 76px);
  line-height: 1.05;
  margin: 0;
}
h1 em {
  font-weight: 400;
  color: var(--orange);
}
.intro-copy {
  font-size: 13px;
  line-height: 1.8;
  margin: 0 0 2px;
  color: #74766c;
  max-width: 325px;
}
.workbench {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr) 222px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f7f5ee;
}
.shape-panel,
.voice-panel {
  padding: 25px 21px 19px;
  min-width: 0;
}
.shape-panel {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.voice-panel {
  border-left: 1px solid var(--line);
}
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-label h2 {
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -0.3px;
  margin: 0;
}
.section-label > span {
  font-family: var(--mono);
  font-size: 10px;
  color: #929389;
}
.section-copy {
  font-size: 11px;
  color: var(--muted);
  margin: 9px 0 20px;
  line-height: 1.6;
}
.preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.preset {
  border: 1px solid var(--line);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 7px 10px;
  gap: 4px;
  min-height: 91px;
  font-size: 11px;
}
.preset svg {
  width: 65px;
  height: 48px;
  fill: rgba(136, 137, 119, 0.06);
  stroke: #8f9185;
  stroke-width: 1.2;
}
.preset.active {
  border-color: var(--orange);
  background: #f4e7da;
  color: var(--orange);
}
.preset.active svg {
  stroke: var(--orange);
  fill: #bd45280c;
}
.preset:hover {
  border-color: #ab8877;
  background: #ece9df;
}
.draw-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10px;
  width: 100%;
  padding: 13px 1px;
  margin-top: 10px;
  border: 1px dashed #c9c8bb;
  border-radius: 4px;
}
.draw-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
}
.draw-button:hover,
.draw-button.active {
  border-color: var(--orange);
  color: var(--orange);
  background: #f4e7da;
}
.control {
  margin: 25px 0 0;
}
.width-control {
  margin-top: 25px;
}
.control-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-bottom: 9px;
}
.control-heading output {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}
input[type="range"] {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 16px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  outline-offset: 4px;
  --fill: 50%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--orange) 0,
    var(--orange) var(--fill),
    #deddd4 var(--fill),
    #deddd4 100%
  );
}
input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 2px;
  background: #deddd4;
}
input[type="range"]::-moz-range-progress {
  height: 3px;
  background: var(--orange);
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--orange);
  margin-top: -4px;
  box-shadow: 0 0 0 3px #f7f5ee;
}
input[type="range"]::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--orange);
}
input[type="range"]:focus-visible {
  outline: 1px solid var(--orange);
}
.range-captions {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #85877c;
  margin-top: 5px;
}
.shape-tip {
  display: flex;
  gap: 7px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}
.shape-tip > span {
  font-size: 22px;
  color: var(--orange);
}
.shape-tip p {
  margin: 0;
}
.shape-tip strong {
  font-weight: 550;
  color: #606458;
}
.shape-foot {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 20px;
  gap: 8px;
}
.small-button {
  font-size: 10px;
  padding: 5px 0;
  color: #73766b;
}
.small-button:hover {
  color: var(--orange);
}
.instrument-column {
  min-width: 0;
  padding: 10px 10px 0;
}
.stage {
  height: 462px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(
    ellipse at 50% 52%,
    #2b3835 0,
    #1d2928 47%,
    #182323 100%
  );
  isolation: isolate;
  color: #eeede1;
}
.stage:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.13;
  background-image: radial-gradient(#c2d2b0 0.6px, transparent 0.6px);
  background-size: 13px 13px;
  mask-image: radial-gradient(ellipse at center, #000, transparent 78%);
}
.stage-top {
  position: absolute;
  left: 25px;
  right: 20px;
  top: 23px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  z-index: 2;
  pointer-events: none;
}
.stage-title .eyebrow {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #93a59a;
}
.stage-title h2 {
  font-size: 13px;
  font-weight: 450;
  margin: 9px 0 0;
  letter-spacing: 0.1px;
}
.stage-title h2 span {
  color: #7d8f84;
  font-family: var(--mono);
  font-size: 10px;
  margin-left: 7px;
}
.tool-switch {
  pointer-events: auto;
  border: 1px solid #52615970;
  background: #182322b3;
  display: flex;
  border-radius: 4px;
  padding: 3px;
}
.tool-switch button {
  font-size: 10px;
  padding: 7px 11px;
  color: #91a59b;
  border-radius: 2px;
}
.tool-switch button.selected {
  color: #f4efdf;
  background: #40514b;
}
.tool-switch button:hover {
  color: #fff;
}
#membrane {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
  z-index: 1;
  touch-action: none;
  cursor: crosshair;
}
.stage-caption {
  position: absolute;
  left: 25px;
  bottom: 66px;
  z-index: 2;
  display: flex;
  gap: 8px;
  align-items: center;
  color: #849c8b;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1px;
  pointer-events: none;
}
.live-dot {
  height: 4px;
  width: 4px;
  background: #b7c99f;
  border-radius: 50%;
  box-shadow: 0 0 6px #b7c99f30;
}
.sound-prompt {
  position: absolute;
  right: 13%;
  bottom: 116px;
  color: #dbc09b;
  font-family: var(--serif);
  font-size: 21px;
  font-style: italic;
  pointer-events: none;
  transform: rotate(-6deg);
  z-index: 2;
  transition: opacity 0.3s;
}
.sound-prompt > span {
  font-size: 27px;
  margin-right: 5px;
}
.sound-prompt.hidden {
  opacity: 0;
}
.stage-bottom {
  position: absolute;
  bottom: 0;
  left: 25px;
  right: 25px;
  border-top: 1px solid #8da09325;
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.7px;
  color: #94a498;
  pointer-events: none;
}
.stage-reset {
  pointer-events: auto;
  color: #abb8a3;
  font-size: 20px;
  padding: 5px 9px;
}
.solve-status {
  font-size: 7px;
  white-space: nowrap;
}
.loading-state {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #1a2525dc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  font-size: 12px;
  color: #d3d3bc;
  transition: opacity 0.25s;
}
.loading-state.hidden {
  opacity: 0;
  pointer-events: none;
}
.loading-ring {
  width: 45px;
  height: 45px;
  border: 1px solid #738479;
  border-top-color: #e89066;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.mode-section {
  padding: 20px 15px 15px;
}
.mode-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.mode-heading h3 {
  font-size: 12px;
  font-weight: 550;
  line-height: 1.3;
  margin: 0 0 5px;
}
.mode-heading p {
  font-size: 9px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}
.all-modes {
  font-size: 9px;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 9px;
}
.all-modes span {
  font-size: 15px;
  margin-left: 5px;
  vertical-align: middle;
}
.all-modes.selected {
  border-color: #baa794;
  color: var(--orange);
  background: #f3eade;
}
.mode-strip {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 5px;
  margin-top: 16px;
}
.mode-button {
  min-width: 0;
  border: 1px solid #d9d9cc;
  border-radius: 3px;
  padding: 6px 2px 7px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.mode-button:hover {
  background: #e8e7da;
  border-color: #bcbdaa;
}
.mode-button.selected {
  background: #efe1d1;
  border-color: var(--orange);
}
.mode-button canvas {
  display: block;
  width: 100%;
  height: 38px;
}
.mode-button .mode-number {
  font-family: var(--mono);
  font-size: 7px;
  color: #999a8e;
  position: absolute;
  top: 4px;
  left: 5px;
}
.mode-button .mode-hz {
  display: block;
  font-family: var(--mono);
  font-size: 8px;
  color: #656d5e;
  margin-top: 4px;
}
.mode-button.selected .mode-hz {
  color: var(--orange);
}
.mode-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  gap: 5px;
  font-family: var(--mono);
  color: #919588;
  font-size: 6px;
  letter-spacing: 0.8px;
}
.pitch-readout {
  padding: 5px 0 15px;
  border-bottom: 1px solid var(--line);
}
.pitch-readout .eyebrow {
  font-size: 8px;
  color: #898c7d;
  letter-spacing: 1px;
}
.pitch-readout > div {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 4px;
}
.pitch-readout strong {
  font-family: var(--serif);
  font-size: 45px;
  font-weight: 400;
  letter-spacing: -1px;
  line-height: 1.2;
}
.pitch-readout > div > span:first-of-type {
  font-size: 11px;
  color: #929182;
}
.pitch-readout .note-label {
  margin-left: auto;
  background: #eaeadd;
  color: #69745e;
  border: 1px solid #d6d9c7;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 9px;
  padding: 4px 6px;
  letter-spacing: 0.3px;
}
.voice-actions {
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.strike-button {
  width: 100%;
  padding: 12px 10px;
  background: var(--orange);
  color: #fff4e5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 4px;
  font-size: 10px;
}
.strike-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.strike-button kbd {
  margin-left: auto;
  color: #f5ceb5;
  font-family: var(--mono);
  font-size: 10px;
}
.strike-button:hover {
  background: #a93c21;
  box-shadow: 0 3px 10px #bd452821;
}
.save-button {
  font-size: 10px;
  padding: 10px 3px;
  border: 1px solid #cdcebf;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.save-button:hover {
  background: #e8e8dc;
}
.save-button > span {
  font-size: 16px;
}
.volume-control {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
}
.mute-button {
  padding: 3px;
  display: flex;
  align-items: center;
  color: #7f8576;
}
.mute-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.2;
}
.mute-button[aria-pressed="true"] {
  color: var(--orange);
}
.volume-control input {
  flex: 1;
  min-width: 0;
}
.volume-control output {
  font-size: 8px;
  font-family: var(--mono);
  color: #878c7c;
  width: 26px;
}
.audio-status {
  text-align: center;
  font-size: 8px;
  line-height: 1.5;
  color: #878c7c;
  margin: 10px 0 0;
}
.rack-section {
  padding: 35px 0 30px;
}
.rack-heading {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 19px;
}
.rack-heading .eyebrow {
  color: var(--orange);
  font-size: 8px;
  letter-spacing: 1.1px;
  margin: 0 0 5px;
}
.rack-heading h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 31px;
  letter-spacing: -0.4px;
  margin: 0;
}
.rack-heading > p {
  margin: 3px 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.9;
}
.rack-heading > p span {
  color: #909383;
}
kbd {
  font-size: 9px;
  font-family: var(--mono);
}
.rack-heading kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 16px;
  width: 16px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #f7f5ee;
  color: #747b66;
}
.pattern-button {
  font-size: 10px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 15px;
  border: 1px solid #bfc4b1;
  border-radius: 4px;
}
.pattern-button span {
  color: var(--orange);
  font-size: 9px;
}
.pattern-button:hover,
.pattern-button.playing {
  background: #e1e6d6;
}
.rack {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.rack-slot {
  min-height: 107px;
  position: relative;
  border: 1px solid #d1d3c4;
  border-radius: 5px;
  transition:
    background 0.15s,
    box-shadow 0.15s;
  background: #efeee4;
}
.rack-slot.empty {
  border-style: dashed;
  background: transparent;
}
.pad-play {
  width: 100%;
  height: 105px;
  display: flex;
  gap: 14px;
  text-align: left;
  align-items: center;
  padding: 14px 17px;
}
.pad-play:hover {
  background: #e7e9db;
}
.pad-play canvas {
  width: 60px;
  height: 65px;
  flex-shrink: 0;
}
.pad-info strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 7px;
}
.pad-info > span {
  font-family: var(--mono);
  font-size: 8px;
  color: #828973;
  display: block;
}
.pad-info .empty-note {
  font-family: var(--sans);
  font-size: 9px;
  line-height: 1.6;
}
.pad-key {
  position: absolute;
  top: 9px;
  left: 10px;
  font-size: 8px;
  font-family: var(--mono);
  color: #979e89;
}
.pad-plus {
  font-family: var(--serif);
  font-size: 28px;
  color: #939d85;
  width: 50px;
  text-align: center;
  margin-right: 2px;
}
.pad-actions {
  position: absolute;
  right: 8px;
  top: 7px;
  display: flex;
  gap: 3px;
}
.pad-actions button {
  color: #8a927c;
  padding: 4px;
  font-size: 11px;
  line-height: 1;
}
.pad-actions button:hover {
  color: var(--orange);
  background: #dde1d0;
}
.rack-slot.sounding {
  background: #f1dbbe;
  box-shadow: inset 0 0 0 1px #c88655;
}
footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #939787;
}
footer > p {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.6px;
  margin: 0;
  color: #777e6b;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-star {
  color: var(--orange);
  font-size: 20px;
}
footer > div {
  display: flex;
  gap: 22px;
}
footer button {
  padding: 3px 0;
  font-size: 9px;
  color: #6f7964;
}
footer button span {
  margin-left: 5px;
  color: var(--orange);
}
footer button:hover {
  color: var(--orange);
}
footer > span {
  font-size: 8px;
}
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #27342c;
  color: #f9f4e5;
  border: 1px solid #4b5b40;
  box-shadow: 0 8px 40px #13201622;
  border-radius: 5px;
  padding: 14px 22px;
  font-size: 12px;
  line-height: 1.5;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  border: 1px solid #c8c7b6;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 42px;
  width: 560px;
  max-width: calc(100vw - 28px);
  max-height: 85dvh;
  box-shadow: 0 30px 150px #06150d70;
}
dialog::backdrop {
  background: #15241e80;
  backdrop-filter: blur(5px);
}
.dialog-close {
  position: absolute;
  right: 15px;
  top: 12px;
  font-size: 27px;
  color: #7b7f6f;
  padding: 5px 10px;
}
.dialog-close:hover {
  color: var(--orange);
}
dialog .eyebrow {
  color: var(--orange);
}
dialog h2 {
  font-family: var(--serif);
  font-size: 49px;
  letter-spacing: -1px;
  line-height: 1.04;
  font-weight: 400;
  margin: 19px 0 24px;
}
dialog h2 em {
  color: var(--orange);
}
dialog p {
  font-size: 13px;
  line-height: 1.8;
  color: #717665;
}
dialog strong {
  color: #4b5542;
  font-weight: 550;
}
.science-steps {
  border-top: 1px solid var(--line);
  margin: 25px 0;
  padding: 4px 0;
}
.science-steps p {
  position: relative;
  padding-left: 30px;
  font-size: 11px;
  margin: 19px 0;
}
.science-steps p > span {
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 9px;
  font-family: var(--mono);
  color: var(--orange);
}
details {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  font-size: 12px;
}
summary {
  cursor: pointer;
}
details p,
details li {
  font-size: 11px;
  line-height: 1.8;
}
details ul {
  padding-left: 17px;
}
details a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dialog-end {
  font-family: var(--serif);
  font-size: 20px !important;
  line-height: 1.4 !important;
  margin: 25px 0 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.noscript {
  padding: 24px;
  margin: 0;
  color: var(--orange);
}
@media (min-width: 1600px) {
  .workbench {
    grid-template-columns: 244px minmax(0, 1fr) 244px;
  }
  .stage {
    height: 520px;
  }
  .shape-panel,
  .voice-panel {
    padding: 29px 25px;
  }
  .section-copy {
    font-size: 12px;
  }
  .preset {
    min-height: 104px;
  }
  .voice-panel .control {
    margin-top: 30px;
  }
  .voice-actions {
    margin-top: 31px;
  }
  .mode-button canvas {
    height: 44px;
  }
  .mode-strip {
    gap: 7px;
  }
  .mode-section {
    padding: 22px 20px 19px;
  }
  .strike-button {
    font-size: 11px;
  }
  .save-button {
    font-size: 11px;
  }
  .shape-tip {
    font-size: 11px;
  }
  .control-heading {
    font-size: 12px;
  }
}
@media (max-width: 1200px) {
  main {
    padding: 0 24px;
  }
  .masthead {
    margin: 0 24px;
  }
  .masthead-caption {
    font-size: 7px;
  }
  .workbench {
    grid-template-columns: 180px minmax(0, 1fr) 190px;
  }
  .shape-panel,
  .voice-panel {
    padding: 22px 15px 17px;
  }
  .section-label h2 {
    font-size: 13px;
  }
  .section-copy {
    font-size: 10px;
  }
  .stage {
    height: 447px;
  }
  .stage-top {
    left: 17px;
    right: 14px;
  }
  .stage-bottom {
    left: 17px;
    right: 17px;
    font-size: 6px;
  }
  .stage-caption {
    left: 17px;
    font-size: 7px;
  }
  .tool-switch button {
    padding: 6px 9px;
    font-size: 9px;
  }
  .mode-section {
    padding: 17px 6px 13px;
  }
  .mode-heading p {
    max-width: 220px;
  }
  .mode-button canvas {
    height: 31px;
  }
  .mode-strip {
    gap: 3px;
  }
  .mode-button .mode-hz {
    font-size: 7px;
  }
  .preset svg {
    width: 52px;
  }
  .preset {
    min-height: 87px;
  }
  .draw-button {
    font-size: 9px;
  }
  .pitch-readout strong {
    font-size: 41px;
  }
  .strike-button {
    font-size: 9px;
    gap: 5px;
  }
  .strike-button svg {
    width: 15px;
  }
  .strike-button kbd {
    display: none;
  }
  .shape-tip {
    font-size: 9px;
  }
  .pad-play {
    padding: 14px 12px;
    gap: 8px;
  }
  .pad-play canvas {
    width: 45px;
  }
  .pad-info strong {
    font-size: 11px;
  }
  .rack-heading h2 {
    font-size: 29px;
  }
  .intro-copy {
    font-size: 12px;
  }
}
@media (max-width: 980px) {
  .masthead-caption {
    display: none;
  }
  .introduction {
    padding-top: 30px;
  }
  .intro-copy {
    font-size: 11px;
    max-width: 260px;
  }
  .workbench {
    grid-template-columns: 166px minmax(0, 1fr);
  }
  .voice-panel {
    grid-column: 1/-1;
    border-left: 0;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 120px repeat(3, minmax(0, 1fr)) 175px;
    gap: 15px;
    padding: 20px;
  }
  .voice-panel > .section-label,
  .voice-panel > .section-copy {
    display: none;
  }
  .voice-panel .control {
    margin-top: 1px;
  }
  .pitch-readout {
    padding: 0;
    border: 0;
  }
  .pitch-readout strong {
    font-size: 34px;
  }
  .pitch-readout .note-label {
    display: none;
  }
  .voice-actions {
    margin: 0;
    gap: 7px;
  }
  .strike-button {
    padding: 9px 6px;
  }
  .save-button {
    padding: 7px 3px;
    font-size: 9px;
  }
  .volume-control {
    grid-column: 1/3;
    margin: 0;
    max-width: 230px;
  }
  .audio-status {
    grid-column: 3/-1;
    margin: 0;
    align-self: center;
    text-align: right;
  }
  .stage {
    height: 410px;
  }
  .shape-tip {
    margin-top: 22px;
  }
  .rack-heading {
    gap: 20px;
  }
  .rack-heading > p {
    font-size: 9px;
  }
  .rack-heading h2 {
    font-size: 26px;
  }
  .rack {
    gap: 8px;
  }
  .pad-info strong {
    font-size: 10px;
  }
  .pad-info > span {
    font-size: 7px;
  }
  .pad-play {
    gap: 6px;
    padding: 18px 8px 10px;
  }
  .pad-play canvas {
    width: 40px;
  }
  .pad-info .empty-note {
    font-size: 8px;
  }
  footer > span {
    display: none;
  }
}
@media (max-width: 720px) {
  .masthead {
    height: 77px;
    margin: 0 17px;
    gap: 12px;
  }
  .brand {
    font-size: 36px;
    gap: 9px;
  }
  .brand svg {
    width: 30px;
  }
  .header-actions {
    gap: 16px;
    font-size: 10px;
  }
  .back-link {
    padding: 9px 10px;
  }
  .header-actions span {
    margin-left: 3px;
  }
  main {
    padding: 0 17px;
  }
  .introduction {
    display: block;
    padding: 27px 0 22px;
  }
  .introduction .eyebrow {
    font-size: 7px;
    letter-spacing: 0.9px;
  }
  h1 {
    font-size: 53px;
    letter-spacing: -1.5px;
  }
  .intro-copy {
    font-size: 11px;
    margin-top: 13px;
    max-width: none;
  }
  .intro-copy br {
    display: none;
  }
  .workbench {
    display: flex;
    flex-direction: column;
    overflow: visible;
  }
  .instrument-column {
    order: 0;
    padding: 7px 7px 0;
  }
  .shape-panel {
    order: 1;
    border-right: 0;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
    padding: 20px;
  }
  .section-label h2 {
    font-size: 14px;
  }
  .shape-panel > .section-label {
    grid-column: 1/2;
  }
  .shape-panel .section-copy {
    grid-column: 2/3;
    text-align: right;
    margin: 0;
    align-self: center;
    font-size: 9px;
  }
  .preset-grid {
    grid-column: 1/-1;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .preset {
    min-height: 80px;
    padding: 5px 4px 8px;
    font-size: 10px;
  }
  .preset svg {
    height: 44px;
    width: 56px;
  }
  .draw-button {
    margin: 0;
    align-self: center;
    font-size: 10px;
    height: 37px;
  }
  .width-control {
    margin: 0;
  }
  .shape-tip {
    grid-column: 1/-1;
    font-size: 10px;
    margin: 0;
    padding-top: 12px;
  }
  .shape-foot {
    grid-column: 1/-1;
    padding: 0;
    margin: 0;
  }
  .small-button {
    font-size: 10px;
  }
  .voice-panel {
    order: 2;
    grid-template-columns: 1fr 1fr;
    gap: 18px 23px;
    padding: 20px;
  }
  .voice-panel > .section-label {
    display: flex;
    grid-column: 1/2;
  }
  .voice-panel > .section-copy {
    display: block;
    grid-column: 2/3;
    text-align: right;
    margin: 0;
    align-self: center;
    font-size: 9px;
  }
  .pitch-readout {
    grid-column: 1/2;
    grid-row: 2/3;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .pitch-readout strong {
    font-size: 42px;
  }
  .pitch-readout .note-label {
    display: block;
    margin-left: 9px;
  }
  .voice-panel > .control {
    margin: 0;
    align-self: center;
  }
  .voice-actions {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .strike-button {
    font-size: 11px;
    padding: 13px 8px;
  }
  .strike-button svg {
    width: 17px;
  }
  .save-button {
    font-size: 10px;
    padding: 10px 7px;
  }
  .volume-control {
    grid-column: 1/2;
    max-width: none;
  }
  .audio-status {
    grid-column: 2/3;
    font-size: 9px;
    text-align: right;
  }
  .control-heading {
    font-size: 11px;
  }
  .range-captions {
    font-size: 9px;
  }
  .stage {
    height: 380px;
  }
  .stage-top {
    top: 20px;
    left: 18px;
    right: 13px;
  }
  .stage-title .eyebrow {
    font-size: 7px;
  }
  .stage-title h2 {
    font-size: 12px;
  }
  .stage-title h2 span {
    font-size: 9px;
  }
  .stage-bottom {
    left: 18px;
    right: 18px;
    height: 40px;
  }
  .stage-caption {
    left: 18px;
    bottom: 59px;
  }
  .sound-prompt {
    font-size: 19px;
    right: 11%;
    bottom: 90px;
  }
  .mode-section {
    padding: 19px 8px 15px;
  }
  .mode-heading h3 {
    font-size: 12px;
  }
  .mode-heading p {
    font-size: 9px;
    max-width: 240px;
  }
  .mode-strip {
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 4px;
    margin-top: 14px;
  }
  .mode-button canvas {
    height: 33px;
  }
  .mode-button .mode-number {
    font-size: 6px;
    left: 3px;
  }
  .mode-button .mode-hz {
    font-size: 6px;
  }
  .mode-meta {
    font-size: 6px;
    letter-spacing: 0.3px;
  }
  .rack-section {
    padding: 28px 0;
  }
  .rack-heading {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 17px;
  }
  .rack-heading > div {
    grid-column: 1/-1;
  }
  .rack-heading h2 {
    font-size: 31px;
  }
  .rack-heading > p {
    font-size: 10px;
    margin: 0;
    line-height: 1.8;
  }
  .pattern-button {
    padding: 10px 12px;
    font-size: 9px;
  }
  .rack {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .pad-play {
    height: 105px;
    padding: 15px 11px;
    gap: 8px;
  }
  .pad-play canvas {
    width: 51px;
  }
  .pad-info strong {
    font-size: 11px;
  }
  .pad-info > span {
    font-size: 8px;
  }
  .pad-info .empty-note {
    font-size: 9px;
  }
  .pad-plus {
    width: 45px;
  }
  .rack-slot {
    min-height: 107px;
  }
  footer {
    flex-wrap: wrap;
    justify-content: center;
    padding: 17px 0 24px;
    gap: 13px;
  }
  footer > p {
    font-size: 7px;
  }
  footer > div {
    gap: 25px;
  }
  footer button {
    font-size: 9px;
  }
  dialog {
    padding: 32px 25px;
  }
  dialog h2 {
    font-size: 44px;
  }
}
@media (max-width: 390px) {
  .header-actions {
    gap: 9px;
  }
  .back-link {
    font-size: 9px;
    padding: 8px;
  }
  .brand {
    font-size: 33px;
  }
  .introduction .eyebrow {
    font-size: 6px;
  }
  h1 {
    font-size: 47px;
  }
  .stage {
    height: 350px;
  }
  .stage-title .eyebrow {
    font-size: 6px;
  }
  .stage-title h2 {
    font-size: 11px;
  }
  .stage-title h2 span {
    font-size: 8px;
    margin-left: 3px;
  }
  .mode-strip {
    gap: 2px;
  }
  .mode-heading p {
    max-width: 185px;
    font-size: 8px;
  }
  .all-modes {
    font-size: 8px;
    padding: 6px;
  }
  .stage-bottom {
    font-size: 5px;
    letter-spacing: 0.4px;
  }
  .solve-status {
    font-size: 6px;
  }
  .voice-panel,
  .shape-panel {
    padding: 17px;
  }
  .preset-grid {
    gap: 6px;
  }
  .rack-heading h2 {
    font-size: 28px;
  }
  .pad-info strong {
    font-size: 10px;
  }
  .pad-play canvas {
    width: 43px;
  }
  .pad-play {
    padding: 15px 8px;
    gap: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Keep the harmonic pagination and full-sound toggle together. */
.mode-heading {
  justify-content: flex-start;
}
.mode-heading > div:first-child {
  margin-right: auto;
}
#mode-page {
  flex: 0 0 auto;
}
@media (max-width: 720px) {
  .mode-heading {
    flex-wrap: wrap;
    gap: 8px;
  }
  .mode-heading > div:first-child {
    flex: 1 1 100%;
  }
  .mode-heading > #mode-page {
    margin-left: auto;
  }
}
