/* Practice hub (/hockey/practice, /hockey/practice/match/{id}, /hockey/practice/player/{name}).
   The live stage and scoreboard come from hockey-server.css, the replay viewer from hockey-match.css. */
.hp { --hp-display: 'Oswald', 'Inter', system-ui, sans-serif; display: flex; flex-direction: column; gap: 28px; padding-bottom: 32px; }
.hp-muted { color: var(--text-muted); font-size: .86rem; }
.hp-back { align-self: flex-start; margin-bottom: -14px; color: var(--text-muted); font-size: .86rem; text-decoration: none; }
.hp-back:hover { color: var(--text); }

/* ── hero ───────────────────────────────────────────────────────────── */
.hp-hero {
    position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: center;
    padding: 30px 32px; border-radius: var(--radius-lg); border: 1px solid var(--border);
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(56, 217, 122, .16), transparent 55%),
        radial-gradient(90% 120% at 100% 100%, rgba(74, 144, 217, .18), transparent 60%),
        linear-gradient(180deg, #121821, #0e1218);
}
.hp-hero::after {   /* faint rink markings */
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .06;
    background:
        linear-gradient(90deg, transparent calc(50% - 2px), #d64545 calc(50% - 2px), #d64545 calc(50% + 2px), transparent calc(50% + 2px)),
        linear-gradient(90deg, transparent calc(30% - 2px), #3e7fd6 calc(30% - 2px), #3e7fd6 calc(30% + 2px), transparent calc(30% + 2px)),
        linear-gradient(90deg, transparent calc(70% - 2px), #3e7fd6 calc(70% - 2px), #3e7fd6 calc(70% + 2px), transparent calc(70% + 2px));
}
.hp-hero-main { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; }
.hp-kicker { font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.hp-hero h1 { margin: 0; font-family: var(--hp-display); font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1; text-transform: uppercase; letter-spacing: .02em; }
.hp-hero p { margin: 0; max-width: 46ch; color: var(--text-secondary); line-height: 1.55; }
.hp-hero .hs-status { margin-top: 4px; }
.hp-hero-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hp-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .06); backdrop-filter: blur(4px); }
.hp-tile b { font-family: var(--hp-display); font-size: 1.9rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.hp-tile span { color: var(--text-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.hp-tile-wide { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
.hp-vs { display: flex; align-items: baseline; gap: 6px; }
.hp-vs b { font-family: var(--hp-display); font-size: 1.6rem; }
.hp-vs small { color: var(--text-muted); margin-right: 8px; font-weight: 700; }
.hp-vs .w, .hp-w { color: var(--accent); }
.hp-vs .d, .hp-d { color: var(--yellow); }
.hp-vs .l, .hp-l { color: var(--red); }
@media (max-width: 760px) {
    .hp-hero { grid-template-columns: 1fr; padding: 22px 18px; }
}

/* ── sections ───────────────────────────────────────────────────────── */
.hp-section { display: flex; flex-direction: column; gap: 12px; }
.hp-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hp-sec-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; font-family: var(--hp-display); font-size: 1.35rem; text-transform: uppercase; letter-spacing: .03em; }
.hp-sec-head h2::before { content: ''; width: 4px; height: 1.1em; border-radius: 2px; background: var(--accent); }
.hp-live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(240, 96, 92, .6); animation: hp-ping 1.8s infinite; }
@keyframes hp-ping { 70% { box-shadow: 0 0 0 9px rgba(240, 96, 92, 0); } 100% { box-shadow: 0 0 0 0 rgba(240, 96, 92, 0); } }
.hp-stage { max-height: 70vh; }

/* ── match cards ────────────────────────────────────────────────────── */
.hp-matches { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.hp-match {
    position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 12px 16px; overflow: hidden;
    border-radius: 12px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); text-decoration: none;
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.hp-match::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--h) 0 50%, var(--a) 50% 100%); }
.hp-match:hover { transform: translateY(-2px); border-color: var(--border-light); background: var(--bg-elevated); }
.hp-mtop, .hp-mfoot { display: flex; justify-content: space-between; gap: 8px; font-size: .76rem; color: var(--text-muted); }
.hp-mrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hp-mteam { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-secondary); }
.hp-mteam i { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.hp-mrow b { font-family: var(--hp-display); font-size: 1.35rem; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.hp-mrow.is-won .hp-mteam, .hp-mrow.is-won b { color: var(--text); }
.hp-mfoot { margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--border); align-items: center; }
.hp-play { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 6px; border-radius: 50%; background: var(--accent-subtle); color: var(--accent); font-size: .6rem; }
.hp-match:hover .hp-play { background: var(--accent); color: #06210f; }
.hp-result { display: inline-grid; place-items: center; min-width: 22px; height: 20px; border-radius: 5px; font-weight: 800; font-size: .72rem; color: #0b0d10; }
.hp-result.is-w { background: var(--accent); }
.hp-result.is-d { background: var(--yellow); }
.hp-result.is-l { background: var(--red); }
.hp-pager { display: flex; justify-content: center; gap: 8px; }

/* ── leaderboards ───────────────────────────────────────────────────── */
.hp-board { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.hp-board-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hp-board-bar:first-child { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.hp-board-bar:first-child::-webkit-scrollbar { display: none; }
.hp-board-bar:first-child .hp-seg { flex: none; }
.hp-seg { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--bg-elevated); border: 1px solid var(--border); }
.hp-seg button { border: 0; background: transparent; color: var(--text-secondary); font: 600 .8rem 'Inter', system-ui, sans-serif; padding: 6px 11px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.hp-seg button:hover { color: var(--text); background: var(--bg-hover); }
.hp-seg button.is-on { background: var(--accent); color: #06210f; }
.hp-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: .82rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text-secondary); }
.hp-check input { width: auto; margin: 0; accent-color: var(--accent); }
.hp-check select { width: auto; padding: 4px 8px; font-size: .82rem; }
.hp-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hp-pod {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px 14px; border-radius: 12px; text-decoration: none; color: var(--text);
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), transparent); border: 1px solid var(--border);
}
.hp-pod.is-1 { border-color: rgba(224, 177, 58, .55); background: linear-gradient(180deg, rgba(224, 177, 58, .16), transparent 70%); }
.hp-pod.is-2 { border-color: rgba(190, 200, 214, .4); }
.hp-pod.is-3 { border-color: rgba(205, 127, 50, .45); }
.hp-pod img { width: 56px; height: 56px; border-radius: 8px; image-rendering: pixelated; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
.hp-pod-rank { position: absolute; top: 8px; left: 10px; font-family: var(--hp-display); font-size: 1.1rem; color: var(--text-muted); }
.hp-pod.is-1 .hp-pod-rank { color: var(--yellow); }
.hp-pod-name { display: flex; align-items: center; gap: 6px; max-width: 100%; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-pod b { font-family: var(--hp-display); font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hp-pod small { color: var(--text-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.hp-table { font-size: .86rem; }
.hp-table th, .hp-table td { text-align: center; padding: 8px 10px; white-space: nowrap; }
.hp-table th:nth-child(2), .hp-table td:nth-child(2) { text-align: left; }
.hp-table .is-key { font-weight: 800; color: var(--accent); }
.hp-rank { color: var(--text-muted); font-variant-numeric: tabular-nums; width: 36px; }
.hp-who a { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; color: var(--text); text-decoration: none; font-weight: 600; }
.hp-who a:hover { color: var(--accent); }
.hp-who img { width: 20px; height: 20px; border-radius: 3px; image-rendering: pixelated; }
.hp-who .hp-bot { margin-left: 6px; }
.hp-wdl { color: var(--text-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
    .hp-podium { grid-template-columns: 1fr; }
    .hp-pod { flex-direction: row; justify-content: flex-start; padding: 10px 12px 10px 38px; }
    .hp-pod img { width: 36px; height: 36px; }
    .hp-pod b { margin-left: auto; font-size: 1.3rem; }
    .hp-pod small { display: none; }
    .hp-pod-rank { top: 50%; transform: translateY(-50%); }
}

/* ── bots ───────────────────────────────────────────────────────────── */
.hp-bot { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px; font-size: .68rem; font-weight: 800; letter-spacing: .04em; white-space: nowrap;
    color: #cbd5e1; background: rgba(148, 163, 184, .16); border: 1px solid rgba(148, 163, 184, .3); vertical-align: middle; font-family: 'Inter', system-ui, sans-serif; text-transform: none; }
.hp-bot.is-easy { color: #7ee2a8; background: rgba(56, 217, 122, .12); border-color: rgba(56, 217, 122, .35); }
.hp-bot.is-medium { color: #f2cf6b; background: rgba(224, 177, 58, .12); border-color: rgba(224, 177, 58, .35); }
.hp-bot.is-hard { color: #ff9a96; background: rgba(240, 96, 92, .12); border-color: rgba(240, 96, 92, .35); }
.hp-bot.is-small { padding: 0 5px; font-size: .6rem; }

/* ── match page ─────────────────────────────────────────────────────── */
.hp-board-head {
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 18px; padding: 26px 24px;
    border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden;
    background: linear-gradient(90deg, color-mix(in srgb, var(--h) 28%, #0e1218), #0e1218 40%, #0e1218 60%, color-mix(in srgb, var(--a) 28%, #0e1218));
}
.hp-bh-team { display: flex; align-items: center; gap: 12px; min-width: 0; font-family: var(--hp-display); font-size: clamp(1.1rem, 3vw, 1.8rem); text-transform: uppercase; letter-spacing: .02em; }
.hp-bh-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-bh-team i { flex: none; width: 8px; height: 2.2em; border-radius: 3px; background: var(--h); }
.hp-bh-team.is-away { justify-content: flex-end; text-align: right; }
.hp-bh-team.is-away i { background: var(--a); }
.hp-bh-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.hp-bh-score { display: flex; align-items: center; gap: 12px; font-family: var(--hp-display); }
.hp-bh-score b { display: grid; place-items: center; min-width: 64px; height: 64px; padding: 0 10px; border-radius: 10px; background: #f4f6f8; color: #10131a; font-size: 2.6rem; }
.hp-bh-score span { color: var(--text-muted); font-size: 1.6rem; }
.hp-bh-sub { color: var(--text-muted); font-size: .8rem; }
.hp-bh-motm { color: var(--yellow); font-size: .86rem; }
.hp-bh-motm b { color: var(--text); }
@media (max-width: 640px) {
    .hp-board-head { grid-template-columns: 1fr 1fr; padding: 18px 14px; }
    .hp-bh-mid { grid-column: 1 / -1; order: -1; }
    .hp-bh-score b { min-width: 52px; height: 52px; font-size: 2rem; }
}

.hp-lineups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .hp-lineups { grid-template-columns: 1fr; } }
.hp-lineup { padding: 0; overflow: hidden; }
.hp-lineup-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-family: var(--hp-display); font-size: 1.05rem; text-transform: uppercase; letter-spacing: .03em;
    background: linear-gradient(90deg, color-mix(in srgb, var(--c) 22%, transparent), transparent 75%); border-bottom: 1px solid var(--border); }
.hp-lineup-head i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.hp-lp { display: flex; align-items: center; gap: 12px; padding: 10px 16px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); }
.hp-lp:last-child { border-bottom: 0; }
.hp-lp:hover { background: var(--bg-hover); }
.hp-lp img { width: 40px; height: 40px; border-radius: 6px; image-rendering: pixelated; flex: none; }
.hp-lp-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.hp-lp-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-lp-sub { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: .74rem; color: var(--text-muted); }
.hp-pos { padding: 1px 6px; border-radius: 4px; background: var(--bg-elevated); border: 1px solid var(--border); font-weight: 700; color: var(--text-secondary); }
.hp-real { font-style: italic; }
.hp-lp-line { color: var(--text-secondary); font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hp-rating { display: grid; place-items: center; min-width: 40px; height: 28px; border-radius: 6px; font-weight: 800; font-size: .86rem; color: #0b0d10;
    background: color-mix(in srgb, #38d97a calc(var(--r) * 100%), #f0605c); }
.hp-star { color: var(--yellow); }

.hp-timeline { padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.hp-tl { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 8px; border-left: 3px solid var(--c); background: var(--bg-elevated); font-size: .88rem; }
.hp-tl.is-goal { font-weight: 700; background: color-mix(in srgb, var(--c) 14%, var(--bg-elevated)); }
.hp-tl-clock { min-width: 40px; color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: .8rem; }

/* ── player page ────────────────────────────────────────────────────── */
.hp-player-hero { grid-template-columns: auto minmax(0, 1fr); }
.hp-player-body { position: relative; z-index: 1; height: 180px; image-rendering: pixelated; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .5)); }
.hp-player-hero h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: clamp(1.9rem, 4vw, 2.8rem); }
.hp-player-hero h1 .hp-bot { font-size: .8rem; padding: 4px 10px; }
.hp-links { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) { .hp-player-hero { grid-template-columns: 1fr; } .hp-player-body { height: 120px; } }
.hp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.hp-stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; }
.hp-stat span { color: var(--text-muted); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.hp-stat b { font-family: var(--hp-display); font-size: 1.8rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hp-stat small { color: var(--text-secondary); font-size: .78rem; }
.hp-stat.is-rate b { font-size: 1.45rem; color: var(--accent); }

/* ── leaderboard extras ──────────────────────────────────────────────── */
.hp-find { width: auto; min-width: 160px; flex: 1; max-width: 240px; margin-left: auto; padding: 6px 10px; font-size: .84rem; }
.hp-empty { padding: 18px; text-align: center; color: var(--text-muted); font-size: .88rem; grid-column: 1 / -1; }
.hp-table th[data-sort] { cursor: pointer; user-select: none; }
.hp-table th[data-sort]:hover { color: var(--text); }
.hp-table th.is-key { color: var(--accent); }
.hp-table tbody tr { transition: background .12s ease; }
.hp-table tbody tr:hover { background: var(--bg-hover); }
.hp-table tr.is-top .hp-rank { font-weight: 800; }
.hp-table tr.is-1 .hp-rank { color: #e0b13a; }
.hp-table tr.is-2 .hp-rank { color: #c3cbd6; }
.hp-table tr.is-3 .hp-rank { color: #cd7f32; }
.hp-table tfoot td { text-align: center; padding: 12px; border-top: 1px solid var(--border); }
.hp-duel { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px; font-size: .64rem; font-weight: 800; letter-spacing: .06em;
    color: #f5b3ff; background: rgba(217, 70, 239, .14); border: 1px solid rgba(217, 70, 239, .4); }
.hp-duel.is-big { font-size: .74rem; padding: 3px 10px; }
@media (max-width: 640px) {
    /* phones: keep the rank, player and the stat being ranked; the context columns scroll */
    .hp-board { padding: 10px; }
    .hp-find { max-width: none; margin-left: 0; flex-basis: 100%; }
    .hp-table { min-width: 0; }
    .hp-table .hp-wdl, .hp-table .hp-wdl-h, .hp-table .hp-ctx { display: none; }
    .hp-table td.hp-who, .hp-table th.hp-who-h { position: sticky; left: 0; z-index: 1; background: var(--bg-card); }
    .hp-table td, .hp-table th { padding: 7px 6px; }
}
