/* Gravetide — a graveyard at night, drawn as carved stone, aged gold and bone.
 *
 * The DOM half of the picture (the canvas is js/world.js). Every surface is
 * built from four things defined once below:
 *   a STONE plate   --gt-stone-bg   (grain + mottle over a dark gradient)
 *   an IRON tile    --gt-iron-bg    (what an icon sits in)
 *   a FRAME         --gt-frame-*    (9-slice border images: double rule,
 *                                    notched corner brackets, diamond studs)
 *   a display face  --gt-display    (Cinzel, OFL — fonts/OFL.txt)
 * Glyphs are inline SVG from js/icons.js in `currentColor`; there is no emoji
 * and no icon font anywhere in this file.
 */

@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url('fonts/cinzel-latin.woff2?v=1') format('woff2');
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: #060809; color: #e9e2d0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
:root {
  --gt-void: #0b0f12; --gt-stone: #141b1f; --gt-stone-hi: #1e282d;
  --gt-gold: #c9a24a; --gt-gold-hi: #f0d68a; --gt-gold-mid: #b08a3a; --gt-gold-lo: #6b5320;
  --gt-bone: #e9e2d0; --gt-dim: #8d968f; --gt-ink: #050607;
  --gt-blood: #a3231c; --gt-blood-hi: #e0453a;
  --gt-soul: #7fc4ff; --gt-evo: #b38cff; --gt-life: #7fcf8a;
  --gt-display: 'Cinzel', Georgia, 'Times New Roman', serif;
  /* legacy names, still read by a few shared-module token blocks below */
  --gt-edge: #3a3222; --gt-panel: rgba(11, 15, 18, .9); --gt-ember: #f0d68a;
  /* generated data URIs: 9-slice frames, stone grain, mask glyphs for the shared audio strip */
  --gt-frame-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E %3Crect x='.5' y='.5' width='59' height='59' fill='none' stroke='%23050607'/%3E %3Crect x='2' y='2' width='56' height='56' fill='none' stroke='%23b08a3a' stroke-width='2'/%3E %3Crect x='1.4' y='1.4' width='57.2' height='57.2' fill='none' stroke='%23f0d68a' stroke-width='.7' opacity='.75'/%3E %3Crect x='4' y='4' width='52' height='52' fill='none' stroke='%2307090b' stroke-width='2'/%3E %3Crect x='5.5' y='5.5' width='49' height='49' fill='none' stroke='%236b5320'/%3E %3Cdefs%3E%3Cg id='c'%3E%3Cpath d='M1 1h15l-4 4H5v7l-4 4z' fill='%23b08a3a' stroke='%232a1f0a' stroke-width='.8'/%3E %3Cpath d='M1.6 1.6h12' stroke='%23f0d68a' stroke-width='.8' opacity='.8'/%3E %3Cpath d='M9 5.200 12.800 9 9 12.800 5.200 9z' fill='%23f0d68a' stroke='%232a1f0a' stroke-width='.8'/%3E%3C/g%3E%3C/defs%3E %3Cuse href='%23c'/%3E%3Cuse href='%23c' transform='matrix(-1 0 0 1 60 0)'/%3E %3Cuse href='%23c' transform='matrix(1 0 0 -1 0 60)'/%3E%3Cuse href='%23c' transform='matrix(-1 0 0 -1 60 60)'/%3E %3C/svg%3E");
  --gt-frame-steel: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E %3Crect x='.5' y='.5' width='59' height='59' fill='none' stroke='%23050607'/%3E %3Crect x='2' y='2' width='56' height='56' fill='none' stroke='%235d6b73' stroke-width='2'/%3E %3Crect x='1.4' y='1.4' width='57.2' height='57.2' fill='none' stroke='%23aebbc2' stroke-width='.7' opacity='.75'/%3E %3Crect x='4' y='4' width='52' height='52' fill='none' stroke='%2307090b' stroke-width='2'/%3E %3Crect x='5.5' y='5.5' width='49' height='49' fill='none' stroke='%2339444a'/%3E %3Cdefs%3E%3Cg id='c'%3E%3Cpath d='M1 1h15l-4 4H5v7l-4 4z' fill='%235d6b73' stroke='%230e1316' stroke-width='.8'/%3E %3Cpath d='M1.6 1.6h12' stroke='%23aebbc2' stroke-width='.8' opacity='.8'/%3E %3Cpath d='M9 5.200 12.800 9 9 12.800 5.200 9z' fill='%239aa8b0' stroke='%230e1316' stroke-width='.8'/%3E%3C/g%3E%3C/defs%3E %3Cuse href='%23c'/%3E%3Cuse href='%23c' transform='matrix(-1 0 0 1 60 0)'/%3E %3Cuse href='%23c' transform='matrix(1 0 0 -1 0 60)'/%3E%3Cuse href='%23c' transform='matrix(-1 0 0 -1 60 60)'/%3E %3C/svg%3E");
  --gt-frame-verd: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E %3Crect x='.5' y='.5' width='59' height='59' fill='none' stroke='%23050607'/%3E %3Crect x='2' y='2' width='56' height='56' fill='none' stroke='%237f9650' stroke-width='2'/%3E %3Crect x='1.4' y='1.4' width='57.2' height='57.2' fill='none' stroke='%23d6e3a0' stroke-width='.7' opacity='.75'/%3E %3Crect x='4' y='4' width='52' height='52' fill='none' stroke='%2307090b' stroke-width='2'/%3E %3Crect x='5.5' y='5.5' width='49' height='49' fill='none' stroke='%234c5c2e'/%3E %3Cdefs%3E%3Cg id='c'%3E%3Cpath d='M1 1h15l-4 4H5v7l-4 4z' fill='%237f9650' stroke='%23151c0c' stroke-width='.8'/%3E %3Cpath d='M1.6 1.6h12' stroke='%23d6e3a0' stroke-width='.8' opacity='.8'/%3E %3Cpath d='M9 5.200 12.800 9 9 12.800 5.200 9z' fill='%23d6e3a0' stroke='%23151c0c' stroke-width='.8'/%3E%3C/g%3E%3C/defs%3E %3Cuse href='%23c'/%3E%3Cuse href='%23c' transform='matrix(-1 0 0 1 60 0)'/%3E %3Cuse href='%23c' transform='matrix(1 0 0 -1 0 60)'/%3E%3Cuse href='%23c' transform='matrix(-1 0 0 -1 60 60)'/%3E %3C/svg%3E");
  --gt-frame-evo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E %3Crect x='.5' y='.5' width='59' height='59' fill='none' stroke='%23050607'/%3E %3Crect x='2' y='2' width='56' height='56' fill='none' stroke='%23d9b25a' stroke-width='2'/%3E %3Crect x='1.4' y='1.4' width='57.2' height='57.2' fill='none' stroke='%23fff1c4' stroke-width='.7' opacity='.75'/%3E %3Crect x='4' y='4' width='52' height='52' fill='none' stroke='%2307090b' stroke-width='2'/%3E %3Crect x='5.5' y='5.5' width='49' height='49' fill='none' stroke='%237a55c4'/%3E %3Cdefs%3E%3Cg id='c'%3E%3Cpath d='M1 1h15l-4 4H5v7l-4 4z' fill='%23d9b25a' stroke='%2322123f' stroke-width='.8'/%3E %3Cpath d='M1.6 1.6h12' stroke='%23fff1c4' stroke-width='.8' opacity='.8'/%3E %3Cpath d='M9 5.200 12.800 9 9 12.800 5.200 9z' fill='%23d9b8ff' stroke='%2322123f' stroke-width='.8'/%3E%3C/g%3E%3C/defs%3E %3Cuse href='%23c'/%3E%3Cuse href='%23c' transform='matrix(-1 0 0 1 60 0)'/%3E %3Cuse href='%23c' transform='matrix(1 0 0 -1 0 60)'/%3E%3Cuse href='%23c' transform='matrix(-1 0 0 -1 60 60)'/%3E %3C/svg%3E");
  --gt-frame-blood: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E %3Crect x='.5' y='.5' width='59' height='59' fill='none' stroke='%23050607'/%3E %3Crect x='2' y='2' width='56' height='56' fill='none' stroke='%23a3231c' stroke-width='2'/%3E %3Crect x='1.4' y='1.4' width='57.2' height='57.2' fill='none' stroke='%23ff9a8c' stroke-width='.7' opacity='.75'/%3E %3Crect x='4' y='4' width='52' height='52' fill='none' stroke='%2307090b' stroke-width='2'/%3E %3Crect x='5.5' y='5.5' width='49' height='49' fill='none' stroke='%235e120e'/%3E %3Cdefs%3E%3Cg id='c'%3E%3Cpath d='M1 1h15l-4 4H5v7l-4 4z' fill='%23a3231c' stroke='%231b0403' stroke-width='.8'/%3E %3Cpath d='M1.6 1.6h12' stroke='%23ff9a8c' stroke-width='.8' opacity='.8'/%3E %3Cpath d='M9 5.200 12.800 9 9 12.800 5.200 9z' fill='%23e0453a' stroke='%231b0403' stroke-width='.8'/%3E%3C/g%3E%3C/defs%3E %3Cuse href='%23c'/%3E%3Cuse href='%23c' transform='matrix(-1 0 0 1 60 0)'/%3E %3Cuse href='%23c' transform='matrix(1 0 0 -1 0 60)'/%3E%3Cuse href='%23c' transform='matrix(-1 0 0 -1 60 60)'/%3E %3C/svg%3E");
  --gt-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E %3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' seed='7' stitchTiles='stitch'/%3E %3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .7 -.2'/%3E%3C/filter%3E %3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  --gt-mottle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E %3Cfilter id='m' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.014 .022' numOctaves='3' seed='3' stitchTiles='stitch'/%3E %3CfeColorMatrix values='0 0 0 0 .62 0 0 0 0 .72 0 0 0 0 .74 0 0 0 .34 -.13'/%3E%3C/filter%3E %3Crect width='320' height='320' filter='url(%23m)'/%3E%3C/svg%3E");
  --gt-m-sound: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M5 18h9l11-9v30l-11-9H5z'/%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='3.500' d='M31 17c3 4 3 10 0 14M36 11c6 7 6 19 0 26'/%3E%3C/svg%3E");
  --gt-m-muted: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M5 18h9l11-9v30l-11-9H5z'/%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='3.500' d='M31 18l12 12M43 18 31 30'/%3E%3C/svg%3E");
  --gt-m-music: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='3.500' d='M18 36V9l20-4v27'/%3E%3Ccircle cx='13' cy='37' r='6'/%3E%3Ccircle cx='33' cy='33' r='6'/%3E%3C/svg%3E");
  --gt-m-skip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M7 9l17 15L7 39zM22 9l17 15-17 15z'/%3E%3Cpath d='M38 9h5v30h-5z'/%3E%3C/svg%3E");
  --gt-stone-bg: var(--gt-grain), var(--gt-mottle), linear-gradient(180deg, #1f292e 0%, #151c20 40%, #0d1215 100%);
  --gt-iron-bg: var(--gt-grain), radial-gradient(120% 90% at 50% 0%, #2e3a40 0%, #171e22 55%, #0b0f12 100%);
  --gt-gold-text: linear-gradient(180deg, #fbeec2 0%, #e9c96b 38%, #b08a3a 62%, #7a5a1e 100%);
  --gt-blood-text: linear-gradient(180deg, #ffe0d6 0%, #f0574a 48%, #a3231c 100%);
  --gt-plate-shadow: inset 0 0 0 1px #07090b, inset 0 0 0 2px rgba(201, 162, 74, .22),
    inset 0 12px 14px -12px rgba(255, 255, 255, .1), 0 3px 10px rgba(0, 0, 0, .65);
  --gt-tile-shadow: inset 0 0 0 1px var(--gt-gold-lo), inset 0 0 0 2px #07090b,
    inset 0 3px 4px 1px rgba(255, 255, 255, .07), inset 0 -8px 10px rgba(0, 0, 0, .55), 0 2px 5px rgba(0, 0, 0, .6);
}

#game {
  position: fixed; inset: 0; width: 100%; height: 100%;
  display: block; touch-action: none; z-index: 0;
}

/* ── the kit ─────────────────────────────────────────────────────── */
.gt-ico { width: 1em; height: 1em; display: inline-block; vertical-align: -.16em; flex: none; }

/* a stone plate: every small HUD and lobby surface */
.hud-chip, .pr-row, .toast, .hud-coach, .hud-status, .rs-chip, .player-row, .peer, .pitch {
  background: var(--gt-stone-bg);
  border: 1px solid var(--gt-gold-lo);
  border-radius: 2px;
  box-shadow: var(--gt-plate-shadow);
}
/* an iron tile: what a glyph sits in */
.pc-icon, .toast-ico, .bd-item, .hud-btn, .chip-ico, .pr-crest, .pl-crest, .help-ico, .pitch-ico,
.hero-crest, .pane-sigil, #resultAwards .fs-award-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: var(--gt-iron-bg); color: var(--gt-gold-hi);
  border: 1px solid var(--gt-ink); border-radius: 2px;
  box-shadow: var(--gt-tile-shadow);
}
.pc-icon .gt-ico, .bd-item > .gt-ico, .toast-ico .gt-ico, .help-ico .gt-ico, .pitch-ico .gt-ico,
.pane-sigil .gt-ico, .boss-crest .gt-ico, #resultAwards .fs-award-icon .gt-ico {
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .9)) drop-shadow(0 0 5px rgba(240, 214, 138, .25));
}
/* a big ornamented frame: cards and panes */
.gt-frame {
  background: var(--gt-stone-bg);
  border: 9px solid transparent;
  border-image: var(--gt-frame-gold) 20 / 20px stretch;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .8), inset 0 0 60px rgba(0, 0, 0, .5);
}
/* level / stat pips: small cut gems */
.gt-pips { display: inline-flex; gap: 3px; font-style: normal; line-height: 0; }
.gt-pips b {
  width: 6px; height: 6px; transform: rotate(45deg); background: #1a2226;
  box-shadow: inset 0 0 0 1px #050607, 0 0 0 1px rgba(107, 83, 32, .55);
}
.gt-pips b.on { background: linear-gradient(135deg, #fff1c4, #c9a24a 60%, #7a5a1e); box-shadow: inset 0 0 0 1px rgba(42, 31, 10, .8), 0 0 4px rgba(240, 214, 138, .5); }
/* line — diamond — line */
.gt-flourish {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: min(240px, 70%); margin: 6px auto 10px;
}
.gt-flourish.wide { width: min(340px, 86%); }
.gt-flourish::before, .gt-flourish::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gt-gold)); }
.gt-flourish::after { background: linear-gradient(270deg, transparent, var(--gt-gold)); }
.gt-flourish i {
  width: 7px; height: 7px; transform: rotate(45deg); flex: none;
  background: linear-gradient(135deg, #fff1c4, #c9a24a 60%, #7a5a1e);
  box-shadow: 0 0 0 1px #2a1f0a, 0 0 8px rgba(240, 214, 138, .5);
}
.gt-heading {
  margin: 0; font: 700 21px/1.2 var(--gt-display); letter-spacing: .12em; text-transform: uppercase;
  background: var(--gt-gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #120c03);
}
.kbd {
  display: inline-block; padding: 0 6px; min-width: 1.5em; text-align: center; font-size: .84em; font-weight: 700;
  line-height: 1.5; color: var(--gt-bone); vertical-align: 1px;
  background: linear-gradient(180deg, #2e3a40, #171e22); border: 1px solid var(--gt-ink); border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(201, 162, 74, .4), 0 2px 0 #050607;
}
.muted { color: var(--gt-dim); }

/* ── HUD ─────────────────────────────────────────────────────────── */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 3; }

/* the soul rail: a carved channel across the top, the party level hung on it */
.xp-rail { position: absolute; left: 0; right: 0; top: env(safe-area-inset-top); height: 18px; }
.xp-track {
  position: absolute; left: 0; right: 0; top: 0; height: 14px; overflow: hidden;
  background: linear-gradient(180deg, #030405, #0d1215);
  border-bottom: 1px solid var(--gt-gold-mid);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .95), 0 1px 0 #050607, 0 2px 0 rgba(107, 83, 32, .7), 0 4px 10px rgba(0, 0, 0, .6);
}
.xp-track::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .28), transparent 42%),
    repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(0, 0, 0, .75) calc(10% - 1px) 10%);
}
#xpFill {
  height: 100%; width: 0; transition: width .18s linear;
  background: linear-gradient(180deg, #d7efff 0%, #7fc4ff 24%, #3b7fc0 62%, #1d4877 100%);
  box-shadow: 0 0 12px rgba(127, 196, 255, .7);
}
.xp-medal {
  position: absolute; left: 8px; top: 2px; width: 48px; height: 48px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--gt-grain), radial-gradient(circle at 50% 28%, #33424a, #131a1e 68%, #0a0d10);
  border: 2px solid var(--gt-gold-mid);
  box-shadow: 0 0 0 1px #050607, inset 0 0 0 1px #050607, inset 0 0 0 2px rgba(240, 214, 138, .4),
    0 3px 8px rgba(0, 0, 0, .85), 0 0 16px rgba(127, 196, 255, .28);
}
.xp-medal-cap { font: 700 7px/1 var(--gt-display); letter-spacing: .16em; text-indent: .16em; text-transform: uppercase; color: var(--gt-gold); margin-top: 3px; }
#xpLabel { font: 900 20px/1 var(--gt-display); color: var(--gt-bone); text-shadow: 0 2px 0 #000; margin-top: 1px; }

.hud-top {
  position: absolute; top: calc(24px + env(safe-area-inset-top));
  left: 64px; right: 10px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 8px;
}
.hud-chip { display: flex; align-items: center; gap: 8px; padding: 4px 11px 4px 5px; min-width: 96px; }
.hud-chip.right { padding: 4px 5px 4px 11px; justify-content: flex-end; text-align: right; }
.chip-ico { width: 30px; height: 30px; font-size: 19px; }
.hud-chip.right .chip-ico { color: #cfd6cf; }
.chip-body { display: flex; flex-direction: column; }
.gt-label { font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--gt-dim); }
.gt-value { font: 700 20px/1.05 var(--gt-display); color: var(--gt-bone); font-variant-numeric: tabular-nums lining-nums; text-shadow: 0 1px 0 #000; }

/* the clock: a lozenge plate, gold-edged (two clipped layers make the rule) */
.hud-clock { text-align: center; flex: 1; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .75)); }
.clock-plate {
  position: relative; display: inline-block; padding: 4px 26px 3px;
  background: linear-gradient(180deg, #f0d68a, #b08a3a 45%, #6b5320);
  clip-path: polygon(13px 0, calc(100% - 13px) 0, 100% 50%, calc(100% - 13px) 100%, 13px 100%, 0 50%);
}
.clock-plate::before {
  content: ''; position: absolute; inset: 2px;
  background: var(--gt-grain), linear-gradient(180deg, #232e33, #0d1215);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0 50%);
}
.gt-time {
  position: relative; font: 700 30px/1 var(--gt-display); letter-spacing: .06em;
  color: var(--gt-bone); text-shadow: 0 2px 0 #000; font-variant-numeric: tabular-nums lining-nums;
  min-width: 2.6em;
}
.gt-sub {
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #cdbf9a;
  margin-top: 4px; text-shadow: 0 1px 2px #000, 0 0 6px #000;
}

/* the boss: a wide framed bar under the clock, skull crest on its left end */
.boss-bar {
  position: absolute; top: calc(88px + env(safe-area-inset-top)); left: 50%;
  transform: translateX(-50%); width: min(560px, calc(100vw - 40px)); text-align: center;
}
.boss-name {
  margin: 0 0 5px 34px; font: 700 15px/1.1 var(--gt-display); letter-spacing: .28em; text-indent: .28em; text-transform: uppercase;
  background: var(--gt-blood-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 #000) drop-shadow(0 0 2px #000) drop-shadow(0 0 8px rgba(224, 69, 58, .55));
}
/* the name is read over the fight: a strip of night behind it */
.boss-bar::before {
  content: ''; position: absolute; left: 34px; right: 0; top: -5px; height: 26px;
  background: linear-gradient(90deg, transparent, rgba(4, 5, 6, .8) 22%, rgba(4, 5, 6, .8) 78%, transparent);
}
.boss-name { position: relative; }
.boss-track {
  position: relative; height: 18px; margin-left: 34px; overflow: hidden;
  background: linear-gradient(180deg, #040202, #170909);
  border: 1px solid #050607;
  box-shadow: 0 0 0 1px var(--gt-gold-mid), 0 0 0 2px #050607, 0 0 0 3px rgba(107, 83, 32, .9),
    inset 0 3px 5px rgba(0, 0, 0, .9), 0 5px 14px rgba(0, 0, 0, .75);
}
#bossGhost, #bossFill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; }
#bossGhost { background: linear-gradient(180deg, #f7e6c4, #c9a87a); opacity: .8; transition: width .9s cubic-bezier(.3, .6, .3, 1) .28s; }
#bossFill {
  background: linear-gradient(180deg, #ff8a7a 0%, #e0453a 20%, #a3231c 58%, #5e120e 100%);
  transition: width .2s linear; box-shadow: 2px 0 7px rgba(224, 69, 58, .85);
}
.boss-track::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .2), transparent 46%),
    repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(0, 0, 0, .62) calc(10% - 1px) 10%);
}
.boss-crest {
  position: absolute; left: -6px; bottom: -11px; width: 46px; height: 46px; border-radius: 50%; z-index: 1;
  display: flex; align-items: center; justify-content: center; font-size: 27px; color: #f3e4c4;
  background: var(--gt-grain), radial-gradient(circle at 50% 28%, #7a1d16, #2a0705 72%);
  border: 2px solid var(--gt-gold-mid);
  box-shadow: 0 0 0 1px #050607, inset 0 0 0 1px #050607, inset 0 0 0 2px rgba(240, 214, 138, .3),
    0 3px 8px rgba(0, 0, 0, .85), 0 0 18px rgba(224, 69, 58, .5);
}

/* the party: one plate a hero — crest, name, a carved life bar */
.hud-party {
  position: absolute; top: calc(94px + env(safe-area-inset-top)); left: 10px;
  display: flex; flex-direction: column; gap: 5px; width: 196px;
}
.pr-row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; column-gap: 8px;
  padding: 4px 8px 5px 5px; font-size: 12.5px;
}
.pr-row.me { border-color: var(--gt-gold-mid); }
.pr-row.out { opacity: .78; }
.pr-row.out .pr-crest { color: #7c847f !important; }
.pr-crest { grid-row: 1 / span 2; width: 28px; height: 28px; font-size: 18px; }
.pr-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gt-bone); font-weight: 600; text-shadow: 0 1px 0 #000; }
.pr-name .acct-title, .pr-name .hb-title, .pr-name .mg-name-title { display: block; margin-left: 0; font-size: 9.5px; font-weight: 400; opacity: .72; }
.pr-tag { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--gt-dim); display: inline-flex; align-items: center; gap: 3px; }
.pr-tag.down { color: #ff8a7a; font-weight: 800; }
.pr-tag .gt-ico { font-size: 12px; }
.pr-hp {
  grid-column: 2 / -1; position: relative; height: 7px; margin-top: 3px; overflow: hidden;
  background: #040506; border: 1px solid #050607;
  box-shadow: 0 0 0 1px rgba(107, 83, 32, .85), inset 0 2px 3px rgba(0, 0, 0, .9);
}
.pr-hp span { display: block; height: 100%; background: linear-gradient(180deg, #b6f0bd, #4fae62 45%, #256e39); }
.pr-hp span.low { background: linear-gradient(180deg, #ff9a8c, #e0453a 45%, #7a1712); }
.pr-hp::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), rgba(0, 0, 0, .6) calc(25% - 1px) 25%);
}

/* the build: weapons are square iron tiles, charms are round seals */
.hud-build {
  position: absolute; left: 10px; bottom: calc(52px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 11px;
}
.bd-row { display: flex; gap: 6px; min-height: 2px; }
.bd-item { position: relative; width: 42px; height: 42px; font-size: 27px; }
.bd-item.charm { width: 34px; height: 34px; font-size: 20px; border-radius: 50%; color: #d9dfd6; }
.bd-item .gt-pips {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); gap: 2px; padding: 2px 3px;
  background: #07090b; border: 1px solid rgba(107, 83, 32, .8); border-radius: 1px;
}
.bd-item .gt-pips b { width: 4px; height: 4px; transform: none; box-shadow: none; background: #232c30; }
.bd-item .gt-pips b.on { background: linear-gradient(180deg, #fff1c4, #c9a24a); box-shadow: 0 0 3px rgba(240, 214, 138, .6); }
.bd-item.evo {
  color: #fff1c4;
  background: var(--gt-grain), radial-gradient(120% 90% at 50% 0%, #4a3670 0%, #221a33 55%, #0e0b13 100%);
  box-shadow: inset 0 0 0 1px #e9c96b, inset 0 0 0 2px #07090b, inset 0 3px 4px 1px rgba(255, 255, 255, .1),
    0 0 0 1px #2a1f0a, 0 0 12px rgba(179, 140, 255, .85), 0 0 22px rgba(240, 214, 138, .3);
  animation: gt-evo-tile 2.6s ease-in-out infinite;
}
.bd-item.evo .gt-pips b.on { background: linear-gradient(180deg, #f3e6ff, #b38cff); box-shadow: 0 0 4px rgba(179, 140, 255, .9); }
.bd-item.empty {
  background: rgba(8, 11, 13, .55); opacity: .5;
  box-shadow: inset 0 0 0 1px rgba(107, 83, 32, .5), inset 0 0 0 2px #07090b;
}
@keyframes gt-evo-tile {
  50% { box-shadow: inset 0 0 0 1px #fff1c4, inset 0 0 0 2px #07090b, inset 0 3px 4px 1px rgba(255, 255, 255, .1),
    0 0 0 1px #2a1f0a, 0 0 16px rgba(240, 214, 138, .8), 0 0 26px rgba(179, 140, 255, .45); }
}

/* toasts: what just happened, as a plate with its glyph */
.hud-toast {
  position: absolute; top: calc(94px + env(safe-area-inset-top)); right: 10px;
  display: flex; flex-direction: column; gap: 5px; align-items: flex-end;
  max-width: min(350px, 62vw);
}
.toast {
  display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px;
  font-size: 12.5px; line-height: 1.3; color: var(--gt-bone); text-align: left;
  border-left: 3px solid var(--gt-gold-mid);
  animation: toast-in .2s ease-out;
}
.toast-ico { width: 28px; height: 28px; font-size: 19px; }
.toast-text b { color: #fff; font-weight: 700; }
.toast-text i { font-style: normal; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--gt-gold); margin-left: 4px; }
.toast.t-blood { border-left-color: var(--gt-blood-hi); }
.toast.t-blood .toast-ico { color: #ff9a8c; }
.toast.t-evo { border-left-color: var(--gt-evo); }
.toast.t-evo .toast-ico { color: #e3d0ff; }
.toast.t-life { border-left-color: var(--gt-life); }
.toast.t-life .toast-ico { color: #b6f0bd; }
.toast.t-warn { border-left-color: #e9a13a; }
.toast.t-warn .toast-ico { color: #ffc978; }
@keyframes toast-in { from { transform: translateX(18px); opacity: 0; } }

/* the banner in the sky */
.hud-center {
  position: absolute; left: 50%; top: 27%; transform: translate(-50%, -50%);
  text-align: center; pointer-events: none; width: 92vw;
}
.hud-center .big {
  font: 900 clamp(26px, 6.2vw, 58px)/1.05 var(--gt-display); letter-spacing: .14em; text-indent: .14em;
  background: var(--gt-gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #120c03) drop-shadow(0 0 22px rgba(201, 162, 74, .5));
  animation: center-in .32s cubic-bezier(.2, .9, .3, 1.2);
}
.hud-center.c-blood .big { background-image: var(--gt-blood-text); filter: drop-shadow(0 3px 0 #1b0403) drop-shadow(0 0 26px rgba(224, 69, 58, .7)); }
.hud-center.c-evo .big {
  background-image: linear-gradient(180deg, #fff1c4 0%, #e9c96b 40%, #b38cff 100%);
  filter: drop-shadow(0 3px 0 #1a0f2e) drop-shadow(0 0 26px rgba(179, 140, 255, .7));
}
.center-rule { display: flex; align-items: center; justify-content: center; gap: 10px; width: min(420px, 70vw); margin: 8px auto 0; }
.center-rule::before, .center-rule::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, transparent, var(--gt-gold)); }
.center-rule::after { background: linear-gradient(270deg, transparent, var(--gt-gold)); }
.center-rule i { width: 9px; height: 9px; transform: rotate(45deg); background: var(--gt-gold-hi); box-shadow: 0 0 0 1px #2a1f0a, 0 0 10px rgba(240, 214, 138, .7); }
.hud-center .small {
  font-size: 12px; letter-spacing: .3em; text-indent: .3em; text-transform: uppercase; color: var(--gt-bone);
  margin-top: 8px; text-shadow: 0 1px 3px #000, 0 0 8px #000;
}
@keyframes center-in { from { transform: scale(1.25); opacity: 0; } }

.hud-coach {
  position: absolute; left: 50%; bottom: calc(118px + env(safe-area-inset-bottom));
  transform: translateX(-50%); width: min(500px, calc(100vw - 28px));
  padding: 10px 16px; text-align: center; font-size: 14px; line-height: 1.45; color: #f3ead2;
  border-color: var(--gt-gold-mid);
  box-shadow: var(--gt-plate-shadow), 0 0 22px rgba(201, 162, 74, .22);
}
.hud-coach > .gt-ico { font-size: 20px; color: var(--gt-gold-hi); margin-right: 8px; vertical-align: -.24em; }
.hud-coach > .gt-ico.soul { color: var(--gt-soul); }
.hud-coach b { color: #fff; }
.hud-status {
  position: absolute; left: 50%; top: calc(140px + env(safe-area-inset-top));
  transform: translateX(-50%); width: max-content; max-width: calc(100vw - 24px);
  padding: 8px 16px; text-align: center; font-size: 13px; pointer-events: auto;
}
.hud-status > .gt-ico { font-size: 18px; color: var(--gt-gold-hi); margin-right: 8px; vertical-align: -.2em; }
.hud-status.is-down { border-color: #7a1712; }
.hud-status.is-down > .gt-ico { color: #ff9a8c; }
.hud-status button {
  margin-left: 10px; padding: 4px 12px; min-height: 28px; cursor: pointer; font: 700 11px/1 var(--gt-display);
  letter-spacing: .1em; text-transform: uppercase; color: var(--gt-bone);
  background: var(--gt-iron-bg); border: 1px solid var(--gt-ink); border-radius: 2px;
  box-shadow: inset 0 0 0 1px var(--gt-gold-lo);
}
.hud-status .status-sub { display: block; font-size: 11px; color: var(--gt-dim); margin-top: 4px; }

#minimap {
  position: absolute; right: calc(12px + env(safe-area-inset-right));
  bottom: calc(48px + env(safe-area-inset-bottom));
  width: 132px; height: 132px; border: 1px solid #050607; background: rgba(6, 8, 10, .55);
  box-shadow: 0 0 0 1px var(--gt-gold-mid), 0 0 0 2px #050607, 0 0 0 3px rgba(107, 83, 32, .9), 0 6px 16px rgba(0, 0, 0, .7);
}

.hud-buttons {
  position: absolute; right: 12px; top: calc(22px + env(safe-area-inset-top));
  display: none; gap: 6px; pointer-events: auto;
}
#hud .hud-buttons { display: flex; top: auto; bottom: calc(194px + env(safe-area-inset-bottom)); flex-direction: column; }
.hud-btn { width: 36px; height: 36px; padding: 0; cursor: pointer; font-size: 18px; color: #d9cfae; }
.hud-btn:hover, .hud-btn:focus-visible { color: var(--gt-gold-hi); box-shadow: var(--gt-tile-shadow), 0 0 10px rgba(240, 214, 138, .35); outline: none; }
.hud-btn:active { transform: translateY(1px); }
#quitBtn { color: #d98a80; }

/* audio strip in the HUD: bottom-centre, never over the fight */
#hudAudio {
  position: absolute; left: 50%; right: auto; transform: translateX(-50%);
  bottom: calc(4px + env(safe-area-inset-bottom));
  width: max-content; max-width: calc(100vw - 20px); pointer-events: auto;
}
/* Closed by default: an always-on strip sat under the co-op upgrade cards and
   on top of Reroll. The sound button in the side column opens it; a tap
   anywhere else closes it again. */
#hudAudio { display: none; z-index: 60; }
#hudAudio.open { display: block; }
#audioBtn[aria-expanded="true"] { color: var(--gt-gold-hi); box-shadow: var(--gt-tile-shadow), 0 0 0 1px var(--gt-gold-hi); }
#hudAudio .mps-audio { flex-wrap: nowrap; }
#hudAudio .mps-audio-slider { width: 80px; flex: 0 0 80px; }
/* web/style.css pins .volume-slider position:fixed top:12px — undo it here
   or a slider lands in the corner of the screen (CLAUDE.md item 5). */
.volume-slider { position: static !important; top: auto !important; }

/* The shared audio strip (web/shared/site_audio.js) writes its buttons as
   text with a pictograph in front. Its markup is not ours to change, so the
   text is zeroed and each button is redrawn from its own class: a masked
   glyph, then the word. */
.mps-audio {
  background: #0a0d0f; border: 1px solid var(--gt-gold-lo); border-radius: 2px;
  box-shadow: inset 0 0 0 1px #050607, inset 0 3px 8px rgba(0, 0, 0, .7), 0 3px 10px rgba(0, 0, 0, .5);
}
.mps-audio-btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 11px;
  font-size: 0; color: var(--gt-bone);
  background: var(--gt-iron-bg); border: 1px solid var(--gt-ink); border-radius: 2px;
  box-shadow: inset 0 0 0 1px var(--gt-gold-lo), inset 0 3px 4px rgba(255, 255, 255, .06);
}
.mps-audio-btn:hover { background: var(--gt-iron-bg); filter: brightness(1.25); }
.mps-audio-btn:focus-visible { outline: 1px solid var(--gt-gold-hi); outline-offset: 1px; }
.mps-audio-btn::before {
  content: ''; width: 16px; height: 16px; flex: none; background: var(--gt-gold-hi);
  -webkit-mask: var(--gt-m) center / contain no-repeat; mask: var(--gt-m) center / contain no-repeat;
}
.mps-audio-btn::after { font: 700 10.5px/1 var(--gt-display); letter-spacing: .14em; text-transform: uppercase; }
.mps-audio-sfx { --gt-m: var(--gt-m-sound); }
.mps-audio-sfx::after { content: 'SFX'; }
.mps-audio-music { --gt-m: var(--gt-m-music); }
.mps-audio-music::after { content: 'Music'; }
.mps-audio-skip { --gt-m: var(--gt-m-skip); padding: 0 9px; }
.mps-audio-btn.muted { --gt-m: var(--gt-m-muted); color: #d98a80; border-color: var(--gt-ink); }
.mps-audio-btn.muted::before { background: var(--gt-blood-hi); }
.mps-audio-slider { accent-color: var(--gt-gold); }

/* ── level-up cards ──────────────────────────────────────────────── */
.pick-pane {
  position: fixed; inset: 0; z-index: 8; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px; padding: 16px;
  background: radial-gradient(ellipse 72% 62% at 50% 46%, rgba(8, 11, 14, .58), rgba(3, 4, 6, .93));
}
.pick-head { text-align: center; }
.pick-title {
  font: 900 clamp(26px, 5vw, 44px)/1 var(--gt-display); letter-spacing: .22em; text-indent: .22em;
  background: var(--gt-gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #120c03) drop-shadow(0 0 20px rgba(201, 162, 74, .45));
}
.pick-head .gt-flourish { margin: 8px auto 6px; width: 260px; }
.pick-sub { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--gt-bone); text-shadow: 0 1px 3px #000; }
.pick-timer {
  width: 240px; height: 6px; margin: 9px auto 0; overflow: hidden;
  background: #040506; border: 1px solid #050607; box-shadow: 0 0 0 1px rgba(107, 83, 32, .9);
}
#pickTimerFill { height: 100%; width: 100%; background: linear-gradient(180deg, #fbeec2, #c9a24a 50%, #7a5a1e); }
.pick-cards { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; align-items: stretch; max-width: 980px; }

/* A card. Default = an UPGRADE (steel frame); .new = verdigris gold;
   .boon = blood; .evo = gold and violet, alive. */
.pick-card {
  position: relative; top: 0; width: 238px; min-height: 326px; padding: 26px 16px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 13px; text-align: center;
  cursor: pointer; font-family: inherit; color: var(--gt-bone);
  background: var(--gt-stone-bg);
  border: 8px solid transparent; border-image: var(--gt-frame-steel) 20 / 20px stretch;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .78), inset 0 0 44px rgba(0, 0, 0, .55);
  transition: top .1s ease-out, box-shadow .12s;
}
.pick-card:hover, .pick-card:focus-visible {
  top: -5px; outline: none;
  box-shadow: 0 0 0 1px rgba(240, 214, 138, .7), 0 0 28px rgba(201, 162, 74, .38), 0 20px 36px rgba(0, 0, 0, .8), inset 0 0 44px rgba(0, 0, 0, .45);
}
.pick-card.new { border-image-source: var(--gt-frame-verd); }
.pick-card.boon { border-image-source: var(--gt-frame-blood); }
.pick-card.evo {
  min-height: 344px; border-image-source: var(--gt-frame-evo);
  background: var(--gt-grain), radial-gradient(130% 80% at 50% 0%, #3d2c5c 0%, #1d1628 46%, #0d0a12 100%);
  animation: gt-evo-card 2.4s ease-in-out infinite;
}
@keyframes gt-evo-card {
  0%, 100% { box-shadow: 0 0 0 1px #e9c96b, 0 0 26px rgba(240, 214, 138, .55), 0 0 60px rgba(179, 140, 255, .28), 0 14px 34px rgba(0, 0, 0, .78), inset 0 0 44px rgba(0, 0, 0, .5); }
  50% { box-shadow: 0 0 0 1px #d9b8ff, 0 0 34px rgba(179, 140, 255, .8), 0 0 70px rgba(240, 214, 138, .3), 0 14px 34px rgba(0, 0, 0, .78), inset 0 0 44px rgba(0, 0, 0, .5); }
}
.pc-key {
  position: absolute; top: -13px; left: -13px; z-index: 2; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font: 900 13px/1 var(--gt-display); color: #1a1206; transform: rotate(-5deg);
  background: linear-gradient(180deg, #fbeec2, #c9a24a 55%, #8a6d2c); border: 1px solid #2a1f0a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), inset 0 -2px 0 rgba(0, 0, 0, .25), 0 2px 5px rgba(0, 0, 0, .75);
}
.pc-banner {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%); z-index: 2; white-space: nowrap;
  padding: 5px 20px 4px; font: 900 10.5px/1 var(--gt-display); letter-spacing: .34em; text-indent: .34em;
  text-transform: uppercase; color: #1a0f2e;
  background: linear-gradient(180deg, #fff1c4, #e9c96b 45%, #b38cff 130%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 50%, 100% 100%, 0 100%, 9px 50%);
}
.pc-icon { width: 80px; height: 80px; font-size: 54px; }
.pick-card.new .pc-icon { color: #e6efb6; }
.pick-card.charm .pc-icon { border-radius: 50%; }
.pick-card.boon .pc-icon { color: #ffb4a8; }
.pick-card.evo .pc-icon {
  width: 94px; height: 94px; font-size: 64px; color: #fff1c4;
  background: var(--gt-grain), radial-gradient(120% 90% at 50% 0%, #5a4288 0%, #261c3a 55%, #0e0b13 100%);
  box-shadow: inset 0 0 0 1px #e9c96b, inset 0 0 0 2px #07090b, inset 0 3px 4px 1px rgba(255, 255, 255, .1),
    0 0 20px rgba(179, 140, 255, .6), 0 2px 5px rgba(0, 0, 0, .6);
}
.pc-body { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; width: 100%; flex: 1; }
.pc-tag { font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #9fb3c2; }
.pick-card.new .pc-tag { color: #b9cf7a; }
.pick-card.boon .pc-tag { color: #f09a8e; }
.pick-card.evo .pc-tag { color: #d9b8ff; }
.pc-name { font: 700 19px/1.15 var(--gt-display); letter-spacing: .04em; color: #fbf5e4; text-shadow: 0 2px 0 #000; }
.pick-card.evo .pc-name {
  font-size: 20px; background: var(--gt-gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 2px 0 #120c03);
}
.pc-pips { margin: 4px 0 2px; gap: 5px; }
.pc-pips b { width: 7px; height: 7px; }
.pc-text { font-size: 13px; line-height: 1.4; color: #c9c2b0; }
.pc-text::before {
  content: ''; display: block; width: 64px; height: 1px; margin: 4px auto 9px;
  background: linear-gradient(90deg, transparent, var(--gt-gold-mid), transparent);
}
.pc-hint {
  margin-top: auto; padding-top: 9px; width: 100%; border-top: 1px solid rgba(107, 83, 32, .7);
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 11.5px; line-height: 1.25; color: #d8c8f0; text-align: left;
}
.pc-hint b { color: #f0d68a; font-weight: 700; }
.pc-hint .gt-ico { font-size: 20px; color: #d9b8ff; filter: drop-shadow(0 0 5px rgba(179, 140, 255, .7)); }

#rerollBtn { display: inline-flex; align-items: center; gap: 8px; margin-top: 0; }
#rerollBtn .gt-ico { font-size: 16px; color: var(--gt-gold-hi); }
#rerollBtn b { color: var(--gt-gold-hi); font-weight: 700; }

.pick-coach {
  max-width: min(520px, calc(100vw - 28px)); padding: 7px 16px; text-align: center; font-size: 13px; line-height: 1.45;
  color: #f3ead2; background: rgba(6, 8, 10, .82); border: 1px solid var(--gt-gold-lo); box-shadow: inset 0 0 0 1px #050607;
}
.pick-coach .gt-ico { font-size: 17px; color: var(--gt-gold-hi); margin-right: 8px; vertical-align: -.2em; }
.pick-coach b { color: #fff; }

/* The ROW card: icon left, words right. Used wherever a tall card cannot fit
   — co-op (the fight goes on behind the cards), phones, short screens. */
.pick-pane.live {
  background: none; pointer-events: none; justify-content: flex-end; gap: 8px;
  padding-bottom: calc(52px + env(safe-area-inset-bottom));
}
.pick-pane.live > * { pointer-events: auto; }
.pick-pane.live .pick-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; justify-content: center;
  padding: 5px 16px 6px; background: rgba(6, 8, 10, .86); border: 1px solid var(--gt-gold-lo);
  box-shadow: inset 0 0 0 1px #050607;
}
.pick-pane.live .pick-head .gt-flourish { display: none; }
.pick-pane.live .pick-title { font-size: 17px; letter-spacing: .16em; filter: none; }
.pick-pane.live .pick-sub { font-size: 11px; letter-spacing: .12em; }
.pick-pane.live .pick-timer { flex-basis: 100%; margin-top: 3px; }
.pick-pane.live .pick-cards { gap: 14px; }
.pick-pane.live #rerollBtn { padding: 5px 12px; font-size: 11px; min-height: 0; }
.pick-pane.live .pick-card {
  flex-direction: row; align-items: center; text-align: left; gap: 12px;
  width: 300px; min-height: 0; padding: 9px 12px 9px 10px;
}
.pick-pane.live .pick-card.evo { min-height: 0; }
.pick-pane.live .pc-icon { width: 54px; height: 54px; font-size: 36px; }
.pick-pane.live .pick-card.evo .pc-icon { width: 58px; height: 58px; font-size: 40px; }
.pick-pane.live .pc-body { align-items: flex-start; gap: 2px; }
.pick-pane.live .pc-tag { font-size: 9px; }
.pick-pane.live .pc-name { font-size: 15px; }
.pick-pane.live .pc-pips { display: none; }
.pick-pane.live .pc-text { font-size: 12px; line-height: 1.3; }
.pick-pane.live .pc-text::before { display: none; }
.pick-pane.live .pc-hint { margin-top: 2px; padding-top: 0; border-top: 0; justify-content: flex-start; font-size: 11px; }
.pick-pane.live .pc-hint .gt-ico { font-size: 15px; }
.pick-pane.live .pc-banner { left: auto; right: 12px; transform: none; top: -12px; padding: 4px 14px 3px; font-size: 9px; }

/* ── how to play ─────────────────────────────────────────────────── */
.help-pane {
  position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  background: rgba(3, 4, 6, .88); padding: 14px; overflow-y: auto;
}
.help-card { width: min(600px, 100%); max-height: 100%; overflow-y: auto; padding: 20px 24px 18px; color: var(--gt-bone); text-align: center; }
.help-steps { list-style: none; margin: 4px 0 16px; padding: 0; font-size: 13.5px; line-height: 1.45; text-align: left; }
.help-steps li { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(107, 83, 32, .28); }
.help-steps li:last-child { border-bottom: 0; }
.help-steps b { color: #fbf5e4; }
.help-ico, .pitch-ico { width: 36px; height: 36px; font-size: 24px; }
.help-ico.soul, .pitch-ico.soul { color: var(--gt-soul); }
.help-ico.evo, .pitch-ico.evo { color: #d9b8ff; }
.help-ico.gold { color: var(--gt-gold-hi); }
.help-ico.blood { color: #ff9a8c; }
.help-ico.life { color: #b6f0bd; }
.gem { display: inline-block; font-size: 14px; margin: 0 -1px; }
.gem.blue { color: #7fc4ff; } .gem.green { color: #7be08a; } .gem.red { color: #ff7a84; }
.inline-ico { font-size: 17px; }
.inline-ico.gold { color: var(--gt-gold-hi); }

/* ── overlays / the gate ─────────────────────────────────────────── */
#lobbyOverlay {
  position: fixed; inset: 0; display: flex; align-items: flex-start;
  justify-content: center; z-index: 10; overflow-y: auto; padding: 16px 0;
  /* the baked key art (art/key_art.webp, set from JS so it carries GRAVE_V),
     darkened; without it the night gradients underneath are the backdrop */
  background:
    linear-gradient(180deg, rgba(5, 7, 9, .58) 0%, rgba(5, 7, 9, .3) 36%, rgba(5, 7, 9, .86) 100%),
    radial-gradient(900px 420px at 50% -8%, rgba(127, 196, 255, .16), transparent 62%),
    radial-gradient(700px 360px at 50% 108%, rgba(163, 35, 28, .22), transparent 60%),
    var(--gt-key-art, none) center / cover no-repeat,
    linear-gradient(180deg, #0d1418 0%, #0a0d10 55%, #050708 100%);
  scrollbar-width: thin; scrollbar-color: var(--gt-gold-lo) #07090b;
}
.card {
  position: relative; width: min(540px, calc(100vw - 20px)); padding: 16px 24px 12px; margin: auto;
  color: var(--gt-bone); text-align: center;
}
.card.lobby-wide { width: min(960px, calc(100vw - 20px)); }
.card.results-wide { width: min(840px, calc(100vw - 20px)); }

.title-over { font: 600 10.5px/1.2 var(--gt-display); letter-spacing: .3em; text-indent: .3em; text-transform: uppercase; color: var(--gt-gold); margin-top: 8px; }
.gt-title {
  margin: 4px 0 0; font: 900 clamp(34px, 10.2vw, 60px)/1.05 var(--gt-display); letter-spacing: .08em; text-indent: .08em;
  background: var(--gt-gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #120c03) drop-shadow(0 0 26px rgba(201, 162, 74, .42));
}
.gt-title.small { font-size: clamp(24px, 5.5vw, 32px); margin: 2px 0 4px; }
.title-accent { background: var(--gt-blood-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
#resultTitle { background-image: var(--gt-blood-text); filter: drop-shadow(0 3px 0 #1b0403) drop-shadow(0 0 22px rgba(224, 69, 58, .45)); }
#resultTitle.win, .gt-title.win {
  background-image: var(--gt-gold-text);
  filter: drop-shadow(0 3px 0 #120c03) drop-shadow(0 0 30px rgba(240, 214, 138, .7));
}
.tagline { margin: 0 0 14px; color: #c9c2b0; font-size: 14px; line-height: 1.5; }
.instructions { margin: 14px 0 6px; display: grid; gap: 6px; text-align: left; }
.pitch { display: flex; align-items: center; gap: 11px; padding: 5px 10px 5px 5px; }
.pitch b { display: block; font: 700 12.5px/1.2 var(--gt-display); letter-spacing: .08em; text-transform: uppercase; color: #fbf5e4; }
.pitch i { display: block; font-style: normal; font-size: 12px; color: var(--gt-dim); margin-top: 1px; }
.section-label {
  display: flex; align-items: center; gap: 10px; margin: 12px 0 8px; text-align: left;
  font: 700 11.5px/1 var(--gt-display); letter-spacing: .24em; text-transform: uppercase; color: var(--gt-gold);
}
.section-label::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gt-gold-lo), transparent); }
.section-label .muted { font: 400 11px/1 "Segoe UI", system-ui, sans-serif; letter-spacing: 0; text-transform: none; }

input#nameInput {
  width: 100%; padding: 12px 14px; font-size: 15px; text-align: center; color: var(--gt-bone);
  background: #07090b; border: 1px solid var(--gt-gold-lo); border-radius: 2px;
  box-shadow: inset 0 0 0 1px #050607, inset 0 3px 8px rgba(0, 0, 0, .8);
  outline: none; margin-bottom: 10px; -webkit-user-select: text; user-select: text;
}
input#nameInput:focus { border-color: var(--gt-gold-hi); box-shadow: inset 0 0 0 1px #050607, inset 0 3px 8px rgba(0, 0, 0, .8), 0 0 12px rgba(201, 162, 74, .3); }
input#nameInput::placeholder { color: #5d665f; }
/* the shared account chip writes a pictograph before "Playing as": redraw the words */
.account-playing-as { font-size: 0; margin: 2px 0 12px; color: var(--gt-dim); }
.account-playing-as::before { content: 'Playing as '; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.account-playing-as-name { font: 700 17px/1.3 var(--gt-display); color: var(--gt-bone); }

button.primary {
  width: 100%; padding: 13px 14px 12px; margin-top: 4px; cursor: pointer;
  font: 700 15px/1.1 var(--gt-display); letter-spacing: .16em; text-transform: uppercase; color: #f8e9c4;
  text-shadow: 0 2px 0 #1b0403;
  background: var(--gt-grain), linear-gradient(180deg, #a52d24 0%, #7d1c16 48%, #5c130f 52%, #44100c 100%);
  border: 1px solid #1b0403; border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(240, 214, 138, .6), inset 0 0 0 2px #2a0705, inset 0 3px 0 2px rgba(255, 255, 255, .12),
    0 3px 0 #150302, 0 8px 18px rgba(0, 0, 0, .6);
  transition: filter .1s;
}
button.primary:hover { filter: brightness(1.15); }
button.primary:active { transform: translateY(2px); box-shadow: inset 0 0 0 1px rgba(240, 214, 138, .6), inset 0 0 0 2px #2a0705, 0 1px 0 #150302; }
button.primary:disabled { opacity: .6; filter: saturate(.5); }
button.ghost {
  margin-top: 9px; padding: 9px 16px 8px; min-height: 36px; cursor: pointer;
  font: 700 11.5px/1.1 var(--gt-display); letter-spacing: .16em; text-transform: uppercase; color: var(--gt-bone);
  background: var(--gt-iron-bg); border: 1px solid var(--gt-ink); border-radius: 2px;
  box-shadow: inset 0 0 0 1px var(--gt-gold-lo), inset 0 3px 4px rgba(255, 255, 255, .06), 0 2px 6px rgba(0, 0, 0, .5);
}
button.ghost:hover { color: var(--gt-gold-hi); box-shadow: inset 0 0 0 1px var(--gt-gold), 0 0 10px rgba(201, 162, 74, .25); }
button.ghost > .gt-ico { font-size: 15px; margin-right: 7px; color: var(--gt-gold-hi); }
.back-link { display: inline-block; margin-top: 12px; color: var(--gt-dim); font-size: 12.5px; text-decoration: none; letter-spacing: .04em; }
.back-link:hover { color: var(--gt-gold-hi); }
.lobby-audio { margin-bottom: 8px; display: flex; justify-content: center; }

/* the hero gallery: a niche with the figure, a plate with the words */
.hero-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hero-card {
  position: relative; display: flex; flex-direction: column; padding: 0; cursor: pointer;
  font-family: inherit; color: var(--gt-bone); text-align: center;
  background: var(--gt-stone-bg);
  border: 7px solid transparent; border-image: var(--gt-frame-steel) 20 / 20px stretch;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .6);
  transition: box-shadow .15s;
}
.hero-card:hover { box-shadow: 0 0 0 1px rgba(240, 214, 138, .5), 0 8px 20px rgba(0, 0, 0, .7); }
.hero-card.on {
  border-image-source: var(--gt-frame-gold);
  box-shadow: 0 0 0 1px var(--hero, #f0d68a), 0 0 26px color-mix(in srgb, var(--hero, #f0d68a) 60%, transparent), 0 8px 20px rgba(0, 0, 0, .7);
}
.hero-niche {
  position: relative; display: block; height: 152px; overflow: hidden;
  background:
    radial-gradient(ellipse 78% 46% at 50% 104%, color-mix(in srgb, var(--hero, #8fb4d9) 42%, transparent), transparent 72%),
    radial-gradient(ellipse 60% 70% at 50% 30%, rgba(127, 196, 255, .07), transparent 70%),
    linear-gradient(180deg, #06090b 0%, #10171b 70%, #0b1013 100%);
  border-bottom: 1px solid var(--gt-gold-lo);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, .85);
}
.hero-card:not(.on) .hero-niche { filter: saturate(.55) brightness(.78); }
.hero-card:not(.on):hover .hero-niche { filter: saturate(.85) brightness(.95); }
.hero-portrait { position: absolute; inset: 8px 0 0; display: flex; align-items: flex-end; justify-content: center; }
.hero-portrait img { height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .75)); }
/* before the portraits are baked: the crest, large, in the hero's colour */
.hero-portrait.noart { inset: 0; align-items: center; color: var(--hero, #e9e2d0); }
.hero-portrait.noart .gt-ico { font-size: 92px; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .8)) drop-shadow(0 0 18px color-mix(in srgb, var(--hero, #fff) 55%, transparent)); }
.hero-portrait.noart + .hero-crest { display: none; }
.hero-crest { position: absolute; left: 6px; top: 6px; width: 28px; height: 28px; font-size: 18px; border-radius: 50%; color: var(--hero, #f0d68a); }
.hero-plate { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 1; padding: 9px 9px 11px; }
.hero-name { font: 700 16px/1.15 var(--gt-display); letter-spacing: .06em; color: #fbf5e4; text-shadow: 0 2px 0 #000; }
.hero-card.on .hero-name { background: var(--gt-gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.hero-weapon { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; font-size: 11.5px; color: #cdbf9a; white-space: nowrap; }
.hero-weapon span { overflow: hidden; text-overflow: ellipsis; }
.hero-weapon .gt-ico { font-size: 15px; color: var(--gt-gold-hi); }
.hero-desc { font-size: 11.5px; line-height: 1.38; color: #a9ab9f; min-height: 4.1em; }
.hero-stats { display: flex; justify-content: center; gap: 14px; margin-top: auto; padding-top: 3px; }
.hero-stat { display: inline-flex; align-items: center; gap: 6px; }
.hero-stat .gt-ico { font-size: 12px; color: #c9a8a0; }
.hero-stat .gt-pips b { width: 5px; height: 5px; }
.hero-blurb { display: none; min-height: 34px; margin-top: 8px; font-size: 12.5px; line-height: 1.4; color: #c9c2b0; }

.lobby-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 4px; }
.lobby-col { min-width: 0; }

/* the yards: a view of the ground, a difficulty ribbon, a line of warning */
.arena-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.arena-card {
  display: flex; flex-direction: column; padding: 0; text-align: left; cursor: pointer;
  font-family: inherit; color: var(--gt-bone);
  background: var(--gt-stone-bg); border: 1px solid var(--gt-ink); border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(93, 107, 115, .8), 0 4px 12px rgba(0, 0, 0, .55);
}
.arena-card.on { box-shadow: inset 0 0 0 1px var(--gt-gold-hi), 0 0 0 1px var(--gt-gold-mid), 0 0 18px rgba(201, 162, 74, .4), 0 4px 12px rgba(0, 0, 0, .55); }
.arena-card:disabled { cursor: default; }
.arena-card:not(.on) .arena-pic { filter: saturate(.5) brightness(.7); }
.arena-card:not(.on):not(:disabled):hover .arena-pic { filter: saturate(.85) brightness(.92); }
.arena-pic { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; margin: 2px 2px 0; border-bottom: 1px solid var(--gt-gold-lo); }
.arena-thumb { position: absolute; inset: 0; display: block; }
.arena-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.arena-thumb::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 22px rgba(0, 0, 0, .8); }
/* before the thumbnails are baked: the yard's own night */
.arena-thumb.noart { background: radial-gradient(ellipse 80% 70% at 50% 100%, rgba(93, 111, 106, .55), transparent 70%), linear-gradient(180deg, #0b1013, #1b2024); }
.arena-thumb.noart { display: flex; align-items: center; justify-content: center; font-size: 46px; color: rgba(201, 214, 207, .5); }
.arena-card[data-arena="marsh"] .arena-thumb.noart { background: radial-gradient(ellipse 80% 70% at 50% 100%, rgba(76, 107, 74, .6), transparent 70%), linear-gradient(180deg, #080d0b, #161f1b); }
.arena-card[data-arena="cathedral"] .arena-thumb.noart { background: radial-gradient(ellipse 80% 70% at 50% 100%, rgba(109, 95, 122, .6), transparent 70%), linear-gradient(180deg, #0c0a10, #1e1b22); }
.arena-pic .tier {
  position: absolute; left: 0; top: 7px; padding: 3px 14px 2px 8px; font: 700 9px/1.2 var(--gt-display); font-style: normal;
  letter-spacing: .2em; text-transform: uppercase; color: #10151a;
  background: linear-gradient(180deg, #cfd9de, #8b9aa3);
  clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 50%, 100% 100%, 0 100%);
}
.arena-pic .tier-harder { background: linear-gradient(180deg, #fbeec2, #c9a24a); color: #1a1206; }
.arena-pic .tier-hardest { background: linear-gradient(180deg, #ff8a7a, #a3231c); color: #fff1e8; }
.arena-text { display: block; padding: 7px 10px 9px; }
.arena-name { display: block; font: 700 13px/1.2 var(--gt-display); letter-spacing: .05em; color: #fbf5e4; }
.arena-card.on .arena-name { color: var(--gt-gold-hi); }
.arena-blurb { display: block; margin-top: 3px; font-size: 11px; line-height: 1.35; color: var(--gt-dim); }

.squad-count { color: #cdbf9a; font-size: 12px; line-height: 1.4; margin: 0 0 8px; text-align: left; }
.player-list { max-height: 196px; overflow-y: auto; margin-bottom: 10px; scrollbar-width: thin; scrollbar-color: var(--gt-gold-lo) #07090b; }
.player-row { display: flex; align-items: center; gap: 9px; padding: 4px 9px 4px 4px; margin-bottom: 4px; font-size: 13.5px; line-height: 1.25; text-align: left; }
.player-row.me { border-color: var(--gt-gold-mid); }
.pl-crest { width: 28px; height: 28px; font-size: 19px; }
.pl-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.player-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pl-hero { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gt-dim); }
.pl-tag { display: inline-flex; align-items: center; gap: 4px; font: 700 9px/1 var(--gt-display); letter-spacing: .16em; text-transform: uppercase; color: var(--gt-dim); }
.pl-tag.host { color: var(--gt-gold-hi); }
.pl-tag .gt-ico { font-size: 13px; }
#waitHost { font-size: 12.5px; margin: 10px 0 4px; }

/* the leaderboard (web/shared/rankings.js): its tokens, and our lettering */
.leaderboard { margin-top: 14px; text-align: left; }
.lb-panel, .lb-card {
  --lb-panel: #0a0d0f;
  --lb-text: #e9e2d0;
  --lb-dim: rgba(233, 226, 208, .6);
  --lb-accent: #c9a24a;
  --lb-edge: rgba(107, 83, 32, .7);
}
.lb-panel { border-radius: 2px; box-shadow: inset 0 0 0 1px #050607, inset 0 3px 10px rgba(0, 0, 0, .6); }
.lb-title { font: 700 12.5px/1.2 var(--gt-display); letter-spacing: .22em; text-transform: uppercase; color: var(--gt-gold-hi); }
.lb-pill { border-radius: 2px; letter-spacing: .06em; }
.lb-pill.on { color: var(--gt-gold-hi); }
.lb-head { letter-spacing: .12em; }
.lb-card {
  border: 9px solid transparent; border-image: var(--gt-frame-gold) 20 / 20px stretch; border-radius: 0;
  background: var(--gt-stone-bg); box-shadow: 0 24px 70px rgba(0, 0, 0, .8);
}
.lb-card .lb-panel { box-shadow: none; }
/* the top three: the shared module draws medal pictographs — ours are numerals */
.lb-top1 .lb-rank, .lb-top2 .lb-rank, .lb-top3 .lb-rank { font-size: 0; }
.lb-top1 .lb-rank::before, .lb-top2 .lb-rank::before, .lb-top3 .lb-rank::before { font: 900 12px/1 var(--gt-display); letter-spacing: .04em; }
.lb-top1 .lb-rank::before { content: 'I'; color: var(--gt-gold-hi); text-shadow: 0 0 6px rgba(240, 214, 138, .6); }
.lb-top2 .lb-rank::before { content: 'II'; color: #cfd6da; }
.lb-top3 .lb-rank::before { content: 'III'; color: #c98a52; }
.lb-close { border-radius: 2px; font-family: var(--gt-display); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }

.pane-sigil { width: 60px; height: 60px; font-size: 40px; margin: 12px auto 12px; }
.pane-sigil.blood { color: #ff9a8c; }
#loadPane, #countPane, #errorPane { padding: 6px 0 14px; }
.peers { min-height: 16px; font-size: 12.5px; margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.peer { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; color: var(--gt-bone); }
.peer .gt-ico { font-size: 14px; color: var(--gt-dim); }
.peer.ready .gt-ico { color: var(--gt-life); }
.countdown {
  font: 900 100px/1.1 var(--gt-display);
  background: var(--gt-blood-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 #1b0403) drop-shadow(0 0 30px rgba(224, 69, 58, .6));
}

#lobbyChat { --chat-bg: #0a0d0f; }
#lobbyChat .mps-chat {
  margin-top: 12px; background: #0a0d0f; border: 1px solid var(--gt-gold-lo); border-radius: 2px;
  box-shadow: inset 0 0 0 1px #050607, inset 0 3px 10px rgba(0, 0, 0, .7);
}
#lobbyChat .mps-chat-messages { color: #c9c2b0; max-height: 84px; }
#lobbyChat .mps-chat-line b { color: var(--gt-gold-hi); }
#lobbyChat .mps-chat-input { background: #050607; border: 1px solid #2a3338; border-radius: 2px; color: var(--gt-bone); }
#lobbyChat .mps-chat-input:focus { border-color: var(--gt-gold); }
#lobbyChat .mps-chat-send {
  font: 700 11px/1 var(--gt-display); letter-spacing: .14em; text-transform: uppercase; color: var(--gt-bone);
  background: var(--gt-iron-bg); border: 1px solid var(--gt-ink); border-radius: 2px; box-shadow: inset 0 0 0 1px var(--gt-gold-lo);
}

/* ── results ─────────────────────────────────────────────────────── */
.result-summary { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 6px 0 14px; }
.rs-chip { display: inline-flex; align-items: center; gap: 9px; padding: 6px 13px 6px 10px; text-align: left; }
.rs-chip > .gt-ico { font-size: 22px; color: var(--gt-gold-hi); filter: drop-shadow(0 1px 0 #000); }
.rs-chip b { display: block; font: 700 18px/1.05 var(--gt-display); color: #fbf5e4; font-variant-numeric: lining-nums; }
.rs-chip b small { font-size: 12px; color: var(--gt-dim); }
.rs-chip i { display: block; font-style: normal; font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--gt-dim); margin-top: 2px; }
#resultTable {
  overflow-x: auto; padding: 4px 6px; background: #0a0d0f; border: 1px solid var(--gt-gold-lo); border-radius: 2px;
  box-shadow: inset 0 0 0 1px #050607, inset 0 3px 10px rgba(0, 0, 0, .6);
}
#resultTable .fs-table { width: max-content; min-width: 100%; font-size: .86rem; }
#resultTable .fs-table th, #resultTable .fs-table td { padding: 7px 10px; }
#resultTable .fs-table th { font-family: var(--gt-display); font-weight: 700; letter-spacing: .14em; }
#resultTable, #resultAwards {
  --fs-panel: #0d1215;
  --fs-text: #e9e2d0;
  --fs-dim: rgba(233, 226, 208, .6);
  --fs-accent: #c9a24a;
  --fs-edge: rgba(107, 83, 32, .6);
}
#resultAwards .fs-award {
  background: var(--gt-stone-bg); border: 1px solid var(--gt-gold-lo); border-left: 3px solid var(--gt-gold-mid);
  border-radius: 2px; box-shadow: var(--gt-plate-shadow);
}
#resultAwards .fs-award.fs-mine { border-color: var(--gt-gold-hi); box-shadow: var(--gt-plate-shadow), 0 0 14px rgba(201, 162, 74, .3); }
#resultAwards .fs-award-icon { width: 40px; height: 40px; font-size: 26px; }
#resultAwards .fs-award-title { font: 700 11px/1.2 var(--gt-display); letter-spacing: .16em; color: var(--gt-gold-hi); }
#resultsPane #againBtn { margin-top: 12px; }

body.gt-paused #game { filter: grayscale(.6) brightness(.7); }

/* ── a wide lobby: the title and the audio strip share the top line ── */
@media (min-width: 761px) {
  .card.lobby-wide .lobby-audio { position: absolute; right: 22px; top: 14px; margin: 0; }
  .card.lobby-wide #lobbyPane > .gt-title { text-align: left; margin-top: 4px; }
}
@media (max-width: 760px) {
  .hero-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .hero-niche { height: 112px; }
  .hero-portrait.noart .gt-ico { font-size: 64px; }
  .hero-desc, .hero-stats { display: none; }
  .hero-plate { padding: 7px 6px 8px; gap: 3px; }
  .hero-blurb { display: block; }
  .lobby-cols { grid-template-columns: 1fr; gap: 0; }
  .arena-pick { grid-template-columns: 1fr; gap: 7px; }
  .arena-card { flex-direction: row; align-items: stretch; }
  .arena-pic { width: 128px; flex: none; aspect-ratio: auto; min-height: 64px; margin: 2px 0 2px 2px; border-bottom: 0; border-right: 1px solid var(--gt-gold-lo); }
  .arena-text { align-self: center; }
}

/* ── phones ──────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .xp-medal { width: 42px; height: 42px; left: 5px; }
  #xpLabel { font-size: 17px; }
  .hud-top { left: 52px; right: 6px; gap: 5px; }
  .gt-time { font-size: 23px; }
  .clock-plate { padding: 4px 20px 3px; }
  .gt-sub { font-size: 8.5px; letter-spacing: .14em; }
  .hud-chip { min-width: 0; gap: 6px; padding: 3px 8px 3px 4px; }
  .hud-chip.right { padding: 3px 4px 3px 8px; }
  .chip-ico { width: 24px; height: 24px; font-size: 15px; }
  .gt-label { font-size: 7.5px; letter-spacing: .12em; }
  .gt-value { font-size: 16px; }
  .hud-party { width: 150px; top: calc(80px + env(safe-area-inset-top)); left: 6px; }
  .pr-row { grid-template-columns: 24px minmax(0, 1fr) auto; column-gap: 6px; font-size: 11.5px; padding: 3px 6px 4px 4px; }
  .pr-crest { width: 24px; height: 24px; font-size: 15px; }
  .hud-toast { top: calc(80px + env(safe-area-inset-top)); right: 6px; max-width: 54vw; }
  .toast { font-size: 11px; gap: 6px; padding: 3px 8px 3px 3px; }
  .toast-ico { width: 22px; height: 22px; font-size: 15px; }
  .boss-bar { top: auto; bottom: calc(200px + env(safe-area-inset-bottom)); width: calc(100vw - 76px); left: 10px; transform: none; }
  .boss-name { font-size: 12.5px; letter-spacing: .2em; }
  .boss-track { height: 15px; }
  .boss-crest { width: 40px; height: 40px; font-size: 23px; }
  #minimap { width: 92px; height: 92px; right: 8px; }
  .hud-build { left: 8px; bottom: calc(52px + env(safe-area-inset-bottom)); max-width: calc(100vw - 120px); gap: 10px; }
  .bd-row { gap: 5px; flex-wrap: wrap; row-gap: 10px; }
  .bd-item { width: 34px; height: 34px; font-size: 22px; }
  .bd-item.charm { width: 28px; height: 28px; font-size: 17px; }
  .bd-item.empty { display: none; }
  .bd-item .gt-pips b { width: 3px; height: 3px; }
  /* 40 px: a thumb's worth */
  #hud .hud-buttons { right: 8px; bottom: calc(152px + env(safe-area-inset-bottom)); gap: 5px; }
  .hud-btn { width: 40px; height: 40px; font-size: 19px; }
  #hudAudio { left: 6px; transform: none; max-width: calc(100vw - 12px); }
  #hudAudio .mps-audio-slider { width: 50px; flex-basis: 50px; }
  .mps-audio-btn { padding: 0 8px; gap: 5px; min-height: 40px; }
  /* clear of the button column on the right edge */
  .hud-coach { bottom: calc(158px + env(safe-area-inset-bottom)); font-size: 13px; padding: 8px 12px;
    left: 8px; transform: none; width: calc(100vw - 66px); }
  .hud-status { top: calc(176px + env(safe-area-inset-top)); font-size: 12px; }
  /* the boss bar sits low on a phone: the coach line steps over it */
  #hud.has-boss .hud-coach { bottom: calc(262px + env(safe-area-inset-bottom)); }
  /* three toasts at most, and the banner below them, or they share the sky */
  .hud-toast .toast:nth-child(n+4) { display: none; }
  .hud-center { top: 37%; }
  .title-over { font-size: 9.5px; letter-spacing: .16em; text-indent: .16em; }
  .hud-center .small { letter-spacing: .18em; font-size: 11px; }

  .card { padding: 12px 12px 10px; }
  .gt-title { letter-spacing: .06em; text-indent: .06em; }
  .rs-chip { padding: 5px 10px 5px 8px; gap: 7px; }
  .rs-chip b { font-size: 15px; }
  .rs-chip > .gt-ico { font-size: 18px; }
  #resultTable .fs-table { font-size: .78rem; }
  .help-card { padding: 14px 14px 12px; }
  .help-steps { font-size: 12.5px; }
  .help-steps li { gap: 10px; padding: 5px 0; }
  .help-ico { width: 32px; height: 32px; font-size: 21px; }
  .gt-heading { font-size: 17px; }
  button.ghost { min-height: 40px; }
}

/* the ROW card again, for a phone or a short screen (see .pick-pane.live) */
@media (max-width: 560px), (max-height: 560px) {
  .pick-pane { gap: 10px; padding: 10px; }
  .pick-head .gt-flourish { margin: 5px auto 4px; width: 200px; }
  .pick-cards { gap: 12px; }
  .pick-card, .pick-card.evo {
    flex-direction: row; align-items: center; text-align: left; gap: 12px;
    width: min(380px, calc(100vw - 30px)); min-height: 0; padding: 12px 12px 12px 10px;
  }
  .pick-card:hover, .pick-card:focus-visible { top: 0; }
  .pc-icon { width: 60px; height: 60px; font-size: 40px; }
  .pick-card.evo .pc-icon { width: 64px; height: 64px; font-size: 44px; }
  .pc-body { align-items: flex-start; gap: 3px; }
  .pc-name { font-size: 16.5px; }
  .pick-card.evo .pc-name { font-size: 17px; }
  .pc-pips { margin: 2px 0 1px; }
  .pc-pips b { width: 6px; height: 6px; }
  .pc-text { font-size: 12.5px; line-height: 1.32; }
  .pc-text::before { display: none; }
  .pc-hint { margin-top: 3px; padding-top: 5px; justify-content: flex-start; font-size: 11px; }
  .pc-hint .gt-ico { font-size: 16px; }
  .pc-banner { left: auto; right: 12px; transform: none; top: -12px; padding: 4px 14px 3px; font-size: 9px; }
  .pc-key { top: -10px; left: -8px; width: 22px; height: 22px; font-size: 11px; }
  #rerollBtn { min-height: 40px; }

  .pick-pane.live { padding-bottom: calc(50px + env(safe-area-inset-bottom)); gap: 6px; }
  .pick-pane.live .pick-cards { gap: 9px; }
  .pick-pane.live .pick-card { width: min(380px, calc(100vw - 30px)); padding: 6px 10px 6px 8px; gap: 10px; }
  .pick-pane.live .pc-icon, .pick-pane.live .pick-card.evo .pc-icon { width: 44px; height: 44px; font-size: 30px; }
  .pick-pane.live .pc-body { gap: 0; }
  .pick-pane.live .pc-tag { font-size: 8.5px; }
  .pick-pane.live .pc-name { font-size: 14px; }
  .pick-pane.live .pc-text, .pick-pane.live .pc-hint { font-size: 11px; line-height: 1.25; }
  .pick-pane.live .pc-hint { padding-top: 0; }
  .pick-pane.live .pick-title { font-size: 14px; }
  .pick-pane.live .pick-sub { font-size: 10px; }
  .pick-pane.live #rerollBtn { min-height: 34px; }
}
/* a short, WIDE screen (a phone on its side): the three rows sit side by side */
@media (max-height: 560px) and (min-width: 561px) {
  .pick-cards { flex-wrap: nowrap; max-width: calc(100vw - 20px); }
  .pick-card, .pick-card.evo, .pick-pane.live .pick-card { width: min(300px, calc((100vw - 60px) / 3)); align-items: flex-start; }
  .pick-title { font-size: 24px; }
}
/* a phone on its side: 390 px of height. The party list goes; the buttons
   become a row beside the minimap; the coach speaks under the clock. */
@media (max-height: 520px) {
  .hud-party { display: none; }
  #minimap { width: 92px; height: 92px; bottom: calc(10px + env(safe-area-inset-bottom)); }
  #hud .hud-buttons {
    flex-direction: row; top: auto; bottom: calc(10px + env(safe-area-inset-bottom));
    right: calc(118px + env(safe-area-inset-right));
  }
  .hud-btn { width: 40px; height: 40px; font-size: 19px; }
  #hudAudio { bottom: calc(58px + env(safe-area-inset-bottom)); }
  .hud-build { bottom: calc(16px + env(safe-area-inset-bottom)); }
  .bd-item.empty { display: none; }
  .hud-toast { top: calc(74px + env(safe-area-inset-top)); max-width: 206px; }
  .hud-toast .toast:nth-child(n+3) { display: none; }
  .toast { font-size: 11.5px; }
  .boss-bar { width: min(400px, calc(100vw - 40px)); top: calc(84px + env(safe-area-inset-top)); bottom: auto; left: 50%; transform: translateX(-50%); }
  /* the coach: low, between the build strip and the button row */
  .hud-coach, #hud.has-boss .hud-coach {
    top: auto; bottom: calc(60px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
    width: min(400px, calc(100vw - 28px)); font-size: 12.5px; padding: 6px 12px;
  }
  .hud-status { top: calc(132px + env(safe-area-inset-top)); }
  .hud-center { top: 41%; }
  .hud-center .big { font-size: clamp(18px, 4.4vw, 26px); }
  .center-rule { margin-top: 4px; }
  .hud-center .small { margin-top: 4px; font-size: 10.5px; }
  .help-steps li { padding: 3px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pick-card.evo, .bd-item.evo, .hud-center .big, .toast { animation: none; }
}
