:root {
  --bg: #f6f7f9; --card: #fff; --text: #1d2330; --muted: #6b7280; --line: #e5e7eb;
  --accent: #0b6bcb; --live: #d92d20; --flash: #fff4c2;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
       background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
main { max-width: 960px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 8px 0 16px; }
h1 small, h3 small { color: var(--muted); font-weight: normal; font-size: 0.7em; }
h2 { font-size: 16px; margin: 0 0 8px; }
section { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; }
.top { display: flex; gap: 16px; align-items: center; padding: 10px 16px; background: #111827; color: #fff; }
.top .brand { font-weight: 700; }
.live-state { margin-left: auto; font-size: 12px; background: var(--live); padding: 2px 8px; border-radius: 10px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }
.empty, .meta, .coach { color: var(--muted); }
.tag { font-size: 11px; background: #eef2ff; color: #3730a3; padding: 1px 6px; border-radius: 8px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.days { display: flex; gap: 14px; align-items: center; }
.filter select, .filter button { padding: 4px 8px; font-size: 14px; }

.matches { list-style: none; margin: 0; padding: 0; }
.match-row { display: grid; grid-template-columns: 52px 1fr 76px 1fr 64px; gap: 8px; align-items: center;
             padding: 8px 4px; border-top: 1px solid var(--line); }
.match-row:first-child { border-top: none; }
.match-row .kickoff { color: var(--muted); font-size: 13px; }
.team { display: flex; gap: 6px; align-items: center; min-width: 0; }
.team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
h1, .timeline .who, .lineups li, td { overflow-wrap: anywhere; }
.paging { display: flex; gap: 16px; justify-content: center; color: var(--muted); margin: 8px 0; }
.team.home { justify-content: flex-end; text-align: right; }
.team img { flex: none; }
.match-row .score { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.match-row .clock { text-align: right; font-size: 13px; color: var(--muted); }
.is-live .clock { color: var(--live); font-weight: 600; }
.flash { animation: flash 2s ease-out; }
@keyframes flash { from { background: var(--flash); } to { background: transparent; } }

.scoreboard .board { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; padding: 10px 0; }
.scoreboard .team { font-size: 18px; font-weight: 600; }
.scoreboard .center { text-align: center; }
.big-score { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.scoreboard .clock { color: var(--muted); }
.sub-scores { font-size: 12px; color: var(--muted); }

.timeline ol { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 5px 0; border-top: 1px dashed var(--line); display: flex; gap: 8px; align-items: baseline; }
.timeline li.period { justify-content: center; color: var(--muted); font-size: 13px; }
.timeline li.away { flex-direction: row-reverse; text-align: right; }
.timeline .min { width: 48px; font-variant-numeric: tabular-nums; color: var(--muted); }
.timeline .assist { color: var(--muted); font-size: 13px; }
.timeline li.cancelled { opacity: 0.55; text-decoration: line-through; }
.timeline li.cancelled .tag { text-decoration: none; }

.lineups .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lineups ul { list-style: none; padding: 0; margin: 0 0 8px; }
.lineups .no { display: inline-block; width: 24px; color: var(--muted); text-align: right; }
.lineups h4 { margin: 8px 0 4px; font-size: 13px; color: var(--muted); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 6px 8px; border-top: 1px solid var(--line); text-align: center; }
.stats th[scope="row"] { color: var(--muted); font-weight: normal; }
.table-wrap { overflow-x: auto; }
.standings td:nth-child(2), .player-stats td:first-child { text-align: left; }
.form { letter-spacing: 1px; font-size: 12px; }

@media (max-width: 600px) {
  .match-row { grid-template-columns: 44px 1fr 60px 1fr; }
  .match-row .clock { grid-column: 1 / -1; text-align: center; }
  .lineups .cols { grid-template-columns: 1fr; }
  .big-score { font-size: 28px; }
}
