:root {
  --cream: #f7f4eb;
  --cream-deep: #eee9dc;
  --paper: #fffdf8;
  --ink: #192731;
  --ink-soft: #30404b;
  --muted: #647077;
  --muted-dark: #5f6a70;
  --line: #e6e1d6;
  --emerald: #076853;
  --emerald-deep: #064f42;
  --emerald-soft: #d9eee4;
  --lime: #c7e565;
  --lime-soft: #edf7c9;
  --coral: #ec846c;
  --coral-ink: #9c4334;
  --shadow: 0 18px 50px rgba(25, 39, 49, .08);
  --shadow-tight: 0 8px 20px rgba(25, 39, 49, .1);
  --radius-lg: 25px;
  --radius-md: 16px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { background: var(--cream); }
body { margin: 0; min-height: 100vh; background: var(--cream); color: var(--ink); }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 14px 20px; border-radius: 12px; background: var(--ink); color: white; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.confirm-dialog { max-width: min(480px, calc(100vw - 32px)); border: 3px solid var(--ink); border-radius: 24px; padding: 28px; background: var(--paper); color: var(--ink); box-shadow: 0 8px 0 var(--ink); }
.confirm-dialog::backdrop { background: rgba(25,39,49,.55); }
.confirm-dialog h2 { font-size: 28px; }
.confirm-dialog p { margin: 16px 0; line-height: 1.6; }
.confirm-dialog .settings-actions { margin-bottom: 0; }
.storage-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 18px; margin-bottom: 24px; border: 2px solid #a36a19; border-radius: 16px; background: #fff1cf; }
.storage-notice>div { flex: 1 1 240px; }
.storage-notice p { margin-top: 6px; font-size: 14px; line-height: 1.5; }
.text-button, .replay-link { min-height: 44px; min-width: 44px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, strong { letter-spacing: -.035em; }
svg { display: block; width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.inline-icon { display: inline-grid; place-items: center; vertical-align: -0.17em; }
.inline-icon svg { width: 1em; height: 1em; }

.app-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; position: sticky; top: 0; flex-direction: column; height: 100vh; padding: 32px 18px 25px; background: var(--paper); border-right: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; margin: 0 12px 57px; }
.brand-mark { display: grid; width: 35px; height: 35px; place-items: center; background: var(--ink); border-radius: 12px; color: var(--lime); box-shadow: 3px 4px 0 rgba(199, 229, 101, .5); }
.brand-mark svg { width: 27px; height: 27px; stroke-width: 2.3; }
.brand-copy { display: flex; flex-direction: column; gap: 3px; line-height: .95; }
.brand-copy strong { font-size: 17px; font-weight: 800; letter-spacing: -.06em; }
.brand-copy em { margin-left: 11px; color: var(--emerald); font-size: 16px; font-style: normal; font-weight: 650; letter-spacing: -.05em; }
.nav-label, .eyebrow { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .14em; line-height: 1.2; text-transform: uppercase; }
.nav-label { margin: 0 13px 12px; }
.primary-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 47px; padding: 0 13px; border: 0; border-radius: 12px; background: transparent; color: var(--muted-dark); font-size: 13px; font-weight: 650; text-align: left; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-item:hover { background: var(--cream); color: var(--ink); transform: translateX(2px); }
.nav-item.is-active { background: var(--ink); color: white; box-shadow: 0 7px 17px rgba(25, 39, 49, .15); }
.nav-item.is-active .nav-icon { color: var(--lime); }
.nav-icon { display: grid; width: 21px; height: 21px; place-items: center; color: currentColor; }
.nav-icon svg { width: 20px; height: 20px; stroke-width: 1.7; }
.sidebar-spacer { min-height: 30px; flex: 1; }
.settings-link { margin-bottom: 24px; }
.sidebar-note { display: flex; gap: 9px; align-items: flex-start; padding: 13px 12px; background: var(--lime-soft); border: 1px solid #e0ebbb; border-radius: 13px; color: var(--ink); }
.status-dot { display: block; flex: 0 0 auto; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 4px rgba(7, 104, 83, .1); }
.sidebar-note strong, .sidebar-note small { display: block; }
.sidebar-note strong { font-size: 11px; letter-spacing: -.01em; }
.sidebar-note small { margin-top: 3px; color: var(--muted-dark); font-size: 10px; line-height: 1.35; }
.sidebar-footnote { margin: 24px 12px 0; color: #a0a49f; font-family: Georgia, serif; font-size: 12px; font-style: italic; line-height: 1.45; }

.main-content { min-width: 0; padding: 0 5.2vw 60px; outline: none; }
.content-wrap { width: min(1135px, 100%); margin: 0 auto; padding-top: 68px; }
.mobile-topbar, .bottom-nav { display: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 36px; }
.page-head h1 { margin-top: 12px; font-size: clamp(34px, 4vw, 53px); font-weight: 790; line-height: .99; }
.text-accent { color: var(--emerald); font-family: Georgia, serif; font-style: italic; font-weight: 500; letter-spacing: -.06em; }
.lede { max-width: 480px; margin-top: 14px; color: var(--muted-dark); font-size: 14px; line-height: 1.55; }
.head-stats { display: flex; gap: 11px; padding-bottom: 3px; }
.stat-chip { display: flex; align-items: center; gap: 9px; min-width: 107px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 253, 248, .66); }
.stat-chip-streak { background: var(--lime-soft); border-color: #e0eab6; }
.stat-icon { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 9px; background: #fae8df; color: var(--coral); }
.stat-icon.lime { background: var(--emerald-soft); color: var(--emerald); }
.stat-icon .inline-icon svg { width: 17px; height: 17px; }
.stat-chip strong, .stat-chip small { display: block; }
.stat-chip strong { font-size: 14px; line-height: 1.1; }
.stat-chip small { margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .02em; }

.hero-card { display: flex; position: relative; min-height: 308px; overflow: hidden; margin-bottom: 47px; border: 2px solid var(--ink); border-radius: var(--radius-lg); background: var(--emerald); color: white; box-shadow: 0 7px 0 var(--ink); isolation: isolate; }
.hero-copy { position: relative; z-index: 2; width: 53%; padding: 36px 40px; }
.hero-kicker { display: flex; align-items: center; gap: 8px; color: #d8f6dd; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(199, 229, 101, .14); }
.hero-copy h2 { margin-top: 20px; font-size: clamp(34px, 4.6vw, 58px); font-weight: 750; line-height: .93; }
.hero-copy h2 em { color: var(--lime); font-family: Georgia, serif; font-size: .95em; font-style: italic; font-weight: 500; letter-spacing: -.07em; }
.hero-copy p { max-width: 300px; margin-top: 15px; color: #c8ded4; font-size: 13px; line-height: 1.5; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 43px; padding: 0 17px; border: 2px solid var(--ink); border-radius: 10px; font-size: 12px; font-weight: 750; letter-spacing: -.01em; box-shadow: 0 3px 0 var(--ink); transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.button .inline-icon { font-size: 16px; }
.button-light { margin-top: 23px; background: var(--paper); color: var(--ink); }
.button-dark { background: var(--ink); color: white; }
.button-outline { border-color: var(--ink); background: transparent; color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.button-outline:hover { border-color: var(--ink); background: var(--paper); }
.button-lime { background: var(--lime); color: var(--ink); }
.hero-art { position: absolute; z-index: 0; inset: 0 0 0 45%; overflow: hidden; background: linear-gradient(123deg, var(--emerald) 0%, #11846b 100%); }
.hero-art::after { position: absolute; inset: 0; background: linear-gradient(90deg, var(--emerald) 0%, rgba(7, 104, 83, .35) 33%, transparent 75%); content: ''; }
.hero-art img { position: absolute; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: .9; mix-blend-mode: screen; }
.hero-sun { position: absolute; top: 26px; right: 15%; width: 104px; height: 104px; border: 2px solid rgba(217, 246, 184, .55); border-radius: 50%; box-shadow: 0 0 0 16px rgba(199, 229, 101, .08), 0 0 0 34px rgba(199, 229, 101, .05); }
.hero-wave { position: absolute; z-index: 1; right: 1%; bottom: 22%; width: 65%; height: 21%; border: 2px solid rgba(226, 247, 209, .7); border-width: 2px 0 0; border-radius: 50%; transform: rotate(-10deg); }
.wave-two { right: -5%; bottom: 31%; width: 68%; opacity: .46; transform: rotate(4deg); }
.wave-three { right: 10%; bottom: 9%; width: 60%; opacity: .27; transform: rotate(-19deg); }
.hero-scribble { position: absolute; z-index: 2; right: 7%; bottom: 26px; color: var(--lime); font-family: Georgia, serif; font-size: 15px; font-style: italic; line-height: .9; transform: rotate(-8deg); }
.hero-scribble span { margin-left: 10px; color: white; }

.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 18px; }
.section-heading h2 { margin-top: 7px; font-size: 22px; font-weight: 770; }
.progress-caption, .panel-count { color: var(--muted); font-size: 11px; font-weight: 700; }
.lesson-path { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
.lesson-card { display: flex; align-items: center; gap: 17px; min-height: 105px; padding: 15px 18px 15px 15px; border: 2px solid var(--line); border-radius: var(--radius-md); background: rgba(255, 253, 248, .68); transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease; }
.lesson-card:hover:not(.is-locked) { border-color: var(--ink); background: var(--paper); box-shadow: 0 4px 0 var(--ink); transform: translateY(-2px); }
.lesson-card.is-locked { opacity: .6; }
.lesson-number { display: grid; width: 47px; height: 47px; flex: 0 0 auto; place-items: center; border: 2px solid var(--ink); border-radius: 14px; background: var(--emerald-soft); color: var(--emerald); font-size: 13px; font-weight: 800; }
.lesson-card:nth-child(2n) .lesson-number { background: #f7e7dc; border-color: var(--ink); color: var(--coral-ink); }
.lesson-card:nth-child(3n) .lesson-number { background: #e8e6f5; border-color: var(--ink); color: #65619b; }
.lesson-card.is-complete .lesson-number { background: var(--lime); border-color: var(--ink); color: var(--ink); }
.lesson-number svg { width: 19px; height: 19px; }
.lesson-body { min-width: 0; flex: 1; }
.lesson-meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.lesson-meta i { width: 3px; height: 3px; border-radius: 50%; background: #a5ada8; }
.lesson-body h3 { margin-top: 5px; font-size: 16px; font-weight: 770; }
.lesson-body p { overflow: hidden; margin-top: 4px; color: var(--muted-dark); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.lesson-progress { width: min(190px, 100%); height: 4px; margin-top: 10px; overflow: hidden; border-radius: 9px; background: #e4e5de; }
.lesson-progress span, .mini-progress span, .progress-row-bar i { display: block; height: 100%; border-radius: inherit; background: var(--emerald); transition: width .45s ease; }
.lesson-action { display: inline-flex; align-items: center; gap: 5px; min-width: 70px; justify-content: flex-end; padding: 8px 0; border: 0; background: transparent; color: var(--emerald); font-size: 11px; font-weight: 800; }
.lesson-action:hover { color: var(--ink); }
.lesson-action .inline-icon { font-size: 15px; }
.lesson-action:disabled { color: var(--muted); }
.daily-card { display: flex; align-items: center; gap: 15px; margin-top: 41px; padding: 19px 21px; border: 2px solid var(--ink); border-radius: var(--radius-md); background: var(--lime-soft); box-shadow: 0 4px 0 var(--ink); }
.daily-icon { display: grid; width: 41px; height: 41px; flex: 0 0 auto; place-items: center; border: 2px solid var(--ink); border-radius: 12px; background: var(--lime); color: var(--ink); }
.daily-icon svg { width: 21px; height: 21px; }
.daily-card > div:nth-child(2) { flex: 1; }
.daily-card h3 { margin-top: 4px; font-size: 15px; }
.daily-card p:not(.eyebrow) { margin-top: 3px; color: var(--muted-dark); font-size: 11px; }
.daily-card .button { min-height: 36px; padding: 0 11px; background: rgba(255, 253, 248, .4); font-size: 10px; }

.player-page { max-width: 1020px; margin: 0 auto; }
.player-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.text-button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 0; border: 0; background: transparent; color: var(--muted-dark); font-size: 11px; font-weight: 800; }
.text-button:hover { color: var(--emerald); }
.text-button .inline-icon { font-size: 14px; transform: rotate(90deg); }
.player-tag { padding: 6px 10px; border-radius: 20px; background: var(--emerald-soft); color: var(--emerald); font-size: 10px; font-weight: 800; }
.player-counter { font-size: 12px; font-weight: 800; }
.player-counter span { color: var(--muted); font-weight: 500; }
.question-progress { height: 6px; overflow: hidden; margin-bottom: 51px; border-radius: 9px; background: #e4e4dc; }
.question-progress span { display: block; height: 100%; border-radius: inherit; background: var(--lime); transition: width .4s ease; }
.question-layout { display: grid; grid-template-columns: minmax(280px, .95fr) minmax(340px, 1.05fr); gap: clamp(45px, 7vw, 112px); align-items: center; }
.question-intro h1 { max-width: 500px; margin-top: 12px; font-size: clamp(33px, 4.1vw, 53px); line-height: .99; }
.question-support { max-width: 350px; margin-top: 16px; color: var(--muted-dark); font-size: 13px; line-height: 1.55; }
.sound-card { display: grid; position: relative; width: min(100%, 370px); min-height: 192px; place-items: center; overflow: hidden; margin-top: 30px; border: 2px solid var(--ink); border-radius: 22px; background: var(--ink); color: white; box-shadow: 0 5px 0 #0d161c; isolation: isolate; }
.sound-card::before { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, rgba(199, 229, 101, .21), transparent 31%), radial-gradient(circle at 50% 48%, transparent 31%, rgba(199, 229, 101, .1) 32%, transparent 33%, transparent 48%, rgba(199, 229, 101, .06) 49%, transparent 50%); content: ''; }
.sound-orbit { position: absolute; border: 1px solid rgba(199, 229, 101, .35); border-radius: 50%; transform: rotate(-20deg); }
.orbit-a { width: 160px; height: 85px; }
.orbit-b { width: 245px; height: 125px; opacity: .55; transform: rotate(17deg); }
.play-button { display: grid; position: relative; z-index: 1; width: 66px; height: 66px; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--lime); color: var(--ink); box-shadow: 0 4px 0 var(--ink), 0 0 0 10px rgba(199, 229, 101, .13); transition: transform .18s ease, box-shadow .18s ease; }
.play-button:hover { transform: scale(1.05); box-shadow: 0 5px 0 var(--ink), 0 0 0 13px rgba(199, 229, 101, .15); }
.play-button .inline-icon { font-size: 21px; }
.play-button svg { stroke-width: 1.8; }
.sound-label { position: absolute; right: 0; bottom: 14px; left: 0; z-index: 1; color: #b5c1bf; font-size: 9px; font-weight: 700; letter-spacing: .05em; text-align: center; text-transform: uppercase; }
.sound-card.is-playing .play-button { animation: soft-pulse 1.4s ease-in-out infinite; }
.replay-link { display: inline-flex; align-items: center; gap: 6px; margin: 11px auto 0; border: 0; background: transparent; color: var(--muted-dark); font-size: 10px; font-weight: 800; }
.replay-link:hover { color: var(--emerald); }
.replay-link svg { width: 14px; height: 14px; }
.lesson-volume { display: grid; grid-template-columns: 1fr auto; align-items: center; width: min(280px, 100%); margin: 16px 0 0; color: var(--muted-dark); font-size: 12px; font-weight: 700; }
.lesson-volume .range-input { grid-column: 1 / -1; height: 44px; margin: 0; }
.lesson-intro-card .lesson-volume { margin: 18px auto 0; text-align: left; }
.answers-panel { min-width: 0; }
.answers-label { margin-bottom: 13px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.answer-choice { display: flex; align-items: center; gap: 11px; min-height: 72px; padding: 10px; border: 2px solid var(--line); border-radius: 13px; background: rgba(255, 253, 248, .56); text-align: left; transition: border .18s ease, background .18s ease, transform .18s ease; }
.answer-choice:not(:disabled):hover { border-color: var(--ink); background: var(--paper); box-shadow: 0 3px 0 var(--ink); transform: translateY(-2px); }
.choice-key { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: var(--cream-deep); color: var(--muted-dark); font-size: 10px; font-weight: 800; }
.choice-copy { min-width: 0; flex: 1; }
.choice-copy strong, .choice-copy small { display: block; }
.choice-copy strong { font-size: 14px; }
.choice-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.choice-state { color: var(--muted); }
.choice-state svg { width: 15px; height: 15px; }
.answer-choice.is-correct { border-color: #8fc7a7; background: var(--emerald-soft); }
.answer-choice.is-correct .choice-key { background: var(--emerald); color: white; }
.answer-choice.is-correct .choice-state { color: var(--emerald); }
.answer-choice.is-wrong { border-color: #efb2a0; background: #fdf0eb; }
.answer-choice.is-wrong .choice-key { background: var(--coral); color: var(--ink); }
.answer-choice.is-wrong .choice-state { color: var(--coral); }
.keyboard-hint { margin-top: 20px; color: #9b9f9d; font-size: 10px; }
kbd { display: inline-grid; width: 18px; height: 18px; margin-right: 3px; place-items: center; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); font-size: 9px; }
.feedback { display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; gap: 11px; align-items: center; margin-top: 18px; padding: 13px; border-radius: 14px; }
.feedback-good { background: var(--emerald-soft); }
.feedback-learn { background: #fdf0eb; }
.feedback-mark { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; background: white; color: var(--emerald); }
.feedback-learn .feedback-mark { color: var(--coral); }
.feedback-mark svg { width: 17px; height: 17px; }
.feedback strong { font-size: 12px; }
.feedback p { max-width: 280px; margin-top: 3px; color: var(--muted-dark); font-size: 12px; line-height: 1.45; }
.feedback-next { min-height: 44px; padding: 0 12px; font-size: 12px; white-space: nowrap; }

.lesson-intro-card { max-width: 690px; margin: 35px auto 0; padding: 38px 42px; border: 2px solid var(--ink); border-radius: 25px; background: var(--paper); box-shadow: 0 7px 0 var(--ink); text-align: center; }
.intro-mark { display: grid; width: 56px; height: 56px; margin: 0 auto 18px; place-items: center; border: 2px solid var(--ink); border-radius: 17px; background: var(--lime); box-shadow: 0 4px 0 var(--ink); }
.intro-mark svg { width: 29px; height: 29px; }
.lesson-intro-card h1 { margin-top: 11px; font-size: clamp(35px, 5vw, 52px); line-height: .98; }
.intro-description { max-width: 500px; margin: 13px auto 0; color: var(--muted-dark); font-size: 13px; line-height: 1.55; }
.intro-rule { height: 1px; margin: 27px 0 18px; background: var(--line); }
.intro-label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 13px; }
.preview-choice { display: flex; align-items: center; gap: 9px; padding: 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--cream); text-align: left; }
.preview-choice:hover { border-color: var(--ink); background: var(--lime-soft); }
.preview-play { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--emerald); color: white; }
.preview-play svg { width: 13px; height: 13px; }
.preview-choice strong, .preview-choice small { display: block; }
.preview-choice strong { font-size: 11px; }
.preview-choice small { margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.intro-start { min-width: 200px; margin-top: 27px; }
.intro-footnote { margin-top: 14px; color: var(--muted); font-size: 10px; }

.results-page { max-width: 770px; margin: 0 auto; }
.results-card { position: relative; overflow: hidden; margin-top: 31px; padding: 48px 40px 42px; border: 2px solid var(--ink); border-radius: 27px; background: var(--emerald); color: white; box-shadow: 0 7px 0 var(--ink); text-align: center; }
.result-badge { display: grid; position: relative; z-index: 1; width: 55px; height: 55px; margin: 0 auto 17px; place-items: center; border: 2px solid var(--ink); border-radius: 18px; background: var(--lime); color: var(--ink); }
.result-badge svg { width: 28px; height: 28px; }
.results-card h1 { position: relative; z-index: 1; max-width: 560px; margin: 13px auto 0; font-size: clamp(31px, 4vw, 48px); line-height: .98; }
.results-card .eyebrow { position: relative; z-index: 1; color: #c8f0dc; }
.results-copy { position: relative; z-index: 1; margin-top: 13px; color: #c7dfd6; font-size: 13px; }
.result-stats { display: flex; position: relative; z-index: 1; justify-content: center; gap: 1px; margin: 33px auto; }
.result-stats div { min-width: 116px; padding: 0 20px; border-right: 1px solid rgba(255, 255, 255, .18); }
.result-stats div:last-child { border: 0; }
.result-stats strong, .result-stats span { display: block; }
.result-stats strong { color: var(--lime); font-size: 26px; }
.result-stats span { margin-top: 4px; color: #c3d8d0; font-size: 10px; font-weight: 700; }
.results-actions { display: flex; position: relative; z-index: 1; justify-content: center; gap: 9px; }
.results-actions .button-light { margin-top: 0; }
.results-card::before, .results-card::after { position: absolute; border: 2px solid rgba(199, 229, 101, .16); border-radius: 50%; content: ''; }
.results-card::before { top: -140px; right: -80px; width: 350px; height: 350px; }
.results-card::after { bottom: -195px; left: -100px; width: 400px; height: 400px; }
.results-confetti { position: absolute; inset: 0; pointer-events: none; }
.results-confetti span { position: absolute; width: 7px; height: 7px; border: 1px solid var(--ink); border-radius: 2px; background: var(--lime); opacity: .85; transform: rotate(22deg); }
.results-confetti span:nth-child(1) { top: 18%; left: 11%; }
.results-confetti span:nth-child(2) { top: 33%; right: 11%; width: 5px; height: 12px; background: #fff; transform: rotate(-25deg); }
.results-confetti span:nth-child(3) { top: 68%; left: 16%; width: 5px; height: 12px; background: var(--coral); transform: rotate(38deg); }
.results-confetti span:nth-child(4) { top: 18%; right: 24%; width: 5px; height: 5px; background: #fff; }
.results-confetti span:nth-child(5) { bottom: 12%; right: 17%; width: 10px; height: 5px; background: var(--lime); transform: rotate(55deg); }
.results-tip { display: flex; align-items: center; gap: 12px; margin-top: 17px; padding: 15px 17px; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); box-shadow: 0 3px 0 var(--ink); }
.tip-icon { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--lime-soft); color: var(--emerald); }
.tip-icon svg { width: 16px; height: 16px; }
.results-tip p { flex: 1; color: var(--muted-dark); font-size: 11px; line-height: 1.4; }
.results-tip strong { color: var(--ink); }

.compact-head { margin-bottom: 34px; }
.compact-head > .button { margin-bottom: 4px; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 17px; align-items: start; }
.studio-console, .studio-controls, .settings-panel, .progress-panel, .history-panel { border: 2px solid var(--ink); border-radius: var(--radius-lg); background: var(--paper); box-shadow: 0 4px 0 var(--ink); }
.studio-console { min-width: 0; padding: 29px; }
.console-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.console-kicker { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.console-head h2 { margin-top: 7px; font-size: 37px; }
.console-head p { margin-top: 4px; color: var(--muted-dark); font-size: 12px; }
.frequency-pill { padding: 7px 10px; border-radius: 20px; background: var(--emerald-soft); color: var(--emerald); font-size: 10px; font-weight: 800; }
.tuner-display { display: grid; position: relative; min-height: 160px; place-items: center; margin: 25px 0 7px; overflow: hidden; border: 2px solid var(--ink); border-radius: 17px; background: var(--ink); color: white; }
.tuner-display::before { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(20% - 1px), rgba(255, 255, 255, .07) 20%); content: ''; }
.tuner-ring { display: flex; position: relative; z-index: 1; width: 98px; height: 98px; align-items: center; justify-content: center; border: 2px solid var(--lime); border-radius: 50%; box-shadow: 0 0 0 11px rgba(199, 229, 101, .08), 0 0 0 24px rgba(199, 229, 101, .04); }
.tuner-ring span { font-size: 26px; font-weight: 800; letter-spacing: -.08em; }
.tuner-ring small { align-self: end; margin: 0 0 27px 3px; color: var(--lime); font-size: 9px; font-weight: 800; }
.tuner-line { position: absolute; bottom: 28px; left: 7%; width: 86%; height: 1px; background: rgba(199, 229, 101, .35); }
.tuner-scale { display: flex; position: absolute; right: 7%; bottom: 14px; left: 7%; justify-content: space-between; color: #869592; font-size: 8px; font-weight: 700; }
.range-label { display: flex; align-items: center; justify-content: space-between; margin-top: 19px; color: var(--muted); font-size: 12px; font-weight: 800; }
.range-label output { color: var(--ink); font-weight: 800; }
.range-input { width: 100%; height: 32px; margin: 10px 0 0; accent-color: var(--emerald); cursor: pointer; }
.lesson-teaching { display: grid; gap: 7px; margin: 15px 0; padding: 12px 14px; border-left: 3px solid var(--emerald); border-radius: 0 10px 10px 0; background: var(--emerald-soft); text-align: left; }
.lesson-teaching p { margin: 0; color: var(--muted-dark); font-size: 12px; line-height: 1.5; }
.lesson-teaching strong { display: block; margin-bottom: 2px; color: var(--emerald); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.frequency-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 17px; }
.preset-chip { min-height: 44px; padding: 9px 11px; border: 2px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted-dark); font-size: 12px; font-weight: 800; }
.preset-chip:hover, .preset-chip.is-selected { border-color: var(--ink); background: var(--emerald-soft); color: var(--emerald); }
.audition-button { width: 100%; margin-top: 24px; }
.studio-controls { overflow: hidden; }
.control-section { padding: 23px; border-bottom: 1px solid var(--line); }
.control-section:last-child { border-bottom: 0; }
.control-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.control-title > span:first-child { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; }
.control-title svg { width: 17px; height: 17px; color: var(--emerald); }
.control-value { overflow: hidden; max-width: 130px; color: var(--muted); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.voice-list, .room-options { display: grid; gap: 7px; }
.voice-option, .room-option { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px; border: 2px solid transparent; border-radius: 10px; background: transparent; text-align: left; }
.voice-option:hover, .voice-option.is-selected, .room-option:hover, .room-option.is-selected { border-color: var(--ink); background: var(--cream); }
.voice-avatar { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border: 1px solid var(--ink); border-radius: 9px; background: var(--emerald-soft); color: var(--emerald); font-size: 11px; font-weight: 800; }
.voice-option:nth-child(2) .voice-avatar { background: #f7e7dc; color: var(--coral); }
.voice-option strong, .voice-option small, .room-option strong, .room-option small { display: block; }
.voice-option strong, .room-option strong { font-size: 11px; }
.voice-option small, .room-option small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.radio-dot { width: 12px; height: 12px; margin-left: auto; border: 1px solid #bec7c1; border-radius: 50%; }
.voice-option.is-selected .radio-dot { border: 3px solid var(--emerald); }
.voice-initials { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border: 2px solid var(--ink); border-radius: 14px; background: var(--emerald-soft); color: var(--emerald); font-size: 15px; font-weight: 900; letter-spacing: .03em; }
.voice-portrait { display: block; width: 48px; height: 48px; flex: 0 0 auto; object-fit: cover; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); }
.room-option { min-height: 47px; padding: 5px 7px; }
.room-visual { width: 45px; height: 32px; flex: 0 0 auto; border-radius: 8px; background: var(--cream-deep); }
.room-dry { background: linear-gradient(135deg, #eee8db 45%, #d7d0c0 46% 53%, #eee8db 54%); }
.room-medium { background: radial-gradient(circle at center, var(--emerald) 0 2px, transparent 3px), repeating-radial-gradient(ellipse at center, #b9dfd0 0 1px, transparent 2px 5px); }
.room-hall { background: radial-gradient(circle at center, var(--coral) 0 2px, transparent 3px), repeating-radial-gradient(ellipse at center, #f2c7b8 0 1px, transparent 2px 5px); }
.room-option.is-selected { border-color: var(--ink); background: var(--cream); }
.room-option.is-selected .room-visual { box-shadow: 0 0 0 2px var(--lime); }
.chapter-panel { margin-top: 25px; padding: clamp(18px, 3vw, 30px); border: 2px solid var(--ink); border-radius: var(--radius-lg); background: var(--paper); box-shadow: 0 4px 0 var(--ink); }
.chapter-panel-head h2 { margin-top: 5px; font-size: clamp(24px, 3vw, 32px); }
.chapter-panel-head p:last-child { max-width: 680px; margin-top: 8px; color: var(--muted-dark); font-size: 13px; line-height: 1.5; }
.chapter-panel select { display: block; width: 100%; min-height: 44px; margin-top: 8px; padding: 9px 12px; border: 2px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; }
.chapter-reading { display: grid; gap: 18px; margin-top: 22px; }
.chapter-source { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; line-height: 1.5; }
.chapter-source strong { color: var(--ink); font-size: 15px; }
.chapter-source span { color: var(--muted-dark); font-size: 12px; }
.chapter-source a { color: var(--emerald); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.chapter-player-group { display: grid; gap: 10px; padding: 16px; border-radius: 14px; background: var(--cream); }
.chapter-player-group strong { font-size: 12px; }
.chapter-player-group audio { display: block; width: 100%; }
.chapter-excerpt { padding: 0 2px; }
.chapter-excerpt .range-label { margin-top: 0; }
.chapter-excerpt p { margin-top: 8px; color: var(--muted-dark); font-size: 12px; line-height: 1.5; }
.chapter-offline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.chapter-offline span { color: var(--muted-dark); font-size: 12px; }
.chapter-text { border-top: 1px solid var(--line); padding-top: 14px; }
.chapter-text summary { color: var(--emerald); font-size: 13px; font-weight: 800; cursor: pointer; }
.chapter-text p { max-height: 320px; overflow: auto; margin-top: 12px; color: var(--muted-dark); font-size: 13px; line-height: 1.7; white-space: pre-wrap; }

.streak-banner { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 7px; padding: 9px 12px; border-radius: 10px; background: #fae8df; color: var(--coral-ink); font-size: 11px; font-weight: 800; }
.streak-banner svg { width: 16px; height: 16px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.metric-card { min-height: 164px; padding: 21px; border: 2px solid var(--ink); border-radius: var(--radius-md); background: var(--paper); box-shadow: 0 4px 0 var(--ink); }
.metric-card-ink { border-color: var(--ink); background: var(--ink); color: white; }
.metric-icon { display: grid; width: 30px; height: 30px; place-items: center; margin-bottom: 20px; border: 1px solid var(--ink); border-radius: 9px; background: var(--lime); color: var(--ink); }
.metric-card:not(.metric-card-ink) .metric-icon { background: var(--emerald-soft); color: var(--emerald); }
.metric-icon svg { width: 17px; height: 17px; }
.metric-card > strong { display: block; font-size: 29px; line-height: 1; }
.metric-card > strong small { color: var(--muted); font-size: 14px; }
.metric-card > span:not(.metric-icon) { display: block; margin-top: 6px; color: var(--muted-dark); font-size: 10px; font-weight: 800; }
.metric-card-ink > span:not(.metric-icon) { color: #c2d4ce; }
.metric-card > small { display: block; margin-top: 16px; color: var(--muted); font-size: 9px; }
.mini-progress { height: 4px; margin-top: 17px; border-radius: 8px; background: var(--cream-deep); }
.progress-lower { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(270px, .7fr); gap: 13px; margin-top: 17px; }
.progress-panel, .history-panel { min-width: 0; padding: 24px; }
.panel-heading { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 22px; }
.panel-heading h2 { margin-top: 6px; font-size: 19px; }
.progress-row { display: flex; align-items: center; gap: 10px; min-height: 54px; border-top: 1px solid var(--line); }
.progress-row-number { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 8px; background: var(--cream); color: var(--muted); font-size: 9px; font-weight: 800; }
.progress-row-copy { min-width: 0; flex: 1; }
.progress-row-copy strong, .progress-row-copy small { display: block; }
.progress-row-copy strong { font-size: 11px; }
.progress-row-copy small { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.progress-row-bar { width: 90px; height: 4px; overflow: hidden; border-radius: 7px; background: var(--cream-deep); }
.progress-row-percent { width: 29px; color: var(--muted); font-size: 9px; font-weight: 800; text-align: right; }
.history-row { display: flex; align-items: center; gap: 9px; min-height: 53px; border-top: 1px solid var(--line); }
.history-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px var(--lime-soft); }
.history-row span:nth-child(2) { min-width: 0; flex: 1; }
.history-row strong, .history-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-row strong { font-size: 10px; }
.history-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.history-row b { color: var(--emerald); font-size: 11px; }
.empty-state { padding: 21px 0; text-align: center; }
.empty-icon { display: grid; width: 38px; height: 38px; margin: 0 auto 9px; place-items: center; border-radius: 12px; background: var(--cream); color: var(--muted); }
.empty-state p { font-size: 11px; font-weight: 800; }
.empty-state small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }

.settings-panel { overflow: hidden; }
.settings-group { padding: 28px; border-bottom: 1px solid var(--line); }
.settings-group:last-child { border-bottom: 0; }
.settings-intro { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px; }
.settings-symbol { display: grid; width: 37px; height: 37px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: var(--emerald-soft); color: var(--emerald); }
.settings-symbol svg { width: 19px; height: 19px; }
.settings-intro h2 { font-size: 17px; }
.settings-intro p { margin-top: 4px; color: var(--muted-dark); font-size: 11px; line-height: 1.4; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; padding: 15px 0 0; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; }
.setting-row strong, .setting-row small { display: block; }
.setting-row strong { font-size: 12px; }
.setting-row small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.setting-input { display: flex; align-items: center; gap: 14px; width: min(260px, 45%); }
.setting-input output { min-width: 29px; color: var(--muted); font-size: 10px; font-weight: 800; text-align: right; }
.setting-input .range-input { margin: 0; }
.setting-toggle { cursor: pointer; }
.toggle { display: block; position: relative; width: 40px; height: 23px; flex: 0 0 auto; border-radius: 20px; background: var(--cream-deep); transition: background .18s ease; }
.toggle i { display: block; position: absolute; top: 4px; left: 4px; width: 15px; height: 15px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(0, 0, 0, .16); transition: left .18s ease; }
.toggle.is-on { background: var(--emerald); }
.toggle.is-on i { left: 21px; }
.settings-danger .settings-symbol { background: #fdf0eb; color: var(--coral); }
.danger-button { margin-top: 1px; color: var(--coral-ink); }
.danger-button:hover { border-color: var(--coral); background: #fdf0eb; }
.settings-footnote { margin-top: 17px; color: var(--muted); font-size: 10px; text-align: center; }
.module-error { max-width: 620px; margin: 9vh auto 0; padding: 42px; border: 2px solid var(--ink); border-radius: 25px; background: var(--paper); box-shadow: 0 7px 0 var(--ink); text-align: center; }
.module-error .intro-mark { margin-bottom: 18px; }
.module-error h1 { margin-top: 11px; font-size: clamp(31px, 4vw, 45px); line-height: 1; }
.module-error p:not(.eyebrow) { max-width: 420px; margin: 14px auto 0; color: var(--muted-dark); font-size: 13px; line-height: 1.5; }
.module-error .button { margin-top: 25px; }

.toast-region { position: fixed; z-index: 20; right: 24px; bottom: 23px; max-width: 310px; padding: 11px 15px; border: 2px solid var(--ink); border-radius: 10px; background: var(--ink); color: white; font-size: 11px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(7px); transition: opacity .2s ease, transform .2s ease; }
.toast-region.is-visible { opacity: 1; transform: translateY(0); }
.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
@keyframes soft-pulse { 0%, 100% { box-shadow: 0 4px 0 var(--ink), 0 0 0 10px rgba(199, 229, 101, .13); } 50% { box-shadow: 0 4px 0 var(--ink), 0 0 0 14px rgba(199, 229, 101, .17); } }

.sidebar { overflow-y: auto; }

@media (min-width: 761px) and (max-width: 1100px) {
  .question-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .studio-grid, .progress-lower { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1020px) {
  .app-shell { grid-template-columns: 214px minmax(0, 1fr); }
  .main-content { padding-right: 34px; padding-left: 34px; }
  .hero-copy { padding-left: 31px; }
  .question-layout { gap: 42px; }
  .metric-card { padding: 17px; }
}

@media (max-width: 760px) {
  html { scroll-padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  button, input, select, a { scroll-margin-block: 16px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main-content { padding: 0 17px calc(110px + env(safe-area-inset-bottom)); }
  .mobile-topbar { display: flex; align-items: center; justify-content: space-between; min-height: 71px; }
  .brand-compact { margin: 0; }
  .brand-compact .brand-mark { width: 31px; height: 31px; border-radius: 10px; }
  .brand-compact .brand-copy strong, .brand-compact .brand-copy em { font-size: 14px; }
  .topbar-actions { display: flex; align-items: center; gap: 8px; }
  .streak-chip { padding: 7px 9px; border-radius: 9px; background: var(--lime-soft); color: var(--emerald); font-size: 9px; font-weight: 800; }
  .icon-button { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
  .icon-button svg { width: 16px; height: 16px; }
  .content-wrap { padding-top: 23px; }
  .bottom-nav { display: grid; position: fixed; z-index: 10; right: 12px; bottom: max(11px, env(safe-area-inset-bottom)); left: 12px; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 7px; border: 2px solid var(--ink); border-radius: 17px; background: rgba(255, 253, 248, .93); box-shadow: 0 5px 0 var(--ink), 0 9px 30px rgba(25, 39, 49, .13); backdrop-filter: blur(14px); }
  .bottom-nav-item { display: grid; gap: 3px; min-height: 49px; place-items: center; border: 0; border-radius: 11px; background: transparent; color: var(--muted-dark); font-size: 11px; font-weight: 750; }
  .bottom-nav-item.is-active { background: var(--ink); color: white; }
  .bottom-nav-item.is-active .nav-icon { color: var(--lime); }
  .bottom-nav-item .nav-icon, .bottom-nav-item .nav-icon svg { width: 18px; height: 18px; }
  .page-head { display: block; margin-bottom: 25px; }
  .page-head h1 { font-size: 38px; }
  .lede { margin-top: 11px; font-size: 12px; }
  .head-stats { margin-top: 19px; }
  .stat-chip { flex: 1; }
  .hero-card { min-height: 380px; margin-bottom: 34px; }
  .hero-copy { width: 100%; padding: 29px 25px; }
  .hero-copy h2 { font-size: 45px; }
  .hero-copy p { max-width: 230px; }
  .hero-art { inset: auto 0 0; height: 45%; }
  .hero-art::after { background: linear-gradient(180deg, var(--emerald) 0%, rgba(7, 104, 83, .1) 64%); }
  .hero-scribble { right: 11%; bottom: 14px; }
  .section-heading h2 { font-size: 19px; }
  .lesson-card { gap: 11px; min-height: 92px; padding: 12px; }
  .lesson-number { width: 38px; height: 38px; border-radius: 11px; font-size: 11px; }
  .lesson-body h3 { font-size: 14px; }
  .lesson-body p { font-size: 10px; }
  .lesson-action { min-width: 52px; font-size: 10px; }
  .daily-card { align-items: flex-start; flex-wrap: wrap; margin-top: 29px; padding: 15px; }
  .daily-card > div:nth-child(2) { min-width: calc(100% - 59px); }
  .daily-card .button { margin-left: 56px; }
  .question-progress { margin-bottom: 31px; }
  .player-top { margin-bottom: 14px; }
  .player-tag { display: none; }
  .question-layout { display: block; }
  .question-intro h1 { font-size: 38px; }
  .question-support { font-size: 12px; }
  .sound-card { min-height: 165px; margin-top: 22px; }
  .answers-panel { margin-top: 34px; }
  .feedback { grid-template-columns: 31px minmax(0, 1fr); }
  .feedback-next { grid-column: 1 / -1; width: 100%; }
  .lesson-intro-card { margin-top: 22px; padding: 29px 19px; }
  .lesson-intro-card h1 { font-size: 38px; }
  .preview-grid { grid-template-columns: 1fr; }
  .preview-choice { justify-content: center; }
  .results-card { margin-top: 23px; padding: 37px 20px 31px; }
  .results-card h1 { font-size: 36px; }
  .result-stats { gap: 0; margin: 27px auto; }
  .result-stats div { min-width: 0; padding: 0 11px; }
  .results-actions { display: grid; }
  .results-actions .button { width: 100%; }
  .results-tip { align-items: flex-start; flex-wrap: wrap; }
  .results-tip .text-button { margin-left: 44px; }
  .compact-head > .button { margin-top: 19px; }
  .studio-grid, .progress-lower { grid-template-columns: minmax(0, 1fr); }
  .studio-console { padding: 20px; }
  .console-head h2 { font-size: 32px; }
  .studio-controls { display: grid; grid-template-columns: 1fr 1fr; }
  .control-section { padding: 19px 15px; }
  .control-section:first-child { border-right: 1px solid var(--line); }
  .room-option { padding-right: 0; padding-left: 0; }
  .room-visual { width: 37px; }
  .metric-grid { gap: 7px; }
  .metric-card { min-height: 143px; padding: 14px 12px; }
  .metric-icon { width: 25px; height: 25px; margin-bottom: 14px; }
  .metric-card > strong { font-size: 24px; }
  .metric-card > span:not(.metric-icon) { font-size: 9px; }
  .progress-panel, .history-panel { padding: 18px 15px; }
  .progress-row-bar { width: 55px; }
  .setting-row { align-items: flex-start; }
  .setting-input { width: 44%; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
  .setting-input .range-input { width: 100%; }
}

@media (max-width: 430px) {
  .hero-copy h2 { font-size: 40px; }
  .answer-grid { gap: 7px; }
  .answer-choice { min-height: 64px; padding: 8px; gap: 7px; }
  .choice-copy strong { font-size: 12px; }
  .choice-copy small { font-size: 8px; }
  .choice-state { display: none; }
  .studio-controls { display: block; }
  .control-section:first-child { border-right: 0; }
  .metric-card > small { display: none; }
  .progress-row-copy { min-width: 95px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}

/* Flat cartoon direction and integrated practice controls. */
:root { font-family: ui-rounded, 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif; }
.text-accent, .hero-copy h2 em { font-family: inherit; font-style: normal; font-weight: 900; letter-spacing: -.045em; }
.hero-art img { opacity: 1; mix-blend-mode: normal; object-position: 43% center; }
.hero-art::after, .hero-wave, .hero-sun, .hero-scribble { display: none; }
.hero-copy { width: 47%; padding: 32px; }
.hero-copy h2 { font-size: clamp(32px,3.5vw,48px); line-height: 1.02; }
.hero-art { left: 48%; }
.hero-copy p { color: #edf7e8; }
.page-head h1 { font-size: clamp(32px,3.5vw,48px); line-height: 1.06; }
.coach-avatar { display: inline-block; flex: 0 0 auto; width: 72px; height: 72px; background-image: url('../public/images/coaches-flat-v2.png'); background-size: 200% 200%; border: 2px solid var(--ink); border-radius: 22px; background-color: var(--paper); }
.coach-0 { background-position: 0 0; }.coach-1 {background-position:100% 0;}.coach-2{background-position:0 100%;}.coach-3{background-position:100% 100%;}
.coach-message { display:flex; align-items:center; gap:16px; max-width:510px; margin:0 auto 24px; text-align:left; }
.coach-message p { background:var(--paper); border:2px solid var(--ink); border-radius:18px; padding:14px; font-size:15px; line-height:1.5; color:var(--ink); }
.voice-option .coach-avatar { width:48px; height:48px; border-radius:14px; }
.clip-caption { margin:14px 0; color:var(--muted-dark); font-size:12px; line-height:1.5; }
.clip-caption a, .settings-group a { color:var(--emerald); text-decoration:underline; text-underline-offset:3px; }
.mode-options { display:flex; flex-wrap:wrap; gap:8px; margin:22px 0; }
.eq-practice { border-top:2px solid var(--line); padding-top:24px; margin-top:24px; }
.eq-practice p,.practice-note>p { font-size:13px; color:var(--muted-dark); line-height:1.6; margin:10px 0; }
select { width:100%; min-height:44px; padding:8px 12px; font:inherit; border:2px solid var(--line); border-radius:10px; background:var(--paper); color:var(--ink); }
select:focus-visible { outline:3px solid var(--emerald); outline-offset:3px; }
.practice-note { padding:18px; }.practice-note .coach-message{align-items:flex-start;gap:10px;}.practice-note .coach-avatar{width:55px;height:55px;}.practice-note .coach-message p{font-size:12px;}
.extra-settings { margin-top:24px; }.settings-group>p { margin:12px 0;line-height:1.65;color:var(--muted-dark);font-size:14px;}.settings-actions{display:flex;flex-wrap:wrap;gap:14px;margin:20px 0;}
.file-label { position:relative;cursor:pointer; }.file-label input{position:absolute;width:1px;height:1px;opacity:0;}.file-label:focus-within{outline:3px solid var(--emerald);outline-offset:4px;}
.settings-help {font-size:13px;}.sidebar-note:not(.is-ready) .status-dot{background:#bd7b19;}
.mistake-review{margin-top:24px;background:var(--paper);border:2px solid var(--line);border-radius:20px;padding:24px;}.mistake-review p{margin:12px 0;color:var(--muted-dark);line-height:1.5;}.review-pair{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0;}
.achievement-grid{display:flex;flex-wrap:wrap;gap:10px;margin:24px 0;}.achievement-badge{padding:12px 16px;background:var(--lime-soft);border:2px solid var(--ink);border-radius:14px;font-size:13px;font-weight:700;}
button:focus-visible,a:focus-visible,input:focus-visible{outline-color:#197fca;}
@media(max-width:700px){.hero-copy{width:100%;padding:25px;}.hero-art{position:relative;inset:auto;height:210px;width:100%;}.hero-card{display:flex;flex-direction:column;}.hero-art img{object-position:center 47%;}.hero-copy h2{font-size:36px;}.coach-message{gap:10px;}.coach-message p{font-size:13px;}.coach-avatar{width:60px;height:60px;}.settings-actions .button{width:100%;}.page-head h1{font-size:34px;}.voice-option{min-height:66px;}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;transition-duration:.001ms!important;scroll-behavior:auto!important;}}

.answer-choice.is-selected { border-color: var(--ink); background: var(--lime-soft); box-shadow: 0 3px 0 var(--ink); }
#testing-code { max-width: 100%; min-height: 44px; margin: 8px 12px 12px 0; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 10px; font: inherit; }

/* Sound in Mind: quieter studio controls and a single mixed learning path. */
.frequency-selector { margin: 24px 0; }
.frequency-selector .range-label { display: flex; justify-content: space-between; gap: 12px; }
.frequency-selector output { font-size: 17px; font-weight: 800; color: var(--emerald); }
.frequency-bar { width: 100%; min-height: 48px; accent-color: var(--emerald); }
.frequency-scale { display: flex; justify-content: space-between; gap: 8px; color: var(--muted-dark); font-size: 11px; }
.mixer-path-card { background: #edf3de; }
.mixer-path-card .lesson-number { background: var(--lime); }
.mixer-path-back { margin-bottom: 20px; }
.install-card { display: flex; align-items: center; gap: 18px; margin: 24px 0; padding: 20px; background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; }
.install-card > div { flex: 1; min-width: 0; }
.install-card h2 { font-size: 19px; }
.install-card p { color: var(--muted-dark); font-size: 13px; line-height: 1.5; margin-top: 5px; }
.install-mark { display: grid; place-items: center; flex: 0 0 46px; height: 46px; background: var(--lime); border-radius: 14px; border: 2px solid var(--ink); }
.install-mark svg { width: 28px; height: 28px; }
.install-done { font-weight: 750; color: var(--emerald); }
.install-dialog { width: min(480px, calc(100vw - 32px)); }
.install-dialog select { width: 100%; min-height: 44px; padding: 8px; font: inherit; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); }
.install-steps { padding-left: 24px; margin: 18px 0; }
.install-steps li { line-height: 1.5; padding: 6px 0 6px 4px; }
.chapter-extras { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.chapter-extras summary { cursor: pointer; font-size: 13px; font-weight: 750; line-height: 1.5; }
.chapter-extras audio { display: block; max-width: 100%; width: 100%; margin: 14px 0; }
.chapter-extras button { margin: 10px 0; }
.chapter-extras p { font-size: 12px; line-height: 1.5; }
.studio-controls select { max-width: 100%; font-size: 16px; }
@media (max-width: 600px) {
  .install-card { flex-wrap: wrap; gap: 12px; }
  .install-card > div { flex-basis: calc(100% - 60px); }
  .install-card > button { width: 100%; }
  .install-dialog { padding: 20px; }
}
