:root{color-scheme:dark;--bg:#080d15;--surface:#111925;--surface-2:#172231;--surface-3:#202e40;--line:#263548;--text:#f3f6fb;--muted:#8c9bad;--dim:#5d6d80;--accent:#f5c84b;--blue:#55a8ff;--green:#43d18a;--danger:#ff727b;--radius:18px;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}*{box-sizing:border-box}html,body{margin:0;height:100%;min-height:100%;overflow:hidden;background:radial-gradient(circle at 50% -10%,#1b2b41 0,#0b121d 34%,var(--bg) 68%);color:var(--text)}body{font-size:15px}.app-shell{width:100%;max-width:430px;height:100svh;min-height:100svh;margin:auto;position:relative;padding-bottom:calc(82px + env(safe-area-inset-bottom));overflow:hidden;display:flex;flex-direction:column}.topbar{height:80px;flex:0 0 auto;display:flex;align-items:center;padding:19px 20px 13px;border-bottom:1px solid rgba(77,99,124,.22)}.brand-mark{width:39px;height:39px;border-radius:13px;background:linear-gradient(145deg,#f5ce54,#d79720);display:grid;place-items:center;box-shadow:0 6px 18px #c88b293b;font-size:20px;transform:rotate(-7deg)}.brand-mark span{transform:rotate(7deg)}.brand-copy{margin-left:11px;line-height:1}.brand-copy h1{font-size:18px;letter-spacing:-.4px;margin:6px 0 0}.brand-copy h1 strong{color:var(--accent);font-weight:750}.eyebrow{font-size:9px;letter-spacing:1.5px;color:var(--muted);font-weight:700;margin:0}.accent{color:var(--accent)}.icon-button,.round-button{margin-left:auto;border:1px solid var(--line);background:var(--surface);color:var(--muted);border-radius:50%;width:34px;height:34px;font-size:17px;cursor:pointer}.content{padding:22px 16px 8px;flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}.panel{display:none;animation:fade-in .22s ease}.panel.is-active{display:block}@keyframes fade-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}h2{font-size:28px;line-height:1;margin:7px 0 0;letter-spacing:-1.1px}.section-heading{display:flex;justify-content:space-between;align-items:flex-start;margin:2px 4px 20px}.section-heading .pill{margin-top:4px}.day-switcher{height:61px;border:1px solid var(--line);background:linear-gradient(105deg,#121d2b,#0f1825);border-radius:17px;display:flex;align-items:center;justify-content:space-between;padding:0 8px;box-shadow:0 7px 24px #0000001e}.selected-day{text-align:center;display:flex;flex-direction:column;gap:4px}.selected-day span{font-weight:750;font-size:14px}.selected-day small{font-size:11px;color:var(--muted)}.day-arrow{border:0;background:var(--surface-2);color:var(--muted);border-radius:10px;width:37px;height:37px;font-size:25px;line-height:1;cursor:pointer}.result-summary{height:39px;display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.5px}.result-summary span:first-child{color:var(--text);font-weight:700}.live-dot{width:6px;height:6px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px #43d18a1c}.games-list{display:flex;flex-direction:column;gap:10px}.game-card{border:1px solid var(--line);background:linear-gradient(115deg,#131d2a,#0f1722);border-radius:17px;overflow:hidden;position:relative}.game-meta{height:31px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;color:var(--muted);font-size:10px;border-bottom:1px solid #243243;text-transform:uppercase;letter-spacing:.5px}.status{font-weight:800;letter-spacing:.6px}.status.final{color:var(--muted)}.status.live{color:var(--green)}.status.future{color:var(--blue)}.status.preseason{color:var(--accent)}.game-body{display:grid;grid-template-columns:1fr 54px 1fr;align-items:center;min-height:86px;padding:10px 12px}.team{display:flex;align-items:center;gap:9px;min-width:0}.team.away{flex-direction:row-reverse;text-align:right}.team-info{min-width:0}.team-name{display:block;font-size:12px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.team-nick{display:block;color:var(--text);font-size:10px;margin-top:3px}.logo{width:34px;height:34px;object-fit:contain;flex:0 0 34px}.game-score{text-align:center}.score{font-size:21px;font-weight:800;letter-spacing:-.8px;white-space:nowrap}.score.time{font-size:14px;color:var(--blue);letter-spacing:0}.period{font-size:9px;color:var(--muted);margin-top:4px}.score-divider{display:block;color:var(--dim);font-size:13px;line-height:10px}.pill{display:inline-flex;border-radius:999px;background:#253246;color:var(--muted);font-size:10px;font-weight:800;padding:6px 9px;letter-spacing:.5px}.segmented{display:flex;background:#111a27;border:1px solid var(--line);border-radius:12px;padding:3px;margin-bottom:16px}.segment{flex:1;border:0;border-radius:9px;background:transparent;color:var(--muted);font-size:11px;font-weight:700;padding:10px 5px;cursor:pointer}.segment.is-selected{background:var(--surface-3);color:var(--text);box-shadow:0 3px 10px #0003}.standings-list,.leader-list{display:flex;flex-direction:column;gap:8px}.division-block{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:#111a27}.division-title{display:flex;justify-content:space-between;align-items:center;padding:12px 13px;background:#162333;font-size:11px;font-weight:800}.division-title span{font-size:9px;color:var(--muted);font-weight:600}.standing-row{display:grid;grid-template-columns:23px 1fr 35px 35px;gap:6px;align-items:center;padding:11px 13px;border-top:1px solid #253243;color:var(--muted);font-size:11px}.standing-row:first-of-type{border-top:0}.standing-row .rank{color:var(--dim);font-weight:700}.standing-row strong{color:var(--text);font-size:12px}.standing-row em{font-style:normal;text-align:center}.standing-head{display:grid;grid-template-columns:23px 1fr 35px 35px;padding:8px 13px 5px;color:var(--dim);font-size:9px;text-transform:uppercase}.leader-card{display:grid;grid-template-columns:28px 40px minmax(0,1fr) auto;gap:10px;align-items:center;border:1px solid var(--line);background:linear-gradient(115deg,#131e2c,#101823);border-radius:16px;padding:12px 13px}.player-rank{color:var(--dim);font-size:11px;font-weight:800;text-align:center}.player-avatar{width:37px;height:37px;border-radius:12px;background:linear-gradient(145deg,#375f85,#192b40);display:grid;place-items:center;font-size:12px;font-weight:800;color:#cbe6ff}.player-copy strong{font-size:13px;display:block}.player-copy span{color:var(--muted);font-size:10px;display:block;margin-top:3px}.player-stat{text-align:right}.player-stat strong{font-size:19px;color:var(--accent);display:block}.player-stat span{color:var(--muted);font-size:9px}.settings-group{margin-top:24px}.group-label{font-size:9px;color:var(--dim);font-weight:800;letter-spacing:1.2px;margin:0 8px 8px}.settings-card{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid var(--line);background:linear-gradient(105deg,#131e2c,#101823);min-height:58px}.settings-group .settings-card+.settings-card{border-top:0}.settings-card:first-of-type{border-radius:15px 15px 0 0}.settings-card:last-child{border-radius:0 0 15px 15px}.profile-card{border-radius:16px!important}.profile-icon,.settings-avatar{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#e3b633;color:#16202b;font-weight:850}.setting-copy{display:flex;flex-direction:column;gap:4px;flex:1}.setting-copy strong{font-size:12px}.setting-copy span,.profile-card span{font-size:10px;color:var(--muted)}.profile-card strong{display:block;font-size:13px;margin-bottom:4px}.chevron{color:var(--dim);font-size:23px;line-height:1}.toggle{position:relative;width:39px;height:23px;flex:0 0 auto}.toggle input{opacity:0;width:0;height:0}.toggle span{position:absolute;inset:0;background:#2a394b;border-radius:30px;transition:.2s}.toggle span:before{content:"";position:absolute;width:17px;height:17px;left:3px;top:3px;border-radius:50%;background:#aeb9c8;transition:.2s}.toggle input:checked+span{background:#c39725}.toggle input:checked+span:before{transform:translateX(16px);background:#fff}.settings-note{text-align:center;color:var(--dim);font-size:10px;line-height:1.6;margin:24px 0}.bottom-nav{position:fixed;z-index:10;bottom:0;left:50%;transform:translateX(-50%);width:min(430px,100%);display:grid;grid-template-columns:repeat(5,1fr);gap:2px;padding:9px 6px calc(9px + env(safe-area-inset-bottom));background:rgba(12,18,28,.93);border-top:1px solid #253346;backdrop-filter:blur(15px)}.nav-item{border:0;background:transparent;color:var(--dim);font:inherit;font-size:8px;font-weight:700;display:flex;flex-direction:column;align-items:center;gap:4px;padding:3px 2px;cursor:pointer;line-height:1.15;text-align:center}.nav-item.is-active{color:var(--accent)}.nav-icon{font-size:20px;height:21px;line-height:21px;font-weight:400}.toast{position:fixed;z-index:20;bottom:92px;left:50%;transform:translate(-50%,10px);opacity:0;pointer-events:none;background:#f4f6fa;color:#101721;border-radius:999px;padding:9px 15px;font-size:11px;font-weight:700;transition:.25s}.toast.visible{opacity:1;transform:translate(-50%,0)}@media(min-width:431px){body{padding:18px 0}.app-shell{border:1px solid #203044;border-radius:24px;height:calc(100svh - 36px);min-height:calc(100svh - 36px);box-shadow:0 20px 80px #0008}.bottom-nav{bottom:18px;border-radius:0 0 24px 24px}}
.game-card{cursor:pointer;transition:transform .18s ease,border-color .18s ease,background .18s ease}.game-card:hover,.game-card:focus-visible{transform:translateY(-2px);border-color:#49637f;background:linear-gradient(115deg,#182537,#111c2a);outline:none}.game-open-label{display:flex;justify-content:flex-end;align-items:center;gap:4px;padding:0 14px 9px;color:var(--dim);font-size:9px}.game-open-label span{font-size:17px;line-height:8px;color:var(--accent)}.app-shell.is-detail .bottom-nav{display:none}.detail-toolbar{display:flex;align-items:center;justify-content:space-between;margin:0 4px 18px}.back-button{border:0;background:transparent;color:var(--accent);font:inherit;font-size:12px;font-weight:750;padding:5px 0;cursor:pointer}.back-button:first-letter{font-size:25px;vertical-align:-2px}.detail-toolbar .pill{font-size:8px}.detail-hero{border:1px solid var(--line);background:linear-gradient(135deg,#172639,#101a27);border-radius:19px;padding:15px 12px 13px;text-align:center}.detail-status{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.7px}.detail-scoreboard{display:grid;grid-template-columns:1fr 76px 1fr;align-items:center;gap:5px;margin:16px 0 12px}.detail-team{display:flex;flex-direction:column;align-items:center;min-width:0}.detail-team strong{font-size:13px;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}.detail-team span{color:var(--accent);font-size:10px;margin-top:3px}.detail-logo{width:43px;height:43px;object-fit:contain;margin-bottom:7px}.detail-score strong{font-size:24px;letter-spacing:-1px;white-space:nowrap}.detail-score span{display:block;color:var(--muted);font-size:10px;margin-top:5px}.detail-venue{color:var(--muted);font-size:10px}.detail-section{margin-top:20px}.detail-section-title{display:flex;align-items:center;justify-content:space-between;margin:0 5px 9px}.detail-section-title h3{font-size:14px;margin:0}.detail-section-title span{background:var(--surface-3);color:var(--muted);font-size:10px;font-weight:800;border-radius:99px;padding:4px 7px}.scoring-list,.penalty-list,.goalie-lines{border:1px solid var(--line);border-radius:15px;overflow:hidden;background:#111a27}.scoring-row{display:grid;grid-template-columns:43px 32px 1fr;gap:9px;align-items:center;padding:10px 12px;border-top:1px solid #253243}.scoring-row:first-child,.penalty-row:first-child,.goalie-line:first-child{border-top:0}.event-time{color:var(--muted);font-size:9px;line-height:1.35}.event-time strong{color:var(--text);font-size:10px}.event-team{color:var(--accent);font-size:10px;font-weight:850}.scoring-row strong{display:block;font-size:11px}.scoring-row small{display:block;color:var(--muted);font-size:9px;line-height:1.35;margin-top:3px}.boxscore-table{border:1px solid var(--line);border-radius:15px;overflow:auto;background:#111a27}.boxscore-head,.boxscore-row{display:grid;grid-template-columns:minmax(70px,1.2fr) repeat(4,minmax(54px,1fr));min-width:325px;align-items:center;gap:5px;padding:9px 10px;font-size:9px;text-align:center}.boxscore-head{color:var(--dim);font-size:8px;text-transform:uppercase;line-height:1.15}.boxscore-row{border-top:1px solid #253243;color:var(--muted)}.boxscore-row strong{display:flex;align-items:center;gap:5px;color:var(--text);text-align:left}.boxscore-row img{width:20px;height:20px;object-fit:contain}.penalty-row{display:grid;grid-template-columns:63px 1fr;gap:3px 9px;padding:10px 12px;border-top:1px solid #253243}.penalty-row span,.penalty-row small{color:var(--muted);font-size:9px}.penalty-row strong{font-size:10px}.penalty-row small{grid-column:2}.goalie-line{display:grid;grid-template-columns:30px 1fr auto;gap:8px;align-items:center;padding:11px 12px;border-top:1px solid #253243}.line-team{color:var(--accent);font-size:10px;font-weight:850}.goalie-line strong{font-size:11px}.goalie-line span:last-child{color:var(--muted);font-size:9px;text-align:right}.detail-notice{display:flex;flex-direction:column;gap:6px;border:1px dashed #38506b;background:#111d2c;color:var(--text);border-radius:15px;padding:16px;margin-top:20px}.detail-notice span{color:var(--muted);font-size:11px;line-height:1.4}.empty-detail{padding:15px;color:var(--muted);font-size:11px;margin:0}.goalie-card{grid-template-columns:28px 40px minmax(0,1fr) auto;gap:8px}.goalie-avatar{background:linear-gradient(145deg,#5c4f2d,#2d281d);color:#ffe39b}.goalie-stats{display:flex;align-items:flex-start;gap:8px}.goalie-stats span{text-align:right;min-width:25px}.goalie-stats strong{display:block;color:var(--accent);font-size:14px}.goalie-stats small{display:block;color:var(--muted);font-size:8px;margin-top:2px}.goalie-card .player-copy span{white-space:nowrap}@media(max-width:370px){.goalie-card{grid-template-columns:24px 34px minmax(0,1fr) auto;gap:6px}.detail-scoreboard{grid-template-columns:1fr 66px 1fr}.boxscore-head,.boxscore-row{font-size:8px}}

/* Light theme: host theme or the Settings toggle sets data-theme on <html>. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-2: #e8edf4;
  --surface-3: #dce5ef;
  --line: #d2dce7;
  --text: #172231;
  --muted: #647386;
  --dim: #8795a5;
  --accent: #a97000;
  --blue: #1671c5;
  --green: #168b58;
  --danger: #c9404b;
}
:root[data-theme="light"] html,
:root[data-theme="light"] body {
  background: radial-gradient(circle at 50% -10%, #ffffff 0, #f4f7fb 34%, var(--bg) 68%);
  color: var(--text);
}
:root[data-theme="light"] .day-switcher { background: linear-gradient(105deg, #ffffff, #f1f5f9); box-shadow: 0 7px 24px #7180961c; }
:root[data-theme="light"] .game-card,
:root[data-theme="light"] .leader-card,
:root[data-theme="light"] .settings-card { background: linear-gradient(115deg, #ffffff, #f5f8fb); }
:root[data-theme="light"] .game-card:hover,
:root[data-theme="light"] .game-card:focus-visible { background: linear-gradient(115deg, #f7fbff, #edf4fa); border-color: #9eb6ca; }
:root[data-theme="light"] .game-meta { border-bottom-color: #dbe3ec; }
:root[data-theme="light"] .segmented { background: #f4f7fa; }
:root[data-theme="light"] .segment.is-selected { background: #dce6ef; box-shadow: 0 3px 10px #7180962b; }
:root[data-theme="light"] .division-block,
:root[data-theme="light"] .scoring-list,
:root[data-theme="light"] .penalty-list,
:root[data-theme="light"] .goalie-lines,
:root[data-theme="light"] .boxscore-table,
:root[data-theme="light"] .player-box-scroll { background: #ffffff; }
:root[data-theme="light"] .division-title { background: #edf3f8; }
:root[data-theme="light"] .standing-row,
:root[data-theme="light"] .scoring-row,
:root[data-theme="light"] .boxscore-row,
:root[data-theme="light"] .player-box-row,
:root[data-theme="light"] .penalty-row,
:root[data-theme="light"] .goalie-line { border-top-color: #e1e7ee; }
:root[data-theme="light"] .detail-hero { background: linear-gradient(135deg, #f5f9fc, #e9f0f6); }
:root[data-theme="light"] .match-card { background: linear-gradient(135deg, #f5f9fc, #e9f0f6); }
:root[data-theme="light"] .match-card .detail-hero { background: transparent; }
:root[data-theme="light"] .match-card-tabs { border-top-color: #d5e0ea; background: rgba(255, 255, 255, 0.55); }
:root[data-theme="light"] .match-tab + .match-tab { box-shadow: inset 1px 0 0 #d5e0ea; }
:root[data-theme="light"] .match-tab.is-selected { background: rgba(255, 255, 255, 0.72); color: var(--text); }
:root[data-theme="light"] .detail-notice { background: #f5f9fc; border-color: #a8bfd2; }
:root[data-theme="light"] .bottom-nav { background: rgba(255, 255, 255, .93); border-top-color: #d5dfe9; }
:root[data-theme="light"] .pill { background: #e1e9f1; }
:root[data-theme="light"] .day-arrow { background: #e7edf4; }
:root[data-theme="light"] .toast { background: #172231; color: #f4f7fb; }
:root[data-theme="light"] .app-shell { box-shadow: 0 20px 80px #7180962e; }
.day-arrow:disabled { opacity: .35; cursor: default; }

.empty-state {
  border: 1px dashed #38506b;
  background: #111d2c;
  border-radius: 15px;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}
.empty-state strong { font-size: 13px; }
.empty-state span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.panel-note {
  margin: -8px 4px 12px;
  color: var(--dim);
  font-size: 10px;
  min-height: 14px;
}
.source-pill {
  margin-left: auto;
  border-radius: 999px;
  background: #243246;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  padding: 3px 7px;
  letter-spacing: .4px;
}
.stats-boards {
  overflow-x: auto;
  flex-wrap: nowrap;
  gap: 2px;
  -webkit-overflow-scrolling: touch;
}
.stats-boards .segment {
  flex: 0 0 auto;
  min-width: 64px;
  white-space: nowrap;
  padding: 9px 10px;
}
:root[data-theme="light"] .empty-state { background: #f5f9fc; border-color: #a8bfd2; }
:root[data-theme="light"] .source-pill { background: #e1e9f1; }


/* All-time tab + period-grouped match events */
.period-groups{display:flex;flex-direction:column;gap:10px}
.period-block{border:1px solid var(--line);border-radius:15px;overflow:hidden;background:#111a27}
.period-heading{padding:8px 12px;background:#162333;color:var(--accent);font-size:11px;font-weight:850;letter-spacing:.6px}
.period-events{border:0;border-radius:0;background:transparent}
.period-events .scoring-row:first-child,
.period-events .penalty-row:first-child{border-top:0}
.nav-item span:last-child{max-width:72px}
:root[data-theme="light"] .period-block{background:#ffffff}
:root[data-theme="light"] .period-heading{background:#edf3f8}
@media(max-width:370px){
  .nav-item{font-size:7.5px}
  .nav-icon{font-size:18px}
}

/* Russian players are highlighted without depending on the active theme. */
:root {
  --russian-highlight: #ffda45;
  --russian-highlight-text: #241b00;
}
:root[data-theme="light"] {
  --russian-highlight: #ffd43d;
  --russian-highlight-text: #241b00;
}
:root[data-ru-highlight="on"] .player-name.russian-player,
:root[data-ru-highlight="on"] .player-box-row .player-name.russian-player,
:root[data-ru-highlight="on"] .player-box-row .col-name .player-name.russian-player {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--russian-highlight);
  color: var(--russian-highlight-text) !important;
  font-weight: 800;
  line-height: 1.25;
  box-shadow: 0 0 0 1px #8c690055;
}

/* Goal highlight play control (experimental; soft-fail when no clip URL). */
.scoring-copy{min-width:0}
.scoring-main{display:flex;align-items:center;gap:8px;justify-content:space-between}
.scoring-main strong{min-width:0}
.goal-play{
  flex:0 0 auto;
  border:1px solid #3d536b;
  background:linear-gradient(145deg,#2a3d55,#1a2838);
  color:var(--accent);
  border-radius:999px;
  width:28px;height:28px;
  font-size:11px;font-weight:800;
  line-height:1;
  padding:0 0 1px 1px;
  cursor:pointer;
}
.goal-play.is-open,.goal-play:hover{border-color:var(--accent);background:#314860}
.goal-video-slot{margin-top:8px}
.goal-video{
  display:block;
  width:100%;
  max-height:210px;
  border-radius:10px;
  background:#000;
  border:1px solid #2a3b4f;
}
:root[data-theme="light"] .goal-play{background:linear-gradient(145deg,#eef4fa,#dce6f0);border-color:#9eb4c8;color:var(--accent)}
:root[data-theme="light"] .goal-play.is-open,
:root[data-theme="light"] .goal-play:hover{background:#d5e3f0;border-color:var(--accent)}

/* Team / player detail + match recap + clickable entities */
.team-hit, .player-hit, .standing-row.team-hit, .leader-card.player-hit, .roster-row, .detail-team.team-hit, .player-team-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
  width: 100%;
  padding: 0;
}
.team .team-hit {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  width: auto;
}
.team.away .team-hit { flex-direction: row-reverse; text-align: right; }
.team-hit:hover .team-name,
.team-hit:focus-visible .team-name,
.detail-team.team-hit:hover strong,
.player-name.is-clickable:hover,
.player-hit:hover .player-copy strong {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.detail-team.team-hit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.player-name.is-clickable { cursor: pointer; }
.standing-row.team-hit {
  display: grid;
  grid-template-columns: 23px 1fr 35px 35px;
  gap: 6px;
  align-items: center;
  padding: 11px 13px;
  border-top: 1px solid #253243;
  color: var(--muted);
  font-size: 11px;
  width: 100%;
}
.leader-card.player-hit {
  display: grid;
  grid-template-columns: 28px 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  background: linear-gradient(115deg, #131e2c, #101823);
  border-radius: 16px;
  padding: 12px 13px;
  width: 100%;
  text-align: left;
}
.leader-card.goalie-card.player-hit { gap: 8px; }
.leader-card .player-copy {
  min-width: 0;
}
.leader-card .player-copy strong,
.leader-card .player-copy span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-avatar {
  position: relative;
  overflow: hidden;
  flex: 0 0 37px;
}
.player-avatar-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: inherit;
}
.player-avatar-initials {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.player-stat {
  flex: 0 0 auto;
  white-space: nowrap;
}

.team-hero, .player-hero {
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #172639, #101a27);
  border-radius: 19px;
  padding: 16px 14px;
  margin-bottom: 8px;
}
.team-hero-logo { width: 72px; height: 72px; object-fit: contain; flex: 0 0 72px; }
.team-hero-copy, .player-hero-copy { min-width: 0; flex: 1; }
.team-hero-copy h2, .player-hero-copy h2 { font-size: 22px; margin: 4px 0 8px; letter-spacing: -.6px; line-height: 1.1; }
.team-meta-line { margin: 0 0 4px; color: var(--muted); font-size: 11px; }
.team-record { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.team-record strong { font-size: 18px; color: var(--accent); }
.team-record span { color: var(--muted); font-size: 11px; }

.player-hero-photo {
  width: 84px; height: 84px; flex: 0 0 84px;
  border-radius: 18px; overflow: hidden;
  background: linear-gradient(145deg, #375f85, #192b40);
  display: grid; place-items: center;
  font-size: 22px; font-weight: 800; color: #cbe6ff;
}
.player-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.player-team-link {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 6px; color: var(--muted); font-size: 12px; width: auto;
}
.player-team-link img { width: 22px; height: 22px; object-fit: contain; }

.roster-group, .team-schedule, .info-grid {
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: #111a27;
}
.roster-heading {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; background: #162333; font-size: 11px; font-weight: 800;
}
.roster-heading span { color: var(--muted); font-size: 10px; }
.roster-row {
  display: grid; grid-template-columns: 36px 1fr 18px; gap: 8px; align-items: center;
  padding: 11px 12px; border-top: 1px solid #253243; width: 100%;
}
.roster-num { color: var(--dim); font-weight: 800; font-size: 12px; text-align: center; }
.roster-copy strong { display: block; font-size: 12px; }
.roster-copy span { color: var(--muted); font-size: 10px; }

.schedule-row {
  display: grid; grid-template-columns: 58px 1fr auto; gap: 8px; align-items: center;
  padding: 11px 12px; border-top: 1px solid #253243; font-size: 11px;
}
.schedule-row:first-child { border-top: 0; }
.schedule-date { color: var(--muted); font-size: 10px; }
.schedule-copy strong { display: block; font-size: 12px; }
.schedule-copy small { color: var(--muted); font-size: 9px; }
.schedule-result { color: var(--accent); font-weight: 800; font-size: 12px; white-space: nowrap; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stat-chip {
  border: 1px solid var(--line);
  background: #111a27;
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
}
.stat-chip strong { display: block; font-size: 16px; color: var(--accent); }
.stat-chip span { display: block; color: var(--text); font-size: 10px; font-weight: 800; margin-top: 4px; }
.stat-chip small { display: block; color: var(--muted); font-size: 9px; margin-top: 2px; }

.info-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 11px 12px; border-top: 1px solid #253243; font-size: 11px;
}
.info-row:first-child { border-top: 0; }
.info-row span { color: var(--muted); }
.info-row strong { color: var(--text); text-align: right; }

.recap-frame {
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: #0a1018;
}
.recap-video {
  display: block;
  width: 100%;
  max-height: 240px;
  background: #000;
}
.recap-caption {
  margin: 0;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 10px;
}
.recap-link {
  width: 100%;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #2a3d55, #1a2838);
  color: var(--accent);
  border-radius: 14px;
  padding: 14px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

:root[data-theme="light"] .team-hero,
:root[data-theme="light"] .player-hero { background: linear-gradient(135deg, #f5f9fc, #e9f0f6); }
:root[data-theme="light"] .roster-group,
:root[data-theme="light"] .team-schedule,
:root[data-theme="light"] .info-grid,
:root[data-theme="light"] .stat-chip { background: #ffffff; }
:root[data-theme="light"] .roster-heading { background: #edf3f8; }
:root[data-theme="light"] .roster-row,
:root[data-theme="light"] .schedule-row,
:root[data-theme="light"] .info-row,
:root[data-theme="light"] .standing-row.team-hit { border-top-color: #e1e7ee; }
:root[data-theme="light"] .recap-link { background: linear-gradient(145deg, #eef4fa, #dce6f0); border-color: #9eb4c8; }
:root[data-theme="light"] .player-hero-photo { background: linear-gradient(145deg, #d7e6f5, #b7cbe0); color: #1d3a57; }

/* Career history by club — club + stats columns; seasons as wrapping chips */
.career-history-table {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #111a27;
  overflow: hidden;
}
.career-history-head,
.career-history-row {
  display: grid;
  grid-template-columns: minmax(108px, 1.55fr) repeat(4, minmax(34px, .5fr));
  gap: 6px;
  align-items: start;
  padding: 10px 11px;
  text-align: center;
  font-size: 11px;
  min-width: 0;
}
.career-history-table.goalie-history .career-history-head,
.career-history-table.goalie-history .career-history-row {
  grid-template-columns: minmax(100px, 1.4fr) repeat(5, minmax(32px, .48fr));
}
.career-history-head {
  color: var(--dim);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.15;
  align-items: center;
}
.career-history-head span:first-child,
.career-club-cell { text-align: left; min-width: 0; }
.career-history-row {
  border-top: 1px solid #253243;
  color: var(--muted);
}
.career-club-cell strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
  word-break: break-word;
}
.season-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.season-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--muted);
  background: #1a2738;
  border: 1px solid #2c3d52;
  white-space: nowrap;
  line-height: 1.2;
}
.career-history-row > span {
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.career-history-section .detail-section-title span { white-space: nowrap; }
.career-history-section .career-history-row > span:last-child {
  color: var(--accent);
  font-weight: 800;
}
:root[data-theme="light"] .career-history-table { background: #ffffff; }
:root[data-theme="light"] .career-history-row { border-top-color: #e1e7ee; }
:root[data-theme="light"] .season-chip {
  background: #edf2f7;
  border-color: #d2dce7;
  color: #5a6b7c;
}
@media(max-width:370px) {
  .career-history-head,
  .career-history-row { font-size: 10px; gap: 4px; padding: 9px 8px; }
  .career-club-cell strong { font-size: 11px; }
  .season-chip { font-size: 8px; padding: 2px 6px; }
}

/* Schedule remind button */
.schedule-row {
  grid-template-columns: 58px 1fr auto;
}
.schedule-row.has-remind {
  grid-template-columns: 52px 1fr auto auto;
  gap: 6px;
}
.remind-btn {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 9px;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .2px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
}
.remind-btn.is-on {
  background: rgba(245, 200, 75, .16);
  border-color: rgba(245, 200, 75, .45);
  color: var(--accent);
}
:root[data-theme="light"] .remind-btn {
  background: #e8edf4;
  border-color: #d2dce7;
}
:root[data-theme="light"] .remind-btn.is-on {
  background: rgba(169, 112, 0, .12);
  border-color: rgba(169, 112, 0, .35);
  color: var(--accent);
}

.detail-status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.match-card .detail-status-row .remind-btn {
  flex: 0 0 auto;
}
.match-card .detail-hero .detail-status-row {
  margin-bottom: 2px;
}

/* Type scale bump (+1–2px) — layout-safe overrides */
.brand-copy h1 { font-size: 19px; }
h2 { font-size: 29px; }
.eyebrow { font-size: 10px; }
.selected-day span { font-size: 15px; }
.selected-day small { font-size: 12px; }
.result-summary { font-size: 12px; }
.game-meta { font-size: 11px; }
.team-name { font-size: 13px; }
.team-nick { font-size: 11px; }
.score { font-size: 22px; }
.score.time { font-size: 15px; }
.period { font-size: 10px; }
.pill { font-size: 11px; }
.segment { font-size: 12px; }
.division-title { font-size: 12px; }
.division-title span { font-size: 10px; }
.standing-row { font-size: 12px; }
.standing-row strong { font-size: 13px; }
.standing-head { font-size: 10px; }
.player-rank { font-size: 12px; }
.player-copy strong { font-size: 14px; }
.player-copy span { font-size: 11px; }
.player-stat strong { font-size: 20px; }
.player-stat span { font-size: 10px; }
.group-label { font-size: 10px; }
.setting-copy strong { font-size: 13px; }
.setting-copy span, .profile-card span { font-size: 11px; }
.profile-card strong { font-size: 14px; }
.nav-item { font-size: 9px; }
.nav-icon { font-size: 21px; height: 22px; line-height: 22px; }
.toast { font-size: 12px; }
.back-button { font-size: 13px; }
.detail-status { font-size: 11px; }
.detail-team strong { font-size: 14px; }
.detail-team span { font-size: 11px; }
.detail-score strong { font-size: 25px; }
.detail-score span, .detail-venue { font-size: 11px; }
.detail-section-title h3 { font-size: 15px; }
.detail-section-title span { font-size: 11px; }
.scoring-row strong { font-size: 12px; }
.scoring-row small, .event-time { font-size: 10px; }
.event-time strong, .event-team, .line-team { font-size: 11px; }
.boxscore-head, .boxscore-row { font-size: 10px; }
.boxscore-head { font-size: 9px; }
.player-box-head, .player-box-row { font-size: 10px; }
.player-box-head { font-size: 9px; }
.player-box-row .col-name { font-size: 11px; }
.penalty-row span, .penalty-row small { font-size: 10px; }
.penalty-row strong, .goalie-line strong { font-size: 11px; }
.goalie-line span:last-child { font-size: 10px; }
.detail-notice span, .empty-detail { font-size: 12px; }
.team-hero-copy h2, .player-hero-copy h2 { font-size: 23px; }
.team-meta-line, .team-record span { font-size: 12px; }
.team-record strong { font-size: 19px; }
.player-team-link { font-size: 13px; }
.roster-heading { font-size: 12px; }
.roster-heading span { font-size: 11px; }
.roster-num { font-size: 13px; }
.roster-copy strong { font-size: 13px; }
.roster-copy span { font-size: 11px; }
.schedule-date { font-size: 11px; }
.schedule-copy strong { font-size: 13px; }
.schedule-copy small { font-size: 10px; }
.schedule-result { font-size: 13px; }
.stat-chip strong { font-size: 17px; }
.stat-chip span { font-size: 11px; }
.stat-chip small { font-size: 10px; }
.info-row { font-size: 12px; }
.settings-note { font-size: 11px; }
.game-open-label { font-size: 10px; }

/* Individual player awards — grouped by trophy with winning seasons. */
.awards-list {
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: #111a27;
}
.award-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border-top: 1px solid #253243;
}
.award-row:first-child { border-top: 0; }
.award-copy { min-width: 0; flex: 1; }
.award-copy strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  line-height: 1.3;
}
.award-years {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.award-year {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--accent);
  background: #2a2719;
  border: 1px solid #62552a;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.2;
}
.award-count {
  flex: 0 0 auto;
  min-width: 24px;
  padding-top: 1px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  text-align: right;
}
:root[data-theme="light"] .awards-list { background: #ffffff; }
:root[data-theme="light"] .award-row { border-top-color: #e1e7ee; }
:root[data-theme="light"] .award-year {
  background: #fff8df;
  border-color: #e8d58c;
  color: #806617;
}
@media(max-width:370px) {
  .award-copy strong { font-size: 11px; }
  .award-year { font-size: 8px; padding: 2px 6px; }
}

/* Player nationality flag next to name */
.player-hero-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.player-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  line-height: 1;
}
.player-flag-emoji {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.25));
}
.player-flag-img {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid rgba(120, 140, 160, .35);
  display: block;
}
/* Hidden when emoji is present; kept in DOM as soft fallback for sparse emoji fonts. */
.player-flag-img-fallback {
  display: none;
}
.player-flag:not(:has(.player-flag-emoji)) .player-flag-img-fallback {
  display: block;
}

/* Grouped trophies (national + club); individual awards stay separate */
.trophy-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.trophy-group-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 2px 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.trophy-group-title span {
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 700;
}
.trophy-medal {
  margin-right: 4px;
}
.trophy-sub {
  color: var(--muted);
  font-weight: 650;
}
:root[data-theme="light"] .trophy-group-title { color: #5d7188; }
:root[data-theme="light"] .player-flag-img { border-color: #b7c6d6; }
@media(max-width:370px) {
  .player-flag-emoji { font-size: 18px; }
  .player-flag-img { width: 18px; height: 13px; }
}


/* Team retired numbers + cap */
.retired-list { display: grid; gap: 8px; }
.retired-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--card, #1c1c1e) 92%, #fff 8%);
}
.retired-number {
  font-weight: 800; font-variant-numeric: tabular-nums;
  min-width: 2.5rem; color: var(--accent, #ffd60a);
}
.retired-name { font-size: 0.95rem; color: #f3f6fb; }
.team-cap-section .info-grid,
.player-contract-section .info-grid { margin-top: 4px; }


/* Favorites */
:root {
  --fav-glow: #f0b429;
  --fav-bg: rgba(240, 180, 41, 0.16);
  --fav-line: rgba(240, 180, 41, 0.55);
}
:root[data-theme="light"] {
  --fav-glow: #c88a00;
  --fav-bg: rgba(245, 200, 75, 0.28);
  --fav-line: rgba(200, 138, 0, 0.45);
}
.fav-toggle {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  border-radius: 999px;
  min-width: 42px;
  height: 34px;
  padding: 0 12px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
}
.fav-toggle.is-on {
  color: #1a1400;
  background: linear-gradient(145deg, #ffd76a, #e0a820);
  border-color: #c9971c;
  box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.18);
}
.player-hero-actions, .team-hero-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.standing-row.is-favorite,
.leader-card.is-favorite,
.roster-row.is-favorite {
  border-color: var(--fav-line) !important;
  background: linear-gradient(115deg, rgba(240,180,41,0.14), rgba(17,26,39,0.92)) !important;
  box-shadow: inset 3px 0 0 var(--fav-glow);
}
.team-hit.is-favorite .team-name,
.team.is-favorite .team-name,
.team.is-favorite .team-nick,
.detail-team.is-favorite strong,
.player-name.is-favorite {
  color: var(--fav-glow) !important;
}
.player-name.is-favorite {
  text-shadow: 0 0 12px rgba(240, 180, 41, 0.25);
}
.favorites-list { display: flex; flex-direction: column; }
.favorites-list .settings-card { cursor: default; }
.favorites-empty {
  border: 1px dashed var(--line);
  border-radius: 15px;
  padding: 14px;
  color: var(--muted);
  font-size: 11px;
  background: #111a27;
}
.fav-remove {
  border: 0;
  background: rgba(255, 114, 123, 0.12);
  color: var(--danger);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  margin-left: 4px;
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  position: relative;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.fav-remove:active {
  background: rgba(255, 114, 123, 0.28);
}
.fav-open {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 0;
}
.fav-open strong { font-size: 12px; color: var(--text); }
.fav-open span { font-size: 10px; color: var(--muted); }
:root[data-theme="light"] .standing-row.is-favorite,
:root[data-theme="light"] .leader-card.is-favorite,
:root[data-theme="light"] .roster-row.is-favorite {
  background: linear-gradient(115deg, rgba(245,200,75,0.35), #f7fbff) !important;
}

/* Telegram Stars tip card in Settings (hidden on Max). */
.settings-link-card {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: 15px !important;
}
.settings-link-card:hover,
.settings-link-card:focus-visible {
  border-color: #49637f;
  outline: none;
}

/* Match card shell: score header + Обзор | Статистика tabs + content */
.match-card {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #172639, #101a27);
  border-radius: 19px;
  overflow: hidden;
}
.match-card .detail-hero {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding-bottom: 12px;
}
.match-card-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #243243;
  background: rgba(8, 13, 21, 0.28);
}
.match-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .2px;
  padding: 12px 8px 11px;
  cursor: pointer;
  position: relative;
}
.match-tab + .match-tab { box-shadow: inset 1px 0 0 #243243; }
.match-tab.is-selected { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.match-tab.is-selected::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
}
.match-card-body { padding: 2px 12px 16px; }
.match-card .detail-section:first-child,
.match-card .game-tab-panel > .detail-section:first-child,
.match-card .game-tab-panel > .detail-notice { margin-top: 14px; }
.match-card .box-team-tabs { margin-top: 14px; margin-bottom: 10px; }
.match-card .detail-notice { margin-top: 0; }
.box-team-tabs { margin-top: 8px; }
.game-tab-panel[hidden],
.box-team-panel[hidden] { display: none !important; }
.player-box-scroll {
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #111a27;
}
.player-box-table {
  width: max-content;
  min-width: max(100%, 620px);
}
.player-box-table.goalie-box-table { min-width: max(100%, 420px); }
.player-box-head,
.player-box-row {
  display: grid;
  grid-template-columns: var(--player-box-cols);
  gap: 4px;
  align-items: center;
  padding: 8px 10px;
  text-align: center;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.player-box-head {
  color: var(--dim);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .2px;
  line-height: 1.15;
  position: sticky;
  top: 0;
  background: #162333;
  z-index: 1;
}
.player-box-row {
  border-top: 1px solid #253243;
  color: var(--muted);
}
.player-box-row .col-num,
.player-box-head .col-num {
  text-align: center;
  color: var(--dim);
  font-weight: 700;
}
.player-box-row .col-name,
.player-box-head .col-name {
  text-align: left;
  min-width: 0;
}
.player-box-row .col-name {
  color: var(--text);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-box-row .col-toi { white-space: nowrap; }

/* Penalties stay compact in the match overview until expanded. */
.penalties-accordion {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #111a27;
  overflow: hidden;
}
.penalties-accordion summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}
.penalties-accordion summary::-webkit-details-marker { display: none; }
.penalties-accordion summary::after {
  content: '⌄';
  float: right;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  transition: transform .18s ease;
}
.penalties-accordion[open] summary {
  border-bottom: 1px solid var(--line);
}
.penalties-accordion[open] summary::after { transform: rotate(180deg); }
.penalties-accordion > .period-groups { padding: 10px; }
:root[data-theme="light"] .penalties-accordion { background: #ffffff; }


/* —— Three Stars of the game —— */
.three-stars-section .detail-section-title h3 {
  font-size: 22px;
  letter-spacing: -0.5px;
  font-weight: 800;
}
.three-stars-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 2px 2px;
}
.three-star-row {
  display: grid;
  grid-template-columns: 42px 64px 1fr;
  gap: 12px;
  align-items: center;
}
.three-star-rank {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  line-height: 1.1;
}
.three-star-icon {
  color: #f5c518;
  font-size: 22px;
  line-height: 1;
  text-shadow: 0 1px 6px #f5c51855;
}
.three-star-copy { min-width: 0; }
.three-star-name {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
  line-height: 1.2;
}
.three-star-name .player-name { font-size: inherit; font-weight: inherit; }
.three-star-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}
.three-star-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.three-star-stat strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
  line-height: 1.1;
}
.three-star-stat span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
/* Goalie three-star values only. Column count matches the cells rendered
   (SV GA SV% TOI, plus G when the goalie scored) so numbers stay in their
   own cell instead of overflowing into the next one. */
.three-star-stats.is-goalie {
  grid-template-columns: repeat(var(--star-cols, 4), minmax(0, 1fr));
  gap: 6px;
}
.three-star-stats.is-goalie .three-star-stat {
  overflow: hidden;
}
.three-star-stats.is-goalie .three-star-stat strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.35px;
}
@media (max-width: 370px) {
  .three-star-stats.is-goalie .three-star-stat strong { font-size: 12px; }
}
:root[data-ru-highlight="on"] .three-star-name .player-name.russian-player {
  background: transparent;
  box-shadow: none;
  padding: 0;
  color: #ffd43d !important;
}

/* Circular player mug with team logo badge */
.player-mug {
  --mug-size: 56px;
  --logo-size: 20px;
  position: relative;
  width: var(--mug-size);
  height: var(--mug-size);
  border-radius: 50%;
  background: var(--mug-color, #2a3d55);
  border: 2px solid color-mix(in srgb, var(--mug-color, #2a3d55) 70%, #fff 30%);
  box-shadow: inset 0 0 0 1px #0004;
  flex: 0 0 auto;
  overflow: visible;
}
.player-mug-lg { --mug-size: 64px; --logo-size: 22px; }
.player-mug-md { --mug-size: 52px; --logo-size: 18px; }
.player-mug-photo,
.player-mug-initials {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.player-mug-initials {
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(160deg, color-mix(in srgb, var(--mug-color) 80%, #fff), var(--mug-color));
}
.player-mug-logo {
  position: absolute;
  left: -2px;
  bottom: -2px;
  width: var(--logo-size);
  height: var(--logo-size);
  object-fit: contain;
  background: #0b121d;
  border-radius: 50%;
  border: 1.5px solid #1e2c3d;
  padding: 1px;
  box-shadow: 0 1px 4px #0008;
}
.goal-card .player-mug-logo {
  left: auto;
  right: -2px;
  bottom: -2px;
}

/* —— Redesigned Goals cards —— */
.goals-section .detail-section-title h3 {
  font-size: 22px;
  letter-spacing: -0.5px;
  font-weight: 800;
}
.goal-period-groups { gap: 16px; }
.goal-period-block {
  border: 0;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}
.goal-period-heading {
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  padding: 0 2px 8px;
}
.goal-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.goal-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #121a27;
  overflow: hidden;
}
.goal-card-top {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 12px 10px;
}
.goal-card-copy { min-width: 0; }
.goal-card-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.2px;
  line-height: 1.2;
}
.goal-card-name .player-name { font-size: inherit; font-weight: inherit; }
.goal-card-nth {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
  font-weight: 600;
}
.goal-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px 11px;
  border-top: 1px solid #243246;
}
.goal-card-assists {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  min-width: 0;
}
.goal-card-assists .player-name { color: inherit; font-weight: 650; }
.goal-card-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}
.goal-card .goal-video-slot { margin: 0 12px 12px; }
:root[data-ru-highlight="on"] .goal-card-name .player-name.russian-player {
  background: transparent;
  box-shadow: none;
  padding: 0;
  color: #ffd43d !important;
}
:root[data-theme="light"] .goal-card { background: #ffffff; }
:root[data-theme="light"] .goal-card-bottom { border-top-color: #d7e2ec; }
:root[data-theme="light"] .player-mug-logo { background: #fff; border-color: #c9d6e3; }
:root[data-theme="light"] .three-star-icon { color: #e0a800; }

@media (max-width: 370px) {
  .three-star-row { grid-template-columns: 36px 54px 1fr; gap: 8px; }
  .player-mug-lg { --mug-size: 54px; }
  .three-star-name { font-size: 15px; }
  .three-star-stat strong { font-size: 13px; }
  .goal-card-top { grid-template-columns: 48px 1fr; gap: 8px; }
  .player-mug-md { --mug-size: 46px; }
}

/* Match scores stay readable as one horizontal away | score | home row. */
.score-divider {
  display: inline;
  line-height: normal;
  margin: 0 2px;
}
.detail-scoreboard {
  grid-template-columns: minmax(0, 1fr) max-content minmax(0, 1fr);
}
.detail-team.team-hit {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  width: 100%;
}
.detail-team.away {
  justify-content: flex-end;
  text-align: right;
}
.detail-team.home {
  justify-content: flex-start;
  text-align: left;
}
.detail-team .detail-team-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-top: 0;
  color: inherit;
  font-size: inherit;
}
.detail-team strong {
  min-width: 0;
}
.detail-team .detail-team-nick {
  color: var(--accent) !important;
  font-size: 10px;
  margin-top: 3px;
}
.detail-logo {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  margin: 0;
}
@media (max-width: 370px) {
  .detail-scoreboard { grid-template-columns: minmax(0, 1fr) 62px minmax(0, 1fr); }
  .detail-logo { width: 32px; height: 32px; flex-basis: 32px; }
  .detail-team.team-hit { gap: 5px; }
}

/* Dark navy marks only (WSH wordmark, TOR leaf, TBL bolt). Other team logos are unchanged. */
:root:not([data-theme="light"]) img.logo-plate {
  background: #f4f7fb;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.78);
}
:root:not([data-theme="light"]) img.player-mug-logo.logo-plate {
  border-radius: 50%;
  background: #f4f7fb;
  border-color: #f4f7fb;
}
button.retired-row.player-hit {
  cursor: pointer;
}
button.retired-row.player-hit:hover .retired-name,
button.retired-row.player-hit:focus-visible .retired-name {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.retired-open {
  margin-left: auto;
  color: var(--dim);
  font-size: 18px;
  line-height: 1;
}

/* Month calendar — results day jump + team schedule. Does not touch match cards. */
.day-switcher { height: auto; min-height: 61px; }
.selected-day {
  position: relative;
  min-width: 150px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  border-radius: 12px;
  padding: 8px 52px 8px 14px;
}
.selected-day .calendar-opener {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--accent);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-50%);
}
.selected-day[aria-expanded="true"] { background: rgba(245, 200, 75, .1); }
.month-cal {
  margin: 8px 0 2px;
  border: 1px solid var(--line);
  background: linear-gradient(105deg, #121d2b, #0f1825);
  border-radius: 17px;
  padding: 10px 8px 8px;
}
.month-cal[hidden] { display: none; }
.month-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.month-cal-head strong {
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -.2px;
}
.month-cal-head .day-arrow { width: 34px; height: 34px; font-size: 22px; }
.month-cal-weekdays,
.month-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}
.month-cal-weekdays span {
  text-align: center;
  color: var(--dim);
  font-size: 10px;
  font-weight: 750;
  padding: 3px 0 5px;
}
.cal-pad { height: 36px; }
.cal-day {
  position: relative;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 0 4px;
}
.cal-day.has-games::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}
.cal-day.is-today { box-shadow: inset 0 0 0 1px rgba(245, 200, 75, .55); }
.cal-day.is-selected { background: var(--accent); color: #1a1404; }
.cal-day.is-selected.has-games::after { background: #1a1404; }
.cal-day:disabled { color: var(--dim); cursor: default; opacity: .45; }
.cal-day:not(:disabled):hover,
.cal-day:not(:disabled):focus-visible { background: rgba(85, 168, 255, .14); outline: none; }
.cal-day.is-selected:not(:disabled):hover,
.cal-day.is-selected:not(:disabled):focus-visible { background: var(--accent); }
.cal-note {
  margin: 8px 4px 2px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.cal-day-games { margin-top: 8px; }
.cal-day-games .team-schedule { border-radius: 12px; }
.schedule-row.is-openable { cursor: pointer; }
.schedule-row.is-openable:hover,
.schedule-row.is-openable:focus-visible { background: rgba(245, 200, 75, .08); outline: none; }
:root[data-theme="light"] .month-cal { background: linear-gradient(105deg, #ffffff, #f1f5f9); }
:root[data-theme="light"] .selected-day[aria-expanded="true"] { background: rgba(169, 112, 0, .1); }
:root[data-theme="light"] .cal-day:not(:disabled):hover,
:root[data-theme="light"] .cal-day:not(:disabled):focus-visible { background: rgba(29, 90, 150, .08); }
:root[data-theme="light"] .schedule-row.is-openable:hover,
:root[data-theme="light"] .schedule-row.is-openable:focus-visible { background: rgba(169, 112, 0, .08); }


/* Four-item bottom navigation: distribute the remaining tabs across the full bar. */
.bottom-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nav-item { min-width: 0; width: 100%; }
.nav-item span:last-child { max-width: none; white-space: nowrap; }

/* Detail panels hide the fixed nav and therefore do not reserve its old height. */
.app-shell.is-detail { padding-bottom: 0; }

/* Optional account login (PWA / browser). */
.account-card { display: flex; flex-direction: column; gap: 8px; }
.login-btn {
  width: 100%;
  border: 1px solid var(--line);
  background: linear-gradient(105deg, #131e2c, #101823);
  color: var(--text);
  border-radius: 15px;
  min-height: 52px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  text-align: left;
  padding: 12px 14px;
}
.login-btn small { display: block; color: var(--muted); font-size: 10px; font-weight: 600; margin-top: 3px; }
.login-btn:disabled { opacity: .6; cursor: default; }
.account-note { color: var(--dim); font-size: 11px; line-height: 1.45; margin: 2px 8px 0; }
.login-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(5, 8, 14, .72);
  display: grid;
  place-items: end center;
  padding: 16px;
}
.login-sheet[hidden] { display: none; }
.login-sheet-card {
  width: min(430px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 16px 14px;
  margin-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}
.login-sheet-card h3 { margin: 6px 0 0; font-size: 20px; letter-spacing: -.4px; }
.login-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 28px;
  letter-spacing: 3px;
  text-align: center;
  margin: 14px 0 8px;
}
.login-hint { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 0 0 8px; text-align: center; }
.login-primary, .login-ghost {
  width: 100%;
  border-radius: 12px;
  min-height: 44px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  margin-top: 8px;
}
.login-primary { border: 0; background: var(--accent); color: #16202b; }
.login-ghost { border: 1px solid var(--line); background: transparent; color: var(--muted); }
:root[data-theme="light"] .login-btn { background: linear-gradient(115deg, #ffffff, #f5f8fb); }
:root[data-theme="light"] .login-sheet { background: rgba(23, 34, 49, .35); }
:root[data-theme="light"] .login-primary { color: #1a1404; }

/* Installed PWA (standalone). On iOS the small/dynamic viewport
   (100svh, 100dvh, 100%, inset:0, -webkit-fill-available) is short by the
   status-bar inset, while 100vh/100lvh is the physical screen. A shell and
   a fixed tab bar anchored to that short viewport stop above the glass,
   leaving a blank band under the bar. Size the shell with the large
   viewport and keep the bar as the last flex child so it is flush with
   the bottom edge. Only the home-indicator inset is padding inside the bar.
   Not applied in a browser tab (lvh there includes retracted toolbars)
   or in the Telegram sheet. */
@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) {
  html, body {
    height: 100vh;
    height: 100lvh;
    min-height: 100vh;
    min-height: 100lvh;
    max-height: 100vh;
    max-height: 100lvh;
    margin: 0;
    padding: 0;
  }
  .app-shell {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100lvh;
    min-height: 100vh;
    min-height: 100lvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding-bottom: 0;
  }
  .topbar {
    height: calc(80px + env(safe-area-inset-top, 0px));
    padding-top: calc(19px + env(safe-area-inset-top, 0px));
  }
  .bottom-nav {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-width: none;
    margin: 0;
    margin-top: auto;
    border-radius: 0;
    flex: 0 0 auto;
    padding: 8px 6px env(safe-area-inset-bottom, 0px);
  }
  .toast {
    bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  }
  .app-shell.is-detail {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}
html.is-standalone,
html.is-standalone body {
  height: 100vh;
  height: 100lvh;
  min-height: 100vh;
  min-height: 100lvh;
  max-height: 100vh;
  max-height: 100lvh;
  margin: 0;
  padding: 0;
}
html.is-standalone .app-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100lvh;
  min-height: 100vh;
  min-height: 100lvh;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding-bottom: 0;
}
html.is-standalone .topbar {
  height: calc(80px + env(safe-area-inset-top, 0px));
  padding-top: calc(19px + env(safe-area-inset-top, 0px));
}
html.is-standalone .bottom-nav {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  transform: none;
  width: 100%;
  max-width: none;
  margin: 0;
  margin-top: auto;
  border-radius: 0;
  flex: 0 0 auto;
  padding: 8px 6px env(safe-area-inset-bottom, 0px);
}
html.is-standalone .toast {
  bottom: calc(52px + env(safe-area-inset-bottom, 0px));
}
html.is-standalone .app-shell.is-detail {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
