:root {
  --bg: #130724;
  --void: #0A0318;
  --surface-1: #1E0D36;
  --surface-2: #291347;
  --sky-glow: #7E38D6;
  --ink: #FAF6FF;
  --pure-white: #FFFFFF;
  --muted: #C9BFE0;
  --gold: #F5C451;
  --emerald: #3DDC84;
  --ruby: #E8173F;
  --violet: #A06BFF;
  --border: color-mix(in srgb, var(--ink) 15%, transparent);
  --border-soft: color-mix(in srgb, var(--ink) 10%, transparent);
  --glass: color-mix(in srgb, var(--pure-white) 5%, transparent);
  --glass-strong: color-mix(in srgb, var(--pure-white) 6%, transparent);
  --input-bg: color-mix(in srgb, var(--bg) 62%, transparent);
  --gold-soft: color-mix(in srgb, var(--gold) 16%, transparent);
  --emerald-soft: color-mix(in srgb, var(--emerald) 18%, transparent);
  --ruby-soft: color-mix(in srgb, var(--ruby) 16%, transparent);
  --violet-soft: color-mix(in srgb, var(--violet) 20%, transparent);
  --font-display: 'Fraunces', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --step-xs: 0.75rem;
  --step-sm: 0.875rem;
  --step-md: 1rem;
  --step-lg: 1.125rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(
      ellipse 92% 54% at 50% 0%,
      color-mix(in srgb, var(--sky-glow) 48%, transparent) 0%,
      color-mix(in srgb, var(--sky-glow) 18%, color-mix(in srgb, var(--surface-2) 26%, transparent)) 46%,
      transparent 78%
    ),
    radial-gradient(
      circle at 50% 230px,
      color-mix(in srgb, var(--gold) 11%, transparent) 0%,
      color-mix(in srgb, var(--violet) 12%, transparent) 34%,
      transparent 64%
    ),
    radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--ink) 36%, transparent) 0 1px, transparent 1.8px),
    radial-gradient(circle at 82% 16%, color-mix(in srgb, var(--gold) 42%, transparent) 0 1.2px, transparent 2px),
    radial-gradient(circle at 26% 34%, color-mix(in srgb, var(--ink) 24%, transparent) 0 1px, transparent 1.6px),
    radial-gradient(circle at 76% 30%, color-mix(in srgb, var(--ink) 28%, transparent) 0 1px, transparent 1.6px);
  color: var(--ink);
  overflow-x: clip;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  opacity: 0.9;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background-color: var(--gold);
  color: var(--bg);
  font-weight: 700;
}

.skip-link:focus {
  left: 12px;
}

.shell {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 18px;
}

.hero-shell {
  max-width: 600px;
}

.narrow-shell {
  max-width: 720px;
}

.sandbox-banner {
  background-color: color-mix(in srgb, var(--surface-2) 72%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  color: var(--gold);
  text-align: center;
  font-size: var(--step-xs);
  font-weight: 700;
  padding: 5px 12px;
}

/* Frameless Transparent Top Bar */
.site-header {
  position: relative;
  z-index: 60;
  background: transparent;
  border: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: var(--step-lg);
  font-weight: 700;
  white-space: nowrap;
}

.brand .gf-site-icon,
.footer-brand-link .gf-site-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  flex-shrink: 0;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header-code-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: var(--step-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.header-code-link:hover {
  color: var(--ink);
  background-color: var(--glass-strong);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background-color: var(--glass);
  color: var(--ink);
  text-decoration: none;
  font-size: var(--step-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.lang-switch:hover {
  border-color: var(--gold);
  background-color: color-mix(in srgb, var(--pure-white) 10%, transparent);
}

/* Frameless Single-Column Hero Stage */
.hero-section {
  padding: 8px 0 34px;
}

.bunch-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.bunch-stem-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: -4px;
}

.bunch-stem-svg {
  width: 78px;
  height: 38px;
  filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--emerald) 26%, transparent));
}

[data-bunch-stage][data-golden-vine="1"] .bunch-stem-svg {
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--gold) 68%, transparent));
}

[data-bunch-stage][data-golden-vine="1"] .grape-cluster {
  padding: 12px 10px 8px;
  border-radius: 28px;
  background: radial-gradient(
    ellipse 86% 78% at 50% 45%,
    color-mix(in srgb, var(--gold) 22%, transparent) 0%,
    color-mix(in srgb, var(--gold) 8%, transparent) 54%,
    transparent 82%
  );
}

.golden-gift-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 4px auto 10px;
  padding: 5px 14px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--gold) 28%, var(--surface-2)),
    color-mix(in srgb, var(--gold) 14%, var(--surface-1))
  );
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: var(--step-xs);
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 18px color-mix(in srgb, var(--gold) 28%, transparent);
}

/* 12-Color 3D Candy Soft-Glow Grape Cluster (3-4-3-2) via numeric --orb-h / --orb-s / --orb-l */
.grape-cluster {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px 6px;
  width: 100%;
  max-width: 300px;
  margin: 0 auto 18px;
  justify-items: center;
}

.grape-node {
  --orb-h: 146.79;
  --orb-s: 69.43%;
  --orb-l: 55.1%;
  --orb-color: hsl(var(--orb-h) var(--orb-s) var(--orb-l));
  grid-column: span 2;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 48px;
  min-height: 56px;
  padding: 2px 0;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

.grape-node[data-slot="1"] { --orb-h: 348.52; --orb-s: 81.96%; --orb-l: 50%; grid-column: 2 / span 2; }
.grape-node[data-slot="2"] { --orb-h: 38.74; --orb-s: 100%; --orb-l: 56.27%; grid-column: 4 / span 2; }
.grape-node[data-slot="3"] { --orb-h: 146.79; --orb-s: 69.43%; --orb-l: 55.1%; grid-column: 6 / span 2; }
.grape-node[data-slot="4"] { --orb-h: 219.55; --orb-s: 100%; --orb-l: 65.49%; grid-column: 1 / span 2; }
.grape-node[data-slot="5"] { --orb-h: 187.94; --orb-s: 85.71%; --orb-l: 53.33%; grid-column: 3 / span 2; }
.grape-node[data-slot="6"] { --orb-h: 23.81; --orb-s: 100%; --orb-l: 61.96%; grid-column: 5 / span 2; }
.grape-node[data-slot="7"] { --orb-h: 261.49; --orb-s: 100%; --orb-l: 70.98%; grid-column: 7 / span 2; }
.grape-node[data-slot="8"] { --orb-h: 313.3; --orb-s: 100%; --orb-l: 65.49%; grid-column: 2 / span 2; }
.grape-node[data-slot="9"] { --orb-h: 95.17; --orb-s: 70.05%; --orb-l: 59.41%; grid-column: 4 / span 2; }
.grape-node[data-slot="10"] { --orb-h: 233.78; --orb-s: 100%; --orb-l: 67.84%; grid-column: 6 / span 2; }
.grape-node[data-slot="11"] { --orb-h: 11.93; --orb-s: 100%; --orb-l: 67.45%; grid-column: 3 / span 2; }
.grape-node[data-slot="12"] { --orb-h: 191.83; --orb-s: 100%; --orb-l: 86.08%; grid-column: 5 / span 2; }
.grape-node-bonus[data-slot="13"] {
  --orb-color: var(--gold);
  grid-column: 4 / span 2;
  margin-top: 2px;
}

.grape-node[data-grape-style="emerald"] { --orb-color: var(--emerald); }
.grape-node[data-grape-style="ruby"] { --orb-color: var(--ruby); }
.grape-node[data-grape-style="gold"] { --orb-h: 38.74; --orb-s: 100%; --orb-l: 56.27%; }
.grape-node[data-grape-style="violet"] { --orb-color: var(--violet); }
.grape-node[data-grape-style="gold_foil"] { --orb-color: var(--gold); }
.grape-node[data-grape-style="aurora_crystal"] { --orb-color: color-mix(in srgb, var(--violet) 58%, var(--emerald)); }

.grape-orb {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background:
    radial-gradient(
      circle at 30% 24%,
      color-mix(in srgb, var(--pure-white) 90%, transparent) 0%,
      color-mix(in srgb, var(--pure-white) 34%, transparent) 17%,
      transparent 40%
    ),
    radial-gradient(
      circle at 36% 30%,
      color-mix(in srgb, var(--orb-color) 74%, var(--pure-white)) 0%,
      var(--orb-color) 56%,
      color-mix(in srgb, var(--orb-color) 48%, var(--void)) 100%
    );
  box-shadow:
    inset -5px -7px 14px color-mix(in srgb, var(--void) 50%, transparent),
    inset 3px 4px 10px color-mix(in srgb, var(--pure-white) 38%, transparent),
    0 8px 22px color-mix(in srgb, var(--orb-color) 40%, transparent);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, opacity 0.2s ease;
}

.grape-node[data-grape-style="gold_foil"] .grape-orb {
  background:
    radial-gradient(
      circle at 28% 22%,
      var(--pure-white) 0%,
      color-mix(in srgb, var(--gold) 52%, var(--pure-white)) 26%,
      var(--gold) 60%,
      color-mix(in srgb, var(--gold) 52%, var(--void)) 100%
    );
  box-shadow:
    0 0 0 2.5px var(--pure-white),
    0 0 0 4.5px color-mix(in srgb, var(--gold) 70%, transparent),
    inset -4px -6px 12px color-mix(in srgb, var(--void) 40%, transparent),
    0 0 28px color-mix(in srgb, var(--gold) 74%, transparent);
}

.grape-node[data-grape-style="aurora_crystal"] .grape-orb {
  background:
    radial-gradient(
      circle at 28% 24%,
      var(--pure-white) 0%,
      color-mix(in srgb, var(--emerald) 55%, var(--pure-white)) 28%,
      color-mix(in srgb, var(--violet) 72%, var(--emerald)) 64%,
      color-mix(in srgb, var(--sky-glow) 60%, var(--void)) 100%
    );
  box-shadow:
    0 0 0 2.5px color-mix(in srgb, var(--pure-white) 86%, transparent),
    inset -4px -6px 12px color-mix(in srgb, var(--void) 36%, transparent),
    0 0 28px color-mix(in srgb, var(--violet) 68%, var(--emerald));
}

.grape-orb::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 11px;
  width: 13px;
  height: 7px;
  border-radius: 50%;
  transform: rotate(-28deg);
  background-color: color-mix(in srgb, var(--pure-white) 65%, transparent);
  pointer-events: none;
}

.grape-orb::after {
  content: "";
  position: absolute;
  bottom: 7px;
  right: 9px;
  width: 14px;
  height: 8px;
  border-radius: 50%;
  transform: rotate(-24deg);
  background-color: color-mix(in srgb, var(--pure-white) 16%, transparent);
  pointer-events: none;
}

.grape-node:hover .grape-orb,
.grape-node.is-selected .grape-orb {
  transform: translateY(-3px) scale(1.06);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--gold) 72%, transparent),
    inset -5px -7px 14px color-mix(in srgb, var(--void) 45%, transparent),
    inset 3px 4px 10px color-mix(in srgb, var(--pure-white) 45%, transparent),
    0 12px 26px color-mix(in srgb, var(--orb-color) 55%, transparent);
}

/* Create mode: pure 3D candy orbs, zero text clutter */
.hero-section:not(.is-room-view) .grape-label,
.hero-section:not(.is-room-view) .grape-sub {
  display: none;
}

/* Room mode: unlit buds dimmed & hide .grape-sub completely; lit grapes glow with sender nickname */
.is-room-view .grape-node:not(.is-filled) .grape-orb {
  opacity: 0.42;
  box-shadow:
    inset -4px -6px 12px color-mix(in srgb, var(--void) 60%, transparent),
    inset 2px 3px 8px color-mix(in srgb, var(--pure-white) 22%, transparent),
    0 4px 12px color-mix(in srgb, var(--void) 28%, transparent);
}

[data-bunch-stage][data-golden-vine="1"] .grape-node:not(.is-filled) .grape-orb {
  opacity: 0.6;
  box-shadow:
    0 0 0 1.4px color-mix(in srgb, var(--gold) 52%, transparent),
    inset -4px -6px 12px color-mix(in srgb, var(--void) 50%, transparent);
}

.is-room-view .grape-node:not(.is-filled):hover .grape-orb,
.is-room-view .grape-node:not(.is-filled).is-selected .grape-orb {
  opacity: 0.86;
}

.is-room-view .grape-node:not(.is-filled) .grape-sub {
  display: none !important;
}

.is-room-view .grape-node.is-filled .grape-orb {
  opacity: 1;
  box-shadow:
    0 0 0 2.2px var(--gold),
    inset -5px -7px 14px color-mix(in srgb, var(--void) 42%, transparent),
    inset 3px 4px 10px color-mix(in srgb, var(--pure-white) 48%, transparent),
    0 0 24px color-mix(in srgb, var(--orb-color) 62%, color-mix(in srgb, var(--gold) 28%, transparent));
}

.grape-label {
  position: relative;
  z-index: 1;
  font-size: var(--step-xs);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--ink);
  text-shadow: 0 1px 4px color-mix(in srgb, var(--void) 88%, transparent);
  font-variant-numeric: tabular-nums;
}

.grape-count-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background-color: var(--gold);
  border: 1.5px solid var(--bg);
  color: var(--bg);
  font-size: var(--step-xs);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.grape-sub {
  margin-top: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background-color: color-mix(in srgb, var(--bg) 72%, transparent);
  font-size: var(--step-xs);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Typography & Hero Head */
.hero-head {
  max-width: 520px;
  margin: 0 auto 20px;
}

.is-room-view .hero-head {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-head h1,
.pricing-hero h1,
.code-card h1,
.doc-header h1,
.not-found-card h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero-lead {
  margin: 0;
  color: var(--muted);
  font-size: var(--step-lg);
  line-height: 1.48;
}

.stage-alert {
  width: 100%;
  max-width: 520px;
  margin: 0 auto 14px;
  padding: 11px 16px;
  border-radius: 14px;
  border: 1px solid var(--ruby);
  background-color: var(--ruby-soft);
  color: var(--ink);
  font-size: var(--step-sm);
  font-weight: 600;
}

/* Frameless Create Form */
.panel-create {
  width: 100%;
  max-width: 540px;
}

.create-inline-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.create-pill-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 999px;
  background-color: var(--glass-strong);
  border: 1px solid var(--border);
}

.create-pill-row .create-name-input,
.create-name-input {
  width: auto;
  flex: 1 1 0%;
  min-width: 0;
  border: none !important;
  background: transparent !important;
  padding: 10px 16px !important;
}

.create-pill-row .btn-primary {
  flex: 0 0 auto;
  flex-shrink: 0;
}

.create-name-input:focus {
  outline: none !important;
}

.create-pill-row:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 24%, transparent);
}

.create-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  font-size: var(--step-sm);
  color: var(--muted);
}

.quiet-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  cursor: pointer;
  color: var(--muted);
}

.quiet-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.hero-sub-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quiet-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.quiet-link:hover {
  color: var(--gold);
}

.dot-sep {
  opacity: 0.5;
}

/* On-Demand Inspector & Unlock Strip (hidden by default) */
.grape-inspector,
.unlock-ladder {
  width: 100%;
  max-width: 520px;
  text-align: left;
  padding: 12px 16px;
  border-radius: 16px;
  background-color: var(--glass-strong);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.grape-inspector {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inspector-main {
  flex: 1 1 200px;
}

.inspector-title {
  display: block;
  font-size: var(--step-sm);
  color: var(--gold);
  margin-bottom: 2px;
}

.inspector-body {
  margin: 0;
  font-size: var(--step-sm);
  color: var(--ink);
  word-break: break-word;
}

.inspector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inspector-wish-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.inspector-wish-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background-color: color-mix(in srgb, var(--bg) 52%, transparent);
  border: 1px solid var(--border-soft);
}

.inspector-wish-copy {
  flex: 1 1 180px;
}

.inspector-wish-sender {
  display: block;
  font-size: var(--step-xs);
  font-weight: 700;
  color: var(--gold);
}

.inspector-wish-text {
  margin: 2px 0 0;
  font-size: var(--step-sm);
  color: var(--ink);
  word-break: break-word;
}

.ladder-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: var(--step-sm);
  font-variant-numeric: tabular-nums;
}

.ladder-title {
  font-weight: 700;
  color: var(--ink);
}

.ladder-wave {
  color: var(--gold);
  font-weight: 600;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.level-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background-color: var(--glass);
  color: var(--muted);
  font-size: var(--step-xs);
  font-weight: 700;
}

.level-pill.is-unlocked {
  border-color: var(--gold);
  background-color: var(--gold-soft);
  color: var(--gold);
}

/* Room & Spawned Panels */
.panel-room,
.panel-spawned {
  width: 100%;
  max-width: 540px;
  text-align: left;
  padding: 20px;
  border-radius: 22px;
  background-color: var(--glass);
  border: 1px solid var(--border);
}

.room-header {
  text-align: center;
  margin-bottom: 12px;
}

.room-code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}

.room-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.2;
}

.code-pill,
.owner-pill,
.lock-pill,
.spawn-badge,
.mutual-badge,
.sparkles-chip,
.trust-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: var(--step-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.code-pill {
  background-color: var(--gold-soft);
  border: 1px solid var(--gold);
  color: var(--gold);
  letter-spacing: 0.08em;
}

.owner-pill {
  background-color: var(--emerald-soft);
  border: 1px solid var(--emerald);
  color: var(--ink);
}

.lock-pill {
  background-color: var(--glass-strong);
  border: 1px solid var(--border);
  color: var(--muted);
}

.sparkles-chip {
  background-color: var(--gold-soft);
  border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
  color: var(--gold);
  gap: 4px;
}

.trust-pill {
  margin: 0 0 12px;
  padding: 6px 14px;
  background-color: var(--emerald-soft);
  border: 1px solid color-mix(in srgb, var(--emerald) 55%, transparent);
  color: var(--ink);
}

.room-share-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0 8px;
}

.panel-room.is-empty-owner .room-share-bar {
  grid-template-columns: 1fr;
}

/* Compact Room Perk Pills Bar */
.room-perk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 8px 0 10px;
}

.perk-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background-color: var(--glass-strong);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--step-xs);
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  line-height: 1.25;
  white-space: normal;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.perk-pill:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.perk-pill--gold {
  border-color: color-mix(in srgb, var(--gold) 65%, transparent);
  background-color: var(--gold-soft);
  color: var(--gold);
}

.upsell-strip {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--gold) 52%, transparent);
  background-color: color-mix(in srgb, var(--gold) 10%, var(--surface-1));
}

.upsell-copy {
  margin: 0 0 8px;
  font-size: var(--step-sm);
  color: var(--ink);
  line-height: 1.42;
}

.upsell-quick-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Payment Status Banners & Balance Bars */
.gf-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background-color: var(--surface-1);
  color: var(--ink);
  font-size: var(--step-sm);
}

.gf-banner--paid {
  border-color: var(--emerald);
  background-color: var(--emerald-soft);
}

.gf-banner--pending {
  border-color: var(--gold);
  background-color: var(--gold-soft);
}

.gf-banner--error {
  border-color: var(--ruby);
  background-color: var(--ruby-soft);
}

.sparkles-balance-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
  margin-top: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent);
  background-color: var(--glass-strong);
  font-size: var(--step-sm);
}

.balance-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Inputs & Buttons (>= 44px touch targets) */
.sub-heading {
  margin: 0 0 10px;
  font-size: var(--step-md);
  font-weight: 700;
}

.bunch-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wish-form {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.form-two-col {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
}

.field-label {
  display: block;
  margin-bottom: 4px;
  font-size: var(--step-sm);
  font-weight: 600;
  color: var(--ink);
}

.text-input,
.select-input,
.textarea-input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background-color: var(--input-bg);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--step-md);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.select-input {
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 30px 10px 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23C9BFE0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.textarea-input {
  min-height: 82px;
  resize: vertical;
}

.text-input:focus,
.select-input:focus,
.textarea-input:focus,
.code-slot-input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 12px;
  background-color: var(--glass);
  border: 1px solid transparent;
  font-size: var(--step-sm);
  color: var(--ink);
  cursor: pointer;
}

.check-row-highlight {
  border-color: color-mix(in srgb, var(--gold) 42%, transparent);
  background-color: color-mix(in srgb, var(--gold) 10%, transparent);
}

.check-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
  flex-shrink: 0;
}

.turnstile-slot {
  display: flex;
  justify-content: center;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  min-width: 44px;
  padding: 10px 20px;
  border-radius: 14px;
  font-family: inherit;
  font-size: var(--step-md);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.btn-pill {
  border-radius: 999px;
}

.btn-primary {
  border: 1px solid var(--gold);
  background-color: var(--gold);
  color: var(--bg);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--gold) 26%, transparent);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  opacity: 0.95;
}

.btn-secondary {
  border: 1px solid var(--border);
  background-color: var(--glass-strong);
  color: var(--ink);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--gold);
}

.btn-secondary.is-danger {
  border-color: var(--ruby);
}

.btn-ghost {
  border: 1px solid transparent;
  background-color: transparent;
  color: var(--muted);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--ink);
  background-color: var(--glass-strong);
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-ghost:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
}

.btn-compact {
  min-height: 44px;
  padding: 8px 12px;
  font-size: var(--step-sm);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background-color: var(--glass);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--gold);
}

.self-wish-toggle {
  margin-top: 4px;
  font-size: var(--step-sm);
}

.room-foot-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: var(--step-sm);
  text-decoration: underline;
  cursor: pointer;
}

.text-btn:hover {
  color: var(--gold);
}

.inline-feedback {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background-color: var(--emerald-soft);
  border: 1px solid var(--emerald);
  color: var(--ink);
  font-size: var(--step-sm);
  font-weight: 600;
}

.inline-feedback.is-error {
  background-color: var(--ruby-soft);
  border-color: var(--ruby);
}

.panel-spawned {
  text-align: center;
}

.spawn-badge {
  background-color: var(--emerald-soft);
  border: 1px solid var(--emerald);
  color: var(--ink);
  margin-bottom: 8px;
}

.spawn-code-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px;
  margin: 12px 0 14px;
  border-radius: 18px;
  background-color: var(--input-bg);
  border: 1px solid var(--gold);
}

.spawn-code-label {
  font-size: var(--step-sm);
  color: var(--muted);
}

.spawn-code-value {
  font-size: 2rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.mutual-badge {
  background-color: var(--violet-soft);
  border: 1px solid var(--violet);
  color: var(--ink);
}

.spawn-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.post-wish-relay {
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.relay-mini-title {
  margin: 0 0 8px;
  font-size: var(--step-sm);
  font-weight: 700;
  color: var(--gold);
}

.relay-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.relay-pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px 12px;
  border-radius: 999px;
  background-color: var(--glass);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  font-size: var(--step-sm);
}

/* 3-Column Frameless Hairline Steps */
.steps-section {
  padding: 20px 0 26px;
}

.hairline-steps {
  list-style: none;
  margin: 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--border-soft);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.hairline-step {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--gold-soft);
  color: var(--gold);
  font-size: var(--step-xs);
  font-weight: 800;
  margin-bottom: 2px;
}

.step-title {
  font-size: var(--step-md);
  font-weight: 700;
  color: var(--ink);
}

.step-desc {
  margin: 0;
  font-size: var(--step-sm);
  color: var(--muted);
  line-height: 1.45;
}

/* Minimalist Glowing-Dot 12-Chime Stage */
.timer-section {
  padding: 18px 0;
}

.chime-stage {
  padding: 22px 20px;
  border-radius: 26px;
  background-color: var(--glass);
  border: 1px solid var(--border-soft);
  text-align: center;
}

.timer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.section-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  color: var(--ink);
}

.timer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.timer-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mode-pill {
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background-color: var(--glass);
  color: var(--muted);
  font-family: inherit;
  font-size: var(--step-xs);
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.mode-pill.is-active {
  border-color: var(--gold);
  background-color: var(--gold-soft);
  color: var(--ink);
}

.timer-readout-wrap {
  margin-bottom: 16px;
}

.timer-phase {
  font-size: var(--step-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gold);
  margin-bottom: 2px;
}

.timer-clock {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.timer-chime-counter {
  font-size: var(--step-sm);
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.chime-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 auto 18px;
}

.chime-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: color-mix(in srgb, var(--ink) 16%, transparent);
  box-shadow: inset 0 1px 3px color-mix(in srgb, var(--pure-white) 25%, transparent);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease, box-shadow 0.2s ease;
}

.chime-dot.is-ringing {
  background-color: var(--gold);
  box-shadow: 0 0 14px var(--gold);
  transform: scale(1.32);
}

.chime-dot.is-eaten {
  background-color: var(--emerald);
  box-shadow: 0 0 12px color-mix(in srgb, var(--emerald) 65%, transparent);
}

.timer-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* Single-Row Capsule Public Pool Bar */
.pool-section {
  padding: 12px 0 18px;
}

.pool-capsule-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background-color: var(--glass);
  border: 1px solid var(--border-soft);
}

.pool-bar-tag {
  font-size: var(--step-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  padding-left: 6px;
  white-space: nowrap;
}

.pool-pills-row,
.pool-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
}

.pool-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  background-color: var(--glass-strong);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  font-size: var(--step-xs);
  font-weight: 600;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.pool-pill:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.pool-pill-code {
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

.pool-pill-count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pool-empty-note {
  margin: 0;
  font-size: var(--step-sm);
  color: var(--muted);
}

/* Hairline Minimalist FAQ */
.faq-section {
  padding: 20px 0 20px;
}

.faq-heading {
  margin-bottom: 10px;
}

.faq-list {
  border-top: 1px solid var(--border-soft);
}

.faq-item {
  border-bottom: 1px solid var(--border-soft);
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 12px 2px;
  font-size: var(--step-md);
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::after {
  content: "+";
  color: var(--gold);
  font-size: var(--step-lg);
  font-weight: 600;
  margin-left: 12px;
}

.faq-item[open] .faq-q::after {
  content: "−";
}

.faq-a {
  padding: 0 2px 14px;
  color: var(--muted);
  font-size: var(--step-sm);
  line-height: 1.5;
}

.faq-a p {
  margin: 0;
}

/* Auxiliary Pages (/code, /pricing, /fortune, /12-grapes-tradition, /about, legal, 404) */
.card {
  background-color: color-mix(in srgb, var(--surface-1) 72%, transparent);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
}

.code-entry-section,
.pricing-section,
.fortune-section,
.doc-shell {
  padding: 20px 0 40px;
}

.pricing-hero {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 26px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.pricing-tier {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.pricing-tier--featured {
  border-color: var(--gold);
  background-color: color-mix(in srgb, var(--surface-2) 78%, transparent);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--gold) 14%, transparent);
}

.tier-badges-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background-color: var(--glass-strong);
  color: var(--muted);
  font-size: var(--step-xs);
  font-weight: 700;
}

.tier-badge--gold {
  border-color: var(--gold);
  background-color: var(--gold-soft);
  color: var(--gold);
}

.tier-name,
.module-title {
  margin: 6px 0 8px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--ink);
}

.tier-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.tier-price {
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 1;
  color: var(--ink);
}

.price-original {
  font-size: var(--step-md);
  color: var(--muted);
  text-decoration: line-through;
  opacity: 0.78;
}

.price-discount {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background-color: var(--emerald-soft);
  border: 1px solid color-mix(in srgb, var(--emerald) 55%, transparent);
  color: var(--ink);
  font-size: var(--step-xs);
  font-weight: 700;
}

.tier-sub,
.tier-desc {
  margin: 0;
  color: var(--muted);
  font-size: var(--step-sm);
  line-height: 1.48;
}

.tier-features {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink);
  font-size: var(--step-sm);
}

.pay-btn-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 8px;
  width: 100%;
}

.pay-btn {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  font-size: var(--step-sm);
}

.pay-micro-note {
  margin: 8px 0 0;
  text-align: center;
  font-size: var(--step-xs);
  color: var(--muted);
}

.unlocks-strip,
.restore-box,
.bunch-bind-bar,
.topup-section {
  margin-bottom: 24px;
}

.unlocks-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.unlock-item,
.pack-box,
.clue-tile {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background-color: var(--glass);
}

.unlock-head,
.pack-box-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.unlock-title,
.pack-box-title {
  font-size: var(--step-sm);
  color: var(--ink);
}

.pack-box-title {
  display: block;
  margin-top: 4px;
}

.pack-box-price {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--gold);
}

.pack-box-note,
.unlock-detail {
  margin: 0 0 8px;
  font-size: var(--step-xs);
  color: var(--muted);
  line-height: 1.45;
}

.unlock-detail {
  margin-bottom: 0;
}

.restore-form,
.bind-input-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.restore-email-input {
  flex: 1 1 240px;
}

.code-inline-input {
  flex: 1 1 180px;
  letter-spacing: 0.1em;
  font-weight: 800;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.bind-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.fortune-modules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.fortune-module {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.poster-preview-frame {
  width: 100%;
  max-width: 248px;
  margin: 6px auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent);
  background-color: var(--bg);
}

.poster-placeholder {
  padding: 28px 16px;
  text-align: center;
  font-size: var(--step-sm);
  color: var(--muted);
}

.poster-placeholder strong {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
}

.poster-placeholder p {
  margin: 0;
  font-size: var(--step-xs);
}

.tab-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0;
}

.gift-badge-preview-wrap {
  display: flex;
  justify-content: center;
  padding: 6px 0;
}

.topup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.code-shell {
  max-width: 720px;
}

.code-card {
  text-align: center;
  margin-bottom: 24px;
}

.code-slots {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  max-width: 400px;
  margin: 18px auto 10px;
}

.code-slot-input {
  width: 100%;
  height: 56px;
  border-radius: 14px;
  border: 1.5px solid color-mix(in srgb, var(--ink) 20%, transparent);
  background-color: var(--input-bg);
  color: var(--gold);
  text-align: center;
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.code-hint {
  margin: 0 0 14px;
  font-size: var(--step-sm);
  color: var(--muted);
}

.code-alt-row {
  margin-top: 10px;
}

.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-subcopy {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--step-sm);
}

.recent-bunches-wrap,
.pool-section-inline {
  margin-bottom: 24px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: var(--step-sm);
  color: var(--muted);
}

.doc-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.doc-lead,
.doc-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: var(--step-md);
}

.prose h2 {
  margin: 26px 0 10px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--ink);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin: 18px 0 8px;
  font-size: var(--step-lg);
  color: var(--gold);
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: var(--step-md);
}

.prose strong {
  color: var(--ink);
}

.prose a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--pure-white);
}

.not-found-card {
  text-align: center;
  padding: 36px 20px;
}

.not-found-code {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

/* Modals (Story, Golden Vine, Clue, Luxury Wrap) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background-color: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(10px);
}

.modal-sheet {
  width: 100%;
  max-width: 410px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 24px;
  background-color: var(--surface-1);
  border: 1px solid var(--gold);
  padding: 16px;
}

.modal-sheet--wide {
  max-width: 460px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-lg);
}

.modal-subcopy {
  margin: 0 0 12px;
  font-size: var(--step-sm);
  color: var(--muted);
  line-height: 1.45;
}

.modal-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background-color: var(--glass-strong);
  color: var(--ink);
  cursor: pointer;
}

.modal-topup-wrap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.modal-topup-title {
  margin: 0 0 8px;
  font-size: var(--step-xs);
  font-weight: 700;
  color: var(--gold);
}

.modal-pack-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.clue-tile {
  text-align: center;
  padding: 10px 8px;
}

.clue-label {
  display: block;
  font-size: var(--step-xs);
  color: var(--muted);
  margin-bottom: 3px;
}

.clue-value {
  display: block;
  font-size: var(--step-sm);
  color: var(--gold);
}

.story-preview-wrap {
  width: 100%;
  max-width: 236px;
  margin: 0 auto 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: var(--bg);
}

.story-preview-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Quiet Minimalist Footer & Consent */
.site-footer {
  margin-top: 12px;
  padding: 24px 0 28px;
  border-top: 1px solid var(--border-soft);
  background: transparent;
}

.footer-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 14px;
}

.footer-brand-wrap {
  max-width: 380px;
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: var(--step-md);
  margin-bottom: 4px;
}

.footer-disclaimer {
  margin: 0;
  font-size: var(--step-xs);
  color: var(--muted);
  line-height: 1.45;
}

.footer-nav-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  font-size: var(--step-xs);
  font-weight: 600;
}

.footer-link:hover {
  color: var(--gold);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 7%, transparent);
  font-size: var(--step-xs);
  color: var(--muted);
}

.footer-meta,
.footer-relays {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.footer-relay-link {
  color: var(--gold);
}

.footer-consent-btn {
  min-height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: var(--step-xs);
  cursor: pointer;
}

.consent-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 160;
}

.consent-card {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 18px;
  background-color: var(--surface-1);
  border: 1px solid var(--gold);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--void) 58%, transparent);
}

.consent-copy {
  flex: 1 1 300px;
}

.consent-title {
  margin: 0 0 4px;
  font-size: var(--step-md);
  font-weight: 700;
  color: var(--ink);
}

.consent-desc {
  margin: 0;
  font-size: var(--step-sm);
  color: var(--muted);
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.consent-btn {
  font-size: var(--step-sm);
}

@media (min-width: 769px) {
  .room-perk-bar {
    flex-wrap: nowrap;
    gap: 5px;
  }

  .perk-pill {
    min-height: 40px;
    padding: 6px 9px;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .select-input {
    font-size: 0.875rem;
  }
}

@media (max-width: 768px) {
  .form-two-col {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .room-perk-bar {
    flex-wrap: wrap;
    gap: 6px;
  }

  .perk-pill {
    min-height: 44px;
    padding: 6px 12px;
    font-size: var(--step-xs);
    white-space: normal;
  }
}

/* Mobile Responsive Layout (390x844 & 375px Zero Overflow & Compact Rhythm) */
@media (max-width: 720px) {
  .shell {
    padding: 0 14px;
  }

  .header-inner {
    flex-wrap: wrap;
    min-height: 52px;
    gap: 4px;
    padding-top: 2px;
    padding-bottom: 2px;
  }

  .brand {
    font-size: var(--step-sm);
    gap: 5px;
  }

  .brand .gf-site-icon {
    width: 22px;
    height: 22px;
  }

  .header-actions {
    gap: 2px;
  }

  .header-code-link {
    padding: 0 6px;
    font-size: var(--step-xs);
  }

  .lang-switch {
    min-width: 0;
    padding: 0 8px;
    font-size: var(--step-xs);
  }

  .hero-section {
    padding: 4px 0 24px;
  }

  .grape-cluster {
    max-width: 264px;
    gap: 6px 4px;
    margin-bottom: 14px;
  }

  .grape-node {
    min-width: 44px;
    min-height: 50px;
  }

  .grape-orb {
    width: 47px;
    height: 47px;
  }

  .hero-head {
    margin-bottom: 16px;
  }

  .hero-head h1,
  .pricing-hero h1 {
    font-size: 1.85rem;
  }

  .hero-lead {
    font-size: var(--step-md);
  }

  .create-pill-row {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    border: none;
    background: transparent;
    gap: 10px;
  }

  .create-pill-row .create-name-input,
  .create-name-input {
    width: 100%;
    flex: none;
    border: 1px solid var(--border) !important;
    background-color: var(--glass-strong) !important;
    border-radius: 999px !important;
    text-align: center;
  }

  .create-pill-row .btn-primary {
    width: 100%;
  }

  .hairline-steps,
  .form-two-col,
  .room-share-bar,
  .relay-mini-grid,
  .pricing-grid,
  .unlocks-grid,
  .fortune-modules-grid,
  .topup-grid,
  .clue-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .timer-top {
    flex-direction: column;
    align-items: center;
  }

  .pool-capsule-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    row-gap: 10px;
    column-gap: 10px;
    border-radius: 20px;
    padding: 12px 14px;
  }

  .pool-bar-tag {
    grid-column: 1;
    grid-row: 1;
    padding-left: 0;
  }

  .pool-capsule-bar [data-refresh-pool] {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .pool-pills-row {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .code-slots {
    gap: 6px;
  }

  .code-slot-input {
    height: 50px;
    font-size: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
