/* SOLITHER — UI shell.
   Mostly black, charcoal and off-white. The Solana gradient is an accent only:
   the logo, the prize pool, the leader row, the boost ring, death particles. */

:root {
  --bg:        #07080C;
  --panel:     rgba(14, 16, 22, 0.82);
  --panel-2:   rgba(255, 255, 255, 0.035);
  --line:      rgba(255, 255, 255, 0.09);
  --line-2:    rgba(255, 255, 255, 0.14);
  --ink:       #F2F4F8;
  --ink-dim:   #8C93A3;
  --ink-faint: #5A6070;
  --sol-purple:#9945FF;
  --sol-green: #14F195;
  --sol-cyan:  #00D8FF;
  --grad: linear-gradient(100deg, var(--sol-purple), var(--sol-cyan) 45%, var(--sol-green));
  --display: "Archivo Black", system-ui, "Segoe UI", Roboto, sans-serif;
  --ui: "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body { touch-action: none; }

#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.screen-off { display: none !important; }
.hidden { display: none !important; }

.panel-title {
  font-size: 10px; font-weight: 800; letter-spacing: 0.16em;
  color: var(--ink-faint); margin-bottom: 8px;
}

.stat-k {
  display: block; font-size: 10px; font-weight: 800;
  letter-spacing: 0.14em; color: var(--ink-faint);
}

/* ───────────────────────────── HUD ───────────────────────────── */

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }

/*
 * The corner stats sit directly on the playfield with no panel, so a bright
 * SOL coin drifting behind them used to wash the labels out. A soft scrim
 * darkens just that corner without boxing the HUD in.
 */
#hud::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 360px; height: 230px; pointer-events: none;
  background: radial-gradient(
    ellipse at top left,
    rgba(7, 8, 12, 0.92),
    rgba(7, 8, 12, 0.55) 45%,
    transparent 72%
  );
}

.hud-tl {
  position: absolute; top: max(16px, env(safe-area-inset-top)); left: 16px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}
.stat-v { font-family: var(--display); font-size: 34px; line-height: 1.05; }
.stat.sm .stat-v { font-size: 18px; }
.stat-row { display: flex; gap: 20px; margin-top: 8px; }

#round-strip {
  margin-top: 12px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; color: var(--ink-dim);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
#round-strip .dot { color: var(--ink-faint); }
#round-strip .wta { color: var(--ink-faint); letter-spacing: 0.12em; }
#round-strip #round-pool {
  background: var(--grad); -webkit-background-clip: text;
  background-clip: text; color: transparent; font-weight: 800;
}
#round-strip.urgent #round-clock { color: var(--sol-green); }

.hud-tr {
  position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px;
  min-width: 210px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; backdrop-filter: blur(12px);
}
#lb-list { list-style: none; }
#lb-list li, .lb-you {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 8px;
  align-items: baseline; font-size: 12.5px; padding: 3px 0;
  color: var(--ink-dim);
}
#lb-list li .n { color: var(--ink-faint); font-variant-numeric: tabular-nums; }
#lb-list li .s { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
#lb-list li .p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#lb-list li.me { color: var(--ink); }
#lb-list li.me .p { font-weight: 800; }
#lb-list li.lead .p {
  background: var(--grad); -webkit-background-clip: text;
  background-clip: text; color: transparent; font-weight: 800;
}
.lb-you {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line);
  color: var(--ink);
}
.lb-you .p { font-weight: 800; }

#killfeed {
  position: absolute; left: 16px; bottom: max(16px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column-reverse; gap: 6px; max-width: 46vw;
}
.kill {
  font-size: 12px; color: var(--ink-dim);
  background: var(--panel); border: 1px solid var(--line);
  padding: 5px 10px; border-radius: 8px;
  animation: killIn 0.22s ease-out, fadeOut 0.5s ease-in 3.4s forwards;
}
.kill b { color: var(--ink); font-weight: 700; }
.kill.mine { border-color: rgba(20, 241, 149, 0.45); }
.kill.mine b { color: var(--sol-green); }
@keyframes killIn { from { opacity: 0; transform: translateX(-14px); } }
@keyframes fadeOut { to { opacity: 0; } }

#rank-pop {
  position: absolute; left: 50%; top: 16%; transform: translateX(-50%);
  font-family: var(--display); font-size: 30px; letter-spacing: 0.04em;
  opacity: 0; pointer-events: none; white-space: nowrap;
}
#rank-pop.show { animation: rankPop 1.5s cubic-bezier(.2,.9,.2,1) forwards; }
#rank-pop.crown {
  background: var(--grad); -webkit-background-clip: text;
  background-clip: text; color: transparent; font-size: 44px;
}
@keyframes rankPop {
  0%   { opacity: 0; transform: translateX(-50%) scale(0.82); }
  16%  { opacity: 1; transform: translateX(-50%) scale(1.04); }
  72%  { opacity: 1; transform: translateX(-50%) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) scale(1) translateY(-16px); }
}

#sound-toggle {
  position: absolute; right: 16px; bottom: max(16px, env(safe-area-inset-bottom));
  pointer-events: auto; width: 34px; height: 34px; border-radius: 9px;
  background: var(--panel); border: 1px solid var(--line);
  color: var(--ink-dim); font-size: 14px; cursor: pointer;
}
#sound-toggle:hover { color: var(--ink); }
#sound-toggle.off { color: var(--ink-faint); text-decoration: line-through; }

#touch-boost {
  position: absolute; right: 22px; bottom: 84px; pointer-events: auto;
  width: 96px; height: 96px; border-radius: 50%;
  border: 2px solid rgba(20, 241, 149, 0.5);
  background: rgba(20, 241, 149, 0.08);
  color: var(--sol-green); font-size: 12px; font-weight: 800;
  letter-spacing: 0.12em;
  display: flex; align-items: center; justify-content: center;
  user-select: none;
}
#touch-boost.active { background: rgba(20, 241, 149, 0.22); transform: scale(0.94); }

/* ─────────────────────────── Menu ─────────────────────────── */

#menu, #gameover {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 28px 20px; overflow-y: auto;
  background:
    radial-gradient(1100px 620px at 50% 28%, rgba(153,69,255,0.11), transparent 68%),
    rgba(7,8,12,0.92);
  backdrop-filter: blur(3px);
}
#gameover { align-items: center; }

/*
 * Social link, pinned to the top right of the start screen only — in game that
 * corner belongs to the leaderboard. Fixed positioning still hides with the
 * menu, because a fixed child of a display:none parent is not rendered.
 */
#x-link {
  position: fixed; top: 16px; right: 16px; z-index: 25;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line);
  color: var(--ink-dim); text-decoration: none;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em;
  backdrop-filter: blur(10px);
  transition: color .14s, border-color .14s, background .14s, transform .14s;
}
#x-link svg { width: 14px; height: 14px; fill: currentColor; flex-shrink: 0; }
#x-link:hover {
  color: var(--ink); border-color: var(--line-2);
  background: rgba(255,255,255,0.07); transform: translateY(-1px);
}
#x-link:focus-visible { outline: 2px solid var(--sol-green); outline-offset: 2px; }

.menu-card, .over-card {
  width: 100%; max-width: 540px; text-align: center; margin: auto;
  animation: cardIn 0.28s cubic-bezier(.2,.9,.2,1);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } }

/*
 * `background-clip: text` only paints inside the element's own box, so any
 * glyph that overflows renders transparent — that is what was slicing the
 * final R. The inner span shrink-wraps the gradient to the text and adds a
 * little side padding for glyph overhang; nowrap plus a font size that fits
 * the card keeps the word inside the box at every width.
 */
.logo {
  font-size: clamp(38px, 9vw, 62px);
  line-height: 1;
}
.logo span {
  display: inline-block;
  padding: 0 0.1em;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.015em;
  white-space: nowrap;
  background: var(--grad);
  background-size: 180% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: logoShift 9s ease-in-out infinite;
}
@keyframes logoShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.tagline {
  margin-top: 10px; font-size: 11.5px; font-weight: 800;
  letter-spacing: 0.2em; color: var(--ink-dim);
}

/* ── Prize banner ── */

.prize-banner {
  margin-top: 22px; padding: 16px 18px; border-radius: 14px;
  background: linear-gradient(rgba(20,241,149,0.05), rgba(153,69,255,0.05));
  border: 1px solid rgba(20,241,149,0.24);
}
.prize-headline {
  font-size: 12px; font-weight: 800; letter-spacing: 0.1em;
  line-height: 1.5; color: var(--ink);
}
.prize-headline em {
  font-style: normal;
  background: var(--grad); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
/* The 50 / 30 / 20 split, weighted so first place clearly reads as the prize. */
.split-row {
  list-style: none; margin-top: 14px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.split-row li {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line);
}
.split-row .place {
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.14em;
  color: var(--ink-faint);
}
.split-row .share {
  font-family: var(--display); font-weight: 400; font-size: 17px;
  color: var(--ink-dim); line-height: 1.1;
}
.split-row li:first-child {
  border-color: rgba(20, 241, 149, 0.32);
  background: rgba(20, 241, 149, 0.07);
}
.split-row li:first-child .place { color: var(--ink-dim); }
.split-row li:first-child .share {
  font-size: 21px;
  background: var(--grad); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}

.prize-row {
  margin-top: 14px; display: flex; align-items: center; justify-content: center;
  gap: 18px;
}
.prize-cell { flex: 1; }
.prize-div { width: 1px; height: 34px; background: var(--line); }
.prize-pool, .prize-clock {
  display: block; margin-top: 5px;
  font-family: var(--display); font-size: 26px; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.prize-pool {
  background: var(--grad); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
.prize-clock.urgent { color: var(--sol-green); }
.prize-leader {
  margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-dim);
}
.prize-leader b { color: var(--ink); font-weight: 700; }

/* No figure published yet — the pot is simply "all fees", so tone it down to
   read as a statement rather than as a headline number. */
.prize-pool.unpublished { font-size: 19px; letter-spacing: 0.04em; }

.pot-note {
  margin-top: 10px; font-size: 10.5px; line-height: 1.6;
  color: var(--ink-faint); padding: 0 4px;
}

/* ── Form ── */

#join-form { margin-top: 20px; display: flex; flex-direction: column; gap: 9px; }

#name-input, #wallet-input {
  width: 100%; padding: 15px 18px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--ink); font-family: var(--ui); font-size: 15px;
  font-weight: 700; letter-spacing: 0.08em; text-align: center;
  outline: none; transition: border-color .15s, background .15s;
}
#name-input::placeholder, #wallet-input::placeholder {
  color: var(--ink-faint); letter-spacing: 0.12em; font-weight: 600;
}
#name-input:focus, #wallet-input:focus {
  border-color: rgba(20,241,149,0.55); background: rgba(255,255,255,0.06);
}
#wallet-input {
  font-size: 12.5px; letter-spacing: 0.04em; padding-right: 74px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
#wallet-input.valid { border-color: rgba(20,241,149,0.5); }
#wallet-input.invalid { border-color: rgba(255,107,138,0.55); }

.wallet-field { position: relative; }
.paste-btn {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  padding: 7px 11px; border-radius: 8px;
  background: rgba(255,255,255,0.07); border: 1px solid var(--line);
  color: var(--ink-dim); font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.12em;
}
.paste-btn:hover { color: var(--ink); border-color: var(--line-2); }

.field-note {
  font-size: 10.5px; line-height: 1.5; color: var(--ink-faint);
  text-align: left; padding: 0 4px;
}

button { font-family: var(--ui); cursor: pointer; border: none; }

#play-btn, .primary {
  width: 100%; padding: 16px; border-radius: 12px; margin-top: 3px;
  background: var(--grad); color: #06070A;
  font-size: 15px; font-weight: 800; letter-spacing: 0.14em;
  transition: transform .12s ease, filter .12s ease;
}
#play-btn:hover, .primary:hover { filter: brightness(1.1); }
#play-btn:active, .primary:active { transform: scale(0.985); }
#play-btn:disabled { opacity: .5; cursor: default; }

.ghost {
  width: 100%; padding: 13px; margin-top: 8px; border-radius: 12px;
  background: transparent; border: 1px solid var(--line); color: var(--ink-dim);
  font-size: 12px; font-weight: 800; letter-spacing: 0.14em;
}
.ghost:hover { color: var(--ink); border-color: var(--line-2); }
.link {
  margin-top: 12px; background: none; color: var(--ink-faint);
  font-size: 12px; text-decoration: underline; text-underline-offset: 3px;
}
.link:hover { color: var(--ink-dim); }

.err { margin-top: 9px; font-size: 11.5px; color: #FF6B8A; }
.hint { margin-top: 16px; font-size: 11.5px; color: var(--ink-faint); }

.menu-meta {
  margin-top: 18px; display: flex; align-items: center; justify-content: center;
  gap: 14px; font-size: 11.5px; color: var(--ink-dim);
}
.menu-meta strong { color: var(--ink); font-weight: 800; }
.menu-meta .sep { width: 1px; height: 12px; background: var(--line); }

/* `align-items: start` so each board sizes to its own content. Stretching left
   a near-empty "THIS ROUND" panel as a tall void next to a full one. */
.menu-boards {
  margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; align-items: start;
}
.board {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; text-align: left;
}
.board.champs { margin-top: 12px; }
.board .panel-title { margin-bottom: 4px; }
.mini { list-style: none; }
.mini li {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px;
  align-items: center; font-size: 12px; color: var(--ink-dim);
  padding: 7px 0;
}
.mini li + li { border-top: 1px solid rgba(255,255,255,0.05); }
.mini li .n {
  color: var(--ink-faint); font-variant-numeric: tabular-nums;
  font-size: 11px; text-align: right;
}
.mini li .who { min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.mini li .p { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini li .s {
  font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.mini li:first-child .p { color: var(--ink); font-weight: 700; }

/*
 * The empty state is the <li> itself. Without this it inherits the three-column
 * grid and lands in the 18px rank column, which wraps the sentence one word per
 * line.
 */
.mini li.empty {
  display: block; color: var(--ink-faint); font-size: 11.5px;
  padding: 6px 0; line-height: 1.5;
}

/* Champions are keyed by round number ("R19"), which needs more room. */
.mini.champs-list li { grid-template-columns: 32px minmax(0, 1fr) auto; }
.mini.champs-list li .n { text-align: left; }

/* ── Copyable wallet chips ── */

/*
 * Address chip. The icon swaps to a tick on copy rather than the label growing
 * from "COPY" to "COPIED" — both glyphs are the same size, so the row never
 * shifts. An earlier version reserved space for a hidden text label, which left
 * a dead gap inside every pill.
 */
.wallet-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 3px 8px; border-radius: 6px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line);
  color: var(--ink-faint); font-size: 10.5px; font-weight: 600;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.02em; line-height: 1.5; cursor: pointer;
  transition: color .12s, border-color .12s, background .12s;
}
.wallet-chip svg { width: 11px; height: 11px; fill: currentColor; flex-shrink: 0; }
.wallet-chip .ico-done { display: none; }
.wallet-chip .addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-chip:hover {
  color: var(--sol-green); border-color: rgba(20,241,149,0.4);
  background: rgba(20,241,149,0.07);
}
.wallet-chip:focus-visible { outline: 2px solid var(--sol-green); outline-offset: 2px; }
.wallet-chip.copied {
  color: var(--sol-green); border-color: rgba(20,241,149,0.55);
  background: rgba(20,241,149,0.1);
}
.wallet-chip.copied .ico-copy { display: none; }
.wallet-chip.copied .ico-done { display: inline-block; }

.wallet-none {
  font-size: 10.5px; color: var(--ink-faint); font-style: italic; line-height: 1.5;
}

.name-row {
  display: flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%;
}

/* Finishing place. Gold/silver/bronze reads instantly without a legend. */
.place-pill {
  flex-shrink: 0; min-width: 26px; text-align: center;
  font-size: 9px; font-weight: 800; letter-spacing: 0.06em;
  padding: 2px 5px; border-radius: 5px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--line);
  color: var(--ink-faint);
}
.place-pill.p1 { color: #FFD166; border-color: rgba(255,209,102,0.42); background: rgba(255,209,102,0.1); }
.place-pill.p2 { color: #C6CEDA; border-color: rgba(198,206,218,0.35); background: rgba(198,206,218,0.08); }
.place-pill.p3 { color: #E0A06A; border-color: rgba(224,160,106,0.35); background: rgba(224,160,106,0.08); }

/* A round's podium reads as one block, separated from the round above it. */
.mini.champs-list li { border-top: none; }
.mini.champs-list li.round-start { border-top: 1px solid rgba(255,255,255,0.07); }
.mini.champs-list li.round-start:first-child { border-top: none; }
.mini.champs-list li:not(.round-start) { padding-top: 2px; }

/* Score cell carries the share above the score. */
.mini li .s em {
  display: block; font-style: normal; font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.06em; color: var(--sol-green); margin-bottom: 1px;
}
.champ-status {
  flex-shrink: 0;
  font-size: 8.5px; font-weight: 800; letter-spacing: 0.1em;
  padding: 2px 6px; border-radius: 5px;
  border: 1px solid var(--line); color: var(--ink-faint);
}
.champ-status.settled { color: var(--sol-green); border-color: rgba(20,241,149,0.4); }

.fine { margin-top: 18px; font-size: 10.5px; color: var(--ink-faint); letter-spacing: 0.04em; line-height: 1.6; }
.fine.dim { margin-top: 14px; }
kbd {
  background: rgba(255,255,255,0.07); border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 5px; font-family: var(--ui); font-size: 10px;
}

/* ───────────────────────── Game over ───────────────────────── */

#over-title { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 8vw, 44px); letter-spacing: 0.02em; }
.over-by { margin-top: 8px; font-size: 12px; color: var(--ink-dim); }
.over-by b { color: var(--ink); }

.over-score { margin-top: 24px; position: relative; }
.over-score .big { display: block; font-family: var(--display); font-weight: 400; font-size: 60px; line-height: 1.05; }
.best-flag {
  display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 20px;
  background: var(--grad); color: #06070A; font-size: 10px;
  font-weight: 800; letter-spacing: 0.14em;
  animation: bestIn .4s cubic-bezier(.2,.9,.2,1);
}
@keyframes bestIn { from { opacity: 0; transform: scale(.8); } }

.over-grid {
  margin-top: 24px; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px 10px; padding: 16px 0; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.over-grid > div > span:last-child {
  display: block; margin-top: 4px; font-family: var(--display);
  font-weight: 400; font-size: 18px;
}
.over-standing { margin-top: 14px; font-size: 11.5px; color: var(--ink-dim); line-height: 1.6; }
.over-standing b { color: var(--ink); }
.over-standing .lead-note {
  background: var(--grad); -webkit-background-clip: text;
  background-clip: text; color: transparent; font-weight: 800;
}
.over-card .primary { margin-top: 20px; }

/* ───────────────────────── Toasts ───────────────────────── */

#conn-status {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 40;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 16px; font-size: 12px; color: var(--ink-dim);
  backdrop-filter: blur(10px);
}
#conn-status.bad { border-color: rgba(255,107,138,0.5); color: #FF6B8A; }

#toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: rgba(14,16,22,0.95); border: 1px solid rgba(20,241,149,0.45);
  border-radius: 10px; padding: 10px 18px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: var(--sol-green);
  backdrop-filter: blur(10px);
  animation: toastIn .2s cubic-bezier(.2,.9,.2,1);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(8px); } }

/* ───────────────────────── Responsive ───────────────────────── */

@media (max-width: 620px) {
  .hud-tr { min-width: 0; width: 152px; padding: 9px 10px; }
  #lb-list li, .lb-you { font-size: 11px; grid-template-columns: 18px 1fr auto; }
  .hud-tl .stat-v { font-size: 26px; }
  .hud-tl .stat.sm .stat-v { font-size: 15px; }
  #round-strip { max-width: 45vw; font-size: 10px; }
  #round-strip .wta, #round-strip .dot:last-of-type { display: none; }
  #killfeed { max-width: 60vw; bottom: 96px; }
  .menu-boards { grid-template-columns: 1fr; }
  .over-grid { grid-template-columns: repeat(2, 1fr); }
  #sound-toggle { bottom: max(16px, env(safe-area-inset-bottom)); }
  .prize-row { gap: 12px; }
  .prize-pool, .prize-clock { font-size: 22px; }
  /* Icon only on small screens — the handle would crowd the logo. */
  #x-link { top: 12px; right: 12px; padding: 9px; gap: 0; }
  #x-link span { display: none; }
  /* A 44-character address will not fit at the desktop size on a phone. */
  #wallet-input { font-size: 11px; padding-left: 12px; padding-right: 68px; }
  /* Touch has no hover, so show the copy affordance permanently. */
  .wallet-chip::after { opacity: 1; }
}

@media (hover: none) {
  .hint { display: none; }
  .wallet-chip::after { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .logo span { animation: none; }
  .menu-card, .over-card, .kill, #toast { animation: none; }
}
