:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #e3e3e6;
  --card: #ffffff;
  --button: #1d1d1f;
  --button-text: #ffffff;
  --radius: 18px;
  --width: 1080px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-soft: #0f0f10;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --line: #2a2a2d;
    --card: #141415;
    --button: #f5f5f7;
    --button-text: #000000;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap { max-width: var(--width); margin: 0 auto; padding: 0 24px; }

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; height: 56px; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.brand svg { width: 24px; height: 24px; }
.nav-links { display: flex; gap: 24px; margin-left: auto; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--text); }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--button);
  color: var(--button-text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--button);
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.button:hover { opacity: 0.85; }
.button.quiet { background: transparent; color: var(--text); border-color: var(--line); }
.button.quiet:hover { opacity: 1; border-color: var(--muted); }
.button.small { height: 34px; padding: 0 16px; font-size: 14px; }
.nav .button { height: 32px; padding: 0 14px; font-size: 13px; }

/* Hero */
.hero { padding: 104px 0 56px; text-align: center; }
.eyebrow { font-size: 15px; color: var(--muted); margin: 0 0 14px; font-weight: 500; }
h1 {
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 auto 20px;
  max-width: 14ch;
}
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 40ch; margin: 0 auto 32px; }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.fine { font-size: 13px; color: var(--muted); margin-top: 16px; }

.shot { margin: 64px auto 0; max-width: 1040px; }
.shot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.35);
}

/* Sections */
section.block { padding: 112px 0; }
section.soft { background: var(--bg-soft); }
h2 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 16px; font-weight: 700; }
.section-lead { color: var(--muted); font-size: 19px; max-width: 46ch; margin: 0 0 56px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.tile h3 { font-size: 19px; letter-spacing: -0.015em; margin: 0 0 8px; }
.tile p { margin: 0; color: var(--muted); font-size: 15px; }
.num { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 18px; display: block; }

.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 8px; }
.figure strong { display: block; font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.04em; line-height: 1; font-weight: 700; }
.figure span { color: var(--muted); font-size: 15px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.list li { padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.list li b { color: var(--text); font-weight: 600; display: block; margin-bottom: 2px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: 13px; color: var(--muted); }
footer .wrap { display: grid; gap: 10px; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--text); }

/* Game list page */
.page-head { padding: 72px 0 32px; }
.page-head h1 { text-align: left; margin: 0 0 12px; max-width: none; font-size: clamp(36px, 5vw, 56px); }
.page-head p { color: var(--muted); margin: 0; max-width: 60ch; }
.toolbar { display: flex; gap: 12px; align-items: center; margin: 32px 0 20px; flex-wrap: wrap; }
.search {
  flex: 1 1 280px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  padding: 0 16px;
  font: inherit;
  font-size: 15px;
  outline: none;
}
.search:focus { border-color: var(--muted); }
.count { color: var(--muted); font-size: 14px; margin-left: auto; }
.games { display: grid; gap: 10px; padding-bottom: 96px; }
.game {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  background: var(--card);
}
.game h3 { margin: 0 0 4px; font-size: 17px; letter-spacing: -0.01em; }
.meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.game .buttons { display: flex; gap: 8px; }
.links { grid-column: 1 / -1; margin: 6px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--bg-soft); font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-x: auto; white-space: pre; display: none; }
.game.open .links { display: block; }
.empty { color: var(--muted); padding: 48px 0; text-align: center; }
.notice { color: var(--muted); font-size: 13px; margin: 0 0 8px; }

@media (max-width: 820px) {
  .grid, .figures, .split { grid-template-columns: 1fr; }
  .nav-links a.hide-sm { display: none; }
  section.block { padding: 80px 0; }
  .hero { padding: 72px 0 40px; }
  .game { grid-template-columns: 1fr; }
}
