:root {
  --bg: #07110e;
  --bg-deep: #040a08;
  --moss: #6fbf55;
  --moss-deep: #2f6b3a;
  --leaf: #b6f39a;
  --gold: #e4c36a;
  --water: #5ec4d4;
  --dirt: #8a6238;
  --stone: #8b9488;
  --ink: #eef6ee;
  --muted: rgba(238, 246, 238, 0.68);
  --panel: #14211b;
  --stroke: #2d4236;
  --highlight: #1c2d24;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  --radius: 16px;
  --discord: #5865f2;
  --patreon: #ff424d;
  --font: "Outfit", system-ui, sans-serif;
  --display: "Pixelify Sans", "Outfit", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  background: var(--bg-deep);
  overflow-x: hidden;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
.copy-btn,
.nav-toggle {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.world {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.cubes {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.aurora {
  display: none;
}

.hex-grid {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 18% -10%, rgba(47, 107, 58, 0.38), transparent 58%),
    radial-gradient(ellipse 50% 40% at 92% 8%, rgba(228, 195, 106, 0.1), transparent 55%),
    radial-gradient(ellipse 70% 45% at 70% 110%, rgba(20, 70, 48, 0.35), transparent 50%),
    #040a08;
}

.stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 18%, #fff 0 1px, transparent 1.6px),
    radial-gradient(circle at 38% 8%, #fff 0 1px, transparent 1.4px),
    radial-gradient(circle at 71% 14%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 88% 28%, #fff 0 1px, transparent 1.4px),
    radial-gradient(circle at 22% 42%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 64% 56%, #b6f39a 0 1px, transparent 1.5px);
  opacity: 0.22;
}

.grid-veil {
  display: none;
}

.uptime {
  color: var(--leaf);
}

.hill {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -8%;
  height: 34vh;
  background: linear-gradient(180deg, rgba(26, 58, 36, 0.55), #0b1711);
  clip-path: polygon(0 48%, 8% 40%, 16% 52%, 27% 34%, 38% 46%, 49% 28%, 61% 44%, 73% 30%, 84% 48%, 100% 36%, 100% 100%, 0 100%);
  opacity: 0.55;
}

.hill-back {
  height: 42vh;
  opacity: 0.35;
  filter: blur(2px);
}

.hill-mid {
  height: 36vh;
  background: linear-gradient(180deg, #245232, #0c1812);
}

.hill-front {
  height: 26vh;
  background: linear-gradient(180deg, #317246, #08140f);
  opacity: 0.9;
}

.cubes {
  display: none;
}

.cube {
  display: none;
}

.cube-1 { top: 18%; left: 8%; animation-delay: -1s; }
.cube-2 { top: 28%; right: 10%; width: 54px; height: 54px; animation-delay: -3s; }
.cube-3 { top: 62%; left: 14%; width: 40px; height: 40px; animation-delay: -5s; opacity: 0.7; }
.cube-4 { top: 70%; right: 18%; width: 46px; height: 46px; animation-delay: -2s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(8deg); }
  50% { transform: translateY(-16px) rotate(-4deg); }
}

.glass {
  background: var(--panel);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

main,
.nav-wrap,
.footer {
  position: relative;
  z-index: 1;
}

.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 0;
  background: #0c1511;
  border-bottom: 1px solid var(--stroke);
}

.nav {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background:
    linear-gradient(#c8f7ad, #c8f7ad) top / 100% 28% no-repeat,
    linear-gradient(180deg, #6fbf55, #2f6b3a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.brand-text {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-cta,
.nav-links a.is-active {
  color: var(--ink);
}

.nav-cta {
  background: #3f8f3a;
  color: #fff;
}

.nav-discord {
  color: #fff !important;
  background: var(--discord);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 5px auto;
  background: var(--ink);
}

.hero,
.section,
.footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  padding: 72px 0 40px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--leaf);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: clamp(3.1rem, 7vw, 5.6rem);
  letter-spacing: -0.045em;
  font-weight: 650;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.15rem);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

h3 {
  font-size: 1.2rem;
  margin: 10px 0 8px;
}

.lede,
.section-head p,
.feature p,
.biome p,
.rule p,
.join-note,
.footer p {
  color: var(--muted);
  line-height: 1.65;
}

.lede {
  max-width: 34rem;
  font-size: 1.12rem;
}

.hero-actions,
.join-cta,
.hero-meta,
.panel-top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-actions {
  margin: 28px 0 18px;
}

.ip-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  flex: 1 1 360px;
  padding: 12px 12px 12px 18px;
  border-radius: 12px;
}

.ip-card > div {
  min-width: 0;
  flex: 1;
}

.ip-card.wide {
  flex: 1;
}

.ip-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.ip-value {
  display: block;
  font-family: var(--font);
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: clamp(0.98rem, 2.2vw, 1.2rem);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.copy-btn,
.btn {
  flex-shrink: 0;
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  color: #102016;
  background: #7dce63;
  font-weight: 600;
}

.copy-btn:hover,
.btn:hover,
.nav-links a:hover,
.footer-links a:hover {
  filter: brightness(1.06);
}

.copy-btn:focus-visible,
.btn:focus-visible,
.nav-links a:focus-visible,
.nav-toggle:focus-visible,
.footer-links a:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 3px;
}

.btn-ghost {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--stroke);
  padding: 14px 18px;
}

.btn-discord {
  color: #fff;
  background: var(--discord);
}

.btn-patreon {
  color: #fff;
  background: var(--patreon);
}

.btn-patreon.is-offline,
.footer-links a.is-offline {
  opacity: 0.42;
  filter: grayscale(0.75);
  cursor: not-allowed;
  text-decoration: line-through;
  pointer-events: auto;
}

.btn-patreon.is-offline:hover,
.footer-links a.is-offline:hover {
  filter: grayscale(0.75);
}

.keep-out {
  min-height: calc(100vh - 220px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 20px 80px;
}

.keep-out-tape,
.keep-out-tape-bottom {
  height: 28px;
  margin: 0 -20px 28px;
  background: repeating-linear-gradient(
    -45deg,
    #e4c36a 0 16px,
    #111 16px 32px
  );
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.keep-out-tape-bottom {
  margin: 28px -20px 0;
}

.keep-out-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 36px 32px;
  text-align: center;
  border: 1px solid #e4c36a;
}

.keep-out-card h1 {
  font-family: var(--display);
  font-size: clamp(3rem, 10vw, 5.4rem);
  letter-spacing: 0.08em;
  line-height: 0.95;
  color: #ffb4b0;
  margin: 8px 0 16px;
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--muted);
}

.dot,
.live-pill i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8be07a;
  box-shadow: 0 0 12px #8be07a;
  margin-right: 6px;
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.7; }
}

.hero-panel {
  padding: 20px;
  border-radius: 32px;
}

.panel-top {
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-kicker {
  color: var(--muted);
  font-size: 0.85rem;
}

.live-pill {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
}

.mini-map {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.tile {
  aspect-ratio: 1;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.grass { background: linear-gradient(#8ed36f 30%, #4f8d3c); }
.grass-dark { background: linear-gradient(#5fa34a 30%, #2f6230); }
.water { background: linear-gradient(#7ee0ea, #2f7f95); }
.dirt { background: linear-gradient(#c0894d, #6d4524); }
.stone { background: linear-gradient(#c5ccc0, #6d746c); }
.sand { background: linear-gradient(#efe1a4, #c2a45a); }

.panel-stats {
  list-style: none;
  margin: 0;
  padding: 0;
}

.panel-stats li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.panel-stats strong {
  color: var(--ink);
  font-weight: 600;
}

.section,
#top {
  scroll-margin-top: 92px;
}

.section {
  padding: 72px 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: 28px;
}

.feature-grid,
.biome-grid,
.rules-grid {
  display: grid;
  gap: 16px;
}

.feature-grid {
  grid-template-columns: repeat(2, 1fr);
}

.rules-grid {
  grid-template-columns: repeat(3, 1fr);
}

.biome-grid {
  grid-template-columns: repeat(3, 1fr);
}

.feature,
.biome,
.rule,
.step,
.join-shell,
.footer-card {
  border-radius: var(--radius);
}

.feature,
.biome,
.rule {
  padding: 22px;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.feature:hover,
.biome:hover,
.rule:hover,
.step:hover {
  transform: translateY(-4px);
  border-color: rgba(182, 243, 154, 0.32);
}

.icon-block {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.grass-icon { background: linear-gradient(#b6f39a 28%, #3f8a44); }
.gold-icon { background: linear-gradient(#ffe7a0 28%, #c3922e); }
.shield-icon { background: linear-gradient(#d7e7ff 28%, #4d6d8d); }
.portal-icon { background: linear-gradient(#e2c0ff 28%, #6a3d9a); }

.biome-art {
  height: 140px;
  border-radius: 18px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}

.biome-art::after {
  content: "";
  position: absolute;
  inset: auto 12% 12px 12%;
  height: 18px;
  background: rgba(0, 0, 0, 0.18);
  filter: blur(6px);
}

.plains { background: linear-gradient(#8ec7ea 0 48%, #79c15a 48% 72%, #6a4a2b 72%); }
.forest { background: linear-gradient(#4c6f8b 0 36%, #1f4a2c 36% 70%, #2a1c12 70%); }
.mountain { background: linear-gradient(#9bb7c9 0 34%, #6e7b78 34% 62%, #3d3834 62%); }

.join-shell {
  padding: 28px;
  display: grid;
  gap: 22px;
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0;
  margin: 0;
}

.step {
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.step-num {
  font-family: var(--display);
  color: var(--gold);
}

code {
  font-size: 0.9em;
  color: var(--leaf);
}

.rule span {
  font-family: var(--display);
  color: var(--gold);
}

.footer {
  padding-bottom: 36px;
}

.footer-card {
  padding: 24px;
  display: grid;
  gap: 14px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.fineprint {
  font-size: 0.8rem;
  opacity: 0.75;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 999px;
  background: #14211b;
  border: 1px solid var(--stroke);
  z-index: 10;
}

.reveal.in {
  animation: rise 0.55s ease both;
  animation-delay: var(--delay, 0ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

body {
  transition: opacity 0.28s ease, transform 0.28s ease;
}

body.page-leave {
  opacity: 0;
  transform: translateY(8px);
}

.page-hero,
.hero-shot,
.photo-card,
.story-panel,
.biome {
  overflow: hidden;
}

.page-hero,
.hero-shot {
  position: relative;
  border-radius: 16px;
  padding: 0;
}

.page-hero::after,
.hero-shot::after {
  content: "";
  position: absolute;
  inset: 48% 0 0;
  background: linear-gradient(transparent, rgba(4, 10, 8, 0.7));
  pointer-events: none;
  z-index: 1;
}

.page-hero {
  width: min(1120px, calc(100% - 40px));
  margin: 36px auto 0;
  min-height: 320px;
}

.page-hero img,
.hero-shot img,
.photo,
.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(1.22) saturate(1.1) contrast(1.04);
}

.page-hero img {
  height: 360px;
  animation: ken 18s ease-in-out infinite alternate;
}

.hero-shot img {
  height: 420px;
  animation: ken 16s ease-in-out infinite alternate;
}

@keyframes ken {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.page-hero-copy,
.hero-shot figcaption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 2;
}

.page-hero-copy,
.hero-shot figcaption,
.photo-card div {
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.hero-shot figcaption {
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.hero-shot figcaption span,
.page-hero-copy .eyebrow {
  color: var(--leaf);
}

.photo {
  height: 180px;
  border-radius: 18px;
  margin-bottom: 12px;
}

.photo-card,
.story-panel {
  border-radius: var(--radius);
}

.photo-card {
  display: grid;
  overflow: hidden;
}

.photo-card img {
  height: 190px;
  transition: transform 0.5s ease;
}

.photo-card:hover img {
  transform: scale(1.06);
}

.photo-card div,
.story-panel > div {
  padding: 18px 20px 20px;
}

.link-grid,
.support-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.support-card {
  padding: 22px;
}

.support-card p {
  color: var(--muted);
  line-height: 1.65;
}

.support-card .btn {
  display: inline-block;
  margin-top: 14px;
}

.story-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
}

.story-panel .photo {
  height: 100%;
  min-height: 280px;
  margin: 0;
  border-radius: 0;
}

.story-panel .btn {
  display: inline-block;
  margin-top: 16px;
}

.join-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.copy-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.plain-steps {
  margin: 0 0 18px;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.games-grid {
  display: grid;
  gap: 18px;
}

.game-card {
  padding: 22px;
  border-radius: var(--radius);
  background: rgba(8, 16, 12, 0.72);
}

.game-card-wide {
  border: 1px solid #3d5a42;
}

.wreck-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.wreck-tools button {
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 6px 12px;
  background: #122018;
  color: var(--ink);
}

.wreck-tools button.is-on {
  border-color: #e4c36a;
  color: #e4c36a;
}

.wreck-canvas {
  display: block;
  width: 100%;
  height: 420px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background:
    radial-gradient(ellipse 40% 30% at 18% 80%, rgba(228, 80, 70, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(12, 28, 20, 0.2), rgba(4, 10, 8, 0.55));
  touch-action: none;
  cursor: crosshair;
}

.game-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.memory-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.memory-card {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(8, 18, 14, 0.7);
  cursor: pointer;
  color: var(--ink);
  animation: rise 0.5s ease both;
  animation-delay: calc(var(--i, 0) * 40ms);
}

.memory-card img,
.memory-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.memory-card img {
  object-fit: cover;
  opacity: 0;
  transform: scale(0.9);
  transition: 0.28s ease;
}

.memory-back {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.6rem;
  background: linear-gradient(160deg, rgba(182, 243, 154, 0.16), rgba(16, 32, 26, 0.8));
}

.memory-card.is-open img,
.memory-card.is-match img {
  opacity: 1;
  transform: scale(1);
}

.memory-card.is-open .memory-back,
.memory-card.is-match .memory-back {
  opacity: 0;
}

.memory-card.is-match {
  box-shadow: 0 0 0 2px rgba(182, 243, 154, 0.45);
}

.ore-field {
  position: relative;
  height: 280px;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.35)),
    url("../assets/deep-forest.png") center / cover;
}

.ore-block {
  position: absolute;
  width: 76px;
  height: 76px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  animation: pop-in 0.25s ease;
}

.ore-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ore-block.is-pop {
  animation: pop-out 0.18s ease forwards;
}

@keyframes pop-in {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes pop-out {
  to { transform: scale(1.2); opacity: 0; }
}

.creeper-stage {
  width: 100%;
  min-height: 220px;
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: rgba(8, 18, 14, 0.72);
  color: var(--muted);
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 4rem);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.creeper-stage.is-go {
  background: #8be07a;
  color: #102016;
  transform: scale(1.02);
}

.simon-board,
.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.simon-pad,
.quiz-option,
.clicker-stage {
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: #101a15;
  color: var(--ink);
  cursor: pointer;
}

.simon-pad {
  overflow: hidden;
  padding: 0;
}

.simon-pad img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  opacity: 0.72;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.simon-pad.is-lit img {
  opacity: 1;
  transform: scale(1.04);
}

.quiz-option,
.clicker-stage {
  padding: 16px;
  font: inherit;
  font-weight: 600;
}

.quiz-option:hover,
.clicker-stage:not(:disabled):hover {
  background: #1c2d24;
}

.clicker-stage {
  width: 100%;
  min-height: 180px;
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 4rem);
}

.clicker-stage:disabled {
  opacity: 0.7;
  cursor: default;
}

#quiz-question {
  margin: 0 0 12px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .link-grid,
  .support-grid,
  .join-pair,
  .story-panel,
  .copy-row,
  .memory-board {
    grid-template-columns: 1fr 1fr;
  }

  .story-panel {
    grid-template-columns: 1fr;
  }

  .page-hero img,
  .hero-shot img {
    height: 240px;
  }
}

@media (max-width: 640px) {
  .link-grid,
  .support-grid,
  .join-pair,
  .copy-row,
  .memory-board {
    grid-template-columns: 1fr;
  }

  .memory-board {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .hero,
  .steps {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .biome-grid,
  .rules-grid {
    grid-template-columns: 1fr 1fr;
  }

  .nav {
    border-radius: 0;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 6px 10px;
  }

  .nav.open .nav-links {
    display: flex;
  }

  .hero {
    padding-top: 36px;
  }

  .cubes {
    display: none;
  }
}

@media (max-width: 640px) {
  .feature-grid,
  .biome-grid,
  .rules-grid {
    grid-template-columns: 1fr;
  }
}

.assistant {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
}

.assistant-toggle,
.assistant-close,
.assistant-suggest button {
  font: inherit;
  cursor: pointer;
}

.assistant-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  color: #102016;
  background: #7dce63;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.assistant-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #102016;
}

.assistant-panel {
  width: min(390px, calc(100vw - 28px));
  height: min(560px, calc(100vh - 110px));
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  background: #0b1410;
  border: 1px solid var(--stroke);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.assistant-panel[hidden] {
  display: none;
}

.assistant-head,
.assistant-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
}

.assistant-head {
  background: #122018;
  border-bottom: 1px solid var(--stroke);
}

.assistant-head p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: #7dce63;
}

.assistant-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 1.4rem;
}

.imsg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #3f8f3a;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.assistant-log {
  flex: 1;
  overflow: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(circle at 20% 0%, rgba(47, 107, 58, 0.18), transparent 40%),
    #0b1410;
}

.imsg-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 92%;
}

.imsg-row.is-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.imsg-col {
  display: grid;
  gap: 4px;
}

.imsg-row.is-user .imsg-col {
  justify-items: end;
}

.imsg-bubble {
  padding: 9px 12px;
  border-radius: 18px 18px 18px 6px;
  background: #24332b;
  color: var(--ink);
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.imsg-row.is-user .imsg-bubble {
  background: #34c759;
  color: #07210c;
  border-radius: 18px 18px 6px 18px;
}

.imsg-bubble.is-wait {
  min-width: 52px;
}

.imsg-row time {
  font-size: 0.68rem;
  color: var(--muted);
  padding: 0 4px;
}

.imsg-dots {
  display: inline-flex;
  gap: 4px;
  padding: 2px 2px 0;
}

.imsg-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9bb3a4;
  animation: imsg-bounce 1s ease-in-out infinite;
}

.imsg-dots i:nth-child(2) { animation-delay: 0.12s; }
.imsg-dots i:nth-child(3) { animation-delay: 0.24s; }

@keyframes imsg-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-3px); opacity: 1; }
}

.assistant-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 8px;
}

.assistant-suggest button {
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 6px 10px;
  background: #122018;
  color: var(--ink);
}

.assistant-form {
  border-top: 1px solid var(--stroke);
  background: #101a15;
}

.assistant-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 20px;
  padding: 10px 14px;
  background: #1b2a22;
  color: var(--ink);
}

.imsg-send {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #34c759;
  color: #07210c;
  font-size: 1.1rem;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cube,
  .reveal,
  .reveal.in,
  .aurora,
  .stars,
  .copy-btn::after,
  .btn::after,
  .page-hero img,
  .hero-shot img,
  .dot,
  .live-pill i {
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
