/* The demo interface every scene shares: full-bleed 3D under the app's top bar; the step-by-step guide on the left,
   the control panel along the bottom.
   XRAI Stream branding: XRAI navy surfaces, cream text, periwinkle for interactive state, orange for labels. Single dark look. */
:root {
  color-scheme: dark;
  --ink: #0f0f34;            /* XRAI dark background */
  --navy: #191969;           /* XRAI brand navy */
  --panel: rgba(25, 25, 88, 0.9);
  --panel-solid: #16164d;
  --line: #34348c;
  --edge: #3d3da3;           /* control borders */
  --edge-hi: #5c5cc8;
  --fg: #fcf7e6;             /* XRAI cream */
  --muted: #a6aee5;          /* XRAI periwinkle */
  --accent: #818cda;         /* interactive state */
  --accent-ink: #0f0f3d;
  --brand-blue: #3a6ff7;     /* the logomark on dark backgrounds */
  --stream: #4747e1;
  --warm: #ff955a;           /* XRAI orange, for small labels */
  --live: #66bb6a;
  --display: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
html, body { height: 100%; }
[hidden] { display: none !important; }
/* every scrolling area gets the same thin, dark scrollbar */
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: var(--edge) transparent; } }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track, *::-webkit-scrollbar-corner { background: transparent; }
*::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
*::-webkit-scrollbar-thumb { background: var(--edge); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--edge-hi); background-clip: padding-box; }
body { margin: 0; background: var(--ink); color: var(--fg); font: 14px/1.45 var(--body); }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

#app { position: fixed; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); left: 0; right: 0; bottom: env(safe-area-inset-bottom, 0px); }
#view { position: absolute; inset: 0; }
#view canvas { display: block; touch-action: none; }
#labels { position: absolute; inset: 0; pointer-events: none; z-index: 1; } /* 3D labels stay under the interface panels */
.top, .path, .info, .bottom, .pov { z-index: 2; }
/* the panels cover what a wearer's glasses show: the bars stack above the point of view, and in it the caption HUD
   lies under the seat bar and the hint */
.top, .bottom { z-index: 3; }
.pov .hud { z-index: 0; }
.pov .bar, .pov .hint { z-index: 1; }
.loading { z-index: 4; }

/* top bar */
.top { position: absolute; top: 12px; left: 16px; right: 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; pointer-events: none; }
.views { pointer-events: auto; display: flex; flex-wrap: wrap; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px; backdrop-filter: blur(8px); }
.views button { background: none; border: 0; border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--muted); }
.views button[aria-pressed="true"] { background: var(--fg); color: var(--ink); font-weight: 600; }
.views button:hover { color: var(--fg); }
.views button[aria-pressed="true"]:hover { color: var(--ink); }
/* shown only where the browser offers a VR headset */
.views .xr-btn { color: var(--fg); font-weight: 600; box-shadow: inset 0 0 0 1px var(--accent); }

/* a venue's scenes, as sub-tabs: at the station and on the train, say */
.scenes { pointer-events: auto; display: inline-flex; gap: 3px; padding: 4px; border-radius: 999px; background: var(--panel-solid); border: 1px solid var(--edge); }
.scenes a { border-radius: 999px; padding: 6px 13px; font-size: 13px; color: var(--muted); white-space: nowrap; text-decoration: none; }
.scenes a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.scenes a:hover { color: var(--fg); }
.scenes a[aria-current="page"]:hover { color: var(--accent-ink); }
.scenes .short { display: none; }
.scene-slot { pointer-events: auto; display: flex; flex-wrap: wrap; gap: 6px; }
/* a scene's variants, the trains on the train say: the same pills, a size down */
.scenes.variants a { padding: 5px 11px; font-size: 12px; }
.scene-slot:empty { display: none; }
/* phones: a venue's scenarios first, above the views bar */
@media (max-width: 700px) { .scenes .long { display: none; } .scenes .short { display: inline; } }
@media (max-width: 700px) { .scene-slot { order: -1; width: 100%; } .scenes { width: 100%; justify-content: center; } .scenes a { flex: 1; text-align: center; padding: 5px 8px; font-size: 12px; } .pov-on .scene-slot { display: none; } }
/* signal path rail */
/* --bottom-h and --path-h are measured from the live bars, so nothing sits under them */
.path { position: absolute; left: 16px; top: 72px; bottom: calc(var(--bottom-h, 92px) + 26px); width: 300px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.path header { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; backdrop-filter: blur(8px); }
.path header p { margin: 0; color: var(--muted); font-size: 13px; }
.eyebrow { font: 500 11px/1.2 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--warm); margin: 0 0 4px; }
.path header .mode-note { color: #e4e2f2; margin-top: 6px; }
.progress { height: 4px; border-radius: 4px; background: var(--line); margin-top: 10px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.path header .tour-pos { margin-top: 6px; font: 500 11px/1.2 var(--mono); color: var(--muted); }
/* the steps read as one numbered timeline: a rule joins the badges, done steps take the accent colour */
.steps { list-style: none; margin: 0; padding: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; min-height: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(8px); }
.steps li { position: relative; }
.steps li:not(:last-child)::before { content: ""; position: absolute; left: 22px; top: 41px; bottom: -11px; width: 2px; background: var(--line); }
.steps li.done::before { background: var(--accent); }
.step { width: 100%; text-align: left; display: grid; grid-template-columns: 30px 1fr; gap: 1px 12px; background: transparent; border: 0; border-radius: 10px; padding: 9px 8px; transition: background .25s; }
.step .n { grid-row: span 2; position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 13px/1 var(--display); color: var(--muted); background: var(--panel-solid); border: 1.5px solid var(--line); }
.step .t { font-weight: 600; }
.step .d { color: var(--muted); font-size: 12.5px; }
.step:hover { background: rgba(255,255,255,0.04); }
.step.done .n { border-color: var(--accent); color: var(--accent); }
.step.current { background: rgba(129,140,218,0.18); }
.step.current .n { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.step.current .t { color: var(--accent); }
.step .sig { display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: var(--live); vertical-align: middle; opacity: 0; transition: opacity .6s; }
.step.live .sig { opacity: 1; }
.tour-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.tour-count { font: 500 11.5px/1.2 var(--mono); color: var(--muted); }
.btn:disabled { opacity: 0.4; cursor: default; }

/* info card */
.info { position: absolute; right: 16px; top: 72px; width: 320px; max-height: calc(100% - 98px - var(--bottom-h, 92px)); display: flex; flex-direction: column; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; backdrop-filter: blur(8px); }
.info[hidden] { display: none; }
/* the step dots and eyebrow stay at the top, the step buttons at the bottom; only the words between them scroll */
#info-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.info .dots, #info-body > .eyebrow, #info-body > .tour-nav { flex: none; }
.info-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.info h2 { margin: 0 0 6px; font: 700 19px/1.25 var(--display); letter-spacing: -0.01em; text-wrap: balance; }
.info p { margin: 0 0 8px; color: #e4e2f2; }
.info ul { margin: 0 0 8px; padding-left: 18px; color: #e4e2f2; display: grid; gap: 4px; }
.info .close { position: absolute; top: 8px; right: 8px; background: none; border: 0; color: var(--muted); font-size: 18px; width: 30px; height: 30px; border-radius: 8px; }
.info .close:hover { background: var(--line); color: var(--fg); }
.render { margin: 2px 0 10px; border-radius: 12px; overflow: hidden; background: var(--ink); border: 1px solid var(--line); }
.render img { display: block; width: 100%; height: auto; }
.render figcaption { padding: 7px 9px 8px; font-size: 11px; line-height: 1.35; color: var(--muted); }
.render.light img { background: #fff; }
/* sketches of the caption page and the Auracast broadcast list, shown on the phones and Auracast steps */
.landing { margin: 2px 0 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--ink); padding: 12px 12px 14px; display: grid; gap: 8px; }
.lp-head { display: flex; justify-content: space-between; align-items: baseline; }
.lp-head b { font: 800 15px/1.2 var(--body); }
.lp-head span { font: 600 10.5px/1.2 var(--mono); color: var(--warm); text-transform: uppercase; letter-spacing: 0.08em; }
.lp-label { margin: 2px 0 0 !important; font: 500 10.5px/1.2 var(--mono) !important; color: var(--muted) !important; letter-spacing: 0.1em; text-transform: uppercase; }
.lp-langs { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-langs button { font: inherit; font-size: 12px; padding: 5px 9px; border-radius: 999px; border: 1px solid var(--edge); background: none; color: var(--muted); cursor: pointer; }
.lp-langs button:hover { border-color: var(--fg); color: var(--fg); }
.lp-langs [aria-pressed="true"], .lp-langs [aria-pressed="true"]:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.lp-fixed { margin: 0 !important; font-size: 13px !important; font-weight: 600; color: var(--fg) !important; }
.lp-casts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lp-casts button { font: inherit; text-align: left; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); color: var(--fg); font-size: 13px; font-weight: 600; cursor: pointer; }
.lp-casts button:hover { border-color: var(--fg); }
.lp-casts [aria-pressed="true"], .lp-casts [aria-pressed="true"]:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
/* how this page follows (read or listen) is the step's: a line of text, not a choice */
.lp-mode { margin: 2px 0 0 !important; font-size: 12px !important; line-height: 1.4 !important; color: var(--muted) !important; }
.lp-go { font: inherit; justify-self: stretch; text-align: center; margin-top: 2px; padding: 8px; border: 0; border-radius: 10px; background: var(--fg); color: var(--ink); font-weight: 700; font-size: 13px; cursor: pointer; }
.lp-go:hover { background: var(--accent); color: var(--accent-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.chip { font: 500 11.5px/1 var(--mono); padding: 5px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--fg); background: rgba(255,255,255,0.04); }

/* control panel (labelled groups of real controls) + the caption readout beside it */
.bottom { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.controls { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: flex-end; background: var(--panel-solid); border: 1px solid var(--edge); border-radius: 14px; padding: 8px 14px 10px; box-shadow: 0 6px 24px rgba(0,0,0,0.35); }
.cgroup { display: flex; flex-direction: column; gap: 5px; }
.clabel { font: 500 10.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--warm); }
.crow { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.btn { background: rgba(255,255,255,0.07); border: 1px solid var(--edge); border-radius: 10px; padding: 7px 12px; font-size: 13px; white-space: nowrap; }
.btn:hover { border-color: var(--edge-hi); }
.btn.primary { background: var(--fg); color: var(--ink); border-color: var(--fg); font-weight: 600; min-width: 84px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.icon-btn svg, .ctl-toggle svg { flex: none; width: 15px; height: 15px; }
.seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: 10px; background: rgba(255,255,255,0.06); border: 1px solid var(--edge); }
.seg button { background: none; border: 0; border-radius: 7px; padding: 5px 11px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.seg button[aria-checked="true"] { background: var(--accent); color: var(--ink); font-weight: 600; }
.seg button:hover { color: var(--fg); }
.seg button[aria-checked="true"]:hover { color: var(--ink); }
/* switches: the checkbox stays for keyboard and screen readers, the pill shows on or off */
.tg { position: relative; display: inline-flex; cursor: pointer; user-select: none; }
.tg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tg span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); padding: 6px 10px 6px 8px; border-radius: 999px; border: 1px solid var(--edge); }
.tg span::before { content: ""; flex: none; width: 24px; height: 14px; border-radius: 999px; background: radial-gradient(circle at 7px 7px, #8f95c8 4.5px, transparent 5px) #24246a; transition: background .2s; }
.tg input:checked + span { color: var(--fg); border-color: var(--edge-hi); }
.tg input:checked + span::before { background: radial-gradient(circle at 17px 7px, var(--ink) 4.5px, transparent 5px) var(--accent); }
.tg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tg:hover span { color: var(--fg); }
.ticker { flex: 1 1 380px; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 9px 14px 10px; backdrop-filter: blur(8px); display: grid; grid-template-columns: 1fr auto; grid-template-areas: "who lang" "en en" "tr tr"; gap: 3px 12px; align-items: center; }
.ticker .who { grid-area: who; min-width: 0; font-size: 12.5px; font-weight: 700; color: var(--warm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker .who .where { color: var(--muted); font-weight: 500; }
.ticker .lang { grid-area: lang; }
.ticker .en { grid-area: en; font-size: 15px; }
.ticker .tr { grid-area: tr; font-size: 14px; color: var(--muted); }
/* always two lines high, so the bar (and the controls beside it) keeps its height as captions wrap and translations
   arrive; a long line rolls up so its newest words stay in view */
.ticker .en, .ticker .tr { display: block; line-height: 1.45; height: 2.9em; overflow: hidden; scroll-behavior: smooth; }
.ticker select { background: var(--panel-solid); border: 1px solid var(--line); border-radius: 999px; color: var(--fg); font: inherit; font-size: 12px; padding: 2px 8px; }

/* 3D labels */
.lbl { position: absolute; transform: translate(-50%, -100%); pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 4px 9px 4px 4px; border-radius: 999px; background: rgba(15, 15, 52, 0.86); border: 1px solid var(--line); font-size: 12px; white-space: nowrap; color: var(--fg); }
.lbl i { font: 700 11px/1 var(--mono); font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--fg); }
.lbl.plain { padding: 4px 9px; }
.hide-labels .lbl { display: none; }
.occluded { visibility: hidden; }
.bubble { position: absolute; transform: translate(-50%, -100%); max-width: 190px; padding: 5px 8px 6px; border-radius: 8px; background: rgba(25, 25, 105, 0.92); border: 1px solid var(--stream); font-size: 11.5px; line-height: 1.3; color: #fff; pointer-events: auto; cursor: pointer; }
.bubble b { display: flex; align-items: center; gap: 5px; margin-bottom: 1px; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.bubble b::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--lang, var(--stream)); } /* the language's colour */
.bubble.rtl { direction: rtl; text-align: right; }
.hide-bubbles .bubble { display: none; }

/* a passenger's point of view */
.pov { position: absolute; inset: 0; pointer-events: none; }
.pov svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* the speaker in the bar, for someone whose phone is not on screen (glasses): round, its icon inside it, lit when on */
.pov .bar .bar-sound { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--edge); background: rgba(255, 255, 255, 0.06); color: var(--fg); }
.pov .bar .bar-sound svg { position: static; inset: auto; width: 18px; height: 18px; }
.pov .bar .bar-sound[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.pov .bar .bar-sound.ask { border-color: var(--warm); color: var(--warm); box-shadow: 0 0 0 3px rgba(255, 149, 90, 0.25); }
.pov .bar { box-sizing: border-box; pointer-events: auto; position: absolute; top: 70px; left: 12px; right: 12px; margin: 0 auto; width: max-content; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 6px 8px 6px 14px; max-width: calc(100% - 24px); }
.seat-btn { display: inline-flex; align-items: center; gap: 7px; background: var(--panel-solid); border: 1px solid var(--edge); border-radius: 10px; padding: 5px 10px; font-size: 13px; }
.seat-btn:hover, .seat-btn[aria-expanded="true"] { border-color: var(--edge-hi); }
.seat-btn .eyebrow { margin: 0; }
.seat-btn .caret { color: var(--muted); font-size: 11px; }
/* the station plan: platforms and zones, featured passengers as tappable dots in their language's colour */
.seat-map { box-sizing: border-box; pointer-events: auto; position: absolute; top: 128px; left: 12px; right: 12px; margin: 0 auto; width: min(500px, calc(100% - 24px)); background: var(--panel-solid); border: 1px solid var(--edge); border-radius: 16px; padding: 12px 14px 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5); z-index: 3; }
.seat-map .eyebrow { margin: 0 0 8px; }
.plan { position: relative; width: 100%; aspect-ratio: 23 / 15; }
.plan svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.plan .stage-strip { position: absolute; left: 3%; right: 3%; top: 0; height: 7%; border-radius: 6px; background: rgba(129, 140, 218, 0.22); color: var(--muted); font: 600 9.5px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; display: grid; place-items: center; }
.plan .seat { position: absolute; transform: translate(-50%, -50%); width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 2px solid rgba(252, 247, 230, 0.85); background: var(--c); }
.plan .seat:hover { transform: translate(-50%, -50%) scale(1.15); }
.plan .seat.here { box-shadow: 0 0 0 3px var(--panel-solid), 0 0 0 5px var(--fg); }
.plan .seat:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.plan-legend { display: grid; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.pl-kinds, .pl-langs { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.pl-kinds i { position: relative; display: inline-block; box-sizing: border-box; width: 11px; height: 11px; margin-right: 6px; border: 2px solid var(--fg); vertical-align: -1px; }
.pl-langs span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: var(--c); vertical-align: -1px; }
/* the shapes: the XRAI Stream page square (a dot in it when listening), Auracast a diamond, glasses round */
.plan .seat.k-read, .plan .seat.k-listen, .pl-kinds .k-read, .pl-kinds .k-listen { border-radius: 4px; }
.plan .seat.k-listen::after, .pl-kinds .k-listen::after { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--panel-solid); }
.pl-kinds .k-listen::after { width: 3px; height: 3px; background: var(--fg); }
.plan .seat.k-aura, .pl-kinds .k-aura { border-radius: 2px; transform: rotate(45deg) scale(0.85); }
.plan .seat.k-aura { transform: translate(-50%, -50%) rotate(45deg) scale(0.85); }
.plan .seat.k-aura:hover { transform: translate(-50%, -50%) rotate(45deg); }
.plan .seat.k-glasses, .pl-kinds .k-glasses { border-radius: 50%; }
.pov .bar select { background: var(--panel-solid); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; font-size: 13px; }
.pov .hint { box-sizing: border-box; position: absolute; bottom: calc(var(--bottom-h, 92px) + 24px); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); text-align: center; font-size: 12.5px; color: var(--muted); background: rgba(15,15,52,0.78); padding: 4px 12px; border-radius: 14px; }
.phone-ui { display: none; position: absolute; right: max(4%, 24px); bottom: calc(var(--bottom-h, 92px) + 70px); height: min(calc(min(300px, 46vw) * 18.5 / 9), calc(100% - var(--bottom-h, 92px) - 160px)); aspect-ratio: 9 / 18.5; border-radius: 34px; background: #111116; padding: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.6), inset 0 0 0 2px #2a2a33; transform: rotate(-4deg); }
.pov-phone .phone-ui, .pov-listen .phone-ui, .pov-aura .phone-ui { display: block; }
.pov-aura .xs-page, .pov-phone .sys-page, .pov-listen .sys-page { display: none; }
.ph-screen { box-sizing: border-box; height: 100%; border-radius: 26px; display: flex; flex-direction: column; overflow: hidden; }
.phone-ui svg { position: static; display: block; width: auto; height: auto; } /* not the full-view svg of .pov svg */
/* the XRAI Stream page: lavender bars, captions in blocks with the speaker under them, as on a visitor's phone */
.xs-page { background: #f2f3fb; color: #121214; }
.xs-head { display: flex; align-items: center; gap: 8px; padding: 24px 12px 8px; background: #a7aee4; }
.xs-logo { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: #191969; }
.xs-logo svg { width: 15px; height: 15px; fill: #fff; }
.xs-name { flex: 1; min-width: 0; display: grid; }
.xs-name b { font: 700 12.5px/1.2 var(--body); color: #121214; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xs-name span { font: 500 9px/1.3 var(--body); color: #33376a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xs-name span:empty { display: none; }
.xs-roll { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 9px; padding: 10px 14px; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%); mask-image: linear-gradient(to bottom, transparent, #000 25%); }
.xs-cap { border-left: 3px solid #030090; padding-left: 9px; }
.xs-cap p { margin: 0; font: 500 13px/1.4 var(--body); color: #121214; }
.xs-cap small { display: block; margin-top: 2px; font: 500 11px/1.35 var(--body); color: #4a4f80; }
.xs-cap b { display: block; margin-top: 4px; font: 700 11.5px/1.2 var(--body); color: #030090; }
/* the page in dark mode, as the XRAI app's own dark theme: near-black with cream text under XRAI navy bars */
.xs-page.dark { background: #121212; color: #e8e3d6; }
.xs-page.dark .xs-head, .xs-page.dark .xs-foot { background: #191969; }
.xs-page.dark .xs-logo { background: #2c2c83; }
.xs-page.dark .xs-name b, .xs-page.dark .xs-cap p { color: #e8e3d6; }
.xs-page.dark .xs-name span, .xs-page.dark .xs-cap b { color: #a6aee5; }
.xs-page.dark .xs-cap { border-left-color: #818cda; }
.xs-page.dark .xs-cap small { color: #9aa0c8; }
.xs-page.dark .xs-ic svg, .xs-page.dark .xs-tray-close svg { fill: #c9ccff; }
.xs-page.dark .xs-code, .xs-page.dark .xs-foot .ph-sound { color: #c9ccff; }
.xs-page.dark .xs-foot .ph-sound[aria-pressed="true"] { background: #2c2c83; color: #fcf7e6; }
.xs-page.dark .xs-foot button.xs-ic:hover, .xs-page.dark .xs-foot button.xs-flag:hover { background: rgba(255, 255, 255, 0.1); }
.xs-page.dark .xs-tray { background: #1d1d4f; }
.xs-page.dark .xs-tray-head b, .xs-page.dark .xs-tile { color: #e8e3d6; }
.xs-page.dark .xs-tray-head span { color: #a6aee5; }
.xs-page.dark .xs-tile > svg[viewBox="0 0 24 24"] { fill: #e8e3d6; }
.xs-foot { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px 14px; background: #a7aee4; }
/* four slots of one width, so the icons sit evenly whatever their own size */
.xs-foot > * { flex: 0 0 40px; display: grid; place-items: center; }
/* the scene's Sound button: the venue's own sound, on or off */
/* the scene's Sound button, last in the top bar: lit while it plays, warm while the page waits for a tap */
.views .scene-sound { display: inline-flex; align-items: center; gap: 6px; border-left: 1px solid var(--line); border-radius: 0 999px 999px 0; color: var(--fg); font-weight: 600; }
.views .panels-btn:not(:last-child) { border-radius: 0; }
.scene-sound svg { position: static; flex: none; width: 16px; height: 16px; }
.views .scene-sound[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.views .scene-sound[aria-pressed="true"]:hover { color: var(--accent-ink); }
.views .scene-sound.ask { color: var(--warm); box-shadow: inset 0 0 0 2px var(--warm); }
@media (max-width: 700px) { .views .scene-sound span { display: none; } }
/* the note that the sound is on, by its button for a few seconds, with the button ringed */
.views .scene-sound.ringed { box-shadow: inset 0 0 0 2px var(--fg), 0 0 0 3px var(--accent); }
.sound-hint { position: fixed; z-index: 30; max-width: 230px; padding: 9px 12px; border-radius: 12px; background: var(--fg); color: var(--ink); font-size: 12.5px; line-height: 1.35; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); cursor: pointer; }
.sound-hint b { display: block; }
.sound-hint::after { content: ""; position: absolute; left: var(--arrow-x, 22px); top: -6px; border: 6px solid transparent; border-top: 0; border-bottom-color: var(--fg); }
.xs-ic svg { width: 20px; height: 20px; fill: #1a1d4a; }
.xs-foot button.xs-ic, .xs-foot button.xs-flag { pointer-events: auto; display: grid; place-items: center; padding: 4px; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.xs-foot button.xs-ic:hover, .xs-foot button.xs-flag:hover { background: rgba(255, 255, 255, 0.35); }
/* the language panel: Default, a tile for each language offered, and More, over the captions */
.xs-page { position: relative; }
/* the language tray rises over the lower three quarters of the page, so the newest captions still show above it */
.xs-tray { pointer-events: auto; position: absolute; left: 0; right: 0; top: 25%; bottom: 46px; display: flex; flex-direction: column; gap: 12px; padding: 16px 12px 10px; border-radius: 18px; background: #8c94e0; box-shadow: 0 -6px 18px rgba(10, 10, 60, 0.3), 0 -8px 24px rgba(10, 10, 60, 0.25) inset; }
.xs-tray[hidden] { display: none; }
.xs-tray-head { display: flex; align-items: center; gap: 8px; }
.xs-tray-head b { display: block; font: 700 13px/1.2 var(--body); color: #121214; }
.xs-tray-head span { display: block; font: 500 9px/1.3 var(--body); color: #2a2d55; }
.xs-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; align-content: start; overflow: auto; }
.xs-tile { display: grid; justify-items: center; gap: 4px; padding: 8px 4px 7px; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 8px; background: rgba(255, 255, 255, 0.08); font: 500 9.5px/1.2 var(--body); color: #121214; text-align: center; cursor: pointer; }
button.xs-tile:hover { background: rgba(255, 255, 255, 0.2); }
.xs-tile[aria-pressed="true"] { background: rgba(255, 255, 255, 0.32); border-color: rgba(255, 255, 255, 0.7); }
.xs-tile.more { cursor: default; opacity: 0.85; }
.xs-tile svg { width: 26px; height: 18px; border-radius: 2px; }
.xs-tile > svg[viewBox="0 0 24 24"] { width: 20px; height: 20px; fill: #121214; }
.xs-tray-close { align-self: flex-start; margin-top: auto; display: grid; place-items: center; padding: 2px; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.xs-tray-close svg { width: 22px; height: 22px; fill: #1a1d4a; }
.xs-flag svg { width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15); }
.xs-code { font: 700 10px/1 var(--mono); color: #1a1d4a; }
/* the phone's speaker: in the page's bar, muted or on in a lighter pill; in the picker's header, a round control */
.ph-sound { pointer-events: auto; flex: none; display: grid; place-items: center; padding: 0; cursor: pointer; }
.ph-sound svg { width: 20px; height: 20px; }
.xs-foot .ph-sound { width: 40px; height: 30px; border: 0; border-radius: 9px; background: none; color: #1a1d4a; }
.xs-foot .ph-sound[aria-pressed="true"] { background: #d0d3f7; color: #030090; }
.ph-sound.ask { box-shadow: 0 0 0 2px #ff955a; }
/* the phone's own Auracast picker: the broadcasts nearby and nothing else */
.sys-page { gap: 12px; padding: 30px 12px 14px; background: #000; color: #fff; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.sys-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sys-head b { display: block; font: 700 18px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif; }
.sys-head span { display: block; font: 500 10.5px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif; color: #98989f; }
.sys-head .ph-sound { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #2c2c2e; color: #fff; }
.sys-head .ph-sound[aria-pressed="true"] { background: #0a84ff; }
.sys-head .ph-sound svg { width: 18px; height: 18px; }
.au-list { list-style: none; margin: 0; padding: 0; display: grid; border-radius: 12px; overflow: hidden; background: #1c1c1e; }
.au-list li + li button { border-top: 1px solid #38383a; }
/* each broadcast is a button: tapping one switches to it */
.au-list button { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 10px 12px; border: 0; background: #1c1c1e; font: 500 13px/1.25 system-ui, -apple-system, "Segoe UI", sans-serif; color: #fff; text-align: left; cursor: pointer; }
.au-list button:hover { background: #2c2c2e; }
.au-list [aria-pressed="true"]::after { content: "\2713"; color: #0a84ff; font-weight: 700; }
.sys-foot { margin: auto 0 0; font: 500 10.5px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif; color: #98989f; text-align: center; }
.pov-on .path, .pov-on .info, .pov-on #labels { display: none; }

.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font: 500 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; pointer-events: none; }

@media (max-width: 900px) {
  .path { top: auto; bottom: calc(var(--bottom-h, 140px) + 26px); width: auto; right: 16px; }
  .path header { display: none; }
  .steps { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .step { min-width: 190px; }
  .steps li::before { display: none; }
  .info { top: auto; bottom: calc(var(--bottom-h, 140px) + var(--path-h, 80px) + 38px); left: 16px; right: 16px; width: auto; max-height: 34%; }
  .views { border-radius: 14px; }
}
@media (max-width: 560px) {
  .ticker { flex-basis: 100%; }
  .controls { width: 100%; }
}
/* how to move the camera: in the top bar on wide screens, in the control panel otherwise */
.nav-help { pointer-events: auto; margin: 0; display: flex; gap: 16px; align-items: center; font-size: 12.5px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; backdrop-filter: blur(8px); }
.nav-help span, .nav-help-inline span { white-space: nowrap; }
.nav-help kbd, .nav-help-inline kbd { font: 600 11px/1 var(--mono); color: var(--fg); background: var(--panel-solid); border: 1px solid var(--edge); border-bottom-width: 2px; border-radius: 5px; padding: 3px 6px; margin-right: 3px; }
.nav-help-inline { font-size: 12.5px; color: var(--muted); gap: 12px; padding: 4px 0; }
.move-group { display: none; }
@media (max-width: 1100px) { .top .nav-help { display: none; } .move-group { display: flex; } }
.pov-on .nav-help { display: none; }
#view canvas { cursor: grab; }
#view canvas:active { cursor: grabbing; }
/* panels can be hidden to see the whole scene */
.views .panels-btn { border-left: 1px solid var(--line); border-radius: 0 999px 999px 0; }
.views .panels-btn[aria-pressed="true"] { background: var(--accent); color: var(--ink); font-weight: 600; }
#app.panels-off .path, #app.panels-off .info, #app.panels-off .bottom { display: none !important; }
.info .min-btn { right: 40px; font-size: 16px; }
#info-body > .eyebrow { padding-right: 64px; }
.guide-btn { position: absolute; z-index: 2; right: 16px; top: 72px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--accent); background: var(--panel-solid); color: var(--accent); font-weight: 600; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,0.35); }
.guide-btn:hover { background: rgba(44, 44, 131, 0.95); }
#app.panels-off .guide-btn, .pov-on .guide-btn { display: none !important; }
.info.min #info-body > :not(.eyebrow):not(.tour-nav) { display: none; }
.info.min .tour-nav { margin-top: 6px; padding-top: 8px; }
.dots { display: none; gap: 6px; margin: 0 0 10px; flex-wrap: wrap; padding-right: 64px; } /* wraps clear of the – and × */
.dots button { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--panel-solid); font: 600 11.5px/1 var(--mono); color: var(--muted); padding: 0; }
.dots button.done { border-color: var(--accent); color: var(--accent); }
.dots button.current { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.ctl-toggle { display: none; }

/* phones: no step list (the card's step buttons replace it), a collapsible card, controls behind a button, a one-line caption bar */
@media (max-width: 700px) {
  .top { top: 8px; left: 12px; right: 12px; gap: 8px; }
  /* as wide as the scenario switch under it, so both line up at the left and right */
  .views { flex: 1 1 100%; flex-wrap: nowrap; }
  .views button { flex: 1 1 auto; padding: 5px 7px; font-size: 12px; white-space: normal; line-height: 1.2; }
  .views .scene-sound { flex: none; }
  .path { display: none; }
  .dots { display: flex; }
  /* one line, so it never sits over the phone; the seat shortens if it must */
  .pov .bar { top: 80px; padding: 5px 6px; gap: 5px; flex-wrap: nowrap; max-width: calc(100% - 16px); }
  .pov .bar .seat-btn { padding: 5px 8px; font-size: 12.5px; min-width: 0; }
  .pov .bar .seat-btn b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .pov .bar select { max-width: 96px; font-size: 12.5px; }
  .pov .bar .btn { padding: 6px 9px; font-size: 12.5px; flex: none; }
  .seat-map { top: 172px; }
  .plan .seat { width: 18px; height: 18px; }
  .guide-btn { top: auto; right: auto; left: 12px; bottom: calc(var(--bottom-h, 60px) + 20px); }
  .info { top: auto; left: 12px; right: 12px; width: auto; bottom: calc(var(--bottom-h, 60px) + 20px); max-height: 44%; padding: 12px 14px; }
  .info h2 { font-size: 18px; }
  .bottom { left: 12px; right: 12px; bottom: 10px; gap: 8px; }
  .controls { display: none; order: -1; width: 100%; }
  /* the open panel: room between its groups; the scene's buttons in one even row, a mode switch across the width,
     the switches in two even columns, and the touch hints last, on one line */
  #app.controls-open .controls { display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: 12px 14px 14px; }
  .controls .cgroup { gap: 7px; }
  .controls .scene-group .crow { display: grid; grid-template-columns: 1.3fr 0.7fr 1.3fr; gap: 6px; }
  .controls .scene-group .btn { min-width: 0; padding: 9px 10px; font-size: 14px; }
  .controls .seg { display: flex; }
  .controls .seg button { flex: 1; padding: 7px 8px; }
  .controls .crow.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .controls .toggles .tg span { width: 100%; box-sizing: border-box; white-space: nowrap; }
  .controls .move-group { order: 9; }
  .controls .nav-help-inline { flex-wrap: nowrap; gap: 10px; padding: 0; font-size: 12px; }
  .controls .nav-help-inline kbd { font-size: 10.5px; padding: 2px 5px; }
  /* a settings button, square, lit while the panel is open; it sits over the scene itself, so it has the panels' own
     background, readable over a light floor or sky */
  .ctl-toggle { display: inline-flex; align-items: center; justify-content: center; align-self: stretch; padding: 0 13px; background: var(--panel); border-color: var(--line); backdrop-filter: blur(8px); color: var(--fg); }
  .ctl-toggle svg { width: 20px; height: 20px; }
  #app.controls-open .ctl-toggle { background: var(--accent); border-color: var(--accent); color: var(--ink); }
  /* who is speaking, and who for, on its own line above the words; the words keep to one line, rolling up as a long
     line goes on, so the bar never changes height */
  .ticker { flex: 1 1 0; padding: 6px 10px 7px; gap: 1px 0; grid-template-columns: 1fr; grid-template-areas: "who" "en"; }
  .ticker .who { font-size: 11.5px; }
  .ticker .lang, .ticker .tr { display: none; }
  .ticker .en { font-size: 13.5px; height: 1.45em; min-height: 1.45em; max-height: 1.45em; }
  /* the step numbers close enough for nine in a row */
  .dots { gap: 4px; padding-right: 60px; }
  .dots button { width: 23px; height: 23px; font-size: 10.5px; }
  /* a roomier phone, and a tighter broadcast list, so what is playing still shows */
  .phone-ui { height: min(calc(min(260px, 60vw) * 18.5 / 9), calc(100% - var(--bottom-h, 92px) - 150px)); padding: 8px; border-radius: 28px; }
  .ph-screen { border-radius: 22px; }
  .xs-head { padding-top: 18px; }
  .au-list button { padding: 8px 10px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .step, .views button { transition: none; } }
