:root {
  --green-900: #0c3d1e; --green-800: #0f4d25; --green-700: #14632f; --green-600: #1b7a3b; --green-500: #2a9150;
  --red: #d7262e; --red-dark: #b51c23; --cream: #f6f3ea; --ink: #111712; --muted: #5b6a60;
  --font: "Inter Tight", "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--green-800); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }
h1, h2 { margin: 0; letter-spacing: -.03em; line-height: 1.08; font-weight: 500; }
p { margin: 0; }
:focus-visible { outline: 3px solid #ffd54a; outline-offset: 3px; border-radius: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 24px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 500; font-size: 16px; white-space: nowrap; transition: transform .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn--red { background: var(--red); color: #fff; box-shadow: 0 12px 24px -10px rgba(215,38,46,.7); }
.btn--red:hover { background: var(--red-dark); }
.btn--ghost { background: var(--cream); color: var(--ink); }
.btn--block { width: 100%; }
.btn--xl { height: 64px; padding: 0 36px; font-size: 19px; font-weight: 600; }
.btn--pulse { animation: ctaPulse 2.2s ease-in-out infinite; }
@keyframes ctaPulse { 0%,100% { box-shadow: 0 12px 24px -10px rgba(215,38,46,.7), 0 0 0 0 rgba(215,38,46,.45); } 50% { box-shadow: 0 12px 24px -10px rgba(215,38,46,.7), 0 0 0 16px rgba(215,38,46,0); } }

#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

/* language switch (only top-right control) */
.lang { display: flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.14); backdrop-filter: blur(8px); }
.lang button { border: 0; background: transparent; color: rgba(255,255,255,.8); font-size: 13px; font-weight: 600; letter-spacing: .04em; height: 34px; min-width: 42px; border-radius: 999px; transition: background .2s, color .2s; }
.lang button[aria-pressed="true"] { background: #fff; color: var(--green-700); }

/* ===================== ONE-PAGE HERO ===================== */
.hero { position: relative; overflow: hidden; color: #fff; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: radial-gradient(60% 50% at 50% 40%, rgba(66,168,96,.45), transparent 70%), radial-gradient(120% 90% at 50% 0%, var(--green-600), var(--green-800) 70%); }
.hero__flakes i { position: absolute; left: var(--x); top: var(--y); font-size: var(--s); font-style: normal; color: rgba(255,255,255,.28); animation: drift 9s ease-in-out infinite alternate; }
.hero__flakes i:nth-child(2n) { animation-duration: 12s; }
@keyframes drift { to { transform: translateY(18px) rotate(40deg); } }

.hero__stage { position: relative; flex: 1; width: min(1280px, 100% - 48px); margin: 0 auto; min-height: 340px; }
.hero__title { position: relative; z-index: 1; display: flex; justify-content: center; margin-top: clamp(56px, 8vh, 96px);
  font-size: min(15.6vw, 24vh); font-weight: 500; line-height: .78; letter-spacing: -.055em; }
.hero__word { display: inline-block; animation: rise 1s cubic-bezier(.2,.8,.2,1) both; }
.hero__word:last-child { animation-delay: .12s; }
.hero__gap { width: min(9vw, 13vh); flex: none; }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } }

.hero__tree-wrap { position: absolute; z-index: 2; left: 50%; top: clamp(30px, 5vh, 70px); transform: translateX(-50%); width: min(40vw, 58vh); cursor: pointer; }
.hero__tree { width: 100%; position: relative; z-index: 1; filter: drop-shadow(0 40px 50px rgba(0,0,0,.35)); animation: treeIn 1.2s .2s cubic-bezier(.2,.8,.2,1) both, sway 6s 1.4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes treeIn { from { opacity: 0; transform: translateY(80px) scale(.9); } }
@keyframes sway { 50% { transform: rotate(1.2deg); } }
.hero__glow { position: absolute; left: 50%; bottom: -14%; transform: translateX(-50%); width: 130%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(46,140,74,.9) 0%, rgba(46,140,74,.4) 45%, transparent 70%); }

.callout { position: absolute; z-index: 3; right: 6%; top: 50%; display: grid; justify-items: end; gap: 4px; text-align: right; max-width: 280px;
  background: none; border: 0; padding: 0; color: inherit; font-size: clamp(15px, 1.25vw, 18px); transition: transform .25s; }
.callout:hover { transform: translateY(-4px); }
.callout strong { font-weight: 500; }
.callout span:not(.callout__flake):not(.callout__line) { color: rgba(255,255,255,.6); }
.callout__flake { font-size: 46px; line-height: 1; margin-bottom: 14px; }
.callout__line { display: block; position: relative; height: 1.5px; width: clamp(180px, 20vw, 290px); margin-bottom: 22px; background: rgba(255,255,255,.55); }
.callout__line::after { content: ""; position: absolute; left: -5px; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: #fff; transform: translateY(-50%); box-shadow: 0 0 0 6px rgba(255,255,255,.25); }

/* bottom white panel: headline → letter → button */
.panel { position: relative; z-index: 4; width: min(1280px, 100% - 48px); margin: 0 auto; background: #fff; color: var(--ink);
  border-radius: 28px 28px 0 0; padding: clamp(24px, 3.6vh, 40px) 24px clamp(22px, 3.4vh, 36px);
  display: grid; justify-items: center; text-align: center; gap: clamp(8px, 1.6vh, 16px); }
.hero-to { font-family: "Caveat", cursive; font-size: 30px; color: var(--red); margin-bottom: -6px; }
.panel__headline { font-size: clamp(26px, min(3.4vw, 5vh), 46px); max-width: 820px; }
.panel__letter { border: 0; background: none; padding: 0; width: clamp(96px, 15vh, 160px); margin: 2px 0 -4px; }
.panel__letter img { width: 100%; transform: rotate(-8deg); filter: drop-shadow(0 18px 18px rgba(0,0,0,.18)); animation: letterFloat 3.2s ease-in-out infinite; transition: transform .3s; }
.panel__letter:hover img { animation-play-state: paused; transform: rotate(0) translateY(-6px) scale(1.05); }
@keyframes letterFloat { 50% { transform: rotate(-4deg) translateY(-8px); } }
.panel__note { color: var(--muted); font-size: 14px; }


.toast { position: fixed; left: 50%; bottom: 84px; z-index: 80; transform: translate(-50%, 40px); opacity: 0; background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 999px; font-size: 15px; transition: all .35s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ===================== GIFT POPUP ===================== */
.gift-modal { border: 0; padding: 0; margin: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; background: transparent; overflow: clip; color: #fff; }
.gift-modal::backdrop { background: radial-gradient(circle at 50% 45%, rgba(27,122,59,.92), rgba(6,26,12,.97)); backdrop-filter: blur(6px); }
.gift-modal[open] { display: block; animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.gift-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.gift-close { position: absolute; top: 18px; right: 18px; z-index: 5; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 28px; line-height: 1; }
.gift-rays { position: absolute; left: 50%; top: 50%; width: 160vmax; height: 160vmax; margin: -80vmax 0 0 -80vmax; z-index: 0; opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255,230,150,.16) 0 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 0, transparent 45%); mask: radial-gradient(circle, #000 0, transparent 45%);
  transition: opacity .8s; animation: spin 40s linear infinite; }
.gift-modal.is-open .gift-rays { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.gift-stage { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; width: min(460px, 100vw - 32px); display: grid; justify-items: center; }

.gift-box { position: relative; width: 240px; height: 320px; border: 0; background: none; padding: 0; animation: drop .9s cubic-bezier(.3,1.6,.5,1) both, wiggle 2.4s 1s ease-in-out infinite; }
@keyframes drop { from { transform: translateY(-70vh) rotate(-20deg); } }
@keyframes wiggle { 0%,70%,100% { transform: rotate(0); } 75% { transform: rotate(-6deg) scale(1.03); } 80% { transform: rotate(6deg) scale(1.03); } 85% { transform: rotate(-4deg); } 90% { transform: rotate(3deg); } }
.gift-hint { margin-top: 34px; font-size: 17px; opacity: .85; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .4; } }
[data-state="opening"] .gift-box { animation: shake .7s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shake { 10%,90% { transform: translateX(-2px) rotate(-2deg); } 20%,80% { transform: translateX(4px) rotate(3deg); } 30%,50%,70% { transform: translateX(-8px) rotate(-5deg) scale(1.05); } 40%,60% { transform: translateX(8px) rotate(5deg) scale(1.05); } }
[data-state="opening"] .gift-hint, [data-state="open"] .gift-hint { opacity: 0; animation: none; }
@keyframes lidOffOld { 30% { transform: translateY(-40px) rotate(-6deg); } to { transform: translate(-160px, -340px) rotate(-55deg); opacity: 0; } }

@keyframes boxAway { to { transform: translateY(40vh) scale(.6); opacity: 0; } }

.gift-card { position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%) scale(.2) rotateX(70deg); opacity: 0; pointer-events: none;
  background: #fffdf6; color: var(--ink); border-radius: 28px; padding: 74px 30px 28px; text-align: center;
  box-shadow: 0 40px 90px -20px rgba(0,0,0,.6), 0 0 0 8px rgba(255,255,255,.08);
  background-image: radial-gradient(circle at 0 0, rgba(215,38,46,.08), transparent 40%), radial-gradient(circle at 100% 100%, rgba(27,122,59,.1), transparent 45%);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }

@keyframes cardIn { to { transform: translateY(-50%) scale(1) rotateX(0); opacity: 1; } }
.gift-card::before { content: ""; position: absolute; inset: 10px; border: 2px dashed rgba(215,38,46,.25); border-radius: 22px; pointer-events: none; }
.gift-santa { position: absolute; left: 50%; top: -62px; width: 124px; height: 124px; border-radius: 50%; border: 5px solid #fff; box-shadow: 0 14px 30px rgba(0,0,0,.3); transform: translateX(-50%) scale(0); }
[data-state="open"] .gift-card > .gift-santa { animation: santaPop .7s 1.1s cubic-bezier(.3,1.8,.5,1) forwards, santaBob 3s 2s ease-in-out infinite; }
@keyframes santaPop { to { transform: translateX(-50%) scale(1); } }
@keyframes santaBob { 0%,100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) translateY(-6px) rotate(-3deg) scale(1); } }
.gift-to { font-family: "Caveat", cursive; font-size: 26px; color: var(--red); min-height: 1em; }
.gift-title { font-size: clamp(30px, 6vw, 40px); color: var(--green-700); }
.gift-msg { font-family: "Caveat", cursive; font-size: clamp(22px, 4.6vw, 27px); line-height: 1.3; min-height: 4.2em; color: #1d2a21; }
.gift-msg::after { content: "|"; margin-left: 2px; color: var(--red); animation: blink .8s steps(1) infinite; }
.gift-msg.done::after { display: none; }
.gift-sign { color: var(--muted); font-size: 14px; }
.gift-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.gift-card > :not(.gift-santa) { opacity: 0; }
[data-state="open"] .gift-card > :not(.gift-santa) { animation: up .5s 1.3s cubic-bezier(.2,.8,.2,1) forwards; }
[data-state="open"] .gift-card > .gift-actions { animation-delay: 1.6s; }
@keyframes up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.gift-share { margin-top: 6px; padding-top: 14px; border-top: 1px solid #eee7d6; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.gift-card [hidden] { display: none !important; }
.gift-share__title { font-size: 15px; font-weight: 600; color: var(--green-700); }
.gift-share__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gift-share input { width: 100%; min-width: 0; font: inherit; font-size: 16px; padding: 0 16px; height: 48px; border-radius: 14px; border: 1.5px solid #dfe3dc; background: #fff; color: var(--ink); }
.gift-share input.is-invalid { border-color: var(--red); }
.gift-share input:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 4px rgba(27,122,59,.15); }
.gift-share .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.gift-share__err { color: var(--red); font-size: 13px; min-height: 1em; }
.gift-share__ok { display: grid; gap: 6px; justify-items: center; padding: 6px 0 2px; }
.gift-share__ok b { color: var(--green-700); font-size: 18px; }
.gift-share__ok span { color: var(--muted); font-size: 14px; }
.gift-card.is-sharing .gift-msg, .gift-card.is-sharing .gift-sign, .gift-card.is-sharing .gift-to { display: none; }
.gift-card.is-sharing .gift-title { font-size: 28px; }
.btn.is-loading { pointer-events: none; opacity: .75; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 860px) {
  .hero__stage { display: grid; justify-items: center; align-content: start; min-height: 0; }
  .hero__title { margin-top: 74px; font-size: 15.6vw; }
  .hero__gap { width: 4vw; }
  .hero__tree-wrap { position: relative; left: auto; top: auto; transform: none; margin-top: -4vw; width: min(74vw, 46vh, 400px); }
  .callout { display: none; }
  .panel { margin-top: -48px; width: calc(100% - 28px); }
}
@media (max-width: 420px) {
  .btn--xl { width: 100%; padding: 0 20px; font-size: 17px; }
  .topbar { top: 14px; right: 14px; }
  .gift-card { padding: 66px 18px 20px; }
  .gift-share__grid { grid-template-columns: 1fr; }
}
@media (max-height: 760px) {
  .gift-msg { font-size: 22px; min-height: 3.2em; }
  .gift-sign { display: none; }
  .gift-card { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .gift-card, .gift-card > * { opacity: 1 !important; }
  [data-state="open"] .gift-card { transform: translateY(-50%); }
  [data-state="open"] .gift-box { display: none; }
  .gift-santa { transform: translateX(-50%); }
}

/* ===== v6: letter is the CTA ===== */
.panel__letter { position: relative; width: clamp(130px, 21vh, 210px); margin: 4px 0 2px; border-radius: 50%; }
.panel__ring { position: absolute; left: 50%; top: 52%; width: 92%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%) scale(.7);
  border: 2px solid rgba(215,38,46,.45); animation: ring 2.4s ease-out infinite; pointer-events: none; }
.panel__ring--2 { animation-delay: 1.2s; }
@keyframes ring { from { opacity: .9; transform: translate(-50%, -50%) scale(.7); } to { opacity: 0; transform: translate(-50%, -50%) scale(1.35); } }
.panel__letter img { position: relative; }
.panel__note { margin-top: 4px; }

/* ===== v6: photoreal plush gift box ===== */
.gift-box__inner { position: absolute; inset: 0; display: block; }
.gift-shadow { position: absolute; left: 12%; right: 12%; bottom: -14px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.45); filter: blur(8px); }
@keyframes glowUpOld { to { opacity: 1; width: 200px; height: 120px; top: 100px; } }
@keyframes flash { 0% { opacity: 1; width: 200px; height: 120px; top: 100px; } 40% { opacity: 1; width: 900px; height: 900px; top: -300px; } 100% { opacity: 0; width: 1200px; height: 1200px; top: -450px; } }
.gift-hint { margin-top: 26px; }

/* center the gap exactly under the tree regardless of word length */
.hero__title .hero__word { flex: 1 1 0; }
.hero__title .hero__word:first-child { text-align: right; }
.hero__title .hero__word:last-child { text-align: left; }
@media (max-height: 660px) { .panel__letter { width: 120px; } .panel { gap: 6px; } }
@media (min-width: 861px) {
  .hero__title { font-size: min(12.4vw, 19vh); }
  .hero__gap { width: min(19vw, 29vh); }
}

/* ===== v7: top-right controls (music + language) ===== */
.topbar { position: fixed; top: 20px; right: 20px; z-index: 55; display: flex; align-items: center; gap: 8px; }
.topbar .lang, .sound { background: rgba(255,255,255,.14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.sound { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; min-width: 40px; padding: 0 12px; border: 0; border-radius: 999px; color: #fff; transition: background .2s; }
.sound:hover { background: rgba(255,255,255,.24); }
.sound__icon { width: 20px; height: 20px; }
.sound__mute { display: none; }
.sound[aria-pressed="false"] .sound__waves { display: none; }
.sound[aria-pressed="false"] .sound__mute { display: inline; }
.sound[aria-pressed="false"] { color: rgba(255,255,255,.7); }
.sound__bars { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.sound__bars i { width: 3px; height: 3px; background: currentColor; border-radius: 2px; }
.sound.is-on .sound__bars i { animation: eq .8s ease-in-out infinite alternate; }
.sound.is-on .sound__bars i:nth-child(2) { animation-delay: .2s; }
.sound.is-on .sound__bars i:nth-child(3) { animation-delay: .4s; }
.sound[aria-pressed="false"] .sound__bars { display: none; }
@keyframes eq { from { height: 3px; } to { height: 14px; } }

/* ===== v7: bold XMAS GIFT title + Santa sack ===== */
.hero__title { font-weight: 800; letter-spacing: -.05em; }
@media (min-width: 861px) {
  .hero__title { font-size: min(14.2vw, 22vh); }
  .hero__gap { width: min(20vw, 30vh); }
}
@media (max-width: 860px) {
  .hero__title { font-size: 17vw; margin-top: 70px; }
  .hero__gap { width: 2vw; }
}
.hero__tree { animation: treeIn 1.2s .2s cubic-bezier(.2,.8,.2,1) both, sackBob 4s 1.4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes sackBob { 0%,100% { transform: scale(1, 1); } 50% { transform: scale(1.015, .985) translateY(2px); } }

/* ===== v7: gift box — lid aligned on base ===== */
.gift-box__inner { position: absolute; inset: 0; display: block; }
.gift-base { position: absolute; left: 0; bottom: 0; width: 240px; height: 244px; filter: drop-shadow(0 18px 24px rgba(0,0,0,.35)); }
.gift-lid { position: absolute; left: -7px; bottom: 156px; width: 254px; height: 158px; max-width: none; z-index: 2; transform-origin: 50% 100%; filter: drop-shadow(0 8px 10px rgba(0,0,0,.28)); }
.gift-light { position: absolute; left: 50%; bottom: 150px; width: 10px; height: 10px; transform: translate(-50%, 50%); z-index: 1; border-radius: 50%;
  background: radial-gradient(circle, #fff6c9 0%, rgba(255,214,90,.85) 30%, rgba(255,214,90,0) 70%); opacity: 0; }
[data-state="opening"] .gift-light { animation: glowUp .7s ease-in forwards; }
[data-state="open"] .gift-light { animation: flash .9s ease-out forwards; }
@keyframes glowUp { to { opacity: 1; width: 220px; height: 130px; } }
@keyframes flash { 0% { opacity: 1; width: 220px; height: 130px; } 40% { opacity: 1; width: 900px; height: 900px; } 100% { opacity: 0; width: 1200px; height: 1200px; } }
@keyframes lidOff { 30% { transform: translateY(-40px) rotate(-6deg); } to { transform: translate(-160px, -340px) rotate(-55deg); opacity: 0; } }
@media (max-height: 700px) { .gift-box { transform: scale(.82); } }
.sound:not(.is-on) .sound__bars { display: none; }
@media (min-width: 861px) {
  .hero__title { font-size: min(12.5vw, 19vh); }
  .hero__gap { width: min(24vw, 37vh); }
  .hero__tree-wrap { width: min(32vw, 47vh); top: clamp(40px, 7vh, 80px); }
}
.hero__title .hero__word { min-width: 0; white-space: nowrap; }
@media (min-width: 861px) { .hero__gap { width: min(28vw, 42vh); } }
.hero__title .hero__word { display: flex; }
.hero__title .hero__word:first-child { justify-content: flex-end; }
.hero__title .hero__word:last-child { justify-content: flex-start; }
@media (min-width: 861px) { .hero__title { font-size: min(11.2vw, 17.5vh); } .hero__gap { width: min(26vw, 40vh); } }
@media (max-width: 860px) { .hero__title { font-size: 14.5vw; margin-top: 72px; } .hero__gap { width: 3vw; } }

/* ===== v8: gift box from ONE image split at the lid seam → ribbons line up perfectly ===== */
.gift-box { width: 240px; height: 290px; }
.gift-box__inner { position: absolute; inset: 0; }
.gift-base { position: absolute; left: 0; bottom: 0; width: 240px; height: 135px; z-index: 1; filter: drop-shadow(0 18px 24px rgba(0,0,0,.35)); }
.gift-lid { position: absolute; left: 0; bottom: 135px; width: 240px; height: 120px; max-width: none; z-index: 3; transform-origin: 8% 100%; filter: drop-shadow(0 8px 10px rgba(0,0,0,.25)); }
.gift-light { position: absolute; left: 50%; bottom: 128px; width: 200px; height: 14px; transform: translateX(-50%); z-index: 2; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 100%, #fffbe6 0%, rgba(255,220,110,.95) 35%, rgba(255,214,90,0) 72%); opacity: 0; transform-origin: 50% 100%; }
/* 1) shake while a glow leaks from the seam */
[data-state="opening"] .gift-light { animation: seamGlow .7s ease-in forwards; }
@keyframes seamGlow { to { opacity: 1; height: 26px; } }
/* 2) lid pops up, tips back on its hinge, then flies away */
[data-state="open"] .gift-lid { animation: lidOpen 1.15s cubic-bezier(.3,.7,.3,1) forwards; }
@keyframes lidOpen {
  0%   { transform: none; }
  18%  { transform: translateY(-34px) rotate(0deg); }
  38%  { transform: translateY(-46px) rotate(-16deg); }
  100% { transform: translate(-150px, -300px) rotate(-48deg); opacity: 0; }
}
/* 3) beam of light shoots up out of the open box */
[data-state="open"] .gift-light { animation: beam 1.3s ease-out forwards; }
@keyframes beam {
  0%   { opacity: 1; height: 26px; width: 200px; }
  35%  { opacity: 1; height: 420px; width: 230px; border-radius: 50% 50% 46% 46% / 30% 30% 8% 8%; }
  70%  { opacity: .95; height: 900px; width: 900px; }
  100% { opacity: 0; height: 1200px; width: 1400px; }
}
/* 4) box drops away, card rises */
[data-state="open"] .gift-box { animation: boxAway .7s 1s ease-in forwards; }
@keyframes boxAway { to { transform: translateY(40vh) scale(.7); opacity: 0; } }
[data-state="open"] .gift-card { animation: cardIn 1s 1.05s cubic-bezier(.2,1.4,.4,1) forwards; pointer-events: auto; }
[data-state="open"] .gift-card > .gift-santa { animation: santaPop .7s 1.6s cubic-bezier(.3,1.8,.5,1) forwards, santaBob 3s 2.4s ease-in-out infinite; }
[data-state="open"] .gift-card > :not(.gift-santa) { animation-delay: 1.8s; }
[data-state="open"] .gift-card > .gift-actions { animation-delay: 2.1s; }
@media (max-height: 700px) { .gift-box { transform: scale(.85); } }

/* ===== v8: wish text in Oooh Baby ===== */
.gift-msg { font-family: "Oooh Baby", "Caveat", cursive; font-size: clamp(22px, 4.8vw, 28px); line-height: 1.5; font-weight: 400; }

/* ===== v8: warm halo so the green sack pops from the green background ===== */
.hero__glow { background: radial-gradient(circle, rgba(255,236,170,.55) 0%, rgba(255,214,120,.22) 35%, rgba(46,140,74,0) 68%); bottom: -6%; }
/* v8 tuning: softer cone beam, lid stays solid until it is far away */
.gift-light { filter: blur(6px); }
@keyframes beam {
  0%   { opacity: 1; height: 26px; width: 200px; }
  30%  { opacity: 1; height: 380px; width: 230px; border-radius: 50% 50% 40% 40% / 60% 60% 6% 6%; }
  65%  { opacity: .85; height: 560px; width: 300px; border-radius: 50% 50% 40% 40% / 60% 60% 6% 6%; }
  100% { opacity: 0; height: 640px; width: 340px; border-radius: 50% 50% 40% 40% / 60% 60% 6% 6%; }
}
@keyframes lidOpen {
  0%   { transform: none; opacity: 1; }
  18%  { transform: translateY(-34px); }
  38%  { transform: translateY(-46px) rotate(-16deg); }
  80%  { opacity: 1; }
  100% { transform: translate(-170px, -320px) rotate(-48deg); opacity: 0; }
}

/* ===================== v9 ===================== */
/* Wish font: Google Fonts + CDN fallback (in case fonts.googleapis.com is blocked) */
@font-face { font-family: "Oooh Baby Fallback"; font-display: swap; src: local("Oooh Baby"), local("OoohBaby-Regular"), url("assets/fonts/OoohBaby-Regular.woff2") format("woff2"),
  url("https://cdn.jsdelivr.net/npm/@fontsource/oooh-baby@5/files/oooh-baby-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Oooh Baby Fallback"; font-display: swap; src: local("Oooh Baby"), url("assets/fonts/OoohBaby-Regular.woff2") format("woff2"),
  url("https://cdn.jsdelivr.net/npm/@fontsource/oooh-baby@5/files/oooh-baby-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Oooh Baby Fallback"; font-display: swap; src: local("Oooh Baby"), url("assets/fonts/OoohBaby-Regular.woff2") format("woff2"),
  url("https://cdn.jsdelivr.net/npm/@fontsource/oooh-baby@5/files/oooh-baby-vietnamese-400-normal.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
#giftMsg.gift-msg { font-family: "Oooh Baby", "Oooh Baby Fallback", cursive !important; font-size: clamp(24px, 5vw, 30px); line-height: 1.45; font-weight: 400; }

/* Stage: HO HO HO marquee behind, big sack on top */
.stage { position: relative; flex: 1; min-height: 300px; container-type: size; z-index: 5; }
.hoho { position: absolute; left: 0; right: 0; top: 34%; transform: translateY(-50%); z-index: 1; overflow: hidden; margin: 0;
  font-size: clamp(64px, min(13vw, 19vh), 230px); font-weight: 800; line-height: 1; letter-spacing: -.04em; color: #fff; white-space: nowrap; pointer-events: none;
  -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.hoho__track { display: inline-flex; align-items: center; gap: .35em; padding-right: .35em; animation: hoho 22s linear infinite; }
.hoho__track i { font-style: normal; font-size: .38em; color: #ffd54a; }
.hoho__track span:nth-of-type(2n) { color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.85); }
@keyframes hoho { to { transform: translateX(-50%); } }

.sack-wrap { position: absolute; left: 50%; bottom: -34px; z-index: 3; transform: translateX(-50%);
  width: min(41.6vw, 90cqh); aspect-ratio: 865 / 900; cursor: pointer; }
.sack { position: relative; z-index: 2; width: 100%; height: 100%; filter: drop-shadow(0 34px 40px rgba(0,0,0,.4));
  animation: sackIn 1.1s .15s cubic-bezier(.2,.8,.2,1) both, sackBob 4s 1.4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes sackIn { from { opacity: 0; transform: translateY(60px) scale(.9); } }
.sack-wrap:hover .sack { filter: drop-shadow(0 34px 40px rgba(0,0,0,.4)) brightness(1.05); }
.sack-glow { position: absolute; left: 50%; top: 52%; width: 150%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(255,236,170,.5) 0%, rgba(255,214,120,.18) 38%, rgba(255,214,120,0) 66%); }

/* items tumbling out of the sack */
.item { position: absolute; z-index: 3; height: auto; filter: drop-shadow(0 14px 14px rgba(0,0,0,.35));
  animation: tumble 1.1s var(--d, 1s) cubic-bezier(.3,1.5,.5,1) both, idle 3.6s calc(var(--d, 1s) + 1.1s) ease-in-out infinite alternate; }
@keyframes tumble { from { opacity: 0; transform: translate(var(--fx), var(--fy)) rotate(0deg) scale(.4); } to { opacity: 1; transform: rotate(var(--r)); } }
@keyframes idle { from { transform: rotate(var(--r)) translateY(0); } to { transform: rotate(calc(var(--r) + 4deg)) translateY(-6px); } }
.item--gift  { width: 30%; left: -22%; bottom: 2%;  --r: -10deg; --fx: 90%;   --fy: -150%; --d: 1.0s; z-index: 4; }
.item--cane  { width: 26%; left: -14%; bottom: 34%; --r: -18deg; --fx: 110%;  --fy: -80%;  --d: 1.25s; }
.item--ball  { width: 18%; right: -12%; bottom: 0;  --r: 8deg;   --fx: -120%; --fy: -260%; --d: 1.15s; z-index: 4; }
.item--star  { width: 24%; right: -20%; bottom: 30%; --r: 14deg; --fx: -110%; --fy: -90%;  --d: 1.4s; }
.item--ball2 { width: 11%; right: 10%; bottom: -4%; --r: -6deg;  --fx: -60%;  --fy: -320%; --d: 1.55s; z-index: 4; }

.panel { padding-top: clamp(40px, 5.6vh, 58px); }

@media (max-width: 860px) {
  .hoho { top: 30%; font-size: 21vw; }
  .sack-wrap { width: min(80vw, 82cqh); bottom: -26px; }
  .item--gift { left: -10%; } .item--star { right: -8%; } .item--cane { left: -6%; } .item--ball { right: -4%; }
}
@media (prefers-reduced-motion: reduce) { .hoho__track { animation: none; } .item { opacity: 1; transform: rotate(var(--r)); } }
/* v9 fix: size sack by stage height (no container units) */
.stage { container-type: normal; }
.sack-wrap { top: -7%; bottom: -34px; width: auto; height: auto; max-width: 86vw; }
.sack { object-fit: contain; }
@media (max-width: 860px) { .sack-wrap { top: 12%; bottom: -26px; width: auto; max-width: 84vw; } }
.sack-wrap { top: 5%; bottom: -22px; }
.hoho { top: 50%; }
@media (max-width: 860px) {
  .hoho { top: 44%; }
  .sack-wrap { top: 11%; bottom: 2px; }
  .panel { padding-top: 34px; }
  .panel__letter { width: clamp(100px, 16vh, 150px); }
}
@media (max-width: 860px) {
  .item--ball2 { display: none; }
  .item--ball { bottom: 14%; right: -6%; }
  .item--gift { bottom: 8%; }
  .sack-wrap { bottom: 10px; }
}

/* ===================== v10 ===================== */
/* share form appears instantly (no inherited 1.8s entrance delay) */
[data-state="open"] .gift-card > .gift-share { animation: shareIn .28s ease-out both !important; animation-delay: 0s !important; }
@keyframes shareIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* bolder wish handwriting (+~1.5px stroke) */
/* stroke only when Oooh Baby actually loaded (class set by JS) */
.has-oooh #giftMsg.gift-msg { -webkit-text-stroke: .75px currentColor; paint-order: stroke fill; }

/* music picker */
.sound-wrap { position: relative; }
.sound-menu { position: absolute; right: 0; top: calc(100% + 10px); width: min(300px, calc(100vw - 28px)); z-index: 90;
  background: #fffdf6; color: var(--ink); border-radius: 18px; padding: 10px; box-shadow: 0 24px 50px -16px rgba(0,0,0,.5); animation: menuIn .18s ease-out; }
.sound-menu[hidden] { display: none; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.sound-menu__head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 10px; border-bottom: 1px solid #eee7d6; margin-bottom: 6px; }
.sound-menu__head p { font-weight: 700; font-size: 15px; color: var(--green-700); }
.switch { position: relative; width: 46px; height: 26px; border: 0; border-radius: 999px; background: #c9cfc9; padding: 0; transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: left .2s; }
.switch[aria-checked="true"] { background: var(--green-600); }
.switch[aria-checked="true"] i { left: 23px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sound-menu__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sound-menu__list button { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; text-align: left;
  padding: 10px 10px; border-radius: 12px; font-size: 14.5px; color: var(--ink); }
.sound-menu__list button:hover { background: #f2eee2; }
.tk__dot { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid #c9cfc9; }
.tk__name { flex: 1; }
.tk__eq { display: none; align-items: flex-end; gap: 2px; height: 12px; }
.tk__eq i { width: 3px; height: 3px; background: var(--red); border-radius: 2px; animation: eq .8s ease-in-out infinite alternate; }
.tk__eq i:nth-child(2) { animation-delay: .2s; } .tk__eq i:nth-child(3) { animation-delay: .4s; }
.sound-menu__list [aria-checked="true"] { background: #eef4ee; font-weight: 600; color: var(--green-700); }
.sound-menu__list [aria-checked="true"] .tk__dot { border: 5px solid var(--green-600); }
.sound-menu__list [aria-checked="true"] .tk__eq { display: flex; }

/* perf: freeze the landing page behind the gift popup so the popup/form animate smoothly */
body.gift-open .hero, body.gift-open .hero * { animation-play-state: paused !important; }
body.gift-open .stage { visibility: hidden; }
body.gift-open .gift-modal::backdrop { backdrop-filter: none; }
.sack, .item { will-change: transform; }

.credit { font-size: 10.5px; color: #9aa59d; margin-top: -4px; }
.credit a { color: inherit; }
