@font-face { font-family: "Coralveil Sans"; src: url("../assets/fonts/outfit-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Coralveil Sans"; src: url("../assets/fonts/outfit-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Coralveil Sans"; src: url("../assets/fonts/outfit-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Coralveil Sans"; src: url("../assets/fonts/outfit-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Coralveil Sans"; src: url("../assets/fonts/outfit-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #06131a;
  --bg-2: #0a1a24;
  --panel: #0e2430;
  --panel-2: #143040;
  --line: #1f4452;
  --text: #f2f7f4;
  --muted: #9fb6af;
  --mint: #8ef6c9;
  --mint-deep: #0f322b;
  --ink: #071820;
  --lime: #d7f5a4;
  --lime-ink: #16240d;
  --coral: #ff8f78;
  --gold: #ffe08a;
  --violet: #c7b4ff;
  --max: 1180px;
  --font: "Coralveil Sans", "Avenir Next", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 92% -8%, #0f4a5640, transparent 58%),
    radial-gradient(800px 480px at -8% 12%, #0d3a3248, transparent 52%),
    linear-gradient(180deg, #071820 0%, var(--bg) 28%, #08151d 100%);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.02rem;
  line-height: 1.6;
  font-synthesis: none;
  min-height: 100dvh;
}
body.home {
  background:
    radial-gradient(900px 560px at 70% -20%, #14606a33, transparent 55%),
    radial-gradient(700px 420px at 0% 18%, #0f3f3838, transparent 50%),
    linear-gradient(180deg, #06141c 0%, var(--bg) 40%, #07151c 100%);
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 0.96; letter-spacing: -0.045em; font-weight: 800; overflow-wrap: break-word; }
h1 { font-size: clamp(3.2rem, 7vw, 6.2rem); }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
h3 { font-size: 1.45rem; letter-spacing: -0.03em; }
p { line-height: 1.65; }
.shell { width: min(var(--max), calc(100% - 72px)); margin-inline: auto; }
.skip {
  position: fixed; top: 8px; left: 8px; z-index: 80;
  padding: 12px 14px; background: var(--mint); color: var(--ink);
  border-radius: 8px; transform: translateY(-160%);
}
.skip:focus { transform: none; }

/* —— Header —— */
.header {
  position: sticky; top: 0; z-index: 30;
  background: #06131ae6;
  border-bottom: 1px solid #16333e;
  backdrop-filter: blur(18px);
  padding-top: env(safe-area-inset-top);
}
.header-inner { display: flex; align-items: center; gap: 22px; min-height: 76px; }
.brand { display: inline-flex; gap: 10px; align-items: center; line-height: 1.05; font-weight: 800; letter-spacing: 0.08em; white-space: nowrap; }
.brand svg { width: 40px; height: 40px; color: var(--mint); flex: none; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 0.58rem; letter-spacing: 0.16em; font-weight: 700; }
.header nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.header nav a { color: var(--muted); font-weight: 600; font-size: 0.95rem; padding: 26px 0; position: relative; }
.header nav a[aria-current], .header nav a:hover { color: var(--text); }
.header nav a[aria-current]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 16px; height: 2px; background: var(--mint);
}
.menu { display: none; }

/* —— Controls —— */
.button, .button-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 18px; border-radius: 10px;
  border: 1px solid transparent; font-weight: 700; letter-spacing: -0.01em;
  background: var(--mint); color: #10241c;
  transition: background 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}
.button:hover { background: #c9ffe6; color: #10241c; }
button, .button, .save-game { cursor: pointer; }
::selection { background: #8ef6c9; color: #071820; }
.button:active { transform: translateY(1px); }
.button.small { min-height: 42px; padding: 8px 14px; font-size: 0.92rem; }
.button.ghost, .button-ghost {
  background: transparent; color: var(--text); border-color: var(--line);
}
.button.ghost:hover, .button-ghost:hover { border-color: var(--mint); color: var(--mint); }
.text-link { color: var(--mint); font-weight: 700; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.eyebrow {
  display: flex; align-items: center; gap: 8px;
  color: var(--mint); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.mint { color: var(--mint); font-style: normal; }
.coral { color: var(--coral); }
.lead { color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.22rem); max-width: 46ch; }
.actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 26px; }

/* —— Full-bleed home hero —— */
.hero-plane {
  position: relative;
  min-height: min(92dvh, 920px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 40%;
  transform: scale(1.04);
  animation: hero-drift 18s var(--ease) infinite alternate;
}
.hero-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #06131af6 0%, #06131ae0 36%, #06131aaa 68%, #06131a88 100%),
    linear-gradient(0deg, #06131af6 0%, #06131ab0 46%, #06131a44 78%),
    radial-gradient(ellipse 50% 40% at 78% 42%, #06131a66, transparent 70%);
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding: 48px 0 56px;
  max-width: 720px;
}
.brand-lock {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 18px;
}
.hero-copy h1 { margin: 0 0 18px; max-width: 11ch; }
.hero-copy h1 em {
  font-style: italic;
  font-weight: 750;
  color: var(--mint);
}
.hero-copy .lead { max-width: 38ch; }
.hero-copy .actions { margin-top: 28px; }

@keyframes hero-drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1.5%, 1%, 0); }
}

/* —— Studio pulse —— */
.pulse {
  border-block: 1px solid #1a3a44;
  background: linear-gradient(90deg, #0a2a28, #12382f 40%, #0c2e36);
  overflow: hidden;
  color: var(--mint);
}
.pulse-track {
  display: flex;
  gap: 48px;
  width: max-content;
  padding: 14px 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  animation: pulse-scroll 28s linear infinite;
}
.pulse-track span { white-space: nowrap; }
.pulse-track span::after {
  content: "·";
  margin-left: 48px;
  color: #5f9a8a;
}
@keyframes pulse-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Motion is an enhancement. Content stays visible if animation never runs. */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise 700ms var(--ease) both; }
  .reveal:nth-of-type(2) { animation-delay: 80ms; }
  .reveal:nth-of-type(3) { animation-delay: 140ms; }
  .reveal:nth-of-type(4) { animation-delay: 200ms; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* —— Sections —— */
.section { padding: 72px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.section-head h2 { margin-top: 8px; }

.adventures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.adventure {
  display: flex; flex-direction: column; min-height: 280px;
  background: transparent; border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
  transition: border-color 200ms var(--ease), transform 220ms var(--ease);
}
.adventure:hover { border-color: #3e7480; transform: translateY(-3px); }
.adventure-art { display: grid; min-height: 150px; place-items: center; }
.adventure-copy { padding: 16px 16px 18px; display: grid; gap: 4px; background: #0b1f28; }
.adventure-copy .kicker { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.adventure-copy strong { font-size: 1.35rem; letter-spacing: -0.03em; }
.adventure-copy em { color: var(--muted); font-style: normal; font-size: 0.92rem; }
.art-angel { background: #12384a url("../assets/hero-feature.webp") center 42% / cover no-repeat; }
.art-pearl { background: radial-gradient(circle at 50% 45%, #1f8f86, #0c3c45 62%, #0b2430); color: var(--mint); }
.art-reef { background: linear-gradient(160deg, #1a4d78, #10283f); color: #d7ecff; }
.art-tide { background: linear-gradient(180deg, #e7ffb8, #b7e36a); color: #20310f; }
.art-signal { background: linear-gradient(160deg, #3a2d78, #1a1440); color: var(--violet); }
.art-fruit { background: linear-gradient(160deg, #f0a36a, #c86b45 55%, #8d4638); }
.mini-grid, .mini-pads { display: grid; grid-template-columns: repeat(2, 42px); gap: 8px; }
.mini-grid i, .mini-pads i {
  width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center;
  background: #0e2c3c; font-style: normal; font-weight: 800;
}
.art-tide .mini-grid i { background: #f4ffd8; }
.art-tide .mini-grid i.off { background: #24522a; color: transparent; }
.mini-pads i:nth-child(1) { background: #1f8f86; }
.mini-pads i:nth-child(2) { background: #f0d78a; color: #3a2c08; }
.mini-pads i:nth-child(3) { background: #d86b5d; }
.mini-pads i:nth-child(4) { background: #7d63e6; }
.orbits { width: 120px; height: 120px; border: 1px solid #baf8e866; border-radius: 50%; display: grid; place-items: center; position: relative; }
.orbits::after { content: ""; width: 78px; height: 78px; border: 1px solid #baf8e855; border-radius: 50%; position: absolute; }
.orbits b { width: 22px; height: 22px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 8px #ffe08a22; animation: orbit-pulse 2.4s var(--ease) infinite; }
@keyframes orbit-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.daily {
  display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 24px; align-items: center;
  background: var(--lime); color: var(--lime-ink); border-radius: 4px; padding: 28px;
}
.daily .eyebrow { color: #2f6a38; }
.daily h2 { margin: 8px 0 10px; }
.daily p { max-width: 46ch; }
.daily .button { background: #173024; color: var(--lime); margin-top: 18px; }
.daily .button:hover { background: #0e2418; color: white; }
.deco-tide { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; background: #163018; border-radius: 4px; padding: 16px; }
.deco-tide i { aspect-ratio: 1; border-radius: 4px; background: #e7ffb8; }
.deco-tide i:nth-child(3), .deco-tide i:nth-child(6), .deco-tide i:nth-child(8), .deco-tide i:nth-child(13), .deco-tide i:nth-child(15) { background: #24522a; }

.worlds { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.worlds-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.world-link {
  display: grid; grid-template-columns: 1.1fr 0.9fr; min-height: 280px;
  border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: #0b1f28;
  transition: border-color 200ms var(--ease), transform 220ms var(--ease);
}
.world-link:hover { border-color: #3e7480; transform: translateY(-2px); }
.world-angel { grid-template-columns: 1fr; position: relative; }
.world-angel img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; object-position: center; }
.world-angel .world-copy {
  position: absolute; inset: auto 0 0 0;
  background: linear-gradient(transparent, #06131af2 55%);
  padding: 24px;
}
.world-copy { padding: 22px; display: flex; flex-direction: column; justify-content: end; gap: 8px; }
.world-copy .kicker { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }
.world-copy strong { font-size: 1.8rem; letter-spacing: -0.03em; }

.fruit-mosaic { display: grid; grid-template-columns: 1fr 1fr; }
.fruit-mosaic span, .fruit-shape { min-height: 140px; display: grid; place-items: center; position: relative; }
.fruit-shape::before {
  content: "";
  width: 54px; height: 54px;
  border-radius: 50% 50% 46% 54%;
  background: currentColor;
  box-shadow: inset -8px -10px 0 #0002;
}
.fruit-orange { background: #f08a3c; color: #ffb36a; }
.fruit-pear { background: #7fbf63; color: #a8db8a; }
.fruit-pear::before { border-radius: 55% 55% 45% 45% / 65% 65% 40% 40%; width: 44px; height: 62px; }
.fruit-citrus { background: #e7d56b; color: #f4e89a; }
.fruit-berry { background: #e07a8a; color: #f0a0ab; }
.fruit-berry::before { border-radius: 50% 50% 48% 52% / 42% 42% 58% 58%; width: 48px; height: 56px; }
.art-fruit.cover { position: relative; }
.cover-fruit { position: absolute; inset: 0; width: auto; height: auto; }
.cover-fruit .fruit-shape { min-height: 0; }
.cover-fruit .fruit-shape::before { width: 28px; height: 28px; box-shadow: none; }
.cover-fruit .fruit-pear::before { width: 22px; height: 32px; }
.cover-fruit .fruit-berry::before { width: 24px; height: 28px; }
.daily [data-utc-remain] { font-weight: 800; }

.fruit-card {
  display: grid; grid-template-columns: 1.1fr 0.9fr; min-height: 280px;
  border-radius: 4px; overflow: hidden; background: #0b1f28; border: 1px solid var(--line);
}
.fruit-copy { padding: 22px; display: flex; flex-direction: column; justify-content: end; gap: 8px; }
.fruit-copy span { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }

.studio-close { display: flex; justify-content: space-between; gap: 24px; align-items: end; }
.studio-close .actions { margin-top: 18px; }

.page-intro { padding: 64px 0 28px; }
.page-intro h1 { margin: 12px 0 16px; max-width: min(14ch, 100%); }

/* Legacy split / feature for inner pages */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); }
.stats b { display: block; font-size: 1.8rem; letter-spacing: -0.04em; }
.stats span { color: var(--muted); font-size: 0.82rem; }
.feature-card {
  display: block; position: relative; border-radius: 4px; overflow: hidden;
  border: 1px solid #2d5c66; background: #123746;
}
.feature-card img { width: 100%; height: auto; aspect-ratio: 1024 / 560; object-fit: cover; object-position: center; }
.feature-card .feature-copy {
  position: absolute; inset: auto 0 0 0; padding: 22px 24px 20px;
  background: linear-gradient(transparent, #071820f2 42%);
  display: flex; justify-content: space-between; gap: 16px; align-items: end;
}
.feature-card strong { display: block; font-size: clamp(1.8rem, 3vw, 2.6rem); letter-spacing: -0.04em; line-height: 0.95; }
.feature-card em { display: block; margin-top: 8px; color: #d5ece4; font-style: normal; }
.feature-tag { position: absolute; top: 18px; left: 18px; letter-spacing: 0.14em; font-size: 0.68rem; font-weight: 800; color: white; }
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; padding: 54px 0 28px; }
.hero h1 { margin: 14px 0 18px; }

.filterbar, .panel, .game-tile, .support-search, .policy-summary, .privacy-nav {
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
}
.filterbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; padding: 16px; margin-bottom: 18px; }
.filterbar label, .support-search label { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 700; margin-bottom: 6px; }
.filterbar input, .filterbar select, .support-search input {
  width: 100%; min-height: 48px; border-radius: 10px; border: 1px solid #3d6470;
  background: #0c1c26; padding: 10px 12px;
}
.filterbar .grow { flex: 1 1 220px; }
.filterbar .check { display: flex; align-items: center; gap: 8px; min-height: 48px; color: var(--muted); }
.result-count { color: var(--muted); margin-left: auto; min-height: 48px; display: grid; align-items: center; }
.catalog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.game-tile { overflow: hidden; min-width: 0; }
.tile-art { display: block; position: relative; }
.tile-art img, .cover { width: 100%; aspect-ratio: 16/8; object-fit: cover; display: grid; place-items: center; }
.cover .mini-grid, .cover .mini-pads { transform: scale(0.92); }
.cover-fruit { width: 100%; height: 100%; min-height: 0; grid-template-columns: 1fr 1fr; }
.cover-fruit .fruit-shape { min-height: 0; height: 100%; }
.cover-fruit .fruit-shape::before { width: 36px; height: 36px; }
.cover-fruit .fruit-pear::before { width: 28px; height: 40px; }
.tile-index { position: absolute; top: 12px; left: 12px; background: #071820e0; border-radius: 999px; padding: 5px 10px; font-size: 0.72rem; letter-spacing: 0.08em; }
.tile-info, .tile-meta { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 16px 18px; }
.tile-info h2 { font-size: 1.8rem; }
.tile-info p, .tile-meta { color: var(--muted); }
.tile-meta { border-top: 1px solid var(--line); font-size: 0.84rem; padding-top: 12px; }
.save-game {
  min-height: 44px; border-radius: 999px; border: 1px solid var(--line); background: transparent; padding: 0 14px; color: var(--text);
}
.save-game[aria-pressed="true"] { background: var(--mint); color: var(--ink); border-color: transparent; }

.play-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.play-card {
  display: grid; grid-template-columns: 148px 1fr; gap: 0; overflow: hidden;
  background: transparent; border: 1px solid var(--line); border-radius: 4px; min-height: 148px;
  transition: border-color 200ms var(--ease), transform 220ms var(--ease);
}
.play-card:hover { border-color: #3e7480; transform: translateY(-2px); }
.play-card .adventure-art { min-height: 100%; }
.play-card div { padding: 18px; background: #0b1f28; }
.play-card p { color: var(--muted); margin-top: 6px; }

.game-hero { padding: 36px 0 10px; }
.game-hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; align-items: center; }
.phones { display: flex; justify-content: center; gap: 16px; }
.phones img { width: min(42%, 230px); border-radius: 22px; border: 4px solid #102833; }
.phones img:first-child { transform: rotate(-6deg); }
.phones img:last-child { transform: rotate(5deg) translateY(16px); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tags span, .status { border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; color: var(--muted); font-size: 0.8rem; }
.cards-3, .cards-2 { display: grid; gap: 16px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: 1.4fr 0.8fr; }
.panel { padding: 22px; }
.panel p, .answer, .policy p, .policy li { color: var(--muted); }
.panel h3, .panel h2 { margin-bottom: 8px; }
.wide-art { margin-top: 18px; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.wide-art img { width: 100%; max-height: 420px; object-fit: cover; }

.manifesto { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: center; background: var(--lime); color: var(--lime-ink); border-radius: 4px; padding: 28px; }
.manifesto .lead { color: #314233; }
.mark-plate { min-height: 240px; border-radius: 4px; background: #12382f; color: var(--mint); display: grid; place-items: center; text-align: center; }
.mark-plate svg { width: 120px; }
.mark-plate span { letter-spacing: 0.14em; font-size: 0.72rem; font-weight: 800; }

.support-search { padding: 18px; max-width: 760px; }
.support-grid { display: grid; grid-template-columns: 1.5fr 0.8fr; gap: 22px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { cursor: pointer; padding: 16px 28px 16px 0; font-weight: 700; list-style: none; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 0; top: 12px; color: var(--mint); font-size: 1.4rem; }
.faq-list details[open] summary::after { content: "–"; }
.answer { padding: 0 0 16px; }
.answer a, .policy a { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }
.stack { display: grid; gap: 14px; }
.privacy-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; padding-bottom: 48px; }
.privacy-nav { position: sticky; top: 96px; padding: 16px; }
.privacy-nav nav { display: grid; gap: 6px; margin-top: 10px; }
.privacy-nav a { color: var(--muted); font-size: 0.92rem; }
.policy section { padding: 22px 0; border-bottom: 1px solid var(--line); }
.policy h2 { font-size: 1.5rem; margin-bottom: 10px; }
.policy ul { margin: 8px 0 0; padding-left: 18px; }
.policy-summary { padding: 18px; margin: 8px 0 12px; }
.policy-date { color: var(--muted); font-size: 0.85rem; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.gallery-tile {
  display: grid;
  place-items: center;
  min-height: 160px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0c1c26;
  cursor: zoom-in;
  touch-action: manipulation;
}
.gallery-tile img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
}
.gallery-dialog {
  width: min(920px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 16px;
  padding: 16px;
}
.gallery-dialog::backdrop { background: #041018cc; }
.gallery-dialog img {
  display: block;
  width: 100%;
  max-height: min(70vh, 720px);
  object-fit: contain;
  margin: 8px 0;
}
.gallery-dialog-bar { display: flex; justify-content: end; margin: 0; }
.platform-cards .eyebrow { margin-bottom: 6px; }
.support-form { display: grid; gap: 8px; margin: 12px 0; }
.support-form label { color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.support-form input,
.support-form textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #3d6470;
  background: #0c1c26;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}
.support-form textarea { resize: vertical; min-height: 120px; }
.muted { color: var(--muted); font-weight: 500; }

.media-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.media-card { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.media-card div { height: 180px; display: grid; place-items: center; background: #0e2430; padding: 12px; }
.media-card img { max-height: 160px; object-fit: contain; }
.media-card h3, .media-card a { margin: 12px 14px; }
.facts { display: grid; gap: 0; }
.facts div { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }

.player-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.score-row, .link-list { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.link-list { display: grid; }
.link-list a { color: var(--mint); padding: 4px 0; }
.milestones { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.milestones li { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 12px; background: #0c1c26; }
.milestones .earned { outline: 1px solid #2f6a55; }
.milestones span { color: var(--muted); text-align: right; }
.checkline { display: flex; gap: 10px; align-items: center; margin: 12px 0; }
dialog { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 16px; padding: 20px; max-width: 420px; }
dialog::backdrop { background: #041018cc; }
dialog .actions { justify-content: end; }

.footer { border-top: 1px solid var(--line); background: #041018; margin-top: 20px; }
.footer-main { display: grid; grid-template-columns: 1.3fr 0.8fr 0.9fr 1fr; gap: 24px; padding: 36px 0; }
.footer h2 { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px; }
.footer p, .footer a:not(.brand) { display: block; color: var(--muted); margin: 6px 0; font-size: 0.92rem; }
.footer a:hover { color: var(--mint); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 0.82rem; padding: 14px 0 28px; border-top: 1px solid #1a303b; }

.dock {
  display: none; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
  background: #06131af5; border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(4, 1fr);
}
.dock a { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.dock a span { font-size: 1rem; }
.dock a[aria-current] { color: var(--mint); }
.not-found { min-height: 60vh; }
html[data-offline]::before {
  content: "You are offline. Playable games and cached pages still work on this device.";
  position: sticky; top: 0; z-index: 50; display: block;
  padding: 10px 16px; text-align: center;
  background: #173024; color: var(--lime);
  font-size: 0.88rem; font-weight: 700;
  padding-top: calc(10px + env(safe-area-inset-top));
}
.stack-gap { margin-top: 18px; }
.logo-lockup { width: min(280px, 70%); margin: 12px 0; }
.end-space { padding-bottom: 64px; }

/* —— Idea Atlas (lab) —— */
.idea-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.idea-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 18px;
  display: grid;
  gap: 10px;
  min-width: 0;
  transition: border-color 180ms var(--ease), transform 200ms var(--ease);
}
.idea-card:hover { border-color: #3e7480; transform: translateY(-2px); }
.idea-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.idea-card h3 { font-size: 1.35rem; letter-spacing: -0.03em; }
.idea-card p { color: var(--muted); font-size: 0.94rem; }
.idea-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.idea-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.idea-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.idea-daily {
  padding: 22px;
  background: linear-gradient(135deg, #12353f 0%, var(--panel) 58%);
  border-color: #2d5c66;
}
.idea-daily h2 { margin: 10px 0 12px; max-width: 20ch; }
.idea-daily p { color: var(--muted); max-width: 62ch; }
.idea-detail {
  margin-bottom: 22px;
  padding: 22px;
  background: linear-gradient(160deg, #0f2a34 0%, var(--panel) 55%);
  border: 1px solid #2d5c66;
  border-radius: 4px;
}
.idea-detail-bar { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.idea-detail h2 { margin: 10px 0 12px; max-width: 18ch; }
.idea-detail .panel p { margin-top: 8px; }
.idea-detail code {
  font-size: 0.86rem;
  color: var(--lime);
  word-break: break-all;
}
.idea-brief {
  margin: 18px 0 0;
  padding: 16px;
  max-height: 320px;
  overflow: auto;
  background: #071820;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #cde6dc;
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.empty { color: var(--muted); padding: 28px 0; }

@media (max-width: 1100px) {
  .adventures { grid-template-columns: 1fr 1fr; }
  .media-grid, .footer-main, .idea-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .shell { width: calc(100% - 32px); }
  .menu { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
  .header nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #06131af8; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .header nav.open { display: grid; grid-template-columns: 1fr 1fr; }
  .header nav a { padding: 12px 0; }
  .header-cta { display: none; }
  .hero, .split, .daily, .game-hero-grid, .manifesto, .support-grid, .privacy-layout, .player-grid, .cards-3, .cards-2, .catalog-grid, .play-grid, .worlds, .worlds-grid, .idea-grid { grid-template-columns: 1fr; }
  .feature-card, .feature-card img { min-height: 0; }
  .studio-close { flex-direction: column; align-items: start; }
  .dock { display: grid; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .privacy-nav { position: static; }
  .section { padding: 48px 0; }
  .page-intro { padding-top: 36px; }
  .hero-plane { min-height: min(88dvh, 760px); align-items: end; }
  .hero-media img { object-position: 70% 35%; }
  .hero-wash {
    background:
      linear-gradient(180deg, #06131a88 0%, transparent 28%),
      linear-gradient(0deg, #06131af8 0%, #06131acc 42%, #06131a55 70%, transparent 100%),
      linear-gradient(90deg, #06131ae0 0%, #06131a55 55%, transparent 100%);
  }
  .hero-copy { padding: 36px 0 44px; }
}
@media (max-width: 640px) {
  .adventures, .media-grid, .gallery-grid, .footer-main, .play-card, .world-link, .fruit-card { grid-template-columns: 1fr; }
  .play-card .adventure-art { min-height: 120px; }
  .stats { gap: 8px; }
  h1, .page-intro h1, .hero-copy h1 { font-size: clamp(2.4rem, 11vw, 3.4rem); max-width: 100%; }
  .brand-lock { letter-spacing: 0.2em; }
  .pulse-track { gap: 32px; animation-duration: 22s; }
  .pulse-track span::after { margin-left: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .phones img { transform: none; }
  .hero-media img, .pulse-track, .orbits b, .reveal { animation: none !important; }
}
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after {
  scroll-behavior: auto !important;
  transition: none !important;
  animation: none !important;
}
.reduce-motion .reveal { opacity: 1; transform: none; }

/* Lab intro stats (was an inline style, which the CSP blocks). */
.result-count--intro {
  margin: 14px 0 0;
  justify-content: start;
}

/* ---------- Platforms: tabs, badges, cards (games registry) ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.pf-icon { width: 22px; height: 22px; flex: none; }

.pf-tabs {
  flex: 1 1 100%;
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0; padding: 0; border: 0;
}
.filterbar .pf-tabs label { position: relative; display: inline-flex; margin: 0; color: var(--text); font-size: 0.92rem; }
.filterbar .pf-tabs input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.pf-tabs span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; font-weight: 700;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.pf-tabs label:hover span { border-color: var(--mint); }
.pf-tabs input:checked + span { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.pf-tabs input:focus-visible + span { outline: 2px solid var(--mint); outline-offset: 3px; }

.pf-badges { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0 18px 14px; }
.pf-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 0.8rem; font-weight: 700;
}
.pf-badge .pf-icon { width: 16px; height: 16px; }
.pf-badge.is-available { border-color: color-mix(in srgb, var(--mint) 55%, transparent); color: var(--mint); }
.pf-badge.is-soon { color: var(--muted); opacity: 0.8; }

.platform-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-decoration: none; color: inherit; }
.platform-card .pf-icon { width: 30px; height: 30px; color: var(--mint); }
.platform-card h3, .platform-card p { margin: 0; }
a.platform-card { transition: border-color 0.2s var(--ease), transform 0.2s var(--ease); }
a.platform-card:hover { border-color: var(--mint); transform: translateY(-2px); }
.platform-card.is-soon .pf-icon { color: var(--muted); }
.get-game .button { margin-top: auto; }
/* A fieldset refuses to shrink below its content by default, which widened the page on phones. */
.pf-tabs { min-width: 0; }
.filterbar .check { white-space: nowrap; margin-bottom: 0; }
.filterbar .check input { width: 20px; height: 20px; min-height: 0; padding: 0; flex: none; accent-color: var(--mint); }

/* Touch screens: footer links get a comfortable ~44px tap height (they were 24px). */
@media (pointer: coarse) {
  .footer a:not(.brand) { display: flex; align-items: center; min-height: 44px; margin: 0; }
}

/* Disabled buttons must look unavailable (they looked identical to active ones before). */
.button:disabled, .button[aria-disabled="true"], .save-game:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Lab idea cast (hero, objects, obstacles) */
.idea-cast { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.idea-cast ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.idea-cast li { display: flex; align-items: center; gap: 10px; }
.idea-cast .sprite { width: 36px; height: 36px; flex: none; display: block; }
.idea-cast strong { display: inline-block; min-width: 72px; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.cast-obstacle strong { color: var(--coral); }
.cast-object strong { color: var(--mint); }
.idea-cast .sprite-shell { color: var(--gold); }
.idea-cast li > span { display: grid; gap: 0; line-height: 1.35; }
.idea-cast strong { min-width: 0; font-size: 0.7rem; }

/* Pearl Gamble cover art (tiles, home, playground) */
.art-gamble { background: linear-gradient(180deg, #2a8fa0 0%, #0f4a5a 45%, #06202b 100%); }
.gamble-cover { position: relative; display: grid; gap: 10px; width: 96px; }
.gamble-cover i { display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); }
.gamble-cover b {
  position: absolute; left: 34px; top: 22px; width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #f4f1e6 45%, #ffe08a 100%);
  box-shadow: 0 0 18px rgba(255, 224, 138, 0.6);
}
.featured-game {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); margin-top: 14px;
  border: 1px solid var(--line); border-radius: 4px; overflow: hidden; color: inherit; text-decoration: none;
}
.featured-game .adventure-art { min-height: 200px; }
.featured-copy { display: grid; align-content: center; gap: 8px; padding: 24px; }
.featured-copy strong { font-size: 1.8rem; letter-spacing: -0.03em; }
.featured-copy em { color: var(--muted); font-style: normal; }
.featured-game:hover { border-color: var(--mint); }
@media (max-width: 720px) { .featured-game { grid-template-columns: 1fr; } .featured-game .adventure-art { min-height: 140px; } }
