/* Competitions (§4.12) — its own look, deliberately apart from the challenge
   pages (owner's call): the same tokens as the app, a different language —
   big figures, a gold for prizes, cards with a lit edge, a podium. Shared by
   the lobby (competitions.html) and the competition page (competition.html). */
:root { --gold: #e3b341; --gold-dim: rgba(227, 179, 65, 0.14); --live: #ff6b6b; }
body { height: auto; min-height: 100vh; }
.arena { max-width: 1120px; margin: 0 auto; padding: 28px 20px 72px; width: 100%; box-sizing: border-box; }
.arena h1 { font-size: 26px; letter-spacing: -0.02em; margin: 6px 0 4px; }
.arena .lede { color: var(--muted); font-size: 13.5px; margin: 0 0 26px; max-width: 62ch; }
.arena .empty { color: var(--muted); font-size: 13px; padding: 28px 0; }
.arena .note { color: var(--red); font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }

/* Lobby */
.group { margin: 26px 0 0; }
.group h2 { font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.pip { width: 7px; height: 7px; border-radius: 999px; background: var(--muted); display: inline-block; }
.pip.live { background: var(--live); box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.18); }
.pip.soon { background: var(--gold); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.ccard {
  position: relative; background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent 40%), var(--panel);
  border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 12px;
}
.ccard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; border-radius: 14px 14px 0 0; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0.7; }
.ccard.live::before { background: linear-gradient(90deg, transparent, var(--live), transparent); }
.ccard.done::before { background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.ccard .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ccard .name { font-size: 16px; font-weight: 650; }
.ccard .when { color: var(--muted); font-size: 12px; white-space: nowrap; }
/* The seeded example (owner's call 2026-11-06): labelled on the card, the page and the bots' profiles — never mistaken for a real one. */
.tag.demo { display: inline-block; color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; padding: 1px 7px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; vertical-align: middle; margin-left: 8px; }
.hero .demo-note { color: var(--muted); font-size: 12.5px; margin-top: 8px; }
.ccard .pool { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ccard .pool b { font-size: 30px; letter-spacing: -0.02em; }
.ccard .pool .gtd, .hero .gtd { color: var(--gold); background: var(--gold-dim); border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 600; }
.ccard .pool .lbl { color: var(--muted); font-size: 12px; }
.specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.specs div { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0; }
.specs .k { display: block; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.specs .v { font-size: 13.5px; font-weight: 600; }
.mk { color: var(--muted); font-size: 12px; }
.mk b { color: var(--text); }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 2px; }
.who { color: var(--muted); font-size: 12px; }
.who b { color: var(--text); }
.btn { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 8px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; white-space: nowrap; }
/* Registration not open yet (owner's call 2026-11-06): the card's button slot says when, quietly, and opens the page. */
.btn.reg-wait { color: var(--muted); font-weight: 500; border-style: dashed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #06211d; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #2a1f05; }
.btn[disabled] { opacity: 0.45; cursor: default; }
.cd { font-weight: 700; letter-spacing: 0.02em; }

/* Competition page */
.hero { background: radial-gradient(70ch 30ch at 10% -20%, rgba(80,210,193,0.12), transparent 60%), linear-gradient(180deg, rgba(255,255,255,0.02), transparent 50%), var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 18px; align-items: end; }
.hero .title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
/* A prize shape's tiers (owner's call 2026-10-28): folded under the chips, the prize per player at the pool as it stands. */
.hero details.prizes { margin-top: 4px; font-size: 12px; color: var(--muted); }
.hero details.prizes summary { cursor: pointer; list-style: none; }
.hero details.prizes summary::before { content: "▸ "; }
.hero details[open].prizes summary::before { content: "▾ "; }
.hero details.prizes table { margin-top: 6px; border-collapse: collapse; }
.hero details.prizes td { padding: 2px 14px 2px 0; }
.hero details.prizes td.num { color: var(--text); font-variant-numeric: tabular-nums; }
.hero .status { display: inline-flex; align-items: center; gap: 7px; color: var(--live); font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.hero .status.soon { color: var(--gold); }
.hero .status.done, .hero .status.off { color: var(--muted); }
.hero h1 { margin: 0; font-size: 28px; }
.hero .meta { color: var(--muted); font-size: 12.5px; }
.hero .lev-caps { margin-top: 4px; }
.hero .lev-caps b { color: var(--text); font-weight: 600; }
.stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat .k { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.stat .v { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.stat .s { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
/* Phase 6 (2026-11-18): styles.css's `.stat` is the trading screen's one-line strip and sets nowrap; here a stat's sub-line is a sentence and must wrap — a guaranteed pool's line ran over the clock beside it and off a phone's screen. */
.hero .stat { white-space: normal; }
.hero .stat .v { white-space: nowrap; }
/* A link in the hero or the run card is the site's link, not the browser's default blue on a dark panel. */
.hero a, .myrun a:not(.btn) { color: var(--accent); }
.stat .v.gold { color: var(--gold); }
.row2 { display: grid; grid-template-columns: 1fr 1.6fr; gap: 14px; margin-top: 14px; }
.myrun { background: var(--panel); border: 1px solid var(--accent); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.myrun.out { border-color: var(--line); }
.myrun h3 { margin: 0; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.myrun .rank { font-size: 30px; font-weight: 700; }
.myrun .rank small { font-size: 13px; color: var(--muted); font-weight: 500; }
.myrun .eq { font-size: 20px; font-weight: 650; }
.myrun .eq .pnl { font-size: 13px; margin-left: 8px; }
.myrun .line { color: var(--muted); font-size: 12px; }
.myrun .acts { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 10px; align-items: end; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: 12px 12px 6px 6px; padding: 14px 14px 12px; text-align: center; min-width: 0; }
.step.first { border-color: var(--gold); background: linear-gradient(180deg, var(--gold-dim), var(--panel) 60%); padding-top: 26px; }
.step.empty { opacity: 0.35; }
.step .place { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.step.first .place { color: var(--gold); }
.step .who { font-size: 15px; font-weight: 650; margin: 4px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step .eqv { font-size: 18px; font-weight: 700; }
.step .pnl { font-size: 12px; }
.step .prize { margin-top: 6px; font-size: 12px; color: var(--gold); font-weight: 600; }
.board { margin-top: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; overflow-x: auto; }
.board table { width: 100%; border-collapse: collapse; font-size: 13px; }
.board th { text-align: left; color: var(--muted); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.board td { padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.board tr:last-child td { border-bottom: 0; }
.board td.r, .board th.r { text-align: right; }
.board tr.mine td { background: rgba(80,210,193,0.06); }
.board tr.bust td { color: var(--muted); }
.board .tag { font-size: 10.5px; border-radius: 5px; padding: 1px 6px; border: 1px solid var(--line); color: var(--muted); margin-left: 6px; }
.board .tag.bust { color: var(--red); border-color: rgba(212,87,107,0.4); }
.board .tag.you { color: var(--accent); border-color: rgba(80,210,193,0.4); }
.board .prize { color: var(--gold); font-weight: 600; }
.board .handle { color: var(--text); text-decoration: none; font-weight: 600; }
.board .handle:hover { color: var(--accent); }
.board .narrow { display: none; }
.board .empty { padding: 28px 14px; }
/* Decision 103: the reader's own row under a gap, and the line that offers the rest of the field. */
.board tr.gap td { text-align: center; color: var(--muted); padding: 2px 14px; letter-spacing: 0.2em; }
.board-more { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; color: var(--muted); font-size: 12px; }
.board-more .btn { padding: 6px 12px; font-size: 12px; }
.up { color: var(--green); } .dn { color: var(--red); }
.chip { display: inline-block; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-size: 11.5px; color: var(--muted); margin: 0 4px 4px 0; }
.updated { color: var(--muted); font-size: 11px; margin-top: 10px; text-align: right; }
@media (max-width: 640px) {
  .arena { padding: 18px 14px 56px; }
  .hero { grid-template-columns: 1fr; padding: 18px 16px; }
  .hero h1 { font-size: 24px; }
  .stat .v { font-size: 28px; }
  .row2 { grid-template-columns: 1fr; }
  .board th:nth-child(5), .board td:nth-child(5) { display: none; }
  /* Sized on the 200-player example (phase 6, by eye): five-figure equity beside a four-figure prize must still fit a
     390px screen, and a 360px one once the picture gives way below. */
  .board td, .board th { padding: 9px 4px; font-size: 12px; }
  /* The header's long form is the desktop's; the row is already marked as the reader's by its tint. */
  .board .wide, .board .tag.you { display: none; }
  .board .narrow { display: inline; }
  .board td:first-child, .board th:first-child { padding-left: 10px; }
  .board td:last-child, .board th:last-child { padding-right: 10px; }
  .board a.handle { display: inline-block; max-width: 24vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
  .podium { gap: 6px; }
  .step { padding: 10px 8px 10px; }
  .step .eqv { font-size: 15px; }
}
@media (max-width: 400px) {
  /* The narrowest phones: the name is worth more than the picture beside it. */
  .board a.handle .pic { display: none; }
  .board a.handle { max-width: 19vw; }
}
.updated a { color: var(--muted); }
.updated a:hover { color: var(--accent); }
.arena .empty a { color: var(--accent); }

/* §4.13 decision 68: a bill awaiting payment, before the stake exists. */
.myrun.pending { border-color: var(--gold); }
.myrun .pending-line { color: var(--gold); }
.myrun .line.confirming { color: var(--gold); }
.myrun .line.warn { color: var(--live); }
.myrun .pay-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.myrun details.nowallet { font-size: 12px; color: var(--muted); }
.myrun details.nowallet summary { cursor: pointer; color: var(--accent); }
.myrun details.nowallet code { font-size: 11px; word-break: break-all; }
.myrun .linkish { background: none; border: 0; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; padding: 8px 4px; }
/* The wallet picker: a modal list of the wallets the browser announced, each with its icon and a "detected" dot. */
.myrun .line.offer { color: var(--text); }
.myrun .pos { color: var(--green, #2ebd85); }
.myrun .dn { color: var(--live); }
/* Email verification (decision 79's first build): the banner an unverified account sees above the lobby and the competition page while mail is on. */
