:root{--bg:#f7f9fd;--paper:#fff;--ink:#152238;--muted:#64748b;--line:#e7ecf3;--accent:#4568df;--accent-soft:#f3f6ff;--accent-ink:#3656ce;--green:#26735e;--font:20px;--reader-leading:1.9;--nav:76px;color-scheme:light;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}*{box-sizing:border-box}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:.48;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--ui-focus,#3155d5);outline-offset:4px}a{color:inherit;text-decoration:none}h1,h2,h3,p{margin:0}h1{font-size:clamp(28px,4vw,40px);font-weight:650;letter-spacing:-.04em;line-height:1.3}h2{font-size:22px;letter-spacing:-.025em;font-weight:650}h3{font-size:16px}p{line-height:1.8}.icon{width:22px;height:22px;flex-shrink:0;vertical-align:middle}.skip{position:fixed;left:10px;top:-100px;z-index:50;background:var(--accent);padding:12px}.skip:focus{top:10px}.loading{padding:48px}.brand{display:flex;align-items:center;gap:12px;font-size:15px;font-weight:650;letter-spacing:-.025em}.brand img{width:36px;height:36px}.app-layout{display:grid;grid-template-columns:228px minmax(0,1fr);height:100dvh;overflow:hidden}.sidebar{border-right:1px solid var(--line);padding:32px 22px 24px;display:flex;flex-direction:column;background:#ffffff}.nav-items{display:grid;gap:8px;margin-top:54px}.nav-item{display:flex;align-items:center;gap:14px;padding:14px;border-radius:9px;font-size:14px;min-height:50px;color:var(--muted);font-weight:550}.nav-item[aria-current=page]{background:var(--accent-soft);color:var(--ink)}.nav-item .icon{width:20px}.sidebar-bottom{margin-top:auto;display:grid;gap:18px;font-size:12px;color:var(--muted)}.local-status{display:flex;align-items:center;gap:8px;line-height:1.7}.dot{width:6px;height:6px;background:var(--green);border-radius:50%;display:inline-block}.main-shell{min-width:0;min-height:0;display:flex;flex-direction:column;position:relative}.topbar{height:84px;flex-shrink:0;padding:22px 42px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);background:var(--bg);z-index:3}.topbar .eyebrow{font-size:12px}.topbar-title{font-size:15px;font-weight:600}.toolbar-actions{display:flex;align-items:center;gap:8px}.page-scroll{overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable;flex:1;min-height:0;scroll-behavior:auto}.page{width:min(100%,1040px);margin:auto;padding:48px 48px 72px}.eyebrow{font-size:11px;font-weight:650;letter-spacing:.15em;color:var(--muted);text-transform:uppercase;line-height:1.6}.subtle{color:var(--muted);font-size:14px;line-height:1.8}.page-intro{margin-bottom:32px}.page-intro .eyebrow{margin-bottom:12px}.page-intro p{margin-top:10px}.primary,.secondary,.text-button,.danger{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:46px;padding:11px 18px;border-radius:8px;border:1px solid transparent;font-size:14px;line-height:1.5;font-weight:600}.primary{background:var(--accent);border-color:#3e5fd7;color:#fff}.primary:hover{background:#3656ce}.secondary{background:var(--paper);border-color:var(--line)}.secondary:hover{background:#f9fbff}.text-button{background:transparent;color:var(--muted);padding:10px}.danger{background:#fff4f0;color:#ae3d40;border-color:#f0cfd3}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border:0;background:transparent;border-radius:8px;flex-shrink:0}.icon-button:hover{background:var(--accent-soft)}.button-row{display:flex;gap:10px;flex-wrap:wrap}.continue-panel{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:30px;background:#ffffff;border:1px solid #e7ecf3;border-radius:12px;padding:30px;margin-bottom:32px}.continue-panel h2{font-family:Inter,"Segoe UI","Noto Sans JP",system-ui,sans-serif;font-size:30px;font-weight:500;margin:10px 0}.continue-panel .button-row{margin-top:24px}.home-grid{display:grid;grid-template-columns:1fr 1fr;gap:32px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.section-heading h2{font-size:17px}.role-box{display:flex;align-items:center;gap:16px;padding:20px 0;border-bottom:1px solid var(--line);margin-bottom:24px}.role-monogram{width:48px;height:48px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent-ink);border-radius:50%;font-family:Inter,"Segoe UI","Noto Sans JP",system-ui,sans-serif;font-size:24px;flex-shrink:0}.role-box label{display:block;font-size:11px;color:var(--muted);margin-bottom:5px}.role-select{border:0;background:transparent;font-size:15px;font-weight:650;padding:4px 24px 4px 0;max-width:100%}.progress-big{display:flex;align-items:baseline;gap:6px;margin-bottom:16px}.progress-big strong{font-size:42px;font-weight:500;letter-spacing:-.05em}.progress-big span{font-size:13px;color:var(--muted)}.progress-track{height:6px;border-radius:4px;background:#e5ebf4;overflow:hidden;display:flex;margin:10px 0 18px}.progress-track span{height:100%}.progress-legend{display:flex;gap:18px;font-size:12px;color:var(--muted);flex-wrap:wrap}.progress-legend i{width:7px;height:7px;border-radius:50%;display:inline-block;margin-right:6px}.scene-list{display:grid}.scene-link{padding:16px 0;display:flex;align-items:center;gap:14px;border-bottom:1px solid var(--line);background:transparent;border-width:0 0 1px;text-align:left;width:100%}.scene-number{width:32px;height:32px;border:1px solid var(--line);display:grid;place-items:center;font-family:Inter,"Segoe UI","Noto Sans JP",system-ui,sans-serif;color:var(--muted);border-radius:50%;flex-shrink:0}.scene-link-text{flex:1;display:grid;gap:4px}.scene-link strong{font-size:13px;font-weight:600}.scene-link small{font-size:11px;color:var(--muted)}.import-banner{border-top:1px solid var(--line);margin-top:40px;padding-top:24px;display:flex;gap:16px;align-items:center;justify-content:space-between}.import-banner h3{font-size:14px;margin-bottom:6px}.pill{border:1px solid var(--line);padding:4px 9px;border-radius:20px;font-size:11px;white-space:nowrap;display:inline-flex;align-items:center;gap:6px}.bottom-nav{display:none}.reader-top{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:20px 42px;border-bottom:1px solid var(--line);flex-wrap:wrap}.reader-heading{display:flex;align-items:center;gap:14px}.reader-heading h1{font-size:21px;font-family:Inter,"Segoe UI","Noto Sans JP",system-ui,sans-serif;font-weight:500;letter-spacing:-.02em}.reader-tools{display:flex;gap:6px}.reader-count{font-size:11px;color:var(--muted)}.reader-filter{display:flex;gap:14px;flex-wrap:wrap;padding:14px 42px;border-bottom:1px solid var(--line);background:#ffffff}.reader-filter label{display:grid;gap:5px;flex:1;min-width:100px;font-size:11px;color:var(--muted)}input,select{min-height:44px;max-width:100%;min-width:0;border:1px solid #dce4ef;border-radius:7px;padding:9px 11px;background:var(--paper);color:var(--ink);font-size:14px}input[type=range]{padding:0;accent-color:var(--accent-ink)}input[type=checkbox]{width:19px;height:19px;min-height:19px;accent-color:#986614}.search-field{flex:2!important;min-width:180px!important}.reader-scroll{position:relative;overflow-anchor:auto}.script-body{max-width:790px;margin:0 auto;padding:36px 48px 190px}.scene-divider{padding:32px 0 20px;display:flex;align-items:center;gap:16px;scroll-margin:30px}.scene-divider h2{font-size:12px;letter-spacing:.12em;color:var(--muted);font-weight:600;white-space:nowrap}.scene-divider:after{content:'';height:1px;background:var(--line);flex:1}.speech{position:relative;padding:20px 0 22px;contain-intrinsic-size:auto 180px;content-visibility:auto;scroll-margin-top:64px;border-left:2px solid transparent;touch-action:pan-y pinch-zoom}.speech-inner{position:relative;transition:transform .14s ease}.speech-head{display:flex;align-items:center;gap:12px;min-height:30px;margin-bottom:9px}.speaker{font-size:11px;letter-spacing:.12em;font-weight:750;color:#77756b}.speech.mine .speaker{color:var(--accent)}.speech-head .line-number{font-size:10px;color:#8c8980;letter-spacing:.03em}.speech-tools{display:flex;align-items:center;margin-left:auto;gap:2px}.speech-tools button{width:34px;height:34px;border:0;background:transparent;color:#878478;border-radius:6px}.speech-tools .icon{width:15px;height:15px}.speech-tools button[data-level="1"]{color:#985c22;background:var(--accent-soft)}.speech-tools button[data-level="2"]{color:#2f705d;background:#edf5ee}.speech-tools .is-review{color:#985c22;background:var(--accent-soft)}.speech-text{font-family:Inter,"Segoe UI","Noto Sans JP",system-ui,sans-serif;font-size:var(--font);line-height:var(--reader-leading);letter-spacing:.002em;overflow-wrap:anywhere}.word{font:inherit;color:inherit;background:none;padding:1px 0;border:0;display:inline;line-height:inherit;text-align:inherit;border-radius:2px;text-decoration:none;touch-action:pan-y pinch-zoom}.speech:not(.mine) .speech-text{color:#45443b}.direction{font-size:12px;font-style:normal;color:var(--muted);background:none;border:0;padding:4px 0;text-align:left;line-height:1.7;margin:6px 0}.speech.highlight{border-left-color:var(--accent);background:var(--accent-soft);border-radius:0 6px 6px 0}.swipe-hint{position:absolute;inset:0;display:flex;align-items:center;padding:10px;background:var(--accent-soft);color:var(--accent-ink);font-size:12px;opacity:0;pointer-events:none;border-radius:8px}.swipe-hint.left{justify-content:flex-end}.sheet{position:fixed;inset:auto 0 0;margin:0 auto;width:min(100%,740px);height:min(58dvh,600px);max-height:94dvh;max-width:100%;border:1px solid var(--line);border-bottom:0;border-radius:18px 18px 0 0;padding:0;background:var(--paper);color:var(--ink);box-shadow:0 -8px 40px #28210c18;overflow:hidden}.sheet[open]{display:flex;flex-direction:column;animation:sheet-in .18s ease-out}.sheet.expanded{height:90dvh}.sheet::backdrop{background:#27231b38}.sheet-head{padding:0 24px 8px;border-bottom:1px solid var(--line);touch-action:pan-x}.sheet-handle{display:block;width:100%;height:24px;background:none;border:0}.sheet-handle span{display:block;width:34px;height:4px;border-radius:3px;background:#d9d6cc;margin:auto}.sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.sheet-heading>div{display:flex}.sheet-heading h2{font-size:17px;overflow-wrap:anywhere}.sheet-body{padding:22px 28px calc(30px + env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;flex:1;min-height:0}.sheet-body p{font-size:14px;line-height:1.9}.sheet-section{margin-top:24px;padding-top:20px;border-top:1px solid var(--line)}.sheet-section h3{font-size:12px;color:var(--muted);margin-bottom:10px}.dictionary-word{font-family:Inter,"Segoe UI","Noto Sans JP",system-ui,sans-serif;font-size:30px;line-height:1.4;margin-bottom:8px}.dictionary-meta{font-size:12px;color:var(--muted);margin-bottom:18px}.meaning{font-size:18px!important;font-weight:600}.analysis-quote{font-family:Inter,"Segoe UI","Noto Sans JP",system-ui,sans-serif;color:var(--muted);font-size:17px!important;margin-bottom:16px}.grammar-item{margin:16px 0}.grammar-item strong{font-size:13px}.grammar-item p{font-size:13px}.setting-group{margin-bottom:32px}.setting-group h2{font-size:16px;margin-bottom:8px}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:80px;padding:16px 0;border-bottom:1px solid var(--line)}.setting-row label,.setting-row strong{font-size:14px;font-weight:550}.setting-row p{font-size:12px;color:var(--muted);margin-top:5px}.setting-row input[type=range]{width:160px}.setting-row select{max-width:180px}.notice{padding:14px 16px;border-radius:7px;background:var(--accent-soft);color:#725016;font-size:13px;line-height:1.8}.notice.error{background:#fff4f5;color:#ae3d40}.empty{padding:70px 20px;text-align:center}.empty-icon{color:#64748b;margin-bottom:20px}.empty-icon .icon{width:32px;height:32px}.empty h2{font-size:20px;margin-bottom:12px}.empty p{font-size:14px;color:var(--muted)}.mode-options{display:grid;gap:14px;margin:28px 0}.mode-option{display:flex;align-items:center;gap:18px;width:100%;padding:22px;text-align:left;border:1px solid var(--line);border-radius:10px;background:var(--paper)}.mode-option>.icon{width:28px;height:28px;color:var(--accent)}.mode-option>span{display:grid;gap:6px;flex:1}.mode-option strong{font-size:16px}.mode-option small{font-size:12px;color:var(--muted);line-height:1.7}.range-form{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:24px 0}.range-form label{font-size:12px;color:var(--muted);display:grid;gap:8px}.range-form .full{grid-column:1/-1}.session-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 28px;border-top:1px solid var(--line);background:var(--bg);flex-shrink:0;z-index:3}.session-controls .primary{min-width:160px}.session-controls .subtle{font-size:11px}.rehearsal .speech{opacity:1}.rehearsal .speech.current{opacity:1;border-left-color:var(--accent);background:var(--accent-soft);border-radius:0 8px 8px 0}.rehearsal .speech.previous{opacity:1}.rehearsal .speech.future .speech-text{color:#706d62}.reveal-mask{display:block;width:100%;min-height:70px;border:1px dashed #dce4ef;border-radius:7px;padding:15px;background:#f7f9fd;text-align:left;color:#64748b;font-family:inherit;font-size:14px;line-height:1.8}.reveal-mask:disabled{opacity:.8}.reveal-mask .icon{margin-right:8px}.audio-stage{display:flex;flex:1;min-height:0;overflow:auto;padding:40px 24px;align-items:center;justify-content:center;text-align:center}.audio-inner{width:min(100%,630px)}.audio-symbol{width:80px;height:80px;background:var(--accent-soft);border-radius:50%;margin:28px auto;display:grid;place-items:center;color:var(--accent)}.audio-symbol .icon{width:30px;height:30px}.audio-speaker{font-family:Inter,"Segoe UI","Noto Sans JP",system-ui,sans-serif;font-size:35px;font-weight:500;letter-spacing:-.03em;margin:16px 0}.audio-answer{font-family:Inter,"Segoe UI","Noto Sans JP",system-ui,sans-serif;font-size:clamp(22px,3vw,30px);line-height:1.75;text-align:left;margin:24px 0;overflow-wrap:anywhere}.audio-cue{margin:24px auto;max-width:460px}.audio-note{font-size:12px;color:var(--muted);line-height:1.7}.audio-stage .button-row{justify-content:center;margin:20px 0}.session-progress{height:3px;background:#ece8dc;flex-shrink:0}.session-progress span{display:block;height:100%;background:var(--accent)}.complete{padding:64px 24px;text-align:center}.complete>.icon{width:46px;height:46px;color:var(--green);margin-bottom:22px}.complete p{color:var(--muted);margin:14px 0 28px}.complete .button-row{justify-content:center}.keyboard-note{font-size:11px;color:var(--muted);margin-top:20px}.file-label{position:relative;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}#toast{position:fixed;left:50%;bottom:22px;transform:translate(-50%,15px);max-width:calc(100vw - 28px);width:max-content;border-radius:9px;background:#22314c;color:#fff;padding:13px 18px;font-size:13px;display:flex;gap:16px;align-items:center;opacity:0;pointer-events:none;transition:.16s;z-index:30;box-shadow:0 3px 16px #0002}#toast.show{opacity:1;transform:translate(-50%,0);pointer-events:auto}#toast button{border:0;background:none;color:#d9e1ff;font-size:13px;white-space:nowrap;min-height:32px}.save-error{position:fixed;inset:0 0 auto;z-index:40;background:#fff4f5;color:#ae3d40;padding:12px;text-align:center;border-bottom:1px solid #f0cfd3;font-size:13px}.save-error button{margin-left:10px}.form-stack{display:grid;gap:18px}.form-stack label{display:grid;gap:8px;font-size:13px}.data-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;padding:20px 0}.data-summary strong{font-size:28px;font-weight:500;display:block}.data-summary span{font-size:11px;color:var(--muted)}.version{font-size:11px;color:var(--muted);margin-top:36px}.hide{display:none!important}@keyframes sheet-in{from{transform:translateY(35px);opacity:.5}to{transform:translateY(0);opacity:1}}@media(min-width:1300px){.page{padding-top:60px}.home-grid{gap:60px}.script-body{padding-top:40px}}@media(max-width:1050px){.app-layout{grid-template-columns:180px minmax(0,1fr)}.sidebar{padding:28px 14px}.brand{font-size:13px;gap:7px}.brand img{width:30px;height:30px}.page{padding:36px 30px 60px}.topbar{padding:18px 30px}.home-grid{gap:24px}.continue-panel{padding:24px}.reader-top,.reader-filter{padding-left:28px;padding-right:28px}.script-body{padding-left:32px;padding-right:32px}}@media(max-width:700px){:root{--nav:68px}.app-layout{display:block;height:100dvh}.sidebar{display:none}.main-shell{height:calc(100dvh - var(--nav) - env(safe-area-inset-bottom))}.topbar{height:66px;padding:12px 20px}.topbar .desktop-only{display:none}.mobile-brand{display:flex!important}.topbar-title{font-size:14px}.bottom-nav{display:flex;position:fixed;bottom:0;left:0;right:0;height:calc(var(--nav) + env(safe-area-inset-bottom));padding:4px 8px env(safe-area-inset-bottom);border-top:1px solid var(--line);background:var(--bg);z-index:10;justify-content:space-around}.bottom-nav .nav-item{min-width:65px;min-height:60px;padding:9px 12px;display:flex;flex-direction:column;gap:4px;font-size:10px;border-radius:8px}.bottom-nav .nav-item[aria-current=page]{background:none;color:var(--accent)}.bottom-nav .nav-item[aria-current=page] .icon{stroke-width:2.2}.page{padding:30px 22px 48px}.page-intro{margin-bottom:26px}.page-intro p{font-size:13px}.continue-panel{grid-template-columns:minmax(0,1fr) auto;padding:22px 20px;gap:12px;margin-bottom:30px}.continue-panel h2{font-size:25px}.continue-panel .subtle{font-size:12px}.continue-panel .button-row{margin-top:20px}.continue-panel .primary,.continue-panel .secondary{font-size:12px;padding:10px 12px;gap:6px}.continue-panel .icon{width:17px}.home-grid{grid-template-columns:1fr;gap:32px}.home-grid .role-box{padding-top:0}.progress-big strong{font-size:36px}.import-banner{align-items:flex-start;flex-direction:column;gap:14px;margin-top:30px}.import-banner .secondary{font-size:12px}.reader-top{padding:14px 20px;gap:10px;flex-wrap:nowrap}.reader-heading h1{font-size:19px}.reader-heading{gap:10px;min-width:0}.reader-tools{gap:0}.reader-tools .icon-button{width:39px;height:40px}.reader-count{font-size:10px}.reader-filter{padding:12px 20px;gap:10px;max-height:40dvh;overflow:auto}.reader-filter label{min-width:calc(50% - 10px)}.search-field{min-width:100%!important}.script-body{padding:12px 23px 180px}.speech{padding:17px 0 20px}.speech-head{gap:10px;margin-bottom:7px}.speaker{font-size:10px;letter-spacing:.09em}.speech-head .line-number{font-size:9px}.speech-tools button{width:31px;height:31px}.speech-text{font-size:var(--font)}.scene-divider{padding-top:26px}.sheet{width:100%;height:60dvh}.sheet-head{padding:0 16px 7px}.sheet-body{padding:20px 22px calc(26px + env(safe-area-inset-bottom))}.sheet-heading h2{font-size:16px}.session-controls{padding:12px 16px;gap:8px}.session-controls .primary{min-width:128px;font-size:13px;padding:10px 13px}.session-controls .secondary{font-size:12px;padding:10px}.session-controls .subtle{display:none}.setting-row{gap:14px}.setting-row label,.setting-row strong{font-size:13px}.setting-row input[type=range]{width:120px}.setting-row .secondary{font-size:12px;padding:9px 12px}.audio-stage{padding:24px}.audio-speaker{font-size:30px}.audio-symbol{width:68px;height:68px;margin:22px auto}.audio-answer{font-size:23px}.mode-option{padding:20px 16px}.range-form{gap:12px}.keyboard-note{display:none}#toast{bottom:calc(var(--nav) + env(safe-area-inset-bottom) + 12px)}.rehearsal .script-body{padding-bottom:90px}}@media(max-width:360px){.page{padding:26px 16px}.continue-panel{grid-template-columns:1fr}.reader-tools .icon-button{width:34px}.reader-heading h1{font-size:17px}.topbar{padding:10px 16px}.script-body{padding-left:18px;padding-right:18px}.range-form{grid-template-columns:1fr}.range-form .full{grid-column:auto}.session-controls .primary{min-width:112px}.session-controls{padding:10px}.speaker{letter-spacing:.04em}.setting-row{flex-wrap:wrap}.sheet-body{padding-left:18px;padding-right:18px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}@media print{.sidebar,.bottom-nav,.topbar,.stick-dock,.speech-analysis{display:none!important}.app-layout,.main-shell,.page-scroll{height:auto;overflow:visible;display:block}.speech{content-visibility:visible}}
.mobile-brand{display:none}
.role-trigger{display:inline-flex;align-items:center;gap:10px;min-height:46px;max-width:240px;padding:7px 12px;border:1px solid var(--line);border-radius:8px;background:var(--accent-soft);text-align:left;flex-shrink:1}
.role-trigger>span{display:grid;min-width:0;gap:2px}.role-trigger small{font-size:10px;color:var(--accent-ink)}.role-trigger strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.role-trigger .icon{width:16px;height:16px}
.home-role-box{margin:0 0 24px;padding:18px 20px;border:1px solid #ded6c3;border-radius:10px;background:var(--paper)}.home-role-box label{font-size:14px;font-weight:600;color:var(--ink);margin-bottom:8px}.home-role-box .role-select{width:100%;border:1px solid var(--line);background:var(--accent-soft);padding:10px 12px;min-height:48px}
.role-choices{display:grid;grid-template-columns:1fr 1fr;gap:10px;border:0;padding:0;margin:0}.role-choices legend{font-size:13px;color:var(--muted);padding:0 0 16px}.role-choice{display:flex;gap:12px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:8px;min-height:64px;cursor:pointer}.role-choice:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}.role-choice input{flex-shrink:0;min-height:20px;width:20px;height:20px;accent-color:var(--accent-ink)}.role-choice>span{display:grid;gap:6px;min-width:0}.role-choice strong{font-size:13px;overflow-wrap:anywhere}.role-choice small{font-size:11px;color:var(--muted)}.role-confirm{position:sticky;bottom:-1px;background:var(--paper);padding:18px 0 0;margin-top:12px}.role-confirm .primary{width:100%}
@media(max-width:1050px){.topbar>.desktop-only{display:none}.topbar .toolbar-actions{margin-left:auto}}
@media(max-width:700px){.topbar .toolbar-actions{min-width:0;margin-left:auto}.role-trigger{max-width:calc(100vw - 144px)}.topbar .pill{display:none}.home-role-box{padding:16px}.role-choices{grid-template-columns:1fr}}
@media(max-width:480px){.topbar .mobile-brand span{display:none}}



/* ===== LUMINOUS MINIMALISM V2: unified visual system ===== */
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
:root{
 --bg:#f7f9fd;--paper:#fff;--ink:#152238;--muted:#64748b;--line:#e7ecf3;
 --accent:#4568df;--accent-soft:#f3f6ff;--accent-ink:#3656ce;--green:#26735e;
 --ui-canvas:#f7f9fd;--ui-surface:#fff;--ui-surface-raised:#fff;
 --ui-text:#152238;--ui-text-secondary:#64748b;--ui-text-tertiary:#66758a;
 --ui-line:#e7ecf3;--ui-accent:#4568df;--ui-accent-pressed:#3656ce;
 --ui-accent-wash:#f3f6ff;--ui-focus:#3155d5;--ui-success:#26735e;
 --ui-review:#985c22;--ui-danger:#ae3d40;
 --ui-shadow-0:none;
 --ui-shadow-1:0 2px 6px rgba(28,50,95,.045),0 8px 18px rgba(28,50,95,.055);
 --ui-shadow-2:0 6px 14px rgba(28,50,95,.07),0 20px 44px rgba(28,50,95,.09);
 --ui-shadow-3:0 12px 32px rgba(28,50,95,.12),0 34px 72px rgba(28,50,95,.10);
 --ui-specular:inset 0 1px 0 rgba(255,255,255,.94);
 --ui-ease:cubic-bezier(.22,1,.36,1);--nav:66px;
 color-scheme:light;font-family:Inter,"Segoe UI","Noto Sans JP",system-ui,sans-serif;
 color:var(--ink);background:var(--bg);font-synthesis:none
}
[hidden],.hide{display:none!important}
h1,h2,h3,p{font-family:inherit}
h1{font-weight:650;letter-spacing:-.035em;line-height:1.18}
h2{font-weight:650;letter-spacing:-.02em}
.eyebrow{font-size:12px;letter-spacing:0;font-weight:550}
.page-intro .eyebrow,.keyboard-note{display:none}
.page-intro p{margin-top:8px}
.subtle{color:var(--muted)}
.app-layout{grid-template-columns:186px minmax(0,1fr)}
.sidebar{background:#fff;padding:28px 16px 20px}
.brand{font-size:13px;line-height:1.2;gap:10px}
.brand img{width:29px;height:29px}
.nav-items{margin-top:44px;gap:5px}
.nav-item{min-height:46px;padding:12px 13px;border-radius:10px;font-size:13px}
.nav-item:hover{background:#f6f8fc;color:var(--ink)}
.nav-item[aria-current=page]{background:var(--accent-soft);color:var(--accent)}
.topbar{height:64px;padding:10px 32px;background:rgba(255,255,255,.96);border-color:var(--line)}
.topbar-title{font-size:13px}
.role-trigger{display:inline-flex;align-items:center;gap:6px;max-width:230px;min-height:40px;padding:7px 10px;border:0;background:none;border-radius:10px}
.role-trigger>span{display:flex;min-width:0;align-items:center;gap:8px}
.role-trigger small{font-size:11px;color:var(--muted);white-space:nowrap}
.role-trigger strong{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.role-trigger .icon{width:14px;height:14px}
.role-trigger:hover,.icon-button:hover{background:var(--accent-soft)}
.icon-button{border-radius:10px}
.icon-button .icon{width:19px;height:19px}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--ui-focus);outline-offset:3px}
.primary,.secondary,.danger{border-radius:13px;transition:transform .13s,box-shadow .13s,background .13s}
.primary{color:#fff;background:linear-gradient(180deg,#4568df,#3b5ddd);border:1px solid #3e5fd7;box-shadow:var(--ui-specular),var(--ui-shadow-1)}
.primary:hover{background:linear-gradient(180deg,#506fe4,#4161db);box-shadow:var(--ui-specular),var(--ui-shadow-2)}
.primary:active,.secondary:active{transform:translateY(1px);box-shadow:var(--ui-shadow-0)}
.secondary{background:#fff;border:1px solid #e7ecf5;box-shadow:var(--ui-specular),var(--ui-shadow-1)}
.secondary:hover{background:#f9fbff;box-shadow:var(--ui-specular),var(--ui-shadow-2)}
.text-button{border:0;background:none;color:var(--accent);border-radius:9px}
.text-button:hover{background:var(--accent-soft)}
.role-monogram,.scene-number{display:none}
.pill{background:transparent;border:0;padding:0;color:var(--muted)}
.page{max-width:1000px}
.app-layout[data-route=home] .topbar-title,
.app-layout[data-route=home] .topbar .role-trigger{display:none}
.app-layout[data-route=home] .page-scroll{background:radial-gradient(ellipse 300px 260px at 93% 8%,rgba(116,155,247,.10),transparent 78%),var(--bg)}
.home-page{max-width:720px;padding:64px 38px}
.home-heading{margin-bottom:40px}
.home-heading h1{font-family:inherit;font-weight:650;font-size:clamp(30px,4vw,40px);letter-spacing:-.035em}
.home-heading p{font-size:13px;color:var(--muted);margin-top:13px}
.home-role-row{display:flex;align-items:center;gap:20px;padding:14px 0;margin-bottom:26px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.home-role-row>label{font-size:13px;color:var(--muted);white-space:nowrap}
.role-select{font-size:14px;font-weight:600}
.home-role-row .role-select{margin-left:auto;max-width:75%;min-width:0;min-height:44px;padding:8px 28px 8px 10px;border:0;border-radius:10px;background:transparent;text-align:right;text-overflow:ellipsis}
.home-role-row .role-select:hover{background:var(--accent-soft)}
.home-actions{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:0 0 42px}
.home-actions button{min-height:56px;font-size:15px}
.home-actions .icon{width:19px;height:19px}
.home-progress{margin-bottom:34px}
.home-progress summary{list-style:none;display:flex;justify-content:space-between;gap:12px;min-height:42px;padding:4px 0;font-size:13px;color:var(--muted);cursor:pointer}
.home-progress summary::-webkit-details-marker{display:none}
.home-progress summary>span:last-child{color:var(--ink);font-weight:600;font-variant-numeric:tabular-nums}
.progress-track{height:4px;background:#e5ebf4}
.progress-legend{font-size:12px}
.home-scenes h2,.home-resume h2{font-size:14px;font-weight:600}
.home-scenes .scene-link,.home-resume .scene-link{min-height:54px;padding:16px 2px;background:transparent;border-bottom:1px solid var(--line)}
.home-scenes .scene-link strong,.home-resume .scene-link strong{font-size:13px;font-weight:550}
.scene-link:hover{background:rgb(var(--theme-accent-rgb) / .025)}
.home-resume{margin-top:32px}
.home-resume>h2{margin-bottom:12px}
.role-box,.home-role-box{display:flex;align-items:center;gap:16px;padding:16px 0;margin:22px 0 26px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:none}
.role-box .role-select{min-height:44px}
.role-choices{border:0;padding:0;margin:0;display:grid}
.role-choices legend{font-size:13px;color:var(--muted);margin-bottom:8px}
.role-choice{display:flex;align-items:center;min-height:54px;padding:12px 2px;border:0;border-bottom:1px solid var(--line);background:none;cursor:pointer}
.role-choice:has(input:checked){background:transparent;color:var(--accent)}
.role-choice:hover{background:rgb(var(--theme-accent-rgb) / .025)}
.role-choice input{accent-color:var(--accent);width:18px;height:18px;margin-right:13px}
.role-choice strong{font-size:15px;font-weight:550}
input,select{border-radius:12px;border:1px solid #dce4ef}
input[type=range],input[type=checkbox]{accent-color:var(--accent)}
.setting-row{border-color:var(--line)}
.setting-group h2{font-size:16px}
.app-layout[data-route=script] .topbar{display:none}
.reader-top{min-height:58px;padding:9px 30px;gap:12px;background:rgba(255,255,255,.96);border-bottom:1px solid var(--line);box-shadow:0 2px 12px rgba(28,50,95,.025)}
.reader-heading h1{font-family:inherit;font-size:20px;font-weight:650}
.reader-tools{gap:4px}
.reader-tools .icon-button{width:40px;height:40px}
.reader-role{display:inline-flex;align-items:center;gap:6px;max-width:210px;min-height:40px;padding:5px 9px;border:0;background:transparent;border-radius:9px;color:var(--muted);font-size:12px;font-weight:600;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.reader-role:hover{background:var(--accent-soft)}
.reader-role .icon{width:13px;height:13px}
.reader-filter{padding:16px 30px;background:#fff;border-bottom:1px solid var(--line)}
.script-body,.rehearsal .script-body{width:100%;max-width:none;padding:0 0 160px}
.scene-divider{padding:26px 36px 18px;margin:0;border-bottom:1px solid var(--line)}
.scene-divider:after{display:none}
.scene-divider h2{font-size:12px;letter-spacing:0}
.speech{position:relative;width:100%;margin:0;padding:0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:#fff;contain-intrinsic-size:auto 160px;content-visibility:auto;touch-action:pan-y pinch-zoom}
.speech-inner{padding:20px 36px 26px;border:0;transition:transform .14s var(--ui-ease)}
.speech.mine{background:#fff}
.speech-head{min-height:26px;margin-bottom:8px}
.speaker{font-size:12px;line-height:1.4;letter-spacing:0;font-weight:600;color:var(--muted)}
.speech.mine .speaker{color:var(--accent);font-weight:650}
.speech-analysis{margin-left:auto;min-width:40px;min-height:40px;background:transparent;border:0;border-radius:10px;color:#7f8da1}
.speech-analysis:hover,.speech-analysis:focus-visible{background:var(--accent-soft);color:var(--accent)}
.line-number{font-size:11px;color:var(--muted)}
.speech-text,.rehearsal .speech-text,.analysis-quote,.dictionary-word,.audio-speaker,.audio-answer{font-family:Inter,"Segoe UI","Noto Sans JP",system-ui,sans-serif!important}
.speech-text{font-weight:400;letter-spacing:0;line-height:var(--reader-leading);overflow-wrap:anywhere;max-width:92ch}
.speech:not(.mine) .speech-text{color:#28384b}
.word{font:inherit;background:transparent;border:0;padding:0;display:inline;color:inherit;border-radius:0;line-height:inherit}
.word,.word.phrase{text-decoration:underline dotted rgb(var(--theme-accent-rgb) / .75) 1.3px;text-underline-offset:.18em;text-decoration-skip-ink:none}
.word:hover,.word:focus-visible{color:var(--accent);background:rgb(var(--theme-accent-rgb) / .085);text-decoration-color:var(--accent)}
.word:active{background:rgb(var(--theme-accent-rgb) / .15)}
.direction{font-family:inherit;font-size:12px;line-height:1.55;color:var(--muted);margin:1px 0 8px;padding:2px 0;background:none;border:0}
.direction:hover{color:var(--ink)}
.speech.highlight,.rehearsal .speech.current{background:linear-gradient(90deg,rgb(var(--theme-accent-rgb) / .055),rgb(var(--theme-accent-rgb) / .005) 65%,transparent);border-radius:0}
.speech.highlight .speech-inner{box-shadow:inset 2px 0 0 var(--accent)}
.swipe-hint{border-radius:0;background:rgba(240,245,255,.94);color:var(--accent)}
.speech-status[data-level="1"] .level-state{background:#aa7936}
.speech-status[data-level="2"] .level-state{background:var(--ui-success)}
.review-state .icon{color:var(--ui-review)}
.sheet{border-radius:20px 20px 0 0;background:#fff;border-color:var(--line);box-shadow:var(--ui-shadow-3)}
.sheet[open]{animation:sheet-in .24s var(--ui-ease)}
.sheet::backdrop{background:rgba(20,32,58,.25)}
.sheet-head{border-color:var(--line)}
.sheet-handle span{background:#d9e1ed}
.sheet-section{border-color:var(--line)}
.dictionary-word{font-size:26px;font-weight:650}
.analysis-quote{color:var(--ink);font-size:18px!important}
.notice{background:var(--accent-soft);color:var(--ink);border-radius:12px}
.notice.error{background:#fff4f5;color:var(--ui-danger)}
.mode-options{display:grid;gap:0;margin:24px 0;border-top:1px solid var(--line)}
.mode-option{display:flex;align-items:center;gap:16px;width:100%;min-height:84px;padding:20px 2px;text-align:left;background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0}
.mode-option:hover{background:rgb(var(--theme-accent-rgb) / .025)}
.mode-option>.icon{width:21px;height:21px;color:var(--muted)}
.mode-option>.icon:last-child{width:17px;height:17px;margin-left:auto}
.mode-option strong{font-size:15px}
.mode-option small{font-size:12px}
.rehearsal .speech{padding:0;border:0;border-bottom:1px solid var(--line);background:#fff}
.rehearsal .speech.current{box-shadow:inset 2px 0 0 var(--accent)}
.rehearsal .speech-head,.rehearsal .line-content,.rehearsal .direction{margin-left:36px;margin-right:36px}
.rehearsal .speech-head{margin-top:20px}
.rehearsal .line-content{padding:0 0 25px}
.rehearsal .direction{margin-bottom:9px}
.rehearsal .speech.future .speech-text{color:#65758d}
.reveal-mask{width:100%;display:block;min-height:64px;padding:12px 0;text-align:left;color:var(--muted);border:0;border-bottom:1px dotted #c6d5f4;background:transparent;border-radius:0;font-size:14px;line-height:1.65}
.reveal-mask .icon{display:none}
.audio-stage{background:#fff}
.audio-symbol{display:none}
.audio-speaker{font-size:clamp(25px,3.5vw,36px);font-weight:650}
.audio-answer{font-size:clamp(20px,3vw,29px)}
.session-progress{background:#e6ebf5}
.session-progress span{background:var(--accent);transition:width .16s linear}
.session-controls{background:rgba(255,255,255,.97);border-top:1px solid var(--line);box-shadow:0 -5px 22px rgba(28,50,95,.045)}
.stick-dock{position:absolute;left:50%;bottom:max(22px,env(safe-area-inset-bottom));transform:translateX(-50%);width:62px;height:62px;padding:0;border:0;background:none;box-shadow:none;z-index:4;pointer-events:none}
.stick-base{width:62px;height:62px;min-height:0;border-radius:50%;border:1px solid rgba(255,255,255,.75);background:rgba(115,136,172,.22);box-shadow:0 6px 18px rgba(29,54,98,.09);padding:0;touch-action:none;cursor:grab;user-select:none;pointer-events:auto;transition:background .13s}
.stick-dock.active .stick-base{background:rgba(115,136,172,.38);cursor:grabbing}
.stick-base:hover{background:rgba(115,136,172,.3)}
#toast{background:rgba(34,49,76,.72);border:1px solid rgba(255,255,255,.13);border-radius:12px;box-shadow:0 6px 20px rgba(15,23,42,.14);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
#toast button{color:#d9e1ff}
@keyframes sheet-in{from{transform:translateY(26px);opacity:.6}to{transform:translateY(0);opacity:1}}
@media(min-width:1300px){.home-page{padding-top:76px}}
@media(max-width:1050px){
 .app-layout{grid-template-columns:164px minmax(0,1fr)}
 .home-page{padding:46px 32px}
 .topbar{padding-left:22px;padding-right:22px}
 .reader-top,.reader-filter{padding-left:22px;padding-right:22px}
 .speech-inner,.scene-divider{padding-left:28px;padding-right:28px}
 .rehearsal .speech-head,.rehearsal .line-content,.rehearsal .direction{margin-left:28px;margin-right:28px}
}
@media(max-width:700px){
 :root{--nav:65px}
 .app-layout{display:flex;flex-direction:column;height:100dvh;padding-bottom:calc(var(--nav) + env(safe-area-inset-bottom))}
 .sidebar{display:none}
 .main-shell{flex:1;min-height:0;height:auto}
 .topbar{height:58px;min-height:58px;padding:8px 19px}
 .topbar-title,.topbar .desktop-only{display:none}
 .mobile-brand{display:flex}
 .mobile-brand span{font-size:13px}
 .bottom-nav{display:flex;position:fixed;bottom:0;left:0;right:0;height:calc(var(--nav) + env(safe-area-inset-bottom));padding:4px 6px env(safe-area-inset-bottom);background:rgba(255,255,255,.98);border-top:1px solid var(--line);box-shadow:0 -5px 18px rgba(28,50,95,.035)}
 .bottom-nav .nav-item{min-width:65px;min-height:56px;display:flex;flex-direction:column;justify-content:center;gap:4px;padding:7px 11px;font-size:10px;color:var(--muted)}
 .bottom-nav .nav-item[aria-current=page]{background:none;color:var(--accent)}
 .home-page{padding:40px 22px 44px}
 .home-heading h1{font-size:32px}
 .home-heading p{font-size:12px}
 .home-actions{grid-template-columns:1fr;gap:12px;margin-bottom:32px}
 .home-actions button{width:100%;min-height:54px}
 .home-progress{margin-bottom:26px}
 .reader-top{min-height:58px;padding:8px 13px;gap:7px;flex-wrap:nowrap}
 .reader-heading h1{font-size:18px}
 .reader-heading .reader-count{display:none}
 .reader-tools{gap:0}
 .reader-tools .icon-button{width:36px;height:40px}
 .reader-role{max-width:120px;padding:5px;min-height:40px;font-size:12px}
 .reader-filter{padding:14px 18px}
 .script-body{padding:0 0 145px}
 .scene-divider{padding:21px 20px 15px}
 .speech-inner{padding:18px 20px 22px}
 .speech-head{min-height:24px;margin-bottom:5px}
 .speaker{font-size:11px}
 .speech-analysis{min-width:40px;min-height:36px}
 .direction{font-size:11.5px;margin-bottom:7px}
 .rehearsal .speech-head,.rehearsal .line-content,.rehearsal .direction{margin-left:20px;margin-right:20px}
 .rehearsal .speech-head{margin-top:18px}
 .rehearsal .line-content{padding-bottom:22px}
 .sheet{width:100%;height:min(62dvh,600px)}
 .session-controls{padding:12px 13px}
 .session-controls .subtle{display:none}
 .session-controls .primary{min-width:0}
 .session-controls .secondary{padding:10px 12px}
 .stick-dock{bottom:20px}
 #toast{bottom:calc(var(--nav) + 14px + env(safe-area-inset-bottom))}
}
@media(max-width:360px){
 .home-heading h1{font-size:29px}
 .reader-top{padding:8px 9px;gap:4px}
 .reader-tools .icon-button{width:33px}
 .reader-role{max-width:96px;font-size:11px}
 .speech-inner{padding-left:17px;padding-right:17px}
 .scene-divider{padding-left:17px;padding-right:17px}
 .rehearsal .speech-head,.rehearsal .line-content,.rehearsal .direction{margin-left:17px;margin-right:17px}
 .session-controls{gap:8px;padding-left:10px;padding-right:10px}
 .session-controls .primary,.session-controls .secondary{padding-left:9px;padding-right:9px;font-size:12px}
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}


/* ===== In-app controls (no Android/browser stock dropdowns or toggles) ===== */
.app-select{display:inline-flex;align-items:stretch;position:relative;min-width:0;max-width:100%;vertical-align:middle}
.app-select .native-select-source{display:none!important}
.app-select-trigger{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;width:100%;min-width:0;padding:10px 13px;border:1px solid #dce4ef;border-radius:12px;background:linear-gradient(180deg,#fff,#fdfefe);color:var(--ink);text-align:left;font-size:14px;font-weight:550;box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 2px 8px rgba(28,50,95,.035);transition:border-color .15s,box-shadow .15s,background .15s}
.app-select-trigger:hover{background:#f9fbff;border-color:#bac9e4}
.app-select-trigger:active{background:var(--accent-soft);box-shadow:none}
.app-select-trigger:focus-visible{outline:2px solid var(--ui-focus);outline-offset:2px}
.app-select-trigger .icon{width:15px;height:15px;color:var(--muted)}
.app-select-value{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.app-select-trigger[aria-disabled=true]{opacity:.5;pointer-events:none}
.home-role-row .app-select{margin-left:auto;max-width:75%;justify-content:end}
.home-role-row .app-select-trigger{border:0;background:transparent;box-shadow:none;text-align:right;padding-right:5px;justify-content:end}
.home-role-row .app-select-value{font-weight:600}
.home-role-row .app-select-trigger:hover{background:var(--accent-soft)}
.role-box .app-select{width:100%}
.reader-filter .app-select{width:100%}
.reader-filter .app-select-trigger{font-size:13px}
.range-form .app-select{width:100%}
.setting-row .app-select{min-width:138px}
.app-choice-list{display:grid}
.app-choice{display:flex;align-items:center;justify-content:space-between;gap:18px;width:100%;min-height:55px;padding:12px 4px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:#fff;color:var(--ink);text-align:left;font-size:15px;font-weight:500}
.app-choice:last-child{border-bottom:0}
.app-choice:hover,.app-choice:focus-visible{background:#f5f7ff}
.app-choice[aria-current=true]{color:var(--accent);font-weight:600}
.app-choice .icon{width:19px;height:19px;color:var(--accent)}
.sheet:not(.expanded):has(.app-choice-list){height:auto;max-height:80dvh}
.sheet:has(.app-choice-list) .sheet-body{padding-top:8px;padding-bottom:calc(20px + env(safe-area-inset-bottom));max-height:65dvh}
.sheet-head{touch-action:none;user-select:none}
.sheet-handle{touch-action:none}
.sheet-body{overscroll-behavior-y:contain}
.sheet[open]{will-change:transform}
.role-choice{position:relative}
.role-choice input[type=radio]{appearance:none;-webkit-appearance:none;position:absolute;width:1px;height:1px;min-height:1px;padding:0;border:0;margin:0;opacity:0;pointer-events:none}
.role-choice:has(input:checked)::after{content:"✓";font-size:18px;color:var(--accent);margin-left:auto}
.role-choice:focus-within{outline:2px solid var(--ui-focus);outline-offset:2px;border-radius:8px}
input[type=checkbox]:not(.native-select-source){appearance:none;-webkit-appearance:none;width:43px;height:26px;min-height:26px;flex:0 0 43px;margin:0;padding:0;border:1px solid #cad4e3;border-radius:999px;background:#dce4ee;position:relative;cursor:pointer;transition:background .16s,border-color .16s}
input[type=checkbox]::before{content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(27,48,81,.16);transition:transform .16s}
input[type=checkbox]:checked{background:var(--accent);border-color:var(--accent)}
input[type=checkbox]:checked::before{transform:translateX(17px)}
input[type=range]{appearance:none;-webkit-appearance:none;width:160px;min-height:30px;height:30px;border:0;background:transparent;padding:0;cursor:pointer}
input[type=range]::-webkit-slider-runnable-track{height:5px;background:#e1e8f5;border-radius:10px}
input[type=range]::-moz-range-track{height:5px;background:#e1e8f5;border-radius:10px}
input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:20px;height:20px;border:4px solid #fff;border-radius:50%;margin-top:-7.5px;background:var(--accent);box-shadow:0 2px 7px rgba(32,58,110,.22),0 0 0 1px #d6e0f4}
input[type=range]::-moz-range-thumb{width:13px;height:13px;border:4px solid #fff;border-radius:50%;background:var(--accent);box-shadow:0 2px 7px rgba(32,58,110,.22)}
input[type=number]{appearance:textfield;-moz-appearance:textfield}
input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}
@media(max-width:700px){
 .app-select-trigger{min-height:46px}
 .reader-filter .app-select,.range-form .app-select{width:100%}
 .home-role-row .app-select{max-width:70%}
 .setting-row .app-select{min-width:110px;max-width:52%}
}
@media(prefers-reduced-motion:reduce){
 .app-select-trigger,input[type=checkbox],input[type=checkbox]::before{transition:none}
}


/* ===== Settings cleanup & interaction motion ===== */
.settings-page{width:min(100%,680px);max-width:680px;padding:54px 36px 80px}
.settings-page .page-intro{margin-bottom:43px}
.settings-page h1{font-size:clamp(29px,3vw,36px);letter-spacing:-.035em}
.settings-page .setting-group{margin-bottom:40px}
.settings-page .setting-group h2{margin-bottom:11px;font-size:12px;letter-spacing:.015em;font-weight:650;color:var(--muted)}
.settings-page .setting-row{min-height:68px;padding:13px 0;gap:18px;border-color:var(--line)}
.settings-page .setting-row label{font-size:14px;color:var(--ink);font-weight:550}
.settings-page .app-select{width:min(164px,48%)}
.settings-page .app-select-trigger{border:0;box-shadow:none;background:transparent;justify-content:flex-end;text-align:right;padding:8px 5px 8px 12px}
.settings-page .app-select-trigger:hover{background:var(--accent-soft)}
.settings-page .setting-control{display:flex;align-items:center;gap:16px}
.settings-page .setting-control output{font-size:12px;min-width:38px;text-align:right;color:var(--muted);font-variant-numeric:tabular-nums}
.settings-page .setting-control input[type=range]{width:154px}
.setting-link,.management-action{display:flex;justify-content:space-between;align-items:center;gap:16px;width:100%;min-height:59px;padding:15px 0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;text-align:left;font-size:14px;font-weight:550;color:var(--ink);transition:color .16s var(--ui-ease),background-color .16s var(--ui-ease)}
.setting-link .icon,.management-action .icon{width:17px;height:17px;color:#8291a8;transition:transform .22s var(--ui-ease),color .16s var(--ui-ease)}
.setting-link:hover,.management-action:hover{color:var(--accent)}
.setting-link:hover .icon,.management-action:hover .icon{transform:translateX(4px);color:var(--accent)}
.setting-manage{border-top:1px solid var(--line);font-weight:600}
.management-list{display:grid}
.management-action{min-height:58px}
.management-action:first-child{padding-top:8px}
.management-note{margin-top:20px;font-size:12px!important;line-height:1.65;color:var(--muted)}
.import-hint{font-size:13px!important;color:var(--muted)}
.import-select{margin:24px 0 0}
.import-select .primary{min-height:50px}
#sheet #import-result:empty{display:none}
#sheet #import-result:not(:empty){margin-top:20px}
.app-layout[data-route=home] .topbar{display:none}
.toolbar-actions{margin-left:auto}
/* Motion has an intentional visual hierarchy: routes, sheets, press states, content feedback. */
:root{--motion-quick:130ms;--motion-standard:210ms;--motion-sheet:260ms}
.page-scroll>.page{animation:page-enter .22s var(--ui-ease) both}
.reader-top{animation:toolbar-enter .2s var(--ui-ease) both}
@keyframes page-enter{from{opacity:.62;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}
@keyframes toolbar-enter{from{opacity:.55;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
@keyframes choice-enter{from{opacity:.45;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@keyframes tab-enter{from{opacity:.6;transform:scale(.9)}to{opacity:1;transform:scale(1)}}
@keyframes content-reveal{from{opacity:.4;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@keyframes backdrop-enter{from{background:rgba(20,32,58,0)}to{background:rgba(20,32,58,.25)}}
.primary,.secondary,.mode-option,.scene-link,.icon-button,.nav-item,.app-select-trigger,.app-choice,.reveal-mask{
 transition:transform .17s var(--ui-ease),box-shadow .17s var(--ui-ease),background-color .17s var(--ui-ease),color .17s var(--ui-ease),border-color .17s var(--ui-ease)
}
.primary:active,.secondary:active,.mode-option:active,.app-select-trigger:active,.app-choice:active{
 transform:translateY(1px) scale(.985)
}
.icon-button:active{transform:scale(.91)}
.scene-link:active,.setting-link:active,.management-action:active{background:rgb(var(--theme-accent-rgb) / .045)}
.nav-item[aria-current=page] .icon{animation:tab-enter .19s var(--ui-ease) both}
.app-select-trigger[aria-expanded=true]{background:var(--accent-soft);color:var(--accent);border-color:#bac9e4}
.app-select-trigger .icon{transition:transform .21s var(--ui-ease)}
.app-select-trigger[aria-expanded=true] .icon{transform:rotate(180deg)}
.app-choice-list .app-choice{animation:choice-enter .19s var(--ui-ease) both}
.app-choice-list .app-choice:nth-child(2){animation-delay:18ms}
.app-choice-list .app-choice:nth-child(3){animation-delay:32ms}
.app-choice-list .app-choice:nth-child(4){animation-delay:46ms}
.app-choice-list .app-choice:nth-child(n+5){animation-delay:54ms}
.sheet[open]{animation:sheet-in var(--motion-sheet) var(--ui-ease)}
.sheet[open]::backdrop{animation:backdrop-enter .22s ease-out both}
.rehearsal .speech.current .line-content>.speech-text,.audio-inner .audio-answer{animation:content-reveal .19s var(--ui-ease) both}
@media(hover:hover) and (pointer:fine){
 .primary:hover,.secondary:hover{transform:translateY(-1px)}
 .primary:active,.secondary:active{transform:translateY(1px) scale(.985)}
}
@media(max-width:700px){
 .app-layout[data-route=home] .topbar{display:flex}
 .settings-page{padding:35px 23px 60px}
 .settings-page .page-intro{margin-bottom:35px}
 .settings-page .setting-control input[type=range]{width:110px}
 .settings-page .setting-control{gap:8px}
 .management-action{min-height:57px}
}
@media(max-width:360px){
 .settings-page{padding:32px 19px 50px}
 .settings-page .setting-control input[type=range]{width:93px}
 .settings-page .setting-row{gap:10px}
}
@media(prefers-reduced-motion:reduce){
 .page-scroll>.page,.reader-top,.nav-item[aria-current=page] .icon,
 .app-choice-list .app-choice,.sheet[open],.sheet[open]::backdrop,
 .rehearsal .speech.current .line-content>.speech-text,.audio-inner .audio-answer{
  animation:none!important
 }
 .primary,.secondary,.mode-option,.scene-link,.icon-button,.nav-item,
 .app-select-trigger,.app-select-trigger .icon,.app-choice,.reveal-mask,
 .setting-link,.management-action,.setting-link .icon,.management-action .icon{
  transition:none!important
 }
}


/* Navigation v3 — top-right settings action is the only settings entry. */
.main-shell>.global-settings{
 position:absolute;top:9px;right:22px;z-index:8;
 display:inline-flex;align-items:center;justify-content:center;
 width:44px;height:44px;min-width:44px;min-height:44px;
 padding:0;border:0;border-radius:12px;
 color:var(--ui-text-secondary);background:transparent;
 transition:color .17s var(--ui-ease),background .17s var(--ui-ease),transform .17s var(--ui-ease)
}
.main-shell>.global-settings .icon{width:23px;height:23px;stroke-width:1.65;transition:transform .22s var(--ui-ease)}
.main-shell>.global-settings:hover{color:var(--ui-accent);background:var(--ui-accent-wash)}
.main-shell>.global-settings:hover .icon{transform:rotate(22deg)}
.main-shell>.global-settings:active{transform:scale(.93)}
.main-shell>.global-settings:focus-visible{outline:2px solid var(--ui-focus);outline-offset:2px}
.topbar{padding-right:78px}
.reader-top{padding-right:82px}
.app-layout[data-route=settings] .topbar,.app-layout[data-route=rehearse] .topbar{display:none}
.bottom-nav{justify-content:space-evenly}
@media(max-width:1050px){
 .main-shell>.global-settings{right:12px}
 .topbar{padding-right:70px}
 .reader-top{padding-right:72px}
}
@media(max-width:700px){
 .main-shell>.global-settings{right:8px;top:7px;width:44px;height:44px}
 .topbar{padding-right:60px}
 .reader-top{padding-right:60px}
 .reader-heading{min-width:0}
 .reader-heading h1{overflow:hidden;text-overflow:ellipsis}
 .reader-tools{flex-shrink:0}
 .bottom-nav .nav-item{min-width:72px}
}
@media(max-width:360px){
 .main-shell>.global-settings{right:4px}
 .reader-top{padding-right:52px}
 .reader-role{max-width:95px}
 .reader-tools .icon-button{width:34px}
 .bottom-nav .nav-item{min-width:66px}
}
@media(prefers-reduced-motion:reduce){
 .main-shell>.global-settings,.main-shell>.global-settings .icon{transition:none!important}
 .main-shell>.global-settings:hover .icon{transform:none}
}

/* Reader: selected character, independent bookmark and full-row analysis gesture. */
.reader-scroll .speech.mine{background:var(--theme-owned-bg,#eef6ff);border-bottom-color:var(--theme-owned-border,#d9e7fa);box-shadow:inset 3px 0 0 var(--accent)}
.reader-scroll .speech.mine .speech-text{color:var(--theme-owned-ink,#173251)}
.reader-scroll .speech.mine .speaker{color:var(--accent-ink)}
.reader-scroll .speech.mine.highlight{background:var(--theme-owned-highlight,#e4f0ff)}
.reader-scroll .speech.mine:hover{background:var(--theme-owned-hover,#e8f2ff)}
.speech-actions{display:inline-flex;align-items:center;gap:8px;margin-left:auto}
.speech-status{display:inline-flex;align-items:center;gap:5px;min-height:30px}
.speech-status[hidden],.review-state[hidden]{display:none!important}
.speech-bookmark{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;flex:none;border:0;border-radius:10px;background:transparent;color:#8796ac;touch-action:manipulation}
.speech-bookmark .icon{width:19px;height:19px;stroke-width:1.8}
.speech-bookmark:hover,.speech-bookmark:focus-visible{background:rgb(var(--theme-accent-rgb) / .09);color:var(--accent)}
.speech-bookmark[aria-pressed="true"]{color:var(--accent-ink);background:rgb(var(--theme-accent-rgb) / .11)}
.speech-bookmark[aria-pressed="true"] .icon{fill:rgb(var(--theme-accent-rgb) / .2)}
.speech-bookmark:active{transform:scale(.94)}
@media print{.speech-bookmark{display:none!important}}

/* Context and performance cues sourced from the supplied translation and stage-direction data. */
.analysis-context .subtle{margin-bottom:9px}
.analysis-neighbor{padding:10px 0;border-top:1px solid var(--line)}
.analysis-neighbor-label{font-size:11px;color:var(--accent);font-weight:650;letter-spacing:.03em}
.sheet-body .analysis-neighbor p{font-size:14px;line-height:1.65;margin-top:3px}
.analysis-stage-cue{font-weight:600;color:var(--ink)}
.analysis-acting .analysis-stage-original,.analysis-personal{margin-top:12px}
.analysis-acting .analysis-stage-original summary,.analysis-personal summary{color:var(--muted);font-size:12px;cursor:pointer}
.analysis-intent{margin:8px 0 13px}

/* The role selector is an anchored dropdown, not a bottom sheet. */
.role-menu{position:fixed;z-index:100;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;min-width:0;padding:6px;border:1px solid #dfe6f0;border-radius:14px;background:var(--paper);box-shadow:0 15px 42px rgba(27,44,73,.15),0 2px 8px rgba(27,44,73,.06)}
.role-menu-option{display:flex;align-items:center;gap:12px;width:100%;min-height:44px;padding:11px 12px;background:transparent;border:0;border-radius:9px;text-align:left;font-size:13px;font-weight:550;line-height:1.45;color:var(--ink)}
.role-menu-option:hover,.role-menu-option:focus-visible{background:var(--accent-soft)}
.role-menu-option[aria-selected="true"]{color:var(--accent-ink);background:#eff4ff;font-weight:650}
.role-menu-name{min-width:0;overflow-wrap:anywhere;flex:1}
.role-menu-check{flex:none;font-size:16px;line-height:1}
.role-menu-option:focus-visible{outline:2px solid #3155d5;outline-offset:-2px}
.role-trigger[aria-expanded="true"],.reader-role[aria-expanded="true"]{background:var(--accent-soft);color:var(--accent-ink)}
.role-trigger[aria-expanded="true"]>.icon,.reader-role[aria-expanded="true"]>.icon,.home-role-row .app-select-trigger[aria-expanded="true"]>.icon{transform:rotate(180deg)}
@media(prefers-reduced-motion:reduce){.role-trigger .icon,.reader-role .icon{transition:none!important}}

/* Audited dramaturgy: a readable primary paragraph, optional compact disclosures. */
.analysis-explanation{margin-top:10px;font-size:15px;line-height:1.85;overflow-wrap:anywhere}
.analysis-supplement,.analysis-related{margin-top:14px}
.analysis-supplement summary,.analysis-related summary{color:var(--accent-ink);font-size:13px;cursor:pointer;padding:7px 0;line-height:1.6}
.analysis-supplement dl{margin:8px 0 0;font-size:14px}
.analysis-supplement dl>div{margin:12px 0}
.analysis-supplement dt{font-size:12px;color:var(--muted);font-weight:600;margin-bottom:4px}
.analysis-supplement dd{margin:0;line-height:1.8;overflow-wrap:anywhere}
.analysis-spoiler>p,.analysis-acting>p{margin-top:10px;overflow-wrap:anywhere}
.analysis-acting .analysis-stage-cue{margin-top:12px;font-size:13px;color:var(--muted);font-weight:400}
.analysis-related .scene-link{font-size:14px;min-height:48px;text-align:left}
.analysis-personal{padding-top:8px}

/* On-demand speech controls stay compact in the analysis sheet and rehearsal header. */
.sheet-heading>div,.session-heading-actions{display:flex;align-items:center;gap:4px}
.session-heading-actions{margin-left:auto}
.line-audio-button{width:40px;height:40px;border:1px solid var(--line);border-radius:10px;background:var(--accent-soft);color:var(--accent-ink)}
.line-audio-button .icon{width:20px;height:20px}
.line-audio-button[hidden]{display:none!important}
.line-audio-button[data-audio-state=loading]{opacity:.6}
.line-audio-button[data-audio-state=playing]{background:var(--accent-soft);color:var(--accent-ink)}
@media(max-width:480px){.session-heading-actions .line-audio-button{width:36px;height:36px}.session-heading-actions{gap:5px}}

/* Offline installation and optional complete audio package */
.home-install-callout,.home-offline-card{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 0;border-bottom:1px solid var(--line);margin-bottom:14px}
.home-install-callout strong,.home-offline-card strong{font-size:14px;font-weight:650}
.home-install-callout p,.home-offline-card p{font-size:12px;line-height:1.65;color:var(--muted);margin-top:4px}
.home-install-callout .primary,.home-offline-card .secondary{flex-shrink:0}
.home-install-callout[hidden]{display:none}
.offline-download-progress{display:grid;gap:12px;margin:22px 0}
.offline-download-progress progress{display:block;width:100%;height:9px;accent-color:var(--accent)}
.offline-download-progress p{font-size:13px;color:var(--muted);line-height:1.7}
@media(max-width:600px){.home-install-callout,.home-offline-card{align-items:stretch;flex-direction:column;gap:12px}.home-install-callout button,.home-offline-card button{width:100%}}


/* Compact audio actions: no accent pill or decorative treatment unless focused. */
.line-audio-button,.line-audio-button[data-audio-state=playing]{
 background:transparent;border:1px solid transparent;color:var(--muted);
 border-radius:9px;box-shadow:none;
}
.line-audio-button:hover,.line-audio-button[data-audio-state=playing]:hover{background:var(--accent-soft);color:var(--ink)}
.line-audio-button[data-audio-state=loading]{opacity:.55}
.line-audio-button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.sheet-heading .line-audio-button{width:36px;height:36px}
.sheet-heading .line-audio-button .icon{width:19px;height:19px}

/* Bell beside settings, consistent across home, reader and rehearsal. */
.main-shell>.global-notifications{
 position:absolute;top:9px;right:70px;z-index:8;
 display:inline-flex;align-items:center;justify-content:center;
 width:44px;height:44px;min-width:44px;min-height:44px;
 padding:0;border:0;border-radius:12px;
 color:var(--ui-text-secondary);background:transparent;
}
.main-shell>.global-notifications .icon{width:21px;height:21px;stroke-width:1.65}
.main-shell>.global-notifications:hover{color:var(--ui-accent);background:var(--ui-accent-wash)}
.main-shell>.global-notifications:focus-visible{outline:2px solid var(--ui-focus);outline-offset:2px}
.notification-badge:not([hidden]){
 display:grid;place-items:center;position:absolute;top:2px;right:0;min-width:17px;height:17px;
 padding:0 3px;border-radius:9px;font-size:10px;font-weight:700;
 color:#fff;background:#e14b58;border:2px solid #fff;
}
.topbar{padding-right:128px}
.reader-top{padding-right:132px}
.notification-list{display:grid;gap:0}
.notification-entry{padding:17px 2px 18px;border-bottom:1px solid var(--line)}
.notification-entry-heading{display:flex;align-items:center;gap:9px;justify-content:space-between}
.notification-entry-heading strong{font-size:14px;font-weight:650}
.notification-entry p{font-size:13px;line-height:1.75;margin-top:7px;white-space:pre-wrap;overflow-wrap:anywhere}
.notification-entry.is-read{opacity:.78}
.notification-entry.is-new{margin:6px 0;padding:16px 13px 17px;border:1px solid #d9e5ff;border-left:3px solid var(--accent);border-radius:10px;background:#f5f8ff}
.notification-new-label{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:3px 8px;border-radius:99px;background:#e5edff;color:var(--accent-ink);font-size:10px;font-weight:650;letter-spacing:.01em}
.notification-unread-dot{width:7px;height:7px;background:var(--accent);border-radius:50%;flex-shrink:0}
.notification-date,.notification-read-label{font-size:11px;color:var(--muted)}
.notification-date{display:block;margin-top:5px}
.notification-mark-read{font-size:12px;min-height:36px;padding:8px 2px;margin-top:4px}
.notification-read-label{display:block;margin-top:10px}
.notification-footer{margin-top:18px}
@media(max-width:1050px){
 .main-shell>.global-notifications{right:60px}
 .topbar{padding-right:118px}.reader-top{padding-right:122px}
}
@media(max-width:700px){
 .main-shell>.global-notifications{top:7px;right:54px}
 .topbar{padding-right:111px}.reader-top{padding-right:112px}
}
@media(max-width:360px){
 .main-shell>.global-notifications{right:49px}
 .reader-top{padding-right:106px}
 .reader-heading h1{font-size:16px}
}


/* Seiko Festival: the same quiet, border-led visual language as the home screen. */
.home-page .home-actions{margin-bottom:22px}
.home-festival{
 display:flex;align-items:center;justify-content:space-between;gap:18px;
 min-height:91px;padding:18px 2px;margin:0 0 27px;
 border-top:1px solid var(--line);border-bottom:1px solid var(--line);
 color:var(--ink);
}
.home-festival-details{display:grid;align-content:center;gap:5px;min-width:0}
.home-festival h2{
 font-size:14px;font-weight:600;line-height:1.4;letter-spacing:-.018em;
 color:var(--ink);
}
.home-festival-date{
 display:block;color:var(--muted);font-size:11px;line-height:1.45;
 letter-spacing:.025em;font-variant-numeric:tabular-nums;
}
.home-festival-clock{
 display:flex;align-items:baseline;justify-content:flex-end;gap:5px;
 flex-shrink:0;white-space:nowrap;font-variant-numeric:tabular-nums;
}
.home-festival-prefix,.home-festival-suffix{
 color:var(--muted);font-size:12px;font-weight:500;
}
.home-festival-value{
 color:var(--accent);font-size:clamp(34px,4.5vw,40px);
 font-weight:650;line-height:1.05;letter-spacing:-.045em;
}
.home-festival[data-phase=today] .home-festival-value,
.home-festival[data-phase=ended] .home-festival-value{font-size:19px;letter-spacing:-.025em}
.home-festival[data-phase=ended] .home-festival-value{color:var(--muted)}
@media(max-width:480px){
 .home-festival{min-height:85px;padding:16px 2px;margin-bottom:25px;gap:12px}
 .home-festival-value{font-size:37px}
}
@media(max-width:360px){
 .home-festival h2{font-size:13px}
 .home-festival-value{font-size:34px}
 .home-festival-clock{gap:4px}
}

/* Stage 1 motion consistency: overlays and route feedback without large-layer transforms. */
.role-menu{transform-origin:top right;animation:role-menu-enter .17s var(--ui-ease) both}
.role-menu[data-placement="above"]{transform-origin:bottom right}
@keyframes role-menu-enter{
 from{opacity:0;transform:translateY(-5px) scale(.985)}
 to{opacity:1;transform:translateY(0) scale(1)}
}
.app-layout[data-route=script] .reader-scroll,
.app-layout[data-route=rehearse] .rehearsal{
 animation:route-content-fade .16s ease-out both;
}
.app-layout[data-route=rehearse] .audio-stage{
 animation:route-content-enter .19s var(--ui-ease) both;
}
@keyframes route-content-fade{from{opacity:.76}to{opacity:1}}
@keyframes route-content-enter{
 from{opacity:.75;transform:translateY(5px)}
 to{opacity:1;transform:translateY(0)}
}
@media(prefers-reduced-motion:reduce){
 .role-menu,.app-layout[data-route=script] .reader-scroll,
 .app-layout[data-route=rehearse] .rehearsal,
 .app-layout[data-route=rehearse] .audio-stage{animation:none!important}
}


/* Daily editorial: source quote is a direct link to its exact script line. */
.notification-script-quote {
 display:flex;flex-direction:column;gap:5px;width:100%;margin:10px 0 12px;
 padding:12px 14px;border:1px solid var(--border, #e3e8f0);
 border-radius:12px;background:var(--surface-soft, #f7f9fc);
 color:inherit;text-align:left;cursor:pointer;white-space:normal;
}
.notification-script-quote:hover {border-color:#8aaed8;background:#f0f6ff}
.notification-script-quote:focus-visible {outline:2px solid #326fc0;outline-offset:2px}
.notification-quote-label {font-size:11px;font-weight:650;color:#617187}
.notification-quote-text {font-size:13px;line-height:1.7;font-style:italic;overflow-wrap:anywhere}
@media (prefers-reduced-motion:reduce) {
 .notification-script-quote {transition:none}
}

.notification-editorial-title {font-size:0.92rem;line-height:1.55;font-weight:600;margin:7px 0 5px;color:inherit}


/* Shared stick: the overlay remains a single lightweight translucent control. */
.stick-dock{width:var(--stick-size,62px);height:var(--stick-size,62px)}
.stick-base{width:var(--stick-size,62px);height:var(--stick-size,62px)}
.sheet .stick-dock{position:absolute;z-index:12}
.sheet.quick-memory-sheet-mode .stick-dock{bottom:94px!important}
.rehearsal-free .speech{content-visibility:visible}
.rehearsal-free .cloze-toggle{cursor:pointer;color:var(--muted);outline-offset:4px}
.rehearsal-free .cloze-toggle.is-revealed{
 color:var(--ink);font-size:var(--font);font-weight:400;font-family:Inter,"Segoe UI","Noto Sans JP",system-ui,sans-serif;
 line-height:var(--reader-leading);overflow-wrap:anywhere;white-space:normal;
}
.reader-scroll .speech .speech-inner{background:inherit}
.reader-scroll .speech .swipe-hint{
 background:color-mix(in srgb,var(--accent) 12%,var(--paper));
 color:var(--accent-ink);
 transition:opacity .14s ease;
}
.reader-scroll .speech .swipe-hint.left{
 background:color-mix(in srgb,var(--ui-review) 12%,var(--paper));
 color:var(--ui-review);
}
/* Device-wide controls live inside the existing display settings group. */
.stick-config-link{width:100%;padding:13px 0}
.stick-config{display:grid;gap:18px}
.stick-screen-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.stick-screen-option{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--paper);font-size:12px}
.stick-screen-option input{width:18px;height:18px;accent-color:var(--accent)}
.stick-range-grid{display:grid;gap:18px;padding-bottom:18px}
.stick-range{display:grid;gap:6px}
.stick-range>span{display:flex;justify-content:space-between;gap:12px;font-size:12px}
.stick-range output{font-variant-numeric:tabular-nums;color:var(--muted)}
.stick-range input{width:100%;accent-color:var(--accent)}
@media(max-width:380px){.stick-screen-grid{grid-template-columns:1fr}}

.rehearsal-free .cloze-progress-actions{justify-content:flex-start;gap:9px;margin:12px 0 0}
.rehearsal-free .cloze-progress-actions .secondary{padding:7px 11px;font-size:11px}

/* Stage directions: quiet text under each linked speech, not a card or badge. */
.direction.direction-cue{
 display:block;width:100%;max-width:100%;min-height:30px;
 margin:2px 0 7px;padding:5px 0;text-align:left;white-space:normal;
 border:0;border-radius:0;background:transparent;box-shadow:none;
 color:var(--muted);font:inherit;font-size:12px;font-weight:400;line-height:1.55;
 touch-action:pan-y pinch-zoom;overflow-wrap:anywhere;
}
.direction.direction-cue:hover{color:var(--ink);background:transparent}
.direction.direction-cue:focus-visible{color:var(--ink);background:transparent}
.direction-cue-text{display:block;overflow-wrap:anywhere}
.rehearsal .speech .direction-cue{width:calc(100% - 72px);margin:2px 36px 7px}
.rehearsal-free .speech .direction-cue{width:calc(100% - 72px)}
.audio-stage .direction-cue{max-width:600px;margin:8px auto;text-align:left}
.direction-original{white-space:pre-line;overflow-wrap:anywhere}
.direction-sheet-summary h3{font-size:11px;color:var(--muted);margin-bottom:8px}
.direction-sheet-summary p{font-size:15px;line-height:1.8}
@media(max-width:1050px){.rehearsal .speech .direction-cue{width:calc(100% - 56px);margin-left:28px;margin-right:28px}}
@media(max-width:700px){.rehearsal .speech .direction-cue{width:calc(100% - 40px);margin-left:20px;margin-right:20px}}
@media(max-width:380px){.rehearsal .speech .direction-cue{width:calc(100% - 34px);margin-left:17px;margin-right:17px}}

/* Keep direction typography subordinate to dialogue on narrow screens. */
@media(max-width:700px){.direction.direction-cue{font-size:11.5px;line-height:1.5}}
