/* ProbaLab phone layout (phone.js). Every rule that touches existing page elements sits inside the
   phone media query below, so screens 768px and wider render exactly as before. Outside it, the
   only rule hides the phone-only elements phone.js adds. */
.pf-only { display: none !important; }

@media (max-width: 767.98px) {
  html.pf {
    --pf-bg: #07080f; --pf-bg-2: #0c0e1a; --pf-surface: #10131f; --pf-surface-2: #161a2a;
    --pf-ink: #e8ecf8; --pf-muted: #8b93b0; --pf-line: #232a42; --pf-line-hi: #343d5e;
    --pf-cyan: #19e3ff; --pf-magenta: #ff2fc0;
    --pf-super: #b56cff; --pf-green: #2fd7a0; --pf-orange: #ffad33; --pf-red: #ff4f6e;
    --pf-tabbar-h: 62px;
    --pf-r: 16px;
    -webkit-tap-highlight-color: transparent;
  }
  html.pf .pf-only { display: revert !important; }
  html.pf .pf-only[hidden] { display: none !important; }
  html.pf .pf-l-SUPER { --pf-lc: var(--pf-super); --pf-lc-soft: rgba(181, 108, 255, .16); }
  html.pf .pf-l-GREEN { --pf-lc: var(--pf-green); --pf-lc-soft: rgba(47, 215, 160, .14); }
  html.pf .pf-l-ORANGE { --pf-lc: var(--pf-orange); --pf-lc-soft: rgba(255, 173, 51, .13); }
  html.pf .pf-l-RED { --pf-lc: var(--pf-red); --pf-lc-soft: rgba(255, 79, 110, .13); }
  html.pf .pf-l-none { --pf-lc: var(--pf-line-hi); --pf-lc-soft: rgba(52, 61, 94, .2); }

  /* ---------------------------------------------------------------- page chrome */
  html.pf.pf-has-tabbar body { padding-bottom: calc(var(--pf-tabbar-h) + env(safe-area-inset-bottom, 0px) + 8px); }
  html.pf .nav-today { display: none !important; } /* Today lives in the bottom tab bar */
  html.pf .site-head .nav-toggle { min-height: 40px; padding: 8px 14px; }
  html.pf .site-head .wrap { min-height: 56px; }
  html.pf .back { display: inline-flex; align-items: center; min-height: 40px; }

  /* ---------------------------------------------------------------- bottom tab bar */
  html.pf .pf-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: grid !important; grid-template-columns: repeat(5, 1fr);
    padding: 0 max(4px, env(safe-area-inset-left, 0px)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-right, 0px));
    background: rgba(10, 12, 22, .94);
    -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
    border-top: 1px solid var(--pf-line);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .45);
  }
  html.pf .pf-tabbar::before {
    content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--pf-cyan) 30%, var(--pf-magenta) 70%, transparent); opacity: .55;
  }
  html.pf .pf-tabbar a {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: var(--pf-tabbar-h); color: var(--pf-muted); text-decoration: none;
    font-family: var(--f-display, "Chakra Petch", sans-serif); font-weight: 600; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  }
  html.pf .pf-tabbar a:active { color: var(--pf-ink); }
  html.pf .pf-tabbar a[aria-current="page"] { color: var(--pf-cyan); }
  html.pf .pf-tabbar a[aria-current="page"] svg { filter: drop-shadow(0 0 6px rgba(25, 227, 255, .6)); }
  html.pf .pf-tabbar a[aria-current="page"]::before {
    content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px;
    background: var(--pf-cyan); box-shadow: 0 0 10px var(--pf-cyan);
  }
  html.pf .nav-backdrop.is-open, html.pf .site-nav.is-open { z-index: 70; } /* menu drawer covers the tab bar */
  html.pf .nav-backdrop.is-open { z-index: 69; }
  html.pf.pf-has-tabbar #pl-consent { bottom: calc(var(--pf-tabbar-h) + env(safe-area-inset-bottom, 0px) + 8px) !important; } /* cookie banner sits above the tab bar */

  /* ---------------------------------------------------------------- shared bits */
  html.pf .pf-muted { color: var(--pf-muted); font-size: 14px; }
  html.pf .pf-chip { font-size: 11px; }
  html.pf .pf-h2 { font-family: var(--f-display, sans-serif); font-weight: 700; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--pf-ink); margin: 26px 2px 12px; }
  html.pf .pf-more {
    display: flex !important; align-items: center; justify-content: center; gap: 8px; min-height: 52px; margin: 12px 0 0;
    border: 1px solid var(--pf-line-hi); border-radius: 14px; background: rgba(25, 227, 255, .06);
    color: var(--pf-cyan); text-decoration: none; font-family: var(--f-display, sans-serif); font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase;
  }
  html.pf .pf-more:active { background: rgba(25, 227, 255, .14); }
  html.pf .pf-more-sm { min-height: 46px; font-size: 13px; }

  /* ---------------------------------------------------------------- chance gauge */
  html.pf .pf-gauge { position: relative; display: inline-flex; flex-direction: column; align-items: center; flex: 0 0 auto; width: var(--pf-g-w); line-height: 1; }
  html.pf .pf-gauge svg { display: block; overflow: visible; }
  html.pf .pf-g-track { fill: none; stroke: var(--pf-line-hi); stroke-width: 10; stroke-linecap: round; }
  html.pf .pf-g-fill { fill: none; stroke: var(--pf-lc, var(--pf-cyan)); stroke-width: 10; stroke-linecap: round; filter: drop-shadow(0 0 4px var(--pf-lc, var(--pf-cyan))); }
  html.pf .pf-g-SUPER { --pf-lc: var(--pf-super); } html.pf .pf-g-GREEN { --pf-lc: var(--pf-green); }
  html.pf .pf-g-ORANGE { --pf-lc: var(--pf-orange); } html.pf .pf-g-RED { --pf-lc: var(--pf-red); }
  html.pf .pf-g-num {
    position: absolute; left: 0; right: 0; bottom: 0; text-align: center;
    font-family: var(--f-mono, monospace); font-weight: 700; font-variant-numeric: tabular-nums;
    font-size: calc(var(--pf-g-w) * .24); color: var(--pf-ink);
  }
  html.pf .pf-gauge-big .pf-g-num { bottom: calc(var(--pf-g-w) * .05); font-size: calc(var(--pf-g-w) * .26); }
  html.pf .pf-g-cap { margin-top: 10px; font-family: var(--f-mono, monospace); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--pf-muted); }

  /* ---------------------------------------------------------------- match card */
  html.pf .pf-cards, html.pf .pf-greens { display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  html.pf .pf-card {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 14px 13px 16px;
    border-radius: var(--pf-r); text-decoration: none; color: var(--pf-ink);
    background: linear-gradient(180deg, var(--pf-lc-soft, transparent), transparent 70%), var(--pf-surface);
    border: 1px solid var(--pf-line);
    border: 1px solid color-mix(in srgb, var(--pf-lc) 55%, var(--pf-line));
    box-shadow: inset 4px 0 0 var(--pf-lc), 0 8px 22px rgba(0, 0, 0, .35);
    transition: transform .12s ease, border-color .12s ease;
  }
  html.pf .pf-card.pf-l-SUPER { box-shadow: inset 4px 0 0 var(--pf-lc), 0 0 0 1px rgba(181, 108, 255, .25), 0 8px 26px rgba(181, 108, 255, .18); }
  html.pf .pf-card:active { transform: scale(.985); }
  html.pf .pf-card:focus-visible { outline: 2px solid var(--yellow, #f5e900); outline-offset: 2px; }
  html.pf .pf-card-top { display: flex; align-items: center; gap: 8px; min-width: 0; font-family: var(--f-mono, monospace); font-size: 12px; color: var(--pf-muted); }
  html.pf .pf-sport {
    padding: 2px 7px; border-radius: 6px; border: 1px solid var(--pf-line-hi); color: var(--pf-ink);
    font-weight: 700; font-size: 11px; letter-spacing: .08em;
  }
  html.pf .pf-time { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.pf .pf-bv {
    margin-left: auto; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
    background: var(--pf-super); color: #0b0716; font-weight: 700; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
    box-shadow: 0 0 14px rgba(181, 108, 255, .55);
  }
  html.pf .pf-card-mid { display: flex; align-items: center; gap: 12px; }
  html.pf .pf-teams { flex: 1 1 auto; min-width: 0; display: grid; gap: 3px; }
  html.pf .pf-team { display: flex; align-items: center; gap: 7px; font-family: var(--f-display, sans-serif); font-weight: 600; font-size: 17px; line-height: 1.2; color: var(--pf-muted); overflow-wrap: anywhere; }
  html.pf .pf-team.pf-picked { color: var(--pf-ink); font-weight: 700; }
  html.pf .pf-tick { color: var(--pf-lc); font-size: 9px; text-shadow: 0 0 8px var(--pf-lc); }
  html.pf .pf-sep { font-family: var(--f-mono, monospace); font-size: 11px; color: var(--pf-muted); padding-left: 1px; }
  html.pf .pf-sub { font-size: 12px; color: var(--pf-muted); }
  html.pf .pf-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--pf-line); }
  html.pf .pf-pick { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
  html.pf .pf-pick b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html.pf .pf-pick-lab { font-family: var(--f-mono, monospace); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--pf-muted); white-space: nowrap; }
  html.pf .pf-inj { font-size: 12px; color: var(--pf-orange); line-height: 1.35; }
  html.pf .pf-skel { min-height: 148px; overflow: hidden; --pf-lc: var(--pf-line-hi); }
  html.pf .pf-skel span { display: block; height: 14px; border-radius: 6px; background: var(--pf-surface-2); }
  html.pf .pf-skel span:nth-child(1) { width: 40%; } html.pf .pf-skel span:nth-child(2) { width: 75%; height: 40px; } html.pf .pf-skel span:nth-child(3) { width: 55%; }
  @media (prefers-reduced-motion: no-preference) {
    html.pf .pf-skel span { animation: pfPulse 1.2s ease-in-out infinite alternate; }
    @keyframes pfPulse { from { opacity: .45; } to { opacity: 1; } }
  }
  html.pf .pf-empty { display: grid; gap: 4px; padding: 18px 16px; border-radius: var(--pf-r); border: 1px dashed var(--pf-line-hi); background: var(--pf-surface); }
  html.pf .pf-empty span { color: var(--pf-muted); font-size: 14px; }

  /* ---------------------------------------------------------------- home screen */
  html.pf.pf-at-home #view-home { display: none !important; }
  html.pf:not(.pf-at-home) #pf-home { display: none !important; }
  html.pf #pf-home { display: block !important; padding: 18px 0 8px; }
  html.pf .pf-hello { display: grid; gap: 8px; margin-bottom: 16px; }
  html.pf .pf-eyebrow { margin: 0; font-family: var(--f-mono, monospace); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--pf-cyan); }
  html.pf .pf-h1 { margin: 0; font-family: var(--f-display, sans-serif); font-weight: 700; font-size: 30px; line-height: 1.05; letter-spacing: .01em; text-transform: uppercase; }
  html.pf .pf-h1 em { font-style: normal; color: var(--pf-cyan); text-shadow: 0 0 18px rgba(25, 227, 255, .45); }
  html.pf .pf-record {
    display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; margin-top: 4px;
    border-radius: 14px; text-decoration: none; color: var(--pf-ink);
    background: linear-gradient(90deg, rgba(47, 215, 160, .18), rgba(47, 215, 160, .04)); border: 1px solid rgba(47, 215, 160, .55);
  }
  html.pf .pf-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pf-green); box-shadow: 0 0 10px var(--pf-green); flex: none; }
  html.pf .pf-rec-lab { font-family: var(--f-mono, monospace); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--pf-green); }
  html.pf .pf-record b { font-family: var(--f-mono, monospace); font-size: 20px; color: var(--pf-green); }
  html.pf .pf-rec-pct { font-family: var(--f-mono, monospace); font-size: 14px; color: var(--pf-ink); }
  html.pf .pf-rec-go { margin-left: auto; font-size: 22px; color: var(--pf-green); }
  html.pf .pf-yest { display: block !important; margin-top: 8px; }
  html.pf .pf-yest[hidden] { display: none !important; }
  html.pf .pf-yest-head { display: flex; align-items: baseline; justify-content: space-between; }
  html.pf .pf-yest-score { font-family: var(--f-mono, monospace); font-weight: 700; font-size: 18px; color: var(--pf-green); }
  html.pf .pf-yest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
  html.pf .pf-yest-list li { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border-radius: 12px; background: var(--pf-surface); border: 1px solid var(--pf-line); font-size: 14px; }
  html.pf .pf-yest-list li.win { border-color: rgba(47, 215, 160, .45); }
  html.pf .pf-yest-list li b { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html.pf .pf-yl-mark { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-weight: 700; flex: none; }
  html.pf .win .pf-yl-mark { background: rgba(47, 215, 160, .18); color: var(--pf-green); }
  html.pf .loss .pf-yl-mark { background: rgba(255, 79, 110, .14); color: var(--pf-red); }
  html.pf .pf-yl-sp { font-family: var(--f-mono, monospace); font-size: 11px; color: var(--pf-muted); letter-spacing: .06em; }
  html.pf .pf-grid { display: grid !important; grid-template-columns: 1fr 1fr; gap: 12px; }
  html.pf .pf-tile {
    display: grid; align-content: start; gap: 4px; min-height: 112px; padding: 16px 14px;
    border-radius: var(--pf-r); text-decoration: none; color: var(--pf-ink);
    background: radial-gradient(140px 90px at 100% 0%, rgba(25, 227, 255, .12), transparent 70%), var(--pf-surface);
    border: 1px solid var(--pf-line-hi); box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
    transition: transform .12s ease;
  }
  html.pf .pf-tile:active { transform: scale(.97); border-color: var(--pf-cyan); }
  html.pf .pf-tile svg { width: 30px; height: 30px; color: var(--pf-cyan); margin-bottom: 8px; filter: drop-shadow(0 0 6px rgba(25, 227, 255, .45)); }
  html.pf .pf-tile b { font-family: var(--f-display, sans-serif); font-size: 17px; letter-spacing: .02em; }
  html.pf .pf-tile small { font-size: 12.5px; color: var(--pf-muted); line-height: 1.3; }
  html.pf .pf-tile-today { background: radial-gradient(160px 100px at 100% 0%, rgba(47, 215, 160, .18), transparent 70%), var(--pf-surface); border-color: rgba(47, 215, 160, .5); }
  html.pf .pf-tile-today svg { color: var(--pf-green); filter: drop-shadow(0 0 6px rgba(47, 215, 160, .5)); }
  html.pf .pf-tile-tips svg, html.pf .pf-tile-tipsters svg { color: var(--pf-magenta); filter: drop-shadow(0 0 6px rgba(255, 47, 192, .45)); }
  html.pf .pf-install {
    display: flex !important; align-items: center; gap: 12px; margin-top: 18px; padding: 12px;
    border-radius: var(--pf-r); background: var(--pf-surface-2); border: 1px solid var(--pf-line-hi);
  }
  html.pf .pf-install[hidden] { display: none !important; }
  html.pf .pf-install img { border-radius: 10px; flex: none; }
  html.pf .pf-install div { display: grid; flex: 1 1 auto; min-width: 0; }
  html.pf .pf-install small { color: var(--pf-muted); font-size: 12.5px; }
  html.pf .pf-install-go { min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--pf-cyan); color: #07080f; font-family: var(--f-display, sans-serif); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
  html.pf .pf-install-x { min-width: 44px; min-height: 44px; border: 0; background: none; color: var(--pf-muted); font-size: 16px; }
  html.pf .pf-small { margin: 18px 2px 0; font-size: 12px; color: var(--pf-muted); }

  /* ---------------------------------------------------------------- /today */
  html.pf.pf-today ul.today-games, html.pf.pf-today .oddsfmt-bar { display: none !important; }
  html.pf.pf-today main.wrap > h1 { font-size: 26px; line-height: 1.1; }
  html.pf.pf-today section.panel[id] { padding: 14px 12px; border-radius: var(--pf-r); }
  html.pf.pf-today section.panel[id] > h2 { margin: 2px 2px 12px; }
  html.pf.pf-today .pf-cards { margin: 0 0 6px; }
  html.pf.pf-today .howto.compact { padding: 12px; border-radius: var(--pf-r); }
  html.pf .game-filter-bar .game-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; margin: 0 -2px; }
  html.pf .game-filter-bar .game-filters::-webkit-scrollbar { display: none; }
  html.pf .game-filter-bar .gf-btn { flex: none; min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; }

  /* ---------------------------------------------------------------- match view */
  html.pf .pf-mtabs {
    position: sticky; top: calc(56px + env(safe-area-inset-top, 0px)); z-index: 6;
    display: flex !important; gap: 6px; overflow-x: auto; scrollbar-width: none;
    margin: 8px -16px 14px; padding: 8px 16px;
    background: rgba(7, 8, 15, .93); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--pf-line);
  }
  html.pf .pf-mtabs[hidden] { display: none !important; }
  html.pf .pf-mtabs::-webkit-scrollbar { display: none; }
  html.pf .pf-mtabs button {
    flex: none; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--pf-line-hi);
    background: var(--pf-surface); color: var(--pf-muted); cursor: pointer;
    font-family: var(--f-display, sans-serif); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  }
  html.pf .pf-mtabs button[aria-selected="true"] { color: #07080f; background: var(--pf-cyan); border-color: var(--pf-cyan); box-shadow: 0 0 16px rgba(25, 227, 255, .35); }
  html.pf #view-game[data-pf-active="overview"] [data-pf-tab]:not([data-pf-tab="overview"]),
  html.pf #view-game[data-pf-active="stats"] [data-pf-tab]:not([data-pf-tab="stats"]),
  html.pf #view-game[data-pf-active="form"] [data-pf-tab]:not([data-pf-tab="form"]),
  html.pf #view-game[data-pf-active="props"] [data-pf-tab]:not([data-pf-tab="props"]) { display: none !important; }
  html.pf #view-game[data-pf-active="overview"] [data-pf-tabs]:not([data-pf-tabs~="overview"]),
  html.pf #view-game[data-pf-active="stats"] [data-pf-tabs]:not([data-pf-tabs~="stats"]),
  html.pf #view-game[data-pf-active="form"] [data-pf-tabs]:not([data-pf-tabs~="form"]),
  html.pf #view-game[data-pf-active="props"] [data-pf-tabs]:not([data-pf-tabs~="props"]) { display: none !important; }
  html.pf #view-game[data-pf-active] { row-gap: 14px; }
  html.pf #view-game[data-pf-active] > .permalink { margin: 0; }
  html.pf #view-game .out, html.pf #view-game .conf { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  html.pf #view-game .panel { border-radius: var(--pf-r); }
  html.pf .pf-mhero {
    display: flex !important; align-items: center; gap: 16px; margin: 0 0 14px; padding: 18px 16px;
    border-radius: 20px; border: 1px solid var(--pf-line); border: 1px solid color-mix(in srgb, var(--pf-lc) 60%, var(--pf-line));
    background: radial-gradient(220px 160px at 15% 30%, var(--pf-lc-soft), transparent 75%), var(--pf-surface);
    box-shadow: inset 4px 0 0 var(--pf-lc), 0 10px 28px rgba(0, 0, 0, .4);
  }
  html.pf #view-game[data-pf-active]:not([data-pf-active="overview"]) .pf-mhero { display: none !important; }
  html.pf .pf-mhero-txt { display: grid; gap: 6px; min-width: 0; }
  html.pf .pf-mhero-pick { font-family: var(--f-display, sans-serif); font-size: 21px; line-height: 1.15; overflow-wrap: anywhere; }
  html.pf .pf-mhero-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  html.pf .pf-price { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 14px; margin: 6px 0 0; }
  html.pf .pf-price div { display: grid; }
  html.pf .pf-price dt { font-family: var(--f-mono, monospace); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--pf-muted); }
  html.pf .pf-price dd { margin: 0; font-family: var(--f-mono, monospace); font-weight: 700; font-size: 14px; }
  html.pf .pf-price-note { font-size: 11px; color: var(--pf-muted); }
  html.pf .pf-props-pane { display: block !important; }
  html.pf .pf-prop-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
  html.pf .pf-prop {
    display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "who gauge chip" "call gauge chip"; align-items: center; gap: 2px 10px;
    padding: 10px 10px 10px 14px; border-radius: 12px; background: var(--pf-surface-2);
    border: 1px solid var(--pf-line); border: 1px solid color-mix(in srgb, var(--pf-lc) 45%, var(--pf-line)); box-shadow: inset 3px 0 0 var(--pf-lc);
  }
  html.pf .pf-prop-who { grid-area: who; display: grid; min-width: 0; }
  html.pf .pf-prop-who b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html.pf .pf-prop-who small { color: var(--pf-muted); font-size: 12px; }
  html.pf .pf-prop-call { grid-area: call; font-family: var(--f-mono, monospace); font-size: 13px; color: var(--pf-ink); }
  html.pf .pf-prop .pf-gauge { grid-area: gauge; }
  html.pf .pf-prop .pf-chip { grid-area: chip; }

  /* ---------------------------------------------------------------- team logos (round 2) */
  html.pf .pf-logo { display: inline-grid; place-items: center; flex: none; width: var(--pf-ls); height: var(--pf-ls); }
  html.pf .pf-logo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .55)); }
  html.pf .pf-badge {
    display: inline-grid; place-items: center; flex: none; width: var(--pf-ls); height: var(--pf-ls); border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .22), transparent 60%), var(--pf-tc, var(--pf-cyan));
    color: #fff; font-family: var(--f-mono, monospace); font-weight: 700; font-size: calc(var(--pf-ls) * .28); letter-spacing: .02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .6); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18), 0 4px 12px rgba(0, 0, 0, .45);
  }
  html.pf .match .crest.pf-crest {
    width: 68px; height: 68px; font-size: 0; color: transparent; clip-path: none; border: 0; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015) 70%); box-shadow: inset 0 0 0 1px var(--pf-line-hi);
  }
  html.pf .match .side-t.picked .crest.pf-crest { box-shadow: inset 0 0 0 2px var(--pf-cyan), 0 0 18px rgba(25, 227, 255, .3); }
  html.pf .crest.pf-crest .pf-crest-in, html.pf .badge.pf-crest .pf-crest-in { display: grid !important; place-items: center; }
  html.pf .formlist .fr .badge.pf-crest { width: 28px; height: 28px; font-size: 0; color: transparent; border: 0; background: none; }
  html.pf .pf-tlogo { display: block !important; margin-bottom: 6px; }
  html.pf article.card .team.r .pf-tlogo { display: flex !important; justify-content: flex-end; }
  html.pf .pf-mhero-who { display: flex; align-items: center; gap: 8px; }

  /* ---------------------------------------------------------------- props page: info card */
  html.pf.pf-props .pp-strip { display: none !important; }
  html.pf .pf-pstats {
    display: grid !important; gap: 10px; margin: 12px 0 14px; padding: 14px; border-radius: var(--pf-r);
    background: linear-gradient(180deg, rgba(25, 227, 255, .05), transparent 60%), var(--pf-surface); border: 1px solid var(--pf-line-hi);
  }
  html.pf .pf-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
  html.pf .pf-stat { display: grid; gap: 3px; min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--pf-surface-2); border: 1px solid var(--pf-line); }
  html.pf .pf-stat small { font-family: var(--f-mono, monospace); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--pf-muted); }
  html.pf .pf-stat b { font-family: var(--f-display, sans-serif); font-size: 17px; line-height: 1.2; color: var(--pf-ink); overflow-wrap: anywhere; }
  html.pf .pf-sample { justify-self: start; padding: 3px 9px; border-radius: 999px; font: 700 10.5px var(--f-mono, monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--pf-orange); border: 1px solid var(--pf-orange); }

  /* ---------------------------------------------------------------- props page: filters */
  html.pf .pp-selects.pf-replaced { display: none !important; }
  html.pf .pf-filters { display: grid !important; gap: 10px; width: 100%; }
  html.pf .pf-pick-btn {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 8px 14px 8px 16px;
    border-radius: 14px; border: 1px solid var(--pf-line-hi); background: var(--pf-surface); color: var(--pf-ink); text-align: left; cursor: pointer;
    font: inherit;
  }
  html.pf .pf-pick-btn:active { border-color: var(--pf-cyan); }
  html.pf .pf-pick-btn.pf-set { border-color: rgba(25, 227, 255, .6); box-shadow: 0 0 0 1px rgba(25, 227, 255, .25) inset; }
  html.pf .pf-pick-txt { display: grid; gap: 2px; min-width: 0; }
  html.pf .pf-pick-txt small, html.pf .pf-chipset-lab { font-family: var(--f-mono, monospace); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--pf-muted); }
  html.pf .pf-pick-txt b { font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.pf .pf-pick-btn svg { flex: none; color: var(--pf-cyan); }
  html.pf .pf-chipset { display: grid; gap: 6px; }
  html.pf .pf-chiprow { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  html.pf .pf-chiprow::-webkit-scrollbar { display: none; }
  html.pf .pf-chiprow button {
    flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--pf-line-hi); background: var(--pf-surface);
    color: var(--pf-muted); font-family: var(--f-display, sans-serif); font-weight: 700; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; cursor: pointer;
  }
  html.pf .pf-chiprow button[aria-pressed="true"] { color: #07080f; background: var(--pf-cyan); border-color: var(--pf-cyan); }
  html.pf .pp-filters .game-filters.lights { margin-top: 12px; }
  html.pf .pp-filters .game-filters.lights .gf-btn { min-height: 44px; }

  /* bottom-sheet picker */
  html.pf.pf-sheet-open, html.pf.pf-sheet-open body { overflow: hidden; }
  html.pf .pf-sheet-wrap { position: fixed; inset: 0; z-index: 80; }
  html.pf .pf-sheet-bg { position: absolute; inset: 0; background: rgba(3, 4, 9, .7); opacity: 0; transition: opacity .18s ease; }
  html.pf .pf-sheet {
    position: absolute; left: 0; right: 0; bottom: 0; max-height: 78vh; display: flex; flex-direction: column;
    padding: 6px 12px calc(12px + env(safe-area-inset-bottom, 0px)); border-radius: 22px 22px 0 0;
    background: var(--pf-bg-2); border-top: 1px solid var(--pf-line-hi); box-shadow: 0 -18px 40px rgba(0, 0, 0, .6);
    transform: translateY(100%); transition: transform .22s cubic-bezier(.2, .8, .2, 1);
  }
  html.pf .pf-sheet-wrap.pf-in .pf-sheet-bg { opacity: 1; }
  html.pf .pf-sheet-wrap.pf-in .pf-sheet { transform: none; }
  @media (prefers-reduced-motion: reduce) { html.pf .pf-sheet, html.pf .pf-sheet-bg { transition: none; } }
  html.pf .pf-sheet-grab { width: 40px; height: 4px; margin: 4px auto 6px; border-radius: 4px; background: var(--pf-line-hi); }
  html.pf .pf-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 8px; border-bottom: 1px solid var(--pf-line); }
  html.pf .pf-sheet-head b { font-family: var(--f-display, sans-serif); font-size: 16px; letter-spacing: .06em; text-transform: uppercase; }
  html.pf .pf-sheet-x { min-width: 44px; min-height: 44px; border: 0; background: none; color: var(--pf-muted); font-size: 16px; cursor: pointer; }
  html.pf .pf-sheet-list { list-style: none; margin: 0; padding: 6px 0 0; overflow-y: auto; overscroll-behavior: contain; }
  html.pf .pf-sheet-list button {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 50px; padding: 0 12px;
    border: 0; border-radius: 12px; background: none; color: var(--pf-ink); font: 15px var(--f-body, sans-serif); text-align: left; cursor: pointer;
  }
  html.pf .pf-sheet-list button:active, html.pf .pf-sheet-list button:focus-visible { background: var(--pf-surface-2); outline: none; }
  html.pf .pf-sheet-list button[aria-current] { color: var(--pf-cyan); background: rgba(25, 227, 255, .07); font-weight: 600; }

  /* ---------------------------------------------------------------- props page: lights key */
  html.pf #ppLegend.pf-replaced { display: none !important; }
  html.pf .pf-lkey { display: grid !important; gap: 8px; margin-top: 12px; }
  html.pf .pf-lkey[hidden] { display: none !important; }
  html.pf .pf-lkey-note { margin: 0; font-size: 13px; color: var(--pf-muted); }
  html.pf .pf-lkey ul { list-style: none; margin: 0; padding: 10px 14px; display: grid; gap: 6px; border-radius: 12px; background: var(--pf-surface); border: 1px solid var(--pf-line); }
  html.pf .pf-lkey li { display: grid; grid-template-columns: 12px 92px minmax(0, 1fr); align-items: center; gap: 10px; font-size: 13px; line-height: 1.35; }
  html.pf .pf-lkey i { width: 10px; height: 10px; border-radius: 50%; background: var(--pf-lc); box-shadow: 0 0 8px var(--pf-lc); }
  html.pf .pf-lkey b { font-family: var(--f-mono, monospace); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--pf-lc); }
  html.pf .pf-lkey li > span { font-family: var(--f-body, sans-serif); font-size: 13.5px; color: var(--pf-ink); }
  html.pf .pf-lkey .pf-lk-line { display: block; }

  /* ---------------------------------------------------------------- player page: chart legend */
  html.pf figure.bc > figcaption.pf-replaced { display: none !important; }
  html.pf .pf-bcl { display: grid !important; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--pf-line); }
  html.pf .pf-bcl-t { font-family: var(--f-mono, monospace); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--pf-ink); }
  html.pf .pf-bcl-keys { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--pf-muted); }
  html.pf .pf-bcl-keys > span { display: inline-flex; align-items: center; gap: 6px; }
  html.pf .pf-sq { width: 10px; height: 10px; border-radius: 2px; }
  html.pf .pf-sq-over { background: var(--pf-green); opacity: .85; }
  html.pf .pf-sq-under { background: var(--pf-red); opacity: .75; }
  html.pf .pf-dash { width: 18px; height: 0; border-top: 2px dashed var(--pf-cyan); }

  /* ---------------------------------------------------------------- results page: green record first */
  html.pf.pf-results main.wrap { display: flex; flex-direction: column; }
  html.pf.pf-results main.wrap > * { margin-top: 0; margin-bottom: 14px; }
  html.pf.pf-results main.wrap > [data-pf-order="0"] { order: 0; } html.pf.pf-results main.wrap > [data-pf-order="1"] { order: 1; }
  html.pf.pf-results main.wrap > [data-pf-order="2"] { order: 2; } html.pf.pf-results main.wrap > [data-pf-order="3"] { order: 3; }
  html.pf.pf-results main.wrap > [data-pf-order="4"] { order: 4; } html.pf.pf-results main.wrap > [data-pf-order="5"] { order: 5; }
  html.pf.pf-results main.wrap > [data-pf-order="6"] { order: 6; } html.pf.pf-results main.wrap > [data-pf-order="7"] { order: 7; }
  html.pf.pf-results main.wrap > [data-pf-order="8"] { order: 8; } html.pf.pf-results main.wrap > [data-pf-order="9"] { order: 9; }
  html.pf.pf-results main.wrap > [data-pf-order="10"] { order: 10; } html.pf.pf-results main.wrap > [data-pf-order="11"] { order: 11; }
  html.pf.pf-results .green-lead .record-hero { display: none !important; }
  html.pf .pf-rtop {
    display: grid !important; gap: 4px; padding: 16px 18px; border-radius: 18px;
    background: linear-gradient(135deg, rgba(47, 215, 160, .2), rgba(47, 215, 160, .03) 70%), var(--pf-surface);
    border: 1px solid rgba(47, 215, 160, .55); box-shadow: 0 10px 28px rgba(0, 0, 0, .4), inset 4px 0 0 var(--pf-green);
  }
  html.pf .pf-rtop-lab { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--f-mono, monospace); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--pf-green); }
  html.pf .pf-rtop-lab i { width: 9px; height: 9px; border-radius: 50%; background: var(--pf-green); box-shadow: 0 0 10px var(--pf-green); }
  html.pf .pf-rtop .record-hero { margin: 0; }
  html.pf .pf-rtop .record-hero b { font-family: var(--f-mono, monospace); font-size: 40px; color: var(--pf-green); text-shadow: 0 0 18px rgba(47, 215, 160, .35); }
  html.pf .pf-rtop .record-hero span { font-family: var(--f-mono, monospace); font-size: 18px; color: var(--pf-ink); }
  html.pf.pf-results #growth .units-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  html.pf.pf-results #growth .units-tiles > div { padding: 10px; border-radius: 12px; }
  html.pf.pf-results #growth .units-tiles .ut-k { font-size: 9.5px; letter-spacing: .08em; }
  html.pf.pf-results #growth .units-tiles b { font-size: 17px; }

  /* ---------------------------------------------------------------- stacked lights key, every page (round 3) */
  html.pf .legend.pf-replaced, html.pf p.legend-line.pf-replaced, html.pf div.lights.pf-replaced { display: none !important; }
  html.pf .pf-lkey { margin: 12px 0; }
  html.pf .pf-lkey-title { margin: 0; font-family: var(--f-mono, monospace); font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pf-ink); }
  html.pf .pf-lkey-sub { margin: -4px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--pf-muted); }
  html.pf .pf-lkey li.pf-l-WARN { --pf-lc: #ffcc33; }
  html.pf .pf-lkey i.pf-lkey-warn { width: auto; height: auto; background: none; box-shadow: none; font-style: normal; font-size: 12px; line-height: 1; color: var(--pf-lc); text-align: center; }
  html.pf .pf-lkey li.pf-lkey-long { align-items: start; }
  html.pf .pf-lkey li.pf-lkey-long i { margin-top: 4px; }
  html.pf .pf-lkey li.pf-lkey-long b { padding-top: 1px; }
  html.pf .pf-lkey li.pf-lkey-long span { font-family: var(--f-body, sans-serif); font-size: 13.5px; color: var(--pf-ink); }
  html.pf .pf-lkey li.pf-lkey-long span a { color: var(--pf-cyan); }
  html.pf .pf-lkey-link { justify-self: start; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; font-size: 13px; color: var(--pf-cyan); }
  html.pf.pf-today .howto.compact { padding: 4px 12px; }
  html.pf #pf-home .pf-lkey { margin-top: 18px; }

  /* light filter chips: a tidy wrapped grid instead of a row running off the screen */
  html.pf .game-filter-bar .game-filters.lights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; overflow: visible; margin: 0; padding: 0; }
  html.pf .game-filter-bar .game-filters.lights[hidden] { display: none; }
  html.pf .game-filter-bar .game-filters.lights .gf-btn { width: 100%; min-height: 44px; justify-content: center; text-align: center; padding: 0 8px; font-size: 12.5px; line-height: 1.15; }
  html.pf.pf-results .results-filters .record-sports { display: flex; flex-wrap: wrap; gap: 8px; }
  html.pf.pf-results .results-filters .record-sports.light-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 10px; }
  html.pf.pf-results .results-filters .record-sports > a, html.pf.pf-results .results-filters .record-sports > span {
    display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 12px; margin: 0; border-radius: 999px;
    border: 1px solid var(--pf-line-hi); background: var(--pf-surface); color: var(--pf-muted); text-decoration: none; text-align: center; font-size: 12px; line-height: 1.15;
  }
  html.pf.pf-results .results-filters .record-sports > span.on { color: #07080f; background: var(--pf-cyan); border-color: var(--pf-cyan); }
  html.pf.pf-results .results-filters .record-sports.light-filters > a, html.pf.pf-results .results-filters .record-sports.light-filters > span { min-height: 44px; padding: 0 6px; }

  /* Today: every sport, with counts */
  html.pf .game-filters.sports.pf-replaced { display: none !important; }
  html.pf .pf-sc-wrap { display: grid !important; gap: 10px; }
  html.pf .pf-sportchips { display: flex; flex-wrap: wrap; gap: 8px; }
  html.pf .pf-sc {
    display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 8px 0 14px; border-radius: 999px;
    border: 1px solid var(--pf-line-hi); background: var(--pf-surface); color: var(--pf-ink); text-decoration: none; cursor: pointer;
    font: 700 13px var(--f-display, sans-serif); letter-spacing: .04em; text-transform: uppercase;
  }
  html.pf .pf-sc-n { min-width: 26px; height: 26px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--pf-surface-2); color: var(--pf-cyan); font: 700 12px var(--f-mono, monospace); }
  html.pf .pf-sc-on { color: #07080f; background: var(--pf-cyan); border-color: var(--pf-cyan); }
  html.pf .pf-sc-on .pf-sc-n { background: rgba(7, 8, 15, .2); color: #07080f; }
  html.pf .pf-sc-dim { opacity: .5; border-style: dashed; background: transparent; color: var(--pf-muted); }
  html.pf .pf-sc-dim .pf-sc-n { color: var(--pf-muted); background: transparent; border: 1px solid var(--pf-line-hi); }
  html.pf .pf-sc-dim.pf-sc-tapped { opacity: .85; border-color: var(--pf-muted); }
  html.pf .pf-sc-msg { display: grid !important; gap: 3px; padding: 12px 14px; border-radius: 12px; background: var(--pf-surface); border: 1px dashed var(--pf-line-hi); font-size: 13.5px; }
  html.pf .pf-sc-msg[hidden] { display: none !important; }
  html.pf .pf-sc-msg span { color: var(--pf-muted); font-family: var(--f-mono, monospace); font-size: 12.5px; }
  html.pf .pf-sc-msg a { color: var(--pf-cyan); font-size: 13px; }

  /* round 4: Today count line; Results intro and repeated cut-offs off on phones */
  html.pf.pf-today main p.pf-replaced, html.pf.pf-results main.wrap > p.pf-replaced, html.pf.pf-results .green-lead p.pf-replaced { display: none !important; }
  html.pf .pf-count { display: block !important; margin: 4px 0 12px; font-size: 15px; line-height: 1.45; color: var(--pf-ink); }
  html.pf .pf-rlinks { display: block !important; margin-top: 8px; color: var(--pf-muted); }
}
