/* ==========================================================================
   MYTHIC BRAIN WEBSITE — shared kit (all three homepage directions)
   Built on shared/tokens.css. Mirrors the platform's core.css vocabulary
   (plates, pebble buttons, chips, pass, radio line, toasts) in Nightfall.
   Rules: animate transform/opacity only; no blur, no soft shadows; hard drops.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; background: var(--nf-1); overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font: 450 var(--t-body)/1.55 var(--f);
  color: var(--c-text); background: var(--nf-1);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: "calt", "kern";
  overflow-x: clip;
}
img, svg, video, canvas, picture { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.025em; line-height: 1.04; text-wrap: balance; }
/* Titles stay at or below 700 (user, 2026-10-04); emphasis inherits the title weight. */
:is(h1, h2, h3, h4, h5, h6, .display, .h2, .h3, .brand .word) :is(b, strong) { font-weight: inherit; }
p { text-wrap: pretty; }
::selection { background: var(--amber-500); color: var(--ink-900); }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; border-radius: 8px; }
.i { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nojs-only { display: none; } /* shown by shared/nojs.css */
.preview-note { font-size: .84rem; font-weight: 650; color: var(--cream-dim); }
.lede .preview-note { display: block; margin-top: 8px; }
.plate.cream .preview-note { color: var(--ink-500); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.skip { position: fixed; left: 12px; top: -64px; z-index: var(--z-mock); background: var(--amber-500); color: var(--ink-800); font-weight: 800; padding: 10px 16px; border: var(--bw) solid var(--edge); border-radius: 12px; transition: top .2s; }
.skip:focus { top: 12px; }
svg.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
* { scrollbar-width: thin; scrollbar-color: var(--ink-500) transparent; }
[hidden] { display: none !important; }

/* ---------- type ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font: 800 var(--t-eyebrow)/1 var(--f); letter-spacing: .18em; text-transform: uppercase; color: var(--amber-300); }
.eyebrow .i { width: 15px; height: 15px; }
.eyebrow.tagged { color: var(--cream); background: var(--nf-edge); padding: 8px 12px 7px; border-radius: 9px; }
.eyebrow.tagged .i { color: var(--amber-300); }
.display { font-weight: 700; letter-spacing: -.04em; line-height: .92; }
.inked {
  color: var(--paper-50);
 
  text-shadow: 0 var(--tsh, .075em) 0 color-mix(in srgb, var(--ink-stroke, var(--nf-edge)) 20%, transparent);
}
h1, h2, h3, .display, .h2, .h3 { text-shadow: 0 .075em 0 color-mix(in srgb, var(--ink-stroke, var(--nf-edge)) 20%, transparent); }
.plate.cream :is(h1, h2, h3) { text-shadow: none; }
.inked.amber, .inked .amber { color: var(--amber-300); }
.hl { color: var(--amber-300); }
.gold { color: var(--gold-400); }
.dim { color: var(--c-text-2); }
.mute { color: var(--cream-mute); }
.lede { font-size: var(--t-lede); line-height: 1.5; color: var(--cream-dim); max-width: 58ch; }
.lede b, .lede strong { color: var(--cream); font-weight: 750; }
.h2 { font-size: var(--t-h2-site); font-weight: 700; letter-spacing: -.035em; line-height: .98; }
/* Titles ("arcade block", as in the Lookout): one hard shadow at 20% opacity,
   no stroke or blur. Tracking stays at 0.
   --ink-stroke tints the edge per scene. Small headings (h3, labels, cards, prose) keep the plain hard drop above. */
:is(.inked, .display, .h2) {
  letter-spacing: 0;
  text-shadow: .08em .08em 0 color-mix(in srgb, var(--ink-stroke, var(--nf-edge)) 20%, transparent);
}
.plate.cream :is(.inked, .display, .h2) { text-shadow: none; }
.h3 { font-size: var(--t-h3-site); font-weight: 700; }

/* ---------- layout ---------- */
.wrap { width: min(calc(100% - 2 * var(--gutter-site)), var(--maxw-site)); margin-inline: auto; }
.section { position: relative; padding-block: var(--section-y); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; margin-bottom: clamp(28px, 4vw, 52px); }
.section-head .t { display: grid; gap: 16px; max-width: 760px; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: var(--gap, 12px); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 10px); }
.sp { flex: 1; }

/* ==========================================================================
   Header — floating bar; transparent on the hero, a plate once scrolled
   ========================================================================== */
.site-bar {
  position: fixed; z-index: var(--z-bar); top: calc(12px + env(safe-area-inset-top, 0px)); left: 50%; translate: -50% 0; /* viewport-fit=cover: stay below a notch or status bar */
  width: min(calc(100% - 2 * var(--gutter-site) + 20px), calc(var(--maxw-site) + 20px));
  display: flex; align-items: center; gap: 14px; padding: 8px 10px 8px 12px;
  border: var(--bw) solid transparent; border-radius: 20px;
  transition: background-color .3s, border-color .3s, box-shadow .3s, transform .45s var(--e-out);
}
.site-bar.stuck { background: rgb(15 30 36 / .94); border-color: var(--nf-edge); box-shadow: var(--lip), var(--drop-2); }
.site-bar.tuck { transform: translateY(calc(-100% - 20px - env(safe-area-inset-top, 0px))); }
.site-bar.tuck:focus-within { transform: none; } /* keyboard focus never sits in a hidden bar (Shift+Tab or Tab wrapping up from the footer) */
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 2px 2px; border-radius: 14px; flex: none; }
.brand .mark { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--amber-500); border: var(--bw) solid var(--nf-edge); box-shadow: inset 0 -3px 0 var(--amber-700), 0 3px 0 var(--nf-drop); transition: transform .35s var(--e-pop); }
.brand .mark svg { width: 24px; height: 26px; fill: var(--ink-800); }
.brand:hover .mark { transform: rotate(-8deg) scale(1.07); }
.brand .word { display: block; font-weight: 700; font-size: 1.3rem; letter-spacing: -.045em; line-height: 1; color: var(--cream); }
.brand .word b { font-weight: 700; color: var(--amber-300); }
.brand .tag { display: block; font: 800 .56rem/1 var(--f); letter-spacing: .13em; text-transform: uppercase; white-space: nowrap; width: 0; min-width: 100%; color: var(--cream-mute); margin-top: 5px; } /* "Indie game studio": as wide as the wordmark, and never the one that sets the brand's width (no shift while the font loads) */
.site-nav { display: flex; align-items: center; gap: 2px; margin-inline: auto; }
.site-nav a {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px;
  font-weight: 750; font-size: .93rem; color: var(--cream); border-radius: 12px;
  transition: transform .2s var(--e-pop), background-color .15s, color .15s;
}
.site-nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 7px; height: 3px; border-radius: 3px; background: var(--amber-500); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--e-out); }
.site-nav a:hover { background: rgb(255 255 255 / .06); transform: translateY(-2px); }
.site-nav a:hover::after, .site-nav a[aria-current="true"]::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--amber-300); }
.sheet nav a[aria-current="page"] { color: var(--amber-300); }
.bar-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.bar-acts .signin { font-weight: 750; font-size: .93rem; padding: 0 12px; height: 44px; display: inline-flex; align-items: center; gap: 8px; border-radius: 12px; color: var(--cream); transition: background-color .15s, transform .2s var(--e-pop); }
.bar-acts .signin:hover { background: rgb(255 255 255 / .06); transform: translateY(-2px); }
.icon-btn.menu-btn { display: none; }
.hud-xp { display: none; } /* shown by direction B only (space reserved in markup: no layout shift) */
@media (max-width: 1080px) { .site-nav a { padding: 0 10px; } .bar-acts .signin span { display: none; } }
@media (max-width: 900px) {
  .site-nav, .bar-acts .signin { display: none; }
  .bar-acts { margin-left: auto; }
  .icon-btn.menu-btn { display: grid; }
  .brand .tag { display: none; }
}
/* JavaScript on but the page script never ran (a blocked or failed module): .no-js is still on <html> after a
   grace period, so the phone bar falls back to the no-script layout (shared/nojs.css): section links in a row,
   no menu or search button that cannot answer. A normal boot removes .no-js long before, so nothing changes. */
@keyframes nojs-bar { to { position: relative; flex-wrap: wrap; row-gap: 4px; margin-bottom: 12px; } }
@keyframes nojs-nav { to { position: static; visibility: visible; } }
@keyframes nojs-off { to { display: none; } }
.no-js :is([data-palette], [data-sound-toggle], [data-motion-toggle]), .no-js .icon-btn.menu-btn { animation: nojs-off 1ms 4s forwards; }
@media (max-width: 900px) {
  .no-js .site-bar { animation: nojs-bar 1ms 4s forwards; }
  /* rendered but hidden while the page boots (an animation never runs on display: none) */
  .no-js .site-nav { display: flex; flex-wrap: wrap; order: 3; width: 100%; margin: 0; position: absolute; left: 0; top: 0; visibility: hidden; animation: nojs-nav 1ms 4s forwards; }
  .no-js .site-nav a { padding: 0 10px; flex: none; }
}
@media (max-width: 600px) {
  .site-bar { gap: 6px; padding: 6px 6px 6px 8px; }
  .bar-acts > [data-sound-toggle] { display: none; }
  .brand .word { font-size: 1.12rem; }
  .brand .mark { width: 38px; height: 38px; }
  .site-bar .brand, .site-bar .btn.sm { min-height: 44px; }
}
/* Tighten phone controls first. The full "Play free games" label needs a 480px viewport;
   below that Play is icon-only and keeps its full accessible label. */
@media (max-width: 420px) {
  .site-bar { gap: 4px; padding: 6px 5px 6px 6px; }
  .site-bar .bar-acts { gap: 4px; }
  .site-bar .brand { gap: 8px; padding-right: 4px; }
  .site-bar .brand .word { font-size: 1rem; }
  .site-bar .brand .mark { width: 36px; height: 36px; border-radius: 12px; }
  .site-bar .btn.sm { padding-inline: 12px; gap: 7px; }
}
@media (max-width: 479px) {
  .site-bar .btn.sm { width: 44px; padding: 0; }
  .site-bar .btn.sm .i { width: 20px; height: 20px; }
  .site-bar .btn.sm span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* mobile sheet ("1 · Arcade shelf", docs/MENU.md): the brand row and the foot stay put, the middle (.sheet-mid) scrolls.
   The plain .sheet nav rules are the big-type list the menu/ mockups still build on. */
.sheet { position: fixed; inset: 0; z-index: var(--z-dialog); display: grid; grid-template-rows: auto 1fr auto; gap: 18px; height: 100vh; height: 100dvh; padding: max(18px, env(safe-area-inset-top)) var(--gutter-site) max(22px, env(safe-area-inset-bottom)); background: var(--nf-1); overflow: hidden; }
.sheet[hidden] { display: none; }
.sheet.open { animation: sheet-in .5s var(--e-out) both; }
.sheet .bands { position: fixed; inset: 0; z-index: -1; display: grid; grid-template-rows: repeat(6, 1fr); pointer-events: none; }
.sheet .bands i { background: var(--nf-2); transform-origin: left; animation: band-in .5s var(--e-in-out) both; animation-delay: calc(var(--i) * 40ms); }
.sheet .bands i:nth-child(even) { background: var(--nf-1); }
.sheet nav { display: grid; align-content: start; gap: 6px; }
.sheet nav a { display: flex; align-items: center; gap: 16px; padding: 14px 6px; font: 800 clamp(1.8rem, 8vw, 2.6rem)/1 var(--f); letter-spacing: -.035em; border-bottom: 2px dashed var(--nf-line); animation: rise .5s var(--e-out) both; animation-delay: calc(120ms + var(--i) * 50ms); }
.sheet nav a .i { width: 28px; height: 28px; color: var(--amber-300); }
.sheet .acts { display: grid; gap: 12px; }
.sheet-mid { min-height: 0; overflow: auto; overscroll-behavior: contain; display: grid; align-content: start; gap: 22px; margin-inline: calc(-1 * var(--gutter-site)); padding: 4px var(--gutter-site) 10px; }
.sheet .sheet-nav { grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet .sheet-nav a {
  gap: 10px; min-height: 52px; padding: 10px 12px; font: 800 1.1rem/1 var(--f); letter-spacing: -.02em;
  background: var(--nf-3); border: var(--bw) solid var(--nf-edge); border-radius: 14px; box-shadow: inset 0 -3px 0 var(--nf-2), 0 3px 0 var(--nf-drop);
  transition: transform .16s var(--e-pop), box-shadow .12s;
}
.sheet .sheet-nav a .i { width: 20px; height: 20px; }
.sheet .sheet-nav a:active { transform: translateY(3px); box-shadow: inset 0 -2px 0 var(--nf-2); transition-duration: .05s; }
.sheet .sheet-nav a[aria-current="page"] { border-color: var(--amber-500); }
/* the open games, each on an app-icon plate */
.shelf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.shelf-t { display: inline-flex; align-items: center; gap: 10px; font: 700 var(--t-eyebrow)/1 var(--f); letter-spacing: .18em; text-transform: uppercase; color: var(--cream); text-shadow: none; }
.shelf-head .link { font-size: .9rem; }
.shelf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 8px; margin: 0; }
.shelf-grid li { animation: rise .5s var(--e-out) both; animation-delay: calc(260ms + var(--n, 0) * 35ms); }
.shelf-grid li:nth-child(2) { --n: 1; } .shelf-grid li:nth-child(3) { --n: 2; } .shelf-grid li:nth-child(4) { --n: 3; }
.shelf-grid li:nth-child(5) { --n: 4; } .shelf-grid li:nth-child(6) { --n: 5; } .shelf-grid li:nth-child(7) { --n: 6; }
.shelf-grid li:nth-child(8) { --n: 7; } .shelf-grid li:nth-child(9) { --n: 8; } .shelf-grid li:nth-child(n+10) { --n: 9; }
.shelf-grid a { display: grid; justify-items: center; align-content: start; gap: 7px; height: 100%; padding: 8px 2px 10px; border-radius: 16px; text-align: center; transition: transform .2s var(--e-pop), background-color .15s; }
.shelf-grid a:hover, .shelf-grid a[aria-current="page"] { background: rgb(255 255 255 / .06); }
.shelf-grid a:active { transform: scale(.93); transition-duration: .05s; }
.shelf-ic { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 19px; background: var(--nf-4); border: var(--bw) solid var(--nf-edge); box-shadow: inset 0 -4px 0 var(--nf-2), 0 4px 0 var(--nf-drop); transition: transform .3s var(--e-pop); }
.shelf-ic img { width: 54px; height: 54px; object-fit: contain; }
.shelf-grid a:hover .shelf-ic { transform: translateY(-3px) rotate(-4deg); }
.shelf-grid a[aria-current="page"] .shelf-ic { border-color: var(--amber-500); }
.shelf-name { min-height: 2.3em; font: 700 .8rem/1.15 var(--f); color: var(--cream); text-wrap: balance; } /* two lines kept for every name: the rows line up */
/* Sign in, with the two preferences as icon buttons beside it */
.acts-row { display: flex; align-items: center; gap: 8px; }
.acts-row .btn { flex: 1; min-height: 50px; }
.acts-row .icon-btn.solid { width: 50px; height: 50px; border-radius: 15px; }
@keyframes sheet-in { from { opacity: 0; } }
@keyframes band-in { from { transform: scaleX(0); } }
/* Stacked bands (menu sheet, launch hand-off, search, wipes): each runs 2px into the next row, which paints over it, so a row edge that lands between pixels never leaves a hairline where the page shows through. */
.sheet .bands > i, .launch .bands > i, .palette .bands > i, .wipe > i, .b-boot .bands > i, .b-launch .bands > i { align-self: start; height: calc(100% + 2px); }

/* ==========================================================================
   Buttons — the platform's pebble buttons, Nightfall defaults
   ========================================================================== */
.btn {
  --c: #24444b; --cd: #102429; --tc: var(--paper-100); --drop: 5px;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 10px 18px 12px;
  font: 800 .98rem/1.05 var(--f); letter-spacing: -.005em; white-space: nowrap;
  color: var(--tc); background: var(--c);
  border: var(--bw) solid var(--nf-edge); border-radius: var(--r-pebble);
  box-shadow: inset 0 -4px 0 var(--cd), var(--shine), 0 var(--drop) 0 var(--nf-drop);
  transition: transform .16s var(--e-pop), box-shadow .12s ease, filter .15s, translate .35s var(--e-out);
  user-select: none; touch-action: manipulation;
}
.btn .i { width: 1.2em; height: 1.2em; transition: transform .35s var(--e-pop); }
.btn::after { content: ""; position: absolute; z-index: -1; top: -40%; bottom: -40%; left: -60px; width: 26px; background: rgb(255 255 255 / .42); transform: skewX(-22deg); pointer-events: none; }
.btn:hover { transform: translateY(-2px); box-shadow: inset 0 -4px 0 var(--cd), var(--shine), 0 calc(var(--drop) + 2px) 0 var(--nf-drop); }
.btn:hover::after { left: calc(100% + 40px); transition: left .55s var(--e-out); }
.btn:hover .i:first-child { transform: rotate(-8deg) scale(1.12); }
.btn:hover .i.go { transform: translateX(4px); }
.btn:active, .btn.is-press { transform: translateY(var(--drop)) scale(.985, .96); box-shadow: inset 0 -2px 0 var(--cd), 0 0 0 var(--nf-drop); transition-duration: .05s; }
.btn:focus-visible { outline: none; box-shadow: inset 0 -4px 0 var(--cd), 0 var(--drop) 0 var(--nf-drop), 0 0 0 4px var(--nf-1), 0 0 0 7px var(--c-focus); }
.btn.primary { --c: var(--amber-500); --cd: var(--amber-700); --tc: var(--ink-800); }
.btn.cream { --c: var(--paper-100); --cd: var(--paper-300); --tc: var(--ink-800); }
.btn.sage { --c: var(--sage-500); --cd: var(--sage-700); --tc: var(--ink-800); }
.btn.cyan { --c: var(--cyan-400); --cd: var(--cyan-600); --tc: var(--ink-800); }
.btn.coral { --c: var(--coral-500); --cd: var(--coral-700); --tc: var(--ink-900); }
.btn.ghost { --c: transparent; --cd: transparent; --drop: 0px; border-color: transparent; box-shadow: none; padding-inline: 12px; }
.btn.ghost:hover { background: rgb(255 255 255 / .07); box-shadow: none; transform: translateY(-1px); }
.btn.ghost::after { display: none; }
.btn.ghost:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; box-shadow: none; } /* .btn:focus-visible drops the outline for the pebble's ring, which ghost buttons (no pebble) override away */
.btn.sm { min-height: 40px; padding: 7px 14px 9px; font-size: .88rem; --drop: 4px; border-radius: 11px 13px 11px 14px / 13px 11px 14px 11px; }
.btn.lg { min-height: 66px; max-width: 100%; padding: 12px 26px 15px 14px; font-size: 1.28rem; --drop: 4px; border-radius: var(--r-lg); gap: 14px; }
.btn.lg .disc { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgb(15 30 36 / .16); flex: none; }
.btn.lg .disc .i { width: 24px; height: 24px; }
.btn:not(.primary):not(.cream):not(.sage):not(.cyan).lg .disc { background: rgb(255 255 255 / .08); }
/* the label may wrap rather than push the button past a narrow column (a long sub line clipped the home hero at 390 px) */
.btn.lg .col { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; text-align: left; white-space: normal; }
.btn.lg .sub { font: 800 .64rem/1.2 var(--f); letter-spacing: .15em; text-transform: uppercase; opacity: .72; text-wrap: balance; }
.btn.block { width: 100%; }
.btn.breathe::before { content: ""; position: absolute; inset: -3px; z-index: 1; border-radius: inherit; border: 3px solid var(--amber-300); opacity: 0; pointer-events: none; animation: breathe-ring 2.6s var(--e-out) infinite; }
.btn.done { --c: var(--sage-500); --cd: var(--sage-700); --tc: var(--ink-800); }
/* [data-needs-js] buttons are disabled in the markup until site.js boots: they must not look dimmed while a page loads */
.btn:disabled { cursor: default; transform: none; }
.btn:disabled:not([data-needs-js]) { opacity: .55; cursor: not-allowed; }
.btn:disabled::after { display: none; }
.icon-btn {
  position: relative; width: 44px; height: 44px; display: grid; place-items: center; flex: none; color: var(--cream);
  border-radius: 13px; border: var(--bw) solid transparent; transition: transform .2s var(--e-pop), background-color .15s;
}
.icon-btn .i { width: 22px; height: 22px; }
.icon-btn:hover { background: rgb(255 255 255 / .07); transform: translateY(-2px) rotate(-4deg); }
.icon-btn:active { transform: scale(.9); }
.icon-btn.solid { background: var(--nf-5); border-color: var(--nf-edge); box-shadow: 0 3px 0 var(--nf-drop); }
.icon-btn[aria-pressed="true"] { color: var(--amber-300); }
.kbd { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; font: 800 .7rem/1 var(--f); color: var(--cream); background: rgb(255 255 255 / .1); border: 2px solid rgb(255 255 255 / .16); border-radius: 7px; }
.btn.primary .kbd, .btn.cream .kbd { background: rgb(15 30 36 / .78); color: var(--paper-50); border-color: transparent; }
.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--amber-300); background: linear-gradient(currentColor 0 0) left bottom / 0 2px no-repeat; transition: background-size .35s var(--e-out), gap .25s var(--e-pop); padding-bottom: 2px; }
.link:hover { background-size: 100% 2px; gap: 10px; }
.link .i { width: 18px; height: 18px; }

/* ==========================================================================
   Chips, pills, avatars, medals, stamps
   ========================================================================== */
.chip {
  --cc: #24444b; --ct: var(--paper-100);
  display: inline-flex; align-items: center; gap: 6px; height: 27px; padding: 0 10px;
  font: 800 .7rem/1 var(--f); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  color: var(--ct); background: var(--cc); border: var(--bw-sm) solid var(--nf-edge); border-radius: 999px;
}
.chip .i { width: 14px; height: 14px; }
.chip.live { --cc: var(--cyan-400); --ct: var(--ink-800); }
.chip.beta { --cc: var(--plum-300); --ct: var(--ink-800); }
.chip.soon { --cc: var(--paper-100); --ct: var(--ink-800); }
.chip.amber { --cc: var(--amber-500); --ct: var(--ink-800); }
.chip.gold { --cc: var(--gold-400); --ct: var(--ink-800); }
.chip.ok { --cc: var(--sage-300); --ct: var(--ink-800); }
.chip.clear { --cc: rgb(255 255 255 / .06); border-color: rgb(255 255 255 / .16); }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--cyan-400); position: relative; flex: none; box-shadow: 0 0 0 2px var(--nf-edge); }
.chip.live .live-dot { background: var(--ink-800); box-shadow: none; }
.chip.live .live-dot::after { border-color: var(--ink-800); }
.live-dot::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--cyan-400); animation: ping 1.8s var(--e-out) infinite; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 6px; border: var(--bw) solid var(--nf-edge); border-radius: 999px; background: var(--gold-400); color: var(--ink-800); font: 800 .95rem/1 var(--f); box-shadow: inset 0 -3px 0 var(--gold-700); }
.pill .disc { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-700); color: var(--gold-400); }
.pill .disc .i { width: 16px; height: 16px; }
.bump { animation: bump .45s var(--e-pop); }
.avatar { --size: 44px; width: var(--size); height: var(--size); flex: none; border-radius: 50%; overflow: hidden; border: var(--bw) solid var(--nf-edge); background: var(--nf-5); display: grid; place-items: center; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { --size: 96px; }
.avatar.xl { --size: 132px; border-width: 4px; }
.medal { --mc: var(--gold-400); --md: var(--gold-700); position: relative; width: 56px; height: 56px; flex: none; display: grid; place-items: center; background: var(--mc); color: var(--ink-800); border: var(--bw) solid var(--nf-edge); border-radius: 50% 46% 50% 44% / 46% 50% 44% 50%; box-shadow: inset 0 -4px 0 var(--md), 0 3px 0 var(--nf-drop); }
.medal .i { width: 26px; height: 26px; }
.medal.amber { --mc: var(--amber-500); --md: var(--amber-700); }
.medal.sage { --mc: var(--sage-500); --md: var(--sage-700); }
.medal.coral { --mc: var(--coral-500); --md: var(--coral-700); }
.medal.cyan { --mc: var(--cyan-400); --md: var(--cyan-600); }
.medal.plum { --mc: var(--plum-300); --md: var(--plum-500); }
.medal.locked { --mc: #24444b; --md: #102429; color: var(--cream-mute); }
.stamp { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; font: 800 .9rem/1 var(--f); letter-spacing: .12em; text-transform: uppercase; color: var(--sc, var(--sage-500)); border: 3px solid currentColor; border-radius: 10px; transform: rotate(-6deg); }
.stamp .i { width: 18px; height: 18px; }
.stamp.slam { animation: stamp .55s var(--e-pop) both; }

/* ==========================================================================
   Plates & frames
   ========================================================================== */
.plate { position: relative; background: var(--c-surface); color: var(--c-text); border: var(--bw) solid var(--nf-edge); border-radius: var(--r-lg); box-shadow: var(--lip), var(--drop-2); padding: clamp(18px, 2.4vw, 28px); }
.plate.flush { padding: 0; overflow: hidden; }
.plate.cream { --c-text: var(--ink-700); --c-text-2: var(--ink-500); background: var(--paper-100); color: var(--ink-700); box-shadow: inset 0 -4px 0 var(--paper-200), var(--drop-2); }
.plate .tab { position: absolute; top: -15px; left: 20px; z-index: 2; font: 700 .76rem/1 var(--f); letter-spacing: .08em; text-transform: uppercase; background: var(--tab, var(--amber-500)); color: var(--ink-800); border: var(--bw) solid var(--nf-edge); border-radius: 10px; padding: 6px 11px 5px; transform: rotate(-2deg); }
.rule { height: 0; border: 0; border-top: 2px dashed var(--nf-line); margin: 18px 0; }

/* Picture with a stepped-band placeholder (set by site.js from data-bands) */
.art { position: relative; display: block; overflow: hidden; background: var(--bands, var(--nf-3)); }
.art img { width: 100%; height: 100%; object-fit: cover; }

/* Browser frame used to show the real platform (the "lit lookout") */
.frame { position: relative; border: var(--bw) solid var(--nf-edge); border-radius: 18px; background: var(--nf-edge); box-shadow: 0 10px 0 var(--nf-drop); overflow: hidden; }
.frame .chrome { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px; background: var(--nf-3); border-bottom: var(--bw) solid var(--nf-edge); }
.frame .dots { display: flex; gap: 6px; }
.frame .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--nf-line); }
.frame .dots i:first-child { background: var(--coral-500); } .frame .dots i:nth-child(2) { background: var(--amber-500); } .frame .dots i:nth-child(3) { background: var(--sage-500); }
.frame .url { flex: 1; max-width: 420px; margin-inline: auto; height: 26px; border-radius: 8px; background: var(--nf-1); color: var(--cream-dim); font: 700 .74rem/26px var(--f); text-align: center; letter-spacing: .02em; display: flex; align-items: center; justify-content: center; gap: 6px; }
.frame .url .i { width: 13px; height: 13px; color: var(--sage-300); }
.frame .screen { position: relative; overflow: hidden; background: var(--paper-100); }
.frame .screen img { width: 100%; height: auto; }

/* Ridge edge: the platform's mountain-silhouette top edge for card footers */
.ridge-top { clip-path: polygon(0 18px, 7% 6px, 13% 14px, 22% 0, 31% 12px, 38% 5px, 47% 16px, 56% 2px, 64% 13px, 73% 4px, 82% 15px, 90% 6px, 100% 14px, 100% 100%, 0 100%); }

/* ==========================================================================
   Game card — portrait key art, logo, ridge footer; tilt + shine on hover
   ========================================================================== */
.gcard {
  --lift: 0px; position: relative; display: flex; flex-direction: column; isolation: isolate;
  border: var(--bw) solid var(--nf-edge); border-radius: 22px; overflow: hidden; background: var(--nf-3);
  box-shadow: 0 6px 0 var(--nf-drop); transform-style: preserve-3d;
  transition: transform .45s var(--e-out), box-shadow .3s;
}
.gcard .art { aspect-ratio: 4 / 5; }
.gcard .art img { object-position: var(--focus, 68%) 50%; transform: scale(1.08) translate3d(calc(var(--mx, 0) * -.1px), calc(var(--my, 0) * -.08px), 0); transition: transform .6s var(--e-out); }
.gcard .foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 16px; background: var(--foot, var(--nf-edge)); transform: translateY(var(--lift)); transition: transform .45s var(--e-pop); }
.gcard .foot .logo img { height: 42px; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }
.gcard .foot .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font: 750 .8rem/1.2 var(--f); color: var(--cream-dim); }
.gcard .flag { position: absolute; top: 12px; left: 12px; z-index: 2; }
.gcard::after { content: ""; position: absolute; z-index: 3; top: -30%; bottom: -30%; left: -40%; width: 22%; background: rgb(255 255 255 / .18); transform: skewX(-18deg); pointer-events: none; opacity: 0; }
.gcard:hover { --lift: -6px; }
.gcard:hover .art img { transform: scale(1.14) translate3d(calc(var(--mx, 0) * -.14px), calc(var(--my, 0) * -.1px), 0); }
.gcard:hover::after { opacity: 1; left: 130%; transition: left .8s var(--e-out), opacity .1s; }
.gcard.tilting { transition: box-shadow .3s; box-shadow: 0 14px 0 var(--nf-drop); }
.gcard[aria-pressed="true"], .gcard.on { border-color: var(--amber-500); box-shadow: 0 0 0 3px var(--nf-edge), 0 10px 0 var(--nf-drop); }
.type-logo { display: inline-flex; flex-direction: column; font-weight: 700; letter-spacing: -.03em; line-height: .95; color: var(--paper-50); text-shadow: 0 .08em 0 color-mix(in srgb, var(--nf-edge) 20%, transparent); font-size: 1.55rem; }
.type-logo small { font-size: .46em; letter-spacing: .14em; text-transform: uppercase; margin-top: 5px; }

/* ==========================================================================
   Game card — the Lookout's library card (mythic_platform/web/shared/play.css .card.big), on the website
   for every shelf of games (markup.js gameCard: home horizon, /games/). 3:2 art with chips, the game's mark
   on the seam, a band in the game's own colour (--g-6, worlds.css) with title, meta, tagline and actions
   ========================================================================== */
.game-card {
  --gb: var(--g-card, var(--g-6, var(--nf-4))); /* --g-card: the band darkened just enough for the meta line (worlds.css, tools/build.mjs#cardBand) */
  position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 460px; border-radius: var(--r-lg); overflow: hidden;
  background: var(--gb); color: var(--paper-50); border: var(--bw) solid var(--nf-edge); box-shadow: var(--drop-2);
  transition: transform .45s var(--e-pop), box-shadow .2s; transform-style: preserve-3d; contain: layout paint;
}
.game-card:hover { box-shadow: var(--drop-3); }
.game-card.tilting { transition: transform .08s linear, box-shadow .2s; }
.card-art { position: relative; flex: none; aspect-ratio: 3 / 2; overflow: hidden; }
.card-art .art { position: absolute; inset: 0; }
.card-art .art img { object-position: var(--focus, 64%) 50%; transform: scale(1.08) translate(calc(var(--mx, 0) * -.1px), calc(var(--my, 0) * -.08px)); transition: transform .5s var(--e-out); }
.game-card:hover .card-art .art img { transform: scale(1.16) translate(calc(var(--mx, 0) * -.16px), calc(var(--my, 0) * -.12px)); }
.card-art::after { content: ""; position: absolute; inset: -40% auto -40% -60%; width: 28%; background: rgb(255 255 255 / .22); transform: skewX(-20deg); transition: left .7s var(--e-out); }
.game-card:hover .card-art::after { left: 130%; }
.card-chips { position: absolute; left: 10px; top: 10px; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; }
/* the mark sits on the seam between the art and the band, half over each (platform, 2026-10-03) */
.card-game-mark { position: absolute; left: 16px; top: 0; width: 68px; height: 68px; z-index: 3; transform: translateY(-58%); pointer-events: none; filter: drop-shadow(0 3px 0 rgb(0 0 0 / .28)); }
.card-game-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* the band is its own stacking context above the card link; only its buttons take clicks */
.card-foot { position: relative; z-index: 5; flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 34px 18px 18px; background: var(--gb); pointer-events: none; transition: transform .45s var(--e-pop); }
.game-card:hover .card-foot { transform: translateY(-6px); }
.card-title { font-size: 1.55rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; overflow-wrap: anywhere; text-shadow: none; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; font: 750 .76rem/1.2 var(--f); color: rgb(253 248 238 / .82); }
.card-meta span { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.card-meta span:first-child { display: block; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta .i { width: 14px; height: 14px; }
.card-tag { font-size: .92rem; font-weight: 600; color: rgb(253 248 238 / .9); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.card-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; padding-top: 8px; pointer-events: auto; }
.card-acts .notify { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; font-weight: 750; font-size: .88rem; color: var(--paper-50); }
.card-acts .notify label { cursor: pointer; }
.card-link { position: absolute; inset: 0; z-index: 4; border-radius: inherit; }
.card-link:focus-visible { outline: 4px solid var(--amber-500); outline-offset: -6px; }

/* ==========================================================================
   Lookout radio — one short line per section, typewriter
   ========================================================================== */
.radio-line { display: flex; align-items: center; gap: 16px; padding: 12px 20px 12px 12px; background: var(--c-surface); border: var(--bw) solid var(--nf-edge); border-radius: 20px 24px 20px 26px / 22px 20px 26px 20px; box-shadow: var(--lip), var(--drop-2); }
.radio-line .walkie { position: relative; width: 56px; height: 56px; flex: none; border-radius: 50%; border: var(--bw) solid var(--nf-edge); overflow: visible; background: var(--nf-5); }
.radio-line .walkie img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.radio-line .walkie::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid var(--amber-500); opacity: 0; }
.radio-line.talking .walkie::after { animation: ping-sm 1s var(--e-out) infinite; }
@keyframes ping-sm { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.45); opacity: 0; } }
.radio-line .who { display: flex; align-items: center; gap: 8px; font: 700 .66rem/1 var(--f); letter-spacing: .18em; text-transform: uppercase; color: var(--amber-300); margin-bottom: 6px; }
.radio-line .who .i { width: 14px; height: 14px; }
.radio-line p { font-weight: 600; line-height: 1.4; color: var(--cream); }
.radio-line p b { color: var(--amber-300); font-weight: 800; }
.tw-hid { opacity: 0; } /* not visibility: the words stay in the accessibility tree, so a link in a typed line keeps its name */

/* ==========================================================================
   Mythic ID pass — the platform's ranger ID card, previewed live
   ========================================================================== */
.pass { position: relative; width: min(400px, 100%); background: var(--paper-100); color: var(--ink-700); border: var(--bw) solid var(--nf-edge); border-radius: 26px; box-shadow: inset 0 -5px 0 var(--paper-200), 0 10px 0 var(--nf-drop); overflow: hidden; }
.pass-sky { position: relative; height: 150px; display: grid; grid-template-rows: repeat(4, 1fr); overflow: hidden; border-bottom: var(--bw) solid var(--nf-edge); }
.pass-sky i:nth-child(1) { background: var(--sky-1); } .pass-sky i:nth-child(2) { background: var(--sky-3); } .pass-sky i:nth-child(3) { background: var(--sky-5); } .pass-sky i:nth-child(4) { background: var(--sky-6); }
.pass-sun { position: absolute; right: 20%; top: 26px; width: 72px; height: 72px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 12px var(--sun-ring); animation: breathe 7s var(--e-in-out) infinite; }
.pass-sky svg { position: absolute; left: 0; bottom: -1px; width: 100%; height: 62px; }
.pass-sky .brand-mini { position: absolute; left: 14px; top: 12px; display: flex; align-items: center; gap: 7px; font: 700 .78rem/1 var(--f); letter-spacing: -.02em; color: var(--ink-800); background: rgb(253 248 238 / .9); padding: 5px 9px 5px 5px; border-radius: 9px; border: 2px solid var(--ink-700); }
.pass-sky .brand-mini svg { position: static; width: 16px; height: 18px; fill: var(--ink-800); background: var(--amber-500); border-radius: 4px; padding: 2px; box-sizing: content-box; }
.pass-body { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 0 22px 22px; }
.pass-body > .avatar { --size: 108px; margin-top: -58px; border-color: var(--ink-700); border-width: 4px; background: var(--paper-50); box-shadow: 0 5px 0 var(--ink-700); }
.pass-body .eyebrow { margin-top: 10px; color: var(--ink-500); }
.pass-name { font-size: 1.85rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; min-height: 1.1em; overflow-wrap: anywhere; }
.pass-user { font-weight: 750; color: var(--amber-800); }
.pass-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin: 14px 0 12px; padding: 12px 8px; border-radius: 14px; background: var(--paper-50); border: 2px dashed var(--paper-300); }
.pass-facts b { display: block; font: 800 1.35rem/1 var(--f); letter-spacing: -.02em; }
.pass-facts small { display: block; margin-top: 4px; font: 800 .6rem/1.2 var(--f); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-500); }
.pass-code { display: flex; gap: 3px; height: 30px; width: 100%; align-items: stretch; opacity: .85; }
.pass-code i { background: var(--ink-700); }
.pass-stamp { position: absolute; right: 16px; top: 162px; z-index: 3; font-size: 1rem; background: var(--paper-50); --sc: var(--sage-700); }
.pass-avatar { cursor: pointer; transition: transform .3s var(--e-pop); }
.pass-avatar:hover { transform: rotate(-6deg) scale(1.05); }
.pass-name.bump, .pass-avatar.bump { animation: bump .3s var(--e-pop); }
.a-id-pass { display: grid; justify-items: center; gap: 22px; }
.a-id-pass .pass { transform: rotate(2deg); transition: transform .5s var(--e-pop); }
.a-id-pass .pass:hover { transform: rotate(0deg) translateY(-4px); }
.a-pass-form { width: min(440px, 100%); }
.a-pass-form .help { margin-top: 2px; }

/* newsletter plate ("Lookout radio") */
.a-signal, .st-signal { display: grid; gap: 12px; width: 100%; }
.a-signal p, .st-signal p { color: var(--ink-500); font-size: .94rem; }
.a-signal .link, .st-signal .link { color: var(--ink-700); }
.a-signal .stamp, .st-signal .stamp { justify-self: start; --sc: var(--sage-700); }
.a-signal .err, .st-signal .err { color: var(--rust-500); }
.ink-btn { --c: var(--ink-700); --cd: var(--ink-900); --tc: var(--paper-50); }
.ink-btn.done { --c: var(--sage-500); --cd: var(--sage-700); --tc: var(--ink-800); }
.form-trap { display: none; }
.consent-field > .newsletter-consent { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-700); font-weight: 500; line-height: 1.5; }
.newsletter-consent input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink-700); }
[data-form-retry] { justify-self: start; }

/* ==========================================================================
   Forms
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > label, .label { font: 800 .8rem/1.2 var(--f); letter-spacing: .02em; color: var(--cream); }
.field .help { font-size: .82rem; color: var(--cream-mute); }
.field .err { font-size: .82rem; font-weight: 700; color: var(--coral-300); display: none; }
.field.invalid .err { display: block; }
.input {
  width: 100%; min-height: 52px; padding: 12px 16px;
  background: var(--nf-5); color: var(--cream);
  border: var(--bw) solid var(--nf-edge); border-radius: var(--r-sm);
  box-shadow: inset 0 3px 0 #0d2127;
  transition: transform .15s var(--e-pop), box-shadow .15s;
}
.input::placeholder { color: var(--cream-mute); opacity: 1; }
.input:focus { box-shadow: inset 0 3px 0 #0d2127, 0 0 0 4px var(--c-focus); transform: translateY(-1px); }
.plate.cream .input, .pass .input { background: var(--paper-50); color: var(--ink-700); border-color: var(--ink-700); box-shadow: inset 0 3px 0 var(--paper-200); }
.field.invalid .input { border-color: var(--coral-500); animation: shake .32s linear; }
.field.valid .input { box-shadow: inset 0 3px 0 #0d2127, 0 0 0 3px var(--sage-500); }
.input-wrap { position: relative; }
.input-wrap > .i { position: absolute; z-index: 1; left: 15px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; color: var(--cream-mute); pointer-events: none; }
.input-wrap > .input { padding-left: 46px; }
.inline-form { display: flex; gap: 10px; align-items: stretch; }
.inline-form .field { flex: 1; }
@media (max-width: 560px) { .inline-form { flex-direction: column; } }
.switch { position: relative; width: 62px; height: 36px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 2; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: #24444b; border: var(--bw) solid var(--nf-edge); box-shadow: inset 0 3px 0 rgb(0 0 0 / .2); transition: background-color .2s; }
.switch .knob { position: absolute; top: 5px; left: 5px; width: 26px; height: 26px; border-radius: 50%; background: var(--paper-50); border: var(--bw) solid var(--nf-edge); box-shadow: 0 2px 0 var(--nf-edge); transition: transform .32s var(--e-pop); }
.switch input:checked ~ .track { background: var(--sage-500); }
.switch input:checked ~ .knob { transform: translateX(26px); }
.switch input:active ~ .knob { scale: 1.25 .85; }
.switch input:focus-visible ~ .track { outline: 3px solid var(--c-focus); outline-offset: 3px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: .88rem; color: var(--cream-dim); }
.check input { appearance: none; width: 26px; height: 26px; margin: 0; flex: none; border: var(--bw) solid var(--nf-edge); border-radius: 8px; background: var(--nf-5); display: grid; place-items: center; cursor: pointer; transition: transform .2s var(--e-pop), background-color .15s; }
.check input::after { content: ""; width: 11px; height: 6px; border-left: 3px solid var(--ink-800); border-bottom: 3px solid var(--ink-800); transform: rotate(-45deg) scale(0); margin-top: -3px; transition: transform .25s var(--e-pop); }
.check input:checked { background: var(--amber-500); transform: rotate(-6deg); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }
.check input:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; }
.seg { display: inline-flex; flex-wrap: wrap; padding: 4px; gap: 4px; background: var(--nf-2); border: var(--bw) solid var(--nf-edge); border-radius: 15px; }
.seg button { height: 38px; padding: 0 15px; border-radius: 10px; font: 800 .86rem/1 var(--f); display: inline-flex; align-items: center; gap: 7px; border: var(--bw-sm) solid transparent; color: var(--cream-dim); transition: transform .2s var(--e-pop), background-color .15s, color .15s; }
.seg button .i { width: 17px; height: 17px; }
.seg button:hover { transform: translateY(-1px); color: var(--cream); }
.seg button[aria-pressed="true"] { background: var(--amber-500); color: var(--ink-800); border-color: var(--nf-edge); box-shadow: 0 2px 0 var(--nf-drop); }
.seg .n { font-size: .72rem; opacity: .7; }

/* ==========================================================================
   Toasts, pops, fly, band wipes, tooltips
   ========================================================================== */
.toasts { position: fixed; z-index: var(--z-toast); right: 16px; top: 92px; width: min(380px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
.toast { pointer-events: auto; position: relative; overflow: hidden; display: flex; gap: 12px; align-items: center; padding: 14px 16px 16px 14px; background: var(--nf-4); color: var(--cream); border: var(--bw) solid var(--nf-edge); border-radius: 18px; box-shadow: var(--lip), var(--drop-2); animation: toast-in .5s var(--e-pop) both; cursor: pointer; }
.toast.out { animation: toast-out .3s var(--e-in-out) both; }
.toast .t-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--tc, var(--sage-500)); color: var(--ink-800); border: var(--bw-sm) solid var(--nf-edge); }
.toast .t-ic .i { width: 22px; height: 22px; }
.toast b { display: block; font-weight: 700; }
.toast small { display: block; color: var(--cream-dim); font-size: .84rem; line-height: 1.35; }
.toast .life { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--tc, var(--sage-500)); transform-origin: left; animation: life var(--life, 4s) linear forwards; }
.toast.achv { --tc: var(--gold-400); }
.toast.achv .medal { width: 48px; height: 48px; animation: stamp .6s var(--e-pop) both .1s; }
@media (max-width: 700px) { .toasts { top: auto; bottom: 18px; right: 12px; } }
.pop-num { position: fixed; z-index: var(--z-toast); pointer-events: none; font: 800 var(--ps, 1.6rem)/1 var(--f); color: var(--pc, var(--gold-400)); text-shadow: 0 .12em 0 var(--nf-edge); translate: -50% -50%; animation: pop-rise 1s var(--e-pop) forwards; white-space: nowrap; }
.fly { position: fixed; z-index: var(--z-toast); pointer-events: none; left: 0; top: 0; will-change: transform; }
.wipe { position: absolute; inset: 0; z-index: 4; display: grid; grid-template-rows: repeat(6, 1fr); pointer-events: none; }
.wipe i { transform: scaleX(0); transform-origin: left; }
.wipe.run i { animation: wipe-band .72s var(--e-in-out) both; animation-delay: calc(var(--i) * 45ms); }
.fx { position: fixed; inset: 0; z-index: var(--z-fx); pointer-events: none; width: 100%; height: 100%; }
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; z-index: var(--z-menu); left: 50%; top: calc(100% + 10px); translate: -50% 0;
  padding: 7px 10px; font: 750 .78rem/1.25 var(--f); white-space: nowrap; color: var(--ink-800); background: var(--paper-100); border: 2px solid var(--nf-edge); border-radius: 9px; box-shadow: 0 3px 0 var(--nf-drop);
  animation: tip-in .18s var(--e-pop) both; pointer-events: none;
}

/* ==========================================================================
   Footer — ridge silhouette over the deepest floor
   ========================================================================== */
.site-foot { position: relative; background: var(--nf-0); color: var(--cream-dim); padding: 0 0 max(64px, env(safe-area-inset-bottom)); }
.site-foot .ridges { position: relative; height: clamp(80px, 11vw, 150px); margin-top: -1px; background: linear-gradient(var(--sky, var(--nf-1)) calc(100% - 3px), var(--nf-0) 0); } /* sky = the page above; the last 3px are the footer's own colour so no seam shows under the floor ridge */
.site-foot .ridges svg { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 36px 28px; padding-top: 64px; }
.foot-grid h2, .foot-grid h3 { font: 700 .72rem/1 var(--f); letter-spacing: .18em; text-transform: uppercase; color: var(--cream-mute); margin-bottom: 16px; }
.foot-brand .btn { margin-top: 18px; }
.foot-link { display: inline-flex; gap: 6px; align-items: center; font-weight: 650; color: var(--cream); transition: color .15s, transform .2s var(--e-pop); }
.foot-link:hover { color: var(--amber-300); transform: translateX(3px); }
.foot-link .i { width: 16px; height: 16px; color: var(--cream-mute); }
.foot-grid ul { list-style: none; padding: 0; display: grid; gap: 10px; }
/* text links only: the Play button and the brand keep their own colours */
.foot-grid a:not(.btn, .brand) { font-weight: 650; color: var(--cream); transition: color .15s, transform .2s var(--e-pop); display: inline-flex; gap: 6px; align-items: center; }
.foot-grid a:not(.btn, .brand):hover { color: var(--amber-300); transform: translateX(3px); }
.foot-grid a:not(.btn, .brand) .i { width: 16px; height: 16px; color: var(--cream-mute); }
.foot-brand p { margin-top: 16px; max-width: 34ch; font-size: .92rem; }
.foot-social { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 32px; }
.foot-social > span { font-size: .84rem; font-weight: 700; color: var(--cream-mute); }
.foot-social-links { display: flex; flex-wrap: wrap; gap: 8px; }
.foot-social-links a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 2px solid var(--nf-line); border-radius: 12px; color: var(--cream); font-size: .84rem; font-weight: 650; }
.foot-social-links a:hover { color: var(--amber-300); border-color: var(--amber-300); }
.foot-social-links .i { width: 15px; height: 15px; }
.foot-base { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 48px; padding-top: 22px; border-top: 2px dashed var(--nf-line); font-size: .84rem; color: var(--cream-mute); }
.foot-base .cluster { gap: 8px 18px; }
.foot-base a { display: inline-flex; align-items: center; min-height: 32px; }
.foot-base a:hover { color: var(--cream); }
@media (max-width: 980px) { .foot-grid { grid-template-columns: repeat(2, 1fr); } .foot-brand { grid-column: 1 / -1; } }

/* ==========================================================================
   Mockup tab — outside the fiction (not part of the product)
   ========================================================================== */
.mock-tab { position: fixed; z-index: var(--z-mock); left: 50%; top: 0; translate: -50% 0; font: 800 .62rem/1 var(--f); letter-spacing: .2em; }
.mock-tab > button { min-height: 24px; padding: 4px 14px 5px; background: var(--amber-500); color: var(--ink-800); border-radius: 0 0 9px 9px; text-transform: uppercase; font: inherit; letter-spacing: inherit; }
.mock-tab .mock-panel { display: none; position: absolute; left: 50%; translate: -50% 0; top: 24px; width: 320px; max-height: 76vh; overflow: auto; padding: 12px; background: var(--paper-100); color: var(--ink-800); border: 3px solid var(--ink-800); border-radius: 14px; letter-spacing: 0; font: 600 .84rem/1.35 var(--f); box-shadow: 0 6px 0 rgb(0 0 0 / .4); }
.mock-tab:hover .mock-panel, .mock-tab:focus-within .mock-panel, .mock-tab.open .mock-panel { display: block; }
.mock-panel h3 { font: 700 .62rem/1 var(--f); letter-spacing: .18em; text-transform: uppercase; color: var(--amber-700); margin: 10px 4px 6px; }
.mock-panel a, .mock-panel button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 8px; text-align: left; }
.mock-panel a:hover, .mock-panel button:hover { background: var(--paper-200); }
.mock-panel a[aria-current="page"] { background: var(--amber-500); font-weight: 800; }
.mock-panel .i { width: 16px; height: 16px; }
.mock-panel p { margin: 6px 4px; color: var(--ink-500); }
@media (max-width: 700px) { .mock-tab { left: auto; right: 0; top: 40%; translate: none; } .mock-tab > button { writing-mode: vertical-rl; border-radius: 9px 0 0 9px; padding: 12px 5px; } .mock-tab .mock-panel { left: auto; right: 26px; top: -80px; translate: none; } }

/* ==========================================================================
   Site pages — breadcrumbs, page heroes, stretched links, CTA bands, stars
   ========================================================================== */
.small { font-size: .84rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font: 750 .8rem/1 var(--f); color: var(--cream-mute); }
.crumbs li { display: inline-flex; align-items: center; gap: 4px; }
.crumbs li + li::before { content: ""; width: 6px; height: 6px; margin: 0 7px 0 3px; border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); opacity: .6; }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 8px; margin: -7px -8px; border-radius: 8px; color: var(--cream-dim); transition: color .15s, background-color .15s; }
.crumbs a:hover { color: var(--cream); background: rgb(255 255 255 / .07); }
.crumbs .i { width: 15px; height: 15px; }
.crumbs [aria-current] { color: var(--cream); }

.ln { display: block; }
.ph-title .ln, .page-hero .display .ln { animation: line-in 1s var(--e-out) both; }
.ph-title .ln + .ln, .page-hero .display .ln + .ln { animation-delay: .12s; }
@keyframes line-in { from { opacity: 0; transform: translateY(.35em); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: none; clip-path: inset(-20% -5% -30% -5%); } }

.page-hero { position: relative; isolation: isolate; overflow: clip; padding: clamp(120px, 13vw, 180px) 0 clamp(64px, 7vw, 104px); background: var(--nf-1); }
.ph-bands { position: absolute; inset: 0 0 12% 0; z-index: -2; display: grid; grid-template-rows: 20fr 14fr 13fr 13fr 16fr 24fr; }
.ph-bands i:nth-child(1) { background: var(--nf-0); } .ph-bands i:nth-child(2) { background: #0a1920; } .ph-bands i:nth-child(3) { background: #0c1d25; }
.ph-bands i:nth-child(4) { background: #0e212a; } .ph-bands i:nth-child(5) { background: #10252f; } .ph-bands i:nth-child(6) { background: #132a34; }
/* the night valley under every page hero (src/scenes/valley.mjs): sky top-anchored, land bottom-anchored */
.ph-scene { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ph-scene svg { position: absolute; left: 0; width: 100%; }
.ph-sky, .ph-scene .tw, .ph-scene .cl { top: 0; height: 86%; }
.ph-land { bottom: -1px; height: min(66%, 420px); animation: ph-rise 1.3s var(--e-out) both; }
@keyframes ph-rise { from { translate: 0 26px; } }
.ph-in { display: grid; gap: 18px; justify-items: start; }
.ph-in .lede { max-width: 60ch; }
.ph-title { font-size: var(--t-hero); }
.ph-title .amber, .display .amber { color: var(--amber-300); }
.stars { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.stars b { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--paper-50); animation: twinkle var(--tw, 3s) ease-in-out infinite; animation-delay: var(--td, 0s); }
.stars b.x { width: 12px; height: 12px; background: none; }
.stars b.x::before { content: ""; position: absolute; inset: 0; background: var(--paper-50); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }

/* SVG scenes (src/scenes/*): shared loops. Each .loop overlay carries one transform/opacity animation, so the
   compositor runs them without main-thread work; [data-scene].off (set by site.js) pauses them off screen. */
.loop { pointer-events: none; }
.tw { animation: tw 4.2s ease-in-out infinite alternate; }
.tw2 { animation-duration: 3.1s; animation-delay: -1.3s; }
.tw3 { animation-duration: 5.3s; animation-delay: -2.2s; }
.cl { animation: drift 80s ease-in-out infinite alternate; }
.cl2 { animation-duration: 104s; animation-delay: -40s; animation-direction: alternate-reverse; }
.cl3 { animation-duration: 126s; animation-delay: -60s; }
@keyframes tw { from { opacity: 1; } to { opacity: .16; } }
@keyframes drift { from { transform: translateX(-4%); } to { transform: translateX(5%); } }
[data-scene].off *, [data-scene].off *::before, [data-scene].off *::after { animation-play-state: paused !important; }

/* whole-card links: the card is position:relative; controls inside sit above the stretched link */
.stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.stretch:focus-visible { outline: none; }
.stretch:focus-visible::after { outline: 3px solid var(--c-focus); outline-offset: 3px; border-radius: 22px; }

.band-cta { padding-block: clamp(24px, 4vw, 56px) var(--section-y); }
.band-cta-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 36px; padding: clamp(22px, 3vw, 38px); }
.band-cta-in > div:first-child { display: grid; gap: 10px; max-width: 560px; justify-items: start; }

/* sky call-to-action: stepped sky in a time of day, sun, ridges (drawn by site.js) */
.sky-cta { position: relative; isolation: isolate; overflow: clip; display: grid; align-items: center; min-height: clamp(560px, 62vw, 820px); padding-block: clamp(90px, 10vw, 150px) clamp(200px, 22vw, 320px); color: var(--ink-700); }
.sky-cta .sky-bands { position: absolute; inset: 0; z-index: -4; background: linear-gradient(180deg, var(--nf-1) 0 6%, var(--sky-1) 6% 20%, var(--sky-2) 20% 32%, var(--sky-3) 32% 43%, var(--sky-4) 43% 54%, var(--sky-5) 54% 64%, var(--sky-6) 64% 74%, var(--sky-7) 74% 100%); }
.sky-cta-sun { position: absolute; z-index: -3; left: 76%; top: 46%; width: clamp(150px, 17vw, 270px); aspect-ratio: 1; border-radius: 50%; background: var(--sun); translate: -50% -50%; transform: translate3d(0, calc(var(--rise, 0) * 24vh), 0); }
.sky-cta-sun i { position: absolute; inset: -24%; border-radius: 50%; border: clamp(10px, 1.3vw, 20px) solid var(--sun-ring); animation: breathe 7s var(--e-in-out) infinite; }
.sky-cta-ridges { position: absolute; z-index: -2; left: -3%; right: -3%; bottom: -1px; height: 62%; }
.sky-cta-ridges svg { position: absolute; left: 0; bottom: 0; width: 100%; will-change: transform; }
.sky-cta-ridges .tower-light { animation: lamp 4s ease-in-out infinite; }
.sky-cta-ridges .tower-beacon { animation: blink 2.2s linear infinite; }
.sky-cta-in { display: grid; gap: 26px; justify-items: start; }
.sky-cta .display { font-size: var(--t-display); --ink-stroke: var(--ridge-fg); }
.sky-cta .btn.cream { --cd: var(--paper-300); }
@media (max-width: 900px) { .sky-cta-sun { left: 78%; top: 28%; } }

/* ==========================================================================
   Launch hand-off (every Play button): bands in the world's colours + checklist
   ========================================================================== */
.launch { position: fixed; inset: 0; z-index: var(--z-veil); display: grid; place-items: center; padding: 20px; }
.launch .bands { position: absolute; inset: 0; display: grid; grid-template-rows: repeat(6, 1fr); }
.launch .bands i { transform-origin: left; animation: band-in .5s var(--e-in-out) both; animation-delay: calc(var(--i) * 50ms); }
.launch .card { position: relative; width: min(460px, 100%); padding: 26px 24px 22px; display: grid; gap: 16px; justify-items: center; text-align: center; background: var(--nf-4); border: 3px solid var(--nf-edge); border-radius: 26px; box-shadow: var(--lip), 0 10px 0 var(--nf-drop); animation: pop-in .5s var(--e-pop) both .3s; }
.launch .card .logo img { max-height: 84px; width: auto; max-width: 100%; }
.launch .card .type-logo { font-size: 2rem; }
.launch h2 { font: 700 .76rem/1 var(--f); letter-spacing: .22em; text-transform: uppercase; color: var(--cream-mute); }
.launch .steps { list-style: none; padding: 0; margin: 0; width: 100%; display: grid; gap: 8px; text-align: left; }
.launch .steps li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgb(255 255 255 / .05); font-weight: 700; opacity: .4; transition: opacity .2s; }
.launch .steps li .ic { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgb(255 255 255 / .08); flex: none; }
.launch .steps li .ic .i { width: 16px; height: 16px; }
.launch .steps li small { margin-left: auto; font-size: .76rem; color: var(--cream-mute); }
.launch .steps li.on { opacity: 1; }
.launch .steps li.on .ic { background: var(--amber-500); color: var(--ink-800); animation: bump .4s var(--e-pop); }
.launch .steps li.done .ic { background: var(--sage-500); color: var(--ink-800); animation: bump .4s var(--e-pop); }
.launch .seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; width: 100%; }
.launch .seg i { height: 8px; border-radius: 3px; background: rgb(255 255 255 / .1); }
.launch .seg i.on { background: var(--amber-500); animation: bump .35s var(--e-pop); }
.launch .note { font-size: .8rem; color: var(--cream-mute); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.launch .note .link { font-size: .8rem; }
.launch .acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ==========================================================================
   Search palette ("radio dial"): Ctrl/Cmd K, /, or the header search button
   ========================================================================== */
.palette { position: fixed; inset: 0; z-index: var(--z-dialog); display: grid; place-items: start center; padding: clamp(64px, 12vh, 140px) 14px 14px; }
.palette .bands { position: absolute; inset: 0; display: grid; grid-template-rows: repeat(6, 1fr); }
.palette .bands { opacity: .91; } /* the dim is the group's, so overlapping bands never double up */
.palette .bands i { background: rgb(6 17 22); transform-origin: left; animation: band-in .34s var(--e-in-out) both; animation-delay: calc(var(--i) * 28ms); }
.palette .bands i:nth-child(even) { background: rgb(10 23 29); }
.pal-card { position: relative; width: min(640px, 100%); max-height: min(74vh, 660px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--nf-4); border: var(--bw) solid var(--nf-edge); border-radius: 22px; box-shadow: var(--lip), 0 10px 0 var(--nf-drop); overflow: hidden; animation: pop-in .4s var(--e-pop) both .05s; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 2px dashed var(--nf-line); }
.pal-in > .i { width: 22px; height: 22px; color: var(--amber-300); }
.pal-in .input { flex: 1; border: 0; box-shadow: none; background: transparent; min-height: 48px; padding: 8px 4px; font-size: 1.12rem; font-weight: 650; }
.pal-in .input:focus, .pal-in .input:focus-visible { box-shadow: none; transform: none; outline: none; } /* the caret and the card already say where focus is */
.pal-list { list-style: none; margin: 0; padding: 6px 8px 10px; overflow: auto; overscroll-behavior: contain; }
.pal-h { padding: 14px 10px 6px; font: 700 .64rem/1 var(--f); letter-spacing: .18em; text-transform: uppercase; color: var(--cream-mute); }
.pal-it { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 13px; cursor: pointer; border: 2px solid transparent; transition: background-color .12s; }
.pal-it[aria-selected="true"] { background: var(--nf-5); border-color: var(--amber-500); }
.pal-it .pi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--bands, #24444b); color: var(--paper-50); border: 2px solid var(--nf-edge); transition: transform .25s var(--e-pop); }
.pal-it[aria-selected="true"] .pi { transform: rotate(-6deg) scale(1.06); }
.pal-it .pi .i { width: 20px; height: 20px; }
.pal-it .pi[data-stripes] .i { width: 28px; height: 28px; padding: 4px; border-radius: 50%; background: rgb(6 17 22 / .78); }
.pal-it .pt { min-width: 0; }
.pal-it .pt b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-it .pt small { display: block; font-size: .8rem; color: var(--cream-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-it .pk { display: inline-flex; gap: 8px; align-items: center; font: 800 .64rem/1 var(--f); letter-spacing: .14em; text-transform: uppercase; color: var(--cream-mute); }
.pal-it .pk .i { width: 16px; height: 16px; opacity: 0; transition: opacity .12s; }
.pal-it[aria-selected="true"] .pk .i { opacity: 1; color: var(--amber-300); }
.pal-none { display: flex; gap: 12px; align-items: center; padding: 26px 12px; color: var(--cream-dim); }
.pal-none .i { color: var(--amber-300); }
.pal-foot { display: flex; gap: 16px; align-items: center; padding: 10px 14px; border-top: 2px dashed var(--nf-line); font-size: .78rem; color: var(--cream-mute); }
.pal-foot .kbd { margin-right: 4px; }
@media (max-width: 560px) { .pal-foot { display: none; } }

/* ==========================================================================
   Page to page: cross-document view transitions (progressive; CSS only)
   ========================================================================== */
@view-transition { navigation: auto; }
/* While a page transition plays, the SVG scenes hold still: nothing in the incoming page changes, so the browser does
   not re-render its live snapshot every frame of the fade. Their rise-in and loops start when the fade ends. */
:root:active-view-transition :is(.pl, .a-horizon, .a-fore, .ph-scene, .cabin-stage),
:root:active-view-transition :is(.pl, .a-horizon, .a-fore, .ph-scene, .cabin-stage) *,
:root:active-view-transition :is(.pl, .a-horizon, .a-fore, .ph-scene, .cabin-stage) *::after { animation-play-state: paused !important; }
.site-bar { view-transition-name: site-bar; }
.vt-hero img { view-transition-name: hero-art; }
::view-transition-old(root) { animation: vt-out .24s var(--e-in-out) both; }
::view-transition-new(root) { animation: vt-in .44s var(--e-out) both; }
::view-transition-group(hero-art) { animation-duration: .56s; animation-timing-function: cubic-bezier(.2, .9, .3, 1); }
::view-transition-old(hero-art), ::view-transition-new(hero-art) { height: 100%; object-fit: cover; overflow: clip; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* ==========================================================================
   Entrances & scroll-linked helpers
   ========================================================================== */
[data-reveal] > * { opacity: 0; transform: translateY(22px) scale(.985); }
[data-reveal].in > * { animation: rise .7s var(--e-out) both; animation-delay: calc(var(--i, 0) * 65ms); }
[data-reveal-one] { opacity: 0; transform: translateY(22px) scale(.985); }
[data-reveal-one].in { animation: rise .7s var(--e-out) both; }
.no-js [data-reveal] > *, .no-js [data-reveal-one] { opacity: 1; transform: none; }
/* the rest of the no-JavaScript layout is shared/nojs.css, loaded inside <noscript> */
.split-word { opacity: .16; transition: opacity .35s ease; }
.split-word.lit { opacity: 1; }

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes rise { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes pop-in { 0% { opacity: 0; transform: scale(.7) rotate(-2deg); } 100% { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes toast-in { 0% { opacity: 0; transform: translateX(60px) scale(.8) rotate(3deg); } 100% { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(80px) scale(.9); } }
@keyframes life { to { transform: scaleX(0); } }
@keyframes tip-in { from { opacity: 0; translate: -50% -6px; } }
@keyframes stamp { 0% { opacity: 0; transform: scale(2.6) rotate(-14deg); } 55% { opacity: 1; transform: scale(.88) rotate(-5deg); } 100% { transform: scale(1) rotate(-6deg); } }
@keyframes pop-rise { 0% { opacity: 0; transform: translateY(8px) scale(.4); } 18% { opacity: 1; transform: translateY(-10px) scale(1.18); } 30% { transform: translateY(-14px) scale(1); } 100% { opacity: 0; transform: translateY(-70px) scale(.9); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.16) rotate(-3deg); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { translate: 0; } 20% { translate: -8px 0; } 40% { translate: 7px 0; } 60% { translate: -5px 0; } 80% { translate: 3px 0; } }
@keyframes ping { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: .75; } }
@keyframes breathe-ring { 0% { opacity: .85; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.08, 1.3); } }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .2; transform: scale(.55); } }
@keyframes lamp { 0%, 100% { opacity: 1; } 45% { opacity: .72; } 50% { opacity: 1; } 52% { opacity: .8; } }
@keyframes blink { 0%, 60%, 100% { opacity: 1; } 70%, 90% { opacity: .15; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes wipe-band { 0% { transform: scaleX(0); transform-origin: left; } 45% { transform: scaleX(1); transform-origin: left; } 55% { transform: scaleX(1); transform-origin: right; } 100% { transform: scaleX(0); transform-origin: right; } }
@keyframes spin { to { transform: rotate(1turn); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg) scale(1.1); } 60% { transform: rotate(8deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes march { to { stroke-dashoffset: -24; } }

/* ==========================================================================
   Reduced motion / Calm: keep every state change, drop travel and ambience
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  [data-reveal] > *, [data-reveal-one] { opacity: 1; transform: none; }
  .split-word { opacity: 1; }
}
html.calm *, html.calm *::before, html.calm *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
html.calm [data-reveal] > *, html.calm [data-reveal-one] { opacity: 1; transform: none; }
html.calm .split-word { opacity: 1; }

/* Forced colors (Windows High Contrast): an icon button keeps a plate, so its icon stays readable over the art behind the bar;
   the sky bands and scenes of the page heroes keep their own colours (they carry no text; the browser puts a plate behind text drawn over them). */
@media (forced-colors: active) {
  .icon-btn { background-color: ButtonFace; color: ButtonText; border-color: ButtonText; }
  .ph-bands, .ph-scene { forced-color-adjust: none; }
}
