/* KIHF — ice, dasher boards, Hokusai's Prussian blue, centre-ice red. */
:root {
  --ice: #EDF2F5;
  --ice-hi: #F7FAFC;
  --surface: #FFFFFF;
  --ink: #102238;
  --ink-2: #445870;
  --ink-3: #7B8B9D;
  --board: #1D3F6E;          /* dasher boards, header, team tiles */
  --board-2: #16325A;
  --on-board: #FFFFFF;
  --on-board-2: #B9CBE2;
  --blue-line: #2F6BC4;
  --crease: #CFE1EE;
  --red: #D52B32;
  --rule: #D5DEE6;
  --rule-strong: #B9C6D2;
  --won: #102238;
  --up: #23855A;
  --down: #C2410C;
  --tile: #1D3F6E;
  --tile-ink: #FFFFFF;
  --rink-board: #1D3F6E;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "IBM Plex Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --wrap: 1200px;
  --gutter: 16px;
  color-scheme: light;
}
/* Night ice: the rink after the 22:30 game with half the lights off. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ice: #0A1524; --ice-hi: #0F1D31; --surface: #112038;
    --ink: #E8EFF7; --ink-2: #A9B9CB; --ink-3: #6F849C;
    --board: #0E2341; --board-2: #0B1C35; --on-board: #F2F6FB; --on-board-2: #8EA6C6;
    --blue-line: #4F8BE0; --crease: #19304F; --red: #EF4B52;
    --rule: #1F334D; --rule-strong: #2B4462; --won: #FFFFFF; --up: #4FBE84; --down: #EE8445;
    --tile: #2C5794; --tile-ink: #FFFFFF; --rink-board: #2C5794; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ice: #0A1524; --ice-hi: #0F1D31; --surface: #112038;
  --ink: #E8EFF7; --ink-2: #A9B9CB; --ink-3: #6F849C;
  --board: #0E2341; --board-2: #0B1C35; --on-board: #F2F6FB; --on-board-2: #8EA6C6;
  --blue-line: #4F8BE0; --crease: #19304F; --red: #EF4B52;
  --rule: #1F334D; --rule-strong: #2B4462; --won: #FFFFFF; --up: #4FBE84; --down: #EE8445;
  --tile: #2C5794; --tile-ink: #FFFFFF; --rink-board: #2C5794; color-scheme: dark;
}

[data-lang="ja"] .en, [data-lang="en"] .ja { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ice); color: var(--ink); font: 400 15px/1.6 var(--body); font-feature-settings: "palt" 1; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--blue-line); }
:focus-visible { outline: 3px solid var(--blue-line); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 700; }
small { font-size: .78em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.muted { color: var(--ink-3); }
td, .score, .fo-num { font-variant-numeric: tabular-nums; }
/* English headings switch to the condensed display face; Japanese stays in Plex. */
.dh { font-family: var(--body); font-weight: 700; }
[data-lang="en"] .dh { font-family: var(--display); font-weight: 800; letter-spacing: .01em; }

/* ---------- header: the dasher boards ---------- */
.site-head { background: var(--board); color: var(--on-board); border-bottom: 3px solid var(--red); position: sticky; top: 0; z-index: 5; }
.head-row { display: flex; align-items: center; gap: 22px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-board); }
.brand:hover { color: var(--on-board); }
.brand-mark { display: grid; place-items: center; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font: 900 27px/1 var(--display); letter-spacing: .03em; }
.brand-sub { font-size: 11px; color: var(--on-board-2); margin-top: 3px; }
.main-nav { display: flex; margin-right: auto; align-self: stretch; }
.main-nav a { display: flex; align-items: center; text-decoration: none; padding: 0 13px; font-weight: 500; color: var(--on-board-2); position: relative; }
.main-nav a:hover { color: var(--on-board); }
.main-nav a[aria-current="page"] { color: var(--on-board); }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: -3px; height: 3px; background: var(--on-board); }
.head-tools { display: flex; align-items: center; gap: 6px; }
.season-pick select, .team-filter select {
  font: 500 14px var(--body); border-radius: 4px; padding: 6px 28px 6px 10px; appearance: none;
  background-repeat: no-repeat; background-size: 5px 5px; background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
}
.season-pick select {
  color: var(--on-board); background-color: transparent; border: 1px solid color-mix(in srgb, var(--on-board) 30%, transparent);
  background-image: linear-gradient(45deg, transparent 50%, var(--on-board-2) 50%), linear-gradient(135deg, var(--on-board-2) 50%, transparent 50%);
}
.season-pick option { color: #102238; }
.tool-btn { font: 500 13px var(--body); color: var(--on-board); background: transparent; border: 1px solid color-mix(in srgb, var(--on-board) 30%, transparent); border-radius: 4px; height: 33px; min-width: 33px; padding: 0 10px; cursor: pointer; display: inline-grid; place-items: center; }
.tool-btn:hover { background: color-mix(in srgb, var(--on-board) 12%, transparent); }
.icon-btn { padding: 0; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: block; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}

/* score ticker */
.ticker { background: var(--surface); border-bottom: 1px solid var(--rule); }
.ticker-row { display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.ticker-row::-webkit-scrollbar { display: none; }
.tk-label { flex: none; display: flex; align-items: center; padding-right: 14px; margin-right: 4px; font-size: 12px; color: var(--ink-3); border-right: 1px solid var(--rule); }
.tk { flex: none; display: grid; grid-template-columns: auto auto; column-gap: 10px; padding: 7px 14px; text-decoration: none; border-right: 1px solid var(--rule); font: 700 14px/1.25 var(--display); letter-spacing: .03em; }
.tk:hover { background: var(--ice-hi); color: inherit; }
.tk-code { grid-column: 1 / -1; font: 500 10.5px/1.3 var(--body); color: var(--ink-3); letter-spacing: 0; }
.tk .l { color: var(--ink-3); font-weight: 600; }
.tk b { text-align: right; }

.past-season { background: var(--crease); font-size: 14px; padding: 8px 0; }

/* ---------- hero ---------- */
.hero { padding: 30px 0 46px; }
.hero-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px; }
.hero-title { font: 700 clamp(24px, 3.4vw, 38px)/1.15 var(--body); color: var(--ink); letter-spacing: .02em; }
[data-lang="en"] .hero-title { font: 800 clamp(32px, 5vw, 58px)/.95 var(--display); letter-spacing: 0; }
.hero-meta { display: flex; align-items: baseline; gap: 14px; color: var(--ink-2); font-size: 14px; margin: 0; }
.hero-meta strong { font: 800 20px var(--display); color: var(--ink); letter-spacing: .02em; }

/* The rink. Every marking is its own element so nothing distorts at any width. */
.rink {
  position: relative; margin-top: 22px; display: grid; grid-template-columns: 1fr 176px 1fr; min-height: 310px;
  container-type: inline-size;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .55 0 0 0 0 .7 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"),
    var(--ice-hi);
  border: 7px solid var(--rink-board); border-radius: 130px / 120px; overflow: hidden;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--board) 25%, transparent), inset 0 0 60px color-mix(in srgb, var(--blue-line) 10%, transparent);
}
.rink-mark { position: absolute; pointer-events: none; }
.goal-line { top: 0; bottom: 0; width: 2px; background: var(--red); opacity: .7; }
.goal-line.l { left: 5.5%; }
.goal-line.r { right: 5.5%; }
.crease { top: 50%; width: 30px; height: 56px; margin-top: -28px; background: color-mix(in srgb, var(--blue-line) 22%, transparent); border: 2px solid var(--red); opacity: .8; }
.crease.l { left: 5.5%; border-left: 0; border-radius: 0 30px 30px 0; }
.crease.r { right: 5.5%; border-right: 0; border-radius: 30px 0 0 30px; }
.fo { width: 108px; height: 108px; border: 2px solid var(--red); border-radius: 50%; opacity: .16; }
.fo::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: var(--red); }
.fo.l1 { left: calc(5.5% + 40px); top: 9%; } .fo.l2 { left: calc(5.5% + 40px); bottom: 9%; }
.fo.r1 { right: calc(5.5% + 40px); top: 9%; } .fo.r2 { right: calc(5.5% + 40px); bottom: 9%; }
.rink-zone { position: relative; z-index: 1; padding: 30px 34px 30px calc(5.5cqw + 64px); display: flex; flex-direction: column; justify-content: center; }
.rink-right { padding: 30px calc(5.5cqw + 64px) 30px 34px; }
.zone-title { font: 500 13px var(--body); color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 14px; }
.zone-date { font: 800 24px/1 var(--display); color: var(--ink); letter-spacing: .01em; }
.zone-date.next { color: var(--red); }
.zone-empty { color: var(--ink-3); margin: 0; }
.rink-games { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rink-games { max-width: 360px; }
.rink-right .rink-games { margin-left: auto; width: 100%; }
.bug { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; text-decoration: none; background: var(--surface); border-left: 4px solid var(--board); padding: 7px 12px 8px; }
.bug:hover { color: inherit; border-left-color: var(--red); }
.bug .rk-comp { grid-column: 1 / -1; }
.bug-row { grid-column: 1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; padding: 2px 0; font-weight: 500; }
.bug:not(.upcoming) .bug-row { grid-column: 1 / -1; }
.bug-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bug-row b { font: 800 24px/1 var(--display); min-width: 22px; text-align: right; }
.bug-row.won b { font-weight: 900; color: var(--won); }
.bug-row.lost { color: var(--ink-3); }
.bug-row.lost .badge { opacity: .45; }
.bug-time { grid-column: 2; grid-row: 2 / span 2; align-self: center; display: grid; justify-items: end; font: 800 26px/1 var(--display); color: var(--red); }
.bug-time small { font: 500 11px var(--body); color: var(--ink-3); margin-top: 4px; }
.rk-comp { display: block; font-size: 11.5px; color: var(--ink-3); margin-bottom: 3px; }
.rk-code { font: 700 13px var(--display); color: var(--ink-2); letter-spacing: .03em; margin-left: 2px; }
.rink-more { font-size: 12.5px; color: var(--ink-2); margin-top: 12px; }
/* Neutral zone: blue lines are its borders, the red line runs down its middle. */
.rink-center { position: relative; z-index: 1; display: grid; place-items: center; border-left: 5px solid var(--blue-line); border-right: 5px solid var(--blue-line); }
.rink-center::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 6px; margin-left: -3px; background: var(--red); }
.faceoff { position: relative; display: grid; justify-items: center; align-content: center; text-align: center; width: 132px; height: 132px; border-radius: 50%; background: var(--ice-hi); border: 3px solid var(--blue-line); }
.fo-num { font: 900 48px/.85 var(--display); color: var(--board); }
:root[data-theme="dark"] .fo-num { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fo-num { color: var(--ink); } }
.fo-of { font: 700 15px/1 var(--display); color: var(--ink-2); margin-top: 2px; }
.fo-label { font-size: 10.5px; color: var(--ink-3); margin-top: 5px; }

/* ---------- team pieces ---------- */
.badge { flex: none; display: inline-grid; place-items: center; width: 40px; height: 28px; font: 800 14px/1 var(--display); letter-spacing: .05em; color: var(--tile-ink); background: var(--tile); border-radius: 3px; }
.badge.sm { width: 34px; height: 22px; font-size: 12.5px; }
.badge.xl { width: 92px; height: 66px; font-size: 32px; border-radius: 6px; }
.badge.tbd { color: var(--ink-3); background: transparent; box-shadow: inset 0 0 0 1.5px var(--rule-strong); }
.side { display: flex; align-items: center; gap: 9px; min-width: 0; }
.side-name { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; overflow-wrap: anywhere; }
.side-name a { text-decoration: none; font-weight: 500; }
.side-name a:hover { text-decoration: underline; }
.feed { color: var(--ink-3); font-size: 12px; }
.score { display: inline-flex; align-items: baseline; justify-content: center; gap: 7px; min-width: 78px; text-decoration: none; font: 700 24px/1 var(--display); color: var(--ink-3); }
.score b { font-weight: 600; }
.score b.won { color: var(--won); font-weight: 900; }
.score i { font-style: normal; color: var(--rule-strong); }
.score.pending { flex-direction: column; align-items: center; gap: 2px; font: 700 18px/1 var(--display); color: var(--ink); letter-spacing: .02em; }
.score .rink-name { font: 500 11px/1.2 var(--body); color: var(--ink-3); letter-spacing: 0; }
.score.awaiting { font: 500 12px var(--body); color: var(--ink-3); }
.tag { display: inline-block; font-size: 11px; padding: 0 5px; border-radius: 2px; vertical-align: middle; }
.tag.ff { color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--rule-strong); margin-left: 4px; }

/* ---------- sections: board-capped ---------- */
.home-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; padding-bottom: 60px; }
.cup-panel { grid-column: 1 / -1; }
.panel { background: var(--surface); border-top: 4px solid var(--board); padding: 16px 22px 20px; min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-head h2 { font-size: 19px; }
[data-lang="en"] .panel-head h2 { font: 800 24px/1.1 var(--display); letter-spacing: .01em; }
.more { font-size: 13px; color: var(--ink-2); }
.empty { color: var(--ink-3); }
.note { color: var(--ink-3); font-size: 13px; margin: 10px 0 0; }

.tab-list { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin-bottom: 10px; overflow-x: auto; }
.tab-list button { font: 700 17px var(--display); letter-spacing: .03em; color: var(--ink-3); background: none; border: 0; border-bottom: 3px solid transparent; padding: 6px 12px; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
[data-lang="ja"] .tab-list button { font: 500 14px var(--body); padding: 8px 12px; }
.tab-list button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--red); }
.league-kind { font-size: 12px; color: var(--ink-2); margin: 0 0 4px; display: inline-flex; align-items: center; gap: 7px; }
.league-kind::before { content: ""; width: 16px; border-top: 3px solid var(--blue-line); }
.league-kind.noncheck::before { border-top-style: dashed; border-top-width: 2px; }

.pool-champs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.pool-champs li { display: flex; gap: 14px; align-items: center; padding: 8px 14px 8px 0; }
.pool-champs li + li { border-left: 1px solid var(--rule); padding-left: 18px; }
.pool-letter { font: 900 46px/1 var(--display); color: var(--board); width: 34px; text-align: center; }
:root[data-theme="dark"] .pool-letter { color: var(--blue-line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pool-letter { color: var(--blue-line); } }
.pool-body { display: grid; gap: 2px; }
.pool-name { font-size: 12px; color: var(--ink-3); }
.pool-champ { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.pool-champ small { color: var(--red); font-weight: 700; }

/* ---------- game lists ---------- */
.game-list { list-style: none; margin: 0; padding: 0; }
.game-row { display: grid; grid-template-columns: 170px 1fr 160px; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--rule); }
.game-list > .game-row:first-child { border-top: 0; }
.gr-meta { display: flex; flex-direction: column; gap: 1px; font-size: 12px; color: var(--ink-3); }
.gr-date { color: var(--ink); font-weight: 500; font-size: 13px; }
.gr-code { font: 700 16px/1.1 var(--display); color: var(--ink-2); letter-spacing: .03em; }
.gr-match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; min-width: 0; }
.gr-match .side:last-child { flex-direction: row-reverse; text-align: right; }
.gr-match .side:last-child .side-name { align-items: flex-end; }
.gr-venue { font-size: 12px; color: var(--ink-3); text-align: right; }
.sheet-link { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--rule-strong); text-decoration: none; color: var(--ink-2); }
.sheet-link:hover { box-shadow: inset 0 0 0 1px var(--blue-line); }
.game-list.tight .game-row { grid-template-columns: 1fr; gap: 4px; padding: 10px 0; }
.game-list.tight .gr-meta { flex-direction: row; gap: 8px; align-items: baseline; }
.game-list.tight .gr-venue { display: none; }

/* ---------- pages ---------- */
.page { padding-top: 30px; padding-bottom: 64px; }
.page-head { margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--rule-strong); }
.page-head h1 { font-size: clamp(24px, 3.4vw, 34px); }
[data-lang="en"] .page-head h1 { font: 800 clamp(34px, 5vw, 54px)/.95 var(--display); }
.lede { color: var(--ink-2); margin: 8px 0 0; max-width: 72ch; }

.filters { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 500 13px var(--body); color: var(--ink-2); background: var(--surface); border: 0; box-shadow: inset 0 0 0 1px var(--rule-strong); border-radius: 3px; padding: 6px 13px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--board); box-shadow: none; color: var(--on-board); }
.team-filter { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.team-filter select { color: var(--ink); background-color: var(--surface); border: 1px solid var(--rule-strong); max-width: 270px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); }
.sched-part { font: 700 20px var(--body); margin: 34px 0 6px; }
[data-lang="en"] .sched-part { font: 800 30px var(--display); }
.day { background: var(--surface); border-top: 3px solid var(--board); padding: 4px 20px 2px; margin-top: 14px; }
.day-head { font: 800 18px var(--display); letter-spacing: .02em; color: var(--ink); padding: 10px 0 2px; }
[data-lang="ja"] .day-head { font: 700 15px var(--body); }

/* standings */
.table-scroll { overflow-x: auto; }
.standings { width: 100%; border-collapse: collapse; font-size: 14px; }
.standings th, .standings td { padding: 8px 7px; text-align: center; white-space: nowrap; }
.standings thead th { font-size: 12px; font-weight: 500; color: var(--ink-3); border-bottom: 2px solid var(--rule-strong); }
.standings tbody tr + tr { border-top: 1px solid var(--rule); }
.standings .c-team { text-align: left; width: 100%; }
.standings .c-team a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; }
.standings .c-team a:hover span { text-decoration: underline; }
.standings .c-rank { width: 30px; font: 700 17px var(--display); color: var(--ink-3); }
.standings thead .c-rank { font: 500 12px var(--body); }
.standings .c-pts { font: 900 19px var(--display); color: var(--ink); background: color-mix(in srgb, var(--crease) 55%, transparent); }
.standings thead .c-pts { font: 500 12px var(--body); color: var(--ink-2); }
.standings .c-gd { color: var(--ink-2); }
.standings tr.is-me th, .standings tr.is-me td { background: var(--crease); }
.standings tr.zone-up .c-rank { color: var(--up); box-shadow: inset 3px 0 0 var(--up); }
.standings tr.zone-down .c-rank { color: var(--down); box-shadow: inset 3px 0 0 var(--down); }
.form { display: inline-flex; gap: 3px; }
.form i { font: 700 11px/19px var(--display); font-style: normal; width: 19px; height: 19px; border-radius: 2px; text-align: center; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.form .f-w { background: var(--tile); color: var(--tile-ink); box-shadow: none; }
.form .f-l { color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--rule); }

.league-divider { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 40px 0 16px; padding-top: 12px; font-size: 21px; border-top: 5px solid var(--blue-line); }
[data-lang="en"] .league-divider { font: 800 28px var(--display); }
.league-divider.noncheck { border-top-style: dashed; }
.league-divider small { font: 400 13px var(--body); color: var(--ink-2); }
.page-head + .league-divider { margin-top: 10px; }
.division { background: var(--surface); padding: 14px 22px 18px; margin-bottom: 18px; border-top: 4px solid var(--board); }
.division-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.division-head h3 { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.div-num { font: 900 46px/1 var(--display); color: var(--board); }
:root[data-theme="dark"] .div-num { color: var(--blue-line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .div-num { color: var(--blue-line); } }
.div-progress { font-size: 13px; color: var(--ink-3); }
details.placement, details.pool-games { margin-top: 12px; border-top: 1px solid var(--rule); padding-top: 10px; }
details summary { cursor: pointer; font-weight: 500; color: var(--ink-2); }
.count { font: 700 13px var(--display); color: var(--ink-3); margin-left: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--ink-2); }
.lg::before { content: ""; display: inline-block; width: 3px; height: 14px; margin-right: 6px; vertical-align: -2px; background: var(--up); }
.lg.down::before { background: var(--down); }
.lg-note { color: var(--ink-3); }

/* cup */
.pool-nav { display: flex; gap: 6px; margin-bottom: 8px; }
.pool-nav a { text-decoration: none; font: 800 18px var(--display); letter-spacing: .03em; padding: 4px 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule-strong); border-radius: 3px; }
[data-lang="ja"] .pool-nav a { font: 500 14px var(--body); padding: 6px 14px; }
.pool { margin-top: 34px; }
.pool-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 4px solid var(--board); }
.pool-head h2 { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.pool-head .pool-letter { font-size: 60px; width: auto; }
.champ-line { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 700; font-size: 17px; }
.champ-line small { color: var(--red); font-size: 13px; }
.group-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.group { background: var(--surface); padding: 12px 18px 14px; border-top: 3px solid var(--board); }
.group h3 { font-size: 15px; margin-bottom: 2px; }
.pool-final { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.pool-final h3 { font-size: 15px; }
.sub { font-size: 16px; margin: 24px 0 10px; }

.bracket-scroll { overflow-x: auto; padding: 4px 0 12px; }
.bracket { display: inline-flex; min-width: 100%; }
.bk-node { display: flex; align-items: center; }
.bk-kids { display: flex; flex-direction: column; justify-content: center; position: relative; padding-right: 24px; }
.bk-kids > .bk-node { position: relative; padding: 5px 0; }
.bk-kids > .bk-node::after { content: ""; position: absolute; right: -24px; width: 12px; top: 50%; border-top: 2px solid var(--rule-strong); }
.bk-kids::after { content: ""; position: absolute; right: 12px; top: 25%; bottom: 25%; border-right: 2px solid var(--rule-strong); }
.bk-kids:has(> .bk-leaf)::after, .bk-kids > .bk-leaf::after { display: none; }
.bk-self { position: relative; }
.bk-kids + .bk-self::before { content: ""; position: absolute; left: -12px; width: 12px; top: 50%; border-top: 2px solid var(--rule-strong); }
.bk-kids:has(> .bk-leaf) + .bk-self::before { display: none; }
.bk-game { display: grid; width: 214px; text-decoration: none; background: var(--surface); padding: 5px 10px 7px; border-left: 3px solid var(--board); }
.bk-game:hover { border-left-color: var(--red); color: inherit; }
.bk-code { font: 700 13px var(--display); color: var(--ink-3); letter-spacing: .04em; }
.bk-code em { font-style: normal; color: var(--red); }
.bk-team { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 2px 0; font-size: 13px; }
.bk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-team b { font: 800 18px var(--display); min-width: 18px; text-align: right; }
.bk-team.won { font-weight: 700; }
.bk-team.lost { color: var(--ink-3); }
.bk-team.lost .badge { opacity: .45; }
.bk-when { font-size: 11px; color: var(--ink-3); }
.consolation { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 10px; }
.consolation .bk-game { width: auto; }

/* teams */
.team-group { margin-bottom: 30px; }
.team-group h2 { font-size: 17px; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--rule-strong); }
[data-lang="en"] .team-group h2 { font: 800 24px var(--display); }
.team-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px; }
.team-grid a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); text-decoration: none; border-left: 3px solid transparent; }
.team-grid a:hover { border-left-color: var(--red); color: inherit; }
.team-grid span { display: grid; }
.team-grid small { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.team-grid .pts { margin-left: 8px; color: var(--ink-2); }

/* Boards band: team and game headers. The red line runs through the middle. */
.board-band { position: relative; background: var(--board); color: var(--on-board); overflow: hidden; }
.board-band a { color: var(--on-board); }
.board-band::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--red); }
.band-lines { position: absolute; inset: 0; pointer-events: none; opacity: .5; }
.band-lines::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 5px; margin-left: -2.5px; background: var(--red); opacity: .55; }
.band-lines::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 220px; margin-left: -110px; border-left: 4px solid color-mix(in srgb, var(--blue-line) 70%, transparent); border-right: 4px solid color-mix(in srgb, var(--blue-line) 70%, transparent); }
.board-band .badge { background: var(--on-board); color: var(--board); }
.board-band .wrap { position: relative; z-index: 1; }

.team-hero { padding: 34px 0 30px; }
.team-hero .band-lines::before { left: 78%; }
.team-hero .band-lines::after { left: 78%; }
.team-hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.team-id { margin-right: auto; }
.team-id h1 { font-size: clamp(26px, 4vw, 40px); }
[data-lang="en"] .team-id h1 { font: 800 clamp(36px, 5.4vw, 60px)/.95 var(--display); }
.team-alt { margin: 4px 0 0; color: var(--on-board-2); }
.team-div { margin: 10px 0 0; display: flex; align-items: center; gap: 12px; font-weight: 500; }
.team-div .league-kind { margin: 0; color: var(--on-board-2); }
.team-stats { display: flex; gap: 28px; margin: 0; background: var(--board-2); padding: 12px 20px; }
.team-stats div { display: grid; }
.team-stats dt { font-size: 12px; color: var(--on-board-2); }
.team-stats dd { margin: 0; font: 800 36px/1 var(--display); font-variant-numeric: tabular-nums; }
.team-stats dd small { font-size: 16px; color: var(--on-board-2); }
.team-page { display: grid; gap: 24px; }

.scoreboard { padding: 22px 0 28px; }
.scoreboard .band-lines { bottom: auto; height: 300px; -webkit-mask: linear-gradient(#000 70%, transparent); mask: linear-gradient(#000 70%, transparent); }
.sb-context { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 0 0 20px; font-size: 14px; color: var(--on-board-2); }
.sb-context a { color: var(--on-board-2); }
.sb-code { font: 700 18px var(--display); color: var(--on-board); letter-spacing: .03em; }
.sb-code em { font-style: normal; color: #FF8A8F; }
.sb-main { display: grid; grid-template-columns: 1fr 220px 1fr; align-items: center; gap: 24px; }
.sb-team { display: flex; align-items: center; gap: 16px; min-width: 0; }
.sb-away { flex-direction: row-reverse; text-align: right; }
.sb-name { display: grid; font-size: clamp(18px, 2.4vw, 26px); font-weight: 700; line-height: 1.25; }
[data-lang="en"] .sb-name { font: 800 clamp(24px, 3vw, 36px)/1.05 var(--display); }
.sb-name a { text-decoration: none; }
.sb-name small { font: 400 12px var(--body); color: var(--on-board-2); margin-top: 3px; }
.sb-team.lost .sb-name a { color: var(--on-board-2); }
.sb-team.lost .badge { opacity: .6; }
.sb-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; justify-items: center; column-gap: 8px; background: var(--board); padding: 6px 4px; }
.sb-num { font: 900 clamp(60px, 9vw, 104px)/.88 var(--display); font-variant-numeric: tabular-nums; }
.sb-num.lost { color: var(--on-board-2); }
.sb-dash { font: 700 36px var(--display); color: var(--on-board-2); }
.sb-time { grid-column: 1 / -1; font: 800 56px/1 var(--display); color: var(--on-board); }
.sb-status { grid-column: 1 / -1; font-size: 13px; color: var(--on-board-2); margin-top: 8px; }
.sb-facts { display: flex; flex-wrap: wrap; gap: 10px 34px; margin: 26px 0 0; padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--on-board) 18%, transparent); }
.sb-facts div { display: grid; }
.sb-facts dt { font-size: 12px; color: var(--on-board-2); }
.sb-facts dd { margin: 0; font-weight: 500; }
.sb-sheet { margin: 18px 0 0; }
.btn { display: inline-block; text-decoration: none; font-weight: 500; padding: 9px 16px; border-radius: 3px; background: var(--board); color: var(--on-board); }
.btn:hover { color: var(--on-board); filter: brightness(1.15); }
.board-band .btn { background: var(--on-board); color: var(--board); }
.board-band .btn:hover { color: var(--board); }
.game-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 24px; }
.game-body .span-all { grid-column: 1 / -1; }
.game-body .bk-game { width: auto; }
.feeders { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }

/* box score */
.box-wrap { padding-bottom: 0; }
.box { background: var(--surface); border-top: 4px solid var(--board); padding: 18px 22px 22px; }
.box-title { font-size: 20px; margin-bottom: 14px; }
[data-lang="en"] .box-title { font: 800 28px var(--display); }
.box h3 { font-size: 15px; margin: 0 0 8px; }
[data-lang="en"] .box h3 { font: 800 19px var(--display); letter-spacing: .01em; }
.note.warn { color: var(--down); margin: 0 0 12px; }
.box-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; }
.linescore, .mini { width: 100%; border-collapse: collapse; font-size: 14px; }
.linescore th, .linescore td, .mini th, .mini td { padding: 7px 6px; text-align: center; white-space: nowrap; }
.linescore thead th, .mini thead th { font-size: 12px; font-weight: 500; color: var(--ink-3); border-bottom: 2px solid var(--rule-strong); }
.linescore tbody tr + tr, .mini tbody tr + tr { border-top: 1px solid var(--rule); }
.linescore tbody th, .mini tbody th { text-align: left; font-weight: 500; }
.linescore tbody th { display: flex; align-items: center; gap: 9px; }
.linescore td { font: 700 19px var(--display); color: var(--ink-2); }
.linescore .ls-t { font: 900 24px var(--display); color: var(--ink); background: color-mix(in srgb, var(--crease) 55%, transparent); }
.linescore thead .ls-t, .linescore thead .ls-sog { font: 500 12px var(--body); }
.linescore tr:not(.won) .ls-t { color: var(--ink-3); }
.linescore .ls-sog { color: var(--ink-3); font-size: 16px; }
.mini td { font-variant-numeric: tabular-nums; }
.box-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 26px; }
.events { list-style: none; margin: 0; padding: 0; }
.ev-period { font: 700 12px var(--body); color: var(--ink-3); padding: 10px 0 4px; border-bottom: 1px solid var(--rule); }
[data-lang="en"] .ev-period { font: 800 14px var(--display); letter-spacing: .04em; }
.ev { display: grid; grid-template-columns: 50px auto 1fr; align-items: start; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.ev-time { font: 700 16px/22px var(--display); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ev .badge { margin-top: 1px; }
.ev-body { display: grid; line-height: 1.35; }
.ev-body b { font-weight: 500; }
.ev-body small { color: var(--ink-3); font-size: 12px; }
.jn { font: 700 13px var(--display); color: var(--ink-3); margin-right: 5px; letter-spacing: .02em; }
.tag.sit { color: var(--red); box-shadow: inset 0 0 0 1px currentColor; font-weight: 700; font-size: 10px; }
.mins { color: var(--ink-2); }
.lineups-h { margin-top: 28px !important; }
.lineups { margin-top: 6px; }
.lineups h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 14px; }
.roster .jn-c { font: 700 14px var(--display); color: var(--ink-3); width: 30px; }
.roster th[scope="row"] { width: 100%; }
.cap { font: 700 11px var(--display); color: var(--red); }
.refs { display: flex; flex-wrap: wrap; gap: 8px 30px; margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 14px; }
.refs div { display: grid; }
.refs dt { font-size: 12px; color: var(--ink-3); }
.refs dd { margin: 0; }

/* stats */
.leaders { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 10px 0 30px; }
.leader { background: var(--surface); border-top: 3px solid var(--board); padding: 12px 16px 10px; }
.leader h3 { font-size: 14px; margin-bottom: 6px; color: var(--ink-2); }
[data-lang="en"] .leader h3 { font: 800 18px var(--display); color: var(--ink); }
.leader ol { list-style: none; margin: 0; padding: 0; }
.leader li { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--rule); }
.leader li:first-child { border-top: 0; }
.ld-rank { font: 700 15px var(--display); color: var(--ink-3); }
.ld-who { display: grid; min-width: 0; }
.ld-who b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-who small { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; }
.ld-who small .badge { width: 28px; height: 17px; font-size: 10px; }
.ld-val { font: 900 26px var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.leader li:first-child .ld-val { color: var(--red); }
.sub-h { font-size: 18px; margin: 26px 0 10px; }
[data-lang="en"] .sub-h { font: 800 26px var(--display); }
.table-tools { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 10px; }
.table-tools label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.table-tools select { font: 500 14px var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 3px; padding: 5px 8px; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
.stats-table th, .stats-table td { padding: 7px 7px; text-align: center; white-space: nowrap; }
.stats-table thead th { font-size: 12px; font-weight: 500; color: var(--ink-3); border-bottom: 2px solid var(--rule-strong); position: relative; }
.stats-table thead th[data-sort] { cursor: pointer; user-select: none; }
.stats-table thead th[data-sort]:hover { color: var(--ink); }
.stats-table thead th.is-sorted { color: var(--ink); box-shadow: inset 0 -3px 0 var(--red); }
.stats-table tbody tr + tr { border-top: 1px solid var(--rule); }
.stats-table td { font-variant-numeric: tabular-nums; }
.stats-table .c-player { text-align: left; font-weight: 500; width: 100%; }
.stats-table .c-rank { color: var(--ink-3); font: 700 15px var(--display); width: 30px; }
.stats-table .c-pts { font: 900 18px var(--display); background: color-mix(in srgb, var(--crease) 55%, transparent); }
.stats-table thead .c-pts { font: 500 12px var(--body); }
.stats-table .pos { color: var(--ink-3); font-size: 11px; }
.stats-table .c-tm a { display: inline-flex; }
.goalie-mini { margin-top: 16px; }

.site-foot { border-top: 4px solid var(--board); background: var(--surface); padding: 22px 0 30px; font-size: 13px; color: var(--ink-3); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; }
.foot-row p { margin: 0; }
.not-found { text-align: center; padding: 80px var(--gutter); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .home-grid, .game-body, .box-grid, .box-cols { grid-template-columns: 1fr; }
  .game-row { grid-template-columns: 1fr; gap: 4px; }
  .gr-meta { flex-direction: row; gap: 8px; align-items: baseline; }
  .gr-venue { text-align: left; }
  .pool-champs li + li { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
}
@media (max-width: 820px) {
  .head-row { flex-wrap: wrap; gap: 0 12px; padding-top: 8px; }
  .main-nav { order: 3; width: calc(100% + var(--gutter) * 2); margin: 4px calc(var(--gutter) * -1) 0; padding: 0 calc(var(--gutter) - 10px); overflow-x: auto; scrollbar-width: none; min-height: 40px; }
  .main-nav a { padding: 0 10px; white-space: nowrap; }
  .main-nav a[aria-current="page"]::after { left: 10px; right: 10px; }
  .head-tools { margin-left: auto; }

  /* The rink, end-on: zones stack top and bottom, lines run across. */
  .rink { grid-template-columns: 1fr; grid-template-rows: auto 150px auto; border-radius: 90px / 110px; min-height: 0; }
  .goal-line { width: auto; height: 2px; left: 0; right: 0; }
  .goal-line.l { top: 26px; bottom: auto; left: 0; }
  .goal-line.r { bottom: 26px; top: auto; right: 0; }
  .crease { left: 50% !important; right: auto !important; top: auto; width: 56px; height: 26px; margin: 0 0 0 -28px; }
  .crease.l { top: 26px; border: 2px solid var(--red); border-top: 0; border-radius: 0 0 28px 28px; }
  .crease.r { bottom: 26px; border: 2px solid var(--red); border-bottom: 0; border-radius: 28px 28px 0 0; }
  .fo { display: none; }
  .rink-zone, .rink-right { padding: 50px 22px 22px; }
  .rink-games { max-width: none; }
  .rink-right { padding: 22px 22px 50px; }
  .rink-center { border: 0; border-top: 5px solid var(--blue-line); border-bottom: 5px solid var(--blue-line); }
  .rink-center::before { top: 50%; bottom: auto; left: 0; right: 0; width: auto; height: 6px; margin: -3px 0 0; }
  .faceoff { width: 116px; height: 116px; }
  .fo-num { font-size: 42px; }

  .sb-main { grid-template-columns: 1fr; gap: 12px; }
  .sb-team, .sb-away { flex-direction: row; text-align: left; }
  .sb-score { order: 3; justify-self: start; padding: 0; }
  .sb-away { order: 2; }
  .band-lines { display: none; }
  .badge.xl { width: 64px; height: 46px; font-size: 23px; }
  .team-stats { width: 100%; justify-content: space-between; }
}
@media (max-width: 560px) {
  .brand-sub { display: none; }
  .gr-match { gap: 6px; }
  .side { gap: 6px; }
  .side .badge { display: none; }
  .score { min-width: 62px; font-size: 21px; }
  .c-hide-sm, .standings .c-gd { display: none; }
  .standings .c-team .badge { display: none; }
  .standings th, .standings td { padding: 8px 4px; }
  .panel, .division, .day, .group, .box { padding-left: 14px; padding-right: 14px; }
  .linescore .ls-name { display: none; }
  .linescore tbody th .badge { display: inline-grid !important; }
  .team-stats { gap: 12px; padding: 10px 14px; }
  .team-stats dd { font-size: 28px; }
}
@media (prefers-reduced-motion: no-preference) {
  .faceoff { animation: drop .7s cubic-bezier(.2, .8, .2, 1) .1s both; }
  @keyframes drop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
}
