:root {
  color-scheme: light;
  --paper: #f8f3e8;
  --white: #fffcf5;
  --ink: #192f28;
  --muted: #545e53;
  --green: #29533e;
  --dark: #122b24;
  --red: #a3283d;
  --gold: #ffe0a3;
  --line: #e4d9c7;
  --sans: "Segoe UI", system-ui, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.55 var(--sans);
  scroll-behavior: smooth;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body, p, h1, h2, h3, figure { margin: 0; }
body { min-height: 100vh; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .60; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid #bf7b36; outline-offset: 4px; }
.wrap { width: min(100% - 9vw, 1200px); margin-inline: auto; }
.site-header { background: #132d25; color: var(--white); }
.header-inner { min-height: 71px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 clamp(1.03rem, 2.2vw, 1.45rem)/1.1 var(--serif); }
.logo-mark { display: grid; place-items: center; width: 32px; height: 32px; color: var(--gold); font: 1.1rem/1 var(--sans); border: 1px solid #e8c98566; border-radius: 50%; }
.header-inner nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 24px); font-size: .88rem; }
.header-inner nav a { white-space: nowrap; text-underline-offset: 4px; }
.header-inner nav a:hover { color: var(--gold); }
.snow-toggle { border: 1px solid #f3eed34d; border-radius: 99px; color: var(--gold); padding: 5px 12px; background: transparent; }
.snow-toggle[aria-pressed=false] { color: #c7c8bb; }
.hero { min-height: calc(100svh - 71px); isolation: isolate; position: relative; display: grid; align-items: center; overflow: clip; color: var(--white); background: #081923; }
.scene { position: absolute; z-index: -1; inset: 0; overflow: hidden; container-type: size; }
.scene-picture { position: absolute; width: max(100cqw, 177.68cqh); aspect-ratio: 1672 / 941; left: 72%; top: 50%; transform: translate(-72%, -50%); background: url("moon-village.webp") center / cover no-repeat; }
.scene-shade { position: absolute; inset: 0; background: linear-gradient(90deg,#0a1c23cf 0%,#0a1c23a0 36%,#0a1c2310 70%,transparent 100%); }
.sleigh { display: none; position: absolute; left: 52%; top: 20.5%; width: 11%; opacity: 0; filter: blur(.18px); }
.winter-motion .sleigh { display: block; animation: sleigh-flight 20s 0s linear infinite; }
@keyframes sleigh-flight {
  0% { left: 52%; top: 26%; opacity: 0; }
  4% { opacity: .95; }
  26% { left: 95%; top: 15%; opacity: .95; }
  30%, 100% { left: 100%; top: 14%; opacity: 0; }
}
.snow { position: absolute; inset: 0; display: none; pointer-events: none; }
.winter-motion .snow { display: block; }
.snow i { position: absolute; left: var(--x); top: 0; width: var(--size); height: var(--size); border-radius: 50%; background: #f7faff; opacity: .62; box-shadow: 0 0 5px #e2f1ff; animation: fall var(--time) var(--delay) linear infinite; }
@keyframes fall {
  from { transform: translate3d(0,-8cqh,0); }
  50% { transform: translate3d(var(--drift),49cqh,0); }
  to { transform: translate3d(0,106cqh,0); }
}
.lantern { position: absolute; width: 3%; aspect-ratio: 1; transform: translate(-50%,-50%); border-radius: 50%; background: radial-gradient(circle,#ffc07092,transparent 69%); opacity: .3; }
.lantern-one { left: 76.65%; top: 68.9%; }
.lantern-two { left: 50.8%; top: 73.1%; }
.lantern-three { left: 82.65%; top: 45.25%; }
.winter-motion .lantern { animation: glow 4s ease-in-out infinite alternate; }
.winter-motion .lantern-two { animation-delay: -1.4s; }
.winter-motion .lantern-three { animation-delay: -2.4s; }
@keyframes glow { to { opacity: .95; } }
.hero-inner { padding-block: clamp(60px,10svh,125px); }
.hero-inner > * { max-width: 590px; }
.eyebrow { font: 700 .71rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #7d4930; }
.eyebrow span { font-size: 1.06rem; margin-right: 5px; }
.hero .eyebrow, .room-banner .eyebrow { color: var(--gold); }
.hero h1 { font: 400 clamp(5rem, min(11.5vw,19svh), 10.5rem)/.83 var(--serif); letter-spacing: -.075em; margin-block: .13em .20em; text-shadow: 0 3px 28px #06172287; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-intro { font-size: clamp(1.04rem,2vw,1.34rem); line-height: 1.45; max-width: 32ch; color: #fff2dc; text-shadow: 0 1px 8px #091c24; }
.hero-actions, .row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.hero-actions { margin-top: 30px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 15px; text-align: center; min-height: 47px; padding: 10px 17px; border: 1px solid transparent; border-radius: 8px; font-weight: 650; text-decoration: none; line-height: 1.3; transition: background .18s, transform .18s, border-color .18s; }
.button:not(:disabled):hover { transform: translateY(-2px); }
.button:not(:disabled):active { transform: translateY(1px); }
.button-red { background: var(--red); color: white; }
.button-red:hover { background: #8d2033; }
.button-green { background: var(--green); color: white; }
.button-green:hover { background: #1b4130; }
.button-soft { background: #f0e7d9; color: var(--ink); }
.button-line { border-color: #f5efd98c; background: #0d211fc9; color: var(--white); }
.button-line:hover { border-color: var(--gold); }
.hero-actions .button { min-height: 56px; padding-inline: 21px; }
.scene-down { position: absolute; bottom: 18px; right: 4.5%; display: grid; place-items: center; width: 41px; height: 41px; border: 1px solid #fcf4de6b; border-radius: 50%; color: var(--white); background: #081d25a1; text-decoration: none; }
.how { min-height: 88svh; display: grid; grid-template-columns: .82fr 1fr; gap: clamp(35px,8vw,105px); align-items: center; padding-block: clamp(65px,9vw,120px); }
.rules-photo { border-radius: 48% 48% 5px 5px / 29% 29% 5px 5px; overflow: hidden; max-height: 590px; }
.rules-photo img { width: 100%; height: 100%; object-fit: cover; }
h2 { font: 400 clamp(2.1rem,4.5vw,4rem)/1.08 var(--serif); letter-spacing: -.048em; overflow-wrap: anywhere; }
h3 { line-height: 1.32; }
.how ol { display: grid; list-style: none; padding: 0; margin-block: 24px; gap: 13px; }
.how li { display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; border-top: 1px solid #d9ccaf; padding-top: 14px; }
.how li > span { color: var(--red); font-size: 1.72rem; grid-row: span 2; }
.how h3 { font: 700 clamp(1.25rem,2vw,1.55rem)/1.2 var(--serif); margin-bottom: 5px; }
.how p { color: var(--muted); max-width: 43ch; }
.site-footer { border-top: 1px solid var(--line); padding-block: 18px; font: 700 1rem/1.3 var(--serif); }
.site-footer span { color: var(--red); margin-right: 5px; }
.room-banner { color: var(--white); background: linear-gradient(90deg,#132d25fa,#132d25cc 55%,#132d2555),url("moon-village.webp") 75% 63% / cover no-repeat; padding-block: clamp(29px,6vw,65px); }
.room-banner h1 { font: 400 clamp(2.3rem,6.3vw,5.35rem)/1.02 var(--serif); letter-spacing: -.055em; margin-block: 12px 10px; overflow-wrap: anywhere; }
.room-banner p:last-child { color: #fff1d5; }
.room-shell { min-height: 57svh; padding-block: 25px 60px; }
.room-tabs { display: flex; gap: 5px 10px; flex-wrap: wrap; margin-bottom: 22px; }
.room-tabs button { border: 1px solid #d8cbb5; border-radius: 99px; padding: 8px 15px; color: var(--ink); background: var(--white); font-weight: 650; }
.room-tabs button:hover, .room-tabs button[aria-pressed=true] { color: var(--white); background: var(--green); border-color: var(--green); }
.room-tabs button span { color: #b65d1d; }
.room-tabs button[aria-pressed=true] span { color: var(--gold); }
.overview, .wish-layout { display: grid; grid-template-columns: 1.07fr .93fr; gap: 19px; align-items: start; }
.wish-layout { grid-template-columns: .65fr 1fr; }
.card { padding: clamp(19px,3vw,34px); background: var(--white); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.card h2 { font-size: clamp(1.75rem,3.4vw,2.6rem); }
.card .eyebrow { margin-bottom: 10px; }
.card > p.muted { margin-top: 10px; }
.card > .button { margin-top: 15px; }
.muted { color: var(--muted); }
.fine { font-size: .88rem; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.count { white-space: nowrap; background: #efe8d7; padding: 4px 10px; border-radius: 99px; color: #514e43; font-size: .81rem; }
.people-list { margin: 9px 0 0; padding: 0; list-style: none; }
.people-list li { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.people-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.people-list strong { overflow-wrap: anywhere; }
.initial { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #e4eddc; color: var(--green); font-weight: 750; }
.participant-state { color: var(--muted); font-size: .76rem; text-align: right; }
.participant-state.ready { color: #245c42; }
.share-label, .stack { margin-top: 19px; }
.share-label + .button { margin-top: 11px; }
.draw-box, .saved, .link-details { border-top: 1px solid var(--line); margin-top: 21px; padding-top: 17px; }
.draw-box .button { margin-top: 12px; }
.invite .fine { margin-top: 14px; }
.join-card { max-width: 640px; margin: 0 auto; }
.envelope { font-size: 2.4rem; color: var(--red); }
label { display: block; font-size: .91rem; font-weight: 650; }
label small { color: var(--muted); font-weight: 400; }
input, textarea { width: 100%; min-width: 0; border: 1px solid #bdb8aa; border-radius: 8px; background: #fffdfa; color: var(--ink); padding: 10px 12px; min-height: 44px; }
label > input { margin-top: 4px; display: block; }
textarea { resize: vertical; }
.stack { display: grid; gap: 10px; }
.stack .button { justify-self: start; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-pair small { display: block; }
.search-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; margin-top: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips button { border: 1px solid #d7ccb5; border-radius: 99px; padding: 4px 9px; color: var(--ink); background: #faf2e3; font-size: .78rem; }
.chips button:hover { background: #e8eddd; border-color: #bcc9ad; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(150px,100%),1fr)); gap: 12px; margin-top: 15px; }
.product-grid:empty { display: none; }
.product { min-width: 0; border: 1px solid var(--line); background: #fffdfa; border-radius: 11px; overflow: hidden; display: flex; flex-direction: column; }
.product-image { position: relative; aspect-ratio: 1.24; overflow: hidden; background: #f0e4d2; }
.product-image a { display: block; height: 100%; }
.product-image a:focus-visible { outline-offset: -4px; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .24s; }
.product:hover .product-image img { transform: scale(1.025); }
.product-image small { position: absolute; left: 6px; bottom: 5px; color: #3f4038; background: #fffcf0db; padding: 1px 5px; border-radius: 4px; font-size: .64rem; }
.heart { position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 38px; height: 38px; color: var(--red); background: var(--white); border: 1px solid var(--line); border-radius: 50%; font-size: 1.27rem; }
.heart:hover { background: #ffe9e8; }
.product-info { padding: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; flex: 1; }
.market { color: #194a9f; background: #e8f0ff; border-radius: 5px; padding: 2px 6px; font-size: .7rem; font-weight: 750; }
.market.wb { color: #772182; background: #f9e6fa; }
.product h3 { font-size: .88rem; overflow-wrap: anywhere; }
.product-stats { color: #7e4a24; font-size: .72rem; }
.product-stats span { color: var(--muted); }
.product-link { display: inline-block; margin-top: auto; font-size: .78rem; font-weight: 650; text-underline-offset: 3px; }
.link-details summary { cursor: pointer; color: var(--green); font-weight: 650; }
.link-details .button { font-size: .9rem; }
.empty { grid-column: 1 / -1; }
.gift-page { max-width: 850px; margin-inline: auto; }
.gift-page > h2 { margin-bottom: 19px; }
.saved-letter { padding: 15px; background: #faeddb; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 18px; }
.saved-letter p { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 7px; }
.error, .notice { padding: 10px 12px; margin-bottom: 13px; border-radius: 7px; }
.error { color: #85243a; background: #ffe8e8; }
.notice { color: #1b5234; background: #e7efe1; }
dialog { width: min(94vw,530px); padding: 0; max-height: 90svh; border: 1px solid #cbbba7; border-radius: 14px; background: var(--white); color: var(--ink); }
dialog::backdrop { background: #0b201bba; }
.dialog-form { display: grid; gap: 13px; padding: clamp(18px,4vw,34px); }
.dialog-form > .button { justify-self: start; }
.dialog-form h2 { font-size: clamp(1.9rem,6vw,2.9rem); }
.dialog-top { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.dialog-form .error { margin: 0; }
.icon-button { min-width: 36px; min-height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font-size: 1.45rem; line-height: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-enter] { animation: enter .58s ease-out both; }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media(max-width: 760px) {
  .overview, .wish-layout { grid-template-columns: 1fr; }
  .overview .invite { grid-row: 1; }
  .how ol { grid-template-columns: 1fr; gap: 18px; }
  .how { min-height: 0; grid-template-columns: 1fr; }
  .rules-photo { grid-row: 2; width: min(100%, 400px); justify-self: center; }
}
@media(max-width: 610px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { min-height: 62px; }
  .header-inner nav { font-size: .76rem; gap: 9px; }
  .logo { gap: 6px; }
  .logo-mark { width: 26px; height: 26px; }
  .snow-toggle { padding-inline: 8px; }
  .hero { min-height: calc(100svh - 62px); align-items: end; }
  .scene-picture { left: 82%; transform: translate(-82%,-50%); }
  .scene-shade { background: linear-gradient(0deg,#091d26f8 3%,#091d26d4 37%,#091d2614 78%); }
  .hero-inner { padding-block: 205px 75px; }
  .hero h1 { font-size: clamp(4.3rem,13.5vw,6.3rem); }
  .hero .eyebrow { font-size: .63rem; }
  .hero-actions { margin-top: 21px; }
  .hero-actions .button { min-height: 48px; padding-inline: 14px; font-size: .9rem; }
  .scene-down { bottom: 14px; }
  .room-tabs { gap: 6px; }
  .room-tabs button { font-size: .82rem; padding: 7px 10px; }
}
@media(max-width: 370px) {
  .field-pair { grid-template-columns: 1fr; }
  .snow-toggle span { display: none; }
}
@media(prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  [data-enter] { animation: none; }
  *, *::before, *::after { transition: none !important; }
}
