/* Hockey Shoot-out — the web app. Same language as the iOS app: near-black
   ground, green go, red no. */
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #111214; --card: #1b1d22; --raised: #262930; --line: #2e313a;
  --ink: #fff; --soft: #a3a3ad; --mute: #6e6e7a;
  --go: #00c853; --no: #e01020; --accent: #8b5cf6; --amber: #ffb021;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
body { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
button, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: var(--go); text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: 1.9rem; font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 800; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
.wrap { max-width: 760px; margin: 0 auto; padding: 14px 16px 40px; }
.wide { max-width: 1100px; }
.topbar { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.backlink { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; margin-top: 8px; align-self: flex-start; }
.backlink:hover { text-decoration: none; }
.backlink .iconbtn { font-size: 1.4rem; line-height: 1; }
.topbar .title { flex: 1; text-align: center; font-weight: 700; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--raised); color: var(--ink); display: grid; place-items: center; font-size: 1.1rem; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--card); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.card.raised { background: var(--raised); }
.caption { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.soft { color: var(--soft); } .mute { color: var(--mute); } .small { font-size: .85rem; } .tiny { font-size: .75rem; }
.row { display: flex; align-items: center; gap: 10px; } .row.between { justify-content: space-between; } .grow { flex: 1; }
.btn { border: 0; border-radius: 16px; min-height: 56px; padding: 0 20px; font-weight: 800; font-size: 1.05rem; color: #fff; background: var(--raised); display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.btn:active { filter: brightness(.85); }
.btn.go { background: var(--go); color: #000; } .btn.no { background: var(--no); } .btn.accent { background: var(--accent); }
.btn.quiet { background: transparent; color: var(--soft); min-height: 44px; font-weight: 600; font-size: .95rem; }
.btn.outline { background: transparent; border: 1.5px solid var(--line); min-height: 46px; font-size: .95rem; color: var(--ink); }
.btn[disabled] { opacity: .45; cursor: default; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
input[type=text], input[type=search] { width: 100%; background: #000; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; min-height: 46px; padding: 0 12px; outline: none; }
input:focus { border-color: var(--accent); }
input.num { width: 110px; }
.field { display: flex; flex-direction: column; gap: 6px; }
/* Home */
.hero { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 820px) { .hero { grid-template-columns: 1fr 1fr; } }
.hero-timer { background: linear-gradient(#1b1d24, var(--bg)); border: 1px solid rgba(255,255,255,.08); border-radius: 28px; padding: 22px; display: flex; align-items: center; gap: 18px; color: var(--ink); text-align: left; width: 100%; }
.hero-timer.tall { flex-direction: column; text-align: center; justify-content: center; min-height: 420px; }
.ring { position: relative; display: grid; place-items: center; font-weight: 900; font-size: 48px; }
.ring svg { position: absolute; inset: 0; }
.ring span { position: relative; }
.hero-new { background: linear-gradient(135deg, #9b72ff, #6e3fe6); border: 0; border-radius: 28px; padding: 22px; color: #fff; text-align: left; width: 100%; display: flex; flex-direction: column; gap: 12px; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 12px; font-size: .75rem; font-weight: 800; }
.pill.go { background: var(--go); color: #000; } .pill.grey { background: var(--raised); color: var(--soft); } .pill.amber { background: var(--amber); color: #000; }
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 820px) { .grid { grid-template-columns: 1fr 1fr; } }
.so-card { background: var(--card); border-radius: 22px; padding: 18px 18px 18px 22px; position: relative; text-align: left; border: 0; color: var(--ink); width: 100%; display: flex; flex-direction: column; gap: 12px; }
.so-card .bar { position: absolute; left: 0; top: 18px; bottom: 18px; width: 5px; border-radius: 3px; overflow: hidden; display: flex; flex-direction: column; }
.so-card .bar i { flex: 1; display: block; }
.score { font-weight: 900; font-size: 2rem; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.score.big { font-size: 3.4rem; line-height: 1; }
/* Dots and chips */
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--mute); display: inline-block; }
.dots i.goal { background: var(--go); border-color: var(--go); } .dots i.no_goal { background: var(--no); border-color: var(--no); }
.strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 8px; }
.chip { border: 1.5px solid rgba(255,255,255,.15); border-radius: 12px; min-height: 50px; padding: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 900; font-size: 1.3rem; line-height: 1; gap: 2px; }
.chip small { font-size: .65rem; font-weight: 700; }
.chip.on { outline: 3px solid #fff; outline-offset: -1px; }
.chip.off { opacity: .3; }
.swatches { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); flex: none; padding: 0; }
.swatch.on { outline: 3px solid #fff; outline-offset: -1px; }
.player-row { display: flex; align-items: center; gap: 10px; }
.player-row .no { width: 48px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-weight: 900; font-variant-numeric: tabular-nums; }
.gk { border: 0; border-radius: 6px; padding: 6px 8px; font-size: .75rem; font-weight: 900; background: var(--raised); color: var(--soft); }
.gk.on { background: var(--amber); color: #000; }
/* Timer block */
.tblock { border: 2px solid var(--line); border-radius: 20px; background: var(--raised); color: var(--ink); text-align: center; padding: 16px; width: 100%; display: flex; flex-direction: column; gap: 4px; position: relative; }
.tblock .n { font-size: 64px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.tblock .l { font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.tblock.run { background: var(--go); border-color: var(--go); color: #000; } .tblock.run .l { color: rgba(0,0,0,.6); }
.tblock.done { background: var(--no); border-color: var(--no); color: #000; } .tblock.done .l { color: rgba(0,0,0,.6); }
.tblock .reset { position: absolute; top: 8px; right: 10px; background: rgba(0,0,0,.2); color: rgba(0,0,0,.75); border: 0; border-radius: 999px; padding: 6px 10px; font-size: .75rem; font-weight: 800; }
/* Full-screen timer */
.fs { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.fs.run { background: var(--go); } .fs.done { background: var(--no); }
.fs .count { color: #000; font-size: min(40vmin, 46vh); font-weight: 900; line-height: .95; font-variant-numeric: tabular-nums; }
.fs .cue { color: #000; font-size: clamp(16px, 6vmin, 44px); font-weight: 900; letter-spacing: .12em; text-transform: uppercase; margin-top: 2vmin; }
.fs .sub { color: rgba(0,0,0,.5); font-size: clamp(11px, 3vmin, 17px); font-weight: 800; letter-spacing: .16em; text-transform: uppercase; margin-top: 1.5vmin; }
.fs .start { width: min(62vmin, 300px); height: min(62vmin, 300px); border-radius: 50%; background: var(--go); color: #06240f; display: grid; place-items: center; font-size: clamp(28px, 11vmin, 62px); font-weight: 900; box-shadow: 0 0 0 min(2.4vmin, 12px) rgba(0,200,83,.18); }
.fs .brand { font-size: clamp(11px, 3.2vmin, 17px); font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #6f6a86; margin-bottom: 7vmin; }
.fs .hint { color: #7d7793; margin-top: 7vmin; text-align: center; max-width: 34ch; }
.fs .corner { position: fixed; top: max(12px, env(safe-area-inset-top)); background: rgba(0,0,0,.22); color: rgba(0,0,0,.75); border: 0; border-radius: 999px; padding: 9px 16px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.fs .corner.left { left: max(12px, env(safe-area-inset-left)); } .fs .corner.right { right: max(12px, env(safe-area-inset-right)); }
.fs.ready .corner { color: #7d7793; }
/* Log */
.log { display: flex; flex-direction: column; gap: 8px; }
.log .item { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--ink); text-align: left; padding: 4px 0; width: 100%; }
.log .seq { width: 22px; text-align: right; color: var(--mute); font-size: .8rem; font-weight: 700; }
.log .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.banner { background: rgba(0,200,83,.12); color: var(--go); border-radius: 14px; padding: 12px 14px; font-weight: 700; }
.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.toggle input { width: 22px; height: 22px; accent-color: var(--accent); }
.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: flex-end; justify-content: center; padding: 12px; z-index: 20; }
.sheet .card { width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; }
@media (min-width: 700px) { .sheet { align-items: center; } }
.coin { width: 56px; height: 56px; border-radius: 50%; border: 0; background: #ffd400; color: #000; font-weight: 900; font-size: 1.4rem; transition: transform .6s; }
.foot { text-align: center; color: var(--mute); font-size: .8rem; margin-top: 30px; }
.foot a { color: var(--soft); }
