:root {
  --green: #0b6e4f;
  --green-dark: #07523b;
  --gold: #e8b923;
  --ink: #1a1a2e;
  --muted: #6b7280;
  --bg: #f6f7f4;
  --card: #ffffff;
  --line: #e5e7eb;
  --live: #d62828;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background-color: #e9f0e9;
  /* Faint mown-grass stripes (screen only; print forces plain white). */
  background-image: repeating-linear-gradient(
    90deg,
    rgba(11, 110, 79, 0.045) 0 80px,
    rgba(11, 110, 79, 0.015) 80px 160px
  );
}

/* ---------- Header ---------- */
.site-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff;
  padding: 30px 20px;
}
/* Soccer-pitch markings: mowing stripes, halfway line + center circle, corner arc (screen only). */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 84% 50%, transparent 47px, rgba(255,255,255,0.18) 48px, rgba(255,255,255,0.18) 50px, transparent 51px),
    radial-gradient(circle at 84% 50%, rgba(255,255,255,0.18) 4px, transparent 5px),
    linear-gradient(90deg, transparent calc(84% - 1px), rgba(255,255,255,0.18) calc(84% - 1px), rgba(255,255,255,0.18) calc(84% + 1px), transparent calc(84% + 1px)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 46px, rgba(255,255,255,0) 46px 92px);
}
.header-inner { position: relative; z-index: 1; max-width: 1000px; margin: 0 auto; }
.site-header h1 { margin: 0 0 4px; font-size: 1.9rem; }
.subtitle { margin: 0; opacity: 0.85; }

/* ---------- Controls ---------- */
.controls {
  max-width: 1000px;
  margin: 16px auto 0;
  padding: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.controls-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-weight: 800;
  color: var(--green-dark);
  background: #eef4f1;
  border-radius: 12px 12px 0 0;
}
.controls-summary::-webkit-details-marker { display: none; }
.controls-summary::after { content: "▸"; margin-left: auto; color: var(--muted); transition: transform 0.15s; }
.controls[open] .controls-summary::after { transform: rotate(90deg); }
.controls:not([open]) .controls-summary { border-radius: 12px; }
.controls-summary + .controls-row { border-top: 1px solid var(--line); }

/* Section jump-nav */
.section-nav {
  max-width: 1000px;
  margin: 10px auto 0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 4px 12px;
  flex-wrap: wrap;
}
.section-nav .nav-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.section-nav a { color: var(--green-dark); text-decoration: none; font-weight: 600; font-size: 0.9rem; padding: 4px 9px; border-radius: 6px; }
.section-nav a:hover { background: #eef4f1; }

.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: flex-end;
  padding: 14px 20px;
}
.controls-row + .controls-row { border-top: 1px solid var(--line); }
.row-label {
  align-self: center;
  width: 52px;
  flex: 0 0 auto;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.control-group { display: flex; flex-direction: column; gap: 5px; }
.control-group > label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.control-group select {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
  background: #fff;
  max-width: 260px;
}

/* Searchable time-zone combobox */
.combo { position: relative; }
.combo input {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
  background: #fff;
  width: 210px;
  max-width: 80vw;
}
.combo input:focus { outline: 2px solid var(--green); outline-offset: -1px; }
.combo-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  width: 320px;
  max-width: 90vw;
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}
.combo-list[hidden] { display: none; }
.combo-list li {
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.combo-list li .tz-name { font-weight: 500; }
.combo-list li .tz-off { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: #eef4f1; }
.combo-list li.tz-group-head {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  cursor: default;
  padding: 8px 10px 4px;
  font-weight: 700;
}
.combo-list li.tz-group-head:hover { background: none; }
.combo-list .tz-empty { color: var(--muted); cursor: default; }
.combo-list .tz-empty:hover { background: none; }

/* Multi-select venue filter */
.venue-btn {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
  background: #fff;
  width: 150px;
  max-width: 80vw;
  text-align: left;
  cursor: pointer;
}
.venue-btn:hover { background: #f0f1ee; }
.venue-btn[aria-expanded="true"] { outline: 2px solid var(--green); outline-offset: -1px; }
.venue-list { width: 300px; padding: 0; max-height: none; overflow: visible; }
.filter-search { padding: 8px 8px 0; }
.filter-search input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.88rem;
}
.filter-search input:focus { outline: 2px solid var(--green); outline-offset: -1px; }
.venue-actions {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  border-radius: 8px 8px 0 0;
}
.venue-actions .btn.link { padding: 2px 4px; font-size: 0.82rem; }
.venue-list ul { list-style: none; margin: 0; padding: 4px; max-height: 360px; overflow-y: auto; }
/* The shared .combo-list rule sets `display:flex` on <li>, which overrides the [hidden]
   attribute and breaks search filtering. Force hidden rows to actually hide. */
.venue-list ul li[hidden] { display: none !important; }
.venue-opt-name .flag, .venue-opt-name .flag-tbd { margin-right: 7px; vertical-align: -2px; }
.venue-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
}
.venue-opt:hover { background: #eef4f1; }
.venue-opt input { accent-color: var(--green); width: 16px; height: 16px; flex: 0 0 auto; }
.venue-opt-text { display: flex; flex-direction: column; line-height: 1.2; }
.venue-opt-name { font-weight: 600; }
.venue-opt-city { font-size: 0.74rem; color: var(--muted); }
.toggles, .actions { flex-direction: row; align-items: center; gap: 14px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; cursor: pointer; }
.toggle input { accent-color: var(--green); width: 16px; height: 16px; }
.print-option { font-size: 0.82rem; color: var(--muted); max-width: 220px; }

.btn {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 0.9rem;
  cursor: pointer;
}
.btn:hover { background: #f0f1ee; }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-dark); }
.btn.link { border: none; background: none; color: var(--green); text-decoration: underline; padding: 9px 4px; }

/* ---------- Dialog ---------- */
dialog {
  border: none;
  border-radius: 12px;
  max-width: 480px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
dialog::backdrop { background: rgba(0,0,0,0.45); }
dialog h2 { margin-top: 0; }
dialog .small { font-size: 0.82rem; color: var(--muted); }
.url-label { display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 14px 0 4px; }
.url-row { display: flex; gap: 8px; }
.url-row input {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  background: #f6f7f4;
  color: var(--ink);
}
.dialog-actions { margin: 16px 0; }
.dialog-actions .btn { text-decoration: none; display: inline-block; }
#local-warning { background: #fff7e6; border: 1px solid #f0d28a; border-radius: 8px; padding: 8px 10px; color: #7a5a00; }

/* ---------- App layout (sidebar + content) ---------- */
.app-layout {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 190px 1fr;
  padding: 0 20px;
}

.sidebar {
  position: sticky;
  top: 12px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 0;
}
.sidebar-tab {
  padding: 12px 16px;
  border: none;
  background: transparent;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  border-radius: 10px 0 0 10px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
  border-right: 3px solid transparent;
}
.sidebar-tab:hover { color: var(--green-dark); background: #eef4f1; }
.sidebar-tab.active {
  color: var(--green-dark);
  background: var(--card);
  border-right-color: var(--green);
}
.sidebar-tab .tab-icon { font-size: 1rem; }
.sidebar-spacer { flex: 1; min-height: 20px; }
.sidebar-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
}
.sidebar-option input { accent-color: var(--green); width: 14px; height: 14px; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-panel > .standings-section,
.tab-panel > .rules-section,
.tab-panel > .players-section { margin-top: 0; }

/* ---------- Schedule ---------- */
main { max-width: none; margin: 0; padding: 12px 0 40px 16px; }
.match-count { color: var(--muted); font-size: 0.85rem; margin: 10px 2px; }

.day-group { margin-top: 16px; }
.day-heading {
  font-size: 1.05rem;
  font-weight: 700;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--gold);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.day-heading::before { content: "⚽"; font-size: 0.95rem; flex: 0 0 auto; }
.day-group.is-today .day-heading { border-bottom-color: var(--green); }
.today-pill {
  background: var(--green);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
}

.match-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--stage, var(--green));
  border-radius: 10px;
  padding: 7px 14px;
  margin-bottom: 6px;
  display: grid;
  grid-template-columns: 76px 1fr auto;
  grid-template-areas:
    "time teams stage"
    "time meta  meta";
  column-gap: 14px;
  row-gap: 0;
  align-items: center;
  transition: box-shadow 0.15s, transform 0.15s;
}
.match-card > .match-time { grid-area: time; }
.match-card > .match-teams { grid-area: teams; }
.match-card > .match-stage { grid-area: stage; justify-self: end; align-self: start; text-align: right; white-space: nowrap; }
.match-card > .match-meta { grid-area: meta; text-align: left; }
.match-card:hover { box-shadow: 0 4px 16px rgba(11,110,79,0.13); transform: translateY(-1px); }

/* Stage color accents (left edge + the small match-stage label) */
.stage-group  { --stage: #0b6e4f; }
.stage-r32    { --stage: #2563eb; }
.stage-r16    { --stage: #0891b2; }
.stage-qf     { --stage: #7c3aed; }
.stage-sf     { --stage: #ea580c; }
.stage-third  { --stage: #64748b; }
.stage-final  { --stage: #d4a017; }
.match-card:not(.stage-group) .match-stage { color: var(--stage); font-weight: 700; }
.match-time { font-weight: 700; font-size: 0.95rem; }
.match-stage { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }

.match-teams { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; flex-wrap: wrap; }
.team { font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.team .team-name { transition: color 0.15s; cursor: pointer; text-decoration: none; color: inherit; }
.team .team-name:hover { color: var(--green-dark); text-decoration: underline; }
.team.winner .team-name { color: var(--green-dark); font-weight: 800; }

/* FIFA world-ranking badge */
.rank-badge {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--green-dark);
  background: #eef4f1;
  border-radius: 999px;
  padding: 1px 6px;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

/* Country flags */
.flag {
  width: 22px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
  flex: 0 0 auto;
  vertical-align: middle;
}
.flag-tbd {
  display: inline-block;
  width: 22px;
  height: 16px;
  border-radius: 2px;
  background: repeating-linear-gradient(45deg, #e9ebe7, #e9ebe7 3px, #f4f5f2 3px, #f4f5f2 6px);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}
.score {
  font-weight: 800;
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
  padding: 2px 9px;
  font-variant-numeric: tabular-nums;
}
.score.blank-box { background: none; color: var(--ink); border: 1.5px solid var(--ink); min-width: 50px; min-height: 24px; display: inline-block; }
.vs { color: var(--muted); font-size: 0.85rem; }

.match-meta { text-align: right; font-size: 0.83rem; color: var(--muted); line-height: 1.45; }
.match-venue { font-weight: 600; color: var(--ink); }

@media (max-width: 768px) {
  .app-layout {
    grid-template-columns: 1fr;
    padding: 0 12px;
  }
  .sidebar {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 8px 0;
    gap: 4px;
    border-bottom: 2px solid var(--line);
    margin-bottom: 4px;
  }
  .sidebar-tab {
    border-radius: 8px;
    border-right: none;
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 0.85rem;
  }
  .sidebar-tab.active {
    background: var(--green);
    color: #fff;
    border-right-color: transparent;
  }
  .sidebar-spacer { display: none; }
  .sidebar-option { padding: 8px 10px; font-size: 0.78rem; }
  main { padding: 8px 0 40px; }
}
@media (max-width: 640px) {
  .match-card { grid-template-columns: 56px 1fr auto; }
}

/* ---------- Location show/hide ---------- */
main.hide-location .match-meta { display: none; }

/* ---------- Today / Tomorrow panel ---------- */
.upcoming {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 12px;
  margin-top: 16px;
  overflow: hidden;
}
.upcoming-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #eef4f1;
}
.upcoming-summary::-webkit-details-marker { display: none; }
.upcoming-summary::after {
  content: "▸";
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.15s;
}
.upcoming[open] .upcoming-summary::after { transform: rotate(90deg); }
.upcoming-title { font-weight: 800; color: var(--green-dark); }
.upcoming-note { font-size: 0.72rem; color: var(--muted); font-weight: 400; }
.upcoming-count { font-size: 0.85rem; color: var(--muted); margin-left: auto; }
.upcoming-body { padding: 6px 16px 14px; }
.upcoming-day { font-size: 0.9rem; margin: 12px 0 6px; }
.upcoming-empty { color: var(--muted); margin: 8px 0; }

/* ---------- Shared section header (standings / players / rules) ---------- */
.section-title { font-size: 1.4rem; margin: 0 0 4px; }
.section-intro { color: var(--muted); margin: 0 0 18px; max-width: 72ch; }
.linklike { background: none; border: none; padding: 0; color: var(--green-dark); font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- Group standings ---------- */
.standings-section { margin-top: 34px; }
.standings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
}
.standings-group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  break-inside: avoid;
}
.standings-head { margin: 0 0 8px; font-size: 1rem; border-bottom: 3px solid var(--gold); padding-bottom: 5px; }
.standings-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.standings-table th { font-weight: 600; color: var(--muted); text-align: center; padding: 3px 4px; font-size: 0.74rem; }
.standings-table td { text-align: center; padding: 4px; border-top: 1px solid var(--line); }
.standings-table th.st-team, .standings-table td.st-team { text-align: left; }
.st-team { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.st-team .flag, .st-team .flag-tbd { flex: 0 0 auto; }
.st-pts { font-weight: 800; }
.st-pos { color: var(--muted); }
.standings-table tr.q1 td { background: #eef4f1; }
.standings-table tr.q1 .st-pos { color: var(--green); font-weight: 800; }
.standings-table tr.q3 .st-pos { color: #d4a017; font-weight: 800; }
.standings-legend { color: var(--muted); font-size: 0.8rem; margin-top: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.standings-legend .swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: -2px; }
.standings-legend .swatch.q1 { background: #cfe5db; }
.standings-legend .swatch.q3 { background: #f3e2b0; }
.standings-table tr.highlight td { background: #d4edda; transition: background 0.3s; }
.standings-table tr.highlight .st-team { font-weight: 800; }

/* ---------- Rules ---------- */
.rules-section { margin-top: 34px; }
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.rule-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 10px;
  padding: 12px 16px;
  break-inside: avoid;
}
.rule-card h3 { margin: 0 0 6px; font-size: 1rem; }
.rule-card p { margin: 0; font-size: 0.88rem; line-height: 1.5; }
.rule-card ul, .rule-card ol { margin: 0; padding-left: 1.2em; font-size: 0.88rem; line-height: 1.5; }
.rule-card li { margin-bottom: 3px; }
.rules-note { color: var(--muted); font-size: 0.8rem; margin-top: 14px; }

/* ---------- Player guide ---------- */
.players-section { margin-top: 34px; }
.players-title { font-size: 1.4rem; margin: 0 0 4px; }
.players-intro { color: var(--muted); margin: 0 0 18px; max-width: 70ch; }

.team-block { margin-bottom: 22px; break-inside: avoid; }
.team-block-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  margin: 0 0 10px;
  padding-bottom: 5px;
  border-bottom: 3px solid var(--gold);
}
.team-block-head .flag, .team-block-head .flag-tbd { width: 28px; height: 20px; }
.team-block-head .rank-badge { margin-left: auto; font-size: 0.78rem; padding: 2px 10px; }

.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.player-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 10px;
  padding: 12px 14px;
  break-inside: avoid;
}
.player-name { font-weight: 700; font-size: 1rem; }
.player-pos { font-size: 0.82rem; color: var(--muted); margin: 2px 0; }
.player-club { color: var(--green-dark); font-weight: 600; }
.player-from { font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }
.player-why { font-size: 0.86rem; margin: 0; line-height: 1.45; }
.jersey-num {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: 0.72rem;
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 4px;
  font-variant-numeric: tabular-nums;
  vertical-align: 1px;
}

/* Full roster table */
.roster-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  margin-top: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.roster-table thead { background: #eef4f1; }
.roster-table th {
  font-weight: 700;
  color: var(--muted);
  text-align: left;
  padding: 6px 10px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--line);
}
.roster-table td {
  padding: 5px 10px;
  border-top: 1px solid var(--line);
}
.roster-table tr:first-child td { border-top: none; }
.roster-table tr:hover { background: #f9faf8; }
.rt-num { text-align: center; font-weight: 700; color: var(--green-dark); width: 36px; font-variant-numeric: tabular-nums; }
.rt-name { font-weight: 600; }
.rt-pos {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  width: 40px;
}
.rt-age { text-align: center; width: 36px; font-variant-numeric: tabular-nums; }
.rt-club { color: var(--green-dark); }

/* ---------- Footer ---------- */
.site-footer { max-width: 1000px; margin: 0 auto; padding: 0 20px 30px; color: var(--muted); font-size: 0.8rem; }

/* ---------- Print: landscape, multi-column, compact ---------- */
@page {
  size: landscape;
  margin: 10mm;
}
@media print {
  .no-print { display: none !important; }
  .app-layout { display: block; max-width: none; padding: 0; }
  .tab-panel { display: block !important; }
  body { background: #fff !important; background-image: none !important; font-size: 10px; }
  .site-header { background: none; color: var(--ink); padding: 0 0 6px; border-bottom: 2px solid var(--ink); }
  .site-header::before { display: none !important; }  /* strip pitch markings */
  .day-heading::before { content: none; }             /* strip the ⚽ bullet */
  .site-header h1 { font-size: 1.15rem; }
  .subtitle { font-size: 0.8rem; }
  main { max-width: none; padding: 0; }

  /* Flow the whole schedule into 3-4 balanced columns to cut page count.
     column-width lets the browser pick 3 (portrait-ish) or 4 (wide) automatically. */
  #schedule {
    column-width: 2.7in;
    column-gap: 16px;
    margin-top: 6px;
  }
  .day-group { break-inside: avoid; margin: 0 0 8px; }
  .day-heading { font-size: 0.82rem; border-bottom-width: 2px; padding-bottom: 3px; margin-bottom: 4px; }

  /* Compact stacked card: time + group on one line, teams below, venue small.
     Keep the stage-color left edge (borders print) for at-a-glance round grouping. */
  .match-card {
    display: block;
    border: none;
    border-left: 3px solid var(--stage, #0b6e4f);
    border-bottom: 1px solid #ddd;
    border-radius: 0;
    padding: 2px 0 2px 6px;
    margin: 0;
    break-inside: avoid;
    box-shadow: none;
  }
  .match-time { display: inline; font-size: 0.78rem; }
  .match-stage { display: inline; margin-left: 6px; font-size: 0.66rem; }
  .match-teams { font-size: 0.82rem; margin: 1px 0; gap: 6px; }
  .team { gap: 5px; }
  .flag, .flag-tbd { width: 16px; height: 12px; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.2); }
  .team.winner .team-name { font-weight: 800; }
  .score { background: none; color: var(--ink); padding: 0 3px; font-size: 0.82rem; }
  .score.blank-box { border: 1px solid var(--ink); min-width: 34px; min-height: 15px; }
  .match-meta { text-align: left; font-size: 0.68rem; line-height: 1.25; }

  /* Outline pill so "Today" stays visible even when background colors aren't printed. */
  .today-pill { background: none; color: var(--green-dark); border: 1px solid var(--green-dark); padding: 1px 5px; }

  /* Make flags and stage accents render in color on the printout. */
  .flag, .match-card { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .site-footer { padding: 6px 0 0; font-size: 0.68rem; }
  a { text-decoration: none; color: inherit; }

  /* Player guide prints after the schedule, starting on a fresh page. */
  .players-section[hidden] { display: none !important; }
  .players-section {
    break-before: page;
    margin-top: 0;
    column-width: 3.2in;
    column-gap: 16px;
  }
  .players-title { font-size: 1.1rem; column-span: all; }
  .players-intro { font-size: 0.72rem; column-span: all; margin-bottom: 10px; }
  .team-block { margin-bottom: 10px; }
  .team-block-head { font-size: 0.9rem; border-bottom-width: 2px; margin-bottom: 6px; }
  .team-block-head .flag { width: 20px; height: 14px; }
  .rank-badge { background: none; color: var(--green-dark); border: 1px solid var(--green-dark); padding: 0 4px; font-size: 0.64rem; }
  .player-grid { display: block; }
  .player-card {
    border: none;
    border-left: 3px solid var(--green);
    border-radius: 0;
    padding: 3px 0 4px 7px;
    margin-bottom: 5px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .player-name { font-size: 0.82rem; }
  .player-pos, .player-from { font-size: 0.68rem; margin: 0; }
  .player-why { font-size: 0.72rem; line-height: 1.3; margin-top: 2px; }
  .jersey-num { background: none; color: var(--green-dark); border: 1px solid var(--green-dark); padding: 0 3px; font-size: 0.64rem; }
  .roster-table { font-size: 0.7rem; margin-top: 4px; border: 1px solid #ddd; break-inside: avoid; }
  .roster-table th { font-size: 0.62rem; padding: 3px 5px; }
  .roster-table td { padding: 2px 5px; }
  .roster-table thead { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* Standings & Rules each print on their own page; hide when toggled off. */
  .standings-section[hidden], .rules-section[hidden] { display: none !important; }
  .standings-section, .rules-section { break-before: page; margin-top: 0; }
  .section-title { font-size: 1.1rem; }
  .section-intro { font-size: 0.72rem; margin-bottom: 10px; }
  .standings-grid { column-width: 3in; column-gap: 16px; display: block; }
  .standings-group { break-inside: avoid; margin-bottom: 8px; border: 1px solid #ddd; }
  .standings-table { font-size: 0.7rem; }
  .standings-table tr.q1 td { background: none; }
  .standings-table tr.q1 .st-pos { color: var(--green-dark); }
  .rules-grid { column-width: 3.4in; column-gap: 16px; display: block; }
  .rule-card { break-inside: avoid; border: none; border-left: 3px solid var(--green); border-radius: 0; padding: 2px 0 6px 7px; margin-bottom: 8px; }
  .rule-card h3 { font-size: 0.84rem; }
  .rule-card p, .rule-card ul, .rule-card ol { font-size: 0.72rem; line-height: 1.35; }
  .linklike { text-decoration: none; color: inherit; }
}
