:root { --ink: #171814; --paper: #f4f4f1; --muted: #65675d; --line: #d7d8ce; --accent: #d7f25a; font-family: Helvetica, Arial, sans-serif; color: var(--ink); background: var(--paper); font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; }
body.bets { --accent: #bea9eb; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: wait; opacity: .55; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #656bce; outline-offset: 4px; }
[hidden] { display: none !important; }
a { color: inherit; }
.skip-link { position: fixed; top: -100px; left: 16px; padding: 16px; background: var(--ink); color: white; z-index: 10; }
.skip-link:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.shell { max-width: 960px; margin: auto; padding: max(28px, env(safe-area-inset-top)) 24px max(40px, env(safe-area-inset-bottom)); }
.topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 32px; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.text-button { background: none; border: 0; padding: 12px 0; text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
h1 { margin: 0 0 16px; font-size: clamp(48px, 10vw, 84px); line-height: .96; letter-spacing: -.065em; font-weight: 900; }
h2 { font-size: 24px; letter-spacing: -.04em; margin: 0; }
h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
p { line-height: 1.5; }
.intro { max-width: 510px; margin: 0; color: var(--muted); }
.hero { margin-bottom: 32px; }
.hero-row, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hero-row { align-items: flex-end; }
.primary, .secondary, .danger { min-height: 48px; border: 1px solid var(--ink); padding: 12px 18px; font-weight: 800; }
.primary { background: var(--ink); color: var(--paper); }
.secondary { background: transparent; }
.danger { color: #9c2b21; border-color: #b85c54; background: transparent; }
.hero .primary { background: var(--accent); color: var(--ink); border: 0; white-space: nowrap; }
.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 30px; gap: 26px; }
.tabs button { border: 0; border-bottom: 3px solid transparent; background: none; padding: 16px 0 14px; font-size: 15px; font-weight: 700; color: var(--muted); }
.tabs button[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.section { margin-bottom: 36px; }
.section-heading { margin-bottom: 14px; }
.section-heading .text-button { margin: -8px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.empty { padding: 26px 20px; border: 1px dashed #a6a99a; line-height: 1.5; margin: 0; color: var(--muted); }
.empty strong { display: block; margin-bottom: 3px; color: var(--ink); }
.board { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; text-align: right; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--ink); }
.board th:first-child { text-align: left; }
.board td { padding: 16px 12px; border-bottom: 1px solid var(--line); text-align: right; }
.board td:first-child { text-align: left; }
.board tbody tr:first-child { background: var(--accent); }
.rank { display: inline-block; width: 30px; font-size: 12px; color: var(--muted); }
.rating { font-size: 24px; font-weight: 800; letter-spacing: -.04em; }
.list { display: grid; gap: 10px; }
.record { border: 1px solid var(--line); padding: 18px; background: #fafaf7; min-width: 0; }
.record-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.record-top .text-button { padding: 4px 0; flex-shrink: 0; }
.record p { margin: 8px 0 0; }
.match-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin: 14px 0; }
.match-teams > :last-child { text-align: right; }
.match-teams strong { display: block; font-size: 16px; }
.score { font-size: 25px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta { font-size: 12px; display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); }
.positive { color: #466120; }
.negative { color: #9c2b21; }
.badge { display: inline-block; padding: 5px 8px; font-size: 11px; font-weight: 800; background: #e9e9e2; text-transform: uppercase; letter-spacing: .03em; }
.badge.done { background: var(--accent); }
.balance { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px; background: var(--accent); }
.balance strong { font-size: 26px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.balance p { margin: 0; font-size: 14px; }
.login { max-width: 460px; padding-top: max(70px, 12vh); }
.login h1 { font-size: clamp(55px, 14vw, 78px); }
.login form { margin-top: 32px; }
.login .primary { width: 100%; }
.login-note { font-size: 12px; color: var(--muted); margin-top: 16px; }
label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 700; min-width: 0; }
input, select { width: 100%; min-width: 0; min-height: 48px; padding: 11px 12px; background: #fff; border: 1px solid #93978a; border-radius: 0; font-size: 16px; }
input::placeholder { color: #929487; }
.fields { display: grid; gap: 18px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { font-weight: 400; color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0; }
fieldset { min-width: 0; border: 1px solid var(--line); padding: 16px; margin: 0; }
legend { font-size: 12px; font-weight: 800; padding: 0 6px; }
fieldset label + label { margin-top: 12px; }
dialog { width: min(520px, calc(100% - 28px)); border: 0; padding: 0; color: var(--ink); background: var(--paper); max-height: calc(100dvh - 32px); }
dialog::backdrop { background: rgb(23 24 20 / 55%); }
.editor-inner { padding: 24px; }
.editor-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 12px; }
.close { border: 0; background: none; width: 40px; height: 40px; font-size: 28px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.form-actions .primary { flex: 1; }
.form-actions .danger { width: 100%; margin-top: 10px; }
.error { font-size: 13px; line-height: 1.5; padding: 12px; background: #f6ddd7; color: #84291e; margin: 16px 0 0; }
.notice { position: fixed; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); max-width: min(560px, calc(100% - 32px)); width: max-content; padding: 14px 18px; background: var(--ink); color: var(--paper); font-size: 14px; line-height: 1.4; box-shadow: 0 4px 24px #0003; z-index: 5; }
.loading { min-height: 70vh; display: grid; place-items: center; color: var(--muted); }
.footer { border-top: 1px solid var(--line); padding-top: 20px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.person { display: flex; justify-content: space-between; align-items: center; }
.person .text-button { padding: 8px 0; }
@media (max-width: 600px) { .shell { padding-left: 18px; padding-right: 18px; } .topline { margin-bottom: 26px; } .hero-row { display: block; } .hero .primary { width: 100%; margin-top: 24px; } .tabs { gap: 20px; } .tabs button { font-size: 14px; } .board th, .board td { padding-left: 8px; padding-right: 8px; } .rank { width: 22px; } .board td:first-child { font-size: 14px; } .rating { font-size: 22px; } .match-teams { gap: 12px; } .match-teams strong { font-size: 14px; } .score { font-size: 22px; } .record { padding: 16px; } .editor-inner { padding: 20px; } .login { padding-top: 70px; } }
@media (prefers-reduced-motion: no-preference) { button { transition: background .12s, opacity .12s; } dialog[open] { animation: enter .15s ease-out; } @keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } } }

.top-actions { display: flex; gap: 20px; flex-shrink: 0; }
.export { display: block; padding: 0 0 14px; font-size: 12px; }
@media (max-width: 400px) { .topline .eyebrow { max-width: 140px; line-height: 1.5; } .top-actions { gap: 14px; } .balance { flex-wrap: wrap; } .balance .secondary { width: 100%; } }

.record, .board td:first-child, .balance p { overflow-wrap: anywhere; }
