/* RideMark fan app: white, light gray, black and blue. Built for phones first. */
:root {
  --bg: #f2f4f7;
  --bar: #ffffff;
  --card: #ffffff;
  --card2: #eaeef3;
  --line: #dde2e9;
  --line2: #b9c2ce;
  --text: #0b0f14;
  --muted: #56606d;
  --accent: #1463d6;
  --accent-ink: #ffffff;
  --gold: #a86b12;
  --good: #1d7a36;
  --bad: #c0352b;
  --shadow: 0 1px 2px rgba(11, 15, 20, .06), 0 2px 8px rgba(11, 15, 20, .05);
  --radius: 16px;
  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wordmark { font-family: var(--display); font-weight: 700; letter-spacing: 1px; }
.wordmark span { color: var(--accent); }
.display { font-family: var(--display); font-weight: 700; letter-spacing: .5px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.label { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--accent); text-transform: uppercase; }
.row { display: flex; gap: 10px; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card.hot { border: 2px solid var(--accent); }
.inset { background: var(--card2); border-radius: 12px; padding: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .8px; padding: 5px 9px; border-radius: 999px; background: var(--card2); color: var(--muted); border: 1px solid var(--line); text-transform: uppercase; }
.pill.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pill.warn { background: #fdecea; color: var(--bad); border-color: #f3c3be; }
.pill.good { background: #e6f4ea; color: var(--good); border-color: #b9dfc4; }

.btn { min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card2); color: var(--text); font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border: none; font-weight: 700; }
.btn.big { min-height: 56px; font-size: 17px; border-radius: 14px; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 12px; border-radius: 8px; color: var(--muted); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; }
.input, textarea.input, select.input { min-height: 48px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bar); color: var(--text); padding: 0 14px; font-size: 16px; width: 100%; }
textarea.input { padding: 12px 14px; min-height: 80px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin: 0; }

.error { color: var(--bad); font-size: 14px; }
.toast { position: fixed; left: 12px; right: 12px; top: 12px; z-index: 50; background: var(--accent); color: var(--accent-ink); border-radius: 14px; padding: 14px 16px; font-weight: 700; box-shadow: 0 10px 30px rgba(11,15,20,.25); display: flex; justify-content: space-between; gap: 10px; align-items: center; max-width: 560px; margin: 0 auto; }
.toast button { background: transparent; border: none; color: inherit; font-weight: 700; min-height: 44px; min-width: 44px; }

/* ---------- fan app ---------- */
.app { max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 10; background: #0b0f14; color: #ffffff; border-bottom: 1px solid #0b0f14; padding: 12px 16px 10px; }
.topbar .wordmark { font-size: 26px; }
.topbar .title { font-weight: 700; font-size: 15px; }
.topbar .muted { color: #b8c2cf; }
.topbar .wordmark span { color: #5aa2ff; }
.sponsor { background: var(--card2); border-bottom: 1px solid var(--line); padding: 8px 16px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; }
.sponsor b { color: var(--text); letter-spacing: .4px; }
.banner { display: block; background: #ffffff; border-bottom: 1px solid var(--line); }
.banner img { display: block; width: 100%; max-height: 110px; object-fit: contain; margin: 0 auto; }
.statusbar { background: var(--accent); color: var(--accent-ink); font-weight: 700; text-align: center; padding: 8px 16px; font-size: 14px; }
main.tab { flex: 1; padding: 14px 16px 110px; display: flex; flex-direction: column; gap: 16px; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; background: var(--bar); border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(11,15,20,.05); padding: 6px 6px calc(8px + env(safe-area-inset-bottom)); }
.tabbar nav { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tabbar button { min-height: 54px; background: transparent; border: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 600; }
.tabbar button[aria-current="page"] { color: var(--accent); font-weight: 700; }
.tabbar svg { width: 22px; height: 22px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }

.rider { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1; }
.stat .v { font-family: var(--display); font-size: 24px; font-weight: 700; }
.stat .k { font-size: 11px; color: var(--muted); }

.list { display: flex; flex-direction: column; gap: 8px; }
.entry { display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid transparent; width: 100%; text-align: left; color: var(--text); }
.entry.now { border-color: var(--accent); background: var(--card2); }
.entry .ord { font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--muted); width: 24px; text-align: center; flex: none; }
.entry.now .ord { color: var(--accent); }
.entry .who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.entry .who b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry .who span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry .res { font-family: var(--display); font-size: 22px; font-weight: 700; min-width: 48px; text-align: right; }
.entry .res.ns { color: var(--muted); font-size: 15px; }
.star { width: 44px; height: 44px; border-radius: 10px; border: none; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; flex: none; }
.star[aria-pressed="true"] { color: var(--accent); }
.star svg { width: 22px; height: 22px; }

.lb { display: flex; flex-direction: column; gap: 6px; }
.lb .r { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; background: var(--card); }
.lb .r.me { background: var(--card2); border: 1px solid var(--line2); }
.lb .r .n { font-weight: 700; color: var(--accent); width: 22px; }
.lb .r .who { flex: 1; font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb .r .who span { color: var(--muted); font-weight: 500; }
.lb .r .p { font-weight: 700; font-size: 14px; }

.stepper { display: flex; align-items: center; justify-content: space-between; }
.stepper button { width: 68px; height: 68px; border-radius: 16px; border: 1px solid var(--line2); background: var(--card); color: var(--text); font-size: 32px; font-weight: 700; }
.stepper button.plus { background: var(--accent); color: var(--accent-ink); border: none; }
.stepper .val { font-family: var(--display); font-weight: 700; font-size: 64px; line-height: 1; min-width: 100px; text-align: center; }
.score-input { width: 150px; min-width: 0; border: 2px solid var(--line2); border-radius: 14px; background: var(--bar); color: var(--text); padding: 6px 4px; }
.score-input:focus { border-color: var(--accent); outline: none; }
.how summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; min-height: 28px; font-weight: 700; font-size: 15px; color: var(--accent); }
.how summary::-webkit-details-marker { display: none; }
.how .chev { transition: transform .2s; font-size: 18px; }
.how[open] .chev { transform: rotate(180deg); }
.how p { line-height: 1.5; }
.caps { text-transform: uppercase; letter-spacing: .5px; }
.last-ride { background: #e8f1fe; border-color: #c4d9fb; }
.last-ride .inset { background: #ffffff; }
.last-ride .inset.pts { background: var(--accent); color: var(--accent-ink); }
.last-ride .inset.pts .k { color: inherit; opacity: .9; }

.bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); }

.opt { min-height: 54px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card2); color: var(--text); font-weight: 700; font-size: 16px; }
.opt[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.opt.correct { border: 2px solid var(--good); }

.tier { min-height: 56px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); padding: 8px 14px; display: flex; justify-content: space-between; align-items: center; text-align: left; width: 100%; }
.tier[aria-pressed="true"] { border: 2px solid var(--accent); }
.tier b { font-size: 15px; display: block; }
.tier .price { font-family: var(--display); font-weight: 700; font-size: 24px; }

.preview { aspect-ratio: 16 / 9; border-radius: 12px; background: #05070a; color: #ffffff; border: 1px solid #05070a; padding: 14px; display: flex; align-items: center; gap: 14px; position: relative; overflow: hidden; }
.preview img { width: 38%; height: 88%; object-fit: cover; border-radius: 10px; border: 3px solid var(--accent); }
.preview .tag { position: absolute; top: 7px; left: 10px; font-size: 10px; font-weight: 700; letter-spacing: 1px; color: #a9b4c4; }
.preview .label { color: #5aa2ff; }
.preview .from { color: #ffffff; font-weight: 800; font-size: 13px; }

.sheet-back { position: fixed; inset: 0; background: rgba(11,15,20,.45); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bar); width: 100%; max-width: 560px; max-height: 88dvh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 18px 18px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--line); }
.links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.links a { min-height: 44px; border-radius: 10px; background: var(--card2); color: var(--text); font-weight: 600; font-size: 13px; text-decoration: none; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 6px; }
.links a.next { background: var(--accent); color: var(--accent-ink); }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Fantasy Rodeo */
.fx-bar { position: sticky; top: 78px; z-index: 5; }
.fx-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); color: var(--text); font: inherit; text-align: left; }
.fx-opt .n { width: 22px; font-weight: 700; color: var(--muted); }
.fx-opt .who { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-opt .p { font-weight: 700; font-variant-numeric: tabular-nums; }
.fx-opt[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.fx-opt[aria-pressed="true"] .n { color: inherit; }
.fx-opt:disabled { opacity: .4; }
