* { box-sizing: border-box; }

html { min-height: 100%; background: var(--night-950); }

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  color: var(--cream-50);
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at 17% 12%, rgb(255 245 207 / 70%) 0 1px, transparent 1.5px),
    radial-gradient(circle at 82% 8%, rgb(255 255 255 / 46%) 0 1px, transparent 1.5px),
    radial-gradient(circle at 71% 42%, rgb(255 245 207 / 40%) 0 1px, transparent 2px),
    radial-gradient(circle at 25% 70%, rgb(255 255 255 / 36%) 0 1px, transparent 1.5px),
    linear-gradient(155deg, var(--night-950), var(--night-800) 58%, #18392c);
  background-attachment: fixed;
  background-size: 17rem 19rem, 23rem 17rem, 29rem 31rem, 37rem 27rem, auto;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--moon-200);
  outline-offset: 3px;
}

.app-shell { position: relative; z-index: 1; width: min(100%, 68rem); margin: 0 auto; padding: 1rem clamp(1rem, 4vw, 2.5rem) 6rem; }
.topbar { min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-size: .75rem; font-weight: 800; letter-spacing: .15em; }
.brand img { width: 2.75rem; height: 2.75rem; border: 1px solid var(--line); border-radius: 50%; object-fit: cover; }
.icon-link { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; text-decoration: none; background: rgb(255 255 255 / 4%); }

.channel-prompt { position: relative; margin: .5rem 0 1.5rem; padding: 1rem; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; overflow: hidden; border: 1px solid rgb(245 223 160 / 20%); border-radius: var(--radius-md); background: linear-gradient(120deg, rgb(245 223 160 / 10%), rgb(255 255 255 / 3%) 58%, rgb(80 137 105 / 8%)); box-shadow: 0 .8rem 2.5rem rgb(0 0 0 / 12%); }
.channel-prompt::after { content: ""; position: absolute; width: 8rem; aspect-ratio: 1; right: -4rem; top: -5rem; border-radius: 50%; background: rgb(245 223 160 / 9%); box-shadow: 0 0 3rem rgb(245 223 160 / 12%); pointer-events: none; }
.channel-prompt__symbol { width: 3rem; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid rgb(245 223 160 / 24%); border-radius: 50%; color: var(--moon-100); background: rgb(245 223 160 / 8%); font-size: 1.45rem; }
.channel-prompt__eyebrow { margin: 0 0 .2rem; color: var(--moon-200); font-size: var(--type-caption); font-weight: 850; letter-spacing: .08em; }
.channel-prompt h2 { margin: 0; font-family: var(--font-serif); font-size: var(--type-body-lg); font-weight: 550; line-height: 1.45; word-break: keep-all; text-wrap: balance; }
.channel-prompt__copy > p:last-child { margin: .3rem 0 0; color: var(--mist-300); font-size: var(--type-label); line-height: 1.55; word-break: keep-all; overflow-wrap: anywhere; text-wrap: pretty; }
.channel-prompt__action { z-index: 1; display: grid; justify-items: center; gap: .35rem; }
.channel-prompt__action span { color: var(--mist-400); font-size: var(--type-caption); }

.customer-ambient-stars { position: fixed; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; }
.customer-ambient-stars i { position: absolute; width: .18rem; aspect-ratio: 1; border-radius: 50%; background: var(--moon-100); box-shadow: 0 0 .75rem var(--moon-100); animation: customer-star-shimmer 8s ease-in-out infinite alternate; }
.customer-ambient-stars i:nth-child(1) { top: 12%; left: 11%; animation-delay: -1s; animation-duration: 7.1s; }
.customer-ambient-stars i:nth-child(2) { top: 8%; right: 19%; animation-delay: -4s; animation-duration: 8.6s; }
.customer-ambient-stars i:nth-child(3) { top: 38%; left: 6%; animation-delay: -6s; animation-duration: 6.4s; }
.customer-ambient-stars i:nth-child(4) { top: 62%; right: 9%; animation-delay: -2s; animation-duration: 8.9s; }
.customer-ambient-stars i:nth-child(5) { bottom: 13%; left: 27%; animation-delay: -5s; animation-duration: 7.7s; }

.moon-hero { --pointer-x: 0px; --pointer-y: 0px; --scroll-y: 0px; position: relative; min-height: 29rem; display: grid; place-items: center; padding: 2.5rem 1rem 1.5rem; overflow: hidden; }
.moon-orbit { position: absolute; width: min(86vw, 34rem); aspect-ratio: 1; border: 1px solid rgb(255 250 240 / 10%); border-radius: 50%; transform: translate3d(var(--pointer-x), var(--pointer-y), 0) rotate(-16deg); animation: orbit-drift 72s ease-in-out infinite alternate; }
.moon-orbit::before, .moon-orbit::after { content: ""; position: absolute; width: .42rem; aspect-ratio: 1; border-radius: 50%; background: var(--moon-100); box-shadow: 0 0 1rem var(--moon-100); }
.moon-orbit::before { top: 10%; left: 20%; }
.moon-orbit::after { right: 4%; bottom: 30%; }
.moon-disc { position: absolute; width: min(72vw, 21rem); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 32% 27%, rgb(126 97 48 / 11%) 0 7%, transparent 8%), radial-gradient(circle at 68% 66%, rgb(126 97 48 / 10%) 0 12%, transparent 13%), var(--moon-100); box-shadow: 0 0 4rem rgb(255 229 143 / 22%), 0 0 9rem rgb(255 229 143 / 10%); transform: translate3d(var(--pointer-x), calc(var(--pointer-y) + var(--scroll-y)), 0); animation: customer-moon-breathe 11s ease-in-out infinite; }
.moon-copy { --scroll-y: 0px; z-index: 1; width: min(85%, 17rem); color: #203228; text-align: center; transform: translate3d(0, var(--scroll-y), 0); }
.moon-copy .kicker { margin: 0 0 .7rem; font-size: var(--type-body-sm); font-weight: 900; line-height: 1.45; letter-spacing: .02em; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
.moon-copy blockquote { margin: 0; font-family: var(--font-serif); font-size: clamp(1.1rem, 4vw, 1.38rem); line-height: 1.62; overflow-wrap: anywhere; word-break: keep-all; text-wrap: pretty; }
.moon-copy time { display: block; margin-top: 1rem; color: #587063; font-size: var(--type-label); }

.summary-row { --scroll-y: 0px; margin: -1rem auto 1.5rem; position: relative; width: min(100%, 40rem); display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius-md); background: rgb(6 16 15 / 72%); backdrop-filter: blur(1rem); box-shadow: var(--shadow); transform: translate3d(0, var(--scroll-y), 0); }
.summary-item { padding: 1rem .6rem; text-align: center; }
.summary-item + .summary-item { border-left: 1px solid var(--line); }
.summary-item strong { display: block; color: var(--moon-100); font-family: var(--font-serif); font-size: 1.45rem; }
.summary-item span { color: var(--mist-400); font-size: var(--type-label); }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 2.25rem 0 1rem; }
.section-head h1, .section-head h2 { margin: 0; font-family: var(--font-serif); font-weight: 500; letter-spacing: -.03em; }
.section-head h1 { font-size: var(--type-page-title); line-height: var(--leading-tight); word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
.section-head h2 { font-size: var(--type-title); line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
.section-head p { margin: .45rem 0 0; color: var(--mist-400); font-size: var(--type-body-sm); line-height: var(--leading-body); word-break: keep-all; overflow-wrap: anywhere; text-wrap: pretty; }

.button { min-height: 2.9rem; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .75rem 1rem; border: 1px solid transparent; border-radius: 999px; cursor: pointer; color: #13291e; background: var(--moon-100); font-weight: 850; text-decoration: none; }
.button.secondary { color: var(--cream-50); border-color: var(--line); background: rgb(255 255 255 / 5%); }
.button.danger { color: #321a17; background: #f0b8af; }
.button.small { min-height: 2.75rem; padding: .5rem .8rem; font-size: var(--type-body-sm); }
.button:disabled { cursor: not-allowed; opacity: .45; }

.wish-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: .85rem; }
.wish-card { position: relative; min-height: 11rem; padding: 1.2rem 1.2rem 10px; display: flex; flex-direction: column; gap: .75rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: linear-gradient(145deg, rgb(255 255 255 / 7%), rgb(255 255 255 / 2%)); box-shadow: 0 1rem 3rem rgb(0 0 0 / 10%); }
.wish-card__body { flex: 1; margin: 0; font-family: var(--font-serif); font-size: var(--type-body-lg); line-height: var(--leading-body); word-break: keep-all; overflow-wrap: anywhere; text-wrap: pretty; }
.wish-card__date { color: var(--mist-400); font-size: var(--type-label); line-height: 1.4; }
.wish-card__actions-row { position: relative; margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.wish-card__utility-actions { display: flex; align-items: center; gap: 0; margin-left: -.5rem; }
.wish-card__utility-action { min-width: 2.75rem; min-height: 2.75rem; padding: .5rem; border: 0; border-radius: .6rem; color: var(--mist-200); cursor: pointer; background: transparent; font-size: var(--type-body-sm); font-weight: 800; }
.wish-card__utility-action:hover { background: rgb(255 255 255 / 7%); }
.wish-card__utility-action--danger { color: var(--danger-300); }
.wish-card__action { width: auto; min-height: 2.75rem; padding: .55rem .9rem; border: 1px solid transparent; border-radius: 999px; cursor: pointer; font-size: var(--type-body-sm); font-weight: 850; }
.wish-card__actions-row > .wish-card__action:only-child { margin-left: auto; }
.wish-card__action--primary { color: var(--night-950); background: var(--moon-100); }
.wish-card__action--secondary { color: var(--moon-100); border-color: rgb(245 223 160 / 28%); background: rgb(255 245 207 / 5%); }
.wish-card button:disabled { cursor: not-allowed; opacity: .45; }

[data-motion-reveal][data-motion-observed] { opacity: 0; transform: translateY(6px); }
[data-motion-reveal][data-motion-visible="true"] { opacity: 1; transform: translateY(0); transition: opacity .55s ease, transform .55s cubic-bezier(.2, .8, .2, 1); }
[data-motion-reveal-mode="opacity"][data-motion-observed] { transform: none; }
[data-motion-reveal-mode="opacity"][data-motion-visible="true"] { opacity: 1; transform: none; transition: opacity .7s ease; }

[data-motion-paused] .moon-disc,
[data-motion-paused] .moon-orbit,
[data-motion-paused] .customer-ambient-stars i { animation-play-state: paused; }

@keyframes customer-moon-breathe {
  0%, 100% { scale: 1; filter: brightness(1); }
  50% { scale: 1.012; filter: brightness(1.03); }
}

@keyframes orbit-drift {
  from { rotate: -1deg; }
  to { rotate: 1deg; }
}

@keyframes customer-star-shimmer {
  from { opacity: .24; }
  to { opacity: .72; }
}

.empty-state { padding: 3rem 1.5rem; border: 1px dashed rgb(255 250 240 / 18%); border-radius: var(--radius-md); text-align: center; color: var(--mist-200); }
.empty-state .empty-stars { color: var(--moon-200); font-size: 1.7rem; letter-spacing: .6em; }
.empty-state h2 { margin: 1rem 0 .4rem; color: var(--cream-50); font-family: var(--font-serif); font-weight: 500; }
.empty-state p { max-width: 28rem; margin: 0 auto 1.2rem; color: var(--mist-400); line-height: var(--leading-body); word-break: keep-all; overflow-wrap: anywhere; text-wrap: pretty; }

.bottom-nav { position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; min-height: 4.7rem; display: flex; justify-content: center; border-top: 1px solid var(--line); background: rgb(6 16 15 / 90%); backdrop-filter: blur(1rem); }
.bottom-nav .inner { width: min(100%, 30rem); display: grid; grid-template-columns: repeat(3, 1fr); }
.bottom-nav a { min-height: 2.75rem; display: grid; place-items: center; align-content: center; gap: .2rem; color: var(--mist-400); font-size: var(--type-caption); line-height: 1.3; text-decoration: none; }
.bottom-nav a[aria-current="page"] { color: var(--moon-100); }
.bottom-nav b { font-size: 1rem; font-weight: 500; }

.onboarding { width: min(100%, 38rem); margin: 2rem auto; padding: clamp(1.2rem, 5vw, 2.4rem); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); box-shadow: var(--shadow); }
.onboarding h1 { margin: 0; font-family: var(--font-serif); font-size: clamp(1.75rem, 5.5vw, 2.25rem); font-weight: 500; line-height: 1.25; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
.onboarding > p { color: var(--mist-200); line-height: var(--leading-body); word-break: keep-all; overflow-wrap: anywhere; text-wrap: pretty; }
.channel-guide { position: relative; width: min(100%, 42rem); margin: 2rem auto; padding: clamp(1.5rem, 6vw, 3rem); overflow: hidden; border: 1px solid rgb(245 223 160 / 20%); border-radius: var(--radius-lg); text-align: center; background: linear-gradient(155deg, rgb(255 255 255 / 7%), rgb(6 16 15 / 80%) 60%, rgb(24 57 44 / 72%)); box-shadow: var(--shadow); }
.channel-guide::before { content: ""; position: absolute; width: 16rem; aspect-ratio: 1; top: -10rem; right: -8rem; border-radius: 50%; background: rgb(245 223 160 / 7%); box-shadow: 0 0 5rem rgb(245 223 160 / 8%); }
.channel-guide__sky { position: relative; height: 7rem; margin-bottom: 1rem; }
.channel-guide__moon { position: absolute; left: 50%; top: .2rem; width: 5.5rem; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; background: radial-gradient(circle at 34% 30%, rgb(126 97 48 / 12%) 0 9%, transparent 10%), var(--moon-100); box-shadow: 0 0 2.5rem rgb(255 229 143 / 24%); }
.channel-guide__constellation { position: absolute; left: 50%; bottom: 0; translate: -50% 0; min-width: 12rem; color: var(--moon-200); letter-spacing: 1.2rem; font-size: .7rem; opacity: .75; }
.channel-guide__eyebrow { margin: 0 0 .55rem; color: var(--moon-200); font-size: var(--type-label); font-weight: 850; letter-spacing: .04em; }
.channel-guide h1 { margin: 0; font-family: var(--font-serif); font-size: clamp(1.75rem, 5.5vw, 2.4rem); font-weight: 500; line-height: 1.3; word-break: keep-all; text-wrap: balance; }
.channel-guide__description { max-width: 32rem; margin: 1rem auto 1.6rem; color: var(--mist-200); line-height: var(--leading-body); word-break: keep-all; overflow-wrap: anywhere; text-wrap: pretty; }
.channel-journey { position: relative; margin: 0 auto 1.7rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; }
.channel-journey::before { content: ""; position: absolute; top: 1rem; right: 16.666%; left: 16.666%; height: 1px; background: rgb(245 223 160 / 24%); }
.channel-journey li { z-index: 1; display: grid; justify-items: center; gap: .45rem; color: var(--mist-400); font-size: var(--type-caption); line-height: 1.4; word-break: keep-all; }
.channel-journey span { width: 2rem; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--mist-300); background: var(--night-800); font-weight: 850; }
.channel-journey .is-complete span { color: var(--night-950); border-color: var(--moon-200); background: var(--moon-200); }
.channel-journey .is-current { color: var(--moon-100); font-weight: 800; }
.channel-journey .is-current span { color: var(--moon-100); border-color: var(--moon-200); box-shadow: 0 0 1.2rem rgb(245 223 160 / 18%); }
.channel-guide__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .65rem; }
.channel-guide__note { max-width: 31rem; margin: 1rem auto 0; color: var(--mist-400); font-size: var(--type-label); line-height: 1.55; word-break: keep-all; overflow-wrap: anywhere; }
.form-stack { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .5rem; }
.field label, .field legend { color: var(--mist-200); font-size: var(--type-label); font-weight: 800; }
.field input, .field textarea { width: 100%; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--cream-50); background: rgb(0 0 0 / 20%); }
.field textarea { min-height: 8rem; resize: vertical; line-height: 1.6; }
.field-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .35rem 1rem; color: var(--mist-400); font-size: var(--type-label); line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
.consent-list { margin: 0; padding: 0; display: grid; gap: .7rem; border: 0; }
.check { display: flex; align-items: flex-start; gap: .7rem; color: var(--mist-200); font-size: var(--type-label); line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: .12rem; accent-color: var(--moon-200); }
.check a { text-underline-offset: .2em; }
.form-error { min-height: 1.3rem; margin: 0; color: var(--danger-300); font-size: var(--type-label); }

dialog { width: min(calc(100% - 2rem), 34rem); padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--cream-50); background: var(--night-800); box-shadow: var(--shadow); }
dialog::backdrop { background: rgb(0 0 0 / 68%); backdrop-filter: blur(.25rem); }
.dialog-body { padding: 1.4rem; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.dialog-head h2 { margin: 0; font-family: var(--font-serif); font-size: var(--type-title); font-weight: 500; line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
.dialog-close { width: 2.5rem; height: 2.5rem; border: 1px solid var(--line); border-radius: 50%; color: var(--cream-50); cursor: pointer; background: transparent; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }

.undo-toast { position: fixed; z-index: 20; right: 1rem; bottom: 5.6rem; left: 1rem; width: min(calc(100% - 2rem), 30rem); margin-left: auto; padding: .85rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid rgb(245 223 160 / 25%); border-radius: var(--radius-sm); color: var(--night-950); background: var(--moon-100); box-shadow: var(--shadow); font-size: var(--type-label); line-height: 1.5; font-weight: 750; word-break: keep-all; overflow-wrap: anywhere; }
.undo-toast button { padding: .35rem .6rem; border: 1px solid rgb(6 16 15 / 25%); border-radius: 999px; color: var(--night-950); cursor: pointer; background: transparent; font-weight: 900; }

.page-card { padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel); }
.page-card + .page-card { margin-top: .85rem; }
.page-card h2 { margin: 0 0 .5rem; font-family: var(--font-serif); font-size: var(--type-title); font-weight: 500; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
.page-card p { color: var(--mist-200); line-height: var(--leading-body); word-break: keep-all; overflow-wrap: anywhere; text-wrap: pretty; }
.action-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.muted { color: var(--mist-400); }
.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; }

@media (min-width: 760px) {
  .bottom-nav { right: 1rem; bottom: 1rem; left: auto; width: 20rem; border: 1px solid var(--line); border-radius: 999px; }
  .app-shell { padding-bottom: 2rem; }
  .undo-toast { bottom: 6.4rem; }
}

@media (max-width: 759px) {
  .channel-prompt { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .channel-prompt__action { grid-column: 1 / -1; width: 100%; }
  .channel-prompt__action .button { width: 100%; }
  .channel-guide__actions { display: grid; }
  .channel-guide__actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .moon-disc, .moon-orbit, .moon-copy, .summary-row, .customer-ambient-stars i,
  [data-motion-reveal][data-motion-observed] {
    animation: none !important;
    transform: none !important;
    translate: none !important;
    rotate: 0deg !important;
    scale: 1 !important;
    opacity: 1 !important;
  }
}
