/* ── The Mijon Exchange · midnight bookmaker ─────────────────────────────
   Dark print-room aesthetic: green-black felt, cream ink, gold foil.
   Hairline rules, tabular numerals, square corners. No gradients-as-decor. */

:root {
  --bg: #0e110d;
  --bg-deep: #0a0c09;
  --card: #151a13;
  --card-hi: #1a2017;
  --inset: #0b0e0a;
  --ink: #ece5d1;
  --ink-soft: #a39e8a;
  --ink-faint: #6f6d5d;
  --line: rgba(236, 229, 209, 0.13);
  --line-strong: rgba(236, 229, 209, 0.32);
  --gold: #d8a948;
  --gold-dim: #a8842f;
  --green: #58c785;
  --red: #e3705a;
  --green-tint: rgba(88, 199, 133, 0.1);
  --red-tint: rgba(227, 112, 90, 0.1);
  --gold-tint: rgba(216, 169, 72, 0.09);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.045) inset, 0 14px 32px -18px rgba(0, 0, 0, 0.7);
  --shadow-pop: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 18px 44px -16px rgba(0, 0, 0, 0.8);
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
  --serif: 'Young Serif', Georgia, serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

::selection { background: rgba(216, 169, 72, 0.28); }

body {
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 420px at 50% -120px, rgba(216, 169, 72, 0.05), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: 0 20px 64px; }

a { color: inherit; }

/* ── Masthead ── */
.masthead {
  position: relative;
  text-align: center;
  padding: 46px 20px 0;
  margin-bottom: 40px;
}
.masthead::after {
  content: '';
  display: block;
  margin-top: 22px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  height: 3px;
}
.masthead-title { text-decoration: none; color: inherit; display: inline-block; }
.masthead-tickets {
  font-size: 26px;
  display: block;
  transform: rotate(-8deg);
  filter: grayscale(1) sepia(1) saturate(3) hue-rotate(-8deg) brightness(1.05);
}
.masthead h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 6vw, 58px);
  margin: 6px 0 10px;
  letter-spacing: 0.5px;
  font-weight: 400;
  color: var(--ink);
}
.masthead h1 em { font-style: normal; color: var(--gold); }
.masthead-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2.2px;
  color: var(--ink-faint);
  margin: 0;
}
.masthead-tag b { color: var(--ink-soft); font-weight: 400; }

/* me chip */
.me-chip {
  position: absolute;
  top: 18px;
  right: 20px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.me-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.me-chip b { color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  .me-chip { position: static; display: inline-block; margin-top: 14px; }
  .masthead::after { margin-top: 18px; }
}

/* ── Buttons & inputs ── */
.btn {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  background: var(--ink);
  color: var(--bg-deep);
  border: 1px solid var(--ink);
  padding: 11px 20px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  line-height: 1.4;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease, color 0.12s ease, opacity 0.12s ease;
}
.btn:hover { background: #fff; border-color: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--ink-soft); border-color: var(--line-strong); }
.btn.ghost:hover { color: var(--ink); border-color: var(--ink-soft); background: rgba(236, 229, 209, 0.05); }
.btn.green { background: var(--green); border-color: var(--green); color: var(--bg-deep); }
.btn.green:hover { background: #6cd996; border-color: #6cd996; }
.btn.red { background: var(--red); border-color: var(--red); color: var(--bg-deep); }
.btn.red:hover { background: #ef8169; border-color: #ef8169; }
.btn.btn-opt { color: var(--bg-deep); border-color: transparent; }
.btn.btn-opt:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

input, textarea, select {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  background: var(--inset);
  border: 1px solid var(--line-strong);
  padding: 10px 12px;
  width: 100%;
  transition: border-color 0.15s ease;
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input[type='number'] { -moz-appearance: textfield; appearance: textfield; }
input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input:hover, textarea:hover { border-color: rgba(236, 229, 209, 0.45); }
input:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
input[type='datetime-local'] { color-scheme: dark; }
label {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 20px 0 7px;
}
label .hint { font-weight: 400; color: var(--ink-faint); text-transform: none; letter-spacing: 0; font-size: 11px; }
code {
  background: var(--inset);
  border: 1px solid var(--line);
  color: var(--gold);
  padding: 2px 6px;
  font-size: 11px;
  word-break: break-all;
}

/* ── Home: tab switcher ── */
.tabbar {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}
.tab {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  text-decoration: none;
  color: var(--ink-faint);
  padding: 4px 2px 12px;
  position: relative;
  transition: color 0.15s ease;
}
.tab:hover { color: var(--ink-soft); }
.tab.active { color: var(--ink); }
.tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--gold);
}
.tab-count {
  font-size: 10px;
  font-weight: 400;
  color: var(--ink-faint);
  margin-left: 5px;
  font-variant-numeric: tabular-nums;
}
.tab.active .tab-count { color: var(--gold); }

/* ── Home: status groups ── */
.group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin: 40px 0 18px;
}
.group-head:first-of-type { margin-top: 0; }
.group-title { font-family: var(--serif); font-size: 19px; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.group-title::before { content: ''; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.group-head.g-open .group-title::before { background: var(--green); box-shadow: 0 0 8px rgba(88, 199, 133, 0.7); animation: breathe 2.4s ease infinite; }
.group-head.g-closed .group-title::before { background: var(--gold); }
.group-head.g-settled .group-title::before { background: var(--ink-faint); }
.group-head.g-settled .group-title { color: var(--ink-soft); }
.group-head.g-voided .group-title::before { background: var(--red); }
.group-head.g-voided .group-title { color: var(--ink-soft); }
.group-hint { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--ink-faint); }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* ── Home: join strip ── */
.join-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: stretch;
  margin-bottom: 44px;
}
.join-form { display: flex; flex: 1; min-width: 260px; }
.join-form input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 6px;
  font-weight: 600;
  font-size: 15px;
  border-right: none;
}
.join-form button { flex-shrink: 0; }

/* ── Section heads ── */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 20px;
}
.section-head h2 { font-family: var(--serif); font-weight: 400; font-size: 22px; margin: 0; color: var(--ink); }
.section-head .count { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--ink-faint); }

/* ── Ticket cards ── */
.tickets { display: flex; flex-direction: column; gap: 14px; }

.ticket {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  padding: 20px 24px 18px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  animation: rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.ticket:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--card-hi);
  box-shadow: var(--shadow-pop);
}
.tickets .ticket:nth-child(1) { animation-delay: 0.03s; }
.tickets .ticket:nth-child(2) { animation-delay: 0.08s; }
.tickets .ticket:nth-child(3) { animation-delay: 0.13s; }
.tickets .ticket:nth-child(4) { animation-delay: 0.18s; }
.tickets .ticket:nth-child(5) { animation-delay: 0.23s; }
.tickets .ticket:nth-child(n + 6) { animation-delay: 0.28s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.ticket-top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.ticket-q { font-family: var(--serif); font-size: 19px; font-weight: 400; margin: 0 0 6px; color: var(--ink); }
.ticket-rules {
  color: var(--ink-soft);
  font-size: 12.5px;
  margin: 0 0 14px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-faint);
  border-top: 1px dashed var(--line);
  padding-top: 12px;
  margin-top: 14px;
  font-variant-numeric: tabular-nums;
}
.ticket-meta b { color: var(--ink-soft); font-weight: 600; }
.ticket-meta .urgent { color: var(--red); }
.ticket-meta .urgent b, .ticket-meta b.urgent { color: var(--red); }

.chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
  color: var(--ink-soft);
}
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.chip.open { color: var(--green); border-color: rgba(88, 199, 133, 0.35); background: var(--green-tint); }
.chip.open::before { background: var(--green); animation: breathe 2.4s ease infinite; }
.chip.closed { color: var(--gold); border-color: rgba(216, 169, 72, 0.35); background: var(--gold-tint); }
.chip.closed::before { background: var(--gold); }
.chip.settled { color: var(--ink-soft); }
.chip.settled::before { background: var(--ink-faint); }
.chip.voided { color: var(--red); border-color: rgba(227, 112, 90, 0.35); background: var(--red-tint); }
.chip.voided::before { background: var(--red); }

/* ticket status variants */
.ticket.settled,
.ticket.voided { background: var(--bg-deep); }
.ticket.settled .ticket-top,
.ticket.voided .ticket-top { padding-right: 104px; } /* keep clear of the stamp */
.ticket.settled .ticket-q,
.ticket.voided .ticket-q { color: var(--ink-soft); transition: color 0.18s ease; }
.ticket.settled:hover .ticket-q,
.ticket.voided:hover .ticket-q { color: var(--ink); }
.stamp {
  position: absolute;
  top: 16px;
  right: 16px;
  transform: rotate(6deg);
  border: 1.5px solid var(--gold-dim);
  border-radius: 2px;
  padding: 2px 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--gold-dim);
  opacity: 0.6;
  pointer-events: none;
}

/* winner line on settled tickets */
.winner-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px solid rgba(216, 169, 72, 0.25);
  background: var(--gold-tint);
  padding: 8px 14px;
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
}
.winner-line b { font-family: var(--serif); font-weight: 400; font-size: 15px; color: var(--gold); }
.winner-line.voided-line { border-color: rgba(227, 112, 90, 0.25); background: var(--red-tint); }
.winner-line.voided-line b { color: var(--red); }
.stamp.stamp-void { border-color: var(--red); color: var(--red); }
.winner-sub { margin-left: auto; font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }

/* odds: thin segmented track + legend */
.oddsbar { margin: 14px 0 2px; }
.oddsbar .track { display: flex; height: 6px; gap: 2px; }
.oddsbar .seg { min-width: 3px; transition: flex-grow 0.4s ease; }
.oddsbar .legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 9px;
  font-size: 12px;
  color: var(--ink-soft);
}
.leg { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); }
.leg::before { content: ''; width: 7px; height: 7px; background: var(--c); flex-shrink: 0; }
.leg b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.empty {
  text-align: center;
  color: var(--ink-soft);
  border: 1px dashed var(--line-strong);
  padding: 48px 24px;
  font-size: 13px;
}
.empty b { color: var(--gold); }

/* ── Forms / panels ── */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  padding: 28px 30px;
  animation: rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.panel h2 { font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 0 0 6px; color: var(--ink); }
.panel .sub { color: var(--ink-soft); font-size: 12.5px; margin: 0 0 8px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-actions { margin-top: 26px; display: flex; gap: 12px; align-items: center; }

/* create form: dynamic option rows */
.opt-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.opt-row .opt-dot { width: 12px; height: 12px; flex-shrink: 0; }
.opt-row .opt-x { flex-shrink: 0; }
.backlink {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ink-faint);
  text-decoration: none;
  transition: color 0.15s ease;
}
.backlink:hover { color: var(--ink); }

/* ── Code reveal ── */
.code-reveal { text-align: center; padding: 44px 28px 36px; }
.code-reveal .big-code {
  font-family: var(--mono);
  font-size: clamp(36px, 9vw, 58px);
  font-weight: 600;
  letter-spacing: 16px;
  padding-left: 16px; /* optically balance letter-spacing */
  margin: 22px 0 26px;
  color: var(--gold);
  text-shadow: 0 0 32px rgba(216, 169, 72, 0.35);
}
.code-reveal .creator-note { margin: 26px auto 0; max-width: 520px; }

/* ── Bet detail ── */
.bet-head { margin-bottom: 24px; animation: rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.bet-head .row1 { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.bet-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 4.5vw, 34px); margin: 0 0 12px; color: var(--ink); }
.bet-head .row1 .chip { margin-top: 8px; }
.bet-head .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  align-items: center;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.bet-head .meta b { color: var(--ink-soft); }
.rules-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-dim);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--ink-soft);
  margin: 16px 0 0;
  white-space: pre-wrap;
}
.rules-block .rules-label {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 4px;
}

/* chart panel */
.chart-panel { padding: 24px 26px 16px; margin-bottom: 20px; animation-delay: 0.05s; }
.chart-top { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.chart-top .pct { font-family: var(--serif); font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; }
.chart-top .pct-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--ink-soft); }
.chart-wrap { position: relative; margin-top: 14px; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.chart-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s ease 0.15s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart-dot { animation: breathe 2s ease infinite; }
.chart-tip {
  position: absolute;
  pointer-events: none;
  background: var(--ink);
  color: var(--bg-deep);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  white-space: nowrap;
  transform: translate(-50%, -130%);
  display: none;
  z-index: 2;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}
.chart-tip.below { transform: translate(-50%, 35%); }
.chart-axis {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 10px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}

/* pools */
.pool-line {
  display: flex;
  justify-content: flex-start;
  gap: 6px 22px;
  font-size: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
}
.pool-line .total { color: var(--gold); font-weight: 600; margin-left: auto; }

/* wager form */
.wager-panel { margin-bottom: 20px; animation-delay: 0.1s; }
.side-toggle { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 6px; }
.side-btn {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background: var(--inset);
  color: var(--ink);
  padding: 13px 10px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.side-btn:hover { border-color: var(--opt, var(--ink-soft)); transform: translateY(-1px); }
.side-btn .side-odds { display: block; font-size: 11px; font-weight: 400; color: var(--ink-faint); margin-top: 3px; transition: color 0.15s ease; }
.side-btn.sel { background: var(--opt, var(--green)); border-color: var(--opt, var(--green)); color: var(--bg-deep); }
.side-btn.sel .side-odds { color: rgba(10, 12, 9, 0.72); }

/* stake slider */
.stake-row { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.stake-row input[type='number'] { width: 110px; text-align: right; font-weight: 600; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.stake-row .btn-max { padding: 9px 14px; font-size: 11px; flex-shrink: 0; }
.stake-row input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 120px;
  height: 24px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
}
.stake-row input[type='range']:focus { outline: none; box-shadow: none; }
.stake-row input[type='range']::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(90deg, var(--gold) var(--fill, 0%), var(--line-strong) var(--fill, 0%));
}
.stake-row input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--gold);
  transition: transform 0.12s ease;
}
.stake-row input[type='range']::-webkit-slider-thumb:hover { transform: scale(1.15); }
.stake-row input[type='range']::-moz-range-track {
  height: 4px;
  background: linear-gradient(90deg, var(--gold) var(--fill, 0%), var(--line-strong) var(--fill, 0%));
  border: none;
}
.stake-row input[type='range']::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--gold);
}
.stake-row input[type='range']:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--gold); outline-offset: 3px; }
.est-line {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--ink-soft);
  background: var(--inset);
  border: 1px dashed var(--line-strong);
  padding: 10px 14px;
  min-height: 20px;
  font-variant-numeric: tabular-nums;
}
.est-line b { color: var(--green); }

/* settle panel */
.settle-panel { margin-bottom: 20px; border-style: dashed; animation-delay: 0.12s; }
.settle-panel h3 { font-family: var(--serif); font-weight: 400; margin: 0 0 4px; font-size: 19px; color: var(--ink); }

/* result banner */
.result-banner {
  border: 1px solid rgba(216, 169, 72, 0.3);
  background:
    linear-gradient(var(--gold-tint), var(--gold-tint)),
    var(--card);
  box-shadow: var(--shadow-card);
  padding: 18px 24px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--ink-soft);
  animation: rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.result-banner b { font-family: var(--serif); font-weight: 400; font-size: 18px; color: var(--gold); }

/* wagers table */
.table-panel { padding: 0; overflow-x: auto; animation-delay: 0.15s; }
.table-panel table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-panel th {
  text-align: left;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-weight: 600;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line-strong);
  padding: 14px 16px 10px;
  white-space: nowrap;
}
.table-panel td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.table-panel td.q { white-space: normal; min-width: 220px; }
.table-panel tr:last-child td { border-bottom: none; }
.table-panel tbody tr { transition: background 0.12s ease; }
.table-panel tbody tr:hover { background: rgba(236, 229, 209, 0.025); }
.table-panel .num { text-align: right; }
.side-a-text { color: var(--green); font-weight: 600; }
.side-b-text { color: var(--red); font-weight: 600; }
.net-pos { color: var(--green); font-weight: 600; }
.net-neg { color: var(--red); }
.me-row td { background: var(--gold-tint); }
.me-row td:first-child { box-shadow: 2px 0 0 var(--gold) inset; }

/* ── Profile ── */
.profile-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.profile-balance { text-align: right; }
.balance-num { font-family: var(--serif); font-size: 36px; color: var(--gold); display: block; line-height: 1.1; font-variant-numeric: tabular-nums; }
.balance-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--ink-faint); }
.profile-stats {
  display: flex;
  gap: 8px 28px;
  flex-wrap: wrap;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-faint);
  border-top: 1px dashed var(--line);
  margin-top: 18px;
  padding-top: 16px;
  font-variant-numeric: tabular-nums;
}
.profile-stats b { color: var(--ink); }
.claim-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.btn-mini { padding: 5px 10px; font-size: 10px; letter-spacing: 1px; }
.creator-note {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 16px;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}
.creator-note .btn-mini { margin-left: 6px; }

.user-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--ink-faint);
  text-underline-offset: 3px;
  transition: color 0.12s ease;
}
.user-link:hover { color: var(--gold); }
.betting-as {
  font-size: 13px;
  background: var(--inset);
  border: 1px dashed var(--line-strong);
  padding: 10px 14px;
  margin: 14px 0 4px;
  color: var(--ink-soft);
}
.betting-as b { color: var(--ink); }

/* ── Footer / misc ── */
.footer {
  text-align: center;
  padding: 28px 20px 36px;
  border-top: 1px solid var(--line);
  margin-top: 48px;
  color: var(--ink-faint);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
}
.barcode {
  width: 150px;
  height: 26px;
  margin: 0 auto 14px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 7px, transparent 7px 9px, var(--ink) 9px 10px, transparent 10px 14px);
  opacity: 0.3;
}
.footer p { margin: 0; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg-deep);
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  z-index: 10;
  max-width: 90vw;
  animation: rise 0.25s ease;
}
.toast.error { background: var(--red); }

.loading {
  text-align: center;
  color: var(--ink-faint);
  padding: 60px 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  animation: breathe 1.6s ease infinite;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
