:root {
  --paper:#f7f6f2; --ink:#171b1a; --petrol:#12685b; --muted:#667168; --line:#dedfd7;
  font-family:Inter,"Segoe UI",Arial,sans-serif; color:var(--ink); background:var(--paper); font-synthesis:none;
}
* {box-sizing:border-box}
body {margin:0}
button,input,textarea,select {font:inherit}
button,select {cursor:pointer}
button,a,input,textarea,select {-webkit-tap-highlight-color:transparent}
button {color:inherit;min-height:44px;min-width:44px}
button:disabled {cursor:default;opacity:.45}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible {outline:3px solid #c08b36;outline-offset:3px}
a {color:inherit}
input,textarea,select {max-width:100%;min-width:0}
select,input:not([type=range]) {min-height:44px}
[hidden] {display:none!important}
.sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.site-header {height:72px;display:flex;align-items:center;justify-content:space-between;max-width:1000px;padding:0 32px;margin:auto;border-bottom:1px solid var(--line)}
.wordmark {display:flex;align-items:center;min-height:44px;font-size:25px;font-weight:750;letter-spacing:-1.2px;text-decoration:none}
.brand-dot {color:var(--petrol)}
.header-actions {display:flex;align-items:center;gap:16px;min-width:0}
.account-link {display:inline-flex;align-items:center;min-height:44px;min-width:44px;color:var(--petrol);font-size:14px;text-decoration:none}
.account-link:hover {text-decoration:underline;text-underline-offset:4px}
.account-menu {border-top:1px solid var(--line);margin-top:20px;padding-top:8px}
.account-menu>span {display:block;overflow-wrap:anywhere;font-size:13px;color:var(--muted);line-height:1.5}
.menu-button {display:flex;align-items:center;gap:9px;background:transparent;border:0;padding:8px 0 8px 16px;font-size:14px}
.menu-button>span:first-child {font-size:18px}
.workspace {max-width:740px;margin:0 auto;padding:56px 28px 32px}
h1 {font-size:36px;font-weight:580;letter-spacing:-1.2px;line-height:1.18;margin:0 0 24px}
.source-box {border:1px solid #d5d9d0;background:#fffefa;border-radius:13px;padding:18px 20px 0}
.source-box:focus-within {border-color:var(--petrol);box-shadow:0 0 0 1px var(--petrol)}
#script-input {width:100%;height:var(--input-height,clamp(160px,26svh,280px));min-height:100px;resize:vertical;border:0;background:transparent;padding:0;font-size:18px;line-height:1.65;color:#38473e;display:block;scroll-padding-block:12px}
#script-input:focus {outline:none}
#script-input::placeholder {color:#778177}
.source-footer {display:flex;align-items:center;min-height:36px;font-size:11px;color:var(--muted)}
.primary-button {background:var(--petrol);color:#fff;border:0;border-radius:24px;padding:16px 20px;width:100%;display:flex;justify-content:space-between;align-items:center;font-size:17px;font-weight:600;min-height:56px;margin-top:12px}
.primary-button:hover:enabled {background:#0d5146}
.primary-button>span:last-child {font-size:23px;font-weight:400}
.sample-button {display:block;width:100%;border:0;background:transparent;color:var(--petrol);font-size:15px;margin-top:8px;padding:10px}
.sample-button:hover,.text-button:hover {text-decoration:underline;text-underline-offset:4px}
#save-status {color:var(--muted);font-size:12px;line-height:1.55;margin:12px 0 0;text-align:center;overflow-wrap:anywhere}
#save-status[data-warning=true] {color:#93481c}
/* Secondary tasks have their own focus-contained, scrollable panels. */
.sheet {width:calc(100% - 32px);max-width:520px;max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--line);border-radius:16px;background:var(--paper);color:var(--ink);overscroll-behavior:contain}
.sheet::backdrop {background:#111b1773}
.wide-sheet {max-width:900px}
.sheet-header {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;border-bottom:1px solid var(--line);background:var(--paper);position:sticky;top:0;z-index:1}
.sheet-header h2 {font-size:18px;line-height:1.4;margin:0;font-weight:650}
.sheet-header form {flex-shrink:0}
.sheet-content {padding:8px 20px 20px}
.sheet-content>label,.settings-row label>span {display:block;font-size:13px;color:var(--muted);margin:16px 0 6px}
.sheet-content>input,.sheet-content>select,.settings-row select {width:100%;border:1px solid #c9d0c6;background:#fffefa;border-radius:16px;padding:10px;font-size:16px;color:var(--ink)}
.text-button {border:0;background:transparent;padding:10px 4px;color:var(--petrol);font-size:14px;line-height:1.4}
.menu-action {display:block;text-align:left;width:100%;background:#ebeee7;border:1px solid #dce1d7;border-radius:16px;padding:12px 14px;margin:12px 0;font-size:15px;color:var(--petrol)}
.menu-actions {display:flex;align-items:center;justify-content:space-between;gap:12px}
.settings-row {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}
.privacy-note,.cards-help {color:var(--muted);font-size:12px;line-height:1.7}
.cards-list {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.edit-card {background:#fffefa;padding:16px;border:1px solid var(--line);border-radius:10px;min-width:0}
.card-number {font-size:12px;color:var(--petrol);margin:0 0 12px}
.edit-card label {display:block;font-size:12px;color:var(--muted);margin-bottom:5px}
.edit-card input,.edit-card textarea {width:100%;background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0;color:var(--ink);padding:7px 0;line-height:1.6;font-size:16px}
.edit-card input {font-weight:600;margin-bottom:14px}
.edit-card textarea {min-height:120px;resize:vertical}
.view-switch {display:grid;grid-template-columns:1fr 1fr;padding:4px;background:#e6eae1;border-radius:24px;margin:12px 0 20px}
.view-switch button {border:0;background:transparent;font-size:14px;border-radius:20px;padding:10px}
.view-switch button[aria-pressed=true] {background:#fffefa;color:var(--petrol);box-shadow:0 1px 4px #17241b0c;font-weight:650}
.sheet-content>.font-control {display:flex;align-items:center;flex-wrap:wrap;gap:12px;font-size:14px;min-height:44px}
.font-control>span {flex-basis:100%}
.font-control input {min-width:44px;flex:1;accent-color:var(--petrol);height:44px}
.font-control output {min-width:24px;font-variant-numeric:tabular-nums}
/* A bounded speech trial, separate from the manual prompter. */
.speech-lab{margin:16px;border:1px solid var(--line,#d6d8d4);border-radius:20px;padding:20px;background:#fff}
.speech-lab summary{font-weight:700;cursor:pointer;min-height:44px;display:list-item;align-content:center}
.speech-lab>p,.speech-grid p{font-size:14px;line-height:1.6;color:#53605b}
.speech-grid{display:grid;grid-template-columns:1fr 1fr;gap:32px;margin-top:24px}
.speech-grid section{min-width:0}.speech-grid h3{font-size:20px;margin:0 0 12px}
.speech-grid button{padding:10px 16px;min-height:44px;border:1px solid #adc1b5;border-radius:10px;background:#edf4ef;color:#183a28;font:inherit;cursor:pointer}
.speech-grid button:disabled{opacity:.5;cursor:default}.speech-actions{display:flex;flex-wrap:wrap;gap:10px}
.speech-grid label{display:block;margin:18px 0 6px}.speech-grid select{display:block;width:100%;min-height:44px;margin-bottom:12px}
.speech-transcript,#narrator-excerpt{white-space:pre-wrap;overflow-wrap:anywhere;background:#f5f6f1;border-radius:12px;padding:16px;min-height:100px;font:inherit;line-height:1.6;max-height:260px;overflow:auto}
#scribe-partial{color:#69766e;font-style:italic}#narrator-count{font-size:12px}
#narrator-result audio{display:block;width:100%;margin:12px 0}#narrator-result a{display:inline-flex;align-items:center;min-height:44px;margin-right:20px;color:#235839}
@media(max-width:700px){.speech-grid{grid-template-columns:1fr}.speech-lab{padding:16px}.speech-grid section+section{border-top:1px solid #d6d8d4;padding-top:24px}}

/* Measured reading pages, with continuous source text underneath. */
.reader-word {white-space:normal;overflow-wrap:anywhere}
/* Follow the current line without changing word widths or dimming the script. */
.presenter-body .reader-word.reader-focus-word {background:#28483b;color:#f7f6ee;border-radius:.08em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.presenter-body .reader-word.reader-focus-target {background:#3d6050;color:#fff9e9}
.presenter-body .reader-word.reader-cursor {text-decoration-line:underline;text-decoration-color:#f0d3a0;text-decoration-thickness:max(2px,.055em);text-underline-offset:.12em;text-decoration-skip-ink:auto}
.reader-card+.reader-card {border-top:1px solid #ffffff20;margin-top:32px;padding-top:28px}
.presenter #presenter-content h2 {margin-bottom:0}
.presenter .reader-card .reminder {margin-top:20px}
.script-block {color:inherit;cursor:inherit}
/* Tracking preferences affect presentation only. No font/box size changes. */
.presenter-body :where([data-mark-style]:not([data-mark-style="classic"])) .reader-word.reader-focus-target {background:transparent;color:inherit}
.presenter-body [data-mark-style="word"] .reader-focus-word,
.presenter-body [data-mark-style="words"] .reader-focus-word {background:#ffffff18;color:inherit}
.presenter-body [data-mark-style="line"] .reader-focus-word {background:#ffffff0d;color:inherit}
.presenter-body [data-mark-style="cursor"] .reader-cursor {text-decoration:none;position:relative}
.presenter-body [data-mark-style="cursor"] .reader-cursor::before {content:"";position:absolute;left:-.06em;top:.12em;height:.95em;border-left:3px solid #f06a6a;border-radius:2px;pointer-events:none}
.font-control output {min-width:48px;font-variant-numeric:tabular-nums}
.check-label {display:flex!important;align-items:center;gap:10px;min-height:44px;color:inherit!important}
.check-label input {width:20px;height:20px;accent-color:var(--petrol)}
.media-content h3 {font-size:18px;margin:24px 0 12px}
.media-content video,.media-content audio {width:100%;max-height:55dvh;display:block;margin:12px auto}
.media-content video {background:#111b17;border-radius:10px}
.media-content a {color:var(--petrol);display:inline-flex;align-items:center;min-height:44px;padding:6px 0}
.media-content select,.export-form input[type="range"] {width:100%;min-height:44px}
.export-form label,.caption-row label {display:block;font-size:13px;margin:12px 0 6px;color:var(--muted)}
.export-form select,.caption-row input,.caption-row textarea {color:var(--ink);background:#fffefa;border:1px solid #c9d0c6;padding:10px;border-radius:16px;font-size:16px;max-width:100%}
#background-file {max-width:100%;min-height:44px}
#background-preview {display:block;max-width:100%;max-height:200px;margin:12px auto;object-fit:contain}
#caption-details {margin:24px 0;padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
#caption-details summary {min-height:44px;padding:10px 0;cursor:pointer}
.caption-row {display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px 0;border-bottom:1px solid var(--line)}
.caption-row label {margin:0;min-width:0}
.caption-row input,.caption-row textarea {display:block;width:100%;margin-top:5px}
.caption-text {grid-column:1/-1}
.caption-row textarea {min-height:70px;resize:vertical}
.caption-row button {grid-column:1/-1;justify-self:start}
.media-content button:not(.primary-button) {min-height:44px;border-radius:16px;padding:8px 12px;border:1px solid #c9d0c6;background:transparent;color:var(--ink)}
.media-content .primary-button {margin-top:20px}
.media-content .danger-button {color:#983d32;margin-top:32px}
.recovery-item {border:1px solid #bd9162;border-radius:10px;padding:12px;margin:12px 0;display:flex;gap:8px;flex-wrap:wrap}
.recovery-item p {width:100%;margin:0 0 4px}
.export-job {padding:14px 0;border-bottom:1px solid var(--line);display:flex;gap:12px;align-items:center;flex-wrap:wrap;font-size:13px}
.export-job p {width:100%;margin:0;color:#983d32}
@media(min-width:700px){.caption-row {grid-template-columns:110px 110px 1fr}.caption-text {grid-column:auto}}

/* Writing studio: a quiet canvas with a single, integrated start action. */
:root {--paper:#f4f5f1;--ink:#192c28;--muted:#64736d;--line:#dfe5de;font-family:Inter,"Segoe UI",Arial,sans-serif}
body {background:radial-gradient(ellipse at 85% 0%,#dceae360,transparent 60%),var(--paper)}
.icon {width:22px;height:22px;flex-shrink:0;display:block}
.site-header {max-width:1120px;height:88px;border:0;padding-inline:40px}
.wordmark {font-size:27px;letter-spacing:-1.5px}
.header-actions {gap:20px}
.menu-button {width:46px;height:46px;justify-content:center;padding:0;border:1px solid #ffffffb3;background:#ffffff73;border-radius:50%;box-shadow:0 4px 20px #163b2510}
.workspace {max-width:800px;padding:64px 32px 36px}
.workspace-eyebrow {font-size:11px;text-transform:uppercase;letter-spacing:2.3px;font-weight:650;color:var(--petrol);margin:0 0 18px}
h1 {max-width:640px;font-size:clamp(32px,4.5vw,52px);font-weight:550;letter-spacing:-2px;line-height:1.08;margin:0 0 18px}
.workspace-intro {font-size:16px;line-height:1.6;color:var(--muted);margin:0 0 30px}
.source-box {position:relative;border:1px solid #fff;background:#ffffffb3;border-radius:28px;padding:24px 24px 78px;box-shadow:0 16px 60px #14332707,0 1px 3px #14332706;transition:border-color .2s,box-shadow .2s}
.source-box:focus-within {border-color:#84aa9f;box-shadow:0 16px 60px #1433270a,0 0 0 3px #12685b0a}
#script-input {height:var(--input-height,clamp(180px,30svh,330px));font-size:19px;line-height:1.7;color:#283e36}
.source-footer {position:absolute;bottom:24px;left:26px;font-size:12px;min-height:44px;max-width:43%}
.primary-button {width:auto;gap:24px;min-height:48px;padding:12px 22px;border-radius:28px;font-size:15px;box-shadow:0 5px 16px #12685b16}
.source-box>.primary-button {position:absolute;bottom:22px;right:22px;margin:0}
.sample-button {width:auto;margin:20px auto 0;font-size:14px;border-radius:24px}
#save-status {margin-top:8px;font-size:11px}
.sheet {border-radius:26px;background:#f5f7f2;box-shadow:0 24px 80px #0d251e2b}
.sheet-header {background:inherit;padding:14px 20px}
.sheet-header h2 {font-weight:600}
.sheet-header .text-button {border-radius:24px;padding-inline:16px;background:#e3eae1;text-decoration:none}
.menu-action {border-radius:24px;background:#e8eee6;border:0}
.view-switch {border-radius:26px}
.view-switch button {border-radius:22px}
.media-content button:not(.primary-button),.speech-grid button {border-radius:24px}

/* Reading stage. Controls have their own reserved space, so no line is hidden. */
.presenter {--reader-size:44px;--stage:#101c1b;--glass:#253a33d9;--glass-line:#e1f7e226;position:fixed;inset:0;z-index:10;height:100dvh;display:flex;flex-direction:column;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);background:radial-gradient(ellipse at 50% 110%,#26453666,transparent 65%),var(--stage);color:#f2f4ed;color-scheme:dark}
body.presenting {overflow:hidden}
.presenter-header {display:flex;align-items:center;gap:10px;padding:14px 24px 8px;flex-shrink:0}
.reader-heading {flex:1;min-width:0;padding-left:8px}
.reader-brand {font-size:18px;font-weight:650;letter-spacing:-.6px}
.reader-brand>span {color:#9fc9b4;font-size:11px;letter-spacing:1.5px;font-weight:400;padding-left:6px}
#presenter-status {font-size:11px;line-height:1.5;color:#a5b9ad;margin:4px 0 0}
.icon-button {width:44px;height:44px;min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;border:1px solid var(--glass-line);background:linear-gradient(145deg,#efffe714,#efffe704);color:#d8e8da;padding:0;flex-shrink:0;transition:background .15s,transform .15s;position:relative}
.icon-button:hover:enabled {background:#ecffe91c}
.icon-button:active:enabled {transform:scale(.94)}
.icon-button:disabled {opacity:.3}
.presenter-header .icon-button {backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
.reader-meta {display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:32px;padding:0 28px;flex-shrink:0}
#presenter-position {color:#8fa99b;font-size:10px;font-weight:500;letter-spacing:1px;margin:0;text-transform:uppercase}
.recording-indicator {display:flex;align-items:center;gap:6px;font-size:11px;color:#ffc2b9;flex-wrap:wrap;justify-content:flex-end}
.recording-dot {width:6px;height:6px;border-radius:50%;background:#ff8778}
#recording-time {font-variant-numeric:tabular-nums}
.camera-preview {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#050807;pointer-events:none;z-index:0}
.presenter.has-camera {isolation:isolate;background:#050807}
.presenter.has-camera::after {content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background:linear-gradient(#0008,#0002 25%,#0002 65%,#0009)}
.presenter.has-camera>.presenter-header,.presenter.has-camera>.reader-meta,.presenter.has-camera>.presenter-body,.presenter.has-camera>.reader-panel,.presenter.has-camera>.reader-bottom {position:relative;z-index:1}
.presenter.has-camera .presenter-body {text-shadow:0 2px 5px #000,0 0 18px #000b}
.presenter.has-camera .reader-meta,.presenter.has-camera #presenter-position,.presenter.has-camera #presenter-status {color:#f1f6ef;text-shadow:0 1px 4px #000}
.permission-help-link {display:inline-flex;align-items:center;min-height:44px;text-decoration:underline;color:#f0dbb9}
.caption-timing-note {padding:12px 14px;border-radius:16px;background:#edf2e9;color:#274437;font-size:13px;line-height:1.6}
.camera-preview.mirrored {transform:scaleX(-1)}
.presenter-body {flex:1;min-height:64px;overflow:auto;padding:18px max(26px,calc((100% - 900px)/2)) 24px;scroll-behavior:auto;overflow-anchor:none;overscroll-behavior:contain;overflow-wrap:anywhere;scrollbar-width:thin;scrollbar-color:#6d897766 transparent}
#presenter-content {min-width:0}
.presenter #presenter-content h2 {font-size:var(--reader-size);font-weight:500;line-height:1.35;letter-spacing:-.7px;white-space:pre-wrap;margin:0}
.presenter .reminder {color:#bacbbf;font-size:calc(var(--reader-size)*.75);line-height:1.6;white-space:pre-wrap;margin:0}
.full-script {white-space:pre-wrap;font-size:var(--reader-size);line-height:1.6;letter-spacing:-.4px;font-weight:450}
.reader-card+.reader-card {border-top:1px solid #ffffff12;margin-top:32px;padding-top:28px}
.presenter.is-paused .presenter-body {opacity:.65}
.presenter.is-paused #presenter-status {color:#ecd1a0}
.reader-bottom {flex-shrink:0;padding:4px 16px 16px;position:relative}
.reader-feedback {max-width:760px;margin:0 auto 8px;color:#acc7b6;font-size:11px;line-height:1.5;text-align:center;max-height:96px;overflow:auto;scrollbar-width:thin}
#scribe-status,.record-status {margin:0;line-height:1.5}
#scribe-status[data-error=true],.record-status.error {color:#ffb7aa;font-size:12px}
.record-status:empty {display:none}
.following-status {display:flex;justify-content:center;gap:10px;align-items:center;font-size:11px}
.following-status:has(#follow-state:empty):has(#scribe-countdown[hidden]) {display:none}
#follow-state {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#scribe-countdown {white-space:nowrap;font-variant-numeric:tabular-nums}
#microphone-help {text-align:left;font-size:12px;padding:6px 10px}
#microphone-help a {display:inline-flex;align-items:center;min-height:44px}
.reader-dock {width:100%;max-width:420px;margin:auto;border:1px solid var(--glass-line);border-radius:30px;background:linear-gradient(125deg,#efffe710,#efffe702),var(--glass);box-shadow:inset 0 1px 0 #ffffff0c,0 12px 40px #0003;backdrop-filter:blur(24px) saturate(130%);-webkit-backdrop-filter:blur(24px) saturate(130%);padding:5px 10px 9px}
.reader-quick-settings {display:flex;align-items:center;gap:10px;border-bottom:1px solid #ffffff0f;margin-bottom:7px;padding-bottom:3px}
.live-font-control {display:flex;align-items:center;flex:1;min-width:0;gap:1px}
.live-font-control button {border:0;border-radius:50%;background:transparent;color:#d6e6d9;padding:0;width:44px;height:44px;flex-shrink:0;font-size:14px}
#font-larger {font-size:17px}
.live-font-control button:hover:enabled {background:#ffffff10}
#font-size {width:100%;min-width:44px;flex:1;height:44px;accent-color:#bbdcc6;margin:0}
#font-size {-webkit-appearance:none;appearance:none;background:transparent;cursor:pointer}
#font-size::-webkit-slider-runnable-track {height:3px;border-radius:3px;background:linear-gradient(to right,#b8dbbf var(--font-progress,38%),#6b8176 var(--font-progress,38%))}
#font-size::-webkit-slider-thumb {-webkit-appearance:none;width:14px;height:14px;margin-top:-5.5px;border-radius:50%;background:#c6e5cc;box-shadow:0 1px 5px #0003}
#font-size::-moz-range-track {height:3px;border-radius:3px;background:#6b8176}
#font-size::-moz-range-progress {height:3px;border-radius:3px;background:#b8dbbf}
#font-size::-moz-range-thumb {width:14px;height:14px;border:0;border-radius:50%;background:#c6e5cc}
#font-value {font-size:11px;min-width:22px;text-align:center;font-variant-numeric:tabular-nums;color:#b8cdbd}
.presenter-controls {display:flex;align-items:center;justify-content:space-evenly;gap:6px}
.presenter-controls>.icon-button {margin-bottom:14px;border-color:transparent;background:transparent}
.presenter-controls>.pause-button {width:48px;height:48px;background:#d6ecd6;color:#213b30;box-shadow:0 2px 8px #0002}
.presenter-controls>.pause-button:hover {background:#e8f6e4}
.play-icon {display:none}
.is-paused .pause-icon {display:none}
.is-paused .play-icon {display:block}
.dock-divider {height:28px;width:1px;background:#ffffff16;margin:0 4px 14px}
.dock-caption {font-size:9px;line-height:11px;letter-spacing:.3px;color:#b8cdbc}
.keyboard-help {font-size:10px;color:#869e8f;text-align:center;margin:10px 0 0}
/* Non-modal live panels keep the reader and the size slider usable. */
.reader-panel {position:relative;inset:auto;flex-shrink:0;width:calc(100% - 32px);max-width:760px;max-height:32dvh;margin:6px auto 8px;background:#21342e;color:#e2ecdf;border-color:#c6e5c329;border-radius:24px;box-shadow:0 8px 32px #0002;color-scheme:dark;overflow:auto;scrollbar-width:thin}
.reader-panel .sheet-header {background:#21342e;border-color:#c6e5c31f;padding-block:8px}
.reader-panel .sheet-header h2 {font-size:15px}
.reader-panel .sheet-header .text-button {background:#d8ebd31a;color:#e2ecdf}
.reader-panel .sheet-content>label,.reader-panel .privacy-note {color:#aec6b6}
.reader-panel .sheet-content>select {background:#172a23;color:#e3eee1;border-color:#c6e5c32c;border-radius:14px}
.reader-panel .view-switch {background:#14261f;margin:8px 0 12px}
.reader-panel .view-switch button {color:#b8cdbe}
.reader-panel .view-switch button[aria-pressed=true] {background:#d6e6cf;color:#213b30}
.reader-panel .font-control {margin-top:12px}
.reader-panel .font-control>span {flex-basis:auto;width:128px}
.reader-panel .font-control input {accent-color:#bddbc3;min-width:60px}
.reader-panel .menu-action {background:#d8ebd31a;color:#e2ecdf}
.reader-panel .check-label input {min-width:44px;accent-color:#bddbc3}
@media(min-width:1000px) {
 .presenter.panel-open {padding-right:380px}
 .reader-panel {position:absolute;right:20px;top:84px;bottom:20px;width:340px;max-height:none;margin:0}
}
@media(max-width:640px) {
 .site-header {height:76px;padding:0 22px}
 .header-actions {gap:16px}
 .header-actions .account-link {font-size:12px}
 .workspace {padding:32px 20px max(24px,env(safe-area-inset-bottom))}
 h1 {font-size:36px;letter-spacing:-1.35px;max-width:330px}
 .workspace-eyebrow {font-size:10px;margin-bottom:16px}
 .workspace-intro {font-size:14px;max-width:270px;margin-bottom:24px}
 .source-box {padding:20px 20px 82px;border-radius:24px}
 #script-input {font-size:17px}
 .source-footer {left:20px;bottom:20px;font-size:10px;max-width:38%}
 .source-box>.primary-button {right:14px;bottom:18px;padding-inline:16px;gap:14px;font-size:13px}
 .sheet-header {padding-inline:16px}
 .sheet-content {padding:8px 16px 16px}
 .cards-list {grid-template-columns:1fr}
 .presenter-header {padding:10px 16px 6px;gap:8px}
 .reader-heading {padding-left:3px}
 .reader-meta {padding:4px 24px 6px;min-height:34px}
 .recording-indicator {font-size:10px;gap:4px}
 .reader-meta:has(.recording-indicator:not([hidden])) #presenter-position {max-width:40%;font-size:9px}
 .reader-bottom {padding:2px 12px 12px}
 .reader-panel {max-height:min(32dvh,calc(75dvh - 280px))}
 .reader-feedback {margin-bottom:6px;padding:0 8px}
 .reader-dock {padding-inline:9px;border-radius:28px}
 .reader-quick-settings {gap:4px}
 .keyboard-help {display:none}
}
@media(max-width:370px) {
 .reader-brand {font-size:16px}
 #presenter-status {font-size:10px}
 .live-font-control button {font-size:13px}
 .reader-quick-settings {gap:0}
}
@media(max-height:500px) and (min-width:600px) {
 .presenter-header {padding-block:4px}
 .reader-meta {min-height:22px}
 .reader-bottom {padding:0 16px 8px}
 .reader-dock {max-width:760px;display:flex;align-items:center;gap:14px;padding:6px 14px;border-radius:40px}
 .reader-quick-settings {flex:1;border:0;margin:0;padding:0;gap:4px}
 .presenter-controls {flex:1;gap:4px}
 .presenter-controls>.icon-button,.dock-divider {margin:0}
 .dock-caption,.keyboard-help {display:none}
 .reader-feedback {margin:0 0 4px;max-height:48px}
 .presenter.panel-open {padding-right:46vw}
 .reader-panel {position:absolute;right:8px;top:8px;bottom:8px;width:calc(46vw - 16px);max-height:none;margin:0}
 .panel-open .reader-dock {display:block}
 .panel-open .reader-quick-settings {margin-bottom:4px}
}
@media(prefers-reduced-transparency:reduce) {.reader-dock,.presenter-header .icon-button {background:#2b4035;backdrop-filter:none;-webkit-backdrop-filter:none}}
@media(prefers-contrast:more) {.icon-button,.reader-dock {border-color:#d8e8da}.reader-meta,#presenter-status,.reader-feedback,.dock-caption {color:#e3eee1}}
@media(prefers-reduced-motion:reduce) {* {scroll-behavior:auto!important;transition:none!important}}

/* One start action, with explicit choices for what is captured. */
.session-action {display:flex;flex-direction:column;align-items:center;gap:4px;min-width:112px}
.session-button {display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:112px;height:48px;padding:0 16px;border:1px solid #cbe9d24d;border-radius:28px;background:#b8dfc226;color:#e5f4e6;font-size:14px;font-weight:600}
.session-button:hover:enabled {background:#b8dfc23d}
.session-button[data-state=active],.session-button[data-state=starting] {background:#e6c3a91c;border-color:#edc6a44d}
.session-button.is-recording {color:#ffd8cf;border-color:#ffb3a24d;background:#f6b2a71a}
.session-button .icon {width:19px;height:19px}
.session-stop {display:none}
.session-button:not([data-state=idle]) .session-play {display:none}
.session-button:not([data-state=idle]) .session-stop {display:block}
.session-action .dock-caption {font-size:9px;min-height:11px}
.reader-guide-link {display:flex;align-items:center;justify-content:center;flex-shrink:0;min-width:44px;min-height:44px;border-radius:50%;border:1px solid #d8e8da21;color:#c9dfcf;font-size:16px;text-decoration:none}
.reader-guide-link:hover {background:#d8e8da14}
.retry-following {display:block;border:0;border-radius:24px;background:#d8e8da16;color:#e2eedf;min-height:44px;padding:6px 16px;margin:4px auto;font-size:12px}
.start-sheet {width:calc(100% - 24px);max-width:480px;max-height:calc(100dvh - 24px);background:#20362edb;color:#e6f1e4;border:1px solid #e1f7e233;backdrop-filter:blur(28px);-webkit-backdrop-filter:blur(28px);box-shadow:0 24px 90px #0006;color-scheme:dark;overflow:auto}
.start-sheet::backdrop {background:#07120d91;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.start-sheet .sheet-header {background:#20362e;border-color:#d6ebd222;padding:12px 18px}
.start-sheet .sheet-header h2 {font-size:17px}
.start-sheet .sheet-header .text-button {background:#d6ebd215;color:#e6f1e4;padding-inline:12px}
.start-choices {display:grid;gap:8px;padding:16px 14px 8px}
.start-choice {display:flex;align-items:center;gap:12px;min-height:80px;width:100%;border:1px solid #c9e6c925;border-radius:22px;background:#d1e7ca0b;color:#ecf5e9;text-align:left;padding:14px}
.start-choice:hover,.start-choice:focus-visible {background:#c9e6c921;border-color:#c9e6c960}
.choice-icon {width:42px;height:42px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#d1e7ca15;color:#c5e8cd;flex-shrink:0}
.start-choice strong {display:block;font-size:14px;font-weight:600;line-height:1.4}
.start-choice small {display:block;margin-top:4px;font-size:11px;line-height:1.45;color:#b5ceba}
.choice-arrow {margin-left:auto;color:#adc9b3;font-size:18px}
.start-note {margin:6px 26px;color:#b5ceba;font-size:11px;line-height:1.6}
.start-guide {display:flex;align-items:center;min-height:44px;margin:0 26px 12px;font-size:12px;color:#d5ecd5;text-underline-offset:4px}
.home-guide-link {display:flex;align-items:center;justify-content:center;min-height:44px;margin:6px auto 0;color:var(--petrol);font-size:12px;text-underline-offset:4px}
.guide-link {text-decoration:none;min-height:44px;align-content:center}
@media(max-width:640px){
 .workspace {padding-top:24px}
 .workspace-intro {max-width:none;margin-bottom:20px}
 .reader-quick-settings {gap:8px}
 .reader-guide-link {margin-left:4px}
 .session-action {min-width:104px}
 .session-button {min-width:104px;padding-inline:12px;font-size:13px}
 .presenter-controls {gap:3px}
 .dock-divider {margin-inline:2px}
}
@media(max-width:370px){
 .start-choice {gap:9px;padding:12px}
 .start-choice strong {font-size:13px}
 .start-sheet .sheet-header h2 {font-size:15px}
 .start-sheet .sheet-header {gap:8px;padding-inline:14px}
 .start-sheet .sheet-header .text-button {font-size:12px}
}
@media(max-height:500px) and (min-width:600px){
 .session-action .dock-caption {display:none}
 .session-button {height:44px;min-width:104px}
 .reader-quick-settings {gap:8px}
 .start-sheet {max-width:560px}
}
@media(prefers-reduced-transparency:reduce){.start-sheet {background:#20362e;backdrop-filter:none;-webkit-backdrop-filter:none}}

/* Recording workspace: one decision per step, with the primary action in reach. */
.presenter-controls>.pause-button {height:58px;width:54px;flex:0 0 54px;flex-direction:column;gap:3px;border-radius:25px}
.pause-caption {font-size:10px;line-height:1.2;font-weight:650}
.media-workspace {width:min(1040px,calc(100% - 48px));max-width:none;height:min(860px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);overflow:hidden;border-radius:28px}
.media-workspace[open] {display:flex;flex-direction:column}
.media-workspace .sheet-header {position:static;flex-shrink:0;padding:18px 28px;background:#fffefa}
.media-workspace .sheet-header h2 {font-size:19px;letter-spacing:-.35px}
.media-workspace .media-content {flex:1;min-height:0;overflow-y:auto;padding:0 32px 28px;scrollbar-gutter:stable;overscroll-behavior:contain}
#media-status:empty,#recording-recovery:empty {display:none}
#media-status {position:sticky;top:0;z-index:2;font-size:14px;line-height:1.5;padding:12px 16px;background:#e8eee8;border-radius:16px;overflow-wrap:anywhere}
.media-content .media-disclosure {border:0;border-top:1px solid var(--line);border-radius:0;margin:18px 0 0;padding:0}
.media-disclosure summary {cursor:pointer;min-height:48px;padding:14px 0;font-size:14px;font-weight:550;line-height:1.45}
.media-disclosure>label {display:block;margin:8px 0;font-size:13px;color:var(--muted)}
.media-content select {border:1px solid #c9d0c6;border-radius:16px;background:#fffefa;color:var(--ink);font-size:16px;padding:12px;max-width:100%}
#recording-picker {border:0;margin:0;text-align:right}
#recording-picker[open] {padding-bottom:16px;border-bottom:1px solid var(--line);text-align:left}
#recording-picker summary {font-size:12px;font-weight:500;color:var(--muted)}
.media-content .media-steps {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:4px 0 28px;padding:6px;background:#e9eee8;border-radius:23px}
.media-content .media-steps button {display:flex;align-items:center;justify-content:center;gap:10px;border:0;min-height:48px;padding:8px 10px;font-size:13px;color:var(--muted);border-radius:18px}
.media-steps button>span:first-child {width:24px;height:24px;border:1px solid #aab9ae;border-radius:50%;display:grid;place-items:center;font-size:12px;flex-shrink:0}
.media-content .media-steps button[aria-current] {background:#fffefa;color:var(--petrol);box-shadow:0 2px 7px #233f2910;font-weight:650}
.media-steps button[aria-current]>span:first-child {background:var(--petrol);border-color:var(--petrol);color:white}
.media-step {max-width:740px;margin:0 auto}
.media-step-heading {margin-bottom:24px}
.media-content .media-step-heading h3 {margin:6px 0 8px;font-size:28px;line-height:1.2;letter-spacing:-.65px;font-weight:600}
.media-step-heading>p {font-size:14px;line-height:1.6;color:var(--muted);margin:0;max-width:580px}
.media-step-heading .media-eyebrow {font-size:11px;color:var(--petrol);letter-spacing:.05em;margin-bottom:10px}
.media-content video {max-height:42dvh;border-radius:20px;margin:0 auto;background:#152620}
.media-content audio {margin:24px auto;max-width:600px}
#recording-meta {text-align:center;font-size:12px;line-height:1.6}
#recording-manage .danger-button {display:block;margin:8px 0 0;font-size:12px;color:#983d32;border:0;padding:6px 0}
.media-option-grid {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 18px}
#background-upload {grid-column:1/-1}
.media-caption-card {margin:22px 0 0;padding:18px 20px;border:1px solid var(--line);border-radius:22px;background:#fffefa}
.media-caption-card>.check-label {font-size:16px;font-weight:600;margin:0;color:var(--ink)}
.media-caption-card>.privacy-note {margin:4px 0 0;font-size:13px}
.media-caption-card .check-label input {flex-shrink:0}
.media-content #caption-details {margin:0;padding:0;border:0;border-top:1px solid var(--line)}
.media-content #caption-details summary {padding:14px 0}
#caption-timing-note {margin:16px 0 8px;font-size:13px;line-height:1.6;padding:12px 14px;border:0;background:#eef2ea;border-radius:14px}
.media-footer {display:flex;align-items:center;gap:16px;flex-shrink:0;padding:16px 28px max(16px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#fffefae8}
.media-footer .primary-button {width:auto;margin:0 0 0 auto;min-height:50px;justify-content:center;font-size:15px;padding:14px 24px;border-radius:26px}
.media-footer>.text-button {min-height:44px;padding:8px 4px;font-size:13px}
#export-summary {font-size:12px;line-height:1.5;color:var(--muted);margin:0;flex:1}
#media-edit {margin:auto;color:var(--petrol)}
#export-progress {padding:28px;background:#e9eee8;border-radius:22px;font-size:15px;line-height:1.6}
#export-progress p {font-size:14px;margin:8px 0 0;color:var(--muted)}
#export-progress[data-state="failed"] {background:#f8e8df}
#export-progress[data-state="queued"]:before,#export-progress[data-state="processing"]:before {content:"";display:block;width:22px;height:22px;border:2px solid #bdccc2;border-top-color:var(--petrol);border-radius:50%;margin-bottom:16px;animation:media-spin 1s linear infinite}
@keyframes media-spin {to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){#export-progress:before{animation:none!important}}
.media-content #export-download {display:flex;justify-content:center;color:white;padding:16px 24px;font-size:16px;text-decoration:none;max-width:400px;margin:24px auto 12px;border-radius:28px}
#export-version-note {text-align:center;font-size:12px;line-height:1.6}
.media-content button:focus-visible,.media-footer button:focus-visible,.media-disclosure summary:focus-visible {outline:3px solid #6e9883;outline-offset:3px}
@media(max-width:600px){
 .media-workspace {width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}
 .media-workspace .sheet-header {padding:14px 18px}
 .media-workspace .sheet-header h2 {font-size:16px;max-width:210px}
 .media-workspace .media-content {padding:0 18px 24px;scrollbar-gutter:auto}
 .media-content .media-steps {gap:3px;padding:4px;border-radius:20px;margin-bottom:24px}
 .media-content .media-steps button {flex-direction:column;gap:5px;padding:8px 3px;font-size:12px;border-radius:16px}
 .media-content .media-step-heading h3 {font-size:24px}
 .media-step-heading {margin-bottom:20px}
 .media-option-grid {grid-template-columns:minmax(0,1fr)}
 .media-caption-card {padding:14px;border-radius:18px}
 .media-caption-card>.check-label {font-size:14px}
 .media-footer {flex-wrap:wrap;gap:4px 14px;padding:12px 18px max(12px,env(safe-area-inset-bottom))}
 #export-summary {flex-basis:calc(100% - 90px);text-align:right;font-size:11px}
 .media-footer .primary-button {width:100%;margin:4px 0 0}
 #export-progress {padding:20px}
}
