@font-face {
  font-family: Bravura;
  src: url("./assets/Bravura.woff2") format("woff2");
  font-display: block;
}
.app-body { --z-navigation: 80; --z-navigation-scrim: 79; --text: #19332c; --accent: #406c4c; --shadow: 0 12px 40px #19332c33; }
* {
  box-sizing: border-box;
}
:root {
  --ink: #19332c;
  --muted: #718078;
  --paper: #f7f8f3;
  --line: #dce2d8;
  --lime: #d4f48a;
  --green: #406c4c;
  --teal: #488d93;
  --danger: #c26548;
}
body {
  margin: 0;
  background: #eff2eb;
  color: var(--ink);
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 16px;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button {
  color: inherit;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #84b759;
  outline-offset: 4px;
}
button {
  border: 0;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-family: Georgia, serif;
  font-size: 31px;
  line-height: 1.2;
  letter-spacing: -1px;
  font-weight: 400;
  margin: 20px 0 12px;
}
h2 {
  font-size: 30px;
  letter-spacing: -1px;
  margin: 8px 0;
}
h3 {
  font-size: 18px;
  letter-spacing: -0.4px;
}
p {
  line-height: 1.6;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 78;
  height: 100px;
  background: #172c28;
  color: #f4f6ed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  gap: 25px;
  transition: transform .24s ease;
  isolation: isolate;
}
.topbar-pin { position: absolute; right: 0; bottom: 0; z-index: 1; width: 36px; height: 36px; min-height: 36px; border: 0; border-radius: 0; background: transparent; color: #dce8d7; box-shadow: none; transition: background .16s ease, color .16s ease, opacity .16s ease; }
.topbar .topbar-pin { justify-items: end; padding-right: 4px; overflow: hidden; background: transparent; color: #dce8d7; border-color: transparent; box-shadow: none; }
.topbar .topbar-pin:hover, .topbar .topbar-pin:focus-visible, .topbar .topbar-pin[aria-pressed="true"] { opacity: 1; color: var(--lime); background: transparent; }
.topbar .topbar-pin[aria-pressed="false"] { opacity: .48; }
.topbar .topbar-pin[aria-pressed="false"]:hover, .topbar .topbar-pin[aria-pressed="false"]:focus-visible { opacity: 1; }
.topbar .topbar-pin svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.top-navigation-tab { position: fixed; top: 0; left: 50%; z-index: 79; display: inline-flex; align-items: center; gap: 0; min-width: 40px; min-height: 31px; padding: 3px 11px 5px; border: 1px solid #476052; border-top: 0; border-radius: 0 0 999px 999px; background: #203a33; color: #e5ecdf; box-shadow: 0 5px 14px #10231e55; transform: translate(-50%, -100%); transition: transform .2s ease, background .16s ease; overflow: hidden; cursor: grab; touch-action: none; }
.top-navigation-tab.is-exposed { z-index: calc(var(--z-navigation) + 1); }
.top-navigation-tab.is-dragging { cursor: grabbing; user-select: none; }
.top-navigation-tab svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.top-navigation-tab > span:not(.sr-only) { max-width: 0; margin: 0; overflow: hidden; opacity: 0; white-space: nowrap; font-size: 13px; font-weight: 600; letter-spacing: 0; transition: max-width .18s ease, margin .18s ease, opacity .18s ease; }
.top-navigation-tab:hover > span:not(.sr-only), .top-navigation-tab:focus-visible > span:not(.sr-only) { max-width: 10rem; margin: 0 14px 0 18px; opacity: 1; }
.top-navigation-tab[data-expand-side] { transition: background .16s ease; }
.top-navigation-tab[data-expand-side="left"] { flex-direction: row-reverse; }
.top-navigation-tab:hover, .top-navigation-tab:focus-visible { background: #29473d; color: var(--lime); }
html[data-top-navigation-pinned="false"] .top-navigation-tab { transform: translate(-50%, 0); }
html[data-top-navigation-pinned="false"] .top-navigation-tab[data-expand-side="right"]:is(:hover, :focus-visible) { transform: translate(-20px, 0); }
html[data-top-navigation-pinned="false"] .top-navigation-tab[data-expand-side="left"]:is(:hover, :focus-visible) { transform: translate(calc(-100% + 20px), 0); }
html[data-top-navigation-open="true"] .topbar { transform: translateY(0); }
/* An unpinned navigation yields all of its space to the page; the separate
   pull tab is the only visible affordance while it is closed. */
html[data-top-navigation-pinned="false"] .topbar { transform: translateY(-100%); }
html[data-top-navigation-pinned="false"][data-top-navigation-open="true"] .topbar { transform: translateY(0); }
html[data-top-navigation-pinned="false"][data-top-navigation-open="false"] .topbar { visibility: hidden; pointer-events: none; }
html[data-top-navigation-pinned="false"] .topbar { position: fixed; inset: 0 0 auto; }
html[data-top-navigation-pinned="false"][data-top-navigation-open="false"] { --site-header-height: 0px; }
/* Once the unpinned header has slid away, the small pull tab is the only
   element above the workspace. Reclaim the former header clearance. */
html[data-top-navigation-pinned="false"][data-top-navigation-open="false"] .layout { padding-top: 4px; }
html[data-top-navigation-pinned="false"] .topbar-pin { display: inline-grid; }
html[data-top-navigation-pinned="true"] .top-navigation-tab,
html[data-top-navigation-open="true"] .top-navigation-tab { display: none; }
html[data-top-navigation-pinned="false"][data-top-navigation-open="false"] .app-body #chapter-drawer,
html[data-top-navigation-pinned="false"][data-top-navigation-open="false"] .app-body #sound-drawer,
html[data-top-navigation-pinned="false"][data-top-navigation-open="false"] .app-body > button.navigation-scrim,
html[data-top-navigation-pinned="false"][data-top-navigation-open="false"] .app-body > button.sound-navigation-scrim { top: 0; }
html[data-top-navigation-open="true"] .top-navigation-tab svg { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .topbar, .top-navigation-tab { transition: none; } }
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -1px;
}
.brand-mark {
  display: block;
  flex: 0 0 auto;
  width: 44px;
  height: auto;
}
.brand-caption {
  display: block;
  font-size: 9px;
  letter-spacing: 2.2px;
  font-weight: 400;
  margin-top: 4px;
}
.topbar nav {
  display: flex;
  align-self: stretch;
  gap: 30px;
}
.nav-button {
  background: none;
  color: #aab9ad;
  border-bottom: 3px solid transparent;
  font-size: 14px;
  padding: 0 2px;
}
.nav-button.active {
  color: var(--lime);
  border-color: var(--lime);
}
.connection {
  border: 1px solid #476052;
  background: none;
  color: #e5ecdf;
  border-radius: 8px;
  padding: 11px 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}
.connection-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.status-dot,
.live-dot {
  display: inline-block;
  background: #a3b499;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.status-dot.connected {
  background: var(--lime);
}
.layout {
  max-width: 1720px;
  margin: auto;
  display: grid;
  grid-template-columns: 218px minmax(400px, 1fr) 255px;
  gap: 30px;
  padding: 36px 38px 24px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.6px;
  font-weight: 650;
  color: #7a8777;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
  line-height: 1.55;
}
.journey > .muted {
  font-size: 13px;
}
.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 27px;
}
.lesson-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: transparent;
  padding: 12px 9px;
  border-radius: 8px;
}
.lesson-button:hover {
  background: #e4eadd;
}
.lesson-button.active {
  background: #dfe8d5;
}
.lesson-number {
  width: 29px;
  height: 29px;
  border: 1px solid #c5d0be;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  flex-shrink: 0;
}
.active .lesson-number {
  background: var(--ink);
  color: var(--lime);
  border-color: var(--ink);
}
.lesson-text strong {
  display: block;
  font-weight: 600;
  font-size: 13px;
}
.lesson-text span {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  color: #788573;
}
.lesson-complete {
  margin-left: auto;
  color: #44744a;
  font-size: 15px;
}
.practice-tip {
  display: flex;
  gap: 10px;
  margin: 30px 7px 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.practice-tip strong {
  font-size: 12px;
}
.practice-tip p {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0;
}
.tip-icon {
  font-size: 23px;
}
.text-button {
  background: none;
  padding: 6px 0;
  font-size: 12px;
  display: flex;
  gap: 18px;
  align-items: center;
}
.session-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.session-heading p,
.lesson-heading-content p {
  font-size: 13px;
  color: var(--muted);
  margin: 9px 0 0;
}
.lesson-chapter-link {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.lesson-chapter-link:hover,
.lesson-chapter-link:focus-visible {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.lesson-heading-content--compact h2,
.lesson-heading-content--compact p {
  display: none;
}
.score-topline > .lesson-heading-content--compact {
  margin: 0;
}
.session-heading > .pill {
  align-self: flex-start;
  margin-top: 30px;
}
.lesson-tips {
  margin-top: 12px;
  max-width: 620px;
  font-size: 12px;
}
.workspace > .lesson-tips { max-width: none; margin: 0 0 20px; font-size: 14px; }
.workspace > .lesson-tips .lesson-tips-body {
  margin-top: 0;
  padding: 20px 24px;
  border: 1px solid #d5ddce;
  border-top-right-radius: 13px;
  border-bottom-left-radius: 13px;
  border-bottom-right-radius: 13px;
  background: var(--paper);
  box-shadow: 0 5px 18px #22342104;
  line-height: 1.7;
}
.workspace > .lesson-tips .lesson-heading-content {
  margin: 0 0 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.workspace > .lesson-tips .lesson-heading-content h2 {
  margin: 8px 0 0;
  font-size: clamp(26px, 3vw, 34px);
}
.workspace > .lesson-tips .lesson-heading-content p {
  margin-top: 8px;
  font-size: 15px;
}
.getting-started { margin: 24px 0; border: 1px solid #d5ddce; border-radius: 13px; background: var(--paper); overflow: hidden; }
.tour-welcome { padding: 30px; background: linear-gradient(120deg, #e8efdf, #f7f8f3); }
.tour-welcome h3 { font: 32px Georgia, serif; margin: 12px 0; }
.tour-welcome p { max-width: 850px; }
.tour-section { padding: 28px 30px; border-top: 1px solid #d5ddce; }
.tour-section h3 { margin: 0 0 16px; font-size: 20px; }
.tour-section h4 { margin: 20px 0 6px; font-size: 15px; }
.tour-section p { font-size: 14px; line-height: 1.75; }
.tour-diagram { display: block; width: min(100%, 700px); height: auto; margin: 20px auto; }
.tour-staff-label { font-size: 16px; fill: #33483d; }
.tour-range-label { font-size: 13px; font-weight: 700; letter-spacing: 1px; fill: #35594a; }
.tour-keyboard-label { font-size: 12px; fill: #33483d; }
@media (max-width: 680px) {
  .tour-staff-label { font-size: 23px; }
  .tour-range-label { font-size: 18px; }
  .tour-keyboard-label { font-size: 17px; }
}
.tour-columns, .tour-demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: start; }
.tour-demo-grid { margin-top: 28px; }
.tour-columns > [data-demo] { margin-top: 20px; }
.tour-player { margin: 0; border: 1px solid #bfcdb7; border-radius: 12px; overflow: hidden; background: #f4f7ef; box-shadow: 0 5px 18px #22342108; }
.tour-player figcaption { background: #1d332d; color: #eef3e7; padding: 15px 18px; font-size: 15px; font-weight: 600; }
.tour-player figcaption small { display: block; margin-top: 5px; font-size: 11px; font-weight: 400; color: #bfceb8; }
.tour-screen { padding: 20px 14px; min-height: 250px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.tour-setup { display: flex; align-items: center; justify-content: center; gap: 5px; }
.tour-chip { text-align: center; border: 1px solid #cad6c2; padding: 14px 7px; border-radius: 6px; font-size: 12px; flex: 1; }
.tour-chip small { display: block; margin-top: 7px; font-size: 10px; }
.tour-chip.lit { background: #dcebc9; border-color: #91a978; }
.tour-arrow { color: #547642; }
.tour-mode { display: flex; justify-content: space-between; gap: 12px; font-size: 9px; letter-spacing: .5px; color: #5c7155; }
.tour-mode span { text-align: right; }
.tour-stave { display: block; width: 100%; height: auto; }
.tour-note { transform-box: fill-box; }
.tour-player[data-playing="true"] .tour-note { animation: tour-arrive .8s ease-out both; }
@keyframes tour-arrive { from { opacity: 0; translate: 24px 0; } to { opacity: 1; translate: 0; } }
.tour-keys { display: flex; height: 85px; width: min(100%, 260px); margin: 0 auto; }
.tour-keys > span { position: relative; flex: 1; border: 1px solid #95a58c; border-radius: 0 0 3px 3px; background: #fffef6; padding-top: 63px; text-align: center; font-size: 10px; color: #547642; }
.tour-keys > span.lit { background: #86c2d1; }
.tour-keys i { position: absolute; background: #1d332d; width: 60%; height: 50px; top: 0; right: -30%; z-index: 1; border-radius: 0 0 2px 2px; }
.tour-pressure { height: 4px; border-radius: 5px; background: #e1e8da; overflow: hidden; }
.tour-pressure span { display: block; height: 100%; }
.tour-player .tour-caption { padding: 0 18px; min-height: 80px; margin: 0; font-size: 13px; }
.tour-controls { display: flex; align-items: center; gap: 10px; padding: 14px; border-top: 1px solid #d5ddce; }
.tour-controls button { background: #274a35; color: #f4f7ef; padding: 8px 10px; border-radius: 5px; min-height: 36px; white-space: nowrap; }
.tour-controls input { min-width: 30px; flex: 1; width: 100%; }
.tour-controls > span { font-size: 11px; white-space: nowrap; }
.tour-table-scroll { overflow-x: auto; }
.tour-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.6; }
.tour-table caption { text-align: left; margin: 10px 0; color: #62775a; }
.tour-table th, .tour-table td { text-align: left; padding: 13px 16px; border: 1px solid #d5ddce; vertical-align: top; }
.tour-table thead { background: #e5ecdd; }
.tour-table th[scope="row"] { width: 24%; }
.tour-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
@media (max-width: 1100px) { .tour-columns, .tour-demo-grid { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
  .tour-welcome, .tour-section { padding: 20px 16px; }
  .tour-welcome h3 { font-size: 27px; }
  .tour-table th, .tour-table td { padding: 9px; }
  .tour-player .tour-caption { min-height: 105px; }
}
@media (prefers-reduced-motion: reduce) { .tour-player[data-playing="true"] .tour-note { animation: none; } }
.lesson-context {
  margin: 16px 0 18px;
  padding: 14px 16px 4px;
  border: 1px solid #d2dfcc;
  border-radius: 8px;
  background: #f4f7ef;
}
.lesson-context h3 { margin: 0 0 8px; font-size: 15px; }
.lesson-context p { margin: 0 0 10px; }
.intro-note-map {
  float: left;
  width: min(460px, 100%);
  margin: 14px 24px 12px 0;
  padding: 16px;
  border: 1px solid #cbd9c4;
  border-radius: 10px;
  background: #fbfcf8;
  box-shadow: 0 4px 18px #19332c0d;
}
.intro-note-map figure { margin: 0; }
#lesson-guide::after { content: ''; display: block; clear: both; }
@media (max-width: 1100px) {
  .intro-note-map { float: none; margin-right: 0; }
}
.intro-note-map figcaption { margin-bottom: 7px; font-weight: 600; }
.intro-note-legend { display: flex; gap: 18px; margin-bottom: 8px; font-size: 12px; }
.intro-note-legend span::before { content: ''; display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.intro-note-legend .left-hand::before { background: #86c2d1; }
.intro-note-legend .right-hand::before { background: #c3df92; }
.intro-note-summary { margin: 0 0 8px !important; font-size: 11px !important; color: #5f735b; letter-spacing: .2px; }
.intro-diagram-scroll { overflow-x: auto; }
.intro-diagram-composite { margin-inline: 0; }
.intro-note-scroll { overflow: visible; }
.intro-note-scroll svg { display: block; width: auto; max-width: none; height: 220px; margin-inline: auto; }
.intro-note-map p { font-size: 12px; margin: 8px 0 14px; }
.intro-key-badge[data-hand="left"] circle { fill: #86c2d1; stroke: #397e91; }
.intro-key-badge[data-hand="right"] circle { fill: #c3df92; stroke: #688c3c; }
.intro-key-badge text { fill: #19332c; }
.lesson-tips .fingering-card { max-width: 410px; margin: 0 auto; padding: 0; border: 0; background: none; box-shadow: none; }
.lesson-tips .fingering-heading,
.lesson-tips .fingering-cue,
.lesson-tips .fingering-note { display: none; }
.lesson-tips .finger-hands { max-width: 410px; }
.lesson-tips .hand-diagram { height: 260px; }
.lesson-tips .finger[data-intro-assigned="left"] .finger-number { fill: #86c2d1; stroke: #397e91; }
.lesson-tips .finger[data-intro-assigned="right"] .finger-number { fill: #c3df92; stroke: #688c3c; }
.lesson-tips .finger[data-intro-assigned]:not([data-intro-assigned=""]) text { fill: #19332c; font-size: 65px; font-weight: 700; }
.lesson-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  background: transparent;
  text-align: left;
  letter-spacing: inherit;
  border-radius: 3px;
}
.lesson-toggle svg {
  flex-shrink: 0;
  fill: none;
  stroke: #718b66;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lesson-toggle[aria-expanded="true"] svg {
  transform: rotate(90deg);
}
.lesson-toggle:hover:not(:disabled) {
  color: var(--green);
}
.lesson-toggle:disabled {
  opacity: 1;
  cursor: default;
}
.lesson-toggle:disabled svg {
  display: none;
}
.lesson-tips summary {
  width: fit-content;
  color: #4c7050;
  cursor: pointer;
  padding: 4px 0;
}
.lesson-tips summary:hover {
  color: var(--ink);
}
.lesson-tips-body {
  margin-top: 8px;
  padding: 4px 16px 14px;
  border-left: 2px solid #bccdad;
  background: #e7eedf80;
  border-radius: 0 8px 8px 0;
}
.session-heading .lesson-tips-body p {
  font-size: 13px;
  line-height: 1.7;
  color: #53674f;
}
.lesson-note-list {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  color: #53674f;
  font-size: 13px;
  line-height: 1.7;
}
.lesson-note-list > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
}
.lesson-note-list dt {
  min-width: 72px;
  font-weight: 600;
  color: var(--ink);
}
.lesson-note-list dd {
  margin: 0;
}
.pill {
  font-size: 12px;
  white-space: nowrap;
  padding: 9px 13px;
  border: 1px solid #cbd7c3;
  border-radius: 30px;
  background: #e8eedf;
}
.session-options {
  display: flex;
  align-items: center;
  gap: 19px;
  margin: 27px 0 0;
  flex-wrap: wrap;
}
.session-options > .pill {
  margin-left: auto;
  align-self: center;
}
.segmented {
  background: #e0e6da;
  border: 1px solid #cbd7c3;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  padding: 0;
  display: flex;
  overflow: hidden;
}
.segmented button {
  min-height: 44px;
  padding: 10px 18px;
  background: transparent;
  border: 0;
  border-right: 1px solid #cbd7c3;
  border-radius: 0;
  font-size: 14px;
  color: #697664;
}
.segmented button:last-child { border-right: 0; }
.segmented button.selected {
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--paper);
  position: relative;
  z-index: 1;
}
.session-options ~ .score-card { border-top-left-radius: 0; }
.check-label {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 12px;
  white-space: nowrap;
}
input[type="checkbox"] {
  accent-color: var(--green);
  width: 14px;
  height: 14px;
}
.pace-label {
  margin-left: auto;
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.pace-label input {
  width: 65px;
}
.pace-label output {
  min-width: 22px;
}
input[type="range"] {
  accent-color: #49764e;
  height: 4px;
  cursor: pointer;
}
.score-card {
  background: var(--paper);
  border: 1px solid #d5ddce;
  border-radius: 13px;
  overflow: hidden;
  box-shadow: 0 5px 18px #22342104;
}
.practice-feedback { margin-left: auto; padding: 8px 0; font-size: 12px; }
.worksheet-target { transition: transform .35s ease; }
.answer-marker { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .worksheet-target { transition: none; } }
.score-topline {
  display: flex;
  justify-content: space-between;
  padding: 19px 23px;
  font-size: 10px;
  letter-spacing: 1px;
  color: #87907f;
}
.score-topline > span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}
.live-dot {
  background: #93ac7a;
  width: 5px;
  height: 5px;
}
.staff-wrap {
  height: 290px;
  position: relative;
}
.staff-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}
.music {
  font-family: Bravura;
  font-size: 52px;
}
.staff-line {
  stroke: #b7c1ad;
  stroke-width: 1;
}
.start-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: linear-gradient(
    90deg,
    #f7f8f300,
    #f7f8f3e8 25%,
    #f7f8f3ee 80%,
    #f7f8f300
  );
}
.overlay-icon {
  font-size: 35px;
  color: #627f4e;
  margin-bottom: 10px;
}
.start-overlay strong {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 27px;
  letter-spacing: -0.5px;
}
.start-overlay p {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}
.score-bottom {
  border-top: 1px solid #e5e9de;
  min-height: 50px;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #73826a;
  font-size: 12px;
}
.pressure {
  width: 65px;
  height: 5px;
  background: #e2e7d9;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.pressure span {
  height: 100%;
  display: block;
  background: #9bb573;
  transition: width 0.2s;
  width: 0;
}
.transport {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 22px 0 26px;
}
.stats {
  display: flex;
  gap: 28px;
}
.stat-label {
  display: block;
  font-size: 9px;
  letter-spacing: 1.2px;
  color: #798773;
  margin-bottom: 7px;
}
.stats strong {
  font-size: 22px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.stats small {
  font-size: 10px;
  font-weight: 400;
  color: #819075;
}
.transport-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}
.primary-button {
  background: #294d38;
  color: #eff9df;
  border-radius: 7px;
  padding: 13px 19px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.primary-button:hover {
  background: #346244;
}
.primary-button > span {
  margin-right: 8px;
  font-size: 11px;
}
.secondary-button {
  background: #e5eddc;
  padding: 13px 19px;
  border-radius: 7px;
  font-size: 13px;
}
.sound-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #bdcdb2;
  font-weight: 500;
}
.sound-preview:hover:not(:disabled) {
  background: #dbe6d0;
  border-color: #829b74;
}
.sound-preview:active:not(:disabled) {
  background: #d0dfc3;
}
.sound-preview svg {
  flex-shrink: 0;
}
.icon-button {
  width: 38px;
  height: 40px;
  background: none;
  font-size: 25px;
  color: #8b997e;
}
.keyboard-card {
  padding: 17px 18px 12px;
  background: #233a30;
  color: #e1e9d7;
  border-radius: 11px;
  box-shadow: 0 5px 12px #2032260c;
}
.keyboard-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 13px;
  font-size: 9px;
  letter-spacing: 0.8px;
  gap: 8px;
}
.keyboard-top > span > span {
  color: #93a486;
  margin-left: 12px;
  letter-spacing: 0;
}
.keyboard-top .check-label {
  font-size: 10px;
  color: #c0cbb5;
  letter-spacing: 0;
}
.keyboard-controls { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:10px; }
.keyboard-view { display:inline-flex; padding:2px; border:1px solid #607258; border-radius:6px; gap:2px; letter-spacing:0; }
.keyboard-view button { padding:5px 8px; border-radius:4px; color:#c0cbb5; font-size:10px; white-space:nowrap; }
.keyboard-view button[aria-pressed="true"] { background:#e5eddc; color:#233a30; }
kbd {
  border: 1px solid #607258;
  padding: 1px 4px;
  border-radius: 3px;
  font: 10px inherit;
  color: #b6c5a6;
}
.piano-viewport { overflow-x:auto; overflow-y:hidden; scrollbar-color:#839a75 #233a30; scrollbar-width:thin; }
.piano {
  position: relative;
  height: 132px;
  min-width:100%;
  user-select: none;
  touch-action: pan-x;
}
.piano-key {
  position: absolute;
  top: 0;
  border-radius: 0 0 4px 4px;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  padding-bottom: 12px;
  font-size: 10px;
  /* A piano key is a direct-manipulation control: don't let a chord become
     a browser pan or pinch gesture before its individual pointer releases. */
  touch-action: none;
}
.piano-key.white {
  height: 100%;
  background: linear-gradient(#f5f5e9, #fafbf3);
  border: 1px solid #b3b7a3;
  color: #89917d;
  z-index: 1;
}
.piano-key.black {
  height: 62%;
  background: linear-gradient(#17231e, #2e3b30);
  border: 1px solid #14221c;
  color: #75866d;
  z-index: 2;
  width: 4%;
}
.piano-key .note-name {
  font-size: 11px;
  color: #687956;
}
.piano-key.black .note-name {
  color: #ced7c3;
  font-size: 9px;
}
.piano-key.active {
  background: var(--lime);
  color: #284327;
}
.piano-key.black.active {
  background: #86ae69;
  color: #162a18;
}
.piano-key.target {
  box-shadow: inset 0 -7px #55acdf;
}
.piano-key.white.target:not(.active) {
  background: linear-gradient(#eef7fd, #bde4fb);
}
.piano-key.black.target:not(.active) {
  background: linear-gradient(#225477, #3782af);
}
.piano-key.black.target .note-name {
  color: #f0f9ff;
}
.fingering-card {
  margin-top: 16px;
  padding: 19px 23px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f7f9f3;
}
.fingering-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.fingering-heading h3 {
  margin: 0;
  font-size: 15px;
}
.finger-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: #647461;
  font-size: 12px;
}
.finger-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hint-swatch,
.pressed-swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #55acdf;
}
.pressed-swatch {
  background: #b7d977;
}
.finger-hands {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  max-width: 510px;
  margin: 12px auto 0;
}
.hand-guide {
  text-align: center;
  min-width: 0;
}
.hand-diagram {
  display: block;
  width: 100%;
  height: 230px;
  overflow: visible;
  mix-blend-mode: multiply;
}
.hand-engraving {
  mix-blend-mode: multiply;
  opacity: 0.82;
}
.finger-region {
  fill: #55acdf;
  opacity: 0;
  mix-blend-mode: multiply;
}
.finger-number {
  fill: transparent;
  stroke: transparent;
  stroke-width: 6;
}
.finger text {
  fill: #29493b;
  font-family: Georgia, serif;
  font-size: 94px;
  font-weight: 400;
}
.finger.hint .finger-region {
  opacity: 0.5;
}
.finger.hint .finger-number {
  fill: #e2f1fa;
  stroke: #389bc9;
}
.finger.hint text {
  fill: #195774;
}
.hand-guide > strong {
  display: block;
  font-size: 14px;
  margin: 3px 0 6px;
}
.hand-cue {
  display: block;
  min-height: 34px;
  font-size: 12px;
  line-height: 1.5;
  color: #4c7190;
}
.fingering-cue {
  text-align: center;
  font-size: 13px;
  color: #3c6580;
  margin: 10px 0 4px;
  min-height: 21px;
}
.fingering-note {
  text-align: center;
  font-size: 12px;
  color: #7b8972;
  margin: 0;
}
@media (max-width: 680px) {
  .fingering-card {
    padding: 16px 12px 13px;
  }
  .fingering-heading {
    align-items: flex-start;
  }
  .finger-legend {
    gap: 7px;
    font-size: 11px;
  }
  .finger-hands {
    gap: 10px;
  }
  .hand-diagram {
    height: 185px;
  }
  .finger text {
    font-size: 104px;
  }
  .hand-cue {
    font-size: 11px;
  }
}
.piano-key.middle .note-name {
  font-weight: 750;
  color: #375437;
}
.key-shortcut {
  font-size: 9px;
  opacity: 0.65;
}
.effects-rack {
  border-top: 1px solid #dce3d4;
  margin-top: 24px;
  padding-top: 20px;
}
.effects-rack > summary {
  font-weight: 650;
  cursor: pointer;
}
.effects-badge {
  display: block;
  margin: 6px 0 0 15px;
  font-size: 11px;
  font-weight: 400;
  color: #708067;
}
.effect-card {
  border-top: 1px solid #dce3d4;
  padding: 14px 0;
}
.effect-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.effect-heading h4 {
  margin: 0;
  font-size: 14px;
}
.effects-check {
  display: flex;
  gap: 5px;
  align-items: center;
  font-size: 12px;
  margin: 8px 0;
}
.effects-body input[type="range"] {
  width: 100%;
  accent-color: #4b744b;
}
.effects-body input:disabled,
.effects-body select:disabled {
  opacity: 0.45;
}
.effects-body .slider-label {
  margin: 14px 0 7px;
  gap: 8px;
}
.effect-parameters {
  margin-top: 10px;
}
.effect-parameters summary,
.effects-save summary {
  cursor: pointer;
  font-size: 12px;
  color: #52714a;
}
.effects-help,
.effects-status {
  font-size: 12px;
  line-height: 1.5;
  color: #708067;
  margin: 10px 0;
}
.effects-status {
  color: #375437;
}
.effects-save {
  margin: 5px 0 15px;
}
.effects-save input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 9px;
  border: 1px solid #d3ddc9;
  background: #f8faf4;
  border-radius: 6px;
  color: var(--ink);
}
.effects-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}
.effects-actions button:disabled {
  opacity: 0.45;
  cursor: default;
}
.settings {
  border-left: 1px solid #dce3d4;
  padding-left: 24px;
}
.sound-panel h3 {
  margin: 10px 0 23px;
}
.field-label {
  display: block;
  font-size: 12px;
  margin: 12px 0 8px;
  color: #708067;
}
select {
  width: 100%;
  padding: 11px 9px;
  border-radius: 7px;
  background: #f8faf4;
  border: 1px solid #d3ddc9;
  font-size: 12px;
  color: var(--ink);
}
.sound-panel .small {
  margin: 9px 0 20px;
  min-height: 36px;
}
#own-instrument-info[hidden],
#browser-sound-controls[hidden],
#effects-panel[hidden],
#sound-status[hidden] {
  display: none;
}
.own-instrument-info {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faf4;
  margin-top: 14px;
  padding: 16px;
}
.own-instrument-info strong {
  display: block;
  font-size: 14px;
}
.own-instrument-info p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  margin: 10px 0 14px;
}
.own-instrument-info #own-midi-status {
  margin-bottom: 10px;
  min-height: 0;
}
.own-instrument-help {
  font-size: 12px;
}
.own-instrument-help summary {
  color: var(--ink);
  cursor: pointer;
  text-decoration: underline;
}
.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin: 20px 0 12px;
}
.slider-label output {
  font-size: 11px;
  color: #7e8d73;
}
.sound-panel input[type="range"] {
  width: 100%;
  display: block;
}
.sound-details {
  font-size: 12px;
  margin-top: 22px;
}
.sound-details summary {
  cursor: pointer;
  color: #718166;
}
.free-release-panel {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.free-release-panel h3 {
  font-size: 15px;
  margin-bottom: 12px;
}
.free-release-panel button {
  width: 100%;
  border: 1px solid #bdcdb2;
}
.free-release-panel p {
  font-size: 12px;
  line-height: 1.5;
  margin: 10px 0 0;
}
#key-badge { cursor: pointer; white-space: nowrap; }
#key-badge::after { content: " ▾"; }
.key-picker { position: relative; inset: auto; width: 100%; max-width: none; margin: 0 0 24px; padding: 24px; }
.key-picker:not([open]) { display: none; }
#key-picker-close { position: absolute; right: 12px; top: 10px; }
.key-picker h2 { font-size: 25px; margin: 0; }
.key-picker-content { display: grid; grid-template-columns: minmax(260px, 1.3fr) minmax(160px, 1fr); align-items: center; gap: 20px; }
.key-picker .circle { width: 100%; max-width: 390px; }
.key-picker .circle::after { font-size: 8px; inset: 44% 35%; }
.key-picker .circle::before { inset: 23%; }
.key-picker .circle-key { width: 44px; height: 44px; padding: 3px; font-size: 14px; }
.circle-key strong, .circle-key small { display: block; }
.circle-key small { font-size: 9px; font-weight: normal; }
.circle-rating { position: absolute; top: 100%; left: 0; width: 100%; font-size: 9px; color: var(--green); }
.circle-minor { position: absolute; transform: translate(-50%, -50%); font-size: 11px; color: var(--muted); pointer-events: none; }
.key-picker .key-details { text-align: left; }
.key-picker .key-details > strong { font-size: 23px; }
#key-scale { font-weight: 600; line-height: 1.8; }
@media (max-width: 700px) {
  .key-picker { position: fixed; inset: 0; margin: auto; width: calc(100% - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 22px 16px; }
  .key-picker-content { grid-template-columns: 1fr; gap: 16px; }
}
.key-panel {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 23px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.section-title h3 {
  font-size: 15px;
  margin-bottom: 0;
}
.section-title .small {
  font-size: 10px;
}
.circle {
  position: relative;
  aspect-ratio: 1;
  max-width: 240px;
  margin: 13px auto 0;
}
.circle::before {
  content: "";
  position: absolute;
  inset: 26%;
  border: 1px dashed #c1ceb8;
  border-radius: 50%;
}
.circle::after {
  content: "CIRCLE\A OF FIFTHS";
  white-space: pre;
  position: absolute;
  inset: 40% 25%;
  text-align: center;
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: 1px;
  color: #8a9a7f;
  pointer-events: none;
}
.circle-key {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 12px;
  background: transparent;
  color: #6f8063;
  border: 1px solid transparent;
}
.circle-key:hover {
  background: #e0eacf;
}
.circle-key.active {
  background: #294c37;
  color: #e6f6d2;
  box-shadow: 0 0 0 4px #dce8cf;
}
.circle-key.mastered::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #54854d;
  bottom: -5px;
  left: 13px;
}
.key-details {
  text-align: center;
  margin-top: 5px;
}
.key-details strong {
  display: block;
  font-size: 13px;
}
.key-details span {
  display: block;
  font-size: 11px;
  color: #7b8b70;
  margin-top: 7px;
}
.key-panel > .small {
  text-align: center;
  font-size: 10px;
  margin-top: 14px;
}
.save-panel {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.save-icon {
  color: #7f9c6a;
}
.save-panel strong {
  font-size: 12px;
}
.save-panel p {
  font-size: 11px;
  color: var(--muted);
  margin: 6px 0;
}
.layout.is-progress {
  display: block;
  max-width: 1120px;
}
.progress-heading,
.progress-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.progress-heading h1 { font-size: 42px; margin-top: 14px; }
.progress-heading p { max-width: 580px; margin-bottom: 0; }
.progress-heading > button { flex-shrink: 0; }
.progress-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 30px 0;
}
.progress-stat,
.progress-chapters,
.progress-empty {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
}
.progress-stat strong { display: block; font-family: Georgia, serif; font-size: 38px; font-weight: 400; }
.progress-stat > span { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
.progress-empty { background: #e3ecd9; margin-bottom: 24px; }
.progress-panel h2 { font-size: 22px; letter-spacing: -.4px; }
.progress-empty p { margin-bottom: 0; }
.progress-key-label { font-size: 12px; flex-shrink: 0; }
.progress-key-label select { display: block; margin-top: 6px; min-width: 135px; }
.progress-chapters > .progress-heading { margin-bottom: 18px; }
.key-map {
  margin-top: 20px;
  padding: 20px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.key-map summary { cursor: pointer; font-size: 17px; font-weight: 600; }
.key-map > p { max-width: 760px; line-height: 1.55; }
.key-map-scroll { overflow-x: auto; margin-top: 16px; scrollbar-width: thin; }
.key-map table { width: 100%; min-width: 900px; border-collapse: separate; border-spacing: 3px; font-size: 12px; }
.key-map th { padding: 6px; font-weight: 600; color: var(--muted); text-align: center; }
.key-map th:first-child { min-width: 170px; text-align: left; }
.key-map tbody th { font-weight: 500; color: var(--ink); }
.key-map th:first-child { position: sticky; left: 0; z-index: 1; background: var(--paper); }
.key-map td { padding: 0; text-align: center; }
.key-map-cell { width: 100%; min-width: 44px; min-height: 42px; padding: 4px; border-radius: 6px; background: #edf1e8; color: #7a8774; font-size: 13px; }
.key-map-cell.tried { background: #e1e9d9; color: var(--ink); }
.key-map-cell.completed { background: #d7e8c9; color: #294d38; }
.key-map-cell:hover { outline: 2px solid #789665; outline-offset: -2px; }
.key-map-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.progress-action {
  background: transparent;
  border: 1px solid #bacab0;
  border-radius: 8px;
  padding: 10px 14px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.progress-action:hover { background: #e5ecd9; }
.progress-footer { margin-top: 20px; }
.progress-footer p { margin: 0; }
.progress-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 80px auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.progress-chapter-number { font-family: Georgia, serif; color: var(--muted); }
.progress-chapter-name > span { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.progress-rating { color: var(--green); font-size: 21px; letter-spacing: 2px; }
.progress-unearned { color: #85917f; }
@media (max-width: 700px) {
  .progress-heading, .progress-footer { flex-direction: column; align-items: stretch; gap: 16px; }
  .progress-heading h1 { font-size: 34px; }
  .progress-totals { gap: 8px; margin: 22px 0; }
  .progress-stat { padding: 16px 10px; }
  .progress-stat strong { font-size: 28px; }
  .progress-stat > span { font-size: 11px; }
  .progress-chapters { padding: 18px; }
  .key-map { padding: 18px; }
  .progress-row { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; }
  .progress-rating { grid-column: 2; grid-row: auto; }
  .progress-row > .progress-action { grid-column: 3; grid-row: 1 / span 2; }
  .progress-row > .progress-rating { grid-row: 2; }
}
footer {
  max-width: 1720px;
  margin: auto;
  padding: 15px 38px 25px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: #8c9882;
  font-size: 10px;
}
footer button {
  background: none;
  color: #6c7c61;
  font-size: 11px;
}
footer > span:last-child {
  letter-spacing: 1.5px;
  font-size: 9px;
}
.identity-dialog label { display: block; margin-block: 12px; }
.identity-dialog { --account-choice-border: #b8c9aa; --account-choice-active: #294d38; --account-choice-active-text: #eff9df; --account-choice-focus: #294d38; }
.identity-dialog button {
  border: 1px solid #b8c9aa;
  border-radius: 7px;
  background: #e5eddc;
  color: #203b2a;
  padding: 10px 15px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  margin: 4px 8px 4px 0;
}
.identity-dialog button:hover:not(:disabled) { background: #d6e5ca; border-color: #789665; }
.identity-dialog form > button,
.identity-dialog .account-actions > button,
.identity-dialog .identity-create,
.identity-dialog .identity-resend,
.identity-dialog .invitation-create { background: #294d38; border-color: #294d38; color: #eff9df; }
.identity-dialog .identity-close { background: transparent; border-color: transparent; color: #496541; text-decoration: underline; }
.identity-dialog .identity-forgot { background: #e5eddc; border-color: #b8c9aa; color: #203b2a; text-decoration: none; }
.identity-dialog .identity-close:hover:not(:disabled),
.identity-dialog .identity-forgot:hover:not(:disabled) { background: #e5eddc; border-color: #b8c9aa; }
.identity-dialog .identity-back {
  display: block;
  margin: 12px 0 4px auto;
  background: #e5eddc;
  border-color: #b8c9aa;
  color: #203b2a;
  text-decoration: none;
}
.identity-dialog .identity-back:hover:not(:disabled) { background: #d6e5ca; border-color: #789665; }
.identity-dialog .account-choice .identity-create:not([aria-current="page"]) { background: transparent; color: #203b2a; border-color: #b8c9aa; }
.identity-dialog .account-choice[data-stage="choose"] .identity-signin { background: #294d38; color: #eff9df; border-color: #294d38; }
.identity-dialog .account-choice [aria-current="page"] { background: #294d38; color: #eff9df; border-color: #294d38; }
.signup-invitation { margin: 18px 0 22px; padding: 16px; border: 1px solid #b8c9aa; border-radius: 10px; background: #e7efdd; text-align: left; }
.signup-invitation h3 { margin: 0 0 12px; font-size: 15px; line-height: 1.45; }
.invitation-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.signup-invitation button { min-height: 40px; margin: 0; padding: 9px 15px; border: 1px solid; border-radius: 7px; font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer; }
.signup-invitation .invitation-create { background: #294d38; border-color: #294d38; color: #eff9df; }
.signup-invitation .invitation-login { background: #f6f8f0; border-color: #aebfa2; color: #203b2a; }
.signup-invitation button:hover { filter: brightness(.96); }
.identity-dialog label input { display: block; width: 100%; margin-top: 8px; }
.identity-dialog label input:focus-visible {
  border-color: #5f9251;
  outline: 2px solid #5f9251;
  outline-offset: -3px;
}
.identity-dialog .identity-guest-import { margin-block: 16px 10px; }
.identity-dialog .identity-legal { margin: 16px 0 4px; font-size: 12px; color: #687966; }
.identity-dialog .identity-legal a { color: #496541; }
.identity-dialog .identity-overview { display: flex; gap: 10px; margin: 16px 0; }
.identity-dialog .identity-overview > div { flex: 1; padding: 10px 12px; border: 1px solid #d1ddca; border-radius: 8px; background: #f4f7ef; }
.identity-dialog .identity-overview strong,
.identity-dialog .identity-overview span { display: block; }
.identity-dialog .identity-overview strong { color: #294d38; font-size: 20px; line-height: 1.1; }
.identity-dialog .identity-overview span { margin-top: 3px; color: #687966; font-size: 11px; }
.identity-dialog .identity-import-choice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 8px;
}
.identity-dialog .identity-import-choice input {
  display: block;
  flex: none;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: #294d38;
}
.identity-dialog .identity-guest-import button { margin-top: 0; }
.identity-dialog [hidden] { display: none !important; }
.identity-dialog .signup-code-digits { display: flex; gap: 6px; margin-block: 12px; }
.identity-dialog .signup-code-digits input { width: 2.2em; min-width: 0; text-align: center; font-size: 1.25rem; }
.identity-dialog form[data-stage="verify"].signup-code-enhanced > button { display: none; }
dialog {
  border: 1px solid #d6e0c8;
  border-radius: 17px;
  background: #f6f9ef;
  color: var(--ink);
  padding: 42px;
  max-width: 570px;
  width: calc(100% - 30px);
  box-shadow: 0 25px 100px #10291b40;
}
dialog::backdrop {
  background: #10291bb8;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-family: Georgia;
  font-weight: 400;
  font-size: 32px;
  margin: 15px 0;
}
dialog p,
dialog li {
  font-size: 14px;
  line-height: 1.7;
}
dialog li {
  margin-bottom: 12px;
}
.dialog-close {
  position: absolute;
  right: 14px;
  top: 10px;
  background: none;
  font-size: 26px;
  color: #6c805d;
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}
#result-dialog { max-height: calc(100dvh - 24px); overflow-y: auto; }
.result-key-coverage { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.chord-panel {
  padding: 14px 20px 12px;
  border-top: 1px solid #e5e9de;
  background: #f8faf5;
}
.chord-panel[hidden], #chord-details[hidden] { display: none; }
.chord-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; }
.chord-title { min-width:0; }
.chord-title .eyebrow { font-size:9px; letter-spacing:1.2px; }
.chord-mode { display:inline-flex; flex-shrink:0; padding:2px; border:1px solid var(--line); border-radius:7px; background:#e9efe5; }
.chord-mode button { padding:6px 10px; border-radius:5px; font-size:11px; line-height:1.2; color:var(--ink); }
.chord-mode [aria-pressed="true"] { background:var(--ink); color:#f6f8ed; }
.chord-name { display:block; margin:4px 0 0; padding:0; border:0; background:transparent; color:var(--ink); font:inherit; font-size:25px; font-weight:600; text-align:left; cursor:pointer; }
.chord-name:disabled { cursor:default; opacity:.65; }
.chord-panel p { font-size:12px; line-height:1.5; margin:6px 0 0; }
#chord-details { border-top:1px solid var(--line); margin-top:12px; padding-top:10px; }
#chord-roles { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:8px 24px; padding-left:18px; font-size:13px; }
@media (max-width: 600px) {
  .chord-panel { padding:12px 15px; }
  .chord-name { font-size:21px; }
}
.setup-dialog {
  max-width: 850px;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}
.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  margin-top: 28px;
}
.setup-dialog .audio-output-settings {
  border-top: 0;
  border-left: 1px solid var(--line);
  margin-top: 0;
  padding: 0 0 0 28px;
}
.setup-dialog.external-instrument .setup-grid {
  grid-template-columns: minmax(0, 1fr);
}
.setup-dialog.external-instrument .audio-output-settings,
.setup-dialog.external-instrument #setup-preview,
.setup-dialog.external-instrument .midi-timing-controls,
.setup-dialog.external-instrument .electrical-return-controls {
  display: none;
}
.setup-dialog .audio-diagnostics,
.setup-dialog .small {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.audio-permission-info {
  margin: 8px 0;
}
.audio-permission-info summary {
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
}
.audio-permission-info p {
  margin: 8px 0 0;
}
.setup-dialog .setup-diagnostics-title {
  margin-top: 28px;
}
.setup-dialog #midi-status {
  margin-top: 14px;
}
.electrical-return-controls {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 4px;
}
.electrical-return-controls .field-label,
.electrical-return-controls select {
  display: block;
  width: 100%;
}
.return-safety {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.return-safety input {
  flex: none;
  margin-top: 3px;
}
.return-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 680px) {
  .setup-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .setup-dialog .audio-output-settings {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 24px 0 0;
  }
}
.result-stars {
  font-size: 35px;
  color: #759c3e;
  margin: 18px 0;
}
.result-stats {
  display: flex;
  gap: 30px;
  margin: 23px 0;
}
.result-stats strong {
  font-size: 25px;
  display: block;
}
.result-stats span {
  font-size: 12px;
  color: var(--muted);
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: #203c2d;
  color: #f3f9ec;
  border: 1px solid #6e8660;
  padding: 15px 22px;
  border-radius: 9px;
  box-shadow: 0 5px 30px #14231933;
  font-size: 14px;
  max-width: 90vw;
}
.live-note-label {
  font-size: 12px;
  fill: #798f68;
}
.note-group {
  transition: opacity 0.12s;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1550px) {
  .layout {
    grid-template-columns: 250px minmax(400px, 1fr) 275px;
    gap: 40px;
    padding-top: 45px;
  }
  .staff-wrap {
    height: 335px;
  }
  .piano {
    height: 155px;
  }
  .lesson-button {
    padding: 15px 10px;
  }
}
@media (max-width: 1200px) {
  .layout {
    grid-template-columns: 175px minmax(360px, 1fr) 215px;
    gap: 20px;
    padding: 28px 24px;
  }
  .settings {
    padding-left: 18px;
  }
  .topbar {
    padding: 0 24px;
  }
  .topbar nav {
    gap: 20px;
  }
  .stats {
    gap: 17px;
  }
  .transport {
    gap: 5px;
  }
  .primary-button {
    padding: 12px 13px;
  }
  .pace-label {
    margin-left: 0;
  }
  .session-options {
    gap: 12px;
  }
  h1 {
    font-size: 27px;
  }
  h2 {
    font-size: 26px;
  }
  .lesson-text strong {
    font-size: 12px;
  }
  .lesson-text span {
    font-size: 10px;
  }
  .lesson-button {
    gap: 8px;
    padding-left: 2px;
  }
  .staff-wrap {
    height: 260px;
  }
  .brand-caption {
    font-size: 8px;
  }
}
@media (max-width: 980px) {
  .layout {
    grid-template-columns: 165px minmax(0, 1fr);
  }
  .settings {
    grid-column: 1/-1;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 24px 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 25px;
  }
  .key-panel {
    margin: 0;
    border: 0;
    padding: 0;
  }
  .sound-panel h3 {
    margin-bottom: 13px;
  }
  .save-panel {
    align-self: start;
    margin-top: 30px;
  }
  .circle {
    max-width: 210px;
  }
  .staff-wrap {
    height: 295px;
  }
  .topbar {
    height: 90px;
  }
  .connection {
    font-size: 12px;
  }
  .topbar nav {
    gap: 16px;
  }
  .nav-button {
    font-size: 12px;
  }
  .brand {
    font-size: 25px;
  }
}
@media (max-width: 680px) {
  .topbar {
    padding: 15px 18px;
    height: auto;
    flex-wrap: wrap;
    gap: 15px;
  }
  .brand {
    font-size: 25px;
  }
  .brand-caption {
    font-size: 7px;
  }
  .brand-mark {
    width: 36px;
  }
  .topbar nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 34px;
    height: 37px;
  }
  .nav-button {
    font-size: 13px;
  }
  .connection {
    margin-left: auto;
    padding: 9px;
    font-size: 11px;
  }
  .layout {
    display: flex;
    flex-direction: column;
    padding: 23px 16px;
    gap: 22px;
  }
  html[data-top-navigation-pinned="false"][data-top-navigation-open="false"] .layout { padding-top: 4px; }
  .journey {
    order: 2;
  }
  .workspace {
    order: 1;
  }
  .settings {
    order: 3;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    display: grid;
    padding-top: 20px;
  }
  .save-panel {
    grid-column: 1/-1;
    margin: 0;
  }
  .journey h1,
  .journey > .muted,
  .practice-tip {
    display: none;
  }
  .lesson-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 13px;
    gap: 7px;
  }
  .lesson-button {
    padding: 10px;
  }
  .lesson-text strong {
    font-size: 12px;
  }
  .lesson-text span {
    font-size: 11px;
  }
  .journey > .text-button {
    margin-top: 10px;
  }
  .session-heading h2 {
    font-size: 25px;
  }
  .session-heading p {
    font-size: 12px;
  }
  .session-options {
    margin: 20px 0 13px;
    gap: 10px;
  }
  .session-options > .pill { margin-left: auto; }
  .pace-label {
    margin-left: auto;
  }
  .segmented button {
    min-height: 40px;
    padding: 9px 14px;
    font-size: 13px;
  }
  .check-label {
    font-size: 11px;
  }
  .score-topline {
    padding: 15px;
    font-size: 9px;
  }
  .staff-wrap {
    height: 260px;
  }
  .score-bottom {
    font-size: 11px;
    padding: 12px;
  }
  .stats {
    gap: 17px;
  }
  .stats strong {
    font-size: 19px;
  }
  .stats small {
    display: none;
  }
  .stat-label {
    font-size: 8px;
  }
  .transport {
    margin: 19px 0;
  }
  .transport-buttons {
    gap: 3px;
  }
  .primary-button {
    font-size: 12px;
    padding: 12px;
  }
  .piano {
    height: 125px;
  }
  .keyboard-card {
    padding: 14px 10px 12px;
  }
  .key-shortcut {
    display: none;
  }
  .keyboard-top .check-label {
    font-size: 10px;
  }
  .keyboard-top kbd {
    display: none;
  }
  .piano-key .note-name {
    font-size: 9px;
  }
  .piano-key.black .note-name {
    font-size: 8px;
  }
  .sound-panel h3 {
    font-size: 16px;
  }
  .section-title {
    display: block;
  }
  .section-title > .small {
    display: none;
  }
  .key-details span {
    font-size: 10px;
  }
  .circle-key {
    width: 27px;
    height: 27px;
    font-size: 11px;
  }
  .circle::after {
    font-size: 8px;
  }
  .circle {
    margin-top: 25px;
  }
  .sound-panel .small {
    font-size: 11px;
  }
  .save-panel strong {
    font-size: 13px;
  }
  .save-panel p {
    font-size: 12px;
  }
  footer {
    padding: 5px 18px 25px;
    align-items: center;
  }
  footer > span:last-child {
    display: none;
  }
  dialog {
    padding: 30px 23px;
  }
  .result-stats {
    gap: 20px;
  }
}
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #c7d5bc;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
}
.midi-options {
  margin-top: 12px;
}
.midi-options select {
  margin: 7px 0;
}
.audio-diagnostics {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0;
}
.audio-output-settings {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.audio-output-settings input[type="number"] {
  width: 100%;
  padding: 11px 9px;
  border: 1px solid #d3ddc9;
  border-radius: 7px;
  background: #f8faf4;
  color: var(--ink);
}
.lesson-text strong {
  font-size: 14px;
}
.lesson-text span,
.small,
.text-button,
.check-label,
.pace-label,
.slider-label,
.field-label,
select,
.score-bottom,
.key-details span,
.save-panel p {
  font-size: 12px;
}
.sound-panel select {
  font-size: 13px;
}
.session-heading p {
  font-size: 14px;
}
.score-topline {
  font-size: 11px;
}
.stat-label {
  font-size: 11px;
}
.nav-button {
  font-size: 14px;
}
@media (max-width: 680px) {
  .lesson-text strong {
    font-size: 13px;
  }
  .lesson-text span {
    font-size: 11px;
  }
  .session-options {
    gap: 8px;
  }
  .pace-label input {
    width: 50px;
  }
  .check-label {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.app-body .layout { grid-template-columns: minmax(0, 1fr) 255px; }
.app-body .journey.primary-navigation-drawer { padding: 0; background: var(--paper); margin: 0; }
html[data-navigation-layout="top"] .primary-navigation-drawer,
html[data-navigation-layout="top"] .navigation-scrim { display: none; }
.chapter-drawer-content { overflow-y: auto; padding: 20px; min-height: 0; }
.chapter-drawer-content .lesson-list { display: block; }
.chapter-drawer-content h1 { font-size: 28px; }
.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; }
.navigation-edge-toggle.glass-surface { background: var(--paper); }
html[data-navigation-layout="side"] .app-body .navigation-edge-toggle.glass-surface:is(:hover, :focus-visible) { background: var(--panel-soft); }
.app-body { --panel-soft: #e5eddc; }
.app-body .navigation-edge-toggle[hidden] { display: none; }
html[data-navigation-pinned="true"] .app-body .layout { margin-left: var(--navigation-drawer-width); width: calc(100% - var(--navigation-drawer-width)); }
.app-body .journey.primary-navigation-drawer { max-width: calc(100vw - 48px); }
@media (max-width: 1000px) { .app-body .layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 899px) { [data-nav-pin], [data-nav-resizer] { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .primary-navigation-drawer, .navigation-scrim { transition: none !important; } }
.app-body .layout { grid-template-columns: minmax(0, 1fr); }
.app-body .settings.sound-primary-navigation-drawer { padding: 0; margin: 0; background: var(--paper); max-width: calc(100vw - 48px); grid-template-columns: minmax(0, 1fr); gap: 0; }
.sound-drawer-content { min-height: 0; overflow-y: auto; padding: 20px; }
.sound-drawer-content .sound-panel > .eyebrow,
.sound-drawer-content .sound-panel > h3 { display: none; }
.sound-drawer-content .save-panel { margin-top: 24px; }
.sound-navigation-edge-toggle.glass-surface { background: var(--paper); }
html[data-sound-navigation-layout="side"] .app-body .sound-navigation-edge-toggle.glass-surface:is(:hover, :focus-visible) { background: var(--panel-soft); }
.sound-navigation-edge-toggle svg, .sound-primary-navigation-drawer-head .nav-drawer-close svg { transform: scaleX(-1); }
html[data-sound-navigation-layout="top"] .sound-primary-navigation-drawer,
html[data-sound-navigation-layout="top"] .sound-navigation-scrim,
.app-body .sound-navigation-edge-toggle[hidden],
.app-body .sound-primary-navigation-drawer[hidden] { display: none; }
html { --chapter-space: 0px; --sound-space: 0px; }
html[data-navigation-pinned="true"] { --chapter-space: var(--navigation-drawer-width); }
html[data-sound-navigation-pinned="true"] { --sound-space: var(--sound-navigation-drawer-width); }
.app-body .layout,
html[data-navigation-pinned="true"] .app-body .layout {
  margin-left: var(--chapter-space);
  margin-right: var(--sound-space);
  width: calc(100% - var(--chapter-space) - var(--sound-space));
}
.app-body .topbar { flex-wrap: wrap; }
@media (min-width: 681px) and (max-width: 900px) {
  .app-body .topbar { height: auto; min-height: 90px; padding: 14px 24px; gap: 14px 18px; }
  .app-body .topbar #setup-open { margin-left: auto; }
  .app-body .topbar nav { order: 3; width: 100%; height: 36px; align-self: auto; justify-content: center; }
}
.app-body .layout,
html[data-navigation-pinned="true"] .app-body .layout {
  --content-limit: 1720px;
  width: min(var(--content-limit), calc(100% - var(--chapter-space) - var(--sound-space)));
  margin-left: calc(var(--chapter-space) + max(0px, (100% - var(--chapter-space) - var(--sound-space) - var(--content-limit)) / 2));
  margin-right: calc(var(--sound-space) + max(0px, (100% - var(--chapter-space) - var(--sound-space) - var(--content-limit)) / 2));
}
.app-body .layout.is-progress { --content-limit: 1120px; }
.keyboard-card { position: relative; }
.chord-overlay { position: absolute; top: 8px; right: 24px; max-width: calc(100% - 48px); pointer-events: none; z-index: 3; }
.chord-overlay[hidden] { display: none; }
.chord-overlay #chord-name { font-size: clamp(21px, 2.4vw, 32px); font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.keyboard-card .piano { height: var(--keyboard-key-height, 132px); }
.keyboard-menu { position: relative; letter-spacing: 0; }
.keyboard-menu > summary { list-style: none; cursor: pointer; font-size: 25px; padding: 0 10px; color: #e6ebdf; }
.keyboard-menu > summary::-webkit-details-marker { display: none; }
.keyboard-menu-panel { position: absolute; right: 0; top: 100%; z-index: 12; width: 280px; max-width: calc(100vw - 48px); max-height: min(70vh, 520px); overflow-y: auto; padding: 16px; border: 1px solid #637566; border-radius: 9px; background: #24382e; box-shadow: 0 10px 30px #0005; display: grid; gap: 12px; font-size: 12px; }
.keyboard-menu-panel .keyboard-view button { background: #31483a; color: #e5ecdf; }
.keyboard-menu-panel .keyboard-view button[aria-pressed="true"] { background: #e5eddc; color: #233a30; }
.layout-slot .keyboard-view { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; }
.layout-slot .keyboard-view button { min-height: 46px; border: 1px solid transparent; text-align: left; font-size: 15px; font-variant-numeric: tabular-nums; }
.layout-slot .keyboard-view button small { display: block; font-size: 9px; font-weight: 400; opacity: .8; }
.layout-slot .keyboard-view button[aria-pressed="true"] { border-color: #d1e995; }
.layout-slot .keyboard-view .keyboard-layout-auto { grid-column: 1 / -1; min-height: 36px; }
.layout-slot .keyboard-view .keyboard-layout-auto small { display: inline; margin-left: 7px; }
.layout-slot .keyboard-view button[data-keyboard-count]::after,
.layout-slot .keyboard-view #keyboard-full::after { content: ''; display: block; height: 5px; width: var(--range-width); max-width: 100%; margin-top: 5px; border-radius: 1px; background: repeating-linear-gradient(90deg, #e7ecdf 0 5px, #344d3c 5px 7px); }
.layout-slot .keyboard-view [data-keyboard-count="25"] { --range-width: 29%; }
.layout-slot .keyboard-view [data-keyboard-count="37"] { --range-width: 42%; }
.layout-slot .keyboard-view [data-keyboard-count="49"] { --range-width: 56%; }
.layout-slot .keyboard-view [data-keyboard-count="61"] { --range-width: 69%; }
.layout-slot .keyboard-view [data-keyboard-count="76"] { --range-width: 86%; }
.layout-slot .keyboard-view #keyboard-full { --range-width: 100%; }
.keyboard-octave-controls { display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; gap: 5px; color: #dbe8cf; text-align: center; font-size: 11px; }
.keyboard-octave-controls button { min-height: 28px; border: 1px solid #607258; border-radius: 4px; background: #31483a; color: #e5ecdf; }
.keyboard-octave-controls button:disabled { opacity: .35; cursor: default; }
.keyboard-layout-help { color: #b9c9b0; font-size: 10px; }
.keyboard-menu .height-reset { padding: 8px; border: 1px solid #607258; border-radius: 4px; background: #31483a; color: #e5ecdf; }
.keyboard-height-handle { height: 14px; margin: 5px -8px -8px; cursor: ns-resize; touch-action: none; display: grid; place-items: center; }
.keyboard-height-handle::after { content: ''; width: 44px; height: 3px; border-radius: 3px; background: #9ba994; }
.keyboard-height-handle:focus-visible { outline: 2px solid #d3ec95; }
.keyboard-card[data-keyboard-style="piano"] { background: linear-gradient(#202020, #090909); border: 1px solid #414141; }
.keyboard-card[data-keyboard-style="piano"] .piano-viewport { border-top: 5px solid #8c2734; }
.keyboard-card[data-keyboard-style="piano"] .piano-key.black { background: linear-gradient(90deg, #090909, #292929 75%, #111); border-color: #080808; }
.keyboard-card[data-keyboard-style="synth"] { background: linear-gradient(115deg, #343b3b, #172020); border: 1px solid #555e58; box-shadow: inset 5px 0 #705445, inset -5px 0 #705445; }
.synth-deck { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; padding: 10px 4px 22px; }
.synth-deck[hidden] { display: none; }
.synth-program { flex: 1 1 240px; min-width: 0; max-width: 420px; }
.synth-program > label { display: block; font-size: 9px; letter-spacing: 2px; margin-bottom: 8px; color: #b0bcae; }
.synth-program-row { --synth-screen-height: 58px; display: flex; align-items: stretch; gap: 8px; height: var(--synth-screen-height); }
.synth-program select { min-width: 0; width: 100%; font: bold 14px monospace; color: #cbf4a4; border: 3px solid #0d1612; border-radius: 4px; background: radial-gradient(#47613d 0.6px, transparent 0.8px) 0 0 / 3px 3px, #263d27; box-shadow: inset 0 0 12px #0a170f, 0 0 5px #a4cd6633; padding: 10px; }
.synth-program select option { background: #263d27; }
.program-arrows { box-sizing: border-box; flex: 0 0 35px; height: 100%; display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 3px; border: 1px solid #111916; border-radius: 3px; background: #111a17; box-shadow: inset 0 1px 3px #000c, 0 1px 0 #60706466; }
.program-arrows button { min-height: 0; display: grid; place-items: center; padding: 0; font: 10px/1 Arial, sans-serif; color: #d1d8c9; text-shadow: 0 -1px 0 #111; border: 1px solid #222c27; border-top-color: #778077; border-bottom-color: #101813; border-radius: 2px; background: linear-gradient(#59635b, #39453e); box-shadow: inset 1px 0 0 #7b84794d, inset -1px 0 0 #17201a, 0 2px 1px #0009; }
.program-arrows button:hover { background: linear-gradient(#657065, #435147); }
.program-arrows button:active { transform: translateY(1px); background: linear-gradient(#354139, #49564b); box-shadow: inset 0 2px 3px #0008; border-top-color: #26332a; }
.synth-status { display: block; font-size: 10px; color: #adbaa6; margin-top: 8px; }
.synth-status:not([data-sound-state="error"]) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.synth-knobs { display: flex; flex-wrap: wrap; gap: 20px; }
.synth-knob { width: 58px; display: grid; justify-items: center; gap: 7px; position: relative; font-size: 10px; color: #c9d5bf; }
.knob-face { width: 42px; height: 42px; border: 2px solid #6b7867; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #586157, #171e1b 75%); box-shadow: 0 3px 5px #0008; }
.knob-face i { display: block; width: 100%; height: 100%; position: relative; }
.knob-face i::after { content: ''; position: absolute; top: 3px; left: 17px; width: 3px; height: 10px; background: #d3ed9e; border-radius: 2px; }
.synth-knob input[type="range"] { position: absolute; top: 18px; left: 0; width: 58px; height: 44px; opacity: 0; cursor: ns-resize; touch-action: none; margin: 0; }
.synth-knob:focus-within .knob-face { outline: 2px solid #d3ec95; outline-offset: 3px; }
.synth-knob:has(input:disabled) { opacity: 0.4; }
.synth-knobs[hidden] { display: none; }
.keyboard-card { container: keyboard-card / inline-size; }
.synth-deck { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(220px, 300px) max-content; align-items: center; gap: 20px; }
.synth-brand { min-width: 0; }
.synth-program { min-width: 0; width: 100%; }
.synth-right { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.synth-right .synth-knobs { margin-left: 0; flex: 0 1 auto; }
.synth-right .keyboard-controls { flex-wrap: nowrap; flex: 0 0 auto; }
.synth-right .keyboard-menu-panel { right: 0; }
@container keyboard-card (min-width: 1400px) {
  /* Equal side columns keep Voice centred when external mode hides the knobs. */
  .synth-deck { grid-template-columns: minmax(0, 1fr) minmax(220px, 300px) minmax(0, 1fr); }
}
@container keyboard-card (max-width: 820px) {
  .synth-deck { grid-template-columns: minmax(0, 1fr) max-content; }
  .synth-brand { grid-column: 1; grid-row: 1; }
  .synth-program { grid-column: 1; grid-row: 2; }
  .synth-right { grid-column: 2; grid-row: 2; align-self: center; justify-content: flex-end; }
}
@media (max-width: 850px) {
  .synth-deck { grid-template-columns: 1fr; }
  .synth-brand, .synth-program, .synth-right { grid-column: 1; }
  .synth-brand, .synth-program, .synth-right { grid-row: auto; }
  .synth-program { max-width: none; }
  .synth-right { justify-content: space-between; flex-wrap: wrap; }
}
.keyboard-card[data-keyboard-style="synth"] .keyboard-top { display: none; }
.synth-deck { gap: 22px; padding: 8px 4px 22px; }
.synth-brand { display: flex; align-items: center; gap: 0; margin-right: auto; font-size: 18px; letter-spacing: 2px; font-weight: 400; }
.synth-brand-title { white-space: nowrap; }
@font-face { font-family: 'Korden Model'; src: url('./assets/exo2-italic-500.ttf') format('truetype'); font-style: italic; font-weight: 500; font-display: swap; }
.synth-brand-copy { min-width: 0; }
.synth-model-row { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.synth-model-wave { display: block; width: 25px; height: 19px; object-fit: contain; }
.synth-model { margin-top: 1px; padding-right: 1px; text-align: right; font-family: 'Korden Model', sans-serif; font-size: 24px; line-height: 1; font-style: italic; font-weight: 500; letter-spacing: 1.2px; color: #e8efdc; white-space: nowrap; }
.synth-model-number { color: #cce38a; }
.synth-brand-korden { font-weight: 500; }
.synth-brand-synth { font-weight: 400; color: #b8c9b7; }
.synth-program { flex: 0 1 300px; }
.synth-deck > .keyboard-controls { align-self: center; flex-wrap: nowrap; }
.synth-deck .check-label { font-size: 10px; }
.lcd-screen { position: relative; flex: 1; min-width: 0; display: grid; align-items: center; height: var(--synth-screen-height); padding: 8px 12px; border: 3px solid #101810; border-radius: 4px; background: #253a23; box-shadow: inset 0 0 10px #081908, 0 0 6px #b8dd6530; }
.lcd-screen svg { width: 100%; height: 100%; fill: #c4ed87; filter: drop-shadow(0 0 1px #b8ea70); }
.lcd-screen svg.lcd-ready-flash .lcd-status-row { animation: lcd-ready-flash 1.1s steps(1, end); }
@keyframes lcd-ready-flash {
  0%, 17%, 36%, 53%, 72%, 100% { opacity: 1; }
  18%, 35%, 54%, 71% { opacity: .08; }
}
@media (prefers-reduced-motion: reduce) {
  .lcd-screen svg.lcd-ready-flash .lcd-status-row { animation: none; }
}
.lcd-screen select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.lcd-screen:focus-within { outline: 2px solid #d3ec95; outline-offset: 2px; }
@media (max-width: 850px) {
  .synth-program { order: 1; }
  .synth-right { order: 2; }
}
/* Kordenza's site navigation remains above either reusable drawer. */
html[data-navigation-layout="side"] .app-body #chapter-drawer,
html[data-sound-navigation-layout="side"] .app-body #sound-drawer {
  top: var(--site-header-height, 100px);
}
html[data-navigation-layout="side"] .app-body > button.navigation-scrim,
html[data-sound-navigation-layout="side"] .app-body > button.sound-navigation-scrim {
  top: var(--site-header-height, 100px);
}
@media (max-width: 680px) {
  .app-body .topbar { transition: transform .2s ease; }
  html.header-hidden .app-body .topbar { transform: translateY(-100%); }
  html.header-hidden[data-navigation-layout="side"] .app-body #chapter-drawer,
  html.header-hidden[data-sound-navigation-layout="side"] .app-body #sound-drawer,
  html.header-hidden[data-navigation-layout="side"] .app-body > button.navigation-scrim,
  html.header-hidden[data-sound-navigation-layout="side"] .app-body > button.sound-navigation-scrim { top: 0; }
}
.synth-tremolo-group {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 16px 8px 8px;
  border: 1px solid #718176;
  border-radius: 6px;
  background: #24302c;
  box-shadow: inset 0 1px 3px #0b171960;
}
.synth-tremolo-title {
  position: absolute;
  top: 3px;
  left: 8px;
  color: #b8c8b2;
  font-size: 7px;
  letter-spacing: 1.4px;
}
.synth-tremolo-group .synth-knob.compact { width: 38px; gap: 3px; font-size: 8px; }
.synth-tremolo-group .knob-face { width: 25px; height: 25px; border-width: 1px; }
.synth-tremolo-group .knob-face i::after { top: 2px; left: 10px; width: 2px; height: 6px; }
.synth-tremolo-group .synth-knob input[type="range"] { top: 12px; left: 2px; width: 34px; height: 32px; }
/* Keep the three primary controls legible on desktop, but let them tuck into
   the same compact footprint as Tremolo once the synth deck gets narrow. */
@media (max-width: 1700px) {
  .synth-right .synth-knobs { gap: 12px; flex: 0 0 auto; min-width: max-content; flex-wrap: nowrap; }
  .synth-right .synth-knobs > .synth-knob { width: 38px; gap: 3px; font-size: 8px; }
  .synth-right .synth-knobs > .synth-knob .knob-face { width: 25px; height: 25px; border-width: 1px; }
  .synth-right .synth-knobs > .synth-knob .knob-face i::after { top: 2px; left: 10px; width: 2px; height: 6px; }
  .synth-right .synth-knobs > .synth-knob input[type="range"] { top: 12px; left: 2px; width: 34px; height: 32px; }
}
.synth-status[data-sound-state="loading"] { color: #e7d7a5; }
.synth-status[data-sound-state="ready"] { color: #cbe5a8; }
.synth-status[data-sound-state="error"] { color: #e7aaa1; }
@media (max-width: 899px) { [data-sound-nav-pin], [data-sound-nav-resizer] { display: none !important; } }
.certificate-panel{margin:1rem 0;padding:1.25rem;border:1px solid #bdcdb9;border-radius:1rem;background:#f7f8f3;color:#19332c}
.certificate-panel h3{margin-top:0}
.certificate-actions{display:flex;flex-wrap:wrap;align-items:end;gap:.75rem}
.certificate-actions label,.certificate-panel #certificate-issue-controls label{display:inline-flex;flex-direction:column;gap:.3rem}
.certificate-panel button,.certificate-panel select,.certificate-panel input{font:inherit}
.certificate-panel button{padding:.55rem .8rem;border:1px solid #5b794e;border-radius:.5rem;background:#e5efdf;color:#19332c;cursor:pointer}
.certificate-panel button:disabled{opacity:.5;cursor:not-allowed}
.certificate-panel #certificate-list p{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}
.certificate-panel #certificate-list input{max-width:100%;width:28rem}
