:root {
  color-scheme: light;
  --ink: #172e40;
  --muted: #4c6272;
  --line: #dce6ec;
  --navy: #19384e;
  --mint: #267565;
  font-family: "Noto Sans SC", "Microsoft YaHei UI", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  background: #f4f7f9;
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: #205a78; text-underline-offset: 0.23em; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #268476; outline-offset: 4px; }
.shell { width: min(100% - 2rem, 48rem); margin-inline: auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner, nav { display: flex; align-items: center; }
.header-inner { justify-content: space-between; min-height: 4rem; gap: 1rem; }
.brand { font-size: 1rem; color: var(--navy); font-weight: 750; text-decoration: none; }
nav { gap: 0.35rem; font-size: 0.875rem; }
nav a { color: var(--muted); text-decoration: none; padding: 0.55rem 0.65rem; border-radius: 0.4rem; }
nav a[aria-current] { background: #e8f0f4; color: var(--navy); font-weight: 700; }
.page-title { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; margin: 2.25rem 0 1.15rem; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.45rem, 4.5vw, 2.1rem); letter-spacing: -0.025em; }
.page-title time, .result-header p, footer { color: var(--muted); font-size: 0.82rem; }
.results, .dates, .empty { background: #fff; border: 1px solid var(--line); border-radius: 0.85rem; }
.results { overflow: hidden; }
.result-header { display: flex; justify-content: space-between; align-items: center; gap: 0.65rem; padding: 1.15rem 1.35rem; background: var(--navy); color: #fff; }
h2 { font-size: clamp(1.05rem, 3.5vw, 1.5rem); }
.result-header p { color: #d8e6ee; margin-top: 0.25rem; }
.status { flex: none; padding: 0.35rem 0.55rem; border-radius: 0.35rem; font-size: 0.76rem; background: #e0f3ec; color: #185842; }
.status.stale, .status.awaiting { background: #fbefda; color: #683f12; }
.notice { padding: 0.7rem 1.35rem; font-size: 0.85rem; color: #684e20; background: #fff6e5; }
.notice.actual { background: #eaf5f1; color: #1d5648; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 0.53rem 0.65rem; border-bottom: 1px solid var(--line); }
thead th { background: #f0f5f7; font-size: 0.79rem; color: var(--muted); }
tr > :first-child { width: 12%; padding-left: 1.35rem; }
tr > :last-child { padding-right: 1.35rem; }
tbody th, .ticket-match { color: var(--muted); font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
.balls { display: inline-flex; align-items: center; gap: clamp(0.22rem, 1.35vw, 0.65rem); }
.ball { display: inline-grid; place-items: center; width: clamp(1.45rem, 6.7vw, 2.23rem); aspect-ratio: 1; border-radius: 50%; font-weight: 700; font-size: clamp(0.73rem, 2.6vw, 0.95rem); }
.front .ball { background: #e9f0fb; color: #1e4b82; }
.back .ball { background: #e5f4ef; color: #205f50; }
.ball.hit { outline: 2px solid currentColor; outline-offset: -2px; }
.details { display: grid; grid-template-columns: repeat(4, 1fr); margin: 1.15rem 0 0; gap: 1rem; padding: 1rem 0; }
.details dt { color: var(--muted); font-size: 0.76rem; margin-bottom: 0.25rem; }
.details dd { margin: 0; font-size: 0.85rem; font-weight: 650; }
.dates { margin-bottom: 1rem; padding: 0.75rem 1rem; font-size: 0.85rem; }
.dates summary { cursor: pointer; }
.dates ul { display: flex; gap: 0.55rem; flex-wrap: wrap; padding: 0; margin: 0.65rem 0 0; list-style: none; }
.dates a { display: block; text-decoration: none; padding: 0.3rem 0.5rem; border: 1px solid var(--line); border-radius: 0.35rem; }
.dates a[aria-current] { background: #e8f0f4; font-weight: 700; }
.empty { padding: 1.5rem; color: var(--muted); }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; margin: 0.8rem 0 2rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 34rem) {
  .shell { width: calc(100% - 1.2rem); }
  .page-title { margin-top: 1.65rem; }
  .result-header, .notice { padding-inline: 0.6rem; }
  th, td { padding-inline: 0.2rem; }
  tr > :first-child { width: auto; padding-left: 0.6rem; }
  tr > :last-child { padding-right: 0.4rem; }
  .details { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
}
