:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: #223b39;
  background: #f4f6f1;
  --ink: #203a36;
  --accent: #236358;
  --mint: #dceee4;
  --muted: #52665f;
  --line: #dbe5df;
  --white: #fff;
  --shadow: 0 2px 5px #233c3210, 0 12px 26px #233c3207;
}
* { box-sizing: border-box; }
body { margin: 0; }
header { background: var(--white); color: var(--ink); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 68px; max-width: 1660px; margin: auto; padding: 10px clamp(12px,2vw,36px); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; color: #164d42; text-decoration: none; font-size: clamp(1.25rem,2.2vw,1.58rem); font-weight: 800; line-height: 1.12; overflow-wrap: anywhere; }
.brand img,.user-logo { width: 39px; height: 39px; object-fit: contain; border-radius: 8px; background: #fff; padding: 3px; }
.brand img { width: clamp(43px,5vw,51px); height: clamp(43px,5vw,51px); flex: none; border: 1px solid #c7ded2; box-shadow: 0 2px 5px #164d4218; }
#session { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: .88rem; }
#session button { background: #d7efe7; color: #123731; }
main { max-width: 1660px; margin: 0 auto; padding: clamp(14px,2vw,32px) clamp(10px,2vw,36px) 64px; }
h1,h2,h3 { line-height: 1.16; }
h1 { font-size: clamp(1.8rem,3vw,2.6rem); letter-spacing: -.04em; margin: 0 0 18px; }
h2 { margin: 0 0 14px; font-size: 1.27rem; letter-spacing: -.02em; }
h3 { margin: 0 0 9px; font-size: 1.05rem; }
p { margin: .5em 0; color: var(--muted); }
a { color: var(--accent); }
nav { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
button,input,select { font: inherit; border-radius: 8px; }
button { border: 1px solid transparent; min-height: 38px; padding: 8px 13px; color: #fff; background: var(--accent); cursor: pointer; font-weight: 680; transition: background-color .16s,color .16s,border-color .16s; }
button:hover { background: #08493f; }
button:disabled { opacity: .62; cursor: wait; }
nav button,.secondary { background: #e8f0ef; color: #24474a; }
nav button:hover,.secondary:hover { background: #dcece8; }
nav button[aria-current=true] { background: var(--accent); color: #fff; }
:focus-visible { outline: 3px solid #218675; outline-offset: 3px; }
input,select { min-width: 0; width: 100%; color: #14282e; background: #fff; border: 1px solid #afc4c4; padding: 9px 10px; }
label { display: grid; align-content: start; gap: 6px; font-size: .9rem; font-weight: 670; }
label.check { display: flex; align-items: center; gap: 8px; }
label.check input { width: auto; }
form { display: grid; gap: 12px; min-width: 0; margin: 0; }
form button { justify-self: start; }
.card,.alert { min-width: 0; margin-bottom: 16px; padding: clamp(14px,2vw,22px); border: 1px solid var(--line); border-radius: 15px; background: var(--white); box-shadow: var(--shadow); }
.alert { background: #fff7e0; border-color: #e6cc87; }
.alert p { color: #625027; }
.login { max-width: 448px; margin: 8vh auto; padding: 26px; }
.grid,.summary-panels { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr)); }
.summary-panels { grid-template-columns: minmax(0,1fr); align-items: start; gap: 0 16px; }
.grid .card { margin: 0; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit,minmax(min(100%,160px),1fr)); }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 15px; }
.toolbar label { min-width: min(100%,250px); }
.scroll { max-width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 9px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; text-align: left; }
th,td { padding: 10px clamp(7px,1vw,16px); border-bottom: 1px solid var(--line); }
th { background: #edf3ef; color: #344f46; font-size: .81rem; font-weight: 740; }
tbody tr:nth-child(even) { background: #f8faf9; }
tbody tr:hover { background: #edf6f1; }
tbody tr:last-child td { border-bottom: 0; }
.club { display: inline-flex; align-items: center; gap: 7px; }
.club img { width: 27px; height: 27px; object-fit: contain; flex: none; }
.rank-position { display: inline-grid; min-width: 27px; height: 26px; place-items: center; border-radius: 6px; color: #345457; background: #eef3f3; font-size: .84rem; font-weight: 720; }
tbody tr:first-child .rank-position,.points { color: #165749; background: #def4e8; }
.points { padding: 4px 8px; border-radius: 6px; }
.standings { container-type: inline-size; }
.standings table { table-layout: fixed; }
.standings .points { padding-inline: 3px; }
.standings th,.standings td { height: 44px; padding-block: 0; text-align: center; white-space: nowrap; }
.standings :is(th,td):first-child { width: 7%; }
.standings :is(th,td):nth-child(2) { width: 44%; text-align: left; }
.standing-team { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.standing-team .club { min-width: 0; }
.standing-team .club-name { overflow: hidden; text-overflow: ellipsis; }
.rank-labels { display: flex; flex: none; gap: 4px; }
.rank-labels .badge { font-size: .73rem; font-weight: 730; }
.standing-up,.rank-up { --standing-line: #2d8251; --standing-bg: #ebf8ee; --standing-chip: #d9f1df; --standing-ink: #20552d; }
.standing-down,.rank-down { --standing-line: #c34e44; --standing-bg: #fff0ee; --standing-chip: #fee1de; --standing-ink: #872720; }
.standing-libertadores,.rank-libertadores { --standing-line: #ad7516; --standing-bg: #fff6df; --standing-chip: #fff0c9; --standing-ink: #634809; }
.standing-sudamericana,.rank-sudamericana { --standing-line: #4771bd; --standing-bg: #edf3fe; --standing-chip: #dfeafe; --standing-ink: #244d87; }
tbody tr[class^="standing-"] { background: var(--standing-bg); }
tbody tr[class^="standing-"]:hover { background: var(--standing-chip); }
tbody tr[class^="standing-"] td:first-child { box-shadow: inset 4px 0 var(--standing-line); }
.rank-labels .badge { background: var(--standing-chip); color: var(--standing-ink); }
.standing-legend { display: none; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; list-style: none; font-size: .85rem; }
.standing-legend li { display: inline-flex; align-items: center; gap: 6px; }
.standing-legend li::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--standing-line); }
@container (max-width: 50rem) {
  .standings th,.standings td { padding-inline: 3px; }
  .standing-team .club { min-width: 0; }
  .rank-labels .badge { width: 9px; height: 9px; padding: 0; border-radius: 3px; background: var(--standing-line); }
  .rank-labels .badge span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .standing-legend { display: flex; }
}
.standing-results { display: none; }
@container (max-width: 34rem) {
  .standings table { font-size: .83rem; }
  .standings th { font-size: .72rem; }
  .standings :is(th,td):first-child { width: 9%; }
  .standings :is(th,td):nth-child(2) { width: 40%; }
  .standings .rank-position { min-width: 0; height: auto; padding: 1px 3px; }
  .standings .points { padding: 2px; }
  .standings .club { min-width: 0; gap: 4px; }
  .standing-team .club-name { white-space: normal; overflow-wrap: anywhere; padding-block: 3px; }
}
@container (max-width: 28rem) {
  .standings :is(th,td):is(:nth-child(4),:nth-child(5),:nth-child(6)) { display: none; }
  .standings :is(th,td):nth-child(2) { width: 44%; }
  .standing-results { display: block; padding-bottom: 4px; color: var(--muted); font-size: .69rem; }
  .standing-team { gap: 3px; }
  .rank-labels { gap: 2px; }
}
tbody tr.suspension-pending { background: #fff3d5; }
tbody tr.suspension-pending:hover { background: #ffe9b3; }
.suspension-pending td:first-child { box-shadow: inset 3px 0 #b77d1a; }
.pending-count { color: #634710; background: #ffe6a6; }
.items { display: grid; gap: 10px; margin: 0; padding-left: 20px; }
details { padding: 12px 0; }
details+details { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 670; }
summary+form,summary+.grid,details>.scroll { margin-top: 12px; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 6px; background: #e9f3ef; color: var(--ink); font-size: .88rem; }
.app-layout { display: grid; grid-template-columns: clamp(150px,13vw,205px) minmax(0,1fr); align-items: start; gap: clamp(12px,2vw,28px); }
.main-nav { position: sticky; top: 20px; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: var(--shadow); }
.main-nav button { padding: 10px 11px; text-align: left; background: transparent; }
.main-nav button:hover { background: #e8f2ed; }
.main-nav button[aria-current=true] { background: #e3f0e9; color: #174b40; border-color: #c9e2d6; box-shadow: inset 3px 0 var(--accent); }
.view-content { min-width: 0; }
.view-content>.grid { margin-bottom: 16px; }
.year-form { display: flex; align-items: flex-end; gap: 10px; }
.year-form input { width: 9rem; }
.overview { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0,1fr) minmax(180px,28%); gap: 24px; margin-bottom: 16px; padding: clamp(18px,4vw,33px); color: var(--ink); background: linear-gradient(112deg,#e4f2e9,#f2f8f3 58%,#e2efe8); border: 1px solid #ccdfd5; border-radius: 15px; }
.overview-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.overview-heading > div { min-width: 0; }
.overview-crest { width: clamp(52px,6vw,74px); aspect-ratio: 1; flex: none; padding: 6px; object-fit: contain; background: #fff; border: 1px solid #bdd9ca; border-radius: 12px; box-shadow: 0 3px 9px #164d421a; }
.overview h2 { margin: 0; color: #173f35; font-size: clamp(1.34rem,2.35vw,2.15rem); font-weight: 800; overflow-wrap: anywhere; }
.overview-context { color: #366658; font-weight: 730; margin: 0 0 7px; }
.overview-progress { max-width: 380px; }
.overview-progress label { display: flex; justify-content: space-between; margin-bottom: 6px; }
.overview progress { width: 100%; height: 8px; border: 0; border-radius: 8px; overflow: hidden; background: #cedfd5; color: var(--accent); }
.overview progress::-webkit-progress-bar { background: #cedfd5; }
.overview progress::-webkit-progress-value { background: var(--accent); }
.overview progress::-moz-progress-bar { background: var(--accent); }
.overview-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; max-width: 440px; margin: 12px 0 0; }
.overview-metrics div { padding: 8px 10px; border-radius: 9px; border-top: 3px solid var(--metric-color,#7eb7a0); background: #ffffffb8; }
.overview-metrics .metric-yellow { --metric-color: #e6ba51; }
.overview-metrics .metric-red { --metric-color: #ce877b; }
.overview-metrics dt,.overview-note { color: var(--muted); font-size: .8rem; }
.overview-metrics dd { margin: 0; font-size: 1.25rem; font-weight: 760; font-variant-numeric: tabular-nums; }
.overview-actions { display: grid; align-content: start; gap: 10px; }
.overview-actions div { display: grid; gap: 3px; padding: 9px 12px; background: #ffffffb8; border: 1px solid #cfdfd6; border-radius: 9px; }
.overview-actions small { color: var(--muted); font-size: .83rem; }
.pitch { z-index: -1; position: absolute; inset: 15px 12% 15px 42%; border: 1px solid #edfff027; border-radius: 7px; transform: rotate(-12deg) scale(1.16); background: linear-gradient(90deg,transparent calc(50% - .5px),#edfff027 50%,transparent calc(50% + 1px)); pointer-events: none; }
.pitch::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: min(28%,96px); aspect-ratio: 1; transform: translate(-50%,-50%); border: 1px solid #edfff035; border-radius: 50%; }
.match-tiles { display: grid; }
.match-tile { display: grid; grid-template-columns: minmax(8rem, .8fr) minmax(0, 3fr) auto; align-items: center; gap: 7px 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.match-tile:last-child { border-bottom: 0; }
.match-time { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; margin: 0; color: #426064; font-size: .84rem; font-variant-numeric: tabular-nums; }
.match-time span { width: 100%; }
.match-teams { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 8px; font-weight: 690; overflow-wrap: anywhere; }
.match-teams>span:first-child { justify-self: end; text-align: right; }
.match-teams>span:first-child .club { flex-direction: row-reverse; }
.match-vs { border-radius: 6px; background: #e8f0ef; color: #2d5353; padding: 4px 7px; font-size: .81rem; white-space: nowrap; }
.match-winner,.match-tile>.badge { grid-column: 2; grid-row: auto; font-size: .82rem; margin: 0; justify-self: center; }
.match-cards { grid-column: 2; margin: 0; text-align: center; }
.match-cards .badge { font-size: .75rem; }
.summary-panels .match-tile { grid-template-columns: minmax(0,1fr) auto; }
.summary-panels .match-time { grid-row: 1; }
.summary-panels .match-teams { grid-column: 1/-1; grid-row: 2; }
.summary-panels .match-edit { grid-column: 2; }
.match-edit { grid-column: 3; grid-row: 1; min-height: 34px; }
.match-dialog { width: min(850px, calc(100% - 24px)); max-height: calc(100dvh - 24px); border: 1px solid var(--line); border-radius: 13px; padding: clamp(12px, 2vw, 22px); color: var(--ink); }
.match-dialog::backdrop { background: #10262799; }
.editor-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.match-editor .card { box-shadow: none; }
.goal-roster { padding: 4px 0; }
.goal-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.goal-line input { width: 4.25rem; flex: none; }
.card-amarilla { background: #fff3b0; color: #614700; }
.card-roja { background: #fee1de; color: #872720; }
.card-count { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 2.5rem; font-weight: 750; }
.card-icon { display: inline-block; width: .55em; height: .78em; border-radius: 2px; vertical-align: -.02em; flex: none; }
.card-icon-amarilla { background: #d2a400; }
.card-icon-roja { background: #c23833; }
.goal-icon { display: inline-block; font-size: .92em; }
.card-count-zero,.card-coverage { color: var(--muted); }
.card-coverage { margin-bottom: 12px; font-size: .87rem; }
.statistics-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 0 16px; align-items: start; }
.statistics-layout > div { min-width: 0; }
.segmented { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 12px; }
.segmented button { color: #325455; background: #edf4f3; }
.segmented button[aria-pressed=true] { color: #fff; background: var(--accent); }
.loading-state { padding: 36px 2px; }
#notice { position: fixed; bottom: 16px; right: 16px; max-width: min(440px,calc(100% - 32px)); z-index: 2; border-radius: 9px; background: var(--ink); color: #fff; padding: 12px 16px; box-shadow: var(--shadow); }
#notice.error { background: #862e26; }
.pending-dialog { width: min(420px,calc(100% - 32px)); border: 1px solid var(--line); border-radius: 13px; padding: 22px; color: inherit; }
.pending-dialog::backdrop { background: #10262799; }
.pending-dialog .toolbar { margin: 16px 0 0; }
[hidden] { display: none !important; }
@media(min-width:1120px) { .statistics-layout { grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); } }
@media(min-width:1160px) { .summary-panels:has(> :nth-child(2)) { grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); } }
@media(max-width:760px) {
  .app-layout { display: block; }
  .main-nav { position: static; flex-direction: row; gap: 5px; margin-bottom: 20px; }
  .main-nav button { padding: 7px 9px; font-size: .88rem; }
  main { padding-top: 16px; }
  .match-tile { grid-template-columns: minmax(0, 1fr) auto; }
  .match-time { grid-row: 1; }
  .match-time span { width: auto; }
  .match-teams { grid-column: 1/-1; grid-row: 2; }
  .match-edit { grid-column: 2; }
  .match-winner,.match-tile>.badge,.match-cards { grid-column: 1/-1; }
}
@media(max-width:520px) {
  .overview { grid-template-columns: minmax(0,1fr); }
  .overview-actions { grid-template-columns: 1fr 1fr; }
  .overview-actions button { grid-column: 1/-1; }
  .match-teams .club { gap: 4px; }
  .match-teams .club img { width: 21px; height: 21px; }
  .header-inner { gap: 8px; }
  .card,.alert { padding: 10px; }
  th,td { padding: 7px 6px; }
  table { font-size: .87rem; }
  table .club { min-width: 5.5rem; }
  table .club img { width: 20px; height: 20px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition: none !important; } }

.global-filters { display: grid; grid-template-columns: minmax(6rem,.55fr) minmax(8rem,1fr) minmax(10rem,2fr); padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.global-filters label { min-width: 0; }
@media(min-width:1120px) {
  .global-filters { max-width: 56rem; margin-inline: auto; }
}
.fixture-competition > summary,.fixture-round > summary { color: #174e45; padding: 4px 0; }
.fixture-round summary small { margin-left: 6px; color: var(--muted); }
.fixture-competition .fixture-round { margin-left: 12px; }
.player-name { display: inline-flex; align-items: center; gap: 7px; }
.player-photo { width: 27px; height: 27px; border-radius: 50%; object-fit: cover; flex: none; }
.player-initials { display: inline-grid; place-items: center; color: #285851; background: #e4f0ed; font-size: .65rem; font-weight: 750; }
@media(max-width:520px) {
  .global-filters { grid-template-columns: minmax(0,1fr) minmax(0,2fr); }
  .global-filters label:last-child { grid-column: 1/-1; }
}

/* Compact shared layout */
.header-inner { min-height: 54px; padding-block: 5px; }
main { padding-block: clamp(10px,1.2vw,20px) 16px; }
h1 { font-size: clamp(1.55rem,2.35vw,2.15rem); margin-bottom: 10px; }
h2 { font-size: 1.12rem; margin-bottom: 9px; }
.card,.alert { padding: clamp(10px,1.15vw,16px); margin-bottom: 10px; }
th,td { padding-block: 6px; }
.standings th,.standings td { height: 34px; }
.standings .club img { width: 23px; height: 23px; }
.global-filters {
  gap: 8px 12px;
  padding: 7px 10px;
  margin-bottom: 10px;
  background: #e1efe8;
  border-color: #abcbbf;
  border-inline-start: 4px solid var(--accent);
}
.global-filters label { color: #174e45; font-weight: 760; gap: 3px; }
.global-filters select { padding-block: 5px; min-height: 34px; }
.global-filters select:disabled { color: var(--muted); background: #f2f7f4; }
.overview { margin-bottom: 10px; padding: 12px; gap: 12px; }
.overview-heading { margin-bottom: 4px; gap: 9px; }
.overview-context { font-size: .8rem; margin-bottom: 2px; }
.overview-progress label { margin-bottom: 1px; }
.overview-metrics { margin-top: 4px; }
.overview-metrics div,.overview-actions div { padding: 4px 7px; }
.overview-actions { gap: 4px 7px; }
.overview-actions button { min-height: 32px; padding-block: 4px; }
.summary-winner { display: flex; align-items: center; gap: 10px; padding: 4px 9px; margin-bottom: 9px; border-radius: 8px; background: #fff4cc; }
.summary-winner .club { font-weight: 750; }
.summary-winner .badge { background: var(--standing-chip); color: var(--standing-ink); }
.standing-champion,.rank-champion { --standing-line: #a26715; --standing-bg: #fff5cc; --standing-chip: #fce6a4; --standing-ink: #66420a; }
.standing-reduced,.rank-reduced { --standing-line: #805bb1; --standing-bg: #f3edfc; --standing-chip: #eae0f7; --standing-ink: #563281; }
.standing-playoff-winner,.rank-playoff-winner { --standing-line: #168379; --standing-bg: #e2f5f2; --standing-chip: #ccebe6; --standing-ink: #195e56; }
.reduced-link { margin-top: 6px; }
.history-filters { margin-bottom: 12px; max-width: 32rem; }
.table-more { margin-top: 8px; }
.roster-tools { display: flex; align-items: end; flex-wrap: wrap; gap: 6px 12px; margin-block: 3px 9px; }
.roster-template { padding: 6px 8px; border: 1px solid #afc4c4; border-radius: 8px; background: #e8f0ef; font-weight: 680; }
@media(min-width:960px) {
  .overview { grid-template-columns: minmax(0,1fr) minmax(15rem,29%); }
  .overview-copy { display: grid; grid-template-columns: minmax(0,1.18fr) minmax(13rem,1fr); grid-template-rows: auto auto; align-items: center; gap: 2px 12px; }
  .overview-heading { grid-row: 1 / -1; margin: 0; }
  .overview-actions { grid-template-columns: 1fr 1fr; align-content: center; }
  .overview-actions button { grid-column: 1/-1; }
  .overview-metrics { margin-top: 0; }
}
@media(max-width:760px) {
  .main-nav { margin-bottom: 9px; }
}
.unconfirmed { color: var(--muted); font-weight: 500; }

.fixture-playoff { margin-top: 10px; padding: 10px 12px; border-left: 3px solid #805bb1; background: #f8f4fc; border-radius: 7px; }
.fixture-playoff h3 { color: #563281; margin: 0 0 3px; }
.fixture-playoff .fixture-round { margin-left: 0; }

.bracket-board > summary { color: var(--accent); }
.bracket-board[open] { padding-bottom: 16px; }
.bracket-grid { display: grid; gap: 24px; margin-top: 12px; }
.bracket-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.bracket-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.bracket-4 { grid-template-columns: repeat(4,minmax(0,1fr)); }
.bracket-round { display: flex; flex-direction: column; min-width: 0; }
.bracket-round h3 { margin: 0 0 8px; padding: 8px; background: #e7f2ed; border-radius: 7px; text-align: center; font-size: .92rem; }
.bracket-round ol { display: flex; flex: 1; flex-direction: column; justify-content: space-around; gap: 10px; margin: 0; padding: 0; list-style: none; }
.bracket-match { position: relative; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.bracket-linked::after { position: absolute; top: 50%; left: 100%; width: 24px; border-top: 1px solid #9cbcaf; content: ""; }
.bracket-side { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 30px; padding: 4px 7px; font-size: .83rem; }
.bracket-side + .bracket-side { border-top: 1px solid var(--line); }
.bracket-side > span { min-width: 0; overflow-wrap: anywhere; }
.bracket-side .club { gap: 4px; }
.bracket-side .club img { width: 19px; height: 19px; }
.bracket-side strong { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.bracket-side small { color: var(--muted); }
.bracket-winner { border-radius: 6px; background: #e5f5eb; color: #1f5f48; font-weight: 750; }
.bracket-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 3px; padding: 3px 7px; border-top: 1px solid var(--line); color: var(--muted); font-size: .74rem; }
.bracket-meta button { min-height: 27px; padding: 3px 6px; font-size: inherit; }
@media(max-width:1050px) {
  .bracket-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bracket-4 .bracket-linked::after { content: none; }
}
@media(max-width:640px) {
  .bracket-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .bracket-linked::after { content: none; }
}

tbody > tr:first-child > td { font-weight: 710; }
tbody > tr:first-child > td:first-child { box-shadow: inset 4px 0 #a46d22; }
tbody > tr:first-child:not([class^="standing-"]):not(.suspension-pending) { background: #fff5dc; }

.club.own-club { padding: 1px 4px; border-radius: 5px; background: #d3efe4; color: #134e3e; font-weight: 750; outline: 1px solid #78b4a2; outline-offset: -1px; }
tbody > tr:not([class^="standing-"]):not(.suspension-pending,.scorer-own):has(.own-club) > td { background-color: #edf8f3; }
tbody > tr:has(.own-club) > td:first-child { box-shadow: inset 4px 0 #337861; }
.summary-subsection { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.team-projection p,.scorer-race { font-size: .88rem; }
.scorer-race { margin: 0 0 8px; padding: 8px 10px; background: #edf6f1; border-radius: 7px; }

tbody > tr.scorer-own > td { background: #d7eee5; color: #153f36; font-weight: 710; }
tbody > tr.scorer-own:hover > td { background: #c7e6db; }
tbody > tr.scorer-own > td:first-child { box-shadow: inset 4px 0 #277761; }
tbody > tr:first-child.scorer-own > td:first-child { box-shadow: inset 4px 0 #a46d22; }
.summary-scorers table { table-layout: fixed; font-size: .82rem; }
.summary-scorers th,.summary-scorers td { padding: 5px 6px; white-space: nowrap; }
.summary-scorers th { font-size: .75rem; }
.summary-scorers th:first-child { width: 2.25rem; }
.summary-scorers th:last-child { width: 3.85rem; }
.summary-scorers td { overflow: hidden; text-overflow: ellipsis; }
.summary-scorers :is(.club,.player-name) { min-width: 0; max-width: 100%; gap: 4px; vertical-align: middle; }
.summary-scorers :is(.club-name,.player-display-name) { overflow: hidden; text-overflow: ellipsis; }
.summary-scorers .club img { width: 20px; height: 20px; }
.summary-scorers .player-photo { width: 22px; height: 22px; }
.team-projection { padding: 10px 12px; margin-bottom: 12px; }
.projection-scenarios { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 275px),1fr)); gap: 8px; }
.projection-scenario { min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #f6faf8; }
.projection-scenario-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; }
.projection-scenario h3,.projection-scenario p { margin: 0; }
.projection-scenario h3 { font-size: .95rem; }
.projection-place strong { color: #165749; font-size: 1.15rem; }
.projection-scenario summary { width: fit-content; margin-top: 4px; color: #245c50; cursor: pointer; font-size: .85rem; font-weight: 680; }
.team-projection .projection-note { color: var(--muted); margin: 6px 0 0; font-size: .8rem; }
.projection-matches { margin: 5px 0 0; padding: 0; list-style: none; }
.projection-matches li { display: grid; grid-template-columns: auto minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 5px; padding: 5px 0; border-top: 1px solid var(--line); font-size: .82rem; }
.projection-matches .club { min-width: 0; }
.projection-matches .club-name { white-space: normal; overflow-wrap: anywhere; }
.projection-round { color: var(--muted); }
.projection-score { white-space: nowrap; }

.team-fixture-matches { display: grid; gap: 5px; }
.team-match {
  --match-accent: #80988f;
  --match-bg: #e8efec;
  --match-ink: #38564f;
  min-width: 0;
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--match-accent);
  border-radius: 8px;
  background: var(--white);
}
.team-match-win { --match-accent: #26815b; --match-bg: #e4f4eb; --match-ink: #165a3c; }
.team-match-loss { --match-accent: #b54444; --match-bg: #fbe9e8; --match-ink: #8c2929; }
.team-match-draw { --match-accent: #9e730a; --match-bg: #fff4d3; --match-ink: #785607; }
.team-match-line {
  display: grid;
  grid-template-columns: minmax(140px,1fr) minmax(0,3fr) auto;
  align-items: center;
  gap: 6px 12px;
  padding: 6px 10px;
  border-radius: 5px;
  background: #f0f7f5;
}
summary.team-match-line { list-style: none; }
summary.team-match-line::-webkit-details-marker { display: none; }
summary.team-match-line:hover,.team-match[open] > summary { background: #e4f1ed; }
.team-match-meta { display: grid; gap: 1px; min-width: 0; font-size: .75rem; color: var(--muted); overflow-wrap: anywhere; }
.team-match-meta strong { font-size: .82rem; color: var(--ink); }
.team-match-line .match-teams { font-size: .87rem; }
.team-match-line .club { gap: 4px; min-width: 0; }
.team-match-line .club img { width: 20px; height: 20px; }
.team-match-indicators { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.team-match-outcome { padding: 2px 7px; border-radius: 5px; background: var(--match-bg); color: var(--match-ink); font-size: .75rem; font-weight: 730; }
.team-match-chevron { width: 7px; height: 7px; border-inline-end: 2px solid #52746a; border-block-end: 2px solid #52746a; transform: rotate(45deg) translateY(-2px); margin-inline: 2px; }
.team-match[open] .team-match-chevron { transform: rotate(225deg); }
.team-match:not([open]) > :is(.team-match-details,.team-match-tiebreak) { display: none; }
.team-match-tiebreak { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 10px; }
.team-match-details { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 240px),1fr)); gap: 8px 14px; padding: 7px 10px 10px; border-top: 1px solid var(--line); }
.team-match-details h4,.team-match-details ul,.team-match-details p { margin: 0; }
.team-match-details ul { padding: 0; list-style: none; }
.team-match-details li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; padding: 3px 7px; }
.team-match-details li,.team-match-details p { font-size: .84rem; overflow-wrap: anywhere; }
.team-match-details :is(.player-name,.club) { min-width: 0; gap: 4px; }
.team-match-details :is(.player-photo,.club img) { width: 20px; height: 20px; }
.team-match-details li:has(.own-club),.team-match-tiebreak .match-winner:has(.own-club) {
  border-radius: 6px;
  background: #d6ebe8;
  box-shadow: inset 3px 0 #397a70;
  color: #173f38;
  font-weight: 730;
}
.team-match-tiebreak .match-winner:has(.own-club) { padding: 4px 8px; }
@media(max-width: 660px) {
  .team-match-line { grid-template-columns: minmax(0,1fr) auto; padding: 5px 7px; }
  .team-match-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1px 6px; }
  .team-match-line .match-teams { grid-column: 1 / -1; grid-row: 2; }
  .team-match-indicators { grid-column: 2; grid-row: 1; }
}

.announcement-panel { max-width: 760px; min-width: 0; }
.announcement-panel select { width: min(100%,440px); }
.announcement-panel textarea { width: 100%; resize: vertical; padding: 9px 11px; border: 1px solid #afc4c4; border-radius: 8px; background: #f8faf9; color: var(--ink); font: inherit; }
.announcement-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.announcement-link { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 13px; border: 1px solid transparent; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 680; text-decoration: none; }
.announcement-link.secondary { background: #e8f0ef; color: #24474a; }
.announcement-link:hover { background: #08493f; color: #fff; }
.announcement-link.secondary:hover { background: #dcece8; color: #24474a; }
