/* Lyfera Arcade — public pages (ARCADE-20261121).
   Board B · Marquee, approved by the user on 21/11: https://claude.ai/artifact/WLqmy1T66J19gqzDGkQz4K
   /games (B1, B2), /games/<id> (B5–B9), the game scene on /talent/<slug> (B3).
   Only tokens from template/shared/tokens.css; every class starts with arcade- and is listed in
   docs/design/arcade-public-20261121.md. The dark scene is the template's plate, the same in both themes. */

/* —— The dark scene: opening of /games and /games/<id>, band on the talent profile —— */
.arcade-opening { background: linear-gradient(172deg, var(--plate-scene-top) 0%, var(--plate-scene-mid) 52%, var(--plate-veil) 100%); color: var(--on-plate); }
.arcade-opening__in { max-width: var(--max); margin-inline: auto; padding: calc(var(--chrome-h, 128px) + var(--s16)) var(--gutter) calc(var(--s16) + var(--s2)); }
.arcade-opening__in--page { padding-top: calc(var(--chrome-h, 128px) + var(--s10)); }
.arcade-opening--band { scroll-margin-top: calc(var(--chrome-h, 128px) + var(--chrome-gap, 12px)); }
.arcade-opening--band .arcade-opening__in { padding-block: calc(var(--s16) + var(--s2)); }
/* Text beside the cover on a wide page; on a narrow one the cover sits between the title and the action (B2, B6). */
.arcade-marquee { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); grid-template-areas: "head cover" "foot cover"; column-gap: clamp(28px, 5vw, 64px); align-items: center; }
.arcade-marquee__head { grid-area: head; align-self: end; min-width: 0; }
.arcade-marquee__foot { grid-area: foot; align-self: start; min-width: 0; }
.arcade-marquee > .arcade-cover { grid-area: cover; }
/* T8: the games turn as the heroes of the public home do (op-029.css: stacked, one active, opacity crossfade at --d-slow). */
.arcade-marquee > .arcade-stack--cover { grid-area: cover; min-width: 0; }
.arcade-stack { display: grid; }
.arcade-stack > * { grid-area: 1 / 1; opacity: 0; pointer-events: none; transition: opacity var(--d-slow) var(--ease-in-out); }
.arcade-stack > [data-hero-active="true"] { opacity: 1; pointer-events: auto; }
.arcade-marquee__toggle { margin-top: var(--s6); }
@media (prefers-reduced-motion: reduce) { html:not([data-public-motion-preference="full"]) .arcade-stack > * { transition: none !important; } }
.arcade-crumbs + .arcade-marquee { margin-top: var(--s6); }
/* The scene on a talent profile: cover first, text beside it (B3). */
.arcade-opening__row { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(28px, 5vw, 64px); }
.arcade-opening__copy { flex: 1 1 360px; min-width: 0; }
.arcade-opening .mono { color: var(--on-plate-mut); }
.arcade-opening .h2 { color: var(--on-plate); }
.arcade-opening .section-mark { color: var(--on-plate-mut); }
.arcade-opening__title { margin: var(--s4) 0 0; font-weight: var(--w-light); font-size: clamp(2.3125rem, 7.2vw, 4.875rem); line-height: 1.1; letter-spacing: var(--tr-tight); color: var(--on-plate); text-wrap: balance; overflow-wrap: anywhere; }
.arcade-opening__title--scene { font-size: clamp(1.8125rem, 4.14vw, 2.75rem); line-height: 1.06; }
.arcade-opening__data { margin: var(--s8) 0 0; }
.arcade-opening__data dd { margin: 0; }
.arcade-opening__line { margin: var(--s6) 0 0; max-width: 46ch; font-weight: var(--w-light); font-size: var(--t-md); line-height: 1.55; color: var(--on-plate); }
.arcade-launch { margin-top: var(--s10); }
.arcade-marquee__foot > .arcade-actions:first-child { margin-top: var(--s8); }
.arcade-launch .h2 { margin-top: var(--s3); }
.arcade-launch__label { color: var(--brand-rule); }
.arcade-genre { margin: var(--s3) 0 0; }
.arcade-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s6); }
.arcade-actions .control { min-height: 45px; }
.arcade-more { margin: var(--s5) 0 0; }
.arcade-more a, .arcade-byline a, .arcade-crumbs a { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; font-family: var(--mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: var(--tr-wide); color: var(--on-plate-mut); transition: color var(--d-fast) var(--ease-out); }
.arcade-more a:hover, .arcade-byline a:hover, .arcade-crumbs a:hover { color: var(--on-plate); }
.arcade-byline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin: var(--s2) 0 0; font-family: var(--mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: var(--tr-wide); color: var(--on-plate-mut); }
.arcade-byline a { color: var(--on-plate); }
.arcade-crumbs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); font-family: var(--mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: var(--tr-wider); color: var(--on-plate-mut); }
.arcade-crumbs a { letter-spacing: var(--tr-wider); }
.arcade-crumbs [aria-current] { color: var(--on-plate); }
.arcade-crumbs__title { margin: 0; font: inherit; font-weight: var(--w-medium); letter-spacing: inherit; color: var(--on-plate); }
.arcade-crumbs .arcade-crumbs__title a { color: var(--on-plate); }

/* —— The cover: Codex's poster, 16:9, whole. The illustrated title and the face stay inside the frame. —— */
.arcade-cover { flex: 2 1 520px; min-width: 0; display: block; overflow: hidden; aspect-ratio: 16 / 9; background: var(--plate-bottom); }
.arcade-cover img, .arcade-ticket__cover img, .arcade-shot img, .arcade-more-card__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* —— /games: the list of tickets —— */
.arcade-list .browse__bar .h2 { margin-top: var(--s4); }
.arcade-tickets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(560px, 100%), 1fr)); gap: calc(var(--s6) + var(--s1)); margin-top: var(--s10); }
.arcade-ticket { position: relative; display: flex; flex-wrap: wrap; border: 1px solid var(--n200); background: var(--surface); transition: border-color var(--d-fast) var(--ease-out); }
.arcade-ticket:hover { border-color: var(--n300); }
.arcade-ticket__cover { flex: 1 1 260px; max-width: 320px; min-width: 0; display: block; overflow: hidden; aspect-ratio: 16 / 9; background: var(--plate-top); }
.arcade-ticket__body { flex: 1 1 240px; min-width: 0; padding: var(--s4) var(--s5); display: flex; flex-direction: column; }
.arcade-ticket__title { margin: 0; font-weight: var(--w-medium); font-size: var(--t-md); line-height: 1.3; letter-spacing: var(--tr-normal); }
.arcade-ticket__title a { color: var(--n900); }
/* The whole ticket opens the game page; Play sits above it and starts the game. */
.arcade-ticket__title a::after { content: ""; position: absolute; inset: 0; }
.arcade-ticket__meta { margin: var(--s1) 0 0; font-family: var(--mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: var(--tr-wide); line-height: 1.5; color: var(--n600); }
.arcade-ticket__meta--genre { margin-top: 2px; color: var(--n500); }
.arcade-ticket__foot { display: flex; align-items: flex-end; justify-content: flex-end; gap: var(--s3); margin-top: auto; padding-top: var(--s3); }
.arcade-ticket__foot .control { position: relative; z-index: 1; min-height: 44px; padding-inline: var(--s6); }

/* —— /games/<id>: the player. At rest the cover; in play Codex's own frame takes the width of the page. —— */
/* In play the breadcrumb stays in view under the site bar (it is the way back to the page at rest) and the stage takes the rest of the screen. */
.arcade-opening__in[data-playing="true"] { --arcade-bar: calc(var(--chrome-h, 128px) + var(--chrome-gap, 12px) + var(--s2)); --arcade-crumbs-h: 44px; --arcade-stage-h: calc(100svh - var(--arcade-bar) - var(--arcade-crumbs-h) - var(--s3) * 2); padding-bottom: var(--s10); }
.arcade-opening__in[data-playing="true"] .arcade-crumbs { min-height: var(--arcade-crumbs-h); scroll-margin-top: var(--arcade-bar); }
.arcade-stage { position: relative; width: min(100%, calc(var(--arcade-stage-h) * 16 / 9)); aspect-ratio: 16 / 9; margin: var(--s3) auto 0; border: 1px solid rgba(233, 227, 215, 0.22); background: var(--plate-bottom); }
.arcade-stage__frame { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: var(--plate-bottom); }
.arcade-stage__frame[data-state="loading"], .arcade-stage__frame[data-state="error"] { visibility: hidden; }
.arcade-stage__wait { position: absolute; inset: 0; display: flex; flex-direction: column; }
.arcade-stage__wait img { flex: 1 1 auto; min-height: 0; display: block; width: 100%; object-fit: cover; }
.arcade-stage__status { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); min-height: 56px; padding: var(--s2) var(--s5); background: var(--plate-scene-mid); font-family: var(--mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: var(--tr-wide); color: var(--on-plate); }
.arcade-stage__state { display: inline-flex; align-items: center; gap: var(--s2); color: var(--brand-rule); }
.arcade-stage__state[data-kind="error"] { color: var(--on-plate); }
.arcade-stage__state[data-kind="error"] .dot { background: var(--color-error, var(--error)); }
.arcade-stage__name { font-weight: var(--w-medium); }
.arcade-stage__acts { display: flex; flex-wrap: wrap; gap: var(--s2); padding: var(--s3) var(--s3) var(--s3) var(--s5); border-top: 1px solid rgba(233, 227, 215, 0.22); background: var(--plate-bottom); }
.arcade-stage__acts .control { min-height: 44px; }

/* —— /games/<id>: the indexable text under the opening —— */
.arcade-about { display: flex; flex-wrap: wrap; align-items: flex-start; gap: clamp(28px, 5vw, 64px); margin-top: var(--s2); }
.arcade-facts { flex: 1.2 1 420px; min-width: 0; margin: 0; }
.arcade-facts__row { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s8); padding: var(--s6) 0; border-bottom: 1px solid var(--n200); }
.arcade-facts__row dt { flex: 0 0 140px; font-family: var(--mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: var(--tr-wider); color: var(--n500); }
.arcade-facts__row dd { margin: 0; flex: 1 1 280px; min-width: 0; font-weight: var(--w-light); color: var(--n700); }
.arcade-facts__row dd a { color: var(--n900); text-decoration: underline; text-decoration-color: var(--n400); text-underline-offset: 4px; }
.arcade-facts__row dd a:hover { text-decoration-color: var(--n900); }
.arcade-shot { flex: 1 1 420px; min-width: 0; margin: var(--s6) 0 0; }
.arcade-shot__frame { overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--n200); background: var(--surface-subtle); }
.arcade-shot figcaption { margin-top: var(--s3); font-family: var(--mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: var(--tr-wide); color: var(--n500); }
.arcade-more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: calc(var(--s6) + var(--s1)); margin-top: var(--s10); }
.arcade-more-card { display: flex; flex-direction: column; min-width: 0; color: var(--n900); }
.arcade-more-card__cover { display: block; overflow: hidden; aspect-ratio: 16 / 9; background: var(--plate-top); }
.arcade-more-card__title { margin-top: var(--s3); font-size: var(--t-md); font-weight: var(--w-medium); line-height: 1.3; }
.arcade-more-card__meta { margin-top: var(--s1); font-family: var(--mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: var(--tr-wide); line-height: 1.5; color: var(--n500); }

@media (max-width: 1000px) {
  .arcade-marquee { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "cover" "foot"; row-gap: var(--s6); }
  .arcade-marquee__foot > .arcade-actions:first-child, .arcade-marquee__foot > .arcade-launch { margin-top: 0; }
}
@media (max-width: 860px) {
  /* The site bar sits at the bottom of a phone: the scene starts at the top of the page. */
  .arcade-opening__in, .arcade-opening__in--page { padding-top: var(--s10); padding-bottom: var(--s8); }
  .arcade-opening--band .arcade-opening__in { padding-block: var(--s12); }
  .arcade-opening__row { gap: var(--s6); }
  .arcade-cover { flex-basis: 100%; }
  .arcade-opening__data { margin-top: var(--s6); }
  .arcade-actions { display: grid; }
  .arcade-actions .control { justify-content: center; min-height: 48px; white-space: normal; text-align: center; }
  /* A compact ticket: the cover beside the text, so that 44 games stay a list one can scan. */
  .arcade-tickets { gap: var(--s4); margin-top: var(--s6); }
  .arcade-ticket { flex-wrap: nowrap; align-items: flex-start; }
  .arcade-ticket__cover { flex: 0 0 42%; max-width: none; }
  .arcade-ticket__body { flex: 1 1 0; align-self: stretch; padding: var(--s3) var(--s4); }
  /* In play the frame is as wide as the phone and as tall as the screen under the site bar. */
  .arcade-opening__in[data-playing="true"] { --arcade-stage-h: calc(100svh - var(--arcade-bar) - var(--arcade-crumbs-h) - var(--s3)); padding-bottom: 0; }
  .arcade-stage { width: auto; height: var(--arcade-stage-h); aspect-ratio: auto; margin-inline: calc(var(--gutter) * -1); border-inline: 0; }
}
/* Phone turned on its side: the game takes the whole screen and the site bar steps aside (board B8b). */
@media (max-height: 500px) and (orientation: landscape) {
  body:has(.arcade-stage) .masthead { display: none; }
  .arcade-opening__in[data-playing="true"] { --arcade-stage-h: 100svh; }
  .arcade-stage { width: auto; height: 100svh; aspect-ratio: auto; margin-inline: calc(var(--gutter) * -1); border-inline: 0; }
}

/* T8 (reliability review): the immersive view a cartridge asks for where the browser has no full screen for a frame (iPhone, board B8). */
.arcade-stage[data-expanded="true"] { position: fixed; inset: 0; z-index: var(--z-overlay, 1000); width: auto; height: 100dvh; margin: 0; border: 0; aspect-ratio: auto; }
.arcade-stage[data-expanded="true"] .arcade-stage__frame { inset: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); width: calc(100% - env(safe-area-inset-left) - env(safe-area-inset-right)); height: calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
