/* HindiHow learning studio — shared foundations and page workspaces. */
:root {
  color-scheme: light;
  --ink: #16243c;
  --muted: #607087;
  --soft: #f5f7fb;
  --paper: #ffffff;
  --line: #e2e8f0;
  --green: #2855d9;
  --green-dark: #1c3ea5;
  --blue: #2855d9;
  --saffron: #bb7020;
  --rose: #b93e59;
  --shadow: 0 4px 20px #17243b05;
  --radius: 16px;
  --hindi: "Noto Sans Devanagari", "Kohinoor Devanagari", Mangal, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--soft); color: var(--ink); font: 15px/1.65 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: not-allowed; opacity: .5; }
img { display: block; max-width: 100%; }
a { color: var(--blue); }
svg { flex-shrink: 0; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 650; }
h1 { margin-bottom: 14px; font-size: clamp(2.1rem, 4vw, 3.5rem); letter-spacing: -.055em; line-height: 1.15; }
h2 { margin-bottom: 12px; font-size: 1.3rem; letter-spacing: -.025em; line-height: 1.5; }
h3 { font-size: 1rem; }
:focus-visible { outline: 3px solid #2855d9; outline-offset: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 2px; }
.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; }
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 100; padding: 12px 20px; background: var(--ink); color: white; border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: #ffffffed; backdrop-filter: blur(16px); }
.site-header-inner { max-width: 1400px; min-height: 80px; padding: 12px 36px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.site-brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); white-space: nowrap; font-size: 21px; font-weight: 750; letter-spacing: -.04em; }
.site-brand > span:last-child > span { color: var(--blue); }
.brand-symbol { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--blue); color: white; font: 600 26px/1 var(--hindi); padding-top: 4px; }
.site-nav { display: flex; gap: 6px; align-items: center; }
.site-nav a { padding: 10px 16px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: var(--ink); background: var(--soft); }
.site-nav a[aria-current] { background: #eef2ff; color: var(--blue); }
.header-note { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.header-note::before { content: ""; width: 6px; height: 6px; background: #368561; border-radius: 50%; }
.page-intro, .studio-header, .lab-header, .songs-header { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 44px 0 36px; }
.page-intro { max-width: 1328px; width: calc(100% - 72px); margin: auto; }
.intro { max-width: 650px; margin-bottom: 0; font-size: 15px; color: var(--muted); }
.eyebrow { margin: 0 0 10px; font-size: 10px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); }
.intro-badge { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 16px; padding: 4px 10px; border: 1px solid #d9e2ff; border-radius: 6px; background: #eef2ff; color: var(--blue); font-size: 10px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.intro-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.learning-method { display: flex; gap: 26px; padding: 18px 24px; border: 1px solid var(--line); border-radius: 14px; background: #ffffff8c; }
.method-step { display: grid; gap: 6px; min-width: 66px; }
.method-step span { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.method-step strong { font-size: 12px; font-weight: 600; }
.method-step svg { color: var(--blue); margin-bottom: 4px; }
.studio-shell, .page-shell, .lab-shell { max-width: 1328px; width: calc(100% - 72px); margin: auto; padding-bottom: 60px; }
.shell { max-width: 1328px; width: calc(100% - 72px); margin: 0 auto 60px; display: grid; grid-template-columns: 232px minmax(0,1fr); gap: 24px; align-items: start; }
.sidebar { position: sticky; top: 104px; max-height: calc(100vh - 128px); overflow-y: auto; padding: 22px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); scrollbar-width: thin; }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #eef2ff; color: var(--blue); font: 600 24px/1 var(--hindi); padding-top: 4px; }
.brand strong { font-size: 13px; font-weight: 650; }
.brand p { margin: 0; font-size: 11px; color: var(--muted); }
.nav-block { margin-top: 22px; }
.nav-title { display: block; margin: 0 0 10px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.tabs, .letter-list, .matra-grid, .strength-row, .rating-row, .chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tab, .chip-button { padding: 8px 12px; min-height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--muted); font-size: 11px; font-weight: 600; }
.tab { padding: 6px 9px; }
.tab.active, .chip-button.active { border-color: #ced9ff; color: var(--blue); background: #eef2ff; }
.letter-list { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; }
.letter-chip { min-height: 43px; border: 1px solid transparent; border-radius: 8px; background: #f5f7fb; color: #53627a; font: 500 21px/1.3 var(--hindi); padding: 10px 0 5px; }
.letter-chip:hover { color: var(--blue); background: #e9eeff; }
.letter-chip.active { background: var(--blue); border-color: var(--blue); color: white; }
.side-link { display: flex; justify-content: space-between; padding: 10px 0; margin-top: 2px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; border-bottom: 1px solid var(--line); }
.side-link::after { content: "↗"; color: #91a0b5; }
.side-link:hover { color: var(--blue); }
.content { min-width: 0; }
.topbar, .mobile-drawer { display: none; }
.study-layout { display: grid; grid-template-columns: minmax(0,1.04fr) minmax(0,1fr); gap: 22px; align-items: start; }
.visual-panel, .info-panel, .practice-panel, .feedback-panel, .panel, .focus-panel, .controls-panel, .chart-card, .side-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); min-width: 0; }
.visual-panel { position: sticky; top: 104px; overflow: hidden; }
.panel-topline { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 600; }
.panel-topline span { color: var(--muted); font-size: 10px; font-weight: 400; }
.visual-stage { min-height: 340px; display: grid; place-items: center; padding: 22px; background: #fafbfe; }
.visual-stage img { width: 100%; max-height: 420px; object-fit: contain; border-radius: 10px; background: white; cursor: zoom-in; }
.visual-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 20px; border-top: 1px solid var(--line); }
.letter-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.big-letter { font: 600 42px/1.4 var(--hindi); color: var(--blue); }
.letter-meta strong, .letter-meta span { display: block; }
.letter-meta strong { font-size: 14px; }
.letter-meta span { color: var(--muted); font-size: 11px; }
.controls-row, .action-row, .rate-row, .focus-actions, .header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.menu-button, .icon-button, .primary-button, .quiet-button, .back-link { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; border: 1px solid var(--line); background: white; color: var(--ink); font-size: 12px; font-weight: 600; text-decoration: none; transition: background .15s, border-color .15s; }
.menu-button, .icon-button { width: 38px; min-height: 38px; padding: 0; flex-shrink: 0; }
.primary-button, .quiet-button, .back-link { padding: 10px 16px; }
.primary-button { background: var(--blue); border-color: var(--blue); color: white; }
.primary-button:hover { background: var(--green-dark); border-color: var(--green-dark); }
.quiet-button:hover, .icon-button:hover, .back-link:hover { background: #f0f4ff; border-color: #ccd8f6; }
.primary-button.is-active { background: var(--rose); border-color: var(--rose); }
.stack { display: grid; gap: 18px; min-width: 0; }
.info-panel, .practice-panel, .feedback-panel, .panel, .controls-panel, .chart-card, .side-card { padding: 24px; }
.headline { margin: 0; font-size: clamp(1.6rem,2.4vw,2.2rem); line-height: 1.6; letter-spacing: -.02em; }
.summary { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.detail-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 22px; }
.detail { padding: 12px 10px; background: var(--soft); border-radius: 8px; }
.detail b { display: block; margin-bottom: 6px; font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.detail span { font-size: 12px; overflow-wrap: anywhere; }
.example { margin-top: 16px; padding: 14px; border-radius: 8px; background: #f1f5ff; color: #465c8e; font-size: 13px; }
mark { border-radius: 3px; background: #dce6ff; color: var(--blue); padding: 0 3px; font-weight: 600; }
.decode-list { display: grid; gap: 10px; margin: 16px 0; padding-left: 20px; font-size: 13px; }
.decode-list li { padding-left: 6px; }
.decode-list li::marker { color: #95a2b5; font-size: 11px; }
.decode-swap { color: var(--blue); font-family: var(--hindi); font-weight: 600; }
.decode-actions { margin: 14px 0 20px; }
.decode-output { min-height: 48px; margin-top: 10px; padding: 12px; border-radius: 8px; background: #f1f5ff; font-size: 13px; overflow-wrap: anywhere; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 600; }
input, select, textarea, .search { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid #dce3ed; border-radius: 8px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 400; }
input::placeholder, textarea::placeholder { color: #6b7b91; }
textarea { min-height: 100px; resize: vertical; line-height: 1.6; }
.sidebar .search { font-size: 11px; background: var(--soft); }
.matra-display { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border-radius: 10px; background: #f1f5ff; }
.matra-syllable { font: 600 52px/1.4 var(--hindi); color: var(--blue); }
.matra-grid { margin-top: 14px; }
.matra-button, .strength-button, .rating-button { min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; font-size: 12px; font-weight: 600; }
.matra-button.active, .strength-button.active, .rating-button.active { background: #eef2ff; border-color: #c8d6ff; color: var(--blue); }
.progress-meter { height: 5px; background: #edf0f5; border-radius: 10px; overflow: hidden; }
.progress-meter span { display: block; width: var(--progress,0%); height: 100%; background: var(--blue); transition: width .2s; }
.feedback-form { display: grid; gap: 14px; margin-top: 16px; }
.rating-button { width: 40px; }
.status { min-height: 20px; margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.status.success { color: #26734f; }
.status.error, .error-message { color: #b3324f; }
.empty { grid-column: 1 / -1; padding: 24px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 13px; text-align: center; }
.backdrop, .lightbox { position: fixed; inset: 0; z-index: 50; display: none; }
.backdrop { background: #16243c80; }
.backdrop.show { display: block; }
.lightbox { padding: 24px; place-items: center; background: #0b1323ee; }
.lightbox.show { display: grid; }
.lightbox img { max-height: 86vh; max-width: min(1100px,92vw); object-fit: contain; border-radius: 12px; background: white; }
.lightbox .icon-button { position: absolute; top: 20px; right: 20px; color: white; background: #ffffff1a; border-color: #ffffff30; }
.studio-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 24px; align-items: start; }
.tuner-panel { position: sticky; top: 104px; }
.studio-header h1, .songs-header h1, .lab-header h1 { margin-bottom: 14px; }
.studio-illustration { display: flex; align-items: center; gap: 14px; color: #8998af; flex-shrink: 0; }
.studio-illustration b { display: grid; place-items: center; width: 74px; height: 80px; border: 1px solid #dce4f6; border-radius: 14px; background: white; font: 500 42px/1.5 var(--hindi); color: var(--blue); }
.studio-illustration b:last-child { background: #eaf0ff; border-color: #cbd9ff; }
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.hero-output { position: relative; min-height: 240px; display: grid; place-items: center; margin: 22px 0 16px; background: #f1f5ff; border: 1px solid #dfe7fb; border-radius: 12px; }
.hero-output::before { content: "SYLLABLE PREVIEW"; position: absolute; top: 16px; left: 18px; color: #62759b; font-size: 9px; letter-spacing: .12em; }
.syllable { font: 500 clamp(5rem,9vw,7.5rem)/1.5 var(--hindi); color: var(--blue); }
.detail-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.detail-row > div:first-child { display: grid; gap: 3px; }
.detail-row strong { font-size: 14px; }
.muted { color: var(--muted); font-size: 13px; }
.matra-keys { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; margin-top: 20px; }
.matra-key { min-height: 82px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfe; transition: border-color .15s, background .15s; }
.matra-key:hover { border-color: #a3b8ee; background: #f1f5ff; }
.matra-key.active { background: var(--blue); border-color: var(--blue); color: white; }
.matra-key strong, .matra-key span { display: block; }
.matra-key strong { font: 500 24px/1.5 var(--hindi); }
.matra-key span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.matra-key.active span { color: #e1e9ff; }
.speech-panel { margin-top: 24px; padding: 18px; background: var(--soft); border-radius: 10px; }
.speech-panel.is-listening { background: #fff0f4; }
.speech-grid { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: end; margin-top: 14px; }
.phrase-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.phrase-card { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: white; text-align: left; }
.phrase-card:hover { background: #f6f8ff; border-color: #c4d2f3; }
.phrase-card strong, .phrase-card span { display: block; }
.phrase-card strong { margin-bottom: 5px; font: 500 17px/1.6 var(--hindi); }
.phrase-card .hinglish { color: var(--blue); font-size: 12px; }
.phrase-card .translation { color: var(--muted); font-size: 11px; }
.akshar-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(95px,1fr)); gap: 10px; margin-top: 20px; }
.akshar-card { padding: 18px 10px; border: 1px solid var(--line); border-radius: 10px; background: #f8faff; }
.akshar-card:hover, .akshar-card.active { background: #eaf0ff; border-color: #b8c9f5; }
.akshar-card b { display: block; font: 500 32px/1.5 var(--hindi); color: var(--blue); }
.parts { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.result-box { padding: 16px; border: 1px solid var(--line); border-radius: 10px; overflow-wrap: anywhere; }
.anchor-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 24px; align-items: start; }
.focus-panel { position: sticky; top: 104px; overflow: hidden; }
.focus-stage { display: grid; place-items: center; padding: 24px; background: #16243c; }
.player-stack { width: 100%; display: grid; gap: 16px; }
.letter-video-row { display: grid; grid-template-columns: 76px minmax(0,1fr); align-items: stretch; gap: 16px; }
.focus-letter { display: grid; place-items: center; border: 1px solid #ffffff25; border-radius: 10px; background: #ffffff0c; color: #fff; font: 500 46px/1.5 var(--hindi); }
.video-shell { min-width: 0; overflow: hidden; border-radius: 8px; background: #0c1423; }
.video-js { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.video-note { margin: 0; color: #bdc9dc; font-size: 11px; }
.focus-body { padding: 26px; }
.song-title { font: 550 clamp(1.5rem,2.5vw,2rem)/1.7 var(--hindi); color: var(--ink); overflow-wrap: anywhere; }
#focusCue { color: var(--muted); font-size: 13px; }
.sound-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.sound-pill { padding: 6px 10px; border-radius: 6px; background: #f1f5ff; color: #425b94; font-size: 11px; }
.sound-pill b { margin-right: 5px; color: #56698b; font-weight: 500; }
.focus-actions { margin-top: 22px; }
.filter-grid { display: grid; gap: 14px; margin-bottom: 22px; }
.count-line { margin: 0; font-size: 11px; color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.anchor-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: white; text-align: left; transition: border-color .15s, background .15s; }
.anchor-card:hover { border-color: #bacaf1; background: #f8faff; }
.anchor-card.active { border-color: #9aafe9; background: #f0f4ff; box-shadow: inset 0 0 0 1px #9aafe9; }
.card-topline { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-topline > span:last-child { min-width: 0; }
.card-letter { display: grid; place-items: center; width: 42px; height: 48px; flex-shrink: 0; border: 1px solid #dce5fa; border-radius: 8px; background: #eef2ff; color: var(--blue); font: 500 27px/1.5 var(--hindi); }
.card-meta { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; }
.card-title { font: 500 14px/1.7 var(--hindi); overflow-wrap: anywhere; }
.card-note { display: block; color: var(--muted); font-size: 11px; line-height: 1.6; }
.music-illustration { display: flex; align-items: center; gap: 20px; padding: 22px 28px; border: 1px solid #dfe6f6; border-radius: 16px; background: white; }
.record { display: grid; place-items: center; width: 80px; height: 80px; border-radius: 50%; background: repeating-radial-gradient(circle,#253550 0 2px,#1c2b44 3px 6px); box-shadow: 0 6px 12px #16243c15; }
.record span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #9cb5ff; color: #16243c; font: 500 22px/1 var(--hindi); padding-top: 4px; }
.music-illustration p { margin: 0; font-size: 11px; color: var(--muted); }
.music-illustration strong { display: block; font-size: 14px; color: var(--ink); font-weight: 600; }
.lab-grid { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 24px; align-items: start; }
.chart-topline { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.chart-topline .status { min-width: 60px; margin: 0; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; text-align: center; }
.status.is-active { color: #26734f; background: #eef8f2; }
#vowelChart { display: block; width: 100%; height: auto; max-height: 540px; }
#vowelChart > rect { fill: #f8faff; stroke: var(--line); rx: 12px; }
#vowelRiver { fill: none; stroke: #dce6fb; stroke-linecap: round; stroke-width: 34; }
.axis-label { fill: var(--muted); font-size: 11px; }
.target circle { fill: #eef2ff; stroke: #bcccf5; stroke-width: 1.5; }
.target text { fill: var(--ink); font: 500 20px var(--hindi); text-anchor: middle; pointer-events: none; }
.target .ipa-label { fill: var(--muted); font: 11px Inter, sans-serif; }
#voiceGlyph { fill: #2855d90a; font: 600 118px var(--hindi); pointer-events: none; text-anchor: middle; transform-box: fill-box; transform-origin: center; }
#glowHalo { fill: #2855d92e; filter: url(#voiceGlow); opacity: .25; pointer-events: none; }
#indicatorDot { filter: url(#voiceGlow); }
.prompt-list { display: grid; gap: 8px; margin-top: 18px; }
.prompt { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfe; text-align: left; font-family: var(--hindi); }
.prompt:hover { border-color: #b9c9f2; background: #eef2ff; }
.prompt span { color: var(--muted); font: 11px/1.5 Inter, sans-serif; }
.meter { margin-top: 22px; }
.meter > div:first-child { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.meter-bar { height: 5px; overflow: hidden; border-radius: 10px; background: #edf0f5; }
.meter-bar span { display: block; width: 0; height: 100%; background: var(--blue); transition: width .08s linear; }
.meter-bar.stability span { background: #398467; }
.feedback-cue { margin-top: 24px; padding: 14px; border-radius: 8px; background: #eef2ff; }
.feedback-cue strong, .feedback-cue span { display: block; }
.feedback-cue strong { margin-bottom: 5px; color: var(--blue); font-size: 12px; }
.feedback-cue span, .note { color: var(--muted); font-size: 11px; }
.error-message { font-size: 12px; margin-top: 14px; }
.note { margin: 14px 0 0; }
.site-footer { max-width: 1328px; width: calc(100% - 72px); margin: 0 auto; padding: 24px 0 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.site-footer strong { color: var(--ink); font-weight: 600; }
.site-footer a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 380px) {
  .site-nav { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .site-nav a { text-align: center; }
}
@media (max-width: 1200px) {
  .header-note { display: none; }
  .site-header-inner { padding-inline: 28px; }
  .shell { grid-template-columns: 206px minmax(0,1fr); gap: 20px; }
  .sidebar { padding: 18px 14px; }
  .study-layout { grid-template-columns: 1fr; }
  .visual-panel { position: static; }
  .visual-stage { min-height: 300px; }
  .visual-stage img { max-height: 360px; }
  .learning-method { gap: 16px; padding: 16px; }
}
@media (max-width: 980px) {
  .site-header-inner { flex-wrap: wrap; gap: 12px; padding: 16px 24px 10px; }
  .site-nav { flex: 1; justify-content: flex-end; gap: 2px; }
  .site-nav a { font-size: 11px; padding: 8px 10px; }
  .studio-shell, .page-shell, .lab-shell, .shell, .page-intro, .site-footer { width: calc(100% - 48px); }
  .studio-grid, .anchor-layout { grid-template-columns: 1fr; }
  .tuner-panel, .focus-panel { position: static; }
  .lab-grid { grid-template-columns: minmax(0,1fr) 290px; gap: 18px; }
  .studio-illustration b { width: 54px; height: 64px; font-size: 30px; }
  .studio-illustration { gap: 10px; }
  .learning-method { display: none; }
  .visual-stage img { max-height: 360px; }
  .focus-stage { padding: 28px; }
  .letter-video-row { grid-template-columns: 100px minmax(0,1fr); }
}
@media (max-width: 700px) {
  .site-header-inner { padding: 14px 20px 12px; gap: 12px; }
  .site-brand { font-size: 19px; }
  .brand-symbol { width: 34px; height: 34px; font-size: 23px; border-radius: 9px; }
  .site-nav { flex-basis: 100%; justify-content: space-between; gap: 3px; }
  .site-nav a { padding: 9px 7px; font-size: 10px; }
  .studio-shell, .page-shell, .lab-shell, .shell, .page-intro, .site-footer { width: calc(100% - 40px); }
  .page-intro, .studio-header, .songs-header, .lab-header { padding: 30px 0 26px; gap: 16px; }
  .intro { font-size: 13px; }
  .intro-badge { font-size: 9px; margin-bottom: 12px; }
  h1 { font-size: 32px; }
  .shell { display: block; }
  .sidebar { display: none; }
  .topbar { display: block; margin-bottom: 18px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: white; }
  .topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .topbar .letter-meta strong { font-size: 12px; }
  .topbar .letter-meta span { font-size: 10px; }
  .mobile-drawer { display: block; position: fixed; inset: 0 auto 0 0; z-index: 60; width: min(86vw,320px); padding: 24px; background: white; overflow-y: auto; transform: translateX(-105%); transition: transform .2s; }
  .mobile-drawer.show { transform: translateX(0); }
  .drawer-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .drawer-heading .brand { margin-bottom: 0; }
  .drawer-heading { margin-bottom: 22px; }
  .study-layout, .lab-grid { grid-template-columns: 1fr; }
  .studio-illustration, .music-illustration { display: none; }
  .lab-header { flex-wrap: wrap; }
  .lab-header > .primary-button { width: 100%; }
  .info-panel, .practice-panel, .feedback-panel, .panel, .controls-panel, .chart-card, .side-card, .focus-body { padding: 20px; }
  .visual-stage { padding: 16px; min-height: 260px; }
  .visual-stage img { max-height: 350px; }
  .visual-footer { padding: 16px; }
  .visual-footer .controls-row { gap: 6px; }
  .hero-output { min-height: 210px; }
  .matra-keys { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .speech-grid { grid-template-columns: 1fr; }
  .phrase-grid, .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .anchor-card { padding: 14px; }
  .card-topline { align-items: flex-start; flex-direction: column; gap: 8px; }
  .card-title { font-size: 13px; }
  .card-note { font-size: 10px; }
  .letter-video-row { grid-template-columns: 54px minmax(0,1fr); gap: 10px; }
  .focus-stage { padding: 18px; }
  .focus-letter { font-size: 34px; }
  .site-footer { font-size: 10px; }
  html { scroll-padding-top: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
