:root {
  color-scheme: light;
  --bg: #f3f5ef;
  --ink: #172e24;
  --muted: #43594e;
  --line: #cdd8cd;
  --paper: #fff;
  --accent: #c6ec84;
  --error: #8d2924;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.shell { width: min(100% - 32px, 760px); margin-inline: auto; }
.site-header { color: #fff; background: var(--ink); }
.header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: grid; font-weight: 720; letter-spacing: -.01em; }
.brand small { color: #d3e2d4; font-weight: 480; }
main { padding-block: clamp(24px, 5vw, 56px) 48px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); line-height: 1.04; letter-spacing: -.055em; }
h2 { font-size: clamp(1.25rem, 4vw, 1.75rem); line-height: 1.18; letter-spacing: -.029em; }
h3 { font-size: 1.05rem; }
.subtitle { margin-top: 12px; color: var(--muted); }
.stack { display: grid; gap: 16px; }
.stack > * { min-width: 0; }
.heading { margin-bottom: 24px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: clamp(16px, 4vw, 28px); }
.login { max-width: 520px; }
label { font-weight: 650; display: grid; gap: 6px; }
input, textarea, button { font: inherit; }
input, textarea { color: var(--ink); border: 1px solid #8eaa96; background: white; border-radius: 10px; padding: 10px 12px; width: 100%; min-width: 0; }
textarea { min-height: 84px; resize: vertical; }
button, .button { min-height: 44px; padding: 10px 16px; border: 1px solid transparent; border-radius: 11px; background: var(--ink); color: white; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }
button:disabled { background: #e4e9e1; color: #4a5b51; cursor: default; }
button.quiet { background: transparent; color: inherit; border-color: currentColor; }
button.primary { background: var(--accent); color: var(--ink); }
button.primary:disabled { background: #e4e9e1; color: #4a5b51; }
button:not(:disabled):hover, .button:hover { filter: brightness(.9); }
:focus-visible { outline: 3px solid #438151; outline-offset: 3px; }
.notice { padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; background: #e5efdb; }
.notice.error { color: var(--error); background: #fdf0eb; border-color: #e8b8b2; }
.kicker { font-size: .85rem; color: var(--muted); font-weight: 680; margin-bottom: 7px; }
.status { color: var(--muted); }
.team-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 12px; align-items: center; min-height: 51px; padding-block: 4px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.team-row input { text-align: center; font-variant-numeric: tabular-nums; }
.team-row output { text-align: right; font-weight: 750; }
.team-row:last-child { border-bottom: 0; }
.score-bar { position: sticky; bottom: 0; z-index: 1; background: #eaf3e2; border: 1px solid #cfddc6; border-radius: 14px; padding: 12px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.score-bar.error { color: var(--error); background: #fdf0eb; }
.score-bar small { display: block; }
.saved { color: #315d3c; font-weight: 650; }
.between, .actions, .inline-fields { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.inline-fields input { flex: 1 1 220px; }
.roster { list-style: none; padding: 0; margin: 0; }
.roster li { padding-block: 8px; border-bottom: 1px solid var(--line); }
.roster li:last-child { border-bottom: 0; }
.code { font-family: ui-monospace, monospace; overflow-wrap: anywhere; font-weight: 700; }
details summary { cursor: pointer; font-weight: 680; }
details[open] summary { margin-bottom: 9px; }
.comments { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 380px) {
  .score-bar button { width: 100%; }
  .team-row { grid-template-columns: minmax(0, 1fr) 65px; }
}
