/* 8.2.2 proposed H5 + complete detail theme overrides. */
html.light .b48-public .match-hero43.bf81-stadium {
 background:linear-gradient(155deg,#fffffffa 0%,#e9f6f8f5 60%,#d4eaf1ee 100%),url('/assets/stadium820.svg') center/cover!important;
 color:var(--text);border-color:#a8cad5;box-shadow:inset 0 1px 0 #fff,0 4px 13px #17374723;
}
html.light .b48-public .bf81-stadium :is(.detail-name43,h1){color:var(--text)}
html.light .b48-public .bf81-stadium :is(.detail-meta43,.team-role43,.detail-score-mid43 span,.detail-bottom43,.team-follow43){color:#425e70}
html.light .b48-public .bf81-stadium .detail-league-name43{color:#006e62}
html.light .b48-public .bf81-stadium .detail-status43.in{color:#a3263b;border-color:#b53a4c;background:#fce8eb}
html.light .b48-public .bf81-stadium .team-follow43{background:var(--bf81-btn);border-color:var(--line)}
html.light .b48-public .bf81-stadium .detail-team43 img{filter:drop-shadow(0 2px 4px #19354325)}
html.light .b48-public .bf81-stadium .detail-score-mid43 strong{background:linear-gradient(155deg,#337483,#135467)!important;color:white!important;border-color:#42899a;box-shadow:inset 0 1px #fff5,0 3px 7px #203e5328}
html.light .b48-public .bf820-live-score strong{background:linear-gradient(155deg,#337483,#135467);color:white}
html.light .b48-public .bf820-tabs button:disabled{color:#4a626e;opacity:1;background:#edf3f5!important;box-shadow:none}
html.light .b48-public .bf820-caption{color:#425e70}
html.light .b48-public .bf820-active,html.light .b48-public .bf820-entry{color:#05322c!important}
/* Court is a depiction of the pitch and deliberately retains its turf and stadium colors. */
@media(max-width:760px){
 .b48-public .bf81-score .bf33-card:has(>.bf820-entry),.b48-public :is(.bf81-matchrow,.bf81-dayrow):has(>.bf820-entry){
  position:relative;grid-template-columns:minmax(0,1fr) 30px;gap:3px;margin-block:5px;padding:7px;min-height:0;
 }
 .b48-public :is(.bf33-card,.bf81-matchrow,.bf81-dayrow):has(>.bf820-entry)>.bf820-entry{
  position:absolute;inset-inline-end:7px;top:6px;grid-row:auto;grid-column:auto;min-height:27px;max-width:100px;
  margin:0;padding:5px 7px;font-size:11px;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;
 }
 .b48-public :is(.bf33-card,.bf81-matchrow):has(>.bf820-entry) :is(.bf33-meta,.b48-rowmeta){min-height:27px;box-sizing:border-box;padding-inline-end:75px;margin-bottom:2px;gap:3px 5px;align-content:center}
 .b48-public .bf81-dayrow:has(>.bf820-entry) .f60-meta{min-height:27px;box-sizing:border-box;padding-inline-end:107px;flex-wrap:wrap;gap:3px 5px}
 .b48-public :is(.bf33-card,.bf81-matchrow,.bf81-dayrow):has(>.bf820-entry) .bf820-live-tag{display:none}
 .b48-public :is(.bf33-card,.bf81-matchrow):has(>.bf820-entry)>:is(.b48-watch,.b48-liveactions){align-self:end;grid-row:1;grid-column:2}
 .b48-public :is(.bf33-card,.bf81-matchrow,.bf81-dayrow):has(>.bf820-entry) :is(.bf33-teams,.b48-rowteams,.f60-score){margin:2px 0 0;gap:4px;min-height:32px}
 .b48-public :is(.bf81-score .bf33-card,.bf81-matchrow,.bf81-dayrow) :is(.bf33-score,.b48-rowteams>strong,.f60-score>b){padding-block:4px;font-size:clamp(12px,3.6vw,16px);line-height:1.3;white-space:nowrap}
 .b48-public .bf81-model .md50-fixture{padding:8px;margin:5px 0;gap:5px}
 .b48-public .bf81-model .md50-duel{padding:3px 0;gap:4px}
 .b48-public .n46-grid .n46-item{padding-block:9px;min-height:104px}
 .b48-public .n46-grid .n46-item::before{top:9px;bottom:auto;height:92px;width:68px}
 .b48-public .match-hero43.bf81-stadium{padding:11px}
 .b48-public .bf81-stadium .detail-score43{padding:9px 0;gap:4px}
 .b48-public .bf81-stadium .detail-bottom43{padding-top:7px;gap:4px}
 .b48-public .bf820-tabs{gap:4px;margin-bottom:7px}
 .b48-public .bf820-tabs>*{flex:1 1 0;min-width:0;line-height:1.25;font-size:12px;padding:7px 3px;min-height:33px}
 .b48-public .bf820-live{padding:8px!important}
 .b48-public .bf820-event-overlay{padding:8px 10px}
}
@media(max-width:360px){
 .b48-public :is(.bf33-card,.bf81-matchrow,.bf81-dayrow):has(>.bf820-entry)>.bf820-entry{max-width:88px;font-size:10px;padding-inline:5px}
 .b48-public :is(.bf33-card,.bf81-matchrow):has(>.bf820-entry) :is(.bf33-meta,.b48-rowmeta){padding-inline-end:62px}
 .b48-public .bf81-dayrow:has(>.bf820-entry) .f60-meta{padding-inline-end:94px}
}

.b48-public .bf820-cache-note{font-size:12px;line-height:1.45;overflow-wrap:anywhere;margin:5px 0;color:var(--muted)}
.b48-public .bf820-court[data-cache-status=stale] .bf820-event-overlay{border-color:#e0b56b}
.b48-public .bf820-court[data-cache-status=stale] .bf820-event-overlay small{color:#ffe1a2}
.b48-public .bf820-event-row small{overflow-wrap:anywhere}
.b48-public .bf820-live [data-bf820-events]{max-height:360px;overflow:auto}
.b48-public .bf820-court[data-event-kind=card][data-card-color=red] .bf820-event-overlay::before{background:#ef5964}
.b48-public .bf820-court[data-event-kind=substitution] .bf820-event-overlay::before{content:"⇄";display:block;font-size:26px;line-height:1.1;color:#7df5d8}
html.light .b48-public .bf820-live .bf820-cache-note{color:#425e70}

/* The pitch has a schematic character layer, not measured player tracking. */
.bf822-scene{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1}
.bf820-court:has(.bf822-scene) .bf820-event-overlay{z-index:3;top:24%;max-width:88%;padding:7px 11px}
.bf820-court:has(.bf822-scene) .bf820-event-overlay strong{font-size:clamp(14px,2.6vw,23px)}
.bf820-court:has(.bf822-scene) .bf820-event-overlay::before{display:none}
.bf820-court .bf820-badge,.bf820-court .bf820-watermark{z-index:4}
.bf822-scene-note{position:absolute;bottom:5px;left:50%;transform:translateX(-50%);z-index:4;color:#e0f4f5;background:#07202cd9;border:1px solid #56848b;border-radius:5px;padding:3px 7px;max-width:94%;width:max-content;font-size:clamp(10px,1.5vw,12px);text-align:center;pointer-events:none}
.bf822-replay{display:flex;align-items:center;gap:5px;justify-content:flex-end;flex-wrap:wrap}
.bf822-replay button{font-size:12px;padding:6px 9px;min-height:32px}
@media(max-width:760px){.bf820-court:has(.bf822-scene) .bf820-event-overlay{top:22%;padding:4px 8px}.bf820-court:has(.bf822-scene) .bf820-event-overlay strong{font-size:13px}.bf820-court .bf820-event-overlay small{font-size:10px}.bf822-scene-note{font-size:10px;padding:2px 5px}}

/* Reference-inspired compact fixed navigation, no emoji, same icons in every language. */
@media(max-width:820px){
 .b48-public{padding-bottom:calc(75px + env(safe-area-inset-bottom))}
 .b48-public .b48-bottomnav{
  position:fixed;left:0;right:0;bottom:0;z-index:40;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));
  gap:0;padding:3px 5px calc(3px + env(safe-area-inset-bottom));background:linear-gradient(180deg,#122c39,#071c26);
  border-top:1px solid #2c5b68;box-shadow:0 -3px 12px #0010187a;
 }
 .b48-public .b48-bottomnav a{
  position:relative;min-width:0;min-height:51px;display:flex;flex-direction:column;justify-content:center;align-items:center;
  gap:3px;padding:4px 1px 6px;color:#9fb7c2;background:transparent;border:0;box-shadow:none;border-radius:5px;
  text-align:center;font-size:10px;line-height:1.2;font-weight:650;white-space:normal;overflow-wrap:anywhere;
 }
 .b48-public .b48-bottomnav a>span{width:25px;height:25px;display:grid;place-items:center;flex:0 0 25px}
 .b48-public .b48-bottomnav .bf822-nav-icon{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linejoin:round;stroke-linecap:round}
 .b48-public .b48-bottomnav a:is([aria-current],[data-bf822-current]){
  color:#49f5d8;background:linear-gradient(180deg,#4cf6d722,transparent 92%);box-shadow:none;font-weight:800;
 }
 .b48-public .b48-bottomnav a:is([aria-current],[data-bf822-current])::after{
  content:"";position:absolute;bottom:0;left:23%;right:23%;height:2px;border-radius:4px;background:currentColor;box-shadow:0 0 7px currentColor;
 }
 .b48-public .b48-bottomnav a:is([aria-current],[data-bf822-current]) :is(.bf822-nav-home,.bf822-nav-star){fill:currentColor}
 html.light .b48-public .b48-bottomnav{background:linear-gradient(#fff,#eaf3f7);border-top-color:#abc9d4;box-shadow:0 -3px 12px #173b4b17}
 html.light .b48-public .b48-bottomnav a{color:#536d7b}
 html.light .b48-public .b48-bottomnav a:is([aria-current],[data-bf822-current]){color:#007e72;background:linear-gradient(#00897a13,transparent)}
}
@media(max-width:760px){
 /* Shorter panels, team names wrap, score chips reserve their actual content width. */
 .b48-public :is(.bf81-matchrow,.bf81-dayrow,.bf81-score .bf33-card) :is(.b48-rowteams,.f60-score,.bf33-teams){
  grid-template-columns:minmax(0,1fr) max-content minmax(0,1fr);min-width:0;
 }
 .b48-public :is(.b48-rowteams>span,.bf33-teams>strong,.f60-score>strong){min-width:0;overflow-wrap:anywhere}
 .b48-public :is(.b48-rowteams>strong,.bf33-score,.f60-score>b){min-width:42px;max-width:100%;width:auto;font-variant-numeric:tabular-nums}
 .b48-public[data-bf81-page="index.php"] .b48-dashboard :is(.card,.b48-feature){padding:10px;margin-block:8px}
 .b48-public[data-bf81-page="index.php"] .b48-panelhead{margin-bottom:4px;padding-bottom:5px}
 .b48-public[data-bf81-page="index.php"] .f60-quick{gap:5px}
 .b48-public[data-bf81-page="index.php"] .f60-quick>a{min-width:0;padding:8px 5px;overflow-wrap:anywhere}
 .b48-public .bf820-caption{gap:5px;align-items:center}
}
@media(min-width:390px) and (max-width:760px){
 .b48-public #s51-metrics{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
 .b48-public #s51-metrics>a.card{min-height:57px;padding:6px;text-align:center}
 .b48-public #s51-metrics>a.card>small{font-size:10px;padding-inline-end:0;min-height:1.35em;line-height:1.2}
 .b48-public #s51-metrics>a.card>strong{font-size:21px;line-height:1.3}
 .b48-public #s51-metrics>a.card>span{display:none}
}
