:root{--ink:#17212d;--muted:#576575;--line:#e4e8ef;--blue:#225ad5;--blue-soft:#edf4ff;--red:#b52d40;--surface:#f5f7fa;font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Noto Sans JP",sans-serif;color:var(--ink);background:#fff;accent-color:var(--blue)}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid var(--blue);outline-offset:3px}button{min-height:44px;border:0;border-radius:9px;background:none;transition:background .18s ease}button:hover:not(:disabled){background:var(--surface)}input,select{border:1px solid #bfc8d5;border-radius:8px;background:#fff;padding:12px;color:var(--ink);min-height:46px}input{min-width:0}a{color:var(--blue);text-underline-offset:4px}h1,h2,p{margin-top:0}h1{font-size:30px;line-height:1.35;letter-spacing:-.6px}h2{font-size:21px;line-height:1.5;margin-bottom:12px}.subtext{color:var(--muted);font-size:15px;line-height:1.7;margin-bottom:0}.quiet{font-size:13px;color:var(--muted);margin-bottom:10px}.small{font-size:13px}.primary{background:var(--blue);color:#fff;padding:12px 22px;font-weight:600}.primary:hover:not(:disabled){background:#1948b0}.outline{border:1px solid #c8d0dc;padding:10px 16px;background:#fff}.text-button{font-size:14px;color:var(--muted);padding:8px}.icon-button{display:inline-flex;justify-content:center;align-items:center;width:44px;height:44px;flex-shrink:0}.icon-button svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.brand{display:inline-flex;align-items:center;gap:11px;text-decoration:none;font-size:26px;font-weight:750;letter-spacing:-1px;color:var(--ink);padding:0;white-space:nowrap}.brand-cn{font-size:18px;letter-spacing:0;margin-left:6px;font-weight:600}.brand-mark{width:28px;height:28px;border:2px solid var(--blue);border-radius:8px;position:relative}.brand-mark:after{content:"";position:absolute;width:0;height:0;width:8px;height:12px;background:var(--blue);clip-path:polygon(0 0,100% 50%,0 100%);left:9px;top:6px}.login-view{min-height:100dvh;display:grid;grid-template-columns:1fr 1fr}.login-story{background:var(--surface);padding:40px 48px;position:relative;overflow:hidden;display:flex;flex-direction:column}.story-copy{margin:68px 0 24px;position:relative;z-index:1}.story-copy h1{font-size:36px;line-height:1.45}.story-copy p{color:var(--muted);line-height:1.9}.poster-stack{display:flex;gap:18px;align-items:flex-start;max-width:460px;margin:auto 0 24px}.poster-stack img{width:29%;aspect-ratio:2/3;object-fit:cover;border-radius:9px}.poster-stack img:nth-child(2){margin-top:28px}.story-foot{font-size:13px;color:var(--muted);margin-top:20px}.login-form-wrap{display:grid;place-items:center;padding:40px 34px}.login-form{width:100%;max-width:360px}.login-form h2{font-size:28px;margin-bottom:12px}.login-form label{display:block;font-size:14px;font-weight:600;margin:28px 0 10px}.phone-field,.otp-field{display:flex;gap:8px}.phone-field select{max-width:134px;font-size:14px}.phone-field input,.otp-field input{flex:1;width:100%}.otp-field button{font-size:13px;white-space:nowrap;min-width:112px;color:var(--blue);border:1px solid #c8d0dc;padding:0 12px}.login-submit{width:100%;margin-top:12px}.local-note{font-size:12px;line-height:1.75;color:var(--muted);margin:18px 0 0}.message{font-size:13px;min-height:18px;color:var(--red);line-height:1.6;margin:12px 0}.dev-code{padding:12px 14px;background:var(--blue-soft);border-radius:8px;margin-top:14px;font-size:13px;color:#1948b0}.app-header{height:80px;display:flex;align-items:center;padding:0 34px;border-bottom:1px solid var(--line);gap:40px;background:#fff}.app-header nav{display:flex;gap:22px;height:100%;align-items:center}.nav-button{height:100%;border-radius:0;font-size:15px;font-weight:600;position:relative;color:var(--muted);padding:0 4px}.nav-button.active{color:var(--blue)}.nav-button.active:after{content:"";height:3px;position:absolute;bottom:0;left:0;right:0;background:var(--blue);border-radius:2px}.account-button{margin-left:auto;font-size:13px;color:var(--muted)}.library-view,.works-view{max-width:1160px;margin:0 auto;padding:44px 36px 70px}.library-intro{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:34px}.library-intro h1{margin-bottom:10px}.import-button{font-size:14px;white-space:nowrap}.import-form{padding:20px;background:var(--surface);margin-bottom:26px;border-radius:12px}.import-form label{font-size:14px;font-weight:600;display:block;margin-bottom:12px}.inline-form{display:flex;gap:10px}.inline-form input{flex:1}.level-bar{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);gap:20px}.level-tabs{display:flex;gap:12px}.level-tabs button{display:flex;gap:8px;align-items:center;padding:14px 13px;border-radius:0;font-size:17px;position:relative}.level-tabs button span{font-size:12px;color:var(--muted)}.level-tabs button[aria-selected=true]{color:var(--blue);font-weight:650}.level-tabs button[aria-selected=true]:after{content:"";position:absolute;bottom:-1px;left:10px;right:10px;height:3px;background:var(--blue)}.level-note{font-size:12px;color:var(--muted)}.catalog-heading{display:flex;align-items:center;justify-content:space-between;margin:28px 0 20px}.catalog-heading h2{font-size:18px;margin:0}.catalog-heading span{font-size:13px;color:var(--muted)}.catalog-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:32px}.anime-card{display:block;text-align:left;padding:0;border-radius:0;min-width:0}.anime-card:hover:not(:disabled){background:transparent}.anime-art{aspect-ratio:4/3;overflow:hidden;border-radius:12px;background:var(--surface);position:relative}.anime-art img{width:100%;height:100%;object-fit:cover;object-position:50% 25%;transition:transform .2s}.anime-card:hover img{transform:scale(1.025)}.anime-art .text-cover{font-size:28px;padding:28px;line-height:1.5}.availability{position:absolute;bottom:12px;left:12px;background:#fff;border-radius:6px;padding:6px 9px;font-size:11px;color:var(--ink)}.anime-card h3{font-size:21px;margin:17px 0 8px}.anime-card p{font-size:13px;color:var(--muted);line-height:1.6;margin:0}.episode-panel{margin-top:34px;padding:24px 0;border-top:1px solid var(--line);scroll-margin-top:20px}.episode-heading{display:flex;justify-content:space-between;align-items:center}.episode-heading h2{margin:0 0 16px}.episode-row{width:100%;display:flex;align-items:center;text-align:left;padding:18px 12px;gap:20px;border-bottom:1px solid var(--line);border-radius:0}.episode-row strong{font-size:16px;display:block;margin-bottom:5px}.episode-row span{font-size:12px;color:var(--muted)}.episode-row .episode-action{margin-left:auto;font-size:14px;color:var(--blue);white-space:nowrap}.empty-state{padding:36px 20px;background:var(--surface);border-radius:12px;line-height:1.8;color:var(--muted)}.study-view{height:calc(100dvh - 80px);display:flex;flex-direction:column;max-width:1120px;margin:auto;padding:0 28px}.study-title{display:flex;align-items:center;gap:16px;padding:14px 0;min-height:68px}.study-title h1{font-size:18px;flex:1;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.study-title .outline{font-size:13px}.video-frame{height:clamp(170px,30dvh,310px);aspect-ratio:16/9;margin:auto;max-width:100%;background:#f5f7fa;border-radius:9px;overflow:hidden}.video-frame iframe,#player{width:100%;height:100%}.video-detail{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);gap:12px;padding:9px 0}.video-detail a{white-space:nowrap}.study-toolbar{display:flex;gap:14px;justify-content:space-between;align-items:center;flex-wrap:wrap;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:6px 0}.play-controls,.text-controls{display:flex;align-items:center;gap:5px}.study-toolbar select{padding:6px;font-size:13px;min-height:40px;border:0}.tool-button{white-space:nowrap;flex-shrink:0;font-size:12px;padding:8px 10px;min-height:44px}.tool-button[aria-pressed=true]{color:var(--blue);background:var(--blue-soft)}#record-count{font-size:11px;color:var(--muted);margin-left:8px;white-space:nowrap}.caption-state{font-size:11px;color:var(--muted);line-height:1.6;padding:9px 0;margin:0}.reading-layout{flex:1;min-height:0;display:flex;gap:22px}.transcript{flex:1;min-width:0;overflow:auto;scrollbar-color:#bec8d5 #fff;padding-bottom:18px}.sentence{padding:18px 14px;border-bottom:1px solid #edf0f4;transition:background .16s;position:relative}.sentence.selected{background:var(--blue-soft);border-radius:8px}.sentence-top{display:flex;gap:16px;align-items:baseline}.sentence-time{font-size:11px;flex-shrink:0;color:var(--muted);font-variant-numeric:tabular-nums;padding:0;width:42px;min-height:44px}.sentence-text{font-size:24px;line-height:2.25;text-align:left;padding:0;flex:1;min-height:44px;overflow-wrap:anywhere}.sentence-text:hover:not(:disabled){background:transparent}.sentence-text ruby{margin-right:3px}.sentence-text rt{font-size:11px;line-height:1.3;color:var(--muted)}.romaji{font-size:12px;color:var(--muted);line-height:1.8;margin:3px 0 0 58px}.sentence-actions{display:flex;gap:8px;align-items:center;margin:3px 0 0 58px}.sentence-actions button{font-size:11px;color:var(--muted);min-height:44px;padding:5px 9px}.sentence-actions .recorded-label{font-size:11px;color:#256843;margin-left:auto}.explanation{flex-basis:320px;flex-shrink:0;overflow:auto;background:var(--surface);padding:18px;border-radius:12px}.explanation-heading{display:flex;justify-content:space-between;align-items:center}.explanation-heading h2{font-size:18px;margin:0}.explanation>p{font-size:18px;line-height:1.8;margin-top:20px}.explain-content{font-size:14px;line-height:1.85;color:var(--muted);white-space:pre-wrap}.record-dock{display:flex;align-items:center;gap:12px;padding:14px 0 max(14px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#fff}.record-context{flex:1;min-width:0}.record-context span{font-size:13px;font-weight:600;display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.record-context p{font-size:11px;color:var(--muted);margin:5px 0 0;line-height:1.6}.record-dock .outline{font-size:12px;white-space:nowrap}.record-button{background:var(--blue);color:#fff;padding:12px 18px;white-space:nowrap;min-width:110px}.record-button:hover:not(:disabled){background:#1948b0}.record-button.recording{background:var(--red)}.work-row{display:flex;gap:18px;align-items:center;padding:24px 0;border-bottom:1px solid var(--line)}.work-row img{width:76px;height:86px;object-fit:cover;border-radius:8px}.work-row h2{font-size:19px;margin-bottom:7px}.work-row p{font-size:13px;color:var(--muted);margin:0;line-height:1.8}.work-row>button{margin-left:auto;white-space:nowrap}dialog{border:0;border-radius:16px;padding:28px;width:min(540px,calc(100vw - 32px));max-height:90dvh;overflow:auto;color:var(--ink);box-shadow:0 18px 60px #17212d26}dialog::backdrop{background:#17212d66}.dialog-header{display:flex;align-items:center;justify-content:space-between}.dialog-header h2{margin:0}.dialog-header .quiet{margin:0 0 6px}.dub-visual{display:flex;align-items:center;justify-content:center;height:90px;gap:7px;margin:24px 0;background:var(--blue-soft);border-radius:12px}.dub-visual span{width:5px;height:18px;background:var(--blue);border-radius:3px}.dub-visual span:nth-child(3n){height:48px}.dub-visual span:nth-child(4n){height:32px}.dub-visual span:nth-child(5n){height:60px}#dub-progress{width:100%;padding:0;min-height:30px;cursor:pointer}.dub-time{display:flex;justify-content:space-between;color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}.dub-actions{display:flex;gap:10px;margin-top:24px}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--ink);color:#fff;padding:12px 18px;border-radius:10px;font-size:13px;max-width:calc(100vw - 32px);z-index:20}::selection{background:#d9e7ff}@media(max-width:1000px){.app-header{padding:0 24px;gap:28px}.level-note{display:none}.login-story{padding:32px}.story-copy h1{font-size:30px}.catalog-grid{gap:22px}.reading-layout:has(.explanation:not([hidden])) .sentence-text{font-size:21px}.explanation{flex-basis:280px}.text-controls{gap:0}}@media(max-width:700px){h1{font-size:25px}.login-view{grid-template-columns:1fr}.login-story{padding:24px;background:#fff;min-height:auto}.story-copy,.poster-stack,.story-foot{display:none}.login-form-wrap{padding:36px 24px}.app-header{height:68px;padding:0 16px;gap:18px}.brand{font-size:24px}.brand-cn{font-size:15px}.brand-mark{width:24px;height:24px}.brand-mark:after{left:7px;top:4px}.app-header nav{gap:12px}.nav-button{font-size:12px}.account-button{font-size:11px;padding:0}.library-view,.works-view{padding:28px 20px}.library-intro{align-items:flex-start;flex-direction:column;gap:18px}.level-tabs{gap:0;width:100%;justify-content:space-between}.level-tabs button{padding:14px 8px;gap:5px;font-size:15px}.level-tabs button span{font-size:11px}.catalog-heading h2{font-size:15px}.catalog-grid{gap:24px 14px;grid-template-columns:repeat(2,minmax(0,1fr))}.anime-card h3{font-size:18px}.anime-art{aspect-ratio:3/4}.anime-card p{font-size:12px}.availability{font-size:11px;bottom:8px;left:8px;padding:5px}.study-view{height:calc(100dvh - 68px);padding:0 14px}.study-title{gap:6px;padding:8px 0;min-height:54px}.study-title h1{font-size:14px}.study-title .outline{font-size:11px;padding:6px 10px}.study-title .text-button{font-size:11px}.video-frame{height:auto;width:100%;max-height:26dvh}.study-toolbar{gap:0}.play-controls{flex-basis:100%;flex-wrap:wrap}.text-controls{width:100%;justify-content:flex-end}.caption-state{font-size:11px;max-height:45px;overflow:auto}.sentence{padding:13px 8px}.sentence-top{gap:9px}.sentence-text{font-size:21px;line-height:2.05}.sentence-time{width:35px}.romaji,.sentence-actions{margin-left:44px}.record-dock{gap:8px;padding:10px 0}.record-dock .outline{padding:8px;font-size:11px}.record-context p{max-height:30px;overflow:hidden}.record-button{min-width:86px;padding:10px;font-size:12px}.explanation{position:fixed;bottom:0;left:0;right:0;height:60dvh;z-index:10;border-radius:16px 16px 0 0;box-shadow:0 -8px 30px #17212d20;padding:22px}.work-row{gap:12px;flex-wrap:wrap}.work-row h2{font-size:16px}.work-row>button{font-size:12px}.inline-form{flex-wrap:wrap}.inline-form input{flex-basis:100%}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
.login-banner{display:flex;align-items:center;justify-content:space-between;background:var(--blue-soft);color:#1948b0;padding:10px 16px;border-radius:10px;font-size:13px;margin-bottom:26px;gap:12px}.login-banner .text-button{color:var(--blue);white-space:nowrap}#me-view .login-view{min-height:calc(100dvh - 80px)}.profile-panel{max-width:720px;margin:70px auto;padding:30px}.profile-panel .outline{margin-top:28px}@media(max-width:700px){.app-header{gap:12px}.app-header nav{gap:10px}.account-button{display:none}.login-banner{font-size:11px;padding:8px 12px}.login-banner .text-button{font-size:11px}#me-view .login-view{min-height:calc(100dvh - 68px)}}
.speed-label{font-size:12px;color:var(--muted);margin-left:6px}.pinned-line{font-size:20px;line-height:1.8;padding:12px 16px;background:var(--blue-soft);border-radius:8px;margin:0 0 10px;max-height:90px;overflow:auto}.sentence.playing{background:#edf4ff}.timed-word{border-radius:4px;padding:1px 0;transition:background .12s,color .12s}.timed-word.word-active{background:#225ad5;color:#fff}.timed-word.word-active rt{color:#fff}.sentence-text ruby{cursor:pointer}.sentence-text ruby:hover{background:#dce8ff}

.level-bar{padding-bottom:2px}.sentence-actions button{min-height:44px}.sentence-text{outline-offset:4px}
#play-toggle{width:auto;gap:4px;padding:0 8px;font-size:12px}.episode-row .episode-action{min-width:60px}.availability{max-width:calc(100% - 24px)}
@media(min-width:701px){.catalog-grid{grid-template-columns:repeat(auto-fit,minmax(230px,1fr))}}
/* Focused reader: video, script, then the five learning controls. */
body.studying .app-header{display:none}.study-view{height:100dvh;max-width:1024px;padding:0 28px}.study-title{min-height:78px;gap:14px;padding:10px 0}.study-heading{flex:1;min-width:0}.study-title h1{font-size:19px;font-weight:650}.study-heading p{font-size:13px;color:var(--muted);margin:5px 0 0}.study-title>.icon-button{color:var(--muted)}.video-section{flex-shrink:0}.video-frame{height:clamp(168px,27dvh,330px);margin:0 auto;border-radius:8px;max-width:100%}.video-detail{padding:8px 0}.caption-state{padding:7px 0 10px;flex-shrink:0}.reading-layout{padding-top:4px}.transcript{padding:0 0 24px;overscroll-behavior:contain;scroll-behavior:auto;scrollbar-width:thin}.sentence{padding:22px 18px;border:0;border-radius:12px;margin-bottom:10px;min-height:100px;transition:background .16s}.sentence-top{display:block;position:relative}.sentence-time{position:absolute;top:0;left:0;font-size:11px;color:var(--muted);width:auto;min-height:20px;opacity:0;pointer-events:none}.sentence:focus-within .sentence-time{opacity:1;pointer-events:auto;top:-18px}.sentence-text{display:block;width:100%;text-align:left;font-size:28px;line-height:2.2;font-weight:600;letter-spacing:.02em;padding:0;border-radius:0}.sentence-text:hover:not(:disabled){background:transparent}.sentence.selected,.sentence.playing{background:#f0f5ff}.sentence-text ruby{margin-right:3px}.sentence-text rt{font-size:13px;line-height:1.4;font-weight:400;color:var(--muted);letter-spacing:0}.timed-word{display:inline-block;position:relative;margin-right:5px;padding:0 3px;border-radius:5px;line-height:1.5}.word-active{outline:2px solid var(--blue);background:#e4edff!important;color:var(--ink)!important}.pos-noun{box-shadow:inset 0 -5px #dbe8ff}.pos-verb{box-shadow:inset 0 -5px #e7dcfa}.pos-particle{box-shadow:inset 0 -5px #d5eee9}.pos-adjective{box-shadow:inset 0 -5px #f8e0e8}.romaji{margin:8px 0 0;font-size:14px;line-height:1.8;color:var(--muted);letter-spacing:.02em}.sentence-translation{font-size:18px;line-height:1.7;margin:10px 0 0;font-weight:400}.sentence-actions{display:none}.study-bottom{flex-shrink:0;background:#fff;border-top:1px solid var(--line);padding:8px 0 max(12px,env(safe-area-inset-bottom))}.progress-row{display:flex;align-items:center;gap:14px;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}.progress-row input{flex:1;width:0;min-height:30px;padding:0;border:0;cursor:pointer}.study-toolbar{flex-wrap:nowrap;border:0;padding:4px 0;gap:20px}.play-controls{flex:1;justify-content:space-around;gap:8px}.tool-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-width:62px;min-height:70px;font-size:14px;padding:8px 10px;border-radius:10px;white-space:nowrap;flex-shrink:0}.tool-button svg,.echo-button svg{width:25px;height:25px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.tool-button[aria-pressed=true]{background:var(--blue-soft);color:var(--blue)}.echo-button{display:flex;align-items:center;justify-content:center;flex-shrink:0;background:var(--blue);color:#fff;width:70px;height:70px;border-radius:18px}.echo-button:hover:not(:disabled){background:#1948b0}.echo-button[aria-expanded=true]{background:#1948b0}.record-dock{display:block;border-top:1px solid var(--line);padding:12px 0 0}.record-context{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.record-context #record-label{flex:1;min-width:180px;font-size:13px;line-height:1.7;max-height:44px;overflow:hidden}.record-context p{order:3;width:100%;font-size:12px;margin:0}.record-context #record-count{font-size:12px;margin:0}.echo-navigation{float:right;display:flex;margin-top:6px}.echo-actions{display:flex;gap:10px;padding-top:12px;flex-wrap:wrap}.echo-actions button{font-size:13px}.record-button{min-width:104px}.record-button.recording{background:var(--red)}.sheet-backdrop{position:fixed;inset:0;background:#17212d35;z-index:25}.explanation{position:fixed;bottom:0;left:50%;right:auto;transform:translateX(-50%);width:min(720px,100%);height:min(68dvh,760px);border-radius:24px 24px 0 0;z-index:26;background:#fff;box-shadow:0 -8px 32px #17212d15;padding:14px 28px 28px;overflow:auto}.sheet-handle{width:44px;height:5px;border-radius:4px;background:#bec6d1;margin:0 auto 20px}.explanation-heading{display:flex;align-items:center;justify-content:space-between}.explanation-heading h2{font-size:17px;color:var(--muted);margin:0}.explanation #explain-original{background:var(--blue-soft);border-radius:14px;padding:20px;font-size:22px;line-height:1.9;margin:16px 0 24px}.explain-content{font-size:17px;line-height:1.9;white-space:pre-wrap}.settings-sheet{position:fixed;inset:auto 0 0;margin:0 auto;width:min(620px,100%);max-height:85dvh;border:0;border-radius:24px 24px 0 0;padding:16px 28px 26px;box-shadow:0 -8px 32px #17212d15;overflow:auto}.settings-sheet::backdrop{background:#17212d35}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:20px 0;font-size:14px}.settings-row input{width:110px}.settings-row select{max-width:240px}.setting-toggles{display:flex;gap:8px;flex-wrap:wrap;margin-top:20px}.setting-toggles button{font-size:13px}.setting-toggles button[aria-pressed=true]{background:var(--blue-soft);color:var(--blue);border-color:#b8cdf7}.subtitle-import-label{display:block;font-weight:600;font-size:14px;margin:24px 0 12px}#subtitle-file{width:100%;font-size:13px}.source-empty{padding:30px 22px;line-height:1.8;max-width:600px;margin:16px auto;background:var(--surface);border-radius:14px}.source-empty h2{font-size:21px;margin-bottom:12px}.source-empty p{font-size:14px;color:var(--muted)}.source-empty button{display:block;margin:18px 0 10px}.source-empty a{font-size:13px}.explanation-heading button{flex-shrink:0}body.studying{overflow:hidden}
@media(max-width:700px){.study-view{padding:0 14px;height:100dvh}.study-title{min-height:68px;gap:5px}.study-title h1{font-size:15px}.study-heading p{font-size:11px}.study-title>.icon-button{width:38px;min-width:38px}.video-frame{height:auto;width:100%;max-height:25dvh}.video-detail{font-size:11px;padding:7px 0}.caption-state{font-size:11px;max-height:44px;overflow:auto}.reading-layout{padding-top:0}.sentence{padding:18px 10px;margin-bottom:4px}.sentence-text{font-size:25px;line-height:2.3}.sentence-text rt{font-size:12px}.timed-word{margin-right:3px}.romaji{font-size:12px}.sentence-translation{font-size:16px}.study-toolbar{gap:6px}.play-controls{flex-basis:auto;flex-wrap:nowrap;gap:0;justify-content:space-between}.tool-button{min-width:45px;min-height:64px;padding:7px 5px;font-size:12px;gap:5px}.tool-button svg{width:23px;height:23px}.echo-button{width:54px;height:60px;border-radius:15px}.progress-row{font-size:11px;gap:10px}.record-context{gap:6px}.record-context #record-label{min-width:200px}.echo-actions{gap:6px;padding-top:8px}.echo-actions button{padding:8px 10px;min-width:0;font-size:12px}.echo-navigation{margin-top:0}.echo-navigation button{width:36px;min-height:36px;height:36px}.explanation{padding:14px 20px 24px;height:70dvh}.explanation #explain-original{font-size:19px;padding:16px}.explain-content{font-size:15px}.settings-sheet{padding:14px 20px 24px}.source-empty{padding:22px 18px;margin:8px 0}.source-empty h2{font-size:18px}.source-empty p{font-size:13px}.study-bottom{padding-bottom:max(8px,env(safe-area-inset-bottom))}}
@media(max-height:700px) and (min-width:701px){.video-frame{height:24dvh}.study-title{min-height:62px}.tool-button{min-height:58px}.echo-button{height:58px;width:62px}.sentence{padding:14px 18px}.record-dock{padding-top:8px}}
/* Each lexical unit keeps its own reading and romaji underneath. */
.sentence{padding:19px 16px;min-height:110px}.sentence-text{font-size:23px;line-height:1.7;font-weight:550;display:block;letter-spacing:0}.study-word{display:inline-flex;flex-direction:column;align-items:center;vertical-align:top;margin:5px 8px 6px 0;padding:3px 4px;line-height:1.35;border-radius:5px;box-shadow:none;min-width:1em}.word-reading{font-size:11px;line-height:1.4;height:16px;font-weight:400;color:var(--muted);white-space:nowrap}.word-surface{font-size:23px;line-height:1.5;white-space:nowrap;display:block}.word-romaji{font-size:12px;font-weight:400;line-height:1.5;min-height:18px;color:var(--muted);white-space:nowrap;display:block;margin-top:3px}.study-word.pos-noun .word-surface{box-shadow:inset 0 -4px #dbe8ff}.study-word.pos-verb .word-surface{box-shadow:inset 0 -4px #e7dcfa}.study-word.pos-particle .word-surface{box-shadow:inset 0 -4px #d5eee9}.study-word.pos-adjective .word-surface{box-shadow:inset 0 -4px #f8e0e8}.sentence-translation{font-size:16px;line-height:1.75;margin:10px 0 0}.translation-pending{font-size:12px;color:var(--muted)}
@media(max-width:700px){.sentence{padding:16px 10px}.sentence-text,.word-surface{font-size:20px}.study-word{margin:4px 5px 5px 0;padding:3px}.word-reading{font-size:11px;height:15px}.word-romaji{font-size:11px;min-height:16px}.sentence-translation{font-size:15px}.translation-pending{font-size:11px}}

.sentence-speaker{font-size:11px;color:var(--muted);margin:0 0 6px;font-weight:500}

.explanation{top:auto;margin:0;border:0;max-width:100%;max-height:80dvh;color:var(--ink)}.explanation::backdrop{background:#17212d35}

/* Phone reader: reserve the middle of the screen for dialogue. */
@media(max-width:700px){
 .study-view{padding:0 10px}
 .study-title{min-height:58px;padding:4px 0}
 .study-title>.icon-button{width:44px;min-width:44px}
 .video-frame{height:min(22dvh,190px);max-height:none}
 .video-detail{padding:4px 0}
 .caption-state{padding:3px 0 6px}
 .sentence{min-height:0;padding:10px 8px;margin-bottom:3px}
 .study-word{margin:2px 4px 3px 0;padding:2px}
 .sentence-speaker{margin-bottom:2px}
 .sentence-translation{margin-top:6px;line-height:1.65}
 .study-bottom{padding-top:3px}
 .study-toolbar{padding:0;gap:4px}
 .tool-button{min-height:52px;padding:4px 2px;gap:3px}
 .tool-button svg{width:20px;height:20px}
 .echo-button{width:48px;height:48px;border-radius:13px}
 .record-dock{display:grid;grid-template-columns:minmax(0,1fr) 88px;gap:4px 6px;padding:6px 0 0}
 .record-context{display:block;min-width:0}
 .record-context #record-label{display:block;min-width:0;max-height:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:20px}
 .record-context #record-count{display:none}
 .record-context #record-status{font-size:11px;line-height:16px;max-height:32px;margin:0}
 .echo-navigation{float:none;margin:0;align-self:start}
 .echo-navigation button{width:44px;min-height:44px;height:44px}
 .echo-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding-top:0;gap:6px}
 .echo-actions button{min-height:44px;padding:6px 2px;font-size:12px}
}

/* Loaded scripts leave the reading space to dialogue. */
.caption-state:empty{display:none}
