:root {
  --navy: #0B1B2B;
  --bg: #0B1B2B;
  --panel: #12263A;
  --panel-2: #183049;
  --line: #24415E;
  --text: #F4F7FA;
  --muted: #9DB0C3;
  --blue: #2F7BFF;
  --red: #E0334C;
  --amber: #FFB020;
  --home: #2F7BFF;
  --away: #FFB020;
  --ice: #EEF3F7;
  --ice-line: #C9D5E0;
  --radius: 10px;
  --font: "Noto Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); }
a:hover { color: var(--amber); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* header */
.top {
  border-bottom: 1px solid var(--line);
  background: rgba(11, 27, 43, .92);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(6px);
}
.top .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: .01em; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand span small { color: var(--muted); font-weight: 600; margin-left: 4px; }
.nav { margin-left: auto; display: flex; gap: 18px; font-weight: 600; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 6px; vertical-align: 1px; }
.live-dot.on { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; font-weight: 700; text-decoration: none;
  background: var(--amber); color: var(--navy); border: 0; cursor: pointer; font: inherit; font-weight: 700;
}
.btn:hover { color: var(--navy); filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--muted); color: var(--text); }
.btn.sm { padding: 6px 12px; font-size: 14px; }

/* home */
.hero { padding: 56px 0 40px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.05; margin: 0 0 16px; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero p { font-size: 19px; color: var(--muted); margin: 0 0 24px; max-width: 34em; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.hero-card h3 { margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

section { padding: 32px 0; }
section > h2 { font-size: 24px; margin: 0 0 16px; }
.grid-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.video { text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.video:hover { border-color: var(--muted); color: var(--text); }
.video img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.video div { padding: 12px 14px; }
.video b { display: block; line-height: 1.3; }
.video small { color: var(--muted); }

.about { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.about > div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.about h3 { margin: 0 0 6px; font-size: 17px; }
.about p { margin: 0; color: var(--muted); font-size: 15px; }

.socials { display: flex; flex-wrap: wrap; gap: 10px; }
footer { border-top: 1px solid var(--line); margin-top: 32px; padding: 24px 0 40px; color: var(--muted); font-size: 14px; }
footer p { margin: 4px 0; }

/* scoreboard strip */
.strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: thin; }
.chip {
  flex: 0 0 auto; min-width: 150px; text-align: left; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text);
  padding: 8px 12px; font: inherit; font-size: 14px; text-decoration: none;
}
.chip:hover { border-color: var(--muted); color: var(--text); }
.chip[aria-pressed="true"] { border-color: var(--amber); background: var(--panel-2); }
.chip .row { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }
.chip .st { font-size: 12px; color: var(--muted); margin-top: 2px; }
.chip .st.live { color: var(--red); font-weight: 700; }

/* live page */
.live-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 18px 0 8px; }
.team { display: flex; align-items: center; gap: 12px; }
.team.home { justify-content: flex-end; text-align: right; }
.team .ab { font-size: 28px; font-weight: 800; letter-spacing: .02em; }
.team .nm { color: var(--muted); font-size: 14px; }
.team .sw { width: 10px; height: 44px; border-radius: 3px; }
.away .sw { background: var(--away); }
.home .sw { background: var(--home); }
.score { text-align: center; }
.score .big { font-size: 48px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.score .clock { color: var(--muted); font-size: 14px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.sit { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); }
.sit.pp { background: var(--red); color: #fff; }

.live-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.card h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stack { display: grid; gap: 18px; }

.rink-wrap { position: relative; }
svg.rink { width: 100%; height: auto; display: block; }
.rink .ice { fill: var(--ice); }
.rink .board { fill: none; stroke: #8EA2B5; stroke-width: .8; }
.rink .red { stroke: var(--red); fill: none; }
.rink .redf { fill: var(--red); }
.rink .blue { stroke: var(--blue); }
.rink .crease { fill: #9CC3FF; fill-opacity: .55; stroke: var(--red); stroke-width: .3; }
.rink .ev { cursor: pointer; transition: opacity .15s; }
.rink .ev.dim { opacity: .12; }
.rink .ev.new { animation: pop .9s ease-out; }
@keyframes pop { 0% { transform: scale(2.4); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1); } }
.rink-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

.tip {
  position: absolute; pointer-events: none; z-index: 5; max-width: 260px;
  background: var(--navy); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.tip b { display: block; }

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.filters label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; user-select: none; }
.filters input { accent-color: var(--amber); margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend svg { vertical-align: -3px; margin-right: 4px; }

table.stats { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.stats td { padding: 6px 0; border-bottom: 1px solid var(--line); }
table.stats tr:last-child td { border-bottom: 0; }
table.stats td:first-child, table.stats td:last-child { width: 64px; font-weight: 700; }
table.stats td:first-child { text-align: left; color: var(--away); }
table.stats td:last-child { text-align: right; color: var(--home); }
table.stats td.lbl { text-align: center; color: var(--muted); font-size: 13px; }
.bar { height: 4px; background: var(--home); border-radius: 2px; overflow: hidden; margin-top: 3px; }
.bar i { display: block; height: 100%; background: var(--away); }

svg.flow { width: 100%; height: auto; display: block; }
svg.flow text { fill: var(--muted); font-size: 10px; font-family: var(--font); }

.feed { max-height: 520px; overflow-y: auto; margin: 0 -14px; padding: 0 14px; }
.feed ol { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 52px 8px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.feed li:hover { background: var(--panel-2); }
.feed li .t { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.feed li .c { width: 4px; border-radius: 2px; }
.feed li.goal { font-weight: 700; }
.feed li.goal .d::before { content: "GOAL · "; color: var(--amber); }
.feed .per { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 10px 0 4px; border-bottom: 1px solid var(--line); cursor: default; display: block; }
.xg { font-size: 12px; color: var(--muted); }

.radio { display: grid; gap: 8px; }
.radio a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-size: 14px; }
.radio a:hover { border-color: var(--muted); }
.radio small { color: var(--muted); display: block; }
.note { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

.empty { padding: 40px 0; text-align: center; color: var(--muted); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .about { grid-template-columns: 1fr; }
  .live-grid { grid-template-columns: 1fr; }
  .nav { gap: 12px; font-size: 14px; }
  .brand span small { display: none; }
}
@media (max-width: 560px) {
  .team .nm { display: none; }
  .team .ab { font-size: 22px; }
  .score .big { font-size: 38px; }
}

/* radio */
.radio button.play {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--text);
  font: inherit; font-size: 14px; cursor: pointer;
}
.radio button.play:hover { border-color: var(--muted); }
.radio button.play.on { border-color: var(--amber); background: var(--panel-2); }
.radio .pl { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--amber); color: var(--navy); font-size: 12px; flex: 0 0 auto; }
.radio-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--panel-2); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0, 0, 0, .35); }
.radio-bar .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.radio-bar .rb-text { min-width: 0; flex: 1; }
.radio-bar .rb-text b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.radio-bar .rb-text small { color: var(--muted); font-size: 12px; }
.radio-bar .rb-text small.live { color: var(--red); font-weight: 700; }
.radio-bar input[type="range"] { width: 110px; accent-color: var(--amber); }
body:has(.radio-bar:not([hidden])) footer { padding-bottom: 90px; }
@media (max-width: 560px) {
  .radio-bar input[type="range"], .radio-bar #rb-site { display: none; }
}

/* goalies / shooters */
.gl { padding: 8px 0; border-bottom: 1px solid var(--line); }
.gl:last-of-type { border-bottom: 0; }
.gl-n { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.gl-n i { width: 4px; height: 16px; border-radius: 2px; }
.gl-s { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; text-align: center; }
.gl-s b { display: block; font-variant-numeric: tabular-nums; font-size: 16px; }
.gl-s small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.gl-s .pos b { color: #3CCB7F; }
.gl-s .neg b { color: var(--red); }
.sh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sh-h { font-weight: 800; font-size: 14px; margin-bottom: 4px; }
table.sh { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.sh th { color: var(--muted); font-weight: 600; font-size: 11px; text-align: right; padding: 2px 0 4px; }
table.sh td { padding: 4px 0; border-top: 1px solid var(--line); text-align: right; }
table.sh td:first-child, table.sh th:first-child { text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
@media (max-width: 560px) { .sh-grid { grid-template-columns: 1fr; } }

/* share dialog */
.share-dlg { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.share-dlg::backdrop { background: rgba(4, 10, 18, .7); }
.share-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.share-img { aspect-ratio: 16 / 9; background: var(--bg); border-radius: 8px; overflow: hidden; display: grid; place-items: center; }
.share-img img { width: 100%; height: 100%; object-fit: contain; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.share-dlg textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: 14px/1.45 var(--font); resize: vertical; }
