/* Epic Life Live Stage: page layers, HUD, start overlay. Brand tokens come from deck/assets/tokens.css (night theme). */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; block-size: 100%; background: #05050d; color: var(--ink); font-family: var(--font-sans); overflow: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

.app { position: fixed; inset: 0; overflow: hidden; --band: 56.25vw; color: var(--ink); font-family: var(--font-sans); }

/* ---------- stage layers ---------- */
.viewport { position: absolute; inset: 0; overflow: hidden; background: #05050d; }
.css-layer { position: absolute; inset: 0; overflow: hidden; perspective-origin: 50% 50%; }
.css-cam { position: absolute; inset-block-start: 0; inset-inline-start: 0; transform-style: preserve-3d; pointer-events: none; }
.deck { position: absolute; inset-block-start: 0; inset-inline-start: 0; inline-size: 1920px; block-size: 1080px; border: 0; background: #fff; pointer-events: none; transform-origin: 50% 50%; }
.gl { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; display: block; pointer-events: none; }

/* ---------- HUD ---------- */
.hud { position: absolute; inset: 0; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-top { position: absolute; inset-block-start: 0; inset-inline: 0; display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: linear-gradient(180deg, rgba(5, 5, 13, .72), rgba(5, 5, 13, 0)); transition: opacity .4s; pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.hud-logo { block-size: 26px; inline-size: auto; opacity: .95; }
.grow { flex: 1 1 0; }
.ai-label { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: rgba(20, 20, 40, .72); border: 1px solid rgba(255, 255, 255, .18); }
.ai-label i { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--gradient-spectrum); }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; letter-spacing: .02em; background: rgba(20, 20, 40, .72); border: 1px solid rgba(255, 255, 255, .18); white-space: nowrap; }
.pill::before { content: ""; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--spectrum-green); }
.pill[data-mode="scripted"]::before { background: var(--spectrum-amber); border-radius: 2px; transform: rotate(45deg); }
.pill:empty { display: none; }

.seg { display: inline-flex; border: 1px solid rgba(255, 255, 255, .3); border-radius: var(--radius-pill); overflow: hidden; background: rgba(20, 20, 40, .72); }
.seg button { min-inline-size: 44px; min-block-size: 38px; padding: 0 12px; border: 0; background: transparent; font-weight: 700; font-size: 13px; letter-spacing: .05em; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--ink-inverse); }
.seg-lg button { min-block-size: 46px; min-inline-size: 64px; font-size: 15px; }

.ib { display: inline-grid; place-items: center; inline-size: 44px; block-size: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .28); background: rgba(20, 20, 40, .78); transition: background .15s; }
.ib:hover { background: rgba(60, 60, 100, .9); }
.ib:disabled { opacity: .4; cursor: default; }
.ib[aria-pressed="true"] { background: var(--ink); color: var(--ink-inverse); border-color: var(--ink); }
.ib-lg { inline-size: 54px; block-size: 54px; background: var(--ink); color: var(--ink-inverse); border-color: var(--ink); }
.ib-lg:hover { background: #fff; }
.ib-fill { background: var(--action); color: var(--action-ink); border-color: var(--action); }
.ic { inline-size: 22px; block-size: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic-fill { fill: currentColor; stroke: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-block-size: 48px; padding: 0 22px; border-radius: var(--radius-pill); border: 3px solid transparent; font-weight: 800; font-size: 15px; line-height: 1.1; white-space: nowrap; }
/* the primary action wears the spectrum: navy fill, spectrum ring, white text (contrast stays AA) */
.btn-primary { color: #fff; background: linear-gradient(#141428, #141428) padding-box, var(--gradient-spectrum) border-box; box-shadow: 0 0 22px rgba(129, 11, 171, .35); }
.btn-primary:hover { background: linear-gradient(#262648, #262648) padding-box, var(--gradient-spectrum) border-box; }
.btn-go { color: var(--ink-inverse); background: var(--ink); }
.btn-go:hover { background: #fff; }
.btn-ghost { background: rgba(20, 20, 40, .78); border-color: rgba(255, 255, 255, .4); }
.btn-ghost:hover { background: rgba(60, 60, 100, .9); }
.btn-xl { min-block-size: 58px; padding: 0 34px; font-size: 18px; }

/* ---------- caption: broadcast lower third ---------- */
.lower { inline-size: 100%; display: flex; justify-content: center; padding: 0 clamp(0px, 3vw, 48px); pointer-events: none; transition: opacity .35s; }
.lower-card { max-inline-size: min(960px, 100%); inline-size: fit-content; padding: 14px 22px 14px 26px; border-radius: 4px var(--radius-lg) var(--radius-lg) 4px; background: rgba(12, 12, 36, .86); border-inline-start: 6px solid transparent; border-image: var(--gradient-spectrum) 1; border-image-slice: 1; backdrop-filter: blur(6px); box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lower-text { margin: 0; font-size: clamp(16px, 1.45vw, 24px); line-height: 1.34; font-weight: 600; text-wrap: pretty; }
.lower-meta { margin: 0; display: flex; gap: 8px; }
.lower-meta:has(.chip[hidden]) { display: none; }
.chip { display: inline-block; margin-block-start: 8px; padding: 3px 12px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--ink); color: var(--ink-inverse); }
.lower-legal { margin: 8px 0 0; max-inline-size: 900px; font-size: 11px; line-height: 16px; color: var(--ink-muted); }
.app[data-captions="off"] .lower-card { display: none; }
.lower-text:empty { display: none; }
.lower-card:has(.lower-text:empty):not(:has(.chip:not([hidden]))) { display: none; }

/* ---------- dock: ask bar + controls ---------- */
.dock { position: absolute; inset-inline: 0; inset-block-end: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 16px calc(16px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(0deg, rgba(5, 5, 13, .72), rgba(5, 5, 13, 0)); pointer-events: none; transition: opacity .4s; }
.dock > * { pointer-events: auto; }
.controls { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.askbar { display: flex; align-items: center; gap: 8px; inline-size: min(720px, 100%); }
.askbar[hidden], .answer-actions[hidden] { display: none; }
.ask-input { flex: 1 1 0; min-inline-size: 0; min-block-size: 50px; padding: 0 20px; font-size: 17px; border-radius: var(--radius-pill); border: 2px solid rgba(255, 255, 255, .5); background: rgba(12, 12, 36, .92); color: var(--ink); }
.ask-input::placeholder { color: var(--ink-muted); opacity: 1; }
.ask-input:focus { border-color: var(--action); outline: none; box-shadow: 0 0 0 3px rgba(181, 155, 255, .45); }
.answer-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.askbar[data-busy="true"] { opacity: .6; }
#micBtn[aria-pressed="true"], #askMic[aria-pressed="true"] { background: var(--spectrum-red); border-color: var(--spectrum-red); color: #fff; animation: rec 1s ease-in-out infinite alternate; }
@keyframes rec { to { box-shadow: 0 0 0 8px rgba(252, 25, 81, .25); } }

.chapters { position: absolute; inset-block-end: calc(100% + 6px); inline-size: min(420px, calc(100% - 32px)); max-block-size: 55vh; overflow: auto; padding: 8px; border-radius: var(--radius-lg); background: rgba(12, 12, 36, .96); border: 1px solid rgba(255, 255, 255, .25); box-shadow: 0 12px 50px rgba(0, 0, 0, .6); }
.chapters[hidden] { display: none; }
.chapters h3 { margin: 10px 10px 4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }
.chapters button { display: block; inline-size: 100%; text-align: start; min-block-size: 40px; padding: 8px 12px; border: 0; border-radius: var(--radius-md); background: transparent; font-size: 14px; font-weight: 600; }
.chapters button:hover, .chapters button[aria-current="true"] { background: rgba(255, 255, 255, .12); }
.dock { position: absolute; }
.dock .chapters { inset-inline-start: 50%; transform: translateX(-50%); }

.notice { position: absolute; inset-block-start: 70px; inset-inline: 0; margin: 0 auto; inline-size: fit-content; max-inline-size: min(560px, calc(100% - 32px)); padding: 10px 16px; border-radius: var(--radius-md); background: var(--ink); color: var(--ink-inverse); font-size: 14px; font-weight: 600; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); }
.notice[hidden] { display: none; }
.debug-readout { position: absolute; inset-block-start: 64px; inset-inline-start: 12px; margin: 0; padding: 8px 10px; font: 12px/1.45 var(--font-mono); background: rgba(0, 0, 0, .72); color: #9fffe0; border-radius: 6px; white-space: pre; pointer-events: none; }
.debug-readout[hidden] { display: none; }

/* ---------- idle fade (presenting) and clean mode ---------- */
.app.hud-idle .hud-top, .app.hud-idle .controls { opacity: 0; pointer-events: none; }
.app.hud-idle .controls > *, .app.hud-idle .hud-top > * { pointer-events: none; }
.app.hud-idle { cursor: none; }
.app.clean .hud-top > :not(.ai-label), .app.clean .controls, .app.clean .lower, .app.clean .askbar, .app.clean .answer-actions { opacity: 0; pointer-events: none; }
.app.clean .dock { background: none; }
.app.clean .hud-top { background: none; }
.app.clean #cleanBtn { opacity: 1; }

/* ---------- start overlay ---------- */
.start { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at 50% 40%, rgba(20, 20, 40, .55), rgba(5, 5, 13, .88) 70%); backdrop-filter: blur(3px); z-index: 20; transition: opacity .5s; }
.app:not([data-state="ready"]) .start { opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .5s, visibility 0s .5s; }
.start-card { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; max-inline-size: 520px; }
.start-logo { inline-size: clamp(150px, 22vw, 240px); height: auto; filter: brightness(0) invert(1); }
.start-title { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-muted); }
.start-note { margin: 0; font-size: 13px; color: var(--ink-muted); }
.start-load { margin: 0; font-size: 12px; color: var(--ink-muted); min-block-size: 18px; }
.start-load:empty { visibility: hidden; }
#startBtn[disabled] { opacity: .55; cursor: wait; }

/* ---------- ready: HUD stays out of the way ---------- */
.app[data-state="ready"] .dock { visibility: hidden; }

/* ---------- portrait: the 3D view is a 16:9 band at the top, captions and controls below ---------- */
@media (max-aspect-ratio: 1/1) {
  .viewport { inset-block-end: auto; block-size: var(--band); }
  .hud-top { block-size: auto; padding: 8px 10px; gap: 6px; }
  .hud-logo { block-size: 18px; }
  .ai-label { font-size: 9px; padding: 3px 7px; }
  .pill { display: none; }
  .seg button { min-inline-size: 38px; min-block-size: 34px; padding: 0 8px; }
  .ib { inline-size: 40px; block-size: 40px; }
  .lower-card { inline-size: 100%; }
  .lower-text { font-size: 18px; }
  .dock { background: none; padding-block-end: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .controls { gap: 8px; }
  .app.hud-idle .hud-top, .app.hud-idle .controls { opacity: 1; pointer-events: auto; }
  .start-card { padding-block-end: 8vh; }
}
@media (max-width: 560px) {
  .btn { padding: 0 16px; min-block-size: 44px; font-size: 14px; }
  .hud-logo { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hud-top, .dock, .lower, .start { transition-duration: .01s; }
  #micBtn[aria-pressed="true"], #askMic[aria-pressed="true"] { animation: none; }
}

/* no WebGL: the deck is shown flat */
.app.flat .css-cam { transform: none !important; inline-size: 100% !important; block-size: 100% !important; }
.app.flat .css-layer { perspective: none !important; }
.app.flat .deck { inline-size: 100%; block-size: 100%; transform: none !important; }
.app.flat .gl { display: none; }

/* ======== v2: the picture belongs to the presenter. Captions live on the wall; the HUD stays at the edges ======== */
.hud-logo { inline-size: 120px; block-size: auto; }
.dock { padding: 8px 16px calc(6px + env(safe-area-inset-bottom, 0px)); background: none; gap: 6px; }
.controls .ib { inline-size: 38px; block-size: 38px; }
.controls .ib-lg { inline-size: 42px; block-size: 42px; }
.controls .btn { min-block-size: 38px; padding: 0 18px; font-size: 14px; }
.controls { gap: 8px; padding: 3px 8px; border-radius: var(--radius-pill); background: rgba(12, 12, 36, .6); }

/* ask panel */
.askpanel { position: absolute; z-index: 8; display: flex; flex-direction: column; gap: 12px; padding: 20px 22px; border-radius: var(--radius-xl); background: rgba(12, 12, 36, .94); border: 1px solid rgba(255, 255, 255, .22); box-shadow: 0 18px 60px rgba(0, 0, 0, .55); pointer-events: auto; }
.askpanel[hidden] { display: none; }
.ap-title { margin: 0; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 800; color: var(--ink-muted); }
.ap-last { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: var(--radius-lg); background: rgba(255, 255, 255, .07); }
.ap-last[hidden] { display: none; }
.ap-q { margin: 0; font-size: 13px; font-weight: 800; color: var(--ink-muted); }
.ap-a { margin: 0; font-size: 16px; line-height: 1.45; font-weight: 500; }
.ap-meta { margin: 0; } .ap-meta:has(.chip[hidden]) { display: none; }
.ap-legal { margin: 0; font-size: 11px; line-height: 16px; color: var(--ink-muted); }
.ap-chips { display: flex; flex-direction: column; gap: 8px; }
.ap-chips[hidden] { display: none; }
.ap-chips button { text-align: start; min-block-size: 44px; padding: 8px 16px; border-radius: var(--radius-lg); border: 1px solid rgba(255, 255, 255, .35); background: transparent; font-size: 14px; font-weight: 600; }
.ap-chips button:hover { background: rgba(255, 255, 255, .12); }
.askbar { inline-size: 100%; }
.answer-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.askpanel[data-ap="pill"] { padding: 8px; border-radius: var(--radius-pill); flex-direction: row; gap: 8px; }
.askpanel[data-ap="pill"] .ap-title, .askpanel[data-ap="pill"] .ap-last, .askpanel[data-ap="pill"] .ap-chips, .askpanel[data-ap="pill"] .askbar { display: none; }
.askpanel[data-ap="pill"] .btn { min-block-size: 42px; padding: 0 16px; font-size: 14px; }
.askpanel[data-ap="pill"] .answer-actions { flex-wrap: nowrap; }

@media (min-aspect-ratio: 1/1) {
  .askpanel[data-ap="card"] { inset-inline-end: 3vw; inset-block-start: 11vh; inline-size: min(46vw, 560px); max-block-size: 78vh; overflow: auto; }
  .askpanel[data-ap="pill"] { inset-inline-end: 14px; inset-block-end: 10px; inline-size: auto; }
  /* while she is being asked or answering there is no transport: the picture is hers */
  .app[data-state="listening"] .controls, .app[data-state="thinking"] .controls, .app[data-state="answering"] .controls { display: none; }
  .app[data-state="listening"] .dock, .app[data-state="thinking"] .dock, .app[data-state="answering"] .dock { padding: 0; }
}
@media (max-aspect-ratio: 1/1) {
  .askpanel[data-ap="card"] { inset-inline: 10px; inset-block-start: calc(var(--band) + 8px); padding: 14px; gap: 10px; max-block-size: calc(100% - var(--band) - 90px); overflow: auto; }
  .askpanel[data-ap="pill"] { inset-inline: 0; margin-inline: auto; inline-size: fit-content; inset-block-end: 74px; }
  .app[data-ap="card"] .lower { display: none; }
}

/* loading line on the start overlay */
.start-bar { inline-size: min(280px, 70vw); block-size: 3px; border-radius: 3px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.start-bar[hidden] { display: none; }
.start-bar i { display: block; inline-size: 100%; block-size: 100%; background: var(--gradient-spectrum); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform .25s ease-out; }

/* ---- plain deck (no WebGL): the deck on its own, with a one-line note ---- */
.app.plain .hud, .app.plain .start, .app.plain .gl { display: none; }
.app.plain .viewport { inset: 0; block-size: auto; }
.app.plain .css-layer { perspective: none !important; }
.app.plain .css-cam { transform: none !important; inline-size: 100% !important; block-size: 100% !important; }
.app.plain .deck { inline-size: 100%; block-size: 100%; transform: none !important; pointer-events: auto; outline: 0 !important; }
.plain-note { position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 30; margin: 0; padding: 6px 12px; text-align: center; font-size: 13px; font-weight: 600; background: #f4f5f8; color: #141428; border-block-end: 1px solid #c9cde0; }
.plain-note[hidden] { display: none; }
.app.plain .viewport { inset-block-start: 30px; }

/* ---- touch: every target at least 44 px ---- */
@media (pointer: coarse), (max-width: 700px) {
  .ib, .controls .ib, .controls .ib-lg { inline-size: 44px; block-size: 44px; }
  .controls .btn, .askpanel[data-ap="pill"] .btn { min-block-size: 44px; }
  .seg button { min-block-size: 44px; min-inline-size: 44px; }
}

/* ---- portrait phone: the 3D band is clean; the toolbar, caption and Ask card sit below it ---- */
@media (max-aspect-ratio: 1/1) {
  .hud-top { inset-block-start: var(--band); background: none; padding: 8px 10px; }
  .lower { position: absolute; inset-inline: 0; inset-block-start: calc(var(--band) + 62px); inline-size: auto; padding: 0 12px; }
  .askpanel[data-ap="card"] { inset-block-start: calc(var(--band) + 62px); max-block-size: calc(100% - var(--band) - 150px); }
  .notice { inset-block-start: calc(var(--band) + 66px); }
  .debug-readout { inset-block-start: 4px; font-size: 9px; max-inline-size: 60%; }
}
@media (max-aspect-ratio: 1/1) {
  .dock { inset-block-start: 0; justify-content: flex-end; }
  .dock .controls { pointer-events: auto; }
}
@media (max-aspect-ratio: 1/1) {
  /* portrait never fades the HUD, so its buttons must stay tappable (they were inert while 'idle') */
  .app.hud-idle .controls > *, .app.hud-idle .hud-top > * { pointer-events: auto; }
}
@media (max-aspect-ratio: 1/1) {
  .askpanel[data-ap="pill"] { inset-block-end: 138px; max-inline-size: calc(100% - 16px); border-radius: 26px; }
  .askpanel[data-ap="pill"] .answer-actions { flex-wrap: wrap; justify-content: center; }
}
@media (min-aspect-ratio: 1/1) {
  .askpanel[data-ap="card"] { inset-block-start: max(11vh, 66px); max-block-size: calc(100vh - max(11vh, 66px) - 12px); }
}

/* ======== v3: a live event. The subtitle strip is in the page, the opening is a house state, the end offers Replay ======== */
@media (min-aspect-ratio: 1/1) {
  /* broadcast subtitle strip: one line (two at most) at the very bottom of the picture, inside the band under her feet. The transport row floats over it while visible and takes no space. */
  .dock { inset-block: auto 0; block-size: 0; padding: 0; gap: 0; display: block; }
  .lower { position: absolute; inset-inline: 0; inset-block-end: 8px; padding: 0 3vw; }
  /* the transport is two compact clusters in the bottom corners, on the subtitle's baseline: the middle belongs to the subtitle */
  .controls { position: absolute; inset-block-end: 8px; inset-inline: 14px; display: flex; justify-content: space-between; align-items: flex-end; background: none; padding: 0; border-radius: 0; pointer-events: none; }
  .ctl { display: flex; align-items: center; gap: 8px; padding: 3px 8px; border-radius: var(--radius-pill); background: rgba(12, 12, 36, .6); pointer-events: auto; }
  .ctl:not(:has(> :not([hidden]))) { display: none; }
  .dock .chapters { inset-block-end: 62px; }
  .lower-card { max-inline-size: min(1180px, 82vw); padding: 6px 22px 8px; border-radius: 8px; border: 0; border-image: none; background: rgba(6, 6, 18, .8); backdrop-filter: none; box-shadow: none; text-align: center; margin-inline: auto; }
  .lower-text { font-size: clamp(19px, 1.75vw, 33px); line-height: 1.28; font-weight: 600; letter-spacing: .005em; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
  /* the answer's source chip and the legal disclosure: small, in the bottom-left corner, out of the way of the picture */
  .lower-meta { position: fixed; inset-inline-start: 14px; inset-block-end: 14px; margin: 0; }
  .lower-meta .chip { margin: 0; padding: 2px 10px; font-size: 11px; }
  .lower-legal { position: fixed; inset-inline-start: 14px; inset-block-end: 62px; margin: 0; max-inline-size: 26vw; font-size: 11px; line-height: 1.35; color: #c9cde0; text-align: start; }
  .app[data-state="answering"] .lower, .app[data-state="listening"][data-answered="true"] .lower { justify-content: flex-start; padding-inline-start: 7vw; }
  .app[data-state="answering"] .lower-card, .app[data-state="listening"][data-answered="true"] .lower-card { max-inline-size: 55vw; margin-inline: 0; }
  .app[data-state="listening"]:not([data-answered="true"]) .lower, .app[data-state="thinking"] .lower { display: none; }
}
.app[data-captions="off"] .lower-card { display: none; }
.btn-replay { min-block-size: 38px; padding: 0 16px; font-size: 14px; }
.btn-replay[hidden] { display: none; }
/* at the end: Ask is offered, quietly */
.app[data-ended="true"] #askBtn { animation: offer 2.2s ease-in-out infinite; }
@keyframes offer { 50% { box-shadow: 0 0 30px rgba(129, 11, 171, .85); } }
@media (prefers-reduced-motion: reduce) { .app[data-ended="true"] #askBtn { animation: none; } }

/* the house state, before Start: the stage softly lit behind a light veil, the start card low in the frame, nothing over the wall */
.start { place-items: end center; padding: 0 20px 5vh; background: linear-gradient(0deg, rgba(5, 5, 13, .82) 0%, rgba(5, 5, 13, .55) 34%, rgba(5, 5, 13, 0) 62%); backdrop-filter: none; }
.start-card { gap: 12px; }
.start-logo { inline-size: clamp(110px, 12vw, 170px); }
@media (max-aspect-ratio: 1/1) { .start { place-items: center; background: radial-gradient(ellipse at 50% 40%, rgba(20, 20, 40, .55), rgba(5, 5, 13, .88) 70%); } }

.ctl { display: contents; }
@media (min-aspect-ratio: 1/1) { .ctl { display: flex; } }
@media (max-aspect-ratio: 1/1) { .ctl { display: flex; gap: 8px; } }

/* ---- the top bar never covers the wall (landscape): the chips live beside the wall, in its side margins; in the speaker shot the margins are narrow, so only the switches remain ---- */
.hud-l, .hud-r { display: flex; align-items: center; gap: 10px; }
@media (min-aspect-ratio: 1/1) {
  .app.hud-side .hud-top { padding: 0; background: none; display: block; }
  .app.hud-side .hud-l { position: absolute; inset-block-start: 8px; inset-inline-start: 8px; inline-size: var(--ml, 180px); flex-direction: column; align-items: flex-start; gap: 8px; }
  .app.hud-side .hud-r { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; inline-size: var(--mr, 180px); flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
  .app.hud-side .pill { white-space: normal; font-size: 11px; padding: 4px 10px; text-align: start; }
  .app.hud-min .hud-logo, .app.hud-min .ai-label, .app.hud-min .pill { display: none; }
}
.app.clean .hud-l { opacity: 1; pointer-events: none; }
.app.clean .hud-l .hud-logo { opacity: 0; }
@media (min-aspect-ratio: 1/1) {
  .app.hud-min .hud-r { flex-direction: column; flex-wrap: nowrap; align-items: flex-end; }
  .app.hud-min .seg button { min-inline-size: 30px; min-block-size: 34px; padding: 0 6px; font-size: 12px; }
  .app.hud-min .ib { inline-size: 36px; block-size: 36px; }
  .app[data-state="answering"] .lower, .app[data-state="listening"][data-answered="true"] .lower { padding-inline-start: max(7vw, 130px); }
}
@media (min-aspect-ratio: 1/1) { .app[data-state="answering"] .lower-card, .app[data-state="listening"][data-answered="true"] .lower-card { max-inline-size: calc(100vw - max(7vw, 130px) - 450px); } }
@media (min-aspect-ratio: 1/1) {
  .app.hud-min.hud-swl .hud-r { inset-inline-end: auto; inset-inline-start: 8px; inline-size: var(--ml, 90px); align-items: flex-start; }
}

/* one language: the EN/FR switches are hidden completely (the hidden attribute alone loses to the .seg display rule) */
#langs[hidden], #startLangs[hidden] { display: none !important; }
