/* FreeGoldPips — Apple-style interface: system font, grouped backgrounds, inset cards, translucent bars. */
:root {
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --card-2: #F2F2F7;
  --label: #000000;
  --label-2: rgba(60, 60, 67, .62);
  --label-3: rgba(60, 60, 67, .32);
  --sep: rgba(60, 60, 67, .18);
  --fill: rgba(120, 120, 128, .12);
  --blue: #007AFF;
  --green: #248A3D;
  --green-bright: #34C759;
  --red: #D70015;
  --red-bright: #FF3B30;
  --orange: #C93400;
  --gold: #B8860B;
  --gold-bright: #D4A72C;
  --bar: rgba(249, 249, 249, .78);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --card: #1C1C1E; --card-2: #2C2C2E; --label: #FFFFFF;
    --label-2: rgba(235, 235, 245, .62); --label-3: rgba(235, 235, 245, .3); --sep: rgba(84, 84, 88, .6);
    --fill: rgba(120, 120, 128, .24); --blue: #0A84FF; --green: #30D158; --green-bright: #30D158;
    --red: #FF6961; --red-bright: #FF453A; --orange: #FF9F0A; --gold: #E5B83B; --gold-bright: #E5B83B;
    --bar: rgba(22, 22, 24, .78); --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--label);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px; line-height: 1.47; letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0 0 .4em; letter-spacing: -0.03em; }
h1 { font-size: 34px; line-height: 1.12; font-weight: 700; }
h2 { font-size: 22px; line-height: 1.2; font-weight: 700; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
small, .fine { color: var(--label-2); font-size: 13px; letter-spacing: -0.01em; }
.muted { color: var(--label-2); }
.num, .tnum { font-variant-numeric: tabular-nums; }

/* ---------- Bars ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--sep);
  padding-top: env(safe-area-inset-top);
}
.bar-inner { max-width: 1080px; margin: 0 auto; padding: 0 20px; height: 52px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--label); font-weight: 600; font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(160deg, #F1CB5B, #B8860B); position: relative; }
.brand-mark::after { content: ''; position: absolute; left: 5px; right: 5px; bottom: 7px; height: 8px; background: #fff; clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%); }
.topnav { display: flex; gap: 22px; font-size: 14px; }
.topnav a { color: var(--label-2); }
.topnav a:hover { color: var(--label); text-decoration: none; }
.topnav a[aria-current="page"] { color: var(--label); font-weight: 600; }

.tabbar { display: none; }
@media (max-width: 720px) {
  .topnav { display: none; }
  .bar-inner { justify-content: center; height: 46px; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-top: .5px solid var(--sep); padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; font-weight: 500; color: var(--label-3); letter-spacing: 0; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a[aria-current="page"] { color: var(--blue); }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}

.main { max-width: 1080px; margin: 0 auto; padding: 20px 20px 40px; }
.flash { margin: 0 0 16px; padding: 12px 16px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Cards ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 16px; box-shadow: var(--shadow); }
.card h2 { font-size: 20px; margin: 0; }
.eyebrow { font-size: 15px; font-weight: 600; color: var(--label-2); letter-spacing: -0.01em; margin: 0; }
.empty { color: var(--label-2); font-size: 15px; margin: 10px 0 2px; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 13px; font-weight: 600; letter-spacing: -0.01em; background: var(--fill); color: var(--label-2); }
.pill-green { background: color-mix(in srgb, var(--green-bright) 16%, transparent); color: var(--green); }
.pill-orange { background: color-mix(in srgb, #FF9500 18%, transparent); color: var(--orange); }
.pill-gold { background: color-mix(in srgb, var(--gold-bright) 18%, transparent); color: var(--gold); }

/* ---------- Live page ---------- */
.live { display: grid; gap: 0 20px; }
@media (min-width: 960px) {
  .live { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
  .live-side { position: sticky; top: 72px; }
}

.price-head, .round-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.updated { font-size: 13px; color: var(--label-2); }
.price { margin: 4px 0 0; font-size: clamp(44px, 12vw, 64px); line-height: 1.05; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; transition: color .6s; }
.price.up { color: var(--green); }
.price.down { color: var(--red); }
.change { margin: 4px 0 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--label-2); min-height: 1.4em; }
.change.up { color: var(--green); }
.change.down { color: var(--red); }
.spark { display: block; width: 100%; height: 64px; margin: 14px 0 6px; overflow: visible; }
#spark-line { fill: none; stroke: var(--gold-bright); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
#spark-fill { fill: color-mix(in srgb, var(--gold-bright) 14%, transparent); stroke: none; }
#spark-open { stroke: var(--label-3); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
#spark-dot { fill: var(--gold-bright); stroke: var(--card); stroke-width: 2; vector-effect: non-scaling-stroke; }
.price-card .fine { margin: 0; }

.progress { position: relative; height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; margin: 16px 0 6px; }
.progress-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--blue); border-radius: 4px; transition: width .25s linear; }
.progress[data-phase="waiting"] .progress-fill { background: #FF9500; }
.progress-split { position: absolute; top: 0; bottom: 0; left: var(--entry-share, 50%); width: 2px; margin-left: -1px; background: var(--card); }
.progress-legend { display: grid; grid-template-columns: var(--entry-share, 50%) 1fr auto; font-size: 12px; color: var(--label-2); }

.clock-row { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 14px; }
.clock-label { margin: 0; font-size: 13px; color: var(--label-2); }
.clock { margin: 0; font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.players { text-align: right; }
.players-n { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.prize { margin: 12px 0 0; font-size: 15px; color: var(--label-2); }
.prize:empty { display: none; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.predict { margin-top: 18px; }
.predict label { display: block; font-size: 13px; color: var(--label-2); margin: 0 0 6px; }
.predict-row { display: flex; gap: 10px; align-items: stretch; }
.predict-row .dollar { position: absolute; }
.predict-row { position: relative; }
.predict-row .dollar { left: 14px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 600; color: var(--label-3); pointer-events: none; }
.predict-row input {
  flex: 1; min-width: 0; height: 52px; padding: 0 12px 0 32px; border: 0; border-radius: 12px; background: var(--card-2); color: var(--label);
  font: inherit; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.predict-row input:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 40%, transparent); }
.predict-row .btn { height: 52px; padding: 0 22px; }
.form-msg { min-height: 1.3em; margin: 8px 0 0; font-size: 15px; }
.form-msg[data-ok="1"] { color: var(--green); }
.form-msg[data-ok="0"] { color: var(--red); }

.my-entries { list-style: none; margin: 14px 0 0; padding: 0; }
.my-entries li { display: flex; align-items: baseline; gap: 10px; padding: 12px 0; border-top: .5px solid var(--sep); font-size: 15px; }
.my-entries strong { font-size: 20px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.my-entries .tag { margin-left: auto; color: var(--green); font-size: 13px; font-weight: 600; }
.note-line { margin: 10px 0 0; font-size: 13px; color: var(--label-2); }
.note-line:empty { display: none; }

/* Live ranking */
.my-position { margin: 12px 0 4px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--blue) 10%, transparent); font-size: 15px; }
.my-position strong { font-size: 20px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ranking { list-style: none; margin: 8px 0 0; padding: 0; position: relative; }
.ranking li {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; column-gap: 10px;
  padding: 10px 0; border-bottom: .5px solid var(--sep); background: var(--card); will-change: transform;
}
.ranking li:last-child { border-bottom: 0; }
.ranking .place { font-size: 15px; font-weight: 700; color: var(--label-2); text-align: center; font-variant-numeric: tabular-nums; }
.ranking li:nth-child(1) .place { color: var(--gold); }
.ranking .who { min-width: 0; }
.ranking .name { display: block; font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking .guess { display: block; font-size: 13px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.ranking .off { text-align: right; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ranking .off small { display: block; font-weight: 400; }
.ranking li.is-me { background: color-mix(in srgb, var(--blue) 9%, var(--card)); border-radius: 10px; }
.ranking .move { font-size: 11px; font-weight: 700; margin-left: 4px; }
.ranking .move.up { color: var(--green); }
.ranking .move.down { color: var(--red); }
.ranking li.enter { animation: rank-in .5s ease-out both; }
@keyframes rank-in { from { opacity: 0; transform: translateY(8px); } }

/* Chat */
.chat-card { display: flex; flex-direction: column; }
.chat-list { list-style: none; margin: 10px -20px 0; padding: 4px 20px; height: 320px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; }
.chat-list li { max-width: 92%; }
.chat-list .bubble { display: inline-block; padding: 7px 12px; border-radius: 18px; background: var(--card-2); font-size: 15px; line-height: 1.35; word-wrap: break-word; overflow-wrap: anywhere; }
.chat-list .meta { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--label-2); margin: 0 0 2px 12px; }
.chat-list .meta button { border: 0; background: none; color: var(--label-3); font: inherit; font-size: 12px; padding: 0; cursor: pointer; }
.chat-list .meta button:hover { color: var(--red); }
.chat-list li.mine { align-self: flex-end; text-align: right; }
.chat-list li.mine .bubble { background: var(--blue); color: #fff; }
.chat-list li.mine .meta { justify-content: flex-end; margin: 0 12px 2px 0; }
.chat-list .empty { align-self: center; margin: auto 0; }
.chat-form { display: flex; gap: 8px; margin-top: 12px; }
.chat-form input { flex: 1; min-width: 0; height: 38px; padding: 0 14px; border-radius: 19px; border: .5px solid var(--sep); background: var(--card-2); color: var(--label); font: inherit; font-size: 15px; }
.chat-form input:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 35%, transparent); }
.chat-note { font-size: 13px; color: var(--label-2); margin: 10px 0 0; }
.chat-note:empty { display: none; }

.last-card h2 { margin-bottom: 8px; }
.last-grid, .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
.last-grid dt, .facts dt { font-size: 13px; color: var(--label-2); }
.last-grid dd, .facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.last-card p { font-size: 15px; margin: 12px 0 0; }

.how summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.how summary::-webkit-details-marker { display: none; }
.how summary::after { content: '+'; color: var(--label-3); font-weight: 400; font-size: 22px; line-height: 1; }
.how[open] summary::after { content: '−'; }
.how p { font-size: 15px; color: var(--label-2); margin: 10px 0 0; }

/* Ads */
.ad { display: block; margin: 0 0 16px; padding: 10px 12px 12px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); min-height: 60px; color: var(--label); }
.ad-label { display: block; font-size: 11px; color: var(--label-3); margin-bottom: 6px; }
.adsbygoogle { display: block; }
.ad.house:hover { text-decoration: none; }
.house-text { font-size: 15px; font-weight: 600; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 20px;
  border: 0; border-radius: 12px; font: inherit; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; cursor: pointer;
  background: var(--fill); color: var(--blue); text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, opacity .2s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-fill { background: var(--blue); color: #fff; }
.btn-plain { background: transparent; }
.btn-small { height: 38px; padding: 0 16px; font-size: 15px; border-radius: 19px; }
.btn-quiet { background: var(--fill); color: var(--blue); }
.btn-danger { background: var(--fill); color: var(--red-bright); }

.form { display: grid; gap: 14px; margin-top: 16px; }
.form label { display: grid; gap: 6px; font-size: 13px; color: var(--label-2); }
.form label small { font-size: 12px; }
.form input:not([type="checkbox"]), .form select {
  height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--card-2); color: var(--label); font: inherit; font-size: 17px;
}
.form input:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 40%, transparent); }
.form .check { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--label); }
.form .check input { width: 20px; height: 20px; accent-color: var(--blue); }
.form .btn { justify-self: start; }
.errors { color: var(--red); background: color-mix(in srgb, var(--red-bright) 10%, transparent); border-radius: 12px; padding: 10px 14px; font-size: 15px; }
.errors p { margin: 2px 0; }
.note { background: color-mix(in srgb, var(--blue) 10%, transparent); border-radius: 12px; padding: 10px 14px; font-size: 15px; }

/* ---------- Generic content pages ---------- */
.panel { background: var(--card); border-radius: var(--radius); padding: 20px; margin: 0 0 16px; box-shadow: var(--shadow); }
.panel h1 { margin-bottom: 8px; }
.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.lede { color: var(--label-2); margin: 0 0 8px; }
.aside { margin: 18px 0 0; color: var(--label-2); font-size: 15px; }
.crumbs { margin: 0 0 6px; font-size: 15px; }

.table-wrap { overflow-x: auto; margin: 8px -20px 0; padding: 0 20px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-weight: 400; color: var(--label-2); font-size: 13px; padding: 8px 10px 8px 0; border-bottom: .5px solid var(--sep); white-space: nowrap; }
.tbl td { padding: 11px 10px 11px 0; border-bottom: .5px solid var(--sep); font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; }
.tbl tr.is-me td { background: color-mix(in srgb, var(--blue) 9%, transparent); }
.pager { display: flex; gap: 20px; margin: 14px 0 0; }

.wins { padding: 0; list-style: none; counter-reset: w; margin: 0; }
.wins li { display: flex; gap: 12px; padding: 11px 0; border-bottom: .5px solid var(--sep); counter-increment: w; }
.wins li:last-child { border-bottom: 0; }
.wins li::before { content: counter(w); color: var(--label-2); width: 20px; font-variant-numeric: tabular-nums; }
.wins strong { margin-left: auto; }

.hash { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; padding: 12px 14px; background: var(--card-2); border-radius: 10px; letter-spacing: 0; }
.canon { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; max-height: 260px; overflow: auto; padding: 12px 14px; background: var(--card-2); border-radius: 10px; white-space: pre; letter-spacing: 0; }
.verify-out[data-ok="1"] { color: var(--green); font-weight: 600; }
.verify-out[data-ok="0"] { color: var(--red); font-weight: 600; }

.invite { display: flex; gap: 8px; margin: 14px 0; }
.invite input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--card-2); color: var(--label); font: inherit; font-size: 15px; }
.refs { list-style: none; padding: 0; margin: 0; }
.refs li { display: flex; gap: 12px; justify-content: space-between; padding: 11px 0; border-bottom: .5px solid var(--sep); font-size: 15px; }
.refs li:last-child { border-bottom: 0; }
.refs em { font-style: normal; color: var(--label-2); text-align: right; }

.prose { max-width: 700px; }
.prose h2 { font-size: 20px; margin: 24px 0 6px; }
.prose p, .prose li { color: var(--label); }
.draft-note { background: color-mix(in srgb, #FF9500 15%, transparent); border-radius: 12px; padding: 10px 14px; font-size: 15px; }

.features { list-style: none; padding: 0; margin: 12px 0; }
.features li { padding: 12px 0; border-bottom: .5px solid var(--sep); }
.features li:last-child { border-bottom: 0; }
.features strong { display: block; }
.features span { color: var(--label-2); font-size: 15px; }

/* Admin */
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding: 10px 0 10px 12px; border-left: 3px solid var(--sep); margin-bottom: 6px; font-size: 15px; }
.checks li strong { display: inline-block; min-width: 4.8rem; }
.checks .check-ok { border-left-color: var(--green-bright); }
.checks .check-fail { border-left-color: var(--red-bright); }
pre.check-fail { box-shadow: inset 3px 0 0 var(--red-bright); }
pre.check-ok { box-shadow: inset 3px 0 0 var(--green-bright); }
.prose h3 { font-size: 17px; margin: 20px 0 6px; }
.prose pre.canon { white-space: pre-wrap; word-break: break-all; }
.admin-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.foot { max-width: 1080px; margin: 0 auto; padding: 8px 20px 40px; color: var(--label-2); font-size: 12px; letter-spacing: -0.005em; }
.foot p { margin: 4px 0; }
.foot a { margin-right: 14px; }

@media (max-width: 720px) {
  .main { padding: 12px 16px 24px; }
  .card, .panel { padding: 16px; }
  .chat-list { margin: 10px -16px 0; padding: 4px 16px; height: 300px; }
  .table-wrap { margin: 8px -16px 0; padding: 0 16px; }
  .predict-row .btn { padding: 0 16px; }
  h1 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Version 4: sponsored competitions, breaks ---------- */
.pills { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sponsor-band {
  margin: 14px 0 2px; padding: 14px 16px; border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold-bright) 22%, var(--card)), color-mix(in srgb, var(--gold-bright) 8%, var(--card)));
}
.sponsor-band p { margin: 0; }
.band-prize { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.band-from { font-size: 15px; color: var(--label-2); margin-top: 2px !important; }
.band-msg { font-size: 15px; margin-top: 6px !important; }
.practice-note { margin: 12px 0 0; font-size: 13px; color: var(--label-2); }

.next-sp { border: 1px solid color-mix(in srgb, var(--gold-bright) 45%, transparent); }
.next-sp h2 { font-size: 17px; color: var(--gold); }
.next-sp-prize { margin: 8px 0 0; font-size: 24px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.next-sp-from { margin: 2px 0 0; font-size: 15px; color: var(--label-2); }
.next-sp-when { margin: 10px 0 0; font-size: 15px; font-weight: 600; }
.next-sp .cta { margin-top: 12px; }

.rank-card.is-final h2 { color: var(--gold); }
.ranking li.is-winner { background: color-mix(in srgb, var(--gold-bright) 14%, var(--card)); border-radius: 10px; }
.ranking li.is-winner .place { color: var(--gold); font-size: 18px; }
.win-tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 9px; font-size: 11px; font-weight: 700; line-height: 18px;
  background: var(--gold-bright); color: #fff; letter-spacing: 0; }

.comp-list { list-style: none; margin: 8px 0 0; padding: 0; }
.comp { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: .5px solid var(--sep); }
.comp:last-child { border-bottom: 0; }
.comp-when { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 6px; border-radius: 12px;
  background: color-mix(in srgb, var(--gold-bright) 14%, var(--card)); text-align: center; align-self: start; }
.comp.is-live .comp-when { background: color-mix(in srgb, var(--green-bright) 16%, var(--card)); }
.comp-day { font-size: 12px; font-weight: 600; color: var(--label-2); line-height: 1.2; }
.comp-date { font-size: 15px; font-weight: 700; line-height: 1.25; }
.comp-time { font-size: 13px; font-weight: 600; color: var(--label-2); white-space: nowrap; }
.comp-body p { margin: 0; }
.comp-prize { font-size: 20px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }
.comp-sponsor { color: var(--label-2); font-size: 15px; }
.comp-msg { font-size: 15px; margin-top: 6px !important; }
.comp-body .fine { margin-top: 6px !important; }
.comp-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.comp-actions .btn-small { height: 32px; padding: 0 12px; font-size: 14px; }

.segmented { display: inline-flex; padding: 2px; margin: 4px 0 6px; border-radius: 9px; background: var(--fill); }
.segmented a { padding: 5px 14px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--label); }
.segmented a:hover { text-decoration: none; }
.segmented a[aria-current="page"] { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form select { appearance: none; -webkit-appearance: none; background-image: none; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.row-actions input { height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--card-2); color: var(--label); font: inherit; font-size: 13px; min-width: 140px; }

@media (max-width: 720px) {
  .tabbar a span { font-size: 9.5px; }
  .comp { grid-template-columns: 70px minmax(0, 1fr); gap: 12px; }
  .form-row { grid-template-columns: 1fr; }
}

.round-card.is-break .progress, .round-card.is-break .progress-legend, .round-card.is-break .players { display: none; }
.round-card.is-break .clock-row { margin-top: 4px; }
.ranking li { border-bottom-width: 1px; border-bottom-color: color-mix(in srgb, var(--sep) 70%, transparent); }

.sp-banner {
  display: grid; gap: 1px; margin: 0 0 16px; padding: 12px 16px; border-radius: var(--radius); color: var(--label);
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold-bright) 26%, var(--card)), color-mix(in srgb, var(--gold-bright) 10%, var(--card)));
}
.sp-banner:hover { text-decoration: none; }
.sp-banner-k { font-size: 12px; font-weight: 600; color: var(--gold); }
.sp-banner strong { font-size: 17px; letter-spacing: -0.02em; }
.sp-banner span:last-child { font-size: 13px; color: var(--label-2); }
@media (min-width: 960px) { .sp-banner { display: none !important; } }
@media (max-width: 959px) { .next-sp { display: none !important; } }
.past-list li { align-items: center; }
.past-list em .pill { margin-top: 4px; }

/* ---------- Version 5: onboarding ---------- */
.welcome { background: linear-gradient(160deg, color-mix(in srgb, var(--gold-bright) 16%, var(--card)) 0%, var(--card) 70%); }
.welcome-title { font-size: 26px !important; line-height: 1.15; letter-spacing: -0.035em; margin: 0 0 6px !important; }
.welcome-lede { margin: 0 0 14px; color: var(--label-2); font-size: 16px; }
.mini-steps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini-steps li { display: grid; gap: 1px; padding: 10px 12px; border-radius: 12px; background: var(--card-2); }
.mini-steps .ms-n { width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--gold-bright); color: #fff; margin-bottom: 4px; }
.mini-steps strong { font-size: 15px; letter-spacing: -0.02em; }
.mini-steps span:last-child { font-size: 12px; color: var(--label-2); }
.mini-steps.compact { margin: 14px 0 4px; }
.welcome-example { margin: 4px 0 2px; }
.welcome-example summary { cursor: pointer; color: var(--blue); font-size: 15px; font-weight: 600; list-style: none; }
.welcome-example summary::-webkit-details-marker { display: none; }
.welcome-example[open] summary { margin-bottom: 6px; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--blue); cursor: pointer; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }

/* Worked example on a number line */
.example { margin: 8px 0 0; }
.ex-line { position: relative; height: 96px; margin: 0 34px 6px; }
.ex-line::before { content: ''; position: absolute; left: -34px; right: -34px; top: 40px; height: 2px; background: var(--sep); border-radius: 1px; }
.ex-dot, .ex-result { position: absolute; left: var(--x, 50%); }
.ex-dot { top: 33px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--label-3); box-shadow: 0 0 0 3px var(--card); }
.ex-dot.win { background: var(--gold-bright); }
.ex-label { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); font-size: 12px; line-height: 1.25; text-align: center; white-space: nowrap; color: var(--label-2); font-variant-numeric: tabular-nums; }
.ex-dot.win .ex-label { color: var(--label); font-weight: 700; }
.ex-result { top: 0; height: 50px; width: 2px; margin-left: -1px; background: var(--green-bright); }
.ex-result > span { position: absolute; top: -2px; right: 8px; font-size: 12px; line-height: 1.2; color: var(--green); white-space: nowrap; text-align: right; }
.ex-result > span strong { color: var(--green); }
.example figcaption { display: grid; gap: 4px; margin-top: 4px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--sep) 70%, transparent); }
.ex-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.ex-row.win { color: var(--label); font-weight: 700; }

/* Round timeline */
.timeline { margin: 6px 0 0; }
.tl-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; }
.tl-seg { display: block; height: 100%; }
.tl-predict { background: var(--blue); }
.tl-watch { background: #FF9500; }
.tl-break { background: var(--label-3); }
.tl-labels { display: flex; gap: 2px; margin-top: 8px; font-size: 13px; color: var(--label-2); line-height: 1.3; }
.tl-labels strong { color: var(--label); font-size: 14px; }
.timeline figcaption { margin-top: 10px; }

/* How it works page */
.how-hero h1 { font-size: clamp(30px, 6vw, 40px); }
.steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.step-n { width: 32px; height: 32px; border-radius: 16px; display: grid; place-items: center; background: var(--gold-bright); color: #fff; font-weight: 700; }
.steps strong { font-size: 17px; }
.steps p { margin: 2px 0 0; color: var(--label-2); font-size: 15px; }
.faq details { border-bottom: 1px solid color-mix(in srgb, var(--sep) 70%, transparent); padding: 12px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--label-3); font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq p { margin: 8px 0 0; color: var(--label-2); font-size: 15px; }

/* Prediction input */
.predict-row input::placeholder { color: var(--label-3); font-weight: 500; }
.nudges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { height: 32px; padding: 0 11px; border: 0; border-radius: 16px; background: var(--fill); color: var(--label); font: inherit; font-size: 14px;
  font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; transition: transform .1s; }
.chip:active { transform: scale(.95); }
.chip-live { background: color-mix(in srgb, var(--gold-bright) 22%, var(--card)); color: var(--gold); }
.pred-hint { margin: 10px 0 0; font-size: 14px; line-height: 1.4; color: var(--label-2); min-height: 1.4em; font-variant-numeric: tabular-nums; }
.pred-hint strong { color: var(--label); }
.pred-hint[data-level="warn"] { color: var(--orange); }
.pred-hint[data-level="strong"], .pred-hint[data-level="block"] { color: var(--red); font-weight: 600; }
.pred-hint[data-level="strong"]::before, .pred-hint[data-level="block"]::before, .pred-hint[data-level="warn"]::before { content: '⚠︎ '; }

/* Guided tour */
.tour-shield { position: fixed; inset: 0; z-index: 90; }
.tour-spot { position: fixed; z-index: 91; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); pointer-events: none;
  transition: top .3s ease, left .3s ease, width .3s ease, height .3s ease; }
.tour-tip { position: fixed; z-index: 92; padding: 16px 18px 14px; border-radius: 16px; background: var(--card); color: var(--label);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .3); }
.tour-tip h3 { margin: 0 0 4px; font-size: 18px; }
.tour-tip p { margin: 0; font-size: 15px; color: var(--label-2); }
.tour-tip .tour-count { font-size: 12px; font-weight: 600; color: var(--gold); margin-bottom: 4px; }
.tour-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 14px; }
.tour-actions [data-tour="skip"] { margin-right: auto; padding-left: 0; }

/* Premium plans and payment result */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 10px 0 12px; }
.plan { display: grid; gap: 4px; padding: 16px; border-radius: 14px; background: var(--card-2); }
.plan p { margin: 0; }
.plan-name { font-weight: 600; }
.plan-price { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; }
.plan .btn, .plan form { margin-top: 8px; }
.plan form .btn { width: 100%; }
.pay-result { text-align: center; }
.pay-result .cta, .pay-result p { justify-content: center; }
.pay-icon { width: 64px; height: 64px; margin: 6px auto 12px; border-radius: 32px; display: grid; place-items: center; font-size: 32px; font-weight: 700; }
.pay-icon.ok { background: color-mix(in srgb, var(--green-bright) 18%, transparent); color: var(--green); }

@media (max-width: 720px) {
  .welcome-title { font-size: 23px !important; }
  .mini-steps { gap: 6px; }
  .mini-steps li { padding: 9px 10px; }
  .chip { padding: 0 9px; font-size: 13px; }
}
.live { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .live { grid-template-columns: minmax(0, 1fr) 360px; } }

/* ---------- Version 6: get-ready banner ---------- */
.hype { position: sticky; top: calc(52px + env(safe-area-inset-top)); z-index: 19; padding: 8px 20px 0; }
@media (max-width: 720px) { .hype { top: calc(46px + env(safe-area-inset-top)); padding: 8px 12px 0; } }
.hype-inner {
  max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 16px; color: #fff;
  background: linear-gradient(110deg, #5E3D00, #9A6E00 30%, #C4921C 50%, #9A6E00 70%, #5E3D00); background-size: 250% 100%;
  box-shadow: 0 8px 24px rgba(184, 134, 11, .35); animation: hype-shine 6s linear infinite;
}
.hype-text { display: grid; min-width: 0; flex: 1; }
.hype-k { font-size: 12px; font-weight: 700; letter-spacing: .02em; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.hype-prize { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.hype-prize small { font-weight: 600; color: #fff; opacity: 1; }
.hype-clock { display: grid; justify-items: end; }
.hype-label { font-size: 11px; font-weight: 600; opacity: .9; }
.hype-time { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.hype-btn { flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 18px; display: inline-flex; align-items: center;
  background: #fff; color: #7A4F00; font-size: 15px; font-weight: 700; }
.hype-btn:hover { text-decoration: none; }
.hype-urgent .hype-inner { background: linear-gradient(110deg, #8E1A13, #D92D20 35%, #E8590C 50%, #D92D20 65%, #8E1A13); background-size: 250% 100%;
  box-shadow: 0 8px 28px rgba(255, 59, 48, .45); animation: hype-shine 2.5s linear infinite, hype-pulse 1s ease-in-out infinite; }
.hype-urgent .hype-btn { color: #B3261E; }
.hype-live .hype-inner { background: linear-gradient(110deg, #0A5C26, #1E8E3E 40%, #2DA44E 50%, #1E8E3E 60%, #0A5C26); background-size: 250% 100%;
  box-shadow: 0 8px 28px rgba(52, 199, 89, .4); animation: hype-shine 3s linear infinite; }
.hype-live .hype-btn { color: #0B6E2E; }
.hype-live .hype-k::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 4px; background: #fff; animation: hype-blink 1.2s ease-in-out infinite; }
@keyframes hype-shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@keyframes hype-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.015); } }
@keyframes hype-blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (max-width: 520px) {
  .hype-inner { flex-wrap: wrap; gap: 6px 10px; padding: 9px 12px; }
  .hype-text { flex-basis: calc(100% - 110px); }
  .hype-btn { flex-basis: 100%; justify-content: center; height: 34px; }
  .hype-time { font-size: 26px; }
}
.tab-live { position: relative; }
.tabbar a.tab-live::after, .topnav a.tab-live::after { content: ''; position: absolute; top: 4px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 4px; background: var(--red-bright); box-shadow: 0 0 0 2px var(--bar); }
.topnav a.tab-live::after { top: -2px; left: auto; right: -9px; }

/* ---------- Break adverts ---------- */
.break-ad { overflow: hidden; position: relative; }
.ad-from { margin: 0 0 10px; font-size: 12px; font-weight: 600; color: var(--label-3); }
.ad-media { display: block; margin: 0 -20px 12px; background: var(--card-2); }
.ad-media img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: cover; }
.ad-video { position: relative; aspect-ratio: 16 / 9; }
.ad-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ad-headline { margin: 0 0 4px; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; }
.ad-body { margin: 0 0 12px; color: var(--label-2); font-size: 15px; }
.ad-text .ad-headline { font-size: 28px; }
.ad-text { background: linear-gradient(150deg, color-mix(in srgb, var(--blue) 12%, var(--card)), var(--card) 65%); }
.ad-cta { margin-top: 4px; }
@media (max-width: 720px) { .ad-media { margin: 0 -16px 12px; } }

.is-house { background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--gold-bright) 40%, var(--card)) 0%, var(--card) 55%); }
.house-glow { position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, color-mix(in srgb, var(--gold-bright) 45%, transparent), transparent 60%);
  animation: house-spin 14s linear infinite; pointer-events: none; }
@keyframes house-spin { to { transform: rotate(360deg); } }
.is-house .ad-from { color: var(--gold); }
.house-title { position: relative; margin: 0 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.12; max-width: 22ch; }
.house-body { position: relative; margin: 0 0 14px; color: var(--label-2); font-size: 15px; max-width: 46ch; }
.house-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.house-price { font-size: 15px; color: var(--label-2); }
.house-price strong { color: var(--label); font-size: 20px; letter-spacing: -0.02em; }

/* ---------- Sign-up checks ---------- */
.needs-box { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, var(--gold-bright) 14%, var(--card)); }
.needs-box p { margin: 0 0 8px; font-size: 15px; }
.checklist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.checklist li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.checklist .ck { width: 28px; height: 28px; border-radius: 14px; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--fill); color: var(--label-2); }
.checklist li.done .ck { background: var(--green-bright); color: #fff; }
.checklist form { margin-top: 6px; }
.phone-form { display: flex; gap: 8px; }
.phone-form input { flex: 1; min-width: 0; max-width: 220px; height: 38px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--card-2); color: var(--label); font: inherit; font-size: 16px; }

/* ---------- Sponsor form ---------- */
.audience-now { margin: 0 0 10px; font-size: 15px; color: var(--label-2); }
.audience-now strong { color: var(--green); font-size: 17px; }
.ad-fields { border: 0; padding: 14px; margin: 0; border-radius: 12px; background: var(--card-2); display: grid; gap: 12px; }
.ad-fields legend { float: left; width: 100%; padding: 0; font-weight: 600; font-size: 15px; display: grid; gap: 2px; }
.ad-fields legend small { font-weight: 400; }
.ad-fields input:not([type="radio"]) { background: var(--card) !important; }
.ad-type { display: flex; flex-wrap: wrap; margin: 0; }
.ad-type label { display: inline-flex !important; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 7px; font-size: 13px; color: var(--label) !important; cursor: pointer; }
.ad-type input { margin: 0; accent-color: var(--blue); }
.ad-part[hidden] { display: none !important; }
.ad-part { display: grid; gap: 12px; }
.quote { padding: 14px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--sep) 80%, transparent); }
.quote p { margin: 0; }
.quote-line { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; padding: 3px 0; font-variant-numeric: tabular-nums; }
.quote-line.total { margin-top: 6px; padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--sep) 70%, transparent); font-size: 17px; }
.quote .fine { margin: 2px 0 4px; }
@media (prefers-reduced-motion: reduce) { .hype-inner, .house-glow, .hype-live .hype-k::before { animation: none !important; } }
.ad-preview { display: grid; gap: 4px; margin-top: 8px; padding: 8px; border-radius: 8px; background: var(--card-2); max-width: 280px; }
.ad-preview img { width: 100%; border-radius: 6px; }
.ad-fields { min-width: 0; }
.ad-type { max-width: 100%; }
.form input, .form select { min-width: 0; width: 100%; }
.form .check input { width: 20px; height: 20px; flex-shrink: 0; }
.ad-type input { width: auto; }
.ad-fields .ad-type { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 2px; }
.ad-fields .ad-type label { display: flex !important; justify-content: center; gap: 5px; padding: 7px 4px; margin: 0; border-radius: 7px; font-size: 13px; font-weight: 600; }
.ad-fields .ad-type label:has(input:checked) { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
