:root {
  --bg: #f6f4fb;
  --surface: #ffffff;
  --text: #1d1a2e;
  --muted: #625d78;
  --line: #e4e0ef;
  --link: #5b3fd1;
  --night-1: #1b1440;
  --night-2: #3a2470;
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12101d;
    --surface: #1c1930;
    --text: #ece9f7;
    --muted: #a9a3c2;
    --line: #2d2946;
    --link: #a996ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12101d; --surface: #1c1930; --text: #ece9f7; --muted: #a9a3c2; --line: #2d2946; --link: #a996ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--link); }
img { max-width: 100%; height: auto; display: block; }
.small { font-size: 0.9rem; color: var(--muted); }

/* ---- Header & footer ---- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 1100px; margin: 0 auto; padding: 18px 16px;
}
.brand { font-weight: 800; text-decoration: none; color: inherit; letter-spacing: 0.01em; }
.top nav { display: flex; gap: 18px; }
.top nav a { color: inherit; text-decoration: none; opacity: 0.85; }
.top nav a:hover { opacity: 1; text-decoration: underline; }
.foot { max-width: 1100px; margin: 64px auto 0; padding: 24px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.foot p { margin: 4px 0; }
.foot a { color: inherit; }

/* ---- Home ---- */
body.home { background: linear-gradient(180deg, var(--night-1) 0, var(--night-2) 520px, var(--bg) 520px); }
body.home .top, body.home .hero { color: #fff; }
.hero { max-width: 1100px; margin: 0 auto; padding: 48px 16px 40px; }
.hero h1 {
  font-family: "PaytoneOne", system-ui, sans-serif; font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 4.4rem); line-height: 1.05; margin: 0 0 16px;
  text-shadow: 0 4px 0 rgba(0,0,0,0.25);
}
.hero p { max-width: 560px; font-size: 1.1rem; opacity: 0.9; margin: 0; }
.cards {
  max-width: 1100px; margin: 0 auto; padding: 0 16px;
  display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr));
}
.card {
  display: block; text-decoration: none; color: var(--g-ink);
  background: linear-gradient(160deg, var(--g-from), var(--g-via) 55%, var(--g-to));
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 10px 30px rgba(20, 10, 60, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(20, 10, 60, 0.32); }
.card > img { width: 100%; aspect-ratio: 1024 / 500; object-fit: cover; }
.card-body { display: flex; gap: 16px; align-items: center; padding: 16px 20px 20px; }
.card .icon { width: 64px; height: 64px; border-radius: 16px; flex: none; box-shadow: 0 3px 8px rgba(0,0,0,0.3); }
.card h2 { font-family: var(--g-font), system-ui, sans-serif; font-weight: 400; font-size: 1.6rem; margin: 0; line-height: 1.1; }
.card p { margin: 4px 0 0; opacity: 0.9; }

/* ---- Game page ---- */
body.game { background: linear-gradient(180deg, var(--g-from) 0, var(--g-via) 420px, var(--g-to) 760px, var(--bg) 760px); }
body.game .top { color: var(--g-ink); }
.game-hero { max-width: 900px; margin: 0 auto; padding: 16px 16px 32px; text-align: center; color: var(--g-ink); }
.game-hero .logo { width: min(560px, 100%); margin: 0 auto; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.25)); }
.tagline { font-family: var(--g-font), system-ui, sans-serif; font-size: clamp(1.3rem, 4vw, 1.8rem); margin: 4px 0 20px; text-shadow: 0 2px 0 rgba(0,0,0,0.25); }
.stores { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.store {
  display: inline-block; padding: 12px 20px; border-radius: 999px; font-weight: 700; text-decoration: none;
  background: #111; color: #fff; box-shadow: 0 4px 0 rgba(0,0,0,0.35);
}
.store.soon { background: rgba(255,255,255,0.18); color: var(--g-ink); box-shadow: none; border: 1px solid rgba(255,255,255,0.35); font-weight: 600; }
.shots {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  max-width: 1100px; margin: 0 auto; padding: 8px 16px 20px;
}
.shots img { width: 240px; flex: none; border-radius: 16px; scroll-snap-align: start; box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
@media (min-width: 1100px) { .shots { justify-content: center; overflow: visible; } .shots img { width: 200px; } }
.text { max-width: 720px; margin: 24px auto 0; padding: 0 16px; }
.features { padding-left: 1.2em; }
.features li { margin: 6px 0; }
.features li::marker { color: var(--link); }

/* ---- Documents (privacy, support, credits) ---- */
.doc { max-width: 760px; margin: 0 auto; padding: 16px 16px 0; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.6rem); line-height: 1.15; margin: 16px 0 8px; }
.doc h2 { margin-top: 36px; font-size: 1.35rem; }
.doc h3 { margin: 24px 0 4px; font-size: 1.05rem; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 4px 0; }
