/* ---------- tokens ---------- */
:root {
  --bg: #07130d;
  --bg-2: #0b1d14;
  --felt: #0f2a1d;
  --card: rgba(18, 38, 28, 0.72);
  --card-2: rgba(255, 255, 255, 0.035);
  --line: rgba(232, 222, 200, 0.1);
  --line-2: rgba(232, 222, 200, 0.16);
  --text: #f3ecdd;
  --text-2: #c9d3cb;
  --muted: #8ea396;
  --gold: #e9c27d;
  --gold-2: #f6dca6;
  --gold-deep: #b98a3e;
  --gold-soft: rgba(233, 194, 125, 0.12);
  --green: #6fd99d;
  --green-soft: rgba(111, 217, 157, 0.12);
  --red: #f08f80;
  --red-soft: rgba(240, 143, 128, 0.12);
  --amber: #f1b765;
  --amber-soft: rgba(241, 183, 101, 0.12);
  --silver: #cfd6dc;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 48px -24px rgba(0, 0, 0, 0.6);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 700px at 50% -20%, rgba(46, 125, 85, 0.35), transparent 65%),
    radial-gradient(800px 500px at 100% 0%, rgba(233, 194, 125, 0.08), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(30, 90, 60, 0.18), transparent 60%);
  background-attachment: fixed;
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.num { font-variant-numeric: tabular-nums lining-nums; letter-spacing: -0.01em; }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }

svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

a { color: var(--gold); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 19, 13, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  width: min(1120px, 100% - 32px);
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(145deg, #1d4632, #0e2619);
  border: 1px solid rgba(233, 194, 125, 0.35);
  color: var(--gold);
  font-size: 18px;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  flex: none;
}

.brand-text { display: grid; min-width: 0; }

.brand-name {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-actions { display: flex; align-items: center; gap: 12px; }

.seg {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.nav-link {
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-link:hover { color: var(--text); }

.nav-link.active {
  color: #1c1406;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  box-shadow: 0 4px 12px -4px rgba(233, 194, 125, 0.5);
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}

/* ---------- shell ---------- */
.shell {
  width: min(1120px, 100% - 32px);
  margin: 0 auto;
  padding: 24px 0 72px;
  padding-bottom: max(72px, env(safe-area-inset-bottom));
}

.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(241, 183, 101, 0.28);
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 13.5px;
}

.banner svg { font-size: 16px; }

/* ---------- layout ---------- */
.layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.layout .col { display: contents; }

/* Phone order: what a player needs first, then the host tools. */
[data-area="hero"] { order: 0; }
[data-area="results"] { order: 1; }
[data-area="deposit"] { order: 2; }
[data-area="players"] { order: 3; }
[data-area="unmatched"] { order: 4; }
[data-area="close"] { order: 5; }
[data-area="recent"] { order: 6; }

.layout.narrow { max-width: 520px; margin: 8px auto 0; }

@media (min-width: 960px) {
  .layout:not(.narrow) {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: start;
    gap: 20px;
  }
  .layout:not(.narrow) > [data-area="hero"] { grid-column: 1 / -1; }
  .layout:not(.narrow) .col {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
}

/* ---------- cards ---------- */
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)), var(--card);
  box-shadow: var(--shadow);
  padding: 20px;
  min-width: 0;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--text-2);
}

.count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.hint.flush { margin: -6px 0 10px; }

.lede {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.empty {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line-2);
  color: var(--muted);
  font-size: 13.5px;
}

.empty p { margin: 0; }

.empty-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 16px;
  flex: none;
}

/* ---------- hero ---------- */
.hero {
  padding: 22px 22px 20px;
  overflow: hidden;
  background:
    radial-gradient(600px 260px at 50% 0%, rgba(233, 194, 125, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(30, 72, 50, 0.7), rgba(14, 36, 25, 0.8));
  border-color: rgba(233, 194, 125, 0.18);
}

/* Felt texture: a faint suit pattern, no image request. */
.hero::before {
  content: "♠ ♥ ♣ ♦";
  position: absolute;
  right: -12px;
  bottom: -38px;
  font-size: 120px;
  letter-spacing: -0.05em;
  color: rgba(255, 255, 255, 0.025);
  pointer-events: none;
  white-space: nowrap;
}

.hero.is-closed {
  background: linear-gradient(180deg, rgba(34, 44, 39, 0.8), rgba(20, 28, 24, 0.85));
  border-color: var(--line-2);
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-title-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }

.hero-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.hero-actions { display: flex; gap: 8px; }

.pot-wrap { text-align: center; padding: 18px 0 6px; }

.pot-label {
  margin: 0 0 2px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.pot {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  font-size: clamp(52px, 13vw, 88px);
  font-weight: 760;
  line-height: 1;
  letter-spacing: -0.045em;
  background: linear-gradient(180deg, #fff1cf 0%, var(--gold) 55%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 24px rgba(233, 194, 125, 0.18));
}

.is-closed .pot {
  background: linear-gradient(180deg, #f3ecdd, #a9b4ad);
  -webkit-background-clip: text;
  background-clip: text;
  filter: none;
}

.pot .cur, .deposit-amount .cur, .winner-amount .cur {
  font-size: 0.38em;
  font-weight: 650;
  margin-top: 0.18em;
  letter-spacing: 0;
}

.pot.bump { animation: bump 0.7s var(--ease); }

@keyframes bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.06); filter: drop-shadow(0 0 32px rgba(233, 194, 125, 0.55)); }
  100% { transform: scale(1); }
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.stats div {
  padding: 10px 12px;
  text-align: center;
  min-width: 0;
}

.stats div + div { border-left: 1px solid var(--line); }

.stats dt {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.stats dd {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats .of { color: var(--muted); font-weight: 550; }
.warn-text { color: var(--amber); }
.ok-text { display: inline-flex; align-items: center; gap: 6px; color: var(--green); }

.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 10px;
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  color: var(--text-2);
  text-align: center;
}

.notice a { display: inline-flex; align-items: center; gap: 2px; font-weight: 650; text-decoration: none; }

/* ---------- chips, pills, tags ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.chip.open {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(111, 217, 157, 0.25);
}

.dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--green);
  opacity: 0;
  animation: ping 2s ease-out infinite;
}

@keyframes ping {
  0% { transform: scale(0.5); opacity: 0.7; }
  80%, 100% { transform: scale(1.3); opacity: 0; }
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pill.unpaid { color: var(--muted); background: rgba(255, 255, 255, 0.05); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

.tag.warn { color: var(--amber); background: var(--amber-soft); white-space: normal; }
.tag.ok { color: var(--green); background: var(--green-soft); }

/* ---------- avatar ---------- */
.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: none;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: hsl(var(--h) 70% 86%);
  background: linear-gradient(145deg, hsl(var(--h) 35% 30%), hsl(var(--h) 40% 20%));
  border: 1px solid hsl(var(--h) 40% 45% / 0.45);
}

.avatar.lg { width: 46px; height: 46px; font-size: 15px; }

/* ---------- players ---------- */
.players, .tx-list, .lb { list-style: none; margin: 0; padding: 0; }

.player {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-top: 1px solid var(--line);
}

.player:first-child { border-top: 0; padding-top: 2px; }
.player.is-unpaid .avatar { filter: grayscale(1); opacity: 0.6; }

.who { min-width: 0; }

.who-line { display: flex; align-items: center; gap: 4px; min-width: 0; }

.name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta { display: block; font-size: 12px; color: var(--muted); }

.paid-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 13.5px;
  font-weight: 650;
}

.paid-state svg {
  width: 18px;
  height: 18px;
  padding: 3px;
  border-radius: 50%;
  background: var(--green-soft);
  stroke-width: 3;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  opacity: 0.55;
  flex: none;
}

.icon-btn:hover { opacity: 1; color: var(--gold); background: var(--gold-soft); filter: none; }

@media (hover: hover) {
  .player .icon-btn { opacity: 0; }
  .player:hover .icon-btn, .icon-btn:focus-visible { opacity: 1; }
}

/* ---------- transactions ---------- */
.tx {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.tx:first-child { border-top: 0; padding-top: 0; }

.tx-body { display: grid; gap: 6px; min-width: 0; flex: 1 1 220px; }

.tx-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.tx-amount { font-size: 15.5px; font-weight: 700; }

.memo {
  display: block;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  font: 12.5px/1.4 var(--mono);
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tx-id {
  font: 11px var(--mono);
  color: rgba(142, 163, 150, 0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tx-action { flex: none; }
.tx-action .inline { margin: 0; }

/* ---------- deposit ---------- */
.deposit {
  border-color: rgba(233, 194, 125, 0.22);
  background:
    radial-gradient(420px 180px at 100% 0%, rgba(233, 194, 125, 0.1), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    var(--card);
}

.deposit-amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 0 14px;
}

.deposit-amount > .num {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 38px;
  font-weight: 760;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--gold);
}

.facts {
  margin: 0;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.16);
}

.facts > div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  min-height: 48px;
}

.facts > div + div { border-top: 1px solid var(--line); }

.facts dt { font-size: 12.5px; color: var(--muted); }

.facts dd { margin: 0; font-size: 14.5px; font-weight: 550; min-width: 0; }

.fact-copy { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fact-copy .mono { font-size: 15.5px; font-weight: 650; overflow-wrap: anywhere; }

.memo-sample {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--gold-soft);
  color: var(--gold-2);
  font: 600 12.5px var(--mono);
}

button.copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  flex: none;
}

button.copy:hover { color: var(--gold); border-color: rgba(233, 194, 125, 0.4); filter: none; }
button.copy.done { color: var(--green); border-color: rgba(111, 217, 157, 0.4); }

/* ---------- winners (closed) ---------- */
.winners { display: grid; gap: 12px; }

.winner {
  --accent: var(--gold);
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--accent) 3%, transparent));
}

.winner.place-2 { --accent: var(--silver); }

.winner-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.medal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.winner-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.winner-who > div { min-width: 0; }

.winner-name {
  font-size: 16px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winner-amount {
  display: inline-flex;
  align-items: flex-start;
  gap: 3px;
  margin: 2px 0 0;
  font-size: 26px;
  font-weight: 760;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--accent);
}

/* ---------- payout form ---------- */
.splits { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

.chip-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
}

.chip-btn:hover { border-color: rgba(233, 194, 125, 0.45); color: var(--gold-2); filter: none; }

.chip-btn.active {
  color: var(--gold-2);
  border-color: rgba(233, 194, 125, 0.6);
  background: var(--gold-soft);
}

.winner-inputs { display: grid; gap: 10px; }

.winner-input {
  --accent: var(--gold);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.14);
}

.winner-input.place-2 { --accent: var(--silver); }

.place {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: 21px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  color: #1a1305;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 100%, white 20%), color-mix(in srgb, var(--accent) 80%, black 25%));
}

.winner-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 6px 8px;
  min-width: 0;
}
.winner-fields label { margin: 0; grid-column: 1 / -1; }

@media (max-width: 420px) {
  .winner-fields { grid-template-columns: minmax(0, 1fr); }
}

.sum {
  display: grid;
  gap: 4px;
  margin: 12px 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.sum-line { display: flex; justify-content: space-between; gap: 8px; color: var(--text-2); }
.sum-line strong { color: var(--text); font-weight: 700; }
.sum-note { display: flex; align-items: center; gap: 6px; min-height: 18px; }
.sum.bad { border-color: rgba(240, 143, 128, 0.35); background: var(--red-soft); }
.sum.bad .sum-note { color: var(--red); }

/* ---------- forms ---------- */
label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

input, select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder { color: rgba(142, 163, 150, 0.7); }

input:focus, select:focus {
  outline: none;
  border-color: rgba(233, 194, 125, 0.65);
  box-shadow: 0 0 0 3px rgba(233, 194, 125, 0.15);
}

select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; }
select option { background: #10261a; color: var(--text); }

.select-wrap { position: relative; }

.select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.money-input { position: relative; }
.money-input input { padding-right: 34px; font-variant-numeric: tabular-nums; font-weight: 650; }

.money-input .suffix {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 600;
  pointer-events: none;
}

.money-input.lg input { height: 60px; font-size: 26px; letter-spacing: -0.02em; padding-left: 16px; padding-right: 40px; }
.money-input.lg .suffix { font-size: 18px; right: 16px; }

/* ---------- buttons ---------- */
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.08s ease, filter 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

button:hover, .button:hover { filter: brightness(1.08); }
button:active, .button:active { transform: translateY(1px); }

button.primary, .button.primary, form button[type="submit"]:not(.ghost) {
  color: #1c1406;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  border-color: rgba(255, 230, 180, 0.4);
  box-shadow: 0 8px 20px -8px rgba(233, 194, 125, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

button.ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--line-2);
}

button.ghost:hover { border-color: rgba(233, 194, 125, 0.45); color: var(--gold-2); filter: none; }
button.ghost.danger:hover { border-color: rgba(240, 143, 128, 0.5); color: var(--red); }

button.small, .button.small { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
button.block { width: 100%; }

button:disabled, button:disabled:hover {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  transform: none;
}

.inline {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.inline input { height: 36px; font-size: 14px; min-width: 0; flex: 1; }
.inline button { flex: none; }

/* ---------- new table ---------- */
.center, .new-table { text-align: center; padding: 30px 24px 26px; }

.new-table form { text-align: left; margin-top: 22px; }
.new-table .presets { margin: 12px 0 18px; }
.new-table .presets .chip-btn { flex: 1 1 0; }

.big-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  border-radius: 18px;
  font-size: 26px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.big-icon.gold {
  color: var(--gold);
  background: linear-gradient(145deg, #1d4632, #0e2619);
  border-color: rgba(233, 194, 125, 0.35);
}

.page-title { margin: 0; font-size: 22px; font-weight: 750; letter-spacing: -0.02em; }
.center .button { margin-top: 18px; }

/* ---------- leaderboard ---------- */
.lb-hero .lede { margin-top: 4px; }

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  max-width: 560px;
  margin: 22px auto 0;
}

.podium:has(.step:only-child) { grid-template-columns: minmax(0, 200px); justify-content: center; }
.podium:has(.step:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 380px; }

.step {
  --accent: var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

.step-2 { --accent: var(--silver); }
.step-3 { --accent: #d69a6a; }

.step .avatar { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 60%, transparent); }
.step-1 .avatar { width: 58px; height: 58px; font-size: 18px; }

.step-name {
  max-width: 100%;
  font-size: 13.5px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-net { font-size: 14px; font-weight: 750; }

.block-rank {
  display: grid;
  place-items: center;
  width: 100%;
  margin-top: 4px;
  border-radius: 12px 12px 4px 4px;
  font-size: 22px;
  font-weight: 800;
  color: color-mix(in srgb, var(--accent) 85%, white);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 24%, transparent), color-mix(in srgb, var(--accent) 6%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-bottom: 0;
}

.step-1 .block-rank { height: 76px; }
.step-2 .block-rank { height: 54px; }
.step-3 .block-rank { height: 40px; }

.lb-row {
  display: grid;
  grid-template-columns: 26px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 2px;
  border-top: 1px solid var(--line);
}

.lb-row:first-child { border-top: 0; padding-top: 2px; }

.rank {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.rank.top-1 { color: var(--gold); }
.rank.top-2 { color: var(--silver); }
.rank.top-3 { color: #d69a6a; }

.bar {
  display: block;
  height: 4px;
  margin-top: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.bar span { display: block; height: 100%; border-radius: inherit; background: var(--muted); }
.bar.pos span { background: linear-gradient(90deg, rgba(111, 217, 157, 0.5), var(--green)); }
.bar.neg span { background: linear-gradient(90deg, rgba(240, 143, 128, 0.5), var(--red)); }

.net { font-size: 15px; font-weight: 750; min-width: 92px; text-align: right; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.zero { color: var(--muted); }

/* ---------- recent tables ---------- */
.recent { display: grid; }

.recent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 -8px;
  padding: 11px 8px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}

.recent-row + .recent-row { border-top: 1px solid var(--line); }
.recent-row:hover { background: rgba(255, 255, 255, 0.04); }
.recent-row:hover .name { color: var(--gold-2); }
.recent-main { flex: 1; min-width: 0; }
.recent-go { display: grid; color: var(--muted); font-size: 16px; }

/* ---------- toasts ---------- */
.toast-zone {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 50;
  display: grid;
  gap: 8px;
  width: min(420px, calc(100% - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(20, 38, 29, 0.96);
  border: 1px solid var(--line-2);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7);
  color: var(--text);
  font-size: 14px;
  font-weight: 550;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  backdrop-filter: blur(10px);
}

.toast.in { opacity: 1; transform: none; }
.toast svg { font-size: 18px; color: var(--green); }
.toast.error { border-color: rgba(240, 143, 128, 0.45); }
.toast.error svg { color: var(--red); }

/* ---------- loading ---------- */
.skeleton { display: grid; gap: 16px; }

.skel {
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.skel-hero { height: 250px; }
.skel-card { height: 160px; }

@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- small screens ---------- */
@media (max-width: 560px) {
  .topbar-inner, .shell { width: calc(100% - 24px); }
  .topbar-inner { height: 58px; }
  .eyebrow { display: none; }
  .live { display: none; }
  .nav-link { padding: 6px 12px; }
  .shell { padding-top: 14px; }
  .card { padding: 16px; border-radius: 18px; }
  .hero { padding: 18px 16px 16px; }
  .pot-wrap { padding-top: 14px; }
  .stats div { padding: 9px 6px; }
  .stats dd { font-size: 15.5px; }
  .facts > div { grid-template-columns: 92px minmax(0, 1fr); }
  .fact-copy .mono { white-space: nowrap; font-size: 15px; }
  .fact-copy button.copy span { display: none; }
  .fact-copy button.copy { width: 34px; padding: 0; justify-content: center; }
  .deposit-amount > .num { font-size: 32px; }
  .tx-action { width: 100%; }
  .tx-action > button { width: 100%; }
  .lb-row { grid-template-columns: 22px auto minmax(0, 1fr) auto; gap: 10px; }
  .lb-row .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
  .net { min-width: 0; font-size: 14px; }
  .lb-row .avatar { width: 32px; height: 32px; font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
