:root {
  --amber: #f3b24a;
  --cyan: #7fd8e8;
  --ink: #eef0f3;
  --muted: #9aa1ad;
  --glass: rgba(20, 22, 30, .78);
  --line: rgba(255, 255, 255, .07);
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1c1611; color: var(--ink);
  font: 15px/1.45 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud a, #hud button, #hud input { pointer-events: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.card { background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 14px; }

.left { position: absolute; left: 24px; top: 22px; width: 430px; }
.kicker { font-weight: 900; font-size: 30px; letter-spacing: .01em; line-height: 1; }
.title { font-weight: 900; font-size: 64px; line-height: .95; color: var(--amber); margin: 2px 0 16px; letter-spacing: -.01em; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.stat { padding: 10px 12px; }
.stat span { display: block; font: 700 11px var(--mono); letter-spacing: .14em; color: var(--muted); }
.stat b { font: 700 22px var(--mono); color: var(--amber); }
.stat i { font: 500 14px var(--mono); color: var(--muted); font-style: normal; }

.stepcard { padding: 14px 16px 16px; min-height: 128px; margin-bottom: 8px; }
.stepcard .label { font: 700 12px var(--mono); letter-spacing: .14em; color: var(--amber); margin-bottom: 6px; }
.stepcard p { margin: 0; font-size: 16px; color: #e3e6ea; }
.stepcard p em { color: var(--amber); font-style: normal; font-weight: 600; }

.panel { position: absolute; right: 24px; top: 22px; width: 400px; padding: 14px 14px 16px; }
.ph { display: flex; justify-content: space-between; align-items: center; margin: 4px 2px 8px; }
.ph span { font: 700 12px var(--mono); letter-spacing: .14em; color: var(--muted); }
.seg { display: flex; background: rgba(255, 255, 255, .05); border-radius: 11px; padding: 3px; margin-bottom: 10px; }
.seg button { flex: 1; padding: 9px 10px; border-radius: 8px; font-weight: 600; color: #cfd3da; }
.seg button.on { background: #f4f5f7; color: #111; }
.seg button:disabled { opacity: .5; cursor: default; }
.seg button small { font-size: 10px; color: var(--muted); font-weight: 500; }
.seg.small { margin: 0; display: inline-flex; }
.seg.small button { flex: none; padding: 7px 14px; }

.transport { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.transport button { width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); }
.transport button.amber { background: rgba(243, 178, 74, .16); color: var(--amber); }
.now { flex: 1; min-width: 0; }
.now b { display: block; font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now small { font: 500 12px var(--mono); color: var(--muted); }

.ticks { display: flex; justify-content: space-between; font: 500 11px var(--mono); color: var(--muted); padding: 0 4px; }
.ticks span.on { color: var(--ink); }
input[type=range] { width: 100%; margin: 6px 0 14px; accent-color: #e8e8e8; height: 18px; }

.viewrow { display: flex; justify-content: space-between; align-items: center; }
.icon { width: 40px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); color: var(--muted); }
.icon.on { color: var(--amber); background: rgba(243, 178, 74, .16); }

.follow { position: absolute; right: 24px; bottom: 22px; padding: 10px 16px; color: var(--ink); text-decoration: none; font-weight: 600; }
.disclaimer { position: absolute; left: 24px; bottom: 18px; font-size: 11px; color: rgba(255, 255, 255, .38); }

#endcard { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; opacity: 0;
  padding: 28px 56px 32px; border-radius: 22px; background: rgba(18, 16, 14, .82); backdrop-filter: blur(10px); }
#endcard .et { font-weight: 900; font-size: 120px; line-height: 1; color: var(--amber); }
#endcard .es { font: 500 16px var(--mono); color: #d8dbe0; margin-top: 8px; }

body.draw .kicker { color: #14171c; }
body.draw .disclaimer { color: rgba(0, 0, 0, .45); }
body.film { cursor: none; }
/* Film: no app chrome, just letterbox bars, a lower third per step and the end card. */
body.film .left, body.film .panel, body.film .follow, body.film .disclaimer { display: none; }
#bars { display: none; }
body.film #bars { display: block; }
#bars i { position: absolute; left: 0; right: 0; height: 12.2%; background: #000; }
#bars i:first-child { top: 0; } #bars i:last-child { bottom: 0; }
#lower { position: absolute; left: 7%; bottom: calc(12.2% + 34px); display: none; align-items: baseline; gap: 18px; opacity: 0; }
body.film #lower { display: flex; }
#lower b { font: 800 56px var(--mono); color: var(--amber); letter-spacing: -.02em; }
#lower span { font: 800 30px Inter, sans-serif; letter-spacing: .28em; color: #f4f1ea; text-shadow: 0 2px 18px rgba(0,0,0,.6); }
body.film #hud a, body.film #hud button, body.film #hud input { pointer-events: none; }

@media (max-width: 900px) {
  .left { width: calc(100% - 32px); left: 16px; top: 14px; }
  .kicker { font-size: 20px; } .title { font-size: 40px; margin-bottom: 10px; }
  .stepcard { min-height: 0; }
  .panel { top: auto; bottom: 16px; right: 16px; left: 16px; width: auto; }
  .follow, .disclaimer { display: none; }
  #endcard .et { font-size: 64px; }
}
body.film #endcard { background: none; backdrop-filter: none; text-shadow: 0 4px 40px rgba(0, 0, 0, .8); }
body.film #endcard .et { font-size: 150px; letter-spacing: .02em; }
