/* PLAYBACK prototype: what is specific to this page, in the tokens of ../../site/ad/roomc.css (Room C's art direction; load that first).
   A black ground and white at the steps of the alpha stair. The only colour is Room C's two cues (turning blue, startle red; the same
   values as site/live/room-c/live-c.css, defined here because this page is not under site/) and the real colour of the room's lights,
   which the script draws on the canvas. English labels in capitals, point separators, zero-padded numbers. */

:root { --turn: #3f7cff; --alarm: #ff3b30; --stage-w: 100%; --pad: calc(28 * var(--u)); }

.pb { display: flex; flex-direction: column; height: 100vh; height: 100svh; overflow: hidden; background: #000; }
.pb-main { position: relative; flex: 1 1 auto; min-height: 0; }
.pb-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
#plan { display: block; background: #000; transition: opacity .4s; }
#plan3d { display: block; background: #000; touch-action: none; }
#colour-note { white-space: normal; max-width: calc(300 * var(--u)); line-height: 1.6; font-family: inherit; }
[data-state="loading"] #plan, [data-state="error"] #plan { opacity: .45; }
.pb-foot { flex: none; display: flex; justify-content: center; padding: 0 0 calc(14 * var(--u)); }
#strip { display: block; width: var(--stage-w); height: 44px; }
/* Room C's memory (2026-10-18): the HUD's values of the minute at the play head, and the caption under the strip */
.pb-foot { flex-direction: column; align-items: center; }
.pb-memory { display: grid; gap: calc(8 * var(--u)); margin-top: calc(6 * var(--u)); padding-top: calc(10 * var(--u)); border-top: var(--rc-w) solid var(--rc-aux); }
.pb-memory[hidden] { display: none; }
.pb-memory .pb-counts { margin-top: 0 !important; gap: calc(6 * var(--u)); }
.pb-memory .pb-counts > div { grid-template-columns: calc(118 * var(--u)) minmax(0, 1fr); }
.pb-memory .pb-counts dd { font-size: calc(13 * var(--u)); }
.pb-mem-head { color: var(--rc-fg-sub); letter-spacing: var(--rc-ls-state); }
.pb-mem-at { color: var(--rc-fg-foot); }
.pb-mem-caption { width: var(--stage-w); max-width: 100%; margin: calc(6 * var(--u)) 0 0; color: var(--rc-fg-foot); font-size: var(--rc-fs-credit, 11px); line-height: 1.6; }
.pb-mem-caption[hidden] { display: none; }

/* the words: a few, small, quiet; the clock is the largest thing */
.pb-hud { position: absolute; top: var(--pad); z-index: 1; display: flex; flex-direction: column; gap: calc(8 * var(--u)); min-width: calc(190 * var(--u)); color: var(--rc-fg-head); font-size: var(--rc-fs-label); letter-spacing: var(--rc-ls-sub); line-height: 1.4; text-transform: uppercase; }
.pb-hud p, .pb-hud dl { margin: 0; }
.pb-left { left: var(--pad); }
.pb-right { right: var(--pad); align-items: flex-end; text-align: right; }
.pb-title { color: var(--rc-fg); font-size: var(--rc-fs-state); letter-spacing: var(--rc-ls-state); }
.pb-title b { font-weight: 400; }
.pb-syn { align-self: flex-start; padding: calc(2 * var(--u)) calc(7 * var(--u)); border: var(--rc-w) solid var(--rc-line); color: var(--rc-fg-sub); letter-spacing: var(--rc-ls-state); }
.pb-wd { margin-top: calc(14 * var(--u)) !important; font-family: var(--rc-mono); font-weight: 400; letter-spacing: 0; }
.pb-clock { color: var(--rc-fg); font-family: var(--rc-mono); font-size: var(--rc-fs-scene); font-weight: 400; line-height: 1; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.pb-meta { font-family: var(--rc-mono); font-weight: 400; letter-spacing: 0; }
.pb-counts { margin-top: calc(18 * var(--u)) !important; display: grid; gap: calc(10 * var(--u)); }
.pb-counts > div { display: grid; grid-template-columns: calc(78 * var(--u)) minmax(0, 1fr); align-items: baseline; }
.pb-counts dt { color: var(--rc-fg-head); }
.pb-counts dd { margin: 0; color: var(--rc-fg); font-family: var(--rc-mono-ja); font-size: calc(16 * var(--u)); font-weight: 400; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.pb-note { min-height: 1.4em; color: var(--rc-fg-foot); }
.pb-msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; color: var(--rc-fg-head); font-size: var(--rc-fs-state); letter-spacing: var(--rc-ls-state); text-align: center; text-transform: uppercase; }

.pb-ctl { display: flex; align-items: baseline; gap: calc(14 * var(--u)); }
.pb-ctl > span { color: var(--rc-fg-foot); }
.pb-ctl nav { display: flex; gap: calc(12 * var(--u)); }
.pb-ctl a { color: var(--rc-fg-head); font-family: var(--rc-mono); font-weight: 400; letter-spacing: 0; text-decoration: none; }
.pb-ctl a:hover, .pb-ctl a:focus-visible { color: var(--rc-fg); text-decoration: none; }
.pb-ctl a[aria-current] { color: var(--rc-fg-now); font-weight: 500; }
.pb-look { color: var(--rc-fg-foot); font-family: var(--rc-mono); font-size: var(--rc-fs-mono); letter-spacing: 0; }
.pb-cues { margin: calc(10 * var(--u)) 0 0; padding: 0; list-style: none; display: grid; gap: calc(6 * var(--u)); color: var(--rc-fg-head); }
.pb-cues li { display: flex; align-items: center; justify-content: flex-end; gap: calc(8 * var(--u)); }
.pb-cues li::after { content: ""; width: calc(10 * var(--u)); height: calc(10 * var(--u)); background: currentColor; }
.cue-turn::after { background: var(--turn) !important; }
.cue-alarm::after { background: var(--alarm) !important; }

/* a window narrower than the plan and its words side by side: the words go above and below it */
@media (max-width: 900px) {
  .pb { height: auto; min-height: 100svh; overflow: auto; }
  .pb-main { display: flex; flex-direction: column; gap: calc(18 * var(--u)); padding: var(--pad); }
  .pb-hud { position: static; }
  .pb-right { align-items: flex-start; text-align: left; }
  .pb-cues li { justify-content: flex-start; flex-direction: row-reverse; }
  .pb-stage { position: static; height: 100vw; }
  .pb-foot { padding: 0 var(--pad) var(--pad); }
}
@media (prefers-reduced-motion: reduce) { #plan { transition: none; } }

.pb-top { flex:none; padding:calc(18 * var(--u)) var(--pad); border-bottom:var(--rc-w) solid var(--rc-line); }
.pb-mast { display:flex; justify-content:space-between; align-items:center; gap:calc(14 * var(--u)); flex-wrap:wrap; }
.pb-top a { color:var(--rc-fg-head); text-decoration:none; }
.pb-top .language-switch { display:flex; gap:calc(8 * var(--u)); }
.pb-top button, .pb-ctl button, .pb-ctl select { background:#000; color:var(--rc-fg-head); border:var(--rc-w) solid var(--rc-line); font:inherit; padding:calc(8 * var(--u)); min-height:44px; }
.pb-top button[aria-pressed="true"] { color:var(--rc-fg); }
.pb-preview { margin:calc(10 * var(--u)) 0 calc(5 * var(--u)); font:var(--rc-fs-label) var(--rc-mono-ja); color:var(--rc-fg-sub); }
.pb-intro { margin:0; max-width:84ch; font-size:var(--rc-fs-label); color:var(--rc-fg-head); line-height:1.6; }
.pb-help { margin:calc(4 * var(--u)) 0 0; font-size:var(--rc-fs-label); color:var(--rc-fg-foot); line-height:1.6; }
.pb-ctl a { display:inline-flex; min-width:44px; min-height:44px; align-items:center; justify-content:center; }
.pb-ctl { align-items:center; }
.pb-hud { min-width:0; }
.pb-counts > div { grid-template-columns:auto minmax(0, 1fr); column-gap:calc(14 * var(--u)); }
.pb-ctl select { max-width:100%; }
button:focus-visible, a:focus-visible, select:focus-visible { outline:var(--rc-w) solid var(--rc-fg); outline-offset:calc(3 * var(--u)); }
@media (max-width:900px) { .pb-left { order:1; } .pb-stage { order:2; height:calc(100vw - 2 * var(--pad)); } .pb-right { order:3; } .pb-ctl { flex-wrap:wrap; } }
