:root { --bg: #050407; --ink: #f3e6cc; --dim: #9a8f7c; --gold: #e8b85c; --line: rgba(243,230,204,.18); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: Nunito, "Segoe UI", sans-serif; overflow: hidden; }
#stage { position: fixed; inset: 0; display: grid; place-items: center; }
#film { width: min(100vw, calc(100vh * 16 / 9)); height: auto; aspect-ratio: 16 / 9; display: block; background: #000; }
body.idle #stage { cursor: none; }

.veil { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 60%, rgba(60,38,14,.35), rgba(0,0,0,.92) 70%); transition: opacity .9s; z-index: 5; }
.veil.hidden { opacity: 0; pointer-events: none; }
.start-inner { text-align: center; padding: 16px; }
.kicker { letter-spacing: .5em; text-transform: uppercase; font-size: 12px; color: var(--dim); margin: 0 0 6px; }
h1 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; font-size: clamp(48px, 10vw, 112px); letter-spacing: .18em; margin: 0; text-shadow: 0 0 40px rgba(255,184,74,.45); }
.blurb { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: clamp(18px, 3vw, 26px); color: #d9c9a8; margin: 6px 0 34px; }
.begin { font: 800 15px Nunito, sans-serif; letter-spacing: .3em; text-transform: uppercase; color: #1a1206; background: linear-gradient(#ffd27a, #e8a23a); border: 0; border-radius: 999px; padding: 16px 34px; cursor: pointer; box-shadow: 0 0 40px rgba(255,180,70,.45); transition: transform .15s, box-shadow .2s; }
.begin:hover { transform: translateY(-1px) scale(1.03); box-shadow: 0 0 60px rgba(255,180,70,.7); }
.hint { color: var(--dim); font-size: 13px; margin: 18px 0 8px; }
.link { background: none; border: 0; color: var(--gold); font: 700 13px Nunito, sans-serif; letter-spacing: .15em; text-transform: uppercase; cursor: pointer; padding: 8px; }

.chap-inner { width: min(720px, calc(100vw - 32px)); max-height: 86vh; overflow: auto; background: rgba(12,10,14,.92); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.chap-inner header { display: flex; align-items: center; justify-content: space-between; }
.chap-inner h2 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; font-size: 30px; margin: 0; letter-spacing: .1em; }
.close { background: none; border: 0; color: var(--ink); font-size: 30px; cursor: pointer; }
.act { color: var(--gold); letter-spacing: .3em; font-size: 11px; text-transform: uppercase; margin: 16px 0 6px; }
.chap { display: flex; gap: 12px; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); color: var(--ink); padding: 10px 4px; cursor: pointer; font: 600 15px Nunito, sans-serif; }
.chap:hover, .chap.cur { background: rgba(232,184,92,.08); }
.chap .n { color: var(--dim); width: 26px; } .chap .d { margin-left: auto; color: var(--dim); font-size: 13px; }

#controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 16px 12px; background: linear-gradient(transparent, rgba(0,0,0,.75)); transition: opacity .5s; z-index: 4; }
body.idle #controls, body.prestart #controls { opacity: 0; pointer-events: none; }
#scrub { position: relative; height: 18px; cursor: pointer; }
#scrub::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 3px; background: rgba(255,255,255,.18); border-radius: 2px; }
#played { position: absolute; left: 0; top: 8px; height: 3px; background: var(--gold); border-radius: 2px; width: 0; }
#knob { position: absolute; top: 4px; width: 11px; height: 11px; margin-left: -5px; border-radius: 50%; background: #ffe2a4; box-shadow: 0 0 10px #ffb84a; }
#ticks i { position: absolute; top: 6px; width: 2px; height: 7px; background: rgba(255,255,255,.35); }
#tip { position: absolute; bottom: 22px; transform: translateX(-50%); background: rgba(10,8,12,.9); border: 1px solid var(--line); padding: 4px 9px; border-radius: 6px; font-size: 12px; white-space: nowrap; display: none; }
#scrub:hover #tip { display: block; }
.row { display: flex; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.grow { flex: 1; }
.ic { background: none; border: 1px solid transparent; color: var(--ink); font-size: 18px; min-width: 34px; height: 32px; border-radius: 8px; cursor: pointer; }
.ic:hover { border-color: var(--line); }
.ic.txt { font: 800 11px Nunito, sans-serif; letter-spacing: .15em; padding: 0 10px; color: var(--dim); }
.ic.txt.on { color: var(--gold); }
#time { font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
#chapname { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 18px; }
@media (max-width: 560px) { #chapname { display: none; } .ic.txt { padding: 0 6px; letter-spacing: .05em; } }
