/* © 2026 Aaria's Blue Elephant · the film's chrome (never drawn on the canvas) */
:root {
  --ink: #16255c;
  --ink-soft: #41538c;
  --blue: #2f9fd8;
  --cream: #fffaf2;
  --card: rgba(255, 255, 255, .92);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #0e1730;
  font: 700 15px/1.45 "Comic Sans MS", "Chalkboard SE", system-ui, sans-serif;
  color: var(--ink);
}
#app { display: flex; flex-direction: column; height: 100%; }

/* ── the screen ─────────────────────────────────────────────────────────── */
#screen {
  flex: 1 1 auto; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, #1b2b52, #0b1226 70%);
}
#stage {
  display: block; border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
  background: var(--cream);
}

/* ── the transport ──────────────────────────────────────────────────────── */
#controls {
  flex: 0 0 auto;
  background: linear-gradient(180deg, #17224a, #101938);
  border-top: 2px solid rgba(255, 255, 255, .07);
  padding: 10px max(12px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-bottom));
  color: #fff;
}
#track {
  height: 20px; display: flex; align-items: center; cursor: pointer; touch-action: none;
}
#track .rail { position: relative; height: 8px; width: 100%; border-radius: 99px; background: rgba(255, 255, 255, .16); }
#bar { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--blue), #7fd3f5); }
#bar::after {
  content: ''; position: absolute; right: -7px; top: -4px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
#row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
button {
  font: inherit; font-weight: 900; cursor: pointer; border: 0; border-radius: 12px;
  background: rgba(255, 255, 255, .12); color: #fff;
  min-height: 42px; min-width: 46px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
button:hover { background: rgba(255, 255, 255, .2); }
button:active { transform: scale(.94); }
button.on { background: #e05a5a; }
#play { background: var(--blue); min-width: 62px; font-size: 20px; }
#chapterName { font-size: 14px; opacity: .92; margin-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32vw; }
#time { font-size: 13px; opacity: .8; font-variant-numeric: tabular-nums; margin-left: auto; }
.lbl { font-size: 12px; font-weight: 800; }
@media (max-width: 760px) { .lbl { display: none; } #chapterName { max-width: 40vw; } }

/* ── chapters ───────────────────────────────────────────────────────────── */
#chapters {
  display: flex; gap: 6px; overflow-x: auto; padding: 8px 2px 2px; scrollbar-width: thin;
}
.chip {
  flex: 0 0 auto; font-size: 12px; font-weight: 800; min-height: 34px;
  background: rgba(255, 255, 255, .08); border-radius: 99px; padding: 0 14px; opacity: .75;
}
.chip.on { background: var(--blue); opacity: 1; }

/* ── footer ─────────────────────────────────────────────────────────────── */
#foot {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 6px 10px 2px; font-size: 11.5px; font-weight: 700; color: rgba(255, 255, 255, .62);
}
#foot a { color: rgba(255, 255, 255, .8); }
#foot img { height: 22px; vertical-align: middle; border-radius: 50%; }

/* ── clean mode: nothing but the film (press C) ─────────────────────────── */
body.clean #controls { display: none; }
body.clean #screen { background: #000; }
body.clean #stage { border-radius: 0; box-shadow: none; }
