:root {
    /* Clean white palette (light theme) */
    --bg-primary:    #f5f5f5;
    --bg-secondary:  #ebebeb;
    --bg-card:       #ffffff;
    --bg-card-alt:   #eeeeee;
    --text-primary:  #1a1a1a;
    --text-secondary:#666666;
    --text-dim:      #999999;
    --accent-four:   #0ea5e9;
    --accent-six:    #ec4899;
    --accent-wicket: #ef4444;
    --accent-live:   #10b981;
    --accent-extra:  #f59e0b;
    --accent-finished:#10b981;
    --accent-link:   #3b82f6;
    --border:        rgba(0, 0, 0, 0.09);

    /* Ball badge backgrounds */
    --ball-bg-run:   #2a3555;
    --ball-bg-dot:   #232d42;
    --ball-bg-grey:  #858b97;

    /* Status colors */
    --color-win:     #10b981;
    --color-loss:    #ef4444;
    --color-amber:   #d97706;
    --color-dim-text:#6b7280;

    /* Telegram safe area insets */
    --safe-top: var(--tg-content-safe-area-inset-top, 0px);
    --safe-bottom: var(--tg-safe-area-inset-bottom, 0px);
}

[data-theme="dark"] {
    --bg-primary:    #1c2330;
    --bg-secondary:  #161d29;
    --bg-card:       #242f3d;
    --bg-card-alt:   #2d3a4a;
    --text-primary:  #f5f5f5;
    --text-secondary:#8b9ab0;
    --text-dim:      #576175;
    --border:        rgba(255, 255, 255, 0.07);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* No browser-blue or underlined links anywhere: see "Links" at the end of the file. */
:where(a) { color: inherit; text-decoration: none; }

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

#app {
    max-width: 480px;
    margin: 0 auto;
    padding: calc(8px + var(--safe-top)) 0 calc(24px + var(--safe-bottom));
}

/* Tabs */
.tabs-bar {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin-top: 10px;
}
.tabs-bar::-webkit-scrollbar { display: none; }
.tabs-list {
    display: flex;
    padding: 0 4px;
    gap: 0;
    white-space: nowrap;
}
.tab-btn {
    flex-shrink: 0;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}
.tab-btn.tab-active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-live);
    font-weight: 600;
}
.tab-pane { display: none; }
.tab-hidden { display: none; }
.tab-pane.tab-pane-active { display: block; }
.tab-wrap { padding: 8px 12px 16px; max-width: 100%; }
/* The gap under the header = the first card's own 8px margin: the wrap has no top padding,
   or the two add up to 16 (cards sit one level down: #s-stream/#s-scorecard…, sw-card in a
   rendered child). The preview/report .pv-wrap brings its 8px itself (its card has no margin). */
.tab-wrap { padding-top: 0; }
.tab-empty {
    text-align: center;
    color: var(--text-dim);
    font-size: 14px;
    padding: 48px 24px;
}

/* ========== PREVIEW TAB ========== */
.pv-wrap { padding: 8px 12px 16px; }
.pv-card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 15px 12px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pv-block { display: flex; flex-direction: column; gap: 8px; margin-bottom: 15px; }
.pv-block-models { background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border); overflow: hidden; margin-bottom: 15px; }
.pv-block + .pv-block-models { margin-top: -10px; gap: 0;}
.rp-model-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.rp-model-row:last-child { border-bottom: none; }
.pv-block-performers { background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
.rp-tables-wrap { display: flex; flex-direction: column; gap: 10px; margin: -15px 0 15px; }
.rp-section-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 8px; border-bottom: 1px solid var(--border); }
.rp-col-heads { display: flex; font-size: 10px; color: var(--text-dim); font-family: ui-monospace, monospace; }
.rp-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.rp-row:last-child { border-bottom: none; }
.rp-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-secondary); }
.rp-avatar-fb { display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; color: var(--text-dim); }
.rp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rp-player-name { font-size: 14px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Имя с бейджем C/WK — как в табе Squads: flex с зазором, иначе бейдж
   прилипает к фамилии. Строки без бейджа не трогаем: там нужен ellipsis. */
.rp-player-name:has(.sq-badge) { display: flex; align-items: center; gap: 6px; overflow: visible; }
.rp-player-name .sq-badge { flex-shrink: 0; }
.rp-player-sub { display: flex; align-items: center; gap: 5px; }
.rp-pos { font-size: 12px; color: var(--text-dim); }
.rp-stats { display: flex; align-items: center; font-size: 13px; font-family: ui-monospace, monospace; flex-shrink: 0; }
.rp-s1 { width: 36px; text-align: center; color: var(--text-secondary); }
.rp-s2 { width: 30px; text-align: center; color: var(--text-secondary); }
.rp-s3 { width: 30px; text-align: right; color: var(--text-secondary); }
.rp-bold { color: var(--text-primary); font-weight: 600; }
.rp-team-tag { font-size: 10px; font-weight: 700; color: var(--text-dim); background: var(--bg-secondary); border-radius: 4px; padding: 1px 5px; flex-shrink: 0; }
/* Ключевые игроки превью: значения дробные ("30.4", "47.5") и заголовки длиннее,
   чем в таблице отчёта, где колонки рассчитаны на "43"/"5". Свои ширины и зазор,
   иначе Impact и Last 5 слипаются. */
.kp-stats { gap: 14px; }
.kp-heads { gap: 14px; align-items: center; }
.kp-s1, .kp-s2 { width: 46px; text-align: right; color: var(--text-secondary); }
.kp-heads .kp-s1, .kp-heads .kp-s2 { white-space: nowrap; width: auto; display: flex; justify-content: flex-end; }
/* Шапка таблицы у правого края — тултип раскрываем влево, иначе он уезжает
   за пределы карточки. */
.kp-head .pv-info-tip { left: auto; right: 0; }
.kp-head .pv-info-tip::before { left: auto; right: 5px; }
.rp-section-head:has(.pv-info-tip) { position: relative; }
.pv-block:last-child { margin-bottom: 0px; }
.pv-h1 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin: 0;
}
.pv-h2 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin: 0;
}
/* Раздел одной команды в блоке составов: её текст + её таблица. */
.pv-lineup-side + .pv-lineup-side { margin-top: 16px; }
/* Заголовок активной панели прогноза нужен разметке и скринридеру, но
   визуально дублировал бы заголовок блока. */
.pv-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pv-h3 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin: 0 0 8px;
}
.pv-h2-team {
    display: flex;
    align-items: center;
    gap: 6px;
}
/* Вся проза превью — один стиль: 14px, приглушённый цвет. Раньше размеры
   расходились (intro/h2h/form 13px против conditions/lineup 14px) и текст
   читался как два разных, вставленных друг в друга. Verdict входит сюда же —
   его собственное правило ниже перебивало общее. */
.pv-intro,
.pv-toss-pitch,
.pv-conditions,
.pv-lineup-intro,
.pv-h2h-intro,
.pv-verdict,
.pv-team-intro { font-size: 14px; line-height: 1.6; color: var(--text-secondary); margin: 0 0 10px; }
.pv-intro:last-child,
.pv-conditions:last-child,
.pv-lineup-intro:last-child { margin-bottom: 0; }
.pv-toss-line { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.pv-weather { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pv-weather-item {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 7px;
}
[data-theme="light"] .pv-weather-item {
    border-color: rgba(0, 0, 0, 0.13);
}

/* Runs: usual totals as tiles, the bookmaker's over/under lines as a table (renderRuns) */
.pv-runs { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.pv-runs:last-child { margin-bottom: 0; }
.pv-runs-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.pv-runs-tile {
    display: flex; flex-direction: column; gap: 2px; min-width: 0;
    background: var(--bg-card-alt); border: 1px solid var(--border); border-radius: 8px; padding: 8px;
}
.pv-runs-label, .pv-runs-sub { font-size: 11px; line-height: 1.3; color: var(--text-secondary); }
.pv-runs-value { font-size: 18px; line-height: 1.25; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.pv-runs-book { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.pv-runs-row {
    display: grid; grid-template-columns: minmax(0, 1fr) 48px 48px 42px 42px; gap: 6px; align-items: center;
    padding: 7px 10px; font-size: 13px; color: var(--text-secondary); border-top: 1px solid var(--border);
    font-variant-numeric: tabular-nums;
}
.pv-runs-row > :not(.pv-runs-name) { text-align: right; }
.pv-runs-row b { color: var(--text-primary); }
.pv-runs-name { color: var(--text-primary); font-weight: 600; min-width: 0; }
.pv-runs-name small { display: block; font-size: 11px; font-weight: 400; color: var(--text-secondary); }
.pv-runs-head { border-top: none; background: var(--bg-card-alt); font-size: 11px; }
.pv-runs-head .pv-runs-name { font-weight: 400; color: var(--text-secondary); }

/* H2H */
/* Quote block — left accent bar + subtle bg */
/* Виджет условий теперь стоит ПЕРЕД разбором — нужен отступ до текста. */
.pv-toss + .pv-conditions,
.pv-toss + .pv-toss-pitch { margin-top: 10px; }
.pv-quote {
    border-left: 2px solid var(--accent-live);
    background: var(--bg-card-alt);
    border-radius: 0 8px 8px 0;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pv-h2h-matches { display: flex; flex-direction: column; gap: 0; padding: 0;}
.pv-h2h-match { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 8px 12px; border-top: 1px solid var(--border); }
.pv-h2h-match:first-child { border-top: none; }
.pv-h2h-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; gap: 8px; }
.pv-h2h-team { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); min-width: 0; }
.pv-h2h-team.pv-h2h-win { color: var(--text-primary); font-weight: 600; }
.pv-h2h-logo { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.pv-h2h-logo-fb { width: 20px; height: 20px; flex-shrink: 0; color: var(--text-dim); font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pv-h2h-logo-hidden { display: none; }
.pv-h2h-score { color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; }
.pv-h2h-score.pv-h2h-win { color: var(--text-primary); font-weight: 600; }
/* Currently-batting team's score in a live match — same green cue as the match header. */
.pv-h2h-score.lb-score-live { color: var(--accent-live); font-weight: 700; }
.pv-h2h-score.lb-odds {
    color: var(--text-secondary); font-size: 12px; font-weight: 600;
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 6px; padding: 1px 7px; min-width: 44px; text-align: center;
}
.pv-h2h-meta { font-size: 11px; color: var(--text-dim); margin-top: 1px; }
.pv-h2h-avg { font-size: 12px; color: var(--text-dim); }

/* Matches tab: full-bleed rows so the hover fill reaches the card edges
   (no side gutter on the card, gutter moved into each row). */
.card-matches { padding: 0 !important; overflow: hidden; }
.pv-matches-tab { border-left: none; }
.pv-matches-tab .pv-h2h-match {
    padding: 8px 16px; transition: background 0.12s;
}
.pv-matches-tab .pv-h2h-match:active,
.pv-matches-tab .pv-h2h-match:hover { background: var(--bg-secondary); }
/* Result cue sits inside the row's right gutter instead of the card gutter. */
.pv-matches-tab .pv-match-win::after,
.pv-matches-tab .pv-match-loss::after { right: 0px; }

/* Team */
.pv-team-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.pv-meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-radius: 4px;
    padding: 2px 6px;
}
.pv-meta-tag-form { gap: 5px; }
.mh-wl-card .pv-meta-tag-form { min-width: 260px; overflow-x: auto; flex-wrap: nowrap; }
.pv-meta-form-arrow { font-size: 11px; color: var(--text-dim); line-height: 1; }
.pv-matches { display: flex; flex-direction: column; gap: 0; padding: 0 10px; }
.pv-match-item { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 8px 0; border-top: 1px solid var(--border); }
.pv-match-item:first-child { border-top: none; }
.pv-match-win::after,
.pv-match-loss::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 60%;
    border-radius: 1px;
}
.pv-match-win::after  { background: var(--accent-live); }
.pv-match-loss::after { background: var(--accent-wicket); }

/* Key Stats */
.pv-stats-table { display: flex; flex-direction: column; gap: 0; }
.pv-stats-header, .pv-stats-row {
    display: grid;
    grid-template-columns: 1fr 56px 56px;
    align-items: center;
    padding: 6px 0;
}
.pv-stats-row { border-top: 1px solid var(--border); }
.pv-stats-header {
    font-size: 11px;
    font-weight: 700;
    text-align: right;
    padding-top: 0;
    padding-bottom: 4px;
}
.pv-stats-header span:first-child { text-align: left; }
.pv-stats-code-l { color: var(--accent-live); }
.pv-stats-code-r { color: var(--accent-wicket); }
.pv-stats-label { font-size: 13px; color: var(--text-secondary); display: inline-flex; align-items: center; }
.pv-info { position: relative; display: inline-flex; align-items: center; margin-left: 5px; }
.pv-info-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 15px; height: 15px; padding: 0;
    border: 1px solid var(--border); border-radius: 50%;
    background: transparent; color: var(--text-dim);
    font-size: 10px; font-style: italic; font-weight: 700; font-family: Georgia, serif;
    line-height: 1; cursor: pointer;
}
.pv-info-btn:hover { color: var(--text-secondary); border-color: var(--text-dim); }
.pv-info-tip {
    position: absolute; z-index: 20; left: 0; top: calc(100% + 7px);
    width: max-content; max-width: 240px;
    background: var(--bg-card-alt); border: 1px solid var(--border);
    border-radius: 8px; padding: 7px 10px;
    font-size: 12px; line-height: 1.45; font-weight: 400;
    color: var(--text-secondary); white-space: normal; text-align: left;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
    opacity: 0; visibility: hidden; transform: translateY(-2px);
    transition: opacity .12s, transform .12s, visibility .12s;
    pointer-events: none;
}
.pv-info-tip::before {
    content: ""; position: absolute; left: 5px; top: -5px;
    width: 8px; height: 8px; background: var(--bg-card-alt);
    border-left: 1px solid var(--border); border-top: 1px solid var(--border);
    transform: rotate(45deg);
}
@media (hover: hover) {
    .pv-info:hover .pv-info-tip { opacity: 1; visibility: visible; transform: translateY(0); }
}
.pv-info-open .pv-info-tip { opacity: 1; visibility: visible; transform: translateY(0); }
.pv-info-open .pv-info-btn { color: var(--accent-live); border-color: var(--accent-live); }
.pv-stats-val { font-size: 13px; color: var(--text-dim); text-align: right; }
.pv-stats-val.pv-stats-win { color: var(--text-primary); font-weight: 600; }
.pv-stats-total {
    background: rgba(16, 185, 129, 0.1);
    margin: 0 -10px -8px;
    padding: 6px 10px;
    border-radius: 0 0 7px 0;
}
.pv-stats-total .pv-stats-label { font-weight: 600; color: var(--accent-live); }
.pv-stats-total .pv-stats-val { font-size: 14px; font-weight: 700; color: var(--text-dim); }
.pv-stats-total .pv-stats-val.pv-stats-win { color: var(--accent-live); }

/* Win Probability bars */
.pv-models-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pv-model-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}
.pv-chip-hit  { background: rgba(34,197,94,0.12);  color: #4ade80; }
.pv-chip-miss { background: rgba(239,68,68,0.12);  color: #f87171; }
.pv-model-hit  { font-size: 13px; font-weight: 600; color: #4ade80; }
.pv-model-miss { font-size: 13px; font-weight: 600; color: #f87171; }
.pv-model-push { font-size: 13px; font-weight: 600; color: var(--text-dim); }

/* Win Probability (Preview tab) */
.pv-prob-wrap { background: var(--bg-card-alt); border-radius: 8px; padding: 8px 10px; margin-top: 5px; }
.pv-prob-header { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.pv-prob-team-l { color: var(--accent-live); }
.pv-prob-team-r { color: var(--accent-wicket); }
.pv-prob-table { display: flex; flex-direction: column; gap: 8px; }
.pv-prob-row { display: flex; flex-direction: column; gap: 3px; }
.pv-prob-nums { display: flex; justify-content: space-between; align-items: baseline; }
.pv-prob-label { font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.pv-prob-num { font-size: 13px; font-weight: 600; color: var(--text-dim); min-width: 36px; font-variant-numeric: tabular-nums; }
.pv-prob-nums .pv-prob-num:last-child { text-align: right; }
.pv-prob-num.pv-prob-win { color: var(--text-primary); font-weight: 700; }
.pv-prob-track { width: 100%; height: 5px; border-radius: 3px; overflow: hidden; display: flex; gap: 1px; background: var(--bg-secondary); }
.pv-prob-fill-l { height: 100%; background: var(--accent-live); border-radius: 3px 0 0 3px; transition: width 0.4s ease; }
.pv-prob-fill-r { height: 100%; background: var(--accent-wicket); border-radius: 0 3px 3px 0; flex: 1; transition: width 0.4s ease; }

/* Collapsible */
.pv-collapse { display: flex; flex-direction: column; }
.pv-collapse-body {
    max-height: 100px;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.pv-collapse-open .pv-collapse-body { max-height: 2000px; }
.pv-collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 20px;
    margin-top: 6px;
    background: var(--bg-card-alt);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s;
}
.pv-collapse-btn:active { background: var(--bg-secondary); }
.pv-collapse-arrow {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1;
    transition: transform 0.3s ease;
}
.pv-collapse-open .pv-collapse-arrow { transform: rotate(180deg); }

/* Playing XI */
.pv-xi { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pv-xi-col { display: flex; flex-direction: column; gap: 0; }
.pv-xi-header { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); margin-bottom: 4px; }
.pv-xi-player { display: flex; align-items: center; gap: 4px; padding: 4px 0; border-top: 1px solid var(--border); }
.pv-xi-player:first-of-type { border-top: none; }
.pv-xi-name { font-size: 12px; color: var(--text-secondary); flex: 1; }
.pv-xi-badge { font-size: 9px; font-weight: 700; color: var(--text-dim); background: var(--bg-secondary); border-radius: 3px; padding: 1px 4px; }

/* Facts */
.pv-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.pv-facts li { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.pv-facts li::before { content: "• "; color: var(--text-dim); }

/* Verdict */
.pv-verdict:last-child,
.pv-verdict:has(+ .pv-prob-wrap) { margin-bottom: 0; }
.pv-verdict + .pv-prob-wrap { margin-top: 8px; }

/* Loading */
#loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 60vh;
    color: var(--text-secondary);
    font-size: 14px;
}

.loading-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-live);
    animation: pulse 1.2s ease-in-out infinite;
}

/* Error */
#error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60vh;
    color: var(--accent-wicket);
    font-size: 14px;
    padding: 0 24px;
    text-align: center;
}

/* Card */
.card {
    background: var(--bg-card);
    border-radius: 14px;
    margin: 8px 0;
    padding: 14px 16px;
    border: 1px solid var(--border);
}

/* ========== HEADER ========== */
.mh-wrap {
    padding: 8px 12px 0;
}

.mh-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 12px 12px 0 12px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.mh-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.mh-league-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.mh-league {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    /* long tournament names: one line + ellipsis, never wrap the header */
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mh-dot {
    color: var(--text-dim);
    font-size: 12px;
}

.mh-round {
    color: var(--text-secondary);
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

#mh-badge {
    display: flex;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Team rows */
.mh-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mh-team-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

/* Score slot: win badge + box, right-aligned */
.mh-score-slot {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Status badge */
.mh-status {
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.mh-green { color: var(--accent-live); }
.mh-amber { color: var(--accent-extra); }
.mh-red   { color: var(--accent-wicket); }
.mh-dim   { color: var(--text-secondary); }

.mh-timer {
    color: var(--text-secondary);
    font-size: 12px;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-live);
    animation: pulse 1.2s ease-in-out infinite;
    flex-shrink: 0;
}

/* Logo */
.mh-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 2px;
    box-sizing: border-box;
    background: var(--bg-secondary);
    border-radius: 10px;
}

.mh-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 6px; /* inner radius of the 10px backing minus 4px padding */
}

.mh-logo-fb {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card-alt);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
}

.mh-win-badge {
    width: 20px;
    height: 20px;
    background: var(--accent-live);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.mh-team-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mh-standing {
    color: var(--text-secondary);
    font-size: 11px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.mh-form {
    display: inline-flex;
    gap: 2px;
}

.mh-form-w, .mh-form-l, .mh-form-d, .mh-form-n {
    font-size: 9px;
    font-weight: 700;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.mh-form-w { background: var(--accent-live); }
.mh-form-l { background: var(--accent-wicket); }
.mh-form-d { background: var(--text-dim); }
.mh-form-n { background: var(--text-dim); }

/* Score boxes */
.mh-box {
    width: 66px;
    height: 44px;
    padding: 0;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mh-box-dim {
    background: var(--bg-secondary);
}

.mh-box-active {
    background: rgba(16, 185, 129, 0.12);
    border: 1.5px solid rgba(16, 185, 129, 0.35);
}

.mh-box-finished {
    border: none;
}

.mh-box-score {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.mh-box-ov {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 1px;
}

.mh-green-text { color: var(--accent-live); font-weight: 700; }

/* Two innings each (multi-day): "380 & 172" — the fixed 66px box wrapped and overflowed. */
.mh-box-multi { width: auto; min-width: 66px; padding: 0 10px; }
.mh-box-multi .mh-box-score { font-size: 14px; white-space: nowrap; }
.mh-box-multi .mh-box-ov { white-space: nowrap; }
/* Tied match: the super over's score in the header boxes and the lists. */
.mh-box-so { min-width: 96px; }
/* Two super overs = six tabs: they scroll sideways on a phone instead of wrapping. */
.sc-switcher:has(.sc-btn-so) { overflow-x: auto; scrollbar-width: none; }
.sc-switcher:has(.sc-btn-so) .sc-btn { white-space: nowrap; flex: 0 0 auto; }
.sc-switcher:has(.sc-btn-so) .sc-switcher-wrap { width: max-content; max-width: none; }
.mh-so { color: #f59e0b; font-weight: 600; white-space: nowrap; }
.lb-so { color: #f59e0b; font-size: 11px; font-weight: 600; white-space: nowrap; flex-shrink: 0; margin-left: auto; margin-right: 6px; font-variant-numeric: tabular-nums; }


/* Pre-match odds shown in the score slot (before a score exists). */
.mh-box-odds-val { color: var(--text-secondary); font-variant-numeric: tabular-nums; }

.mh-team-loser .mh-team-name,
.mh-team-loser .mh-standing {
    color: var(--color-dim-text);
}

/* Bottom bar */
.mh-bottom {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}

.mh-b-green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-live);
}

.mh-b-amber {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-amber);
}

.mh-b-red {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-wicket);
}

.mh-b-dim {
    background: var(--bg-card-alt);
    color: var(--text-dim);
    font-weight: 400;
}

/* ========== SCORECARD WIDGET ========== */
.sc-wrap {
    background: var(--bg-card);
    border-radius: 16px;
    margin: 0 0 8px 0;
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* Team switcher */
.sc-switcher {
    display: flex;
    gap: 3px;
    padding: 12px 12px 0;
    background: transparent;
}

.sc-switcher-wrap {
    display: inline-flex;
    gap: 3px;
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 3px;
}

.sc-btn {
    padding: 4px 12px;
    border: none;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: var(--text-dim);
    transition: background 0.15s, color 0.15s;
}

.sc-btn-active {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* Overs scroll strip */
.sc-overs-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--border);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.sc-overs-scroll::-webkit-scrollbar { display: none; }

.sc-over {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.sc-over-num {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
}
.sc-over-num-cur { color: var(--accent-live); font-weight: 600; }

.sc-balls {
    display: flex;
    gap: 4px;
}

.sc-ball {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sc-b-grey   { background: var(--ball-bg-grey); color: #fff; }
.sc-b-four   { background: var(--accent-link);  color: #fff; font-weight: 600; }
.sc-b-six    { background: var(--accent-six);   color: #fff; font-weight: 600; }
.sc-b-wicket { background: var(--accent-wicket);color: #fff; font-weight: 700; }
.sc-b-pulse {
    background: transparent;
    position: relative;
}
.sc-b-pulse::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-dim);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    animation: pulse-dot 2s ease-in-out infinite;
    animation-delay: var(--pulse-delay, 0ms);
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    50%       { opacity: 0.3; transform: translate(-50%, -50%) scale(0.5); }
}

.sc-over-runs {
    color: var(--text-dim);
    font-size: 10px;
}
.sc-over-runs-cur { color: var(--accent-live); font-weight: 500; }

.sc-sep {
    width: 1px;
    background: var(--border);
    margin: 6px 0;
    align-self: stretch;
    flex-shrink: 0;
}

/* Batting / Bowling sections */
.sc-section {
    padding: 12px 12px;
}
.sc-section-border {
    border-top: 1px solid var(--border);
}

.sc-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.sc-label {
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sc-col-heads {
    display: flex;
}
.sc-col {
    text-align: center;
    font-size: 10px;
    color: var(--text-dim);
}

.sc-player-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.sc-player-row:last-child { margin-bottom: 0; }

.sc-player-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.sc-marker {
    color: var(--accent-live);
    font-size: 12px;
    line-height: 1;
}

.sc-name {
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sc-name-on { color: var(--text-primary); font-weight: 500; }
.sc-name-dim { color: var(--text-dim); }
/* SO button in switcher */
.sc-sw-div { width: 1px; background: var(--border); margin: 4px 3px; align-self: stretch; flex-shrink: 0; }
.sc-btn-so { display: flex; align-items: center; gap: 3px; }
.sc-btn-so-active { background: rgba(245,158,11,0.15); color: #f59e0b; }
.sc-so-tag { font-size: 8px; font-weight: 700; background: rgba(245,158,11,0.25); color: #f59e0b; border-radius: 3px; padding: 1px 3px; line-height: 1.2; letter-spacing: 0.03em; }
.sc-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 20px;
    background: var(--bg-card-alt);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s;
}
.sc-expand-btn:active { background: var(--bg-secondary); }
.sc-expand-arrow {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1;
    transition: transform 0.3s ease;
}
.sc-expand-arrow.sc-expand-open { transform: rotate(180deg); }

/* Scoring Breakdown Widget */
.sb-wrap {
    background: var(--bg-card);
    border-radius: 16px;
    margin: 0 0 8px 0;
    border: 1px solid var(--border);
    padding: 10px 14px 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.sb-head {
    display: grid;
    grid-template-columns: 1fr 80px 80px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.sb-code {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
    letter-spacing: 0.03em;
}
.sb-row {
    display: grid;
    grid-template-columns: 1fr 80px 80px;
    padding: 5px 0;
    border-top: 1px solid var(--border);
    align-items: center;
}
.sb-row:first-of-type { border-top: none; }
.sb-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    align-self: center;
}
.sb-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}
.sb-val {
    font-size: 12px;
    color: var(--text-primary);
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.sb-val-win {
    color: var(--accent-live);
    font-weight: 600;
}
.sb-rr {
    font-size: 11px;
    color: var(--text-dim);
}
.sb-val-win .sb-rr {
    color: var(--accent-live);
    opacity: 0.7;
}

.sc-stats {
    display: flex;
    font-size: 13px;
    font-family: ui-monospace, monospace;
    flex-shrink: 0;
}
.sc-stat { text-align: center; color: var(--text-secondary); }
.sc-bold  { color: var(--text-primary); font-weight: 600; }

/* Fixed column widths matching HTML prototype */
.sc-w28 { width: 28px; }
.sc-w24 { width: 24px; }
.sc-w36 { width: 36px; }

/* ========== RUNS WIDGET ========== */
.rg-wrap {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.rg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.rg-title {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.rg-legend {
    display: flex;
    gap: 16px;
}

.rg-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-secondary);
}

.rg-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    display: inline-block;
    flex-shrink: 0;
}

.rg-chart {
    position: relative;
}
.rg-tooltip {
    position: absolute; z-index: 5; pointer-events: none;
    background: var(--bg-card-alt); border: 1px solid var(--border);
    border-radius: 8px; padding: 6px 9px; font-size: 0.72rem; line-height: 1.5;
    white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    color: var(--text-secondary);
}
.rg-tt-head { font-weight: 600; color: var(--text-primary); padding-bottom: 4px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.rg-tt-row { color: var(--text-primary); }
.rg-tt-row b { color: var(--text-primary); font-weight: 700; }
.rg-tt-sub { color: var(--text-dim); font-size: 0.92em; margin-top: 1px; }
.rg-tt-sub + .rg-tt-row { margin-top: 6px; }
.rg-tt-b { display: inline-block; font-style: italic; color: var(--text-secondary); }

/* ========== SCOREBOARD ========== */
.scoreboard {
    padding: 10px 16px 6px;
}

.innings-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 6px 0;
}

.innings-row.current {
    font-weight: 600;
}

.innings-row.past {
    color: var(--text-secondary);
}

.team-score {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.team-code {
    font-size: 15px;
    font-weight: 700;
    min-width: 36px;
}

.score-value {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.innings-row.past .score-value {
    font-size: 17px;
}

.overs {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
}

.run-rate {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Target line */
.target-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 4px 0;
    background: rgba(0, 212, 255, 0.08);
    border-radius: 8px;
    font-size: 13px;
    color: var(--accent-four);
}

/* ========== CURRENT OVER ========== */
.over-section {
    padding-bottom: 4px;
}

.over-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

.over-balls {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ball-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    background: var(--ball-bg-run);
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.ball-badge.run {
    background: var(--ball-bg-run);
    color: var(--text-primary);
}

.ball-badge.four {
    background: var(--accent-four);
    color: var(--bg-secondary);
}

.ball-badge.six {
    background: var(--accent-six);
    color: #fff;
}

.ball-badge.wicket {
    background: var(--accent-wicket);
    color: #fff;
}

.ball-badge.extra {
    background: rgba(255, 165, 0, 0.2);
    color: var(--accent-extra);
}

/* ========== LAST BALL ========== */
.last-ball {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    margin: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: background 0.4s;
}

.last-ball.flash-four {
    animation: flash-four 0.8s ease-out;
}

.last-ball.flash-six {
    animation: flash-six 0.8s ease-out;
}

.last-ball.flash-wicket {
    animation: flash-wicket 0.8s ease-out;
}

.last-ball-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.last-ball-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.last-ball-text strong {
    color: var(--text-primary);
}

.last-ball-desc {
    font-weight: 700;
}

.last-ball-desc.four { color: var(--accent-four); }
.last-ball-desc.six { color: var(--accent-six); }
.last-ball-desc.wicket { color: var(--accent-wicket); }

/* ========== PLAYERS ========== */
.players-section {
    padding-top: 2px;
}

.section-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
}

.player-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    min-width: 0;
    flex: 1;
}

.player-name span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.strike-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-four);
    flex-shrink: 0;
}

.player-stats {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.player-runs {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 32px;
    text-align: right;
}

.player-balls {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 28px;
    text-align: left;
}

.player-sr {
    font-size: 12px;
    color: var(--text-dim);
    min-width: 36px;
    text-align: right;
}

.player-boundaries {
    font-size: 11px;
    color: var(--text-dim);
    min-width: 48px;
    text-align: right;
}

/* Bowler divider */
.bowler-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 8px 0;
}

/* Bowler stats */
.bowler-stats {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--text-secondary);
}

.bowler-stat {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.bowler-stat-val {
    font-weight: 600;
    color: var(--text-primary);
}

/* ========== INNINGS BREAK ========== */
.innings-break-banner {
    text-align: center;
    padding: 18px 16px;
    margin: 8px 12px;
    background: rgba(255, 165, 0, 0.08);
    border: 1px solid rgba(255, 165, 0, 0.2);
    border-radius: 14px;
}

.innings-break-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-extra);
    margin-bottom: 6px;
}

.innings-break-target {
    font-size: 15px;
    color: var(--text-secondary);
}

.innings-break-target strong {
    color: var(--text-primary);
    font-size: 18px;
}

/* ========== RESULT NOTE ========== */
.result-note {
    text-align: center;
    padding: 10px 16px;
    margin: 8px 12px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-finished);
}

/* ========== UPDATE INDICATOR ========== */
.update-bar {
    display: flex;
    justify-content: center;
    padding: 6px 0 2px;
    font-size: 11px;
    color: var(--text-dim);
}

/* ========== ANIMATIONS ========== */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

@keyframes flash-four {
    0% { background: rgba(0, 212, 255, 0.25); }
    100% { background: var(--bg-card); }
}

@keyframes flash-six {
    0% { background: rgba(255, 0, 110, 0.25); }
    100% { background: var(--bg-card); }
}

@keyframes flash-wicket {
    0% { background: rgba(255, 48, 64, 0.25); }
    100% { background: var(--bg-card); }
}

.ball-badge.dot {
    background: var(--ball-bg-dot);
    font-size: 18px;
    color: var(--text-secondary);
}

.ball-badge.ball-pulse {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ball-badge.ball-pulse::after {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-live);
    animation: pulse 1.2s ease-in-out infinite;
    animation-delay: var(--pulse-delay, 0ms);
}

/* ========== MATCH INFO ========== */
.mi-card {
    padding: 4px 0;
}

.mi-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
}

.mi-row:last-child {
    border-bottom: none;
}

.mi-icon {
    font-size: 16px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    margin-top: 1px;
}

.mi-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mi-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
}

.mi-value {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.3;
}
.mi-weather { margin-top: 4px; }

/* ========== MATCHES TAB ========== */
/* H2H summary: football pressure-graph layout. Team column on the left (local on
   top, visitor on the bottom), momentum strip on the right. */
.mh-h2h-summary { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.mh-h2h-top { font-size: 13px; font-weight: 600; color: var(--text-secondary); text-align: center; }
.mh-h2h-body { display: flex; align-items: stretch; gap: 12px; }
.mh-h2h-teams {
    display: flex; flex-direction: column; justify-content: space-between;
    flex-shrink: 0; width: 50px;
}
/* Each team occupies exactly one half of the body height; centre its content
   vertically so the logo/count line up with the centre of the matching
   momentum half-bar (blue top ~25%, orange bottom ~75%). */
.mh-h2h-team { display: flex; align-items: center; gap: 8px; height: 50%; }
.mh-h2h-wins { font-size: 18px; font-weight: 700; line-height: 1; }
.mh-h2h-wins-up { color: #0072B2; }
.mh-h2h-wins-down { color: #D55E00; }
.mh-h2h-logo-wrap {
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 30px; height: 30px; padding: 1px; box-sizing: border-box;
}
.mh-h2h-summary .pv-h2h-logo,
.mh-h2h-summary .pv-h2h-logo-fb { width: 100%; height: 100%; font-size: 10px; }
.mh-h2h-totals {
    display: flex;
    align-items: flex-end;
    width: 100%;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.mh-h2h-total-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
}
.mh-h2h-total-center { align-items: center; }
.mh-h2h-total-right  { align-items: flex-end; }
.mh-h2h-total-val {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}
.mh-h2h-total-lbl {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 3px;
}
.mh-h2h-stats {
    display: flex;
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.mh-h2h-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
}
.mh-h2h-stat-center { align-items: center; }
.mh-h2h-stat-right  { align-items: flex-end; }
.mh-h2h-stat-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}
.mh-h2h-stat-lbl {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 3px;
}

/* W/L card for team tabs */
.mh-wl-card { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.mh-wl-cols { display: flex; justify-content: space-between; }
.mh-wl-col { display: flex; align-items: center; gap: 6px; }
.mh-wl-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.mh-wl-dot-w { background: var(--accent-live); }
.mh-wl-dot-l { background: var(--accent-wicket); }
.mh-wl-count { font-size: 14px; font-weight: 700; line-height: 1; }
.mh-wl-count-w { color: var(--accent-live); }
.mh-wl-count-l { color: var(--accent-wicket); }
.mh-wl-lbl { font-size: 13px; color: var(--text-secondary); }
.mh-wl-bar-wrap { display: flex; height: 26px; border-radius: 4px; overflow: hidden; gap: 2px; }
.mh-wl-bar-w, .mh-wl-bar-l {
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 600; color: #fff;
    border-radius: 3px; transition: width 0.3s;
    min-width: 24px;
}
.mh-wl-bar-w { background: var(--accent-live); }
.mh-wl-bar-l { background: var(--accent-wicket); }

/* Momentum bar (football pressure-graph): continuous strip, columns abut. Local
   win = full bar up (blue), visitor win = full bar down (orange), draw = tick. */
.mh-mom {
    position: relative; flex: 1; display: flex; align-items: stretch; gap: 1px;
    height: 60px; border-radius: 6px; overflow: hidden;
    background: linear-gradient(180deg, rgba(0,114,178,0.14) 0 50%, rgba(213,94,0,0.14) 50% 100%);
}
.mh-mom-mid {
    position: absolute; left: 0; right: 0; top: 50%; height: 1px;
    background: rgba(255,255,255,0.15); z-index: 0;
}
.mh-mom-col {
    position: relative; z-index: 1; flex: 1; min-width: 3px; height: 100%;
    display: flex; flex-direction: column;
}
.mh-mom-col::before { content: ""; display: block; width: 100%; }
.mh-mom-up    { justify-content: flex-start; }
.mh-mom-up::before   { height: 50%; background: #0072B2; }
.mh-mom-down  { justify-content: flex-end; }
.mh-mom-down::before { height: 50%; background: #D55E00; }
.mh-mom-draw  { justify-content: center; }
.mh-mom-draw::before { height: 3px; background: var(--text-secondary); }
.mh-wl-form-row { display: flex; justify-content: space-between; }
.mh-wl-card .mh-form-w,
.mh-wl-card .mh-form-l,
.mh-wl-card .mh-form-d,
.mh-wl-card .mh-form-n { width: 20px; height: 20px; font-size: 12px; border-radius: 6px; }

/* Stats card (H2H + team) */
.ms-card { padding: 12px 14px; }

.ms-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.ms-header-single { margin-bottom: 10px; }
.ms-title {
    flex: 1;
    text-align: center;
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 500;
}
.ms-team-lbl {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    width: 40px;
}
.ms-team-lbl-right { text-align: right; }

.ms-row {
    display: flex;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid var(--border);
}
.ms-row:last-child { border-bottom: none; }
.ms-row-single {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid var(--border);
}
.ms-row-single:last-child { border-bottom: none; }
.ms-lbl {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
}
.ms-val {
    width: 56px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: left;
}
.ms-row .ms-val:last-child { text-align: right; }
.ms-row-single .ms-val { width: auto; color: var(--text-primary); }
.ms-better { color: var(--accent-live) !important; }
.ms-worse  { color: var(--text-dim) !important; }

.mh-match-card { padding: 10px 12px 8px; }

.mh-match-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 0;
    color: var(--text-secondary);
}
.mh-match-row.mh-match-win {
    color: var(--text-primary);
    font-weight: 600;
}
.mh-match-team {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    min-width: 0;
}
.mh-match-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mh-match-score {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    margin-left: 8px;
}
.mh-match-meta {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.mh-match-league {
    background: var(--bg-secondary);
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 10px;
    color: var(--text-dim);
}
.mh-match-note { color: var(--text-dim); }

/* ========== SQUADS TAB ========== */
.sq-switcher {
    display: flex;
    gap: 3px;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 3px;
    margin-bottom: 8px;
}

/* Lobby day switcher — horizontally scrollable when tabs don't fit */
.lb-day-switcher {
    display: flex;
    gap: 3px;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 3px;
    margin-bottom: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}
.lb-day-switcher::-webkit-scrollbar { display: none; }
.lb-day-switcher .sq-team-btn {
    flex: 0 0 auto;
    min-width: 56px;
    scroll-snap-align: center;
}

/* Lobby filter chips under the day switcher: one row, scrolls sideways. */
.lb-filter-row { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.lb-filters { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.lb-filters.lb-fade-r { mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.lb-filters.lb-fade-l { mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); }
.lb-filters.lb-fade-l.lb-fade-r { mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.lb-filters::-webkit-scrollbar { display: none; }
.lb-chip { flex: none; height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; font-family: inherit; }
.lb-chip.lb-chip-on { border-color: var(--accent-link); background: color-mix(in srgb, var(--accent-link) 14%, var(--bg-card)); color: var(--accent-link); }
.lb-chip-reset { margin-top: 12px; }
/* Search FAB: stacked right above the settings gear. */
.lb-gear-fab.lb-search-fab { bottom: calc(74px + var(--safe-bottom)); }
.lb-search-ov { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
.lb-search-pop { position: fixed; left: 50%; top: calc(var(--safe-top) + 12px); transform: translateX(-50%); width: min(420px, 94vw); box-sizing: border-box; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 10px; z-index: 41; }
.lb-search-q { width: 100%; box-sizing: border-box; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-primary); color: var(--text-primary); font-size: 16px; outline: none; font-family: inherit; }
.lb-search-q:focus { border-color: var(--accent-link); }
.lb-search-res { max-height: 60vh; overflow-y: auto; margin-top: 6px; }
.lb-search-res:empty { display: none; }
.lb-sr-head { padding: 8px 6px 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-dim); }
.lb-sr-row { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 8px; color: var(--text-primary); text-decoration: none; }
.lb-sr-row:active { background: var(--bg-card-alt); }
.lb-sr-ic { width: 20px; height: 20px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--text-secondary); }
.lb-sr-txt { display: flex; flex-direction: column; min-width: 0; }
.lb-sr-name, .lb-sr-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-sr-name { font-size: 14px; font-weight: 600; }
.lb-sr-sub { font-size: 12px; color: var(--text-secondary); }
.lb-sr-empty { padding: 14px 6px; text-align: center; color: var(--text-dim); font-size: 14px; }

.sq-team-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 12px;
    border: none;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: var(--text-dim);
    transition: background 0.15s, color 0.15s;
}

.sq-team-btn.sq-team-active {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* Team Squad competitions: a nation has a dozen+ (T20I, World Cups, bilateral
   trophies) — wrap the pills onto rows instead of squeezing them word-per-line
   past the card edge. */
.ent-comp-switcher { flex-wrap: wrap; }
.ent-comp-switcher .sq-team-btn { flex: 1 0 auto; white-space: nowrap; }


/* ===== Switcher = header of the block it controls =====
   A pill switcher and the panes it switches are ONE card: the switcher is the card's
   top band (under it a divider), and the cards inside the panes drop their own frame —
   no floating pill bar above a separate card. Hosts: .ps-group with a switcher (site +
   entity views), .sw-card (mini-app match tabs, which have no .ps-group). No
   overflow:hidden on the host — it would clip the (i) hint popovers. */
.ps-group:has(> .sq-switcher), .sw-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin: 8px 0;
}
:is(.ps-group, .sw-card) > .sq-switcher {
    margin: 0;
    border-radius: 13px 13px 0 0;
    padding: 4px;
    border-bottom: 1px solid var(--border);
}
/* A padded page wrapper as the host: its gutter becomes margin, outside the frame. */
:is(.tab-wrap, .sq-wrap, .st-wrap).ps-group:has(> .sq-switcher) { padding: 0; margin: 8px 12px 16px; }
/* …and a bare host straight in a tab pane (team Squad competitions) gets the gutter. */
.tab-pane > .ps-group:has(> .sq-switcher) { margin: 8px 12px 16px; }
@media (min-width: 1024px) {
    .col-center :is(.tab-wrap, .sq-wrap, .st-wrap).ps-group:has(> .sq-switcher),
    .col-center .tab-pane > .ps-group:has(> .sq-switcher) { margin-left: 0; margin-right: 0; }
}
/* Switcher + a filter select (team Matches: competition): the select is NOT part of
   the tab band (it read as a third tab) — its own row under it, right-aligned, styled
   like the year select. */
.ps-group.ent-ctrl-wrap > .sq-switcher { grid-column: 1 / -1; grid-row: 1; }
.ps-group.ent-ctrl-wrap > .ent-season-ctrl { grid-column: 1 / -1; grid-row: 2; justify-self: end; margin: 10px 12px 0; min-height: 32px; }
/* Cards inside the panes merge into the host card. */
:is(.ps-group:has(> .sq-switcher), .sw-card) :is(.card, .pv-block-performers, .tab-empty, .lb-group, .sq-block, .st-table, .ent-f2-card, .ps-group:has(> .sq-switcher)) {
    background: transparent;
    border: 0;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
}
:is(.ps-group:has(> .sq-switcher), .sw-card) :is(.card, .pv-block-performers, .lb-group, .sq-block, .st-table, .ent-f2-card)
    + :is(.card, .pv-block-performers, .lb-group, .sq-block, .st-table, .ent-f2-card) {
    border-top: 1px solid var(--border);
}
/* Content inside a host keeps the card's inner gutter — also on desktop, where the
   center column zeroes the page wrappers' side padding (Squad title + year, rows). */
:is(.ps-group:has(> .sq-switcher), .sw-card) .ent-tab-head { margin: 12px 12px 4px; }
:is(.ps-group:has(> .sq-switcher), .sw-card) :is(.sq-wrap, .st-wrap, .tab-wrap) { padding-left: 12px; padding-right: 12px; }
:is(.ps-group:has(> .sq-switcher), .sw-card) .st-group-title { margin-left: 12px; margin-right: 12px; }
:is(.ps-group:has(> .sq-switcher), .sw-card) .ent-comp-head { margin-left: 12px; margin-right: 12px; }
/* Bare text in a pane (lineup intro) gets the card's inner padding. */
.pv-lineup-switch.ps-group > .ps-pane > .pv-lineup-intro,
.pv-lineup-switch.sw-card > .lu-pane > .pv-lineup-intro { padding: 10px 12px 0; }
/* A nested switcher (inside a pane) stays a band, square-cornered. */
:is(.ps-group:has(> .sq-switcher), .sw-card) .ps-group > .sq-switcher { border-radius: 0; }

.sq-team-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 50%;
}

.sq-block {
    margin: 8px 0px;
    padding: 0;
    overflow: hidden;
}

.sq-block-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    padding: 10px 14px 8px;
    border-bottom: 1px solid var(--border);
}

.sq-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}

.sq-player:last-child {
    border-bottom: none;
}

.sq-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.sq-avatar-fb {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dim);
}

.sq-avatar.sq-avatar-err {
    visibility: hidden;
}

.sq-player-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sq-player-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sq-player-pos {
    font-size: 12px;
    color: var(--text-dim);
}

.sq-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.03em;
}

.sq-badge-c {
    background: var(--color-amber);
    color: #000;
}

.sq-badge-wk {
    background: var(--bg-secondary);
    color: var(--text-dim);
}

/* ========== STANDINGS TAB ========== */
.st-wrap {
    padding: 0;
}


.st-table {
    padding: 0;
    overflow: hidden;
}

.st-header,
.st-row {
    display: flex;
    align-items: center;
    padding: 0 8px;
}

.st-header {
    padding-top: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.st-header span {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    text-align: center;
    justify-content: center;
}

.st-header .st-col-team {
    text-align: left;
    justify-content: flex-start;
}

.st-row {
    padding-top: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.st-row:last-child {
    border-bottom: none;
}

.st-row-match {
    background: color-mix(in srgb, var(--color-win) 8%, transparent);
}

.st-row-cutoff {
    border-bottom: none;
    box-shadow: 0 2px 0 var(--text-dim);
}

.st-col-pos {
    width: 20px;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
}

.st-pos-match {
    color: var(--accent);
    font-weight: 700;
}

.st-col-team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding-left: 4px;
}

.st-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 50%;
    flex-shrink: 0;
}

.st-team-code {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.st-col-num {
    width: 24px;
    flex-shrink: 0;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.st-col-wl {
    width: 34px;
    flex-shrink: 0;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.st-col-nrr {
    width: 44px;
    flex-shrink: 0;
    text-align: center;
    font-size: 11px;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

.st-col-pts {
    width: 26px;
    flex-shrink: 0;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Sheffield Shield's fractional points (18.21) — standingsCols().wide */
.st-col-pts.st-col-pts-wide { width: 40px; }

.st-pts-match {
    color: var(--accent);
}

.st-col-form-hd {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
}

/* Report tab */
.rp-para {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}
.rp-hit-emoji {
    font-size: 14px;
    width: 22px;
    flex-shrink: 0;
}
.pv-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

/* ========== DAILY PAGE ========== */
.daily-loading {
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.daily-header-block {
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 0 !important;
}

.daily-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dr-col-wt     { padding: 0 5px; white-space: nowrap; text-align: center; color: var(--text-secondary); font-size: 13px; font-family: ui-monospace, monospace; }
.dr-col-acc    { padding: 0 5px; white-space: nowrap; text-align: center; color: var(--text-secondary); font-size: 13px; font-family: ui-monospace, monospace; }
.dr-col-roi    { padding: 0 5px; white-space: nowrap; text-align: center; color: var(--text-secondary); font-size: 13px; font-family: ui-monospace, monospace; }
.dr-col-profit { padding: 0 5px; white-space: nowrap; text-align: center; color: var(--text-secondary); font-size: 13px; font-family: ui-monospace, monospace; }

/* Daily report: grid so columns size to widest cell and stay aligned across rows */
.dr-models { display: grid; grid-template-columns: 1fr repeat(4, max-content); }
.dr-models .rp-model-row { display: contents; }
.dr-models .rp-stats { display: contents; }
/* every grid cell (label + 4 stat cols) gets the row's padding & divider */
.dr-models .pv-prob-label,
.dr-models .dr-col-wt,
.dr-models .dr-col-acc,
.dr-models .dr-col-roi,
.dr-models .dr-col-profit {
    display: flex;
    align-items: center;
    padding-top: 9px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--border);
}
.dr-models .rp-model-row:last-child .pv-prob-label,
.dr-models .rp-model-row:last-child .dr-col-wt,
.dr-models .rp-model-row:last-child .dr-col-acc,
.dr-models .rp-model-row:last-child .dr-col-roi,
.dr-models .rp-model-row:last-child .dr-col-profit { border-bottom: none; }
.dr-models .dr-col-wt,
.dr-models .dr-col-acc,
.dr-models .dr-col-roi,
.dr-models .dr-col-profit { justify-content: center; }
.dr-models .pv-prob-label { padding-left: 12px; }
.dr-models .dr-col-profit { padding-right: 12px; }

/* Verdict table (match report): same grid layout as daily report */
.vr-models { display: grid; grid-template-columns: 1fr repeat(3, max-content); }
.vr-models .rp-model-row { display: contents; }
.vr-models .rp-stats { display: contents; }
.vr-models .pv-prob-label,
.vr-models .rp-s1,
.vr-models .rp-s2,
.vr-models .rp-s3 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 9px 5px;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}
.vr-models .rp-model-row:last-child .pv-prob-label,
.vr-models .rp-model-row:last-child .rp-s1,
.vr-models .rp-model-row:last-child .rp-s2,
.vr-models .rp-model-row:last-child .rp-s3 { border-bottom: none; }
.vr-models .pv-prob-label { justify-content: flex-start; padding-left: 12px; }
.vr-models .rp-s3 { padding-right: 12px; }

.rp-model-row-head { border-bottom: 1px solid var(--border); }
.rp-model-row-head .pv-prob-label,
.rp-model-row-head .dr-col-wt,
.rp-model-row-head .dr-col-acc,
.rp-model-row-head .dr-col-roi,
.rp-model-row-head .dr-col-profit {
    color: var(--text-dim);
    font-size: 10px;
    letter-spacing: 0.06em;
    font-family: inherit;
}

.daily-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.daily-table thead tr {
    border-bottom: 1px solid var(--border);
}

.daily-table th {
    padding: 10px 12px 8px;
    text-align: right;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.daily-table th:first-child,
.daily-table td:first-child {
    text-align: left;
}

.daily-table td {
    padding: 10px 12px;
    text-align: right;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}

.daily-table tbody tr:last-child td {
    border-bottom: none;
}

.dr-model {
    font-weight: 600;
}

.dr-pos {
    color: var(--color-win);
    font-weight: 600;
}

.dr-neg {
    color: var(--color-loss);
    font-weight: 600;
}

.daily-legend {
    font-size: 12px;
}

.dl-row {
    display: flex;
    gap: 8px;
    padding: 3px 0;
    color: var(--text-secondary);
}

.dl-key {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 44px;
    flex-shrink: 0;
}

.dl-val {
    color: var(--text-secondary);
}

/* ---------------------
   Lobby
   --------------------- */
.lb-gear-fab {
    position: fixed;
    bottom: calc(20px + var(--safe-bottom));
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: background 0.15s;
}
.lb-gear-fab:active { background: var(--bg-card-alt); }

.lb-channel-link {
    position: fixed;
    bottom: calc(20px + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%);
    height: 44px;
    padding: 0 18px;
    border-radius: 22px;
    background: var(--bg-card);
    border: 1px solid var(--accent-link);
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    color: var(--accent-link);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    white-space: nowrap;
    z-index: 100;
    transition: background 0.15s, transform 0.15s;
    animation: lb-channel-pulse 2.4s ease-in-out infinite;
    will-change: transform, box-shadow;
}
.lb-channel-link:active {
    background: var(--bg-card-alt);
    transform: translateX(-50%) scale(0.96);
    animation-play-state: paused;
}

@keyframes lb-channel-pulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 2px 12px rgba(0,0,0,0.18), 0 0 0 0 rgba(59,130,246,0.45);
    }
    50% {
        transform: translateX(-50%) scale(1.04);
        box-shadow: 0 2px 16px rgba(0,0,0,0.22), 0 0 0 8px rgba(59,130,246,0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .lb-channel-link { animation: none; }
}

/* Settings drawer */
.lb-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 100;
}
.lb-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 20px 20px 0 0;
    padding: 8px 20px calc(24px + var(--safe-bottom));
    z-index: 101;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.lb-drawer-open { transform: translateY(0); }
.lb-drawer-handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    margin: 4px auto 16px;
}
.lb-drawer-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}
.lb-drawer-section {
    margin-bottom: 20px;
}
.lb-drawer-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.lb-list {
    padding: 0;
    /* room for the fixed "Follow Channel" button so it never covers the last match */
    padding-bottom: calc(80px + var(--safe-bottom));
}

/* Status badge */
.lb-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.lb-live     { background: rgba(16,185,129,0.15); color: #10b981; }
.lb-finished { background: rgba(100,116,139,0.12); color: var(--text-dim); }
.lb-upcoming { background: rgba(59,130,246,0.12); color: #3b82f6; }
.lb-delay    { background: rgba(245,158,11,0.12); color: #d97706; }

/* Tournament group — card with header + entity list (mirrors report's performer blocks) */
.lb-group {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 8px;
}
.lb-group:last-child { margin-bottom: 0; }
.lb-group-head {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 12px 8px;
    border-bottom: 1px solid var(--border);
}
.lb-group-name {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.lb-group-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 1px 7px;
}
.lb-group .pv-h2h-matches { padding: 0px; }

.lb-match-row {
    cursor: pointer;
    transition: background 0.15s;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
}
.lb-match-row:hover { background: var(--bg-secondary); }
.lb-match-row:active { background: var(--bg-card-alt); }
.lb-match-time-col {
    flex-shrink: 0;
    width: 46px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}
/* Live state: status badge shown in the left column instead of a time */
.lb-tc-live {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-live);
}
/* Live over counter — slightly tighter so "19.5 ov" fits the 46px column */
.lb-tc-overs {
    font-size: 10px;
    letter-spacing: -0.2px;
    white-space: nowrap;
}
.lb-tc-status {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-amber);
}
.lb-tc-status.lb-tc-status-dim { color: var(--text-dim); }
.lb-match-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.lb-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
    font-size: 15px;
}

/* Переключатель стадий прогноза (Final / Before lineups) + пометка о том, что
   предварительный прогноз посчитан без состава и жребия. Рисуется только когда
   у матча есть оба прогноза; иначе показывается одна таблица с пометкой. */
.pv-stage-switch { display: flex; gap: 4px; margin-bottom: 8px; }
.pv-stage-btn {
    flex: 1;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}
.pv-stage-btn:hover { background: var(--bg-card); }
.pv-stage-btn.pv-stage-active { background: var(--bg-card); color: var(--text-primary); border-color: var(--accent-link); }
.pv-stage-note { margin: 8px 0 0; font-size: 11px; line-height: 1.45; color: var(--text-dim); }

/* ========== WEEKLY PAGE ========== */
/* Переиспользует daily-разметку (.dr-models, .dr-pos/.dr-neg); своё — только разбивка по лигам:
   у неё вместо "Source" в шапке стоит код лиги (CPL, WBBL…) и счётчик матчей. */
.wk-league {
    margin-top: 10px;
}

/* шапка лиги крупнее дефолтной (10px/dim), иначе код лиги читается как служебная подпись */
.rp-model-row-head .pv-prob-label.wk-head-label {
    gap: 6px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.wk-head-note {
    color: var(--text-dim);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

/* ===== League / team pages (entity.js) — rules synced from the site's
   web/apps/site/public/style.css by its build; re-sync when those widgets change. ===== */
.mh-card .mh-tabs { margin: 12px -12px 0;
    border-top: 1px solid var(--border); }
.mh-card .mh-tabs .tabs-list { padding: 0 8px; }
.ps-hidden { display: none; }
.sq-wrap { padding: 8px 12px 16px; }
.sq-season-row { padding: 8px 12px 0; display: flex; justify-content: flex-end; }
.pv-byline { font-size: 12px;
    color: var(--text-dim);
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid var(--border); }
.pv-byline-sep { margin: 0 6px; }
.pv-matches-tab .pv-h2h-match:hover, .pv-matches-tab a.hist-link:hover { background: var(--bg-secondary); }
.sq-team-btn:disabled { opacity: 0.4;
    cursor: not-allowed; }
.st-group-title { font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    margin: 14px 4px 6px; }
.st-group-title:first-child { margin-top: 2px; }
/* The first group right under the switcher band needs air of its own. */
.sw-card > .sq-switcher + .st-group-title,
.ps-group:has(> .sq-switcher) > .ps-pane > .st-group-title:first-child { margin-top: 12px; }
a.hist-link { text-decoration: none; color: inherit; cursor: pointer; }
a.hist-link:hover { background: var(--bg-secondary); }
.ent-hero { display: flex; align-items: center; gap: 12px;
    padding: 4px 2px 2px; }
.ent-hero-logo { width: 56px; height: 56px; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center; }
.ent-hero-logo .pv-h2h-logo { width: 100%; max-width: 100%; height: 100%; max-height: 100%; }
/* Hero logo (league, team) and player photo: rounded 10px. */
.ent-hero-logo .pv-h2h-logo, .ent-hero-logo .pl-photo { border-radius: 10px; }
/* Match rows (lobby, team/league history, recent/H2H): 20px team logos rounded in the
   same proportion as the headers. */
.pv-h2h-match img.pv-h2h-logo { border-radius: 4px; }
/* Team/league widgets: form rows (24px) and the featured match card (40px). */
.ent-f2-logo img.pv-h2h-logo { border-radius: 5px; }
.ent-feat-team img.pv-h2h-logo { border-radius: 8px; }
.ent-hero-meta { min-width: 0; }
.ent-hero-name { font-size: 20px; font-weight: 700; line-height: 1.2;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; }
@media (max-width: 560px) { .ent-hero-name { font-size: 16px; line-height: 1.15; } }
.ent-hero-aside { margin-left: auto; flex: 0 0 auto; }
.ent-season-select { background: var(--card, #1b2431); color: inherit;
    border: 1px solid rgba(255,255,255,.14); border-radius: 8px;
    padding: 5px 10px; font-size: 14px; cursor: pointer; }
.ent-ctrl-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; }
.ent-ctrl-wrap > * { grid-column: 1 / -1; }
.ent-ctrl-wrap > .sq-switcher { grid-column: 1; grid-row: 1; }
.ent-ctrl-wrap > .ent-season-ctrl { grid-column: 2; grid-row: 1; }
.ent-ctrl-solo > .ent-season-ctrl { justify-self: end; min-height: 32px; }
.ent-season-ctrl { margin-bottom: 8px; padding: 0 10px; border: none; border-radius: 12px;
    background: var(--bg-secondary); color: var(--text-primary);
    font-size: 12px; font-weight: 600; }
.ent-section { margin-bottom: 8px; }
.ent-section > .pv-h2 { margin: 8px 2px 6px; }
.ent-matches .card-matches { margin-bottom: 8px; }
.ent-about-card { padding: 12px 14px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-secondary); }
.ent-intro p { margin: 0 0 8px; }
.ent-intro p:last-child { margin-bottom: 0; }
.ent-intro strong { color: var(--text-primary); font-weight: 600; }
.ent-intro .lp-h3, .lp-faq .lp-q { margin: 14px 0 4px; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.lp-facts { margin: 0 0 4px; display: grid; gap: 0; }
.lp-facts > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px;
    padding: 6px 0; border-top: 1px solid var(--border); }
.lp-facts > div:first-child { border-top: 0; }
.lp-facts dt { color: var(--text-dim); font-size: 12.5px; }
.lp-facts dd { margin: 0; color: var(--text-secondary); font-size: 13.5px; }
.lp-faq .lp-q:first-child { margin-top: 6px; }
.ent-about-card .lp-title { margin: 0 0 8px; font-size: 16px; font-weight: 600; color: var(--text-primary); }
.ent-tab-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 12px 0; min-height: 32px; }
.ent-tab-head .ent-tab-h2 { margin: 0; }
.ent-tab-head .ent-season-ctrl { margin: 0; min-height: 32px; flex-shrink: 0; }
.ent-season-loading { opacity: .5; pointer-events: none; transition: opacity .15s; }
.lh-label { margin: 0; font-weight: 400; }
.lh-row { min-height: 54px; }
.lh-logo { display: flex; align-items: center; justify-content: center; }
.lh-logo .pv-h2h-logo { width: 26px; height: 26px; object-fit: contain; border-radius: 50%; }
.lh-logo .pv-h2h-logo-hidden { display: none; }
.lh-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-row .rp-player-sub .rp-pos { font-variant-numeric: tabular-nums; }
.lh-row-champ { background: color-mix(in srgb, var(--color-win) 8%, transparent); }
.lh-badge-champ { background: color-mix(in srgb, var(--color-win) 18%, transparent); color: var(--color-win); text-transform: uppercase; letter-spacing: .03em; }
.lh-row .sq-badge-wk { text-transform: uppercase; letter-spacing: .03em; }
.ll-head { gap: 10px; padding-top: 8px; padding-bottom: 8px; }
.ll-season { font-size: 13px; padding: 3px 8px; background: var(--bg-card); border-color: var(--border); color: var(--text-primary); }
.ll-season-one { font-size: 12px; color: var(--text-dim); }
.lr-since { font-size: 11px; color: var(--text-dim); }
.lr-cat { color: var(--text-secondary); font-weight: 600; }
.lr-val { width: auto; white-space: nowrap; }
.ll-cols { display: flex; justify-content: flex-end; position: relative;
    padding: 6px 12px; border-bottom: 1px solid var(--border); }
/* Best players columns: heads and numbers share fixed widths. The heads were
   width:auto, so "M ⓘ" / "Points ⓘ" drifted off the numbers under them. */
.ll-wrap .kp-stats, .ll-wrap .kp-heads { gap: 10px; }
.ll-wrap .kp-s1, .ll-wrap .kp-heads .kp-s1 { width: 40px; }
.ll-wrap .kp-s2, .ll-wrap .kp-heads .kp-s2 { width: 76px; }
/* Season leaders (league + team): one card — head with the period select, pill
   tabs per board (Runs / Wickets / Innings / Spells), top-10 rows with a rank. The
   .ps-group host styling assumes the switcher is the top band; here the head sits
   above it, so the band loses its rounded top. */
.ps-group.slb-wrap { margin: 0 0 8px; }
.ps-group.slb-wrap > .sq-switcher { border-radius: 0; }
.slb-wrap .ll-head { border-bottom: 1px solid var(--border); }
.slb-heads, .slb-stats { gap: 0; }
.slb-c { width: 44px; text-align: right; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.slb-heads .slb-c { color: var(--text-dim); }
.slb-stats .slb-c.rp-bold { color: var(--text-primary); }
.slb-rank { width: 16px; flex-shrink: 0; margin-right: -4px; text-align: right; font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.slb-wrap .rp-player-sub { min-width: 0; }
.slb-wrap .rp-pos { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slb-empty { padding: 14px 12px; color: var(--text-dim); text-align: center; }
/* Inside the team's format pills the card is flattened into the host: no own margin. */
.ps-group .ps-group.slb-wrap { margin: 0; }
.pv-live-tag { color: var(--accent-live); font-weight: 600; }
.ent-hero-titles { margin-top: 4px; font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.ent-hero-titles .ent-title-item { white-space: nowrap; }
.ent-flag { width: 20px; height: 15px; object-fit: cover; border-radius: 2px; vertical-align: -2px; margin-right: 6px; box-shadow: 0 0 0 1px rgba(255,255,255,0.08); }
.ent-comp-block + .ent-comp-block { margin-top: 10px; }
.ent-comp-head { display: flex; align-items: center; gap: 8px; margin: 10px 4px 0; font-size: 13px; font-weight: 600; color: var(--text-primary); min-width: 0; }
.ent-comp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ent-comp-country { margin-left: auto; font-weight: 400; color: var(--text-dim); font-size: 12px; white-space: nowrap; }
.ent-comp-logo { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.ent-comp-head .ent-flag { margin-right: 4px; }
/* League page: an upcoming match without a page yet is a row, not a link — no hover fill. */
[data-ps-id="lm-upcoming"] .pv-matches-tab div.pv-h2h-match:hover,
[data-ps-id="lm-upcoming"] .pv-matches-tab div.pv-h2h-match:active { background: none; }
.ent-ctrls { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
/* Two selects don't fit beside the heading (a competition name is long): the heading
   takes its own line, the selects a row under it — the competition one stretches and
   clips its name, the season one keeps its width on the right. */
/* …only with two selects: a lone season select (team Squad) stays beside the heading. */
.ent-tab-head:has(> .ent-ctrls > :nth-child(2)) { flex-direction: column; align-items: stretch; gap: 8px; }
/* Squad blocks under the tab heading: 8px like every other tab (the wrapper's top
   padding + the card's margin made 16). */
.ent-tab-head + .sq-wrap { padding-top: 0; }
.ent-tab-head > .ent-ctrls { flex-wrap: nowrap; }
.ent-tab-head > .ent-ctrls > .ent-season-ctrl { flex: 0 0 auto; }
.ent-tab-head > .ent-ctrls > .ent-comp-ctrl { flex: 1 1 auto; min-width: 0; width: 100%; text-overflow: ellipsis; }
.ent-tab-head > .ent-ctrls > .ent-season-ctrl:disabled { opacity: 1; cursor: default; color: var(--text-secondary); }
.ent-feat { display: block; text-decoration: none; color: inherit; }
.ent-feat:hover { border-color: var(--text-dim); }
.ent-feat-league { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px 0; font-size: 12px; color: var(--text-secondary); min-width: 0; }
.ent-feat-league span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ent-feat2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ent-feat2 .ent-feat-body { padding: 14px 8px; gap: 6px; }
.ent-feat2 .ent-feat-scores { font-size: 16px; gap: 8px; }
.ent-feat-code { display: none; font-size: 13px; font-weight: 700; color: var(--text-primary); }
.ent-feat-time { display: inline-flex; gap: 6px; }
@media (min-width: 601px) { .ent-feat2 .ent-feat-name { display: none; } }
@media (min-width: 601px) { .ent-feat2 .ent-feat-code { display: block; } }
@media (min-width: 601px) { .ent-feat2 .ent-feat-time { flex-direction: column; gap: 0; border-radius: 10px; text-align: center; } }
@media (min-width: 601px) { .ent-feat2 .ent-feat-t { font-size: 16px; } }
@media (min-width: 601px) { .ent-feat2 .ent-feat-d { font-size: 11px; font-weight: 500; color: var(--text-secondary); } }
.ent-feat2-dots { display: none; justify-content: center; gap: 6px; margin-top: 8px; }
.ent-feat2-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.ent-feat2-dots span.on { background: var(--text-secondary); }
@media (max-width: 600px) { .ent-feat2 { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 8px; } }
@media (max-width: 600px) { .ent-feat2::-webkit-scrollbar { display: none; } }
@media (max-width: 600px) { .ent-feat2 > .ent-feat { flex: 0 0 100%; scroll-snap-align: start; } }
@media (max-width: 600px) { .ent-feat2-dots { display: flex; } }
.ent-feat-body { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 16px 12px; }
.ent-feat-team { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
.ent-feat-team .pv-h2h-logo { width: 40px; height: 40px; }
.ent-feat-name { font-size: 13px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ent-feat-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.ent-feat-sc { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.ent-feat-sc span + span { font-size: 0.8em; }
.ent-feat-scores { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ent-feat-sep { width: 1px; height: 18px; background: var(--border); }
.ent-feat-status, .ent-feat-date { font-size: 12px; color: var(--text-secondary); }
.ent-feat-time { font-size: 14px; font-weight: 600; color: var(--text-primary); padding: 4px 10px; border-radius: 999px; background: var(--bg-card-alt); white-space: nowrap; }
.ent-f2-sum { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.ent-f2 { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); padding: 6px 8px 12px; }
.ent-f2-col { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0 4px; border-radius: 10px; text-decoration: none; min-width: 0; }
.ent-f2-col:hover { background: var(--bg-primary); }
.ent-f2-chart { position: relative; display: block; width: 100%; height: 120px; }
.ent-f2-chart::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--border); }
.ent-f2-col:first-child .ent-f2-chart::before { left: 50%; }
.ent-f2-col:last-child .ent-f2-chart::before { right: 50%; }
.ent-f2-bar { position: absolute; left: 50%; transform: translateX(-50%); width: min(24px, 60%); height: calc(var(--h) * 42px); }
.ent-f2-bar.ent-f2-w { bottom: calc(50% + 15px); border-radius: 5px 5px 2px 2px; background: var(--accent-live); }
.ent-f2-bar.ent-f2-l { top: calc(50% + 15px); border-radius: 2px 2px 5px 5px; background: var(--accent-wicket); }
.ent-f2-res { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; }
.ent-f2-res.ent-f2-w { background: var(--accent-live); }
.ent-f2-res.ent-f2-l { background: var(--accent-wicket); }
.ent-f2-res.ent-f2-n { background: var(--text-dim); }
.ent-f2-logo .pv-h2h-logo { width: 24px; height: 24px; }
.ent-f2-mg { display: flex; flex-direction: column; align-items: center; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ent-f2-mg b { font-size: 13px; font-weight: 700; }
.ent-f2-mg small { font-size: 10px; font-weight: 500; opacity: 0.85; }
.ent-f2-tw { color: var(--accent-live); }
.ent-f2-tl { color: var(--accent-wicket); }
.ent-f2-tn { color: var(--text-dim); }
@media (max-width: 520px) { .ent-f2-mg b { font-size: 12px; } }
@media (max-width: 520px) { .ent-f2-res { width: 20px; height: 20px; font-size: 11px; } }
@media (max-width: 520px) { .ent-f2 { padding: 6px 4px 10px; } }
.ent-intro-h { font-size: 14px; font-weight: 600; color: var(--text-primary); margin: 14px 0 6px; }
.ent-feat-win .ent-feat-name, .ent-feat-win .ent-feat-code, .ent-feat-scores .ent-feat-win { color: var(--text-primary); font-weight: 700; }
.ent-feat-lose .ent-feat-name, .ent-feat-lose .ent-feat-code, .ent-feat-scores .ent-feat-lose { color: var(--text-dim); font-weight: 600; }
.ent-feat-lose .pv-h2h-logo { opacity: 0.7; }
.ent-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 6px; font-size: 13px; color: var(--text-secondary); }
.ent-meta-item { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; white-space: nowrap; }
.ent-meta-item > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ent-hero-meta { flex: 1 1 auto; }
.ent-meta-item svg { color: var(--text-dim); flex-shrink: 0; }
.ent-meta-title svg { color: #f5b301; }
.ent-meta .ent-flag { width: 18px; height: 13px; margin: 0; vertical-align: 0; }
.ent-hero-comps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ent-hero-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; background: var(--bg-primary); color: var(--text-secondary); text-decoration: none; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ent-hero-chip:hover { color: var(--text-primary); }
.ent-hero-chip img { width: 18px; height: 18px; object-fit: contain; border-radius: 4px; }
.ent-hero-chip { max-width: 100%; min-width: 0; }
.ent-hero-chip span { overflow: hidden; text-overflow: ellipsis; }
.ent-f2-bar.ent-f2-lc { bottom: calc(50% + 15px); border-radius: 5px 5px 2px 2px; background: #0072B2; }
.ent-f2-bar.ent-f2-vc { top: calc(50% + 15px); border-radius: 2px 2px 5px 5px; background: #D55E00; }
.ent-f2-res.ent-f2-lc, .ent-f2-res.ent-f2-vc { background: var(--bg-primary); width: 26px; height: 26px; border-radius: 50%; padding: 3px; }
.ent-f2-res.ent-f2-lc { box-shadow: 0 0 0 2px #0072B2; }
.ent-f2-res.ent-f2-vc { box-shadow: 0 0 0 2px #D55E00; }
.ent-f2-res .pv-h2h-logo { width: 20px; height: 20px; }
.ent-f2-tlc, .ent-f2-tlc b { color: #0072B2; }
.ent-f2-tvc { color: #D55E00; }
.ent-f2-mg.ent-f2-tlc { color: #3b9ad9; }
.ent-f2-mg.ent-f2-tvc { color: #f08a4b; }
.ent-f2-h2h { gap: 8px; }
.ent-f2-h2h .pv-h2h-logo { width: 20px; height: 20px; }
.ent-f2-h2h b { font-size: 15px; }

/* Lobby: a tournament header opens its league page. */
.lb-group-head.lb-group-link { cursor: pointer; }
.lb-group-arrow { color: var(--text-dim); font-weight: 400; margin-left: 2px; }
.lb-group-head.lb-group-link:active .lb-group-name { opacity: 0.7; }

/* Match screen: league code, team block and standings rows open league/team pages. */
.mh-entity-link { cursor: pointer; }
.mh-team-left.mh-entity-link:active, .st-row.mh-entity-link:active { opacity: 0.7; }
[data-entity-league].entity-link { cursor: pointer; }

/* Logo placeholders (07.11.2026). Most teams, leagues and players have no crest/photo;
   initials in an empty circle and empty holes made pages look broken. Now: a team =
   shield with its code, a league = trophy, a player = silhouette. Masks, so the shape
   takes the theme colour; the same classes come from every renderer and onerror. */
:root {
    --ph-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .6 23 3.6v7.6c0 5.9-4.5 10.5-11 12.2C5.5 21.7 1 17.1 1 11.2V3.6z'/%3E%3C/svg%3E");
    --ph-trophy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 21h8M12 17v4M7 4h10v5a5 5 0 0 1-10 0V4zM17 5h3v2a3 3 0 0 1-3 3M7 5H4v2a3 3 0 0 0 3 3'/%3E%3C/svg%3E");
    --ph-person: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8.2' r='4.6'/%3E%3Cpath d='M2.4 24c0-5.9 4.3-9.8 9.6-9.8s9.6 3.9 9.6 9.8z'/%3E%3C/svg%3E");
}
.pv-h2h-logo-fb, .mh-logo-fb, .st-logo-fb {
    -webkit-mask: var(--ph-shield) center / contain no-repeat;
    mask: var(--ph-shield) center / contain no-repeat;
    background: color-mix(in srgb, var(--text-dim) 32%, transparent) !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: var(--text-primary) !important;
    letter-spacing: -0.03em !important;
    padding: 0 0 0.25em !important;
    box-sizing: border-box;
    text-transform: uppercase;
    overflow: hidden;
}
.mh-logo-fb { width: 100%; height: 100%; font-size: 13px !important; }
/* The header logo sits in the team link: give the link the wrap's size, or the
   shield's 100% resolves against a content-sized link and shrinks to the code. */
.mh-logo-wrap > a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; text-decoration: none; }
.st-logo-fb { display: flex; align-items: center; justify-content: center; font-size: 7px; font-weight: 700; }
.ent-hero-logo .pv-h2h-logo-fb { font-size: 16px; }
.ent-feat-team .pv-h2h-logo-fb { font-size: 12px; }
.lh-logo .pv-h2h-logo-fb { width: 26px; height: 26px; }
/* League: trophy, no text. */
.pv-h2h-logo-fb.lg-ph, .lg-ph {
    -webkit-mask: var(--ph-trophy) center / 82% no-repeat;
    mask: var(--ph-trophy) center / 82% no-repeat;
    background: var(--text-dim) !important;
    font-size: 0 !important;
    padding: 0;
}
.lg-ph { display: inline-block; aspect-ratio: 1; flex-shrink: 0; }
.pv-h2h-logo-hidden.pv-h2h-logo-hidden { display: none !important; }
.ent-hero-chip .lg-ph { width: 18px; height: 18px; }
/* Player: silhouette inside the avatar circle (the initial is kept in the DOM, hidden). */
.rp-avatar-fb, .sq-avatar-fb, .pl-photo-fb, .sc-avatar-fb {
    position: relative;
    overflow: hidden;
    font-size: 0 !important;
}
.rp-avatar-fb::before, .sq-avatar-fb::before, .pl-photo-fb::before, .sc-avatar-fb::before {
    content: "";
    position: absolute;
    inset: 20% 14% 0;
    background: var(--text-dim);
    opacity: 0.7;
    -webkit-mask: var(--ph-person) center bottom / contain no-repeat;
    mask: var(--ph-person) center bottom / contain no-repeat;
}

/* ---- Match stream card (app.js renderStreamCard) — the site's MatchStream.astro
   rules (web/apps/site/public/style.css "Match stream card"); .card gives the box. */
.ms-stream { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
.ms-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ms-badge {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
    padding: 2px 7px; border-radius: 6px; background: var(--bg-secondary); color: var(--text-secondary);
}
.ms-badge.ms-live { background: #dc2626; color: #fff; }
.ms-badge[hidden] { display: none; }
.ms-player { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #0b0f17; }
.ms-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ms-facade {
    position: absolute; inset: 0; width: 100%; padding: 0; border: 0; cursor: pointer;
    display: flex; align-items: center; justify-content: center; background: #0b0f17; color: #fff; text-decoration: none; font: inherit;
}
.ms-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ms-play {
    position: relative; width: 68px; height: 48px; border-radius: 12px; background: rgba(220, 38, 38, 0.92);
    transition: transform 0.15s ease, background 0.15s ease;
}
.ms-play::after {
    content: ""; position: absolute; left: 27px; top: 14px;
    border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff;
}
.ms-facade:active .ms-play { transform: scale(1.08); background: #dc2626; }
.ms-start {
    position: absolute; left: 10px; bottom: 10px; padding: 3px 8px; border-radius: 6px;
    background: rgba(0, 0, 0, 0.72); font-size: 12px; font-weight: 600;
}
.ms-note { margin: 0; font-size: 12px; color: var(--text-dim); }
.ms-note[hidden] { display: none; }
.ms-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ms-group { display: flex; flex-direction: column; gap: 6px; }
.ms-group-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); }
.ms-alt {
    font: inherit; font-size: 12px; padding: 5px 10px; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--border); background: transparent; color: var(--text-secondary); text-decoration: none;
}
.ms-alt.ms-on { color: var(--text-primary); border-color: var(--text-dim); }

/* ---- League/team pages (entity.js) — catch-up with the site's rules (11.11.2026).
   The panels' markup comes from the site (lib/team-panel.ts, league-panel.ts), the
   styles are copied: after site widget changes diff the two (selectors of the classes
   the pages use) and copy what's missing. Scoped to .ent-app where the match screen
   needs its own value (.st-wrap/.tab-empty sit inside .tab-wrap there). */
.ent-app .st-wrap { padding: 8px 12px 16px; }
.ent-app .tab-empty {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
    padding: 28px 24px; margin: 8px 0;
}
.ent-hero-below { padding: 0 2px 2px; }
.ent-hero-below > .ent-meta { margin-top: 12px; }
.ent-hero-below > .ent-hero-comps { margin-top: 10px; }
:is(h2, h3).sq-block-title, h3.sc-label { margin: 0; }
h3.sc-label { font-weight: 400; }
a.tab-btn { display: inline-block; text-decoration: none; }
.st-note { margin: 10px 12px 2px; font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.ent-feat-body { grid-template-columns: minmax(64px, 1fr) minmax(0, auto) minmax(64px, 1fr); }
.ent-feat2 .ent-feat-body { grid-template-columns: minmax(44px, 1fr) minmax(0, auto) minmax(44px, 1fr); }
.ent-feat-status { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ent-feat-date { white-space: nowrap; }
.st-team-code { min-width: 0; }

/* ---- Play-by-Play + player photos in the scorecard (site: public/style.css, phone sizes) ---- */
.pbp-sec { border-top: 1px solid var(--border); }
.pbp-more { display: none; }
.pbp-open .pbp-more { display: block; }
.pbp-over { padding: 12px 16px; border-top: 1px solid var(--border); }
.pbp-sec .sc-section-head + .pbp-over { border-top: none; }
.pbp-sec > .sc-section-head { padding: 14px 16px 0; margin-bottom: 0; }
.pbp-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; font-size: 13px; white-space: nowrap; }
.pbp-num { font-weight: 600; color: var(--text-primary); }
.pbp-over-cur .pbp-num { color: var(--accent-live); }
.pbp-runs { margin-left: auto; color: var(--text-secondary); }
.pbp-body { display: grid; grid-template-columns: 36px 1fr 52px; align-items: center; gap: 10px; }
.pbp-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
.pbp-who { font-size: 13px; color: var(--text-primary); line-height: 1.35; overflow-wrap: anywhere; }
.pbp-balls { flex-wrap: wrap; justify-content: center; }
.pbp-out { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12px; color: var(--accent-wicket); }
.pbp-bats { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.pbp-bats .sc-avatar { width: 26px; height: 26px; margin-left: -6px; border: 2px solid var(--bg-card); }
.pbp-bats .sc-avatar:first-child { margin-left: 0; }
.pbp-toggle { display: block; width: 100%; padding: 12px; border: none; border-top: 1px solid var(--border); background: transparent; color: var(--text-primary); font-size: 13px; font-weight: 600; cursor: pointer; }
.pbp-toggle:active { background: var(--bg-secondary); }
.pbp-sum { margin-top: 8px; font-size: 12px; line-height: 18px; color: var(--text-secondary); text-align: center; }
.pbp-now { color: var(--text-primary); }
.pbp-now strong { font-weight: 600; }
/* Match in progress: every over takes the same height, so a new ball, the end of an over
   or a wicket doesn't move the page. The text slot fits the longest line (2 rows, 3 on phones). */
.pbp-steady .pbp-body { min-height: 66px; }
/* A long over (wides, no-balls) shrinks its balls instead of wrapping to a second row. */
.pbp-steady .pbp-balls { flex-wrap: nowrap; align-items: center; max-width: 100%; height: 24px; }
.pbp-steady .pbp-balls .sc-ball { flex: 0 1 24px; min-width: 0; height: auto; aspect-ratio: 1; }
.pbp-steady .pbp-sum { display: grid; align-items: center; min-height: 36px; }
.pbp-bbb { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 8px auto 0; padding: 4px 10px; border: none; border-radius: 7px; background: var(--bg-secondary); color: var(--text-secondary); font-size: 12px; font-weight: 600; cursor: pointer; }
.pbp-bbb .sc-expand-arrow { font-size: 11px; }
.pbp-lines { margin-top: 8px; border-top: 1px dashed var(--border); }
.pbp-lines-hidden { display: none; }
.pbp-line { display: grid; grid-template-columns: 34px 24px 1fr; gap: 8px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--border); }
.pbp-line:last-child { border-bottom: none; }
.pbp-bno { font-size: 12px; color: var(--text-dim); padding-top: 4px; font-variant-numeric: tabular-nums; }
.pbp-txt { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-primary); }
.pbp-txt strong { font-weight: 600; }
@media (max-width: 420px) {
    .pbp-body { grid-template-columns: 30px 1fr 40px; gap: 8px; }
    .pbp-bowl .sc-avatar { width: 28px; height: 28px; }
    .pbp-bats .sc-avatar { width: 22px; height: 22px; }
}
@media (max-width: 480px) { .pbp-steady .pbp-sum { min-height: 54px; } }
.sc-player-left { gap: 8px; }
.sc-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-primary); }
.sc-avatar-fb { display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: var(--text-secondary); }

/* ---- Predictions hub (.ph, .pr-table) + video hub (.ls-*) — entity.js "predictions" / "streams" screens.
   Generated from the site's public/style.css (.claude/work/miniapp_css/emit_missing.py), 11.11.2026. */
.pr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pr-table th { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-dim); text-align: right; padding: 0 0 6px 10px; border-bottom: 1px solid var(--border); }
.pr-table td { padding: 8px 0 8px 10px; border-top: 1px solid var(--border); color: var(--text-secondary); }
.pr-table tr:first-child td { border-top: 0; }
.pr-table .pr-tl { text-align: left; padding-left: 0; width: 100%; }
.pr-table .pr-tl a { color: var(--text-primary); text-decoration: none; }
.pr-table .pr-tn { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ph { max-width: 760px; margin: 0 auto; padding: 8px 20px 48px; color: var(--text-secondary); }
.ph-h1 { color: var(--text-primary); font-size: 1.6rem; line-height: 1.25; margin: 12px 0 8px; }
.ph-lede { margin: 0 0 8px; line-height: 1.6; }
.ph-sec { margin: 0 0 28px; }
.ph-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ph-sec-h .ph-h2 { margin: 0; }
.ph-h2 { color: var(--text-primary); font-size: 1.15rem; font-weight: 700; margin: 0 0 8px; }
.ph-note { font-size: 12px; color: var(--text-dim); margin: 8px 0 0; }
.ph-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; flex-shrink: 0; }
.ph-pos { color: var(--accent-live) !important; }
.ph-neg { color: var(--accent-wicket) !important; }
.ph-cards { display: flex; flex-direction: column; gap: 8px; }
.ph-card { position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; transition: border-color 0.15s; }
.ph-card:hover { border-color: var(--text-dim); }
.ph-chead { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }
.ph-lg { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text-secondary); font-weight: 600; text-decoration: none; }
.ph-lg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-lg-logo { height: 28px; width: auto; max-width: 84px; object-fit: contain; flex-shrink: 0; }
[data-theme="light"] .ph-lg-logo { filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.55)); }
a.ph-lg:hover { color: var(--text-primary); }
.ph-time, .ph-status { color: var(--text-secondary); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ph-mt { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.ph-mt th, .ph-mt td { padding: 4px 0; border: 0; background: none; }
.ph-mt thead th { width: 56px; font-size: 11px; font-weight: 500; color: var(--text-dim); text-align: center; white-space: normal; line-height: 1.15; vertical-align: bottom; text-transform: none; letter-spacing: 0; }
.ph-mt thead th:first-child { width: auto; }
.ph-mt thead .ph-dot { width: 6px; height: 6px; margin-right: 4px; vertical-align: 1px; }
.ph-mt tbody th { text-align: left; font-weight: 400; padding-right: 8px; }
.ph-mt td { text-align: center; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.ph-mt .ph-books { border-left: 1px dashed var(--border); }
.ph-team { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 15px; font-weight: 600; color: var(--text-primary); }
.ph-team .pv-h2h-logo { width: 44px; height: 44px; }
.ph-team .pv-h2h-logo-fb { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-card-alt); border: 1px solid var(--border); color: var(--text-secondary); font-size: 13px; letter-spacing: 0.5px; }
.ph-team .pv-h2h-logo-hidden { display: none; }
.ph-mt tbody th, .ph-mt tbody td { padding: 6px 0; }
.ph-tname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-team.ph-won { font-weight: 700; }
.ph-team.ph-lost { color: var(--text-dim); }
.ph-team.ph-lost .pv-h2h-logo { opacity: 0.7; }
.ph-pc { font-size: 0.85em; opacity: 0.8; }
.ph-mt .ph-fav { color: var(--text-primary); font-weight: 700; }
.ph-mt .ph-hit { color: var(--accent-live); }
.ph-mt .ph-miss { color: var(--accent-wicket); }
.ph-hit { color: var(--accent-live); }
.ph-miss { color: var(--accent-wicket); }
.ph-cfoot { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; font-size: 12px; border-top: 1px solid var(--border); padding-top: 8px; margin-top: auto; }
.ph-agree { color: var(--text-secondary); }
.ph-more { color: var(--text-primary); font-weight: 600; text-decoration: none; white-space: nowrap; }
.ph-more::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ph-tabs { display: flex; gap: 8px 6px; flex-wrap: wrap; }
.ph-tab { display: inline-flex; align-items: center; font: inherit; font-size: 12px; padding: 5px 11px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg-secondary); color: var(--text-secondary); cursor: pointer; }
.ph-tab.is-active { background: var(--bg-card-alt); color: var(--text-primary); font-weight: 600; }
.ph-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.ph-tiles[hidden] { display: none; }
.ph-tile { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 12px; min-width: 0; }
.ph-lead { border-color: var(--accent-live); }
.ph-tile-h { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.ph-tile-acc { font-size: 1.6rem; font-weight: 700; color: var(--text-primary); margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.ph-tile-sub { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.ph-tablewrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; overflow-x: auto; }
.ph-table th { white-space: nowrap; }
.ph-table .ph-c-best { text-align: left; white-space: nowrap; color: var(--text-secondary); }
.ph-table .ph-c-acc { color: var(--text-primary); font-weight: 600; }
.ph-sort { font: inherit; text-transform: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.ph-sort:hover { color: var(--text-primary); }
.ph-sort.is-desc::after { content: " ↓"; }
.ph-sort.is-asc::after { content: " ↑"; }
.ph-sort.is-desc, .ph-sort.is-asc { color: var(--text-primary); }
.ph-recent { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.ph-rrow { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 14px; border-top: 1px solid var(--border); color: inherit; text-decoration: none; font-size: 13px; }
.ph-rrow:first-child { border-top: 0; }
.ph-rrow:hover { background: color-mix(in srgb, var(--text-primary) 4%, transparent); } /* not --bg-secondary: that is the chips' own colour */
.ph-rmeta { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--text-dim); }
.ph-rmeta span { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-rteams { display: flex; flex-direction: column; gap: 3px; min-width: 0; color: var(--text-secondary); }
.ph-rteams span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-rteams .ph-won { color: var(--text-primary); font-weight: 600; }
/* One column per method: the chips of a list line up, a method without a pick leaves its place empty. */
.ph-chips { display: grid; grid-template-columns: 34px 42px 54px 46px 51px; gap: 3px; }
.ph-chip-ml_ensemble { grid-column: 1; }
.ph-chip-ai_pred { grid-column: 2; }
.ph-chip-claude_pred { grid-column: 3; }
.ph-chip-cc_pred { grid-column: 4; }
.ph-chip-bookmaker { grid-column: 5; }
.ph-chip { grid-row: 1; text-align: center; font-size: 11px; padding: 2px 0; border-radius: 5px; background: var(--bg-secondary); color: var(--text-dim); white-space: nowrap; }
.ph-chip-hit { color: var(--accent-live); }
.ph-chip-miss { color: var(--accent-wicket); }
.ph-about { line-height: 1.65; }
.ph-about p { margin: 0 0 12px; }
.ph-about a { color: var(--text-primary); }
.ph-q { font-size: 0.95rem; font-weight: 600; margin: 16px 0 4px; color: var(--text-primary); }
.ph-faq-title { margin-top: 28px; }
@media (max-width: 900px) {
  .ph-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .ph-h1 { font-size: 1.3rem; }
  .ph-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-card { padding: 10px 12px; }
  .ph-mt thead th { width: 36px; font-size: 10px; }
  .ph-tname { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; }
  .ph-mt thead .ph-dot { display: none; }
  .ph-mt { font-size: 12px; }
  .ph-team { font-size: 13px; gap: 8px; }
  .ph-team .pv-h2h-logo, .ph-team .pv-h2h-logo-fb { width: 34px; height: 34px; }
  .ph-team .pv-h2h-logo-fb { font-size: 11px; }
  .ph-lg-logo { height: 22px; max-width: 64px; }
  .ph-pc { display: none; }
  .ph-rrow { grid-template-columns: minmax(0, 1fr) auto; }
  .ph-rmeta { grid-column: 1 / -1; flex-direction: row; gap: 8px; }
  .ph-rrow .ph-chips { grid-column: 1 / -1; }
  .ph-table .ph-c-best { display: none; }
  .ph-tablewrap { padding: 8px 10px; }
}
.ls-hub { max-width: 1100px; margin: 0 auto; padding: 8px 16px 48px; color: var(--text-secondary); line-height: 1.6; }
@media (min-width: 1280px) {
  .ls-hub { max-width: 1320px; }
}
.ls-hub h1 { color: var(--text-primary); font-size: 1.7rem; margin: 12px 0 6px; }
.ls-hub h2 { color: var(--text-primary); font-size: 1.15rem; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.ls-tiers { display: flex; gap: 4px; padding: 3px; margin: 8px 8px 2px; border-radius: 10px; background: var(--bg-secondary); flex: none; }
.ls-tier { flex: 1; font: inherit; font-size: 0.82rem; font-weight: 600; padding: 5px 8px; border-radius: 7px; border: 0; cursor: pointer; background: transparent; color: var(--text-secondary); white-space: nowrap; }
.ls-tier span { font-weight: 500; color: var(--text-dim); margin-left: 2px; }
.ls-tier:hover { color: var(--text-primary); }
.ls-tier.ls-tier-on { background: var(--bg-card); color: var(--text-primary); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.ls-none { margin: 0; padding: 16px; color: var(--text-dim); font-size: 0.85rem; }
.ls-list > li[hidden] { display: none; }
.ls-studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; align-items: stretch; }
.ls-stage { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.ls-player { position: relative; aspect-ratio: 16 / 9; background: #0b0f17; }
.ls-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ls-player .ls-facade { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; cursor: pointer; background: #0b0f17; display: flex; align-items: center; justify-content: center; }
.ls-player .ls-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ls-player .ls-play { position: relative; width: 76px; height: 54px; border-radius: 13px; background: rgba(220, 38, 38, 0.92); transition: transform 0.15s ease; }
.ls-player .ls-play::after { content: ""; position: absolute; left: 30px; top: 15px; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; }
.ls-player .ls-facade:hover .ls-play { transform: scale(1.08); background: #dc2626; }
.ls-caption { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.ls-cap-main { display: flex; align-items: center; gap: 10px; }
.ls-hub .ls-cap-title { margin: 0; font-size: 1.05rem; color: var(--text-primary); }
.ls-cap-meta { margin: 0; font-size: 0.82rem; color: var(--text-dim); }
.ls-official { color: var(--accent-live); font-weight: 600; white-space: nowrap; }
/* Full-width row: taps beside the short link text missed it (Clarity heatmap 23.11). */
.ls-cap-link { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); text-decoration: none; align-self: stretch; padding: 6px 0 2px; }
.ls-cap-main, .ls-cap-meta { cursor: pointer; }
.ls-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 7px; border-radius: 6px; background: var(--bg-secondary); color: var(--text-secondary); flex: none; }
.ls-badge.ls-b-live { background: #dc2626; color: #fff; }
.ls-side { position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.ls-side-in { position: absolute; inset: 0; display: flex; flex-direction: column; }
.ls-list { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 6px; scrollbar-width: thin; }
.ls-group { display: flex; align-items: center; gap: 6px; padding: 8px 6px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-primary); }
.ls-item { display: flex; gap: 10px; padding: 6px; border-radius: 10px; text-decoration: none; color: inherit; }
.ls-item:hover { background: var(--bg-secondary); }
.ls-item.ls-on { background: var(--bg-secondary); box-shadow: inset 3px 0 0 var(--accent-live); }
.ls-item-img { position: relative; flex: 0 0 136px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #0b0f17; }
/* Out of the flow: a lazy thumbnail not loaded yet shows its alt text, which stretched the
   frame and with it the whole phone strip (28.11.2026). The frame keeps 16:9 by itself. */
.ls-item-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; color: transparent; }
.ls-item-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.ls-item-teams { color: var(--text-primary); font-weight: 600; font-size: 0.84rem; line-height: 1.3; }
.ls-item-meta { font-size: 0.74rem; color: var(--text-dim); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ls-tag { position: absolute; right: 4px; bottom: 4px; padding: 0 5px; border-radius: 4px; font-size: 11px; font-weight: 600; background: rgba(0, 0, 0, 0.78); color: #fff; font-variant-numeric: tabular-nums; }
.ls-tag-live { left: 4px; right: auto; top: 4px; bottom: auto; background: #dc2626; letter-spacing: 0.04em; }
.ls-dot { width: 9px; height: 9px; border-radius: 50%; background: #dc2626; display: inline-block; flex: none; }
@media (max-width: 860px) {
  .ls-studio-grid { grid-template-columns: minmax(0, 1fr); }
  .ls-side { background: none; border: 0; border-radius: 0; overflow: visible; }
  .ls-side-in { position: static; }
  .ls-tiers { margin: 0 0 8px; background: var(--bg-card); border: 1px solid var(--border); }
  .ls-list { flex: none; display: flex; overflow-x: auto; overflow-y: hidden; gap: 8px; padding: 0 0 6px; scroll-snap-type: x mandatory; }
  .ls-list > li { flex: 0 0 168px; scroll-snap-align: start; }
  .ls-group { display: none; }
  .ls-item { flex-direction: column; gap: 4px; padding: 0; }
  .ls-item:hover, .ls-item.ls-on { background: none; box-shadow: none; }
  .ls-item.ls-on .ls-item-img { outline: 2px solid var(--accent-live); outline-offset: -2px; }
  .ls-item-img { flex: none; width: 100%; }
  .ls-item-meta { -webkit-line-clamp: 2; }
}
.ls-day { color: var(--text-primary); font-size: 0.9rem; margin: 16px 0 6px; }
.ls-sources { margin: 0 0 8px; padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; }
.ls-sources summary { cursor: pointer; color: var(--text-primary); font-weight: 600; font-size: 0.92rem; }
.ls-sources[open] summary { margin-bottom: 4px; }
.ls-note { color: var(--text-dim); }
.ls-chans { list-style: none; margin: 0; padding: 0; columns: 3; column-gap: 24px; font-size: 0.88rem; }
.ls-chans li { break-inside: avoid; padding: 2px 0; }
.ls-chans a { color: var(--text-primary); text-decoration: none; }
.ls-country { color: var(--text-dim); font-size: 0.78rem; }
.ls-faq { max-width: 760px; }
.ls-faq h3 { color: var(--text-primary); font-size: 0.95rem; margin: 14px 0 4px; }
.ls-faq p { margin: 0; }
@media (max-width: 760px) {
  .ls-chans { columns: 2; }
}
@media (max-width: 480px) {
  .ls-chans { columns: 1; }
}

/* ---- Bottom navigation (index.html bottomNav; the site's phone bar, SiteNav.astro) ---- */
.bottom-nav {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding-bottom: var(--safe-bottom);
}
.bottom-nav-link {
    flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 4px 7px;
    font-size: 0.68rem; font-weight: 500;
    color: var(--text-dim); text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.bottom-nav-link svg {
    width: 20px; height: 20px;
    fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
}
.bottom-nav-link[aria-current="page"] { color: var(--text-primary); }
.bottom-nav-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.nav-ico-live { color: #ef4444; }
.nav-ico-live .nav-play { fill: currentColor; animation: nav-live-breathe 1.6s ease-in-out infinite; }
@keyframes nav-live-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .nav-ico-live .nav-play { animation: none; } }
/* The bar is fixed: the page ends above it, the lobby's floating buttons sit over it. */
body.has-bnav #app { padding-bottom: calc(56px + var(--safe-bottom)); }
button.bottom-nav-link { background: none; border: 0; font-family: inherit; cursor: pointer; }
.lb-search-ov[hidden], .lb-search-pop[hidden], .lb-drawer-overlay[hidden] { display: none; }
/* Settings sheet: our Telegram channel — one quiet row, not a floating pill. */
.sh-channel { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 12px; border-radius: 12px; background: var(--bg-secondary); color: var(--text-primary); text-decoration: none; }
.sh-channel-ic { width: 36px; height: 36px; flex: none; border-radius: 50%; background: #229ed9; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.sh-channel-ic svg { width: 20px; height: 20px; margin-left: -2px; }
.sh-channel-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sh-channel-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-channel-sub { font-size: 12px; color: var(--text-secondary); }
.sh-channel-go { flex: none; font-size: 13px; font-weight: 600; color: var(--text-primary); }
/* Channel bar (shell.js): one thin row right over the bottom bar, closable for good. */
.sh-chbar {
    position: fixed; left: 0; right: 0; bottom: calc(56px + var(--safe-bottom)); z-index: 29;
    display: flex; align-items: center; gap: 8px; height: 40px; box-sizing: border-box;
    padding: 0 2px 0 12px; background: var(--bg-card); border-top: 1px solid var(--border);
}
.sh-chbar-ic { flex: none; display: inline-flex; color: #229ed9; }
.sh-chbar-ic svg { width: 18px; height: 18px; }
.sh-chbar-lbl { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-chbar-btn { flex: none; padding: 5px 12px; border-radius: 999px; background: #229ed9; color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.2; text-decoration: none; }
.sh-chbar-x { flex: none; width: 34px; height: 34px; border: 0; background: none; color: var(--text-dim); font-size: 20px; line-height: 1; cursor: pointer; font-family: inherit; }
body.has-chbar #app { padding-bottom: calc(96px + var(--safe-bottom)); }

/* ---- Dropdowns: one look across the app (season / competition / best-players
   selects). No native iOS "⇕" — the control is a pill with a chevron. */
select, .ent-season-select, .ent-season-ctrl {
    -webkit-appearance: none; appearance: none;
    min-height: 32px; padding: 0 30px 0 12px;
    border: 1px solid var(--border); border-radius: 10px;
    background: var(--bg-secondary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238b95a7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center / 10px 6px;
    color: var(--text-primary);
    font: 600 13px/1.2 inherit; font-family: inherit;
    cursor: pointer; text-overflow: ellipsis; max-width: 100%;
}
select:focus { outline: none; border-color: var(--text-dim); }
select:disabled { opacity: .55; cursor: default; }

/* League page, Predictions tab (lib/league-predictions.ts predictionsTabHtml): pick rows,
   graded history, the scoreboard card. Copied from the site's public/style.css. */
.pr-list { display: flex; flex-direction: column; }
.pr-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 20px; align-items: center; gap: 8px; margin: 0 -16px; padding: 9px 16px; /* to the card's edges: the hover fills the row */ border-top: 1px solid var(--border); color: inherit; text-decoration: none; }
.pr-row:first-child { border-top: 0; }
.pr-row:hover { background: color-mix(in srgb, var(--text-primary) 4%, transparent); }
.pr-date { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.pr-teams { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pr-team { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-secondary); min-width: 0; }
.pr-tname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-picked { color: var(--text-primary); font-weight: 600; }
.pr-pick { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.pr-pick-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-dim); }
.pr-pick-val { font-size: 12px; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.pr-mark { font-weight: 700; text-align: center; color: var(--text-dim); }
.pr-hit { color: var(--accent-live); }
.pr-miss { color: var(--accent-wicket); }
.pr-card .lp-title { margin: 0 0 8px; font-size: 16px; font-weight: 600; color: var(--text-primary); }
/* Settled rows: the winner bold and every method's ✓/✗ chip (as on the hub). */
.pr-row-res { grid-template-columns: 40px minmax(0, 1fr) auto; }
/* "Show 10 more" under the history: the next rows come from /m/pred-history. */
.pr-more-btn { display: block; width: 100%; margin-top: 8px; padding: 8px; font: inherit; font-size: 13px; font-weight: 600; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-secondary); color: var(--text-primary); cursor: pointer; }
.pr-more-btn:hover { background: var(--bg-card-alt); }
.pr-more-btn:disabled { opacity: 0.6; cursor: default; }
@media (max-width: 640px) {
  .pr-row-res { grid-template-columns: 40px minmax(0, 1fr); row-gap: 6px; }
  .pr-row-res .pr-chips { grid-column: 2; }
}
@media (max-width: 480px) {
  .pr-row { grid-template-columns: 40px minmax(0, 1fr) auto 16px; }
  .pr-row-res { grid-template-columns: 40px minmax(0, 1fr); }
  .pr-pick-val { white-space: normal; max-width: 120px; }
}
/* "More BBL predictions →" under the match page's win-probability block. */
.pv-more-preds { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--text-primary); text-decoration: none; }
/* League predictions page: the hub's match cards inside the "Upcoming" card. */
.pr-cards .ph-card { padding: 10px 14px; }
.pr-cards .ph-lg { font-variant-numeric: tabular-nums; }
.pr-date { display: flex; flex-direction: column; gap: 2px; }
.pr-lg { font-size: 10px; color: var(--text-dim); white-space: normal; line-height: 1.2; }

/* League page, Predictions tab in the Summary widget shell (league-predictions.ts
   sectionHtml app=true): 11px label in the head strip, flat rows inside one card. */
.pr-app .rp-section-head { flex-wrap: wrap; gap: 8px; }
.pr-app-body { padding: 0 12px 12px; }
.pr-app .pr-cards { gap: 0; }
.pr-app .pr-cards .ph-card { border: 0; border-radius: 0; background: none; padding: 12px 0; }
.pr-app .pr-cards .ph-card + .ph-card { border-top: 1px solid var(--border); }
.pr-app .pv-more-preds { margin-top: 4px; }
.pr-app .ph-tab { font-size: 11px; padding: 3px 9px; }
.pr-app .ph-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.pr-app .ph-tile { padding: 10px; border-radius: 10px; }
.pr-app .ph-tile-h { font-size: 12px; }
.pr-app .ph-tile-acc { font-size: 20px; margin: 4px 0 2px; }
.pr-app .ph-tile-sub { font-size: 11px; }
.pr-app .pr-row { margin: 0 -12px; padding: 9px 12px; }
.pr-app .tab-empty { padding: 24px 12px; }

/* Standings: play-off chance column + the note under the table (as on the site). */
.st-col-chance { width: 46px; flex-shrink: 0; margin-left: 6px; text-align: center; font-size: 11px; font-weight: 600; line-height: 20px; border-radius: 5px; color: var(--text-primary); font-variant-numeric: tabular-nums;
    background: linear-gradient(90deg, color-mix(in srgb, var(--color-win) 40%, transparent) var(--ch, 0%), var(--bg-card-alt) var(--ch, 0%)); }
.st-header .st-col-chance { background: none; line-height: inherit; }
.st-col-chance.st-ch-q { background: color-mix(in srgb, var(--color-win) 55%, transparent); }
.st-col-chance.st-ch-e { background: none; color: var(--text-dim); }
.st-race-note { margin: 8px 12px 0; font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.st-race-note a { white-space: nowrap; }

/* Mini-app fixes for the ported hubs. Segmented switchers: a dark track and a raised
   active button (the site's narrow-screen rule gave both --bg-card: nothing showed
   which tier is on). */
.ls-tiers, .ls-hub .ls-tiers { background: var(--bg-secondary); border: 1px solid var(--border); }
.ls-tier.ls-tier-on { background: var(--bg-card-alt); color: var(--text-primary); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.ls-tier.ls-tier-on span { color: var(--text-secondary); }
/* Two-button window toggles (season / overall): the active one inverted. */
.ph-tab.is-active { background: var(--text-primary); border-color: var(--text-primary); color: var(--bg-card); }
/* The player caption: the badge is a small chip at the start of the title line,
   not a column eating half the row next to a wrapped title. */
.ls-cap-main { display: block; }
.ls-hub .ls-cap-title { display: inline; font-size: 16px; line-height: 1.35; }
.ls-cap-main .ls-badge { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 5px; margin-right: 6px; vertical-align: 2px; letter-spacing: 0.03em; }
/* Phones (owner 28.11.2026): smaller teams, the tournament alone under them and in the strip. */
@media (max-width: 860px) {
  .ls-hub .ls-cap-title { font-size: 14.5px; }
  .ls-hub .ls-mx { display: none; }
  /* The strip's cards stretch to the tallest one: an unlinked video's long title ("DAY 3 LIVE …
     - Plunket Shield") left a hole under all of them. Teams in 2 lines, the tournament in 1. */
  .ls-item-teams { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .ls-item-meta { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* …and a long one-line tournament must not widen its card past 168px (min-content). */
  .ls-list > li, .ls-item-text { min-width: 0; }
}

/* League play-off race (lib/race-page.ts): the site's /league/{slug}/points-table and
   the mini-app's league Table tab. Global, scoped under .lr (was Astro-scoped CSS). */
.lr { display: flex; flex-direction: column; }
.lr-table { min-width: 0; }
.lr-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin: 0 0 8px; font-size: 0.9rem; line-height: 1.55; color: var(--text-secondary); min-width: 0; }
.lr .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lr .dim { color: var(--text-dim); font-weight: 400; }
.lr-h2 { margin: 0 0 10px; font-size: 1.02rem; font-weight: 700; color: var(--text-primary); }
.lr-h3 { margin: 0 0 6px; font-size: 0.92rem; font-weight: 600; color: var(--text-primary); }
.lr-lede { margin: 0 0 6px; color: var(--text-primary); }
.lr-note { margin: 0 0 8px; font-size: 0.78rem; color: var(--text-dim); }
.lr-p { margin: 0 0 10px; font-size: 0.86rem; }
.lr-group { margin-bottom: 18px; }
.lr-group:last-child { margin-bottom: 0; }
.lr-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lr-kpis { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.lr-kpis li { background: var(--bg-card-alt); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lr .k-v { color: var(--text-primary); font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.lr .k-l { font-size: 0.74rem; color: var(--text-dim); line-height: 1.3; }
.lr-heat { border-collapse: separate; border-spacing: 3px; font-size: 0.78rem; font-variant-numeric: tabular-nums; margin: 0 -3px 14px; }
.lr-heat th, .lr-heat td { text-align: center; white-space: nowrap; }
.lr-heat thead th { color: var(--text-dim); font-weight: 500; font-size: 0.7rem; padding: 0 2px 4px; min-width: 46px; }
.lr-heat .l { text-align: left; padding-right: 8px; color: var(--text-primary); font-weight: 600; position: sticky; left: 0; background: var(--bg-card); z-index: 1; }
.lr-heat td.h { height: 30px; min-width: 46px; border-radius: 6px; color: var(--text-primary); background: color-mix(in srgb, var(--color-win) var(--a), var(--bg-card-alt)); }
.lr-heat td.na { color: var(--text-dim); }
.lr-team { margin-bottom: 14px; }
.lr-team:last-child { margin-bottom: 0; }
.lr-team p { margin: 0 0 6px; }
.lr-team strong { color: var(--text-primary); font-weight: 600; }
.lr .h3row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 4px; }
.lr .h3row .lr-h3 { margin: 0; }
.lr .pill { font-size: 0.74rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--color-win) 22%, transparent); color: var(--text-primary); font-variant-numeric: tabular-nums; }
.lr-fx { list-style: none; margin: 0 0 18px; padding: 0; }
.lr-fx:last-child { margin-bottom: 0; }
.lr .fx { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(150px, 42%); align-items: center; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 0.84rem; }
.lr .fx:first-child { border-top: 0; }
.lr .fx-d { color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lr .fx-n { min-width: 0; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr .fx-g { display: block; font-size: 0.74rem; }
.lr .fx-o { display: flex; height: 22px; border-radius: 6px; overflow: hidden; font-size: 0.7rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.lr .seg { flex: 0 0 var(--w); display: flex; align-items: center; min-width: 0; overflow: hidden; white-space: nowrap; color: #fff; padding: 0 6px; }
.lr .seg.h { background: #2f7d63; justify-content: flex-start; }
.lr .seg.a { background: #3f63a8; justify-content: flex-end; }
.lr-st { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 0 0 14px; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.lr-st:last-child { margin-bottom: 0; }
.lr-st caption { text-align: left; font-size: 0.8rem; color: var(--text-primary); font-weight: 600; padding-bottom: 4px; }
.lr-st .c-team { width: 40%; }
.lr-st th, .lr-st td { padding: 6px 4px; text-align: right; border-top: 1px solid var(--border); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lr-st thead th { color: var(--text-dim); font-weight: 500; font-size: 0.72rem; white-space: normal; vertical-align: bottom; overflow-wrap: anywhere; }
.lr-st .l { text-align: left; padding-left: 0; color: var(--text-primary); font-weight: 500; }
.lr-st td.up { color: var(--color-win); font-weight: 600; }
.lr-st td.down { color: var(--color-loss); font-weight: 600; }
.lr-cut { width: 100%; border-collapse: collapse; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.lr-cut th { width: 64px; text-align: left; font-weight: 500; color: var(--text-primary); padding: 3px 0; white-space: nowrap; }
.lr-cut td { padding: 3px 0; display: flex; align-items: center; gap: 8px; }
.lr .cbar { display: block; height: 14px; width: var(--w); min-width: 2px; border-radius: 3px; background: color-mix(in srgb, var(--color-win) 50%, transparent); }
.lr .cv { color: var(--text-dim); font-size: 0.74rem; }
.lr-prose p { margin: 0 0 10px; }
.lr-prose p:last-child { margin-bottom: 0; }
.lr-faq { border-bottom: 1px solid var(--border); padding: 10px 0; }
.lr-faq:last-child { border-bottom: 0; padding-bottom: 0; }
/* Own marker inside the card padding: the native one sat outside (list-style-position:
   outside), left of the card's text edge. */
.lr-faq summary { cursor: pointer; list-style: none; display: flex; align-items: flex-start; gap: 8px; }
.lr-faq summary::-webkit-details-marker { display: none; }
/* Chevron from two borders: › closed, ⌄ open; margin-top centres it on the first line. */
.lr-faq summary::before { content: ""; flex: none; width: 6px; height: 6px; margin: 8px 2px 0; border-right: 1.5px solid var(--text-dim); border-bottom: 1.5px solid var(--text-dim); transform: rotate(-45deg); transition: transform .15s; }
.lr-faq[open] summary::before { transform: rotate(45deg); }
.lr-faq summary h3 { display: inline; font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin: 0; }
.lr-faq p { margin: 8px 0 0; padding-left: 18px; } /* under the question text: marker 10px + gap 8px */
@media (max-width: 640px) {
  .lr-card { padding: 12px; margin-left: 12px; margin-right: 12px; }
  .lr .fx { grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; }
  .lr .fx-o { grid-column: 1 / -1; }
  .lr .k-v { font-size: 1.1rem; }
}

/* ===== Spacing: bottom margins only (owner's rule, 25.11.2026) =====
   Every block (the header card, a tab heading row, a card or widget, a note) has
   margin-top 0 and margin-bottom 8px; the pane wrappers have no vertical padding.
   Any number of widgets in any order then sits exactly 8px apart: no 16 where two
   spacings add up, no 0 where the first card used to bring its own top margin.
   Only vertical sides here: horizontal margins/paddings stay as set above.
   Check: /Users/skunk/.claude/work/miniapp_shots/gaps.py (all tabs, 390 + 1400). */
.mh-card { margin-bottom: 8px; }
.tab-wrap, .st-wrap, .pv-wrap, .sq-wrap, .ent-app .st-wrap { padding-top: 0; padding-bottom: 0; }
.ent-tab-head, .card, .st-race-note,
:is(.tab-wrap, .sq-wrap, .st-wrap).ps-group:has(> .sq-switcher),
.tab-pane > .ps-group:has(> .sq-switcher),
.pv-card { margin-top: 0; margin-bottom: 8px; }
/* Video hub: the player card and its list (tiers on a phone) sit 8px apart too. */
.ls-studio-grid { gap: 8px; }

/* Hubs (predictions / video): a section closes with a 28px bottom margin (its last
   block's 8 collapses into it), so the next heading sits 28px below, as before. */
.ls-studio { margin-bottom: 28px; }
.ph-empty, .ls-studio-grid { margin-bottom: 8px; }
/* The hubs' intro paragraph: the first section heading sits 28px below it (bottom margin). */
.ph-lede, .ls-lede { margin-bottom: 28px; }

/* Geo-blocked video (27.11.2026, as on the site): the note under the player says where it is blocked
   and to turn on a VPN; it lights up and flashes on every press of play. */
@keyframes geo-flash { from { background: rgba(217, 119, 6, 0.4); } to { background: rgba(217, 119, 6, 0.12); } }
.ms-note.ms-note-hot { color: var(--color-amber); font-size: 13px; font-weight: 600; padding: 8px 10px; border-radius: 8px;
  background: rgba(217, 119, 6, 0.12); animation: geo-flash 0.9s ease-out; }
.ls-geo { margin: -4px 0 0; padding: 0 14px 12px; font-size: 12px; color: var(--text-dim); }
.ls-geo[hidden] { display: none; }
.ls-geo.ls-geo-hot { color: var(--color-amber); font-size: 13px; font-weight: 600; margin: 0; padding: 8px 14px;
  background: rgba(217, 119, 6, 0.12); animation: geo-flash 0.9s ease-out; }

/* "Where to watch legally" under the stream player (app.js, 27.11.2026): a full-width
   button folding the site's table (ww.js renders lib/where-to-watch.ts markup). */
.ms-ww-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-secondary); color: var(--text-primary); font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.ms-ww-btn::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--text-dim); border-bottom: 2px solid var(--text-dim); transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.ms-ww-btn[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.ms-ww[hidden] { display: none; }
.ms-ww .ww-wrap, .ms-ww .ww-card { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.ms-ww .ww-card { display: flex; flex-direction: column; gap: 10px; }
.ms-ww .ww-card > .pv-h2 { display: none; }
/* Site's .ww-* rules (web/apps/site/public/style.css). */
.ww-you { margin: 0; font-size: 14px; line-height: 1.5; padding: 8px 10px; border-radius: 8px; background: var(--bg-secondary); }
.ww-you[hidden] { display: none; }
.ww-you-cc { font-weight: 700; margin-right: 4px; }
.ww-scroll { overflow-x: auto; }
.ww-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.4; }
.ww-table th, .ww-table td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.ww-table thead th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); }
.ww-table tbody th { font-weight: 600; color: var(--text-primary); min-width: 110px; }
.ww-table td { color: var(--text-secondary); }
.ww-table tr.ww-mine { background: var(--bg-secondary); }
.ww-old { display: block; font-size: 11px; font-weight: 400; color: var(--text-dim); }
.ww-free { color: var(--text-primary); }
.ww-free::after { content: "free"; margin-left: 4px; padding: 0 4px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; background: #16a34a; color: #fff; vertical-align: 1px; }
.ww-none { color: var(--text-dim); }
.ww-note { margin: 0; font-size: 12px; color: var(--text-dim); }
.ww-note a { color: var(--text-secondary); }
.ww-more { color: var(--text-dim); white-space: nowrap; }

/* ============================ LINKS ============================
   Never blue, never underlined. Two looks only:
   1. A row that leads somewhere (.lk-row): the whole row is tinted like a lobby match
      row and the whole row is the link. Put .lk-row on the row (div, li, tr or td); its
      first <a> is stretched over it. A row without an <a> stays inert. A second link
      inside goes in .lk-own and keeps its own target.
      --lk-x / --lk-t / --lk-b: how far the tint runs past the row's box (a row inside a
      padded card bleeds to the card's edges).
   2. A link in text or standing alone: primary colour, semibold, same tint on hover.
   Same block as the site's public/style.css; src/miniapp/entity-app.ts opens a table row
   from its other cells. */
.lk-row:has(a[href]) { position: relative; isolation: isolate; cursor: pointer; }
.lk-row:not(tr):has(a[href])::before {
    content: ""; position: absolute; z-index: -1; pointer-events: none;
    inset: calc(-1 * var(--lk-t, 0px)) calc(-1 * var(--lk-x, 0px)) calc(-1 * var(--lk-b, 0px));
    transition: background 0.15s;
}
.lk-row:not(tr):has(a[href]):hover::before { background: var(--bg-secondary); }
.lk-row:not(tr):has(a[href]):active::before { background: var(--bg-card-alt); }
.lk-row a[href]::after { content: ""; position: absolute; inset: 0 calc(-1 * var(--lk-x, 0px)); }
.lk-row .lk-own { position: relative; z-index: 1; width: fit-content; }
.lk-row .lk-own a[href]::after { content: none; }
/* A table row. Safari does not position against a <tr> (every row's link would land on
   one spot) and a ::before there becomes an extra cell. So the link fills its own cell,
   the script opens the row from the others, and the tint is the cells' own, with the
   outer two adding the strips to the card's edges. */
tr.lk-row:has(a[href]) { position: static; isolation: auto; }
tr.lk-row:has(a[href]) > * { position: relative; transition: background 0.15s; }
tr.lk-row a[href]::after { inset: 0; }
tr.lk-row:has(a[href]) > :is(:first-child, :last-child) { overflow: visible; }
tr.lk-row:has(a[href]) > :first-child::before, tr.lk-row:has(a[href]) > :last-child::after {
    content: ""; position: absolute; top: 0; bottom: 0; width: var(--lk-x, 0px); transition: background 0.15s;
}
tr.lk-row > :first-child::before { left: calc(-1 * var(--lk-x, 0px)); }
tr.lk-row > :last-child::after { right: calc(-1 * var(--lk-x, 0px)); }
tr.lk-row:has(a[href]):hover > *, tr.lk-row:has(a[href]):hover > :first-child::before, tr.lk-row:has(a[href]):hover > :last-child::after { background: var(--bg-secondary); }
.mh-team { --lk-x: 12px; --lk-t: 2px; --lk-b: 2px; }
.sc-player-row { --lk-x: 16px; }
.sc-section .sc-player-row:last-child { --lk-b: 9px; }
.stat-tbl tr { --lk-x: 12px; }
.ph-tablewrap tr { --lk-x: 14px; }
.lr .fx { --lk-x: 16px; }
.wtcm-std tr { --lk-x: 12px; }
/* The play-off line is the shadow of the row above: the tint starts under it. */
.st-row-cutoff + .st-row { --lk-t: -2px; }

:where(p, .page-doc li, .page-doc li strong, .pl-credit) > a:where(:not([class])), .news-link { color: var(--text-primary); font-weight: 600; }
h2 .news-link { font-weight: inherit; }
:is(p, .page-doc li, .page-doc li strong, .pl-credit, .ls-chans li) > a:not([class]):hover,
:is(.news-link, .crumb-link, .roi-note-link, .pv-more-preds, .pv-gfav, .ls-cap-link, .mh-league-link, .wtc-tbl .tm):hover,
.entity-link:hover {
    background: var(--bg-secondary); box-shadow: 0 0 0 3px var(--bg-secondary); border-radius: 2px;
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.lk-row a.entity-link:hover, .pl-chips a.entity-link:hover { background: none; box-shadow: none; }
.lk-row .lk-own a[href]:hover { background: var(--bg-card-alt); box-shadow: 0 0 0 3px var(--bg-card-alt); color: var(--text-primary); }
.pl-chips a:hover .pl-chip, .wtc-tbl tr:hover .tm:hover { background: var(--bg-card-alt); }
/* app.js screens: rows open through data-entity-*, not an <a>. */
.st-row.mh-entity-link:hover { background: var(--bg-secondary); }
.mi-row:has([data-entity-league]) { position: relative; cursor: pointer; }
.mi-row:has([data-entity-league]):hover { background: var(--bg-secondary); }
.mi-row [data-entity-league]::after { content: ""; position: absolute; inset: 0; }
.mi-row .entity-link:hover { background: none; box-shadow: none; }
.mh-team:has(> .mh-entity-link) { position: relative; isolation: isolate; cursor: pointer; }
.mh-team:has(> .mh-entity-link)::before { content: ""; position: absolute; z-index: -1; inset: -2px -12px; transition: background 0.15s; }
.mh-team:has(> .mh-entity-link):hover::before { background: var(--bg-secondary); }
.mh-team > .mh-entity-link::after { content: ""; position: absolute; inset: 0 -12px; }
.mh-league.mh-entity-link:hover { background: var(--bg-secondary); box-shadow: 0 0 0 3px var(--bg-secondary); border-radius: 2px; }
