:root {
  color-scheme: light;
  --sky: #FFF4E6;
  --sand: #FCE3C4;
  --dune: #F9A533;
  --orange: #F16522;
  --ember: #D9481A;
  --ink: #3B2313;
  --ink-soft: #6E4A33;
  --white: #FFFFFF;
  --pearl: #FFFDF9;
  --shell: #FFF0DF;
  --radius-lg: 28px;
  --radius-sm: 14px;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: calc(80px + env(safe-area-inset-top, 0px)); }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Figtree", "Segoe UI", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--ember); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 8px; }

h1, h2, h3 {
  font-family: "Baloo 2", "Figtree", system-ui, sans-serif;
  line-height: 1.08;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; letter-spacing: -0.015em; }
h3 { font-size: 1.35rem; font-weight: 700; }
p { margin: 0; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* Header */
.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 21;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(12px);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand b { font-family: "Baloo 2", sans-serif; font-size: 1.3rem; font-weight: 800; line-height: 1; }
.brand span { display: block; font-size: 0.8rem; font-weight: 600; color: var(--orange); letter-spacing: 0.02em; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: 999px;
}
.nav a:hover { background: var(--shell); }
.nav a[aria-current="page"] { background: var(--sand); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky) 0%, #FFE9CF 62%, var(--sand) 100%);
}
.hero .wrap { position: relative; z-index: 2; padding: clamp(56px, 9vw, 110px) 0 0; }
.hero h1 { max-width: 13ch; }
.hero p.lead { margin-top: 18px; max-width: 34ch; font-size: 1.2rem; color: var(--ink-soft); }
.hero .scene { margin-bottom: -2px; position: relative; z-index: 1; margin-top: clamp(-40px, -3vw, -10px); width: 100%; height: auto; }
.sun { transform-origin: 50% 50%; }
@media (prefers-reduced-motion: no-preference) {
  .sun { animation: rise 1.6s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes rise { from { transform: translateY(70px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
}

/* Games */
.games { background: var(--sand); padding: 0 0 clamp(60px, 8vw, 100px); }
.game {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  background: var(--pearl);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 48px);
  box-shadow: 0 30px 60px -36px rgba(166, 74, 20, 0.45);
}
.game + .game { margin-top: 28px; }
.game.flip { grid-template-columns: 1fr 1.05fr; }
.game.flip .art { order: 2; }
.art { border-radius: 22px; overflow: hidden; }
.art svg { width: 100%; height: auto; }
.status {
  display: inline-block;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.status.soon { background: var(--orange); color: var(--white); }
.status.dev { background: var(--shell); color: var(--ember); }
.game h2 { margin-bottom: 12px; }
.game p { color: var(--ink-soft); max-width: 46ch; }
.points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.points li { display: flex; gap: 12px; align-items: flex-start; }
.points svg { width: 26px; height: 26px; flex: none; margin-top: 1px; }
.stores { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.store {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--white);
  border-radius: 999px; padding: 10px 18px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
}
.store.off { background: var(--shell); color: var(--ink); }
.store svg { width: 18px; height: 18px; }

/* Help band */
.help { padding: clamp(60px, 8vw, 96px) 0; }
.help h2 { max-width: 16ch; }
.help-grid { margin-top: 32px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 18px; }
.tile {
  display: block; text-decoration: none; color: var(--ink);
  border-radius: var(--radius-sm); padding: 26px;
  background: var(--shell);
  transition: transform .2s ease, background .2s ease;
}
.tile:hover { transform: translateY(-3px); background: #FFE6CC; }
.tile.main { background: var(--orange); color: var(--white); }
.tile.main:hover { background: var(--ember); }
.tile svg { width: 34px; height: 34px; margin-bottom: 18px; }
.tile h3 { color: inherit; }
.tile p { margin-top: 6px; opacity: 0.9; }

/* Document pages */
.doc-head { background: linear-gradient(180deg, var(--sky), var(--sand)); padding: clamp(48px, 7vw, 84px) 0 clamp(36px, 5vw, 56px); }
.doc-head p { margin-top: 12px; color: var(--ink-soft); }
.doc { padding: clamp(40px, 6vw, 72px) 0 clamp(60px, 8vw, 96px); }
.doc .wrap { display: grid; grid-template-columns: 240px 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.toc { position: sticky; top: calc(96px + env(safe-area-inset-top, 0px)); display: grid; gap: 4px; }
.toc a { text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; padding: 6px 12px; border-radius: 10px; }
.toc a:hover { background: var(--shell); color: var(--ink); }
.body { max-width: 68ch; }
.body section + section { margin-top: 40px; }
.body h2 { font-size: 1.7rem; margin-bottom: 12px; }
.body p + p, .body p + ul, .body ul + p { margin-top: 12px; }
.body ul { padding-left: 1.2em; margin: 12px 0 0; }
.body li + li { margin-top: 6px; }
.body .card { background: var(--shell); border-radius: var(--radius-sm); padding: 20px 22px; margin-top: 16px; }
.body .card h3 { font-size: 1.1rem; margin-bottom: 4px; }

/* Support */
.contact {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
  background: var(--orange); color: var(--white);
  border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 40px);
}
.contact h2 { color: var(--white); font-size: clamp(1.6rem, 3vw, 2.2rem); }
.contact p { margin-top: 6px; opacity: 0.92; }
.mail {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--white); color: var(--ember);
  font-weight: 700; text-decoration: none;
  padding: 14px 22px; border-radius: 999px;
}
.mail svg { width: 20px; height: 20px; }
.faq { margin-top: 40px; display: grid; gap: 12px; }
.faq details { background: var(--shell); border-radius: var(--radius-sm); padding: 4px 22px; }
.faq summary {
  cursor: pointer; list-style: none;
  font-family: "Baloo 2", sans-serif; font-weight: 700; font-size: 1.2rem;
  padding: 16px 0; display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 12px; height: 12px; flex: none;
  border-right: 3px solid var(--orange); border-bottom: 3px solid var(--orange);
  transform: rotate(45deg); transition: transform .2s ease; margin-top: -6px;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.faq details > div { padding: 0 0 18px; color: var(--ink-soft); }
.faq details > div p + p { margin-top: 10px; }

/* Footer */
.foot { background: var(--sand); color: var(--ink-soft); padding: 40px 0; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.foot a { color: var(--ink); text-decoration: none; font-weight: 600; }
.foot a:hover { color: var(--ember); }
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .game, .game.flip { grid-template-columns: 1fr; }
  .game.flip .art { order: 0; }
  .help-grid { grid-template-columns: 1fr; }
  .doc .wrap { grid-template-columns: 1fr; }
  .toc { position: static; display: flex; flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .brand span { display: none; }
  .nav { gap: 0; flex-wrap: nowrap; }
  .nav a { padding: 8px 7px; font-size: 0.88rem; }
  .brand { gap: 8px; }
  .brand svg { width: 32px; height: 32px; }
  .brand b { font-size: 1.1rem; }
  .nav a:first-child { display: none; }
  .hero .scene { height: 150px; }
}
