/* HackStreet Bets - Champions vs. Challengers theme (black, gold, silver) */
@font-face { font-family: "Anton"; src: url("/fonts/anton-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Oswald"; src: url("/fonts/oswald-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Oswald"; src: url("/fonts/oswald-600.woff2") format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #070605;
  --surface: #12110f;
  --surface-2: #1a1815;
  --surface-3: #25221d;
  --border: rgba(255, 236, 200, 0.09);
  --border-strong: rgba(255, 236, 200, 0.17);
  --border-gold: rgba(227, 178, 92, 0.38);
  --text: #f5f1e8;
  --text-2: #c9c2b2;
  --muted: #8c8577;
  --up: #22c781;
  --up-soft: rgba(34, 199, 129, 0.14);
  --down: #ff6b6b;
  --down-soft: rgba(255, 107, 107, 0.14);
  --accent: #e3b25c;
  --accent-ink: #1c1305;
  --blue: #3987e5;
  --warn: #fab219;
  --gold: #e9bd6a;
  --gold-soft: rgba(227, 178, 92, 0.13);
  --silver: #d5d8dd;
  --silver-soft: rgba(213, 216, 221, 0.10);
  --bronze: #d5905b;
  --gold-grad: linear-gradient(180deg, #fbe7b5 0%, #e3b25c 48%, #a8742a 100%);
  --silver-grad: linear-gradient(180deg, #ffffff 0%, #d9dce1 50%, #8b9097 100%);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.55);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Anton", Impact, "Arial Narrow Bold", "Arial Narrow", sans-serif;
  --font-label: "Oswald", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  accent-color: var(--accent);
  --color-scrollbar-track: #0e0d0b;
  --color-scrollbar-thumb: #3a352d;
  scrollbar-color: var(--color-scrollbar-thumb) var(--color-scrollbar-track);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(70% 55% at -5% -10%, rgba(227, 178, 92, 0.16), transparent 62%),
    radial-gradient(60% 50% at 105% -10%, rgba(213, 216, 221, 0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  min-height: 100dvh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.01em; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.05; font-size-adjust: cap-height from-font; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: 16px; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(7, 6, 5, 0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; gap: 18px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark { width: 28px; height: 28px; flex-shrink: 0; filter: drop-shadow(0 0 10px rgba(227, 178, 92, 0.35)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-size: 1.25rem; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1; }
.brand-event { font-family: var(--font-label); font-weight: 600; font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-top: 3px; }
.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav a { padding: 8px 12px; border-radius: 999px; color: var(--text-2); font-weight: 500; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--gold-soft); color: var(--gold); box-shadow: inset 0 0 0 1px var(--border-gold); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.balance-pill { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px 6px 8px; font-weight: 600; }
.balance-pill .lbl { color: var(--muted); font-weight: 500; font-size: 0.8rem; }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 700; font-size: 0.8rem; color: #fff; text-transform: uppercase; flex-shrink: 0; }
.avatar.lg { width: 44px; height: 44px; font-size: 1.1rem; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px 4px 4px; }
.user-chip .name { font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1480px) { .brand-event { display: none; } .nav a { padding: 8px 9px; } .balance-pill.cash { display: none; } }
@media (max-width: 1100px) {
  .topbar-inner { flex-wrap: wrap; gap: 8px 12px; padding-block: 8px; }
  .brand-event { display: none; }
  .nav { order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .nav a { white-space: nowrap; padding: 6px 10px; font-size: 0.9rem; }
  .balance-pill .lbl { display: none; }
  .user-chip .name { display: none; }
}

/* ---------- ticker ---------- */
.ticker { border-bottom: 1px solid var(--border-gold); background: linear-gradient(90deg, rgba(227, 178, 92, 0.08), rgba(7, 6, 5, 0.9) 30%, rgba(7, 6, 5, 0.9) 70%, rgba(213, 216, 221, 0.06)); overflow: hidden; height: 34px; font-size: 0.82rem; color: var(--text-2); }
.ticker:empty { display: none; }
.ticker-track { display: inline-flex; align-items: center; gap: 28px; height: 34px; padding-inline: 16px; white-space: nowrap; animation: ticker 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.tk b { color: var(--text); font-weight: 600; }
.tk-sep { color: var(--gold); opacity: 0.7; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } .ticker { overflow-x: auto; } }

/* ---------- layout bits ---------- */
main { padding-block: 22px 60px; }
.footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 18px 40px; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--border); }
.link { background: none; border: 0; padding: 0; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 14px; }
.card h2, .card h3 { margin-bottom: 10px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.section-head h2 { font-family: var(--font-label); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.22em; color: var(--gold); font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.pill.cat { background: var(--gold-soft); color: var(--gold); }
.pill.open { background: var(--up-soft); color: var(--up); }
.pill.closed { background: rgba(250, 178, 25, 0.16); color: var(--warn); }
.pill.resolved { background: rgba(144, 133, 233, 0.18); color: #b7aef5; }
.pill.voided { background: var(--surface-3); color: var(--muted); }
.live-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; color: var(--down); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--down); box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.6); animation: pulse 1.6s ease-out infinite; display: inline-block; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.55); } 100% { box-shadow: 0 0 0 10px rgba(255, 107, 107, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface-2); padding: 9px 14px; font-weight: 600; transition: background 0.15s, transform 0.05s, opacity 0.15s; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--gold-grad); border-color: transparent; color: var(--accent-ink); font-family: var(--font-label); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; box-shadow: inset 0 1px 0 rgba(255, 245, 220, 0.6), 0 6px 22px rgba(227, 178, 92, 0.22); }
.btn.primary:hover { filter: brightness(1.08); background: var(--gold-grad); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--down); border-color: rgba(255, 107, 107, 0.35); }
.btn.sm { padding: 6px 10px; font-size: 0.85rem; border-radius: 8px; }
.btn.big { width: 100%; padding: 13px 16px; font-size: 1.02rem; border-radius: 12px; }
.btn.outcome { background: var(--c, var(--accent)); color: #fff; border-color: transparent; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25); }
.btn.outcome:hover { filter: brightness(1.1); }
input[type=text], input[type=number], input[type=password], input[type=datetime-local], input:not([type]), textarea, select {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 12px; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus-visible, textarea:focus-visible, select:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(227, 178, 92, 0.22); }
textarea { resize: vertical; min-height: 70px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--text-2); font-weight: 500; }
label.row { flex-direction: row; align-items: center; gap: 8px; }
label.row input { width: auto; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-grid .span { grid-column: 1 / -1; }
.form-error { color: var(--down); font-size: 0.9rem; }
.help { color: var(--muted); font-size: 0.78rem; font-weight: 400; }

/* ---------- dialogs ---------- */
dialog { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: 16px; padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }
.dialog-form { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.dialog-form.wide { width: min(620px, calc(100vw - 32px)); }
dialog:has(.wide) { width: min(620px, calc(100vw - 32px)); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

/* ---------- toasts (one popover="manual" host) ---------- */
#toasts { position: fixed; inset: auto 16px 16px auto; z-index: 100; margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
#toasts[popover]:not(:popover-open) { display: none; }
.toast { pointer-events: auto; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; max-width: 100%; box-shadow: var(--shadow); font-size: 0.92rem; animation: toastIn 0.2s ease-out; transition: opacity 0.2s, transform 0.2s; }
.toast.leaving { opacity: 0; transform: translateY(8px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; transition: none; } }
.toast.ok { border-color: rgba(34, 199, 129, 0.5); }
.toast.err { border-color: rgba(255, 107, 107, 0.5); }
.toast-x { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 1.1rem; line-height: 1; padding: 2px 4px; }

/* ---------- markets page ---------- */
.hero { margin-bottom: 8px; }
.featured { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; padding: 22px; border-color: var(--border-gold); background: linear-gradient(135deg, rgba(227, 178, 92, 0.13), rgba(213, 216, 221, 0.05) 60%, var(--surface)); }
.featured .lead { display: flex; flex-direction: column; gap: 12px; }
.featured h1 { font-size: clamp(1.4rem, 3vw, 2rem); }
.featured .desc { color: var(--text-2); max-width: 52ch; }
.featured .stats { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 0.85rem; }
.featured .stats b { color: var(--text); font-weight: 600; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); border: 1px solid transparent; transition: border-color 0.15s, background 0.15s; text-align: left; }
.bar-row:hover { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.05); }
.bar-row .name { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.bar-row .name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .track { grid-column: 1 / -1; height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.bar-row .price { font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.chg { font-size: 0.78rem; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 820px) { .featured { grid-template-columns: 1fr; } }

.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 22px 0 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 0.85rem; font-weight: 600; color: var(--text-2); }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active { background: var(--gold-grad); color: var(--accent-ink); border-color: transparent; }
.search { max-width: 260px; margin-left: auto; padding: 8px 12px; border-radius: 999px; }
@media (max-width: 640px) { .search { max-width: none; margin-left: 0; } }
.live-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.live-scroll > * { scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.grid-title { grid-column: 1 / -1; margin: 10px 0 -4px; }

.market-card { display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: border-color 0.15s, transform 0.15s, background 0.15s; min-width: 0; }
.market-card:hover { border-color: var(--border-strong); transform: translateY(-1px); background: var(--surface-2); }
.market-card.dim { opacity: 0.75; }
.card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.78rem; color: var(--muted); }
.card-top .right { margin-left: auto; }
.market-card h3 { font-size: 1.02rem; font-weight: 600; line-height: 1.3; }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.yn button { border: 0; border-radius: 10px; padding: 10px 8px; font-weight: 700; font-size: 0.95rem; display: flex; justify-content: space-between; align-items: center; transition: filter 0.15s; }
.yn .yes { background: var(--gold-soft); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(227, 178, 92, 0.22); }
.yn .no { background: var(--silver-soft); color: var(--silver); box-shadow: inset 0 0 0 1px rgba(213, 216, 221, 0.16); }
.yn button:hover { filter: brightness(1.2); }
.yn .pr { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.mini-rows { display: flex; flex-direction: column; gap: 6px; }
.mini-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; font-size: 0.9rem; }
.mini-row .nm { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mini-row .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-row .pr { font-weight: 700; font-variant-numeric: tabular-nums; }
.mini-row .track { grid-column: 1 / -1; height: 4px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.mini-row .fill { height: 100%; border-radius: 999px; }
.more { color: var(--muted); font-size: 0.8rem; }
.card-foot { margin-top: auto; display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 0.8rem; padding-top: 6px; border-top: 1px solid var(--border); }
.card-foot .spark { margin-left: auto; }
.winner-line { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text-2); }
.winner-line b { color: var(--text); }
.flash-up { animation: flashUp 1.2s ease-out; }
.flash-down { animation: flashDown 1.2s ease-out; }
@keyframes flashUp { 0% { background: rgba(34, 199, 129, 0.35); } 100% { background: transparent; } }
@keyframes flashDown { 0% { background: rgba(255, 107, 107, 0.35); } 100% { background: transparent; } }

/* ---------- market detail ---------- */
.back { color: var(--muted); font-size: 0.9rem; display: inline-block; margin-bottom: 12px; }
.back:hover { color: var(--text); }
.market-page { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.trade-col { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 14px; grid-column: 2; grid-row: 1 / span 2; }
.trades-area { grid-column: 1; grid-row: 2; min-width: 0; }
.market-page > div:first-child { grid-column: 1; grid-row: 1; min-width: 0; }
@media (max-width: 900px) { .market-page { grid-template-columns: 1fr; } .trade-col, .trades-area, .market-page > div:first-child { position: static; grid-column: 1; grid-row: auto; } }
.market-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.market-head .pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.market-head .meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 0.88rem; }
.market-head .meta b { color: var(--text); font-weight: 600; }
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; margin-bottom: 14px; font-weight: 600; }
.banner.resolved { background: rgba(144, 133, 233, 0.16); border: 1px solid rgba(144, 133, 233, 0.4); }
.banner.closed { background: rgba(250, 178, 25, 0.12); border: 1px solid rgba(250, 178, 25, 0.35); }
.banner.voided { background: var(--surface-2); border: 1px solid var(--border-strong); }
.chart-card { padding: 14px 14px 10px; }
.chart-tools { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.chart-tools .title { font-weight: 600; margin-right: auto; }
.chart-tools .rng { border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 8px; padding: 4px 9px; font-size: 0.8rem; font-weight: 600; }
.chart-tools .rng.active { background: var(--surface-3); color: var(--text); }
.chart-wrap { position: relative; width: 100%; height: 260px; }
.chart-wrap canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }
.chart-tip { position: absolute; top: 8px; left: 0; pointer-events: none; background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: 10px; padding: 8px 10px; font-size: 0.8rem; box-shadow: var(--shadow); min-width: 150px; transform: translateX(12px); z-index: 2; }
.chart-tip .tt { color: var(--muted); margin-bottom: 4px; }
.chart-tip .tr { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.chart-tip .tr .nm { display: flex; align-items: center; gap: 6px; }
.chart-tip .tr b { font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 8px 4px 2px; font-size: 0.82rem; color: var(--text-2); }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.legend .lg i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.legend .lg b { color: var(--text); font-variant-numeric: tabular-nums; }

.outcomes { display: flex; flex-direction: column; gap: 6px; }
.outcome-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); text-align: left; width: 100%; transition: border-color 0.15s, background 0.15s; }
.outcome-row:hover { border-color: var(--border-strong); }
.outcome-row.selected { border-color: var(--c, var(--accent)); box-shadow: inset 0 0 0 1px var(--c, var(--accent)); }
.outcome-row.winner { border-color: var(--up); background: var(--up-soft); }
.outcome-row .nm { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.outcome-row .nm span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outcome-row .sub { color: var(--muted); font-size: 0.8rem; grid-column: 1; }
.outcome-row .pr { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.outcome-row .chg { grid-column: 2; text-align: right; }
.outcome-row .track { grid-column: 1 / -1; height: 5px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.outcome-row .fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }

.trade-panel { padding: 16px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 10px; padding: 3px; margin-bottom: 14px; }
.seg button { border: 0; background: transparent; border-radius: 8px; padding: 8px; font-weight: 700; color: var(--muted); }
.seg button.active { background: var(--surface-3); color: var(--text); }
.tp-outcome { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); margin-bottom: 12px; border-left: 4px solid var(--c, var(--accent)); }
.tp-outcome .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-outcome .pr { font-weight: 800; font-variant-numeric: tabular-nums; }
.amount-wrap { position: relative; margin-top: 6px; }
.amount-wrap .cur { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.amount-wrap input { padding-left: 28px; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.amount-wrap input.noprefix { padding-left: 12px; }
.quick { display: flex; gap: 6px; margin: 8px 0 12px; flex-wrap: wrap; }
.quick button { flex: 1; border: 1px solid var(--border); background: transparent; border-radius: 8px; padding: 6px 4px; font-size: 0.82rem; font-weight: 600; color: var(--text-2); min-width: 44px; }
.quick button:hover { background: var(--surface-2); color: var(--text); }
.est { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; margin-bottom: 12px; font-size: 0.9rem; }
.est .r { display: flex; justify-content: space-between; gap: 10px; }
.est .r b { font-variant-numeric: tabular-nums; }
.est .r.big b { font-size: 1.05rem; }
.fine { color: var(--muted); font-size: 0.78rem; margin-top: 10px; line-height: 1.4; }
.pos-list { display: flex; flex-direction: column; gap: 8px; }
.pos-row { display: flex; justify-content: space-between; gap: 10px; font-size: 0.9rem; }
.pos-row .nm { display: flex; align-items: center; gap: 8px; }
.pos-total { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; display: flex; justify-content: space-between; font-weight: 600; }

.trade-list { display: flex; flex-direction: column; }
.trade-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.trade-item:last-child { border-bottom: 0; }
.trade-item .what { flex: 1; min-width: 0; }
.trade-item .when { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.trade-item .amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trade-item .mk { color: var(--muted); display: block; font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- leaderboard ---------- */
.prize { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 20px 22px; background: linear-gradient(135deg, rgba(246, 196, 83, 0.14), rgba(246, 196, 83, 0.03) 70%, var(--surface)); border-color: rgba(246, 196, 83, 0.35); }
.prize .trophy { font-size: 2.4rem; }
.prize h2 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.02em; font-size: 1.5rem; color: var(--gold); margin-bottom: 4px; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.podium .card { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 18px 12px; position: relative; }
.podium .rank { position: absolute; top: 10px; left: 12px; font-weight: 800; color: var(--muted); }
.podium .r1 { border-color: rgba(246, 196, 83, 0.5); order: 2; }
.podium .r2 { border-color: rgba(201, 204, 209, 0.4); order: 1; }
.podium .r3 { border-color: rgba(213, 144, 91, 0.45); order: 3; }
.podium .nm { font-weight: 700; margin-top: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .nw { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .podium { grid-template-columns: 1fr; } .podium .r1, .podium .r2, .podium .r3 { order: initial; } }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 10px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.me td { background: rgba(34, 199, 129, 0.08); }
tr:last-child td { border-bottom: 0; }
.who { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.rank-cell { font-weight: 800; color: var(--muted); width: 44px; }
.rank-cell.gold { color: var(--gold); } .rank-cell.silver { color: var(--silver); } .rank-cell.bronze { color: var(--bronze); }

/* ---------- portfolio ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.tile .lbl { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.tile .val { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; }
.tile .sub { color: var(--muted); font-size: 0.8rem; }
.pos-card { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; }
.pos-card:hover { border-color: var(--border-strong); }
.pos-card + .pos-card { margin-top: 10px; }
.pos-card .ttl { font-weight: 600; }
.pos-card .lines { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; font-size: 0.88rem; color: var(--text-2); }
.pos-card .lines .ln { display: flex; justify-content: space-between; gap: 10px; }
.pos-card .pnl { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.pos-card .pnl small { display: block; color: var(--muted); font-weight: 500; }

/* ---------- activity ---------- */
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: 0; }
.feed-item .ic { font-size: 1.2rem; width: 28px; text-align: center; flex-shrink: 0; }
.feed-item .body { flex: 1; min-width: 0; }
.feed-item .body b { font-weight: 600; }
.feed-item .when { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }

/* ---------- admin ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.admin-row { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; padding: 14px 0; border-bottom: 1px solid var(--border); align-items: start; }
.admin-row:last-child { border-bottom: 0; }
.admin-row .ttl { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-row .sub { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }
.admin-row .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.admin-row .resolve { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--surface-2); padding: 10px; border-radius: 10px; }
.admin-row .resolve select { width: auto; min-width: 180px; padding: 7px 10px; }
.templates { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.templates button { border: 1px dashed var(--border-strong); background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 0.82rem; color: var(--text-2); }
.templates button:hover { border-style: solid; color: var(--text); }
.danger-zone { border-color: rgba(255, 107, 107, 0.35); }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input { width: 110px; padding: 6px 10px; }
code { font-family: var(--mono); font-size: 0.85em; background: var(--surface-3); padding: 1px 6px; border-radius: 6px; }

/* ---------- player markets, reports, admin card ---------- */
.byline { display: inline-flex; align-items: center; gap: 6px; }
.avatar.sm { width: 20px; height: 20px; font-size: 0.65rem; }
.flags { border-color: rgba(250, 178, 25, 0.4); }
.market-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.admin-card { border-color: rgba(144, 133, 233, 0.45); }
.admin-card h3 { color: #b7aef5; }
.admin-card .resolve-box { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.admin-card select { flex: 1; min-width: 0; padding: 7px 10px; }
.admin-card .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-row .flagbox { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; background: rgba(250, 178, 25, 0.08); border: 1px solid rgba(250, 178, 25, 0.3); padding: 10px; border-radius: 10px; font-size: 0.85rem; }
.admin-row .flagbox .hd { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 600; color: var(--warn); }
.create-intro { margin: 6px 0 16px; max-width: 70ch; }

/* ---------- Champions vs. Challengers poster bits ---------- */
.gold-text, .silver-text { color: var(--gold); }
.silver-text { color: var(--silver); }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .gold-text, .silver-text { color: transparent; -webkit-background-clip: text; background-clip: text; }
  .gold-text { background-image: var(--gold-grad); }
  .silver-text { background-image: var(--silver-grad); }
  .brand-name { color: transparent; background-image: var(--gold-grad); -webkit-background-clip: text; background-clip: text; }
}
.hero-poster { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: 30px 16px 26px; margin-bottom: 18px; border-radius: 18px; border: 1px solid var(--border-gold);
  background:
    radial-gradient(55% 90% at 0% 0%, rgba(227, 178, 92, 0.30), transparent 60%),
    radial-gradient(55% 90% at 100% 0%, rgba(213, 216, 221, 0.18), transparent 60%),
    radial-gradient(60% 60% at 50% 120%, rgba(227, 178, 92, 0.16), transparent 70%),
    #0a0907; }
.hero-poster::before, .hero-poster::after { content: ""; position: absolute; top: -10%; bottom: 25%; width: 3px; z-index: -1; filter: blur(0.5px); box-shadow: 0 0 18px 4px rgba(255, 214, 140, 0.35); }
.hero-poster::before { left: 9%; background: linear-gradient(180deg, transparent, #ffe2a6 30%, rgba(227, 178, 92, 0.2) 90%, transparent); }
.hero-poster::after { right: 9%; background: linear-gradient(180deg, transparent, #ffffff 30%, rgba(213, 216, 221, 0.2) 90%, transparent); box-shadow: 0 0 18px 4px rgba(255, 255, 255, 0.25); }
.hp-kicker { font-family: var(--font-label); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.38em; text-transform: uppercase; color: var(--gold); opacity: 0.9; }
.hp-title { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 0.22em; margin: 10px 0 6px; font-family: var(--font-display); font-weight: 400; font-size: clamp(2.1rem, 8.6vw, 5.6rem); line-height: 0.95; letter-spacing: 0; text-transform: uppercase; font-size-adjust: cap-height from-font; }
.hp-title .vs { display: inline-block; transform: skewX(-12deg); font-size: 0.82em; filter: drop-shadow(0 0 14px rgba(255, 190, 90, 0.7)); }
.hp-title .solo { flex-basis: 100%; }
.hp-sub { font-family: var(--font-label); font-weight: 600; font-size: clamp(0.8rem, 2.2vw, 1.1rem); letter-spacing: 0.32em; text-transform: uppercase; }
.hp-meta { margin-top: 10px; font-family: var(--font-label); font-weight: 500; font-size: clamp(0.72rem, 1.8vw, 0.9rem); letter-spacing: 0.24em; text-transform: uppercase; color: var(--text-2); }
.hp-meta b { color: var(--gold); font-weight: 600; }
.hp-row { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.countdown { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border-gold); background: rgba(0, 0, 0, 0.45); font-family: var(--font-label); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-2); }
.countdown b { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; letter-spacing: 0.04em; color: var(--text); font-variant-numeric: tabular-nums; }
.countdown.live { border-color: rgba(255, 107, 107, 0.5); }
.featured h1 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.bar-row .price, .outcome-row .pr, .podium .nw, .tile .val { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.02em; }
.bar-row .price { font-size: 1.3rem; }
.outcome-row .pr { font-size: 1.6rem; }
.podium .r1 { box-shadow: 0 0 0 1px rgba(246, 196, 83, 0.25), 0 10px 40px rgba(227, 178, 92, 0.18); }
dialog { border-color: var(--border-gold); }
dialog h2 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.02em; font-size: 1.6rem; }
.tabs button.active { border-bottom-color: var(--accent); color: var(--gold); }
.seg button.active { color: var(--gold); }
.card-foot .spark path { opacity: 0.95; }
