:root {
  --bg: #0b0d12; --panel: #151922; --line: #252b38; --text: #f2f4f8; --dim: #8b96a8;
  --accent: #ff7a1a; --accent-ink: #1b0d00; --ok: #2fd27a; --warn: #ffb020;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
body { min-height: 100vh; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 14px 0 8px; gap: 12px; }
.brand { display: flex; gap: 10px; align-items: center; min-width: 0; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: #ff3355; box-shadow: 0 0 0 4px rgba(255, 51, 85, .2); flex: none; animation: pulse 1.6s ease-in-out infinite; }
.brand .name { font-size: 18px; letter-spacing: .02em; }
.brand .name b { color: var(--accent); }
.brand .event { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account { font-size: 13px; color: var(--dim); text-align: right; flex: none; }
.account button { font-size: 13px; }
.status { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 6px 0 12px; }
.status.live { border-color: #ff3355; }
.status.open { border-color: var(--ok); }
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.tabs button { background: var(--panel); color: var(--dim); border: 1px solid var(--line); border-radius: 10px; padding: 10px 0; font-size: 15px; font-weight: 600; }
.tabs button.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.tab { display: none; }
.tab.on { display: block; }
h1 { font-size: 22px; margin: 4px 0 6px; }
h2 { font-size: 18px; margin: 0 0 6px; }
.sub { color: var(--dim); font-size: 14px; line-height: 1.45; margin: 0 0 14px; }
.note { color: var(--dim); font-size: 13px; min-height: 1.4em; }
.note.ok { color: var(--ok); }
.note.bad { color: var(--warn); }
.pilots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pilot { background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 14px 12px; text-align: left; color: var(--text); position: relative; overflow: hidden; min-height: 76px; }
.pilot .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; }
.pilot .cs { font-size: 17px; font-weight: 700; padding-left: 6px; overflow-wrap: anywhere; }
.pilot .chance { font-size: 13px; color: var(--dim); padding-left: 6px; margin-top: 4px; }
.pilot.picked { border-color: var(--accent); background: #22180f; }
.pilot.picked::after { content: "Your pick"; position: absolute; right: 8px; top: 8px; font-size: 11px; font-weight: 800; color: var(--accent); }
.pilot:disabled { opacity: .55; }
.pilots.small .pilot { min-height: 54px; padding: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chips button { background: var(--panel); color: var(--text); border: 2px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 15px; }
.chips button.on { border-color: var(--accent); color: var(--accent); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.label { font-weight: 700; margin: 0 0 8px; }
.label.small { font-size: 14px; color: var(--dim); font-weight: 600; margin-top: 12px; }
input { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; font-size: 16px; margin-bottom: 14px; }
button { font: inherit; cursor: pointer; }
.primary { width: 100%; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 14px; font-size: 16px; font-weight: 800; }
.primary:disabled { opacity: .5; }
.ghost { background: transparent; color: var(--dim); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.signin { background: #fff; color: #1f1f1f; border: 0; border-radius: 8px; padding: 8px 12px; font-weight: 700; }
.board { list-style: none; padding: 0; margin: 0 0 16px; counter-reset: rank; }
.board li { display: flex; justify-content: space-between; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; counter-increment: rank; }
.board li::before { content: counter(rank) "."; color: var(--accent); font-weight: 800; width: 2em; flex: none; }
.board li span:first-of-type { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.board .pts { color: var(--dim); }
.shout { border-left: 4px solid var(--accent); background: var(--panel); padding: 10px 12px; border-radius: 8px; margin-bottom: 8px; font-size: 14px; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 14px; width: min(92vw, 420px); }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog menu { display: flex; gap: 8px; padding: 0; margin: 0; }
dialog menu .primary { width: auto; flex: 1; }
footer { color: var(--dim); font-size: 12px; line-height: 1.5; margin-top: 28px; }
footer a { color: var(--dim); }
.dim { color: var(--dim); }
@keyframes pulse { 50% { opacity: .5; } }
