/* One layout for all football environments; state and hover styles remain in their components. */
html body .football-match-header{width:100%;min-width:0;padding:10px 14px;background:var(--panel,#fff);border:1px solid var(--line,#c7d9d6);border-radius:12px;color:var(--text,#15282d);box-sizing:border-box}
html body .fheader-top{position:relative;min-height:76px}
html body .fheader-notices{position:absolute;top:0;right:0;z-index:71;display:flex;align-items:flex-start;gap:5px}
html body .fheader-notice-icon{position:relative;display:inline-grid;place-items:center;box-sizing:border-box;flex:0 0 32px;width:32px;height:30px;min-width:32px;min-height:30px;margin:0;padding:4px;border:1px solid var(--line,#c7d9d6);border-radius:7px;background:var(--panel,#fff);color:var(--muted,#53666f);line-height:1;list-style:none;cursor:help}
html body button.fheader-notice-icon,html body summary.fheader-notice-icon{cursor:pointer}
html body .fheader-notice-icon svg{display:block;width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
html body .fheader-notice-icon.is-warning{color:#412900;border:2px solid #b8790b;background:#ffc454;box-shadow:0 0 0 2px #f8b63838}
html body .fheader-notice-icon[data-notice-hint]::after{display:none;content:attr(data-notice-hint);position:absolute;top:calc(100% + 8px);right:0;z-index:100;box-sizing:border-box;width:min(360px,calc(100vw - 100px));max-height:55vh;overflow:hidden;padding:10px 12px;border:1px solid var(--line,#c7d9d6);border-radius:8px;background:var(--panel,#fff);color:var(--text,#19242a);box-shadow:0 5px 18px #0003;white-space:normal;text-align:left;font:600 12px/1.4 system-ui,sans-serif;letter-spacing:normal;text-transform:none;pointer-events:none}
html body .fheader-notice-icon[data-notice-hint]:is(:hover,:focus-visible)::after{display:block}
html body .fheader-status-popover[open]>.fheader-notice-icon[data-notice-hint]::after{display:none}
html body .fheader-conflict-slot{display:inline-flex}
html body .fheader-conflict-slot:empty{display:none}
html body .fheader-notice-icon.is-conflict{color:#9b2524;border:2px solid #d95552;background:#ffe3df;box-shadow:0 0 0 2px #e5775530}
html body .fheader-conflict-count{position:absolute;top:-5px;right:-5px;display:grid;place-items:center;min-width:13px;height:13px;padding:0 2px;border-radius:9px;background:#aa302c;color:#fff;font:800 9px/1 system-ui,sans-serif}
.fheader-conflict-dialog{box-sizing:border-box;width:min(760px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid var(--line,#bdcecf);border-radius:12px;background:var(--panel,#fff);color:var(--text,#15282d);font:14px/1.4 system-ui,sans-serif;box-shadow:0 15px 60px #0005}
.fheader-conflict-dialog::backdrop{background:#07131c99}
.fheader-conflict-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line,#bdcecf)}
.fheader-conflict-dialog>header strong{font-size:17px}
.fheader-conflict-dialog button{border:1px solid var(--line,#bdcecf);border-radius:6px;background:var(--panel,#fff);color:inherit;padding:5px 9px;font:inherit;cursor:pointer}
.fheader-conflict-dialog [data-conflict-close]{width:30px;height:30px;padding:0;font-size:23px}
.fheader-conflict-dialog [data-conflict-dialog-body]{padding:0 16px 16px}
.fheader-conflict-dialog article{padding:12px;margin:10px 0;border:1px solid var(--line,#bdcecf);border-left:3px solid #d95552;border-radius:8px}
.fheader-conflict-dialog article header{display:grid;gap:2px}
.fheader-conflict-dialog small{font-size:12px;color:var(--muted,#53666f)}
.fheader-conflict-values{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;margin:10px 0}
.fheader-conflict-values>section{display:flex;flex-wrap:wrap;flex-direction:column;align-items:flex-start;gap:5px;min-width:0;padding:9px;border-radius:7px;background:var(--panel-strong,var(--soft,#eef5f4))}
.fheader-conflict-values b{font-size:21px}.fheader-conflict-values pre{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:11px;max-width:100%}
.fheader-conflict-dialog a{color:var(--accent,#087d79);text-decoration:underline;overflow-wrap:anywhere;font-size:12px}
.fheader-conflict-dialog>footer{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 16px;border-top:1px solid var(--line,#bdcecf);font-size:12px}
@media(max-width:520px){.fheader-conflict-values{grid-template-columns:minmax(0,1fr)}}
html body .fheader-notice-icon:focus-visible{outline:2px solid var(--accent,#087d79);outline-offset:2px}
html body .fheader-notice-icon::-webkit-details-marker{display:none}
html body .fheader-notices:empty,html body .timeline-source-indicator:empty{display:none}
html body .fheader-fixture{position:absolute;left:0;top:0;width:281px;display:flex;flex-direction:column;gap:3px;font-size:12px;line-height:1.35;text-align:left}
html body .fheader-fixture .match-context-meta{display:flex;position:static;flex-direction:column;align-items:flex-start;gap:3px;margin:0;padding:0;max-width:100%;min-width:0;text-align:left}
html body .fheader-teams{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:start;gap:12px;width:calc(100% - 562px);margin:auto;min-width:0}
html body .fheader-team{min-width:0;display:block;text-align:left}
html body .fheader-team-a{text-align:right}
html body .fheader-identity{display:flex;align-items:center;gap:8px;min-width:0;min-height:46px}
html body .fheader-team-a .fheader-identity{justify-content:flex-end}
html body .fheader-identity>strong{font-size:19px;line-height:1.15;min-width:0;overflow-wrap:normal}
html body .fheader-identity .kit-selector,html body .fheader-identity .kit-picker,html body .fheader-identity .match-kit-selector{flex:0 0 auto}
html body .fheader-scorers{font-size:12px;line-height:1.35;min-width:0;margin-top:3px}
html body .fheader-team-a .fheader-scorers{margin-right:52px;text-align:right}
html body .fheader-team-b .fheader-scorers{margin-left:52px;text-align:left}
html body .fheader-scorers .goal-list,html body .fheader-scorers .shootout-list,html body .fheader-scorers .workbench-team-scorers,html body .fheader-scorers .team-scorers{display:flex;flex-wrap:wrap;gap:3px;justify-content:flex-start;max-width:none}
html body .fheader-team-a .fheader-scorers .goal-list,html body .fheader-team-a .fheader-scorers .shootout-list,html body .fheader-team-a .fheader-scorers .workbench-team-scorers,html body .fheader-team-a .fheader-scorers .team-scorers{justify-content:flex-end}
html body .fheader-score-cluster{display:flex;align-items:center;justify-content:center;gap:8px}
html body .fheader-crest{display:flex;align-items:center;justify-content:center;width:46px;height:46px;flex:0 0 46px}
html body .fheader-crest img,html body .fheader-crest .club-logo{width:42px;height:42px;max-width:42px;max-height:42px;object-fit:contain;background:none;border:0;border-radius:0;padding:0}
html body .fheader-score-cluster .match-score,html body .fheader-score-cluster .workbench-score-pill,html body .fheader-score-cluster #score{font-size:32px;line-height:1.2;min-width:84px;min-height:46px;padding:3px 8px;margin:0;white-space:nowrap}
html body .fheader-score-cluster .workbench-score-center{display:block;position:relative;min-width:0;padding:0;margin:0}
html body .fheader-bottom{display:grid;grid-template-columns:minmax(135px,1fr) auto minmax(135px,1fr);align-items:center;gap:10px;margin-top:8px}
html body .fheader-left-tools,html body .fheader-right-tools{display:flex;align-items:center;gap:5px;min-width:0}
html body .fheader-right-tools{justify-content:flex-end}
html body .fheader-left-tools>div,html body .fheader-right-tools>div{display:flex;align-items:center;gap:5px;margin:0;padding:0;position:static;flex-wrap:nowrap}
html body .football-match-header .match-meta-icon-chip,html body .football-match-header .workbench-meta-icons>.meta-icon,html body .football-match-header .match-info-icon{display:inline-flex;align-items:center;justify-content:center;width:30px;min-width:30px;height:29px;min-height:29px;padding:4px;box-sizing:border-box;margin:0;font-size:12px}
html body .football-match-header .match-meta-icon-chip>.meta-icon,html body .football-match-header .meta-icon>svg{width:19px;height:19px;min-width:0;padding:0;border:0}
html body .fheader-actions{display:flex;align-items:center;justify-content:center;gap:10px;min-width:0}
html body .fheader-actions .match-goal-controls,html body .fheader-actions .match-clock-panel,html body .fheader-actions .league-clock-draft{display:block;position:static;margin:0;padding:0;min-width:0;width:auto}
html body .fheader-actions .match-clock{height:45px;min-height:45px;box-sizing:border-box;width:150px;margin:0;padding:3px 6px;border:1px solid var(--line);border-radius:8px;background:var(--panel-strong,var(--soft,#eef5f4));display:flex;align-items:center;gap:4px}
html body .fheader-actions .goal-control,html body .fheader-actions .league-event-composer.goal,html body .fheader-actions .goalbar{height:45px;min-height:45px;width:520px;margin:0;padding:5px 6px;box-sizing:border-box;display:flex;align-items:center;gap:4px;background:var(--panel-strong,var(--soft,#eef5f4));border:1px solid var(--line,#c7d9d6);border-radius:9px}
html body .fheader-actions .league-event-composer.goal>div,html body .fheader-actions .timeline-sync-status{display:none}
html body .fheader-actions input:not([type=checkbox]){width:52px;min-width:0;flex:0 0 52px}
html body .fheader-actions select{width:auto;min-width:0;flex:1 1 0}
html body .fheader-actions label{display:flex;align-items:center;gap:2px;font-size:10px;margin:0;white-space:nowrap}
html body .fheader-actions button{flex:0 0 auto}
html body .fheader-actions .match-clock-display{font-size:16px}
html body .fheader-actions .match-clock-phase{font-size:9px}
html body .fheader-actions .match-clock-main{padding:0;min-width:0}
@media(max-width:1400px){html body .fheader-fixture{position:static;width:auto;min-height:30px;margin-bottom:7px;padding-right:114px}html body .fheader-top{min-height:0}html body .fheader-teams{width:100%}}
@media(max-width:1050px){html body .fheader-bottom{grid-template-columns:1fr 1fr}html body .fheader-actions{grid-column:1/-1;grid-row:1;flex-wrap:wrap}html body .fheader-left-tools{grid-column:1;grid-row:2}html body .fheader-right-tools{grid-column:2;grid-row:2}html body .fheader-actions .goal-control,html body .fheader-actions .league-event-composer.goal,html body .fheader-actions .goalbar{width:min(520px,100%)}html body .fheader-identity>strong{font-size:16px}}
@media(max-width:600px){html body .football-match-header{padding:8px}html body .fheader-teams{gap:5px}html body .fheader-score-cluster{gap:3px}html body .fheader-crest{width:28px;height:36px;flex-basis:28px}html body .fheader-crest img,html body .fheader-crest .club-logo{width:28px;height:28px}html body .fheader-score-cluster .match-score,html body .fheader-score-cluster .workbench-score-pill,html body .fheader-score-cluster #score{font-size:24px;min-width:58px;padding:3px}html body .fheader-identity{gap:3px;flex-wrap:wrap}html body .fheader-identity>strong{font-size:13px}html body .fheader-team-a .fheader-scorers,html body .fheader-team-b .fheader-scorers{margin:0}html body .fheader-actions .goal-control,html body .fheader-actions .league-event-composer.goal,html body .fheader-actions .goalbar{flex-wrap:wrap;height:auto;min-height:45px}html body .fheader-actions input:not([type=checkbox]){width:45px;flex-basis:45px}html body .fheader-actions select{min-width:70px}}

html body #matchView .match-head{display:flex;flex-wrap:wrap;padding:0;border:0;background:none;gap:7px}
html:not(.uyl-league-controls) body #matchView .match-tabs{position:static;display:flex;justify-content:flex-end;width:100%;margin:0;padding:0;border:0}
html body .fheader-top .time-stack{display:flex;flex-direction:column;align-items:flex-start;gap:2px}
html body .fheader-actions .match-clock-readout{display:flex;flex-direction:column;align-items:center;padding:0;font-size:10px;min-width:0;background:none;border:0}

/* Name and scorer edges share a grid column; kit widths may differ by environment. */
html body .fheader-team{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:8px;align-items:center}
html body .fheader-team-a{grid-template-columns:minmax(0,1fr) auto}
html body .fheader-identity,html body .fheader-team>#homeTitle,html body .fheader-team>#awayTitle{display:contents}
html body .fheader-identity>strong{display:flex;align-items:center;min-height:46px;grid-row:1;text-align:inherit}
html body .fheader-team-a .fheader-identity>strong{justify-content:flex-end}
html body .fheader-scorers{grid-row:2;grid-column:2;margin:3px 0 0!important}
html body .fheader-team-a .fheader-scorers{grid-column:1}
html body .football-match-header #matchInfoIcons{position:static;transform:none;display:flex;gap:5px;margin:0;padding:0}
html body .fheader-actions input:not([type=checkbox]),html body .fheader-actions select{height:27px;padding:3px 4px;font-size:10px}
html body .fheader-actions label input[type=checkbox]{width:12px;height:12px;margin:0}
html body .fheader-score-cluster .workbench-score-text{font-size:32px}
html body .fheader-team-a .fheader-identity>strong{grid-column:1}
html body .fheader-team-b .fheader-identity>strong{grid-column:2}
html body .fheader-identity>.kit-selector,html body .fheader-identity>.kit-picker,html body .fheader-identity>.match-kit-selector{grid-row:1;grid-column:1}
html body .fheader-team-a .fheader-identity>.kit-selector,html body .fheader-team-a .fheader-identity>.kit-picker,html body .fheader-team-a .fheader-identity>.match-kit-selector{grid-column:2}

/* Scorers can use the outer space below fixture details while keeping their name edge. */
@media(min-width:1401px){
  html body .fheader-team-a .fheader-scorers{margin-left:-281px!important}
  html body .fheader-team-b .fheader-scorers{margin-right:-281px!important}
}

/* Keep every scorer visible; chips wrap instead of hiding names or later goals. */
html body .fheader-scorers .scorer-chip,html body .fheader-scorers .goal-chip,html body .fheader-scorers .goal-scorer-chip{max-width:100%;height:auto;min-height:14px;flex:0 1 auto;white-space:normal;overflow-wrap:anywhere}
html body .fheader-scorers .scorer-chip b,html body .fheader-scorers .scorer-chip em{overflow:visible;text-overflow:clip;white-space:normal}
