@font-face { font-family: "Exo 2"; src: url(/fonts/Exo2.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Orbitron"; src: url(/fonts/Orbitron.woff2) format("woff2"); font-weight: 400 900; font-display: swap; }

/* The game's colours and fonts (client UiKit). Orbitron has no Cyrillic: Russian headings fall through to Exo 2, as in the game. */
:root {
  --ink: #040918; --line: #2d4c8c; --line-hi: #5b86d6; --text: #e8f0ff; --muted: #8a9dc4; --dim: #2a3d66;
  --accent: #3fd6ff; --action: #ff7a1f; --reward: #ffc63a; --ok: #45e58c; --danger: #ff4d5e;
  --fill: rgba(5, 11, 30, 0.86);
  --heading: "Orbitron", "Exo 2", system-ui, sans-serif;
  --body: "Exo 2", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cut: 14px;
  --shape: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  --tabs: 86px;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 12px; }
body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--body); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; padding-bottom: var(--tabs); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4, 9, 24, .78), rgba(4, 9, 24, .62)), url(/img/bg-menu.webp) center / cover no-repeat; }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Frames: a thin line, two corners cut, light brackets on the other two ---------- */
.frame { position: relative; isolation: isolate; }
.frame::before, .frame::after { content: ""; position: absolute; clip-path: var(--shape); }
.frame::before { inset: 0; z-index: -2; background: var(--edge, var(--line)); }
.frame::after { inset: 1.5px; z-index: -1; background: var(--fill); }
.ticks { position: absolute; inset: -1px; pointer-events: none;
  background:
    linear-gradient(var(--line-hi), var(--line-hi)) top right / 26px 2px no-repeat,
    linear-gradient(var(--line-hi), var(--line-hi)) top right / 2px 26px no-repeat,
    linear-gradient(var(--line-hi), var(--line-hi)) bottom left / 26px 2px no-repeat,
    linear-gradient(var(--line-hi), var(--line-hi)) bottom left / 2px 26px no-repeat; }
.label { display: block; font-family: var(--heading); font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.small { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

.btn { --cut: 11px; --edge: var(--accent); --fill: #071426; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 0 26px; font-weight: 800; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; filter: drop-shadow(0 0 7px rgba(63, 214, 255, .55)); transition: transform .12s ease, filter .15s ease; }
.btn:hover { transform: translateY(-2px); filter: drop-shadow(0 0 13px rgba(63, 214, 255, .85)); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn img { width: 24px; height: 24px; }
.btn-action { --edge: var(--action); --fill: linear-gradient(180deg, #2a1206, #190a03); min-height: 60px; padding: 0 34px; font-size: 16px; color: #ffe2bf; text-shadow: 0 0 12px rgba(255, 122, 31, .85); filter: drop-shadow(0 0 10px rgba(255, 122, 31, .7)); }
.btn-action:hover { filter: drop-shadow(0 0 18px rgba(255, 122, 31, 1)); }
.cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.chip { --cut: 6px; --edge: rgba(69, 229, 140, .7); display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 16px; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; color: var(--ok); }
.chip i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: pulse 1.8s ease-in-out infinite; }
.chip.off { --edge: rgba(255, 77, 94, .7); color: var(--danger); }
@keyframes pulse { 50% { opacity: .35; } }
.small-btn { --cut: 6px; min-width: 40px; height: 34px; padding: 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .1em; transition: transform .12s; }
.small-btn:hover { transform: translateY(-1px); --edge: var(--accent); }

.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--heading); font-weight: 800; letter-spacing: .16em; font-size: 14px; }
.brand img { width: 40px; height: 40px; filter: drop-shadow(0 0 8px rgba(255, 150, 40, .5)); }

/* ---------- First screen: the title in the sky, the buttons on the ground ---------- */
.hero { position: relative; display: flex; flex-direction: column; min-height: calc(100svh - var(--tabs)); overflow: hidden; background: var(--ink); }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(4, 9, 24, .55), transparent 22%, transparent 66%, rgba(4, 9, 24, .8) 88%, var(--ink) 100%); }
.hero-corners { position: absolute; inset: 14px; pointer-events: none; opacity: .7;
  background:
    linear-gradient(var(--line-hi), var(--line-hi)) top right / 70px 2px no-repeat,
    linear-gradient(var(--line-hi), var(--line-hi)) top right / 2px 70px no-repeat,
    linear-gradient(var(--line-hi), var(--line-hi)) bottom left / 70px 2px no-repeat,
    linear-gradient(var(--line-hi), var(--line-hi)) bottom left / 2px 70px no-repeat; }
.nav { position: relative; display: flex; align-items: center; gap: 20px; padding: 22px calc(var(--gutter) + 8px) 8px; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.hero-title { position: relative; text-align: center; padding: clamp(0px, 3vh, 34px) 16px 0; }
.wordmark { font-family: var(--heading); font-weight: 900; font-size: clamp(42px, 9vw, 150px); line-height: .96; letter-spacing: .05em; color: #fff; text-shadow: 0 0 22px rgba(63, 214, 255, .75), 0 0 70px rgba(63, 214, 255, .35); }
.wordmark small { display: block; font-size: .3em; font-weight: 600; letter-spacing: .9em; padding-left: .9em; margin-top: .6em; color: var(--accent); text-shadow: 0 0 14px rgba(63, 214, 255, .8); }
.hero-bottom { position: relative; margin-top: auto; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px clamp(20px, 5vw, 64px); padding: 22px calc(var(--gutter) + 8px) clamp(18px, 4vh, 38px); }
.pitch { max-width: 520px; }
.pitch p { margin-bottom: 18px; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.4; text-shadow: 0 2px 12px #000; }
.stats { display: flex; gap: clamp(18px, 3vw, 44px); }
.stats b { display: block; font-family: var(--heading); font-weight: 800; font-size: clamp(26px, 3vw, 44px); line-height: 1.1; color: var(--accent); text-shadow: 0 0 14px rgba(63, 214, 255, .6); font-variant-numeric: tabular-nums; }
.stats span { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* A portrait screen would crop the field down to no tanks at all: the whole width stays as a band, sky above it and ground below. */
@media (max-aspect-ratio: 1/1) {
  .hero { background: linear-gradient(180deg, #021130 0, #042864 calc(70px + 30vw), var(--ink) calc(70px + 80vw)); }
  .nav { order: 1; }
  .hero-title { order: 2; }
  .hero-video { order: 3; position: relative; inset: auto; flex: none; height: auto; aspect-ratio: 16 / 9; margin-top: -3vw; -webkit-mask-image: linear-gradient(180deg, transparent, #000 20%, #000 76%, transparent); mask-image: linear-gradient(180deg, transparent, #000 20%, #000 76%, transparent); }
  .hero-bottom { order: 4; margin-top: auto; padding-top: 0; }
  .hero-shade { background: linear-gradient(180deg, rgba(4, 9, 24, .35), transparent 16%); }
}

/* ---------- The tab bar, as at the bottom of the game's menu ---------- */
.tabs { position: fixed; inset: auto 0 0; z-index: 20; display: flex; justify-content: center; gap: 8px; height: var(--tabs); padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: rgba(4, 9, 24, .9); border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.tab { --cut: 8px; --fill: rgba(6, 12, 32, .75); --edge: rgba(45, 76, 140, .55); flex: 0 1 124px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); transition: transform .12s, color .15s; }
.tab img, .tab svg { width: 30px; height: 30px; opacity: .72; }
.tab svg, .head svg { fill: var(--accent); filter: drop-shadow(0 0 5px rgba(63, 214, 255, .6)); }
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab:hover { transform: translateY(-3px); color: var(--text); }
.tab.on { --edge: var(--accent); color: var(--text); filter: drop-shadow(0 0 6px rgba(63, 214, 255, .5)); }
.tab.on img, .tab.on svg { opacity: 1; }

/* ---------- Sections ---------- */
.block { max-width: 1320px; margin: 0 auto; padding: clamp(52px, 9vh, 104px) var(--gutter) 0; scroll-margin-top: calc(-1 * clamp(28px, 6vh, 76px)); }
.head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 26px; }
.head > img, .head > svg { flex: none; width: 46px; height: 46px; }
.head h2, .final h2 { font-family: var(--heading); font-weight: 800; font-size: clamp(23px, 3vw, 38px); line-height: 1.15; letter-spacing: .08em; text-transform: uppercase; }
.head p { max-width: 760px; margin-top: 6px; color: var(--muted); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.shown { opacity: 1; transform: none; }

/* ---------- Weapon cards, built as in the game: metal body, glow and disc in the rarity colour, hologram, the frame's lights ---------- */
.wcard { --rarity: #d6e2f5; position: relative; display: block; width: 100%; aspect-ratio: 1 / 1.4; background: url(/img/ui/card-frame-body.webp) center / 100% 100% no-repeat; }
.wcard > i { position: absolute; display: block; }
.wcard .glow { inset: 26.3% 14.6% 14.3%; background: radial-gradient(ellipse at 50% 60%, var(--rarity), transparent 72%); opacity: .3; }
.wcard .disc, .wcard .art, .wcard .lights { background: var(--rarity); -webkit-mask: var(--mask) center / contain no-repeat; mask: var(--mask) center / contain no-repeat; }
.wcard .disc { --mask: url(/img/ui/card-projector.webp); left: 15%; right: 15%; bottom: 8%; height: 36%; }
.wcard .art { --mask: var(--art, none); left: 16%; right: 16%; top: 25%; bottom: 20%; background: transparent; filter: brightness(1.25) drop-shadow(0 0 4px var(--rarity)); }
.wcard.worn .art { background: var(--rarity); }
.wcard .lights { --mask: url(/img/ui/card-frame-lights.webp); inset: 0; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
.wcard .gloss { inset: 0; pointer-events: none; opacity: 0; mix-blend-mode: screen; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 40%), rgba(255, 255, 255, .55), rgba(63, 214, 255, .16) 32%, transparent 62%); transition: opacity .2s; -webkit-mask: url(/img/ui/card-frame-body.webp) center / 100% 100% no-repeat; mask: url(/img/ui/card-frame-body.webp) center / 100% 100% no-repeat; }
.detail-card:hover .gloss { opacity: 1; }
.detail-card { perspective: 700px; }
.detail-card .wcard { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .12s linear; }
.detail-card .art { animation: hover 3.4s ease-in-out infinite; }
@keyframes hover { 50% { transform: translateY(-3%); } }

/* ---------- The game scene: drawn from the map's data, every layer at its own depth ---------- */
@property --field { syntax: "<color>"; inherits: true; initial-value: #25468c; }
@property --deep { syntax: "<color>"; inherits: true; initial-value: #171f3d; }
.scene-block { padding-top: clamp(20px, 5vh, 56px); scroll-margin-top: 0; }
.scene { --tw: min(104vw, 205vh); --stretch: 1; --th: calc(var(--tw) / 2 * var(--stretch)); --air: 56px; --lift: 96px; --ev: 62px; --tank: clamp(52px, 5.4vw, 100px); position: relative; overflow: hidden; isolation: isolate; transition: --field .7s ease, --deep .7s ease; }
.layer { transform: translate3d(calc(var(--px, 0) * var(--d) * -150px), calc((var(--py, 0) * 70px + var(--sy, 0) * 220px) * var(--d) * -1), 0); will-change: transform; }
.scene-sky { position: absolute; inset: 0; z-index: -5; background: radial-gradient(120% 85% at 50% 72%, var(--field), var(--deep) 74%); -webkit-mask: linear-gradient(180deg, transparent, #000 170px); mask: linear-gradient(180deg, transparent, #000 170px); }
.scene-stars { position: absolute; inset: -30px; z-index: -4; width: calc(100% + 60px); max-width: none; height: calc(100% + 60px); }
.scene-stars circle { fill: #cfe4ff; }
.scene-stars circle:nth-child(5n) { animation: twinkle 3.4s ease-in-out infinite alternate; }
@keyframes twinkle { to { opacity: .12; } }
.scene-far { position: absolute; z-index: -3; left: -7%; right: -7%; bottom: calc(var(--th) * .2); opacity: .55; transition: opacity .4s ease; }
.scene-far img { width: 100%; height: auto; }
.scene-word { position: absolute; z-index: -2; left: 0; right: 0; bottom: calc(var(--th) * .36 + var(--air)); font-family: var(--heading); font-weight: 900; font-size: min(calc(94vw / (var(--chars, 10) * .84)), 168px); line-height: 1; letter-spacing: .02em; text-align: center; text-transform: uppercase; white-space: nowrap; color: rgba(190, 225, 255, .07); -webkit-text-stroke: 1.5px rgba(150, 215, 255, .4); }
.scene-word span { display: inline-block; transition: opacity .3s ease, transform .4s ease; }
.rolling .scene-word span, .rolling .scene-far { opacity: 0; }
.rolling .scene-word span { transform: translateY(26px) scale(.96); }
.scene-ground { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.scene-land { position: absolute; left: calc(50% - var(--tw)); width: calc(var(--tw) * 2); height: var(--th); bottom: calc(var(--th) * -.06); transition: transform .55s cubic-bezier(.3, 1.3, .5, 1); }
.scene-land::after { content: ""; position: absolute; left: 0; right: 0; top: 99.5%; height: 260px; background: #03060f; }
.rolling .scene-land { transform: translateY(16%); transition: transform .3s ease-in; }
.land { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; overflow: visible; }
.land path { fill-rule: evenodd; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.land-haze { fill: none; stroke: var(--accent); stroke-width: 20px; stroke-opacity: .09; }
.land-glow { fill: none; stroke: var(--accent); stroke-width: 8px; stroke-opacity: .28; }
.land-fill { fill: url(#earth); stroke: #7fe6ff; stroke-width: 2.2px; }
.land .arc { fill: none; stroke: #fff; stroke-width: 2.4px; stroke-opacity: .5; stroke-dasharray: 1 11; stroke-linecap: round; transition: opacity .25s; }
.arc-shell { fill: #fff; filter: drop-shadow(0 0 7px var(--accent)); }
.arc-hit { fill: none; stroke: var(--accent); stroke-width: 7; }
.rolling .arc, .rolling .arc-shell, .rolling .arc-hit { opacity: 0; }
/* The light behind each vehicle in its team colour, behind the ground as in the game (TankView's aura). */
.seat-aura { position: absolute; left: var(--x); bottom: var(--y); width: calc(var(--tank) * 3); height: calc(var(--tank) * 3); margin: 0 0 calc(var(--tank) * -1.2) calc(var(--tank) * -1.5); background: radial-gradient(circle, rgba(var(--team), .85) 0, rgba(var(--team), .62) 20%, rgba(var(--team), .3) 38%, rgba(var(--team), .08) 58%, transparent 72%); transition: opacity .24s ease-in; animation: aura-in .7s ease backwards; animation-delay: var(--delay); }
.rolling .seat-aura { opacity: 0; }
@keyframes aura-in { 0% { opacity: 0; } }
.seat { position: absolute; left: var(--x); bottom: var(--y); width: var(--tank); height: calc(var(--tank) * var(--h)); margin-left: calc(var(--tank) / -2); transition: transform .24s ease-in, opacity .24s ease-in; animation: seat-in .6s cubic-bezier(.3, 1.45, .5, 1) backwards; animation-delay: var(--delay); }
.seat.pop { animation: seat-pop .42s ease; }
@keyframes seat-in { 0% { transform: translateY(-300px); opacity: 0; } 55% { opacity: 1; } }
@keyframes seat-pop { 40% { transform: translateY(-20px) scale(1.07); } }
.rolling .seat { transform: translateY(-140px); opacity: 0; }
.seat-body { position: absolute; inset: 0; transform: rotate(var(--tilt)); transform-origin: 50% 100%; }
.seat-body.flip { transform: rotate(var(--tilt)) scaleX(-1); }
.seat-body img { position: absolute; max-width: none; width: calc(var(--tank) * var(--w)); height: auto; left: calc(50% - var(--tank) * var(--w) * var(--cx)); bottom: calc(var(--tank) * var(--w) * var(--fy) * -1); }
.seat-badge { position: absolute; left: 50%; bottom: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 6px; transform: translateX(-50%); }
.seat-badge img { width: 32px; height: 32px; max-width: none; border: 1px solid rgb(var(--team)); background: #000; box-shadow: 0 0 9px rgba(var(--team), .6); }
.seat-badge b { font-family: var(--heading); font-size: 10px; letter-spacing: .16em; color: rgb(var(--team)); text-shadow: 0 0 8px rgba(var(--team), .9); text-transform: uppercase; }
.scene-event { position: absolute; left: var(--x); bottom: min(calc(var(--y) + var(--lift) * var(--k)), calc(var(--th) * .58 + var(--air) - var(--ev) * 1.6)); width: var(--ev); margin-left: calc(var(--ev) / -2); pointer-events: auto; }
.event-in { display: block; text-align: center; transition: transform .22s ease-in, opacity .22s ease-in; animation: event-in .5s cubic-bezier(.3, 1.7, .5, 1) backwards; animation-delay: var(--delay); }
.rolling .event-in { transform: scale(.2); opacity: 0; }
@keyframes event-in { 0% { transform: scale(0) rotate(-40deg); opacity: 0; } }
.event-in img { width: 100%; height: var(--ev); object-fit: contain; filter: drop-shadow(0 0 9px rgba(160, 220, 255, .55)); animation: bob var(--bob) ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(-5px); } to { transform: translateY(6px) rotate(3deg); } }
.event-in span { display: block; margin-top: 2px; font-size: 10px; font-weight: 700; letter-spacing: .05em; line-height: 1.1; text-transform: uppercase; text-shadow: 0 1px 5px #000, 0 0 9px #000; }
.scene-fore { position: absolute; z-index: 0; left: -4%; bottom: -14px; width: 108%; max-width: none; height: 15%; pointer-events: none; filter: blur(1.4px); }
.scene-fore path { fill: #01030a; stroke: rgba(63, 214, 255, .3); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.scene-sparks { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.scene-sparks i { position: absolute; bottom: -10px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); opacity: 0; animation: rise var(--t) linear var(--delay) infinite; }
.scene-sparks i:nth-child(3n) { background: var(--action); box-shadow: 0 0 8px var(--action); }
@keyframes rise { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: .85; } 100% { transform: translate(var(--drift), -520px); opacity: 0; } }
.scene-top { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-areas: "copy die mode mode" "copy die clock deck"; gap: 14px 30px; align-items: start; max-width: 1500px; margin: 0 auto; padding: clamp(36px, 8vh, 84px) var(--gutter) calc(var(--th) * .52 + var(--air)); pointer-events: none; }
.scene-top > * { pointer-events: auto; }
.scene-copy { grid-area: copy; max-width: 560px; }
.scene-copy h2 { font-family: var(--heading); font-weight: 800; font-size: clamp(25px, 3.5vw, 46px); line-height: 1.12; letter-spacing: .07em; text-transform: uppercase; text-shadow: 0 0 26px rgba(63, 214, 255, .5); }
.scene-copy p { margin-top: 12px; color: #c0d0ee; text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }
.scene-die { grid-area: die; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 4px; font-family: var(--heading); font-size: 12px; font-weight: 700; letter-spacing: .12em; line-height: 1.3; text-align: center; text-transform: uppercase; text-shadow: 0 0 10px rgba(63, 214, 255, .8); }
.die-float { display: block; animation: bob 2.6s ease-in-out infinite alternate; }
.die { width: clamp(96px, 11vw, 150px); overflow: visible; filter: drop-shadow(0 0 16px rgba(63, 214, 255, .75)); transition: transform .18s ease; }
.scene-die:hover .die { transform: translateY(-6%) rotate(-10deg) scale(1.06); }
.scene-die.rolling .die { animation: die-roll .7s cubic-bezier(.3, .7, .4, 1); }
@keyframes die-roll { 35% { transform: translateY(-26%) rotate(240deg) scale(1.2); } 100% { transform: rotate(360deg); } }
.die path { stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.die-top { fill: #114685; }
.die-left { fill: #06193c; }
.die-right { fill: #0a2a5c; }
.die-pips circle { fill: #c4f3ff; }
.scene-mode { grid-area: mode; text-align: right; }
.scene-top .label { color: #a9c0e8; text-shadow: 0 1px 6px #000; }
.scene-mode b { display: block; margin-top: 2px; font-family: var(--heading); font-size: clamp(22px, 2.5vw, 34px); font-weight: 800; line-height: 1.1; letter-spacing: .05em; text-transform: uppercase; text-shadow: 0 0 18px rgba(255, 255, 255, .35); }
.scene-mode small { display: block; margin-top: 2px; font-size: 15px; font-weight: 700; letter-spacing: .14em; color: var(--accent); text-transform: uppercase; }
.scene-clock { grid-area: clock; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.clock-face { position: relative; width: 104px; height: 104px; }
.clock-face svg { width: 100%; height: 100%; }
.clock-face circle { fill: rgba(3, 8, 24, .55); stroke: rgba(63, 214, 255, .2); stroke-width: 6; }
.clock-face #clock-ring { fill: none; stroke: var(--reward); stroke-linecap: round; stroke-dasharray: var(--time, 30) 60; filter: drop-shadow(0 0 5px var(--reward)); transition: stroke-dasharray .3s ease; }
.clock-face b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--heading); font-size: 22px; font-weight: 700; }
.scene-deck { grid-area: deck; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.scene-fan { position: relative; width: 170px; height: 112px; transition: opacity .22s ease, transform .22s ease; }
.rolling .scene-fan { opacity: 0; transform: translateY(26px); }
.scene-fan .wcard { position: absolute; left: 50%; bottom: 0; width: 70px; margin-left: -35px; transform-origin: 50% 130%; transform: rotate(var(--turn)) translateY(var(--sink)); animation: deal .45s cubic-bezier(.3, 1.3, .5, 1) backwards; animation-delay: var(--delay); }
.scene-fan .wcard b { position: absolute; inset: 22% 0 16%; display: flex; align-items: center; justify-content: center; font-family: var(--heading); font-size: 30px; font-weight: 900; color: var(--accent); text-shadow: 0 0 14px var(--accent); }
@keyframes deal { 0% { transform: translateY(46px); opacity: 0; } }
.scene-deck .label { margin-top: 14px; }
.scene-deck b { font-weight: 800; font-size: 15px; letter-spacing: .05em; text-transform: uppercase; }
.hangar { position: relative; z-index: 1; padding: 6px var(--gutter) 40px; background: #03060f; -webkit-mask: linear-gradient(180deg, #000 calc(100% - 34px), transparent); mask: linear-gradient(180deg, #000 calc(100% - 34px), transparent); }
.hangar > p { max-width: 900px; margin: 0 auto 14px; color: var(--muted); text-align: center; }
.hangar-picks { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 28px; max-width: 1320px; margin: 0 auto; }
.hangar .label { color: var(--muted); }
.pilots { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.vehicles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.pick { display: block; width: 100%; padding: 3px; border: 1px solid var(--line); background: rgba(4, 9, 24, .5); transition: border-color .12s, transform .12s, background .12s, box-shadow .12s; }
.pick img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.vehicles .pick img { aspect-ratio: 16 / 9; }
.pick:hover { transform: translateY(-2px); border-color: var(--line-hi); }
.pick.on { border-color: var(--action); background: rgba(255, 122, 31, .12); box-shadow: 0 0 8px rgba(255, 122, 31, .55); }

/* ---------- Arsenal ---------- */
.combos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.combo { display: flex; align-items: center; gap: 14px; padding: 12px 18px; text-align: left; transition: transform .14s ease; }
.combo:hover { transform: translateY(-3px); --edge: var(--accent); }
.pair { flex: none; display: flex; align-items: center; gap: 2px; }
.pair .wcard { width: 78px; transition: transform .25s ease; }
.pair > i { font-style: normal; font-weight: 900; color: var(--accent); font-size: 18px; width: 16px; text-align: center; }
.combo:hover .pair .wcard:first-child { transform: translateX(5px) rotate(-3deg); }
.combo:hover .pair .wcard:last-child { transform: translateX(-5px) rotate(3deg); }
.combo b { font-size: 15px; line-height: 1.3; }
.arsenal { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.arsenal-list { padding: 16px; min-width: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; align-items: center; }
.filter { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); transition: color .15s, border-color .15s, background .15s; }
.filter img { width: 14px; height: 14px; }
.filter:hover { color: var(--text); }
.filter.on { color: var(--text); border-color: var(--accent); background: rgba(63, 214, 255, .1); }
.search { flex: 1 1 150px; min-width: 120px; height: 34px; padding: 0 12px; font: inherit; font-size: 14px; color: var(--text); background: rgba(4, 9, 24, .7); border: 1px solid var(--line); }
.search::placeholder { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; max-height: 620px; overflow-y: auto; padding: 4px 6px 4px 2px; scrollbar-color: var(--line) transparent; scrollbar-width: thin; }
.grid h4 { grid-column: 1 / -1; margin: 8px 0 0; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.grid h4 b { color: var(--text); }
.acard { display: block; width: 100%; transition: transform .12s ease, filter .12s ease; content-visibility: auto; contain-intrinsic-size: auto 124px; }
.acard:hover { transform: translateY(-3px) scale(1.03); }
.acard.on { filter: drop-shadow(0 0 8px var(--glow)); }
.none { grid-column: 1 / -1; padding: 30px; text-align: center; color: var(--muted); }
.detail { position: sticky; top: 14px; padding: 18px; }
.detail-card { width: 170px; margin: 8px auto 12px; }
.detail h3 { font-size: 19px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.rarity { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin: 2px 0 8px; }
.rarity img { width: 16px; height: 16px; }
.text { min-height: 72px; color: var(--muted); font-size: 15px; line-height: 1.4; }
.bar { display: grid; grid-template-columns: 76px 1fr 34px; gap: 8px; align-items: center; margin-top: 7px; font-size: 11px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.bar i { display: block; height: 5px; background: var(--dim); }
.bar u { display: block; height: 100%; background: var(--glow, var(--accent)); box-shadow: 0 0 8px var(--glow, var(--accent)); transition: width .3s ease; }
.bar em { font-style: normal; font-size: 13px; font-weight: 700; letter-spacing: 0; color: var(--text); text-align: right; }

/* ---------- Screens ---------- */
.shots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 34%); gap: 14px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; scrollbar-color: var(--line) transparent; scrollbar-width: thin; }
.shot { --cut: 10px; display: block; padding: 6px 6px 10px; text-align: left; scroll-snap-align: start; transition: transform .14s; }
.shot:hover { transform: translateY(-3px); --edge: var(--accent); }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shot span { display: block; padding: 8px 6px 0; font-size: 14px; color: var(--muted); }
.lightbox { max-width: min(96vw, 1500px); padding: 0; background: none; border: 0; }
.lightbox::backdrop { background: rgba(2, 5, 14, .92); }
.lightbox img { max-height: 90vh; width: auto; cursor: zoom-out; }

/* ---------- The end ---------- */
.final { display: flex; flex-wrap: wrap; gap: 20px 30px; align-items: center; justify-content: space-between; padding: clamp(22px, 4vw, 40px); }
.final > div:first-of-type { flex: 1 1 380px; }
.final p { margin-top: 8px; color: var(--muted); max-width: 640px; }
.footer { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; max-width: 1320px; margin: clamp(44px, 7vh, 80px) auto 0; padding: 22px var(--gutter); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer .brand { font-size: 12px; color: var(--text); }
.footer .brand img { width: 28px; height: 28px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer nav a:hover { color: var(--accent); }

/* ---------- Narrow screens ---------- */
@media (max-width: 1020px) {
  .arsenal { grid-template-columns: 1fr; }
  .detail { position: relative; top: 0; display: grid; grid-template-columns: 120px 1fr; gap: 0 14px; order: -1; padding: 14px; }
  .detail > .small { grid-column: 1 / -1; }
  .detail-card { width: 100%; margin: 6px 0 0; }
  .text { min-height: 0; }
  .combos { grid-template-columns: 1fr; }
  .scene { --stretch: 1.25; --lift: 72px; --ev: 54px; }
  .scene-top { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "copy copy copy" "mode mode mode" "clock deck die"; align-items: center; }
  .scene-mode { text-align: left; }
  .hangar-picks { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  :root { --tabs: 68px; }
  body { font-size: 16px; }
  .nav { padding-top: 16px; gap: 10px; }
  .brand span { display: none; }
  .footer .brand span { display: inline; }
  .hero-corners { display: none; }
  .tabs { gap: 4px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tab { flex: 1 1 0; font-size: 8.5px; letter-spacing: .06em; }
  .tab img, .tab svg { width: 24px; height: 24px; }
  .head { gap: 12px; }
  .scene { --tw: min(92vw, 205vh); --stretch: 1.65; --lift: 50px; --ev: 40px; --air: 72px; --tank: 40px; }
  .scene-top { gap: 12px 10px; }
  .scene-far { left: -45%; right: -45%; }
  .clock-face { width: 78px; height: 78px; }
  .clock-face b { font-size: 17px; }
  .scene-fan { width: 120px; height: 86px; }
  .scene-fan .wcard { width: 52px; margin-left: -26px; }
  .scene-deck b { font-size: 12px; }
  .die { width: 84px; }
  .scene-die { font-size: 10px; }
  .seat-badge img { width: 22px; height: 22px; }
  .seat-badge b { font-size: 8px; }
  .event-in span { font-size: 8px; }
  .pilots, .vehicles { display: flex; overflow-x: auto; padding-bottom: 6px; }
  .pick { flex: none; width: 58px; }
  .vehicles .pick { width: 82px; }
  .pair .wcard { width: 64px; }
  .head > img, .head > svg { width: 36px; height: 36px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); max-height: 52vh; }
  .pick { padding: 2px; }
  .shots { grid-auto-columns: 84%; }
}
/* A phone upright: the buttons and numbers take the whole width under the field. On its side they would cover it. */
@media (max-width: 700px) and (max-aspect-ratio: 1/1) {
  .pitch, .pitch .cta { width: 100%; }
  .pitch .btn-action { flex: 1 1 100%; padding: 0 12px; }
  .pitch .btn:not(.btn-action) { flex: 1 1 100%; }
  .stats { width: 100%; justify-content: space-between; }
}
/* A phone on its side: short, so the tab bar shrinks to icons. */
@media (max-height: 500px) {
  :root { --tabs: 50px; }
  .tab span { display: none; }
  .hero-title { padding-top: 0; }
  .wordmark { font-size: clamp(30px, 7vw, 56px); }
  .pitch p { display: none; }
  .btn-action { min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .scene-die.rolling .die, .die-float, .event-in img, .scene-stars circle { animation: none; }
  .arc-shell, .arc-hit, .scene-sparks { display: none; }
}
