/* PIVArena · Terminal — IBM PC / 3270 phosphor console. Fonts: IBM Plex Mono, IBM Plex Sans Condensed, VT323 (all OFL). */
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/themes/plexmono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/themes/plexmono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/themes/plexmono-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/themes/plexmono-700.woff2') format('woff2'); font-weight: 700 800; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans Condensed'; src: url('/fonts/themes/plexcond-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans Condensed'; src: url('/fonts/themes/plexcond-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'VT323'; src: url('/fonts/themes/vt323.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --ph: #33ff66; --ph-hi: #9dffb6; --ph-mid: #2bbf5a; --ph-dim: #1f7a3a; --ph-faint: #123d20;
  /* PIVX purple console: purple for surfaces, borders, primary buttons and active nav; lavender phosphor text;
     green phosphor only for wins / positive amounts; gold for VIP and big wins. (--amber* names kept: they now hold lavender.) */
  --pv: #662d91; --pv-hi: #7d3fb0; --pv2: #4d3077; --pv3: #2a1b42; --pv4: #130d1e;
  --amber: #c4a1ff; --amb-hi: #e0ccff; --amb-mid: #9a74d6; --amb-dim: #9580c6; --amb-faint: #24173a; --gold: #ffd84a; --red: #ff6b7d;
  --bg: #130d1e; --bg2: #170f25; --panel: #1b1229; --panel2: #2a1b42; --line: #33234f; --line2: #4d3077;
  --text: #ece4ff; --text-2: #c9badf; --muted: #a090c2; --text-hi: #faf6ff; --brand: #662d91; --brand2: #2a1b42; --accent: #33ff66; --accent-strong: #2bbf5a;
  --accent-soft: #9dffb6; --accent-pale: #d6ffe0; --good: #33ff66; --bad: #ff6b7d; --warn: #ffd84a; --info: #8fd8ff;
  --brand-rgb: 102, 45, 145; --accent-rgb: 51, 255, 102; --brand2-rgb: 42, 27, 66; --panel2-rgb: 42, 27, 66; --panel-rgb: 27, 18, 41; --bg-rgb: 19, 13, 30; --bg2-rgb: 23, 15, 37;
  --accent-strong-rgb: 43, 191, 90; --accent-soft-rgb: 157, 255, 182; --accent-pale-rgb: 214, 255, 224; --shade-rgb: 0, 0, 0;
  --input-bg: #0e0918; --btn-1: #662d91; --btn-3: #4d3077; --glass-line: var(--line); --glow: none;
  --font: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace; --mono: var(--font);
  --font-display: 'VT323', 'IBM Plex Mono', monospace; --font-cond: 'IBM Plex Sans Condensed', 'IBM Plex Mono', sans-serif;
  --radius: 0; --radius-sm: 0; --tile-radius: 0; --top-h: 54px; --sb-h: 26px;
  --glow-t: 0 0 6px rgba(51, 255, 102, .45), 0 0 18px rgba(51, 255, 102, .18);
  --glow-a: 0 0 6px rgba(196, 161, 255, .35), 0 0 18px rgba(196, 161, 255, .12);
  --glow-w: 0 0 8px rgba(224, 204, 255, .22);
  --confetti1: #33ff66; --confetti2: #ffd84a; --confetti3: #c4a1ff; --confetti4: #9dffb6;
  /* IBM 3279 colour set, one per game (bright / mid / dim) */
  --g3: var(--ph-hi); --g2: var(--ph-mid); --g1: var(--ph-dim);
}
[data-game=coinflip], .gi-coinflip { --g3: #ffe066; --g2: #c9a227; --g1: #5e4c12; }
[data-game=dice], .gi-dice { --g3: #9dffb6; --g2: #2bbf5a; --g1: #1a6632; }
[data-game=highcard], .gi-highcard { --g3: #ff8a80; --g2: #d0453b; --g1: #5e1f1a; }
[data-game=rps], .gi-rps { --g3: #8ff8ee; --g2: #2bb8ab; --g1: #135650; }
[data-game=chess], .gi-chess { --g3: #f4fbf5; --g2: #9fb3a3; --g1: #3e4a40; }
[data-game=poker], .gi-poker { --g3: #ff9ce4; --g2: #c24fa4; --g1: #57224a; }
[data-game=liarsdice], .gi-liarsdice { --g3: #a8c4ff; --g2: #4f78d0; --g1: #22355e; }
[data-game=mines], .gi-mines { --g3: #ffc94d; --g2: #d08a00; --g1: #5a3b00; }

html { background: var(--bg); }
body { font: 14px/1.55 var(--font); background: var(--bg); letter-spacing: 0; -webkit-font-smoothing: antialiased; }
/* CRT: scanlines + vignette, never interactive */
body::before { content: ''; position: fixed; inset: 0; z-index: 300; pointer-events: none; background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, .28) 2px 3px); }
body::after { content: ''; position: fixed; inset: 0; z-index: 301; pointer-events: none; background: radial-gradient(ellipse 120% 90% at 50% 45%, transparent 62%, rgba(0, 0, 0, .55) 100%); }
::selection { background: var(--pv); color: var(--text-hi); }
a { color: var(--amb-hi); }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 0; }
h1, h2, h3 { letter-spacing: 0; }
h1 { font-family: var(--font-display); font-weight: 400; font-size: 44px; line-height: 1; color: var(--text-hi); text-transform: uppercase; text-shadow: var(--glow-w); }
h2 { font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--amber); }
.pr { color: var(--amb-dim); font-weight: 400; }
.muted { color: var(--muted); }
.good { color: var(--ph) !important; }
.num, .big-num, .og-stake b, .tk-amt, .mh-stakes dd { font-variant-numeric: tabular-nums; }
kbd { display: inline-block; font: 600 10px/1 var(--font); padding: 3px 4px 2px; border: 1px solid currentColor; color: inherit; opacity: .85; letter-spacing: .5px; vertical-align: 1px; }
.mark-px .px1, .gart-px .px1 { fill: var(--g1); }
.mark-px .px2, .gart-px .px2 { fill: var(--g2); }
.mark-px .px3, .gart-px .px3 { fill: var(--g3); }
.mark-px { --g1: #4d3077; --g2: #8f55c9; --g3: #e3d0ff; display: block; }
.mark-wrap { display: block; }
.mark-wrap svg { width: 100%; height: 100%; display: block; }

/* ---------- top bar ---------- */
.topbar { background: var(--bg); backdrop-filter: none; border-bottom: 3px double var(--line2); }
.topbar::after { display: none; }
.brand { gap: 10px; }
.brand .mark { width: 32px; height: 32px; filter: drop-shadow(0 0 6px rgba(51, 255, 102, .35)); }
.brand:hover .mark { transform: none; filter: drop-shadow(0 0 10px rgba(51, 255, 102, .6)); }
.wm { font: 400 30px/1 var(--font-display); letter-spacing: 1px; color: var(--text); text-transform: uppercase; }
.wm b { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--amber); font-weight: 400; text-shadow: var(--glow-a); }
.tagline { font: 500 9px/1 var(--font); letter-spacing: 2.6px; color: var(--muted); margin-top: 3px; }
#nav { gap: 0; margin-left: 18px; }
#nav a { font: 500 12px/1 var(--font); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 7px 10px; border-radius: 0; }
#nav a:hover { color: var(--amb-hi); background: transparent; text-decoration: none; }
#nav a[aria-current=page] { color: #021006; background: var(--ph); box-shadow: 0 0 14px rgba(51, 255, 102, .35); }
.shield-badge { border-radius: 0; background: transparent; border: 1px solid var(--line2); color: var(--amber); font: 600 10.5px/1 var(--font); letter-spacing: 1px; text-transform: uppercase; padding: 6px 8px; }
.shield-badge .ico { display: none; }
.shield-badge::before { content: '■'; font-size: 9px; }
.shield-badge:hover { background: rgba(196, 161, 255, .08); }
.sb-sub { color: #a87400; }
.bal { border-radius: 0; background: transparent; border: 1px solid var(--line2); padding: 4px 10px; gap: 6px; }
.bal b { font: 400 24px/1 var(--font-display); color: var(--text-hi); text-shadow: var(--glow-w); font-weight: 400; }
.unit { color: var(--muted); font-weight: 500; font-size: 11px; letter-spacing: 1px; }
.pivmark { filter: none; }
.who { font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; }
.avatar { border-radius: 0; background: var(--panel2); border: 1px solid var(--line2); color: var(--amber); font: 400 20px/1 var(--font-display); }
.avatar.sm { font-size: 16px; }
.iconbtn { border-radius: 0; }
.pill { border-radius: 0; background: transparent; font: 600 10.5px/1.6 var(--font); letter-spacing: 1px; text-transform: uppercase; }
.pill.warn { color: var(--gold); border-color: #6b5a12; background: transparent; }
.pill.good { color: var(--ph); border-color: var(--ph-dim); background: transparent; }
.pill.info { color: var(--info); border-color: #1d5a55; background: transparent; }
.tag { border-radius: 0; background: transparent; border: 0; padding: 0; color: var(--muted); font: 500 10.5px/1.4 var(--font); letter-spacing: 1px; text-transform: uppercase; }
.vip { border-radius: 0; font-family: var(--font); }

/* ---------- controls ---------- */
button, .btn { text-transform: uppercase; border-radius: 0; background: transparent; border: 1px solid var(--line2); color: var(--text); font: 500 13px/1.2 var(--font); letter-spacing: .5px; box-shadow: none; transition: background .1s, color .1s, border-color .1s, box-shadow .1s; }
button:hover:not(:disabled), .btn:hover { border-color: var(--amber); color: var(--amb-hi); text-decoration: none; }
button:active:not(:disabled), .btn:active { transform: none; }
button.primary, .btn.primary, button.primary:hover:not(:disabled), .btn.primary:hover { background: var(--ph); border-color: var(--ph); color: #021006; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; box-shadow: none; }
button.primary:hover:not(:disabled), .btn.primary:hover { background: var(--ph-hi); border-color: var(--ph-hi); box-shadow: 0 0 0 1px var(--bg), 0 0 0 2px var(--ph-dim), 0 0 22px rgba(51, 255, 102, .35); }
button.ghost, .btn.ghost { background: transparent; border-color: var(--amb-dim); color: var(--amb-hi); text-transform: uppercase; letter-spacing: 1px; }
button.big, .btn.big { font-size: 14px; min-height: 46px; padding: 12px 22px; }
button.danger { border-color: #6b241f; color: var(--red); }
.chip { border-radius: 0; background: transparent; border: 0; min-height: 26px; padding: 2px 4px; color: var(--text-2); font: 500 13px/1 var(--font); }
.chip::before { content: '['; color: var(--amb-dim); } .chip::after { content: ']'; color: var(--amb-dim); }
.chip:hover:not(:disabled), .presets .chip:hover:not(:disabled) { background: var(--pv); color: var(--text-hi); transform: none; }
.chip:hover:not(:disabled)::before, .chip:hover:not(:disabled)::after { color: var(--text-hi); }
input, select, textarea { border-radius: 0; background: var(--input-bg); border: 1px solid var(--line2); color: var(--text-hi); caret-color: var(--amber); font-family: var(--font); }
input::placeholder { color: #6b5a3d; }
input:focus, select:focus { outline: 1px solid var(--amber); border-color: var(--amber); }
.tabs button { border-radius: 0; border: 0; min-height: 28px; padding: 4px 8px; font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.tabs button.on { background: var(--pv); color: var(--text-hi); border: 0; }
.tabs button:hover:not(:disabled):not(.on) { color: var(--amb-hi); }
.panel { border-radius: 0; background: var(--panel); border: 1px solid var(--line); box-shadow: none; backdrop-filter: none; }
.notice { border-radius: 0; background: transparent; border: 1px solid var(--line2); color: var(--amb-hi); font-size: 13px; }
.notice::before { content: 'NOTE '; color: var(--text-hi); background: var(--pv); font-weight: 700; padding: 0 4px; margin-right: 8px; letter-spacing: 1px; }
.notice > .ico { display: none; }
.notice.invite { border-color: var(--amb-dim); color: var(--text); background: transparent; }
.notice.invite::before { display: none; }
.empty { border-radius: 0; color: var(--muted); }
.empty.soft { border-radius: 0; border-style: dashed; }
.modal { border-radius: 0; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 0 0 1px #000, 0 0 0 4px var(--line), 0 30px 80px #000; }
.modal-bg { background: rgba(0, 0, 0, .78); backdrop-filter: none; }
.gico, .gico.sm, .gico.lg, .gico.xs, .feed-item .gico.sm, .match-head .gico.lg { border-radius: 0; background: transparent; border: 1px solid var(--line2); box-shadow: none; }
.gi .p { fill: var(--amber); } .gi .t { fill: var(--amb-mid); } .gi .d { fill: var(--bg2); } .gi .s { stroke: var(--amb-hi); } .gi .s.dk { stroke: var(--amb-dim); }
.live-dot { border-radius: 0; width: 7px; height: 7px; background: var(--amber); box-shadow: 0 0 8px var(--amber); animation: t-blink 1s steps(1) infinite; }
@keyframes t-blink { 50% { opacity: 0; } }
.cursor { display: inline-block; width: .5em; height: .82em; margin-left: .08em; vertical-align: -.04em; background: currentColor; box-shadow: var(--glow-t); animation: t-blink 1.06s steps(1) infinite; }

/* ---------- section heads ---------- */
.sec-head { margin: 34px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); align-items: baseline; }
.sec-head h2 { font-size: 14px; font-weight: 600; letter-spacing: 1.5px; color: var(--amber); text-shadow: 0 0 8px rgba(196, 161, 255, .25); }
.sec-head:not(.tight) h2::before { display: none; }
.sec-head > .muted { font-size: 12px; }
.sec-head .count { color: var(--text-hi); background: var(--pv); padding: 0 6px; margin-left: 6px; font-weight: 700; text-shadow: none; }
.sec-head.tight { border-bottom: 0; padding-bottom: 0; }

/* ---------- hero ---------- */
.hero.term-hero { display: grid; gap: 0; padding: 0; margin: 4px 0 0; border-radius: 0; border: 1px solid var(--line2); background: var(--bg2); clip-path: none; overflow: hidden; }
.hero.term-hero::before, .hero.term-hero::after { display: none; }
.th-main { padding: 22px 18px 24px; min-width: 0; }
.th-sess { display: flex; flex-wrap: wrap; gap: 0; font: 500 10.5px/1 var(--font); letter-spacing: 1.6px; color: var(--muted); text-transform: uppercase; margin-bottom: 22px; }
.th-sess span + span::before { content: '│'; margin: 0 10px; color: var(--line2); }
.th-cmd { font-size: 14px; color: var(--amber); margin-bottom: 10px; }
.th-cmd .dim, .gi-cmd .dim { color: var(--amb-dim); }
.th-cmd .ok { color: #021006; background: var(--ph); margin-left: 10px; padding: 0 4px; font-weight: 700; }
.hero.term-hero h1.th-h1 { margin: 0 0 18px; font: 400 clamp(46px, 14vw, 64px)/.86 var(--font-display); text-transform: uppercase; letter-spacing: -1px; text-shadow: none; }
.th-h1 .l1 { display: block; color: var(--text-hi); text-shadow: var(--glow-w); }
.th-h1 .l2 { display: inline; color: var(--amber); text-shadow: var(--glow-a); }
.term-hero .lead { max-width: 54ch; color: var(--text-2); font-size: 14px; line-height: 1.65; margin: 0 0 22px; }
.term-hero .cta-row { gap: 12px; flex-wrap: wrap; }
.term-hero .cta { animation: none; letter-spacing: 2px; }
.term-hero .btn.ghost kbd { margin-right: 4px; }
.th-side { display: grid; align-content: start; border-top: 1px solid var(--line2); background: var(--panel); }
.th-side-head { display: flex; justify-content: space-between; padding: 7px 14px; font: 600 10.5px/1 var(--font); letter-spacing: 2px; color: var(--text-hi); background: var(--pv); }
.th-side-head .dim { opacity: .65; }
.th-mark { display: none; place-items: center; padding: 26px 0 18px; }
.th-mark svg { width: 168px; height: 168px; filter: drop-shadow(0 0 14px rgba(51, 255, 102, .28)); }
.tform { margin: 0; padding: 10px 16px 16px; display: grid; gap: 2px; }
.ff { display: flex; align-items: baseline; gap: 0; min-width: 0; }
.ff dt { flex: 1; display: flex; align-items: baseline; font: 500 11px/1 var(--font); letter-spacing: 1.4px; color: var(--muted); white-space: nowrap; min-width: 0; }
.ff dt::after { content: ''; flex: 1; min-width: 12px; margin: 0 8px; border-bottom: 2px dotted var(--line2); transform: translateY(-3px); }
.ff dd { margin: 0; font: 400 26px/1.15 var(--font-display); color: var(--text-hi); white-space: nowrap; }
.ff dd .unit { font: 500 10px var(--font); }
.ff dd a, .ff dd > span:only-child { font: 500 12px/2 var(--font); letter-spacing: 1px; color: var(--amb-hi); }
.hero.hero.term-hero.compact h1.th-h1 { font-size: clamp(46px, 11vw, 84px); margin-bottom: 14px; }
.term-hero .hero-balrow { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: flex-end; }
.term-hero .hb-label { font: 600 10.5px/1 var(--font); letter-spacing: 2px; color: var(--muted); }
.term-hero .big-num { font: 400 58px/1 var(--font-display); color: var(--text-hi); text-shadow: var(--glow-w); letter-spacing: 0; }
.term-hero .big-num .unit { font: 500 13px var(--font); }
@media (min-width: 960px) {
  .hero.term-hero { grid-template-columns: minmax(0, 1fr) 330px; }
  .th-main { padding: 26px 34px 32px; }
  .th-side { border-top: 0; border-left: 1px solid var(--line2); }
  .th-mark { display: grid; }
  .hero.term-hero h1.th-h1 { font-size: clamp(64px, 6.2vw, 92px); }
}

/* ---------- ticker (teletype) ---------- */
.ticker { border-radius: 0; height: 34px; margin: 0; border: 1px solid var(--line2); border-top: 0; background: var(--bg); }
.ticker-l { background: var(--pv); color: var(--text-hi); font: 400 19px/1 var(--font-display); letter-spacing: 1px; padding: 0 12px; border: 0; gap: 0; }
.ticker-l .live-dot { display: none; }
.ticker-win { mask-image: linear-gradient(90deg, transparent, #000 2%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 2%, #000 94%, transparent); }
.ticker-track { gap: 14px; }
.tk { border: 0; background: none; border-radius: 0; padding: 0; gap: 7px; font-size: 12.5px; color: var(--text-2); }
.tk:hover { color: var(--amb-hi); }
.tk b { font-weight: 600; color: var(--text); }
.tk-t { color: var(--amb-dim); }
.tk-v { color: var(--muted); }
.tk-amt { color: var(--ph) !important; font-weight: 600; }
.tk-g { color: var(--muted); font-size: 11px; letter-spacing: 1px; }
.tk-sep { color: var(--line2); margin-left: 6px; }

/* ---------- game tiles (portrait, F-keys) ---------- */
.gtiles { gap: 10px; }
.gtile { border-radius: 0; background: var(--panel); border: 1px solid var(--line); box-shadow: none; transition: border-color .12s, box-shadow .12s; }
.gtile::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--g2); z-index: 2; opacity: .8; }
.gtile:hover, .gtile:focus-within { transform: none; border-color: var(--g2); box-shadow: 0 0 0 1px var(--g2), 0 0 26px -6px var(--g2); }
.gart { aspect-ratio: 1 / 1; display: grid; place-items: center; background: radial-gradient(circle, rgba(255, 255, 255, .05) 1px, transparent 1.4px) 0 0 / 8px 8px, #0f0a18; border-bottom: 1px dashed var(--line2); }
.gart-px { width: 74%; height: auto; display: block; transition: transform .25s steps(3); }
.gtile:hover .gart-px { transform: translateY(-4px); }
.gbadge { top: 10px; left: 10px; border-radius: 0; background: transparent; color: var(--g3); border: 1px solid var(--g1); font: 600 9.5px/1 var(--font); letter-spacing: 1px; padding: 4px 5px 3px; }
.gkey { position: absolute; top: 10px; right: 10px; color: var(--muted); }
.gtile:hover .gkey { color: var(--g3); }
.gtile-body { padding: 10px 12px 8px; gap: 4px; }
.gtile .name { font: 400 30px/.9 var(--font-display); text-transform: uppercase; color: var(--text); letter-spacing: .5px; }
.gtile:hover .name { color: var(--g3); text-shadow: 0 0 10px var(--g1); }
.gtile .desc { font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.gtile .tile-meta { display: flex; gap: 10px; align-items: baseline; margin-top: 2px; }
.open-n { color: var(--amber); font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; }
.gtile .presets { background: transparent; border-top: 1px solid var(--line); padding: 5px 8px; gap: 2px; }
.presets .chip { min-height: 26px; padding: 2px 3px; font-size: 12.5px; }
@media (min-width: 1100px) { .gtiles { gap: 12px; } }

/* ---------- open games (3270 table) ---------- */
.og-list { gap: 0; display: grid; border-top: 1px solid var(--line2); }
.og { border-radius: 0; background: transparent; border: 0; border-bottom: 1px dashed var(--line); padding: 10px 8px; clip-path: none; transform: none !important; }
.og:hover { background: var(--amb-faint); }
.og:hover .og-game b { color: var(--amb-hi); }
.og.mine { border-left: 3px solid var(--amber); }
.og-game b { font: 400 22px/1 var(--font-display); text-transform: uppercase; letter-spacing: .5px; font-weight: 400; }
.og-stake b { font: 400 24px/1 var(--font-display); color: var(--text-hi); font-weight: 400; }
.og-act .btn, .og-act button { min-width: 72px; padding: 6px 12px; font-size: 12px; }
.og-head { font: 500 10px/1 var(--font) !important; letter-spacing: 1.6px !important; color: var(--amb-dim) !important; padding: 0 8px 8px !important; }
.ulink { color: var(--text); }
.lobby-rail .feed-panel { padding: 0; }
.feed-panel .sec-head.tight { margin: 0; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.feed-panel .sec-head h2 { font-size: 12px; letter-spacing: .5px; text-transform: none; color: var(--text-2); text-shadow: none; }
.feed { gap: 0; padding: 6px 0; }
.feed-item.log { display: block; padding: 0; border-radius: 0; font-size: 12px; }
.feed-item.log a { display: flex; gap: 10px; padding: 4px 12px; color: var(--text-2); text-decoration: none; white-space: nowrap; overflow: hidden; }
.feed-item.log a:hover { background: var(--amb-faint); color: var(--text-hi); }
.lg-t { color: var(--amb-dim); flex: none; }
.lg-m { overflow: hidden; text-overflow: ellipsis; }
.lg-tag { color: var(--ph); font-weight: 600; }
.lg-tag.live { color: var(--text-hi); background: var(--pv); padding: 0 3px; animation: t-blink 1.2s steps(1) infinite; }
.lg-tag.dim { color: var(--muted); }
.lg-tag.k-join, .lg-tag.k-deposit, .lg-tag.k-withdrawal, .lg-tag.k-tip { color: var(--amb-dim); }
.lg-tag.k-bigwin { color: var(--ph); }
.lg-go { margin-left: auto; color: var(--ph); flex: none; }
.feed-item.log div.act-a { display: flex; gap: 10px; padding: 4px 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; }
.feed-empty { padding: 8px 12px; font-size: 12px; }
.feed-empty .caret { animation: t-blink 1.06s steps(1) infinite; }
.lobby-live .live-list { padding: 4px 0; }
.lg-g { color: var(--muted); font-size: 11px; }
.feed-item.log b { color: var(--text); font-weight: 600; }
.feed-item.log .good { color: var(--ph) !important; }
.feed-item.fresh { animation: t-fresh 1.4s steps(4); }
@keyframes t-fresh { 0% { background: rgba(196, 161, 255, .35); } 100% { background: transparent; } }

/* ---------- chat (IRC) ---------- */
.chat { background: var(--bg2); border-left: 1px solid var(--line2); }
.chat-head { padding: 0 12px; height: 42px; border-bottom: 1px solid var(--line2); background: var(--bg); }
.chat-head h3 { display: flex; align-items: baseline; gap: 10px; font-size: 13px; }
.chan { color: var(--amber); font-weight: 700; letter-spacing: .5px; }
.chan-sub { color: var(--muted); font-weight: 400; font-size: 11px; letter-spacing: .5px; }
.chat .msgs { gap: 1px; padding: 10px 12px; font-size: 12.5px; line-height: 1.5; }
.msg, .chat .msg.msg-tip { display: grid; grid-template-columns: 40px 1fr; gap: 0 4px; padding: 1px 0; border-radius: 0; background: none; border: 0; box-shadow: none; }
.msg.msg-mod { grid-template-columns: 40px 1fr auto; }
.msg:hover, .chat .msg.msg-tip:hover { background: rgba(196, 161, 255, .05); }
.msg .msg-body, .msg.msg-tip .msg-body { background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; color: var(--text); }
.msg-ts { color: #6b5a3d; font-size: 11.5px; padding-top: 1px; }
.msg .msg-who { margin-right: 6px; gap: 4px; }
.msg .msg-who b, .msg b { margin: 0; font-weight: 600; }
.msg .namebtn { all: unset; cursor: pointer; color: #bcaee0; }
.msg .namebtn::before { content: '<'; color: var(--amb-dim); } .msg .namebtn::after { content: '>'; color: var(--amb-dim); }
.msg .namebtn:hover { text-decoration: underline; }
/* One uniform name colour; gold for Gold+ VIPs and staff. */
.msg.n-gold .namebtn { color: var(--gold); text-shadow: 0 0 8px rgba(255, 216, 74, .35); }
.msg.n-gold .namebtn::before, .msg.n-gold .namebtn::after { color: #8a6d12; }
.staff-tag { display: inline-block; margin-left: 4px; padding: 0 3px; font: 700 8.5px/1.5 var(--font); letter-spacing: 1px; color: #120c00; background: var(--gold); vertical-align: 1px; }
.staff-tag.house-tag { color: #ECE4FF; background: #662D91; box-shadow: inset 0 0 0 1px #9580C6; text-shadow: none; }
.msg .vip { font-size: 8.5px; padding: 0 3px; }
.msg.msg-tip .msg-body, .msg.msg-tip .tip-line { color: var(--amber); }
.msg.msg-tip .namebtn { color: var(--amber); }
.msg.msg-tip .namebtn::before { content: '* '; color: var(--amber); } .msg.msg-tip .namebtn::after { content: ''; }
.msg.msg-tip .tip-ico { display: none; }
.msg.msg-tip .tip-line .ulink { color: var(--amber); font-weight: 600; }
.msg.msg-tip .tip-amt { color: #021006 !important; background: var(--amber); padding: 0 3px; }
.chat form, .chat form.term-form { gap: 8px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line2); background: var(--bg); }
.chat .prompt { color: var(--amber); font-weight: 700; text-shadow: var(--glow-a); }
.chat form input { border: 0; background: transparent; padding: 8px 0; min-height: 0; color: var(--text-hi); }
.chat form input:focus { outline: 0; }
.chat form button { padding: 6px 10px; font-size: 11.5px; }
.chat-muted { background: transparent; border-bottom: 1px solid #6b241f; color: var(--red); }

/* ---------- status bar (desktop) ---------- */
.statusbar { display: none; }
@media (min-width: 960px) {
  .statusbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: var(--sb-h); display: flex; align-items: stretch; background: #0b0906; border-top: 1px solid var(--line2); font: 500 10.5px/1 var(--font); letter-spacing: 1.2px; color: var(--muted); text-transform: uppercase; }
  .statusbar > * { display: flex; align-items: center; }
  .sb-cell { padding: 0 12px; border-right: 1px solid var(--line); white-space: nowrap; }
  .sb-brand { background: var(--pv); color: var(--text-hi); font-weight: 700; border-right: 0; }
  .sb-conn.up { color: var(--ph); } .sb-conn.up::before { content: '■ '; animation: t-blink 2s steps(1) infinite; }
  .sb-conn.down { color: var(--amber); } .sb-conn.down::before { content: '▲ '; }
  .sb-clock { color: var(--text-2); }
  .sb-keys { gap: 14px; padding: 0 12px; }
  .sb-keys a { color: var(--muted); display: inline-flex; gap: 5px; align-items: center; }
  .sb-keys a:hover { color: var(--amb-hi); text-decoration: none; }
  .sb-keys kbd { font-size: 9px; padding: 2px 3px 1px; color: var(--amb-mid); }
  .sb-age { color: var(--amber); border: 1px solid var(--line2); padding: 2px 3px 1px; }
  .sb-coin { gap: 8px; padding: 0 12px; border-left: 1px solid var(--line); }
  .sb-coin img { height: 14px; width: auto; display: block; opacity: .9; }
  body { padding-bottom: var(--sb-h); }
  .foot { display: none; }
}
@media (min-width: 960px) and (max-width: 1599px) { .who-name { display: none; } #nav a { padding: 7px 8px; } .tagline { display: none; } }
@media (min-width: 1440px) {
  .chat { height: calc(100vh - var(--top-h) - var(--sb-h)); }
  .layout { grid-template-columns: minmax(0, 1fr) 340px; }
}

/* ---------- mobile tab bar + footer ---------- */
.tabbar { background: var(--bg); border-top: 3px double var(--line2); backdrop-filter: none; }
.tab { font: 500 10px/1 var(--font) !important; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.tab[aria-current=page], .tab[aria-expanded=true] { color: var(--ph); }
.tab[aria-current=page]::before { left: 20%; right: 20%; height: 3px; border-radius: 0; background: var(--ph); box-shadow: 0 0 10px var(--ph); }
.tab .unread, .unread { border-radius: 0; background: var(--pv); color: var(--text-hi); }
.foot { border-top: 1px solid var(--line); font-size: 11.5px; letter-spacing: .5px; text-transform: uppercase; }
.foot-brand b { color: var(--amber); }
.age-badge { border-radius: 0 !important; }

/* ---------- match ---------- */
.back { color: var(--muted); letter-spacing: 1px; text-transform: uppercase; font-size: 11.5px; }
.back::before { content: ''; }
.match-head { background: var(--panel); border: 1px solid var(--line2); clip-path: none; padding: 16px 18px; }
.match-head::after { display: none; }
.match-head h1 { margin: 0 0 6px; font-size: 54px; line-height: .9; }
.match-head h1 .muted { color: var(--amb-dim); text-shadow: none; }
.mh-stakes { gap: 6px 24px; }
.mh-stakes > div { border-radius: 0; background: transparent; border: 0; border-left: 1px solid var(--line2); padding: 2px 12px; }
.tip-btn, .player .iconbtn, .player button { border-radius: 0; }
.mh-stakes dt { font: 500 10px/1 var(--font); letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.mh-stakes dd { margin: 4px 0 0; font: 400 26px/1 var(--font-display); color: var(--text); }
.mh-stakes dd.good { color: var(--ph) !important; text-shadow: var(--glow-t); }
.vs.duel { gap: 0; margin: 12px 0; border: 1px solid var(--line2); background: var(--panel); }
.vs-x { font: 400 34px/1 var(--font-display); color: var(--amb-dim); padding: 0 18px; letter-spacing: 2px; }
.player { border-radius: 0; background: transparent; border: 0; padding: 14px 16px; clip-path: none; }
.vs.duel .player:last-child { flex-direction: row-reverse; text-align: right; }
.player b { font-size: 15px; font-weight: 600; }
.player .avatar { width: 44px; height: 44px; font-size: 30px; }
.player.win { box-shadow: inset 0 -3px 0 var(--ph); background: linear-gradient(0deg, rgba(51, 255, 102, .08), transparent 70%); }
.player.win .avatar { background: var(--ph); color: #021006; border-color: var(--ph); }
.player.me b::after { content: ''; }
.result-banner { border-radius: 0; clip-path: none; margin: 12px 0; padding: 12px 16px; font: 600 15px/1.2 var(--font); text-align: left; }
.result-banner.good { background: var(--ph); color: #021006; border: 0; box-shadow: 0 0 40px -6px rgba(51, 255, 102, .55); }
.result-banner.good .win-line { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.win-kicker { font: 400 40px/1 var(--font-display); letter-spacing: 2px; color: #021006; background: none; -webkit-text-fill-color: currentColor; animation: t-blink .5s steps(1) 4; }
.win-txt { font: 600 15px/1.2 var(--font); text-transform: uppercase; letter-spacing: 1px; }
.win-amt { font: 400 40px/1 var(--font-display); letter-spacing: 0; color: #021006 !important; }
.result-banner.good .xshare { background: #021006; color: var(--ph); border: 0; border-radius: 0; font: 600 12px var(--font); letter-spacing: 1px; text-transform: uppercase; }
.result-banner.bad { background: transparent; border: 1px solid #6b241f; color: var(--red); }
.result-banner.win-burst { animation: none; }
.stage { min-height: 300px; border: 1px solid var(--line2); background: radial-gradient(circle, rgba(255, 255, 255, .045) 1px, transparent 1.4px) 0 0 / 10px 10px, var(--bg2); }
.coin.coin-term { width: auto; height: auto; background: none; box-shadow: none; border: 0; border-radius: 0; animation: t-coin .9s steps(6) both; display: grid; justify-items: center; gap: 10px; --g1: #5e4c12; --g2: #c9a227; --g3: #ffe066; }
.coin-term .coin-px { width: 168px; height: 168px; display: block; filter: drop-shadow(0 0 16px rgba(255, 224, 102, .3)); }
.coin-term .coin-px .px1 { fill: var(--g1); } .coin-term .coin-px .px2 { fill: var(--g2); } .coin-term .coin-px .px3 { fill: var(--g3); }
.coin-label { font: 400 40px/1 var(--font-display); color: #ffe066; letter-spacing: 3px; text-shadow: 0 0 10px rgba(255, 224, 102, .4); }
@keyframes t-coin { 0% { transform: scaleX(1); } 16% { transform: scaleX(.1); } 33% { transform: scaleX(1); } 50% { transform: scaleX(.1); } 100% { transform: scaleX(1); } }
.die { border-radius: 0; background: var(--bg); border: 1px solid var(--amb-dim); color: var(--text-hi); }
.dice-rounds .die { width: auto; min-width: 120px; height: 110px; padding: 0 14px; display: inline-grid; place-items: center; background: var(--bg); color: var(--text-2); border: 2px solid var(--line2); font: 400 84px/1 var(--font-display); box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 5px var(--line); }
.dice-rounds .die.hi { color: var(--ph-hi); border-color: var(--ph); text-shadow: var(--glow-t); box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 5px var(--ph-dim), 0 0 30px -4px rgba(51, 255, 102, .5); }
.dice-rounds { display: grid; gap: 14px; justify-items: center; }
.dice-rounds > div { display: flex; align-items: center; gap: 14px; }
.dice-rounds .muted { text-transform: uppercase; letter-spacing: 2px; font-size: 11px; }
.fair, details.fair, .fair-panel { border-radius: 0; }
summary { cursor: pointer; }

/* ---------- intro overlay ---------- */
.game-intro.gi-term { background: #040302; gap: 14px; align-content: center; }
.gi-term .gi-cmd { width: min(620px, 88vw); font-size: 13px; color: var(--amber); }
.gi-term .gi-pxmark svg { width: 120px; height: 120px; filter: drop-shadow(0 0 16px rgba(51, 255, 102, .35)); animation: t-boot .6s steps(4) both; }
.gi-term .gi-name { font: 400 clamp(64px, 16vw, 132px)/.85 var(--font-display); color: var(--g3) !important; text-shadow: 0 0 14px color-mix(in srgb, var(--g2) 55%, transparent), 0 0 40px color-mix(in srgb, var(--g2) 25%, transparent); letter-spacing: 2px; text-transform: uppercase; animation: t-boot .5s steps(3) .15s both; }
.gi-term .gi-vs { font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--text); white-space: pre; }
.gi-term .gi-bar { width: min(420px, 80vw); height: 18px; border: 1px solid var(--amb-mid); padding: 2px; }
.gi-term .gi-fill { display: block; height: 100%; width: 100%; transform-origin: left; background: repeating-linear-gradient(90deg, var(--amber) 0 10px, transparent 10px 12px); animation: t-fill var(--gi-ms, 2200ms) steps(20) both; }
.gi-term .gi-sub { font-size: 11px; letter-spacing: 3px; color: var(--muted); }
@keyframes t-fill { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes t-boot { 0% { opacity: 0; } 50% { opacity: 1; } 75% { opacity: .4; } 100% { opacity: 1; } }

/* ---------- wallet ---------- */
.page-title { margin: 10px 0 18px; font-size: 52px; }
.page-title .pr { color: var(--amb-dim); text-shadow: none; }
.wallet-sum { background: var(--panel); border: 1px solid var(--line2); }
.wallet-sum .hb-label { font: 600 10.5px/1 var(--font); letter-spacing: 2px; color: var(--muted); }
.wallet-sum .big-num { font: 400 68px/1 var(--font-display); color: var(--text-hi); text-shadow: var(--glow-w); letter-spacing: 0; }
.wallet-sum .big-num .unit { font: 500 13px var(--font); }
.ws-stats { gap: 0; border: 1px solid var(--line); }
.stat { border-radius: 0; background: transparent; border: 0; border-right: 1px solid var(--line); padding: 10px 14px; }
.stat:last-child { border-right: 0; }
.stat .muted.small { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; }
.stat .num { font: 400 26px/1.1 var(--font-display); color: var(--text); }
.stat .num.good { color: var(--ph) !important; } .stat .num.warn { color: var(--amber); }
.stat .xsmall { font-size: 10.5px; }
.tx-item, .panel.tx-list .tx-item { border-radius: 0; background: transparent; border: 0; border-bottom: 1px dashed var(--line); padding: 10px 6px; }
.tx-item:hover { border-color: var(--line2); }
.tx-top .amt { font: 400 24px/1 var(--font-display); }
.tx-top .kind { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-2); }
.tx-top .kind .ico { display: none; }
.tx-meta { font-size: 11px; }
.panel.tx-list { padding: 4px 10px; }
code { color: var(--amb-hi); background: var(--amb-faint); padding: 0 4px; }

/* ---------- toasts, confetti ---------- */
.toast { border-radius: 0 !important; background: var(--bg) !important; border: 1px solid var(--amb-mid) !important; color: var(--text) !important; font-family: var(--font); }
.confetti i, .confetti i.round { border-radius: 0 !important; width: 8px; height: 8px; }

@media (max-width: 599px) {
  .wm { font-size: 26px; }
  .th-sess { font-size: 9.5px; letter-spacing: 1px; }
  .th-sess span:nth-child(2) { display: none; }
  .th-main { padding: 18px 16px 20px; }
  .term-hero .lead { font-size: 13px; }
  .term-hero .cta-row .btn { flex: 1 1 auto; text-align: center; justify-content: center; }
  .gtile .name { font-size: 26px; }
  .gtile .desc { display: none; }
  .gart-px { width: 70%; }
  .match-head h1 { font-size: 42px; }
  .mh-stakes > div { padding: 2px 8px; }
  .mh-stakes dd { font-size: 20px; }
  .result-banner.good .win-line { gap: 4px 14px; }
  .dice-rounds .die { min-width: 92px; height: 88px; font-size: 64px; }
  .th-sess { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
  .vs-x { padding: 0 8px; font-size: 26px; }
  .player { padding: 12px 10px; gap: 8px; }
  .player .avatar { width: 34px; height: 34px; font-size: 24px; }
  .win-kicker, .win-amt { font-size: 32px; }
  .wallet-sum .big-num { font-size: 52px; }
  .page-title { font-size: 42px; }
  .stat { padding: 8px 8px; }
  .stat .num { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor, .live-dot, .lg-tag.live, .win-kicker, .sb-conn.up::before { animation: none; }
  .gi-term .gi-fill { animation: none; }
  .coin.coin-term, .gi-term .gi-name, .gi-term .gi-pxmark svg { animation: none; }
}

/* ---------- round 2 fixes ---------- */
@media (min-width: 960px) and (max-width: 1599px) { .who-name { display: none; } #nav { margin-left: 10px; } #nav a { padding: 7px 8px; } .tagline { display: none; } }
.foot-brand .mark-wrap { width: 22px; height: 22px; flex: none; }
.brand .mark-wrap { width: 32px; height: 32px; flex: none; }
.mh-stakes > div { border-radius: 0; background: transparent; border: 0; border-left: 1px solid var(--line2); padding: 2px 14px; }
.vs.duel .player { background: transparent; }
.tip-btn, .player .iconbtn, .player button { border-radius: 0; }
div.empty, .empty { background: transparent; border-radius: 0; border: 1px dashed var(--line2); text-transform: uppercase; letter-spacing: 1.5px; font-size: 11.5px; }
div.empty svg, .empty.soft svg { color: var(--amb-dim); }
.die.hi { background: var(--ph); color: #021006; border-color: var(--ph); box-shadow: inset 0 0 0 3px var(--ph), inset 0 0 0 4px #021006, 0 0 30px -4px rgba(51, 255, 102, .6); text-shadow: none; }
.game-intro.gi-term .gi-ring { display: none; }
html[data-theme=terminal] { --confetti1: #33ff66; --confetti2: #ffd84a; --confetti3: #c4a1ff; --confetti4: #9dffb6; }
.tx-top .kind, .kind.tip { gap: 6px; color: var(--text-2); }
.panel div.empty, .panel .empty.soft { border: 0; }
.result-banner.good, .result-banner.good .win-txt { color: #021006 !important; }
.gtile { display: flex; flex-direction: column; }
.gtile .gtile-body { flex: 1 1 auto; }
.gtile .presets { margin-top: auto; justify-content: space-between; padding: 5px 6px; }
.presets .chip { padding: 2px 1px; font-size: 12px; }

/* ---------- r6: bigger tiles + live counters ---------- */
.gtile-body { padding: 12px 14px 10px; gap: 6px; }
.gtile .name { font: 400 44px/.86 var(--font-display); letter-spacing: .5px; color: var(--text-hi); overflow-wrap: anywhere; }
.gtile .open-n { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; justify-self: start; width: max-content; max-width: 100%; color: var(--amb-hi); font: 600 11px/1 var(--font); letter-spacing: 1.2px; padding: 4px 7px 3px; border: 1px solid var(--amb-dim); background: var(--amb-faint); }
.gtile .open-n::before { content: ''; width: 6px; height: 6px; background: var(--amber); box-shadow: 0 0 6px var(--amber); animation: t-blink 1.6s steps(1) infinite; }
.gtile .open-n[hidden] { display: none; }
.gtile .desc { font-size: 12px; }

/* ---------- r6: live bets table ---------- */
.lbets { margin-top: 26px; }
.lbets .sec-head { display: flex; align-items: center; gap: 10px; }
.lb-wrap { border-radius: 0; border: 1px solid var(--line2); background: var(--panel); max-height: 452px; overflow: auto; }
.lb-table { display: table; width: 100%; border-collapse: collapse; font: 500 13px/1.2 var(--font); font-variant-numeric: tabular-nums; }
.lb-table thead th { position: sticky; top: 0; z-index: 1; background: var(--panel2); color: var(--muted); font: 600 10.5px/1 var(--font); letter-spacing: 1.6px; text-transform: uppercase; text-align: left; padding: 10px 14px 9px; border-bottom: 1px solid var(--line2); }
.lb-table td { padding: 9px 14px; border-bottom: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.lb-table tr:last-child td { border-bottom: 0; }
.lb-table .lb-s, .lb-table .lb-r, .lb-table .lb-t { text-align: right; }
.lb-table th.lb-s, .lb-table th.lb-r, .lb-table th.lb-t { text-align: right; }
.lb-row:hover td { background: var(--amb-faint); }
.lb-user { color: var(--text); font-weight: 600; }
.lb-user:hover { color: var(--amb-hi); }
.lb-row.me .lb-user { color: var(--amb-hi); }
.lb-row.me .lb-user::after { content: ' (you)'; color: var(--muted); font-weight: 500; }
.lb-g { color: var(--text-2); letter-spacing: .5px; font-size: 12px; }
.lb-g .gico { display: inline-flex; vertical-align: middle; margin-right: 7px; opacity: .85; }
.lb-sub { display: none; }
.lb-s { color: var(--text); }
.lb-r .good { color: var(--ph); font-weight: 700; text-shadow: 0 0 8px rgba(51, 255, 102, .35); }
.lb-loss { color: var(--muted); }
.lb-push { color: var(--amb-mid); letter-spacing: 1px; }
.lb-t { color: var(--amb-dim); }
.lb-empty td { color: var(--muted); text-align: center; padding: 22px; }
.lb-row.fresh td { animation: lb-in 1.4s ease-out; }
@keyframes lb-in { 0% { background: rgba(196, 161, 255, .2); } 100% { background: transparent; } }
@media (max-width: 599px) {
  .gtile .name { font-size: 32px; }
  .gtile .open-n { font-size: 9.5px; letter-spacing: .8px; padding: 3px 5px 2px; gap: 5px; }
  .lb-wrap { max-height: 380px; }
  .lb-table { font-size: 12px; }
  .lb-table td, .lb-table thead th { padding: 8px 10px; }
  .lb-g, .lb-t { display: none; }
  .lb-sub { display: block; margin-top: 3px; font-size: 9.5px; letter-spacing: 1px; color: var(--muted); }
  .lb-user { display: block; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- r6: win moment ---------- */
.win-flash { position: fixed; inset: 0; z-index: 9998; pointer-events: none; background: radial-gradient(circle at 50% 40%, rgba(51, 255, 102, .5), rgba(51, 255, 102, .14) 55%, transparent 80%); mix-blend-mode: screen; animation: win-flash .9s steps(6) forwards; }
@keyframes win-flash { 0% { opacity: 0; } 12% { opacity: 1; } 30% { opacity: .35; } 45% { opacity: .85; } 100% { opacity: 0; } }
.result-banner.good .win-amt { text-shadow: 0 0 1px #021006; min-width: 8ch; display: inline-block; }
.result-banner.good .sound-toggle { margin-left: auto; background: transparent; color: #021006; border: 1px solid rgba(2, 16, 6, .55); border-radius: 0; font: 600 11px/1 var(--font); letter-spacing: 1px; padding: 7px 9px 6px; min-height: 0; }
.result-banner.good .sound-toggle:hover { background: rgba(2, 16, 6, .12); }
.sb-snd { background: none; border: 0; padding: 0; min-height: 0; font: inherit; letter-spacing: inherit; color: var(--muted); cursor: pointer; }
.sb-snd:hover { color: var(--amb-hi); background: none; }
.sb-snd[aria-pressed="true"] { color: var(--amb-hi); }
@media (prefers-reduced-motion: reduce) {
  .win-flash { display: none; }
  .gtile .open-n::before, .lb-row.fresh td { animation: none; }
}


/* ---------- r7: compact desktop hero (first tile row above the fold) ---------- */
.term-hero .tform { border-top: 1px solid var(--line2); background: var(--panel); }
@media (min-width: 960px) {
  .hero.term-hero { grid-template-columns: minmax(0, 1fr) 216px; }
  .term-hero .th-main { padding: 16px 28px 18px; }
  .term-hero .th-sess { margin-bottom: 12px; }
  .term-hero .th-cmd { margin-bottom: 6px; }
  .hero.term-hero h1.th-h1, .hero.hero.term-hero.compact h1.th-h1 { font-size: clamp(50px, 4.3vw, 66px); margin-bottom: 10px; }
  .hero.term-hero h1.th-h1 .l1 { display: inline; }
  .hero.term-hero h1.th-h1 .l1::after { content: ' '; }
  .term-hero .lead { margin-bottom: 14px; max-width: 76ch; font-size: 13.5px; line-height: 1.55; }
  .term-hero .big-num { font-size: 50px; }
  .th-side { display: flex; flex-direction: column; }
  .th-mark { flex: 1; padding: 10px 0; }
  .th-mark svg { width: 128px; height: 128px; }
  /* ARENA.SYS stats as one inline strip under the hero */
  .term-hero .tform { grid-column: 1 / -1; display: flex; gap: 0; padding: 0; }
  .term-hero .tform .ff { flex: 1 1 0; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 16px 9px; border-left: 1px solid var(--line); }
  .term-hero .tform .ff:first-child { border-left: 0; }
  .term-hero .tform .ff dt { flex: none; font-size: 10px; }
  .term-hero .tform .ff dt::after { display: none; }
  .term-hero .tform .ff dd { font-size: 24px; line-height: 1; }
  .term-hero .tform .ff dd a, .term-hero .tform .ff dd > span:only-child { line-height: 24px; font-size: 11.5px; }
  .gart { aspect-ratio: 16 / 11; }
  .gart-px { width: auto; height: 82%; }
  .gtile .name { font-size: 40px; }
}
@media (min-width: 960px) and (max-height: 820px) {
  .term-hero .lead { display: none; }
  .hero.term-hero h1.th-h1, .hero.hero.term-hero.compact h1.th-h1 { font-size: clamp(46px, 3.9vw, 58px); }
  .th-mark svg { width: 104px; height: 104px; }
  .gart { aspect-ratio: 16 / 10; }
}

/* ---------- r7: quick-join stake chips ---------- */
.gtile .presets .chip.qj { position: relative; }
.gtile .presets .chip.qj.has-open { color: var(--text-hi); background: var(--pv3); border-color: #8f55c9; }
.gtile .presets .chip.qj.has-open::after { content: ''; position: absolute; top: 2px; right: 2px; width: 4px; height: 4px; background: #d9b8ff; box-shadow: 0 0 5px #b98af0; }
.gtile .presets .chip.qj.has-open:hover { background: var(--pv); }

/* ---------- r7: pixel avatars ---------- */
.avatar.pxa { padding: 0; overflow: hidden; background: transparent; border: 1px solid var(--line2); }
.avatar.pxa svg { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.avatar.pxa.xs { width: 18px; height: 18px; }
.avatar.pxa.chat-av { width: 16px; height: 16px; border: 0; vertical-align: -3px; margin-right: 5px; display: inline-block; }
.msg .msg-who { align-items: center; }
.player .avatar.pxa { width: 48px; height: 48px; border-color: var(--line2); }
.player.win .avatar.pxa { background: transparent; border: 2px solid var(--ph); box-shadow: 0 0 14px -2px rgba(51, 255, 102, .6); }
@media (max-width: 599px) { .player .avatar.pxa { width: 38px; height: 38px; } }

/* ---------- r7: live bets, one row per match ---------- */
.lb-m { display: flex; align-items: center; gap: 9px; color: inherit; min-width: 0; }
.lb-m:hover .lb-user { color: var(--amb-hi); }
.lb-av { flex: none; }
.lb-av.push { display: inline-grid; place-items: center; width: 18px; height: 18px; font: 400 16px/1 var(--font-display); color: var(--amb-mid); }
.lb-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-verb { color: var(--muted); }
.lb-opp { color: var(--text-2); }
.lb-opp.n { color: var(--muted); }
.lb-row .is-me { color: var(--amb-hi); }
.lb-row.me .lb-user::after { content: none; }
.lb-row.push td { color: var(--muted); }
@media (max-width: 599px) {
  .lb-m { gap: 8px; }
  .lb-m .lb-sub { display: none; }
  .lb-p { max-width: 62vw; }
  .lb-who { display: block; }
  .lb-p .lb-m { flex-wrap: wrap; }
  .lb-p .lb-m .lb-who { flex: 1 1 0; }
  .lb-p .lb-m .lb-sub { display: block; flex-basis: 100%; padding-left: 26px; margin-top: 0; }
}

/* ---------- r7: boot screen ---------- */
.boot { position: fixed; inset: 0; z-index: 10000; background: var(--pv4); display: grid; place-items: start; padding: clamp(18px, 6vh, 64px) clamp(18px, 7vw, 96px); cursor: pointer; font: 500 15px/1.65 var(--font); color: var(--amber); text-shadow: var(--glow-a); transition: opacity .24s steps(4); }
.boot::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .28) 0 1px, transparent 1px 3px); }
.boot.out { opacity: 0; }
.bt-scr { max-width: 640px; }
.bt-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; color: var(--text-hi); letter-spacing: 1px; }
.bt-head .dim { color: var(--amb-dim); font-size: 12.5px; letter-spacing: 1.5px; }
.bt-mark svg { width: 46px; height: 46px; display: block; }
.bt-l { white-space: pre; }
.bt-l .num { color: var(--text-hi); font-weight: 600; }
.boot .ok { color: var(--ph); text-shadow: 0 0 8px rgba(51, 255, 102, .45); }
.bt-ok { margin-top: 14px; font: 400 44px/1 var(--font-display); color: var(--ph); letter-spacing: 2px; text-shadow: 0 0 14px rgba(51, 255, 102, .5); }
.bt-skip { margin-top: 22px; font-size: 11px; letter-spacing: 2px; color: var(--amb-dim); text-transform: uppercase; }
@media (max-width: 599px) { .boot { font-size: 13px; } .bt-ok { font-size: 36px; } }

/* ---------- r7: big-win banner ---------- */
.bigwin { position: fixed; top: 0; left: 0; right: 0; z-index: 9990; display: flex; align-items: center; justify-content: center; gap: 0; min-height: 38px; padding: 6px 14px; background: var(--gold); color: #1a1100; font: 600 14px/1.2 var(--font); letter-spacing: 1px; text-transform: uppercase; text-decoration: none; text-shadow: none; box-shadow: 0 0 0 1px #000, 0 4px 26px rgba(255, 216, 74, .45); animation: bw-in .32s steps(4) both; white-space: nowrap; overflow: hidden; }
.bigwin:hover { color: #000; background: #ffe27a; }
.bigwin .bw-k { background: #1a1100; color: var(--gold); padding: 2px 6px 1px; margin: 0 6px; font-weight: 700; }
.bigwin .bw-stars { animation: t-blink 1s steps(1) infinite; }
.bigwin .bw-t { overflow: hidden; text-overflow: ellipsis; margin-left: 6px; }
.bigwin .bw-t b { font-weight: 800; text-transform: none; }
.bigwin .bw-q { margin-left: 12px; font-size: 11px; opacity: .7; }
.bigwin.out { animation: bw-out .3s steps(4) forwards; }
@keyframes bw-in { from { transform: translateY(-100%); } to { transform: none; } }
@keyframes bw-out { to { transform: translateY(-100%); opacity: 0; } }
@media (max-width: 599px) { .bigwin { font-size: 12px; letter-spacing: .5px; justify-content: flex-start; } .bigwin .bw-stars:last-of-type { display: none; } }
@media (prefers-reduced-motion: reduce) { .bigwin, .bigwin.out, .bigwin .bw-stars { animation: none; } .bigwin.out { opacity: 0; } }

/* ---------- r7: PIVX purple recolour (primary actions, nav, focus) ---------- */
button.primary, .btn.primary, button.primary:hover:not(:disabled), .btn.primary:hover { background: var(--pv); border-color: #8f55c9; color: var(--text-hi); }
button.primary:hover:not(:disabled), .btn.primary:hover { background: var(--pv-hi); border-color: #b98af0; box-shadow: 0 0 0 1px var(--bg), 0 0 0 2px var(--pv2), 0 0 22px rgba(143, 85, 201, .45); }
#nav a[aria-current=page] { color: var(--text-hi); background: var(--pv); box-shadow: inset 0 -2px 0 #b98af0, 0 0 14px rgba(102, 45, 145, .55); }
.tab[aria-current=page], .tab[aria-expanded=true] { color: var(--amb-hi); }
.tab[aria-current=page]::before { background: #b98af0; box-shadow: 0 0 10px rgba(185, 138, 240, .8); }
:focus-visible { outline-color: #b98af0; }
.th-cmd .ok { color: var(--text-hi); background: var(--pv); }
.mark-px { filter: none; }
.th-mark svg { filter: drop-shadow(0 0 14px rgba(143, 85, 201, .45)); }
.term-hero .cta { box-shadow: 0 0 22px -4px rgba(143, 85, 201, .55); }
.gtile .open-n { color: var(--amb-hi); border-color: var(--pv2); background: var(--amb-faint); }
.gtile .open-n::before { background: #b98af0; box-shadow: 0 0 6px #b98af0; }
