/* LOEP playable lectures (William, 2026-11-12): one 1080×1920 stage, scaled to the screen. The same page
   is recorded frame by frame for YouTube (tooling/lectures/render_lecture.mjs). */
@font-face { font-family: "Bangers"; src: url("/fonts/bangers-latin.v1.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "LOEP Type"; src: url("/fonts/special-elite-a.v1.woff2") format("woff2"); font-display: block; }
:root { --ink: #100e0b; --paper: #f3e9d3; --brass: #d6a64e; --plasma: #2fd3bd; --flare: #f2622e; --night: #0b1613; --night2: #12211c; --sky: #2fbfe0; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #050a08; overflow: hidden; }
body { display: flex; align-items: center; justify-content: center; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--paper); }
#wrap { position: relative; }
#stage { position: absolute; left: 0; top: 0; width: 1080px; height: 1920px; transform-origin: 0 0; background: var(--night); overflow: hidden; }
#stage::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 30%, #17302a 0, transparent 60%), repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 2px, transparent 2px 6px); pointer-events: none; }

#head { position: absolute; left: 40px; right: 40px; top: 20px; height: 130px; display: flex; align-items: center; gap: 22px; }
#head .badge { width: 96px; height: 96px; flex: none; border: 5px solid var(--ink); background: var(--brass); box-shadow: 6px 6px 0 var(--ink); display: grid; place-items: center; font: 400 34px/1 "Bangers", sans-serif; color: var(--ink); letter-spacing: 1px; }
#head .kicker { font: 400 26px/1 "LOEP Type", monospace; letter-spacing: 4px; text-transform: uppercase; color: var(--plasma); }
#head h1 { margin: 10px 0 0; font: 400 66px/0.95 "Bangers", sans-serif; letter-spacing: 1.5px; color: var(--paper); text-shadow: 4px 4px 0 var(--ink); }
#dots { position: absolute; right: 40px; top: 166px; display: flex; gap: 10px; }
#dots i { width: 22px; height: 8px; background: rgba(243,233,211,.18); }
#dots i.on { background: var(--brass); }
#dots i.now { background: var(--flare); width: 40px; }

#vis { position: absolute; left: 30px; top: 190px; width: 1020px; height: 1060px; border: 6px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); background: var(--night2); }
#stage.full #vis { left: 0; top: 0; width: 1080px; height: 1920px; border: 0; box-shadow: none; }
#stage.full #head, #stage.full #dots, #stage.full #notes { opacity: 0; }

#notes { position: absolute; left: 30px; right: 30px; top: 1290px; height: 360px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start; gap: 18px; }
.note { border: 5px solid var(--ink); background: var(--paper); color: var(--ink); padding: 22px 28px; font-size: 38px; line-height: 1.22; box-shadow: 8px 8px 0 var(--ink); transform-origin: 0 50%; }
.note b { color: #b4381a; }
.note table { width: 100%; border-collapse: collapse; font-size: 30px; }
.note th { text-align: left; font: 400 30px/1 "Bangers", sans-serif; letter-spacing: 1px; padding: 0 0 8px; }
.note td { padding: 6px 0; border-top: 2px solid rgba(16,14,11,.15); }
.note tr.lit td { background: #fbe2a6; }

#cap { position: absolute; left: 30px; right: 30px; top: 1672px; height: 200px; display: flex; align-items: flex-end; gap: 18px; }
#cap img { width: 150px; height: 200px; object-fit: contain; object-position: bottom; flex: none; filter: drop-shadow(4px 4px 0 var(--ink)); }
#cap .bubble { flex: 1; min-height: 150px; align-self: center; border: 5px solid var(--ink); background: var(--night); padding: 18px 26px; font-size: 40px; line-height: 1.22; box-shadow: 8px 8px 0 var(--ink); }
#cap .who { display: block; font: 400 26px/1 "LOEP Type", monospace; letter-spacing: 4px; text-transform: uppercase; margin-bottom: 8px; }
#cap .w { color: rgba(243,233,211,.55); }
#cap .w.said { color: var(--paper); }
#cap .w.now { color: var(--brass); }
#cap.kay .who { color: var(--flare); }
#cap.ash .who { color: var(--plasma); }
#stage.nocap #cap .bubble { visibility: hidden; }
#cap.none { visibility: hidden; }

#bar { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: rgba(243,233,211,.12); }
#bar i { display: block; height: 100%; width: 0; background: var(--flare); }

/* controls: the page only, never recorded */
#ui { position: absolute; inset: 0; }
#ui .tap { position: absolute; inset: 0; background: transparent; border: 0; cursor: pointer; }
#ui .play { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); width: 260px; height: 260px; border-radius: 50%; border: 8px solid var(--ink); background: var(--flare); box-shadow: 10px 10px 0 var(--ink); display: grid; place-items: center; font: 400 64px/1 "Bangers", sans-serif; color: var(--ink); pointer-events: none; }
#ui.playing .play { display: none; }
#ui .ctl { position: absolute; left: 30px; right: 30px; top: 40px; display: flex; gap: 16px; align-items: center; }
#ui .ctl button, #ui .ctl a { min-width: 110px; height: 88px; border: 5px solid var(--ink); background: var(--paper); color: var(--ink); font: 400 34px/1 "Bangers", sans-serif; letter-spacing: 1px; box-shadow: 6px 6px 0 var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0 20px; text-decoration: none; }
#ui .ctl input { flex: 1; accent-color: #f2622e; height: 40px; }
#ui.playing .ctl { opacity: 0; transition: opacity .3s; }
#ui.playing:hover .ctl, #ui.paused .ctl { opacity: 1; }
body.render #ui { display: none; }

/* ---- landscape (laptops): the visual left, notes and captions right (William, 2026-11-19) ---- */
body.land #stage { width: 1920px; height: 1080px; }
body.land #head { left: 40px; right: 680px; top: 18px; height: 120px; }
body.land #head h1 { font-size: 58px; }
body.land #dots { left: 1340px; right: auto; top: 70px; flex-wrap: wrap; width: 540px; }
body.land #vis { left: 30px; top: 150px; width: 1270px; height: 900px; }
body.land #notes { left: 1340px; right: 40px; top: 150px; height: 560px; gap: 14px; overflow: hidden; }
body.land .note { font-size: 30px; padding: 16px 22px; box-shadow: 6px 6px 0 var(--ink); }
body.land .note table { font-size: 24px; }
body.land .note th { font-size: 24px; }
body.land #cap { left: 1340px; right: 40px; top: 730px; height: 320px; align-items: flex-end; }
body.land #cap img { width: 110px; height: 160px; }
body.land #cap .bubble { font-size: 32px; padding: 14px 20px; min-height: 0; align-self: flex-end; }
body.land #cap .who { font-size: 22px; }
body.land #stage.full #vis { left: 0; top: 0; width: 1920px; height: 1080px; }
body.land #ui .play { top: 50%; }

/* ---- stops: "your turn", over the visual ---- */
#stop { position: absolute; left: 30px; top: 190px; width: 1020px; height: 1060px; z-index: 5; background: var(--paper); color: var(--ink); border: 6px solid var(--ink); box-shadow: 10px 10px 0 var(--flare); display: flex; flex-direction: column; transform-origin: 50% 50%; }
#stop[hidden] { display: none; }
body.land #stop { left: 30px; top: 150px; width: 1270px; height: 900px; }
.st-body { flex: 1; min-height: 0; padding: 30px 36px 10px; overflow: auto; display: flex; flex-direction: column; gap: 18px; }
.st-k { font: 400 30px/1 "LOEP Type", monospace; letter-spacing: 5px; color: #b4381a; }
.st-k span { color: #5f5646; }
.st-q { font: 700 40px/1.22 system-ui, sans-serif; }
body.land .st-q { font-size: 34px; }
.st-q sup, .st-q sub, .st-opt sup, .st-opt sub, .st-ex sup, .st-ex sub { font-size: 0.62em; }
.st-opts { display: flex; flex-direction: column; gap: 14px; }
body.land .st-opts { display: grid; grid-template-columns: 1fr 1fr; }
.st-opt { display: flex; align-items: center; gap: 20px; text-align: left; min-height: 96px; padding: 12px 22px; border: 5px solid var(--ink); background: #fffaf0; color: var(--ink); font: 600 36px/1.2 system-ui, sans-serif; box-shadow: 5px 5px 0 var(--ink); cursor: pointer; }
body.land .st-opt { font-size: 30px; min-height: 84px; }
.st-opt b { flex: none; width: 58px; height: 58px; display: grid; place-items: center; background: var(--ink); color: var(--paper); font: 400 36px/1 "Bangers", sans-serif; }
.st-opt.right { background: #c9f2d6; border-color: #157a3c; }
.st-opt.right b { background: #157a3c; }
.st-opt.wrong { background: #f8cfc4; border-color: #b4381a; }
.st-opt.wrong b { background: #b4381a; }
.st-opt.sent { opacity: 0.6; }
.st-count { display: flex; align-items: center; gap: 20px; font: 400 40px/1 "Bangers", sans-serif; letter-spacing: 1.5px; color: var(--ink); }
.st-count b { width: 84px; height: 84px; border-radius: 50%; background: var(--flare); border: 5px solid var(--ink); display: grid; place-items: center; font-size: 54px; font-weight: 400; }
.st-ex { border: 4px solid var(--ink); background: #fbe2a6; padding: 16px 22px; font: 500 32px/1.3 system-ui, sans-serif; white-space: pre-line; }
body.land .st-ex { font-size: 26px; }
.st-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 36px 26px; }
.st-foot:empty { display: none; }
.st-msg { font: 700 34px/1.2 system-ui, sans-serif; }
.st-skip, .st-go { flex: none; min-height: 88px; padding: 0 30px; border: 5px solid var(--ink); background: var(--paper); color: var(--ink); font: 400 38px/1 "Bangers", sans-serif; letter-spacing: 1px; box-shadow: 5px 5px 0 var(--ink); cursor: pointer; }
.st-go { background: var(--flare); }
.st-row { display: flex; justify-content: center; }
.st-hint { font: 600 32px/1.25 system-ui, sans-serif; color: #5f5646; }
.st-ok { font: 700 34px/1.2 system-ui, sans-serif; color: #157a3c; }
/* labelling */
.st-fig { width: 100%; flex: 1; min-height: 0; background: var(--night2); border: 4px solid var(--ink); }
.st-dot { cursor: pointer; }
.st-dot circle { fill: var(--flare); stroke: var(--ink); stroke-width: 6; }
.st-dot text { font: 400 40px/1 "Bangers", sans-serif; text-anchor: middle; fill: var(--ink); }
.st-dot rect { fill: var(--paper); stroke: var(--ink); stroke-width: 5; }
.st-dot.placed circle { fill: #3fd17a; }
.st-dot.miss circle { fill: #b4381a; }
.st-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.st-chip { min-height: 72px; padding: 0 24px; border: 5px solid var(--ink); background: #fffaf0; color: var(--ink); font: 400 36px/1 "Bangers", sans-serif; letter-spacing: 1px; box-shadow: 4px 4px 0 var(--ink); cursor: pointer; }
.st-chip.on { background: var(--brass); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.st-chip.used { opacity: 0.3; pointer-events: none; }
/* build */
.st-build { display: grid; grid-template-columns: 1fr; gap: 14px; justify-items: center; }
body.land .st-build { grid-template-columns: 1fr 1fr; align-items: center; }
.st-sym { font: 900 64px/1 system-ui, sans-serif; }
.st-sym sup, .st-sym sub { font-size: 0.5em; }
body.land .st-sym { grid-column: 1 / -1; }
.st-atom { width: 440px; height: 440px; background: var(--night2); border: 4px solid var(--ink); border-radius: 50%; }
body.land .st-atom { width: 420px; height: 420px; }
.st-atom .sh { fill: none; stroke: rgba(243,233,211,.3); stroke-width: 3; stroke-dasharray: 8 10; }
.st-atom .p { fill: #e0603f; stroke: var(--ink); stroke-width: 3; }
.st-atom .n { fill: #93a1aa; stroke: var(--ink); stroke-width: 3; }
.st-atom .e { fill: #2fbfe0; stroke: var(--ink); stroke-width: 3; }
.st-ctrs { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 640px; }
.st-ctr { display: grid; grid-template-columns: 1fr 88px 90px 88px; align-items: center; gap: 10px; font: 400 40px/1 "Bangers", sans-serif; letter-spacing: 1px; }
.st-ctr span { padding-left: 14px; border-left: 14px solid; }
.st-ctr.p span { border-color: #e0603f; }
.st-ctr.n span { border-color: #93a1aa; }
.st-ctr.e span { border-color: #2fbfe0; }
.st-ctr button { height: 80px; border: 5px solid var(--ink); background: #fffaf0; font: 400 50px/1 "Bangers", sans-serif; box-shadow: 4px 4px 0 var(--ink); cursor: pointer; }
.st-ctr b { text-align: center; font-size: 56px; font-weight: 400; }
/* sort */
.st-sort { display: flex; flex-direction: column; gap: 12px; }
body.land .st-sort { display: grid; grid-template-columns: 1fr 1fr; }
.st-item { display: grid; grid-template-columns: 1fr 170px 170px; gap: 12px; align-items: center; padding: 10px 14px; border: 4px solid var(--ink); background: #fffaf0; }
body.land .st-item { grid-template-columns: 1fr 140px 140px; }
.st-item .t { font: 700 38px/1.1 system-ui, sans-serif; }
body.land .st-item .t { font-size: 32px; }
.st-item button { height: 76px; border: 4px solid var(--ink); background: var(--paper); font: 400 34px/1 "Bangers", sans-serif; letter-spacing: 1px; cursor: pointer; }
.st-item.right { background: #c9f2d6; }
.st-item.right button.on { background: #157a3c; color: var(--paper); }
.st-item.wrong { background: #f8cfc4; }
.st-item.wrong button.on { background: #b4381a; color: var(--paper); }
#ui.stopped .play, #ui.stopped .tap { display: none; }
#ui.stopped .ctl { opacity: 1; }
/* phones: the stop's text as large as the panel allows */
body:not(.land) .st-q { font-size: 46px; }
body:not(.land) .st-opt { font-size: 42px; min-height: 116px; }
body:not(.land) .st-opt b { width: 66px; height: 66px; font-size: 42px; }
body:not(.land) .st-item .t { font-size: 42px; }
body:not(.land) .st-ex { font-size: 34px; }
/* the lock: the full lesson without a pass (app/api/lecture/[slug]/[file]) */
#lock { position: absolute; inset: 0; z-index: 9; background: var(--night, #14102a); color: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; padding: 80px; text-align: center; }
#lock .lk-k { font: 400 44px/1 "Bangers", sans-serif; background: var(--flare); color: var(--ink); border: 5px solid var(--ink); padding: 10px 26px; }
#lock h2 { font: 400 96px/1 "Bangers", sans-serif; margin: 0; letter-spacing: 1px; }
#lock p { font-size: 44px; line-height: 1.35; margin: 0; max-width: 900px; }
#lock a { display: inline-flex; align-items: center; justify-content: center; min-height: 120px; padding: 0 50px; border: 6px solid var(--ink); font: 400 52px/1 "Bangers", sans-serif; text-decoration: none; box-shadow: 10px 10px 0 var(--ink); }
#lock .lk-go { background: var(--flare); color: var(--ink); }
#lock .lk-alt { background: var(--paper); color: var(--ink); font-size: 40px; }
