@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+TC:wght@400;500;600;700&display=swap');
:root{font-family:'DM Sans','Noto Sans TC',sans-serif;color:#1c2939;background:#f5f7fa;font-synthesis:none;--ink:#192638;--green:#bcf579;--muted:#727d8a;--border:#e5e9ee}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer;transition:background .18s,transform .18s}button:hover:not(:disabled){filter:brightness(.96)}button:active:not(:disabled){transform:translateY(1px)}button:disabled{opacity:.45;cursor:not-allowed}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #68a535;outline-offset:3px}[hidden]{display:none!important}.sidebar{width:226px;position:fixed;inset:0 auto 0 0;background:#172335;color:#eef4fc;padding:36px 22px;display:flex;flex-direction:column;z-index:5}.brand{display:flex;gap:13px;align-items:center;font-size:37px;font-weight:700;letter-spacing:-2px}.brand-icon{background:var(--green);color:#172335;width:42px;height:44px;border-radius:13px;display:grid;place-items:center;font-size:29px;letter-spacing:-2px}.brand-sub{display:block;font-size:9px;letter-spacing:2.5px;font-weight:500;margin-top:-3px;color:#a8b1bf}.nav-label{font-size:10px;letter-spacing:1.5px;color:#8b98ac;margin:54px 9px 18px}.nav{width:100%;border:0;background:transparent;color:#b6c0cf;display:flex;align-items:center;gap:13px;border-radius:9px;padding:15px 12px;text-align:left;font-size:14px;margin-bottom:7px}.nav>span:first-child{font-size:23px;width:23px;line-height:20px}.nav.active{background:#bcf579;color:#172335;font-weight:700}.pill{font-size:10px;background:#334258;color:#ced8e6;padding:3px 6px;border-radius:4px;margin-left:auto}.count{background:#f0f3f6;color:#637181;padding:3px 8px;border-radius:5px;font-size:12px;margin-left:auto}.sidebar-bottom{margin-top:auto;padding:36px 9px 0}.mini-wave{color:var(--green);letter-spacing:5px;font-size:24px;margin-bottom:18px}.sidebar-bottom b{font-size:20px;line-height:1.5;font-weight:500;letter-spacing:-.3px}.sidebar-bottom p{font-size:12px;color:#8f9eb2;line-height:1.9;margin:12px 0 32px}.profile{border-top:1px solid #304054;padding-top:22px;display:flex;align-items:center;gap:10px;font-size:12px}.avatar{background:#34445c;width:35px;height:35px;border-radius:50%;display:grid;place-items:center}.profile small{display:block;color:#8695aa;margin-top:5px;font-size:11px}main{margin-left:226px;padding:0 42px}.topbar{height:81px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--border);font-size:11px;color:#8893a0;letter-spacing:1px}.topbar b{font-size:12px;color:#536071;font-weight:500;letter-spacing:0}.slash{margin:0 13px;color:#c4cbd4}.top-tip{font-size:10px;letter-spacing:1.5px}.page-head{display:flex;align-items:center;justify-content:space-between;gap:25px;margin:39px 0 33px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:2px;color:#809080}h1{font-size:30px;letter-spacing:-1px;margin:10px 0;font-weight:600}.green-dot{color:#80b73f;font-size:40px}p{line-height:1.7}.page-head p{font-size:14px;color:var(--muted);margin:0}.primary,.secondary,.light-button{border:0;border-radius:8px;padding:12px 18px;font-size:14px;font-weight:600}.primary{background:var(--green);color:#23321a;white-space:nowrap}.secondary{background:white;border:1px solid #dce2e9;color:#405064}.light-button{background:#edf6e4;color:#283e1c}.lesson-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;gap:15px}.lesson-heading>div{display:flex;align-items:center;gap:14px}.tag{font-size:9px;font-weight:700;letter-spacing:1px;background:#e6eddf;color:#54763b;padding:6px 8px;border-radius:4px}h2{font-size:18px;margin:0;font-weight:600;letter-spacing:-.3px}.muted{color:var(--muted);font-size:12px;line-height:1.7}.workspace{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:24px}.video-shell{aspect-ratio:16/9;background:#152233;border-radius:12px;position:relative;overflow:hidden}.video-shell iframe,#player{height:100%;width:100%;border:0}#video-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;background:radial-gradient(ellipse at top right,#2c435a,transparent 65%),#192b3b;padding:22px;color:white}.video-label{font-size:9px;letter-spacing:2.5px;color:#98b0c3;position:absolute;top:23px;left:24px}.play-circle{width:59px;height:59px;border:1px solid #819989;border-radius:50%;display:grid;place-items:center;font-size:30px;color:var(--green);margin:15px 0 17px;padding-left:3px}#video-empty h2{font-size:20px}#video-empty p{font-size:12px;color:#a3b7c5;margin:10px 0 17px}#video-empty button{font-size:12px;padding:10px 16px}.playback{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 4px 20px;color:#707c8a;font-size:12px}.icon-button{background:none;border:0;color:#526073;padding:6px;font-size:14px}.playback select{border:0;background:transparent;color:#27384c;font-weight:600}.switch{display:flex;gap:6px;align-items:center;cursor:pointer}input[type=checkbox]{accent-color:#6f9d39}.speech-card{background:white;border:1px solid var(--border);padding:24px 26px;border-radius:12px}.card-top{display:flex;align-items:center;justify-content:space-between}.current-sentence{font-size:27px;line-height:1.5;font-weight:500;letter-spacing:-.5px;margin:22px 0 10px}.speech-card p{font-size:12px;color:#7e8893;margin:0 0 20px}.record-actions{display:flex;gap:10px;align-items:center;margin-top:25px}.record{flex:1}.record.recording{background:#fbd2cc;color:#a2382d}.speech-card .privacy{font-size:10px;margin:15px 0 0;text-align:center}.tip-card{display:flex;gap:14px;padding:20px 4px;color:#606f7e}.tip-card>span{font-size:26px;color:#73924a}.tip-card b{font-size:12px;font-weight:600}.tip-card p{font-size:12px;margin:5px 0}.transcript-card{border:1px solid var(--border);background:white;border-radius:12px;overflow:hidden;display:flex;flex-direction:column;min-width:0}.transcript-heading{display:flex;align-items:center;justify-content:space-between;padding:22px 23px 15px}h3{font-size:15px;margin:0}.transcript-tools{display:flex;align-items:center;justify-content:space-between;padding:0 23px 17px;font-size:11px;color:#8a929c;border-bottom:1px solid #edf0f3}.text-button{padding:0;border:0;background:none;color:#60823f;font-size:12px;font-weight:500}.transcript{flex:1;max-height:430px;min-height:180px;overflow-y:auto;padding:12px}.line{width:100%;border:1px solid transparent;background:white;display:flex;gap:14px;text-align:left;padding:17px 13px;border-radius:8px;color:#526072;line-height:1.6;margin:3px 0}.line.active{background:#eef5e7;border-color:#dce9ce;color:#263c25}.line .time{font-size:10px;color:#849076;min-width:33px;padding-top:4px}.line .words{font-size:15px}.line .line-index{display:block;font-size:10px;color:#8b9980;margin-bottom:3px}.sentence-navigation{display:flex;justify-content:space-between;gap:12px;padding:18px 23px;border-top:1px solid var(--border)}.sentence-navigation button{flex:1;font-size:12px;padding:9px}.lookup-mini{background:#f8faf6;margin:0 15px 15px;padding:20px;border-radius:8px}.lookup-mini .eyebrow{font-size:9px}.lookup-mini h3{margin-top:10px;font-size:14px}.lookup-mini p{font-size:12px;color:#809074}.feedback{border-top:1px solid var(--border);margin-top:18px;padding-top:16px;font-size:14px;line-height:1.7}.feedback b{color:#527d2a}.feedback .heard{color:#576778}.feedback mark{background:#ffefcb;padding:2px 4px}.chat-layout{display:grid;grid-template-columns:2fr 1fr;gap:24px}.chat-card,.coach-card{background:white;border:1px solid var(--border);border-radius:12px;padding:28px}.chat-intro{text-align:center;padding:20px 0}.tutor-icon{background:#edf6e5;color:#7ca246;font-size:30px;border-radius:15px;width:60px;height:60px;margin:0 auto 20px;display:grid;place-items:center}.chat-intro h2{font-size:26px}.chat-intro p{font-size:14px;color:#7b8793}.topics{display:flex;justify-content:center;flex-wrap:wrap;gap:8px}.topics button{border:1px solid var(--border);border-radius:20px;background:white;padding:9px 13px;font-size:12px;color:#536371}.coach-card{align-self:start}.coach-card h2{font-size:24px;margin-top:20px}.coach-card p{font-size:14px;color:#758191}.coach-card hr{border:0;border-top:1px solid var(--border);margin:26px 0}.coach-card b{font-size:14px}.chat-input{display:flex;gap:10px;margin-top:25px}.chat-input input{flex:1;min-width:0}.message{padding:15px 18px;border-radius:12px;font-size:14px;line-height:1.8;white-space:pre-wrap;margin:15px 0;background:#f3f6f8}.message.user{background:#eff7e7;margin-left:35px}.message.error{background:#fff0ec}.status{font-size:12px;color:#7b8693;background:#e9eef1;padding:9px 12px;border-radius:20px}.notes-toolbar{display:flex;gap:15px;margin-bottom:25px}.notes-toolbar input{flex:1}.notes-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.note-card{border:1px solid var(--border);background:white;border-radius:12px;padding:25px;min-width:0}.note-card h2{font-size:20px;overflow-wrap:anywhere}.note-card p{white-space:pre-wrap;font-size:14px;color:#697686;overflow-wrap:anywhere}.note-card .actions{display:flex;gap:17px;margin-top:20px}.note-card .actions button{font-size:12px}.empty{padding:65px 25px;text-align:center;background:white;border:1px dashed #d4dccf;border-radius:12px;grid-column:1/-1;color:#7a8893}.empty h2{color:#384b5c;margin-bottom:12px}.empty p{font-size:14px}input:not([type=checkbox]),textarea{width:100%;border:1px solid #dce3e9;border-radius:7px;padding:12px 14px;background:white;color:#24354a;font-size:14px}textarea{resize:vertical;line-height:1.7}dialog{width:min(580px,calc(100% - 30px));max-height:90vh;overflow:auto;border:1px solid var(--border);border-radius:17px;padding:30px;color:var(--ink);box-shadow:0 20px 80px #0d192640}dialog::backdrop{background:#0f1a2ab0;backdrop-filter:blur(4px)}.dialog-heading{display:flex;justify-content:space-between;gap:15px;margin-bottom:24px}.dialog-heading h2{font-size:23px;margin-top:8px}.close{border:0;background:#f1f4f6;border-radius:50%;width:31px;height:31px;font-size:24px;color:#6a7681;flex-shrink:0}dialog label{display:block;font-size:13px;font-weight:500;margin:17px 0}dialog label input,dialog label textarea{margin-top:8px}.error{font-size:13px;color:#a84531;line-height:1.7}.full{width:100%}.dialog-actions{display:flex;justify-content:flex-end}.toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);background:#253848;color:white;padding:14px 23px;border-radius:10px;box-shadow:0 5px 30px #17233233;font-size:14px;z-index:100;max-width:90vw}footer{display:flex;justify-content:space-between;color:#9aa3ae;font-size:10px;padding:20px 0 26px;margin-top:15px;border-top:1px solid var(--border)}footer span:first-child{font-size:14px;font-weight:700;letter-spacing:-.3px}@media(min-width:1500px){main{max-width:1590px;margin-left:226px;padding:0 60px}.current-sentence{font-size:32px}.video-shell{max-height:430px}.workspace{grid-template-columns:1.55fr 1fr}.transcript{max-height:550px}}@media(max-width:1150px){.sidebar{width:185px;padding:28px 16px}main{margin-left:185px;padding:0 25px}.top-tip{display:none}.workspace{grid-template-columns:minmax(0,1.2fr) minmax(270px,1fr);gap:17px}h1{font-size:25px}.page-head{align-items:flex-start}.page-head .primary{font-size:12px}.lesson-heading{align-items:flex-start}.lesson-heading>div{flex-wrap:wrap;gap:7px}.lesson-heading>.muted{max-width:160px}.current-sentence{font-size:23px}.record-actions{flex-wrap:wrap}.record-actions .primary{order:3;flex-basis:100%}.playback{font-size:11px}.playback .icon-button{font-size:12px}.chat-layout{grid-template-columns:1fr}.coach-card{display:none}}@media(max-width:820px){.sidebar{position:static;width:100%;padding:15px 22px;flex-direction:row;align-items:center;justify-content:space-between;gap:20px}.brand{font-size:28px}.brand-icon{height:35px;width:35px;font-size:23px}.brand-sub{font-size:7px}.nav-label,.sidebar-bottom{display:none}.sidebar nav{display:flex;gap:5px}.nav{font-size:12px;gap:7px;padding:9px 10px;margin:0;white-space:nowrap}.nav>span:first-child,.nav .pill,.nav .count{display:none}main{margin-left:0;padding:0 23px}.topbar{height:56px}.page-head{margin:25px 0;align-items:center}.workspace{grid-template-columns:1fr 1fr;gap:16px}h1{font-size:24px}.page-head p{font-size:12px}.transcript-tools{flex-wrap:wrap;gap:8px;padding:0 17px 14px}.transcript-heading{padding:20px 17px 12px}.speech-card{padding:21px}.video-label{display:none}#video-empty h2{font-size:16px}#video-empty p{font-size:11px}.play-circle{margin:0 0 8px;width:40px;height:40px;font-size:24px}#video-empty button{padding:7px 10px}.playback{flex-wrap:wrap}.record-actions .primary{order:0}.record-actions .secondary{font-size:12px}.current-sentence{font-size:22px}.lesson-heading>.muted{display:none}}@media(max-width:610px){.sidebar{padding:16px;gap:10px}.brand-sub{display:none}.brand{font-size:25px}.brand-icon{width:29px;height:31px;border-radius:8px}.brand{gap:8px}.nav{padding:9px 8px;font-size:11px}main{padding:0 17px}.page-head{display:block}.page-head>.primary,.page-head>.status{display:inline-block;margin-top:18px}h1{font-size:26px}.workspace{grid-template-columns:1fr}.video-shell{aspect-ratio:16/10}.play-circle{height:52px;width:52px;margin-bottom:13px}#video-empty h2{font-size:18px}.record-actions{flex-wrap:nowrap}.record-actions .primary{flex-basis:auto}.current-sentence{font-size:26px}.transcript{max-height:300px;min-height:130px}.notes-grid{grid-template-columns:1fr}.notes-toolbar{flex-wrap:wrap}.notes-toolbar input{flex-basis:100%}.chat-card{padding:20px}.chat-intro h2{font-size:23px}.chat-input{flex-wrap:wrap}.chat-input input{flex-basis:100%}.chat-input button{width:100%}dialog{padding:23px}.eyebrow{font-size:9px}.tip-card{padding-bottom:6px}.page-head p{font-size:13px}.privacy{line-height:1.8}.topbar{font-size:10px}.lookup-mini{margin-top:5px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.transcript-instructions,.subtitle-preview{background:#f2f7ed;padding:16px;border-radius:9px;font-size:14px;line-height:1.8;margin:16px 0}.transcript-instructions ol,.subtitle-preview ol{padding-left:22px;margin:8px 0}.subtitle-preview li{overflow-wrap:anywhere}.subtitle-preview li span{font-variant-numeric:tabular-nums;color:#54743b;white-space:nowrap}.timing-controls{margin-top:18px;border-top:1px solid var(--border);padding-top:16px;font-size:14px}.timing-controls output{font-variant-numeric:tabular-nums;margin-left:8px}.timing-controls p{margin:8px 0;font-size:13px}.timing-buttons{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.timing-buttons .secondary{font-size:13px;padding:9px 11px}

.speech-mode{margin:18px 0}.speech-mode select{max-width:100%;padding:8px;border-radius:8px}.speech-mode p{font-size:13px;color:var(--muted,#657080)}#recording-preview{width:100%;margin-top:16px}.speech-scores{display:flex;flex-wrap:wrap;gap:14px;margin:12px 0}.speech-scores span{padding:8px;background:#f1f5eb;border-radius:8px}
/* Focused practice layout: shared controls keep the same actions on every screen. */
.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}
#practice .page-head{margin:20px 0 18px}#practice .page-head h1{font-size:23px;margin:3px 0}#practice .page-head p,#practice .page-head .eyebrow{display:none}
#practice .lesson-heading{margin-bottom:12px}.speech-card{margin-top:16px;background:#f4f9ee;border-color:#d6e5c7;border-top:3px solid #a4d36d}.speech-card .current-sentence{font-size:clamp(26px,2.5vw,34px);font-weight:600;line-height:1.55;overflow-wrap:anywhere}.speech-card .eyebrow{color:#54763b;letter-spacing:1px}.speech-card #sentence-help{margin-bottom:12px}.sentence-extras{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#727d6a;font-size:12px}.sentence-extras button{font-size:27px;min-width:44px;min-height:44px}.speech-card .card-top .muted{font-variant-numeric:tabular-nums;background:#e4efd9;color:#486735;padding:4px 10px;border-radius:20px}.tip-card{display:none}
.practice-dock{margin:20px auto 0;padding:12px 20px;background:#fff;border:1px solid var(--border);border-radius:18px;max-width:560px;box-shadow:0 6px 24px #1723350a}.dock-controls{display:flex;justify-content:space-between;align-items:center;gap:12px}.dock-button{position:relative;width:48px;height:48px;display:grid;place-items:center;flex-shrink:0;border:0;border-radius:50%;background:#f0f3f6;color:var(--ink);padding:12px}.dock-button svg{width:24px;height:24px}.dock-button.primary{width:62px;height:62px;background:var(--green)}.dock-button.primary svg{width:28px;height:28px}.dock-button.recording{background:#fbd2cc;color:#a2382d}.dock-button.is-stopping svg{display:none}.dock-button.is-stopping:after{content:'';width:20px;height:20px;border-radius:4px;background:currentColor}.practice-status{text-align:center;font-size:12px;color:#637181;min-height:20px;margin-bottom:8px}.dock-summary{display:flex;justify-content:center;align-items:center;gap:16px;min-height:22px;margin-top:8px;font-size:11px;color:#727d8a}.dock-summary button{min-height:30px;color:#a2382d}
#practice-settings .playback{flex-wrap:wrap;justify-content:flex-start;gap:18px;border-bottom:1px solid var(--border);font-size:14px}#practice-settings .playback select{padding:10px}#practice-settings #repeat{display:none}#practice-settings .switch{min-height:44px}#practice-settings .privacy{font-size:12px;color:var(--muted);line-height:1.8}.timing-details{border-top:1px solid var(--border);padding-top:16px}.timing-details summary{cursor:pointer;padding:10px 0;font-size:14px}.timing-details .timing-controls{border:0;padding-top:0}#timing-unsaved{color:#9d5327}.speech-mode select{width:100%;min-height:44px}.practicing .toast{bottom:180px}
@media(max-width:820px){
 body.practicing main{padding-bottom:calc(176px + env(safe-area-inset-bottom,0px))}.practicing .topbar{display:none}#practice .workspace{grid-template-columns:1fr}#practice .page-head{display:flex;align-items:center;gap:12px;margin:14px 0}#practice .page-head h1{font-size:21px}#practice .page-head .green-dot{font-size:26px}#practice .page-head>.primary{margin:0;font-size:11px;padding:10px 12px}#practice .lesson-heading .tag{display:none}#practice .lesson-heading h2{font-size:14px;line-height:1.5}#practice .lesson-heading>div{min-width:0}#practice .video-shell{aspect-ratio:16/9}.speech-card{padding:18px 20px;margin-top:12px}.speech-card .current-sentence{margin:16px 0 10px;font-size:27px}.speech-card #sentence-help{display:none}.sentence-extras{font-size:11px}.practice-dock{position:fixed;z-index:10;left:0;right:0;bottom:0;max-width:none;margin:0;border-radius:20px 20px 0 0;border-bottom:0;padding:10px max(20px,env(safe-area-inset-right,0px)) calc(8px + env(safe-area-inset-bottom,0px)) max(20px,env(safe-area-inset-left,0px));box-shadow:0 -5px 28px #17233512}.dock-controls{max-width:420px;margin:auto}.practice-status{margin-bottom:6px}.dock-summary{margin-top:5px}.transcript-card .lookup-mini{display:none}.transcript{max-height:260px}.transcript-heading{padding:16px 18px 10px}.line{padding:12px}.practicing footer{display:none}#practice-settings{width:100%;max-width:560px;max-height:85dvh;margin:auto auto 0;border-radius:22px 22px 0 0;padding:24px 22px calc(24px + env(safe-area-inset-bottom,0px))}#practice-settings .close{width:44px;height:44px}.sidebar{padding:12px 16px}
}
@media(max-width:360px){.dock-controls{gap:8px}.dock-button{width:44px;height:44px}.dock-button.primary{width:56px;height:56px}.practice-dock{padding-left:16px;padding-right:16px}.sidebar{gap:6px;padding:12px}.nav{padding:9px 6px}.speech-card .current-sentence{font-size:25px}}
/* Recording feedback: target IPA is separate from recognition candidates. */
.result-heading,.ipa-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.result-heading h3{font-size:17px}.result-provisional{font-size:11px;padding:4px 9px;border-radius:20px;background:#edf0e9;color:#66765a;white-space:nowrap}.result-overview{display:grid;grid-template-columns:100px minmax(0,1fr);align-items:center;gap:16px;margin:18px 0;padding:16px;border-radius:14px;background:#fff;border:1px solid #e0e9d6}.overall-score{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:3px}.overall-score>span{width:100%;font-size:12px;color:#637181}.overall-score>strong{font-size:38px;line-height:1.35;color:#314c25;font-variant-numeric:tabular-nums}.overall-score>small{font-size:11px;color:#7e8893}.result-metrics{margin:0;padding-left:14px;border-left:1px solid var(--border);display:grid;gap:6px;font-size:12px}.result-metrics>div{display:flex;justify-content:space-between;align-items:center;gap:8px}.result-metrics dt{color:#66745e}.result-metrics dd{margin:0;font-weight:600;font-variant-numeric:tabular-nums}.speech-card .recognized-text{display:grid;gap:5px;color:#334458;font-size:15px;margin:0 0 24px;overflow-wrap:anywhere}.recognized-text>span:first-child{font-size:11px;color:#727d8a}.ipa-section-heading{align-items:baseline}.ipa-section-heading>span{font-size:11px;color:#69805a}.speech-card .ipa-explainer{font-size:12px;line-height:1.8;margin:8px 0 14px;color:#687362}.ipa-words{display:grid;gap:10px}.ipa-word{min-width:0;border:1px solid #dce6d4;border-radius:12px;background:#fff;overflow:hidden}.ipa-word summary{display:flex;align-items:center;gap:10px;padding:14px;min-height:64px;cursor:pointer;list-style:none}.ipa-word summary::-webkit-details-marker{display:none}.ipa-word summary:after{content:'⌄';font-size:20px;color:#748269;flex-shrink:0}.ipa-word[open] summary:after{content:'⌃'}.ipa-word summary:focus-visible{outline:3px solid #68a535;outline-offset:-3px}.word-heading{flex:1;min-width:0;display:grid;gap:3px;overflow-wrap:anywhere}.word-heading>strong{font-size:17px;color:var(--ink)}.ipa-symbol{font-family:'Segoe UI','Arial','Noto Sans',sans-serif;font-weight:400;letter-spacing:.02em;overflow-wrap:anywhere}.word-ipa{font-size:16px;color:#586b49}.word-score{display:grid;gap:3px;font-size:10px;text-align:right;color:#798171;flex-shrink:0}.word-score strong{font-size:17px;color:#405530;font-variant-numeric:tabular-nums}.word-flag{font-size:11px;color:#955e29}.word-detail{padding:0 14px 14px;border-top:1px solid #edf0e9}.speech-card .phoneme-caption{font-size:11px;color:#728066;margin:12px 0 8px}.phoneme-grid{list-style:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));gap:8px;margin:0;padding:0}.phoneme-card{padding:12px;background:#f6f8f3;border-radius:9px;min-width:0}.phoneme-target{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}.phoneme-target>.ipa-symbol{font-size:23px;color:#253d1c}.phoneme-target>span:last-child{font-size:11px;color:#6f7e63}.phoneme-target strong{color:#405530}.phoneme-candidates{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;font-size:12px;color:#66745e}.phoneme-candidates>span:first-child{flex-basis:100%;font-size:10px}.phoneme-candidate{display:flex;align-items:center;gap:6px;padding:4px 7px;border:1px solid #e2e7dc;border-radius:6px;background:#fff}.phoneme-candidate small{font-size:10px;color:#798171}.speech-card .phoneme-empty{font-size:12px;margin:12px 0 0;color:#727d8a}.speech-card .result-note{margin:16px 0 0;padding-left:10px;border-left:2px solid #c5d9b1;font-size:11px;line-height:1.8;color:#77836d}
@media(max-width:360px){.result-overview{grid-template-columns:80px minmax(0,1fr);gap:10px;padding:12px}.overall-score>strong{font-size:32px}.result-heading h3{font-size:15px}.result-provisional{font-size:10px}.ipa-section-heading{flex-wrap:wrap;gap:4px}.word-score strong{font-size:15px}}
.overall-score>strong.score-unavailable{font-size:18px}
/* Pre-practice aids share the current sentence card. */
.study-toggles{display:flex;gap:8px;margin-top:16px}.study-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 12px;border:1px solid #dbe4d3;border-radius:22px;background:white;color:#5e6c54;font-size:13px;font-weight:700}.study-toggle span{font-size:11px;font-weight:400}.study-toggle[aria-pressed=true]{background:#e0efcf;border-color:#b3cf94;color:#385623}.speech-card .translation-region{padding:14px 0 6px;border-top:1px solid #dfe8d8;margin:14px 0}.translation-source{display:block;font-size:10px;color:#7a856e;margin-bottom:6px}.speech-card #sentence-translation{font-size:16px;color:#4e5d45;line-height:1.8;margin:0;overflow-wrap:anywhere}.speech-card #translation-status,.speech-card #ipa-status{font-size:12px;color:#737e68;margin:0;overflow-wrap:anywhere}.translation-region .text-button,.ipa-reference-help .text-button{min-height:44px}.speech-card .ipa-reference-help p{font-size:11px;color:#748068;line-height:1.8;margin:8px 0}.speech-card .current-sentence.with-ipa{line-height:2.1}.study-word{display:inline-flex;vertical-align:top;flex-direction:column;position:relative;align-items:flex-start;gap:3px;max-width:100%;margin:0 2px 8px 0;padding:3px 3px 6px;border:0;border-bottom:1px solid #dce9d1;border-radius:5px;background:transparent;color:inherit;font-size:inherit;line-height:1.4;text-align:left}.study-spelling{overflow-wrap:anywhere;max-width:100%}.study-phonetic{font-size:13px;font-weight:400;color:#667c51;line-height:1.5;max-width:100%;overflow-wrap:anywhere;letter-spacing:0}.study-pronunciation{display:flex;align-items:center;gap:5px;max-width:100%;min-height:22px}.study-pronunciation .study-phonetic{min-width:0}.ipa-variants{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-width:23px;height:20px;padding:0 5px;border:1px solid #d6e5c8;border-radius:999px;background:#edf5e5;color:#506b37;font-size:10px;font-weight:600;line-height:1;letter-spacing:0;font-variant-numeric:tabular-nums}.study-word:hover .ipa-variants,.study-word:focus-visible .ipa-variants{background:#dceecb;border-color:#abc88f}.sentence-extras #start-tour{font-size:12px;min-width:44px;padding:0 8px 0 0}.word-ipa-option{font-size:25px;padding:12px 16px;background:#f4f9ee;border:1px solid #dce6d4;border-radius:10px;margin:10px 0;overflow-wrap:anywhere}#replay-tour{margin:4px 0 18px}#word-ipa-dialog .close{width:44px;height:44px;min-width:44px}#word-ipa-title{overflow-wrap:anywhere}
/* A top-layer dialog traps focus; only its panel receives pointer events. */
#practice-tour{position:fixed;inset:0;width:100%;max-width:none;height:100%;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:transparent;overflow:hidden;box-shadow:none;color:var(--ink)}#practice-tour::backdrop{background:transparent;backdrop-filter:none}.tour-spotlight{position:fixed;border:2px solid var(--green);border-radius:12px;box-shadow:0 0 0 200vmax #122030ad;pointer-events:none}.tour-panel{position:fixed;border:1px solid #dce6d4;border-radius:18px;background:#fff;padding:22px;box-shadow:0 12px 48px #101e3340;overflow-y:auto}.tour-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;gap:12px}.tour-top>span{font-size:11px;color:#77846b}.tour-top button{min-height:44px;padding:0 8px}.tour-panel h2{font-size:21px;line-height:1.5}.tour-panel p{font-size:14px;line-height:1.8;color:#637181;margin:10px 0 20px}.tour-actions{display:flex;justify-content:space-between;gap:12px}.tour-actions button{min-height:44px}.tour-actions .primary{margin-left:auto}
@media(max-width:610px){.speech-card .current-sentence.with-ipa{font-size:25px}.study-toggles{margin-top:12px}.speech-card .translation-region{margin:10px 0}.tour-panel{padding:18px}.tour-panel h2{font-size:19px}.study-phonetic{font-size:12px}.study-toggle{padding:8px 11px}}

/* Teacher feedback stays inline above expandable phonemes. */
.teacher-feedback{margin:18px 0;padding:16px;border:1px solid #dbe6d1;border-radius:14px;background:#f5faee;min-width:0}.teacher-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.teacher-heading h3{margin:0;font-size:15px}.teacher-heading>span{font-size:11px;color:#6b7d59}.teacher-feedback .teacher-text{font-size:14px;line-height:1.9;overflow-wrap:anywhere;margin:12px 0;color:#35452c}.teacher-generate{min-height:44px;display:inline-flex;align-items:center;gap:8px}.teacher-source{display:block;font-size:11px;color:#75816b;margin-top:10px;line-height:1.7}@media(max-width:480px){.teacher-feedback{padding:14px}.teacher-generate{width:100%;justify-content:center}}

.video-library{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:18px;margin-bottom:30px}.video-card{background:white;border:1px solid var(--border);border-radius:16px;padding:22px;min-width:0}.video-card h2{margin-top:12px;overflow-wrap:anywhere;line-height:1.6}.video-card p{color:var(--muted);font-size:14px}.video-card progress{width:100%;height:8px;accent-color:#7ebc43;display:block;margin:18px 0}.video-resume{min-height:44px;width:100%}#history-dialog{width:min(680px,calc(100vw - 24px));max-height:85dvh;overflow-y:auto}#history-sentence,.history-original{overflow-wrap:anywhere;line-height:1.7}.attempt-card{border:1px solid #dbe6d1;border-radius:12px;margin:12px 0;padding:14px;background:#fff}.attempt-card>summary{cursor:pointer;min-height:44px;line-height:1.8;font-weight:600;font-size:14px}.attempt-card .history-original{font-size:13px;color:#6a7582}.sentence-extras{flex-wrap:wrap}#sentence-history,#retry-progress{min-height:44px}.sidebar nav{min-width:0}@media(max-width:760px){.sidebar nav{flex-wrap:wrap}.sidebar .nav{font-size:12px;white-space:nowrap}.video-card{padding:18px}#history-dialog{padding:16px}.attempt-card{padding:10px}}
@media(max-width:760px){.sidebar{flex-direction:column;align-items:stretch;padding:8px 12px}.sidebar .brand{display:none}.sidebar nav{display:flex;flex-wrap:nowrap;gap:4px;width:100%}.sidebar .nav{flex:1;width:auto;min-width:0;min-height:44px;justify-content:center;margin:0;padding:9px 5px;font-size:12px}}
