/* Jelifriend site and wiki styles. No frameworks, no external fonts. */

:root {
  --paper:      #fbf7f1;
  --card:       #ffffff;
  --ink:        #221d2b;
  --ink-soft:   #5c5468;
  --ink-faint:  #8d859a;
  --line:       #e6ded4;
  --jelly:      #2f9d74;
  --jelly-dark: #227a59;
  --blossom:    #d9557f;
  --yolk:       #e8a317;
  --shadow:     0 1px 2px rgba(34, 29, 43, .06), 0 8px 24px rgba(34, 29, 43, .06);
  --radius:     14px;
  --wrap:       1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:     #14121a;
    --card:      #1d1a25;
    --ink:       #ece7f2;
    --ink-soft:  #b3aac0;
    --ink-faint: #857c94;
    --line:      #2e2a3a;
    --jelly:     #4fc79a;
    --jelly-dark:#7ad9b6;
    --blossom:   #f0819f;
    --yolk:      #f2bb4b;
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

a { color: var(--jelly-dark); text-underline-offset: 2px; }
a:hover { color: var(--blossom); }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper);
  padding: 10px 16px; z-index: 20;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.head-inner { display: flex; align-items: center; gap: 20px; height: 62px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-name { font-weight: 700; letter-spacing: -.01em; font-size: 1.05rem; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 7px 7px 9px 9px;
  background: linear-gradient(160deg, var(--jelly) 0%, var(--jelly-dark) 100%);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.12), inset 3px 3px 0 rgba(255,255,255,.35);
  position: relative; flex: none;
}
.brand-mark::before, .brand-mark::after {
  content: ""; position: absolute; top: 8px; width: 3px; height: 3px;
  background: rgba(0,0,0,.55); border-radius: 1px;
}
.brand-mark::before { left: 6px; }
.brand-mark::after  { right: 6px; }

.head-nav { display: flex; gap: 18px; margin-left: 8px; }
.head-nav a {
  text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: .93rem;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.head-nav a:hover, .head-nav a.on { color: var(--ink); border-bottom-color: var(--jelly); }

.head-search { margin-left: auto; }
.head-search input {
  width: 210px; max-width: 40vw; padding: 8px 12px; font: inherit; font-size: .9rem;
  color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px;
}
.head-search input:focus { outline: 2px solid var(--jelly); outline-offset: 1px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block; padding: 11px 20px; border-radius: 999px;
  background: var(--jelly); color: #fff; font-weight: 650; text-decoration: none;
  border: 0; cursor: pointer; font-size: .95rem;
}
.btn:hover { background: var(--jelly-dark); color: #fff; }
.btn.ghost {
  background: transparent; color: var(--ink); border: 1.5px solid var(--line);
}
.btn.ghost:hover { border-color: var(--jelly); color: var(--ink); }
.btn.small { padding: 7px 14px; font-size: .85rem; }
.btn.danger { background: var(--blossom); }

/* ---------- wiki layout ---------- */

.wiki { display: grid; grid-template-columns: 236px minmax(0, 1fr) 200px; gap: 40px; padding: 36px 0 80px; }
.wiki.no-toc { grid-template-columns: 236px minmax(0, 1fr); }

.sidebar { position: sticky; top: 82px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; }
.side-group { margin-bottom: 22px; }
.side-title {
  margin: 0 0 8px; font-size: .74rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-faint);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li a {
  display: block; padding: 5px 10px; margin-left: -10px; border-radius: 8px;
  color: var(--ink-soft); text-decoration: none; font-size: .92rem;
}
.sidebar li a:hover { background: var(--card); color: var(--ink); }
.sidebar li a.on { background: color-mix(in srgb, var(--jelly) 16%, transparent); color: var(--ink); font-weight: 600; }

.toc { position: sticky; top: 82px; align-self: start; font-size: .86rem; }
.toc p.side-title { margin-bottom: 10px; }
.toc a { display: block; color: var(--ink-soft); text-decoration: none; padding: 3px 0; }
.toc a:hover { color: var(--ink); }
.toc a.lvl2 { padding-left: 12px; }

.crumbs { font-size: .84rem; color: var(--ink-faint); margin: 0 0 10px; }
.crumbs a { color: var(--ink-faint); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

/* ---------- prose ---------- */

.prose { max-width: 74ch; }
.prose.narrow { max-width: 62ch; margin: 60px auto; }
.prose h1 { font-size: 2.1rem; letter-spacing: -.025em; margin: 0 0 6px; line-height: 1.15; }
.prose .lede { font-size: 1.08rem; color: var(--ink-soft); margin: 0 0 28px; }
.prose h2 { font-size: 1.35rem; margin: 38px 0 10px; letter-spacing: -.015em; }
.prose h3 { font-size: 1.08rem; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 5px 0; }
.prose img { max-width: 100%; height: auto; border-radius: 10px; }

.prose h2 .anchor, .prose h3 .anchor, .prose h4 .anchor {
  margin-left: 8px; color: var(--ink-faint); text-decoration: none; opacity: 0;
  font-weight: 400;
}
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose h4:hover .anchor { opacity: 1; }

.prose code {
  background: color-mix(in srgb, var(--jelly) 12%, transparent);
  padding: .12em .38em; border-radius: 5px; font-size: .9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.prose pre.code {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; overflow-x: auto;
}
.prose pre.code code { background: none; padding: 0; }

/* Colour swatch, written {#RRGGBB} in a page body. */
.prose .sw { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.prose .sw i {
  width: 15px; height: 15px; border-radius: 4px; flex: none;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28);
}
.prose .sw code { background: none; padding: 0; color: var(--ink-faint); font-size: .84em; }

.prose blockquote {
  margin: 20px 0; padding: 2px 18px; border-left: 3px solid var(--jelly);
  color: var(--ink-soft);
}

.callout {
  margin: 22px 0; padding: 14px 18px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--jelly);
}
.callout p { margin: 6px 0; }
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
.callout-title { font-weight: 700; }
.callout-warn { border-left-color: var(--blossom); }
.callout-tip  { border-left-color: var(--yolk); }
.callout-todo { border-left-color: var(--ink-faint); border-style: dashed; }

.table-wrap { overflow-x: auto; margin: 20px 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: .94rem; }
.prose th, .prose td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.prose th { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); }

.prose hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

.page-meta { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: .84rem; color: var(--ink-faint); display: flex; gap: 14px; flex-wrap: wrap; }

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 26px; }
.pager a {
  flex: 1; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; background: var(--card);
}
.pager a span { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); }
.pager a strong { color: var(--ink); font-size: .96rem; }
.pager a.next { text-align: right; }

/* ---------- search ---------- */

.results { list-style: none; padding: 0; margin: 24px 0 0; max-width: 74ch; }
.results li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.results h3 { margin: 0 0 4px; font-size: 1.05rem; }
.results .where { font-size: .78rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .07em; }
.results p { margin: 4px 0 0; color: var(--ink-soft); font-size: .94rem; }

.big-search { display: flex; gap: 10px; max-width: 560px; margin: 20px 0 0; }
.big-search input {
  flex: 1; padding: 12px 16px; font: inherit; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}

/* ---------- admin ---------- */

.admin-head { background: var(--ink); color: var(--paper); }
.admin-head .head-inner { height: 54px; }
.admin-head a { color: var(--paper); }
.admin-head .brand-name { color: var(--paper); }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.admin-wrap { padding: 32px 0 80px; }
.admin-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-bar h1 { margin: 0; font-size: 1.5rem; letter-spacing: -.02em; }
.admin-bar .spacer { margin-left: auto; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 650; font-size: .88rem; margin-bottom: 6px; }
.field .hint { font-size: .8rem; color: var(--ink-faint); font-weight: 400; }
.field input[type=text], .field input[type=password], .field input[type=number],
.field select, .field textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
}
.field textarea {
  min-height: 460px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88rem; line-height: 1.6; resize: vertical;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--jelly); outline-offset: 1px; }

.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.preview {
  border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px;
  background: var(--paper); min-height: 460px; overflow-y: auto; max-height: 70vh;
}

table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th, table.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
table.admin-table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); }
table.admin-table tr:hover td { background: var(--paper); }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .74rem; font-weight: 650;
  background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink-soft);
}
.tag.live  { background: color-mix(in srgb, var(--jelly) 22%, transparent); color: var(--jelly-dark); }
.tag.draft { background: color-mix(in srgb, var(--yolk) 26%, transparent); color: #8a6100; }

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; font-size: .93rem; }
.flash.ok  { background: color-mix(in srgb, var(--jelly) 18%, transparent); color: var(--jelly-dark); }
.flash.err { background: color-mix(in srgb, var(--blossom) 18%, transparent); color: var(--blossom); }

.login-box { max-width: 380px; margin: 90px auto; }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .wiki { grid-template-columns: 220px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .creature-stage { max-width: 340px; }
  .strip-inner { grid-template-columns: 1fr; gap: 20px; }
  .wiki { grid-template-columns: 1fr; }
  .sidebar {
    position: static; max-height: none; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 16px; background: var(--card);
  }
  .editor-grid { grid-template-columns: 1fr; }
  .preview { max-height: 300px; min-height: 0; }
  .head-nav { gap: 12px; }
  .head-search { display: none; }
}

/* ---------- public creature page ---------- */

.creature-wrap { padding: 44px 20px 80px; max-width: 900px; }

.creature-card {
  display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 36px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 28px; box-shadow: var(--shadow);
}

.creature-scene {
  aspect-ratio: 1; border-radius: 16px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, var(--jelly) 22%, var(--card)) 0%, var(--card) 72%);
  border: 1px solid var(--line);
}
.creature-scene.is-empty {
  background: radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, var(--ink-faint) 14%, var(--card)) 0%, var(--card) 72%);
}
.creature-img { width: 78%; height: auto; image-rendering: pixelated; }

.empty-habitat { width: 78%; aspect-ratio: 1; display: grid; align-items: end; justify-items: center; }
.habitat-shadow {
  width: 46%; height: 10px; border-radius: 50%;
  background: var(--ink); opacity: .12; margin-bottom: 18%;
}

.creature-eyebrow {
  margin: 0 0 4px; font-size: .76rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-faint);
}
.creature-name { margin: 0 0 8px; font-size: 2.2rem; letter-spacing: -.03em; line-height: 1.1; }

.creature-state {
  display: inline-block; margin: 0 0 18px; padding: 4px 12px; border-radius: 999px;
  font-size: .84rem; font-weight: 650;
  background: color-mix(in srgb, var(--jelly) 18%, transparent); color: var(--jelly-dark);
}
.creature-state.state-asleep { background: color-mix(in srgb, var(--ink-faint) 20%, transparent); color: var(--ink-soft); }
.creature-state.state-sick   { background: color-mix(in srgb, var(--blossom) 20%, transparent); color: var(--blossom); }
.creature-state.state-away   { background: color-mix(in srgb, var(--yolk) 26%, transparent); color: #8a6100; }

.hearts { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 22px; }
.heart svg { display: block; }
.heart .heart-bg { fill: color-mix(in srgb, var(--ink-faint) 26%, transparent); }
.heart .heart-fg { fill: var(--blossom); }

.meters { display: grid; gap: 9px; margin-bottom: 24px; max-width: 340px; }
.meter { display: grid; grid-template-columns: 52px minmax(0, 1fr) 34px; align-items: center; gap: 10px; }
.meter-label { font-size: .8rem; font-weight: 650; color: var(--ink-soft); }
.meter-track {
  height: 9px; border-radius: 999px; overflow: hidden;
  background: color-mix(in srgb, var(--ink-faint) 20%, transparent);
}
.meter-fill { display: block; height: 100%; border-radius: 999px; }
.meter-fill.meter-good { background: var(--jelly); }
.meter-fill.meter-low  { background: var(--yolk); }
.meter-fill.meter-bad  { background: var(--blossom); }
.meter-value { font-size: .78rem; color: var(--ink-faint); text-align: right; font-variant-numeric: tabular-nums; }

.chatter {
  margin: 0 0 20px; padding: 14px 18px; border-radius: 12px;
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--jelly);
}
.chatter-line { margin: 0 0 6px; font-size: 1.06rem; font-style: italic; }
.chatter-help { margin: 0; font-size: .84rem; color: var(--ink-soft); }

.creature-asof { margin: 0; font-size: .82rem; color: var(--ink-faint); }
.stale-note { margin: 8px 0 0; font-size: .82rem; color: var(--ink-soft); }

.creature-cta {
  margin-top: 24px; padding: 22px 26px; border-radius: 16px;
  border: 1px dashed var(--line); background: var(--card);
}
.creature-cta p { margin: 0 0 14px; color: var(--ink-soft); }
.creature-cta p:last-child { margin-bottom: 0; }
.creature-cta strong { color: var(--ink); }

@media (max-width: 720px) {
  .creature-card { grid-template-columns: 1fr; gap: 24px; padding: 20px; }
  .creature-scene { max-width: 320px; margin: 0 auto; width: 100%; }
  .creature-name { font-size: 1.8rem; }
}

/* ═══════════════════════════ home page ═══════════════════════════ */

:root {
  --night:   #181f2e;
  --night-2: #0f1420;
  --mint:    #6fd3a0;
  --mint-d:  #3fa376;
  --mint-l:  #a8e6c6;
  --blush:   #f59ab8;
  --yolk:    #f2bb4b;
}

.pxicon { vertical-align: -.18em; image-rendering: pixelated; }

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

.btn.big { padding: 14px 26px; font-size: 1rem; }
.btn.ghost-light {
  background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.35);
}
.btn.ghost-light:hover { border-color: var(--mint); color: #fff; background: rgba(255,255,255,.06); }

/* ---------- hero ---------- */

.hero-night {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 20% 0%, #23304a 0%, var(--night) 45%, var(--night-2) 100%);
  color: #fff; padding: 76px 0 96px;
}
.hero-night h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.7rem); line-height: 1.04; margin: 0 0 18px;
  letter-spacing: -.035em; color: #fff;
}
.hero-night .lede { font-size: 1.14rem; color: #c6cfe0; margin: 0 0 30px; max-width: 44ch; }

.stars { position: absolute; inset: 0; z-index: 0; }
.stars span {
  position: absolute; background: #fff; border-radius: 1px;
  animation: twinkle 4s ease-in-out infinite;
}
@keyframes twinkle { 0%,100% { opacity: .25; } 50% { opacity: 1; } }

.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.06fr .94fr; gap: 48px; align-items: center;
}

.kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px;
  padding: 6px 14px; border-radius: 999px; font-size: .82rem; font-weight: 650;
  background: rgba(111,211,160,.14); color: var(--mint-l);
  border: 1px solid rgba(111,211,160,.28);
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-foot {
  margin: 26px 0 0; font-size: .88rem; color: #93a0b8;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

.pet-stage {
  position: relative; aspect-ratio: 1; max-width: 400px; margin-left: auto;
  border-radius: 26px; cursor: pointer;
  background: radial-gradient(90% 70% at 50% 22%, rgba(111,211,160,.20) 0%, rgba(255,255,255,.03) 60%, transparent 75%);
  border: 1px solid rgba(255,255,255,.09);
  display: grid; place-items: center;
}
.pet-sprite {
  width: 56%; image-rendering: pixelated; position: relative; z-index: 2;
  animation: bob 3.1s ease-in-out infinite;
  transform-origin: 50% 100%;
}
@keyframes bob {
  0%,100% { transform: translateY(0) scale(1, 1); }
  45%     { transform: translateY(-9px) scale(.985, 1.015); }
  70%     { transform: translateY(0) scale(1.02, .98); }
}
.pet-sprite.boing { animation: boing .45s cubic-bezier(.28,1.6,.5,1); }
@keyframes boing {
  0%   { transform: translateY(0) scale(1,1); }
  30%  { transform: translateY(-22px) scale(.9,1.14); }
  60%  { transform: translateY(0) scale(1.16,.86); }
  100% { transform: translateY(0) scale(1,1); }
}

.pet-shadow {
  position: absolute; bottom: 23%; left: 50%; transform: translateX(-50%);
  width: 28%; height: 10px; border-radius: 50%; background: #000; opacity: .34;
  filter: blur(3px); animation: shrink 3.1s ease-in-out infinite;
}
@keyframes shrink {
  0%,100% { transform: translateX(-50%) scale(1); opacity: .3; }
  45%     { transform: translateX(-50%) scale(.82); opacity: .2; }
}

.speech {
  position: absolute; top: 11%; left: 50%; transform: translateX(-50%);
  background: #fff; color: var(--night); padding: 9px 16px; border-radius: 12px;
  font-size: .95rem; font-weight: 600; white-space: nowrap; z-index: 3;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.speech::after {
  content: ""; position: absolute; bottom: -7px; left: 50%; margin-left: -7px;
  border: 7px solid transparent; border-top-color: #fff; border-bottom: 0;
}
.speech.pop, .lang-bubble.pop { animation: popin .34s cubic-bezier(.3,1.5,.5,1); }
@keyframes popin {
  0% { transform: translateX(-50%) scale(.7); opacity: 0; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}
.lang-bubble.pop { animation-name: popin-plain; }
@keyframes popin-plain {
  0% { transform: scale(.85); opacity: 0; } 100% { transform: scale(1); opacity: 1; }
}

.pet-label {
  position: absolute; bottom: 16px; left: 0; right: 0; text-align: center;
  margin: 0; font-size: .78rem; letter-spacing: .09em; text-transform: uppercase;
  color: #7d8aa3;
}

.float-heart {
  position: absolute; bottom: 32%; width: 14px; height: 14px; z-index: 4;
  background: var(--blush); pointer-events: none;
  clip-path: polygon(50% 100%, 0 38%, 0 18%, 18% 0, 50% 16%, 82% 0, 100% 18%, 100% 38%);
  animation: floatup 1.1s ease-out forwards;
}
@keyframes floatup {
  0%   { transform: translateY(0) scale(.6); opacity: 0; }
  25%  { opacity: 1; }
  100% { transform: translateY(-90px) scale(1.1); opacity: 0; }
}

.night-fade { display: none; }   /* a crisp edge reads better than a grey smear */

/* ---------- shared section bits ---------- */

.section { padding: 74px 0; }
.section h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.025em; margin: 0 0 8px; }
.section .sub { color: var(--ink-soft); margin: 0 0 30px; max-width: 56ch; }
.band { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

.aside-note { margin: 26px 0 0; font-size: .92rem; color: var(--ink-soft); }
.quiet-link { font-size: .88rem; font-weight: 650; text-decoration: none; }

/* ---------- pitch cards ---------- */

.pitch { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.pitch-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px 24px; box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.pitch-card:hover { transform: translateY(-4px); border-color: var(--jelly); }
.pitch-icon {
  display: grid; place-items: center; width: 62px; height: 62px; border-radius: 16px;
  background: color-mix(in srgb, var(--jelly) 14%, transparent); margin-bottom: 16px;
}
.pitch-card h3 { margin: 0 0 8px; font-size: 1.12rem; }
.pitch-card p { margin: 0 0 14px; color: var(--ink-soft); font-size: .95rem; }

/* ---------- needs ---------- */

.needs { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.need {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 20px; text-align: center;
}
.band .need { background: var(--paper); }
.need-icon { display: block; margin-bottom: 10px; }
.need-name { margin: 0 0 12px; font-weight: 700; font-size: 1rem; }
.need-track {
  display: block; height: 10px; border-radius: 999px; overflow: hidden;
  background: color-mix(in srgb, var(--ink-faint) 22%, transparent);
}
.need-fill {
  display: block; height: 100%; width: 0; border-radius: 999px;
  transition: width 1.1s cubic-bezier(.2,.8,.3,1);
}
.need-good { background: var(--jelly); }
.need-low  { background: var(--yolk); }
.need-bad  { background: var(--blossom); }
.need-how { margin: 12px 0 0; font-size: .84rem; color: var(--ink-faint); }

/* ---------- language demo ---------- */

.lang-demo { display: grid; grid-template-columns: 1fr .9fr; gap: 44px; align-items: center; }
.lang-intent { margin: 0 0 22px; font-size: .95rem; color: var(--ink-soft); }
.lang-intent em { color: var(--ink); }

.lang-slider { display: block; }
.lang-slider input {
  width: 100%; accent-color: var(--jelly); height: 26px; cursor: pointer;
}
.lang-stages {
  display: grid; grid-template-columns: repeat(4, 1fr); font-size: .78rem;
  color: var(--ink-faint); text-transform: uppercase; letter-spacing: .07em;
}
.lang-stages span { text-align: center; }
.lang-stages span:first-child { text-align: left; }
.lang-stages span:last-child { text-align: right; }

.lang-screen {
  background: var(--night); border-radius: 20px; padding: 34px 28px; text-align: center;
  border: 1px solid rgba(255,255,255,.08);
}
.lang-bubble {
  font-size: 1.35rem; font-weight: 650; color: #fff; margin-bottom: 14px;
  min-height: 2.4em; display: grid; place-items: center;
}
.lang-stage-name {
  margin: 0 0 14px; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--mint);
}
.lang-hint { margin: 0; font-size: .88rem; color: #97a3ba; }
.lang-hint code {
  background: rgba(111,211,160,.16); color: var(--mint-l);
  padding: .1em .4em; border-radius: 5px; font-size: .95em;
}

/* ---------- hatchery ---------- */

.egg-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px;
  max-width: 820px;
}
.egg {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 8px 14px; border-radius: 16px; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line); font: inherit; color: var(--ink);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.egg:hover:not(.done) { transform: translateY(-4px); border-color: var(--jelly); box-shadow: var(--shadow); }
.egg:focus-visible { outline: 2px solid var(--jelly); outline-offset: 2px; }
.egg.done { cursor: default; border-color: color-mix(in srgb, var(--jelly) 45%, var(--line)); }

.egg-art { width: 76px; height: 76px; display: grid; place-items: center; }
.egg-art img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.egg-name { font-size: .82rem; font-weight: 700; color: var(--ink-faint); min-height: 1.2em; }
.egg.done .egg-name { color: var(--ink); }

.egg.cracking .egg-art { animation: wobble .42s ease-in-out; }
.egg.done .egg-art     { animation: pop .38s cubic-bezier(.3,1.6,.5,1); }
@keyframes wobble {
  0%,100% { transform: rotate(0) translateY(0); }
  15% { transform: rotate(-10deg) translateY(-2px); }
  35% { transform: rotate(9deg); }
  55% { transform: rotate(-8deg) translateY(-3px); }
  75% { transform: rotate(6deg); }
}
@keyframes pop {
  0% { transform: scale(.5); opacity: 0; }
  70% { transform: scale(1.16); opacity: 1; }
  100% { transform: scale(1); }
}
.shard {
  position: absolute; top: 42%; left: 50%; width: 6px; height: 6px;
  background: var(--mint); pointer-events: none; border-radius: 1px;
  animation: shard .7s ease-out forwards;
}
@keyframes shard {
  0%   { transform: translate(0,0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(180deg); opacity: 0; }
}
.hatch-note { margin-top: 20px; color: var(--ink-soft); font-size: .96rem; min-height: 1.5em; }

/* ---------- games ---------- */

.game-cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.game-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px 24px; box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.game-card:hover { transform: translateY(-4px); border-color: var(--jelly); color: inherit; }
.game-icon { display: block; margin-bottom: 14px; }
.game-card h3 { margin: 0 0 4px; font-size: 1.14rem; }
.game-card .pays {
  margin: 0 0 12px; font-size: .8rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-faint);
}
.game-card .pays strong { color: var(--jelly-dark); }
.game-card p { color: var(--ink-soft); font-size: .94rem; margin: 0; }

/* ---------- visiting ---------- */

.visit { display: grid; grid-template-columns: 1fr .95fr; gap: 48px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 0 0 26px; }
.ticks li {
  display: flex; align-items: center; gap: 12px; padding: 9px 0;
  border-bottom: 1px solid var(--line); font-size: .96rem;
}
.ticks li:last-child { border-bottom: 0; }

.visit-scene { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; }
.habitat {
  position: relative; aspect-ratio: 1; border-radius: 18px; display: grid; place-items: center;
  background: radial-gradient(100% 80% at 50% 15%, color-mix(in srgb, var(--jelly) 20%, var(--paper)) 0%, var(--paper) 70%);
  border: 1px solid var(--line);
}
.habitat img { width: 62%; image-rendering: pixelated; animation: bob 3.4s ease-in-out infinite; }
.habitat.empty { background: var(--paper); }
.habitat-label {
  position: absolute; top: 10px; left: 0; right: 0; text-align: center;
  font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint);
}
.hab-shadow {
  position: absolute; bottom: 22%; width: 38%; height: 9px; border-radius: 50%;
  background: var(--ink); opacity: .14;
}
.visit-arrow { display: grid; place-items: center; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 0%,100% { transform: translateX(-4px); } 50% { transform: translateX(4px); } }

/* ---------- watch band ---------- */

.watch-band { background: var(--night); color: #fff; }
.watch-band h2 { color: #fff; }
.watch-band .sub { color: #b3bece; }
.watch-band .aside-note { color: #93a0b8; }
.watch-band a { color: var(--mint); }
.watch-grid { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: center; }

.watch-art { display: grid; justify-items: center; }
.watch-strap { width: 92px; background: linear-gradient(#4d5a72, #3a4457); }
.watch-strap.top { height: 54px; border-radius: 12px 12px 4px 4px; }
.watch-strap.bottom { height: 54px; border-radius: 4px 4px 12px 12px; }
.watch-body {
  width: 190px; height: 190px; border-radius: 42px; padding: 13px;
  background: linear-gradient(150deg, #5d6b85, #333c4d);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.watch-screen {
  width: 100%; height: 100%; border-radius: 30px; position: relative;
  background: radial-gradient(80% 70% at 50% 20%, #26344c, #0d121c);
  display: grid; place-items: center; overflow: hidden;
}
.watch-screen img { width: 52%; image-rendering: pixelated; animation: bob 2.8s ease-in-out infinite; }
.watch-line {
  position: absolute; bottom: 18px; left: 0; right: 0; text-align: center;
  font-size: .8rem; font-weight: 650; color: var(--mint-l);
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 26px 0 0; }
.split h4 {
  margin: 0 0 10px; font-size: .82rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--mint); display: flex; align-items: center; gap: 8px;
}
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 5px 0; color: #c2cbdb; font-size: .95rem; }

/* ---------- closer ---------- */

.closer {
  background: radial-gradient(110% 100% at 50% 0%, #23304a 0%, var(--night) 55%, var(--night-2) 100%);
  color: #fff; padding: 76px 0 88px; text-align: center;
}
.closer-inner { display: grid; justify-items: center; }
.closer-pet { width: 118px; image-rendering: pixelated; animation: bob 3s ease-in-out infinite; }
.closer h2 { margin: 20px 0 8px; font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -.03em; color: #fff; }
.closer p { margin: 0 0 26px; color: #b0bbcd; }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .pet-sprite, .pet-shadow, .habitat img, .watch-screen img, .closer-pet,
  .stars span, .visit-arrow { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .egg:hover:not(.done), .pitch-card:hover, .game-card:hover { transform: none; }
}

/* ---------- home responsive ---------- */

@media (max-width: 980px) {
  .hero-grid, .lang-demo, .visit, .watch-grid { grid-template-columns: 1fr; gap: 36px; }
  .pet-stage { margin: 0 auto; }
  .pitch, .game-cards { grid-template-columns: 1fr; }
  .needs { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .watch-art { order: -1; }
}
@media (max-width: 720px) {
  .egg-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
  .egg-art { width: 60px; height: 60px; }
  .split { grid-template-columns: 1fr; gap: 18px; }
  .hero-night { padding: 52px 0 70px; }
  .section { padding: 56px 0; }
}
@media (max-width: 440px) {
  .egg-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .needs { grid-template-columns: 1fr; }
}

/* ---------- home: dark header to match the night hero ---------- */

body.home .site-head {
  background: color-mix(in srgb, var(--night) 92%, transparent);
  border-bottom-color: rgba(255,255,255,.09);
}
body.home .brand-name { color: #fff; }
body.home .head-nav a { color: #a9b5c9; }
body.home .head-nav a:hover, body.home .head-nav a.on { color: #fff; border-bottom-color: var(--mint); }
body.home .head-search input {
  background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); color: #fff;
}
body.home .head-search input::placeholder { color: #8996ad; }

/* ---------- cards (home wiki grid + wiki section index) ---------- */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.card {
  display: block; text-decoration: none; color: inherit; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px;
  box-shadow: var(--shadow); transition: transform .14s ease, border-color .14s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--jelly); color: inherit; }
.card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: .93rem; }
.card .count {
  display: inline-block; margin-top: 14px; font-size: .74rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint);
}
@media (prefers-reduced-motion: reduce) { .card:hover { transform: none; } }

/* ---------- store buttons ---------- */

.store-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }

.store-btn {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 20px 10px 16px; min-width: 186px; border-radius: 12px;
  text-decoration: none; border: 1.5px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.06); color: #fff;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.store-btn:hover { transform: translateY(-2px); border-color: var(--mint); background: rgba(255,255,255,.1); color: #fff; }
.store-btn:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

.store-mark { display: grid; place-items: center; flex: none; }
.store-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-text small { font-size: .68rem; letter-spacing: .04em; opacity: .72; }
.store-text strong { font-size: 1.06rem; font-weight: 700; letter-spacing: -.01em; }

/* disabled: no link, no pointer, clearly not ready yet */
/* The filter goes on the inner content, not the button: a filter on the parent
   would desaturate the "Soon" tag too, and it cannot be undone from a child. */
.store-btn.is-off {
  cursor: default;
  border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.03);
}
.store-btn.is-off .store-mark,
.store-btn.is-off .store-text,
.store-btn.is-off .store-badge { opacity: .42; filter: grayscale(1); }
.store-btn.is-off:hover { transform: none; border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.03); }

.store-soon {
  position: absolute; top: -9px; right: 10px; padding: 2px 9px; border-radius: 999px;
  font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  background: var(--yolk); color: #3a2a00;
}

/* official badge artwork, once assets/badges/*.svg|png are dropped in */
.store-btn.is-badge { padding: 0; border: 0; background: none; min-width: 0; }
.store-btn.is-badge:hover { background: none; border: 0; }
.store-badge { height: 54px; width: auto; display: block; }

/* on light sections (nothing uses this yet, but the closer/hero may move) */
body:not(.home) .store-btn,
.section .store-btn {
  border-color: var(--line); background: var(--card); color: var(--ink);
}
.section .store-btn:hover { border-color: var(--jelly); color: var(--ink); }

@media (prefers-reduced-motion: reduce) { .store-btn:hover { transform: none; } }

@media (max-width: 460px) {
  .store-row { flex-direction: column; }
  .store-btn { width: 100%; }
}

/* ---------- beta banner ---------- */

.beta-bar {
  background: linear-gradient(90deg, #2f9d74, #3fa376 55%, #d9557f);
  color: #fff; font-size: .92rem;
}
.beta-bar-inner { display: flex; align-items: center; gap: 12px; padding: 9px 20px; flex-wrap: wrap; }
.beta-bar p { margin: 0; }
.beta-tag {
  padding: 2px 9px; border-radius: 999px; background: rgba(0,0,0,.28);
  font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
.beta-bar-cta {
  margin-left: auto; color: #fff; font-weight: 700; text-decoration: none;
  border-bottom: 2px solid rgba(255,255,255,.5); padding-bottom: 1px;
}
.beta-bar-cta:hover { color: #fff; border-bottom-color: #fff; }

/* ---------- beta forms ---------- */

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.beta-fields { display: grid; grid-template-columns: 1fr 1.3fr; gap: 12px; margin-bottom: 16px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld span { font-size: .82rem; font-weight: 650; }
.fld input {
  padding: 11px 13px; font: inherit; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
}
.fld input:focus { outline: 2px solid var(--jelly); outline-offset: 1px; }

.fld-label { margin: 0 0 8px; font-size: .82rem; font-weight: 650; }
.devices { display: grid; gap: 9px; margin-bottom: 18px; }
.device-opt {
  display: flex; align-items: flex-start; gap: 11px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  background: var(--paper); transition: border-color .12s ease, background .12s ease;
}
.device-opt:hover { border-color: var(--jelly); }
.device-opt input { margin-top: 3px; accent-color: var(--jelly); flex: none; }
.device-opt:has(input:checked) {
  border-color: var(--jelly); background: color-mix(in srgb, var(--jelly) 10%, var(--paper));
}
.device-body { display: flex; flex-direction: column; }
.device-body strong { font-size: .95rem; }
.device-body small { color: var(--ink-faint); font-size: .82rem; }

.beta-small { margin: 14px 0 0; font-size: .82rem; color: var(--ink-faint); }

/* dark variant, used on /beta */
.beta-form.dark .fld span, .beta-form.dark .fld-label { color: #dfe6f0; }
.beta-form.dark .fld input {
  background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); color: #fff;
}
.beta-form.dark .fld input::placeholder { color: #8996ad; }
.beta-form.dark .device-opt {
  background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.14); color: #fff;
}
.beta-form.dark .device-opt:has(input:checked) {
  border-color: var(--mint); background: rgba(111,211,160,.14);
}
.beta-form.dark .device-body small { color: #97a3ba; }
.beta-form.dark .beta-small { color: #8b98ae; }

/* ---------- beta section on the home page ---------- */

.beta-home { display: grid; grid-template-columns: 1fr .95fr; gap: 48px; align-items: center; }
.kicker.dark {
  background: color-mix(in srgb, var(--jelly) 15%, transparent);
  color: var(--jelly-dark); border-color: color-mix(in srgb, var(--jelly) 32%, transparent);
}
.beta-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 28px; box-shadow: var(--shadow);
}
.beta-card h2, .beta-card h3 { margin: 0 0 18px; font-size: 1.2rem; }

/* ---------- /beta page ---------- */

.beta-page {
  position: relative; overflow: hidden; color: #fff; padding: 64px 0 84px;
  background: radial-gradient(120% 90% at 25% 0%, #23304a 0%, var(--night) 48%, var(--night-2) 100%);
  min-height: 70vh;
}
.beta-wrap { position: relative; z-index: 1; }
.beta-grid { display: grid; grid-template-columns: 1fr .92fr; gap: 52px; align-items: start; }
.beta-page h1 { font-size: clamp(2rem, 4.6vw, 3rem); letter-spacing: -.03em; margin: 0 0 16px; color: #fff; }
.beta-page .lede { font-size: 1.1rem; color: #c6cfe0; margin: 0 0 26px; max-width: 44ch; }
.beta-page .beta-card {
  background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); box-shadow: none;
}
.beta-page .beta-card h2 { color: #fff; }
.ticks.light li { border-bottom-color: rgba(255,255,255,.1); color: #d3dbe8; }

.beta-thanks { text-align: center; max-width: 46rem; margin: 0 auto; display: grid; justify-items: center; }
.thanks-pet { width: 128px; image-rendering: pixelated; animation: bob 3s ease-in-out infinite; }
.beta-thanks h1 { margin: 22px 0 10px; }
.beta-thanks .lede { margin-left: auto; margin-right: auto; }

/* ---------- admin: stats and filters ---------- */

.stat-row { display: flex; gap: 26px; flex-wrap: wrap; margin: 20px 0 4px; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 1.6rem; line-height: 1.1; letter-spacing: -.02em; }
.stat span { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.chip {
  padding: 5px 13px; border-radius: 999px; font-size: .84rem; font-weight: 600;
  text-decoration: none; border: 1px solid var(--line); color: var(--ink-soft);
  background: var(--paper);
}
.chip:hover { border-color: var(--jelly); color: var(--ink); }
.chip.on { background: var(--jelly); border-color: var(--jelly); color: #fff; }

@media (prefers-reduced-motion: reduce) { .thanks-pet { animation: none; } }

@media (max-width: 900px) {
  .beta-home, .beta-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .beta-fields { grid-template-columns: 1fr; }
  .beta-bar-inner { font-size: .86rem; gap: 8px; }
  .beta-bar-cta { margin-left: 0; }
}

/* ---------- tester rewards ---------- */

.reward-banner {
  margin: 0 0 26px; padding: 20px 22px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05);
}
.reward-banner.light {
  border-color: var(--line); background: var(--card); box-shadow: var(--shadow);
}
.reward-kicker {
  margin: 0 0 14px; font-size: .74rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--yolk);
  display: flex; align-items: center; gap: 8px;
}
.reward-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.reward-list li {
  display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto;
  column-gap: 13px; align-items: center;
}
.reward-list li svg { grid-row: 1 / span 2; }
.reward-list strong { font-size: .98rem; }
.reward-list span { font-size: .87rem; color: #a9b5c9; grid-column: 2; }
.reward-banner.light .reward-list span { color: var(--ink-soft); }
.reward-foot { margin: 16px 0 0; font-size: .82rem; color: #8b98ae; }
.reward-banner.light .reward-foot { color: var(--ink-faint); }

/* ---------- lounge ---------- */

.lounge { padding: 34px 0 80px; }
.lounge-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.lounge-head h1 { margin: 0; font-size: 1.9rem; letter-spacing: -.03em; }
.lounge-head form { margin-left: auto; }

.lounge-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 24px; }
.lounge-tabs a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px;
  border-radius: 999px; text-decoration: none; font-size: .9rem; font-weight: 650;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-soft);
}
.lounge-tabs a:hover { border-color: var(--jelly); color: var(--ink); }
.lounge-tabs a.on { background: var(--jelly); border-color: var(--jelly); color: #fff; }

.lounge-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 30px; align-items: start; }
.lounge-side { display: grid; gap: 18px; position: sticky; top: 90px; }

.panel-soft {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 24px; box-shadow: var(--shadow);
}
.panel-soft h3 { margin: 0 0 12px; font-size: 1.05rem; }
.panel-soft p { margin: 0 0 12px; color: var(--ink-soft); }
.panel-soft p:last-child { margin-bottom: 0; }
/* What's new: the feature list in the lounge. */
.feature { padding: 14px 0; border-top: 1px solid var(--line); }
.feature:first-of-type { border-top: 0; padding-top: 0; }
.feature header { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 4px; }
.feature h4 { margin: 0; font-size: 1rem; }
.feature-when { margin-left: auto; color: var(--ink-faint); font-size: .82rem; white-space: nowrap; }
.feature-lede { margin: 0 !important; color: var(--ink-soft); }
.feature-body { margin-top: 8px; font-size: .93rem; }
.feature-body > :first-child { margin-top: 0; }
.feature-body > :last-child { margin-bottom: 0; }
.feature-kicker {
  margin: 18px 0 2px !important; font-size: .74rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-faint);
}

ul.plain-dark { list-style: none; padding: 0; margin: 0; }
ul.plain-dark li { padding: 6px 0; color: var(--ink-soft); font-size: .93rem; border-bottom: 1px solid var(--line); }
ul.plain-dark li:last-child { border-bottom: 0; }

.wall-composer {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.wall-composer textarea, .reply-box textarea {
  width: 100%; padding: 11px 13px; font: inherit; border-radius: 10px; resize: vertical;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); margin-bottom: 10px;
}
.wall-composer textarea:focus, .reply-box textarea:focus { outline: 2px solid var(--jelly); outline-offset: 1px; }

.wall-post {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 20px; margin-bottom: 14px;
}
.wall-post.pinned { border-color: color-mix(in srgb, var(--yolk) 55%, var(--line)); }
.wall-post header, .wall-reply header {
  display: flex; align-items: center; gap: 9px; margin-bottom: 8px; flex-wrap: wrap;
}
.wall-post .who, .wall-reply .who { font-weight: 700; font-size: .95rem; }
.wall-post time, .wall-reply time { font-size: .8rem; color: var(--ink-faint); }
.wall-post > p, .wall-reply > p { margin: 0; }

.wall-reply {
  margin: 14px 0 0 0; padding: 12px 14px; border-radius: 12px;
  background: var(--paper); border-left: 3px solid var(--jelly);
}
.reply-box { margin-top: 12px; }
.reply-box summary {
  cursor: pointer; font-size: .86rem; font-weight: 650; color: var(--ink-soft);
}
.reply-box summary:hover { color: var(--ink); }
.reply-box form { margin-top: 10px; }

.sel {
  padding: 10px 12px; font: inherit; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
}
.beta-form textarea {
  padding: 11px 13px; font: inherit; border-radius: 10px; resize: vertical;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
}
.beta-form.dark textarea {
  background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); color: #fff;
}

.report-row {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.report-row .meta { display: block; font-size: .82rem; color: var(--ink-faint); margin-top: 2px; }
.report-row .tag { margin-left: auto; flex: none; }
.report-reply {
  margin: 8px 0 0; padding: 9px 12px; border-radius: 10px; font-size: .9rem;
  background: color-mix(in srgb, var(--jelly) 12%, transparent);
}

.build-notes {
  margin: 16px 0; padding: 14px 16px; border-radius: 12px;
  background: var(--paper); border: 1px solid var(--line); font-size: .94rem;
}

/* admin report list */
.report-admin { border-bottom: 1px solid var(--line); padding: 12px 0; }
.report-admin summary { cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.report-admin .meta { font-size: .82rem; color: var(--ink-faint); }
.report-detail { padding: 12px 0 4px 18px; }
.report-detail p { margin: 0 0 10px; }
.report-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.report-form input[type=text] {
  flex: 1; min-width: 220px; padding: 8px 11px; font: inherit; font-size: .9rem;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink);
}

@media (max-width: 900px) {
  .lounge-grid { grid-template-columns: 1fr; }
  .lounge-side { position: static; }
}

/* ═══════════════════════════ footer ═══════════════════════════
   One horizontal band. Brand, pitch and stores on a single row; links
   and copyright on a single row under it. Sits on --night so the store
   buttons, which are drawn for a dark background, work here as they are. */

.site-foot {
  margin-top: 70px; padding: 4px 0 18px;
  background: linear-gradient(180deg, #1d2637 0%, var(--night) 60%, var(--night-2) 100%);
  color: #cfd6e4;
}

.foot-top {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  padding-top: 26px; padding-bottom: 22px;
}
.foot-logo { color: #fff; flex: none; }
.foot-logo .brand-name { color: #fff; }
.foot-pitch {
  margin: 0; color: #9fa9bd; font-size: .95rem; line-height: 1.4;
  padding-left: 26px; border-left: 1px solid rgba(255,255,255,.14);
  max-width: 34ch;
}
.foot-get { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.foot-get .store-row { margin: 0; }
.foot-tester { flex: none; white-space: nowrap; }

.foot-bar {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding-top: 16px; padding-bottom: 12px;
  border-top: 1px solid rgba(255,255,255,.09);
}
.foot-links { display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; }
.foot-links a {
  color: #a9b3c6; text-decoration: none; font-size: .9rem;
  transition: color .12s ease;
}
.foot-links a:hover { color: var(--mint-l); }
.foot-copy { margin: 0 0 0 auto; font-size: .84rem; color: #7f8a9f; white-space: nowrap; }

.foot-legal { margin: 0; font-size: .74rem; line-height: 1.5; color: #6f7a90; }

/* The buttons drop to their own line first, and go back to the left edge when
   they do: an auto margin on a wrapped flex line strands them on the right. */
@media (max-width: 1080px) {
  .foot-get { margin-left: 0; flex-basis: 100%; flex-wrap: wrap; }
  /* Same reason: once the links row wraps, a lone right-aligned copyright
     line reads as a mistake. */
  .foot-copy { margin-left: 0; }
}
/* Brand and pitch stay side by side until there genuinely isn't room. */
@media (max-width: 720px) {
  .foot-top { gap: 16px; }
  .foot-pitch { padding-left: 0; border-left: 0; flex-basis: 100%; max-width: none; }
}
@media (max-width: 560px) {
  .foot-copy { margin-left: 0; }
  .foot-links { gap: 8px 16px; }
  /* Full-width, stacked. Side by side at this width the store buttons squeeze
     to half and the tester button floats next to them looking unrelated. */
  .foot-get { width: 100%; flex-direction: column; align-items: stretch; gap: 10px; }
  .foot-get .store-row { width: 100%; }
  .foot-tester { text-align: center; padding: 11px 20px; }
  .site-foot .store-btn { min-width: 0; flex: 1 1 100%; }
}

/* A game that has to be unlocked says so on the card. */
.game-lock {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
  font-size: .68rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  background: color-mix(in srgb, var(--blossom) 20%, transparent); color: var(--blossom);
  vertical-align: 1px;
}

/* ═══════════════════════════ updates page ═══════════════════════════ */

.updates-head {
  background: linear-gradient(180deg, #1d2637 0%, var(--night) 100%);
  color: #cfd6e4; padding: 40px 0 44px;
}
.updates-head h1 { margin: 8px 0 10px; font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -.025em; color: #fff; }
.updates-head .kicker { color: var(--mint-l); }
.updates-head .lede { margin: 0; color: #a9b3c6; max-width: 60ch; font-size: 1.05rem; }
.updates-meta { margin: 14px 0 0; font-size: .86rem; color: #8f9ab0; }

.updates-wrap { padding: 38px 20px 20px; }
.updates-block { margin-bottom: 44px; }
.updates-block h2 {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 20px; font-size: 1.3rem; letter-spacing: -.015em;
}

/* On the way: a timeline, so "now" and "after that" are visibly ordered. */
.road { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; }
.road::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.road-item { position: relative; padding: 0 0 26px; }
.road-item:last-child { padding-bottom: 0; }
.road-dot {
  position: absolute; left: -26px; top: 5px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--card); border: 2px solid var(--line);
}
.road-item.now .road-dot { background: var(--jelly); border-color: var(--jelly); }
.road-when {
  margin: 0 0 2px; font-size: .72rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-faint);
}
.road-item.now .road-when { color: var(--jelly-dark); }
.road-body h3 { margin: 0 0 4px; font-size: 1.08rem; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.road-lede { margin: 0; color: var(--ink-soft); }
.road-more { margin-top: 8px; font-size: .94rem; max-width: none; }
.road-more > :first-child { margin-top: 0; }
.road-more > :last-child { margin-bottom: 0; }

/* Already in: cards, because a changelog is a list of separate things. */
.shipped { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ship {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; box-shadow: var(--shadow);
}
.ship header { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin-bottom: 6px; }
.ship h3 { margin: 0; font-size: 1.02rem; }
.ship time { margin-left: auto; font-size: .8rem; color: var(--ink-faint); white-space: nowrap; }
.ship-lede { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.ship-more { margin-top: 8px; font-size: .92rem; max-width: none; }
.ship-more > :first-child { margin-top: 0; }
.ship-more > :last-child { margin-bottom: 0; }

.updates-cta {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px 26px; box-shadow: var(--shadow); margin-bottom: 30px;
}
.updates-cta h2 { margin: 0 0 6px; font-size: 1.2rem; }
.updates-cta p { margin: 0; color: var(--ink-soft); max-width: 52ch; }
.updates-cta .btn { margin-left: auto; flex: none; }

@media (max-width: 600px) {
  .updates-cta .btn { margin-left: 0; }
  .ship time { margin-left: 0; }
}

/* The header gained a fourth nav item, which is one more than fits next to the
   search box on a small phone. Tighten first, then drop the search: the wiki
   has its own search box on the page it belongs to. */
@media (max-width: 560px) {
  .head-nav { gap: 13px; margin-left: 4px; }
  .head-search input { width: 132px; }
}
@media (max-width: 430px) {
  .head-search { display: none; }
  /* The mark alone still gets you home, and it buys the fourth nav item the
     room it needs. */
  .brand-name { display: none; }
  .head-nav { gap: 14px; }
}

/* Pre-existing: the wiki index search would not wrap, so it ran off the side
   of a phone. Nothing to do with the nav, fixed while it was in front of me. */
.big-search { flex-wrap: wrap; }
.big-search input { min-width: 0; flex: 1 1 200px; }

/* Grid children default to min-width:auto, so one long word in the sidebar or a
   wide table can push a column past the page. Pre-existing; it showed up on
   phones as the whole wiki scrolling sideways. */
.wiki > * { min-width: 0; }

/* The wiki index is .wiki.no-toc, two classes, which outranks the single-class
   .wiki rule in the 860px breakpoint however late that rule appears. So on a
   phone it kept its 236px sidebar and squeezed the article to about 99px.
   Pre-existing, and the reason the wiki index scrolled sideways on a phone. */
@media (max-width: 860px) {
  .wiki.no-toc { grid-template-columns: 1fr; }
}
