:root {
  color-scheme: light;
  font-family: "DM Sans", "Avenir Next", Avenir, ui-sans-serif, system-ui, sans-serif;
  color: #17243b;
  background: #f2f4ff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #17243b;
  --muted: #64718a;
  --line: #dce3f2;
  --paper: #fff;
  --accent: #6747f5;
  --green: #16866f;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

:focus-visible {
  outline: 3px solid #c55535;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  z-index: 5;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  transform: translateY(-180%);
  background: var(--ink);
  color: white;
  border-radius: 4px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 82px;
  padding: 0 clamp(1rem, 5vw, 5rem);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font: 500 0.75rem var(--mono);
  letter-spacing: -0.08em;
}

.brand-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.tagline {
  margin: 0 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.global-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.control-label {
  font-size: 0.75rem;
  font-weight: 600;
}

.volume-control input {
  width: clamp(86px, 11vw, 142px);
  min-height: 44px;
  accent-color: var(--accent);
  cursor: pointer;
}

.volume-control output {
  min-width: 2.6rem;
  color: var(--muted);
  font: 0.7rem var(--mono);
  text-align: right;
}

.mute-button {
  display: inline-flex;
  min-width: 74px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0 0.65rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
}

.mute-button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.mute-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.mode-navigation {
  padding: 0 clamp(1rem, 5vw, 5rem);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 246, 0.62);
}

.mode-navigation-inner {
  display: flex;
  max-width: 1440px;
  gap: clamp(0.25rem, 1.5vw, 1.75rem);
  margin: 0 auto;
}

.mode-tab {
  position: relative;
  min-width: 64px;
  min-height: 56px;
  padding: 0 0.5rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 600;
}

.mode-tab::after {
  position: absolute;
  right: 0.5rem;
  bottom: -1px;
  left: 0.5rem;
  height: 2px;
  background: var(--accent);
  content: "";
  opacity: 0;
}

.mode-tab[aria-pressed="true"] {
  color: var(--ink);
}

.mode-tab[aria-pressed="true"]::after {
  opacity: 1;
}

.workbench {
  width: min(100% - 2rem, 1110px);
  margin: 0 auto;
  padding: 0 0 4rem;
}

.eyebrow,
.panel-footer,
.phase-badge {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.09em;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent);
}

.bench-panel {
  display: flex;
  min-height: min(55vh, 510px);
  flex-direction: column;
  border: 1px solid #d7d6cc;
  background-color: var(--paper);
  box-shadow: 0 12px 35px rgba(45, 47, 39, 0.045);
}

.empty-state {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem;
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 1.5rem;
  border: 1px solid #d9d7cc;
  border-radius: 50%;
  background: var(--paper);
}

.empty-icon svg {
  width: 32px;
  fill: none;
  stroke: #5e7160;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.empty-state .eyebrow {
  margin-bottom: 0.65rem;
}

.empty-state h2 {
  max-width: 30rem;
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 500;
  letter-spacing: -0.05em;
}

.empty-copy {
  max-width: 27rem;
  margin: 0.75rem 0 1.4rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.phase-badge {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  background: rgba(251, 250, 246, 0.8);
  color: #65685e;
  font-size: 0.6rem;
  letter-spacing: 0.035em;
}

.panner-mode {
  width: min(100%, 900px);
  margin: auto;
  padding: clamp(1.5rem, 5vw, 3.25rem) clamp(1rem, 5vw, 3rem);
}

.panner-heading {
  text-align: center;
}

.panner-heading h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.05em;
}

.panner-heading > p:last-child {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.panner-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0 0;
}

.panner-difficulty {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.panner-difficulty legend {
  float: left;
  margin-right: 0.6rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.panner-difficulty button,
.panner-secondary {
  min-height: 44px;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
}

.panner-difficulty button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.panner-score {
  display: flex;
  gap: 1.25rem;
  margin: 0;
}

.panner-score div {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.panner-score dt {
  color: var(--muted);
  font-size: 0.72rem;
}

.panner-score dd {
  margin: 0;
  font: 700 0.9rem var(--mono);
}

.panner-compass {
  position: relative;
  width: min(100%, 700px);
  aspect-ratio: 700 / 390;
  margin: 1.5rem auto 0;
}

.compass-arc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #c7c9bd;
  stroke-width: 1.5;
}

.compass-center-tick {
  stroke-dasharray: 4 6;
  stroke: #deded5;
}

.compass-label {
  position: absolute;
  bottom: 0;
  color: var(--muted);
  font: 0.66rem var(--mono);
  text-transform: uppercase;
}

.compass-label-left {
  left: 3%;
}

.compass-label-center {
  left: 50%;
  transform: translateX(-50%);
}

.compass-label-right {
  right: 3%;
}

.panner-positions {
  position: absolute;
  inset: 0;
}

.panner-position {
  position: absolute;
  top: var(--compass-y);
  left: var(--compass-x);
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 1px solid #c8c9be;
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
  font: 0.65rem var(--mono);
}

.panner-position:hover:not(:disabled) {
  border-color: var(--ink);
  background: #eeede6;
}

.panner-position:disabled {
  cursor: not-allowed;
}

.panner-position.is-guess {
  border: 3px solid #9b3e32;
  background: #f8e8e3;
  font-weight: 700;
}

.panner-position.is-correct {
  border: 3px solid #56725c;
  background: #e5eee5;
  font-weight: 700;
}

.panner-position.is-revealed {
  border-color: #9b3e32;
  background: #f8e8e3;
}

.panner-transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.2rem;
}

.panner-play,
.panner-next {
  min-width: 170px;
  min-height: 48px;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
}

.panner-play:disabled,
.panner-next:disabled {
  cursor: wait;
  opacity: 0.7;
}

.panner-play-status {
  min-width: 9rem;
  margin: 0;
  color: var(--muted);
  font: 0.7rem var(--mono);
}

.panner-feedback {
  min-height: 1.5rem;
  margin: 0.8rem 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

.panner-feedback[data-result="correct"] {
  color: #416348;
}

.panner-feedback[data-result="incorrect"],
.panner-feedback[data-result="revealed"] {
  color: #873b32;
}

.panner-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.panner-next {
  min-width: 130px;
  min-height: 44px;
  background: var(--green);
  border-color: var(--green);
}

.keys-assets-notice {
  margin: 1rem 0 0;
  padding: 0.75rem 0.85rem;
  border-left: 2px solid #d59a77;
  background: rgba(251, 250, 246, 0.85);
  color: #5d6058;
  font-size: 0.72rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.keys-assets-notice code {
  font-family: var(--mono);
  font-size: 0.95em;
}

.keys-answers {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.3rem, 1.5vw, 0.75rem);
  margin-top: 1.25rem;
}

.keys-answers button {
  min-width: 0;
  min-height: 52px;
  padding: 0.5rem 0.25rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  cursor: pointer;
  font-size: clamp(0.7rem, 2.5vw, 0.85rem);
  font-weight: 600;
}

.keys-answers button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.keys-answers button.is-guess {
  border: 3px solid #9b3e32;
  background: #f8e8e3;
}

.keys-answers button.is-correct {
  border: 3px solid #56725c;
  background: #e5eee5;
}

.keys-answers button.is-revealed {
  border-style: dashed;
}

.pass-help {
  color: #5d6058;
  font-size: 0.72rem;
  line-height: 1.6;
}

.pass-answer {
  margin-top: 1.75rem;
}

.pass-answer .sine-control input {
  min-height: 44px;
}

.pass-scale {
  position: relative;
  height: 4rem;
  margin: 0 10px;
  border-top: 1px solid var(--line);
}

.pass-marker {
  position: absolute;
  transform: translateX(-50%);
  font: 700 1rem var(--mono);
}

.pass-user-marker {
  top: 0;
  color: var(--ink);
}

.pass-target-marker {
  top: 1.2rem;
  color: #873b32;
}

.pass-scale-min,
.pass-scale-max {
  position: absolute;
  bottom: 0;
  color: #5d6058;
  font: 0.7rem var(--mono);
}

.pass-scale-min {
  left: 0;
}

.pass-scale-max {
  right: 0;
}

.pass-target-value {
  font: 700 0.85rem var(--mono);
  text-align: center;
}

.pick-response {
  margin: 1rem 0;
}

.pick-response svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
}

.pick-response-grid {
  fill: none;
  stroke: var(--line);
}

.pick-response-band {
  fill: var(--green);
  opacity: 0.12;
}

.pick-response-center {
  stroke: var(--ink);
  stroke-dasharray: 4 4;
}

.pick-response-curve {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
}

.pick-response-labels {
  fill: var(--ink);
  font: 11px var(--mono);
}

.pick-mode .pass-target-value {
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.pick-mode .pass-answer .sine-control input {
  min-height: 44px;
}

.sine-mode {
  width: min(100%, 680px);
  margin: auto;
  padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1.25rem, 6vw, 4rem);
}

.sine-mode-heading {
  margin-bottom: 2rem;
}

.sine-mode-heading h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.05em;
}

.sine-mode-heading > p:last-child {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.sine-source {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0 0 2rem;
  padding: 0;
  border: 0;
}

.sine-source legend {
  margin-bottom: 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.source-option {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.source-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.sine-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem;
}

.sine-control {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.sine-control-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.sine-control output {
  color: var(--accent);
  font: 0.78rem var(--mono);
  white-space: nowrap;
}

.sine-control input {
  width: 100%;
  min-height: 36px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.sine-control input:disabled {
  cursor: not-allowed;
}

.sine-control-help {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 400;
}

.sine-transport {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.generator-toggle {
  min-width: 180px;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

.generator-toggle[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
}

.generator-status {
  margin: 0;
  color: var(--muted);
  font: 0.72rem var(--mono);
}

.panel-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.35rem;
  border-top: 1px solid var(--line);
  background: rgba(251, 250, 246, 0.88);
  color: var(--muted);
  font-size: 0.58rem;
}

.noscript-message {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  padding: 1rem;
  background: var(--ink);
  color: white;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 680px) {
  .site-header {
    min-height: 72px;
    flex-wrap: wrap;
    gap: 0.25rem 0.7rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }

  .tagline {
    font-size: 0.72rem;
  }

  .global-controls {
    width: 100%;
    justify-content: space-between;
    gap: 0.65rem;
    margin: 0.25rem 0 0;
  }

  .volume-control {
    flex: 1;
    min-width: 0;
    gap: 0.5rem;
  }

  .control-label {
    font-size: 0.7rem;
  }

  .volume-control input {
    width: auto;
    min-width: 40px;
    flex: 1;
  }

  .mode-navigation {
    padding-right: 0;
    padding-left: 0;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .mode-navigation-inner {
    min-width: max-content;
    justify-content: space-around;
    gap: 0.25rem;
    padding: 0 0.75rem;
  }

  .mode-tab {
    min-width: 58px;
    min-height: 52px;
  }

  .workbench {
    width: min(100% - 1.5rem, 1110px);
  }

  .bench-panel {
    min-height: 55vh;
  }

  .sine-controls {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .sine-mode {
    padding: 2rem 1.25rem;
  }

  .panner-mode {
    padding: 1.75rem 1rem;
  }

  .panner-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.9rem;
  }

  .panner-difficulty {
    flex-wrap: wrap;
  }

  .panner-compass {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-template-rows: auto repeat(3, 44px);
    gap: 0.15rem;
    aspect-ratio: auto;
    margin-top: 1rem;
  }

  .compass-arc {
    display: none;
  }

  .compass-label {
    position: static;
    align-self: end;
    padding-bottom: 0.35rem;
    font-size: 0.58rem;
    transform: none;
  }

  .compass-label-left {
    grid-row: 1;
    grid-column: 1 / 3;
    text-align: left;
  }

  .compass-label-center {
    grid-row: 1;
    grid-column: 4 / 5;
    text-align: center;
  }

  .compass-label-right {
    grid-row: 1;
    grid-column: 6 / 8;
    text-align: right;
  }

  .panner-positions {
    display: contents;
  }

  .panner-position {
    position: static;
    grid-row: var(--mobile-row);
    grid-column: var(--mobile-column);
    width: 100%;
    height: 42px;
    transform: none;
    font-size: 0.6rem;
  }

  .panner-transport {
    align-items: stretch;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1.1rem;
  }

  .panner-play {
    width: 100%;
  }

  .panner-play-status {
    min-width: 0;
    text-align: center;
  }
}

@media (max-width: 380px) {
  .tagline {
    flex-basis: calc(100% - 50px);
    margin-left: 3rem;
    margin-top: -0.25rem;
  }

  .panel-footer {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    font-size: 0.51rem;
  }

  .panner-mode {
    padding-right: 0.65rem;
    padding-left: 0.65rem;
  }

  .panner-compass {
    width: calc(100vw - 0.5rem);
    grid-template-rows: auto repeat(3, 44px);
    gap: 0;
    margin-right: 0;
    margin-left: calc((100% - (100vw - 0.5rem)) / 2);
  }

  .panner-position {
    width: min(100%, 44px);
    height: 44px;
    justify-self: center;
    font-size: 0.55rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .mode-tab::after {
    transition: opacity 140ms ease;
  }
}

body {
  background:
    radial-gradient(ellipse at 8% 20%, rgba(122, 99, 255, 0.12), transparent 30rem),
    radial-gradient(ellipse at 95% 42%, rgba(54, 199, 181, 0.1), transparent 26rem),
    #f2f4ff;
}

.site-header {
  position: relative;
  z-index: 2;
  min-height: 88px;
  border-bottom-color: rgba(220, 227, 242, 0.8);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, #765bff, #4a37d8);
  box-shadow: 0 7px 16px rgba(103, 71, 245, 0.24);
  font-weight: 700;
}

.brand-name {
  font-size: 1.08rem;
}

.tagline {
  font-size: 0.84rem;
}

.mute-button {
  border-radius: 14px;
  background: #fff;
}

.mute-button[aria-pressed="true"] {
  border-color: #ff8a79;
  background: #fff0ed;
  color: #c04c45;
}

.mode-navigation {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border: 0;
  background: transparent;
}

.mode-navigation-inner {
  width: fit-content;
  max-width: 100%;
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid rgba(220, 227, 242, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 28px rgba(36, 48, 88, 0.08);
  backdrop-filter: blur(16px);
}

.mode-tab {
  min-width: 76px;
  min-height: 48px;
  border-radius: 13px;
  color: #64718a;
  font-size: 0.86rem;
}

.mode-tab::after {
  display: none;
}

.mode-tab[aria-pressed="true"] {
  background: linear-gradient(135deg, #755bff, #5e43e8);
  color: #fff;
  box-shadow: 0 5px 13px rgba(103, 71, 245, 0.24);
}

.workbench {
  padding-top: 0.6rem;
}

.bench-panel {
  overflow: hidden;
  min-height: min(58vh, 600px);
  border: 1px solid rgba(220, 227, 242, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(49, 58, 106, 0.12);
}

.eyebrow {
  color: #7155f6;
  font-weight: 700;
}

.empty-icon {
  width: 68px;
  height: 68px;
  border: 0;
  border-radius: 23px;
  background: linear-gradient(145deg, #eeeaff, #d8f8f2);
}

.empty-icon svg {
  stroke: #6148e9;
}

.phase-badge {
  border: 0;
  border-radius: 999px;
  background: #f1eeff;
  color: #634be4;
}

.panner-mode,
.sine-mode {
  padding-top: clamp(2rem, 6vw, 4rem);
  padding-bottom: clamp(2rem, 6vw, 4rem);
}

.panner-heading h2,
.sine-mode-heading h2,
.empty-state h2 {
  color: #17243b;
  font-weight: 650;
  letter-spacing: -0.045em;
}

.panner-options {
  margin-top: 2rem;
}

.panner-difficulty button,
.panner-secondary,
.keys-answers button {
  border-color: #dce3f2;
  border-radius: 13px;
  background: #f8f9ff;
}

.panner-difficulty button[aria-pressed="true"] {
  border-color: #684af1;
  background: #684af1;
  box-shadow: 0 5px 12px rgba(103, 71, 245, 0.18);
}

.panner-score {
  gap: 0.6rem;
}

.panner-score div {
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #e1e6f3;
  border-radius: 12px;
  background: #f8f9ff;
}

.panner-score div:first-child dd {
  color: #16866f;
}

.panner-score div:last-child dd {
  color: #d15d57;
}

.panner-position {
  border-color: #d5dcef;
  background: #fff;
  box-shadow: 0 5px 14px rgba(38, 54, 104, 0.08);
}

.panner-position:hover:not(:disabled) {
  border-color: #6747f5;
  background: #f1eeff;
}

.panner-position.is-guess,
.keys-answers button.is-guess {
  border-color: #ec8171;
  background: #fff0ed;
}

.panner-position.is-correct,
.keys-answers button.is-correct {
  border-color: #42b99e;
  background: #e5faf4;
}

.panner-position.is-revealed {
  border-color: #e46965;
  background: #fff0ed;
}

.panner-play,
.panner-next,
.generator-toggle {
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, #7154f5, #583de0);
  box-shadow: 0 8px 18px rgba(103, 71, 245, 0.24);
}

.panner-next {
  background: linear-gradient(135deg, #24aa8a, #12836d);
  box-shadow: 0 8px 18px rgba(22, 134, 111, 0.2);
}

.panner-feedback[data-result="correct"] {
  color: #11765f;
}

.panner-feedback[data-result="incorrect"],
.panner-feedback[data-result="revealed"] {
  color: #bd4d49;
}

.keys-assets-notice {
  border: 1px solid #f3d8a4;
  border-left: 4px solid #f2ad46;
  border-radius: 12px;
  background: #fff9e9;
  color: #705b31;
}

.keys-answers button {
  min-height: 60px;
  color: #493a9c;
  font-weight: 700;
}

.pass-answer {
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid #e2e7f4;
  border-radius: 20px;
  background: linear-gradient(145deg, #fbfbff, #f2f1ff);
}

.pass-marker {
  filter: drop-shadow(0 2px 2px rgba(23, 36, 59, 0.14));
}

.pass-target-marker {
  color: #d7525a;
}

.pick-response {
  overflow: hidden;
  padding: 0.8rem;
  border: 1px solid #e2e7f4;
  border-radius: 16px;
  background: #fff;
}

.pick-response-band {
  fill: #27b99a;
}

.pick-response-center {
  stroke: #ef776c;
}

.pick-response-curve {
  stroke: #6747f5;
}

.sine-source {
  gap: 0.6rem;
}

.source-option {
  padding: 0.7rem 1rem;
  border: 1px solid #dce3f2;
  border-radius: 14px;
  background: #f8f9ff;
}

.source-option:has(input:checked) {
  border-color: #b7aaff;
  background: #f1eeff;
  color: #543cce;
}

.sine-controls {
  gap: 1.25rem;
}

.sine-control {
  padding: 1.1rem 1.15rem;
  border: 1px solid #e2e7f4;
  border-radius: 17px;
  background: #fbfbff;
}

.sine-control input,
.volume-control input {
  accent-color: #6747f5;
}

.sine-control output {
  color: #6747f5;
  font-weight: 700;
}

.generator-toggle[aria-pressed="true"] {
  background: linear-gradient(135deg, #fa806e, #e65b63);
  box-shadow: 0 8px 18px rgba(230, 91, 99, 0.22);
}

.panel-footer {
  border-top-color: #e5e9f4;
  background: #f8f9ff;
  color: #78839a;
}

:focus-visible {
  outline-color: #f17469;
  outline-offset: 4px;
}

@media (max-width: 680px) {
  .site-header {
    min-height: 74px;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .global-controls {
    padding: 0.45rem 0.6rem 0.45rem 0.9rem;
    border: 1px solid #e2e7f4;
    border-radius: 15px;
    background: #f8f9ff;
  }

  .mode-navigation {
    padding-top: 0.55rem;
    padding-bottom: 0.45rem;
  }

  .mode-navigation-inner {
    width: max-content;
    justify-content: flex-start;
    margin: 0 auto;
    border-radius: 17px;
  }

  .mode-tab {
    min-height: 45px;
    border-radius: 12px;
  }

  .workbench {
    width: min(100% - 1rem, 1110px);
    padding-top: 0.45rem;
  }

  .bench-panel {
    min-height: 58vh;
    border-radius: 23px;
  }

  .panner-mode,
  .sine-mode {
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
  }

  .panner-options {
    gap: 0.75rem;
  }

  .panner-score {
    width: 100%;
  }

  .panner-score div {
    flex: 1;
    justify-content: center;
  }

  .panner-transport .panner-play,
  .sine-transport .generator-toggle {
    min-height: 54px;
    border-radius: 16px;
  }

  .panner-compass {
    padding: 0.5rem;
    border: 1px solid #e3e8f5;
    border-radius: 18px;
    background: linear-gradient(145deg, #fbfbff, #f2f1ff);
  }

  .panner-position {
    border-radius: 13px;
  }

  .sine-transport {
    align-items: stretch;
    flex-direction: column;
  }

  .generator-status {
    text-align: center;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .mode-tab,
  .panner-play,
  .panner-next,
  .generator-toggle,
  .panner-position {
    transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
  }

  .panner-play:hover,
  .panner-next:hover,
  .generator-toggle:hover {
    transform: translateY(-1px);
  }
}

.brand-logo {
  display: block;
  width: 120px;
  height: auto;
  flex: none;
}

@media (max-width: 680px) {
  .brand-logo {
    width: 100px;
  }
}
