/* VALBLOX site styles. Layout v2, "longhouse": the sidebar keeps the logo and now carries the games list and the
   chat as two collapsible sections; one header row; a full-width hero, a status row (Rain Pot + Race), one game
   row, Explore Rewards as a single band split by the knotwork plait. Every colour is the VALBLOX mapping of the
   kit colour it replaces (brand/viking/src/page/page_palette.py, same rules as brand/viking/tokens.css).
   Component style is VALBLOX's own: chamfered (octagonal) plates with a thin iron rim and flat top-lit bands, cut
   from true polygon insets so the bands keep a constant width along the diagonals; forged rims on key panels;
   knotwork plaits; frost for active and focus states. Static: no build step, no external requests. */

@font-face { font-family: "GoldenSmile"; src: url("assets/fonts/GoldenSmile.otf") format("opentype"); font-display: block; }
@font-face { font-family: "Skranji"; src: url("assets/fonts/Skranji.ttf") format("truetype"); font-display: block; }

:root {
  /* surfaces (kit -> steel/slate) */
  --page: #191F2A; --sidebar: #1D242F; --strip: #212938; --header: #252D3D; --header-edge: #171E28; --rule: #1A2028;
  --raised-a: #303B50; --raised-b: #283041; --btn-border: #1F2837; --chat-card: #242D3C;
  --avatar-bg: #1A222B; --avatar-border: #333946; --card: #212832; --card-b: #273040;
  --hero-dark: #131A24; --hero-c: #233047; --acc-a: #2B333F; --acc-b: #212832; --track: #1B212C; --tick: #59616F;
  --view-btn: #485B7A; --dropdown: #212B37;
  --footer-a: 28, 39, 57; --footer-b: 50, 67, 97;
  --rim-iron: #10151D;                       /* the thin iron band around every plate */
  /* forged rim on key panels: one tone per facet, from its outward normal against the top-left light
     (top and top-left catch the light, left and top-right half, right and bottom-left fall off, bottom dark) */
  --iron-hi2: #4B5B71; --iron-hi1: #323E4F; --iron-lo1: #10151D; --iron-lo2: #0A0E14;
  /* bronze ramp (the plait, the nameplates, the step lozenges), lightest to darkest */
  --bz0: #FDE4C4; --bz1: #F4CD9A; --bz2: #EAB771; --bz3: #C6944C; --bz4: #996E30; --bz5: #64471A;
  /* text */
  --muted: #96A1B6; --gray-link: #636C7C; --chat-name: #CCCCCE; --white: #FFFFFF;
  /* frost (replaces the kit lilac) */
  --lilac: #8FD4F3; --lilac-rgb: 143, 212, 243; --lilac-light: #B9E8FE; --lilac-lighter: #E0F5FF;
  --player: #B1D8EB; --player-glow: 150, 200, 224;
  /* accents */
  --gold: #EAB670; --gold-rgb: 234, 182, 112; --gold-dark: #936121;
  --green: #58FFC3; --green-rgb: 88, 255, 195; --green-2-rgb: 18, 221, 141; --green-bevel: 54, 158, 140; --green-deep: #1A2629;
  --red: #FD4A3F; --salmon: #FE9C8F; --salmon-rgb: 254, 156, 143;
  --blue: #75B8FD; --blue-rgb: 117, 184, 253; --blue-2-rgb: 87, 145, 203;
  --level-low: #61B9DE; --level-mid: #DD9A75; --level-high: #FF8081;
  /* rank identity (economy.md section 3): one colour per rank everywhere, the same under every palette */
  --rank-thrall-rgb: 185, 198, 216; --rank-karl-rgb: 255, 159, 74; --rank-huscarl-rgb: 79, 210, 255; --rank-jarl-rgb: 255, 194, 79; --rank-konung-rgb: 185, 140, 255; --rank-einherjar-rgb: 255, 84, 104;
  /* the lilac ramp's two middle steps (the account modal's bars), the Current palette's values */
  --lilac-mid: #5BA3C9; --lilac-deep: #36708F;
  /* bevel overlays */
  --hi: 58, 69, 86; --lo: 19, 23, 31; --gold-hi: 143, 119, 86; --gold-lo: 39, 30, 18;
  --raised: linear-gradient(180deg, var(--raised-a) 0%, var(--raised-b) 100%);
  --ember: radial-gradient(110% 110% at 50% 142.5%, #FD4A3F 0%, #EAB671 100%);
  /* shell */
  --side-w: 300px;     /* sidebar (and drawer) width */
  --col-x: 300px;      /* how far the content column sits from the left edge (0 once the sidebar becomes a drawer) */
  --bar-h: 72px;
  --pad: 32px;         /* content gutter */
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  /* 3D backdrops drop in from assets/3d/ when they exist; a missing file just leaves the next layer showing */
  background: url("assets/3d/bg-page.webp") center top / cover no-repeat fixed, var(--page);
  color: var(--muted);
  font-family: "GoldenSmile", system-ui, sans-serif; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: geometricPrecision;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img, svg { display: block; }
p, h1, h2, h3 { margin: 0; font-weight: 400; }
.ic { width: 20px; height: 20px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: fixed; left: 12px; top: 12px; z-index: 60; padding: 10px 16px 12px; transform: translateY(-200%);
  background: var(--header); color: var(--lilac-light); font-size: 14px; letter-spacing: 1px; text-transform: uppercase;
}
.skip:focus { transform: none; outline: 2px solid var(--lilac); }

/* ---------------------------------------------------------------- chamfered plates
   Self-clipped plate: the element is the iron rim (clip: octagon, cut --k); ::before is the band layer (inset by
   the rim, top band --bt over the face, bottom band --bb); ::after is the face: the band octagon with its top,
   bottom and four diagonal edges moved in by --kn along their normals (true insets, so the chamfer bands keep the
   same width as the top and bottom bands; the vertical sides carry no band). Both layers share one box, so a face
   image lines up exactly under the bands.
   Two edge tiers share this construction. Elements declare their full cut and band (--c, --n); the tier caps how
   much of them shows (--k, --kn):
     light, the default for every ordinary panel, row, card, field, chip and button: a small plain chamfer (at most
       6px), a plain 1px iron rim and a 1px inset trim, lit along the top and dark along the bottom (2px on buttons,
       chips and tags so they still read as raised): the corner steps once;
     heavy, the Norse notch, for the few main things only (see "edge tiers" below): the element's own big cut, a 2px
       rim split into lit facets and wide bevel bands: the corner steps twice. */
:is(.btn, .chip, .tag, .chat-input__box, .hero, .hero__note, .rain, .pot, .ptile, .battle, .bet, .plate, .menu, .minput, .mstat, .game__new) {
  --c: 8px; --rw: 1px; --rim: var(--rim-iron); --n: 4px;
  --bt: rgba(var(--hi), .36); --bb: rgba(var(--lo), .56); --face: var(--raised); --glow: none;
  --cap-c: 6px; --cap-n: 1px;
  --k: min(var(--c), var(--cap-c)); --kn: min(var(--n), var(--cap-n));
  --ci: calc(var(--k) - var(--rw) * 0.4142);
  --na: calc(var(--ci) + var(--kn) * 0.4142); --nb: calc(var(--ci) + var(--kn) * 1.4142);
  position: relative; isolation: isolate; border: 0; background: var(--rim);
  clip-path: polygon(var(--k) 0, calc(100% - var(--k)) 0, 100% var(--k), 100% calc(100% - var(--k)),
                     calc(100% - var(--k)) 100%, var(--k) 100%, 0 calc(100% - var(--k)), 0 var(--k));
}
:is(.btn, .chip, .tag, .chat-input__box, .hero, .hero__note, .rain, .pot, .ptile, .battle, .bet, .plate, .menu, .minput, .mstat, .game__new)::before,
:is(.btn, .chip, .tag, .chat-input__box, .hero, .hero__note, .rain, .pot, .ptile, .battle, .bet, .plate, .menu, .minput, .mstat, .game__new)::after {
  content: ""; position: absolute; inset: var(--rw); pointer-events: none;
}
:is(.btn, .chip, .tag, .chat-input__box, .hero, .hero__note, .rain, .pot, .ptile, .battle, .bet, .plate, .menu, .minput, .mstat, .game__new)::before {
  z-index: -2; background: linear-gradient(var(--bt) 0 50%, var(--bb) 50% 100%), var(--face);
  clip-path: polygon(var(--ci) 0, calc(100% - var(--ci)) 0, 100% var(--ci), 100% calc(100% - var(--ci)),
                     calc(100% - var(--ci)) 100%, var(--ci) 100%, 0 calc(100% - var(--ci)), 0 var(--ci));
}
:is(.btn, .chip, .tag, .chat-input__box, .hero, .hero__note, .rain, .pot, .ptile, .battle, .bet, .plate, .menu, .minput, .mstat, .game__new)::after {
  z-index: -1; background: var(--face); box-shadow: var(--glow);
  clip-path: polygon(var(--na) var(--kn), calc(100% - var(--na)) var(--kn), 100% var(--nb), 100% calc(100% - var(--nb)),
                     calc(100% - var(--na)) calc(100% - var(--kn)), var(--na) calc(100% - var(--kn)), 0 calc(100% - var(--nb)), 0 var(--nb));
}
/* ---------------------------------------------------------------- edge tiers
   Light is the default above. Controls keep a 2px trim so they still read as raised (or, inverted, as cut in). */
:is(.btn, .chip, .tag) { --cap-n: 2px; }
/* Heavy, the Norse notch: the hero, the rain + race row, each game's main frame and its board well, the case
   opener's stage, the battle's top panel, the battle builder's settings, the result, win and fairness plates, and
   a page's one key panel (class="edge-heavy" on the panel or its plate). The NEW tag keeps its own drawn values
   too, and so does the badge on each game card. */
:is(.hero, .rain, .race > .plate, .mframe > .plate, .mboard__well, .rlframe > .plate, .rlplay > .plate, .oframe > .plate,
    .ostage__well, .atop > .plate, .cset > .plate, .mresult > .plate, .mnote > .plate, .owin > .plate, .aend > .plate,
    .fair__in > .plate, .edge-heavy, .edge-heavy > .plate, .game__new) {
  --cap-c: 100px; --cap-n: 100px;
}
/* Forged rim, heavy panels only: a 2px rim split into facets. The boxes below paint each facet's tone; only the
   outer 2px ring stays visible around the bands. Light panels keep the plain 1px rim of the base rule. */
:is(.hero, .rain, .race > .plate, .mframe > .plate, .mboard__well, .rlframe > .plate, .rlplay > .plate, .oframe > .plate,
    .ostage__well, .atop > .plate, .cset > .plate, .mresult > .plate, .mnote > .plate, .owin > .plate, .aend > .plate,
    .fair__in > .plate, .edge-heavy:is(.plate, .hero, .rain), .edge-heavy > .plate) {
  --rw: 2px;
  background:
    linear-gradient(var(--iron-hi2) 0 0) 0 0 / 50% var(--c) no-repeat,
    linear-gradient(var(--iron-hi2) 0 0) 100% 0 / 50% var(--rw) no-repeat,
    linear-gradient(var(--iron-hi1) 0 0) 100% var(--rw) / 50% calc(var(--c) - var(--rw)) no-repeat,
    linear-gradient(var(--iron-hi1) 0 0) 0 var(--c) / 50% calc(100% - 2 * var(--c)) no-repeat,
    linear-gradient(var(--iron-lo2) 0 0) 0 100% / 50% var(--rw) no-repeat,
    linear-gradient(var(--iron-lo2) 0 0) 100% 100% / 50% var(--c) no-repeat,
    var(--iron-lo1);
}
/* Cards whose art reaches past their edge carry the plate as an empty first child, so the card itself stays
   unclipped. */
.plate { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

/* Chat card: the avatar row overhangs the top, so the element stays unclipped and only its two layers are cut. */
.msg {
  --c: 10px; --n: 6px; --bt: rgba(var(--hi), .24); --bb: rgba(var(--lo), .56); --face: var(--raised);
  --na: calc(var(--c) + var(--n) * 0.4142); --nb: calc(var(--c) + var(--n) * 1.4142);
  position: relative; isolation: isolate;
}
.msg::before, .msg::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.msg::before {
  z-index: -2; background: linear-gradient(var(--bt) 0 50%, var(--bb) 50% 100%), var(--face);
  clip-path: polygon(var(--c) 0, calc(100% - var(--c)) 0, 100% var(--c), 100% calc(100% - var(--c)),
                     calc(100% - var(--c)) 100%, var(--c) 100%, 0 calc(100% - var(--c)), 0 var(--c));
}
.msg::after {
  z-index: -1; background: var(--face);
  clip-path: polygon(var(--na) var(--n), calc(100% - var(--na)) var(--n), 100% var(--nb), 100% calc(100% - var(--nb)),
                     calc(100% - var(--na)) calc(100% - var(--n)), var(--na) calc(100% - var(--n)), 0 calc(100% - var(--nb)), 0 var(--nb));
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 24px 4px;
  font-size: 14px; letter-spacing: 1.12px; color: var(--muted); text-transform: uppercase; white-space: nowrap;
  transition: filter .15s;
}
@media (prefers-reduced-motion: no-preference) { .btn { transition: filter .15s, transform 80ms; } }
.btn:hover { filter: brightness(1.1); }
/* pressed: the stone gives a pixel and darkens a touch (rablox's press, in valblox's own light); a disabled
   button keeps its own dimmed look and does not move */
.btn:not(:disabled, [aria-disabled="true"]):active { transform: translateY(1px); filter: brightness(.94); }
.btn:not(.btn--gold, .btn--green, .btn--gold-line, .btn--green-line):hover { --rim: #33495A; }   /* neutral: frost-tinted rim */
.btn:focus-visible { outline: 2px solid var(--lilac-light); outline-offset: 2px; --rim: var(--lilac); --glow: inset 0 0 14px rgba(var(--lilac-rgb), .35); }
.btn--icon { width: 44px; padding: 0 0 4px; --c: 10px; }
.btn--gold {
  color: var(--gold); --rim: #2A2114;
  --bt: rgba(var(--gold-hi), .36); --bb: rgba(var(--gold-lo), .56);
  --face: linear-gradient(rgba(var(--gold-rgb), .36) 0%, rgba(var(--gold-rgb), 0) 100%), linear-gradient(var(--acc-a) 0%, var(--acc-b) 100%);
  --glow: inset 0 0 20px rgba(var(--gold-rgb), .24);
}
.btn--green {
  color: var(--green); --rw: 2px; padding: 0 22px 4px; --n: 3px;
  --bt: rgba(var(--green-bevel), .36); --bb: var(--green-deep);
  --face: linear-gradient(rgba(var(--green-2-rgb), .36) 0%, rgba(var(--green-rgb), 0) 100%), linear-gradient(var(--acc-a) 0%, var(--acc-b) 100%);
  --glow: inset 0 0 20px rgba(var(--green-rgb), .24);
}
.btn--gold-line {
  color: var(--gold); --rim: var(--gold);
  --bt: rgba(var(--gold-hi), .36); --bb: rgba(var(--gold-lo), .56);
  --face: linear-gradient(rgba(var(--gold-rgb), 0) 0%, rgba(var(--gold-rgb), .24) 100%), var(--raised);
}
.btn--green-line {
  color: var(--green); --rim: var(--green);
  --bt: rgba(var(--green-rgb), .1); --bb: rgba(var(--gold-lo), .56);
  --face: linear-gradient(rgba(var(--green-rgb), 0) 0%, rgba(var(--green-rgb), .24) 100%), var(--raised);
}
.btn--gold .ic, .btn--gold-line .ic { width: 24px; height: 24px; }
.btn--sq { width: 30px; height: 30px; padding: 0 0 3px; --c: 7px; --n: 3px; }
.btn--sq .ic { width: 15px; height: 15px; }
.btn--sm { height: 36px; padding: 0 16px 4px; font-size: 13px; --c: 8px; }
.btn--block { width: 100%; }
.t-gold { color: var(--gold); }
.t-green { color: var(--green); }
.t-blue { color: var(--blue) !important; }

/* ---------------------------------------------------------------- sidebar: logo, games list, chat */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 9;
  display: flex; flex-direction: column; background: var(--sidebar);
}
.side__head {
  position: relative; height: 156px; flex: none; display: grid; place-items: center; padding-bottom: 6px;
  /* the carved head art is drawn 300x208; anchored at the bottom so its bronze sill stays on the seam, and cut
     above its upper plait band (y 26-42) so no sliver of that band shows at the top edge */
  /* the bronze sill (2px rule over a 6px dark band) is chrome, not scenery: drawn on top so it stays when the opaque
     3D backdrop (bg-sidebar.webp) covers the SVG head that also draws it */
  background:
    linear-gradient(var(--gold) 0 0) 0 calc(100% - 6px) / 100% 2px no-repeat,
    linear-gradient(var(--header-edge) 0 0) 0 100% / 100% 6px no-repeat,
    url("assets/3d/bg-sidebar.webp") center / cover no-repeat, url("assets/img/sidebar-head.svg") center bottom / 300px 208px no-repeat;
}
.side__logo { position: relative; display: block; }
.side__logo img { width: 172px; height: 115px; }
.side__logo:focus-visible { outline: 2px solid var(--lilac); outline-offset: 4px; }
/* the logo's shield turns slowly, round and round: its rendered loop (.side__shield, a seamless 180-frame turn over 6s;
   frame 0 is the still shield) stands in the shield's box over the lockup's word-only twin. site.js swaps both in
   once the loop plays and the twin has loaded; with reduced motion neither is fetched and the still lockup stays.
   Box in lockup units: 52.5,0 95x95 of 200x134 */
.side__logo .side__shield { position: absolute; left: 26.25%; top: 0; width: 47.5%; height: 70.9%; pointer-events: none; opacity: 0; }
html.has-logo-loop .side__shield { opacity: 1; }
.side__close { display: none; position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; --c: 9px; }
.side__close .ic { width: 15px; height: 15px; }

.sb { display: flex; flex-direction: column; min-height: 0; flex: none; }
.sb--chat { flex: 1 1 0; }
/* section head: a carved crossbeam (lit top edge, dark seam under it) that folds its section away */
.sb__toggle {
  width: 100%; height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 18px 2px 20px; border: 0;
  background: linear-gradient(180deg, #242C3B 0%, #1F2633 100%); color: var(--muted);
  font-size: 14px; letter-spacing: 1.12px; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(var(--hi), .65), inset 0 -2px 0 var(--rule);
}
.sb__toggle > .ic:first-child { width: 19px; height: 19px; color: var(--lilac); }
.sb__label { margin-right: auto; }
.sb__toggle .online { margin-right: 6px; }
.sb__toggle .ic--chev { width: 20px; height: 20px; transition: transform .15s; }
.sb__toggle[aria-expanded="true"] .ic--chev { transform: rotate(180deg); }
.sb__toggle:hover { color: var(--lilac-light); }
.sb__toggle:focus-visible { outline: 2px solid var(--lilac); outline-offset: -3px; }
.sb__body[hidden] { display: none !important; }

/* games: a compact two-column grid (4 rows of 32px), so the chat below keeps three or more messages in view */
.sbg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 4px; padding: 6px 12px 10px; }
.sbg a {
  min-width: 0; height: 32px; display: flex; align-items: center; gap: 7px; padding: 0 4px 1px;
  font-size: 12px; letter-spacing: .8px; color: var(--lilac); text-transform: uppercase;
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);
}
.sbg a > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbg__ic {
  width: 24px; height: 24px; flex: none; display: grid; place-items: center;
  background: linear-gradient(#2B333F, #212832); box-shadow: inset 0 2px 0 rgba(var(--hi), .6), inset 0 -2px 0 rgba(var(--lo), .7);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
}
.sbg__ic .ic { width: 14px; height: 14px; }
.sbg a:hover, .sbg a:focus-visible { outline: none; color: var(--lilac-light); background: rgba(var(--lilac-rgb), .08); }
.sbg a:focus-visible { box-shadow: inset 3px 0 0 var(--lilac); }
.sbg a[aria-current="page"] { color: var(--gold); background: rgba(var(--gold-rgb), .09); }

.sbc { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.sbc__room { flex: none; padding: 10px 17px 0; }
/* the chat's room: a label cut into the panel, not a control (there is one room so far, so nothing to pick) */
.lang {
  height: 36px; display: flex; align-items: center; padding: 0 14px 3px;
  font-size: 14px; letter-spacing: 1.12px; color: var(--muted); text-transform: uppercase;
  background: var(--hero-dark); box-shadow: inset 0 2px 0 rgba(var(--lo), .55), inset 0 -1px 0 rgba(var(--hi), .22);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
}
.lang__name { display: inline-flex; align-items: center; gap: 8px; letter-spacing: 1.12px; }
.lang__name svg { width: 18px; height: 18px; }
.online { display: inline-flex; align-items: center; gap: 6px; padding-bottom: 1px; }
.online i {
  width: 6px; height: 6px; border-radius: 4px; border: 1px solid rgba(var(--green-2-rgb), .56);
  background: linear-gradient(rgba(var(--green-2-rgb), .64), rgba(var(--green-rgb), 0)), linear-gradient(#2B333F, #212832);
  box-shadow: 0 0 2px rgba(var(--green-rgb), .24);
}
.online b { font-weight: 400; color: var(--green); letter-spacing: .91px; text-shadow: 0 0 11px rgba(var(--green-2-rgb), .72); }

/* the feed scrolls, newest above the input (site.js opens it there), the older ones fading out at the top; the
   first message's auto margin keeps a short feed down on the input, which justify-content: flex-end can't do in a
   box that scrolls (its overflow would be out of reach) */
.chat-feed {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  --chat-gap: 20px; display: flex; flex-direction: column; gap: var(--chat-gap); padding: 22px 17px 10px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22px); mask-image: linear-gradient(180deg, transparent 0, #000 22px);
}
.chat-feed::-webkit-scrollbar { display: none; }
.chat-feed > :first-child { margin-top: auto; }
.chat-feed:focus-visible { outline: 2px solid var(--lilac); outline-offset: -2px; }
.msg {
  flex: none; margin-top: 10px; font-family: "Skranji", sans-serif;
  --c: 6px; --n: 1px; --bt: rgba(var(--lo), .56); --bb: rgba(var(--hi), .24); --face: var(--chat-card);   /* recessed, light tier */
}
.msg__top { display: flex; align-items: center; gap: 12px; padding: 0 12px; margin-top: -10px; height: 39px; }
.avatar {
  width: 39px; height: 39px; flex: none; padding: 2px; background: var(--avatar-border); display: grid; place-items: center;
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
}
.avatar img, .avatar .ph {
  width: 35px; height: 35px; background: var(--avatar-bg);
  clip-path: polygon(8.2px 0, calc(100% - 8.2px) 0, 100% 8.2px, 100% calc(100% - 8.2px), calc(100% - 8.2px) 100%, 8.2px 100%, 0 calc(100% - 8.2px), 0 8.2px);
}
.avatar--mark img { width: 35px; height: 35px; padding: 3px; object-fit: contain; }
.lvl {
  width: 27px; height: 27px; flex: none; background: var(--avatar-bg);
  display: grid; place-items: center; font-family: "GoldenSmile"; font-size: 13px; letter-spacing: 1px; padding-left: 1px;
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
}
.lvl--low { color: var(--level-low); text-shadow: 0 0 9px rgba(97,185,222,.36); }
.lvl--mid { color: var(--level-mid); text-shadow: 0 0 9px rgba(221,154,117,.36); }
.lvl--high { color: var(--level-high); text-shadow: 0 0 9px rgba(255,128,129,.36); }
.msg__time {
  position: absolute; top: 6px; right: 10px; padding: 3px 0;
  font-size: 10px; color: var(--muted); filter: brightness(.8); text-shadow: 0 2px 0 rgba(0,0,0,.24);
}
.msg__body { padding: 6px 15px 13px; font-size: 14px; line-height: 19.6px; letter-spacing: .52px; text-shadow: 0 2px 0 rgba(0,0,0,.24); }
.msg__name { color: var(--chat-name); }
.msg__mention { color: var(--lilac); background: rgba(var(--lilac-rgb), .1); padding: 0 4px;
  clip-path: polygon(3px 0, calc(100% - 3px) 0, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 0 calc(100% - 3px), 0 3px); }

.chat-input { flex: none; padding: 8px 17px 12px; }
.chat-input__box { height: 50px; display: flex; align-items: center; --c: 11px; --n: 5px; }
.chat-input__box input {
  width: 100%; height: 100%; padding: 0 16px 3px; border: 0; background: transparent; outline: 0;
  font-family: "Skranji"; font-size: 15px; letter-spacing: .6px; color: var(--muted);
}
.chat-input__box input::placeholder { color: var(--muted); opacity: .62; }
/* signed out, the box is a link to the sign-in (site.js adds ?next= for the page it is on) */
.chat-input__ph {
  flex: 1; min-width: 0; padding: 0 16px 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: "Skranji"; font-size: 15px; letter-spacing: .6px; color: var(--muted); opacity: .62; transition: opacity .15s;
}
a.chat-input__box:hover { --rim: #33495A; }
a.chat-input__box:hover .chat-input__ph, a.chat-input__box:focus-visible .chat-input__ph { opacity: .9; }
a.chat-input__box:focus-visible { outline: none; --rim: var(--lilac); --glow: inset 0 0 14px rgba(var(--lilac-rgb), .35); }
.slowmode {
  display: flex; justify-content: flex-end; align-items: center; gap: 5px; margin-top: 4px;
  font-family: "Skranji"; font-size: 11px; color: var(--muted); filter: brightness(.8);
}
.slowmode .ic { width: 14px; height: 14px; }
.sb-links { display: none; }

/* ---------------------------------------------------------------- column + header (one row, no top strip) */
.app { min-width: 0; }
.col { margin-left: var(--col-x); min-width: 0; }
.bar {
  position: sticky; top: 0; z-index: 8; height: var(--bar-h); display: flex; align-items: center; gap: 12px;
  padding: 0 24px 6px var(--pad); background: var(--header); box-shadow: inset 0 -6px 0 var(--header-edge);
}
.bar__side, .bar__logo { display: none; }
.bar__logo img { width: 118px; height: 23px; }
.bar__spacer { flex: 1; }
.bar .btn .ic { width: 20px; height: 20px; }
.bar .btn--gold .ic { width: 24px; height: 24px; }
/* status banner (site.js 14): the back office's notice under the header, server mode only. A light plate like the
   toasts (assets/server/server.css), its rim and icon in the level's colour */
.vbanner {
  position: relative; isolation: isolate; display: flex; align-items: center; gap: 12px; margin: 18px var(--pad) 0;
  padding: 12px 18px 14px 16px; font-family: "Skranji", sans-serif; font-size: 15px; line-height: 21px; letter-spacing: .3px;
  color: var(--white);
}
.vbanner[hidden] { display: none; }
.vbanner > .plate { --c: 10px; --n: 4px; --rim: rgba(var(--lilac-rgb), .5); --face: linear-gradient(180deg, #273042 0%, var(--dropdown) 100%); }
.vbanner[data-level="warn"] > .plate { --rim: rgba(var(--gold-rgb), .65); }
.vbanner[data-level="critical"] > .plate { --rim: rgba(var(--salmon-rgb), .75); --face: linear-gradient(180deg, #392A33 0%, #2A2029 100%); }
.vbanner > .ic { width: 20px; height: 20px; flex: none; color: var(--lilac); }
.vbanner[data-level="warn"] > .ic { color: var(--gold); }
.vbanner[data-level="critical"] > .ic { color: var(--salmon); }
.vbanner__t { flex: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.bar__tags { display: flex; gap: 8px; margin-left: 4px; }
/* promo chips: recessed plates (inverted bands), coloured text */
.tag {
  height: 34px; display: inline-flex; align-items: center; padding: 0 14px 3px; white-space: nowrap;
  font-size: 13px; letter-spacing: 1.04px; text-transform: uppercase; transition: filter .15s;
  --c: 8px; --n: 3px; --bt: rgba(var(--lo), .5); --bb: rgba(var(--hi), .2); --face: #1C2330;
}
.tag--gold { color: var(--gold); }
.tag--green { color: var(--green); }
.tag > .ic { width: 16px; height: 16px; margin: 0 7px 1px -3px; }
/* sound (assets/js/sfx.js): the speaker in the bar, shown once sfx.js has loaded (html.has-sfx, site.js) */
.sfx-off, html.sfx-muted .sfx-on { display: none; }
html.sfx-muted .sfx-off { display: block; }
html.sfx-muted .bar__sfx { color: var(--gray-link); }
html:not(.has-sfx) .bar__sfx { display: none; }
/* signed in (site.js 13): the bar's Login becomes the player chip, the chat box takes a message (your own lines carry
   a You tag), and guest or member parts show (.btn and flex rows set display, which beats [hidden]) */
[data-guest][hidden], [data-member][hidden] { display: none !important; }
.bar__user { gap: 10px; padding: 0 16px 4px 7px; }
.bar__user[aria-current] { --rim: rgba(var(--lilac-rgb), .55); }
.bar__user .avatar { width: 32px; height: 32px; padding: 2px;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px); }
.bar__user .avatar img { width: 28px; height: 28px;
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px); }
.bar__user-n { max-width: 160px; overflow: hidden; text-overflow: ellipsis; font-family: "Skranji", sans-serif; font-size: 15px; letter-spacing: .5px; text-transform: none; color: var(--chat-name); }
.chat-say:focus-within { --rim: var(--lilac); --glow: inset 0 0 14px rgba(var(--lilac-rgb), .35); }
.chat-say input { color: var(--chat-name); }
.msg__you { flex: none; height: 20px; padding: 0 6px 1px; display: inline-grid; place-items: center; font-size: 11px; letter-spacing: 1px; color: var(--lilac-light); background: rgba(var(--lilac-rgb), .14); text-transform: uppercase;
  clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px); }
.msg--you { --face: linear-gradient(180deg, rgba(var(--lilac-rgb), .07), rgba(var(--lilac-rgb), 0)), var(--chat-card); }
/* one sender's messages in a row (site.js chatRuns): the first keeps its header (avatar, level, name, time), the
   follow-ups (.msg--cont) are only their text, under the first one's text, and the cards join into one block: a
   card followed by more of the run (.msg--more) squares its bottom corners and drops its bottom rim, a follow-up
   squares its top ones. The name stays for screen readers; a follow-up's own time shows on hover. */
.msg--cont { margin-top: calc(-1 * var(--chat-gap, 20px)); }
.msg--cont > .msg__top { display: none; }
.msg--cont > .msg__body > :is(.msg__name, .msg__sep) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.msg--more > .msg__body { padding-bottom: 2px; }
.msg--cont > .msg__body { padding-top: 2px; }
.msg--more::before { clip-path: polygon(var(--c) 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, 0 100%, 0 var(--c)); }
.msg--more::after { clip-path: polygon(var(--na) var(--n), calc(100% - var(--na)) var(--n), 100% var(--nb), 100% 100%, 0 100%, 0 var(--nb)); }
.msg--cont::before { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, var(--c) 100%, 0 calc(100% - var(--c))); }
.msg--cont::after { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--nb)), calc(100% - var(--na)) calc(100% - var(--n)), var(--na) calc(100% - var(--n)), 0 calc(100% - var(--nb))); }
.msg--cont.msg--more::before, .msg--cont.msg--more::after { clip-path: none; }
.msg--you.msg--cont { --face: var(--chat-card); }   /* the run's lilac wash stays on its first card */
.msg--cont > .msg__time { top: 2px; padding: 4px 0 4px 14px; opacity: 0; filter: none; color: rgba(150,161,182,.8);
  background: linear-gradient(90deg, rgba(36,45,60,0), var(--chat-card) 12px); pointer-events: none; }
@media (hover: hover) { .msg--cont:hover > .msg__time { opacity: 1; } }
/* eases in on hover only: a new follow-up (its header style computed first) never shows its time fading out */
@media (prefers-reduced-motion: no-preference) and (hover: hover) { .msg--cont:hover > .msg__time { transition: opacity .18s ease; } }
/* streamer mode (a profile setting, html.is-streamer from site.js): your balance and your amounts are blurred everywhere */
html.is-streamer :is([data-money], .mbal > b, .obal > b, .csum__bal > b) { filter: blur(7px); }
@media (max-width: 600px) { .bar__user { gap: 7px; padding: 0 10px 4px 6px; } .bar__user-n { max-width: 58px; font-size: 14px; } }
@media (max-width: 359px) { .bar__user { width: 44px; padding: 0 0 4px; } .bar__user-n { display: none; } }
/* server mode, signed in: the bar also holds the balance and Deposit (assets/server/server.css), so the other parts
   step back sooner, widest first: the promo chips and socials go into the menu under 1800px (not 1600px), Rewards
   keeps its icon under 1300px, Deposit under 1041px, the chip its avatar under 701px (and from 901 to 980px, where
   the race still shows), the lockup its shield under 461px. In between, the buttons keep their size and a long name
   gives way (ellipsis) instead */
@media (min-width: 381px) {
  .bar:has(> .bar__bal:not([hidden])) > :is(.bar__side, .bar__rewards, .bar__sfx, .bar__more, .bar__bal, .bar__dep) { flex-shrink: 0; }
  .bar:has(> .bar__bal:not([hidden])) > .bar__user { min-width: 44px; }
}
@media (max-width: 1799px) {
  .bar:has(> .bar__bal:not([hidden])) > :is(.bar__tags, .bar__socials) { display: none; }
  .bar:has(> .bar__bal:not([hidden])) .menu > :is(a.menu__narrow, .menu__socials) { display: flex; }
  .bar:has(> .bar__bal:not([hidden])) .menu > .menu__sep { display: block; }
}
@media (max-width: 1299px) {
  .bar:has(> .bar__bal:not([hidden])) > .bar__rewards { width: 44px; padding: 0 0 4px; }
  .bar:has(> .bar__bal:not([hidden])) > .bar__rewards .lbl { display: none; }
}
@media (max-width: 1040px) {
  .bar:has(> .bar__bal:not([hidden])) > .bar__dep { width: 44px; padding: 0 0 4px; }
  .bar:has(> .bar__bal:not([hidden])) > .bar__dep span { display: none; }
}
@media (max-width: 700px), (min-width: 901px) and (max-width: 980px) {
  .bar:has(> .bar__bal:not([hidden])) > .bar__user { width: 44px; padding: 0 0 4px; }
  .bar:has(> .bar__bal:not([hidden])) .bar__user-n { display: none; }
}
@media (max-width: 460px) {
  .bar:has(> .bar__bal:not([hidden])) .bar__logo img { width: 24px; object-fit: cover; object-position: 0 50%; }
}
@media (max-width: 380px) {
  .bar:has(> .bar__bal:not([hidden])) { gap: 6px; }
}
.tag:hover { --rim: #33495A; filter: brightness(1.12); }
.tag:focus-visible { outline: none; --rim: var(--lilac); }
.socials { display: flex; gap: 5px; }
/* the race: the hoard standing on the Rain Pot's gold-rimmed plate (.pot), the prize and the time left beside it.
   From 901px up; phones get the race card under the home's games instead, and the drawer's 1M Race link. site.js
   runs the clock, keeps the link's name in step with it and plays the hoard's loop over the still. */
.bar__race {
  position: relative; isolation: isolate; flex: none; display: flex; align-items: center;
  height: 50px; padding: 0 16px 2px 70px; transition: filter .15s;
}
.bar__race > .bar__race-plate { position: absolute; inset: 0; z-index: -1; height: auto; padding: 0; pointer-events: none; }
.bar__race:hover { filter: brightness(1.1); }
.bar__race:focus-visible { outline: none; }
.bar__race:focus-visible > .bar__race-plate { --rim: var(--lilac); --glow: inset 0 0 14px rgba(var(--lilac-rgb), .35); }
.bar__race[aria-current="page"] > .bar__race-plate { --rim: var(--gold); }
/* the hoard stands up out of the plate, its top a pixel under the window's edge */
.bar__race-art { position: absolute; left: 4px; top: 50%; width: 64px; height: 64px; margin-top: -32px; display: grid; place-items: center; pointer-events: none; }
.bar__race-art img { width: 64px; height: 64px; object-fit: contain; }
.bar__race-art img:not([data-art="3d"]) { filter: drop-shadow(0 4px 5px rgba(4, 7, 12, .45)); }
.bar__race-text { display: flex; flex-direction: column; gap: 4px; }
.bar__race-kicker { display: flex; align-items: baseline; gap: 9px; font-size: 12px; line-height: 14px; letter-spacing: 1.1px; text-transform: uppercase; white-space: nowrap; }
.bar__race-name { color: var(--gold); }
.bar__race-time { font-family: "Skranji"; letter-spacing: .6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar__race-amount { display: flex; align-items: center; gap: 6px; }
.bar__race-amount img { width: 18px; height: 19px; }
.bar__race-amount b { font-family: "Skranji"; font-weight: 700; font-size: 19px; line-height: 1; letter-spacing: .5px; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .45)); }

/* dropdowns (details/summary: work without JS) */
.dd { position: relative; }
.dd > summary { list-style: none; }
.dd > summary::-webkit-details-marker { display: none; }
.dd[open] > summary { --rim: rgba(var(--lilac-rgb), .55); color: var(--lilac-light); }
.menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; width: 236px; padding: 10px;
  display: flex; flex-direction: column; gap: 2px;
  --c: 12px; --n: 4px; --face: linear-gradient(180deg, #273042 0%, var(--dropdown) 100%);
}
.menu--end { left: auto; right: 0; }
.menu > a, .sb-links a {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px 2px;
  font-size: 14px; letter-spacing: 1.12px; color: var(--lilac); text-transform: uppercase;
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);
}
.menu > a .ic, .sb-links a .ic { width: 18px; height: 18px; }
.menu > a:hover, .menu > a:focus-visible, .sb-links a:hover, .sb-links a:focus-visible { outline: none; color: var(--lilac-light); background: rgba(var(--lilac-rgb), .1); }
.menu > a[aria-current="page"] { color: var(--gold); background: rgba(var(--gold-rgb), .09); }
/* the bar's promo chips and socials, carried in the menu once the bar is too narrow for them (under 1600px) */
.menu > a.menu__gold { color: var(--gold); }
.menu > a.menu__green { color: var(--green); }
.menu > .menu__narrow { display: none; }
.menu__sep { flex: none; height: 2px; margin: 6px 8px; background: linear-gradient(180deg, var(--rule) 0 1px, rgba(var(--hi), .55) 1px 2px); }
.menu__socials { gap: 8px; padding: 6px 8px 4px; }
.menu__socials .btn { width: 34px; height: 34px; --c: 8px; }

/* ---------------------------------------------------------------- content grid */
.content {
  position: relative; width: 100%; max-width: 1640px; margin: 0 auto; padding: 24px var(--pad) 72px;
  display: flex; flex-direction: column; overflow-x: clip;
}
.content > * { position: relative; }

/* hero: copy on the calm left, the 3D scene (bg-hero, 5:1, the longship at 67-84% of its width) held to the right
   edge. A hero under ~860px wide would put the ship behind the title, so the scene slides right by the difference
   (--ship, at most 200px, which keeps the stern in); 100cqw is the hero's width in the home's one-column lead. */
.hero {
  min-height: 280px; display: flex; align-items: center; padding: 32px 56px;
  --c: 18px; --n: 6px; --bt: rgba(var(--hi), .24); --bb: rgba(var(--lo), .56);
  --ship: clamp(0px, 859px - 100cqw, 200px);
  --face:
    radial-gradient(60% 150% at -8% 125%, rgba(var(--gold-rgb), .2) 0%, rgba(var(--gold-rgb), 0) 100%),
    linear-gradient(90deg, rgba(17, 23, 32, .72) 0%, rgba(17, 23, 32, .38) 30%, rgba(17, 23, 32, 0) 52%),
    url("assets/3d/bg-hero.webp") right calc(-1 * var(--ship)) center / cover no-repeat,
    url("assets/img/hero-fjord.svg") right calc(-1 * var(--ship)) center / auto 100% no-repeat,
    linear-gradient(90deg, var(--card) 30%, var(--hero-dark) 48%, var(--hero-c) 100%);
}
.edge-line { position: absolute; z-index: 2; height: 2px; background: linear-gradient(90deg, rgba(var(--c2), 0) 0%, rgb(var(--c2)) 50%, rgba(var(--c2), 0) 100%); }
.hero .edge-line--frost { --c2: var(--lilac-rgb); height: 1px; box-shadow: 0 0 6px 1px rgba(var(--lilac-rgb), .35); }
.hero__copy { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; max-width: 520px; }
.hero__note {
  min-height: 30px; display: inline-flex; align-items: center; gap: 8px; padding: 3px 5px 5px 12px;
  font-size: 12px; line-height: 16px; letter-spacing: 1px; color: var(--gold); text-transform: uppercase;
  --c: 8px; --n: 3px; --rim: rgba(var(--gold-rgb), .3); --bt: rgba(var(--gold-hi), .2); --bb: rgba(var(--gold-lo), .45);
  --face: linear-gradient(90deg, rgba(var(--gold-rgb), .11), rgba(var(--gold-rgb), .02)), rgba(19, 25, 34, .85);
}
.hero__note[hidden] { display: none; }
.hero__note > .ic { width: 15px; height: 15px; }
.hero__note-x { width: 22px; height: 22px; flex: none; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--gold); opacity: .75; }
.hero__note-x:hover, .hero__note-x:focus-visible { opacity: 1; outline: none; }
.hero__note-x:focus-visible { box-shadow: 0 0 0 2px var(--lilac); }
.hero__note-x .ic { width: 11px; height: 11px; }
.hero__title { display: flex; flex-direction: column; }
.hero__title span:first-child { font-size: 42px; line-height: 48px; color: var(--lilac-light); text-transform: uppercase; }
.hero__title span:last-child { font-size: 24px; line-height: 30px; color: var(--white); text-transform: uppercase; }

/* home lead row (rablox's arrangement in VALBLOX's look): the hero at two thirds with the Rain Pot standing tall
   beside it once the column has the room, so the game row starts about 450px down; one column under that. The
   column is the container (.content--home: the home page only, so no other page's layout is contained). */
.content--home { container: col / inline-size; }
.home-lead { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@container col (min-width: 900px) {
  .home-lead { grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); }
  /* At two thirds the scene's own crop puts the longship behind the title, so the scene slides right by what the
     hero lacks of ~806px (at most 200px, which still keeps the stern in), under the deeper scrim of the narrow
     hero. The hero is the column less the pot and the gap: (100cqw - 20px) * 2/3, or 100cqw - 340px while the pot
     holds its 320px. */
  .home-lead .hero {
    min-height: 260px; padding: 32px 44px;
    --ship: clamp(0px, 806px - min((100cqw - 20px) * 2 / 3, 100cqw - 340px), 200px);
    --face:
      radial-gradient(60% 150% at -8% 125%, rgba(var(--gold-rgb), .2) 0%, rgba(var(--gold-rgb), 0) 100%),
      linear-gradient(90deg, rgba(17, 23, 32, .84) 0%, rgba(17, 23, 32, .55) 45%, rgba(17, 23, 32, 0) 78%),
      url("assets/3d/bg-hero.webp") right calc(-1 * var(--ship)) center / cover no-repeat,
      url("assets/img/hero-fjord.svg") right calc(-1 * var(--ship)) center / auto 100% no-repeat,
      linear-gradient(90deg, var(--card) 30%, var(--hero-dark) 48%, var(--hero-c) 100%);
  }
  /* the pot as a tall card: coin and title, the line of copy, the tray along its foot */
  .home-lead .rain {
    grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto minmax(12px, 1fr) auto;
    grid-template-areas: "art head" "art sub" ". ." "tray tray"; column-gap: 14px; padding: 24px 20px 20px 18px;
  }
  .home-lead .rain__badge { grid-area: art; width: 60px; height: 58px; }
  .home-lead .rain__badge .coin-spin { width: 42px; height: 42px; }
  .home-lead .rain .stat__head { grid-area: head; }
  .home-lead .rain .stat__sub { grid-area: sub; }
  .home-lead .rain .pot { grid-area: tray; height: 62px; margin-top: 0; align-self: end; }
  .home-lead .rain .pot > img { width: 34px; height: 36px; }
  .home-lead .rain .pot__amt { font-size: 34px; }
}
/* the pot runs to seven digits (2,468,400): while the pot's card is under ~400px (the column under 1220px) the
   tray tightens (smaller coin, gaps and button padding) and the number steps down, so Claim keeps its label */
@container col (min-width: 900px) and (max-width: 1219px) {
  .home-lead .rain .pot { gap: 8px; padding-left: 12px; }
  .home-lead .rain .pot > img { width: 28px; height: 30px; }
  .home-lead .rain .pot__amt { font-size: 28px; letter-spacing: 0; }
  .home-lead .rain .pot .btn--green { padding: 0 12px 4px 10px; gap: 6px; }
}
@container col (min-width: 900px) and (max-width: 1099px) {
  .home-lead .rain .pot__amt { font-size: 26px; }
}

/* status row: Rain Pot and Race as a pair (visual | head, line, tray) */
.status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; container: status / inline-size; }
.rain, .race {
  display: grid; grid-template-columns: 88px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 18px;
  align-items: center; min-height: 158px; padding: 18px 22px 20px 20px;
}
.rain {
  --c: 16px; --n: 6px; --bt: rgba(var(--hi), .24); --bb: rgba(var(--lo), .56);
  --face:
    url("assets/img/rain-drift.svg") left top / auto 100% no-repeat,   /* sleet around the coin, faded out before the text */
    radial-gradient(42% 120% at 10% 50%, rgba(var(--blue-2-rgb), .22) 0%, rgba(var(--blue-2-rgb), 0) 100%),
    linear-gradient(0deg, rgba(var(--blue-2-rgb), .26) 0%, rgba(var(--blue-2-rgb), 0) 100%), var(--card);
}
.race { position: relative; isolation: isolate; }
.race > .plate {
  --c: 16px; --n: 6px; --bt: rgba(var(--hi), .24); --bb: rgba(var(--lo), .56);
  --face:
    radial-gradient(42% 120% at 10% 50%, rgba(var(--gold-rgb), .17) 0%, rgba(var(--gold-rgb), 0) 100%),
    linear-gradient(0deg, rgba(var(--gold-rgb), .1) 0%, rgba(var(--gold-rgb), 0) 100%), var(--card);
}
.race--m { display: none; }   /* the home's race card, under the games: up to 900px only (the bar's badge above that) */
.rain__badge, .race__art { grid-column: 1; grid-row: 1 / -1; justify-self: center; }
.rain__badge {
  width: 76px; height: 73px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(60% 60% at 50% 40%, rgba(var(--gold-rgb), .18), rgba(var(--gold-rgb), 0)), var(--raised);
  box-shadow: inset 0 4px 0 rgba(var(--hi), .5), inset 0 -5px 0 rgba(var(--lo), .7), 0 0 0 2px var(--rim-iron);
}
.rain__badge img { width: 48px; height: 51px; margin-top: -2px; }
.race__art { width: 112px; height: 112px; margin: -8px -12px; display: grid; place-items: center; }
.race__img { width: 112px; height: 112px; object-fit: contain; }
.race__img:not([data-art="3d"]) { filter: drop-shadow(0 6px 8px rgba(4, 7, 12, .45)); }   /* SVG stand-in only: race.webp has its shadow baked in */
.stat__head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; min-width: 0; align-self: end; }
.stat__sub { margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--muted); text-transform: uppercase; }
.stat__sub b { font-weight: 400; color: var(--gold); }
.stat__sub em { font-style: normal; color: var(--white); }
.stat__tray { margin-top: 14px; align-self: start; }
.rain__title { font-size: 30px; line-height: 40px; color: var(--blue); filter: drop-shadow(0 0 8px rgba(var(--blue-rgb), .37)); text-transform: uppercase; }
.chip {
  height: 33px; padding: 3px 12px 7px; display: grid; place-items: center; font-size: 16px; color: var(--blue); white-space: nowrap;
  --c: 8px; --rim: rgba(var(--blue-rgb), .32);
  --face: linear-gradient(180deg, rgba(var(--blue-2-rgb), .22), rgba(var(--blue-2-rgb), .05)), var(--hero-dark);
  --bt: rgba(var(--hi), .36); --bb: rgba(var(--lo), .56);
}
.chip--gold { color: var(--gold); --rim: rgba(var(--gold-rgb), .32); --face: linear-gradient(180deg, rgba(var(--gold-rgb), .15), rgba(var(--gold-rgb), .03)), var(--hero-dark); }
.pot {
  height: 54px; display: flex; align-items: center; gap: 12px; padding: 0 7px 0 18px;
  --c: 11px; --n: 5px; --rim: rgba(var(--gold-rgb), .38);
  --face: radial-gradient(79% 90% at 50% 100%, rgba(var(--gold-rgb), .16) 0%, rgba(var(--gold-rgb), 0) 100%),
    linear-gradient(246deg, rgba(var(--blue-2-rgb), 0) 40%, rgba(var(--blue-2-rgb), .2) 100%), var(--card);
}
.pot img { width: 29px; height: 31px; }
.pot__amt { font-family: "Skranji"; font-weight: 700; font-size: 28px; line-height: 1; letter-spacing: .5px; }
.pot .btn--green { height: 40px; padding: 0 16px 4px 14px; margin-left: auto; gap: 8px; --c: 9px; }
.pot .btn--green .ic { width: 18px; height: 18px; }
.race__title { display: flex; align-items: center; gap: 10px; }
.race__prize { display: inline-flex; align-items: center; gap: 7px; font-family: "Skranji"; font-weight: 700; font-size: 29px; line-height: 40px; letter-spacing: .5px; }
.race__prize img { width: 20px; height: 21px; }
.race__prize .ember { filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .45)); }
.race__name { font-size: 22px; line-height: 40px; color: var(--gold); text-transform: uppercase; }
.race__tray { display: flex; align-items: flex-end; gap: 16px; }
.meter { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; padding-bottom: 3px; }
.meter__lbl { font-size: 12px; line-height: 14px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.meter__lbl em { font-style: normal; color: var(--gold); }
/* banded bronze fill (light top, mid, dark bottom), the loader bar's construction in the race colour */
.meter__track {
  position: relative; display: block; height: 12px; background: var(--track); box-shadow: inset 0 2px 0 rgba(0, 0, 0, .35);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, calc(100% - 6px) 100%, 6px 100%, 0 6px);
}
.meter__track i {
  position: absolute; inset: 0 auto 0 0;
  background: linear-gradient(180deg, var(--bz1) 0 30%, var(--bz2) 30% 70%, var(--bz4) 70% 100%);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, calc(100% - 6px) 100%, 6px 100%, 0 6px);
}
/* Two cards under ~520px each (1181-1423px with the sidebar, 901-1123px in drawer mode): the visual column narrows,
   both trays run the full card width under it, and the race countdown leaves the title row for the progress bar's
   label line, ending flush with the bar, with View race beside the pair. Both trays sit on the card foot, so the
   two cards line up whatever their heights. */
@media (min-width: 901px) {
  @container status (max-width: 1059px) {
    .rain, .race { column-gap: 14px; padding: 16px 18px 18px 16px; }
    .rain__badge { width: 58px; height: 56px; }
    .rain__badge img { width: 36px; height: 38px; }
    .race__art { width: 76px; height: 76px; margin: -6px -8px; }
    .race__img { width: 76px; height: 76px; }
    .rain { grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto minmax(14px, 1fr) auto;
      grid-template-areas: "art head" "art sub" ". ." "tray tray"; }
    .rain__badge { grid-area: art; }
    .rain .stat__head { grid-area: head; }
    .rain .stat__sub { grid-area: sub; }
    .rain .pot { grid-area: tray; margin-top: 0; }
    .race { grid-template-columns: 64px minmax(0, 1fr) auto auto; grid-template-rows: auto auto minmax(14px, 1fr) auto auto;
      grid-template-areas: "art title title title" "art sub sub sub" ". . . ." "lbl lbl chip btn" "bar bar bar btn"; }
    .race .stat__head, .race__tray, .race .meter { display: contents; }
    .race__art { grid-area: art; }
    .race__title { grid-area: title; align-self: end; }
    .race .stat__sub { grid-area: sub; }
    .race .meter__lbl { grid-area: lbl; align-self: end; }
    .race .chip { grid-area: chip; align-self: end; height: 27px; padding: 2px 10px 6px; font-size: 14px; --c: 7px; }
    .race .meter__track { grid-area: bar; margin-top: 7px; }
    .race__tray .btn { grid-area: btn; align-self: end; }
  }
}

/* games: one row. Every card when they all fit at 180px+ (a container query per card count: the track carries
   games__track--<n>), otherwise a snap-scrolling row sized so a part of the next card always peeks at the edge,
   with arrow buttons (site.js shows them on overflow). */
.games { container: games / inline-size; margin-top: 32px; }
.games__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; margin-bottom: 14px; }
.games__head h2 { gap: 12px; }
.games__head h2 .ic { width: 28px; height: 28px; color: var(--lilac); }
.games__nav { display: flex; gap: 8px; }
.games__nav[hidden] { display: none; }
.games__nav .btn { width: 40px; height: 40px; --c: 9px; }
.games__nav .btn .ic { width: 22px; height: 22px; }
.games__nav [data-scroll="-1"] .ic { transform: rotate(90deg); }
.games__nav [data-scroll="1"] .ic { transform: rotate(-90deg); }
.games__nav .btn:disabled { opacity: .38; cursor: default; filter: none; }
.games__track {
  --gap: 16px; --n: 6;
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100cqw - var(--n) * var(--gap)) / (var(--n) + .4));
  gap: var(--gap); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 8px 8px 18px; margin: -8px -8px -18px; scroll-padding-inline: 8px;   /* room for the hover lift and glow */
}
.games__track::-webkit-scrollbar { display: none; }
@container games (min-width: 1380px) {   /* 7 x 180 + 6 x 20 */
  .games__track--7 { --gap: 20px; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; }
  .games__track--8 { --n: 7; }
}
@container games (min-width: 1552px) {   /* 8 x 180 + 7 x 16 */
  .games__track--8 { grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; }
}
@container games (max-width: 1229px) { .games__track { --n: 5; } }
@container games (max-width: 1009px) { .games__track { --n: 4; } }
@container games (max-width: 799px) { .games__track { --n: 3; } }
@container games (max-width: 599px) { .games__track { --n: 2; --gap: 12px; } }
@container games (max-width: 399px) { .games__track { --n: 1.25; --gap: 12px; } }
.game { display: flex; flex-direction: column; align-items: center; gap: 21px; min-width: 0; scroll-snap-align: start; }
.game__card {
  position: relative; isolation: isolate; display: block; width: 100%; aspect-ratio: 242 / 324; container-type: inline-size;
  /* the filter list keeps one shape in every state (shadow, glow, brightness) so rest, lift and dim all ease into each other */
  filter: drop-shadow(0 8px 10px rgba(4, 7, 12, .38)) drop-shadow(0 0 7px rgba(var(--lilac-rgb), 0)) brightness(1);
  transition: transform .2s, filter .22s ease-out; will-change: transform;
}
.game__card::before {
  /* --banner: the 3D render (assets/3d/banner-<slug>@1x.webp / banner-<slug>.webp), full-bleed card art. Until it
     exists the stand-in object (--art) and the carved frame show through. The forged rim (card-rim.svg) sits on top
     of whichever art shows. The art is drawn for 242x324 and scales with the card, so the clip is in percentages
     (16px of 242 and of 324) and stays on the drawn chamfer at every size. */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("assets/img/card-rim.svg") 0 0 / 100% 100% no-repeat,
    var(--banner, none) center / cover no-repeat, var(--art, none) 50% 54.9% / 78.5% auto no-repeat,
    url("assets/img/card-frame.svg") 0 0 / 100% 100% no-repeat;
  clip-path: polygon(6.6116% 0, 93.3884% 0, 100% 4.9383%, 100% 95.0617%, 93.3884% 100%, 6.6116% 100%, 0 95.0617%, 0 4.9383%);
}
.game:hover .game__card, .game:focus-visible .game__card {
  transform: translateY(-4px);
  filter: drop-shadow(0 8px 10px rgba(4, 7, 12, .38)) drop-shadow(0 0 7px rgba(var(--lilac-rgb), .32)) brightness(1);
}
/* as on rablox: while one card is under the pointer the others darken, so the picked game stands out; only on
   pointers that hover (a tap on a phone must not leave the row dimmed) */
@media (hover: hover) {
  .games__track:has(.game:hover) .game:not(:hover) .game__card {
    filter: drop-shadow(0 8px 10px rgba(4, 7, 12, .38)) drop-shadow(0 0 7px rgba(var(--lilac-rgb), 0)) brightness(.55) saturate(.85);
  }
  .games__track:has(.game:hover) .game:not(:hover) .game__label { opacity: .55; }
}
/* hover clips (site.js clips()): the banner's own loop plays over the still inside the card's chamfer while hovered,
   and the forged rim is drawn again above it; a card with a clip drops the band of light */
.game__video, .game__rim {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none;
  clip-path: polygon(6.6116% 0, 93.3884% 0, 100% 4.9383%, 100% 95.0617%, 93.3884% 100%, 6.6116% 100%, 0 95.0617%, 0 4.9383%);
}
.game__video { object-fit: cover; opacity: 0; transition: opacity .22s; }
.game__video.is-on { opacity: 1; }
.game__rim { background: url("assets/img/card-rim.svg") 0 0 / 100% 100% no-repeat; }
.game__card.has-video::after { content: none; }
.game:focus-visible { outline: none; }
.game:focus-visible .game__label { outline: 2px solid var(--lilac); outline-offset: 3px; border-radius: 4px; }   /* the lift alone is too faint a focus mark */
/* the game's badge, set on the card's foot like a boss on a shield rim: an octagonal iron medallion (a full-chamfer
   plate: rim, lit top band, dark lower band) carrying the game's icon in frost; the name runs under the card */
.game__badge {
  position: absolute; left: 50%; bottom: -10px; z-index: 2; width: 56px; height: 52px; transform: translateX(-50%);
  display: grid; place-items: center; isolation: isolate; color: var(--lilac); transition: color .15s;
}
.game__badge > .plate {
  --cap-c: 100px; --cap-n: 100px; --c: 15px; --n: 3px; --rw: 2px; --rim: var(--rim-iron);
  --bt: rgba(var(--hi), .42); --bb: rgba(var(--lo), .62);
  --face: radial-gradient(70% 60% at 50% 30%, rgba(var(--lilac-rgb), .14) 0%, rgba(var(--lilac-rgb), 0) 100%), linear-gradient(180deg, #2B3442 0%, #1C232E 100%);
}
.game__badge .ic, .game__badge .ic--img { width: 28px; height: 28px; filter: drop-shadow(0 2px 0 rgba(4, 7, 12, .55)); }
.game__label {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 16px; line-height: 22px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--lilac); transition: color .15s, opacity .22s ease-out;
}
.game:hover .game__badge, .game:focus-visible .game__badge, .game:hover .game__label, .game:focus-visible .game__label { color: var(--lilac-light); }
/* NEW: a small raised plate in aurora green pinned in the card's top right corner, clear of the art's centre;
   in card units like the nameplate */
.game__new {
  position: absolute; top: 5.4%; right: 8.6%; height: 9.6cqw; padding: 0 3.6cqw .9cqw;
  display: grid; place-items: center;
  --c: 2.5cqw; --rw: 1px; --n: 1.1cqw; --rim: #0B2620;
  --bt: rgba(var(--green-bevel), .5); --bb: var(--green-deep);
  --face: linear-gradient(rgba(var(--green-2-rgb), .38) 0%, rgba(var(--green-rgb), .06) 100%), linear-gradient(var(--acc-a) 0%, var(--acc-b) 100%);
  color: var(--green); font-size: 5.3cqw; letter-spacing: .1em; line-height: 1; text-transform: uppercase; white-space: nowrap;
}

/* section heads, flanked by the knotwork divider (left as drawn, right mirrored) */
.h-gold { font-size: 27px; letter-spacing: 1px; color: var(--gold); text-transform: uppercase; text-align: center; line-height: 38px; }
.h-white { font-size: 24px; letter-spacing: 1px; color: var(--white); text-transform: uppercase; line-height: 34px; }
.h-gold, .h-div { display: flex; align-items: center; justify-content: center; gap: 16px; }
.h-gold::before, .h-gold::after, .h-div::before, .h-div::after {
  content: ""; width: 76px; height: 14px; flex: none; margin-top: -2px;
  background: url("assets/img/divider-bronze.svg") right center / 76px 14px no-repeat;
}
.h-div::before, .h-div::after { background-image: url("assets/img/divider-frost.svg"); }
.h-gold::after, .h-div::after { transform: scaleX(-1); }
.h-div--end::before { display: none; }

/* explore rewards: one timber band, three bays split by the upright plait */
.rewards { margin-top: 52px; container: rewards / inline-size; }
.rewards > .h-gold { margin-bottom: 22px; }
.wall-face {
  --face:
    linear-gradient(90deg, rgba(9, 16, 25, .22) 0 1px, rgba(150, 175, 205, .05) 1px 2px, rgba(9, 16, 25, 0) 2px) 50% 0 / 75px 100% repeat-x,
    radial-gradient(60% 140% at 50% 130%, rgba(var(--gold-rgb), .1) 0%, rgba(var(--gold-rgb), 0) 100%),
    linear-gradient(var(--raised-a) -20%, var(--raised-b) 100%), var(--card);
}
.rband {
  position: relative; isolation: isolate; display: grid; align-items: stretch; column-gap: 22px;
  grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr) 14px minmax(0, 1fr);
  padding: 24px 26px;
}
.rband > .plate, .step > .plate {
  --c: 18px; --n: 6px; --bt: rgba(var(--hi), .24); --bb: rgba(var(--lo), .56);
  --face:
    linear-gradient(90deg, rgba(9, 16, 25, .22) 0 1px, rgba(150, 175, 205, .05) 1px 2px, rgba(9, 16, 25, 0) 2px) 50% 0 / 75px 100% repeat-x,   /* plank seams, centred */
    radial-gradient(60% 140% at 50% 130%, rgba(var(--gold-rgb), .09) 0%, rgba(var(--gold-rgb), 0) 100%),
    linear-gradient(var(--raised-a) -20%, var(--raised-b) 100%), var(--card);
}
.rband__sep { align-self: center; width: 14px; height: 112px; background: url("assets/img/vplait-bronze-112.svg") center / 14px 112px no-repeat; }
/* each bay: art | text, the text block as tall as the bay with the button on its foot, so the three labels share
   a top line and the three buttons a bottom line */
.rw { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 16px; min-width: 0; }
.rw__art { width: 92px; height: 92px; display: grid; place-items: center; }
.rw__img { width: 92px; height: 92px; object-fit: contain; }
.rw__img:not([data-art="3d"]) { filter: drop-shadow(0 6px 8px rgba(4, 7, 12, .4)); }   /* renders bring their own contact shadow */
.rw__text { align-self: stretch; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.rw__label { font-size: 13px; line-height: 18px; color: var(--muted); text-transform: uppercase; }
.rw__title { font-size: 18px; line-height: 24px; color: var(--gold); text-transform: uppercase; }
.rw--blue .rw__title { color: var(--muted); }
.rw__amt { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; }
.rw__amt img { width: 20px; height: 21px; }
.rw__amt span { font-family: "Skranji"; font-size: 20px; letter-spacing: 1.6px; }
.rw__sub { margin-top: 4px; font-size: 13px; line-height: 18px; color: var(--muted); text-transform: uppercase; }
.rw .btn { margin-top: auto; }
.rw__text > :nth-last-child(2) { margin-bottom: 14px; }
/* the third line (amount, tier track or note) gets one slot height in every bay, so the three text blocks are the
   same height and the gap above each button is the same 14px */
.rw__amt, .rw .tier, .rw__sub { min-height: 24px; margin-top: 4px; display: flex; align-items: center; }
.rw__amt span { line-height: 1; }
/* narrow bays (3 across, under ~290px each): art above the text, centred */
@container rewards (max-width: 1040px) {
  .rw { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; justify-items: center; gap: 10px; text-align: center; }
  .rw__text { align-items: center; }
  .tier { align-self: stretch; }
}
/* too narrow for three bays: they stack (art | text again), split by the flat plait */
@container rewards (max-width: 760px) {
  .rband { grid-template-columns: minmax(0, 1fr); row-gap: 18px; padding: 26px 22px; }
  .rband__sep { width: 88px; height: 12px; justify-self: center; background: url("assets/img/plait-bronze.svg") center / 88px 12px no-repeat; }
  .rw { grid-template-columns: 88px minmax(0, 1fr); grid-template-rows: none; justify-items: stretch; gap: 14px; text-align: left; }
  .rw__text { align-items: flex-start; }
  .rw__art, .rw__img { width: 88px; height: 88px; }
}
.tier { align-self: stretch; display: flex; align-items: center; gap: 8px; margin: 8px 0 2px; }
.tier p { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.tier__track { position: relative; flex: 1; height: 6px; background: var(--track);
  clip-path: polygon(3px 0, calc(100% - 3px) 0, 100% 3px, calc(100% - 3px) 100%, 3px 100%, 0 3px); overflow: visible; }
.tier__track i { position: absolute; top: 0; width: 2px; height: 6px; background: var(--tick); }

/* payment marquee */
.pay { margin-top: 64px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.pay__track {
  width: 100%; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.pay__row { display: flex; gap: 10px; width: max-content; }
@media (prefers-reduced-motion: no-preference) {   /* still with reduced motion; it holds while the pointer is on it */
  .pay__row { animation: marquee 38s linear infinite; }
  .pay__track:hover .pay__row { animation-play-state: paused; }
  /* out of view (site.js offscreenRest): the marquee and any coin rain hold still until they are seen again */
  .pay__track.is-off .pay__row, html body .coin-rain.is-off i, html body .coin-rain.is-off i::before,
  html body .coin-spin.is-off::before { animation-play-state: paused; }
}
@keyframes marquee { to { transform: translateX(calc(-50% - 5px)); } }
.ptile {
  width: 125px; height: 125px; flex: none; padding: 20px 0; display: flex; flex-direction: column; align-items: center; gap: 11px;
  --c: 16px; --n: 7px; --bt: rgba(var(--hi), .24); --bb: rgba(var(--lo), .56);
  --face: linear-gradient(128deg, var(--card) -35%, var(--card-b) 100%);
}
.ptile__ic { width: 44px; height: 44px; display: grid; place-items: center; }
.ptile__ic img { width: 44px; height: 44px; }
.ptile__name {
  width: 100%; height: 30px; display: grid; place-items: center; font-size: 16px; color: var(--lilac); text-transform: uppercase;
  background: linear-gradient(270deg, rgba(var(--lilac-rgb), 0) 0%, rgba(var(--lilac-rgb), .12) 50%, rgba(var(--lilac-rgb), 0) 100%);
}

/* battle highlights */
.battles { margin-top: 56px; display: flex; flex-direction: column; gap: 20px; }
.battles__head { display: flex; align-items: center; justify-content: space-between; }
.battles__head h2 { gap: 12px; }
.battles__head h2 .ic { width: 30px; height: 30px; color: var(--lilac); }
.battle {
  height: 110px; display: flex; align-items: stretch; padding: 0 20px 0 25px;
  --c: 16px; --bt: rgba(var(--hi), .24); --bb: rgba(var(--lo), .56);
  --face: linear-gradient(96deg, var(--card) -910.79%, var(--card-b) 104.77%);
}
.battle__main { flex: 1; min-width: 0; padding-top: 15px; display: flex; flex-direction: column; gap: 13px; }
.battle__meta { display: flex; align-items: center; gap: 18px; padding-left: 3px; }
.battle__val { display: flex; align-items: center; gap: 8px; }
.battle__val img { width: 16px; height: 17px; }
.battle__val span { font-family: "Skranji"; font-weight: 700; font-size: 15px; letter-spacing: 1.2px; }
.battle__mode { font-size: 14px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.battle__slots { display: flex; align-items: center; gap: 15px; }
.slot {
  width: 54px; height: 54px; padding: 2px; background: var(--gold); display: grid; place-items: center; flex: none;
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
}
.slot > * { width: 50px !important; height: 50px !important; background: var(--avatar-bg); object-fit: contain;
  clip-path: polygon(11.2px 0, calc(100% - 11.2px) 0, 100% 11.2px, 100% calc(100% - 11.2px), calc(100% - 11.2px) 100%, 11.2px 100%, 0 calc(100% - 11.2px), 0 11.2px); }
.slot--dim { opacity: .35; }
.slot .avatar--bot { padding: 0; color: var(--lilac); }   /* a bot seat: the bot badge on the portrait ground */
.slot .avatar--bot .ic { width: 56%; height: 56%; }
.vs {
  width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: var(--gold);
  background: linear-gradient(#2B333F, #1A2028); box-shadow: inset 0 2px 0 rgba(var(--gold-hi), .4), inset 0 -2px 0 rgba(var(--gold-lo), .6), 0 0 0 1px var(--rim-iron);
}
.battle__items {
  width: 274px; flex: none; position: relative; display: flex; align-items: center; gap: 26px; padding: 0 20px 0 25px;
  background: linear-gradient(rgba(var(--salmon-rgb), 0) 0%, rgba(var(--salmon-rgb), .16) 54.06%, rgba(var(--salmon-rgb), 0) 100%);
}
.battle__items::before, .battle__items::after {
  content: ""; position: absolute; top: 50%; width: 2px; height: 44px; transform: translateY(-50%);
  background: linear-gradient(rgba(var(--gold-rgb), 0) 0%, var(--salmon) 50%, rgba(var(--gold-rgb), 0) 100%);
}
.battle__items::before { left: 0; } .battle__items::after { right: 0; }
.battle__items:has(.more) { gap: 16px; padding: 0 12px 0 18px; }
.item { width: 58px; height: 60px; flex: none; display: grid; place-items: center; position: relative; }
.item img { width: 64px; height: 64px; }
/* ×N count on a case thumbnail (home battles, the lobby and the create summary) */
.xn, .item__n {
  position: absolute; right: -2px; bottom: 2px; min-width: 24px; height: 18px; padding: 0 5px 1px; display: grid; place-items: center;
  font-family: "Skranji", sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .3px; color: var(--white);
  isolation: isolate; background: #50768A;   /* the rim: frost at half strength over the badge face, kept solid */
  clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
}
.xn::before, .item__n::before {   /* face inset 1px on every side, chamfers included (4 - 0.59 = 3.41px cut) */
  content: ""; position: absolute; inset: 1px; z-index: -1; background: #121821;
  clip-path: polygon(3.41px 0, calc(100% - 3.41px) 0, 100% 3.41px, 100% calc(100% - 3.41px), calc(100% - 3.41px) 100%, 3.41px 100%, 0 calc(100% - 3.41px), 0 3.41px);
}
.more { font-size: 14px; color: var(--gold); text-transform: uppercase; }
.battle__side { width: 239px; flex: none; padding-left: 25px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.battle__unboxed { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; }
.battle__unboxed img { width: 16px; height: 17px; }
.battle__unboxed span { font-family: "Skranji"; font-weight: 700; font-size: 13px; letter-spacing: 1.04px; }
.btn--view {
  height: 44px; padding: 0 14px 2px; gap: 16px; color: var(--lilac);
  --face: linear-gradient(0deg, var(--view-btn) 0%, var(--view-btn) 100%);
}
.btn--view .ic { width: 23px; height: 23px; }

/* bets: tabs use frost for the active state */
.bets { margin-top: 56px; display: flex; flex-direction: column; align-items: center; }
.bets__tabs { display: flex; gap: 8px; }
.bets__tabs .btn[aria-selected="true"] {
  color: var(--lilac-light); --rim: rgba(var(--lilac-rgb), .75);
  --face: linear-gradient(rgba(var(--lilac-rgb), .2) 0%, rgba(var(--lilac-rgb), .04) 100%), var(--raised);
  --glow: inset 0 0 16px rgba(var(--lilac-rgb), .22);
  text-shadow: 0 0 10px rgba(var(--lilac-rgb), .45);
}
.bets__rule { width: 720px; max-width: 100%; height: 2px; margin: 16px 0 36px; background: linear-gradient(90deg, rgba(150,161,182,0), rgba(150,161,182,.08) 50%, rgba(150,161,182,0)); }
.btable { width: 100%; display: flex; flex-direction: column; gap: 10px; }
/* columns: Gamemode | Player | Time | Bet Amount | Multi | Payout (Time and Bet Amount only on wide screens, like the kit) */
.brow { display: grid; grid-template-columns: 264px minmax(0, 1fr) 192px 219px 195px 221px; align-items: center; }
.brow--head { height: 22px; font-family: "Skranji"; font-size: 16px; letter-spacing: .64px; color: var(--muted); }
.brow--head > :first-child { padding-left: 20px; }
.brow--head > :nth-child(5) { padding-left: 17px; }
.brow--head > :last-child { text-align: right; padding-right: 20px; }
.brows {
  display: flex; flex-direction: column; gap: 12px;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}
.bet { height: 56px; --c: 11px; }
.bet:nth-child(even) { --face: linear-gradient(#283142 0%, #232A39 100%); --bt: rgba(var(--hi), .17); --bb: rgba(var(--lo), .46); }
.bet__game { display: flex; align-items: center; gap: 12px; padding-left: 17px; font-size: 16px; color: var(--gold); text-transform: uppercase; }
.bet__gi {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center; color: var(--gold);
  background: linear-gradient(#2B333F, #212832); box-shadow: inset 0 2px 0 rgba(var(--hi), .6), inset 0 -2px 0 rgba(var(--lo), .7);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
}
.bet__gi .ic { width: 19px; height: 19px; }
.bet__player { display: flex; align-items: center; gap: 8px; }
.bet__name { font-size: 16px; letter-spacing: 1.28px; color: var(--player); text-shadow: 0 0 8px rgba(var(--player-glow), .36); text-transform: uppercase; }
.bet__time { font-family: "Skranji"; font-size: 15px; color: var(--muted); letter-spacing: .6px; }
.bet__amt, .bet__pay { display: flex; align-items: center; gap: 8px; }
.bet__amt img, .bet__pay img { width: 16px; height: 17px; }
.num { font-family: "Skranji"; font-weight: 700; font-size: 16px; letter-spacing: 1.28px; }
.bet__multi { font-family: "Skranji"; font-weight: 700; font-size: 16px; letter-spacing: .64px; color: var(--muted); padding-left: 17px; }
.bet__multi.win { color: var(--green); }
.bet__pay { justify-content: flex-end; padding-right: 24px; }
.bet__pay.zero { filter: grayscale(1); opacity: .5; }
.race__prize .ember, .ember { background: var(--ember); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* how to play: four steps in one row, each numbered with a faceted bronze lozenge riding the top edge */
.howto { margin-top: 64px; }
.howto > .h-gold { margin-bottom: 36px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.step { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 22px 26px; }
/* lozenge: four bevel facets (one quadrant each, toned by facet normal against the top-left light) around a face
   inset by the bevel along the normals (half-diagonal shrinks by bevel x sqrt 2) */
.step__n {
  position: absolute; top: -18px; left: 50%; width: 36px; height: 36px; margin-left: -18px; display: grid; place-items: center;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: conic-gradient(var(--bz1) 0 90deg, var(--bz4) 90deg 180deg, var(--bz3) 180deg 270deg, var(--bz0) 270deg 360deg);
}
.step__n::before { content: ""; position: absolute; inset: 4.95px; background: var(--bz2); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.step__n span { position: relative; font-size: 15px; line-height: 1; padding-bottom: 2px; color: #4A300C; text-shadow: 0 1px 0 rgba(253, 228, 196, .55); }
.step__art { width: 100%; height: 132px; display: grid; place-items: center; margin-bottom: 14px; }
.step__img { width: 100%; height: 132px; object-fit: contain; }
.step__title { font-size: 20px; line-height: 26px; color: var(--gold); text-transform: uppercase; }
.step__text { margin-top: 6px; font-size: 13px; line-height: 18px; color: var(--muted); text-transform: uppercase; }

/* footer: brand on the left, link columns on the right */
.footer {
  position: relative; border-top: 4px solid var(--header);
  background: url("assets/3d/bg-footer.webp") center bottom / cover no-repeat,
    url("assets/img/footer-hall.svg") 50% 100% / 566px 332px no-repeat,
    linear-gradient(rgba(var(--footer-a), 0) 19.03%, rgba(var(--footer-b), .24) 100%), linear-gradient(rgba(29,36,47,0) 0%, var(--sidebar) 100%);
  box-shadow: inset 0 -6px 0 var(--header-edge);
}
.footer__in {
  max-width: 1640px; margin: 0 auto; padding: 44px var(--pad) 76px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 40px 56px;
}
.footer__brand { width: 340px; flex: none; display: flex; flex-direction: column; align-items: flex-start; }
.footer__lockup { display: flex; align-items: center; gap: 14px; }
.footer__lockup .mark { width: 64px; height: 64px; }
.footer__lockup .word { width: 192px; height: 32px; }
.footer__legal { margin-top: 18px; font-family: "Skranji"; font-size: 12px; line-height: 17px; letter-spacing: .52px; text-shadow: 0 2px 0 rgba(0,0,0,.24); }
.footer__mail { display: flex; align-items: center; gap: 9px; margin-top: 12px; font-family: "Skranji"; font-size: 13px; letter-spacing: .52px; text-shadow: 0 2px 0 rgba(0,0,0,.24); }
.footer__mail .ic { width: 16px; height: 16px; }
.footer__social { display: flex; gap: 9px; margin-top: 16px; }
.footer__social .btn--sq { width: 32px; height: 32px; }
.footer__cols { display: flex; flex-wrap: wrap; gap: 32px 48px; padding-top: 8px; }
.fcol { display: flex; flex-direction: column; gap: 14px; }
.fcol h3 { font-size: 12px; font-weight: 600; letter-spacing: .8px; color: var(--gold); text-transform: uppercase; }
.fcol h3.t-green { color: var(--green); }
.fcol a { display: flex; align-items: center; gap: 11px; font-size: 14px; letter-spacing: 1.12px; color: var(--lilac); text-transform: uppercase; }
.fcol a .ic { width: 16px; height: 16px; }
.fcol a:hover { color: var(--lilac-light); }
.fcol a[aria-current="page"] { color: var(--gold); }

/* labelled placeholders (only used if an art file is missing) */
.ph {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1px dashed rgba(var(--lilac-rgb), .45); text-align: center; padding: 6px;
  background: repeating-linear-gradient(135deg, rgba(var(--lilac-rgb), .07) 0 6px, rgba(var(--lilac-rgb), 0) 6px 12px), rgba(19, 26, 36, .55);
  font-family: "Skranji"; font-size: 11px; line-height: 13px; letter-spacing: .4px; color: var(--lilac);
}
.ph b { font-weight: 400; font-family: "GoldenSmile"; font-size: 10px; letter-spacing: 1px; opacity: .8; }

/* ---------------------------------------------------------------- 3D art slots
   <img data-3d="assets/3d/x.webp"> starts on its SVG stand-in; assets/js/site.js swaps in the render once it has
   loaded, so a missing file never shows a broken image. */
img[data-3d] { object-fit: contain; }

/* ---------------------------------------------------------------- loader
   On the first page of a visit and on a reload. site.js takes the count over from the CSS one (.is-live: the number
   follows --pct, the bar --p), runs it up while the page loads, and fades the loader once the page has loaded and
   it has been up at least 700ms (.is-done). Whatever happens to the load or the script, it is gone at 4s. */
@property --pct { syntax: "<integer>"; inherits: false; initial-value: 0; }
.loader {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; pointer-events: none;
  background: url("assets/3d/bg-loader.webp") center / cover no-repeat,
    radial-gradient(55% 45% at 50% 45%, rgba(var(--lilac-rgb), .07) 0%, rgba(var(--lilac-rgb), 0) 100%), var(--page);
  animation: loader-out .3s ease 4s forwards;   /* the safety net */
}
/* the finish: the bar lands on 100%, its edge flares, then the screen lets go over ~.6s while the mark and the
   count lift a few pixels into it (a breath out, not a cut) */
.loader.is-done { animation: loader-done .6s cubic-bezier(.4, 0, .2, 1) .16s forwards; }
.loader.is-done .loader__in { transform: translateY(-6px); transition: transform .8s cubic-bezier(.2, .7, .2, 1) .1s; }
.loader.is-live .loader__pct { animation: none; }
.loader.is-live .loader__bar { animation: none; --vbl: var(--p, 0); transition: --vbl .28s cubic-bezier(.2, .7, .3, 1); }
@keyframes loader-done { to { opacity: 0; visibility: hidden; } }
.loader__in { display: flex; flex-direction: column; align-items: center; }
.loader__mark { width: 92px; height: 92px; }
.loader__pct { margin-top: 14px; font-size: 32px; line-height: 1; color: var(--gold); text-shadow: 0 2px 0 rgba(0,0,0,.3);
  counter-reset: pct var(--pct); animation: loader-count .75s cubic-bezier(.3, .7, .4, 1) forwards; }
.loader__pct::after { content: counter(pct) "%"; }
.loader__txt { margin-top: 8px; font-size: 13px; letter-spacing: 1.6px; color: var(--muted); text-transform: uppercase; }
/* the bar: a carved frost channel (shadow off the top lip, light on the bottom one, a rune notch every tenth), the
   frost bands with a white-hot point, and a soft frost glow that rides with the point, outside the channel. The
   element is the glow's canvas (24px of room each side, 12px above and below); ::before is the channel, ::after the
   fill. --vbl (0..1) is the progress: the CSS run on its own, then site.js's --p. */
@property --vbl { syntax: "<number>"; inherits: true; initial-value: 0; }
.loader__bar {
  --w: 184px; --vbl: 0;
  position: relative; display: block; width: calc(var(--w) + 48px); height: 34px; margin-top: 4px;
  background: radial-gradient(closest-side, rgba(var(--lilac-rgb), .5) 0%, rgba(var(--lilac-rgb), .16) 55%, rgba(var(--lilac-rgb), 0) 100%)
    calc(24px + var(--vbl) * var(--w) - 36px) 50% / 72px 34px no-repeat;
  animation: loader-run .75s cubic-bezier(.3, .7, .4, 1) forwards;
  transition: filter .3s ease;
}
.loader__bar::before, .loader__bar::after {
  content: ""; position: absolute; top: 12px; left: 24px; height: 10px;
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, calc(100% - 5px) 100%, 5px 100%, 0 5px);
}
.loader__bar::before {
  width: var(--w);
  background:
    linear-gradient(180deg, rgba(5, 8, 12, .6) 0, rgba(5, 8, 12, 0) 3px),
    linear-gradient(0deg, rgba(var(--hi), .6) 0 1px, rgba(var(--hi), 0) 1px),
    repeating-linear-gradient(90deg, rgba(10, 14, 20, 0) 0 calc(10% - 1px), rgba(10, 14, 20, .5) calc(10% - 1px) 10%),
    var(--track);
}
.loader__bar::after {
  width: max(10px, calc(var(--vbl) * var(--w)));
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0) calc(100% - 7px), rgba(255, 255, 255, .95) calc(100% - 5px)),
    linear-gradient(90deg, color-mix(in srgb, var(--lilac-lighter) 0%, transparent) calc(100% - 30px), color-mix(in srgb, var(--lilac-lighter) 70%, transparent) 100%),
    linear-gradient(180deg, rgba(5, 8, 12, .45) 0, rgba(5, 8, 12, 0) 3px),
    linear-gradient(180deg, var(--lilac-light) 0 30%, var(--lilac) 30% 70%, var(--lilac-deep) 70% 100%);
}
.loader.is-done .loader__bar { filter: brightness(1.3); }
@keyframes loader-count { to { --pct: 100; } }
@keyframes loader-run { to { --vbl: 1; } }
@keyframes loader-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .loader { display: none; } }

/* ---------------------------------------------------------------- motion
   Falling coins (.coin-rain, in the Rain Pot card and the chat's rain): each <i> is a full-height lane at --x whose
   coin (::before, --w square) drops through the card in --d, started --t in, at opacity --o and blur --b. They
   tumble on the coin's spin strip (72 frames, one even turn) once site.js has seen it load (html.has-coin-spin), and the
   badge coins (.coin-spin) turn on the same strip; until then the still render shows. Rolling numbers (.odo) are
   built by site.js. Without motion (reduced) the coins stay out and the still coin stands. */
.coin-rain { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.coin-rain i { display: none; }
.rain > :not(.coin-rain) { position: relative; z-index: 1; }
.coin-spin { position: relative; display: block; flex: none; }
.coin-spin img { width: 100%; height: 100%; object-fit: contain; }
.rain__badge .coin-spin { width: 50px; height: 50px; margin-top: -2px; }
.rain__badge .coin-spin img { width: 100%; height: 100%; margin: 0; }
.odo { display: inline-flex; vertical-align: top; height: 1lh; overflow: hidden; line-height: 1.25; }
.odo__col { display: flex; flex-direction: column; transform: translateY(calc(var(--i, 0) * -1lh)); transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
.odo__col > span { height: 1lh; text-align: center; }
.odo__col.is-snap { transition: none; }
/* the rain pot's number in the markup is only a stand-in: hidden until site.js 11 shows the round's start and counts up */
[data-rain-pot]:not(:has(> .odo)) { visibility: hidden; }
/* the ember gradient goes on each digit: the rolling columns would break one text clip across the whole number */
.ember:has(> .odo) { background: none; color: inherit; }
.ember .odo > span:not(.odo__col), .ember .odo__col > span { background: var(--ember); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* the rain, at the top of the chat: the spinning coin on its socket, the timer and the pot, and Join (site.js runs
   the timer, the pot and the Join demo). A light plate in the Rain Pot's blue, coins falling behind its contents */
.crain { position: relative; isolation: isolate; flex: none; display: flex; align-items: center; gap: 10px; margin: 10px 12px 0; padding: 9px 10px 10px; }
.crain > .plate {
  --c: 10px; --n: 4px; --bt: rgba(var(--hi), .24); --bb: rgba(var(--lo), .56);
  --face: radial-gradient(40% 130% at 12% 50%, rgba(var(--blue-2-rgb), .22) 0%, rgba(var(--blue-2-rgb), 0) 100%),
    linear-gradient(0deg, rgba(var(--blue-2-rgb), .24) 0%, rgba(var(--blue-2-rgb), 0) 100%), var(--card);
}
.crain > .coin-rain { inset: 3px; }
.crain > :not(.plate, .coin-rain) { position: relative; z-index: 1; }
.crain__tile {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(60% 60% at 50% 40%, rgba(var(--gold-rgb), .18), rgba(var(--gold-rgb), 0)), var(--raised);
  box-shadow: inset 0 3px 0 rgba(var(--hi), .5), inset 0 -4px 0 rgba(var(--lo), .7), 0 0 0 2px var(--rim-iron);
}
.crain__tile .coin-spin { width: 27px; height: 27px; }
.crain__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.crain__title { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 18px; font-weight: 400; color: var(--blue); letter-spacing: 1.12px; text-transform: uppercase; }
.crain__timer {
  padding: 0 6px 1px; background: var(--hero-dark); font-size: 12px; line-height: 16px; letter-spacing: .8px; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(var(--lo), .6), inset 0 -1px 0 rgba(var(--hi), .3);
  clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
}
.crain__pot { display: flex; align-items: center; gap: 6px; }
.crain__pot img { width: 16px; height: 17px; }
.crain__pot b { font-family: "Skranji"; font-weight: 700; font-size: 18px; line-height: 20px; letter-spacing: .5px; }
.crain__join { height: 32px; padding: 0 14px 3px; --c: 7px; }
.crain__join[aria-disabled="true"] { cursor: default; filter: none; color: var(--muted); --rim: var(--rim-iron); --bt: rgba(var(--hi), .36); --bb: rgba(var(--lo), .56); --face: var(--raised); --glow: none; }
/* Tip (site.js 11, rain.tip): a plain stone button under Join, the pair stacked at one width and set close as one
   block (owner: "a tip button underneath attached"), so the title, the timer and the pot keep the room beside them;
   under the row a small panel with the amount field (the site's recessed .minput), quick chips and the balance.
   Still: it opens and closes without motion. */
.crain__acts { flex: none; display: flex; flex-direction: column; align-items: stretch; gap: 3px; width: 74px; margin: -3px 0 -4px; }
.crain__acts > .btn { width: 100%; height: 28px; padding: 0 8px 3px; justify-content: center; --c: 6px; }
.crain__tip { height: 32px; padding: 0 12px 3px; --c: 7px; color: var(--gold); }
.crain__tip[aria-expanded="true"] { --rim: rgba(var(--gold-rgb), .5); }
.ctip { position: relative; isolation: isolate; flex: none; margin: 6px 12px 0; padding: 10px 10px 8px; display: flex; flex-direction: column; gap: 8px; }
.ctip[hidden] { display: none; }
.ctip > .plate {
  --c: 10px; --n: 4px; --bt: rgba(var(--hi), .24); --bb: rgba(var(--lo), .56);
  --face: linear-gradient(0deg, rgba(var(--gold-rgb), .06) 0%, rgba(var(--gold-rgb), 0) 100%), var(--card);
}
.ctip__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ctip__t { font-size: 13px; line-height: 18px; letter-spacing: 1.04px; color: var(--gold); text-transform: uppercase; }
.ctip__x { width: 26px; height: 26px; --c: 6px; }
.ctip__x .ic { width: 13px; height: 13px; }
.ctip .minput {
  --c: 9px; --n: 4px; --rim: var(--rim-iron); --bt: rgba(5, 8, 12, .5); --bb: rgba(var(--hi), .34);
  --face: linear-gradient(180deg, #19202B 0%, #1D2531 100%);
  height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 4px 0 10px;
}
.ctip .minput:focus-within { --rim: rgba(var(--lilac-rgb), .8); --glow: inset 0 0 12px rgba(var(--lilac-rgb), .18); }
.ctip .minput > img { width: 16px; height: 17px; flex: none; }
.ctip .minput input {
  flex: 1; min-width: 0; height: 100%; padding: 0 0 2px; border: 0; background: transparent; outline: 0; color: var(--white);
  font-family: "Skranji", sans-serif; font-size: 15px; letter-spacing: .5px;
}
.ctip .minput input::placeholder { color: var(--muted); opacity: .62; }
.ctip .minput .btn { height: 32px; padding: 0 14px 3px; --c: 7px; }
.ctip__chips { display: flex; gap: 6px; }
.ctip__chips .chip { flex: 1; min-width: 0; height: 28px; padding: 2px 6px 5px; font-size: 13px; --c: 6px; color: var(--gold); --rim: rgba(var(--gold-rgb), .28);
  --face: linear-gradient(180deg, rgba(var(--gold-rgb), .12), rgba(var(--gold-rgb), .02)), var(--hero-dark); }
.ctip__chips .chip:hover { filter: brightness(1.12); }
.ctip__chips .chip:focus-visible { outline: 2px solid var(--lilac-light); outline-offset: 2px; }
.ctip__foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; font-size: 12px; line-height: 16px; color: var(--muted); }
.ctip__foot > span { white-space: nowrap; }
.ctip__foot b { color: var(--white); font-weight: 400; font-variant-numeric: tabular-nums; }
.ctip .fld__msg { min-height: 16px; font-size: 12px; line-height: 16px; color: var(--muted); }
.ctip .fld__msg:empty { display: none; }
.ctip .fld__msg.is-err { color: var(--level-high); }
.ctip .fld__msg.is-ok { color: var(--green); }
/* "<name> tipped N coins to the rain": a system line in the feed, no avatar row */
.msg--sys { margin-top: 0; --face: linear-gradient(90deg, rgba(var(--gold-rgb), .08), rgba(var(--gold-rgb), 0) 70%), var(--chat-card); }
.msg--sys .msg__body { display: flex; align-items: center; gap: 8px; padding: 9px 12px 10px; font-size: 13px; line-height: 18px; color: var(--muted); }
.msg--sys .msg__body > img { width: 16px; height: 17px; flex: none; }
.msg--sys .msg__body b { color: var(--gold); font-weight: 400; }

@media (prefers-reduced-motion: no-preference) {
  .coin-rain i {
    display: block; position: absolute; top: 0; bottom: 0; left: var(--x); width: var(--w); margin-left: calc(var(--w) / -2);
    animation: coin-fall var(--d) linear var(--t) infinite;
    filter: blur(var(--b)) brightness(1.3) saturate(1.1);   /* on the lane, after its clip: the frame is blurred, never its neighbours (fps pass) */
  }
  .coin-rain i::before {
    content: ""; position: absolute; top: 0; left: 0; width: var(--w); height: var(--w);
    background: image-set(url("assets/3d/coin@1x.webp") 1x, url("assets/3d/coin.webp") 2x) 50% 50% / contain no-repeat;
    opacity: calc(var(--o) * 1.25);
    /* no squash stand-in: the still coin just falls until the spin strip is in (and for good if it fails) */
  }
  /* the tumble slides the whole strip under the lane's clip (transform, like .coin-spin), not its background-position:
     same frames, but no repaint of each coin every frame (fps pass, 27 Nov 2026) */
  html.has-coin-spin .coin-rain i { overflow: hidden; }
  html.has-coin-spin .coin-rain i::before {
    width: calc(var(--w) * 72);
    background: image-set(url("assets/motion/coin-spin-72@1x.webp") 1x, url("assets/motion/coin-spin-72.webp") 2x) 0 0 / 100% 100% no-repeat;
    animation: coin-tumble var(--d) steps(72) var(--t) infinite;
  }
  html.has-coin-spin .coin-spin { overflow: hidden; }
  html.has-coin-spin .coin-spin img { visibility: hidden; }
  html.has-coin-spin .coin-spin::before {
    content: ""; position: absolute; top: 0; left: 0; width: 7200%; height: 100%;
    background: image-set(url("assets/motion/coin-spin-72@1x.webp") 1x, url("assets/motion/coin-spin-72.webp") 2x) 0 0 / 100% 100% no-repeat;
    animation: coin-turn 4s steps(72) infinite;
  }
  /* the race's glint runs down the prize and then the name every few seconds, as if off the hoard (the card on
     phones, the bar's badge above them) */
  /* one pass (the old 4.4s loop's moving 21%), run again every 4.4s by site.js glints(): between passes nothing ticks
     (fps pass, 27 Nov 2026; the loop restyled these every frame while the glint sat off the text) */
  .race__prize .ember, .race__name, .bar__race-amount .ember, .bar__race-name { animation: race-glint .924s 1.2s cubic-bezier(.45, 0, .3, 1) both; }
  .race__name, .bar__race-name { animation-delay: 1.4s; }
  /* hover on a game card: a band of light crosses the art (under the badge) */
  .game__card::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    clip-path: polygon(6.6116% 0, 93.3884% 0, 100% 4.9383%, 100% 95.0617%, 93.3884% 100%, 6.6116% 100%, 0 95.0617%, 0 4.9383%);
    background: linear-gradient(105deg, rgba(224, 245, 255, 0) 42%, rgba(224, 245, 255, .22) 50%, rgba(224, 245, 255, 0) 58%) 160% 0 / 250% 100% no-repeat;
  }
  .game:hover .game__card::after { background-position: -60% 0; transition: background-position .75s cubic-bezier(.3, .6, .2, 1); }
}
@keyframes coin-fall { from { transform: translateY(calc(-1 * var(--w) - 4px)); } to { transform: translateY(calc(100% + 4px)); } }
@keyframes coin-tumble { to { transform: translateX(-100%); } }
@keyframes coin-turn { to { transform: translateX(-100%); } }
@keyframes race-glint { 0% { background-position: -200% 0, 0 0; } 100% { background-position: 300% 0, 0 0; } }
/* the race hoard's own moment: its rendered loop over the still (site.js loop(); frame 0 is the still) */
.race__art { position: relative; }
.race__art .race__loop { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.race.has-loop .race__loop { opacity: 1; }
.race.has-loop .race__img { visibility: hidden; }
.bar__race-art .race__loop { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.bar__race.has-loop .race__loop { opacity: 1; }
.bar__race.has-loop .bar__race-art img { visibility: hidden; }
.race__prize .ember, .race__name, .bar__race-amount .ember, .bar__race-name {
  --glint: linear-gradient(100deg, rgba(255, 252, 244, 0) 28%, rgba(255, 252, 244, .6) 43%, #FFFCF4 50%, rgba(255, 252, 244, .6) 57%, rgba(255, 252, 244, 0) 72%) -200% 0 / 42% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.race__prize .ember, .bar__race-amount .ember { background: var(--glint), var(--ember); -webkit-background-clip: text; background-clip: text; }
.race__name, .bar__race-name { background: var(--glint), linear-gradient(var(--gold) 0 0); -webkit-background-clip: text; background-clip: text; }

/* ---------------------------------------------------------------- page-to-page line
   The loader above shows on the first page of a visit and on a reload. Every later page in the same tab gets this
   frost line instead: html.is-nav is set before the loader is parsed (the script at the top of <body>), and site.js
   runs the line while the page loads and finishes it once it has, about half a second. It also starts on the page
   being left, as soon as an internal link is clicked. If no script runs, it fades on its own after 3s. */
html.is-nav .loader { display: none; }
.navline {
  position: fixed; top: 0; left: 0; z-index: 51; width: 100%; height: 3px; pointer-events: none;
  /* frost, fading in from far behind the head like a trail, with a light top edge */
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, .45) 100%) 0 0 / 100% 1px no-repeat,
    linear-gradient(90deg, rgba(var(--lilac-rgb), 0) 0%, rgba(var(--lilac-rgb), .5) 45%, var(--lilac) 82%, var(--lilac-lighter) 100%);
  transform: translateX(-100%); opacity: 0;
}
.navline::after {   /* the head: a white-hot point in a soft frost glow that spills below the line */
  content: ""; position: absolute; top: -6px; right: -26px; width: 120px; height: 16px;
  background:
    radial-gradient(closest-side at 78% 50%, rgba(255, 255, 255, .95) 0, rgba(255, 255, 255, 0) 24%),
    radial-gradient(closest-side at 72% 50%, rgba(var(--lilac-rgb), .7) 0, rgba(var(--lilac-rgb), .22) 55%, rgba(var(--lilac-rgb), 0) 100%);
}
html.is-nav .navline { opacity: 1; transform: translateX(-72%); animation: navline-gone 300ms ease 3s forwards; }
@keyframes navline-gone { to { opacity: 0; } }

/* ---------------------------------------------------------------- no old art, no half-drawn page
   (owner, 2026-11-26: "an old version renders for a mini second first")
   1. A 3D render's flat SVG stand-in stays hidden while site.js fetches the render (img[data-3d] before the script
      has looked at it, and data-3d-wait while it fetches): the render appears in its place, never the old art first.
      With no render the stand-in shows at once; with no script (or a render still loading) it shows after 2.5s anyway.
   2. Page to page (html.is-nav: no loader) the page is held back until its fonts are in (site.js adds html.vb-ready,
      at most 700ms after it runs), then fades in. Without the script there is no is-nav, so nothing is held; if the
      script stalls, the page shows at 1.5s anyway. Reduced motion: no fade. */
img[data-3d]:not([data-art]), img[data-3d][data-3d-wait] { visibility: hidden; animation: vb-show 0s linear 2.5s forwards; }
@keyframes vb-show { to { visibility: visible; } }
html.is-nav:not(.vb-ready) .app { opacity: 0; animation: vb-show-page 0s linear 1.5s forwards; }
@keyframes vb-show-page { to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) { html.is-nav .app { transition: opacity .22s cubic-bezier(.2, .7, .3, 1); } }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1699px) {
  .brow { grid-template-columns: 264px minmax(0, 1fr) 221px 221px; }
  .brow > :nth-child(3), .brow > :nth-child(4) { display: none; }
}
/* under 1600px the bar keeps Rewards, the race, sound, the menu and Login; the promo chips and the socials move
   into the menu (and from 1180px down, with the menu, into the drawer's links) */
@media (max-width: 1599px) {
  .bar__tags, .bar__socials { display: none; }
  .menu > a.menu__narrow, .menu > .menu__socials { display: flex; }
  .menu > .menu__sep { display: block; }
}
/* the sidebar becomes a drawer (header button), with the menu links folded into it */
@media (max-width: 1180px) {
  :root { --col-x: 0px; }
  .side {
    z-index: 30; overflow-y: auto; overscroll-behavior: contain; transform: translateX(-100%); visibility: hidden;
    transition: transform .22s ease, visibility 0s linear .22s;
  }
  body.side-open { overflow: hidden; }
  body.side-open .side { transform: none; visibility: visible; transition: transform .22s ease; box-shadow: 16px 0 40px rgba(4, 7, 12, .55); }
  /* the closed drawer is only moved off-screen: its chat rain holds still until it opens (9 loops ran unseen on every page) */
  body:not(.side-open) .side .coin-rain i, body:not(.side-open) .side .coin-rain i::before,
  body:not(.side-open) .side .coin-spin::before { animation-play-state: paused; }
  .side-scrim { position: fixed; inset: 0; z-index: 29; background: rgba(7, 10, 15, .62); }
  .side-scrim[hidden] { display: none; }
  .side__head { height: 140px; }
  .side__logo img { width: 138px; height: 92px; }
  .side__close { display: grid; }
  .sb--chat, .sbc { flex: none; }
  .sbc { height: 504px; }   /* the drawer scrolls; this keeps three messages in view */
  .sb-links { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 12px; box-shadow: inset 0 2px 0 var(--rule); }
  .sb-links a { color: var(--muted); }
  .sb-links a.sb-links__race { color: var(--gold); }
  .sbg a { height: 40px; }   /* a finger's worth (the sidebar's 32px rows are for the mouse) */
  .bar__side { display: inline-flex; }
  .bar__logo { display: block; margin-right: 6px; }
  .bar__more { display: none; }
}
@media (max-width: 1180px) and (prefers-reduced-motion: reduce) { .side, body.side-open .side { transition: none; } }
@media (max-width: 900px) {
  .bar__race { display: none; }   /* the race card under the home's games and the drawer's 1M Race link carry it */
  .race--m { display: grid; margin-top: 28px; }
  .hero { padding: 32px 40px;
    --face:
      radial-gradient(60% 150% at -8% 125%, rgba(var(--gold-rgb), .2) 0%, rgba(var(--gold-rgb), 0) 100%),
      linear-gradient(90deg, rgba(17, 23, 32, .84) 0%, rgba(17, 23, 32, .55) 45%, rgba(17, 23, 32, 0) 78%),
      url("assets/3d/bg-hero.webp") right calc(-1 * var(--ship)) center / cover no-repeat,
      url("assets/img/hero-fjord.svg") right calc(-1 * var(--ship)) center / auto 100% no-repeat,
      linear-gradient(90deg, var(--card) 30%, var(--hero-dark) 48%, var(--hero-c) 100%); }
  .status { grid-template-columns: 1fr; }
  .brow { grid-template-columns: 1.2fr 1.4fr .8fr 1fr; }
  .battle { height: auto; flex-wrap: wrap; padding: 14px 16px; gap: 12px; }
  .battle__main { flex-basis: 100%; padding-top: 0; }
  .battle__items { flex: 1; width: auto; height: 72px; }
  .battle__side { width: auto; padding-left: 0; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
  .footer__in { flex-direction: column; }
}
@media (max-width: 600px) {
  :root { --pad: 16px; --bar-h: 60px; }
  .bar { gap: 8px; padding: 0 12px 6px; }
  .bar__logo { margin-right: auto; }
  .bar__logo img { width: 112px; height: 22px; }
  .bar__spacer, .bar__rewards .lbl { display: none; }
  .bar__rewards { width: 44px; padding: 0 0 4px; }
  .bar .btn--gold { padding: 0 16px 4px; }
  .vbanner { margin-top: 12px; padding: 10px 14px 12px 12px; font-size: 14px; line-height: 20px; gap: 10px; }
  .content { padding-top: 16px; padding-bottom: 56px; }
  /* phones: the scene becomes a banner along the top (166px tall, so a 5:1 render shows its right ~43%, where the
     subject is) and fades into the face under the copy; the note rides the faded foot of the scene, so neither it
     nor the title sits on the subject */
  .hero { min-height: 0; align-items: stretch; padding: 134px 20px 22px; --c: 14px;
    --face:
      radial-gradient(80% 50% at -10% 100%, rgba(var(--gold-rgb), .16) 0%, rgba(var(--gold-rgb), 0) 100%),
      linear-gradient(180deg, rgba(33, 40, 50, 0) 104px, var(--card) 166px),
      url("assets/3d/bg-hero.webp") right top / auto 166px no-repeat,
      url("assets/img/hero-fjord.svg") right top / auto 166px no-repeat,
      linear-gradient(180deg, var(--hero-c) 0, var(--card) 166px); }
  .hero__copy { gap: 12px; }
  .hero__note { font-size: 11px; line-height: 14px; }
  .hero__title span:first-child { font-size: 28px; line-height: 33px; }
  .hero__title span:last-child { font-size: 17px; line-height: 22px; }
  .status { gap: 16px; margin-top: 16px; }
  .rain, .race { grid-template-columns: 60px minmax(0, 1fr); column-gap: 14px; min-height: 0; padding: 16px 16px 18px 14px; }
  .rain { --face:
      url("assets/img/rain-drift.svg") left top / 88px auto no-repeat,
      radial-gradient(60% 50% at 14% 26%, rgba(var(--blue-2-rgb), .22) 0%, rgba(var(--blue-2-rgb), 0) 100%),
      linear-gradient(0deg, rgba(var(--blue-2-rgb), .26) 0%, rgba(var(--blue-2-rgb), 0) 100%), var(--card); }
  .rain__badge { width: 58px; height: 56px; }
  .rain__badge img { width: 36px; height: 38px; }
  .race__art { width: 76px; height: 76px; margin: -6px -8px; }
  .race__img { width: 76px; height: 76px; }
  .rain__title { font-size: 24px; line-height: 32px; }
  .race__prize { font-size: 23px; line-height: 32px; }
  .race__name { font-size: 17px; line-height: 32px; }
  .chip { height: 29px; font-size: 14px; padding: 2px 10px 6px; }
  .stat__sub { font-size: 12px; line-height: 16px; }
  .stat__tray { grid-column: 1 / -1; margin-top: 14px; }
  .pot__amt { font-size: 24px; }
  .games { margin-top: 26px; }
  .games__head { margin-bottom: 10px; }
  .race--m { margin-top: 24px; }
  .h-gold { font-size: 23px; }
  .h-white { font-size: 19px; line-height: 26px; text-align: center; }
  .h-gold::before, .h-gold::after, .h-div::before, .h-div::after { width: 26px; }
  .games__head h2 .ic { width: 22px; height: 22px; }
  .rewards { margin-top: 40px; }
  .pay { margin-top: 48px; }
  .pay > .h-div { padding: 0 16px; }
  .battles { margin-top: 44px; }
  .battles__head h2 .ic { width: 24px; height: 24px; }
  .battles__head .h-div::after { display: none; }
  .battle__items { gap: 14px; padding: 0 12px; }
  .battle__mode { font-size: 12px; }
  .slot { width: 38px; height: 38px; } .slot > * { width: 34px !important; height: 34px !important; }
  .battle__slots { gap: 6px; }
  .vs { width: 24px; height: 24px; font-size: 10px; }
  .bets { margin-top: 44px; }
  .bets__tabs .btn { padding: 0 12px 4px; font-size: 12px; }
  .brow { grid-template-columns: 1.25fr 1.5fr 1fr; }
  .brow > :nth-child(5) { display: none; }
  .brow--head > :first-child { padding-left: 12px; }
  .brow--head { font-size: 14px; }
  .bet__game { padding-left: 10px; gap: 8px; font-size: 13px; }
  .bet__game > span:not(.bet__gi) { display: none; }
  .bet__player .avatar, .bet__player .lvl { display: none; }
  .bet__name { font-size: 12px; letter-spacing: .6px; }
  .bet__pay { padding-right: 12px; }
  .howto { margin-top: 52px; }
  .steps { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }
  .footer__brand { width: 100%; }
  .footer__cols { gap: 28px 40px; }
  .fcol { width: calc(50% - 20px); }
  .side { width: min(320px, 88vw); }
}
/* the narrowest phones: the drawer is too slim for two columns of names, so the games list goes back to one */
@media (max-width: 339px) {
  .sbg { grid-template-columns: minmax(0, 1fr); }
}
/* the narrowest phones: the bar keeps the lockup's shield only (cropped from it) and Login its word, so menu,
   Rewards, sound and Login all stay full size */
@media (max-width: 359px) {
  .bar { gap: 6px; padding: 0 10px 6px; }
  .bar__logo img { width: 24px; object-fit: cover; object-position: 0 50%; }
  .bar__login > .ic { display: none; }
  .bar .bar__login { padding: 0 14px 4px; }
}
/* touch: the note's close button gets a finger's worth (40px square); the note grows to hold it */
@media (pointer: coarse) {
  .hero__note { min-height: 40px; padding-right: 0; }
  .hero__note-x { width: 40px; height: 40px; margin: -3px 0 -5px; }
}

/* whole coins (23 Nov 2026): a bet typed with decimals is rounded down when the field is left, and the field's message
   line says so as a note, not an error (the game scripts add .is-hint to their .merr line) */
.merr.is-hint { color: var(--muted); }
.merr.is-hint::before { content: "i"; background: rgba(var(--lilac-rgb), .55); color: #0C1626; font-style: normal; }

/* ---- styled dropdown list (assets/js/site.js): replaces the operating system's white list under every select */
.vsel {
  position: fixed; z-index: 1000; overflow-y: auto; overscroll-behavior: contain; padding: 6px;
  background: var(--dropdown); border: 1px solid rgba(var(--lilac-rgb), .16); border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .04);
  font-family: "Skranji", sans-serif; font-size: 15px; letter-spacing: .5px; color: var(--white); outline: 0;
  scrollbar-width: thin; scrollbar-color: rgba(var(--lilac-rgb), .25) transparent;
  animation: vsel-in .12s ease-out;
}
.vsel.is-up { animation-name: vsel-up; }
@keyframes vsel-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes vsel-up { from { opacity: 0; transform: translateY(4px); } }
.vsel__opt {
  position: relative; padding: 8px 30px 9px 12px; border-radius: 7px; cursor: pointer; line-height: 20px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--chat-name);
}
.vsel__opt.is-active { background: rgba(var(--lilac-rgb), .11); color: var(--white); }
.vsel__opt.is-sel { color: var(--gold); }
.vsel__opt.is-sel::after {
  content: ""; position: absolute; right: 12px; top: 50%; width: 5px; height: 9px; margin-top: -6px;
  border: solid var(--gold); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.vsel__opt.is-dis { opacity: .4; cursor: default; }
.vsel__group { padding: 8px 12px 4px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .vsel { animation: none; } }

/* phones: the drawer's chat reaches the bottom of the screen, so the message box is in view when it opens
   (504px of chat under a 140px logo put it at about 990px on a 740px phone) */
@media (max-width: 600px) {
  .side__head { height: 88px; }
  .side__logo img { width: 96px; height: 64px; }
  .sbc { height: max(320px, calc(100dvh - 236px)); }
}
