@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Apple graphite */
:root {
  --bg: #1c1c1e;
  --surface: #232325;
  --text: #f2f2f7;
  --muted: #98989d;
  --faint: #636366;
  --hair: #333336;
  --track: #2c2c2e;
  --tile: #48484a;
  --field: #2c2c2e;
  --field-border: #3a3a3c;
  --ok: #30d158;
  --warn: #ff9f0a;
  --danger: #ff453a;
  --ease: cubic-bezier(.25, .8, .25, 1);
  /* subtitle screen */
  --s-bg: #0f0f11;
  --s-text: #f3f3f1;
  --s-muted: #8a8a8e;
  --s-hair: rgba(128, 128, 128, .22);
}

* { box-sizing: border-box; }
/* "hidden" always wins over display rules like .stack / .summary. */
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.app { display: grid; grid-template-columns: 25rem minmax(0, 1fr); grid-template-rows: auto 1fr; height: 100vh; }
@media (max-width: 900px) { .app { grid-template-columns: 1fr; grid-template-rows: auto auto auto; height: auto; } }

.bar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 0 1.4rem; height: 3.25rem; border-bottom: 1px solid var(--hair); }
.title { font-size: 13px; font-weight: 600; }
.state { position: relative; color: var(--faint); display: flex; transition: color .3s; }
.state i { position: absolute; right: -2px; bottom: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 2px var(--bg); transition: background .3s; }
.state.ok { color: var(--text); }
.state.ok i { background: var(--ok); }
.state.bad { color: var(--danger); }
.state.bad i { background: var(--danger); }

/* ---------- inspector (left) ---------- */

.inspector { background: var(--surface); border-right: 1px solid var(--hair); overflow-y: auto; display: flex; flex-direction: column; }
@media (max-width: 900px) { .inspector { border-right: 0; border-bottom: 1px solid var(--hair); } }
.group { padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--hair); display: flex; flex-direction: column; gap: .9rem; }
.group[hidden] { display: none; }
.field { display: flex; align-items: center; gap: .85rem; min-height: 2.5rem; }
.field.top { align-items: flex-start; }
/* Icon tiles, like macOS System Settings: big enough to read at a glance. */
.tile { width: 2.25rem; height: 2.25rem; flex: none; border-radius: 9px; background: var(--track); display: grid; place-items: center; color: var(--text); }
.tile .ico { width: 19px; height: 19px; }
.stack { display: flex; flex-direction: column; gap: .3rem; }
.stack small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.grow { flex: 1; min-width: 0; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.field > .ico { color: var(--muted); }
.ico.sm { width: 15px; height: 15px; }

select, input, textarea {
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--field-border);
  border-radius: 8px;
  padding: .55rem .7rem;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
select { appearance: none; padding-right: 1.6rem; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 13px) 55%, calc(100% - 9px) 55%; background-size: 4px 4px; background-repeat: no-repeat; }
select option { background: var(--surface); }
textarea { resize: vertical; min-height: 8.5rem; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--muted); box-shadow: 0 0 0 3px rgba(152, 152, 157, .22); }
::placeholder { color: var(--faint); }

.meter { height: 4px; background: var(--track); border-radius: 2px; overflow: hidden; margin-top: .55rem; }
.meter i { display: block; height: 100%; background: var(--ok); transform-origin: left; transform: scaleX(0); transition: transform .08s linear; }

/* macOS segmented control with a sliding tile */
.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--track); border-radius: 8px; padding: 2px; }
.seg label { position: relative; z-index: 1; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; width: auto; }
.seg span { display: flex; align-items: center; justify-content: center; gap: .4rem; padding: .4rem .5rem; min-height: 2.15rem; font-size: 13px; font-weight: 500; color: var(--muted); transition: color .2s; }
.seg label:hover span, .seg input:checked + span { color: var(--text); }
.seg input:focus-visible + span { outline: 2px solid var(--muted); outline-offset: -2px; border-radius: 6px; }
.seg-pill { position: absolute; top: 2px; bottom: 2px; left: 2px; border-radius: 6px; background: var(--tile); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.seg.ready .seg-pill { transition: transform .3s var(--ease), width .3s var(--ease); }

/* Language chips: on = filled, off = outlined. */
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; }
.chips label { cursor: pointer; position: relative; }
.chips input { position: absolute; opacity: 0; pointer-events: none; width: auto; }
.chips span { display: block; text-align: center; padding: .55rem 0; border-radius: 8px; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; color: var(--faint); box-shadow: inset 0 0 0 1px var(--field-border); transition: background .2s, color .2s, box-shadow .2s; }
.chips input:checked + span { background: var(--tile); color: var(--text); box-shadow: none; }
.chips input:focus-visible + span { outline: 2px solid var(--muted); outline-offset: 1px; }

.go { margin-top: auto; padding: 1.2rem 1.4rem 1.4rem; }
button { font: inherit; cursor: pointer; border: 0; transition: opacity .15s, transform .15s var(--ease), background .15s; }
button:active { transform: scale(.985); }
button:disabled { opacity: .45; cursor: default; transform: none; }
.primary { width: 100%; border-radius: 10px; padding: .85rem; font-size: 14px; font-weight: 600; color: #1c1c1e; background: var(--text); display: flex; align-items: center; justify-content: center; gap: .4rem; }
.primary:hover:not(:disabled) { opacity: .88; }
#error { color: var(--danger); min-height: 1.2em; margin: .7rem 0 0; font-size: 12.5px; text-align: center; }

/* ---------- stage (right) ---------- */

.stage { min-width: 0; overflow-y: auto; padding: 2rem clamp(1.2rem, 3.5vw, 3rem); display: flex; flex-direction: column; gap: 1.6rem; align-items: center; justify-content: center; justify-content: safe center; }
.monitor { width: 100%; max-width: 62rem; }

/* ---------- the subtitle screen (preview + full screen) ---------- */

#screen {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: var(--s-bg);
  color: var(--s-text);
  padding: 4% 5%;
  display: flex;
  flex-direction: column;
  gap: 3%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 60px -24px rgba(0, 0, 0, .7);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  transition: background .5s var(--ease), color .5s var(--ease);
  overflow: hidden;
}
#screen.light { --s-bg: #f6f4ee; --s-text: #141414; --s-muted: #77756f; --s-hair: rgba(0, 0, 0, .12); }
body.running #screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  aspect-ratio: auto;
  border-radius: 0;
  padding: 3.5vh 4.5vw 3vh;
  gap: 2.5vh;
  box-shadow: none;
  cursor: none;
}
body.running.controls #screen { cursor: default; }

.block { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.block[hidden] { display: none; }
#block-en { flex: .7; }
#block-en .lines { font-weight: 400; color: color-mix(in srgb, var(--s-text) 78%, var(--s-muted)); }
/* Words just heard, not final yet: a step quieter, they brighten when final. */
.line .draft { opacity: .85; transition: opacity .3s; }
/* A hairline between visible blocks. */
.block:not([hidden]) ~ .block:not([hidden]) { border-top: 1px solid var(--s-hair); padding-top: 2%; }
body.running .block:not([hidden]) ~ .block:not([hidden]) { padding-top: 1.8vh; }
.label { font-size: max(8px, 1.15vmin); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--s-muted); margin-bottom: 1.2%; }
body.running .label { font-size: max(13px, 1.7vh); margin-bottom: 1.2vh; }
.viewport { flex: 1; overflow: hidden; position: relative; }
.lines { position: absolute; inset: 0; font-weight: 500; letter-spacing: -.01em; line-height: var(--lh); }
.lines.glide { transition: transform 280ms cubic-bezier(.2, .7, .2, 1); }
.line { white-space: nowrap; height: var(--lh); opacity: .62; transition: opacity 300ms; }
.line:last-child { opacity: 1; }
/* Pages (flow=3): every line on the page is current text; nothing is dimmed. */
.lines.paged .line { opacity: 1; }

#controls { position: absolute; right: 2%; top: 3%; display: none; gap: .5rem; opacity: 0; pointer-events: none; transition: opacity 200ms; }
body.running #controls { display: flex; }
body.running.controls #controls { opacity: 1; pointer-events: auto; }
#controls button { background: rgba(44, 44, 46, .92); color: #f2f2f7; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
#controls button:hover { background: #3a3a3c; }
#screen.light #controls button { background: rgba(255, 255, 255, .92); color: #141414; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }

#status { position: absolute; right: 1.2%; bottom: 1.6%; width: 8px; height: 8px; border-radius: 50%; background: transparent; transition: background .3s; }
#status.ok { background: var(--ok); opacity: .5; }
#status.warn { background: var(--warn); }
#status.bad { background: var(--danger); }
#warning { position: absolute; right: calc(1.2% + 16px); bottom: calc(1.6% - 4px); font-size: max(11px, 1.4vmin); font-weight: 600; color: var(--danger); font-family: -apple-system, "Segoe UI", system-ui, sans-serif; }
#warning:empty { display: none; }

/* ---------- test ---------- */

.test { width: 100%; max-width: 62rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.rec { position: relative; width: 52px; height: 52px; border-radius: 50%; background: var(--surface); color: var(--text); display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--hair); }
.rec:hover:not(:disabled) { background: #2c2c2e; }
.rec .ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.rec .ring circle { fill: none; stroke-width: 2.5; }
.rec .ring .track { stroke: transparent; }
.rec .ring .fill { stroke: var(--danger); stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
.rec .glyph { width: 20px; height: 20px; }
.rec.recording { color: var(--danger); }
.rec.recording .ring .track { stroke: var(--track); }
/* Connecting: the ring fills grey step by step; it turns red when recording starts. */
.rec.connecting .ring .track { stroke: var(--track); }
.rec.connecting .ring .fill { stroke: var(--muted); }
.rec.connecting { color: var(--muted); }
.rec.finishing .ring .fill { stroke: var(--muted); animation: pulse-ring 1s ease-in-out infinite; }
@keyframes pulse-ring { 50% { opacity: .35; } }
.clock { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 3.6rem; }
.rec.recording + .clock { color: var(--text); }
.stats { display: flex; gap: .4rem; margin: 0; flex-wrap: wrap; }
.stats div { display: flex; align-items: center; gap: .45rem; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); border-radius: 8px; padding: .45rem .7rem; }
.stats dt { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--muted); display: flex; }
.stats dd { margin: 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stats div.bad dd { color: var(--danger); }
#test-state { flex-basis: 100%; margin: 0; font-size: 12.5px; color: var(--muted); min-height: 1em; }
#test-state:empty { display: none; }

/* ---------- confirm dialog ---------- */

dialog { border: 0; padding: 0; border-radius: 14px; background: var(--surface); color: var(--text); width: min(26rem, calc(100vw - 2rem)); box-shadow: 0 0 0 1px var(--hair), 0 30px 80px rgba(0, 0, 0, .55); }
dialog[open] { animation: pop .22s var(--ease); }
dialog::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); animation: fade .22s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes fade { from { opacity: 0; } }
dialog form { padding: 1.4rem; display: flex; flex-direction: column; gap: 1rem; }
dialog h3 { margin: 0; font-size: 17px; font-weight: 600; }
.summary { display: flex; flex-wrap: wrap; gap: .4rem; }
.summary span { display: inline-flex; align-items: center; gap: .35rem; background: var(--track); border-radius: 7px; padding: .35rem .6rem; font-size: 12.5px; font-weight: 500; color: var(--text); }
#confirm-error { margin: 0; color: var(--danger); font-size: 12.5px; }
#confirm-error:empty { display: none; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.ghost { border-radius: 10px; padding: .85rem; font-size: 14px; font-weight: 600; color: var(--text); background: var(--track); }
.ghost:hover { background: #3a3a3c; }

/* ---------- test history ---------- */

.history { width: 100%; max-width: 62rem; display: flex; align-items: flex-start; gap: .6rem; margin-top: -.4rem; }
#history-list { flex: 1; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
#history-list li { position: relative; display: flex; align-items: center; gap: .7rem; padding: .35rem .5rem .35rem .35rem; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); overflow: hidden; animation: pop .25s var(--ease); }
#history-list li.playing { box-shadow: inset 0 0 0 1px var(--muted); }
#history-list .when { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 3.2rem; }
#history-list .kind { font-size: 12px; color: var(--muted); min-width: 2.6rem; font-variant-numeric: tabular-nums; }
#history-list a.icon-btn { text-decoration: none; }
#history-list .nums { display: flex; gap: .9rem; flex: 1; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
#history-list .nums b { color: var(--text); font-weight: 600; margin-left: .3rem; }
#history-list .bar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--text); transform-origin: left; transform: scaleX(0); }
.play { width: 34px; height: 34px; border-radius: 50%; background: var(--track); color: var(--text); display: grid; place-items: center; flex: none; }
.play:hover { background: #3a3a3c; }
.play .ico { width: 15px; height: 15px; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; background: transparent; color: var(--faint); display: grid; place-items: center; flex: none; }
.icon-btn:hover { color: var(--text); background: var(--track); }
.icon-btn .ico { width: 16px; height: 16px; }

/* Reading script for the test */
.script { flex-basis: 100%; margin: .2rem 0 0; display: flex; align-items: flex-start; gap: .6rem; padding: .85rem 1rem; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); transition: box-shadow .3s; }
.script blockquote { flex: 1; margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); transition: color .3s; }
.rec.recording ~ .script { box-shadow: inset 0 0 0 1px var(--muted); }
.rec.recording ~ .script blockquote { color: var(--text); }

#timeline { flex-basis: 100%; width: 100%; height: 96px; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); }

/* Version of the app, small in the corner of the setup screen (not on the subtitle screen). */
#version { position: fixed; right: .7rem; bottom: .5rem; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; pointer-events: none; z-index: 5; }
body.running #version { display: none; }

/* A new word fades in, so the eye finds where the text goes on (FRESH_MS in app.js). */
.line .fresh { animation: fresh 450ms ease-out both; }
@keyframes fresh { from { opacity: .25; } to { opacity: 1; } }

/* Glossary: label row with the file button */
.glossary-head { display: flex; align-items: center; gap: .5rem; }
.glossary-head small:first-child { flex: none; }
.glossary-head #glossary-note { flex: 1; color: var(--ok); font-size: 11.5px; }
.glossary-head .icon-btn { width: 26px; height: 26px; margin-left: auto; cursor: pointer; }

/* Pre-flight checklist (Příprava) */
.go .wide { width: 100%; display: flex; align-items: center; justify-content: center; gap: .4rem; margin-bottom: .6rem; }
.ghost.sm { padding: .45rem .75rem; font-size: 12.5px; border-radius: 8px; flex: none; }
.ghost.sm.on { background: var(--text); color: #1c1c1e; }
body.preflight .test, body.preflight #history, body.preflight #timeline { display: none; }
.pf { width: 100%; max-width: 62rem; background: var(--surface); border-radius: 14px; box-shadow: inset 0 0 0 1px var(--hair); padding: .9rem 1.1rem 1rem; }
.pf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.pf-head h2 { margin: 0; font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: .5rem; }
.pf-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pf-row { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--hair); }
.pf-row:first-child { border-top: 0; }
.pf-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.pf-body b { font-size: 13.5px; font-weight: 600; }
.pf-detail { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pf-body blockquote { margin: .35rem 0 0; padding: .55rem .75rem; background: var(--track); border-radius: 8px; font-size: 14px; line-height: 1.45; color: var(--text); }
.pf-st { width: 22px; height: 22px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--tile); position: relative; }
.pf-row[data-state="wait"] .pf-st { box-shadow: inset 0 0 0 2px var(--tile); border-top: 2px solid var(--text); animation: spin .9s linear infinite; }
.pf-row[data-state="ok"] .pf-st { background: var(--ok); box-shadow: none; }
.pf-row[data-state="warn"] .pf-st { background: var(--warn); box-shadow: none; }
.pf-row[data-state="bad"] .pf-st { background: var(--danger); box-shadow: none; }
.pf-row[data-state="ok"] .pf-st::after { content: ""; position: absolute; left: 7px; top: 4px; width: 5px; height: 10px; border: solid #1c1c1e; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pf-row[data-state="warn"] .pf-st::after, .pf-row[data-state="bad"] .pf-st::after { content: "!"; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #1c1c1e; }
@keyframes spin { to { transform: rotate(360deg); } }
.pf-foot { display: flex; align-items: center; gap: 1rem; margin-top: .6rem; padding-top: .8rem; border-top: 1px solid var(--hair); }
.pf-foot #pf-summary { flex: 1; font-size: 13px; font-weight: 600; }
.pf-foot #pf-summary.ok { color: var(--ok); }
.pf-foot #pf-summary.todo { color: var(--muted); }
.pf-foot #pf-summary.bad { color: var(--danger); }
.pf-foot .primary { width: auto; padding: .7rem 1.4rem; }
/* Projector check: the subtitle screen full size, without a running session. */
body.pcheck #screen { position: fixed; inset: 0; z-index: 10; aspect-ratio: auto; border-radius: 0; padding: 3.5vh 4.5vw 3vh; gap: 2.5vh; box-shadow: none; cursor: pointer; }
body.pcheck .block:not([hidden]) ~ .block:not([hidden]) { padding-top: 1.8vh; }
body.pcheck .label { font-size: max(13px, 1.7vh); margin-bottom: 1.2vh; }
/* Confirm: rehearsal toggle */
.rehearsal { display: flex; align-items: center; gap: .5rem; font-size: 13px; color: var(--muted); margin: .2rem 0 .6rem; cursor: pointer; }
.rehearsal input { width: auto; }
.rehearsal[hidden] { display: none; }
/* Příprava open: a smaller preview, so the whole checklist fits on a laptop screen. */
body.preflight .monitor { max-width: 40rem; }
body.preflight #version { display: none; }
#pf-open[aria-pressed="true"] { background: var(--tile); }

/* Příprava v2 (owner, 26 Oct): one thing to do per row, a plain record button, the passage
   marks itself while being read. */
.pf-act { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .5rem; margin-top: .45rem; padding: .6rem .8rem; border-radius: 8px; font-size: 13.5px; line-height: 1.35; }
.pf-act[hidden] { display: none; }
.pf-act b { font-weight: 650; }
.pf-act small { font-size: 12.5px; opacity: .8; }
.pf-act.warn { background: rgba(255, 159, 10, .14); color: #ffb340; }
.pf-act.bad { background: rgba(255, 69, 58, .14); color: #ff7b72; }
.pf-row[data-state="ok"] .pf-detail { color: var(--text); }
.pf-rec { display: flex; align-items: center; gap: .4rem; padding: .55rem .95rem; border-radius: 999px; background: var(--track); color: var(--text); font-size: 13px; font-weight: 600; flex: none; min-width: 7.2rem; justify-content: center; }
.pf-rec:hover:not(:disabled) { background: #3a3a3c; }
.pf-rec .ico { width: 16px; height: 16px; }
.pf-rec.recording { background: var(--danger); color: #fff; }
.pf-rec.recording:hover { background: #ff5b51; }
#pf-text { color: var(--muted); }
#pf-text .ok { color: var(--text); transition: color .25s; }
#pf-text.done .ok { color: var(--text); }
#pf-text .miss { color: #ff7b72; text-decoration: underline wavy rgba(255, 69, 58, .55); text-underline-offset: 4px; }
#pf-text .miss[data-heard]::after { content: " → " attr(data-heard); font-size: 12px; color: var(--muted); text-decoration: none; display: inline-block; margin-left: .15rem; }
.pf-row:has(.pf-rec.recording) #pf-text { box-shadow: inset 0 0 0 1px rgba(255, 69, 58, .55); }
.pf-foot #pf-summary.warn { color: var(--warn); }
/* Projector check bar, over the full-screen subtitles: like the controls of a running screen,
   it shows when the mouse moves and hides after 2.5 s, so the screen is judged clean. */
#pcheck-bar { display: none; }
body.pcheck #pcheck-bar { opacity: 0; pointer-events: none; transition: opacity .2s; }
body.pcheck.controls #pcheck-bar { opacity: 1; pointer-events: auto; }
body.pcheck:not(.controls) #screen { cursor: none; }
body.pcheck #pcheck-bar { display: flex; position: fixed; z-index: 11; left: 50%; bottom: 3vh; transform: translateX(-50%); align-items: center; gap: .7rem; padding: .6rem .7rem .6rem 1.1rem; border-radius: 14px; background: rgba(36, 36, 38, .96); box-shadow: 0 10px 40px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .08); color: #f2f2f7; font: 600 14px -apple-system, "Segoe UI", system-ui, sans-serif; white-space: nowrap; }
#pcheck-bar .pc-theme { display: flex; background: #2c2c2e; border-radius: 9px; padding: 2px; }
#pcheck-bar .pc-theme button { display: flex; align-items: center; gap: .35rem; padding: .45rem .7rem; border-radius: 7px; background: transparent; color: #98989d; font-size: 13px; font-weight: 600; }
#pcheck-bar .pc-theme button.on { background: #48484a; color: #f2f2f7; }
#pcheck-bar .primary { width: auto; padding: .6rem 1rem; }
#pcheck-bar .ghost.sm { background: #2c2c2e; }

/* The client's demo: microphone, speaker, "Ukázka živých titulků" and "Ukázka přednášky"; a small
   "Ukázka" on the screen; her runs below the preview with a replay button (no delay numbers). */
#ukazka-label { display: none; }
body.ukazka #ukazka-label { display: block; position: absolute; left: 1.4%; bottom: 1.2%; font: 600 max(10px, 1.2vmin) -apple-system, "Segoe UI", system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--s-muted); opacity: .7; }
body.ukazka.running #ukazka-label { font-size: max(12px, 1.4vh); }
body.ukazka #pf-open, body.ukazka #test, body.ukazka #timeline, body.ukazka #version,
body.ukazka #history .nums, body.ukazka #history .review,
body.ukazka .field:has(#topic), body.ukazka .field:has(#glossary), body.ukazka .group:has(.chips), body.ukazka #rehearsal-row { display: none !important; }

/* The demo's lecture view: video left, the subtitle screen right; the setup panel is not shown. */
#lecture-open, #lecture-back, .lecture { display: none; }
body.ukazka #lecture-open { display: flex; }
body.lecture-on #lecture-back { display: inline-grid; margin-right: .5rem; vertical-align: middle; }
body.lecture-on .app { grid-template-columns: minmax(0, 1fr); }
body.lecture-on .inspector, body.lecture-on #pf, body.lecture-on .test, body.lecture-on #history, body.lecture-on #version { display: none !important; }
body.lecture-on .stage { flex-direction: row; align-items: center; gap: 1.2rem; }
body.lecture-on .lecture { display: block; flex: 1 1 0; min-width: 0; }
body.lecture-on .monitor { flex: 1 1 0; min-width: 0; max-width: none; }
.lecture video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 60px -24px rgba(0, 0, 0, .7); }
@media (max-width: 900px) { body.lecture-on .stage { flex-direction: column; } }

/* The Zoom band on her video (English, Czech, German, two lines each), beside the projector screen. */
body.lecture-on .lecture { position: relative; }
/* At the top of the picture: the video's own play bar opens over the bottom, and her room camera
   has the people at the bottom of the frame (only ceiling at the top). */
.band { position: absolute; left: 0; right: 0; top: 0; height: 44%; padding: 1.6% 3.5% 1.6% 2.5%; display: flex; flex-direction: column; gap: 3.5%; background: rgba(10, 10, 12, .66); border-radius: 6px 6px 0 0; pointer-events: none; color: #f3f3f1; font-family: "Inter", "Segoe UI", system-ui, sans-serif; }
/* A short tag (EN/CS/DE) in a narrow column instead of a label row: more height for the text. */
.band-block { flex: 1; display: flex; flex-direction: row; gap: 2.2%; min-height: 0; }
.band-label { flex: none; width: 1.9em; padding-top: .45em; font-size: 10px; font-weight: 600; letter-spacing: .1em; color: rgba(255, 255, 255, .5); }
.band .viewport { flex: 1; position: relative; overflow: hidden; }
.band .lines { position: absolute; inset: 0; font-weight: 500; letter-spacing: -.01em; line-height: var(--lh); }
.band .line { opacity: 1; }
body.ukazka #history .del { margin-left: auto; }
#band-en .lines { font-weight: 400; color: rgba(243, 243, 241, .82); }
