:root {
  color-scheme: light;
  --bg: #f3f4f6;
  --card: #ffffff;
  --bg-raise: #ffffff;
  --ink: #1a1f29;
  --muted: #4e5868;
  --faint: #6b7382;
  --line: rgba(22, 28, 40, 0.1);
  --line-strong: rgba(22, 28, 40, 0.16);
  --ps: #0b6fce;
  --ps-soft: #e7f2fc;
  --high: #0d7a45;
  --mid: #8a5a00;
  --low: #b42318;
  --sticky: 52px;
  --cover: 128px;
  font-family: "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

@media (min-width: 480px) {
  :root { --cover: 140px; }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  /* Match NutritionHub: solid page bg = theme-color so the top chrome blends. */
  background:
    radial-gradient(900px 380px at 50% -120px, rgba(11, 111, 206, 0.12), transparent 62%),
    var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

a { color: #0b63b6; }

img { max-width: 100%; height: auto; }

button, input { font: inherit; color: inherit; }

.wrap {
  width: min(720px, 100%);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.hero {
  padding: 28px 0 18px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: #0b63b6;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(22, 28, 40, 0.12);
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 700;
}

.lede {
  margin: 12px 0 0;
  max-width: 38em;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 0;
}

.stats div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(22, 28, 40, 0.04);
}

.stats dt {
  margin: 0;
  color: var(--faint);
  font-size: 12px;
}

.stats dd {
  margin: 4px 0 0;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.tools {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.search input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  box-shadow: 0 1px 2px rgba(22, 28, 40, 0.04);
}

.search input::placeholder { color: var(--faint); }

.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar { display: none; }

.filters button {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  white-space: nowrap;
}

.filters button[aria-pressed="true"] {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

.jump {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(243, 244, 246, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.jump-inner {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-top: 8px;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.jump-inner::-webkit-scrollbar { display: none; }

.jump a {
  flex: none;
  min-width: 44px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}

.jump a.is-active,
.jump a[aria-current="true"] {
  color: #ffffff;
  background: var(--ps);
}

.result-count {
  min-height: 1.2em;
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 13px;
}

.year { scroll-margin-top: var(--sticky); }

.year-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
}

.year-head h2 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.year-head p,
.month-label {
  margin: 0;
  color: var(--faint);
  font-size: 13px;
}

.month-label {
  margin: 16px 0 0 22px;
  letter-spacing: 0.08em;
}

.rail {
  margin-left: 4px;
  padding-left: 16px;
  border-left: 1px solid var(--line-strong);
}

.game {
  position: relative;
  display: grid;
  grid-template-columns: var(--cover) minmax(0, 1fr);
  gap: 12px 14px;
  margin-top: 10px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(22, 28, 40, 0.04), 0 8px 22px rgba(22, 28, 40, 0.05);
}

.game::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 24px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid #8b95a6;
}

.game.is-upcoming::before {
  background: var(--ps);
  border-color: var(--ps);
}

.cover {
  width: var(--cover);
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: #eceff3;
  box-shadow:
    0 0 0 1px rgba(22, 28, 40, 0.08),
    0 8px 16px rgba(22, 28, 40, 0.08);
}

.game-body { min-width: 0; padding-top: 2px; }

.game-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.game-meta time {
  color: var(--muted);
  font-family: "SF Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.01em;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef1f5;
  color: #3d4654;
  font-size: 12px;
}

.pill-soon,
.pill-hot {
  background: var(--ps-soft);
  color: #0b4f91;
}

.pill-hot { color: #fff; background: #0b6fce; }

.game h3 {
  margin: 6px 0 0;
  font-size: 1.05rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 650;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-wrap: pretty;
}

.game .title-en {
  display: block;
}

.game .title-zh {
  display: block;
  font-size: 0.92em;
  font-weight: 550;
  color: var(--muted);
  letter-spacing: 0;
}


.sub,
.dev {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.dev { color: var(--faint); }

.pt {
  margin: 10px 0 0;
  padding: 7px 8px;
  border-radius: 8px;
  background: var(--ps-soft);
  color: #12304d;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.pt span {
  margin-right: 6px;
  color: #0b63b6;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.scores {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.scores li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f7f8fa;
  border: 1px solid var(--line);
  font-size: 12px;
}

.scores .src {
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scores .val { font-variant-numeric: tabular-nums; }
.scores .val.high { color: var(--high); }
.scores .val.mid { color: var(--mid); }
.scores .val.low { color: var(--low); }

.empty {
  margin: 28px 0;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  padding: 28px 0 calc(36px + env(safe-area-inset-bottom));
  color: var(--faint);
  font-size: 13px;
  line-height: 1.6;
}

.site-footer p { margin: 0 0 8px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid #0b6fce;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (max-width: 359px) {
  :root { --cover: 120px; }
  .game { gap: 10px; }
}
