:root {
  color-scheme: light;
  --bg: #f4f8f3;
  --surface: #ffffff;
  --surface-soft: #f8fbf7;
  --surface-dark: #17231c;
  --text: #17211b;
  --muted: #66736a;
  --line: #dce6dd;
  --line-strong: #c6d5c8;
  --accent: #2da65a;
  --accent-deep: #18733a;
  --accent-soft: #dbf7e3;
  --blue: #5778d8;
  --purple: #955bc3;
  --orange: #c9822f;
  --danger: #bd4c59;
  --shadow: 0 18px 50px rgba(23, 45, 30, .10);
  --shadow-soft: 0 10px 30px rgba(23, 45, 30, .07);
  --radius: 20px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  font: 16px/1.7 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 8%, rgba(94, 221, 135, .12), transparent 26rem),
    radial-gradient(circle at 90% 18%, rgba(87, 120, 216, .08), transparent 30rem),
    var(--bg);
}

a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(198, 213, 200, .78);
  background: rgba(244, 248, 243, .88);
  backdrop-filter: blur(16px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  font-weight: 850;
  letter-spacing: -.02em;
}
.brand::before {
  content: "✦";
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: white;
  background: linear-gradient(145deg, var(--accent), #65d57f);
  box-shadow: 0 8px 20px rgba(45, 166, 90, .22);
}
.langs {
  display: flex;
  gap: 8px;
  max-width: 70vw;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.langs::-webkit-scrollbar { display: none; }
.langs a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}
.langs a:hover,
.langs a[aria-current="page"] {
  color: var(--accent-deep);
  background: rgba(45, 166, 90, .10);
  text-decoration: none;
}

main { display: block; }
section { padding: 66px 0; border-top: 1px solid var(--line); }
h1, h2, h3, p { overflow-wrap: anywhere; }
h2 { margin: 0 0 14px; font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.15; letter-spacing: -.035em; }
h3 { line-height: 1.25; }
.lead { max-width: 780px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); }
.muted { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.card,
.step {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 20px;
}
.card h3 { margin-top: .2rem; }
.steps { display: grid; gap: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255,255,255,.8);
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 8px 20px rgba(20, 39, 25, .05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; border-color: #aebfb1; box-shadow: var(--shadow-soft); }
.btn.primary { color: #fff; border-color: var(--accent); background: linear-gradient(135deg, var(--accent), #228f4a); box-shadow: 0 14px 30px rgba(45, 166, 90, .24); }
.btn.dark { color: #fff; border-color: #223129; background: var(--surface-dark); }
pre { padding: 20px; overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.footer { padding: 44px 0 70px; color: var(--muted); border-top: 1px solid var(--line); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
:focus-visible { outline: 3px solid rgba(45, 166, 90, .45); outline-offset: 3px; }

/* Game landing page */
.game-page .wrap { width: min(100% - 28px, var(--max)); }
.game-page .hero {
  position: relative;
  display: grid;
  gap: 30px;
  align-items: center;
  padding: 54px 0 64px;
  border: 0;
}
.game-page .hero::before {
  content: "";
  position: absolute;
  inset: 30px -10px 0;
  z-index: -1;
  border-radius: 34px;
  background:
    linear-gradient(rgba(45,166,90,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45,166,90,.045) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, #000, transparent 90%);
}
.hero-copy { max-width: 700px; }
.eyebrow,
.section-kicker {
  color: var(--accent-deep);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.game-page .hero h1 {
  margin: 12px 0 18px;
  font-size: clamp(2.6rem, 9.5vw, 5.8rem);
  line-height: .98;
  letter-spacing: -.065em;
}
.game-page .hero h1 .hero-main { display: block; }
.game-page .hero h1 .hero-sub {
  display: block;
  margin-top: 15px;
  color: var(--text);
  font-size: .46em;
  line-height: 1.16;
  letter-spacing: -.045em;
}
.game-page .hero h1 .accent-text { color: var(--accent); }
.hero-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 700px;
  margin-top: 16px;
  color: var(--muted);
  font-size: .9rem;
}
.hero-note::before { content: "◇"; flex: none; color: var(--accent); font-weight: 900; }

.hero-demo {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(45, 166, 90, .20);
  border-radius: 28px;
  background: rgba(255,255,255,.68);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-demo::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -70px;
  top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(103, 230, 143, .3), transparent 70%);
  pointer-events: none;
}
.demo-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(23,33,27,.06);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.instance-card {
  position: relative;
  min-height: 260px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.instance-card.dark {
  color: #eef8f0;
  border-color: #2a3a30;
  background:
    radial-gradient(circle at 85% 10%, rgba(116, 231, 148, .11), transparent 11rem),
    linear-gradient(145deg, #111914, #1c2a21);
}
.instance-card.forming {
  border-color: rgba(45,166,90,.35);
  background:
    radial-gradient(circle at 85% 10%, rgba(111, 241, 149, .20), transparent 12rem),
    linear-gradient(145deg, #ecfff1, #ffffff 68%);
}
.instance-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.instance-title { margin: 0; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(99,115,105,.10);
  font-size: .7rem;
  font-weight: 900;
}
.dark .status-pill { color: #cbd8ce; background: rgba(255,255,255,.08); }
.status-pill.live { color: var(--accent-deep); background: var(--accent-soft); }
.status-pill.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.instance-body { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; margin-top: 18px; }
.stat-list { margin: 0; }
.stat-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 5px 0; font-size: .95rem; }
.stat-row dt { color: var(--muted); }
.dark .stat-row dt { color: #aebbb1; }
.stat-row dd { margin: 0; font-weight: 900; text-align: right; }

.ai-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 86px;
  aspect-ratio: 1;
  border-radius: 42% 58% 54% 46% / 48% 44% 56% 52%;
  background: linear-gradient(145deg, #eaf1ec, #b9c9bd);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.75), 0 16px 34px rgba(7, 21, 12, .22);
  transform: rotate(-4deg);
}
.ai-orb::before {
  content: "";
  position: absolute;
  inset: 18% 14% 23%;
  border-radius: 42% 58% 50% 50%;
  background: #101612;
  box-shadow: inset 0 6px 14px rgba(255,255,255,.06);
}
.ai-eyes { position: relative; z-index: 2; display: flex; gap: 18px; transform: rotate(4deg) translateY(-3px); }
.ai-eyes::before,
.ai-eyes::after {
  content: "";
  width: 8px;
  height: 11px;
  border-radius: 50%;
  background: #eaffef;
  box-shadow: 0 0 12px rgba(179, 255, 202, .85);
}
.ai-mouth {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 29%;
  width: 18px;
  height: 8px;
  border-bottom: 2px solid rgba(224,255,232,.85);
  border-radius: 0 0 50% 50%;
  transform: translateX(-50%) rotate(4deg);
}
.forming .ai-orb { background: linear-gradient(145deg, #d7ffe3, #61d983); box-shadow: inset 0 0 0 4px rgba(255,255,255,.75), 0 16px 38px rgba(45,166,90,.28); }

.unlocks { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.unlock {
  padding: 6px 8px;
  border: 1px solid rgba(45,166,90,.18);
  border-radius: 9px;
  color: var(--accent-deep);
  background: rgba(219,247,227,.64);
  font-size: .64rem;
  font-weight: 950;
  letter-spacing: .04em;
  opacity: .34;
  transform: translateY(5px);
}

.demo-flow {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 138px;
  padding: 30px 4px 22px;
}
.energy-line {
  position: absolute;
  left: 50%;
  top: 8px;
  bottom: 12px;
  width: 4px;
  border-radius: 99px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, rgba(45,166,90,.08), rgba(45,166,90,.78), rgba(45,166,90,.08));
  box-shadow: 0 0 20px rgba(45,166,90,.32);
}
.energy-line::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #d8ffe2;
  border: 3px solid var(--accent);
  transform: translate(-50%, 0);
  box-shadow: 0 0 20px rgba(45,166,90,.5);
}
.conversation-stack { position: relative; z-index: 2; display: grid; gap: 7px; width: min(260px, 88%); }
.conversation-chip {
  justify-self: start;
  padding: 8px 12px;
  border: 1px solid #eadfbf;
  border-radius: 999px 999px 999px 9px;
  background: #fff9e9;
  color: #5f522f;
  font-size: .78rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(85,69,29,.06);
  opacity: .66;
}
.conversation-chip:nth-child(2) { justify-self: end; border-color: #d8e2fb; background: #f3f6ff; color: #3c4f7d; }
.conversation-chip:nth-child(3) { justify-self: center; border-color: #d9eadc; background: #f4fff7; color: #2c6840; }
.demo-replay {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 6;
  min-height: 40px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--accent-deep);
  background: rgba(255,255,255,.92);
  font-size: .72rem;
  font-weight: 950;
  cursor: pointer;
}
.demo-replay:hover { border-color: var(--accent); }
.demo-live-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.game-page .hero-demo.is-running .conversation-chip:nth-child(1) { animation: chipPop .48s .15s both; }
.game-page .hero-demo.is-running .conversation-chip:nth-child(2) { animation: chipPop .48s .62s both; }
.game-page .hero-demo.is-running .conversation-chip:nth-child(3) { animation: chipPop .48s 1.08s both; }
.game-page .hero-demo.is-running .energy-line::after { animation: energyTravel 1.9s .22s ease-in-out both; }
.game-page .hero-demo.is-running .forming { animation: formingWake .7s 1.55s both; }
.game-page .hero-demo.is-running .unlock:nth-child(1) { animation: unlockIn .4s 1.85s both; }
.game-page .hero-demo.is-running .unlock:nth-child(2) { animation: unlockIn .4s 2.05s both; }
.game-page .hero-demo.is-running .unlock:nth-child(3) { animation: unlockIn .4s 2.25s both; }

@keyframes chipPop { from { opacity: .12; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes energyTravel { from { top: 0; } to { top: calc(100% - 16px); } }
@keyframes formingWake { 0% { filter: saturate(.65); transform: scale(.985); } 55% { box-shadow: 0 0 0 5px rgba(45,166,90,.12), var(--shadow-soft); } 100% { filter: none; transform: none; } }
@keyframes unlockIn { from { opacity: .15; transform: translateY(8px) scale(.94); } to { opacity: 1; transform: none; } }

.game-section { position: relative; }
.game-section .section-head { max-width: 800px; margin-bottom: 26px; }
.game-section .section-head p { margin-bottom: 0; color: var(--muted); }
.section-title-row { display: flex; align-items: center; gap: 10px; }
.section-title-row::before,
.section-title-row::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(45,166,90,.45)); }
.section-title-row::after { background: linear-gradient(90deg, rgba(45,166,90,.45), transparent); }
.section-title-row h2 { flex: 0 1 auto; margin: 0; text-align: center; }

.branch-stage {
  display: grid;
  gap: 14px;
  align-items: stretch;
}
.branch-source,
.branch-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.branch-source { display: grid; place-items: center; min-height: 190px; padding: 18px; text-align: center; }
.branch-source .ai-orb { width: 74px; margin: 10px auto; }
.branch-arrow { display: grid; place-items: center; min-height: 44px; color: var(--accent); font-size: 1.4rem; font-weight: 900; }
.branch-outcomes { display: grid; gap: 14px; }
.branch-card { padding: 20px; }
.branch-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--blue); }
.branch-card.creative::before { background: var(--purple); }
.branch-card .mini-label { color: var(--blue); font-size: .75rem; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.branch-card.creative .mini-label { color: var(--purple); }
.branch-card h3 { margin: 8px 0; font-size: 1.25rem; }
.branch-card .mini-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0; }
.mini-stat { padding: 10px; border-radius: 12px; background: #f4f7fb; }
.creative .mini-stat { background: #fbf5ff; }
.mini-stat span { display: block; color: var(--muted); font-size: .68rem; font-weight: 800; }
.mini-stat strong { font-size: .95rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { padding: 5px 8px; border-radius: 999px; color: #36508d; background: #eaf0ff; font-size: .7rem; font-weight: 850; }
.creative .tag { color: #754090; background: #f4e9fb; }
.branch-caption { margin: 16px auto 0; max-width: 640px; color: var(--accent-deep); font-weight: 850; text-align: center; }

.achievement-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(225px, 78vw);
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 14px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.achievement-card {
  position: relative;
  min-height: 205px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  scroll-snap-align: start;
  overflow: hidden;
}
.achievement-card::after { content: "✦"; position: absolute; right: 15px; top: 10px; color: rgba(45,166,90,.22); font-size: 2rem; }
.achievement-card.blue::after { color: rgba(87,120,216,.22); }
.achievement-card.purple::after { color: rgba(149,91,195,.22); }
.achievement-card.orange::after { color: rgba(201,130,47,.22); }
.achievement-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; color: var(--accent-deep); background: var(--accent-soft); font-size: 1.4rem; font-weight: 950; }
.blue .achievement-icon { color: #3f5db2; background: #eaf0ff; }
.purple .achievement-icon { color: #78419a; background: #f3e8fb; }
.orange .achievement-icon { color: #9a6324; background: #fff0dc; }
.achievement-card h3 { margin: 14px 0 8px; }
.unlock-badge { display: inline-flex; margin-top: 10px; padding: 4px 8px; border: 1px solid rgba(45,166,90,.25); border-radius: 999px; color: var(--accent-deep); background: rgba(219,247,227,.6); font-size: .66rem; font-weight: 950; letter-spacing: .06em; }

.save-flow { display: grid; gap: 10px; align-items: stretch; }
.flow-card { position: relative; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-soft); }
.flow-card strong { display: block; margin-bottom: 6px; }
.flow-number { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 12px; border-radius: 10px; color: #fff; background: var(--accent); font-size: .78rem; font-weight: 950; }
.flow-arrow { display: grid; place-items: center; min-height: 32px; color: var(--accent); font-weight: 950; }
.keep-quote { margin: 22px 0 0; padding: 18px 20px; border: 1px solid rgba(189,76,89,.18); border-radius: 18px; background: #fff7f8; color: #753841; font-weight: 850; }
.write-note { margin-top: 16px; padding: 14px 16px; border: 1px solid rgba(45,166,90,.24); border-radius: 14px; background: rgba(219,247,227,.52); color: #285d38; font-size: .9rem; }

.life-grid { display: grid; gap: 16px; }
.life-card { min-height: 270px; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-soft); }
.life-card h3 { margin: 4px 0; font-size: 1.8rem; letter-spacing: -.04em; }
.life-card .life-sub { color: var(--accent-deep); font-weight: 850; }
.core-list { display: grid; gap: 9px; margin-top: 18px; }
.core-row { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.core-row span:first-child { color: var(--muted); font-size: .82rem; font-weight: 800; }
.core-row strong { font-size: .9rem; }
.journey-line { position: relative; display: grid; gap: 16px; margin-top: 22px; padding-left: 24px; }
.journey-line::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--accent), var(--line)); }
.journey-event { position: relative; }
.journey-event::before { content: ""; position: absolute; left: -22px; top: 8px; width: 10px; height: 10px; border: 3px solid var(--surface); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px rgba(45,166,90,.28); }
.journey-event small { color: var(--muted); font-weight: 800; }
.journey-event strong { display: block; }

.prompt-grid { display: grid; gap: 12px; }
.prompt-chip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.prompt-symbol { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; color: var(--accent-deep); background: var(--accent-soft); font-weight: 950; }
.prompt-chip strong { display: block; margin-bottom: 2px; }
.prompt-chip p { margin: 0; color: var(--muted); font-size: .9rem; }

.technical-details { margin-top: 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.7); overflow: hidden; }
.technical-details summary { padding: 18px 20px; cursor: pointer; font-weight: 900; }
.technical-details[open] summary { border-bottom: 1px solid var(--line); }
.technical-details .technical-body { padding: 20px; }

.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .58s ease, transform .58s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (min-width: 760px) {
  .game-page .hero { grid-template-columns: 1.02fr .98fr; padding: 74px 0 84px; }
  .hero-demo { grid-template-columns: minmax(0, 1fr) 118px minmax(0, 1fr); align-items: center; padding: 18px; }
  .instance-card { min-height: 330px; }
  .demo-flow { min-height: 260px; padding: 0; }
  .energy-line { top: 50%; bottom: auto; left: 2px; right: 2px; width: auto; height: 4px; transform: translateY(-50%); background: linear-gradient(to right, rgba(45,166,90,.08), rgba(45,166,90,.8), rgba(45,166,90,.08)); }
  .energy-line::after { top: 50%; left: 0; transform: translate(0, -50%); }
  .game-page .hero-demo.is-running .energy-line::after { animation: energyTravelDesktop 1.9s .22s ease-in-out both; }
  .conversation-stack { width: 118px; }
  .conversation-chip { font-size: .67rem; padding: 7px 9px; }
  .demo-replay { right: 20px; bottom: 16px; }
  @keyframes energyTravelDesktop { from { left: 0; } to { left: calc(100% - 16px); } }

  .branch-stage { grid-template-columns: 180px 44px 1fr; }
  .branch-outcomes { grid-template-columns: 1fr 1fr; }
  .branch-arrow { min-height: auto; font-size: 1.6rem; }
  .achievement-strip { grid-auto-flow: initial; grid-auto-columns: initial; grid-template-columns: repeat(4, 1fr); overflow: visible; }
  .save-flow { grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; }
  .flow-arrow { min-width: 22px; }
  .life-grid { grid-template-columns: 1fr 1fr; }
  .prompt-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1040px) {
  .game-page .hero { gap: 48px; }
  .instance-card { padding: 20px; }
  .prompt-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .wrap, .game-page .wrap { width: min(100% - 22px, var(--max)); }
  .nav { align-items: flex-start; padding: 12px 0; }
  .brand { min-height: 38px; font-size: .95rem; }
  .brand::before { width: 28px; height: 28px; border-radius: 9px; }
  .langs { width: 100%; max-width: none; order: 3; }
  .langs a { min-height: 36px; padding-inline: 8px; font-size: .8rem; }
  section { padding: 48px 0; }
  .game-page .hero { padding-top: 38px; }
  .game-page .hero h1 { font-size: clamp(2.6rem, 13vw, 4.2rem); }
  .game-page .hero h1 .hero-sub { font-size: .48em; }
  .actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .btn { width: 100%; }
  .instance-card { min-height: 245px; }
  .stat-row { font-size: .88rem; }
  .achievement-strip { margin-right: -11px; padding-right: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
