/* ─── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Biblical theme — night-sky indigo, divine gold, royal purple, parchment ivory */
  --bg:       #0b1024;
  --surface:  #141a33;
  --surface2: #1d2442;
  --surface3: #283051;
  --border:   #333c64;
  --red:      #b23a48;   /* crimson / wine */
  --red-dark: #842a35;
  --gold:     #e6c068;   /* divine gold */
  --gold-dim: #b08f3e;
  --purple:   #8268d6;   /* royal purple */
  --blue:     #5e84c8;   /* celestial blue */
  --blue-dk:  #3c5ca6;
  --text:     #f2ead4;   /* parchment ivory */
  --muted:    #9b95b8;
  --green:    #7da25b;   /* garden / olive */
  --radius:   10px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  line-height: 1.5;
}

a { color: var(--gold); text-decoration: none; }

/* ─── Typography ───────────────────────────────────────────────── */
h1 { font-size: 2rem; letter-spacing: -0.5px; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

.title-block {
  text-align: center;
  padding: 2rem 1rem 1rem;
}
.title-block .gloves { font-size: 3rem; }
.title-block h1 { color: var(--gold); text-transform: uppercase; letter-spacing: 2px; }
.title-block p  { color: var(--muted); margin-top: .25rem; }

/* ─── Layout helpers ───────────────────────────────────────────── */
.container  { max-width: 960px; margin: 0 auto; padding: 0 1rem; }
.card       { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.card + .card { margin-top: 1rem; }
.row        { display: flex; gap: 1rem; flex-wrap: wrap; }
.col        { flex: 1; min-width: 200px; }
.spacer     { flex: 1; }
.mt1        { margin-top: .5rem; }
.mt2        { margin-top: 1rem; }
.mt3        { margin-top: 1.5rem; }
.text-muted { color: var(--muted); font-size: .875rem; }
.text-gold  { color: var(--gold); }
.text-red   { color: var(--red); }
.text-green { color: var(--green); }
.text-right { text-align: right; }
.text-center{ text-align: center; }

/* ─── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .6rem 1.2rem; border-radius: 6px; border: none;
  font-size: .95rem; font-weight: 600; cursor: pointer; transition: all .15s;
  white-space: nowrap;
}
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary  { background: var(--red);    color: #fff; }
.btn-primary:hover:not(:disabled)  { background: var(--red-dark); }
.btn-gold     { background: var(--gold);   color: #000; }
.btn-gold:hover:not(:disabled)     { background: var(--gold-dim); }
.btn-ghost    { background: transparent;   color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled)    { border-color: var(--muted); background: var(--surface2); }
.btn-danger   { background: #7f1d1d;       color: #fca5a5; border: 1px solid #991b1b; }
.btn-danger:hover:not(:disabled)   { background: #991b1b; }
.btn-sm       { padding: .35rem .75rem; font-size: .82rem; }
.btn-block    { width: 100%; }
.btn-lg       { padding: .8rem 2rem; font-size: 1.05rem; }

/* ─── Form elements ────────────────────────────────────────────── */
.form-group        { margin-bottom: 1rem; }
.form-group label  { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: .6rem .8rem;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-size: .95rem;
  transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus { outline: none; border-color: var(--gold); }
.form-row { display: flex; gap: .75rem; }
.form-row .form-group { flex: 1; }

/* ─── Tabs ─────────────────────────────────────────────────────── */
.tabs       { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; gap: .25rem; }
.tab-btn    { padding: .6rem 1.1rem; background: none; border: none; color: var(--muted);
              cursor: pointer; font-size: .9rem; border-bottom: 3px solid transparent; transition: all .15s; }
.tab-btn:hover   { color: var(--text); }
.tab-btn.active  { color: var(--gold); border-bottom-color: var(--gold); font-weight: 600; }
.tab-panel       { display: none; }
.tab-panel.active{ display: block; }

/* ─── Status badge ─────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: .2rem .6rem; border-radius: 99px;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
}
.badge-setup    { background: #333; color: var(--muted); }
.badge-open     { background: #14532d; color: #86efac; }
.badge-closed   { background: #7c2d12; color: #fdba74; }
.badge-finished { background: #1e1b4b; color: #a5b4fc; }

/* ─── Odds display ─────────────────────────────────────────────── */
.odds-bar {
  display: flex; border-radius: var(--radius); overflow: hidden;
  height: 40px; margin: .75rem 0;
}
.odds-bar-f1 { background: var(--red);  display: flex; align-items: center; justify-content: center;
               font-weight: 700; font-size: .85rem; transition: width .5s; min-width: 10%; }
.odds-bar-f2 { background: #1a56db; display: flex; align-items: center; justify-content: center;
               font-weight: 700; font-size: .85rem; transition: width .5s; min-width: 10%; }

.fighter-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.fighter-card  {
  background: var(--surface2); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 1rem; text-align: center; cursor: pointer;
  transition: all .2s; user-select: none;
}
.fighter-card:hover         { border-color: var(--gold); transform: translateY(-2px); }
.fighter-card.selected-f1   { border-color: var(--red);  background: rgba(230,57,70,.12); }
.fighter-card.selected-f2   { border-color: #1a56db;     background: rgba(26,86,219,.12); }
.fighter-card .odds-num     { font-size: 1.75rem; font-weight: 800; color: var(--gold); }
.fighter-card .odds-label   { font-size: .75rem; color: var(--muted); }
.fighter-card .fighter-name { font-size: 1.1rem; font-weight: 700; margin-bottom: .25rem; }
.fighter-card .fighter-nick { font-size: .8rem; color: var(--muted); font-style: italic; }

/* ─── Table ─────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table       { width: 100%; border-collapse: collapse; font-size: .9rem; }
th          { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase;
              letter-spacing: .5px; padding: .5rem .75rem; text-align: left; border-bottom: 1px solid var(--border); }
td          { padding: .6rem .75rem; border-bottom: 1px solid #1f1f1f; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); }

/* ─── Modal ─────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 1rem;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; width: 100%; max-width: 420px;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.modal-close  { background: none; border: none; color: var(--muted); font-size: 1.4rem; cursor: pointer; }
.modal-close:hover { color: var(--text); }

/* ─── Toast ─────────────────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: .7rem 1.4rem; font-size: .9rem;
  pointer-events: none; opacity: 0; transition: opacity .3s;
  z-index: 200; white-space: nowrap;
}
#toast.show { opacity: 1; }
#toast.ok   { border-color: var(--green); color: var(--green); }
#toast.err  { border-color: var(--red);   color: var(--red); }

/* ─── Admin nav ──────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: .75rem 1.5rem;
}
.topbar .logo { font-weight: 800; font-size: 1.1rem; color: var(--gold); letter-spacing: 1px; }
.topbar .role { font-size: .8rem; color: var(--muted); margin-left: .5rem; }

/* ─── Join code chip ─────────────────────────────────────────────── */
.code-chip {
  font-family: monospace; font-size: 1rem; font-weight: 700;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 6px; padding: .1rem .5rem; letter-spacing: 2px;
  color: var(--gold);
}

/* ─── Pool total ─────────────────────────────────────────────────── */
.pool-display {
  text-align: center; padding: 1.5rem;
  border: 2px dashed var(--gold-dim); border-radius: var(--radius); margin: 1rem 0;
}
.pool-display .amount { font-size: 2.5rem; font-weight: 800; color: var(--gold); }
.pool-display .label  { font-size: .85rem; color: var(--muted); }

/* ─── Balance chip ─────────────────────────────────────────────────── */
.balance-bar {
  background: var(--surface2); border-radius: var(--radius);
  padding: 1rem 1.25rem; display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem;
}
.balance-bar .b-val  { font-size: 2rem; font-weight: 800; color: var(--gold); }
.balance-bar .b-sub  { font-size: .8rem; color: var(--muted); }

/* ─── Bet history row ──────────────────────────────────────────────── */
.bet-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
           padding: .6rem 0; border-bottom: 1px solid #1f1f1f; }
.bet-row:last-child { border: none; }
.bet-tag { display: inline-block; padding: .15rem .5rem; border-radius: 4px; font-size: .78rem; font-weight: 700; }
.bet-tag-f1 { background: rgba(230,57,70,.2); color: #ff8a8a; }
.bet-tag-f2 { background: rgba(26,86,219,.2); color: #93c5fd; }

/* ─── Status control strip ────────────────────────────────────────── */
.status-strip {
  display: flex; gap: .75rem; align-items: center; flex-wrap: wrap;
  background: var(--surface2); padding: 1rem; border-radius: var(--radius); margin-bottom: 1rem;
}

/* ─── Leaderboard ────────────────────────────────────────────────── */
.lb-row { display: flex; align-items: center; gap: .75rem; padding: .6rem .5rem;
          border-bottom: 1px solid #1f1f1f; }
.lb-row:last-child { border: none; }
.lb-rank  { width: 1.5rem; text-align: center; color: var(--muted); font-weight: 700; }
.lb-rank.gold   { color: var(--gold); }
.lb-rank.silver { color: #aaa; }
.lb-rank.bronze { color: #cd7f32; }
.lb-name  { flex: 1; font-weight: 600; }
.lb-bal   { font-weight: 700; color: var(--gold); }
.lb-real  { font-size: .8rem; color: var(--muted); }

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
  h1 { font-size: 1.6rem; }
  .fighter-cards { grid-template-columns: 1fr 1fr; }
  .form-row { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════════════════
   PLAYER APP  — mobile-first dashboard
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --nav-h:   64px;
}

body.app {
  max-width: 540px;
  margin: 0 auto;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
  background:
    radial-gradient(circle at 50% -10%, rgba(230,192,104,.10), transparent 45%),
    radial-gradient(circle at 0% 5%, rgba(130,104,214,.10), transparent 40%),
    var(--bg);
}

/* ── Sticky header ───────────────────────────────────────────────── */
.app-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13,13,13,.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.app-bar { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem .55rem; }
.app-bar .logo { font-weight: 800; font-size: 1rem; color: var(--gold); letter-spacing: .5px; }
.player-badge { font-size: .85rem; font-weight: 700; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 99px; padding: .25rem .65rem; }
.icon-btn { background: var(--surface2); border: 1px solid var(--border); color: var(--text);
  width: 32px; height: 32px; border-radius: 8px; font-size: 1rem; cursor: pointer; line-height: 1; }
.icon-btn:hover { border-color: var(--muted); }

.status-banner { text-align: center; padding: .45rem 1rem; font-size: .82rem; font-weight: 700; }
.status-banner.setup    { background: #1f1f1f; color: var(--muted); }
.status-banner.open     { background: #14532d; color: #86efac; }
.status-banner.closed   { background: #7c2d12; color: #fdba74; }
.status-banner.finished { background: #1e1b4b; color: #a5b4fc; }

.hero { display: flex; align-items: flex-end; gap: 1rem; padding: .9rem 1.1rem 1rem; }
.hero-main { flex: 1; }
.hero-label { font-size: .68rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.hero-balance { font-size: 2.2rem; font-weight: 800; color: var(--gold); line-height: 1.1;
  text-shadow: 0 2px 18px rgba(255,215,0,.18); }
.hero-unit { font-size: .9rem; font-weight: 600; color: var(--gold-dim); }
.hero-real { font-size: .82rem; color: var(--muted); margin-top: .1rem; }
.hero-pl { text-align: right; }
.pl-chip { font-size: 1.05rem; font-weight: 800; }
.pl-chip.up   { color: var(--green); }
.pl-chip.down { color: var(--red); }

/* ── Main + views ────────────────────────────────────────────────── */
.app-main { padding: 1rem 1rem 0; }
.view { display: none; animation: fade .25s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.section-title { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--muted); margin: 1.4rem .2rem .7rem; display: flex; align-items: center; gap: .4rem; }
.section-title.live { color: var(--red); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(230,57,70,.5); } 50% { opacity: .5; box-shadow: 0 0 0 6px rgba(230,57,70,0); } }

.empty { color: var(--muted); font-size: .9rem; text-align: center; padding: 1rem; }
.empty-card { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 1.6rem 1rem; text-align: center; }
.empty-card p { margin-top: .35rem; }

/* ── Fight card ──────────────────────────────────────────────────── */
.fight-card { background: linear-gradient(160deg, var(--surface), #141414);
  border: 1px solid var(--border); border-radius: 16px; padding: 1rem; }
.fight-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.fight-tag { font-size: .68rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
  color: #000; background: var(--gold); border-radius: 99px; padding: .2rem .6rem; }
.pool-pill { font-size: .78rem; font-weight: 700; color: var(--gold); background: rgba(255,215,0,.08);
  border: 1px solid var(--gold-dim); border-radius: 99px; padding: .2rem .6rem; }

.vs-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: .5rem; align-items: stretch; }
.vs-side { background: var(--surface2); border: 2px solid var(--border); border-radius: 14px;
  padding: .9rem .6rem; text-align: center; cursor: pointer; transition: all .18s; color: var(--text);
  display: flex; flex-direction: column; justify-content: center; }
.vs-side:hover { transform: translateY(-2px); }
.vs-f1:hover { border-color: var(--red); }
.vs-f2:hover { border-color: var(--blue); }
.vs-f1.sel { border-color: var(--red); background: rgba(230,57,70,.14); box-shadow: 0 0 0 3px rgba(230,57,70,.18); }
.vs-f2.sel { border-color: var(--blue); background: rgba(74,144,226,.14); box-shadow: 0 0 0 3px rgba(74,144,226,.18); }
.vs-name { font-size: 1.05rem; font-weight: 800; }
.vs-nick { font-size: .72rem; color: var(--muted); font-style: italic; min-height: .9rem; }
.vs-odds { font-size: 1.7rem; font-weight: 900; color: var(--gold); margin-top: .4rem; }
.vs-odds-lbl { font-size: .62rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.vs-mid { display: flex; align-items: center; justify-content: center; }
.vs-mid span { font-size: .8rem; font-weight: 900; color: var(--muted); background: var(--surface3);
  border-radius: 50%; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }

.split-bar { display: flex; height: 30px; border-radius: 8px; overflow: hidden; margin-top: .9rem; }
.split-f1, .split-f2 { display: flex; align-items: center; font-size: .75rem; font-weight: 800;
  transition: width .6s cubic-bezier(.3,1,.4,1); min-width: 32px; color: #fff; }
.split-f1 { background: linear-gradient(90deg, var(--red-dark), var(--red)); justify-content: flex-start; padding-left: .5rem; }
.split-f2 { background: linear-gradient(90deg, var(--blue), var(--blue-dk)); justify-content: flex-end; padding-right: .5rem; }

.bet-form { margin-top: 1rem; background: rgba(255,215,0,.06); border: 1px solid var(--gold-dim);
  border-radius: 12px; padding: .9rem; }
.bet-form-head { font-weight: 700; margin-bottom: .6rem; font-size: .95rem; }
.amount-row { display: flex; gap: .5rem; }
.amount-row input { flex: 1; padding: .65rem .8rem; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 1.05rem; font-weight: 700; }
.amount-row input:focus { outline: none; border-color: var(--gold); }
.quick-btns { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .6rem; }
.quick-btn { padding: .35rem .7rem; border-radius: 99px; border: 1px solid var(--border);
  background: var(--surface3); color: var(--text); cursor: pointer; font-size: .8rem; font-weight: 600; }
.quick-btn:hover { border-color: var(--gold); color: var(--gold); }
.potential { font-size: .8rem; color: var(--muted); margin-top: .6rem; }
.potential b { color: var(--gold); }
.muted-note { text-align: center; color: var(--muted); padding: 1.2rem; font-size: .9rem; }

/* ── Charts ──────────────────────────────────────────────────────── */
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: .8rem .9rem; margin-bottom: .8rem; }
.chart-head { display: flex; justify-content: space-between; align-items: center; font-size: .8rem;
  font-weight: 700; margin-bottom: .5rem; }
.chart-legend { display: flex; align-items: center; gap: .35rem; font-size: .72rem; color: var(--muted); font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-f1 { background: var(--red); } .dot-f2 { background: var(--blue); }
.chart { width: 100%; height: 110px; }
.chart svg { width: 100%; height: 100%; display: block; }
.chart-empty { display: flex; align-items: center; justify-content: center; height: 110px;
  color: var(--muted); font-size: .82rem; text-align: center; }

/* ── Generic list / bet rows ─────────────────────────────────────── */
.list-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: .4rem .8rem; }
.bet-row { display: flex; gap: .5rem; align-items: center; padding: .6rem .2rem; border-bottom: 1px solid #1f1f1f; font-size: .9rem; }
.bet-row:last-child { border: none; }
.bet-row.won  { background: rgba(76,175,80,.07); border-radius: 8px; }
.bet-row.lost { opacity: .7; }
.bet-row .b-amt { font-weight: 800; }
.bet-tag { display: inline-block; padding: .12rem .5rem; border-radius: 5px; font-size: .74rem; font-weight: 800; }
.bet-tag-f1 { background: rgba(230,57,70,.2); color: #ff8a8a; }
.bet-tag-f2 { background: rgba(74,144,226,.2); color: #93c5fd; }

/* ── Live ticker ─────────────────────────────────────────────────── */
.ticker { display: flex; flex-direction: column; gap: .5rem; }
.tick { display: flex; align-items: center; gap: .7rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: .6rem .8rem; }
.tick.fresh { animation: slideIn .45s cubic-bezier(.2,1,.3,1); border-color: var(--gold-dim);
  box-shadow: 0 0 0 2px rgba(255,215,0,.12); }
@keyframes slideIn { from { opacity: 0; transform: translateY(-12px) scale(.98); } to { opacity: 1; transform: none; } }
.tick-emoji { font-size: 1.4rem; }
.tick-body { flex: 1; min-width: 0; }
.tick-line { font-size: .9rem; } .tick-line b { color: var(--text); }
.tick-sub { font-size: .76rem; margin-top: .15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tick-pill { display: inline-block; padding: .05rem .45rem; border-radius: 5px; font-weight: 800; font-size: .72rem; }
.tick-pill.main { background: rgba(255,215,0,.16); color: var(--gold); }
.tick-pill.side { background: rgba(74,144,226,.18); color: #93c5fd; }
.tick-time { font-size: .72rem; color: var(--muted); flex-shrink: 0; }

/* ── Side bets ───────────────────────────────────────────────────── */
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.side-head h2 { font-size: 1.3rem; }
.sidebet-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: .9rem; margin-bottom: .8rem; }
.sidebet-card.is-settled { opacity: .85; }
.sidebet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; margin-bottom: .7rem; }
.sidebet-topic { font-weight: 800; font-size: 1rem; line-height: 1.25; }
.sidebet-meta { font-size: .73rem; color: var(--muted); margin-top: .2rem; }
.pill { font-size: .62rem; font-weight: 800; letter-spacing: .5px; padding: .15rem .5rem; border-radius: 99px; flex-shrink: 0; }
.pill-open    { background: #14532d; color: #86efac; }
.pill-closed  { background: #7c2d12; color: #fdba74; }
.pill-settled { background: #1e3a8a; color: #bfdbfe; }
.pill-void    { background: #3f3f46; color: #a1a1aa; }
.opt-grid { display: flex; flex-direction: column; gap: .5rem; }
.opt { text-align: left; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px;
  padding: .6rem .7rem; cursor: pointer; transition: all .15s; color: var(--text); width: 100%; }
.opt:hover:not(:disabled) { border-color: var(--gold); }
.opt:disabled { cursor: default; }
.opt-win { border-color: var(--green); background: rgba(76,175,80,.1); }
.opt-top { display: flex; justify-content: space-between; align-items: center; }
.opt-label { font-weight: 700; font-size: .92rem; }
.opt-odds { font-weight: 900; color: var(--gold); font-size: .92rem; }
.opt-bar { height: 6px; background: var(--surface3); border-radius: 99px; overflow: hidden; margin: .4rem 0 .3rem; }
.opt-bar div { height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); transition: width .5s; }
.opt-foot { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); }
.opt-row { display: flex; gap: .5rem; margin-bottom: .5rem; }
.opt-row input { flex: 1; padding: .55rem .7rem; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); }
.opt-row input:focus { outline: none; border-color: var(--gold); }
.form-lbl { display: block; font-size: .85rem; color: var(--muted); margin: .4rem 0 .5rem; }
.sw-pick { background: var(--surface2); border-radius: 10px; padding: .7rem .8rem; }
.sw-opt { font-weight: 800; font-size: 1.1rem; margin-top: .2rem; }

/* ── Profile ─────────────────────────────────────────────────────── */
.profile-card { display: flex; align-items: center; gap: 1rem; background: linear-gradient(135deg, #1e1b2e, #161620);
  border: 1px solid var(--border); border-radius: 16px; padding: 1.1rem; }
.profile-avatar { font-size: 2.6rem; width: 64px; height: 64px; border-radius: 50%; background: var(--surface2);
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--gold-dim); }
.profile-name { font-size: 1.3rem; font-weight: 800; }
.profile-stats { display: flex; gap: 1rem; margin-top: .4rem; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.profile-stats b { color: var(--text); }
.profile-code { margin-top: .5rem; font-size: .8rem; color: var(--muted); }
.profile-code b { font-family: monospace; letter-spacing: 2px; color: var(--gold); font-size: .95rem; }

/* ── Leaderboard (app) ───────────────────────────────────────────── */
.lb-row { display: flex; align-items: center; gap: .75rem; padding: .65rem .3rem; border-bottom: 1px solid #1f1f1f; }
.lb-row:last-child { border: none; }
.lb-row.lb-me { background: rgba(255,215,0,.07); border-radius: 8px; }
.lb-rank { width: 1.8rem; text-align: center; font-weight: 800; color: var(--muted); font-size: 1rem; }
.lb-name { flex: 1; font-weight: 700; font-size: .95rem; }
.lb-you { font-size: .68rem; }
.lb-vals { text-align: right; }
.lb-bal { font-weight: 800; color: var(--gold); }
.lb-real { font-size: .72rem; color: var(--muted); }

/* ── Bottom nav ──────────────────────────────────────────────────── */
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 540px;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex; background: rgba(20,20,20,.92); backdrop-filter: blur(16px);
  border-top: 1px solid var(--border); z-index: 60; }
.nav-btn { flex: 1; background: none; border: none; color: var(--muted); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  font-size: .68rem; font-weight: 600; position: relative; transition: color .15s; }
.nav-btn .nav-ico { font-size: 1.25rem; filter: grayscale(.4); transition: all .15s; }
.nav-btn.active { color: var(--gold); }
.nav-btn.active .nav-ico { filter: none; transform: translateY(-1px); }
.nav-badge { position: absolute; top: 8px; right: 50%; margin-right: -16px; width: 8px; height: 8px;
  background: var(--red); border-radius: 50%; }

/* ── Bottom sheet ────────────────────────────────────────────────── */
.sheet-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 100;
  display: flex; align-items: flex-end; justify-content: center; }
.sheet-overlay.hidden { display: none; }
.sheet { width: 100%; max-width: 540px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px 20px 0 0; padding: .6rem 1.1rem calc(1.4rem + env(safe-area-inset-bottom, 0px));
  animation: sheetUp .3s cubic-bezier(.2,1,.3,1); max-height: 88vh; overflow-y: auto; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-grip { width: 38px; height: 4px; background: var(--border); border-radius: 99px; margin: .2rem auto .6rem; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }

/* toast info variant */
#toast.info { border-color: var(--blue); color: #93c5fd; }
