:root {
  --ink: #14181F;
  --muted: #6B7280;
  --muted-2: #9AA1AC;
  --line: #E4E6EB;
  --stripe: #F7F8FA;
  --bg: #F2F3F6;
  --card: #FFFFFF;
  --accent: #2451C4;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Yu Gothic", "Inter", -apple-system, sans-serif;
}
header.main-header {
  background: #0E1116;
  color: #fff;
  padding: 20px 24px;
}
header.main-header h1 {
  margin: 0 0 4px;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}
header.main-header p {
  margin: 0;
  color: #9AA1AC;
  font-size: 0.85rem;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 20px; }
#status { color: var(--muted); padding: 40px 0; text-align: center; }

/* --- game list --- */
.filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filters select, .filters input {
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
.game-grid { display: grid; gap: 10px; }
.game-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.game-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.06); border-color: #C9CDD6; }
.game-card .date { font-size: 0.72rem; color: var(--muted); width: 68px; flex-shrink: 0; }
.game-card .matchup { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.game-card .team { display: flex; align-items: center; gap: 6px; min-width: 0; }
.game-card .team img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.game-card .team span { font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-card .score { font-weight: 700; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.game-card .score .win { color: var(--ink); }
.game-card .score .lose { color: var(--muted-2); }
.game-card .vs { color: var(--muted-2); font-size: 0.75rem; }

/* --- game detail --- */
.game-header {
  background: #0E1116;
  color: #fff;
  border-radius: 12px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.game-header .side { display: flex; align-items: center; gap: 12px; }
.game-header .side img { width: 40px; height: 40px; object-fit: contain; }
.game-header .side .score { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.game-header .side .name { font-size: 0.9rem; color: #D7DAE2; }
.game-header .meta { text-align: center; color: #9AA1AC; font-size: 0.78rem; }
.pdf-actions { margin: 16px 0; display: flex; gap: 10px; }
.pdf-actions a {
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.pdf-actions a.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.pdf-frame {
  width: 100%;
  height: 85vh;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.back-link { display: inline-block; margin-bottom: 12px; color: var(--muted); font-size: 0.82rem; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
