:root {
  --accent: #22d3ee;
  --bg: #0b0f14;
  --panel: #151b23;
  --text: #e6edf3;
  --dim: #8b98a5;
  --warn: #f59e0b;
  --err: #f87171;
  color-scheme: dark;
}
* { box-sizing: border-box; }
/* PLAN §32: the phone's display size / font scaling must not change the show screens */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; background: #000; color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none; }
body { background: var(--bg); }
[hidden] { display: none !important; }
.screen { position: fixed; top: 0; right: 0; bottom: 0; left: 0; overflow-y: auto; padding: 16px;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch; display: flex; align-items: flex-start; justify-content: center; }
.screen.center { align-items: center; flex-direction: column; gap: 12px; }
.screen.overlay { padding: 0; background: transparent; z-index: 2; }
.card { width: 100%; max-width: 440px; background: var(--panel); border-radius: 18px; padding: 20px;
  margin: auto 0; box-shadow: 0 0 40px rgba(34, 211, 238, .2);
  box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 25%, transparent); }
h1 { margin: 4px 0 2px; font-size: 1.5rem; }
h2 { margin: 0 0 8px; font-size: 1.15rem; }
p { margin: 8px 0; }
.dim { color: var(--dim); }
.center-text { text-align: center; max-width: 30em; padding: 0 16px; }
.small { font-size: .85rem; }
.logo { display: block; max-width: 160px; max-height: 110px; margin: 0 auto 8px; object-fit: contain; }
.logo.big { max-width: 60vw; max-height: 40vh; }
.warn { border: 1px solid var(--warn); border-radius: 12px; padding: 10px 12px; margin: 12px 0;
  background: rgba(245, 158, 11, .1); }
.warn strong { color: var(--warn); }
.warn p { margin: 4px 0 0; font-size: .92rem; }
label { display: block; margin: 10px 0 4px; font-weight: 600; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 10px 0; }
label.check input { width: 22px; height: 22px; flex: none; accent-color: var(--accent); margin: 1px 0 0; }
input[type=text], input[type=url] { width: 100%; font-size: 1.3rem; padding: 12px; border-radius: 10px;
  border: 1px solid #334155; background: #0b1117; color: var(--text); text-transform: uppercase; }
input[type=url] { text-transform: none; font-size: 1rem; }
button { font: inherit; cursor: pointer; }
button.primary, button.danger { width: 100%; padding: 14px; border: 0; border-radius: 12px; margin-top: 12px;
  font-weight: 700; font-size: 1.1rem; background: var(--accent); color: #001018; }
button.primary:disabled { opacity: .4; }
button.danger { background: #3f1d1d; color: #fecaca; }
button.link, a.link { background: none; border: 0; color: var(--accent); padding: 8px 0; text-decoration: underline; }
.err { color: var(--err); font-weight: 600; }
footer { display: flex; gap: 18px; justify-content: center; margin-top: 10px; font-size: .9rem; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid #334155; border-top-color: var(--accent);
  animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.stage { position: fixed; top: 0; right: 0; bottom: 0; left: 0; width: 100vw; height: 100vh; background: #000; z-index: 1; }
.idle { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; text-align: center; padding: 24px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: radial-gradient(circle at 50% 40%, #0c3a44 0%, #000 70%);
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 22%, #000) 0%, #000 70%);
  animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { filter: brightness(.75); } }
/* crowd screens (PLAN §29): background colour / image / animation come from SpacePulse */
.idle.custom { background: #000; animation: none; }
.anim { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bgimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scrbox { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; max-width: 92vw;
  margin: auto 0; }                       /* centred when short, scrolls from the top when long (old browsers too) */
.idle.text-top .scrbox { margin: 6vh 0 auto; }
.idle.text-bottom .scrbox { margin: auto 0 6vh; }
.scrtext.long { font-size: calc(var(--fs, 1) * 4vmin); text-align: left; line-height: 1.5; max-width: 34em; }
.anim, .bgimg { position: fixed; }        /* stay put while a long text scrolls */
.scrbox h1 { font-size: calc(var(--fs, 1) * 8vmin); color: inherit; text-shadow: 0 2px 12px rgba(0,0,0,.6); word-break: break-word; }
.scrtext { font-size: calc(var(--fs, 1) * 4.6vmin); color: inherit; opacity: .88; text-shadow: 0 1px 8px rgba(0,0,0,.6); white-space: pre-line;
  word-break: break-word; }
.scrimg { display: block; max-width: 84vw; max-height: 46vh; object-fit: contain; margin: 0 auto 10px; }
.scrlinks { display: flex; flex-direction: column; align-items: center; gap: 2.2vmin; margin-top: 3.5vmin; width: 100%; }
.scrlink { display: inline-block; padding: .7em 1.3em; border-radius: 12px; font-weight: 700; text-decoration: none;
  font-size: calc(var(--fs, 1) * 4.4vmin); background: var(--sacc, var(--accent)); color: #001018; max-width: 90%;
  word-break: break-word; }
.scrlink.small { font-size: calc(var(--fs, 1) * 3.4vmin); padding: .45em 1em; font-weight: 600; color: inherit;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.38); }
.logo.pulse { animation: logopulse 3.2s ease-in-out infinite; }
@keyframes logopulse { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.12); opacity: 1; } }
.conn { position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: rgba(0,0,0,.7); color: #fff; padding: 6px 14px; border-radius: 99px; font-size: .85rem; }
.cdown { z-index: 2; position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none; color: #fff; text-shadow: 0 0 2vmin #000, 0 0 6vmin #000; text-align: center; }
.cdown[hidden] { display: none; }
.cdown-box { padding: 2vmin 5vmin; border-radius: 4vmin; transition: transform .5s ease, background-color .5s ease;
  transform: translateY(var(--cdy, 0)); }
.cdown-name { font-size: calc(6vmin * var(--cds, 1)); font-weight: 600; margin-bottom: 2vmin; overflow-wrap: anywhere; }
.cdown-time { font-size: calc(24vmin * var(--cds, 1)); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
/* something else runs on the screen: small near the top, only the numbers. Not at the very edge: many phones have
   their camera there (User 05.11.). Back when it ends. */
.cdown.small .cdown-box { transform: translateY(calc(-50vh + 13vh + env(safe-area-inset-top, 0px))) scale(.38);
  background-color: rgba(0,0,0,.45); }
.cdown.small .cdown-name { display: none; }
.seatchip { position: absolute; right: 10px; top: max(10px, env(safe-area-inset-top)); background: rgba(0,0,0,.45);
  color: rgba(255,255,255,.75); padding: 3px 10px; border-radius: 99px; font-size: .75rem; }
.sheet { position: fixed; inset: 0; z-index: 5; background: rgba(0,0,0,.6); display: flex; align-items: flex-end;
  justify-content: center; padding: 16px; }
.sheet .card { margin: 0; max-height: 85vh; overflow-y: auto; }
/* seat picker (PLAN §26) – flexbox only, works in old browsers */
.seatbox { margin: 14px 0 4px; padding-top: 12px; border-top: 1px solid #263241; }
.hint { background: rgba(34, 211, 238, .08); border-left: 3px solid var(--accent); padding: 8px 10px; border-radius: 6px;
  margin: 0 0 10px; }
.pickhead { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.pickhead strong { font-size: 1.15rem; }
button.back { background: #1e293b; color: var(--text); border: 0; border-radius: 10px; padding: 9px 14px;
  font-weight: 600; flex: none; }
.path { margin: 2px 0 8px; color: var(--accent); font-weight: 600; }
.picklist { display: flex; flex-wrap: wrap; margin: 6px -4px; }
.picklist button { margin: 4px; border: 1px solid #334155; background: #0b1117; color: var(--text); border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px; }
.picklist button .main { font-weight: 700; }
.picklist button .sub { font-size: .8rem; color: var(--dim); }
.picklist button:active { border-color: var(--accent); }
.picklist button:disabled { background: #1f2937; color: #4b5563; border-color: #1f2937; }
.picklist button:disabled .sub { color: #4b5563; }
.picklist.tiles button { width: calc(50% - 8px); min-height: 72px; font-size: 1.1rem; }
.picklist.rows button { width: 100%; flex-direction: row; justify-content: space-between; min-height: 54px;
  padding: 10px 16px; font-size: 1.1rem; }
.picklist.rows button .sub { font-size: .95rem; }
.picklist.seats button { width: 56px; height: 56px; font-size: 1.15rem; padding: 2px; }
.picklist.seats button.mine { border: 2px solid var(--accent); }
.picklist.seats button.mine .sub { font-size: .55rem; color: var(--accent); }
.pconfirm { text-align: center; padding: 6px 0; }
.biglabel { font-size: 2.6rem; font-weight: 800; color: var(--accent); margin: 4px 0; word-break: break-word; }
.torchbtn { position: absolute; left: 14px; bottom: max(16px, env(safe-area-inset-bottom)); width: 58px; height: 58px;
  border-radius: 50%; border: 2px solid rgba(255,255,255,.5); background: rgba(0,0,0,.45); font-size: 26px; z-index: 3;
  padding: 0; line-height: 1; }
.torchbtn.on { background: #fde047; border-color: #fff; box-shadow: 0 0 18px #fde047; }
.keepawake { position: fixed; width: 1px; height: 1px; opacity: 0.01; left: 0; top: 0; pointer-events: none; }
.noscript { position: fixed; inset: 0; z-index: 9; background: #0b0f14; color: #e6edf3; padding: 24px; }
pre { white-space: pre-wrap; font: inherit; color: var(--dim); }
