/* Hamstermatic: local assets, system fonts, native HTML controls. */
:root {
  --ink: #25233c;
  --purple: #4b289c;
  --cobalt: #3559c7;
  --yellow: #ffd36e;
  --orange: #e98130;
  --paper: #fffcf5;
  --muted: #5c586e;
  --card: #fff;
  --radius: 20px;
  --line: 2px solid var(--ink);
  --shadow: 0 4px 0 var(--ink);
  --font: ui-rounded, "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-black: "Segoe UI Black", ui-rounded, "Arial Black", var(--font);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 98px; }
body { margin: 0; font: 18px/1.6 var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--purple); text-underline-offset: 4px; }
a, summary { -webkit-tap-highlight-color: #ffd36e66; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 5px; }
::selection { color: var(--ink); background: var(--yellow); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.16; text-wrap: balance; }
h2 { font: clamp(30px, 3.6vw, 44px)/1.16 var(--font-black); letter-spacing: -1px; color: var(--purple); }
h3 { font-size: 23px; }
p { margin: 0 0 1em; }
.wrap { width: min(1220px, 100% - 64px); margin-inline: auto; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -100px; z-index: 99; padding: 10px 18px; background: #fff; border: var(--line); border-radius: 12px; }
.skip:focus { top: 12px; }
.split > *, .pillars > *, .story .wrap > *, .hero .wrap > *, .stores > * { min-width: 0; }
h2, h3, summary, .card p, .topic p, .steps p, .ticks li, .trust li, .stats span, .chip, figcaption { hyphens: auto; overflow-wrap: break-word; }

/* A second, scrollable header row keeps every section available on small screens. */
.top { position: sticky; top: 0; z-index: 20; background: #fffcf5f5; backdrop-filter: blur(12px); border-bottom: 1px solid #25233c26; }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 78px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--purple); text-decoration: none; flex: none; }
.brand img { width: 40px; height: 40px; border-radius: 12px; }
.brand span { font: 23px/1.2 var(--font-black); letter-spacing: -.6px; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; min-width: 0; }
.nav a { display: block; flex: none; padding: 10px 9px; font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; border-radius: 9px; }
.nav a:hover { color: var(--purple); background: #eee7ff; }
details.langmenu { position: relative; flex: none; margin: 0 0 0 auto; padding: 0; border: 0; background: none; }
.langmenu summary { display: flex; align-items: center; gap: 6px; list-style: none; min-height: 44px; padding: 8px 12px; font-size: 14px; font-weight: 750; cursor: pointer; border: 1px solid #25233c3d; border-radius: 12px; background: #fff; white-space: nowrap; }
.langmenu summary::-webkit-details-marker { display: none; }
.langmenu summary::after { content: "▾"; }
.langmenu[open] summary { background: #eee7ff; }
.langmenu .lcode { display: none; }
.langlist { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; min-width: 190px; margin: 0; padding: 6px; list-style: none; border: var(--line); border-radius: 16px; background: #fff; box-shadow: 0 5px 0 var(--ink); }
.langlist a { display: block; padding: 10px 14px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
.langlist a:hover { background: #eee7ff; }
.langlist a[aria-current] { background: var(--yellow); }
.langlist a[aria-current]::after { content: " ✓"; }
@media (max-width: 1270px) {
  html { scroll-padding-top: 146px; }
  .top .wrap { flex-wrap: wrap; gap: 0 16px; padding-top: 10px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; margin: 6px 0 0; padding: 2px 3px 8px; scrollbar-width: thin; scrollbar-color: #b9a6de transparent; }
  .nav a { padding-inline: 14px; }
}

/* Primary actions lead to gameplay and release information. */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 16px; min-height: 52px; padding: 13px 21px; border: var(--line); border-radius: 13px; box-shadow: var(--shadow); color: var(--ink); background: #fff; font-size: 16px; font-weight: 800; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary { color: #fff; background: var(--purple); }
.btn.secondary { background: #fff9; }
.btn .ico, .store-status .ico { width: 32px; height: 32px; flex: none; }
.btn small, .store-status small { display: block; font-size: 13px; font-weight: 600; line-height: 1.4; }
.btn b, .store-status b { display: block; line-height: 1.4; }
.btn.itch { background: #b82e43; color: #fff; }
.btn.play { background: #fff; }

/* The game is visible immediately, with Ming as the guide. */
.hero { position: relative; padding: 62px 0 64px; background: radial-gradient(ellipse at 90% 40%, #ddceff 0, transparent 55%), radial-gradient(ellipse at 5% 0, #fff0c9 0, transparent 50%), #f5f1ff; border-bottom: 1px solid #25233c26; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; margin-bottom: 18px; font-size: 12px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; color: var(--purple); }
.hero h1 { font: clamp(38px, 4.4vw, 62px)/1.05 var(--font-black); letter-spacing: -2px; color: var(--purple); margin-bottom: 17px; }
.hero .tag { font: 800 clamp(26px, 2.6vw, 36px)/1.2 var(--font); letter-spacing: -.9px; text-wrap: balance; margin-bottom: 20px; }
.hero .lead { font-size: 17px; line-height: 1.65; color: var(--muted); max-width: 35em; margin-bottom: 24px; }
.release-note { display: flex; gap: 8px; align-items: baseline; margin: 16px 0 22px; font-size: 13px; font-weight: 650; color: var(--muted); }
.status-dot { flex: none; width: 7px; height: 7px; background: var(--purple); border-radius: 50%; }
.trust { display: flex; flex-wrap: wrap; gap: 7px 16px; margin: 0; padding: 0; list-style: none; }
.trust li { color: var(--purple); font-size: 13px; font-weight: 750; }
.hero-scene { position: relative; padding: 10px 0 100px; }
.hero-preview { position: relative; transform: rotate(-2deg); border-radius: 18px; box-shadow: 10px 12px 0 #4b289c21; }
.hero-preview figcaption { display: flex; align-items: center; gap: 18px; border-top: 0; border-bottom: var(--line); background: #fffaf0; padding: 13px 16px; font-size: 13px; }
.scene-dots { color: var(--purple); font-size: 12px; letter-spacing: 1px; white-space: nowrap; }
.hero .ming { position: absolute; width: 190px; right: 10px; bottom: -30px; filter: drop-shadow(0 8px 0 #4b289c1a); pointer-events: none; }
.stats { background: var(--purple); color: #fff; }
.stats ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; list-style: none; margin: 0 auto; padding-block: 24px; text-align: center; }
.stats li + li { border-left: 1px solid #ffffff38; }
.stats b { display: block; color: var(--yellow); font: 36px/1.1 var(--font-black); letter-spacing: -1px; }
.stats span { font-size: 13px; font-weight: 650; }

/* Content and media share quieter frames so the colorful game can stand out. */
section { padding: 80px 0; }
section.alt { background: #f0f3fa; border-block: 1px solid #25233c14; }
section.warm { background: #fff3dc; border-block: 1px solid #25233c14; }
.intro { max-width: 46em; color: var(--muted); font-size: 18px; margin-bottom: 32px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.rev > :first-child { order: 2; }
figure { margin: 0; }
.shot { overflow: hidden; border: var(--line); border-radius: var(--radius); background: #fff; box-shadow: 4px 5px 0 #25233c1c; }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
figcaption { padding: 12px 16px; border-top: 1px solid #25233c26; background: #fff; font-size: 14px; font-weight: 650; }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 12px; font-size: 16px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 2px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: #e7defa; color: var(--purple); font-size: 14px; font-weight: 900; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.gallery a { text-decoration: none; color: inherit; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.pillar { border: var(--line); border-radius: 24px; padding: 26px; background: #fff; box-shadow: 5px 6px 0 #25233c14; }
.pillar.fun { background: #fff1ec; }
.pillar.learn { background: #eee9fc; }
.pillar h3 { font: 30px/1.2 var(--font-black); color: var(--purple); margin: 12px 0 20px; }
.pillar .shot { margin-bottom: 24px; box-shadow: none; border-width: 1px; border-radius: 12px; }
.pillar p { font-size: 16px; color: var(--muted); }
.ptag { display: inline-block; font-size: 11px; font-weight: 850; letter-spacing: 1.5px; padding: 4px 10px; border-radius: 6px; }
.fun .ptag { background: #ffd8c7; color: #8a3316; }
.learn .ptag { background: #dacefb; color: #492482; }
.ptag.new { background: #c9f2d4; color: #17603a; vertical-align: middle; position: relative; top: -4px; }
.topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.topic { overflow: hidden; border: 1px solid #25233c30; border-radius: 18px; background: #fff; display: flex; flex-direction: column; }
.topic > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.topic > div { padding: 20px; }
.topic h3 { margin-bottom: 10px; font-size: 22px; }
.topic p { margin: 0; font-size: 15px; color: var(--muted); }
.chip { display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 6px; margin-bottom: 12px; }
.chip.energy { background: #fff0b2; color: #65500c; }
.chip.build { background: #ffe2cc; color: #763d15; }
.chip.forces { background: #dceaff; color: #254677; }
.chip.science { background: #e7ddff; color: #543685; }
.chip.nature { background: #d9efdc; color: #305f38; }
.expert { display: flex; align-items: center; gap: 18px; margin-top: 30px; padding: 22px; border: 1px solid #25233c26; border-radius: 16px; background: #fff; }
.expert .badge { flex: none; font-size: 32px; }
.expert p { margin: 0; font-size: 16px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 26px; }
.card { padding: 24px; border: 1px solid #25233c26; border-radius: 18px; background: #fff; }
.card .em { font-size: 28px; margin-bottom: 15px; line-height: 1; }
.card h3 { margin-bottom: 10px; font-size: 20px; }
.card p { margin: 0; font-size: 16px; color: var(--muted); }
.story .wrap { display: grid; grid-template-columns: 1.35fr .65fr; gap: 40px; align-items: start; }
.story-card { padding: 32px; border: var(--line); border-radius: 24px; background: #fff; box-shadow: 6px 7px 0 #25233c12; }
.story-card p { color: var(--muted); font-size: 17px; }
.story-card strong { color: var(--purple); font-size: 21px; }
.story-card .sign { color: var(--purple); font-weight: 750; font-size: 15px; margin-bottom: 0; }
.story-points { display: grid; gap: 18px; }
.steps { display: grid; gap: 18px; list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 18px; align-items: flex-start; padding: 18px; border: 1px solid #25233c26; border-radius: 16px; background: #fff; }
.steps .num { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--yellow); font-weight: 850; font-size: 21px; }
.steps h3 { margin: 2px 0 6px; font-size: 20px; }
.steps p { margin: 0; font-size: 16px; color: var(--muted); }
.code { margin-top: 18px; padding: 12px 16px; font: 14px/1.6 ui-monospace, Consolas, monospace; color: var(--purple); background: #eee7ff; border: 1px dashed #4b289c66; border-radius: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#create .split, #share .split { align-items: start; }
#create .ticks { margin-bottom: 24px; }

/* Animated WebP plays as soon as the image loads; picture selects a still for reduced motion. */
.clip { display: block; overflow: hidden; background: #dae5f7; }
.clip img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

.stores { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 30px; }
.store { display: flex; flex-direction: column; align-items: flex-start; padding: 30px; border: var(--line); border-radius: 20px; background: #fff; }
.store h3 { font-size: 25px; }
.store p { color: var(--muted); font-size: 17px; }
.store-status { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: auto; padding: 16px; border-radius: 12px; background: #f2edf9; color: var(--purple); }
.store-status small { color: var(--muted); }
.store-status b { font-size: 18px; text-transform: capitalize; }
details { margin-bottom: 12px; padding: 19px 22px; border: 1px solid #25233c30; border-radius: 14px; background: #fff; }
summary { font-size: 18px; font-weight: 750; cursor: pointer; }
details[open]:not(.langmenu) { border-color: var(--purple); }
details p { margin: 14px 0 0; font-size: 16px; color: var(--muted); }
footer { padding: 42px 0; color: #e3dced; background: var(--ink); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 32px; }
footer .brand span { color: var(--yellow); }
footer a { color: #fff; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; margin-left: auto; }
footer .foot-langs { flex-basis: 100%; margin-left: 0; padding-top: 22px; border-top: 1px solid #ffffff26; }
.langrow { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 0; padding: 0; list-style: none; }
.langrow a { display: inline-block; padding-block: 6px; text-decoration: none; }
.langrow a:hover { text-decoration: underline; }
.langrow a[aria-current] { color: var(--yellow); font-weight: 800; }
.page { padding: 60px 0 80px; min-height: 60vh; }
.page { overflow-wrap: anywhere; }
.page .wrap { max-width: 820px; }
.page h1 { font: clamp(32px, 5vw, 46px)/1.2 var(--font-black); color: var(--purple); }
.page h2 { margin-top: 1.4em; font-size: 26px; }
.todo { padding: 2px 8px; border: 2px dashed #b95a00; border-radius: 6px; background: #fff3bf; font-weight: 700; }
@media (max-width: 1000px) {
  .hero .wrap { gap: 32px; }
  .hero-scene { padding-bottom: 90px; }
  .hero .ming { width: 155px; bottom: -25px; }
  .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .wrap { width: calc(100% - 40px); }
  .hero { padding: 36px 0 44px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero h1 { font-size: clamp(36px, 7.5vw, 58px); }
  .hero .tag { font-size: clamp(28px, 5vw, 36px); }
  .hero-scene { width: min(580px, 100%); margin-inline: auto; padding: 0 5px 55px; }
  .hero .ming { width: 135px; bottom: -8px; right: 12px; }
  section { padding: 54px 0; }
  .split, .pillars, .story .wrap { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .split.rev > :first-child { order: 0; }
  .story-points { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .story-points .card { padding: 18px; }
  .stores { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .wrap { width: calc(100% - 32px); }
  .top .wrap { padding-top: 8px; }
  .brand { gap: 7px; }
  .brand img { width: 32px; height: 32px; border-radius: 9px; }
  .brand span { font-size: 20px; }
  .langmenu .lname { display: none; }
  .langmenu .lcode { display: inline; }
  .langmenu summary { padding-inline: 9px; }
  .nav { margin-top: 2px; }
  .nav a { min-height: 44px; padding: 10px 12px; font-size: 13px; }
  .eyebrow { font-size: 10px; letter-spacing: .7px; margin-bottom: 14px; }
  .hero h1 { letter-spacing: -1.5px; }
  .hero .lead { font-size: 16px; }
  .btn { padding: 12px 16px; gap: 9px; font-size: 14px; }
  .hero .btns { gap: 10px; }
  .hero .trust { gap: 6px 12px; }
  .trust li { font-size: 12px; }
  .hero-preview figcaption { font-size: 11px; padding: 11px; gap: 12px; }
  .scene-dots { font-size: 9px; }
  .stats ul { gap: 0; padding-block: 22px; }
  .stats b { font-size: 28px; }
  .stats span { font-size: 11px; }
  h2 { font-size: 30px; letter-spacing: -.7px; }
  .intro { font-size: 17px; }
  .pillar { padding: 22px 18px; }
  .pillar h3 { font-size: 27px; }
  .topics, .cards, .gallery, .story-points { grid-template-columns: minmax(0, 1fr); }
  .story-card { padding: 24px 20px; }
  .store { padding: 24px 20px; }
  .expert { align-items: flex-start; padding: 18px; gap: 12px; }
  footer nav { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
