/* MCR.ZONE shared styles.
   Pixel system: notched corners (clip-path), hard drops, stepped motion. Colors are the game's own GUI navy and gold
   (sampled from the menu backdrops, the hotbar and the mcr_menu tooltip). Art from the resource pack lives in
   assets/game/ (tools/export.py) and is always drawn at a whole multiple of its pixel size. */

:root {
  --bg: #070b19;
  --bg-deep: #04070f;
  --panel: #0c1530;
  --panel-raised: #142049;
  --edge: #1e2d5e;
  --edge-light: #2f4688;
  --ink: #eef2ff;
  --ink-soft: #c6d0f0;
  --ink-muted: #8f9cc6;
  --ink-faint: #56639a;

  --accent: #f4ba32;          /* the game's gold: the one interactive accent */
  --accent-light: #fff0a0;
  --accent-shade: #ba7416;
  --accent-deep: #3e2204;
  --sapphire: #3c8cec;
  --blue: #2b66f0;
  --ok: #38b86a;
  --ok-deep: #1d6e3d;
  --part: #e09a1a;
  --part-deep: #8a5806;
  --no: #d64452;
  --no-deep: #86252f;

  --tier-common: #b9cbe6;
  --tier-rare: #fcac3e;
  --tier-epic: #c86cf6;
  --tier-legendary: #8ee7ff;
  --tier-champion: #f6c840;

  --font-pixel: "Press Start 2P", "Courier New", monospace;
  --font-terminal: "VT323", "Courier New", monospace;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --clip-px1: polygon(0 2px, 2px 2px, 2px 0, calc(100% - 2px) 0, calc(100% - 2px) 2px, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 2px calc(100% - 2px), 0 calc(100% - 2px));
  --clip-px2: polygon(0 4px, 2px 4px, 2px 2px, 4px 2px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 2px) calc(100% - 4px), calc(100% - 2px) calc(100% - 2px), calc(100% - 4px) calc(100% - 2px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 4px), 0 calc(100% - 4px));
  --clip-px3: polygon(0 6px, 2px 6px, 2px 4px, 4px 4px, 4px 2px, 6px 2px, 6px 0, calc(100% - 6px) 0, calc(100% - 6px) 2px, calc(100% - 4px) 2px, calc(100% - 4px) 4px, calc(100% - 2px) 4px, calc(100% - 2px) 6px, 100% 6px, 100% calc(100% - 6px), calc(100% - 2px) calc(100% - 6px), calc(100% - 2px) calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) calc(100% - 2px), calc(100% - 6px) calc(100% - 2px), calc(100% - 6px) 100%, 6px 100%, 6px calc(100% - 2px), 4px calc(100% - 2px), 4px calc(100% - 4px), 2px calc(100% - 4px), 2px calc(100% - 6px), 0 calc(100% - 6px));
  --shadow-inset: inset 0 3px 0 rgba(0, 0, 0, .45);
  --maxw: 1200px;
  --gap: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  color: var(--ink); font-family: var(--font-sans); font-size: 15px; line-height: 1.55;
  background: radial-gradient(1100px 480px at 50% -140px, #13265e 0%, transparent 72%), var(--bg);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body > main { flex: 1; width: 100%; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
button { font: inherit; }
::selection { background: color-mix(in oklab, var(--accent) 40%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--edge-light) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--edge-light); border: 2px solid var(--panel); }
/* Notched (clip-path) elements cannot show an outline: the corners are cut off. They show focus on their own border. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:focus-visible, .seg button:focus-visible, .tile-btn:focus-visible, .input:focus-visible, .field input:focus-visible,
.field select:focus-visible, dialog:focus-visible, .dlg-body:focus-visible, .nav-toggle:focus-visible { outline: none; }
.btn:focus-visible { --btn-edge: #fff; }
.seg button:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.tile-btn:focus-visible, .nav-toggle:focus-visible { border-color: var(--accent); --cc: var(--accent); }
.px { image-rendering: pixelated; image-rendering: crisp-edges; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(var(--maxw), 100% - 32px); margin-inline: auto; }
@media (min-width: 640px) { .container { width: min(var(--maxw), 100% - 48px); } }
[hidden] { display: none !important; }

/* the pixel ripple drawn behind the page by site.js */
.ripple { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; image-rendering: pixelated; }

/* ---------- type ---------- */
.panel-title, .label, .meta {
  font-family: var(--font-pixel); text-transform: uppercase; line-height: 1.5; letter-spacing: .04em;
}
.panel-title { font-size: 11px; color: var(--ink); }
.label { font-size: 8px; color: var(--ink-muted); letter-spacing: .06em; }
.meta { display: inline-flex; align-items: center; gap: 8px; font-size: 8px; color: var(--ink-muted); letter-spacing: .06em; white-space: nowrap; }
a.meta { color: var(--ink-muted); }
a.meta:hover { color: var(--accent); text-decoration: none; }
a.meta::after { content: ">"; }
.stat-value { font-family: var(--font-terminal); font-size: 30px; line-height: 1; color: var(--ink); }
.term { font-family: var(--font-terminal); font-size: 20px; line-height: 1.15; }
.eyebrow { font-family: var(--font-pixel); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; line-height: 1.5; }
.muted { color: var(--ink-muted); }

/* ---------- panels: a notched face on a hard 4px drop ---------- */
.panel { position: relative; isolation: isolate; padding: 2px; }
.panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background-color: var(--panel); border: 2px solid var(--edge);
  clip-path: var(--clip-px2); box-shadow: inset 1px 1px 0 var(--edge-light), inset -1px -1px 0 rgba(0, 0, 0, .35);
}
.panel::after { content: ""; position: absolute; inset: 0; z-index: -2; transform: translateY(4px); background: var(--bg-deep); clip-path: var(--clip-px2); }
/* The two step notch cuts a stair across each corner; the cell on its diagonal gets the outline color (--cc), so the
   border runs round the corner without a gap. Elements that change their border color change --cc too. */
.panel::before, .tile-btn, dialog.dlg {
  --cc: var(--edge);
  background-image: linear-gradient(var(--cc), var(--cc)), linear-gradient(var(--cc), var(--cc)), linear-gradient(var(--cc), var(--cc)), linear-gradient(var(--cc), var(--cc));
  background-position: 0 0, 100% 0, 0 100%, 100% 100%;
  background-size: 2px 2px; background-repeat: no-repeat;
}
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 50px; padding: 10px 16px; border-bottom: 2px solid var(--edge); }
.panel-head .panel-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.panel-head .panel-title img { flex: none; }
.panel-body { padding: 16px; }
.panel-inset, .well { background: var(--bg-deep); border: 2px solid var(--edge); clip-path: var(--clip-px1); box-shadow: var(--shadow-inset); }

/* a stat well: label over a big terminal number, with an optional game icon */
.well { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 12px; }
.well > div { min-width: 0; }
.well .label { display: block; }
.well .stat-value { display: block; margin-top: 4px; }
.well .sub { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-faint); }

/* clickable tiles (arena road, card grid, mode tabs) */
.tile-btn {
  position: relative; display: block; cursor: pointer; color: var(--ink); text-align: left;
  background-color: var(--panel); border: 2px solid var(--edge); clip-path: var(--clip-px2);
  box-shadow: inset 1px 1px 0 var(--edge-light), inset -1px -1px 0 rgba(0, 0, 0, .35); transition: background-color 80ms steps(2, end);
}
.tile-btn:hover { background-color: var(--panel-raised); text-decoration: none; }
.tile-btn[aria-pressed="true"], .tile-btn[aria-selected="true"] { --cc: var(--ac, var(--accent)); background-color: var(--panel-raised); border-color: var(--ac, var(--accent)); box-shadow: inset 0 -4px 0 var(--ac, var(--accent)); }

/* ---------- buttons: a face on a 3px block. Hover lifts the face, press drops it. ---------- */
.btn {
  --btn-bg: var(--panel-raised); --btn-edge: var(--edge-light); --btn-hi: color-mix(in oklab, var(--edge-light) 70%, white); --btn-depth: var(--bg-deep);
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; flex: none;
  height: 40px; padding: 0 16px 3px; font-family: var(--font-pixel); font-size: 10px; line-height: 1; letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap; color: var(--ink); background: transparent; border: 0; cursor: pointer; user-select: none; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { text-decoration: none; }
.btn::before {
  content: ""; position: absolute; inset: 0 0 3px 0; z-index: -1; background: var(--btn-bg); border: 2px solid var(--btn-edge); clip-path: var(--clip-px1);
  box-shadow: inset 1px 1px 0 var(--btn-hi), inset -1px -1px 0 rgba(0, 0, 0, .3); transition: transform 70ms steps(2, end), background-color 100ms ease;
}
.btn::after { content: ""; position: absolute; inset: 3px 0 0 0; z-index: -2; background: var(--btn-depth); clip-path: var(--clip-px1); }
.btn-label { display: inline-flex; align-items: center; gap: 8px; transition: transform 70ms steps(2, end); }
.btn-label img { flex: none; }
.btn:hover:not(:disabled)::before, .btn:hover:not(:disabled) .btn-label { transform: translateY(-1px); }
.btn:hover:not(:disabled)::before { background: color-mix(in oklab, var(--btn-bg) 86%, white); }
.btn:active:not(:disabled)::before, .btn:active:not(:disabled) .btn-label, .btn[data-pressed="true"]::before, .btn[data-pressed="true"] .btn-label { transform: translateY(3px); }
.btn:active:not(:disabled)::before { box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .06); }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-primary {
  --btn-bg: var(--accent); --btn-edge: var(--accent-shade); --btn-hi: var(--accent-light); --btn-depth: #6b3f08; color: var(--accent-deep);
}
.btn-blue { --btn-bg: var(--blue); --btn-edge: color-mix(in oklab, var(--blue) 55%, black); --btn-hi: rgba(255, 255, 255, .45); --btn-depth: color-mix(in oklab, var(--blue) 38%, black); color: #fff; }
.btn-ghost { --btn-bg: transparent; --btn-edge: transparent; --btn-hi: transparent; --btn-depth: transparent; color: var(--ink-muted); }
.btn-ghost:hover:not(:disabled) { color: var(--ink); }
.btn-ghost:hover:not(:disabled)::before { background: var(--panel-raised); border-color: var(--edge); }
.btn-sm { height: 32px; padding: 0 12px 3px; font-size: 9px; }
.btn-lg { height: 48px; padding: 0 22px 3px; font-size: 11px; }
.btn-icon { width: 40px; padding: 0 0 3px; }
.btn-icon.btn-sm { width: 32px; }
.block { display: flex; width: 100%; }

/* ---------- inputs ---------- */
.input, .field input, .field select {
  width: 100%; height: 40px; padding: 0 12px; font-family: var(--font-terminal); font-size: 20px; color: var(--ink); background: var(--bg-deep);
  border: 2px solid var(--edge); border-radius: 0; clip-path: var(--clip-px1); box-shadow: var(--shadow-inset); transition: border-color 100ms ease; appearance: none; -webkit-appearance: none;
}
.input::placeholder, .field input::placeholder { color: var(--ink-faint); }
.input:focus, .field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
.input:disabled { opacity: .6; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-family: var(--font-pixel); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.field select { padding-right: 32px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); background-position: calc(100% - 17px) 16px, calc(100% - 12px) 16px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.field select option { background: var(--panel); }

/* ---------- sliders ---------- */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 12px; background: var(--bg-deep); border: 2px solid var(--edge); box-shadow: var(--shadow-inset); }
input[type=range]::-moz-range-track { height: 8px; background: var(--bg-deep); border: 2px solid var(--edge); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 26px; margin-top: -9px; background: var(--accent); border: 2px solid var(--accent-shade); box-shadow: inset 2px 2px 0 var(--accent-light), 3px 3px 0 var(--bg-deep); border-radius: 0; }
input[type=range]::-moz-range-thumb { width: 14px; height: 22px; background: var(--accent); border: 2px solid var(--accent-shade); border-radius: 0; }
input[type=range]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ---------- segmented control: a dark well, the chosen option filled gold ---------- */
.seg { display: inline-flex; gap: 2px; padding: 4px; background: var(--bg-deep); border: 2px solid var(--edge); clip-path: var(--clip-px1); box-shadow: var(--shadow-inset); }
.seg button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 30px; padding: 0 12px; flex: 1 0 auto;
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
  color: var(--ink-muted); background: transparent; border: 0; cursor: pointer; clip-path: var(--clip-px1);
  transition: color 80ms steps(2, end), background-color 80ms steps(2, end);
}
.seg button:hover { color: var(--ink); background: var(--panel-raised); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { color: var(--accent-deep); background: var(--accent); box-shadow: inset 1px 1px 0 var(--accent-light), inset -1px -1px 0 var(--accent-shade); }

/* ---------- pills and status ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 10px; font-family: var(--font-pixel); font-size: 8px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  color: var(--ink); background: var(--panel-raised); border: 2px solid var(--edge); clip-path: var(--clip-px1);
}
.dot { width: 8px; height: 8px; background: var(--ink-faint); flex: none; }
.dot.on { background: #3be07a; animation: blink 1.4s steps(2, start) infinite; }
.dot.off { background: var(--no); }
@keyframes blink { to { visibility: hidden; } }

/* ---------- number medals (steps, clue numbers): a dark rim, a lit face, a hard drop ---------- */
.medal {
  --c: var(--accent); --t: var(--accent-deep); --ts: rgba(255, 255, 255, .5);
  --c-hi: color-mix(in oklab, var(--c) 58%, white); --c-lo: color-mix(in oklab, var(--c) 62%, black); --c-ink: color-mix(in oklab, var(--c) 30%, black);
  position: relative; isolation: isolate; display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px;
  font-family: var(--font-pixel); font-size: 13px; line-height: 1; color: var(--t); filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .55));
}
.medal::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--c-ink); clip-path: var(--clip-px3); }
.medal::after { content: ""; position: absolute; inset: 3px; z-index: -1; background: var(--c); clip-path: var(--clip-px2); box-shadow: inset 3px 3px 0 var(--c-hi), inset -3px -3px 0 var(--c-lo); }
.medal > span { position: relative; padding-top: 1px; text-shadow: 1px 1px 0 var(--ts); }
.medal-sm { width: 30px; height: 30px; font-size: 10px; }
.medal-sm::before { clip-path: var(--clip-px2); }
.medal-sm::after { inset: 2px; clip-path: var(--clip-px1); box-shadow: inset 2px 2px 0 var(--c-hi), inset -2px -2px 0 var(--c-lo); }
.medal.wide { width: auto; min-width: 40px; height: 32px; padding: 0 12px; font-size: 11px; }
.medal.wide::before { clip-path: var(--clip-px2); }
.medal.wide::after { inset: 2px; clip-path: var(--clip-px1); box-shadow: inset 2px 2px 0 var(--c-hi), inset -2px -2px 0 var(--c-lo); }
.medal.off { --c: var(--edge-light); --t: var(--ink-muted); --ts: transparent; }

/* ---------- the game's own art ---------- */
/* Arena medallions (22x22, Legendary 26x26) from the Arena Road. */
.arena-medal { flex: none; image-rendering: pixelated; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .55)); }
/* The in-game tooltip: the mcr_menu style (gold frame, sapphire corner gems) or a card tier's frame, nine-sliced at 2x. */
.tooltip-frame {
  --frame: url("../game/frames/menu.png");
  border: 24px solid transparent; border-image: var(--frame) 12 fill / 24px / 0 stretch; image-rendering: pixelated;
}
.tooltip-frame[data-tier="common"] { --frame: url("../game/frames/card_common.png"); }
.tooltip-frame[data-tier="rare"] { --frame: url("../game/frames/card_rare.png"); }
.tooltip-frame[data-tier="epic"] { --frame: url("../game/frames/card_epic.png"); }
.tooltip-frame[data-tier="legendary"] { --frame: url("../game/frames/card_legendary.png"); }
.tooltip-frame[data-tier="champion"] { --frame: url("../game/frames/card_champion.png"); }
/* The hotbar (182x22, 20 pixel slots) cut to --n slots at --s screen pixels a texel. Items sit 3 texels in. */
.hotbar {
  --n: 9; --s: 2; position: relative; display: block; width: calc((20 * var(--n) + 2) * var(--s) * 1px); height: calc(22px * var(--s));
  background: url("../game/hud/hotbar.png") 0 0 / calc(182px * var(--s)) calc(22px * var(--s)) no-repeat; image-rendering: pixelated;
}
.hotbar::after {
  content: ""; position: absolute; top: 0; right: 0; width: calc(2px * var(--s)); height: 100%;
  background: url("../game/hud/hotbar.png") 100% 0 / calc(182px * var(--s)) calc(22px * var(--s)) no-repeat; image-rendering: pixelated;
}
.hotbar > .slot { position: absolute; top: calc(3px * var(--s)); left: calc((3px + 20px * var(--i)) * var(--s)); width: calc(16px * var(--s)); height: calc(16px * var(--s)); display: grid; place-items: center; }
.hotbar > .slot .mc-card { filter: none; }
.hotbar > .ring {
  position: absolute; z-index: 1; top: calc(-1px * var(--s)); left: calc((20px * var(--i) - 1px) * var(--s)); width: calc(24px * var(--s)); height: calc(23px * var(--s));
  background: url("../game/hud/hotbar_selection.png") 0 0 / 100% 100% no-repeat; image-rendering: pixelated; pointer-events: none;
}

/* ---------- card art: the game's card, a sprite strip (frame 0 is the card, 1 to 8 a light sweep) ---------- */
.mc-card {
  --s: 4; position: relative; display: inline-block; flex: none; width: calc(32px * var(--s)); height: calc(32px * var(--s));
  background-repeat: no-repeat; background-size: 100% auto; background-position: 0 0;
  image-rendering: pixelated; image-rendering: crisp-edges; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .55));
}
.mc-card.locked { background-size: 100% 100%; }
.mc-card.sweep, .tilt:hover .mc-card, a:hover .mc-card, button:hover .mc-card { animation: card-sweep .72s steps(1, end) 1; }
@keyframes card-sweep {
  0% { background-position: 0 0; } 11% { background-position: 0 calc(-32px * var(--s)); } 22% { background-position: 0 calc(-64px * var(--s)); }
  33% { background-position: 0 calc(-96px * var(--s)); } 44% { background-position: 0 calc(-128px * var(--s)); } 55% { background-position: 0 calc(-160px * var(--s)); }
  66% { background-position: 0 calc(-192px * var(--s)); } 77% { background-position: 0 calc(-224px * var(--s)); } 88% { background-position: 0 calc(-256px * var(--s)); } 100% { background-position: 0 0; }
}
.tilt { --rx: 0deg; --ry: 0deg; display: inline-block; transform: perspective(700px) rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; transition: transform 160ms ease-out; }

[data-tier="common"] { --tier: var(--tier-common); }
[data-tier="rare"] { --tier: var(--tier-rare); }
[data-tier="epic"] { --tier: var(--tier-epic); }
[data-tier="legendary"] { --tier: var(--tier-legendary); }
[data-tier="champion"] { --tier: var(--tier-champion); }
.tier-text { color: var(--tier); }
.tier-text[data-tier="legendary"] { animation: tier-shift 5s steps(1, end) infinite; }
@keyframes tier-shift { 0% { color: #8ee7ff; } 25% { color: #c9a0ff; } 50% { color: #ff8fb3; } 75% { color: #ffd27a; } }

/* ---------- the card tooltip (card dialog, MCRdle answer): laid out like the game's own ---------- */
.cardtip { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: start; }
.cardtip-art { display: grid; justify-items: center; gap: 10px; }
.cardtip h3 { font-family: var(--font-terminal); font-size: 34px; line-height: 1; margin: 0 0 8px; }
.cardtip .pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cardtip .desc { color: var(--ink-soft); margin: 0 0 12px; max-width: 52ch; }
.cardtip .divider { width: 224px; max-width: 100%; height: 8px; margin: 4px 0 12px; }
.stat-lines { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.stat-lines li { display: flex; align-items: center; gap: 8px; font-family: var(--font-terminal); font-size: 21px; line-height: 1.1; color: var(--ink-soft); }
.stat-lines li b { font-weight: 400; color: var(--ink); }
.stat-lines img { flex: none; }
.cardtip .where { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-family: var(--font-terminal); font-size: 21px; line-height: 1.1; color: var(--ink-soft); }
.cardtip .where b { font-weight: 400; color: var(--accent); }
@media (max-width: 560px) {
  .cardtip { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .cardtip .pills, .cardtip .where { justify-content: center; }
  .cardtip .divider { margin-inline: auto; }
  .stat-lines { grid-template-columns: 1fr 1fr; text-align: left; }
}

/* ---------- navigation ---------- */
.nav { position: sticky; top: 0; z-index: 50; border-bottom: 2px solid var(--edge); background: rgba(7, 11, 25, .9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-pixel); font-size: 13px; line-height: 1; color: var(--ink); flex: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 39px; object-fit: contain; transition: transform 120ms steps(3, end); }
.brand:hover img { transform: translateY(-2px); }
.brand b { font-weight: 400; color: var(--accent); }
.nav-links { display: flex; gap: 2px; }
.nav-links a { position: relative; display: block; padding: 10px 10px; font-family: var(--font-pixel); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-muted); transition: color 80ms steps(2, end); }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; background: var(--accent); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-cta .pill { height: 32px; }
.nav-toggle { display: none; position: relative; width: 40px; height: 40px; padding: 0; border: 2px solid var(--edge); background: var(--panel-raised); cursor: pointer; clip-path: var(--clip-px1); }
.nav-toggle span { display: block; width: 18px; height: 2px; margin: 4px auto; background: var(--ink); }
@media (max-width: 960px) { .nav-cta [data-status] { display: none; } }
@media (max-width: 820px) {
  .nav-inner { gap: 10px; }
  .nav-toggle { display: block; order: 3; }
  .nav-cta { order: 2; }
  .nav-cta .btn:not(.btn-primary) { display: none; }
  .nav-links { position: absolute; top: 62px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 6px 16px 12px; background: var(--bg-deep); border-bottom: 2px solid var(--edge); display: none; }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 14px 4px; border-bottom: 2px solid var(--panel); font-size: 10px; }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a[aria-current="page"]::after { left: auto; right: 4px; top: 50%; bottom: auto; width: 8px; height: 8px; margin-top: -4px; }
}
@media (max-width: 400px) { .nav .brand span { display: none; } }

/* ---------- page scaffolding ---------- */
.section { padding: 56px 0 0; position: relative; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin: 0 0 20px; }
.section-head h2 { font-family: var(--font-pixel); font-size: clamp(14px, 2vw, 18px); line-height: 1.5; text-transform: uppercase; letter-spacing: .03em; }
.section-head p { color: var(--ink-muted); margin: 10px 0 0; max-width: 62ch; }
.section-head .eyebrow { margin-bottom: 10px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; padding: 40px 0 24px; }
.page-head h1 { font-family: var(--font-pixel); font-size: clamp(18px, 3vw, 24px); line-height: 1.4; text-transform: uppercase; }
.page-head p { color: var(--ink-muted); margin: 12px 0 0; max-width: 62ch; }
.page-end { height: 64px; }

/* ---------- footer ---------- */
.footer { margin-top: 72px; border-top: 2px solid var(--edge); background: var(--bg-deep); padding: 32px 0 24px; color: var(--ink-muted); font-size: 13px; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); gap: 24px 40px; }
.footer-brand { display: grid; justify-items: start; gap: 12px; }
.footer-brand p { margin: 0; max-width: 40ch; line-height: 1.6; }
.footer .brand { font-size: 12px; }
.footer-col .label { display: block; margin-bottom: 12px; color: var(--ink-faint); }
.footer-col ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer-col a { color: var(--ink-soft); font-size: 14px; }
.footer-col a:hover { color: var(--accent); text-decoration: none; }
.footer .fine { margin: 28px 0 0; padding-top: 16px; border-top: 2px solid var(--panel); font-size: 12px; line-height: 1.6; color: var(--ink-faint); }
@media (max-width: 640px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- dialogs ---------- */
dialog.dlg { --cc: var(--edge-light); width: min(600px, calc(100% - 24px)); padding: 0; color: var(--ink); background-color: var(--panel); border: 2px solid var(--edge-light); clip-path: var(--clip-px2); max-height: 90vh; }
dialog.dlg.wide { width: min(720px, calc(100% - 24px)); }
dialog.dlg::backdrop { background: rgba(2, 4, 12, .8); }
.dlg-body { padding: 0; overflow-y: auto; max-height: 90vh; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 10px 8px 18px; border-bottom: 2px solid var(--edge); position: sticky; top: 0; background: var(--panel); z-index: 2; }
.dlg-head h2 { font-family: var(--font-pixel); font-size: 11px; line-height: 1.4; text-transform: uppercase; letter-spacing: .04em; }
.dlg-in { padding: 18px; }
/* a dialog that is one in-game tooltip */
dialog.dlg.tip { --cc: transparent; background: transparent; border: 0; clip-path: none; overflow: visible; }
dialog.dlg.tip .dlg-body { overflow: visible; }
dialog.dlg.tip .dlg-close { position: absolute; top: 28px; right: 28px; z-index: 3; }
dialog.dlg.tip .cardtip h3 { padding-right: 40px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 200; max-width: min(380px, calc(100vw - 32px)); padding: 10px 16px; border-left: 4px solid var(--accent);
  font-family: var(--font-terminal); font-size: 22px; line-height: 1.15; color: var(--ink); background: var(--panel); outline: 2px solid var(--edge-light); box-shadow: 4px 4px 0 var(--bg-deep);
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: opacity 120ms steps(3, end), transform 120ms steps(3, end);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- moving between pages: a short stepped cross-fade (browsers with view transitions), the nav held still ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 160ms; animation-timing-function: steps(4, end); }
.nav { view-transition-name: site-nav; }
::view-transition-group(site-nav) { animation: none; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* ---------- stepped reveal ---------- */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity 280ms steps(4, end), transform 280ms steps(4, end); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .tilt { transform: none !important; }
  .ripple { display: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- the account button (assets/js/account.js) ---------- */
.nav-cta .btn.nav-account { display: inline-flex; align-items: center; gap: 8px; max-width: 180px; }
.nav-account img { width: 20px; height: 20px; image-rendering: pixelated; flex: none; }
@media (max-width: 400px) { .nav-cta .btn.nav-account { max-width: 120px; overflow: hidden; } }
