/* Script Clock and Speech Timer: shared tool styles. Loaded by /script-clock/ and /speech-timer/. */
/* Layout: an edit-suite readout. Big timecode and a segment track up top, script and segments on the left, video settings and planning panels on the right */
body.locked { overflow: hidden; }
.app { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.app[data-mode="basic"] .pro-only { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--seg); outline-offset: 2px; }

/* Header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.brand { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.brand h1 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1; font-variation-settings: "wdth" 125; letter-spacing: -.01em; }
.brand p { margin: 0; color: var(--muted); max-width: 56ch; }
.brand h1 .h1-sub { display: block; margin-top: 6px; font-family: var(--font-body); font-variation-settings: "wdth" 100; font-weight: 600; font-size: 15px; letter-spacing: 0; color: var(--muted); }
.toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; padding: 3px; background: var(--panel); gap: 2px; }
.toggle button { border: 0; background: transparent; padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.toggle button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.mode-wrap { display: flex; align-items: center; gap: 10px; }
.mode-wrap .hint { max-width: 26ch; }

/* Readout */
.readout { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 12px; }
.tc-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.rec { width: 8px; height: 8px; border-radius: 50%; background: var(--marker); display: inline-block; }
.tc { font-family: var(--font-mono); font-weight: 600; font-size: clamp(46px, 8vw, 72px); line-height: .9; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tc small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 8px; }
.stats { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.stat b { display: block; font-family: var(--font-mono); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat.alert b { color: var(--warn); }
.track-area { flex: 1 1 100%; display: flex; flex-direction: column; gap: 4px; padding-top: 6px; }
.vis-row { position: relative; height: 12px; }
.vis-row .ntick { position: absolute; top: 2px; width: 8px; height: 8px; margin-left: -4px; border-radius: 2px; background: var(--seg); transform: rotate(45deg); }
.vis-row .gapbar { position: absolute; top: 5px; height: 3px; background: var(--warn); border-radius: 2px; opacity: .8; }
.track { position: relative; height: 42px; display: flex; border-radius: 5px; overflow: visible; background: repeating-linear-gradient(135deg, transparent 0 6px, var(--line) 6px 7px); }
.track .clip { position: absolute; inset: 0; display: flex; border-radius: 5px; overflow: hidden; }
.tseg { height: 100%; min-width: 2px; border-right: 1px solid var(--panel); cursor: pointer; background: var(--seg); }
.tseg:nth-child(even) { background: var(--seg2); }
.tseg.pause { background: var(--line); }
.tseg.over { box-shadow: inset 0 -6px 0 var(--warn); }
.tseg.hot, .tseg:hover { filter: brightness(1.2); }
.hook-zone { position: absolute; top: 0; bottom: 0; left: 0; pointer-events: none; background: repeating-linear-gradient(90deg, rgba(255,255,255,.22) 0 2px, transparent 2px 6px); border-right: 2px dashed var(--marker); border-radius: 5px 0 0 5px; }
.hook-zone span { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.vline { position: absolute; top: -5px; bottom: -5px; width: 2px; pointer-events: none; }
.vline::after { content: attr(data-label); position: absolute; left: 5px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; background: var(--panel); padding: 0 4px; border-radius: 3px; white-space: nowrap; }
.vline.flip::after { left: auto; right: 5px; }
.vline.target { background: var(--marker); }
.vline.target::after { top: -16px; color: var(--marker); }
.vline.limit { background: var(--ink); }
.vline.limit::after { bottom: -18px; color: var(--ink); }
.ticks { position: relative; height: 18px; margin-top: 4px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.ticks span:first-child { transform: none; }

/* Grid */
.grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel h2 { margin: 0; font-family: var(--font-display); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-variation-settings: "wdth" 112; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.between { justify-content: space-between; }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.hint code, .guide code { font-family: var(--font-mono); font-size: 12px; background: var(--field); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; color: var(--ink); white-space: nowrap; }
.badge { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; background: var(--sel); color: var(--seg-ink); }
.btn { border: 1px solid var(--line); background: var(--panel); padding: 7px 12px; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 600; white-space: nowrap; }
.btn:hover { border-color: var(--seg); }
.btn.primary { background: var(--seg); border-color: var(--seg); color: var(--on-seg); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--warn); }
.btn.small { padding: 4px 9px; font-size: 12px; }
select, input[type="text"] { border: 1px solid var(--line); background: var(--field); border-radius: 7px; padding: 6px 8px; font-size: 13px; min-width: 0; }
label.check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); cursor: pointer; }
input[type="checkbox"] { accent-color: var(--seg); }

/* Script */
.lib { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.lib select { width: 100%; }
#scriptName { width: 100%; font-family: var(--font-display); font-weight: 700; font-size: 18px; border: 0; border-bottom: 1px solid var(--line); background: transparent; border-radius: 0; padding: 4px 0; }
#scriptName:focus { border-bottom-color: var(--seg); outline: none; }
.name-row { display: flex; align-items: flex-end; gap: 12px; }
.name-row #scriptName { flex: 1; min-width: 0; }
.save-state { white-space: nowrap; font-size: 12px; }
textarea#script { width: 100%; min-height: 440px; resize: vertical; padding: 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--field); line-height: 1.65; font-size: 15px; }
.backup { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; }
.backup.nag { border-style: solid; border-color: var(--marker); background: rgba(242, 176, 53, .08); }
.confirm { display: flex; gap: 8px; align-items: center; font-size: 13px; background: var(--warn-soft); border-radius: 8px; padding: 8px 10px; flex-wrap: wrap; }
.guide { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; font-size: 13px; color: var(--muted); margin: 0; align-items: baseline; }
.guide dt { margin: 0; }
.guide dd { margin: 0; }

/* Pace */
.presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 440px) { .presets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.preset { border: 1px solid var(--line); background: var(--field); border-radius: 8px; padding: 8px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 1px; }
.preset b { font-size: 13px; }
.preset span { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.preset[aria-pressed="true"] { border-color: var(--seg); background: var(--sel); }
.slider { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
input[type="range"] { width: 100%; accent-color: var(--seg); }
.wpm { font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; min-width: 7ch; text-align: right; }
.subbox { border: 1px dashed var(--line); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--field); }
.subbox blockquote { margin: 0; font-size: 15px; line-height: 1.6; }
.stopwatch { font-family: var(--font-mono); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.filebtn { position: relative; overflow: hidden; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Checks */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checks li { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 10px; font-size: 14px; align-items: baseline; }
.checks li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); transform: translateY(1px); }
.checks li.ok::before { background: var(--good); }
.checks li.warn::before { background: var(--warn); }
.checks li.mid::before { background: var(--marker); }
.hookbox { background: var(--field); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 15px; line-height: 1.6; }
.hookbox mark { background: var(--sel); color: var(--ink); padding: 1px 2px; border-radius: 3px; box-shadow: inset 0 -2px 0 var(--marker); }
.hookbox .after { color: var(--muted); }
.hookbox .cap { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.list li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); align-items: baseline; }
.list li.click { cursor: pointer; }
.list li.click:hover, .list li.hot { background: var(--sel); }
.list .ts { font-family: var(--font-mono); font-weight: 600; font-size: 13px; color: var(--seg); font-variant-numeric: tabular-nums; }
.list .txt { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .txt b { font-weight: 700; margin-right: 6px; }
.list .meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.list .flag { color: var(--warn); }
.list li.is-over .ts, .list li.gap .ts { color: var(--warn); }
.list li.gap { background: var(--warn-soft); }
.list li.gap .txt { color: var(--warn); font-weight: 600; }
.list .empty { display: block; color: var(--muted); font-size: 14px; padding: 12px 4px; grid-column: 1 / -1; }
.scroll { max-height: 460px; overflow-y: auto; }
.chip { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: var(--field); border: 1px solid var(--line); color: var(--muted); margin-right: 6px; }
textarea.export { width: 100%; min-height: 150px; font-family: var(--font-mono); font-size: 12px; border: 1px solid var(--line); background: var(--field); border-radius: 8px; padding: 10px; resize: vertical; white-space: pre; overflow-x: auto; }

/* Delivery check */
.dchip { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--field); color: var(--muted); }
.dchip b { color: var(--ink); font-family: var(--font-mono); margin-right: 4px; }
.dchip.hot b { color: var(--warn); }
.dtype { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--warn); margin-right: 8px; }
#delList .txt { white-space: normal; }
#delList .txt q { quotes: "“" "”"; color: var(--ink); }
#delList .txt .why { display: block; color: var(--muted); font-size: 13px; }

/* Feedback */
.feedback { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 16px 28px; }
@media (max-width: 760px) { .feedback { grid-template-columns: minmax(0, 1fr); } }
.fb-head { display: flex; flex-direction: column; gap: 8px; }
.fb-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 560px) { .fb-form { grid-template-columns: minmax(0, 1fr); } }
.fb-opts { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fb-opts legend { margin-bottom: 6px; padding: 0; }
.fb-opts label.check { color: var(--ink); align-items: flex-start; }
.fb-opts input { margin-top: 4px; }
.fb-fields { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fb-fields textarea, .fb-fields input { width: 100%; border: 1px solid var(--line); background: var(--field); border-radius: 7px; padding: 8px; font-size: 14px; }
.fb-fields .row { margin-top: 4px; }

.explain { display: flex; flex-direction: column; gap: 12px; }
.explain-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 28px; }
@media (max-width: 760px) { .explain-grid { grid-template-columns: minmax(0, 1fr); } }
.explain-grid p { margin: 0; color: var(--muted); font-size: 14px; max-width: 62ch; }
.guide-article { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.guide-article h3 { margin: 14px 0 0; font-size: 17px; font-weight: 700; text-wrap: balance; }
.guide-article p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; max-width: 68ch; }
.guide-article code, .guide-article kbd { font-family: var(--font-mono); font-size: 13px; background: var(--field); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; color: var(--ink); }
.guide-table { overflow-x: auto; }
.guide-table table { border-collapse: collapse; font-size: 14px; min-width: 460px; }
.guide-table th, .guide-table td { padding: 7px 14px 7px 0; border-bottom: 1px solid var(--line); text-align: left; font-variant-numeric: tabular-nums; }
.guide-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.guide-table tbody th { font-weight: 600; color: var(--ink); }
.guide-table td { font-family: var(--font-mono); color: var(--ink); }
.guide-more { font-size: 14px !important; }
/* FAQ */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }
@media (max-width: 760px) { .faq { grid-template-columns: minmax(0, 1fr); } }
.faq h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; text-wrap: balance; }
.faq p { margin: 0; color: var(--muted); font-size: 14px; max-width: 62ch; }
.section-title { margin: 8px 0 0; font-family: var(--font-display); font-weight: 800; font-size: 20px; font-variation-settings: "wdth" 118; }

/* Teleprompter (fixed dark look) */
.prompter { position: fixed; inset: 0; z-index: 50; background: var(--pr-bg); color: var(--pr-fg); display: flex; flex-direction: column; color-scheme: dark; }
.pr-view { position: relative; flex: 1; min-height: 0; }
.pr-stage { position: absolute; inset: 0; overflow-y: auto; scrollbar-width: none; }
.pr-stage::-webkit-scrollbar { display: none; }
.prompter { --pr-now: var(--marker); }
.pr-text { position: relative; max-width: 900px; margin: 0 auto; padding: 80vh max(24px, env(safe-area-inset-right, 0px)) 80vh max(24px, env(safe-area-inset-left, 0px)); font-size: var(--pr-size, 40px); line-height: var(--pr-lh, 1.45); font-weight: 600; color: var(--pr-fg); cursor: pointer; }
.pr-text.mirror { transform: scaleX(-1); }
.pr-para { margin: 0 0 1.1em; }
.pr-w { transition: color .15s; }
.pr-w.past { color: var(--pr-dim); }
.pr-w.now { color: var(--pr-now); }
.pr-w:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .15em; }
.pr-h { display: block; font-size: .45em; text-transform: uppercase; letter-spacing: .12em; color: var(--marker); margin-bottom: .3em; font-weight: 700; }
.pr-note, .pr-pause, .pr-rate { display: inline-block; font-size: .38em; font-weight: 600; vertical-align: middle; padding: .2em .6em; border-radius: .4em; background: var(--pr-chip); color: #9AA6BC; margin: 0 .4em .2em 0; font-family: var(--font-mono); }
.pr-pause { color: var(--marker); }
.pr-guide { position: absolute; left: 0; right: 0; top: 40%; height: 0; border-top: 2px solid rgba(242, 176, 53, .55); pointer-events: none; z-index: 2; }
.pr-grip { position: absolute; left: 0; top: -22px; width: 44px; height: 44px; pointer-events: auto; cursor: ns-resize; touch-action: none; border-radius: 0 10px 10px 0; }
.pr-grip:hover, .pr-grip:focus-visible, .pr-grip.drag { background: rgba(242, 176, 53, .18); outline: none; }
.pr-card .val { color: var(--pr-fg); font-family: var(--font-mono); letter-spacing: 0; margin-left: 6px; text-transform: none; }
.pr-card input[type="range"] { width: 100%; accent-color: var(--marker); }
.pr-card .pr-seg { flex-wrap: wrap; }
.auto-state { font-family: var(--font-mono); font-size: 12px; color: #B9C2D3; padding: 4px 8px; border-radius: 999px; border: 1px solid #2B3342; white-space: nowrap; }
.auto-state.wait { color: #111; background: var(--marker); border-color: var(--marker); }
.float-note { position: fixed; z-index: 70; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 32px)); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.float-note p { margin: 0; }
body.floating .pr-text { padding-top: 60vh; padding-bottom: 60vh; }
.pr-guide::before { content: ""; position: absolute; left: 10px; top: -9px; border: 8px solid transparent; border-left: 12px solid var(--marker); }
.pr-count { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-mono); font-size: 160px; font-weight: 600; color: var(--marker); background: rgba(7, 9, 13, .7); z-index: 3; }
.pr-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: #10141B; border-top: 1px solid #222937; }
.pr-bar .grp { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pr-bar button { border: 1px solid #2B3342; background: #161B24; color: var(--pr-fg); padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; }
.pr-bar button:hover { border-color: var(--marker); }
.pr-bar button.play { background: var(--marker); border-color: var(--marker); color: #111; min-width: 84px; }
.pr-bar .read { font-family: var(--font-mono); font-size: 13px; color: #B9C2D3; font-variant-numeric: tabular-nums; min-width: 9ch; text-align: center; }
.pr-bar .keys { font-size: 12px; color: #6E7890; }
.pr-bar button[aria-pressed="true"] { border-color: var(--marker); color: var(--marker); }
.pr-bar button.rec { background: #C4302B; border-color: #C4302B; color: #fff; min-width: 92px; }
.pr-bar button.rec.on { background: #fff; color: #C4302B; border-color: #fff; }
/* The preview sits in the band above the reading line, where the lines have already been read,
   so it never covers the line you're on or the ones coming up. Tap it to hide it. */
.cam-preview { position: absolute; top: calc(8px + env(safe-area-inset-top, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); height: min(calc(22% - 44px), 190px); min-height: 40px; width: auto; aspect-ratio: 16 / 9; max-width: 45%; object-fit: cover; border-radius: 10px; border: 2px solid #2B3342; transform: scaleX(-1); z-index: 4; background: #000; cursor: pointer; }
@media (orientation: portrait) { .cam-preview { aspect-ratio: 3 / 4; } }
.cam-show { position: absolute; top: calc(8px + env(safe-area-inset-top, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); z-index: 4; border: 1px solid #2B3342; background: #161B24; color: #B9C2D3; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.prompter.recording .cam-show { border-color: #C4302B; color: #fff; }
.pr-seg { display: inline-flex; align-self: flex-start; border: 1px solid #2B3342; border-radius: 9px; padding: 3px; gap: 2px; background: #0B0E13; }
.pr-card .pr-seg button { border: 0; background: transparent; color: #8B95A8; padding: 6px 12px; border-radius: 6px; }
.pr-card .pr-seg button[aria-pressed="true"] { background: var(--pr-fg); color: #10141B; }
.video-bits { display: flex; flex-direction: column; gap: 8px; }
.meter { position: relative; height: 10px; border-radius: 999px; overflow: hidden; margin-top: 4px;
  background: linear-gradient(to right, #1E2430 0 70%, rgba(242,176,53,.25) 70% 90%, rgba(196,48,43,.35) 90% 100%); }
.meter span { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #3CC488; border-radius: 999px; transition: width .06s linear; }
.takes audio { width: 100%; }
/* Framing check: thirds grid and an eye line on the top third */
.frame-box { position: relative; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; max-height: 42vh; margin: 4px auto 0; width: 100%; }
@media (orientation: portrait) { .frame-box { aspect-ratio: 3 / 4; width: auto; height: 38vh; max-width: 100%; align-self: center; } }
.frame-box video, .frame-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.frame-grid { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, transparent calc(33.33% - .5px), rgba(255,255,255,.35) calc(33.33% - .5px), rgba(255,255,255,.35) calc(33.33% + .5px), transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.35) calc(66.66% - .5px), rgba(255,255,255,.35) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
    linear-gradient(to bottom, transparent calc(66.66% - .5px), rgba(255,255,255,.35) calc(66.66% - .5px), rgba(255,255,255,.35) calc(66.66% + .5px), transparent calc(66.66% + .5px)); }
.frame-grid::before { content: ""; position: absolute; left: 0; right: 0; top: 33.33%; border-top: 2px dashed rgba(242, 176, 53, .85); }
.frame-grid .eyes { position: absolute; right: 8px; top: calc(33.33% - 22px); font-size: 11px; font-weight: 700; color: #F2B035; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.frame-view { position: absolute; inset: 0; z-index: 8; background: #000; cursor: pointer; }
.frame-tip { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); background: rgba(16,20,27,.85); color: #E8EBF1; font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.prompter.recording .cam-preview { border-color: #C4302B; }
.rec-badge { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: max(12px, env(safe-area-inset-left, 0px)); z-index: 4; display: flex; align-items: center; gap: 8px; background: rgba(196, 48, 43, .92); color: #fff; font-family: var(--font-mono); font-weight: 600; font-size: 14px; padding: 6px 10px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.rec-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.pr-card { position: absolute; z-index: 6; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto; background: #10141B; border: 1px solid #2B3342; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--pr-fg); font-size: 14px; }
.pr-card h3 { margin: 0; font-size: 18px; font-family: var(--font-display); font-variation-settings: "wdth" 112; }
.pr-card p { margin: 0; color: #B9C2D3; }
.pr-card label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #8B95A8; margin-top: 4px; }
.pr-card select { background: #161B24; color: var(--pr-fg); border: 1px solid #2B3342; border-radius: 8px; padding: 8px; font-size: 14px; width: 100%; }
.pr-card button { border: 1px solid #2B3342; background: #161B24; color: var(--pr-fg); padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; }
.pr-card button.play { background: var(--marker); border-color: var(--marker); color: #111; }
.pr-card button:hover { border-color: var(--marker); }
.pr-card .pr-row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
.pr-card .pr-row.between { justify-content: space-between; align-items: center; margin-top: 0; }
.pr-small { font-size: 12.5px !important; color: #8B95A8 !important; }
.pr-card .pr-check { color: var(--pr-fg); font-size: 14px; text-transform: none; letter-spacing: 0; margin-top: 6px; gap: 8px; }
.pr-err { color: #FF8A5B !important; }
.takes ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.takes li { border: 1px solid #222937; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.takes li .t-head { display: flex; justify-content: space-between; gap: 8px; font-family: var(--font-mono); font-size: 13px; }
.takes li .t-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.takes li.starred { border-color: var(--marker); }
.takes li .t-tools { display: flex; gap: 6px; align-items: center; }
.takes li .t-tools input { flex: 1; min-width: 0; background: #161B24; color: var(--pr-fg); border: 1px solid #2B3342; border-radius: 8px; padding: 7px 9px; font-size: 13px; }
.takes li .t-tools button.star[aria-pressed="true"] { color: #111; background: var(--marker); border-color: var(--marker); }
.takes li .t-tools button.del.confirming { background: #C4302B; border-color: #C4302B; color: #fff; }
.takes li .t-meta { font-size: 12px; color: #8B95A8; }
.takes video { width: 100%; border-radius: 8px; background: #000; max-height: 220px; }
.editor-pick { border-top: 1px solid #222937; padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.editor-steps { margin: 4px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #B9C2D3; }
.editor-steps li { border: 0; padding: 0; display: list-item; }
.editor-steps b { color: var(--pr-fg); }
.editor-steps .note { color: #8B95A8; }
@media (max-width: 640px) { .pr-bar .keys { display: none; } }
#prMore { display: none; }
@media (max-width: 640px) {
  .pr-bar { gap: 6px 8px; padding-top: 8px; }
  .pr-bar .x { display: none; }
  .pr-bar.more .x { display: inline-block; }
  #prMore { display: inline-block; }
  .pr-bar button { padding: 8px 10px; }
}

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; }
.foot { font-size: 12px; color: var(--muted); text-align: center; margin: 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Speech mode (the Speech Timer page sets <html data-variant="speech">) */
.speech-only { display: none !important; }
[data-variant="speech"] .speech-only { display: revert !important; }
[data-variant="speech"] .yt-only, [data-variant="speech"] .editor-pick { display: none !important; }

/* Practice timer (speech mode) */
.pt-view { border-radius: 12px; border: 1px solid var(--line); background: var(--field); padding: 18px 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; transition: background .3s, color .3s; }
.pt-time { font-family: var(--font-mono); font-weight: 600; font-size: clamp(48px, 9vw, 72px); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pt-state { font-size: 14px; font-weight: 600; color: var(--muted); }
.pt-view[data-light="green"] { background: #1F8A5B; border-color: #1F8A5B; color: #fff; }
.pt-view[data-light="yellow"] { background: #F2B035; border-color: #F2B035; color: #141821; }
.pt-view[data-light="red"] { background: #C4302B; border-color: #C4302B; color: #fff; }
.pt-view[data-light="green"] .pt-state, .pt-view[data-light="red"] .pt-state { color: #fff; }
.pt-view[data-light="yellow"] .pt-state { color: #141821; }
.pt-view:fullscreen { justify-content: center; border-radius: 0; gap: 16px; cursor: pointer; }
.pt-view:fullscreen .pt-time { font-size: min(30vw, 40vh); }
.pt-view:fullscreen .pt-state { font-size: clamp(18px, 3vw, 32px); }
