/* SyncVision — styles shared by every page (moved out of the single HTML, prototype 74) */

  :root{
    --bg: #0A0E14;
    --bg-raised: #131922;
    --bg-panel: #1B2330;
    --bg-inset: #060809;
    --line: #262F3B;
    --line-soft: #1B222C;
    --text: #ECEFF3;
    --text-dim: #9AA6B4;
    --text-faint: #5C6673;
    --signal: #4F8EFF;
    --signal-soft: rgba(79,142,255,0.14);
    --accent-live: #E14B3C;
    --accent-live-soft: rgba(225,75,60,0.14);
    --ok: #2DBD6E;
    --ok-soft: rgba(45,189,110,0.14);
    --flag: #E8A83C;
    --flag-soft: rgba(232,168,60,0.14);
    --dup: #3E9BC7;
    --dup-soft: rgba(62,155,199,0.14);
    --orphan: #E5484D;
    --orphan-soft: rgba(229,72,77,0.14);
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --display: "Space Grotesk", var(--sans);
    --radius: 8px;
  }

  *{box-sizing:border-box;}
  html,body{height:100%;}
  body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    font-family:var(--sans);
    font-size:14px;
    line-height:1.5;
    -webkit-font-smoothing:antialiased;
  }

  ::selection{background:rgba(79,142,255,0.25);}

  a{color:inherit;}

  @media (prefers-reduced-motion: reduce){
    *, *::before, *::after{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; }
  }
  :focus-visible{ outline:2px solid var(--signal); outline-offset:2px; }

  /* ---------- Masthead ---------- */
  .splash-loader{
    position:fixed; inset:0; z-index:9999;
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px;
    background:var(--bg);
    transition:opacity 0.5s ease, visibility 0.5s ease;
  }
  .splash-loader.hidden{opacity:0; visibility:hidden; pointer-events:none;}
  .splash-mark{animation:splash-pulse 1.6s ease-in-out infinite;}
  .splash-title{font-family:var(--display); font-size:38px; letter-spacing:0.02em; color:var(--text);}
  .splash-tagline{font-size:20px; color:var(--text-faint); letter-spacing:0.01em; text-align:center; max-width:80vw;}
  .splash-spinner{
    width:26px; height:26px; margin-top:8px;
    border:2.5px solid var(--line); border-top-color:var(--signal);
    border-radius:50%;
    animation:splash-spin 0.8s linear infinite;
  }
  @keyframes splash-spin{ to { transform:rotate(360deg); } }
  @keyframes splash-pulse{ 0%,100%{ opacity:1; } 50%{ opacity:0.55; } }
  .masthead{
    display:flex;
    align-items:center;
    gap:16px;
    padding:14px 22px;
    border-bottom:1px solid var(--line);
    background:linear-gradient(180deg, var(--bg-raised), var(--bg));
    position:sticky;
    top:0;
    z-index:40;
    box-shadow: 0 1px 0 rgba(79,142,255,0.18);
  }
  .masthead-title{
    font-family:var(--display);
    font-weight:600;
    font-size:22px;
    letter-spacing:0.2px;
    white-space:nowrap;
    display:flex;
    align-items:center;
    gap:9px;
  }
  .brand-mark{flex-shrink:0;}
  .title-col{display:flex; flex-direction:column;}
  .masthead-title .sub{
    font-family:var(--sans);
    font-weight:500;
    font-size:12.5px;
    color:var(--text-faint);
    display:block;
    letter-spacing:0.2px;
    margin-top:-2px;
  }
  .call-log-btn{
    flex-shrink:0;
    padding:6px 12px;
    border-radius:100px;
    border:1px solid var(--line);
    background:var(--bg-inset);
    color:var(--text-dim);
    font:inherit;
    font-size:12px;
    font-weight:600;
    cursor:pointer;
    white-space:nowrap;
  }
  .call-log-btn:hover{color:var(--text); border-color:var(--text-dim);}
  .call-log-btn:disabled{cursor:default; opacity:0.65;}
  .call-log-btn .mini-spinner{margin-right:6px; vertical-align:-2px;}
  .call-log-count{color:var(--signal); font-weight:700;}
  .call-log-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.55);
    z-index:100;
    display:flex;
    align-items:flex-start;
    justify-content:center;
    padding:40px 20px;
    overflow-y:auto;
  }
  .event-drawer-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.6);
    z-index:110;
    display:flex;
    align-items:flex-start;
    justify-content:center;
    padding:30px 20px;
    overflow-y:auto;
  }
  .event-drawer-panel{
    width:100%;
    max-width:760px;
    background:var(--bg-panel);
    border:1px solid var(--line);
    border-radius:var(--radius);
    padding:20px 24px;
  }
  .clickable-row:hover{background:var(--bg-inset) !important;}
  .row-spinner{display:inline-block; width:13px; height:13px; border:2px solid var(--line); border-top-color:var(--signal); border-radius:50%; animation:splash-spin 0.7s linear infinite; vertical-align:middle;}
  tr.row-loading{animation:row-pulse 1.2s ease-in-out infinite;}
  @keyframes row-pulse{ 0%,100%{ background:transparent; } 50%{ background:var(--bg-inset); } }
  .digital-images-team-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(160px, 1fr)); gap:12px; margin-top:12px;}
  .digital-images-team-card{display:flex; flex-direction:column; align-items:center; gap:8px; padding:14px 8px; background:var(--bg-panel); border:1.5px solid var(--line); border-radius:var(--radius); cursor:pointer; font:inherit; color:var(--text);}
  .digital-images-team-card:hover{border-color:var(--accent, var(--signal)); background:var(--bg-inset);}
  .digital-images-team-card{padding:20px 10px 16px !important; gap:12px !important;}
  .digital-images-team-card img{width:84px; height:84px; object-fit:contain; filter:drop-shadow(0 2px 6px rgba(0,0,0,0.45));}
  .digital-images-team-card span{font-family:var(--display); font-size:17px; font-weight:700; text-align:center; line-height:1.15;}
  .digital-images-position-section{margin-top:20px;}
  .digital-images-position-section h4{font-family:var(--display); font-size:15px; margin:0 0 8px; padding-bottom:6px; border-bottom:1px solid var(--line);}
  .digital-images-section-header{cursor:pointer; user-select:none; display:flex; align-items:center; gap:6px;}
  .digital-images-section-header:hover{opacity:0.82;}
  .digital-images-section-header.open .dq-collapsible-arrow{transform:rotate(90deg);}
  /* Team images: the two 16:9 photos get 16 parts of the width, the two
     square logos 9 parts — so all four frames end up the same height. */
  .digital-images-team-header{display:grid; grid-template-columns:minmax(0,16fr) minmax(0,16fr) minmax(0,9fr) minmax(0,9fr); gap:12px; margin-top:12px;}
  @media (max-width: 1100px){
    .digital-images-team-header{grid-template-columns:minmax(0,1fr) minmax(0,1fr);}
    .digital-images-team-img-card.wide{grid-column:span 2;}
    .digital-images-team-img-card .dit-frame.ratio-square{width:100%; max-width:260px; margin:0 auto;}
  }
  .digital-images-team-img-card{background:var(--bg-panel); border:1.5px solid var(--line); border-radius:var(--radius); padding:10px; min-width:0; display:flex; flex-direction:column; gap:8px;}
  .digital-images-team-img-card .dit-label{font-size:10.5px; text-transform:uppercase; letter-spacing:0.04em; color:var(--text-faint); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .digital-images-team-img-card .dit-label .mono{text-transform:none; letter-spacing:0; margin-left:4px;}
  .digital-images-team-img-card .dit-frame{border-radius:6px; background:var(--bg-inset); display:flex; align-items:center; justify-content:center; overflow:hidden;}
  .digital-images-team-img-card .dit-frame.ratio-wide{aspect-ratio:16 / 9;}
  .digital-images-team-img-card .dit-frame.ratio-square{aspect-ratio:1 / 1; padding:10%;}
  .digital-images-team-img-card .dit-frame.dark{background:#1b1d22;}
  .digital-images-team-img-card .dit-frame.light{background:#f2f3f5;}
  .digital-images-team-img-card .dit-frame a{display:flex; width:100%; height:100%; align-items:center; justify-content:center;}
  .digital-images-team-img-card .dit-frame img{width:100%; height:100%; object-fit:contain; cursor:zoom-in;}
  .digital-images-team-img-card .dit-foot{display:flex; align-items:center; gap:6px; min-width:0;}
  .digital-images-team-img-card .dit-path{flex:1; min-width:0; font-family:var(--mono); font-size:11px; color:var(--text-faint); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .digital-images-team-img-card .dit-foot .expand-btn{white-space:nowrap; flex-shrink:0;}
  .digital-images-team-section{margin-bottom:14px;}
  .raw-source-url{display:inline-flex; gap:6px; align-items:baseline; max-width:min(560px, 60vw); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11.5px; margin:0 6px 0 8px; vertical-align:middle;}
  .raw-source-url .mono{overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-faint);}
  .digital-images-player-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:12px; margin-top:12px;}
  .digital-images-player-card{position:relative; background:var(--bg-panel); border:1.5px solid var(--line); border-radius:var(--radius); padding:10px; min-width:0;}
  .digital-images-player-header{display:flex; align-items:center; gap:6px; margin-bottom:8px;}
  .digital-images-player-header .digital-images-player-name{margin-bottom:0; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .digital-images-status-badge{flex-shrink:0; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.03em; padding:2px 7px; border-radius:20px;}
  .digital-images-status-badge.ok{background:rgba(46,160,90,0.18); color:#3ecf6e;}
  .digital-images-status-badge.flag{background:rgba(220,60,60,0.18); color:#ff6b6b;}
  .digital-images-player-name{font-size:12.5px; font-weight:600; margin-bottom:8px;}
  .squad-id-cell{display:inline-block; max-width:110px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:middle;}
  .digital-images-detail-cols{display:flex; gap:18px; align-items:stretch; padding:0 14px 14px;}
  .digital-images-detail-photo{flex:1 1 440px; display:flex; min-height:min(70vh, 560px);}
  .digital-images-detail-photo img{width:100%; height:100%; max-height:none; object-fit:contain; border-radius:8px; background:var(--bg-inset);}
  .digital-images-detail-info{flex:1 1 360px; min-width:280px;}
  @media (max-width:760px){
    .digital-images-detail-cols{flex-direction:column;}
    .digital-images-detail-photo{flex-basis:auto; width:100%; min-height:min(60vh, 420px);}
  }
  .digital-images-thumb-row-label{font-size:10.5px; text-transform:uppercase; letter-spacing:0.04em; color:var(--text-faint); margin:6px 0 3px;}
  .digital-images-thumb-row-label:first-of-type{margin-top:0;}
  .digital-images-player-thumbs{display:flex; flex-wrap:wrap; gap:6px;}
  .digital-images-player-thumbs img{width:56px; height:56px; object-fit:cover; border-radius:6px; cursor:pointer; background:var(--bg-inset); border:1px solid var(--line);}
  .digital-images-player-thumbs img:hover{outline:2px solid var(--signal);}
  .digital-images-thumb-missing{width:56px; height:56px; border-radius:6px; background:var(--bg-inset); border:1px dashed var(--line); display:inline-block;}
  .ed-header-row{display:flex; align-items:center; gap:14px; margin-bottom:14px;}
  .ed-minute{color:var(--text-faint); font-family:var(--mono); font-size:12px; flex-shrink:0;}
  .ed-title{font-family:var(--display); font-size:20px; margin:0; flex-shrink:0;}
  .ed-team{display:flex; align-items:center; gap:8px; margin-left:auto; font-weight:600; color:var(--text-dim);}
  .ed-team img{width:24px; height:24px; object-fit:contain;}
  .ed-close{
    flex-shrink:0;
    width:28px; height:28px;
    border-radius:50%;
    border:1px solid var(--line);
    background:var(--bg-inset);
    color:var(--text-dim);
    font-size:13px;
    cursor:pointer;
    line-height:1;
  }
  .ed-close:hover{color:var(--text); border-color:var(--text-dim);}
  .ed-hero{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:20px;
    padding:16px 10px;
    margin-bottom:14px;
    background:var(--bg-inset);
    border-radius:var(--radius);
  }
  .ed-hero-player{display:flex; align-items:center; gap:12px;}
  .ed-hero-player.ed-hero-secondary{flex-direction:row-reverse;}
  .ed-hero-name{font-weight:700; font-size:14px;}
  .ed-hero-tag{font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.4px; color:var(--text-faint); margin-top:2px;}
  .ed-hero-arrow{color:var(--text-faint); font-size:18px;}
  .ed-fields-grid{display:grid; grid-template-columns:1fr 1fr; gap:0 24px; margin-bottom:6px;}
  .ed-field{display:flex; justify-content:space-between; gap:10px; padding:8px 0; border-bottom:1px solid var(--line-soft); font-size:12.5px;}
  .ed-field-full{grid-column:1 / -1;}
  .ed-field .k{color:var(--text-faint);}
  .ed-field .v{color:var(--text); font-weight:600; text-align:right;}
  .ed-field .v.mono{font-family:var(--mono); font-weight:400; font-size:11px; word-break:break-all;}
  .ed-diagrams{display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:16px 0;}
  .ed-diagrams.single{grid-template-columns:1fr;}
  .ed-diagram-col{display:flex; flex-direction:column; align-items:center;}
  .ed-eyebrow{font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.4px; color:var(--text-faint); margin-bottom:8px; align-self:flex-start;}
  .ed-pitch{width:100%; background:var(--bg-inset); border-radius:6px; padding:6px;}
  .ed-replay-controls{display:flex; align-items:center; gap:8px; margin-bottom:8px; width:100%;}
  .ed-replay-btn{flex:1; padding:6px 10px; border-radius:100px; border:1px solid var(--line); background:var(--bg-inset); color:var(--text); font:inherit; font-size:12px; font-weight:600; cursor:pointer;}
  .ed-replay-nav{flex-shrink:0; width:30px; height:30px; border-radius:50%; border:1px solid var(--line); background:var(--bg-inset); color:var(--text-dim); cursor:pointer;}
  .ed-replay-nav:disabled{opacity:0.3; cursor:default;}
  .ed-replay-caption-row{display:flex; justify-content:space-between; width:100%; font-size:11.5px; color:var(--text-dim); margin-top:6px;}
  .ed-replay-counter{color:var(--text-faint); font-family:var(--mono);}
  .ed-raw-attrs{margin-top:16px; border-top:1px solid var(--line-soft); padding-top:10px;}
  .ed-raw-attrs summary{cursor:pointer; display:flex; align-items:center; justify-content:space-between; color:var(--text-faint); font-size:11.5px; font-weight:600; text-transform:uppercase; letter-spacing:0.3px;}
  .ed-copy-json{padding:3px 9px; border-radius:100px; border:1px solid var(--line); background:var(--bg-inset); color:var(--text-dim); font:inherit; font-size:11px; cursor:pointer;}
  .ed-raw-attrs .raw-attrs-table{margin-top:8px;}
  .story-item-row{cursor:pointer;}
  .pitch-legend{display:flex; align-items:center; gap:16px; margin-bottom:14px; font-size:12px; color:var(--text-dim); flex-wrap:wrap;}
  .pitch-legend .leg-group{display:flex; align-items:center; gap:14px;}
  .pitch-legend .leg-item{display:flex; align-items:center; gap:6px;}
  .leg-swatch{width:10px; height:10px; border-radius:50%; display:inline-block;}
  .shot-dot{cursor:pointer; transition:r .1s ease;}
  .shot-dot:hover{r:8;}
  .shot-stats-row{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; margin-top:20px;}
  .mini-stat{background:var(--bg-inset); border:1px solid var(--line); border-radius:var(--radius); padding:14px 16px;}
  .mini-stat .ms-label{font-size:11px; color:var(--text-faint); letter-spacing:0.05em; text-transform:uppercase; margin-bottom:8px;}
  .mini-stat .ms-vals{display:flex; justify-content:space-between; align-items:baseline;}
  .mini-stat .ms-val{font-family:var(--display); font-size:24px;}
  .mini-stat .ms-val.h{color:var(--signal);}
  .mini-stat .ms-val.a{color:var(--flag);}
  .stat-teams-row{display:flex; justify-content:space-between; font-weight:700; font-size:13px; margin-bottom:6px; color:var(--text-dim);}
  .stat-teams-row .home{color:var(--signal);}
  .stat-teams-row .away{color:var(--flag);}
  .stat-row{display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:14px; padding:13px 0; border-bottom:1px solid var(--line-soft);}
  .stat-row:last-child{border-bottom:none;}
  .stat-label{text-align:center; font-size:12px; color:var(--text-faint); letter-spacing:0.04em; min-width:130px;}
  .stat-half-split{display:flex; justify-content:center; gap:10px; margin-top:3px; font-size:9.5px; color:var(--text-faint); opacity:0.8;}
  .stat-bar-wrap{display:flex; align-items:center; height:22px; gap:12px;}
  .stat-bar-wrap.left{justify-content:flex-end;}
  .stat-bar{height:8px; border-radius:4px 0 0 4px;}
  .stat-bar-wrap.right .stat-bar{border-radius:0 4px 4px 0;}
  .stat-bar.home{background:var(--signal);}
  .stat-bar.away{background:var(--flag);}
  .stat-value{font-family:var(--display); font-size:18px; width:44px; flex-shrink:0;}
  .stat-value.left{text-align:right; color:var(--signal);}
  .stat-value.right{text-align:left; color:var(--flag);}
  .stat-bar-track{flex:1;}
  .momentum-track-row{display:flex; align-items:stretch; gap:10px;}
  .momentum-segment{flex:1 1 0; position:relative;}
  .half-label{font-size:10.5px; color:var(--text-faint); letter-spacing:0.1em; margin-bottom:6px; display:flex; justify-content:space-between;}
  .momentum-chart{position:relative; height:150px; border-radius:var(--radius); background:var(--bg-inset); border:1px solid var(--line); overflow:visible;}
  .momentum-chart .m-midline{position:absolute; left:0; right:0; top:50%; height:1px; background:var(--line);}
  .momentum-bars{position:absolute; inset:0; display:flex; align-items:stretch; padding:0 2px;}
  .momentum-bar-col{flex:1; position:relative; display:flex; flex-direction:column; justify-content:center;}
  .momentum-bar{position:absolute; left:8%; right:8%; border-radius:1px; min-height:0;}
  .momentum-bar.home{background:var(--signal); bottom:50%;}
  .momentum-bar.away{background:var(--flag); top:50%;}
  .momentum-marker-row{position:relative; height:26px; margin-top:6px;}
  .momentum-marker{position:absolute; top:0; transform:translateX(-50%); cursor:default; font-size:14px; line-height:1;}
  .vm-btn{background:none; border:1px solid var(--line); color:var(--text-faint); font-size:11.5px; font-weight:600; padding:6px 13px; border-radius:100px; cursor:pointer; transition:all .14s ease; white-space:nowrap;}
  .vm-btn:hover{color:var(--text);}
  .vm-btn.active{background:var(--text); color:var(--bg); border-color:var(--text);}
  .period-filter-bar{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px;}
  .pf-btn{background:none; border:1px solid var(--line); color:var(--text-faint); font-size:11.5px; font-weight:600; padding:6px 13px; border-radius:100px; cursor:pointer; transition:all .14s ease; white-space:nowrap;}
  .pf-btn:hover{color:var(--text);}
  .pf-btn.active{background:var(--text); color:var(--bg); border-color:var(--text);}
  .stat-delta{font-size:10.5px; font-weight:700; width:34px; text-align:center; padding:2px 0; border-radius:8px; white-space:nowrap; flex-shrink:0; box-sizing:border-box;}
  .stat-delta.up{background:rgba(94,168,158,0.18); color:var(--flag);}
  .stat-delta.down{background:rgba(229,72,77,0.18); color:var(--orphan);}
  .stat-delta.placeholder{background:none; visibility:hidden;}
  .ht-divider{display:flex; align-items:center; justify-content:center; padding:0 4px;}
  .ht-divider span{writing-mode:vertical-rl; font-size:10px; letter-spacing:0.1em; color:var(--text-faint);}
  .km-card{display:flex; gap:14px; padding:14px 0; border-bottom:1px solid var(--line-soft);}
  .km-card:last-child{border-bottom:none;}
  .km-icon{width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:14px; background:var(--bg-inset); color:var(--text-dim); border:1.5px solid var(--line);}
  .km-icon.tone-home{border-color:var(--signal); color:var(--signal);}
  .km-icon.tone-away{border-color:var(--flag); color:var(--flag);}
  .km-body{flex:1; min-width:0;}
  .km-title{font-size:13px; font-weight:700; margin-bottom:2px;}
  .km-sub{font-size:14px; font-weight:600; margin-bottom:4px;}
  .km-card-whistle{background:var(--bg-inset); border:1px solid var(--gold, #d9b64e); border-radius:var(--radius); padding:16px; margin-bottom:14px;}
  .km-card-whistle .km-title{font-size:14px; color:#d9b64e;}
  .km-territory{margin-top:10px; max-width:320px;}
  .km-territory svg{display:block; overflow:hidden; border-radius:6px;}
  .impact-chip{display:inline-flex; align-items:center; justify-content:center; border-radius:50%; border:2px solid; background:var(--bg-inset); font-weight:700; font-family:var(--display); flex-shrink:0; line-height:1;}
  .km-icon-photo{position:relative; width:62px; height:62px; flex-shrink:0;}
  .km-icon-photo .p-avatar{width:62px; height:62px;}
  .km-icon-badge{position:absolute; bottom:-3px; right:-3px; width:22px; height:22px; border-radius:50%; background:var(--bg-panel); border:2px solid var(--bg); display:flex; align-items:center; justify-content:center; font-size:11px;}
  .km-icon-impact{position:absolute; top:-8px; left:-8px;}
  .km-icon-impact .impact-chip{border-width:2px; box-shadow:0 0 0 2px var(--bg);}
  .km-card-goal{background:var(--bg-panel); border:1px solid var(--line); border-radius:var(--radius); padding:16px 18px; margin-bottom:14px;}
  .km-goal-header{display:flex; align-items:center; gap:14px; padding-bottom:12px; margin-bottom:12px; border-bottom:1px solid var(--line-soft);}
  .km-goal-header-mid{flex:1;}
  .km-goal-minute{font-family:var(--display); font-size:22px; color:#d9b64e;}
  .km-goal-score{font-size:14px; font-weight:600; white-space:nowrap;}
  .km-goal-frame{margin:10px 0; max-width:200px; overflow:hidden; border-radius:6px;}
  .km-window-block{margin-top:10px;}
  .ht-divider{display:flex; align-items:center; justify-content:center; width:30px; flex-shrink:0;}
  .ht-divider span{font-family:var(--display); font-size:12px; color:var(--text-faint); letter-spacing:0.06em; writing-mode:vertical-rl;}
  .scc-table{border:1px solid var(--line); border-radius:var(--radius); overflow:hidden;}
  .scc-row{display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr 1fr; gap:10px; padding:9px 14px; border-bottom:1px solid var(--line-soft); font-size:12.5px; align-items:center;}
  .scc-table-wide .scc-row{grid-template-columns:1.4fr 0.8fr 0.8fr 0.8fr 0.8fr 0.8fr 0.8fr; font-size:12px;}
  .scc-table-4src .scc-row{grid-template-columns:1.3fr repeat(8, 0.7fr); font-size:11px; gap:6px; padding:8px 10px;}
  .scc-table-4src .scc-row .scc-val:nth-child(6){border-left:1px solid var(--line); padding-left:7px;}
  .scc-teams-row{border-bottom:1px solid var(--line); background:var(--bg-inset);}
  .scc-team-group-header{grid-column:span 4; text-align:center; font-weight:700; font-size:11.5px; padding:2px 0;}
  .scc-team-group-header.scc-team-home{color:var(--signal);}
  .scc-team-group-header.scc-team-away{color:var(--flag); border-left:1px solid var(--line); padding-left:7px;}
  .scc-row:last-child{border-bottom:none;}
  .scc-row.scc-head{background:var(--bg-inset); font-weight:700; color:var(--text-dim); font-size:11px; letter-spacing:0.02em;}
  .scc-row.scc-diff{background:rgba(229,72,77,0.08);}
  .scc-row.scc-missing{opacity:0.55;}
  .scc-row.scc-info .scc-label em{color:var(--text-faint); font-style:italic; font-weight:400;}
  .scc-label{color:var(--text); font-weight:600;}
  .scc-val{font-family:var(--mono); color:var(--text-dim); text-align:right;}
  .scc-val.scc-bad{color:var(--orphan); font-weight:700;}
  .call-log-panel{
    background:var(--bg-panel);
    border:1px solid var(--line);
    border-radius:8px;
    width:100%;
    max-width:960px;
    padding:20px 22px;
  }
  .call-log-header{display:flex; align-items:center; justify-content:space-between; gap:12px;}
  .call-log-header h3{margin:0;}
  .call-log-header .btn{padding:6px 12px; font-size:12.5px;}
  .call-log-row{
    border:1px solid var(--line);
    border-radius:5px;
    padding:8px 10px;
    margin-bottom:6px;
    background:var(--bg-inset);
  }
  .call-log-row-head{display:flex; align-items:center; gap:8px; flex-wrap:wrap;}
  .call-log-row .mono{font-family:var(--mono); font-size:11.5px; word-break:break-all;}
  .call-log-badge{
    font-size:10.5px;
    font-weight:700;
    padding:1px 7px;
    border-radius:100px;
    flex-shrink:0;
  }
  .call-log-badge.ok{background:var(--ok-soft); color:var(--ok);}
  .call-log-badge.error{background:var(--flag-soft); color:var(--flag);}
  .call-log-badge.pending{background:var(--bg-raised); color:var(--text-faint);}
  .call-log-meta{color:var(--text-faint); font-size:11px; flex-shrink:0; margin-left:auto;}
  .call-log-derived{margin:5px 0 0; padding:6px 8px; background:var(--signal-soft); border-left:2px solid var(--signal); border-radius:3px; font-size:11.5px; color:var(--text); white-space:pre-wrap;}
  .masthead-match{
    flex:1;
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
    padding-left:16px;
    border-left:1px solid var(--line);
  }
  .masthead-match .placeholder{color:var(--text-faint); font-size:13px;}
  .match-name{font-family:var(--display); font-weight:600; font-size:19px; letter-spacing:0.1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:inline-flex; align-items:center; gap:7px; vertical-align:middle;}
  .match-context{color:var(--text-dim); font-size:12.5px; white-space:nowrap; margin-right:9px; vertical-align:middle;}
  .match-logo{width:22px; height:22px; object-fit:contain; flex-shrink:0;}
  .match-meta{color:var(--text-dim); font-size:12.5px; white-space:nowrap;}
  .live-pill{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:3px 9px 3px 7px;
    border-radius:100px;
    font-size:11.5px;
    font-weight:600;
    letter-spacing:0.3px;
    border:1px solid var(--accent-live);
    color:var(--accent-live);
    background:var(--accent-live-soft);
    flex-shrink:0;
  }
  .live-pill .dot{
    width:6px;height:6px;border-radius:50%;
    background:var(--accent-live);
    animation:pulse 1.6s ease-in-out infinite;
  }
  @keyframes pulse{
    0%,100%{opacity:1; transform:scale(1);}
    50%{opacity:0.45; transform:scale(0.75);}
  }
  .snapshot-pill{
    display:inline-flex;
    align-items:center;
    padding:3px 9px;
    border-radius:100px;
    font-size:11.5px;
    font-weight:600;
    letter-spacing:0.3px;
    border:1px solid var(--line);
    color:var(--text-dim);
    flex-shrink:0;
  }
  .status-pill{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:4px 11px 4px 9px;
    border-radius:100px;
    font-size:12px;
    font-weight:700;
    letter-spacing:0.3px;
    flex-shrink:0;
    cursor:help;
  }
  .status-pill .dot{ width:7px; height:7px; border-radius:50%; }
  .status-pill.status-green{ color:var(--ok); background:var(--ok-soft); border:1px solid var(--ok); }
  .status-pill.status-green .dot{ background:var(--ok); }
  .status-pill.status-yellow{ color:var(--flag); background:var(--flag-soft); border:1px solid var(--flag); }
  .status-pill.status-yellow .dot{ background:var(--flag); }
  .status-pill.status-red{ color:var(--orphan); background:var(--orphan-soft); border:1px solid var(--orphan); }
  .status-pill.status-red .dot{ background:var(--orphan); animation:pulse 1.6s ease-in-out infinite; }

  /* ---------- Layout ---------- */
  .app{
    display:grid;
    grid-template-columns: 340px 1fr;
    min-height:calc(100vh - 62px);
  }
  @media (max-width: 900px){
    .app{grid-template-columns: 1fr;}
  }
  @media (max-width: 640px){
    .masthead{flex-wrap:wrap; row-gap:6px;}
    .masthead-match{
      border-left:none;
      padding-left:0;
      flex-basis:100%;
      flex-wrap:wrap;
      row-gap:4px;
    }
    .match-name{white-space:normal;}
    .match-meta{white-space:normal;}
  }

  /* ---------- Sidebar / input panel ---------- */
  .sidebar{
    border-right:1px solid var(--line);
    background:var(--bg-raised);
    padding:14px;
    display:flex;
    flex-direction:column;
    gap:16px;
    height:fit-content;
    position:sticky;
    top:63px;
  }
  @media (max-width: 900px){
    .sidebar{position:static; border-right:none; border-bottom:1px solid var(--line);}
  }
  .sidebar{position:sticky; transition:padding .15s ease;}
  .sidebar-toggle{
    position:absolute;
    top:14px;
    right:-13px;
    width:26px;
    height:26px;
    border-radius:50%;
    border:1px solid var(--line);
    background:var(--bg-raised);
    color:var(--text-dim, var(--text));
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    font-size:13px;
    line-height:1;
    z-index:5;
    box-shadow:0 1px 3px rgba(0,0,0,.25);
  }
  .sidebar-toggle:hover{ border-color:var(--accent, var(--line)); }
  .sidebar-content{ display:flex; flex-direction:column; gap:16px; min-width:0; }
  .app.sidebar-collapsed{ grid-template-columns: 26px 1fr; }
  .app.sidebar-collapsed .sidebar{ padding:14px 0; border-right:1px solid var(--line); overflow:visible; }
  .app.sidebar-collapsed .sidebar-content{ display:none; }
  @media (max-width: 900px){
    .app.sidebar-collapsed{ grid-template-columns: 1fr; }
    .app.sidebar-collapsed .sidebar{ padding:8px 0; }
    .sidebar-toggle{ top:8px; right:8px; }
  }

  .mode-switch{
    display:flex;
    background:var(--bg-inset);
    border:1px solid var(--line);
    border-radius:var(--radius);
    padding:3px;
    gap:3px;
  }
  .mode-switch button{
    flex:1;
    padding:8px 10px;
    border:none;
    background:transparent;
    color:var(--text-dim);
    font:inherit;
    font-weight:600;
    font-size:13px;
    border-radius:4px;
    cursor:pointer;
    transition:background 0.15s, color 0.15s;
  }
  .mode-switch button.active{
    background:var(--bg-panel);
    color:var(--text);
    box-shadow:0 1px 0 var(--line), inset 0 -2px 0 var(--signal);
  }

  .panel-block{
    border:1px solid var(--line);
    background:var(--bg-panel);
    border-radius:var(--radius);
    padding:14px;
  }
  details.panel-block summary{list-style:none; display:flex; align-items:center; justify-content:space-between;}
  details.panel-block summary::-webkit-details-marker{display:none;}
  details.panel-block summary::after{content:'▸'; color:var(--text-faint); font-size:11px; transition:transform .14s ease;}
  details.panel-block[open] summary::after{transform:rotate(90deg);}
  details.panel-block[open] summary{margin-bottom:2px;}
  .panel-block h3{
    margin:0 0 3px;
    font-size:13px;
    font-weight:600;
    color:var(--text);
  }
  .panel-block .hint{
    margin:0 0 12px;
    font-size:12px;
    color:var(--text-faint);
    line-height:1.45;
  }

  .drop{
    border:1.5px dashed var(--line);
    border-radius:var(--radius);
    padding:12px;
    margin-bottom:10px;
    cursor:pointer;
    transition:border-color 0.15s, background 0.15s;
    background:var(--bg-inset);
  }
  .drop:last-child{margin-bottom:0;}
  .drop:hover{border-color:var(--signal);}
  .drop.has-file{border-style:solid; border-color:var(--ok);}
  .drop.required-missing{border-color:var(--orphan);}
  .drop input[type=file]{display:none;}
  .drop-label{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
  }
  .drop-label .name{
    font-weight:600;
    font-size:12.5px;
  }
  .drop-label .req{
    font-size:10.5px;
    color:var(--text-faint);
    font-weight:600;
    letter-spacing:0.3px;
  }
  .drop-status{
    margin-top:6px;
    font-size:11.5px;
    color:var(--text-faint);
    font-family:var(--mono);
  }
  .drop.has-file .drop-status{color:var(--ok);}

  .field{margin-bottom:10px;}
  .field:last-child{margin-bottom:0;}
  .field label{
    display:block;
    font-size:11.5px;
    font-weight:600;
    color:var(--text-dim);
    margin-bottom:5px;
  }
  .field input[type=text]{
    width:100%;
    background:var(--bg-inset);
    border:1px solid var(--line);
    border-radius:4px;
    color:var(--text);
    font:inherit;
    font-family:var(--mono);
    font-size:12.5px;
    padding:8px 9px;
  }
  .field input[type=text]:focus{outline:none; border-color:var(--text-faint);}
  .field-row{display:flex; gap:8px;}
  .field-row .field{flex:1;}

  /* Every <select> in the tool, styled once here instead of relying on
     each browser's own native dropdown chrome (which, combined with the
     .mono class's small 11.5px dim text a lot of these carry for team ids
     etc., made most combos hard to read) — proper size, contrast, and a
     custom arrow so they read like a deliberate part of the UI rather
     than an unstyled leftover. Selects with their own full inline style
     (the two big Competition/Season pickers) simply override these via
     the normal cascade, so they're unaffected. */
  select{
    appearance:none;
    -webkit-appearance:none;
    -moz-appearance:none;
    background-color:var(--bg-inset);
    background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" fill="none" stroke="%239AA6B4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat:no-repeat;
    background-position:right 10px center;
    border:1.5px solid var(--line);
    border-radius:6px;
    color:var(--text);
    font:inherit;
    font-size:13px;
    padding:8px 28px 8px 10px;
    cursor:pointer;
    transition:border-color 0.15s;
  }
  select:hover{border-color:var(--text-faint);}
  select:focus{outline:2px solid var(--signal); outline-offset:1px;}
  select:disabled{opacity:0.45; cursor:not-allowed;}
  select option{background:var(--bg-panel); color:var(--text);}
  /* .mono is meant for small dim code-style text elsewhere (spans, ids in
     prose) — a select carrying that class still gets its monospace font
     (handy for team/player ids), but at normal size and full-contrast
     text rather than the tiny dim styling meant for inline text. */
  select.mono{font-family:var(--mono); font-size:12.5px; color:var(--text);}

  details.advanced{margin-top:2px;}
  details.advanced summary{
    cursor:pointer;
    font-size:11.5px;
    font-weight:600;
    color:var(--text-faint);
    list-style:none;
    padding:4px 0;
  }
  details.advanced summary::-webkit-details-marker{display:none;}
  details.advanced summary:before{content:"▸ "; }
  details.advanced[open] summary:before{content:"▾ ";}
  details.advanced .field{margin-top:10px;}

  #exclusionsListBody table{width:100%; font-size:11px;}
  #exclusionsListBody th{
    text-align:left; padding:4px 6px; color:var(--text-faint);
    font-size:10px; letter-spacing:0.2px; border-bottom:1px solid var(--line);
    white-space:nowrap;
  }
  #exclusionsListBody td{
    padding:5px 6px; border-bottom:1px solid var(--line-soft);
    vertical-align:top;
  }
  #exclusionsListBody .sub{color:var(--text-faint); font-size:10.5px;}

  .btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    width:100%;
    padding:9px 6px;
    border-radius:var(--radius);
    border:1px solid var(--line);
    background:var(--bg-inset);
    color:var(--text);
    font:inherit;
    font-weight:600;
    font-size:12px;
    cursor:pointer;
    transition:background 0.15s, border-color 0.15s;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .btn svg{flex-shrink:0;}
  .btn:hover{border-color:var(--text-faint);}
  .btn:disabled{opacity:0.4; cursor:not-allowed;}
  .btn-primary{
    background:var(--signal);
    color:#fff;
    border-color:var(--signal);
  }
  .btn-primary:hover{background:#6B9FFF; border-color:#6B9FFF;}
  .btn-ghost{
    background:transparent;
    border-color:transparent;
    color:var(--text-faint);
    padding:6px 4px;
    width:auto;
    font-size:12px;
  }
  .btn-ghost:hover{color:var(--signal);}

  .status-line{
    font-size:12px;
    color:var(--text-faint);
    font-family:var(--mono);
    min-height:16px;
  }
  .status-line.err{color:var(--orphan);}
  .status-line.ok{color:var(--ok);}

  /* ---------- Main ---------- */
  .main{padding:20px 22px 60px; min-width:0;}

  .live-refresh-banner{
    position:fixed;
    top:76px;
    right:24px;
    z-index:100;
    max-width:min(420px, calc(100vw - 48px));
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 14px;
    border:1px solid var(--signal);
    border-radius:var(--radius);
    background:var(--bg-raised);
    color:var(--signal);
    font-size:12.5px;
    font-weight:600;
    box-shadow:0 4px 18px rgba(0,0,0,.35);
  }
  .live-refresh-banner.err{
    border-color:var(--orphan);
    background:var(--orphan-soft);
    color:var(--orphan);
  }
  .live-refresh-banner #liveRefreshText{ font-family:var(--mono); font-weight:500; }

  .empty-state{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
    padding:60px 10px;
    max-width:520px;
  }
  .empty-state h2{
    font-family:var(--display);
    font-weight:600;
    font-size:26px;
    margin:0;
  }
  .empty-state p{color:var(--text-dim); margin:0; font-size:13.5px;}

  .tabbar{
    display:flex;
    flex-wrap:wrap;
    gap:2px;
    border-bottom:1px solid var(--line);
    margin-bottom:18px;
  }
  .tabbar button{
    padding:10px 15px;
    background:transparent;
    border:none;
    border-bottom:2px solid transparent;
    color:var(--text-faint);
    font:inherit;
    font-weight:600;
    font-size:13px;
    cursor:pointer;
    white-space:nowrap;
    display:flex;
    align-items:center;
    gap:7px;
  }
  .tabbar button:hover{color:var(--text-dim);}
  .tabbar button.active{color:var(--text); border-bottom-color:var(--signal);}
  .tabbar.tabbar-inner{
    margin:-4px 0 16px;
    padding-left:2px;
    border-bottom:1px solid var(--line-soft);
  }
  .tabbar.tabbar-inner button{
    padding:8px 12px;
    font-size:12px;
    font-weight:600;
    color:var(--text-faint);
  }
  .tabbar.tabbar-inner button.active{color:var(--text-dim); border-bottom-color:var(--text-faint);}
  .tab-badge{
    font-size:10.5px;
    font-weight:700;
    padding:1px 6px;
    border-radius:100px;
    background:var(--bg-panel);
    color:var(--text-faint);
    border:1px solid var(--line);
  }
  .tab-badge.warn{color:var(--flag); border-color:var(--flag); background:var(--flag-soft);}
  .tab-badge.crit{color:var(--orphan); border-color:var(--orphan); background:var(--orphan-soft);}

  .tabpane{display:none;}
  .tabpane.active{display:block;}

  /* ---------- Cards / stats ---------- */
  .stat-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));
    gap:12px;
    margin-bottom:22px;
  }
  .stat-card{
    border:1px solid var(--line);
    border-top:2px solid var(--line);
    background:var(--bg-panel);
    border-radius:var(--radius);
    padding:14px 15px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  }
  .stat-card.ok{border-top-color:var(--ok);}
  .stat-card.flag{border-top-color:var(--flag);}
  .stat-card.orphan{border-top-color:var(--orphan);}
  .stat-card.dup{border-top-color:var(--dup);}
  .stat-card-clickable{cursor:pointer; transition:border-color 0.12s ease, transform 0.12s ease;}
  .stat-card-clickable:hover{border-color:var(--text-dim); transform:translateY(-1px);}
  .stat-card .num{
    font-family:var(--display);
    font-size:30px;
    font-weight:600;
    line-height:1.1;
  }
  .stat-card .label{
    font-size:12px;
    color:var(--text-dim);
    margin-top:4px;
  }
  .stat-card.ok .num{color:var(--ok);}
  .stat-card.flag .num{color:var(--flag);}
  .stat-card.orphan .num{color:var(--orphan);}
  .stat-card.dup .num{color:var(--dup);}
  .hero-grid{margin-bottom:14px;}
  .hero-grid .stat-card{
    background:linear-gradient(180deg, var(--bg-raised), var(--bg-panel));
    padding:20px 20px 18px;
  }
  .stat-card.hero .num{font-size:46px; letter-spacing:-0.5px;}
  body.hide-match-context #mastheadMatch,
  body.hide-match-context #mastheadRefreshBtn,
  body.hide-match-context #mastheadCopyLinkBtn{display:none !important;}
  /* ---------- Project logos ---------- */
  /* Crests/wordmarks of very different shapes: always fitted (contain),
     never cropped, no background disc. */
  .project-select-row{display:flex; align-items:center; gap:8px;}
  .project-logo-box{flex:0 0 auto; width:34px; height:34px; display:flex; align-items:center; justify-content:center;}
  .project-logo-box img{max-width:34px; max-height:34px; object-fit:contain;}
  .dl-title img{height:24px; width:auto; max-width:60px; object-fit:contain; vertical-align:-5px; margin-right:8px;}
  /* ---------- Deep-link loader ---------- */
  /* Sits under the splash (9999) and above everything else, so a deep
     link never flashes the empty calendar / half-rendered match first. */
  .dl-loader{position:fixed; inset:0; z-index:9000; display:flex; align-items:center; justify-content:center;
    background:rgba(10,14,20,0.94); backdrop-filter:blur(3px); transition:opacity 0.3s ease, visibility 0.3s ease;}
  .dl-loader.hidden{opacity:0; visibility:hidden; pointer-events:none;}
  .dl-card{width:min(440px, calc(100vw - 32px)); background:var(--bg-raised, #121821); border:1px solid var(--line); border-radius:10px;
    padding:22px 22px 18px; box-shadow:0 20px 60px rgba(0,0,0,0.45);}
  .dl-eyebrow{font-size:11px; font-weight:600; letter-spacing:0.08em; text-transform:uppercase; color:var(--text-faint);}
  .dl-title{font-family:var(--display); font-size:20px; font-weight:600; color:var(--text); margin:4px 0 2px; min-height:26px;}
  .dl-sub{font-size:12px; color:var(--text-dim); font-family:var(--mono); min-height:16px; overflow-wrap:anywhere;}
  .dl-steps{list-style:none; margin:16px 0 0; padding:0; display:flex; flex-direction:column; gap:9px;}
  .dl-step{display:grid; grid-template-columns:18px 1fr; gap:10px; align-items:start; font-size:13px; color:var(--text-faint);}
  .dl-step .ic{width:14px; height:14px; margin-top:2px; border-radius:50%; border:1.5px solid var(--line); box-sizing:border-box; position:relative;}
  .dl-step.active{color:var(--text);}
  .dl-step.active .ic{border-color:var(--signal); border-top-color:transparent; animation:spin 0.8s linear infinite;}
  .dl-step.done{color:var(--text-dim);}
  .dl-step.done .ic{border-color:var(--ok); background:var(--ok);}
  .dl-step.done .ic::after{content:''; position:absolute; left:3.5px; top:1px; width:3px; height:6px; border:solid var(--bg); border-width:0 1.5px 1.5px 0; transform:rotate(45deg);}
  .dl-step.error{color:var(--orphan);}
  .dl-step.error .ic{border-color:var(--orphan); background:var(--orphan);}
  .dl-step .detail{display:block; font-size:11.5px; color:var(--text-faint); font-family:var(--mono); margin-top:2px; overflow-wrap:anywhere;}
  .dl-step.error .detail{color:var(--orphan);}
  .dl-foot{display:flex; justify-content:flex-end; gap:8px; margin-top:16px;}
  .dl-foot .expand-btn{display:none;}
  .dl-loader.failed .dl-foot .expand-btn{display:inline-block;}
  body.dl-loader-on #liveRefreshBanner{display:none !important;}
  /* ---------- Matchday picker: step loader (same card as the deep-link one) ---------- */
  #matchBrowserArea{position:relative;}
  .mb-loader{position:absolute; inset:0; z-index:60; display:flex; justify-content:center; align-items:flex-start; padding-top:60px;
    background:rgba(10,14,20,0.86); backdrop-filter:blur(2px); transition:opacity 0.3s ease, visibility 0.3s ease; min-height:420px;}
  .mb-loader.hidden{opacity:0; visibility:hidden; pointer-events:none;}
  .mb-loader .dl-card{position:sticky; top:20px;}
  .mb-loader.failed .dl-foot .expand-btn{display:inline-block;}
  /* ---------- Fantacalcio (ported page, scoped) ---------- */
#fantacalcioArea .fc-root{
    --bg:#0f1115; --panel:#171a21; --panel2:#1f232c; --border:#2a2f3a;
    --text:#e8eaed; --muted:#8b93a3; --accent:#4f8cff; --good:#3ecf8e; --bad:#ff5d6c; --warn:#ffb454;
  }
#fantacalcioArea .fc-root *{box-sizing:border-box;}
#fantacalcioArea .fc-root{color:var(--text);}
#fantacalcioArea .fc-root h1{font-size:20px; margin:0 0 4px;}
#fantacalcioArea .fc-root .sub{color:var(--muted); font-size:13px; margin-bottom:18px;}
#fantacalcioArea .fc-root .bar{
    display:flex; gap:8px; flex-wrap:wrap; align-items:center;
    background:var(--panel); border:1px solid var(--border); border-radius:10px;
    padding:12px; margin-bottom:16px;
  }
#fantacalcioArea .fc-root .bar input[type=text]{
    flex:1; min-width:280px; background:var(--panel2); border:1px solid var(--border);
    color:var(--text); padding:8px 10px; border-radius:6px; font-size:13px;
  }
#fantacalcioArea .fc-root button{
    background:var(--accent); color:#fff; border:none; padding:8px 14px;
    border-radius:6px; cursor:pointer; font-size:13px; font-weight:600;
  }
#fantacalcioArea .fc-root button.secondary{background:var(--panel2); border:1px solid var(--border); color:var(--text);}
#fantacalcioArea .fc-root button.compareCta{background:#2563eb; color:#fff; font-weight:700; padding:9px 18px; box-shadow:0 0 0 1px rgba(37,99,235,0.4);}
#fantacalcioArea .fc-root button.compareCta:hover{background:#3b73ee;}
#fantacalcioArea .fc-root button:hover{filter:brightness(1.12);}
#fantacalcioArea .fc-root #fc-status{font-size:12px; color:var(--muted); margin-bottom:14px; min-height:16px;}
#fantacalcioArea .fc-root #fc-status.err{color:var(--bad);}
#fantacalcioArea .fc-root #fc-status.ok{color:var(--good);}
#fantacalcioArea .fc-root .view{display:none;}
#fantacalcioArea .fc-root .view.active{display:block;}
#fantacalcioArea .fc-root .matchList{display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:12px; margin-bottom:20px;}
#fantacalcioArea .fc-root .match-card{
    background:var(--panel); border:1px solid var(--border); border-radius:12px; padding:14px 16px;
    cursor:pointer; transition:border-color .15s;
  }
#fantacalcioArea .fc-root .match-card:hover{border-color:var(--accent);}
#fantacalcioArea .fc-root .match-card .teams{display:flex; align-items:center; justify-content:space-between; gap:10px;}
#fantacalcioArea .fc-root .match-card .team{flex:1; font-size:13.5px; font-weight:600;}
#fantacalcioArea .fc-root .match-card .team.away{text-align:right;}
#fantacalcioArea .fc-root .match-card .score{font-size:19px; font-weight:800; color:var(--accent); min-width:56px; text-align:center;}
#fantacalcioArea .fc-root .match-card .meta{margin-top:8px; font-size:11.5px; color:var(--muted); text-align:center;}
#fantacalcioArea .fc-root .backRow{margin-bottom:14px;}
#fantacalcioArea .fc-root .matchHeader{
    display:flex; align-items:center; justify-content:center; gap:20px; flex-wrap:wrap;
    background:var(--panel); border:1px solid var(--border); border-radius:12px;
    padding:18px; margin-bottom:20px;
  }
#fantacalcioArea .fc-root .matchHeader .team{font-size:17px; font-weight:700;}
#fantacalcioArea .fc-root .matchHeader .score{font-size:28px; font-weight:800; color:var(--accent);}
#fantacalcioArea .fc-root .matchHeader .meta{font-size:12px; color:var(--muted); margin-top:4px; text-align:center;}
#fantacalcioArea .fc-root .lineupGrid{display:grid; grid-template-columns:1fr 1fr; gap:20px;}
@media (max-width:760px){#fantacalcioArea .fc-root .lineupGrid{grid-template-columns:1fr;}}
#fantacalcioArea .fc-root .compareBar{display:flex; gap:8px; align-items:center; margin-bottom:16px; flex-wrap:wrap;}
#fantacalcioArea .fc-root .compareBar input[type=text]{
    background:var(--panel2); border:1px solid var(--border); color:var(--text);
    padding:7px 9px; border-radius:6px; font-size:12.5px; min-width:340px;
  }
#fantacalcioArea .fc-root .compareBar .label{font-size:12px; color:var(--muted);}
#fantacalcioArea .fc-root .comparePanel{
    background:linear-gradient(180deg, rgba(79,140,255,0.06), rgba(79,140,255,0));
    border:1px solid var(--border); border-radius:16px; padding:20px; margin-bottom:24px;
  }
#fantacalcioArea .fc-root .comparePanel h2{
    font-size:18px; margin:0 0 16px; display:flex; align-items:center; gap:8px;
  }
#fantacalcioArea .fc-root .compareSummary{
    display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:10px; margin-bottom:20px;
  }
#fantacalcioArea .fc-root .summaryCard{
    background:var(--panel); border:1px solid var(--border); border-radius:10px;
    padding:12px 14px; text-align:center;
  }
#fantacalcioArea .fc-root .summaryCard .num{font-size:26px; font-weight:800; line-height:1;}
#fantacalcioArea .fc-root .summaryCard .lbl{font-size:11px; color:var(--muted); margin-top:4px; text-transform:uppercase; letter-spacing:.03em;}
#fantacalcioArea .fc-root .summaryCard.ok .num{color:var(--good);}
#fantacalcioArea .fc-root .summaryCard.warn .num{color:var(--bad);}
#fantacalcioArea .fc-root .summaryCard.neutral .num{color:var(--accent);}
#fantacalcioArea .fc-root .summaryCard.miss .num{color:var(--warn);}
#fantacalcioArea .fc-root .globalBadge{
    display:inline-flex; align-items:center; gap:8px; padding:10px 18px; border-radius:10px;
    font-size:15px; font-weight:700; margin-bottom:20px; width:100%; box-sizing:border-box;
  }
#fantacalcioArea .fc-root .globalBadge.ok{background:rgba(62,207,142,0.12); color:var(--good); border:1px solid rgba(62,207,142,0.35);}
#fantacalcioArea .fc-root .globalBadge.warn{background:rgba(255,93,108,0.12); color:var(--bad); border:1px solid rgba(255,93,108,0.35);}
#fantacalcioArea .fc-root .idCompare{font-family:ui-monospace,Menlo,Consolas,monospace; font-size:11px; margin-top:3px; line-height:1.5;}
#fantacalcioArea .fc-root .idCompare .row{white-space:nowrap;}
#fantacalcioArea .fc-root .idCompare .tag{color:var(--muted); margin-right:4px;}
#fantacalcioArea .fc-root .idDiffChar{background:rgba(255,93,108,0.35); color:#fff; border-radius:2px;}
#fantacalcioArea .fc-root td.esito{cursor:default;}
#fantacalcioArea .fc-root td.esito.clickable{cursor:pointer; text-decoration:underline; text-decoration-style:dotted;}
#fantacalcioArea .fc-root td.esito.clickable:hover{filter:brightness(1.3);}
#fantacalcioArea .fc-root .modalOverlay{
    display:none; position:fixed; inset:0; background:rgba(0,0,0,0.55);
    align-items:center; justify-content:center; z-index:1000; padding:20px;
  }
#fantacalcioArea .fc-root .modalOverlay.active{display:flex;}
#fantacalcioArea .fc-root .modalBox{
    background:var(--panel); border:1px solid var(--border); border-radius:14px;
    max-width:560px; width:100%; max-height:80vh; overflow-y:auto; padding:22px;
  }
#fantacalcioArea .fc-root .modalBox h3{margin:0 0 4px; font-size:16px;}
#fantacalcioArea .fc-root .modalBox .modalSub{color:var(--muted); font-size:12px; margin-bottom:16px;}
#fantacalcioArea .fc-root .modalClose{float:right; background:var(--panel2); border:1px solid var(--border); color:var(--muted); border-radius:6px; padding:4px 10px; font-size:12px; cursor:pointer;}
#fantacalcioArea .fc-root .diffRow{background:var(--panel2); border:1px solid var(--border); border-radius:8px; padding:10px 12px; margin-bottom:8px; font-size:13px;}
#fantacalcioArea .fc-root .diffRow .diffLabel{font-size:11px; text-transform:uppercase; letter-spacing:.03em; color:var(--muted); margin-bottom:4px;}
#fantacalcioArea .fc-root .diffRow .diffValues{display:flex; gap:16px; align-items:center; flex-wrap:wrap;}
#fantacalcioArea .fc-root .diffRow .diffValues .side{display:flex; flex-direction:column; gap:2px;}
#fantacalcioArea .fc-root .diffRow .diffValues .side .src{font-size:10px; color:var(--muted);}
#fantacalcioArea .fc-root .diffRow .diffValues .side .val{font-weight:700; font-family:ui-monospace,Menlo,Consolas,monospace; font-size:12px; word-break:break-all;}
#fantacalcioArea .fc-root table.compare{width:100%; border-collapse:collapse; font-size:12.5px; margin-bottom:10px;}
#fantacalcioArea .fc-root table.compare th{padding:5px 6px; font-size:10px; text-transform:uppercase; letter-spacing:.03em; color:var(--muted); text-align:center; border-bottom:1px solid var(--border);}
#fantacalcioArea .fc-root table.compare th.name{text-align:left;}
#fantacalcioArea .fc-root table.compare td{padding:5px 6px; text-align:center; border-bottom:1px solid var(--border);}
#fantacalcioArea .fc-root table.compare td.name{text-align:left; font-weight:500;}
#fantacalcioArea .fc-root table.compare tr.diff{background:rgba(255,93,108,0.08);}
#fantacalcioArea .fc-root table.compare tr.diff td.flag{color:var(--bad); font-weight:700;}
#fantacalcioArea .fc-root table.compare td.flag{color:var(--good); font-weight:700;}
#fantacalcioArea .fc-root table.compare tr.missing{opacity:.55; font-style:italic;}
#fantacalcioArea .fc-root .compareTeamTitle{font-size:14px; font-weight:700; margin:18px 0 8px; padding-top:14px; border-top:1px solid var(--border);}
#fantacalcioArea .fc-root .compareTeamTitle:first-of-type{border-top:none; padding-top:0;}
#fantacalcioArea .fc-root .teamBlock{background:var(--panel); border:1px solid var(--border); border-radius:12px; padding:14px;}
#fantacalcioArea .fc-root .teamBlock h3{margin:0 0 10px; font-size:14px;}
#fantacalcioArea .fc-root .sectionLabel{font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin:14px 0 6px;}
#fantacalcioArea .fc-root .sectionLabel:first-child{margin-top:0;}
#fantacalcioArea .fc-root table.players{width:100%; border-collapse:collapse; font-size:13px;}
#fantacalcioArea .fc-root table.players tr{border-bottom:1px solid var(--border);}
#fantacalcioArea .fc-root table.players tr:last-child{border-bottom:none;}
#fantacalcioArea .fc-root table.players td{padding:6px 4px; vertical-align:middle;}
#fantacalcioArea .fc-root table.players th{padding:4px; font-size:10.5px; text-transform:uppercase; letter-spacing:.03em; color:var(--muted); font-weight:600; text-align:center; border-bottom:1px solid var(--border); cursor:help;}
#fantacalcioArea .fc-root td.role{width:30px; text-align:center; font-size:11px; font-weight:700; color:var(--muted);}
#fantacalcioArea .fc-root td.name{font-weight:500;}
#fantacalcioArea .fc-root td.name .sub{display:block; font-size:11px; color:var(--muted); font-weight:400;}
#fantacalcioArea .fc-root td.voto{width:44px; text-align:center; font-weight:800;}
#fantacalcioArea .fc-root td.fvoto{width:52px; text-align:center; font-weight:700; font-size:12px;}
#fantacalcioArea .fc-root td.events{white-space:nowrap; font-size:13px;}
#fantacalcioArea .fc-root .voto-hi{color:var(--good);}
#fantacalcioArea .fc-root .voto-lo{color:var(--bad);}
#fantacalcioArea .fc-root .voto-mid{color:var(--warn);}
#fantacalcioArea .fc-root .voto-none{color:var(--muted); font-weight:400;}
#fantacalcioArea .fc-root .ev{display:inline-block; margin-right:3px; cursor:help;}
#fantacalcioArea .fc-root .empty{color:var(--muted); font-size:13px; padding:10px 0;}
#fantacalcioArea .fc-root .legend{font-size:11.5px; color:var(--muted); margin:10px 0 0;}
#fantacalcioArea .fc-root .legend span{margin-right:12px; white-space:nowrap;}
#fantacalcioArea .fc-root details.rawBlock{margin-top:22px;}
#fantacalcioArea .fc-root details.rawBlock summary{cursor:pointer; color:var(--muted); font-size:12px; margin-bottom:8px;}
#fantacalcioArea .fc-root pre.raw{background:var(--panel); border:1px solid var(--border); border-radius:10px; padding:14px; font-size:11.5px; overflow:auto; max-height:500px;}
#fantacalcioArea .fc-root .fc-mdLabel{font-size:12.5px; color:var(--muted); font-weight:600;}
#fantacalcioArea .fc-root #fc-matchday{min-width:150px;}
#fantacalcioArea .fc-root .fc-mdHint{font-size:12px; color:var(--muted); flex:1;}
#fantacalcioArea .fc-root details.fc-urlPanel{margin:-6px 0 16px;}
#fantacalcioArea .fc-root details.fc-urlPanel summary{cursor:pointer; color:var(--muted); font-size:12px;}
#fantacalcioArea .fc-root .fcLogo{object-fit:contain; vertical-align:middle; margin:0 8px;}
#fantacalcioArea .fc-root .match-card .team{display:flex; align-items:center;}
#fantacalcioArea .fc-root .match-card .team.away{justify-content:flex-end;}
#fantacalcioArea .fc-root .matchHeader .team{display:flex; align-items:center;}
  #sharedChecksBox .table-wrap, #sharedChecksBox .table-wrap .scroll{min-height:0 !important; height:auto !important; max-height:420px;}
  #seasonChecksBox .table-wrap, #seasonChecksBox .table-wrap .scroll{min-height:0 !important; height:auto !important; max-height:420px;}
  .watch-pill{display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:700; border-radius:999px; padding:2px 9px; border:1px solid; white-space:nowrap; vertical-align:middle;}
  .watch-pill.yes{color:var(--ok); border-color:var(--ok); background:var(--ok-soft);}
  .watch-pill.no{color:var(--text-dim); border-color:var(--line);}
  .watch-pill.off{color:var(--flag); border-color:var(--flag);}
  #watchPillHead{margin-left:10px;}
  /* ---------- Checks monitor ---------- */
  .mon-svc{display:flex; gap:18px; flex-wrap:wrap; align-items:center; padding:10px 14px; background:var(--bg-panel); border:1px solid var(--line); border-radius:var(--radius); margin-bottom:14px; font-size:12.5px;}
  .mon-svc .k{color:var(--text-faint);} .mon-svc .v{font-family:var(--mono);}
  .mon-dot{width:9px; height:9px; border-radius:50%; display:inline-block; margin-right:6px; vertical-align:middle;}
  .mon-table td{vertical-align:top;}
  .mon-chk{display:inline-flex; align-items:center; gap:4px; font-size:11px; border:1px solid var(--line); border-radius:4px; padding:1px 6px; margin:0 4px 4px 0; white-space:nowrap;}
  .mon-chk.ok{color:var(--ok); border-color:var(--ok);} .mon-chk.issues{color:var(--flag); border-color:var(--flag);}
  .mon-chk.error{color:var(--orphan); border-color:var(--orphan); font-weight:700;} .mon-chk.skipped{color:var(--text-faint);}
  .mon-run{font-size:11px; color:var(--signal); font-weight:700;}
  #teamsChecksBox .table-wrap .scroll, #seasonChecksBox .table-wrap .scroll{min-height:0 !important; max-height:480px;}
  .mon-row{cursor:pointer;} .mon-row:hover{background:var(--bg-panel);} .mon-row.open{background:var(--bg-panel);}
  .mon-caret{color:var(--text-faint); font-size:11px;}
  .mon-detail > td{background:var(--bg-inset); padding:10px 14px 14px;}
  /* tables inside the monitor size to their content (no 320px minimum) */
  #monitorBody .table-wrap .scroll{min-height:0 !important;}
  .mon-detail .table-wrap .scroll{max-height:360px;}
  .mon-detail-box .tabbar .tab-btn{font-size:12px; padding:6px 10px;}

  /* ---------- Monitor: seasons layout ---------- */
  .mon-season{border:1px solid var(--line); border-radius:var(--radius); background:var(--bg-raised); margin-bottom:14px; overflow:hidden;}
  .mon-season-head{display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:12px 14px; background:var(--bg-panel); border-bottom:1px solid var(--line);}
  .mon-season-name{font-family:var(--display); font-size:17px; font-weight:700; margin-right:6px;}
  details.mon-sec{border-top:1px solid var(--line-soft);}
  details.mon-sec > summary{cursor:pointer; padding:9px 14px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; list-style:none;}
  details.mon-sec > summary::-webkit-details-marker{display:none;}
  details.mon-sec > summary::before{content:'\25b8'; color:var(--text-faint); font-size:11px;}
  details.mon-sec[open] > summary::before{content:'\25be';}
  .mon-sec-title{font-weight:700; font-size:13px;}
  .mon-sec-body{padding:4px 14px 12px 28px;}
  details.mon-match{border:1px solid var(--line-soft); border-radius:8px; margin:6px 0; background:var(--bg-inset);}
  details.mon-team{border:1px solid var(--line-soft); border-radius:8px; margin:6px 0;}
  .mon-actions{margin-left:auto; white-space:nowrap;}
  .mon-chk.paused{color:var(--text-faint); border-style:dashed;}
  .mon-chk.off{color:var(--text-faint); border-style:dotted;}
  .mon-cp{font-size:10.5px !important; padding:1px 6px !important;}
  /* ---------- Monitor filters ---------- */
  .flt-bar{display:flex; flex-direction:column; gap:6px; margin-bottom:10px; padding:10px 12px; background:var(--bg-panel); border:1px solid var(--line); border-radius:var(--radius);}
  .flt-row{display:flex; align-items:center; gap:6px; flex-wrap:wrap;}
  .flt-lbl{font-size:10.5px; font-weight:700; letter-spacing:0.05em; text-transform:uppercase; color:var(--text-faint); margin:0 2px 0 8px;}
  .flt-row .flt-lbl:first-child{margin-left:0;}
  .flt-chip{font:inherit; font-size:12px; color:var(--text); background:var(--bg-inset); border:1px solid var(--line); border-radius:999px; padding:3px 10px; cursor:pointer; display:inline-flex; gap:4px; align-items:center;}
  .flt-chip:hover{border-color:var(--signal);}
  .flt-chip.on{border-color:var(--signal); background:color-mix(in srgb, var(--signal) 18%, transparent); color:var(--signal); font-weight:700;}
  .flt-n{font-size:10.5px; color:var(--text-faint); font-weight:700;} .flt-n.bad{color:var(--orphan);}
  .flt-link{color:inherit; text-decoration:none; border-bottom:1px dotted var(--text-faint);} .flt-link:hover{color:var(--signal); border-bottom-color:var(--signal);}
  tr.alert-open td:first-child{box-shadow:inset 3px 0 0 var(--orphan);}
  /* ---------- Check editor ---------- */
  .ce-modal{position:fixed; inset:0; z-index:9998; background:rgba(0,0,0,0.55); display:flex; align-items:stretch; justify-content:center; padding:3vh 3vw;}
  .ce-box{flex:1; display:flex; flex-direction:column; background:var(--bg-raised); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden;}
  .ce-head{display:flex; align-items:center; gap:10px; padding:10px 12px; border-bottom:1px solid var(--line); background:var(--bg-panel); flex-wrap:wrap;}
  .ce-body{flex:1; display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); min-height:0;}
  .ce-body textarea{width:100%; height:100%; resize:none; border:none; border-right:1px solid var(--line); background:var(--bg-inset); color:var(--text); font-size:12.5px; line-height:1.5; padding:12px; tab-size:2; white-space:pre; overflow:auto;}
  .ce-side{overflow:auto; padding:12px;}
  .ce-foot{padding:6px 12px; border-top:1px solid var(--line);}
  /* ---------- Ignore rules ---------- */
  .ign-row td{opacity:0.5;} .ign-row td:last-child{opacity:1;}
  .ign-tag{font-size:10.5px; font-weight:700; color:var(--text-faint); border:1px dashed var(--text-faint); border-radius:4px; padding:0 5px;}
  .ign-count{font-size:11px; color:var(--text-faint); border:1px dashed var(--line); border-radius:4px; padding:0 6px;}
  .ign-menu{position:fixed; z-index:9999; width:380px; background:var(--bg-raised); border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 10px 30px rgba(0,0,0,0.5); padding:10px; display:flex; flex-direction:column; gap:6px;}
  .ign-menu-title{font-size:12px; font-weight:700; color:var(--text-dim); margin-bottom:2px;}
  .ign-menu button{text-align:left; font:inherit; font-size:12.5px; color:var(--text); background:var(--bg-panel); border:1px solid var(--line); border-radius:6px; padding:7px 9px; cursor:pointer;}
  .ign-menu button:hover{border-color:var(--signal); color:var(--signal);}
  /* ---------- Shared checks: commands panel ---------- */
  .sc-cmds{margin-top:14px; border:1px solid var(--line); border-radius:var(--radius); padding:10px 12px; background:var(--bg-panel);}
  .sc-cmds summary{cursor:pointer; font-weight:700; font-size:13px;}
  .sc-cmd-group{margin:10px 0 4px;}
  .sc-cmd-title{font-size:11px; font-weight:700; letter-spacing:0.05em; text-transform:uppercase; color:var(--text-faint); margin-bottom:6px;}
  .sc-cmd{display:grid; grid-template-columns:minmax(160px, 240px) 1fr auto; gap:10px; align-items:center; padding:4px 0; border-bottom:1px solid var(--line-soft);}
  .sc-cmd-lbl{font-size:12px; color:var(--text-dim);}
  .sc-cmd code{font-family:var(--mono); font-size:11.5px; background:var(--bg-inset); border:1px solid var(--line); border-radius:4px; padding:5px 8px; overflow-x:auto; white-space:nowrap; display:block; color:var(--text);}
  /* ---------- Masthead title for non-match views ---------- */
  /* Same slot the match header uses: on every other view its title (and
     subtitle) is mirrored up here and hidden in the page, so all views
     start their content at the same height. */
  .masthead-view{display:none;}
  .mh-view-logo{height:28px; width:auto; max-width:90px; object-fit:contain; vertical-align:middle; margin-right:10px;}
  body.hide-match-context .masthead-view{display:flex;}
  .masthead-view .match-meta{color:var(--text-faint); font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .title-mirrored{display:none !important;}
  /* Digital images: bigger team header */
  .di-team-head{display:flex; align-items:center; gap:14px; margin:6px 0 14px;}
  .di-team-head img{width:56px; height:56px; object-fit:contain;}
  .di-team-head .nm{font-family:var(--display); font-size:26px; font-weight:700; color:var(--text); line-height:1.1;}
  .di-team-head .cnt{font-size:13px; color:var(--text-faint); margin-top:3px;}
  /* ---------- Season player stats ---------- */
  .sps-head{display:flex; align-items:center; gap:14px; margin:4px 0 14px; padding:12px 14px; background:var(--bg-raised); border:1px solid var(--line); border-radius:10px;}
  .sps-head img.ph{width:64px; height:64px; object-fit:contain;}
  .sps-head .nm{font-family:var(--display); font-size:19px; font-weight:700; color:var(--text);}
  .sps-head .sub{font-size:12px; color:var(--text-faint);}
  .sps-head .ids{margin-left:auto; display:flex; flex-direction:column; gap:3px; align-items:flex-end; font-family:var(--mono); font-size:11px; color:var(--text-dim);}
  /* ---------- Info: competition structure tree ---------- */
  .cs-tree{border:1px solid var(--line); border-radius:var(--radius); overflow:hidden;}
  .cs-row{display:grid; grid-template-columns:minmax(180px, 1.2fr) minmax(150px, 0.8fr) minmax(220px, 1.3fr) minmax(200px, 1.2fr); gap:12px; align-items:center; padding:9px 14px; border-bottom:1px solid var(--line-soft); font-size:12.5px;}
  .cs-row:last-child{border-bottom:none;}
  .cs-row.head{background:var(--bg-inset); font-size:10.5px; font-weight:700; letter-spacing:0.06em; text-transform:uppercase; color:var(--text-faint);}
  .cs-row.lvl-0{background:var(--bg-panel);}
  .cs-row.lvl-1 .cs-name{font-weight:700;}
  .cs-row.lvl-2 .cs-name{padding-left:22px; position:relative; color:var(--text-dim);}
  .cs-row.lvl-2 .cs-name::before{content:''; position:absolute; left:8px; top:-9px; bottom:50%; width:9px; border-left:1px solid var(--line); border-bottom:1px solid var(--line);}
  .cs-kind{font-size:9.5px; font-weight:700; letter-spacing:0.06em; text-transform:uppercase; color:var(--text-faint); border:1px solid var(--line); border-radius:3px; padding:0 4px; margin-right:6px;}
  .cs-id{display:flex; align-items:center; gap:6px; min-width:0;}
  .cs-id code{font-family:var(--mono); font-size:11.5px; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0;}
  .cs-id .copy{flex:0 0 auto; font-size:10.5px; padding:1px 6px;}
  .cs-none{color:var(--text-faint); font-style:italic;}
  .cs-dates{font-family:var(--mono); font-size:11px; color:var(--text-faint);}
  .cs-xref{font-size:10.5px; margin-left:4px;}
  /* ---------- Teams: overview cards ---------- */
  .tov-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(360px, 1fr)); gap:16px;}
  .tov-card{background:var(--bg-raised); border:1px solid var(--line); border-radius:12px; overflow:hidden; display:flex; flex-direction:column; transition:transform 0.15s, border-color 0.15s;}
  .tov-card:hover{border-color:var(--text-faint); transform:translateY(-2px);}
  /* hero: stadium image (or team image) behind logo + name */
  .tov-hero{position:relative; min-height:150px; display:flex; align-items:flex-end; padding:14px 16px; background:linear-gradient(135deg, var(--bg-panel), var(--bg-inset)); background-size:cover; background-position:center;}
  .tov-hero::before{content:''; position:absolute; inset:0; background:linear-gradient(180deg, rgba(10,14,20,0.15) 0%, rgba(10,14,20,0.55) 45%, rgba(10,14,20,0.92) 100%);}
  .tov-hero > *{position:relative; z-index:2;}
  /* stacking: image (0) < gradient overlay (1) < logo/name (2) */
  .tov-hero::before{z-index:1;}
  .tov-hero > .tov-bg{z-index:0;}
  /* Stadium/team image at full strength on its own layer; logo, name and
     stadium sit on a frosted dark panel so they stay readable on any image
     (treatment B of the A/B test — the one shown on the even-position cards). */
  .tov-bg{position:absolute !important; inset:0; background-size:cover; background-position:center;}
  .tov-hero.has-bg{background:none;}
  /* bottom of the image melts into the card body instead of a hard edge */
  .tov-hero.has-bg::before{background:linear-gradient(180deg, rgba(10,14,20,0) 0%, rgba(10,14,20,0.08) 45%, rgba(19,25,34,0.75) 82%, var(--bg-raised) 100%);}
  .tov-hero.has-bg .tov-name, .tov-hero.has-bg .tov-stadium{text-shadow:0 1px 6px rgba(0,0,0,0.85);}
  /* Panel behind logo/name: no box edges any more — a dark, blurred glow
     that is densest behind the text and fades out radially into the
     stadium image. Drawn on a pseudo-element so the fade (mask) applies to
     the backdrop only, never to the logo/text themselves. */
  .tov-hero.has-bg .tov-top{position:relative; isolation:isolate; padding:12px 14px;}
  .tov-hero.has-bg .tov-top::before{content:''; position:absolute; inset:-18px -26px; z-index:-1; pointer-events:none;
    /* no dark radial fill any more — only a light blur behind the text */
    backdrop-filter:blur(2px); -webkit-backdrop-filter:blur(2px);
    -webkit-mask-image:radial-gradient(ellipse 62% 72% at 42% 50%, #000 35%, rgba(0,0,0,0.6) 65%, transparent 100%);
            mask-image:radial-gradient(ellipse 62% 72% at 42% 50%, #000 35%, rgba(0,0,0,0.6) 65%, transparent 100%);}
  .tov-hero .tov-imgsrc{position:absolute; top:8px; right:10px; font-size:10px; color:rgba(255,255,255,0.7); background:rgba(0,0,0,0.35); padding:2px 6px; border-radius:4px; letter-spacing:0.04em; text-transform:uppercase;}
  .tov-top{display:flex; align-items:center; gap:14px; min-width:0; width:100%;}
  .tov-logo{flex:0 0 auto; width:92px; height:92px; display:flex; align-items:center; justify-content:center; filter:drop-shadow(0 3px 8px rgba(0,0,0,0.6));}
  .tov-logo img{max-width:92px; max-height:92px; object-fit:contain;}
  /* team name: big, heavy, tight — the card's headline */
  .tov-name{font-family:var(--display); font-size:30px; font-weight:800; color:#fff; line-height:1.02; letter-spacing:-0.02em; text-transform:uppercase; text-shadow:0 2px 10px rgba(0,0,0,0.75), 0 1px 2px rgba(0,0,0,0.6);}
  .tov-sub{font-size:11.5px; color:rgba(255,255,255,0.72);}
  /* icon + stadium name on one line; a long name wraps inside its own column, the icon stays beside it */
  .tov-stadium{margin-top:6px; font-size:12.5px; color:rgba(255,255,255,0.85); display:flex; gap:6px; align-items:flex-start; flex-wrap:nowrap;}
  .tov-stadium .ic{flex:0 0 auto; line-height:1.35;}
  .tov-stadium .tx{min-width:0; line-height:1.35;}
  .tov-stadium .src{margin-left:4px;}
  .tov-stadium .src{font-size:10.5px; color:rgba(255,255,255,0.55);}
  /* inner fixture boxes */
  .tov-fixtures{display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:12px;}
  .tov-box{background:var(--bg-inset); border:1px solid var(--line-soft); border-radius:9px; padding:10px 11px; display:flex; flex-direction:column; gap:7px; min-width:0; position:relative;}
  .tov-box.res-W{border-top:3px solid var(--ok);} .tov-box.res-D{border-top:3px solid var(--text-faint);} .tov-box.res-L{border-top:3px solid var(--orphan);}
  .tov-box.next{border-top:3px solid var(--signal);}
  .tov-box.live{border-top:3px solid var(--accent-live);}
  .tov-box-head{display:flex; justify-content:space-between; align-items:center; gap:6px;}
  .tov-box-title{font-size:10px; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; color:var(--text-faint);}
  .tov-md{font-family:var(--mono); font-size:10.5px; font-weight:700; color:var(--text-dim); background:var(--bg-panel); border:1px solid var(--line); border-radius:4px; padding:1px 6px;}
  .tov-side{display:grid; grid-template-columns:20px 1fr auto; align-items:center; gap:7px; font-size:12.5px; color:var(--text-dim); min-width:0;}
  .tov-side img{width:20px; height:20px; object-fit:contain;}
  .tov-side .nm{min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .tov-side.me{color:var(--text); font-weight:700;}
  .tov-side .gl{font-family:var(--display); font-size:17px; font-weight:700; color:var(--text); font-variant-numeric:tabular-nums;}
  .tov-side.me .gl{color:var(--text);}
  .tov-foot{display:flex; justify-content:space-between; align-items:center; gap:6px; margin-top:2px;}
  .tov-when{font-size:11px; color:var(--text-faint); font-family:var(--mono);}
  .tov-res{font-size:10.5px; font-weight:800; border-radius:4px; padding:1px 7px;}
  .tov-res.W{color:var(--ok); background:var(--ok-soft);} .tov-res.D{color:var(--text-dim); background:var(--bg-panel);} .tov-res.L{color:var(--orphan); background:var(--orphan-soft);}
  .tov-kick{font-family:var(--display); font-size:16px; font-weight:700; color:var(--signal);}
  a.tov-box.tov-link{text-decoration:none; color:inherit; cursor:pointer; transition:border-color 0.15s, background 0.15s, transform 0.15s;}
  a.tov-box.tov-link:hover{background:var(--bg-panel); border-color:var(--text-faint); transform:translateY(-1px);}
  a.tov-box.tov-link:focus-visible{outline:2px solid var(--signal); outline-offset:1px;}
  .tov-map{color:rgba(255,255,255,0.9); text-decoration:none; border-bottom:1px dotted rgba(255,255,255,0.45);}
  .tov-map:hover{color:#fff; border-bottom-color:#fff;}
  .tov-links{display:flex; flex-wrap:wrap; gap:6px; margin-top:8px;}
  .tov-link{font:inherit; font-size:11.5px; font-weight:600; color:#fff; background:rgba(10,14,20,0.55); border:1px solid rgba(255,255,255,0.22); padding:3px 10px; cursor:pointer; backdrop-filter:blur(2px); transition:background 0.15s, border-color 0.15s;}
  .tov-link:hover{background:rgba(79,142,255,0.35); border-color:var(--signal);}
  /* ---------- Teams overview: v2 layout (first card only, for comparison) ---------- */
  .tov-v2{position:relative;}
  .tov-v2-tag{position:absolute; z-index:5; top:8px; right:10px; font-size:9.5px; font-weight:800; letter-spacing:0.08em; color:var(--signal); background:rgba(10,14,20,0.7); border:1px solid var(--signal); border-radius:4px; padding:2px 6px;}
  /* fixed-height hero; scrim from the left (where logo/text live), photo stays full on the right */
  .tov-v2 .tov-hero{height:170px; min-height:0; align-items:center;}
  .tov-v2 .tov-hero.has-bg::before{background:
      linear-gradient(90deg, rgba(10,14,20,0.92) 0%, rgba(10,14,20,0.78) 38%, rgba(10,14,20,0.25) 70%, rgba(10,14,20,0) 100%),
      linear-gradient(180deg, rgba(10,14,20,0) 55%, var(--bg-raised) 100%);}
  .tov-v2 .tov-hero.has-bg .tov-top::before{display:none;}
  .tov-v2 .tov-top{padding:0;}
  .tov-v2 .tov-logo{width:84px; height:84px;}
  .tov-v2 .tov-logo img{max-width:84px; max-height:84px;}
  .tov-v2 .tov-name{font-size:30px;}
  .tov-v2 .tov-stadium{font-size:13px; color:rgba(255,255,255,0.92);}
  .tov-v2 .tov-stadium .ic{color:rgba(255,255,255,0.75); display:inline-flex; margin-top:2px;}
  .tov-v2 .tov-map{border-bottom-color:rgba(255,255,255,0.35);}
  /* fixture boxes */
  .tov-v2 .tov-box-head{flex-wrap:nowrap;}
  .tov-v2 .tov-box-title{white-space:nowrap;}
  .tov-v2 .tov-md{white-space:nowrap;}
  .tov-v2 .tov-res{font-size:12px; padding:2px 9px;}
  .tov-v2 .tov-kick2{font-family:var(--display); font-size:17px; font-weight:700; color:var(--signal);}
  .tov-v2 .tov-kick2 .d{font-family:var(--mono); font-size:12px; font-weight:500; color:var(--text-dim);}
  /* actions bar */
  .tov-actions{display:grid; grid-template-columns:repeat(4, 1fr); border-top:1px solid var(--line-soft); margin-top:auto;}
  .tov-action{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; padding:10px 4px; font:inherit; font-size:11.5px; font-weight:600; color:var(--text-dim); background:none; border:none; border-right:1px solid var(--line-soft); cursor:pointer; transition:background 0.15s, color 0.15s;}
  .tov-action:last-child{border-right:none;}
  .tov-action:hover{background:var(--bg-panel); color:var(--signal);}
  .tov-action svg{opacity:0.9;}
  .tov-none{font-size:12px; color:var(--text-faint); font-style:italic; padding:6px 0;}
  .tov-live{color:var(--accent-live); font-weight:800; font-size:10.5px;}
  @media (max-width: 420px){ .tov-fixtures{grid-template-columns:1fr;} }
  /* ---------- Team selects with logos ---------- */
  /* Native <select> lists can't show images, so team selects get a
     look-alike button + list; the real <select> stays in the DOM (hidden)
     and keeps driving every existing handler. */
  select.lsel-native{position:absolute !important; width:1px !important; height:1px !important; opacity:0 !important; pointer-events:none !important; overflow:hidden; margin:0 !important;}
  .lsel{position:relative; display:inline-flex; vertical-align:middle; min-width:0;}
  .lsel-btn{display:flex; align-items:center; gap:8px; width:100%; min-width:0; text-align:left;
    background-color:var(--bg-inset); border:1.5px solid var(--line); border-radius:6px; color:var(--text); font:inherit; font-size:13px;
    padding:6px 28px 6px 8px; min-height:36px; cursor:pointer; transition:border-color 0.15s;
    background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" fill="none" stroke="%239AA6B4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat:no-repeat; background-position:right 10px center;}
  .lsel-btn.mono{font-family:var(--mono); font-size:12.5px;}
  .lsel-btn:hover{border-color:var(--text-faint);}
  .lsel-btn:focus{outline:2px solid var(--signal); outline-offset:1px;}
  .lsel-btn:disabled{opacity:0.45; cursor:not-allowed;}
  .lsel-btn .lsel-txt, .lsel-opt .lsel-txt{overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0;}
  .lsel-logo{flex:0 0 auto; width:20px; height:20px; display:inline-flex; align-items:center; justify-content:center;}
  .lsel-logo img{max-width:20px; max-height:20px; object-fit:contain;}
  .lsel-list{position:fixed; z-index:8500; min-width:160px; max-width:380px; max-height:340px; overflow:auto;
    background:var(--bg-panel); border:1px solid var(--line); border-radius:8px; box-shadow:0 12px 32px rgba(0,0,0,0.45); padding:4px; display:none;}
  .lsel.open .lsel-list{display:block;}
  .lsel-opt{display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:5px; cursor:pointer; font-size:13px; color:var(--text); white-space:nowrap;}
  .lsel-opt:hover, .lsel-opt.kb{background:var(--bg-raised);}
  .lsel-opt.sel{color:var(--signal); font-weight:600;}
  .lsel-opt.dis{opacity:0.45; cursor:not-allowed;}
  /* ---------- Match stats: filter / sort toolbar ---------- */
  .mst-toolbar{display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin:0 0 12px; padding:8px 10px; background:var(--bg-panel); border:1px solid var(--line); border-radius:var(--radius);}
  .mst-toolbar input[type=text]{flex:1; min-width:180px;}
  .mst-sortable{cursor:pointer; user-select:none;}
  .mst-sortable:hover{color:var(--text);}
  .mst-arrow{margin-left:3px; color:var(--signal); font-size:10px;}
  /* ---------- Shot map layout ---------- */
  .shotmap-layout{display:grid; grid-template-columns:clamp(220px, 20vw, 300px) minmax(0, 1fr); gap:22px; align-items:start;}
  .shotmap-side{position:sticky; top:12px; min-width:0;}
  .shotmap-side .desc{font-size:12px;}
  .shotmap-side .shot-stats-row{grid-template-columns:1fr 1fr; gap:8px; margin-top:12px;}
  .shotmap-side .mini-stat{padding:10px 12px;}
  .shotmap-side .mini-stat .ms-val{font-size:20px;}
  .shotmap-main{min-width:0; display:flex; flex-direction:column; align-items:center;}
  /* Pitch fits the window: never taller than the viewport minus the
     masthead/tabs, width follows from the 600x380 aspect ratio. */
  .shotmap-pitch{display:block; width:100%; height:auto; max-height:calc(100vh - 230px); max-width:calc((100vh - 230px) * 600 / 380); background:var(--bg-inset); border-radius:var(--radius);}
  .shotmap-main #goalFrameWrap{width:100%; max-width:calc((100vh - 230px) * 600 / 380);}
  .shotmap-goal{display:block; width:100%; height:auto; max-height:34vh; background:var(--bg-inset); border-radius:var(--radius);}
  @media (max-width: 1100px){
    .shotmap-layout{grid-template-columns:1fr;}
    .shotmap-side{position:static;}
    .shotmap-side .shot-stats-row{grid-template-columns:repeat(4, 1fr);}
  }
  .pv-side{display:block; font-size:10.5px; font-weight:500; font-family:var(--mono); line-height:1.2; margin-top:1px;}
  .pv-side.ok{color:var(--ok);} .pv-side.bad{color:var(--flag); font-weight:700;} .pv-side.none{color:var(--text-faint);}
  td.num-cell .pv-side{white-space:nowrap;}
  /* ---------- Match: Commentary ---------- */
  .cm-cols{display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:start;}
  @media (max-width: 1100px){ .cm-cols{grid-template-columns:1fr;} }
  .cm-col{background:var(--bg-raised); border:1px solid var(--line); border-radius:10px; overflow:hidden;}
  .cm-col-head{display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 12px; background:var(--bg-panel); border-bottom:1px solid var(--line); flex-wrap:wrap;}
  .cm-col-title{font-weight:700; font-size:13px; letter-spacing:0.04em; text-transform:uppercase;}
  .cm-list{max-height:72vh; overflow:auto;}
  .cm-item{display:grid; grid-template-columns:46px 1fr; gap:10px; padding:10px 12px; border-bottom:1px solid var(--line-soft);}
  .cm-item:last-child{border-bottom:none;}
  .cm-min{font-family:var(--display); font-size:16px; font-weight:700; color:var(--text); text-align:right;}
  .cm-min .ph{display:block; font-family:var(--mono); font-size:9.5px; font-weight:500; color:var(--text-faint);}
  .cm-meta{display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-bottom:3px;}
  .cm-type{font-size:10.5px; font-weight:700; letter-spacing:0.04em; text-transform:uppercase; border:1px solid var(--line); border-radius:4px; padding:0 6px; color:var(--text-dim);}
  .cm-type.goal{color:var(--ok); border-color:var(--ok);} .cm-type.card{color:var(--flag); border-color:var(--flag);}
  .cm-type.sub{color:var(--signal); border-color:var(--signal);} .cm-type.phase{color:var(--text); background:var(--bg-inset);}
  .cm-team{display:inline-flex; align-items:center; gap:4px; font-size:11.5px; color:var(--text-dim);}
  .cm-team img{width:16px; height:16px; object-fit:contain;}
  .cm-txt{font-size:13px; line-height:1.45; color:var(--text);}
  .cm-who{font-size:11px; color:var(--text-faint); margin-top:2px;}
  .cm-item.flagged{background:var(--flag-soft);}
  .cm-item.deleted .cm-txt{text-decoration:line-through; color:var(--text-faint);}
  .cm-table td{vertical-align:top;}
  .cm-table .cm-cell{width:44%;}
  .cm-table .cm-cell.empty{background:var(--bg-inset);}
  .cm-table .cm-cell.flagged{background:var(--flag-soft);}
  .cm-table .cm-cell.deleted .cm-txt{text-decoration:line-through; color:var(--text-faint);}
  .cm-when{font-family:var(--mono); font-size:11.5px; color:var(--text-dim);} .cm-when .hint{display:block; font-size:10px;}
  .cm-t{font-family:var(--display); font-weight:700; font-size:14px; color:var(--text); margin-right:2px;}
  .cm-st{font-size:11px; font-weight:700; border-radius:4px; padding:1px 7px; white-space:nowrap;}
  .cm-st.both{color:var(--ok); background:var(--ok-soft);} .cm-st.prov, .cm-st.sdp{color:var(--dup); background:var(--dup-soft);}
  /* ---------- Season player stats: compare ---------- */
  .pc-pickers{display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:14px; margin-bottom:12px;}
  .pc-side{background:var(--bg-raised); border:1px solid var(--line); border-radius:10px; padding:12px; display:flex; flex-direction:column; gap:8px; min-width:0; overflow:hidden;}
  .pc-side .raw-source-url{max-width:100%;}
  .pc-side select{width:100%;}
  .pc-side .ss-wrap{ width:100%; }
  .pc-side:has(.ss-wrap.open){ overflow:visible; }
  .pc-card{display:flex; align-items:center; gap:12px; min-height:72px;}
  .pc-card img.ph{width:72px; height:72px; object-fit:contain;}
  .pc-card .nm{font-family:var(--display); font-size:18px; font-weight:700;}
  .pc-card .tm{display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text-faint);}
  .pc-card .tm img{width:18px; height:18px; object-fit:contain;}
  .pc-table td.win{color:var(--ok); font-weight:700;}
  .pc-bar{height:4px; border-radius:2px; background:var(--line); position:relative; overflow:hidden; margin-top:3px;}
  .pc-bar span{position:absolute; top:0; bottom:0; background:var(--signal);}
  /* ---------- MD stats ---------- */
  .mds-src{font-size:11px; color:var(--text-faint); padding:6px 12px; border-bottom:1px solid var(--line-soft); word-break:break-all;}
  .mds-src.guess{color:var(--flag);}
  .mds-progress{height:6px; background:var(--bg-inset); border-radius:3px; overflow:hidden; margin:6px 0 12px;}
  .mds-progress span{display:block; height:100%; background:var(--signal); transition:width 0.2s;}
  .mds-row{display:grid; grid-template-columns:22px 40px 1fr auto auto; align-items:center; gap:8px; padding:6px 12px; border-bottom:1px solid var(--line-soft); font-size:12.5px; cursor:pointer;}
  .mds-row:hover{background:var(--bg-panel);}
  .mds-row .ph{width:40px; height:40px; display:flex; align-items:flex-end; justify-content:center;}
  .mds-row .ph img{max-width:40px; max-height:40px; object-fit:contain;}
  .mds-row .nm{font-weight:600; min-width:0;}
  .mds-row .nm .tm{display:flex; align-items:center; gap:4px; font-size:10.5px; font-weight:400; color:var(--text-faint);}
  .mds-row .nm .tm img{width:14px; height:14px; object-fit:contain;}
  .mds-row .vl{font-family:var(--display); font-size:17px; font-weight:700;}
  .mds-row .mt{font-size:10.5px; color:var(--text-faint); white-space:nowrap;}
  .mds-row .rk{color:var(--text-faint); text-align:right;}
  .mds-break{padding:4px 12px 10px 82px; font-size:11.5px; color:var(--text-dim); border-bottom:1px solid var(--line-soft); background:var(--bg-inset);}
  .mds-break div{display:flex; gap:8px; padding:2px 0;}
  .mds-break .md{font-family:var(--mono); color:var(--text-faint); min-width:52px; max-width:150px;}
  /* ---------- Season player leaders ---------- */
  .pl-row{display:grid; grid-template-columns:22px 52px 1fr auto; align-items:center; gap:10px; padding:6px 12px; border-bottom:1px solid var(--line-soft); font-size:12.5px;}
  .pl-row .rk{color:var(--text-faint); text-align:right; font-variant-numeric:tabular-nums;}
  .pl-row .ph{width:52px; height:52px; display:flex; align-items:flex-end; justify-content:center;}
  .pl-row .ph img{max-width:52px; max-height:52px; object-fit:contain;}
  .pl-row .nm{font-weight:600; text-transform:uppercase; min-width:0; line-height:1.2;}
  .pl-row .nm .tm{display:flex; align-items:center; gap:5px; font-size:11px; font-weight:400; text-transform:none; color:var(--text-faint); margin-top:2px;}
  .pl-row .nm .tm img{width:16px; height:16px; object-fit:contain;}
  .pl-row .vl{font-family:var(--mono); font-weight:700; font-variant-numeric:tabular-nums; font-size:13px;}
  /* #1: everything scaled up together — photo, name, team logo/name, value */
  .pl-row.first{grid-template-columns:22px 84px 1fr auto; padding-top:10px; padding-bottom:10px; border-bottom:2px solid var(--signal);}
  .pl-row.first .ph{width:84px; height:84px;} .pl-row.first .ph img{max-width:84px; max-height:84px;}
  .pl-row.first .nm{font-size:16px; font-weight:700; line-height:1.15;}
  .pl-row.first .nm .tm{font-size:13px; gap:6px; margin-top:4px;}
  .pl-row.first .nm .tm img{width:22px; height:22px;}
  .pl-row.first .vl{font-size:22px;}
  .pl-row.first .rk{font-size:15px;}
  .pl-row.first .nm, .pl-row.first .vl, .pl-row.first .rk{color:var(--signal);}
  /* ---------- Standings: qualification zones ---------- */
  .qual-cell{white-space:nowrap;}
  .qual-tag{display:inline-block; font-size:11px; font-weight:600; color:var(--qc); border:1px solid var(--qc); background:color-mix(in srgb, var(--qc) 14%, transparent); border-radius:4px; padding:1px 7px; margin:1px 0;}
  .qual-legend{display:flex; flex-wrap:wrap; gap:14px; padding:10px 4px 0; font-size:12px; color:var(--text-dim);}
  .qual-legend-item{display:inline-flex; align-items:center; gap:6px;}
  .qual-legend .sw{width:12px; height:12px; border-radius:3px; display:inline-block;}
  /* ---------- Season team stats: Leaders ---------- */
  .tl-row{display:grid; grid-template-columns:24px 26px 1fr auto; align-items:center; gap:8px; padding:6px 12px; border-bottom:1px solid var(--line-soft); font-size:12.5px;}
  .tl-row img{width:24px; height:24px; object-fit:contain;}
  .tl-row .rk{color:var(--text-faint); font-variant-numeric:tabular-nums; text-align:right;}
  .tl-row .nm{font-weight:600; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .tl-row .vl{font-family:var(--mono); font-weight:700; font-variant-numeric:tabular-nums;}
  .tl-row.first{padding-top:9px; padding-bottom:9px; border-bottom:2px solid var(--signal);}
  .tl-row.first img{width:34px; height:34px;}
  .tl-row.first{grid-template-columns:24px 36px 1fr auto;}
  .tl-row.first .nm, .tl-row.first .vl, .tl-row.first .rk{color:var(--signal); font-size:13.5px;}
  .tl-row.last{border-top:1px dashed var(--line); border-bottom:none; color:var(--text-dim);}
  .tl-row.last .vl, .tl-row.last .nm{color:var(--orphan);}
  .tl-gap{text-align:center; color:var(--text-faint); font-size:11px; letter-spacing:0.2em; padding:2px 0;}
  .tl-foot{display:flex; justify-content:flex-end; padding:8px 12px; border-top:1px solid var(--line-soft); margin-top:auto;}
  .tl-modal{position:fixed; inset:0; z-index:8800; background:rgba(10,14,20,0.82); display:flex; align-items:center; justify-content:center; padding:20px;}
  .tl-modal-card{width:min(520px, 100%); max-height:86vh; display:flex; flex-direction:column; background:var(--bg-raised); border:1px solid var(--line); border-radius:12px; box-shadow:0 24px 70px rgba(0,0,0,0.5); overflow:hidden;}
  .tl-modal-head{display:flex; justify-content:space-between; align-items:center; gap:10px; padding:12px 14px; border-bottom:1px solid var(--line); background:var(--bg-panel);}
  .tl-modal-body{overflow:auto;}
  /* ---------- Match: Leaders tab ---------- */
  .ld-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(340px, 1fr)); gap:14px;}
  .ld-card{background:var(--bg-raised); border:1px solid var(--line); border-radius:8px; overflow:hidden; display:flex; flex-direction:column;}
  .ld-head{display:flex; align-items:center; justify-content:space-between; gap:8px; padding:9px 12px; background:var(--bg-panel); border-bottom:1px solid var(--line);}
  .ld-title{font-size:12px; font-weight:700; letter-spacing:0.07em; text-transform:uppercase; color:var(--text);}
  .ld-title{flex:1 1 auto; min-width:0;}
  .ld-head > span:last-child{flex:0 0 auto; max-width:50%;}
  .ld-src{font-size:10.5px; color:var(--text-faint); font-family:var(--mono); text-align:right; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0;}
  .ld-src.guess{color:var(--flag);}
  .ld-row{display:grid; grid-template-columns:20px 40px 26px 1fr auto 34px; align-items:center; gap:8px; padding:5px 12px; border-bottom:1px solid var(--line-soft); font-size:12.5px;}
  .ld-row:last-child{border-bottom:none;}
  .ld-row .rk{color:var(--text-faint); font-variant-numeric:tabular-nums;}
  .ld-row .ph{width:40px; height:40px; display:flex; align-items:flex-end; justify-content:center;}
  .ld-row .ph img{max-width:40px; max-height:40px; object-fit:contain;}
  .ld-row .no{font-family:var(--mono); color:var(--text-dim); text-align:right;}
  .ld-row .nm{font-weight:600; text-transform:uppercase; letter-spacing:0.01em; min-width:0; line-height:1.25; overflow-wrap:anywhere;}
  .ld-row .nm .tm{display:block; font-size:10.5px; font-weight:400; text-transform:none; color:var(--text-faint);}
  .ld-row .vl{font-family:var(--mono); font-weight:700; font-variant-numeric:tabular-nums; text-align:right; white-space:nowrap;}
  .ld-row .vl .pv{display:block; font-size:10.5px; font-weight:500;}
  .ld-row .vl .pv.ok{color:var(--ok);}
  .ld-row .vl .pv.bad{color:var(--flag);}
  .ld-row .mn{font-family:var(--mono); color:var(--text-faint); text-align:right; font-size:11.5px;}
  .ld-row.first{padding-top:9px; padding-bottom:9px; border-bottom:2px solid var(--signal);}
  .ld-row.first .ph{width:52px; height:52px;} .ld-row.first .ph img{max-width:52px; max-height:52px;}
  .ld-row.first{grid-template-columns:20px 52px 26px 1fr auto 34px;}
  .ld-row.first .nm, .ld-row.first .no, .ld-row.first .vl, .ld-row.first .rk{color:var(--signal);}
  .ld-row.diff{background:var(--flag-soft);}
  .ld-legend{display:grid; grid-template-columns:20px 40px 26px 1fr auto 34px; gap:8px; padding:4px 12px; font-size:10px; color:var(--text-faint); text-transform:uppercase; letter-spacing:0.05em; border-bottom:1px solid var(--line-soft);}
  .ld-legend span:nth-child(5), .ld-legend span:nth-child(6){text-align:right;}
  .ld-empty{padding:14px 12px; font-size:12px; color:var(--text-faint);}
  .ld-empty select{margin-top:6px; width:100%;}
  .ld-remove{background:none; border:none; color:var(--text-faint); cursor:pointer; font-size:14px; padding:0 2px;}
  /* ---------- Summary: Score / Status cards ---------- */
  .sc-card, .st-card{display:flex; flex-direction:column; gap:12px; padding:16px 16px 14px; min-width:0;}
  .sc-head{display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap;}
  .sc-title{font-size:11px; font-weight:600; letter-spacing:0.08em; text-transform:uppercase; color:var(--text-dim);}
  .sc-verdict{display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:600; padding:3px 9px; border-radius:999px; border:1px solid var(--line); color:var(--text-dim); background:var(--bg-inset); white-space:nowrap;}
  .sc-verdict .dot{width:6px; height:6px; border-radius:50%; background:currentColor;}
  .sc-verdict.ok{color:var(--ok); border-color:rgba(45,189,110,0.45); background:var(--ok-soft);}
  .sc-verdict.orphan{color:var(--orphan); border-color:rgba(229,72,77,0.45); background:var(--orphan-soft);}
  .sc-verdict.neutral .dot{background:var(--text-faint);}
  .sc-hero{display:flex; flex-direction:column; gap:2px;}
  .sc-hero-num{font-family:var(--display); font-size:40px; font-weight:600; line-height:1; letter-spacing:-0.5px; color:var(--text); font-variant-numeric:tabular-nums;}
  .sc-card.ok .sc-hero-num{color:var(--ok);}
  .sc-card.orphan .sc-hero-num{color:var(--text);}
  .sc-hero-sub{font-size:11.5px; color:var(--text-faint);}
  .st-hero{font-size:26px; letter-spacing:0.02em;}
  .st-hero.live, .st-v.live{color:var(--accent-live);}
  .sc-ledger{display:flex; flex-direction:column; border-top:1px solid var(--line-soft);}
  .sc-row{display:grid; grid-template-columns:1fr auto 18px; align-items:center; gap:10px; padding:6px 6px; border-bottom:1px solid var(--line-soft); font-size:12.5px;}
  .sc-row:last-child{border-bottom:none;}
  .sc-src{color:var(--text-dim); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .sc-val{font-family:var(--mono); font-weight:600; font-variant-numeric:tabular-nums; color:var(--text);}
  .sc-mark{font-size:12px; font-weight:700; text-align:center;}
  .sc-mark.ok{color:var(--ok);}
  .sc-mark.orphan{color:var(--orphan);}
  .sc-mark.na{color:var(--text-faint);}
  .sc-row.sc-diff{background:var(--orphan-soft); border-radius:4px;}
  .sc-row.sc-diff .sc-src, .sc-row.sc-diff .sc-val{color:var(--orphan);}
  .sc-row.sc-na .sc-val{color:var(--text-faint); font-weight:400;}
  .sc-ref-tag{font-size:9.5px; font-weight:700; letter-spacing:0.06em; text-transform:uppercase; color:var(--text-faint); border:1px solid var(--line); border-radius:3px; padding:0 4px; margin-left:4px; vertical-align:1px;}
  .sc-checks{display:flex; flex-direction:column; gap:4px; margin-top:auto; padding-top:10px; border-top:1px dashed var(--line);}
  .sc-check{display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:11.5px; padding:0 6px;}
  .sc-check-pair{color:var(--text-dim);}
  .sc-arrow{color:var(--text-faint);}
  .sc-check-res{font-weight:600;}
  .sc-check.ok .sc-check-res{color:var(--ok);}
  .sc-check.orphan .sc-check-res{color:var(--orphan);}
  .sc-check.orphan .sc-check-pair{color:var(--text);}
  .st-blocks{display:flex; flex-direction:column; gap:10px; border-top:1px solid var(--line-soft); padding-top:10px;}
  .st-block{display:flex; flex-direction:column; gap:4px;}
  .st-src{font-size:11px; font-weight:600; color:var(--text-dim);}
  .st-fields{display:flex; flex-wrap:wrap; gap:4px;}
  .st-field{display:inline-flex; align-items:baseline; gap:5px; background:var(--bg-inset); border:1px solid var(--line-soft); border-radius:5px; padding:2px 7px; max-width:100%;}
  .st-k{font-size:10.5px; color:var(--text-faint);}
  .st-v{font-family:var(--mono); font-size:12px; font-weight:500; color:var(--text); overflow-wrap:anywhere;}
  .st-missing{font-size:11.5px; color:var(--text-faint); font-style:italic;}
  .stat-card.hero .label{font-size:13px; color:var(--text-dim);}
  .stat-card.hero.dim .num{color:var(--text-faint);}

  .section{margin-bottom:28px;}
  .section h3{
    font-family:var(--display);
    font-size:16.5px;
    font-weight:600;
    letter-spacing:0.1px;
    margin:0 0 4px;
    display:flex;
    align-items:center;
    gap:9px;
  }
  .section .desc{
    font-size:12.5px;
    color:var(--text-faint);
    margin:0 0 12px;
    max-width:720px;
  }
  .dq-collapsible-header{cursor:pointer; user-select:none;}
  .dq-collapsible-header:hover{opacity:0.82;}
  .dq-collapsible-arrow{display:inline-block; width:12px; flex-shrink:0; color:var(--text-faint); font-size:12px; transition:transform 0.15s ease;}
  .dq-collapsible-header.open .dq-collapsible-arrow{transform:rotate(90deg);}
  .dq-collapsible-body{margin-top:4px;}

  .badge{
    display:inline-flex;
    align-items:center;
    gap:5px;
    padding:2px 8px;
    border-radius:100px;
    font-size:10.5px;
    font-weight:700;
    letter-spacing:0.2px;
    white-space:nowrap;
  }
  .badge.ok{color:var(--ok); background:var(--ok-soft); border:1px solid var(--ok);}
  .badge.flag{color:var(--flag); background:var(--flag-soft); border:1px solid var(--flag);}
  .badge.dup{color:var(--dup); background:var(--dup-soft); border:1px solid var(--dup);}
  .badge.orphan{color:var(--orphan); background:var(--orphan-soft); border:1px solid var(--orphan);}
  .badge.neutral{color:var(--text-faint); background:var(--bg-inset); border:1px solid var(--line);}

  table{
    width:100%;
    border-collapse:collapse;
    font-size:12.5px;
  }
  thead th{
    text-align:left;
    font-size:11px;
    font-weight:700;
    color:var(--text-faint);
    letter-spacing:0.2px;
    padding:8px 10px;
    border-bottom:1px solid var(--line);
    white-space:nowrap;
  }
  tbody td{
    padding:8px 10px;
    border-bottom:1px solid var(--line-soft);
    vertical-align:top;
  }
  tbody tr:hover{background:var(--bg-panel);}
  .mono{font-family:var(--mono); font-size:11.5px; color:var(--text-dim);}
  .num-cell{font-family:var(--mono); font-variant-numeric:tabular-nums;}

  .id-panel{border:1px solid var(--line); border-radius:var(--radius); background:var(--bg-inset); overflow:hidden;}
  .standings-table table{font-size:13px;}
  .standings-table th{font-size:11px; text-transform:uppercase; letter-spacing:0.04em; color:var(--text-faint);}
  .standings-rank{font-family:var(--display); font-size:16px; color:var(--text-dim); text-align:center; width:32px;}
  .standings-team-cell{display:flex; align-items:center; gap:9px; padding:8px 10px !important; white-space:nowrap;}
  .standings-logo{width:22px; height:22px; object-fit:contain; flex-shrink:0;}
  .standings-logo-blank{display:inline-block; background:var(--bg-inset); border-radius:3px;}
  .standings-team-name{font-weight:600; font-size:13.5px; color:var(--text);}
  .standings-pts{font-family:var(--display); font-size:16px; font-weight:700; color:var(--text); text-align:center;}
  .standings-diff-cell{text-align:center;}
  .form-strip{display:inline-flex; gap:3px; vertical-align:middle;}
  .form-pill{display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; border-radius:4px; font-size:10.5px; font-weight:700; color:#fff; font-family:var(--mono);}
  .form-pill.W{background:#2e9e5a;} .form-pill.D{background:#8a8f98;} .form-pill.L{background:#d0453f;} .form-pill.X{background:transparent; color:var(--text-faint); border:1px dashed var(--line);}
  .standings-diff-cell.bad{color:var(--orphan); font-weight:700; background:rgba(229,72,77,0.1); border-radius:4px;}
  .id-row{display:flex; align-items:center; gap:12px; padding:10px 14px; border-bottom:1px solid var(--line-soft);}
  .id-row:last-child{border-bottom:none;}
  .id-row-label{width:150px; flex-shrink:0; font-weight:600; font-size:12.5px; color:var(--text-dim);}
  .id-row-value{flex:1; font-size:13px; color:var(--text); word-break:break-all;}
  .table-wrap{
    border:1px solid var(--line);
    border-radius:var(--radius);
    overflow:hidden;
    background:var(--bg-raised);
  }
  .table-wrap .scroll{max-height:calc(100vh - 260px); min-height:320px; overflow:auto;}
  .standings-table .scroll{max-height:none; overflow-x:auto; overflow-y:visible;}
  .table-toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:8px 10px;
    border-bottom:1px solid var(--line);
    background:var(--bg-panel);
  }
  .table-toolbar .count{font-size:11.5px; color:var(--text-faint);}
  .table-empty{
    padding:26px 16px;
    text-align:center;
    color:var(--text-faint);
    font-size:12.5px;
  }

  .filter-bar{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
    padding:9px 10px;
    border-bottom:1px solid var(--line);
    background:var(--bg-panel);
  }
  .fbtn{
    padding:5px 10px;
    border-radius:100px;
    border:1px solid var(--line);
    background:var(--bg-inset);
    color:var(--text-dim);
    font:inherit;
    font-size:11.5px;
    font-weight:600;
    cursor:pointer;
    white-space:nowrap;
  }
  .fbtn:hover{color:var(--text);}
  .fbtn.active{background:var(--text); color:var(--bg); border-color:var(--text);}
  .filter-bar .fsearch{
    margin-left:auto;
    background:var(--bg-inset);
    border:1px solid var(--line);
    border-radius:4px;
    color:var(--text);
    font:inherit;
    font-family:var(--mono);
    font-size:12px;
    padding:6px 9px;
    width:220px;
  }
  .filter-bar .fsearch:focus{outline:none; border-color:var(--text-faint);}
  /* .fsearch's own `background` shorthand (above) wipes out the base
     select{} rule's custom arrow image for the <select> elements that
     also carry this class (the text-input .fsearch fields aren't
     affected, since this only matches an actual <select> tag) — restore
     it here rather than let those combos end up with no dropdown
     indicator at all. */
  select.fsearch{
    appearance:none;
    -webkit-appearance:none;
    -moz-appearance:none;
    background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" fill="none" stroke="%239AA6B4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat:no-repeat;
    background-position:right 8px center;
    padding-right:24px;
    cursor:pointer;
  }
  .filter-bar .fcount{font-size:11.5px; color:var(--text-faint); white-space:nowrap;}
  .cell-stack{display:flex; flex-direction:column; gap:2px;}
  .cell-stack .sub{color:var(--text-faint); font-size:11px;}

  .matchbrowser-head{
    display:flex;
    align-items:baseline;
    gap:12px;
    margin-bottom:12px;
  }
  .matchbrowser-head .match-name{font-size:20px;}
  .matchbrowser-filters{
    display:flex;
    gap:8px;
    margin-bottom:10px;
  }
  .matchbrowser-filters select{cursor:pointer;}
  .matchbrowser-search{
    padding:10px 12px;
    font-size:13px;
  }
  .mini-spinner{
    display:inline-block;
    width:13px;
    height:13px;
    border-radius:50%;
    border:2px solid var(--line);
    border-top-color:var(--text-dim);
    animation:spin 0.7s linear infinite;
    flex-shrink:0;
  }
  @keyframes spin{ to{ transform:rotate(360deg); } }
  .kama-prewarm-banner{
    display:flex;
    align-items:center;
    gap:9px;
    padding:8px 12px;
    margin:8px 0;
    border:1px solid var(--signal);
    border-radius:var(--radius);
    background:var(--signal-soft);
    color:var(--signal);
    font-size:12.5px;
    font-weight:600;
  }
  .kama-prewarm-spinner{
    width:13px;
    height:13px;
    border-radius:50%;
    border:2px solid rgba(79,142,255,0.3);
    border-top-color:var(--signal);
    flex-shrink:0;
    animation:spin 0.7s linear infinite;
  }
  #matchBrowserList.mb-locked{opacity:0.5; pointer-events:none;}
  .matchbrowser-actionbar{
    display:flex;
    align-items:center;
    gap:14px;
    flex-wrap:wrap;
    padding:10px 12px;
    background:var(--bg-panel);
    border:1px solid var(--line);
    border-radius:var(--radius) var(--radius) 0 0;
    border-bottom:none;
  }
  .matchbrowser-actionbar .btn{width:auto; padding:8px 16px;}
  .mr-selectall{
    display:flex;
    align-items:center;
    gap:6px;
    font-size:12px;
    color:var(--text-dim);
    white-space:nowrap;
    cursor:pointer;
  }
  .mr-selectall input{cursor:pointer;}
  .matchbrowser-list{
    max-height:calc(100vh - 280px);
    overflow-y:auto;
    border:1px solid var(--line);
    border-radius:0 0 var(--radius) var(--radius);
    background:var(--bg-raised);
  }
  .match-row{
    display:flex;
    align-items:center;
    gap:12px;
    padding:10px 14px;
    border-bottom:1px solid var(--line-soft);
    cursor:pointer;
    font-size:12.5px;
  }
  .match-row:last-child{border-bottom:none;}
  .match-row:hover{background:var(--bg-panel);}
  .match-row .mr-check{flex-shrink:0; cursor:pointer; width:15px; height:15px;}
  .match-row .mr-day{color:var(--text-faint); width:100px; flex-shrink:0; font-size:11px;}
  .match-row .mr-date{color:var(--text-faint); width:110px; flex-shrink:0; font-family:var(--mono); font-size:11px;}
  .match-row .mr-teams{flex:1; color:var(--text); font-weight:600; min-width:0;}
  .match-row .mr-score{color:var(--text-dim); font-weight:700; font-family:var(--mono); flex-shrink:0; width:56px; text-align:right;}
  .match-row .mr-open-btn{flex-shrink:0; margin-left:4px; padding:3px 8px; font-size:11px;}
  .mr-links{display:flex; flex-wrap:wrap; gap:4px; align-items:center; flex-shrink:0; max-width:340px;}
  .mr-links-label{font-size:9.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--text-faint); margin-right:1px;}
  .mr-link-badge{font-size:10.5px; font-weight:600; padding:1px 7px; border-radius:100px; white-space:nowrap; text-decoration:none; border:1px solid var(--line-soft); color:var(--text-dim, var(--text)); background:transparent;}
  a.mr-link-badge{color:#7fb0ff; border-color:rgba(80,140,255,0.35);}
  a.mr-link-badge:hover{background:rgba(80,140,255,0.16);}
  .mr-link-badge.mr-bc-int{border-style:dashed;}
  .mr-ticket-badge{flex-shrink:0; font-size:10.5px; font-weight:700; padding:2px 8px; border-radius:100px; white-space:nowrap; background:rgba(80,140,255,0.16); color:#7fb0ff; text-decoration:none; border:1px solid rgba(80,140,255,0.35);}
  .mr-ticket-badge:hover{background:rgba(80,140,255,0.28);}
  .mr-kama-badge{flex-shrink:0; font-size:10.5px; font-weight:700; padding:2px 7px; border-radius:100px; white-space:nowrap;}
  .mr-kama-badge.mr-kama-ok{background:var(--ok-soft); color:var(--ok);}
  .mr-kama-badge.mr-kama-fail{background:var(--orphan-soft); color:var(--orphan); cursor:help;}
  .resolved-ids{
    margin-top:8px;
    padding:8px 10px;
    border:1px solid var(--line);
    border-radius:var(--radius);
    background:var(--bg-inset);
    font-size:11px;
  }
  .resolved-ids-title{font-weight:700; color:var(--text-faint); text-transform:uppercase; letter-spacing:0.4px; font-size:10px; margin-bottom:5px;}
  .resolved-ids-row{display:flex; justify-content:space-between; gap:8px; padding:2px 0; color:var(--text-dim);}
  .resolved-ids-row span:first-child{flex-shrink:0;}
  .resolved-ids-row span:last-child{color:var(--text); text-align:right; min-width:0; overflow-wrap:anywhere;}
  .resolved-ids-error{margin-top:6px; padding-top:6px; border-top:1px solid var(--line-soft); color:var(--orphan); overflow-wrap:anywhere;}
  .mr-ids{flex-shrink:0; font-size:10px; color:var(--text-faint); font-family:var(--mono); white-space:nowrap;}
  .match-row.mr-upcoming .mr-score{color:var(--text-faint); font-weight:500;}
  .match-row.mr-selected{background:var(--ok-soft);}
  .match-row.mr-live{background:var(--accent-live-soft);}
  .match-row.mr-live:hover{background:var(--accent-live-soft); filter:brightness(1.15);}
  .match-row.mr-live.mr-selected{background:var(--ok-soft);}
  .mr-live-badge{
    display:inline-flex;
    align-items:center;
    gap:5px;
    padding:2px 8px;
    border-radius:100px;
    font-size:10.5px;
    font-weight:700;
    letter-spacing:0.3px;
    color:var(--accent-live);
    background:var(--bg);
    border:1px solid var(--accent-live);
    flex-shrink:0;
  }
  .mr-live-badge .dot{width:6px; height:6px; border-radius:50%; background:var(--accent-live); flex-shrink:0; animation:pulse 1.6s ease-in-out infinite;}

  .matchday-row{ cursor:pointer; }
  .matchday-row:hover{ background:var(--bg-panel); }

  .expand-btn{
    background:transparent;
    border:1px solid var(--line);
    color:var(--text-faint);
    border-radius:4px;
    font:inherit;
    font-size:11px;
    padding:3px 7px;
    cursor:pointer;
  }
  .expand-btn:hover{color:var(--text);}
  .raw-json{
    display:none;
    margin-top:6px;
    padding:9px 10px;
    background:var(--bg-inset);
    border:1px solid var(--line);
    border-radius:4px;
    font-family:var(--mono);
    font-size:11px;
    color:var(--text-dim);
    white-space:pre-wrap;
    word-break:break-all;
    max-height:260px;
    overflow:auto;
  }
  .raw-json.open{display:block;}

  .p-avatar{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:var(--bg-inset);
    border:1px solid var(--line);
    overflow:hidden;
    flex-shrink:0;
    color:var(--text-dim);
    font-weight:700;
  }
  .p-avatar img{width:100%; height:100%; object-fit:cover; display:block;}
  .p-avatar-num{width:100%; height:100%; display:flex; align-items:center; justify-content:center;}
  .p-avatar-num-only{display:flex; align-items:center; justify-content:center;}
  .p-avatar-blank{background:transparent; border-color:transparent;}

  .lineups-grid{display:grid; grid-template-columns:1fr 1fr; gap:18px;}
  @media (max-width:860px){ .lineups-grid:not(.lineups-wrap .lineups-grid){grid-template-columns:1fr;} }
  .lineup-col{
    border:1px solid var(--line);
    border-radius:var(--radius);
    background:var(--bg-panel);
    padding:14px;
  }
  .lineup-head{display:flex; align-items:center; gap:9px; margin-bottom:6px;}
  .lh-logo{width:26px; height:26px; object-fit:contain; flex-shrink:0;}
  .lh-team{font-family:var(--display); font-weight:600; font-size:16px;}
  .lineup-col.home .lh-team{color:var(--signal);}
  .lineup-col.away .lh-team{color:var(--flag);}
  .lh-formation{margin-left:auto; font-size:12px; color:var(--text-faint); font-family:var(--mono);}
  .lineup-coach{font-size:12px; color:var(--text-dim); margin-bottom:10px;}
  .lineup-coach b{color:var(--text);}
  .formation-svg{width:100%; height:auto; display:block; margin-bottom:14px; background:var(--bg-inset); border-radius:6px;}
  .bench-title{font-size:11px; font-weight:700; letter-spacing:0.4px; text-transform:uppercase; color:var(--text-faint); margin-bottom:6px;}
  .bench-list{display:flex; flex-direction:column; gap:6px;}
  .bench-item{display:flex; align-items:center; gap:8px; font-size:12.5px; padding:4px 0;}
  .bench-avatar{
    position:relative;
    width:26px; height:26px;
    border-radius:50%;
    background:var(--bg-inset);
    border:1px solid var(--line);
    flex-shrink:0;
    display:flex; align-items:center; justify-content:center;
    overflow:hidden;
  }
  .bench-avatar img{width:100%; height:100%; object-fit:cover;}
  .bench-num{font-size:10px; font-weight:700; color:var(--text-dim);}
  .bench-name{flex:1; color:var(--text);}
  .bench-role{color:var(--text-faint); font-size:11px;}

  .story-teams{
    padding:20px 24px;
    margin-bottom:12px;
    background:var(--bg-panel);
    border:1px solid var(--line);
    border-radius:var(--radius);
  }
  .ssv2{display:grid; grid-template-columns:1fr auto 1fr; align-items:start; gap:20px;}
  .ssv2-side{display:flex; flex-direction:column; gap:14px; min-width:0;}
  .ssv2-side-home{align-items:flex-start;}
  .ssv2-side-away{align-items:flex-end;}
  .ssv2-team-head{display:flex; align-items:center; gap:10px;}
  .ssv2-side-away .ssv2-team-head{flex-direction:row-reverse; text-align:right;}
  .ssv2-logo{width:36px; height:36px; object-fit:contain; flex-shrink:0;}
  .ssv2-team-name{font-family:var(--display); font-weight:700; font-size:16px; color:var(--text);}
  .ssv2-team-tag{font-size:10px; font-weight:700; letter-spacing:0.5px; text-transform:uppercase;}
  .ssv2-tag-home{color:var(--signal);}
  .ssv2-tag-away{color:var(--flag);}
  .ssv2-events{display:flex; flex-direction:column; gap:7px; width:100%;}
  .ssv2-row{display:flex; align-items:center; gap:7px; font-size:12px; color:var(--text-dim); white-space:nowrap;}
  .ssv2-row.ssv2-right{flex-direction:row-reverse;}
  .ssv2-icon{flex-shrink:0; width:16px; text-align:center;}
  .ssv2-minute{flex-shrink:0; font-family:var(--mono); color:var(--text-faint); font-size:11px;}
  .ssv2-text{overflow:hidden; text-overflow:ellipsis;}
  .ssv2-center{
    display:flex;
    flex-direction:column;
    align-items:center;
    padding:0 16px;
    flex-shrink:0;
  }
  .ssv2-score{font-family:var(--mono); font-weight:700; font-size:34px; line-height:1; white-space:nowrap;}
  .ssv2-score-home{color:var(--signal);}
  .ssv2-score-away{color:var(--flag);}
  .ssv2-score-sep{color:var(--text-faint); margin:0 8px;}
  .ssv2-shootout{font-size:11px; color:var(--text-faint); margin-top:4px;}
  .ssv2-status{font-size:10.5px; font-weight:700; letter-spacing:0.6px; text-transform:uppercase; color:var(--text-faint); margin-top:6px;}

  .story-timeline{max-height:640px; overflow-y:auto; border:1px solid var(--line); border-radius:var(--radius); background:var(--bg-raised); position:relative; padding-left:8px;}
  .story-timeline::before{content:""; position:absolute; left:34px; top:8px; bottom:8px; width:1px; background:var(--line);}
  .story-item{
    position:relative;
    padding:11px 14px 11px 48px;
    border-bottom:1px solid var(--line-soft);
    font-size:12.5px;
  }
  .story-node{position:absolute; left:29px; top:20px; width:11px; height:11px; border-radius:50%; background:var(--text-faint); border:2px solid var(--bg-raised); z-index:1;}
  .story-node.tier-goal{background:#d9b64e;}
  .story-node.tier-card-yellow{background:#d9b64e; border-radius:2px;}
  .story-node.tier-card-red{background:var(--orphan); border-radius:2px;}
  .story-node.tier-sub{background:var(--ok);}
  .story-item-row{display:flex; align-items:center; gap:12px; flex-wrap:wrap;}
  .story-item:last-child{border-bottom:none;}
  .story-item:hover{background:var(--bg-panel);}
  .story-item .story-minute{width:52px; flex-shrink:0; font-family:var(--display); font-size:22px; line-height:1; color:var(--text-faint); text-align:right;}
  .story-item .story-minute.wallclock{width:auto; min-width:52px; font-family:var(--mono); font-size:11px; font-weight:600;}
  .story-item.tone-home .story-minute{color:var(--signal);}
  .story-item.tone-away .story-minute{color:var(--flag);}
  .story-item .story-icon{flex-shrink:0;}
  .story-team-logo{width:20px; height:20px; object-fit:contain; flex-shrink:0;}
  .story-team-logo-blank{display:inline-block;}
  .story-avatar-pair{display:inline-flex; align-items:center; gap:5px; flex-shrink:0;}
  .story-avatar-arrow{color:var(--text-faint); font-size:13px; flex-shrink:0;}
  .story-avatar-slot.off{opacity:0.75;}
  .story-item .story-label{width:120px; flex-shrink:0; font-weight:600; color:var(--text);}
  .story-item .story-desc{flex:1; color:var(--text-dim); min-width:0; font-size:14.5px; font-weight:500;}
  .story-item-row .expand-btn{flex-shrink:0; margin-left:auto;}
  .story-item-row .raw-json{flex-basis:100%; width:100%; margin-left:0; order:99;}
  .story-item.story-other{opacity:0.7;}
  .story-item.story-other .story-label{font-weight:500; color:var(--text-faint);}

  .story-tier-bar{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:7px;
    padding:9px 10px;
    margin-bottom:10px;
    border:1px solid var(--line);
    border-radius:var(--radius);
    background:var(--bg-panel);
  }
  .tier-pill{
    padding:5px 10px;
    border-radius:100px;
    border:1px solid var(--line);
    background:var(--bg-inset);
    color:var(--text-faint);
    font:inherit;
    font-size:11.5px;
    font-weight:600;
    cursor:pointer;
    white-space:nowrap;
  }
  .tier-pill:hover{color:var(--text);}
  .tier-pill.active{background:var(--signal-soft); color:var(--signal); border-color:var(--signal);}
  .tier-pill .tier-count{opacity:0.75; font-weight:500;}
  .tier-pill.tier-empty{opacity:0.45;}
  .tier-reset{
    margin-left:auto;
    padding:5px 12px;
    border-radius:100px;
    border:1px solid var(--line);
    background:transparent;
    color:var(--text-dim);
    font:inherit;
    font-size:11.5px;
    font-weight:600;
    cursor:pointer;
    white-space:nowrap;
  }
  .tier-reset:hover{color:var(--text); border-color:var(--text-dim);}

  .diff-table{width:100%; font-size:11.5px; margin:4px 0;}
  .diff-table th{text-align:left; padding:5px 8px; color:var(--text-faint); font-size:10.5px; border-bottom:1px solid var(--line);}
  .diff-table td{padding:5px 8px; border-bottom:1px solid var(--line-soft); vertical-align:top;}
  .diff-table tr.diff-row{background:var(--flag-soft);}
  .diff-table tr.diff-row td:first-child{color:var(--flag); font-weight:700;}
  .diff-table tr.same-row{opacity:0.55;}
  .dq-compare-row td{background:var(--bg-inset); padding:10px 14px;}

  .req-item{
    border:1px solid var(--line);
    border-radius:4px;
    padding:8px 10px;
    margin-bottom:8px;
    background:var(--bg-inset);
  }
  .req-item-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    margin-bottom:5px;
  }
  .req-item-head .name{font-weight:600; font-size:12px;}
  .req-item .req-url{
    font-family:var(--mono);
    font-size:11px;
    color:var(--text-dim);
    word-break:break-all;
    line-height:1.5;
  }

  .rawdata-record{
    border:1px solid var(--line);
    border-radius:4px;
    padding:8px 10px;
    margin-bottom:8px;
    background:var(--bg-panel);
  }
  .rawdata-record-head{
    display:flex;
    align-items:center;
    gap:10px;
    cursor:pointer;
  }
  .rawdata-record-head .sub{flex:1;}
  .rawdata-record-head .expand-btn{margin-left:auto;}
  .rawdata-caret{flex-shrink:0; color:var(--text-faint); font-size:11px; width:10px;}
  .rawdata-record.rawdata-record-open{border-color:var(--signal);}
  .rawdata-record .raw-json{ margin-top:8px; max-height:320px; }
  .rawdata-detail{margin-top:8px;}
  .raw-attrs-table{
    display:flex;
    flex-direction:column;
    gap:3px;
    max-height:360px;
    overflow-y:auto;
    background:var(--bg-inset);
    border:1px solid var(--line);
    border-radius:4px;
    padding:8px 10px;
  }
  .raw-attr-row{display:flex; gap:10px; font-size:11.5px; padding:2px 0; border-bottom:1px solid var(--line-soft);}
  .raw-attr-row:last-child{border-bottom:none;}
  .raw-attr-k{flex:0 0 200px; color:var(--text-faint); font-family:var(--mono); word-break:break-word;}
  .raw-attr-v{flex:1; color:var(--text); font-family:var(--mono); word-break:break-word; white-space:pre-wrap;}

  .note-box{
    border:1px solid var(--line);
    background:var(--bg-panel);
    border-radius:var(--radius);
    padding:12px 14px;
    font-size:12.5px;
    color:var(--text-dim);
    margin-bottom:16px;
  }
  .note-box strong{color:var(--text);}

  .footer-note{
    margin-top:40px;
    padding-top:16px;
    border-top:1px solid var(--line);
    font-size:11.5px;
    color:var(--text-faint);
    line-height:1.6;
  }

  ::-webkit-scrollbar{width:9px; height:9px;}
  ::-webkit-scrollbar-track{background:transparent;}
  ::-webkit-scrollbar-thumb{background:var(--line); border-radius:5px;}
  ::-webkit-scrollbar-thumb:hover{background:var(--text-faint);}

  :focus-visible{outline:2px solid var(--dup); outline-offset:2px;}
  /* ---- Standing analysis ---- */
  .sa-card{ background:var(--bg-panel); border:1px solid var(--line); border-radius:var(--radius); padding:14px 16px; }
  .sa-head{ display:flex; justify-content:space-between; align-items:flex-end; gap:12px; flex-wrap:wrap; border-bottom:1px solid var(--line); padding-bottom:8px; margin-bottom:10px; }
  .sa-title{ font-family:var(--display); font-size:18px; font-weight:600; color:var(--text); }
  .sa-big{ font-family:var(--display); font-size:30px; font-weight:600; color:var(--text); }
  .sa-gap{ position:relative; width:100%; overflow:hidden; }
  .sa-tick{ position:absolute; left:0; right:0; display:flex; align-items:center; gap:6px; }
  .sa-tick span{ width:36px; text-align:right; font-family:var(--mono); font-size:11px; color:var(--text-faint); }
  .sa-tick i{ flex:1; height:1px; background:var(--line-soft); }
  .sa-axis{ position:absolute; left:46px; top:0; bottom:0; width:2px; background:var(--line); }
  .sa-gap-row{ position:absolute; display:flex; align-items:center; gap:6px; z-index:1; flex-wrap:nowrap; }
  .sa-gap-lines{ position:absolute; left:0; top:0; pointer-events:none; overflow:visible; }
  .sa-badge{ display:inline-flex; align-items:center; gap:6px; background:var(--bg-inset); border:1px solid var(--line); border-left:4px solid; border-radius:4px; padding:3px 8px; font-size:12px; color:var(--text); white-space:nowrap; }
  .sa-badge b{ font-family:var(--mono); color:var(--text-dim); font-weight:500; }
  .sa-badge img{ width:16px; height:16px; object-fit:contain; }
  .sa-svg{ width:100%; height:auto; display:block; }
  .sa-ax{ font-family:var(--mono); font-size:10px; fill:var(--text-faint); }
  .sa-filters{ display:flex; gap:6px; flex-wrap:wrap; }
  .sa-filter{ font-family:var(--mono); font-size:11px; text-transform:uppercase; letter-spacing:.04em; background:transparent; color:var(--text-dim); border:1px solid var(--line); border-radius:4px; padding:4px 10px; cursor:pointer; }
  .sa-filter.active, .sa-filter:hover{ color:var(--bg-inset); background:var(--signal); border-color:var(--signal); }
  .sa-legend{ display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
  .sa-chip{ display:inline-flex; align-items:center; gap:6px; font-size:11.5px; background:var(--bg-inset); color:var(--text); border:1px solid var(--line); border-radius:12px; padding:2px 9px; cursor:pointer; }
  .sa-chip i{ width:10px; height:10px; border-radius:50%; display:inline-block; }
  .sa-chip.off{ opacity:.35; }
  .sa-chip.focus{ border-color:var(--signal); box-shadow:0 0 0 1px var(--signal); }
  /* ---- Standing analysis: broadcast board ---- */
  .sa-board{ display:grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap:16px; }
  .sa-right{ display:flex; flex-direction:column; gap:16px; min-width:0; }
  .sa-panel{ background:#1e293b; border:1px solid #334155; border-radius:4px; box-shadow:0 10px 25px -5px rgba(0,0,0,0.5); padding:20px; position:relative; min-width:0; }
  .sa-left{ overflow:hidden; }
  .sa-phead{ display:flex; justify-content:space-between; align-items:flex-end; gap:12px; flex-wrap:wrap; border-bottom:1px solid #334155; padding-bottom:8px; margin-bottom:12px; }
  .sa-btitle{ font-family:'Teko', var(--display), sans-serif; font-size:30px; line-height:1; letter-spacing:1px; text-transform:uppercase; text-shadow:0 0 10px rgba(56,189,248,0.4); font-weight:500; }
  .sa-sub{ font-family:var(--mono); font-size:11px; color:#94a3b8; letter-spacing:.2em; text-transform:uppercase; margin-top:4px; }
  .sa-btns{ display:flex; gap:8px; flex-wrap:wrap; }
  .sa-btn{ background:#334155; border:1px solid #475569; color:#cbd5e1; padding:4px 12px; font-size:12px; font-weight:600; text-transform:uppercase; cursor:pointer; transition:all .2s; border-radius:2px; font-family:var(--sans); }
  .sa-btn:hover, .sa-btn.active{ background:#38bdf8; color:#0f172a; border-color:#38bdf8; box-shadow:0 0 10px rgba(56,189,248,0.5); }
  .sa-canvas{ position:relative; height:330px; }
  .sa-wait{ height:100%; display:flex; align-items:center; justify-content:center; gap:8px; color:#94a3b8; font-family:var(--mono); font-size:12px; }
  .sa-tg{ position:relative; width:100%; }
  .sa-tg-tick{ position:absolute; left:0; right:0; display:flex; align-items:center; }
  .sa-tg-tick span{ width:40px; text-align:right; padding-right:8px; font-family:var(--mono); font-size:12px; color:#64748b; }
  .sa-tg-tick i{ flex:1; height:1px; background:rgba(51,65,85,0.5); }
  .sa-tg-axis{ position:absolute; left:50px; top:10px; bottom:10px; width:2px; background:linear-gradient(to top, #334155, #64748b, #38bdf8); }
  .sa-tbadge{ display:inline-flex; align-items:center; padding:4px 10px; background:#0f172a; border-left:4px solid; font-weight:600; font-size:13.5px; white-space:nowrap; box-shadow:0 2px 4px rgba(0,0,0,0.5); transition:all .3s ease; color:#fff; font-family:'Inter', var(--sans); }
  .sa-tbadge .pts{ font-family:var(--mono); color:#94a3b8; margin-right:8px; font-weight:500; }
  .sa-tbadge:hover{ transform:translateX(10px) scale(1.05); z-index:50; position:relative; }
  @media (max-width: 1100px){ .sa-board{ grid-template-columns: minmax(0, 1fr); } }
  /* ---- Squad contribution ---- */
  .sc-card{ background:linear-gradient(145deg, #131b29 0%, #0d121c 100%); border:1px solid rgba(255,255,255,0.05); border-radius:12px; box-shadow:0 25px 50px rgba(0,0,0,0.5); padding:24px; }
  .sc-head{ display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap; border-bottom:1px solid rgba(255,255,255,0.1); padding-bottom:14px; margin-bottom:16px; }
  .sc-title{ font-size:22px; font-weight:800; letter-spacing:1px; text-transform:uppercase; color:#fff; }
  .sc-sub{ color:#8b9bb4; font-size:13px; margin-top:4px; }
  .sc-controls{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
  .sc-toggle{ display:inline-flex; background:rgba(0,0,0,0.3); border:1px solid rgba(255,255,255,0.1); border-radius:8px; padding:4px; gap:2px; flex-wrap:wrap; }
  .sc-tog{ background:transparent; color:#8b9bb4; border:none; padding:7px 14px; font-size:11.5px; font-weight:700; cursor:pointer; border-radius:6px; transition:all .2s ease; text-transform:uppercase; }
  .sc-tog:hover{ color:#fff; background:rgba(255,255,255,0.05); }
  .sc-tog.active{ background:#3b82f6; color:#fff; box-shadow:0 0 10px rgba(59,130,246,0.4); }
  .sc-scroll{ overflow-x:auto; padding-bottom:6px; }
  .sc-grid{ border-collapse:separate; border-spacing:5px; }
  .sc-grid th{ font-size:10px; font-weight:700; color:#64748b; text-align:center; white-space:nowrap; padding:0 0 4px; }
  .sc-grid th .sc-opp{ color:#8b9bb4; font-weight:600; margin-top:2px; }
  .sc-grid td{ padding:0; }
  .sc-name{ text-align:right !important; font-size:12px; font-weight:700; color:#cbd5e1; text-transform:uppercase; padding-right:12px !important; white-space:nowrap; letter-spacing:.5px; }
  .sc-role{ font-size:9.5px; color:#64748b; font-weight:700; margin-left:4px; }
  .sc-cell{ width:36px; height:36px; border-radius:4px; display:flex; flex-direction:column; align-items:center; justify-content:center; font-size:11px; font-weight:800; color:#fff; position:relative; transition:transform .1s ease; line-height:1; }
  .sc-cell:hover{ transform:scale(1.15); z-index:5; box-shadow:0 0 15px rgba(0,0,0,0.5); }
  .sc-out{ background:transparent; border:1px dashed rgba(148,163,184,0.25); }
  .sc-nodata{ background:transparent; color:#475569; }
  .sc-bench{ background:#05070b; border:1px solid #1e293b; color:#64748b; }
  .sc-part{ background:#de9d70; color:#3a1d08; }   /* played part of the match: orange */
  .sc-full{ background:#98ceac; color:#0b3a1e; }   /* played the whole match: green */
  .sc-unknown{ background:#334155; }
  .sc-streak{ box-shadow:0 0 12px rgba(239,68,68,0.6); animation:sc-pulse 2s infinite; }
  @keyframes sc-pulse{ 0%{ box-shadow:0 0 0 0 rgba(239,68,68,0.7); } 70%{ box-shadow:0 0 0 6px rgba(239,68,68,0); } 100%{ box-shadow:0 0 0 0 rgba(239,68,68,0); } }
  .sc-ar{ font-size:10px; line-height:1; margin-bottom:1px; }
  .sc-part .sc-ar{ color:#3a1d08; } .sc-full .sc-ar{ color:#0b3a1e; } .sc-unknown .sc-ar{ color:#fff; }
  .sc-ar.inf{ opacity:.55; }
  .sc-min{ font-size:11px; }
  .sc-tot{ font-family:var(--mono); font-size:11px; color:#cbd5e1; text-align:center; white-space:nowrap; padding:0 8px !important; }
  .sc-warn{ color:#ef4444; font-weight:700; }
  .sc-bar{ height:3px; background:#1e293b; border-radius:2px; margin-top:4px; } .sc-bar i{ display:block; height:3px; background:#3b82f6; border-radius:2px; }
  .sc-legend{ display:flex; gap:18px; justify-content:center; align-items:center; flex-wrap:wrap; margin-top:16px; padding-top:16px; border-top:1px solid rgba(255,255,255,0.05); font-size:11px; color:#8b9bb4; font-weight:600; text-transform:uppercase; }
  .sc-legend span{ display:inline-flex; align-items:center; gap:8px; }
  .sc-legend .sc-cell{ width:14px; height:14px; border-radius:3px; display:inline-block; }
  /* ---- searchable combo (player pickers) ---- */
  .ss-wrap{ position:relative; display:inline-block; vertical-align:middle; }
  .ss-wrap > select.ss-native{ display:none !important; }
  .ss-input{ width:100%; background-color:var(--bg-inset); border:1.5px solid var(--line); border-radius:6px; color:var(--text); font-size:13px; padding:8px 28px 8px 10px; outline:none;
    background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" fill="none" stroke="%239AA6B4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat:no-repeat; background-position:right 10px center; cursor:pointer; }
  .ss-input::placeholder{ color:var(--text); opacity:1; }
  .ss-wrap.open .ss-input{ border-color:var(--signal); cursor:text; }
  .ss-wrap.open .ss-input::placeholder{ color:var(--text-faint); }
  .ss-input:disabled{ opacity:.55; cursor:not-allowed; }
  .ss-list{ display:none; position:absolute; z-index:60; left:0; right:0; top:calc(100% + 4px); max-height:320px; overflow-y:auto; background:var(--bg-panel); border:1px solid var(--line); border-radius:6px; box-shadow:0 10px 25px rgba(0,0,0,0.45); padding:4px; }
  .ss-wrap.open .ss-list{ display:block; }
  .ss-item{ padding:6px 8px; border-radius:4px; font-size:13px; color:var(--text); cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .ss-item:hover, .ss-item.active{ background:var(--signal-soft); }
  .ss-item.sel{ color:var(--signal); font-weight:600; }
  .ss-empty{ padding:6px 8px; font-size:12px; color:var(--text-faint); }
  /* ---- All projects · matches of the day ---- */
  .day-toolbar{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:12px; }
  .day-toolbar input[type=date]{ background:var(--bg-inset); border:1.5px solid var(--line); border-radius:6px; color:var(--text); padding:6px 8px; color-scheme:dark; }
  .day-table td, .day-table th{ white-space:nowrap; }
  .day-big-select{ min-width:220px; appearance:none; -webkit-appearance:none; background-color:var(--bg-inset);
    background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" fill="none" stroke="%239AA6B4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat:no-repeat; background-position:right 14px center; border:1.5px solid var(--line); border-radius:6px; color:var(--text); font-family:var(--display); font-size:17px; padding:10px 34px 10px 11px; }
  .day-big-select optgroup{ font-family:var(--sans); font-size:13px; color:var(--text-dim); }
  .day-row{ cursor:pointer; } .day-row:hover td{ background:var(--signal-soft); }
  .day-proj img{ width:18px; height:18px; object-fit:contain; vertical-align:middle; margin-right:6px; }
  .day-home{ text-align:right !important; } .day-res{ text-align:center !important; font-weight:700; min-width:70px; }
  .day-st{ font-family:var(--mono); font-size:11px; text-transform:uppercase; padding:2px 8px; border-radius:10px; border:1px solid var(--line); }
  .day-st.fin{ color:var(--text-dim); } .day-st.live{ color:#fff; background:var(--accent-live); border-color:var(--accent-live); }
  .day-st.sch{ color:var(--signal); border-color:var(--signal); } .day-st.off{ color:var(--flag); border-color:var(--flag); }
  .day-excl{ display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:12px; background:var(--bg-panel); border:1px solid var(--line); border-radius:8px; padding:12px; margin-bottom:12px; }
  .day-excl-head{ font-weight:600; margin-bottom:4px; display:flex; align-items:center; gap:6px; } .day-excl-head img{ width:16px; height:16px; object-fit:contain; }
  .day-excl-item{ display:block; font-size:12.5px; color:var(--text-dim); cursor:pointer; }
  .day-probs{ margin-bottom:10px; font-size:12px; color:var(--flag); } .day-probs summary{ cursor:pointer; }
  /* ---- Calendar · matchday map (from "Vixel Global Matchday") ---- */
  .mdm-wrap{ position:relative; width:100%; height:calc(100vh - 230px); min-height:560px; border-radius:12px; overflow:hidden; background:#05080f; background-image:radial-gradient(circle at 50% 50%, #0a1122 0%, #030408 100%); border:1px solid rgba(255,255,255,0.06); }
  .mdm-canvas{ position:absolute; inset:0; z-index:1; cursor:grab; } .mdm-canvas:active{ cursor:grabbing; }
  .mdm-labels{ position:absolute; inset:0; pointer-events:none; z-index:5; }
  .mdm-card{ position:absolute; white-space:nowrap; min-width:150px; background:rgba(11,16,26,0.88); border:1px solid rgba(255,255,255,0.12); border-radius:8px; padding:6px 10px 7px; color:#cbd5e1; box-shadow:0 6px 18px rgba(0,0,0,0.6); transition:opacity .4s ease, border-color .4s ease, box-shadow .4s ease; pointer-events:auto; }
  .mdm-card.dimmed{ opacity:.45; } .mdm-card.focused{ z-index:2; border-color:#00ff88; box-shadow:0 0 16px rgba(0,255,136,0.35), 0 6px 18px rgba(0,0,0,0.6); }
  .mdm-card.overlap-hidden{ opacity:0 !important; pointer-events:none; }
  .mdm-card .mc-head{ display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:4px; font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:1px; }
  .mdm-card .mc-city{ color:#64748b; max-width:170px; overflow:hidden; text-overflow:ellipsis; } .mdm-card.focused .mc-city{ color:#00ff88; }
  .mdm-card .mc-status{ font-weight:800; letter-spacing:1px; } .mdm-card .mc-status.live{ color:#fff; }
  .mdm-card .mc-status.live::before{ content:''; display:inline-block; width:6px; height:6px; margin-right:5px; border-radius:50%; background:#ef4444; animation:mdmPulse 1.2s infinite; }
  .mdm-card .mc-status.ht{ color:#eab308; } .mdm-card .mc-status.ft{ color:#64748b; } .mdm-card .mc-status.ns{ color:#06b6d4; }
  @keyframes mdmPulse{ 0%,100%{ opacity:1; } 50%{ opacity:.25; } }
  .mdm-card .mc-row{ display:flex; justify-content:space-between; gap:14px; font-size:12px; font-weight:700; line-height:1.5; color:#94a3b8; }
  .mdm-card .mc-row.lead{ color:#fff; } .mdm-card .mc-score{ font-weight:900; font-variant-numeric:tabular-nums; color:#fff; }
  .mdm-card .mc-sep{ height:1px; background:rgba(255,255,255,0.08); margin:6px 0; }
  .mdm-card .mc-open{ margin-top:4px; background:transparent; border:none; color:#06b6d4; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.5px; cursor:pointer; padding:0; }
  .mdm-card{ cursor:pointer; }
  .mdm-card .mc-more{ display:none; margin-top:6px; padding-top:6px; border-top:1px solid rgba(255,255,255,0.08); font-size:11px; color:#cbd5e1; line-height:1.5; white-space:normal; max-width:260px; }
  .mdm-card.expanded{ z-index:3; } .mdm-card.expanded .mc-more{ display:block; } .mdm-card.expanded .mc-full{ display:block !important; } .mdm-card.expanded .mc-compact{ display:none !important; }
  .mdm-card .mc-more a.mc-open{ display:inline-block; margin-top:4px; color:#06b6d4; text-decoration:none; }
  .mdm-card .mc-more a.mc-open:hover{ text-decoration:underline; }
  .mdm-card .mc-compact{ display:none; font-size:11px; font-weight:800; letter-spacing:.5px; color:#e2e8f0; } .mdm-card .mc-compact .mc-status{ margin-left:4px; font-size:9px; }
  .mdm-card.compact{ min-width:0; padding:4px 8px; } .mdm-card.compact .mc-full{ display:none; } .mdm-card.compact .mc-compact{ display:block; }
  .mdm-card.compact .mc-sep{ margin:2px 0; }
  .mdm-loader{ position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); z-index:50; pointer-events:none; font-size:18px; font-weight:900; color:#06b6d4; text-transform:uppercase; letter-spacing:2px; text-shadow:0 0 20px rgba(6,182,212,0.8); transition:opacity .5s; background:rgba(11,16,26,0.9); padding:18px 26px; border-radius:12px; border:1px solid rgba(6,182,212,0.3); text-align:center; max-width:80%; }
  .mdm-hint{ position:absolute; top:14px; left:288px; z-index:10; background:rgba(11,16,26,0.6); backdrop-filter:blur(4px); border:1px solid rgba(255,255,255,0.1); padding:8px 12px; border-radius:8px; font-size:11px; color:#94a3b8; font-weight:600; }
  .mdm-hint span{ color:#00ff88; font-weight:800; }
  .mdm-ui{ position:absolute; top:12px; left:12px; bottom:12px; width:260px; z-index:10; background:rgba(11,16,26,0.88); backdrop-filter:blur(12px); border:1px solid rgba(255,255,255,0.1); border-radius:12px; padding:14px; box-shadow:0 20px 50px rgba(0,0,0,0.8); display:flex; flex-direction:column; align-items:stretch; gap:12px; overflow-y:auto; }
  .mdm-ui-head{ display:flex; flex-direction:column; align-items:stretch; gap:10px; width:100%; border-bottom:1px solid rgba(255,255,255,0.1); padding-bottom:10px; }
  .mdm-ui-head .mdm-md{ width:100%; } .mdm-ui-head .mdm-select{ flex:1; min-width:0; }
  .mdm-ui-head h2{ font-size:16px; font-weight:900; text-transform:uppercase; letter-spacing:1px; margin:0; color:#fff; } .mdm-ui-head h2 span{ color:#06b6d4; }
  .mdm-md{ display:flex; align-items:center; gap:6px; }
  .mdm-select{ background:#1e293b; color:#fff; border:1px solid rgba(255,255,255,0.2); padding:6px 30px 6px 12px; border-radius:6px; font-size:12px; font-weight:700; cursor:pointer; text-transform:uppercase; }
  .mdm-btn{ background:#1e293b; color:#cbd5e1; border:1px solid rgba(255,255,255,0.1); border-radius:6px; width:30px; height:30px; font-size:16px; font-weight:800; cursor:pointer; }
  .mdm-btn:disabled{ opacity:.35; cursor:default; }
  .mdm-controls{ display:flex; flex-direction:column; gap:6px; align-items:stretch; }
  .mdm-controls .mdm-toggle{ text-align:left; width:100%; }
  .mdm-controls .mdm-sep{ width:100%; height:1px; margin:4px 0; }
  .mdm-toggle{ background:#1e293b; color:#cbd5e1; border:1px solid rgba(255,255,255,0.05); padding:8px 12px; border-radius:6px; font-size:11px; font-weight:800; cursor:pointer; text-transform:uppercase; transition:all .2s; }
  .mdm-toggle:hover{ background:#2a3a50; color:#fff; } .mdm-toggle.active, .mdm-toggle.on:not(.gold){ background:#06b6d4; color:#000; box-shadow:0 0 15px rgba(6,182,212,0.4); }
  .mdm-toggle.gold.on{ background:#eab308; color:#000; box-shadow:0 0 15px rgba(234,179,8,0.4); }
  .mdm-sep{ width:1px; background:rgba(255,255,255,0.1); margin:0 4px; }
  .mdm-note{ font-size:11px; color:#64748b; font-weight:600; display:flex; flex-direction:column; gap:3px; text-align:left; white-space:normal; }
  .mdm-pos{ position:absolute; top:12px; right:12px; bottom:12px; width:min(560px, 92%); z-index:30; overflow:auto; background:rgba(11,16,26,0.96); border:1px solid rgba(255,255,255,0.12); border-radius:10px; padding:12px 14px; color:#cbd5e1; font-size:12px; box-shadow:0 20px 50px rgba(0,0,0,0.8); }
  .mdm-pos-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; color:#fff; }
  .mdm-pos-row{ border-top:1px solid rgba(255,255,255,0.08); padding:8px 0; display:flex; flex-direction:column; gap:3px; }
  .mdm-pos-row a{ color:#06b6d4; } .mdm-pos-tries{ margin:2px 0 2px 18px; padding:0; } .mdm-pos-tries li{ margin:1px 0; }
  .mdm-pos-act{ display:flex; gap:6px; align-items:center; margin-top:4px; } .mdm-pos-act input{ background:#0f172a; color:#fff; border:1px solid rgba(255,255,255,0.2); border-radius:6px; padding:5px 8px; width:170px; }
  .mdm-pos-act .mdm-toggle{ padding:5px 10px; }
  .mdm-replay{ width:100%; display:flex; flex-direction:column; gap:6px; border-bottom:1px solid rgba(255,255,255,0.1); padding-bottom:10px; }
  .mdm-replay .mdm-replay-row{ flex-wrap:wrap; row-gap:8px; }
  .mdm-replay #mdmPlay{ flex:0 0 auto; order:1; } .mdm-ui .mdm-replay .mdm-clock{ order:2; flex:1 1 0; min-width:0; font-size:12px; white-space:nowrap; }
  .mdm-ui .mdm-replay input[type=range]{ order:3; flex:1 1 100% !important; width:100%; } .mdm-ui .mdm-replay #mdmSpeed{ order:4; flex:1 1 0; } .mdm-ui .mdm-replay #mdmReplayExit{ order:5; flex:1 1 0; }
  .mdm-carousel{ position:absolute; left:284px; right:0; top:0; z-index:11; height:118px; padding:8px 14px 8px; background:linear-gradient(to bottom, rgba(5,8,15,0.95), rgba(5,8,15,0.75)); border-bottom:1px solid rgba(6,182,212,0.25); }
  .mdm-carousel-h{ font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:1px; color:#06b6d4; margin-bottom:5px; } .mdm-carousel-h span{ color:#64748b; font-weight:600; letter-spacing:0; text-transform:none; margin-left:8px; }
  .mdm-carousel-track{ display:flex; gap:8px; overflow-x:auto; overflow-y:hidden; padding-bottom:4px; scroll-behavior:smooth; }
  .mdm-ev{ flex:0 0 190px; background:rgba(15,23,42,0.95); border:1px solid rgba(255,255,255,0.1); border-left:3px solid #64748b; border-radius:8px; padding:6px 8px; font-size:11px; color:#cbd5e1; display:flex; flex-direction:column; gap:2px; }
  .mdm-ev.new{ animation:mdmEvIn .45s ease-out; }
  @keyframes mdmEvIn{ from{ transform:translateX(-30px); opacity:0; } to{ transform:none; opacity:1; } }
  .mdm-ev.goal, .mdm-ev.owngoal{ border-left-color:#00ff88; } .mdm-ev.red{ border-left-color:#ef4444; } .mdm-ev.yellow{ border-left-color:#eab308; } .mdm-ev.sub{ border-left-color:#06b6d4; } .mdm-ev.ft, .mdm-ev.ht, .mdm-ev.ko{ border-left-color:#475569; }
  .mdm-ev-top{ display:flex; justify-content:space-between; font-weight:800; text-transform:uppercase; font-size:9.5px; letter-spacing:.5px; }
  .mdm-ev.goal .mdm-ev-kind, .mdm-ev.owngoal .mdm-ev-kind{ color:#00ff88; } .mdm-ev.red .mdm-ev-kind{ color:#ef4444; } .mdm-ev.yellow .mdm-ev-kind{ color:#eab308; }
  .mdm-ev-score{ display:flex; justify-content:space-between; gap:6px; font-weight:700; color:#94a3b8; white-space:nowrap; } .mdm-ev-score span{ overflow:hidden; text-overflow:ellipsis; max-width:70px; } .mdm-ev-score .hit{ color:#fff; } .mdm-ev-score b{ color:#fff; }
  .mdm-ev-txt{ color:#94a3b8; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .mdm-ev-time{ color:#64748b; font-size:10px; }
  .mdm-ev{ flex-direction:row !important; align-items:stretch; gap:8px !important; flex-basis:230px !important; }
  .mdm-ev-pic{ flex:0 0 40px; display:flex; align-items:center; justify-content:center; }
  .mdm-ev-pic .ev-face{ width:40px; height:40px; border-radius:50%; object-fit:cover; object-position:top; background:#1e293b; border:1px solid rgba(255,255,255,0.15); }
  .mdm-ev-pic .ev-face.logo{ border-radius:6px; object-fit:contain; background:transparent; border:none; }
  .mdm-ev-body{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
  .mdm-ev-score .ev-logo{ width:14px; height:14px; object-fit:contain; vertical-align:middle; margin:0 3px; }
  .mdm-spot{ position:absolute; pointer-events:none; z-index:20; background:rgba(11,16,26,0.94); border:1px solid rgba(255,255,255,0.18); border-radius:12px; padding:8px 12px; text-align:center; min-width:130px; box-shadow:0 0 30px rgba(0,0,0,0.6); }
  .mdm-spot.goal, .mdm-spot.owngoal{ border-color:#00ff88; box-shadow:0 0 30px rgba(0,255,136,0.45); } .mdm-spot.red{ border-color:#ef4444; box-shadow:0 0 30px rgba(239,68,68,0.45); }
  .mdm-spot.yellow{ border-color:#eab308; box-shadow:0 0 24px rgba(234,179,8,0.4); } .mdm-spot.sub{ border-color:#06b6d4; box-shadow:0 0 24px rgba(6,182,212,0.4); }
  .mdm-spot .sp-kind{ font-size:10px; font-weight:900; text-transform:uppercase; letter-spacing:1px; color:#fff; margin-bottom:4px; }
  .mdm-spot .sp-face{ width:56px; height:56px; border-radius:50%; object-fit:cover; object-position:top; border:2px solid rgba(255,255,255,0.25); display:block; margin:0 auto 4px; background:#1e293b; }
  .mdm-spot .sp-logo{ width:44px; height:44px; object-fit:contain; display:block; margin:0 auto 4px; }
  .mdm-spot .sp-name{ font-size:12.5px; font-weight:800; color:#fff; }
  .mdm-spot .sp-rel{ font-size:11px; color:#94a3b8; margin-top:3px; } .mdm-spot .sp-rel .sp-face{ width:22px; height:22px; display:inline-block; vertical-align:middle; margin:0 4px; border-width:1px; }
  .mdm-spot .sp-score{ margin-top:4px; font-size:11px; font-weight:700; color:#cbd5e1; }
  .mdm-ev-empty{ color:#64748b; font-size:11px; padding:10px 0; }
  .mdm-wrap.replaying .mdm-hint{ display:none; }
  .mdm-feedbox{ position:absolute; top:58px; right:14px; z-index:12; width:280px; max-height:42%; display:flex; flex-direction:column; background:rgba(11,16,26,0.9); border:1px solid rgba(6,182,212,0.35); border-radius:10px; padding:8px 10px; box-shadow:0 10px 30px rgba(0,0,0,0.6); }
  .mdm-feedbox-h{ font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:1px; color:#06b6d4; margin-bottom:4px; }
  .mdm-feedbox .mdm-feed{ margin-top:0; max-height:none; flex:1; }
  .mdm-replay-row{ display:flex; align-items:center; gap:10px; }
  .mdm-replay input[type=range]{ flex:1; accent-color:#06b6d4; }
  .mdm-clock{ color:#06b6d4; font-weight:800; font-size:13px; min-width:190px; }
  .mdm-feed{ margin-top:8px; max-height:150px; overflow:auto; font-size:11.5px; color:#cbd5e1; display:flex; flex-direction:column; gap:2px; }
  .mdm-feed-row.goal, .mdm-feed-row.owngoal{ color:#00ff88; font-weight:700; } .mdm-feed-row.red{ color:#ef4444; font-weight:700; } .mdm-feed-row.yellow{ color:#eab308; }
  .mdm-card .mc-last.warn{ color:#eab308 !important; }
  .mdm-card .mc-last{ margin-top:4px; font-size:10.5px; color:#00ff88; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:220px; }
  .mdm-card.mc-flash-goal{ border-color:#00ff88 !important; box-shadow:0 0 22px rgba(0,255,136,0.6) !important; }
  .mdm-card.mc-flash-red{ border-color:#ef4444 !important; box-shadow:0 0 22px rgba(239,68,68,0.6) !important; }
  .mdm-wbar{ display:flex; gap:6px; justify-content:flex-end; margin:-4px -4px -6px 0; }
  .mdm-wbtn{ background:#1e293b; color:#cbd5e1; border:1px solid rgba(255,255,255,0.1); border-radius:6px; width:30px; height:28px; font-size:15px; line-height:1; cursor:pointer; }
  .mdm-wbtn:hover{ color:#fff; background:#2a3a50; } .mdm-wbtn.on{ background:#06b6d4; color:#000; }
  .mdm-ui, .mdm-carousel, .mdm-hint{ transition:width .25s ease, left .25s ease, padding .25s ease; }
  .mdm-wrap.panel-collapsed .mdm-ui{ width:46px; padding:10px 6px; overflow:hidden; }
  .mdm-wrap.panel-collapsed .mdm-ui > :not(.mdm-wbar){ display:none; }
  .mdm-wrap.panel-collapsed .mdm-wbar{ flex-direction:column; margin:0; align-items:center; }
  .mdm-wrap.panel-collapsed .mdm-carousel{ left:70px; } .mdm-wrap.panel-collapsed .mdm-hint{ left:72px; }
  .mdm-wrap:fullscreen{ height:100vh; border-radius:0; border:none; }
  body.mdm-focus #mdmWrap{ position:fixed; inset:0; height:auto; min-height:0; z-index:5000; border-radius:0; border:none; }
  body.mdm-focus{ overflow:hidden; }
  .mdm-timeline{ position:absolute; left:284px; right:0; bottom:0; z-index:11; height:76px; display:flex; align-items:center; gap:12px; padding:8px 18px 10px; background:linear-gradient(to top, rgba(5,8,15,0.96), rgba(5,8,15,0.8)); border-top:1px solid rgba(6,182,212,0.25); transition:left .25s ease; }
  .mdm-wrap.panel-collapsed .mdm-timeline{ left:70px; }
  .mdm-timeline .mdm-clock{ min-width:178px; font-size:12px; white-space:nowrap; }
  .mdm-tl-track{ position:relative; flex:1; height:100%; display:flex; flex-direction:column; justify-content:flex-end; }
  .mdm-tl-track input[type=range]{ width:100%; margin:0; accent-color:#06b6d4; }
  .mdm-tl-marks{ position:relative; flex:1; }
  .mdm-tl-ko{ position:absolute; bottom:-6px; transform:translateX(-50%); background:none; border:none; padding:0; cursor:pointer; color:#94a3b8; font-size:10px; font-weight:800; font-family:var(--mono); white-space:nowrap; }
  .mdm-tl-ko::after{ content:''; display:block; width:2px; height:12px; margin:2px auto 0; background:#06b6d4; border-radius:1px; }
  .mdm-tl-ko span{ background:rgba(15,23,42,0.9); border:1px solid rgba(6,182,212,0.35); border-radius:4px; padding:1px 5px; }
  .mdm-tl-ko:hover span{ color:#fff; border-color:#06b6d4; }
  .mdm-tl-dot{ position:absolute; bottom:-4px; width:7px; height:7px; border-radius:50%; transform:translateX(-50%); background:#00ff88; box-shadow:0 0 6px rgba(0,255,136,0.7); }
  .mdm-tl-dot.red{ background:#ef4444; box-shadow:0 0 6px rgba(239,68,68,0.7); }
  .mdm-empty{ align-self:center; font-size:11px; font-weight:600; color:#64748b; }
  /* ---- call log table ---- */
  .cl-table{ font-size:12px; width:100%; }
  .cl-table th.cl-sort{ cursor:pointer; user-select:none; white-space:nowrap; } .cl-table th.cl-sort.on{ color:var(--signal); }
  .cl-table td{ vertical-align:top; }
  .cl-ts{ white-space:nowrap; color:var(--text-dim); } .cl-src{ white-space:nowrap; }
  .cl-url{ max-width:560px; } .cl-url > div:first-child{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .cl-sub{ margin:3px 0 0 !important; white-space:normal; font-family:var(--sans); }
  .cl-http .call-log-badge{ margin:0 4px 2px 0; display:inline-block; }
  .cl-durcell{ min-width:110px; white-space:nowrap; } .cl-dur{ font-family:var(--mono); } .cl-dur.slow{ color:var(--flag); } .cl-dur.very{ color:var(--orphan); font-weight:700; }
  .cl-bar{ height:3px; background:var(--line-soft); border-radius:2px; margin-top:3px; } .cl-bar i{ display:block; height:3px; border-radius:2px; background:var(--signal); } .cl-bar i.slow{ background:var(--flag); } .cl-bar i.very{ background:var(--orphan); }
  .call-log-panel{ width:min(1500px, 96vw) !important; max-width:96vw !important; }
  .cl-url{ max-width:none; min-width:260px; } .cl-url > div:first-child{ max-width:560px; }
  /* the URL wraps (anywhere: long ids and query strings have no spaces) instead of being cut */
  .cl-table .cl-url > div:first-child{ white-space:normal !important; overflow:visible !important; text-overflow:clip !important; overflow-wrap:anywhere; word-break:break-all; }
  .mdm-card .mc-last:empty{ display:none; }
  /* ---- goal breakdown ---- */
  .gb-table{ font-size:13px; } .gb-table th{ white-space:nowrap; text-align:center; } .gb-table th.gb-sort{ cursor:pointer; user-select:none; } .gb-table th.gb-sort.on{ color:var(--signal); }
  .gb-table th.gb-team, .gb-table td.gb-team{ text-align:left; white-space:nowrap; } .gb-team .gb-logo{ display:inline-block; vertical-align:middle; margin-right:8px; }
  .gb-table td.gb-n{ text-align:center; font-weight:700; font-variant-numeric:tabular-nums; border-left:1px solid var(--line-soft); }
  .gb-table td.gb-p{ text-align:right; color:var(--text-faint); font-family:var(--mono); font-size:11.5px; padding-right:10px; }
  .gb-table th.gb-pct{ color:var(--text-faint); }
  .gb-table .gb-half{ background:rgba(79,140,255,0.06); } .gb-table td.gb-half.gb-n{ font-size:14px; }
  .gb-table td.gb-max{ color:var(--signal); } .gb-table td.gb-flag{ color:var(--flag); } .gb-table td.gb-total{ font-size:14px; }

  /* Standing analysis · True gap: team logo in the badge */
  .sa-tbadge .sa-tlogo{ width:20px; height:20px; object-fit:contain; margin-right:7px; flex:0 0 auto; }
  .sa-tbadge .sa-tdot{ width:20px; height:20px; border-radius:50%; margin-right:7px; display:inline-flex; align-items:center; justify-content:center; font-size:7.5px; font-weight:800; color:#0f172a; background:#64748b; flex:0 0 auto; }

  /* Matchday map: team logo on the per-stadium buttons */
  .mdm-team-btn{ display:flex !important; align-items:center; gap:8px; }
  .mdm-team-btn .mdm-blogo{ width:20px; height:20px; object-fit:contain; flex:0 0 auto; }
  .mdm-team-btn .mdm-bdot{ width:20px; height:20px; border-radius:50%; background:#475569; color:#e2e8f0; font-size:7.5px; font-weight:800; display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; }
  .mdm-team-btn.active .mdm-bdot{ background:#0f172a; }
  .mdm-team-btn .mdm-live-dot{ width:8px; height:8px; border-radius:50%; background:#ef4444; margin-left:auto; animation:mdmPulse 1.2s infinite; flex:0 0 auto; }

  /* player nationality flag */
  .sv-nat img{ display:inline-block; vertical-align:middle; border-radius:2px; box-shadow:0 0 0 1px rgba(255,255,255,0.12); }
  .sv-nat-text{ font-size:11px; color:var(--text-dim); }

  /* Teams section: every table shows all its rows (no inner vertical scrollbar, no fixed height); wide tables
     still scroll sideways. Includes the check table and the Teams detail window. */
  #teamsArea .table-wrap, #teamsArea .table-wrap .scroll,
  #teamsChecksBox .table-wrap, #teamsChecksBox .table-wrap .scroll{ max-height:none !important; min-height:0 !important; height:auto !important; overflow-y:visible !important; overflow-x:auto; }
  #digitalImagesDetailPanel.teams-detail .raw-attrs-table{ max-height:none !important; overflow-y:visible !important; }

  /* Season squads · By country */
  .sbc-bar{ display:flex; gap:14px; align-items:center; flex-wrap:wrap; } .sbc-roles{ display:flex; gap:6px; flex-wrap:wrap; }
  .sbc-kpis{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
  .sbc-kpi{ background:var(--bg-panel); border:1px solid var(--line); border-radius:8px; padding:10px 14px; min-width:130px; }
  .sbc-kpi .v{ font-size:22px; font-weight:800; font-variant-numeric:tabular-nums; } .sbc-kpi .l{ font-size:12px; color:var(--text-dim); }
  .sbc-kpi.warn{ border-color:var(--flag); cursor:pointer; } .sbc-kpi.warn .v{ color:var(--flag); } .sbc-kpi.ok .v{ color:var(--ok); }
  .sbc-h{ margin:18px 0 8px; font-size:14px; }
  .sbc-rank{ display:flex; flex-direction:column; gap:3px; max-width:900px; }
  .sbc-row{ display:grid; grid-template-columns:220px 1fr 50px 64px; gap:10px; align-items:center; padding:4px 8px; border-radius:6px; cursor:pointer; font-size:13px; }
  .sbc-row:hover, .sbc-row.open{ background:var(--bg-panel); } .sbc-row.home .c{ font-weight:800; }
  .sbc-row .c{ display:flex; align-items:center; gap:8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .sbc-row .b{ height:10px; background:var(--line-soft); border-radius:5px; overflow:hidden; } .sbc-row .b i{ display:block; height:100%; background:var(--signal); border-radius:5px; }
  .sbc-row.home .b i{ background:var(--ok); }
  .sbc-row .n{ text-align:right; font-weight:700; font-variant-numeric:tabular-nums; } .sbc-row .p{ text-align:right; color:var(--text-dim); font-family:var(--mono); font-size:12px; }
  .sbc-list{ display:flex; flex-wrap:wrap; gap:6px 16px; padding:6px 12px 10px 238px; font-size:12.5px; } .sbc-kpis + .sbc-list{ padding-left:4px; margin:-6px 0 12px; }
  .sbc-flag{ display:inline-block; vertical-align:middle; border-radius:2px; box-shadow:0 0 0 1px rgba(255,255,255,0.12); }
  .sbc-matrix{ font-size:13px; } .sbc-matrix th{ text-align:center; white-space:nowrap; } .sbc-matrix th.sbc-sort{ cursor:pointer; user-select:none; } .sbc-matrix th.sbc-sort.on{ color:var(--signal); }
  .sbc-matrix td.t{ white-space:nowrap; font-weight:600; } .sbc-matrix td.n{ text-align:center; font-variant-numeric:tabular-nums; } .sbc-matrix td.h{ text-align:center; font-weight:700; min-width:34px; }
  .sbc-matrix td.f{ font-weight:800; } .sbc-tlogo{ width:18px; height:18px; object-fit:contain; vertical-align:middle; margin-right:8px; }
  .sbc-tg{ background:var(--bg-panel); color:var(--text-dim); border:1px solid var(--line); border-radius:6px; padding:5px 11px; font-size:12px; font-weight:600; cursor:pointer; }
  .sbc-tg:hover{ color:var(--text); } .sbc-tg.active{ background:var(--signal); border-color:var(--signal); color:#fff; }
  .sbc-cc{ font-size:9.5px; color:var(--text-faint); margin-top:2px; letter-spacing:.5px; }

  /* By country: player cards */
  .sbc-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:10px; padding:10px 8px 14px; }
  .sbc-card{ background:var(--bg-panel); border:1px solid var(--line); border-radius:10px; padding:10px; display:flex; flex-direction:column; align-items:center; gap:4px; text-align:center; }
  .sbc-card .ph{ position:relative; width:78px; height:78px; border-radius:50%; overflow:hidden; background:var(--bg-inset); display:flex; align-items:center; justify-content:center; margin-bottom:4px; border:1px solid var(--line); }
  .sbc-card .ph img{ width:100%; height:100%; object-fit:cover; object-position:top; }
  .sbc-card .ph span{ font-size:22px; font-weight:800; color:var(--text-dim); }
  .sbc-card .ph .num{ position:absolute; right:2px; bottom:2px; background:var(--signal); color:#fff; font-size:10.5px; min-width:20px; height:20px; border-radius:10px; display:flex; align-items:center; justify-content:center; padding:0 4px; }
  .sbc-card .nm{ font-weight:700; font-size:13px; width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .sbc-card .tm{ font-size:11.5px; color:var(--text-dim); display:flex; align-items:center; gap:5px; justify-content:center; }
  .sbc-card .tm img{ width:14px; height:14px; object-fit:contain; }
  .sbc-card .rl{ font-size:11px; color:var(--text-faint); }
  .sbc-card .ph{ overflow:visible; } .sbc-card .ph img{ border-radius:50%; }
  .sbc-card .ph .num{ right:-4px; bottom:-2px; box-shadow:0 0 0 2px var(--bg-panel); }

  /* Calendar · Matches: responsive rows. The list is a size container; as it narrows, less important fields shrink
     or step aside and the team names turn into three-letter codes — the row stays on one line. */
  #matchBrowserList{ container-type:inline-size; container-name:mblist; }
  .match-row{ flex-wrap:nowrap; min-width:0; }
  .match-row .mr-teams{ display:flex; align-items:center; gap:6px; min-width:0; white-space:nowrap; overflow:hidden; }
  .match-row .mr-team{ display:inline-flex; align-items:center; gap:6px; min-width:0; overflow:hidden; }
  .match-row .mr-team .mr-full{ overflow:hidden; text-overflow:ellipsis; } .match-row .mr-team img{ flex:0 0 auto; }
  .match-row .mr-tla{ display:none; font-family:var(--mono); letter-spacing:.5px; }
  .match-row .mr-sep{ flex:0 0 auto; color:var(--text-dim); }
  .match-row .mr-time{ flex:0 0 auto; width:44px; font-family:var(--mono); }
  .match-row .mr-links{ flex-wrap:nowrap; overflow:hidden; }
  @container mblist (max-width: 1250px){
    .match-row .mr-day{ width:84px; } .match-row .mr-date{ width:56px; }
    .match-row .mr-links{ max-width:200px; }
  }
  @container mblist (max-width: 1050px){
    .match-row .mr-ids{ display:none; }
    .match-row .mr-links .mr-links-label{ display:none; }
  }
  @container mblist (max-width: 900px){
    .match-row .mr-links{ max-width:120px; }
    .match-row{ gap:9px; }
  }
  @container mblist (max-width: 720px){
    .match-row .mr-full{ display:none; } .match-row .mr-tla{ display:inline; }
    .match-row .mr-links, .match-row .mr-ticket-badge{ display:none; }
  }
  @container mblist (max-width: 600px){
    .match-row .mr-day{ display:none; }
    .match-row .mr-open-btn{ padding:3px 6px; }
  }
  @container mblist (max-width: 460px){
    .match-row .mr-date{ display:none; } .match-row .mr-kama-badge{ display:none; }
    .match-row .mr-team img{ display:none; }
  }
  .mon-chk.na{ opacity:.55; }

  /* Feeds view */
  .fd-table{ font-size:13px; } .fd-table td{ vertical-align:top; padding:6px 10px; } .fd-k{ white-space:nowrap; font-weight:600; width:220px; } .fd-v{ word-break:break-all; }
  .fd-ok{ color:var(--ok); } .fd-no{ color:var(--flag); } .fd-part{ color:var(--signal); }

  /* Season squads · Rosters */
  .sr-team{ margin:16px 0 8px; border:1px solid var(--line); border-radius:12px; padding:10px 12px; background:rgba(255,255,255,0.01); }
  .sr-team-h{ display:flex; align-items:center; gap:10px; font-size:15px; } .sr-team-h img{ width:28px; height:28px; object-fit:contain; }
  .sr-role{ margin:10px 0 0 8px; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:1px; color:var(--text-dim); }
  .sbc-card.sr-left{ opacity:.55; }

  /* Rosters: club picker */
  .sr-clubs{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
  .sr-club{ display:flex; flex-direction:column; align-items:center; gap:4px; width:92px; padding:8px 4px; border:1px solid var(--line); border-radius:10px; background:var(--bg-panel); color:var(--text-dim); cursor:pointer; font:inherit; font-size:11px; }
  .sr-club img{ width:34px; height:34px; object-fit:contain; } .sr-club span{ width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:center; }
  .sr-club:hover{ color:var(--text); border-color:var(--text-dim); } .sr-club.on{ border-color:var(--signal); color:var(--text); box-shadow:0 0 0 1px var(--signal) inset; }
  .sr-club.all{ justify-content:center; font-weight:800; font-size:13px; }

  /* Rosters: players with differences */
  .sbc-card.sr-click{ cursor:pointer; position:relative; } .sbc-card.sr-click:hover{ border-color:var(--text-dim); }
  .sbc-card.sr-diff{ border-color:var(--flag); box-shadow:0 0 0 1px var(--flag) inset; }
  .sr-badge{ display:inline-block; background:var(--flag); color:#1b1206; font-size:10.5px; font-weight:800; border-radius:9px; padding:1px 7px; }
  .sbc-card .sr-badge{ position:absolute; top:6px; right:6px; z-index:1; }
  .sr-difftable td{ padding:5px 10px; vertical-align:top; } .sr-difftable td:nth-child(2), .sr-difftable td:nth-child(3){ color:var(--flag); }
  .sr-imgpair{ display:grid; grid-template-columns:1fr 1fr; gap:10px; } .sr-imgrow{ margin-bottom:12px; }
  .sr-imgcmp{ margin:0; background:var(--bg-inset); border:1px solid var(--line); border-radius:8px; padding:8px; }
  .sr-imgcmp figcaption{ font-size:11px; font-weight:700; color:var(--text-dim); margin-bottom:6px; }
  .sr-imgcmp img{ width:100%; max-height:260px; object-fit:contain; } .sr-imgurl{ font-size:10.5px; color:var(--text-faint); word-break:break-all; margin-top:6px; }

  .sr-ph2{ position:relative; display:flex; gap:6px; margin-bottom:4px; }
  .sbc-card .sr-ph2 .ph.sm{ width:62px; height:62px; margin:0; } .sr-ph2 .ph.sm i{ position:absolute; bottom:-15px; left:0; right:0; font-style:normal; font-size:9.5px; color:var(--flag); font-weight:700; }
  .sr-ph2 .num{ position:absolute; right:-6px; bottom:-2px; background:var(--signal); color:#fff; font-size:10.5px; min-width:20px; height:20px; border-radius:10px; display:flex; align-items:center; justify-content:center; padding:0 4px; box-shadow:0 0 0 2px var(--bg-panel); }
  .sbc-card .sr-ph2{ margin-bottom:16px; }

  .sr-club .sr-club-n{ min-width:22px; height:18px; border-radius:9px; background:var(--flag); color:#1b1206; font-size:11px; font-weight:800; display:inline-flex; align-items:center; justify-content:center; padding:0 6px; }
  .sr-club.has-diff{ border-color:var(--flag); }

  /* collapsible check boxes */
  .svc-bar{ display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px; width:100%; text-align:left; background:var(--bg-panel); border:1px solid var(--line); border-radius:8px; padding:9px 12px; margin-bottom:10px; color:var(--text); font:inherit; font-size:13px; cursor:pointer; }
  .svc-bar:hover{ border-color:var(--text-dim); } .svc-bar.open{ border-color:var(--signal); }
  .svc-caret{ color:var(--text-dim); width:10px; } .svc-id{ color:var(--text-dim); font-size:12px; }
  .svc-ok{ color:var(--ok); font-weight:700; } .svc-bad{ color:var(--flag); font-weight:700; } .svc-dim{ color:var(--text-faint); } .svc-warn{ color:var(--flag); } .svc-on{ color:var(--signal); }
  .svc-hint{ margin-left:auto; color:var(--text-faint); font-size:11.5px; }
  .svc-collapsed > :not(.svc-bar){ display:none !important; }

  /* Rosters tab: big square player photos (like the standalone roster pages) instead of the round avatar */
  #pane-season-squads-rosters .sbc-grid{ grid-template-columns:repeat(auto-fill, minmax(168px, 1fr)); gap:12px; }
  #pane-season-squads-rosters .sbc-card{ padding:0; align-items:stretch; text-align:left; gap:0; overflow:hidden; border-radius:10px; }
  #pane-season-squads-rosters .sbc-card > .ph{ width:100%; height:auto; aspect-ratio:1/1; border-radius:0; border:none; margin:0; overflow:hidden;
    background:linear-gradient(180deg, #243142, #161e29); align-items:flex-end; }
  #pane-season-squads-rosters .sbc-card > .ph img{ border-radius:0; width:100%; height:100%; object-fit:cover; object-position:top; }
  #pane-season-squads-rosters .sbc-card > .ph span{ align-self:center; margin:auto; font-size:40px; color:#3b4a5e; }
  #pane-season-squads-rosters .sbc-card .num{ left:8px; top:8px; right:auto; bottom:auto; min-width:34px; height:30px; border-radius:5px; font-size:17px; padding:0 7px;
    box-shadow:none; border-bottom:3px solid var(--flag-soft, #d9a441); }
  #pane-season-squads-rosters .sbc-card .nm{ padding:9px 10px 0; font-size:14px; white-space:normal; line-height:1.25; }
  #pane-season-squads-rosters .sbc-card .tm{ padding:3px 10px 0; justify-content:flex-start; }
  #pane-season-squads-rosters .sbc-card .rl{ padding:2px 10px 10px; }
  /* the difference strip on top of the card (never over the number) */
  #pane-season-squads-rosters .sbc-card .sr-badge{ position:static; display:block; border-radius:0; text-align:center; padding:3px 8px; font-size:11.5px; }
  /* two images that differ: two halves of the square */
  #pane-season-squads-rosters .sr-ph2{ display:grid; grid-template-columns:1fr 1fr; gap:2px; aspect-ratio:1/1; margin:0; background:var(--bg-inset); }
  #pane-season-squads-rosters .sr-ph2 .ph.sm{ width:100%; height:100%; border-radius:0; border:none; margin:0; overflow:hidden; background:linear-gradient(180deg, #243142, #161e29); position:relative; }
  #pane-season-squads-rosters .sr-ph2 .ph.sm img{ border-radius:0; width:100%; height:100%; object-fit:cover; object-position:top; }
  #pane-season-squads-rosters .sr-ph2 .ph.sm i{ position:absolute; left:4px; bottom:4px; right:auto; background:var(--flag); color:#1b1206; border-radius:4px; padding:1px 5px; font-size:10px; }
  #pane-season-squads-rosters .sr-ph2 .ph.sm span{ margin:auto; font-size:26px; color:#3b4a5e; }
  #pane-season-squads-rosters .sr-ph2 .num{ position:absolute; }

  /* Digital images: bigger player pictures — three per row, as wide as the card allows */
  .digital-images-player-grid{ grid-template-columns:repeat(auto-fill, minmax(330px, 1fr)) !important; gap:14px !important; }
  .digital-images-player-thumbs{ display:grid !important; grid-template-columns:repeat(3, 1fr); gap:8px !important; }
  .digital-images-player-thumbs img{ width:100% !important; height:auto !important; aspect-ratio:3/4; object-fit:cover; object-position:top; border-radius:8px !important;
    background:linear-gradient(180deg, #243142, #161e29) !important; }
  .digital-images-thumb-missing{ width:100% !important; height:auto !important; aspect-ratio:3/4; display:flex !important; align-items:center; justify-content:center; text-align:center;
    padding:6px; font-size:11px; color:var(--text-faint); border-radius:8px !important; }
  .digital-images-thumb-missing.broken{ border-color:var(--flag) !important; color:var(--flag); }

  /* sidebar: the project's host / code / providers line is in the Feeds view (and the Feeds button tooltip) */
  #projectHint{ display:none !important; }

  /* sidebar: hints next to the Competition / Season titles; compact selects (same height as the project one) */
  .side-label-row{ display:flex; align-items:baseline; flex-wrap:wrap; gap:2px 8px; margin-bottom:5px; }
  .side-label-row label{ font-size:13px; font-weight:600; margin:0; }
  .side-label-row .hint{ margin:0 !important; font-size:11.5px; line-height:1.3; flex:1 1 auto; min-width:0; }
  #browseCompetition, #browseSeasonSelect{ font-family:inherit !important; font-size:13px !important; padding:8px 30px 8px 10px !important; background-position:right 10px center !important; }

  /* the header stays put: no elastic "bounce" of the whole page when a scroll reaches the top or the end
     (on macOS the bounce dragged the sticky header up and down with the content) */
  html, body{ overscroll-behavior-y:none; }
  .masthead{ position:sticky; top:0; z-index:60; will-change:transform; }
  /* the real cause: body was exactly one screen tall (html,body{height:100%}) while the page scrolls further, so the
     sticky header — which can only stick inside its parent — left with the body after one screen of scrolling */
  body{ height:auto !important; min-height:100%; }

  /* ---- compact header and sidebar (more room for the content) */
  .masthead{ padding:6px 18px !important; gap:12px !important; min-height:0; }
  .masthead-title{ font-size:17px !important; gap:7px !important; }
  .masthead-title .sub{ font-size:10.5px !important; line-height:1.2; }
  .masthead .brand-mark{ width:20px; height:20px; }
  .masthead .call-log-btn{ padding:4px 11px; font-size:12px; }
  .sidebar{ padding:10px !important; gap:8px !important; top:var(--masthead-h, 46px) !important; }
  .sidebar .panel-block{ padding:10px 11px !important; }
  .sidebar .btn{ padding:6px 6px !important; }
  .sidebar label{ margin-bottom:3px !important; }
  .sidebar #openDayBtn{ margin-bottom:0 !important; }
  .sidebar div[style*="margin-top:8px"]{ margin-top:5px !important; }
  .sidebar div[style*="gap:6px"]{ gap:5px !important; }
  .sidebar .field-row{ margin-top:6px; } .sidebar .field-row:first-child{ margin-top:0; }
  .sidebar #projectPanel select, .sidebar #browseCompetition, .sidebar #browseSeasonSelect, .sidebar #sdpEnvInput{ padding-top:6px !important; padding-bottom:6px !important; }
  .sidebar .hint{ line-height:1.3; }
  /* the content on the right in full screen */
  #mainArea:fullscreen{ overflow:auto; background:var(--bg); padding:18px 26px 40px; }
  #mainFullscreenExit{ position:fixed; top:10px; right:14px; z-index:100; }
  #mainFullscreenBtn.on{ border-color:var(--signal); color:var(--signal); }

  /* sidebar: the resolved SDP / Kama identifiers are in the Info view; the matchday picker opens from Calendar */
  #resolvedIdsPanel, #reopenBrowserBtn{ display:none !important; }


  /* ---- Lineups: one horizontal pitch when there is room (home left attacking right, away right attacking left);
     two vertical pitches side by side on medium widths; one under the other (home first) when narrow */
  .lineups-wrap{ container-type:inline-size; container-name:lineups; }
  .lineups-match{ display:none; margin-bottom:16px; }
  .lineups-wrap .lineups-grid{ grid-template-columns:1fr; }
  @container lineups (min-width: 700px){ .lineups-wrap .lineups-grid{ grid-template-columns:1fr 1fr; } }
  @container lineups (min-width: 1100px){
    .lineups-match{ display:block; }
    /* the vertical pitches give way to the match pitch: their team header and pitch hide, the benches stay */
    .lineups-wrap .lineups-grid .formation-svg, .lineups-wrap .lineups-grid .lineup-head, .lineups-wrap .lineups-grid .lineup-coach{ display:none; }
  }
  .lm-heads{ display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:8px; }
  .lm-head{ display:flex; align-items:center; gap:10px; } .lm-head.away{ flex-direction:row-reverse; text-align:right; }
  .lm-head .lh-team{ font-size:17px; font-weight:700; } .lm-head.home .lh-team{ color:var(--signal); } .lm-head.away .lh-team{ color:var(--flag); }
  .lm-head .lh-logo{ width:30px; height:30px; object-fit:contain; }
  .lm-pitch{ width:100%; height:auto; display:block; background:var(--bg-inset); border-radius:10px; }

  /* ---- Player stats · Top scorers — editorial podium in the app's own dark palette.
     Hierarchy: the leader's card is wider; medal colours (gold / silver / bronze) carry the ranking instead of a
     brand colour; a big outlined rank numeral sits behind each cut-out. The rest is a dense ranking list with a bar
     relative to the leader, so the gaps read at a glance. */
  .ts-bar{ display:flex; gap:14px; align-items:center; flex-wrap:wrap; margin-bottom:14px; }
  .ts-podium{ display:grid; grid-template-columns:1.25fr 1fr 1fr; gap:14px; margin-bottom:18px; }
  @media (max-width: 1100px){ .ts-podium{ grid-template-columns:1fr 1fr; } .ts-hero.first{ grid-column:1 / -1; } }
  @media (max-width: 700px){ .ts-podium{ grid-template-columns:1fr; } }
  .ts-hero{ --medal:#e3b341; position:relative; border-radius:14px; overflow:hidden; background:var(--bg-panel); border:1px solid var(--line); display:flex; flex-direction:column; }
  .ts-hero.silver{ --medal:#b9c3cf; } .ts-hero.bronze{ --medal:#cd8f5e; }
  .ts-hero::before{ content:''; position:absolute; inset:0 0 auto 0; height:3px; background:var(--medal); z-index:2; }
  .ts-hero-ph{ position:relative; aspect-ratio:4/3; overflow:hidden; display:flex; align-items:flex-end; justify-content:center;
    background:radial-gradient(70% 80% at 50% 100%, color-mix(in srgb, var(--medal) 22%, transparent), transparent 70%), linear-gradient(180deg, #161c26, #0e131b); }
  .ts-hero.first .ts-hero-ph{ aspect-ratio:16/11; }
  .ts-bignum{ position:absolute; right:6%; top:-4%; font-size:clamp(120px, 16vw, 230px); font-weight:900; line-height:1; letter-spacing:-6px;
    color:transparent; -webkit-text-stroke:2px color-mix(in srgb, var(--medal) 55%, transparent); opacity:.55; user-select:none; }
  .ts-hero-img{ position:relative; width:100%; height:100%; object-fit:contain; object-position:center bottom; z-index:1; }
  .ts-hero-img.ts-ini{ display:flex; align-items:center; justify-content:center; font-size:64px; font-weight:800; color:var(--text-faint); }
  .ts-hero-info{ display:grid; grid-template-columns:1fr auto; grid-template-rows:auto auto; column-gap:14px; padding:14px 18px 16px; border-top:1px solid var(--line); }
  .ts-hero-meta{ grid-column:1; display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-size:12px; }
  .ts-pos{ color:var(--medal); font-weight:800; text-transform:uppercase; letter-spacing:1.2px; font-size:11px; }
  .ts-team{ display:inline-flex; align-items:center; gap:6px; color:var(--text-dim); } .ts-team img{ width:18px; height:18px; object-fit:contain; }
  .ts-hero-name{ grid-column:1; font-size:22px; font-weight:800; line-height:1.15; margin-top:4px; color:var(--text); }
  .ts-hero.first .ts-hero-name{ font-size:28px; }
  .ts-goals{ grid-column:2; grid-row:1 / span 2; display:flex; flex-direction:column; align-items:flex-end; justify-content:center; }
  .ts-goals b{ font-size:44px; line-height:.9; font-weight:900; color:var(--medal); font-variant-numeric:tabular-nums; }
  .ts-hero.first .ts-goals b{ font-size:58px; }
  .ts-goals span{ font-size:11px; text-transform:uppercase; letter-spacing:1.2px; color:var(--text-dim); margin-top:4px; }
  .ts-list{ display:grid; grid-template-columns:repeat(auto-fill, minmax(420px, 1fr)); column-gap:28px; background:var(--bg-panel); border:1px solid var(--line); border-radius:14px; padding:6px 18px; }
  .ts-row{ display:grid; grid-template-columns:30px 44px minmax(0, 1fr) 90px 34px; align-items:center; gap:12px; padding:9px 0; border-bottom:1px solid var(--line-soft); }
  .ts-rank{ font-size:15px; font-weight:800; color:var(--text-dim); text-align:right; font-variant-numeric:tabular-nums; } .ts-rank.tie{ color:var(--text-faint); font-weight:600; }
  .ts-av-img{ width:44px; height:44px; border-radius:50%; object-fit:cover; object-position:top; background:var(--bg-inset); display:block; }
  .ts-av-img.ts-ini{ display:flex; align-items:center; justify-content:center; font-weight:800; font-size:13px; color:var(--text-dim); }
  .ts-name{ font-size:15px; font-weight:700; line-height:1.2; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .ts-club{ display:flex; align-items:center; gap:5px; font-size:12px; color:var(--text-dim); margin-top:2px; } .ts-club img{ width:14px; height:14px; object-fit:contain; }
  .ts-meter{ height:6px; background:var(--line-soft); border-radius:3px; overflow:hidden; } .ts-meter i{ display:block; height:100%; background:var(--signal); border-radius:3px; opacity:.85; }
  .ts-g{ font-size:20px; font-weight:800; text-align:right; font-variant-numeric:tabular-nums; }

  /* header on narrow windows: the match / view title shrinks (ellipsis); the buttons are one group that never
     shrinks or overlaps — when it doesn't fit next to the title it moves, whole, to a second row on the right */
  .masthead{ flex-wrap:wrap !important; row-gap:6px !important; }
  .masthead > .masthead-title{ flex:0 0 auto; }
  .masthead > .masthead-match{ flex:1 1 560px; min-width:0; overflow:hidden; }   /* below ~560 px of title the buttons move to their own row instead of squeezing the names */
  /* inside the match header, who gives way first: the context (competition · season · MD) shrinks with "…", then
     the team names; the status / live / watched pills keep their size — nothing is drawn over anything else */
  .masthead > .masthead-match > *{ flex:0 0 auto; }
  .masthead > .masthead-match > .match-context{ flex:0 1000 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .masthead > .masthead-match > .match-name{ flex:0 1 auto; min-width:80px; overflow:hidden; }
  .masthead > .masthead-match > .match-meta{ flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .masthead-actions{ display:flex; align-items:center; flex:0 0 auto; margin-left:auto; flex-wrap:wrap; justify-content:flex-end; row-gap:6px; }
  .masthead-actions > button{ flex:0 0 auto; white-space:nowrap; }
  @media (max-width: 1000px){ .masthead-title .sub{ display:none; } }

  /* SDP mirror tables */
  .mir-sum{ display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; font-size:13px; margin-bottom:4px; }
  .mir-table td{ vertical-align:top; } .mir-row{ cursor:pointer; } .mir-row:hover td{ background:var(--bg-panel); }
  .mir-row.differs td:first-child, .mir-row.only-here td:first-child, .mir-row.only-upstream td:first-child{ box-shadow:inset 3px 0 0 var(--flag); }
  .mir-table tr.differs td{ background:rgba(240,160,60,0.07); }
  .mir-logo{ width:20px; height:20px; object-fit:contain; vertical-align:middle; margin-right:8px; }
  .mir-diffs{ display:flex; flex-wrap:wrap; gap:4px 6px; } .mir-chip{ background:var(--bg-inset); border:1px solid var(--line); border-radius:6px; padding:2px 7px; font-size:12px; }

  /* failed requests are not printed in the sidebar (they are in the Call log, whose button counts them) */
  .call-log-err{ margin-left:6px; color:var(--flag); font-weight:700; }

  /* "Loading data" indicator: under the header, over the content on the right (inside it in full screen) */
  .sv-busy{ position:fixed; top:var(--masthead-h, 49px); left:0; right:0; z-index:70; pointer-events:none; opacity:0; transition:opacity .15s; }
  .sv-busy.on{ opacity:1; }
  #mainArea:fullscreen .sv-busy{ top:0; }
  .sv-busy-bar{ height:3px; background:linear-gradient(90deg, transparent 0%, var(--signal) 40%, var(--signal) 60%, transparent 100%); background-size:40% 100%; background-repeat:no-repeat;
    animation:svBusyMove 1.1s ease-in-out infinite; }
  @keyframes svBusyMove{ 0%{ background-position:-40% 0; } 100%{ background-position:140% 0; } }
  .sv-busy-text{ position:absolute; right:14px; top:6px; font-size:11.5px; color:var(--text-dim); background:var(--bg-panel); border:1px solid var(--line);
    border-radius:999px; padding:2px 10px; max-width:60vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; box-shadow:0 2px 8px rgba(0,0,0,.3); }
  @media (prefers-reduced-motion: reduce){ .sv-busy-bar{ animation:none; background:var(--signal); opacity:.6; } }

  /* Live monitoring */
  .live-table td{ vertical-align:top; font-size:12.5px; line-height:1.45; }
  .live-table td.live-bad{ background:var(--flag-soft); box-shadow:inset 3px 0 0 var(--flag); }
  .live-min{ display:inline-block; font-family:var(--mono); font-weight:700; font-size:15px; color:var(--signal); }
  .live-match a{ display:flex; flex-direction:column; gap:3px; text-decoration:none; color:var(--text); }
  .live-team{ display:inline-flex; align-items:center; gap:7px; } .live-club{ width:24px; height:24px; object-fit:contain; flex:0 0 auto; }
  .live-score{ font-family:var(--mono); font-weight:800; font-size:15px; padding-left:31px; color:var(--signal); }
  .live-brd{ display:inline-block; margin:0 6px 4px 0; } .live-brd img{ height:22px; max-width:90px; object-fit:contain; vertical-align:middle; background:#fff; border-radius:4px; padding:2px 4px; }
  .live-brd-txt{ font-size:12px; font-weight:600; }
  .live-table td.live-err{ background:var(--orphan-soft); box-shadow:inset 3px 0 0 var(--orphan); }
  .live-hm{ display:flex; gap:4px; margin-top:4px; } .live-hm a{ display:block; width:58px; height:40px; border-radius:4px; overflow:hidden; background:var(--bg-inset); border:1px solid var(--line); }
  .live-hm img{ width:100%; height:100%; object-fit:cover; display:block; } .live-hm a.broken{ border-color:var(--flag); }
  .live-hm-none{ display:inline-flex; align-items:center; justify-content:center; width:58px; height:40px; border:1px dashed var(--line); border-radius:4px; color:var(--text-faint); }
  .live-ev{ min-width:150px; } .live-ev-row{ white-space:nowrap; font-size:12px; } .live-ev-row.away{ text-align:right; }
  .live-card{ display:inline-block; width:8px; height:11px; border-radius:1.5px; vertical-align:-1px; }
  .live-card.y{ background:#f5c518; } .live-card.r{ background:#e5484d; } .live-card.y2{ background:linear-gradient(135deg, #f5c518 50%, #e5484d 50%); }
  .live-com{ min-width:170px; max-width:240px; } .live-com-text{ margin-top:4px; font-style:italic; color:var(--signal); white-space:normal; line-height:1.35; }
  .live-lu + .live-lu{ margin-top:6px; } .live-lu-head{ display:flex; align-items:center; gap:6px; white-space:nowrap; }
  .live-club.sm{ width:18px; height:18px; } .live-lu-form{ padding-left:24px; color:var(--text-dim); font-size:12px; white-space:nowrap; }
  .live-lu{ min-width:92px; } .live-table td{ white-space:normal; } .live-table td.live-kpi{ white-space:nowrap; }
  .live-actions{ display:flex; flex-direction:column; align-items:flex-start; gap:8px; } .live-actions .badge{ white-space:nowrap; } .live-actions .call-log-btn{ margin-top:2px; }
  .live-dist-grid{ display:grid; grid-template-columns:auto auto; gap:8px; min-width:136px; }
  .live-dist{ display:flex; flex-direction:column; gap:4px; } .live-dist.home{ align-items:flex-start; } .live-dist.away{ align-items:flex-end; }
  .live-dist-head{ display:flex; align-items:center; gap:5px; white-space:nowrap; }
  .live-hm-a{ display:block; width:58px; height:40px; border-radius:4px; overflow:hidden; background:var(--bg-inset); border:1px solid var(--line); }
  .live-hm-a img{ width:100%; height:100%; object-fit:cover; display:block; } .live-hm-a.broken{ border-color:var(--flag); }
  .live-kpi-grid{ display:grid; grid-template-columns:auto auto auto; column-gap:8px; row-gap:3px; align-items:center; min-width:96px; }
  .live-kpi-grid .h{ justify-self:start; } .live-kpi-grid .a{ justify-self:end; } .live-kpi-grid .lbl{ justify-self:center; font-size:10.5px; color:var(--text-faint); text-transform:uppercase; }
  .live-title{ display:flex; align-items:center; gap:12px; } .live-comp-logo{ height:44px; width:auto; max-width:120px; object-fit:contain; border-radius:6px; background:#fff; padding:3px; }
  /* Live: bigger team names, score and header minute */
  .live-match .live-team b{ font-size:16px; } .live-club{ width:28px; height:28px; }
  .live-score{ font-size:20px; padding-left:35px; line-height:1.2; }
  .live-table td:nth-child(3) .live-min{ font-size:20px; line-height:1.15; }   /* the Status (header) column */
  .live-table td.live-match{ min-width:160px; } .live-score, .live-team{ white-space:nowrap; }

  /* ---- Live monitoring, responsive: a table when there is room; below ~1250 px of content one card per match
     (each value under its column's name), two to four values per row on tablets, two on phones — no scrollbars */
  #liveArea{ container-type:inline-size; container-name:live; }
  #liveArea .table-toolbar{ flex-wrap:wrap; }
  @container live (max-width: 1250px){
    .live-wrap, .live-wrap .scroll{ overflow:visible !important; border:none; background:none; }
    .live-table, .live-table tbody{ display:block; width:100%; }
    .live-table thead{ display:none; }
    .live-table tr{ display:grid; grid-template-columns:repeat(auto-fill, minmax(170px, 1fr)); gap:10px 14px; padding:12px 14px; margin:0 0 12px;
      background:var(--bg-panel); border:1px solid var(--line); border-radius:12px; }
    .live-table td{ display:block; padding:0 !important; border:none !important; min-width:0 !important; max-width:none !important; }
    .live-table td::before{ content:attr(data-label); display:block; font-size:10.5px; letter-spacing:.6px; text-transform:uppercase; color:var(--text-faint); margin-bottom:3px; }
    .live-table td[data-label=""]::before, .live-table td[data-label="Match"]::before, .live-table td[data-label="KO"]::before{ display:none; }
    /* the header of the card: kickoff, match, verdict + Force on one line */
    .live-table td[data-label="KO"]{ grid-column:1 / -1; order:-3; font-size:12px; color:var(--text-dim); }
    .live-table td[data-label="Match"]{ grid-column:1 / -1; order:-2; }
    .live-table td[data-label=""]{ grid-column:1 / -1; order:-1; }
    .live-table td[data-label=""] .live-actions{ flex-direction:row; flex-wrap:wrap; align-items:center; }
    .live-table td.live-bad, .live-table td.live-err{ padding:6px 8px !important; border-radius:8px; }
    .live-match a{ flex-direction:row; flex-wrap:wrap; align-items:center; gap:6px 10px; }
    .live-score{ padding-left:0; }
    .live-com{ grid-column:span 2; }
  }
  @container live (max-width: 460px){
    .live-table tr{ grid-template-columns:1fr 1fr; padding:10px; gap:10px; }
    .live-com, .live-ev{ grid-column:1 / -1; }
    .live-match .live-team b{ font-size:15px; } .live-score{ font-size:18px; }
  }
  /* phones: the content area is at least a screen tall, so opening a view can bring it to the top of the screen */
  @media (max-width: 900px){ #mainArea{ min-height:100vh; } }
  /* phones: the sidebar is stacked above the content and scrolls with the page (sticky, it covered the content) */
  @media (max-width: 900px){ .sidebar{ position:static !important; top:auto !important; max-height:none !important; height:auto !important; overflow:visible !important; } }

  /* ---- Live monitoring · match cards */
  .lc-summary{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:4px 0 14px; }
  .lc-filter{ background:var(--bg-panel); border:1px solid var(--line); color:var(--text-dim); border-radius:999px; padding:5px 12px; font-size:12.5px; cursor:pointer; font-family:inherit; }
  .lc-filter span{ color:var(--text); font-weight:700; margin-left:3px; } .lc-filter.on{ border-color:var(--signal); color:var(--text); background:rgba(79,142,255,.12); }
  .lc-sum-txt{ margin-left:auto; font-size:12.5px; color:var(--text-dim); } .lc-sum-txt .e{ color:var(--orphan); }
  .lc-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(min(100%, 540px), 1fr)); gap:14px; }
  .lc{ background:var(--bg-panel); border:1px solid var(--line); border-radius:14px; padding:12px 16px 10px; display:flex; flex-direction:column; gap:10px; min-width:0; }
  .lc.has-err{ border-color:rgba(229,72,77,.55); box-shadow:inset 3px 0 0 var(--orphan); } .lc.has-warn{ box-shadow:inset 3px 0 0 var(--flag); }
  .lc.finished{ opacity:.96; }
  .lc-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
  .lc-meta{ display:flex; align-items:center; gap:10px; font-size:12px; color:var(--text-dim); } .lc-time{ color:var(--text-faint); }
  .lc-live{ display:inline-flex; align-items:center; gap:6px; font-family:var(--mono); font-weight:800; font-size:15px; color:var(--orphan); }
  .lc-live i{ width:8px; height:8px; border-radius:50%; background:var(--orphan); animation:lcPulse 1.4s infinite; }
  @keyframes lcPulse{ 0%{ box-shadow:0 0 0 0 rgba(229,72,77,.6); } 70%{ box-shadow:0 0 0 7px rgba(229,72,77,0); } 100%{ box-shadow:0 0 0 0 rgba(229,72,77,0); } }
  .lc-ft{ font-family:var(--mono); font-weight:800; color:var(--text-dim); border:1px solid var(--line); border-radius:6px; padding:1px 6px; }
  .lc-ko{ font-family:var(--mono); font-weight:700; color:var(--text); }
  .lc-verdict{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
  .lc-force{ width:30px; height:30px; border-radius:50%; border:1px solid var(--line); background:var(--bg-inset); color:var(--text); cursor:pointer; font-size:15px; }
  .lc-force:hover{ border-color:var(--signal); color:var(--signal); }
  .lc-board{ display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px; text-decoration:none; color:var(--text); padding:4px 0; }
  .lc-team{ display:flex; align-items:center; gap:10px; min-width:0; } .lc-team.away{ justify-content:flex-end; text-align:right; }
  .lc-logo{ width:40px; height:40px; object-fit:contain; flex:0 0 auto; }
  .lc-name{ font-size:18px; font-weight:800; line-height:1.15; overflow-wrap:anywhere; }
  .lc-scorers{ display:flex; flex-direction:column; font-size:11.5px; color:var(--text-dim); margin-top:2px; } .lc-scorers .mono{ color:var(--text-faint); }
  .lc-score{ text-align:center; font-family:var(--mono); font-weight:900; font-size:32px; line-height:1; white-space:nowrap; }
  .lc-score i{ font-style:normal; color:var(--text-faint); margin:0 6px; } .lc-score .vs{ font-size:16px; color:var(--text-faint); } .lc-pen{ font-size:11px; color:var(--text-dim); margin-top:3px; }
  .lc-health{ display:flex; flex-wrap:wrap; gap:6px; }
  .lc-chip{ display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:var(--bg-inset); border-radius:999px; padding:3px 10px 3px 8px; font-size:12px; white-space:nowrap; }
  .lc-chip i{ width:7px; height:7px; border-radius:50%; background:var(--ok); } .lc-chip b{ font-weight:600; color:var(--text-dim); } .lc-chip span{ font-family:var(--mono); color:var(--text); }
  .lc-chip.warn{ border-color:rgba(240,160,60,.6); } .lc-chip.warn i{ background:var(--flag); } .lc-chip.err{ border-color:rgba(229,72,77,.65); background:var(--orphan-soft); } .lc-chip.err i{ background:var(--orphan); }
  .lc-chip.na i, .lc-chip.neutral i{ background:var(--text-faint); } .lc-chip.na{ opacity:.65; }
  .lc-timeline{ position:relative; height:46px; margin:2px 6px 0; }
  .tl-track{ position:absolute; left:0; right:0; top:22px; height:4px; background:var(--line); border-radius:2px; overflow:hidden; } .tl-fill{ height:100%; background:var(--signal); opacity:.7; }
  .tl-ht{ position:absolute; top:0; bottom:0; width:2px; background:var(--bg-panel); }
  .tl-ev{ position:absolute; transform:translateX(-50%); font-size:12px; line-height:1; cursor:default; } .tl-ev.home{ top:4px; } .tl-ev.away{ top:30px; }
  .tl-card{ display:inline-block; width:8px; height:11px; border-radius:1.5px; } .tl-card.y{ background:#f5c518; } .tl-card.r{ background:#e5484d; } .tl-card.y2{ background:linear-gradient(135deg, #f5c518 50%, #e5484d 50%); }
  .tl-ball{ font-style:normal; }
  .tl-lbl{ position:absolute; bottom:-12px; transform:translateX(-50%); font-size:9.5px; color:var(--text-faint); font-family:var(--mono); } .tl-lbl[style*="left:0"]{ transform:none; } .tl-lbl.end{ right:0; transform:none; }
  .lc-h2h{ display:flex; flex-direction:column; gap:6px; border-top:1px solid var(--line); padding-top:10px; margin-top:4px; }
  .lc-row{ display:grid; grid-template-columns:1fr 120px 1fr; align-items:center; gap:10px; font-size:13px; }
  .lc-row .l{ text-align:left; } .lc-row .r{ text-align:right; } .lc-row .m{ text-align:center; font-size:10.5px; text-transform:uppercase; letter-spacing:.6px; color:var(--text-faint); }
  .lc-row.dist .m{ text-transform:none; }
  .lc-bar{ display:flex; justify-content:center; height:6px; background:var(--line-soft); border-radius:3px; overflow:hidden; }
  .lc-bar .h{ background:var(--signal); margin-left:auto; } .lc-bar .a{ background:var(--flag); margin-right:auto; } .lc-bar i{ display:block; height:100%; }
  .lc-row.hmrow .r{ display:flex; justify-content:flex-end; }
  .lc-hm{ display:inline-block; width:92px; height:62px; border-radius:6px; overflow:hidden; border:1px solid var(--line); background:var(--bg-inset); }
  .lc-hm img{ width:100%; height:100%; object-fit:cover; display:block; } .lc-hm.none{ display:inline-flex; align-items:center; justify-content:center; font-size:11px; color:var(--text-faint); border-style:dashed; }
  .lc-hm.broken{ border-color:var(--flag); }
  .lc-details summary{ cursor:pointer; font-size:12px; color:var(--text-dim); list-style:none; } .lc-details summary::before{ content:'\25B8  '; } .lc-details[open] summary::before{ content:'\25BE  '; }
  .lc-det-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:12px; margin-top:8px; font-size:12.5px; }
  .lc-det-h{ font-size:10.5px; text-transform:uppercase; letter-spacing:.6px; color:var(--text-faint); margin-bottom:4px; } .lc-det-wide{ grid-column:1 / -1; }
  .lc-state{ border-collapse:collapse; font-size:12px; } .lc-state td, .lc-state th{ padding:2px 8px 2px 0; text-align:left; } .lc-state th{ color:var(--text-faint); font-weight:500; }
  .lc-quote{ margin-top:4px; font-style:italic; color:var(--signal); }
  .lc-find{ padding:3px 8px; border-left:3px solid var(--text-faint); margin:3px 0; } .lc-find.err{ border-color:var(--orphan); } .lc-find.warn{ border-color:var(--flag); }
  @container live (max-width: 560px){
    .lc{ padding:10px 12px; } .lc-name{ font-size:15px; } .lc-logo{ width:30px; height:30px; } .lc-score{ font-size:26px; }
    .lc-row{ grid-template-columns:1fr 84px 1fr; } .lc-hm{ width:72px; height:48px; }
  }
  .lc-grid{ align-items:start; }

  /* match cards v2: aligned scoreboard, same height per row, overall status footer */
  .lc-grid{ align-items:stretch !important; }
  .lc-board{ grid-template-columns:1fr auto 1fr; grid-template-rows:auto auto; row-gap:4px; }
  .lc-team{ align-self:center; } .lc-name{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .lc-scorers{ display:flex; flex-direction:column; gap:1px; font-size:11.5px; color:var(--text-dim); min-height:0; margin:0; }
  .lc-scorers.home{ padding-left:50px; text-align:left; } .lc-scorers.away{ padding-right:50px; text-align:right; }
  .lc-details{ margin-top:auto; }
  .lc-foot{ display:flex; align-items:baseline; gap:8px; margin:2px -16px -10px; padding:8px 16px; border-top:1px solid var(--line); border-radius:0 0 14px 14px; font-size:12.5px; min-width:0; }
  .lc-foot .i{ font-weight:900; } .lc-foot b{ white-space:nowrap; } .lc-foot .msg{ color:var(--text-dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
  .lc-foot.ok{ background:rgba(45,189,110,.08); color:var(--ok); } .lc-foot.warn{ background:var(--flag-soft); color:var(--flag); } .lc-foot.err{ background:var(--orphan-soft); color:var(--orphan); } .lc-foot.na{ color:var(--text-faint); }
  @container live (max-width: 560px){ .lc-scorers.home{ padding-left:40px; } .lc-scorers.away{ padding-right:40px; } .lc-foot{ margin:2px -12px -10px; padding:8px 12px; } .lc-foot .msg{ white-space:normal; } }

  /* match cards v3: the overall status as the card's top band (state · check summary · checked at · Force) */
  .lc-grid{ align-items:start !important; }
  .lc-details{ margin-top:0; }
  .lc-band{ display:flex; align-items:center; gap:10px; margin:-12px -16px 0; padding:8px 12px 8px 16px; border-radius:14px 14px 0 0; border-bottom:1px solid var(--line); min-width:0; font-size:12.5px; }
  .lc-band .lc-state{ flex:0 0 auto; display:flex; align-items:center; }
  .lc-sum{ flex:1 1 auto; display:flex; align-items:baseline; gap:7px; min-width:0; }
  .lc-sum .i{ font-weight:900; } .lc-sum b{ white-space:nowrap; } .lc-sum .msg{ color:var(--text-dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
  .lc-band .lc-time{ flex:0 0 auto; font-size:11.5px; color:var(--text-faint); font-family:var(--mono); }
  /* green stays quiet (many cards are fine), orange and red are full */
  .lc-band.ok{ background:rgba(45,189,110,.05); } .lc-band.ok .lc-sum{ color:var(--ok); } .lc-band.ok .lc-sum .msg{ color:var(--text-faint); }
  .lc-band.warn{ background:var(--flag-soft); } .lc-band.warn .lc-sum{ color:var(--flag); }
  .lc-band.err{ background:var(--orphan-soft); } .lc-band.err .lc-sum{ color:var(--orphan); }
  .lc-band.na .lc-sum{ color:var(--text-faint); }
  .lc.has-err, .lc.has-warn{ box-shadow:none; }
  .lc.has-err{ border-color:rgba(229,72,77,.6); } .lc.has-warn{ border-color:rgba(240,160,60,.5); }
  @container live (max-width: 560px){ .lc-band{ margin:-10px -12px 0; padding:8px 10px; flex-wrap:wrap; } .lc-sum{ order:3; flex-basis:100%; } .lc-sum .msg{ white-space:normal; } }
  .hm-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap:16px; }
  .hm-card{ margin:0; background:var(--bg-panel); border:1px solid var(--line); border-radius:12px; padding:10px; } .hm-card figcaption{ font-weight:700; margin-bottom:8px; }
  .hm-card img{ width:100%; height:auto; display:block; border-radius:8px; }
  .live-bar{ align-items:center; } .live-bar .live-comp-logo{ height:36px; padding:2px; margin-right:4px; }
  .live-count{ font-family:var(--mono); font-size:12px; color:var(--text-faint); min-width:96px; }
  .live-section{ margin-top:0; }
  .live-by{ display:inline-flex; border:1px solid var(--line); border-radius:999px; overflow:hidden; margin-right:4px; }
  .live-by button{ background:transparent; border:0; color:var(--text-dim); padding:5px 12px; font:inherit; font-size:12.5px; cursor:pointer; }
  .live-by button.on{ background:rgba(79,142,255,.16); color:var(--text); font-weight:700; }

  /* ================= Light theme (html[data-theme="light"]; "auto" resolves to light / dark from the system) =================
     the same variables with light values; then the few components that had colours written for the dark background */
  html[data-theme="dark"]{ color-scheme:dark; }
  html[data-theme="light"]{
    color-scheme:light;
    --bg: #F3F5F9; --bg-raised: #FFFFFF; --bg-panel: #FFFFFF; --bg-inset: #EEF1F6;
    --line: #D8DEE7; --line-soft: #E7EBF1;
    --text: #111827; --text-dim: #4B5563; --text-faint: #8A94A3;
    --signal: #2563EB; --signal-soft: rgba(37,99,235,0.10);
    --accent-live: #D2392B; --accent-live-soft: rgba(210,57,43,0.10);
    --ok: #15803D; --ok-soft: rgba(21,128,61,0.10);
    --flag: #B45309; --flag-soft: rgba(180,83,9,0.10);
    --dup: #0E7490; --dup-soft: rgba(14,116,144,0.10);
    --orphan: #DC2626; --orphan-soft: rgba(220,38,38,0.09);
  }
  html[data-theme="light"] body{ background:var(--bg); color:var(--text); }
  html[data-theme="light"] .masthead{ background:linear-gradient(180deg, #FFFFFF, #F6F8FB); box-shadow:0 1px 0 rgba(37,99,235,0.12); }
  html[data-theme="light"] ::selection{ background-color:rgba(37,99,235,0.18); }
  /* overlays drawn as white-on-dark become dark-on-light */
  html[data-theme="light"] .call-log-btn, html[data-theme="light"] .btn{ box-shadow:none; }
  html[data-theme="light"] .note-box{ background:var(--bg-inset); }
  html[data-theme="light"] .tabbar .tab-btn.active, html[data-theme="light"] .tab-btn.active{ color:var(--text); }
  html[data-theme="light"] .badge.ok{ background:rgba(21,128,61,0.10); } html[data-theme="light"] .badge.flag{ background:rgba(180,83,9,0.10); } html[data-theme="light"] .badge.orphan{ background:rgba(220,38,38,0.08); }
  html[data-theme="light"] .lc-chip{ background:#F7F9FC; } html[data-theme="light"] .lc-band.ok{ background:rgba(21,128,61,0.05); }
  html[data-theme="light"] .lc-filter{ background:#FFFFFF; } html[data-theme="light"] .lc-filter.on{ background:rgba(37,99,235,0.08); }
  html[data-theme="light"] .ts-hero-ph{ background:radial-gradient(70% 80% at 50% 100%, color-mix(in srgb, var(--medal) 26%, transparent), transparent 70%), linear-gradient(180deg, #F3F5F9, #E6EAF1); }
  html[data-theme="light"] .lc, html[data-theme="light"] .section, html[data-theme="light"] .table-wrap{ box-shadow:0 1px 2px rgba(17,24,39,0.04); }
  html[data-theme="light"] .live-comp-logo, html[data-theme="light"] .live-brd img{ background:transparent; }
  html[data-theme="light"] .tl-ht{ background:var(--bg-panel); }
  html[data-theme="light"] .hm-card img, html[data-theme="light"] .lc-hm{ border-color:var(--line); }
  /* blocks that are dark by design (neon charts of Standing analysis, Fantacalcio) keep their own dark panel */
  #themeBtn{ min-width:78px; }
  .masthead-actions{ gap:8px; } .masthead-actions > button{ margin-right:0 !important; }

  /* ---- light theme, second pass: the components that were drawn for a dark background */
  /* Teams overview: last result / next match boxes (they inherited the translucent dark of the hero links) */
  html[data-theme="light"] a.tov-box.tov-link{ background:var(--bg-inset); border:1px solid var(--line); color:var(--text); backdrop-filter:none; }
  html[data-theme="light"] a.tov-box.tov-link:hover{ background:#FFFFFF; border-color:var(--signal); }
  html[data-theme="light"] .tov-side{ color:var(--text-dim); } html[data-theme="light"] .tov-side.me, html[data-theme="light"] .tov-side .gl{ color:var(--text); }
  html[data-theme="light"] .tov-md{ background:#FFFFFF; } html[data-theme="light"] .tov-res.D{ background:#FFFFFF; border:1px solid var(--line); }
  /* player photos: a light backdrop instead of the dark slate gradient */
  html[data-theme="light"] #pane-season-squads-rosters .sbc-card > .ph,
  html[data-theme="light"] #pane-season-squads-rosters .sr-ph2 .ph.sm,
  html[data-theme="light"] .digital-images-player-thumbs img{ background:linear-gradient(180deg, #EEF2F7, #DCE3EC) !important; }
  html[data-theme="light"] #pane-season-squads-rosters .sbc-card > .ph span{ color:#9AA6B4; }
  html[data-theme="light"] .digital-images-detail-photo, html[data-theme="light"] .dit-frame:not(.dark){ background:var(--bg-inset); }
  /* Matchday map: light panels over the light 3D scene */
  html[data-theme="light"] .mdm-wrap{ background:#E8EDF4; background-image:radial-gradient(circle at 50% 50%, #F4F7FB 0%, #DDE4ED 100%); border-color:var(--line); }
  html[data-theme="light"] .mdm-ui, html[data-theme="light"] .mdm-pos, html[data-theme="light"] .mdm-feedbox, html[data-theme="light"] .mdm-hint{ background:rgba(255,255,255,0.92); border-color:var(--line); color:var(--text); box-shadow:0 10px 30px rgba(17,24,39,0.12); }
  html[data-theme="light"] .mdm-card{ background:rgba(255,255,255,0.95); border-color:var(--line); color:var(--text-dim); box-shadow:0 6px 18px rgba(17,24,39,0.15); }
  html[data-theme="light"] .mdm-select, html[data-theme="light"] .mdm-btn, html[data-theme="light"] .mdm-toggle, html[data-theme="light"] .mdm-wbtn{ background-color:#FFFFFF; color:var(--text); border-color:var(--line); }
  html[data-theme="light"] .mdm-toggle.active, html[data-theme="light"] .mdm-toggle.on:not(.gold){ background:var(--signal); color:#fff; border-color:var(--signal); }
  html[data-theme="light"] .mdm-loader{ color:var(--signal); text-shadow:none; }
  html[data-theme="light"] .mdm-ui *:not(.mdm-toggle):not(.mdm-select):not(.mdm-btn):not(img){ border-color:var(--line); }
  html[data-theme="light"] .mdm-ui, html[data-theme="light"] .mdm-ui .hint, html[data-theme="light"] .mdm-pos .hint{ color:var(--text-dim); }
  html[data-theme="light"] .mdm-ui h3, html[data-theme="light"] .mdm-ui b, html[data-theme="light"] .mdm-card b{ color:var(--text); }
  /* Standing analysis: the panels in light colours (the team colours of the lines stay) */
  html[data-theme="light"] .sa-panel{ background:#FFFFFF; border-color:var(--line); box-shadow:0 1px 3px rgba(17,24,39,0.08); }
  html[data-theme="light"] .sa-phead{ border-bottom-color:var(--line); }
  html[data-theme="light"] .sa-btitle{ text-shadow:none; filter:brightness(0.75) saturate(1.2); }
  html[data-theme="light"] .sa-btn{ background:#FFFFFF; border-color:var(--line); color:var(--text-dim); }
  html[data-theme="light"] .sa-btn:hover, html[data-theme="light"] .sa-btn.active{ background:var(--signal); border-color:var(--signal); color:#fff; box-shadow:none; }
  html[data-theme="light"] .sa-tg-axis{ background:linear-gradient(to top, #D8DEE7, #9AA6B4, var(--signal)); }
  html[data-theme="light"] .sa-tbadge{ background:#F3F5F9; color:var(--text); box-shadow:none; }
  html[data-theme="light"] .sa-panel svg text{ fill:var(--text-dim); }
  /* squad contribution cards */
  html[data-theme="light"] .sc-card{ background:#FFFFFF; border-color:var(--line); box-shadow:0 1px 3px rgba(17,24,39,0.08); }
  html[data-theme="light"] .sc-toggle{ background:var(--bg-inset); border-color:var(--line); }
  html[data-theme="light"] .sc-bench{ background:#F3F5F9; border-color:var(--line); color:#8A94A3; } html[data-theme="light"] .sc-unknown{ background:#CBD5E1; }
  html[data-theme="light"] .sc-bar{ background:#E2E8F0; }
  html[data-theme="light"] .mdm-card .mc-row{ color:var(--text-dim); } html[data-theme="light"] .mdm-card .mc-row.lead, html[data-theme="light"] .mdm-card .mc-score, html[data-theme="light"] .mdm-card .mc-status.live{ color:var(--text); }
  html[data-theme="light"] .mdm-card .mc-city{ color:var(--text-faint); } html[data-theme="light"] .mdm-card .mc-sep{ background:var(--line); }
  html[data-theme="light"] .mdm-card .mc-status.ns{ color:#0E7490; } html[data-theme="light"] .mdm-card .mc-status.ht{ color:var(--flag); } html[data-theme="light"] .mdm-card.focused .mc-city{ color:var(--ok); }
  html[data-theme="light"] .mdm-card .mc-compact{ color:var(--text); }

  .mon-more{ font:inherit; font-size:11.5px; color:var(--text-dim); background:transparent; border:1px dashed var(--line); border-radius:999px; padding:2px 10px; margin:2px 4px 2px 0; cursor:pointer; }
  .mon-more:hover{ color:var(--text); border-color:var(--text-faint); }

  /* ================= Light theme, design pass 3: contrast, surfaces, controls =================
     1 contrast: secondary text #374151 (10:1) and tertiary #6B7280 (4.8:1, AA) — before #4B5563 / #8A94A3 (3.3:1, below AA)
     2 surfaces: page a shade darker, panels white with a hairline and a soft shadow — clear page / card separation
     3 controls: white buttons with a visible border (they were grey on grey), blue for the selected one */
  html[data-theme="light"]{
    --bg: #ECEFF4; --bg-raised: #FFFFFF; --bg-panel: #FFFFFF; --bg-inset: #F6F8FB;
    --line: #D3DAE3; --line-soft: #E6EAF0;
    --text: #0F172A; --text-dim: #374151; --text-faint: #6B7280;
  }
  html[data-theme="light"] .sidebar{ background:#F7F8FB; border-right:1px solid var(--line); }
  html[data-theme="light"] .sidebar .card, html[data-theme="light"] .sidebar details.advanced, html[data-theme="light"] .section, html[data-theme="light"] .mon-card,
  html[data-theme="light"] .table-wrap{ background:#FFFFFF; border-color:var(--line); box-shadow:0 1px 2px rgba(16,24,40,0.05); }
  html[data-theme="light"] .btn{ background:#FFFFFF; border-color:#CBD5E1; color:#0F172A; box-shadow:0 1px 1px rgba(16,24,40,0.04); }
  html[data-theme="light"] .btn:hover{ background:#F1F5F9; border-color:#94A3B8; }
  html[data-theme="light"] .btn.active, html[data-theme="light"] .btn[aria-current], html[data-theme="light"] .sidebar .btn.is-current{ background:rgba(37,99,235,0.08); border-color:var(--signal); color:var(--signal); }
  html[data-theme="light"] .call-log-btn{ background:#FFFFFF; border-color:#CBD5E1; color:#1F2937; }
  html[data-theme="light"] .call-log-btn:hover{ background:#F1F5F9; border-color:#94A3B8; color:#0F172A; }
  html[data-theme="light"] select, html[data-theme="light"] input[type="text"], html[data-theme="light"] input[type="search"], html[data-theme="light"] input[type="number"], html[data-theme="light"] input[type="date"],
  html[data-theme="light"] .lsel-btn{ background-color:#FFFFFF; border-color:#CBD5E1; color:#0F172A; }
  html[data-theme="light"] .tab-btn{ color:#4B5563; } html[data-theme="light"] .tab-btn.active{ color:#0F172A; }
  /* Monitor: watched checks read as chips, the rest is folded */
  html[data-theme="light"] .mon-chk{ background:#FFFFFF; }
  html[data-theme="light"] .mon-chk.ok{ background:rgba(21,128,61,0.07); }
  html[data-theme="light"] .mon-chk.off{ background:transparent; border-style:dashed; color:#6B7280; }

  /* light theme: the drop-down arrow of every <select> in a darker grey (it was set for dark backgrounds) */
  html[data-theme="light"] select:not([multiple]):not([size]), html[data-theme="light"] .lsel-btn{ background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" fill="none" stroke="%23475569" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>'); background-repeat:no-repeat; background-position:right 10px center; }

  /* Matchday map: camera pad (bottom right) and the LIVE label of the events strip */
  .mdm-cam{ position:absolute; right:14px; bottom:14px; z-index:8; display:flex; align-items:center; gap:4px; padding:5px; border-radius:12px;
    background:rgba(10,15,25,0.82); border:1px solid rgba(255,255,255,0.12); backdrop-filter:blur(6px); box-shadow:0 8px 24px rgba(0,0,0,0.35); }
  .mdm-cam button{ min-width:32px; height:32px; padding:0 8px; border-radius:8px; border:1px solid rgba(255,255,255,0.14); background:rgba(255,255,255,0.04); color:#e2e8f0; font:inherit; font-size:15px; font-weight:700; cursor:pointer; }
  .mdm-cam button:hover{ border-color:#06b6d4; color:#fff; } .mdm-cam button.on{ background:#06b6d4; border-color:#06b6d4; color:#03121a; }
  .mdm-cam button[data-cam="spin"], .mdm-cam button[data-cam="north"]{ font-size:12px; }
  .mdm-cam-sep{ width:1px; height:22px; background:rgba(255,255,255,0.14); margin:0 2px; }
  .mdm-wrap.replaying .mdm-cam{ bottom:96px; } .mdm-wrap.live-following .mdm-cam{ bottom:14px; }
  .mdm-live-pill{ display:inline-flex; align-items:center; gap:5px; background:#ef4444; color:#fff; font-weight:800; font-size:10.5px; letter-spacing:.8px; padding:2px 8px; border-radius:999px; margin-right:6px; }
  .mdm-live-pill i{ width:6px; height:6px; border-radius:50%; background:#fff; animation:lcPulse 1.4s infinite; }
  html[data-theme="light"] .mdm-cam{ background:rgba(255,255,255,0.92); border-color:var(--line); box-shadow:0 8px 24px rgba(17,24,39,0.15); }
  html[data-theme="light"] .mdm-cam button{ background:#FFFFFF; border-color:#CBD5E1; color:#0F172A; } html[data-theme="light"] .mdm-cam-sep{ background:var(--line); }
  html[data-theme="light"] .mdm-cam button.on{ background:var(--signal); border-color:var(--signal); color:#fff; }
  /* light theme: the events strip and the stadium spotlights of the matchday map */
  html[data-theme="light"] .mdm-carousel{ background:linear-gradient(to bottom, rgba(255,255,255,0.96), rgba(255,255,255,0.85) 80%, rgba(255,255,255,0)); }
  html[data-theme="light"] .mdm-carousel-h{ color:#0E7490; } html[data-theme="light"] .mdm-carousel-h span:not(.mdm-live-pill){ color:var(--text-faint); }
  html[data-theme="light"] .mdm-ev{ background:#FFFFFF; border-color:var(--line); box-shadow:0 2px 8px rgba(17,24,39,0.08); color:var(--text); }
  html[data-theme="light"] .mdm-ev-score{ color:var(--text-dim); } html[data-theme="light"] .mdm-ev-score b, html[data-theme="light"] .mdm-ev-score .hit{ color:var(--text); }
  html[data-theme="light"] .mdm-ev-txt{ color:var(--text-dim); } html[data-theme="light"] .mdm-ev-time{ color:var(--text-faint); }
  html[data-theme="light"] .mdm-ev-pic .ev-face{ background:#E2E8F0; border-color:var(--line); }
  html[data-theme="light"] .mdm-spot{ background:rgba(255,255,255,0.97); border-color:var(--line); color:var(--text); box-shadow:0 10px 30px rgba(17,24,39,0.18); }

  /* light theme: Squad contribution grid (it was drawn for its dark card: pale names and numbers on white) */
  html[data-theme="light"] .sc-head{ border-bottom-color:var(--line); }
  html[data-theme="light"] .sc-title{ color:var(--text); } html[data-theme="light"] .sc-sub{ color:var(--text-dim); }
  html[data-theme="light"] .sc-tog{ color:#4B5563; } html[data-theme="light"] .sc-tog:hover{ color:var(--text); background:rgba(17,24,39,0.05); }
  html[data-theme="light"] .sc-tog.active{ background:var(--signal); color:#fff; box-shadow:none; }
  html[data-theme="light"] .sc-grid th{ color:#4B5563; } html[data-theme="light"] .sc-grid th .sc-opp{ color:#6B7280; }
  html[data-theme="light"] .sc-name{ color:#0F172A; } html[data-theme="light"] .sc-role{ color:#6B7280; }
  html[data-theme="light"] .sc-tot{ color:#1F2937; }
  html[data-theme="light"] .sc-warn{ color:#DC2626; }
  html[data-theme="light"] .sc-bar{ background:#E2E8F0; } html[data-theme="light"] .sc-bar i{ background:var(--signal); }
  html[data-theme="light"] .sc-out{ border-color:#CBD5E1; } html[data-theme="light"] .sc-nodata{ color:#9AA6B4; }
  html[data-theme="light"] .sc-bench{ background:#F1F5F9; border-color:#CBD5E1; color:#475569; }
  /* the two "played" colours a little deeper on white, text dark */
  html[data-theme="light"] .sc-full{ background:#86C49D; color:#08321A; } html[data-theme="light"] .sc-part{ background:#E39A66; color:#3A1A05; }
  html[data-theme="light"] .sc-unknown{ background:#94A3B8; color:#0F172A; }
  html[data-theme="light"] .sc-cell:hover{ box-shadow:0 4px 12px rgba(17,24,39,0.2); }
  html[data-theme="light"] .sc-streak{ box-shadow:0 0 0 2px rgba(220,38,38,0.35); }
  html[data-theme="light"] .sc-legend{ color:#4B5563; border-top-color:var(--line); }

  /* light theme: Fantacalcio (its own scoped palette, it stayed dark) */
  html[data-theme="light"] #fantacalcioArea .fc-root{
    --bg:#F3F5F9; --panel:#FFFFFF; --panel2:#F6F8FB; --border:#D3DAE3;
    --text:#0F172A; --muted:#4B5563; --accent:#2563EB; --good:#15803D; --bad:#DC2626; --warn:#B45309;
  }
  html[data-theme="light"] #fantacalcioArea .fc-root .teamBlock, html[data-theme="light"] #fantacalcioArea .fc-root pre.raw{ box-shadow:0 1px 2px rgba(16,24,40,0.05); }
  html[data-theme="light"] #fantacalcioArea .fc-root .idDiffChar{ background:rgba(220,38,38,0.85); }

  /* Matchday map: player photos as portraits (like Squad / Digital images), club logos larger */
  .mdm-carousel{ height:148px; } .mdm-ev{ flex-basis:270px !important; }
  .mdm-ev-pic{ flex:0 0 66px; align-items:stretch; }
  .mdm-ev-pic .ev-frame{ position:relative; width:66px; height:78px; border-radius:8px; overflow:hidden; background:linear-gradient(180deg, #243142, #161e29); border:1px solid rgba(255,255,255,0.08); }
  .mdm-ev-pic .ev-frame .ev-face{ width:100%; height:100%; border-radius:0; border:none; background:transparent; object-fit:cover; object-position:top; display:block; }
  .mdm-ev-pic .ev-frame.logo{ background:transparent; border:none; display:flex; align-items:center; justify-content:center; }
  .mdm-ev-pic .ev-frame.logo .ev-face{ width:54px; height:54px; object-fit:contain; }
  .mdm-ev-pic .ev-badge{ position:absolute; right:3px; bottom:3px; width:22px; height:22px; object-fit:contain; filter:drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
  .mdm-ev-score .ev-logo{ width:20px; height:20px; margin:0 4px; }
  .mdm-spot{ min-width:160px; padding:10px 14px; }
  .mdm-spot .sp-frame{ position:relative; display:block; width:104px; height:120px; margin:2px auto 6px; border-radius:10px; overflow:hidden; background:linear-gradient(180deg, #243142, #161e29); border:1px solid rgba(255,255,255,0.12); }
  .mdm-spot .sp-frame .sp-face{ width:100%; height:100%; border-radius:0; border:none; margin:0; background:transparent; object-fit:cover; object-position:top; display:block; }
  .mdm-spot .sp-badge{ position:absolute; right:5px; bottom:5px; width:30px; height:30px; object-fit:contain; filter:drop-shadow(0 1px 3px rgba(0,0,0,0.6)); }
  .mdm-spot .sp-logo{ width:72px; height:72px; }
  .mdm-spot .sp-name{ font-size:14px; }
  .mdm-spot .sp-rel{ display:flex; align-items:center; justify-content:center; gap:6px; margin-top:6px; }
  .mdm-spot .sp-frame.sm{ display:inline-block; width:40px; height:46px; margin:0; border-radius:6px; }
  html[data-theme="light"] .mdm-ev-pic .ev-frame:not(.logo), html[data-theme="light"] .mdm-spot .sp-frame{ background:linear-gradient(180deg, #EEF2F7, #DCE3EC); border-color:var(--line); }
  html[data-theme="light"] .mdm-ev-pic .ev-badge, html[data-theme="light"] .mdm-spot .sp-badge{ filter:drop-shadow(0 1px 2px rgba(17,24,39,0.35)); }
  html[data-theme="light"] .mdm-spot .sp-kind, html[data-theme="light"] .mdm-spot .sp-name{ color:var(--text); } html[data-theme="light"] .mdm-spot .sp-score{ color:var(--text-dim); } html[data-theme="light"] .mdm-spot .sp-rel{ color:var(--text-dim); }

  /* Matchday map: club logos in the stadium cards, codes and bigger logos / score in the events strip */
  .mdm-card .mc-team{ display:inline-flex; align-items:center; gap:7px; min-width:0; }
  .mdm-card .mc-logo{ width:22px; height:22px; object-fit:contain; flex:0 0 auto; } .mdm-card .mc-logo.none{ display:inline-block; }
  .mdm-card .mc-compact{ display:none; align-items:center; gap:5px; font-size:12px; }
  .mdm-card.compact .mc-compact{ display:flex !important; } .mdm-card .mc-compact .mc-logo{ width:18px; height:18px; }
  .mdm-ev-score{ align-items:center; font-size:15px; } .mdm-ev-score span{ display:inline-flex; align-items:center; gap:5px; font-weight:800; letter-spacing:.5px; }
  .mdm-ev-score .ev-logo{ width:26px !important; height:26px !important; margin:0 !important; }
  .mdm-ev-score b{ font-size:19px; font-family:var(--mono); color:var(--text, #fff); }
  .mdm-ev-txt{ font-size:12.5px; }
  .mdm-card .mc-row{ padding:2px 0; } .mdm-card .mc-row + .mc-row{ margin-top:1px; }
