:root {
  --bg: #070A18;
  --sky: #050816;
  --surface: #0E1328;
  --surface-2: #121933;
  --line: #1E2643;
  --line-2: #2A3458;
  --text: #F4EFE3;
  --text-2: #C3C8DC;
  --muted: #A3AAC4;
  --accent: #FFD36E;
  --on-accent: #1A1405;
  --danger: #FFB4A8;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
a:hover { color: #FFE29A; }
button, input, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, canvas:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}
::placeholder { color: #7880A0; }
[hidden] { display: none !important; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 18px; } }

.display { font-family: 'Space Grotesk', Inter, sans-serif; }
.hand { font-family: Caveat, cursive; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 14px; border: none;
  font-weight: 600; font-size: 16px; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 24px rgba(255, 211, 110, 0.25); }
.btn-primary:hover { background: #FFE08F; color: var(--on-accent); }
.btn-primary[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn-secondary { background: rgba(255, 255, 255, 0.04); color: var(--text); border: 1px solid #333D63; font-weight: 500; min-height: 44px; padding: 10px 18px; font-size: 15px; }
.btn-secondary:hover { border-color: #4D5886; color: var(--text); }
.btn-link { background: none; border: none; color: var(--muted); text-decoration: underline; padding: 10px 0; min-height: 44px; cursor: pointer; font-size: 15px; }
.btn-big { min-height: 54px; padding: 14px 26px; font-size: 17px; }

/* header */
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 19px; min-height: 44px; }
.logo:hover { color: var(--text); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.nav a:not(.btn) { color: var(--text-2); text-decoration: none; font-size: 15px; }
.nav .btn { min-height: 44px; padding: 10px 20px; font-size: 15px; }

/* hero */
.hero { padding-top: 40px; padding-bottom: 28px; display: flex; flex-direction: column; gap: 24px; }
.hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hero h1 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(44px, 7vw, 88px); line-height: 1; letter-spacing: -0.025em; max-width: 13ch; }
.hero .lead { margin: 0; font-size: 19px; color: var(--text-2); max-width: 44rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { display: flex; flex-wrap: wrap; gap: 14px; max-width: 820px; }
.stat { flex: 1 1 190px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; display: flex; flex-direction: column; gap: 2px; }
.stat .label { font-size: 13px; color: var(--muted); }
.stat .value { font-family: 'Space Grotesk', sans-serif; font-size: 30px; font-weight: 700; }
.stat .value.accent { color: var(--accent); }

.live-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); border: 1px solid #2E3760; border-radius: 999px; padding: 6px 12px; background: rgba(255, 255, 255, 0.04); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #7FD9B5; box-shadow: 0 0 0 0 rgba(127, 217, 181, 0.6); animation: live 2s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(127, 217, 181, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(127, 217, 181, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 217, 181, 0); } }

.notice { margin: 0; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 18px; color: var(--text-2); }

/* North Star */
.north-star { position: relative; background: var(--surface-2); border: 1px solid rgba(255, 211, 110, 0.55); border-radius: var(--radius); padding: 22px 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 22px; box-shadow: 0 0 40px rgba(255, 211, 110, 0.08); }
.north-icon { flex: none; filter: drop-shadow(0 0 10px rgba(255, 211, 110, 0.85)); }
.north-star .body { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.north-star .text { margin: 0; font-family: Caveat, cursive; font-weight: 700; font-size: 38px; line-height: 1.1; overflow-wrap: anywhere; }
.north-star .by { margin: 0; color: var(--muted); font-size: 15px; }
.north-star .side { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.north-star .bid { margin: 0; font-size: 14px; color: var(--muted); }
.north-star .bid strong { color: var(--text); font-size: 24px; font-family: 'Space Grotesk', sans-serif; margin-left: 6px; }

/* sky + panel */
.wall-section { padding-top: 20px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 20px; }
.wall-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.wall-card { flex: 999 1 560px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.wall-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.wall-head h2 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 24px; }
.wall-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid #333D63; background: rgba(255, 255, 255, 0.03); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { border-color: #4D5886; }
.find { display: flex; gap: 8px; align-items: center; }
.find input { width: 110px; }
.wall-scroll { overflow: auto; max-height: 72vh; border-radius: 14px; background: var(--sky); -webkit-overflow-scrolling: touch; }
.wall-scroll canvas { display: block; margin: 0 auto; cursor: pointer; touch-action: manipulation; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.lg { display: inline-block; border-radius: 50%; }
.lg-empty { width: 4px; height: 4px; background: #39426A; margin: 0 5px; }
.lg-star { width: 8px; height: 8px; background: #7FB6F5; box-shadow: 0 0 8px 2px rgba(127, 182, 245, 0.7); margin: 0 3px; }
.lg-faint { width: 6px; height: 6px; background: #8E95B5; opacity: 0.6; margin: 0 4px; }
.lg-mine { width: 14px; height: 14px; border: 1.5px solid var(--accent); position: relative; }
.lg-mine::after { content: ''; position: absolute; left: 3px; top: 3px; width: 5px; height: 5px; border-radius: 50%; background: #F28DA8; }

.panel { flex: 1 1 320px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 16px; align-self: flex-start; }
.panel h3 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 22px; }
.panel p { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-size: 13px; color: var(--text-2); }
.input, .textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line-2);
  border-radius: 12px; padding: 12px 14px; font-size: 16px; min-height: 48px;
}
.textarea { font-family: Caveat, cursive; font-weight: 600; font-size: 27px; line-height: 1.2; resize: vertical; padding: 10px 14px; }
.counter { font-size: 12px; color: var(--muted); align-self: flex-end; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 44px; height: 44px; border-radius: 999px; padding: 0; cursor: pointer; border: 3px solid var(--surface); }
.swatch[aria-pressed="true"] { border-color: #FFFFFF; }
.box { background: var(--bg); border: 1px solid var(--line-2); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.box .textarea { background: var(--surface); font-size: 24px; }
.add-btn { background: transparent; color: var(--text); border: 1px dashed #46517D; border-radius: 14px; padding: 14px 16px; min-height: 52px; font-size: 15px; font-weight: 500; cursor: pointer; text-align: left; }
.add-btn:hover { border-color: #6873A3; }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 1px solid var(--line-2); padding-top: 12px; font-size: 17px; }
.total strong { font-family: 'Space Grotesk', sans-serif; font-size: 22px; }
.error { color: var(--danger); font-size: 14px; }
.wish-text { font-family: Caveat, cursive; font-weight: 700; font-size: 36px; line-height: 1.12; overflow-wrap: anywhere; }
.pill { font-size: 13px; color: var(--text-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 12px; align-self: flex-start; }

/* sections */
.section { padding-top: 48px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 24px; }
.section h2 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.01em; }
.steps { display: flex; flex-wrap: wrap; gap: 16px; }
.step { flex: 1 1 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.step .num { font-family: 'Space Grotesk', sans-serif; font-size: 32px; font-weight: 700; color: var(--accent); }
.step h3 { margin: 0; font-size: 19px; font-weight: 600; }
.step p { margin: 0; color: var(--text-2); font-size: 15px; }
.faq { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; }
.faq summary { font-weight: 600; font-size: 17px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { margin: 12px 0 0; color: var(--text-2); }

.site-footer { border-top: 1px solid #161D38; }
.site-footer .wrap { padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--muted); }

@media (max-width: 640px) {
  .hero { padding-top: 20px; gap: 18px; }
  .hero .lead { font-size: 17px; }
  .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 12px; border-radius: 14px; }
  .stat .label { font-size: 11px; }
  .stat .value { font-size: 20px; }
  .north-star { padding: 18px; }
  .north-star .text { font-size: 32px; }
  .wall-card, .panel { padding: 16px; }
}

/* sticky "make a wish" bar on phones */
.mobile-cta { display: none; }
@media (max-width: 899px) {
  .desktop-only { display: none !important; }
  .mobile-cta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
    padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
    background: rgba(7, 10, 24, 0.94); border-top: 1px solid rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  .mobile-cta .btn { width: 100%; min-height: 54px; font-size: 17px; }
  body { padding-bottom: 92px; }
  body.panel-busy .mobile-cta { display: none; }
  body.panel-busy { padding-bottom: 0; }
}

/* success page */
.share-card { position: relative; background: var(--bg); border: 1px solid rgba(255, 211, 110, 0.6); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 0 50px rgba(255, 211, 110, 0.12); }
.page-narrow { max-width: 680px; margin: 0 auto; padding: 40px 24px 72px; display: flex; flex-direction: column; gap: 20px; }
.page-narrow h1 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: clamp(32px, 5vw, 48px); line-height: 1.05; }
.legal h2 { font-family: 'Space Grotesk', sans-serif; font-size: 22px; margin: 24px 0 0; }
.legal p, .legal li { color: var(--text-2); }

.falling-star { position: fixed; left: 0; top: 0; width: 10px; height: 10px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 0 16px 6px rgba(255, 211, 110, 0.9), 0 0 40px 12px rgba(255, 211, 110, 0.35); pointer-events: none; z-index: 20; }
.falling-star::after { content: ''; position: absolute; right: 5px; top: 4px; width: 160px; height: 2px; transform-origin: right center; transform: rotate(var(--trail-angle, 0deg)); background: linear-gradient(to left, rgba(255, 233, 170, 0.95), rgba(255, 211, 110, 0)); border-radius: 2px; }
.reveal { animation: reveal 0.7s ease-out both; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.flash { animation: flash 1.2s ease-out both; }
@keyframes flash { 0% { box-shadow: 0 0 0 rgba(255, 211, 110, 0); } 25% { box-shadow: 0 0 90px rgba(255, 211, 110, 0.55); } 100% { box-shadow: 0 0 50px rgba(255, 211, 110, 0.12); } }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1A2240; color: var(--text); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 18px; z-index: 10; max-width: calc(100% - 32px); }
@media (max-width: 899px) { .toast { bottom: 104px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live-dot, .reveal, .flash { animation: none; }
}

/* Bot check: invisible unless Cloudflare asks the visitor to tick a box */
.ts-box:empty { display: none; }
.ts-box { min-height: 0; }
