Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300:root { --bg: #0d0f12; --panel: #16191e; --panel-2: #1e222a; --line: #2c3138; --fg: #e6e8ea; --muted: #9aa3ad; --accent: #4c9fc4; --bad: #e06c75; --good: #7fbf7f; --radius: 8px; --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace; --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); font-family: var(--sans); overflow: hidden;}
/* The slide box: letterboxed to the deck's own aspect ratio, so a 16:9 deck on a 4:3 screen stays undistorted and the video overlays stay aligned. */.stage { position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden;}
.slide { position: relative; background: #fff; box-shadow: 0 2px 24px rgba(0, 0, 0, 0.5); /* Sized by JS to preserve the page aspect ratio inside .stage. */}
.slide img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none;}
/* Video overlays are positioned as fractions of the slide, so they track the slide box at any screen size. */.overlay { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h); overflow: hidden; background: #000; border-radius: 4px;}
/* Enlarged: the clip leaves the slide box and takes the whole viewport. Deliberately CSS rather than the Fullscreen API, which needs a user gesture the cast screen may never receive -- it is driven from the presenter console, and a remote request to requestFullscreen() would simply be refused. */.overlay.enlarged { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; z-index: 15;}
.overlay.enlarged video { object-fit: contain; }
.overlay video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block;}
.overlay .status { position: absolute; inset: 0; display: grid; place-items: center; gap: 0.5em; font-size: 0.85rem; color: var(--muted); background: #111; text-align: center; padding: 1em;}
.overlay .status.failed { color: var(--bad); }
/* --- display view --- */
body.display { background: #000; cursor: none; }body.display.armed .prompt { display: none; }body.display .stage.blank .slide { visibility: hidden; }
.prompt { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.82); z-index: 10; cursor: pointer; font-size: 1.1rem; color: var(--muted); text-align: center; padding: 2rem;}
.disconnected { position: fixed; top: 0.75rem; right: 0.75rem; padding: 0.3rem 0.6rem; border-radius: var(--radius); background: var(--bad); color: #1b1013; font-size: 0.75rem; font-weight: 600; z-index: 12;}
.disconnected[hidden] { display: none; }
/* --- presenter view --- */
body.presenter { cursor: auto; display: grid; grid-template-rows: auto 1fr; gap: 0.75rem; padding: 0.75rem; height: 100vh;}
.bar { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;}
.bar .spacer { flex: 1; }
.clock, .timer { font-family: var(--mono); font-size: 1.4rem; font-variant-numeric: tabular-nums;}
.timer { color: var(--accent); }
.counter { font-family: var(--mono); color: var(--muted); font-size: 0.95rem;}
button { font: inherit; font-size: 0.85rem; color: var(--fg); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.35rem 0.7rem; cursor: pointer;}
button:hover:not(:disabled) { border-color: var(--accent); }button:disabled { opacity: 0.4; cursor: default; }button.on { background: var(--accent); color: #0d0f12; border-color: var(--accent); }
.panes { display: grid; grid-template-columns: 3fr 2fr; grid-template-rows: 1fr auto; gap: 0.75rem; min-height: 0;}
.pane { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem; min-height: 0; display: flex; flex-direction: column; gap: 0.4rem;}
.pane h2 { margin: 0; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);}
.pane .stage { min-height: 0; flex: 1; }
#notes { font-size: 1.05rem; line-height: 1.5; overflow-y: auto; flex: 1;}
#notes > :first-child { margin-top: 0; }#notes > :last-child { margin-bottom: 0; }#notes p { margin: 0 0 0.6em; }#notes ul, #notes ol { margin: 0 0 0.6em; padding-left: 1.4em; }#notes li { margin-bottom: 0.2em; }#notes h1, #notes h2, #notes h3,#notes h4, #notes h5, #notes h6 { margin: 0 0 0.4em; font-size: 1em; color: var(--accent); text-transform: none; letter-spacing: 0;}
#notes code { font-family: var(--mono); font-size: 0.9em; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 0.05em 0.3em;}
#notes a { color: var(--accent); }#notes strong { color: #fff; }
#notes:empty::after { content: "No notes for this slide."; color: var(--muted); font-style: italic;}
.pane.wide { grid-column: 1 / -1; max-height: 9rem; }
#outline { overflow-y: auto; display: flex; flex-wrap: wrap; gap: 0.3rem;}
#outline button { font-size: 0.75rem; padding: 0.2rem 0.5rem; font-family: var(--mono);}
#outline button.current { background: var(--accent); color: #0d0f12; border-color: var(--accent);}
#outline button.sub { opacity: 0.65; }
.errors { position: fixed; left: 0.75rem; right: 0.75rem; bottom: 0.75rem; max-height: 40vh; overflow-y: auto; background: #2a1b1e; border: 1px solid var(--bad); border-radius: var(--radius); padding: 0.75rem 1rem; font-family: var(--mono); font-size: 0.8rem; white-space: pre-wrap; z-index: 20;}
.errors[hidden] { display: none; }.errors .where { color: var(--muted); }.errors .hint { color: var(--accent); }