:root {
  --pine: #0c2a22;
  --pine-2: #123a2e;
  --pine-3: #1b4a3a;
  --cream: #f6efe1;
  --muted: #c8d6cb;
  --berry: #c4483a;
  --gold: #e9b542;
  --line: rgba(246,239,225,.18);
  --display: "Fraunces", Georgia, serif;
  --text: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--pine);
  color: var(--cream);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

#snow { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
#snow i {
  position: absolute; display: block; width: 5px; height: 5px; border-radius: 50%;
  background: rgba(246,239,225,.5); animation: fall linear infinite;
}
@keyframes fall { from { transform: translate3d(0,-10vh,0); } to { transform: translate3d(22px,110vh,0); } }

.site-head {
  position: relative; z-index: 5; display: flex; align-items: center; gap: 24px;
  padding: 20px clamp(20px,5vw,72px); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -.03em; }
.brand svg { width: 30px; height: 30px; color: var(--gold); }
.site-head nav { margin-left: auto; display: flex; gap: 26px; }
.site-head nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.site-head nav a:hover { color: var(--cream); }

.btn { border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 700; font-size: 14px; transition: transform 140ms ease-out, background-color 140ms ease-out; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-berry { background: var(--berry); color: #fff; }
.btn-gold { background: var(--gold); color: #241c0c; }
.btn-ghost { background: transparent; color: var(--cream); border: 1px solid var(--line); }
.btn-quiet { background: rgba(246,239,225,.09); color: var(--cream); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

.hero {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr;
  align-items: center; gap: 20px; min-height: 78vh; padding: 70px clamp(20px,6vw,96px) 80px;
}
.hero-copy { position: relative; z-index: 2; max-width: 640px; }
.kicker, .section-tag { color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 14px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.035em; line-height: 1.05; margin: 0 0 18px; }
h1 { font-size: clamp(46px, 6.4vw, 92px); font-weight: 600; }
h2 { font-size: clamp(34px, 4.2vw, 60px); font-weight: 600; }
h3 { font-size: 24px; font-weight: 600; }
.lede { font-size: clamp(17px,1.6vw,21px); color: var(--muted); max-width: 54ch; }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 30px; flex-wrap: wrap; }
.text-link { color: var(--cream); font-size: 14px; text-underline-offset: 5px; }
.fineprint { color: var(--muted); font-size: 12px; margin-top: 22px; }
.hero-art { position: relative; min-height: 420px; }
.hero-art svg { position: absolute; right: -8%; bottom: -6%; width: min(640px, 52vw); height: auto; filter: drop-shadow(0 30px 50px rgba(0,0,0,.35)); }

.strip { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4,1fr); border-block: 1px solid var(--line); }
.strip div { padding: 24px clamp(12px,3vw,40px); border-right: 1px solid var(--line); }
.strip div:last-child { border-right: 0; }
.strip strong { display: block; font-family: var(--display); font-size: 38px; font-weight: 600; color: var(--gold); line-height: 1; }
.strip span { font-size: 13px; color: var(--muted); }

.section { position: relative; z-index: 1; padding: clamp(64px,8vw,120px) clamp(20px,6vw,96px); }
.how h2, .ornaments-section h2, .faq-section h2 { max-width: 20ch; }
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; margin-top: 50px; border-top: 1px solid var(--line); }
.steps article { padding: 28px 32px 0 0; border-right: 1px solid var(--line); margin-right: 32px; }
.steps article:last-child { border: 0; margin-right: 0; }
.steps article:nth-child(2) { padding-top: 56px; }
.steps article:nth-child(3) { padding-top: 92px; }
.step-no { display: inline-block; font-family: var(--display); font-size: 14px; color: var(--berry); border: 1px solid var(--berry); border-radius: 50%; width: 34px; height: 34px; text-align: center; line-height: 32px; margin-bottom: 16px; }
.steps p { color: var(--muted); max-width: 36ch; }

.quote-section { text-align: center; background: var(--pine-2); }
.quote-section blockquote { font-family: var(--display); font-size: clamp(28px,4vw,52px); line-height: 1.2; margin: 0 auto 20px; max-width: 22ch; }
.quote-meta { color: var(--muted); font-size: 13px; }

.section-intro { color: var(--muted); max-width: 60ch; }
.ornament-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px,1fr)); gap: 14px; margin-top: 40px; }
.ornament-tile { background: rgba(246,239,225,.05); border: 1px solid var(--line); border-radius: 16px; padding: 12px 8px 10px; text-align: center; transition: transform 160ms ease-out, border-color 160ms ease-out; }
.ornament-tile:hover { transform: translateY(-4px); border-color: var(--gold); }
.ornament-tile svg { width: 64px; height: 64px; display: block; margin: 0 auto 6px; }
.ornament-tile span { font-size: 11px; color: var(--muted); }

.privacy-section { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; background: var(--pine-3); }
.privacy-copy p { color: var(--muted); max-width: 58ch; }
.privacy-art { display: grid; place-items: center; }
.sealed-card { width: min(340px,80%); aspect-ratio: 4/5; background: var(--cream); color: var(--pine); border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.35); transform: rotate(-4deg); padding: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.sealed-card .lock { color: var(--berry); font-size: 36px; }
.sealed-card strong { font-family: var(--display); font-size: 26px; }
.sealed-card span:last-child { font-size: 13px; opacity: .7; }

.faq { margin-top: 40px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::after { content: "+"; color: var(--gold); }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--muted); max-width: 62ch; margin-bottom: 0; }

.closing { text-align: center; padding: 90px 20px; background: var(--berry); }
.closing h2 { font-size: clamp(36px,5vw,68px); }
.site-foot { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 26px clamp(20px,6vw,96px); border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); position: relative; z-index: 1; }

/* tree app */
.tree-app { position: relative; z-index: 2; max-width: 1120px; margin: 0 auto; padding: 34px 20px 90px; }
.tree-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.tree-top .spacer { flex: 1; }
.tree-title { font-size: clamp(30px,4vw,52px); margin-bottom: 4px; }
.tree-sub { color: var(--muted); font-size: 14px; }
.tree-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: 30px; align-items: start; margin-top: 28px; }
.tree-stage { background: radial-gradient(circle at 50% 30%, rgba(233,181,66,.10), transparent 55%), var(--pine-2); border: 1px solid var(--line); border-radius: 28px; padding: 18px; min-height: 500px; display: grid; place-items: center; }
.tree-stage svg { width: 100%; max-width: 620px; height: auto; }
.tree-panel { background: rgba(246,239,225,.05); border: 1px solid var(--line); border-radius: 24px; padding: 24px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 12px; color: var(--muted); }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.tree-panel .btn { width: 100%; margin-top: 12px; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.pager button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--cream); }
.pager button.current { background: var(--gold); color: var(--pine); border-color: var(--gold); }
.wish-list { display: grid; gap: 8px; margin-top: 18px; }
.wish-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.12); text-align: left; color: var(--cream); }
.wish-chip svg { width: 32px; height: 32px; flex: none; }
.wish-chip small { color: var(--muted); }
.empty-note { color: var(--muted); font-size: 14px; padding: 12px 0; }

/* modal */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(5,18,14,.78); display: grid; place-items: center; padding: 18px; overflow-y: auto; }
.modal { width: min(680px,100%); max-height: calc(100vh - 36px); overflow-y: auto; background: var(--pine-2); border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px,4vw,36px); box-shadow: 0 30px 90px rgba(0,0,0,.5); }
.modal h2 { font-size: 30px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.close-btn { border: 1px solid var(--line); background: transparent; color: var(--cream); width: 36px; height: 36px; border-radius: 50%; font-size: 18px; }
.field { display: grid; gap: 7px; margin: 16px 0; }
.field label { font-size: 13px; font-weight: 600; }
.field input[type=text], .field textarea {
  width: 100%; background: rgba(0,0,0,.22); color: var(--cream); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; outline: none;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--gold); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); margin: 10px 0; }
.check input { margin-top: 4px; accent-color: var(--berry); }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(74px,1fr)); gap: 8px; margin-top: 10px; }
.picker-item { border: 1px solid var(--line); background: rgba(0,0,0,.15); border-radius: 12px; padding: 6px 3px; color: var(--cream); display: grid; gap: 2px; justify-items: center; font-size: 10px; }
.picker-item svg { width: 44px; height: 44px; }
.picker-item.selected { border-color: var(--gold); background: rgba(233,181,66,.14); }
.style-row { display: flex; gap: 8px; flex-wrap: wrap; }
.style-swatch { width: 46px; height: 46px; border-radius: 50%; border: 2px solid transparent; display: grid; place-items: center; }
.style-swatch.selected { border-color: var(--gold); }
.style-swatch i { display: block; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(140deg, var(--a) 33%, var(--b) 33% 66%, var(--c) 66%); }
.topper-picks { display: flex; gap: 8px; flex-wrap: wrap; }
.topper-picks button { width: 52px; height: 52px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.15); padding: 5px; }
.topper-picks button.selected { border-color: var(--gold); }
.topper-picks svg { width: 100%; height: 100%; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.modal-actions .btn { flex: 1; min-width: 130px; }
.detail-ornament { width: 120px; height: 120px; display: block; margin: 0 auto 12px; }
.detail-text { font-family: var(--display); font-size: 22px; line-height: 1.35; background: var(--cream); color: var(--pine); border-radius: 16px; padding: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sealed-note { text-align: center; color: var(--muted); padding: 20px; border: 1px dashed var(--line); border-radius: 16px; }
.secret-box { font-family: ui-monospace, monospace; font-size: 12px; background: rgba(0,0,0,.2); padding: 10px; border-radius: 10px; overflow-wrap: anywhere; color: var(--gold); }
.error { color: #ffb3a6; font-size: 13px; min-height: 20px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); z-index: 90; opacity: 0; pointer-events: none; background: var(--cream); color: var(--pine); padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; transition: opacity 180ms ease-out, transform 180ms ease-out; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (max-width: 900px) {
  .site-head nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-art { min-height: 320px; }
  .hero-art svg { right: 0; width: min(440px,90vw); }
  .strip { grid-template-columns: repeat(2,1fr); }
  .strip div:nth-child(2) { border-right: 0; }
  .steps, .privacy-section, .tree-layout { grid-template-columns: 1fr; }
  .steps article, .steps article:nth-child(2), .steps article:nth-child(3) { padding: 22px 0; border-right: 0; border-bottom: 1px solid var(--line); margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #snow i { animation: none; }
  * { scroll-behavior: auto !important; }
  .btn:hover, .ornament-tile:hover { transform: none; }
}
