/* THE GAME brand layer. Loaded after every other stylesheet, so what is here wins.
   The rules behind it are in BRAND.md at the top of the project: read that before adding a colour, a font or a new shape. */
:root {
  --bg: #0b0b11; --surface: #13131c; --raise: #1b1b27; --line: rgba(245, 245, 247, .1);
  --text: #f5f5f7; --muted: #9391ab; --ink: #0b0b11;
  --acid: #b6ff1e; --purple: #7a3dff; --hot: #ff2fa6; --gold: #ffc93e;
  --ice: #a98bff; --violet: #a98bff; /* the old icy blue is retired: anything that asked for it gets soft purple */
  --grad: linear-gradient(100deg, var(--purple), var(--hot));
  --display: "Fredoka", "Chakra Petch", system-ui, sans-serif;
  --topbar: 68px;
}
body { background: var(--bg); color: var(--text); }
.ico { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- atmosphere: one purple glow top left, one magenta top right, nothing else ---------- */
.bg::after { display: none; }
.bg i { opacity: .28; }
.bg i:nth-child(1) { background: var(--purple); }
.bg i:nth-child(2) { background: var(--hot); opacity: .16; }
.bg i:nth-child(3) { display: none; }

/* ---------- logo: the mark, the wordmark, the line ---------- */
.logo { position: relative; display: inline-block; padding-left: 2.15em; font: 700 26px/1 var(--display); letter-spacing: .01em; text-transform: uppercase; white-space: nowrap; text-align: left; }
.logo::before { content: ""; position: absolute; left: 0; top: 50%; width: 1.9em; height: 1.7em; transform: translateY(-54%); background: url(/brand/mark.svg) center / contain no-repeat; }
.logo b { margin-left: .24em; color: var(--acid); text-shadow: none; }
.logo small { display: block; margin-top: 4px; font: 600 8px/1 Inter, system-ui, sans-serif; letter-spacing: .3em; color: var(--text); }
.logo.big { font-size: 40px; }
@media (max-width: 640px) { .logo { font-size: 20px; } .logo small { display: none; } .logo.big { font-size: 34px; } }

/* ---------- top bar ---------- */
.top { min-height: var(--topbar); background: var(--bg); } /* solid: the page must not show through the bar as it scrolls */
.who { display: none; }
.chip { height: 40px; padding: 0 5px 0 11px; gap: 8px; background: var(--raise); }
.chip strong { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font: 700 17px var(--display); }
.chip em { width: 30px; height: 30px; background: var(--acid); color: var(--ink); }
.chip:hover { border-color: var(--acid); }
.icon { background: var(--raise); }
@media (min-width: 1021px) {
  .nav { top: calc((var(--topbar) - 44px) / 2); gap: 6px; padding: 0; border: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav button { height: 44px; padding: 0 18px; gap: 9px; font: 600 15px var(--display); letter-spacing: .06em; color: var(--text); }
  .nav button:hover { background: var(--raise); }
  .nav button.on { background: var(--acid); color: var(--ink); font-weight: 700; }
  .nav svg { width: 20px; height: 20px; stroke-width: 2.2; }
  #page { top: var(--topbar) !important; }
}
@media (min-width: 1280px) {
  .who { display: flex; align-items: center; gap: 9px; padding: 0 6px 0 0; border: 0; background: none; color: var(--text); cursor: pointer; text-align: left; font: 600 14px/1.15 var(--display); }
  .who img { width: 38px; height: 38px; padding: 7px 6px 5px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--acid); }
  .who small { display: block; margin-top: 2px; color: var(--ice); font: 500 12px Inter, system-ui, sans-serif; }
  .who span { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 1020px) { .nav button.on { color: var(--acid); } }

/* ---------- the coin: always the brand coin, never a plain dot ---------- */
.coin { width: 1.15em; height: 1.15em; vertical-align: -.24em; border-radius: 0; background: url(/brand/coin.svg) center / contain no-repeat; box-shadow: none; flex: none; }

[data-money]::before, .win-amount::before { width: .95em; height: .95em; margin-right: .2em; vertical-align: -.14em; border-radius: 0; background: url(/brand/coin.svg) center / contain no-repeat; box-shadow: none; }
/* the wallet opens under the mark */
.w-title { display: flex; align-items: center; gap: 10px; font-family: var(--display); }
.w-title::before { content: ""; flex: none; width: 34px; height: 30px; background: url(/brand/mark.svg) center / contain no-repeat; }
.w-title .acc-link { float: none; margin: 0 34px 0 auto; }

/* ---------- buttons: pills. Lime does the main thing, white sits on the gradient, dark is the quiet one ---------- */
.btn { border-radius: 999px; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--acid); color: var(--ink); }
.btn.sm { border-radius: 999px; padding: 8px 14px; }
.btn.wide { border-radius: 999px; }
.btn.ghost { background: var(--raise); color: var(--text); text-transform: none; letter-spacing: .01em; font-weight: 600; }
.btn.white { display: inline-flex; align-items: center; gap: 8px; background: var(--text); color: var(--ink); padding: 13px 22px; font-size: 16px; }
.btn.danger { background: none; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--acid); color: var(--ink); font: 700 13px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; }
.tag.live { background: var(--hot); color: #fff; cursor: pointer; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .4); }
.tabs button { border-radius: 999px; font-family: var(--display); }
.tabs button.on { background: var(--acid); border-color: var(--acid); color: var(--ink); }
.chips button { border-radius: 999px; }
.panel { border-radius: 22px; }
.sheet h3 { font: 700 24px/1.1 var(--display); letter-spacing: 0; text-transform: none; }
.eyebrow { font-family: var(--display); }

/* ---------- hero: the call-out on the brand gradient, the number that matters beside it ---------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 10px 0 14px; padding: 16px; border-radius: 22px; background: var(--grad); overflow: hidden; }
.hero-main { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hero h2 { margin: 8px 0 0; font: 700 clamp(26px, 3.4vw, 42px)/1.05 var(--display); color: #fff; text-wrap: balance; overflow-wrap: anywhere; }
.hero-main p { margin: 0 0 10px; color: #fff; font-size: 16px; line-height: 1.35; }
.hero-main p b { color: var(--acid); font-weight: 600; }
.hero-pot { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 14px 16px; border-radius: 16px; background: rgba(11, 11, 17, .88); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); min-width: 0; }
.hero-pot .hm-hero { padding: 0; min-height: 0; background: none; box-shadow: none; border-radius: 0; }
.hero-pot .hm-k { font: 700 13px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
.hero-pot .hm-amt { margin: 6px 0 4px; font: 700 40px/1 var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
.hero-pot .hm-amt.win { color: var(--acid); }
.hero-pot .hm-amt.sm { font-size: 24px; line-height: 1.1; }
.hero-pot .hm-sub { margin: 0; font-size: 13px; color: var(--muted); }
.hero-pot .hm-sub b { color: var(--acid); }
.hero-pot .hm-sub .btn { margin: 8px 0 0; display: flex; width: fit-content; }
.hp-meter { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.hp-meter span { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.hp-meter span b { font: 700 16px var(--display); }
.hp-meter > i { display: block; height: 8px; border-radius: 99px; background: var(--raise); overflow: hidden; }
.hp-meter > i b { display: block; height: 100%; border-radius: 99px; background: var(--acid); }
.hp-meter small { color: var(--muted); font-size: 12.5px; }
@media (min-width: 760px) { .hero { grid-template-columns: minmax(0, 1fr) minmax(220px, 270px); padding: 20px; } }
@media (min-width: 1100px) {
  .hero-main { padding-right: 190px; }
  .hero-main::after { content: ""; position: absolute; right: 12px; top: 50%; width: 168px; height: 150px; transform: translateY(-50%) rotate(7deg); background: url(/brand/mark.svg) center / contain no-repeat; filter: drop-shadow(0 14px 22px rgba(11, 11, 17, .35)); }
}
.sp.sp-strip { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 14px; padding: 10px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.sp.sp-strip small { font: 700 10.5px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sp.sp-strip b { font: 600 15px var(--display); }
.sp.sp-strip span { font-size: 13px; color: var(--muted); }
body.has-rail .sp.sp-strip { display: none; }

/* ---------- shelves: one bordered panel per kind of game ---------- */
.shelves { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.shelf h2 { font: 700 16px/1.2 var(--display); letter-spacing: .06em; flex-wrap: wrap; }
.shelf h2 small { font-size: 13px; }
@media (min-width: 760px) {
  .shelves { gap: 14px; }
  .shelf { margin: 0; padding: 14px 16px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
  .shelf h2 { margin: 0 0 12px; }
}
@media (min-width: 1020px) { .shelves { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; } .shelves .shelf:last-child { grid-column: auto; } .shelves .shelf.wide, .shelves .shelf:only-child { grid-column: 1 / -1; } }

/* a game tile: the art, the name, what it pays, and one lime button */
.shelf .gt { --a: var(--acid); display: flex; flex-direction: column; aspect-ratio: auto; padding: 0 0 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--raise); box-shadow: none; animation: none; }
.gt-art { position: relative; display: block; flex: none; aspect-ratio: 4 / 3; overflow: hidden; }
.gt .gt-cap { position: static; flex: 1; gap: 3px; padding: 8px 10px 8px; background: none; }
.gt .gt-name { font: 600 15px/1.15 var(--display); letter-spacing: 0; text-transform: none; }
.gt .gt-line { align-items: center; gap: 4px; min-height: 18px; color: var(--muted); font-size: 12.5px; }
.gt .gt-line b { color: var(--text); font: 700 14px/1.2 var(--display); }
.gt .gt-line i { color: var(--muted); font-size: 11.5px; }
.gt-go { display: flex; align-items: center; justify-content: center; gap: 6px; height: 32px; margin: 0 8px; padding: 0 10px; border-radius: 999px; background: var(--acid); color: var(--ink); font: 700 13px/1 var(--display); font-style: normal; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.gt::after { content: none !important; }
.gt .gt-badge { font-family: var(--display); font-weight: 600; }
.gt-badge.ok, .gt-badge.live { color: var(--ink); }
.gt.ready, .gt.co.mine { box-shadow: 0 0 0 2px var(--acid); }
.gt.co:not(.mine) { box-shadow: 0 0 0 2px var(--hot); }
.gt.co .gt-name { font-size: 15px; }
.gt.co-new { background: var(--raise); box-shadow: inset 0 0 0 1.5px rgba(182, 255, 30, .45); place-items: initial; }
.gt.co-new .co-plus { margin: 22px auto 10px; color: var(--ink); }
@media (hover: hover) {
  .shelf .gt:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--acid); }
  .gt:hover .gc-img { filter: none; transform: scale(1.05); }
  .tc:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px var(--acid); }
}
@media (max-width: 759px) { .shelf .gt { flex: 0 0 136px; max-width: 136px; } .gt-go { font-size: 12px; } .gt-go .ico { display: none; } }
@media (min-width: 760px) { .shelf .gt { flex: 0 0 156px; max-width: 190px; } }
@media (min-width: 1200px) { body.has-dock .shelf-row, body.has-dock .shelves .shelf.wide .shelf-row { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; } body.has-dock .shelf .gt { max-width: 210px; } }

/* a tournament with a clock on it */
.tcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; margin-bottom: 12px; }
.tc { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--raise); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.tc.top { border-color: transparent; background: linear-gradient(100deg, rgba(122, 61, 255, .32), rgba(255, 47, 166, .14)), var(--raise); box-shadow: inset 0 0 0 2px var(--hot); }
.tc-art { position: relative; flex: none; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; }
.tc-art .gc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tc-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tc-mid > b { font: 600 17px/1.2 var(--display); }
.tc-mid small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-mid em { display: flex; align-items: center; gap: 5px; font: 700 16px/1.3 var(--display); font-style: normal; color: var(--gold); font-variant-numeric: tabular-nums; }
.tc-mid em b { font: inherit; }
.tc-mid em i { color: var(--muted); font: 500 12px Inter, system-ui, sans-serif; font-style: normal; }
.tc-end { flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px; padding-left: 12px; border-left: 1px solid var(--line); }
.tc-end small { color: var(--muted); font-size: 11.5px; }
.tc-end > b { font: 700 15px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.tc-end .gt-go { margin: 3px 0 0; padding: 0 14px; }
@media (prefers-reduced-motion: reduce) { .tc { transition: none; } .tc:hover { transform: none; } }

/* ---------- the three columns: chat and the live panels float as rounded panels beside the games ---------- */
.tk-title { display: none; }
#talk .av, #rail .av { background: hsl(var(--h) 88% 64%); color: var(--ink); }
#rail .av { flex: none; position: relative; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--display); font-style: normal; }
#talk .av.grp { background: var(--raise); color: var(--acid); }
.tk-b > b { color: var(--acid); }
.tk-m.me .tk-b { background: rgba(182, 255, 30, .14); }
.tk-tabs button[data-k="tab"] { font: 600 13px var(--display); letter-spacing: .05em; }
.tk-form input { background: var(--bg); }
.tk-send { width: 40px; height: 40px; flex: none; padding: 0; border-radius: 13px; display: grid; place-items: center; }
.tk-send svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; }
#talkBtn { background: var(--acid); color: var(--ink); border-color: transparent; }
#talkBtn:hover { color: var(--ink); filter: brightness(1.07); }
@media (min-width: 1200px) {
  #talk.dock { top: calc(var(--topbar) + 12px); left: 12px; bottom: 12px; width: 288px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
  #talk.dock .tk-title { display: block; margin: 0; padding: 16px 16px 2px; font: 700 15px/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; }
  #talk.dock header { border-bottom: 1px solid var(--line); }
  body.has-dock main, body.has-dock .ticker, body.has-dock #foot, body.has-dock #liveWins { margin-left: 312px; }
  body.has-dock main, body.has-dock #liveWins, body.has-dock .act { padding-left: 4px; padding-right: 16px; }
  body.has-dock #page { left: 312px; }
}
@media (min-width: 1440px) {
  body.has-rail main, body.has-rail .ticker, body.has-rail #foot, body.has-rail #liveWins { margin-right: 312px; }
  body.has-rail main, body.has-rail #liveWins, body.has-rail .act { padding-right: 4px; }
  body.has-rail #rail { top: calc(var(--topbar) + 12px); right: 12px; bottom: 12px; width: 288px; padding: 0; border: 0; background: none; }
  body.has-rail #page { right: 312px; }
  .rl-box { margin-bottom: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
  .rl-box h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 700 14px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
  .rl-box h3 .ico { width: 19px; height: 19px; color: var(--acid); }
  .rl-big { display: flex; align-items: baseline; gap: 8px; }
  .rl-big .ico { align-self: center; width: 28px; height: 28px; color: var(--acid); }
  .rl-big b { font: 700 28px/1 var(--display); font-variant-numeric: tabular-nums; }
  .rl-big span { font: 700 13px var(--display); letter-spacing: .08em; text-transform: uppercase; }
  .rl-mini { display: flex; gap: 16px; margin-top: 8px; color: var(--muted); font-size: 12.5px; }
  .rl-mini b { color: var(--text); font-weight: 600; }
  .rl-on h3 { margin: 12px 0 10px; padding-top: 12px; border-top: 1px solid var(--line); font: 500 13px Inter, system-ui, sans-serif; letter-spacing: 0; text-transform: none; }
  .rl-avs { display: flex; gap: 7px; }
  .rl-avs button { padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
  #rail .av.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--acid); }
  #rail .av.more { background: var(--raise); color: var(--text); font-size: 12px; }
  .rl-top { display: flex; align-items: center; gap: 12px; width: 100%; padding: 2px 0 12px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
  .rl-top .coin { font-size: 40px; }
  .rl-top b { display: block; font: 700 30px/1 var(--display); font-variant-numeric: tabular-nums; }
  .rl-top small { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; }
  .rl-row { gap: 9px; padding: 9px 2px; border-top: 1px solid var(--line); border-radius: 0; }
  .rl-row .coin { font-size: 17px; }
  .rl-row em { min-width: 50px; color: var(--text); font-size: 15px; }
  .rl-row.who em { min-width: 0; color: var(--acid); }
  .rl-name { font: 500 13.5px/1.25 Inter, system-ui, sans-serif; }
  .rl-row.who .rl-name { font: 600 14px/1.25 var(--display); }
  .rl-name small { font: 500 12.5px Inter, system-ui, sans-serif; }
  .rl-name small i { color: var(--acid); font-style: normal; font-weight: 600; }
  .rl-row time { flex: none; padding: 3px 8px; border-radius: 999px; background: var(--raise); color: var(--muted); font-size: 11.5px; }
  .rl-rank.r1 { background: var(--gold); color: var(--ink); }
  .sp.rl-sp { border-radius: 18px; border: 1px solid var(--line); box-shadow: none; }
}
#liveWins h2 { font: 700 16px/1.2 var(--display); }
.lw { border: 1px solid var(--line); border-radius: 18px; }
.lw-who .av { background: hsl(var(--h) 88% 64%) !important; color: var(--ink) !important; }

/* ---------- small fixes that keep the above honest at every size ---------- */
.hero, .hero-pot, .hero-pot .hm-hero { text-align: left; }
.chip strong span { max-width: none; color: var(--text); font: inherit; }
@media (max-width: 759px) {
  .hero { margin-top: 6px; padding: 14px; gap: 10px; }
  .hero h2 { margin-top: 4px; font-size: 26px; }
  .hero-main p { margin-bottom: 6px; font-size: 14.5px; }
  .btn.white { padding: 10px 18px; font-size: 15px; }
  .hero-pot { padding: 10px 12px; gap: 6px; }
  .hero-pot .hm-amt { margin: 2px 0; font-size: 28px; }
  .hero-pot .hm-amt.sm { font-size: 19px; }
  .hp-meter { padding-top: 8px; }
}
/* on a phone the chat button sits above the bottom bar, never on top of "Me" */
@media (max-width: 1020px) { #talkBtn:not(.in-hud):not(.in-panel) { bottom: calc(74px + env(safe-area-inset-bottom)); } }

/* log in / sign up switch and every other two-way switch: pills, lime when on */
.auth-seg, .seg { border-radius: 999px; }
.auth-seg button, .seg button { border-radius: 999px; font-family: var(--display); }
.auth-seg button.on { background: var(--acid); color: var(--ink); box-shadow: none; }
.logo.big small { margin-top: 6px; font-size: 10px; text-align: left; }
.login .logo.big { margin-bottom: 6px; }
@media (max-width: 640px) { .logo.big small { display: block; } }
/* on a phone the hero keeps to a few lines: the number sits beside its label, the unlock meter waits for a wider screen */
@media (max-width: 759px) {
  .hero-pot .hm-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px; }
  .hero-pot .hm-amt { grid-column: 2; grid-row: 1; margin: 0; }
  .hero-pot .hm-amt.sm { grid-column: 1 / -1; grid-row: auto; }
  .hero-pot .hm-sub { grid-column: 1 / -1; font-size: 12.5px; }
  .hp-meter { display: none; }
}
/* between a tablet and a wide desktop the menu sits beside the logo, so it can never run into the wallet */
@media (min-width: 1021px) and (max-width: 1499px) { .nav { left: 268px; transform: none; } }
@media (min-width: 1021px) and (max-width: 1279px) { .nav button { padding: 0 12px; gap: 7px; font-size: 14px; } .top-right > .btn.ghost { display: none; } }

/* ================= phone (the 390px layout in BRAND.md): 64px top bar, 16px side padding, 20px cards, 12px between sections, 72px bottom bar ================= */
@media (max-width: 759px) {
  .top { min-height: 64px; padding: 8px 16px; gap: 8px; }
  .logo { font-size: 21px; }
  .logo small { display: block; margin-top: 3px; font-size: 6.5px; letter-spacing: .22em; }
  #mute { display: none; } /* sound moves to the foot of the page on a phone */
  main { padding-left: 16px; padding-right: 16px; }
  /* hero: the gradient card, then the prize card under it */
  .hero { margin: 8px 0 12px; padding: 0; gap: 12px; border-radius: 0; background: none; overflow: visible; }
  .hero-main { padding: 16px; border-radius: 20px; background: var(--grad); overflow: hidden; }
  .hero-tags { width: 100%; justify-content: space-between; }
  .hero h2 { max-width: 74%; font-size: 25px; text-wrap: wrap; }
  .hero-main p { max-width: 62%; margin-bottom: 10px; }
  .hero-main p b { display: block; }
  .hero-main::after { content: ""; position: absolute; right: 4px; bottom: 12px; width: 96px; height: 86px; transform: rotate(7deg); background: url(/brand/mark.svg) center / contain no-repeat; filter: drop-shadow(0 10px 16px rgba(11, 11, 17, .35)); }
  .hero-pot { flex-direction: row; align-items: stretch; gap: 14px; padding: 14px 16px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
  .hero-pot .hm-hero { display: block; flex: 1 1 0; min-width: 0; }
  .hero-pot .hm-amt { margin: 4px 0 2px; font-size: 32px; }
  .hero-pot .hm-amt.sm { font-size: 19px; }
  .hp-meter { display: grid; flex: 1 1 0; min-width: 0; align-content: center; padding: 0 0 0 14px; border-top: 0; border-left: 1px solid var(--line); }
  /* shelves */
  .shelves { gap: 12px; }
  .shelf { margin: 0; }
  .shelf h2 { margin: 0 0 8px; font-size: 17px; }
  .shelf-row { gap: 10px; }
  .tcards { display: flex; gap: 10px; margin: 0 -16px 10px; padding: 0 16px 2px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 16px; scrollbar-width: none; }
  .tcards::-webkit-scrollbar { display: none; }
  .tc { flex: 0 0 86%; scroll-snap-align: start; border-radius: 18px; }
  .tc:only-child { flex-basis: 100%; }
  .tc-art { width: 56px; height: 56px; }
  .shelf .gt { flex: 0 0 calc((100% - 30px) / 3.3); max-width: none; min-width: 104px; border-radius: 16px; }
  .gt .gt-cap { padding: 6px 8px; }
  .gt .gt-name { font-size: 14px; }
  .gt-go { height: 30px; margin: 0 6px; padding: 0 4px; font-size: 11.5px; letter-spacing: .02em; }
}
/* bottom bar on phones and tablets: 72px, the tab you are on is a lime block */
@media (max-width: 1020px) {
  .nav { min-height: 72px; align-items: center; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: rgba(19, 19, 28, .96); }
  .nav button { flex: 1; max-width: 120px; height: 56px; justify-content: center; gap: 3px; padding: 0; border-radius: 16px; color: var(--text); font: 600 12px var(--display); letter-spacing: .04em; }
  .nav button.on { background: var(--acid); color: var(--ink); font-weight: 700; }
  .nav svg { width: 24px; height: 24px; }
  main { padding-bottom: 96px; }
  #talkBtn:not(.in-hud):not(.in-panel) { bottom: calc(86px + env(safe-area-inset-bottom)); }
}
/* the chat button is the one purple control */
#talkBtn { background: var(--purple); color: #fff; box-shadow: 0 10px 26px -10px var(--purple); }
#talkBtn:hover { color: #fff; }
#talkBtn em.dot { background: var(--acid); }
.foot-sound { display: none; }
@media (max-width: 759px) { .foot-sound { display: inline; } }

/* ---------- phones: the page never zooms, and nothing runs behind a game ---------- */
/* Pinch and double-tap zoom are off everywhere (with the viewport tag and the gesture handlers at the top of app.js). */
html, body { touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%; }
/* While a game is on screen the lobby under it is not drawn or laid out, and the background glow stops moving. */
body:has(#stage:not([hidden])) :is(main, .ticker, #liveWins, #rail, .bg, #foot) { visibility: hidden; content-visibility: hidden; }
/* On touch screens the glow is still and the hero mark has no shadow filter: both cost a phone frames for nothing. */
@media (pointer: coarse), (max-width: 759px) { .bg i { animation: none; } .hero-main::after { filter: none; } }

/* ---------- knockouts: the wide tournament card with a players meter, the entry-fee pills, the bracket ---------- */
.ko-meter { display: block; width: 100%; min-width: 74px; height: 6px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.ko-meter b { display: block; height: 100%; border-radius: 99px; background: var(--acid); }
.sheet .ko-meter { height: 8px; margin: 10px 0 0; background: var(--raise); }
.tc.ko .tc-end { min-width: 96px; }
.tc.ko .tc-mid small .coin { font-size: 12px; margin-right: 2px; }
.ko-fees { display: inline-flex; gap: 4px; margin-left: auto; padding: 3px; border-radius: 999px; background: var(--raise); }
.ko-fees button { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 11px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 700 13px var(--display); letter-spacing: 0; cursor: pointer; font-variant-numeric: tabular-nums; }
.ko-fees button.on { background: var(--acid); color: var(--ink); }
.ko-who { display: flex; flex-wrap: wrap; gap: 6px; }
.ko-who span { padding: 4px 10px; border-radius: 999px; background: var(--raise); font: 600 13px var(--display); }
.ko-who span.me { background: var(--acid); color: var(--ink); }
.ko-prizes { display: grid; gap: 6px; margin: 0 0 12px; }
.ko-prizes div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--raise); font-size: 13.5px; }
.ko-prizes b { display: inline-flex; align-items: center; gap: 5px; font: 700 15px var(--display); font-variant-numeric: tabular-nums; }
.ko-br { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(124px, 1fr); gap: 10px; margin: 0 -18px 12px; padding: 2px 18px 6px; overflow-x: auto; scrollbar-width: thin; }
.ko-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ko-ms { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 8px; }
.ko-col h4 { margin: 0; min-height: 26px; display: flex; align-items: flex-end; font: 700 11px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ko-m { display: grid; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); overflow: hidden; }
.ko-m.live { border-color: var(--hot); }
.ko-m.mine { box-shadow: inset 3px 0 0 var(--acid); }
.ko-m span { display: flex; justify-content: space-between; gap: 6px; min-height: 28px; align-items: center; padding: 0 9px; font: 600 13px var(--display); white-space: nowrap; overflow: hidden; }
.ko-m span + span { border-top: 1px solid var(--line); }
.ko-m span.w { color: var(--acid); }
.ko-m span.l { color: var(--muted); }
.ko-m span i { font-style: normal; color: var(--muted); font-weight: 500; }
.ko-m span em { font-style: normal; font-variant-numeric: tabular-nums; }
.sheet:has(.ko-br) { max-width: 560px; }
@media (max-width: 759px) { .ko-fees button { height: 26px; padding: 0 9px; font-size: 12px; } .shelf h2 .ko-fees { margin-left: 0; } }

/* ================= even shelves: every shelf is ONE row of same-size tiles =================
   Few tiles stretch to fill the row; many scroll sideways. No shelf ever wraps onto a second, uneven row. */
.shelves, body.has-dock .shelves { grid-template-columns: minmax(0, 1fr); }
.shelves .shelf, .shelves .shelf:last-child { grid-column: 1 / -1; }
.shelf-row, body.has-dock .shelf-row, body.has-dock .shelves .shelf.wide .shelf-row { display: flex; flex-wrap: nowrap; grid-template-columns: none; gap: 12px; margin: 0; padding: 2px 2px 6px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scrollbar-width: none; }
.shelf-row::-webkit-scrollbar { display: none; }
.shelf .gt, body.has-dock .shelf .gt { flex: 1 0 172px; max-width: none; scroll-snap-align: start; }
.gt-art { aspect-ratio: auto; height: clamp(118px, 10.5vw, 164px); }
.sh-nav { display: none; gap: 6px; margin-left: auto; }
.sh-nav button { width: 30px; height: 30px; padding: 0 0 2px; border: 1px solid var(--line); border-radius: 50%; background: var(--raise); color: var(--text); font: 700 18px/1 var(--display); cursor: pointer; }
.sh-nav button:hover { border-color: var(--acid); color: var(--acid); }
@media (hover: hover) and (pointer: fine) { .shelf.scrolls .sh-nav { display: inline-flex; } }
@media (max-width: 759px) {
  .shelf-row { gap: 10px; margin: 0 -16px; padding: 2px 16px 6px; scroll-padding: 0 16px; }
  .shelf .gt { flex: 1 0 calc((100% - 30px) / 3.3); min-width: 104px; }
  .gt-art { height: 92px; }
}
/* the knockout sheet: pick a bracket by entry fee; the skill bracket is shown, never chosen */
.ko-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.ko-pick button { display: grid; gap: 2px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--raise); color: var(--text); font: inherit; text-align: center; cursor: pointer; }
.ko-pick b { display: inline-flex; align-items: center; justify-content: center; gap: 5px; font: 700 17px var(--display); font-variant-numeric: tabular-nums; }
.ko-pick span { font-size: 12px; color: var(--muted); }
.ko-pick button.on { border-color: var(--acid); box-shadow: inset 0 0 0 1px var(--acid); }
.ko-pick button.on b { color: var(--acid); }
.ko-skill { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.ko-skill b { color: var(--ice); }

/* ---------- the first-visit intro and the How to play sheet ---------- */
#intro { z-index: 70; }
.panel.intro { max-width: 420px; padding: 18px 20px 20px; text-align: left; }
.in-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.in-art { display: block; width: 84px; height: 76px; margin: 4px 0 12px; object-fit: contain; }
.in-ico { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--acid); color: var(--ink); font-size: 34px; }
.panel.intro h2 { margin: 0 0 8px; font: 700 28px/1.1 var(--display); text-wrap: balance; }
.panel.intro p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.panel.intro p b { color: var(--text); font-weight: 600; }
.in-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.in-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--raise); }
.in-list i { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--acid); color: var(--ink); font-size: 18px; font-style: normal; }
.in-list span { font-size: 13.5px; color: var(--muted); line-height: 1.35; }
.in-list b { display: block; color: var(--text); font: 600 16px/1.2 var(--display); }
.in-dots { display: flex; gap: 6px; margin: 18px 0 14px; }
.in-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--raise); }
.in-dots i.on { width: 22px; border-radius: 99px; background: var(--acid); }
.in-acts { display: flex; gap: 8px; }
.in-more { display: block; margin: 12px auto 0; }
.howto .ht-steps { margin: 0 0 12px; padding: 0; list-style: none; counter-reset: ht; display: grid; gap: 8px; }
.howto .ht-steps li { counter-increment: ht; position: relative; padding: 10px 12px 10px 48px; border-radius: 14px; background: var(--raise); color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.howto .ht-steps li::before { content: counter(ht); position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--acid); color: var(--ink); font: 700 15px var(--display); }
.howto .ht-steps b { color: var(--text); font-weight: 600; }
.ht-games { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ht-games li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; line-height: 1.35; }
.ht-games b { display: block; color: var(--text); font: 600 15px/1.2 var(--display); }
.ht-art { position: relative; flex: none; width: 44px; height: 44px; border-radius: 11px; overflow: hidden; }
.ht-art .gc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.howto a.btn { display: inline-flex; align-items: center; text-decoration: none; }

/* ---------- the "i" button and the rules of one game ---------- */
.icon.info { color: var(--text); }
.icon.info svg, .x.info svg, .ht-games i svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.icon.info:hover, .sheet .x.info:hover { border-color: var(--acid); color: var(--acid); }
.icon.info.in-xo { position: absolute; top: 8px; right: 48px; z-index: 4; width: 32px; height: 32px; background: transparent; }
.sheet .x.info { right: 52px; display: grid; place-items: center; padding: 0; color: var(--text); }
#gameInfo { z-index: 75; }
.panel.sheet.gr { max-width: 460px; }
.gr h3 { padding-right: 44px; }
.gr-aim { margin: 6px 0 4px; font: 600 16px/1.35 var(--display); color: var(--text); }
.gr-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.gr-list li { position: relative; padding: 9px 12px 9px 30px; border-radius: 12px; background: var(--raise); font-size: 13.5px; line-height: 1.4; color: var(--text); }
.gr-list li::before { content: ""; position: absolute; left: 12px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--acid); }
.gr a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.ht-games li { display: block; }
.ht-games button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; border: 0; border-radius: 12px; background: none; color: var(--muted); font: inherit; font-size: 13px; line-height: 1.35; text-align: left; cursor: pointer; }
.ht-games button:hover { background: var(--raise); }
.ht-games button > span:nth-child(2) { flex: 1; min-width: 0; }
.ht-games i { flex: none; color: var(--muted); display: grid; }

/* ---------- Ranks and profile: boards for every game, the overall table, a player's standings ---------- */
.pg-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.pg-tabs::-webkit-scrollbar, .pg-games-pick::-webkit-scrollbar { display: none; }
.pg-tabs button { flex: 1 0 auto; white-space: nowrap; }
.pg-seg.pg-games-pick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pg-seg.pg-games-pick button { flex: 0 0 auto; padding: 7px 14px; white-space: nowrap; font: 600 13px var(--display); }
.pg-seg button.on { background: var(--acid); border-color: var(--acid); color: var(--ink); }
.pg-blurb { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.pg-blurb b { color: var(--text); }
.pg-find { display: flex; gap: 8px; margin: 0 0 10px; }
.pg-find input, .pg-find select { min-width: 0; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.pg-find input { flex: 1; }
.pg-find select { flex: 0 0 auto; max-width: 130px; color-scheme: dark; }
.pg-find input:focus, .pg-find select:focus { outline: none; border-color: var(--acid); }
ol.board.pg-board b small { margin-left: 4px; font: 500 11px Inter, system-ui, sans-serif; color: var(--muted); }
ol.board.pg-board.ranked li:nth-child(1) { background: rgba(255, 255, 255, .035); }
ol.board.pg-board.ranked li:nth-child(1) b { color: inherit; text-shadow: none; }
ol.board.pg-board li .rk { min-width: 26px; text-align: center; }
ol.board.pg-board.pg-mine { margin-bottom: 8px; }
ol.board.pg-board.pg-mine li { box-shadow: inset 0 0 0 1.5px var(--acid); background: rgba(182, 255, 30, .08); }
.pg-world { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; margin: 10px 0 12px; padding: 14px 16px; border-radius: 18px; background: var(--grad); color: #fff; cursor: pointer; }
.pg-world span { font: 700 12px var(--display); letter-spacing: .1em; text-transform: uppercase; }
.pg-world b { grid-row: 1 / 3; grid-column: 2; font: 700 40px/1 var(--display); font-variant-numeric: tabular-nums; }
.pg-world small { font-size: 12.5px; color: rgba(255, 255, 255, .85); }
.pg-world.none { background: var(--raise); color: var(--text); }
.pg-world.none small { color: var(--muted); }
.pg-games { list-style: none; margin: 6px 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.pg-games li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); cursor: pointer; min-width: 0; }
.pg-games li:hover { border-color: var(--acid); }
.pg-games li.none { opacity: .6; }
.pg-games b { display: block; font: 600 15px/1.2 var(--display); }
.pg-games small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; }
.pg-gn { min-width: 0; } .pg-gn b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-gr { flex: none; text-align: right; } .pg-gr b { font-size: 18px; color: var(--acid); font-variant-numeric: tabular-nums; }
.pg-games li.none .pg-gr b { color: var(--muted); }
