:root {
  --ink: #171128;
  --muted: #6f6880;
  --cream: #fffaf1;
  --paper: #ffffff;
  --violet: #6d43ef;
  --violet-dark: #4722bd;
  --gold: #f3b74a;
  --line: #e9e1f0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--cream); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

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

.site-header { width: min(1240px, calc(100% - 48px)); min-height: 76px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 850; letter-spacing: -.04em; font-size: 1.18rem; }
.brand span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: white; background: var(--violet); box-shadow: 0 8px 22px rgba(109,67,239,.28); }
.privacy-note { color: var(--muted); font-size: .85rem; }

.creator-layout { width: min(1240px, calc(100% - 48px)); margin: 30px auto 100px; display: grid; grid-template-columns: minmax(0, 1fr) 440px; align-items: start; gap: 78px; }
.builder { max-width: 680px; }
.step-mark, .section-kicker, .tiny-kicker { color: var(--violet); font-size: .76rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.builder h1 { max-width: 660px; margin: 14px 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.75rem, 5vw, 4.8rem); line-height: .98; letter-spacing: -.055em; font-weight: 500; }
.intro { max-width: 590px; margin: 0 0 42px; color: var(--muted); font-size: 1.08rem; line-height: 1.7; }

form { display: grid; gap: 20px; }
fieldset { min-width: 0; margin: 0; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.78); box-shadow: 0 13px 40px rgba(51,35,77,.045); }
legend { padding: 0 9px; margin-left: -9px; font-weight: 820; font-size: 1.05rem; }
label { display: grid; gap: 8px; margin-top: 17px; font-weight: 720; font-size: .9rem; }
label:first-of-type { margin-top: 10px; }
.field-grid { display: grid; gap: 14px; }
.field-grid.two { grid-template-columns: 1fr 1fr; }
input, textarea, select { width: 100%; border: 1px solid #ded5e8; border-radius: 12px; padding: 12px 13px; color: var(--ink); background: white; outline: none; transition: border-color .15s, box-shadow .15s; }
input { min-height: 46px; }
textarea { resize: vertical; line-height: 1.55; }
input:focus, textarea:focus, select:focus { border-color: #9a7cf2; box-shadow: 0 0 0 4px rgba(109,67,239,.11); }
small, .fieldset-note, .help { color: var(--muted); font-size: .78rem; line-height: 1.5; font-weight: 500; }
.optional { color: #958da1; font-size: .75rem; font-weight: 550; }
.fieldset-note { margin: 5px 0 14px; }
.help { margin: 10px 0 0; }
.help.error, .form-status.error { color: #b42318; }
.gift-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gift-picker label { min-height: 88px; display: grid; place-content: center; justify-items: center; gap: 5px; margin: 0; padding: 11px 8px; border: 1px solid #ded5e8; border-radius: 14px; text-align: center; color: var(--muted); background: white; cursor: pointer; transition: border-color .15s, box-shadow .15s, color .15s; }
.gift-picker label:has(input:checked) { border-color: #9273ec; color: var(--ink); box-shadow: 0 0 0 3px rgba(109,67,239,.1); }
.gift-picker input { position: absolute; width: 1px; min-height: 1px; opacity: 0; pointer-events: none; }
.gift-picker span { font-size: 1.45rem; }
.primary-action { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 58px; padding: 0 20px; border: 0; border-radius: 15px; color: #fff; background: var(--ink); font-weight: 800; transition: transform .15s, background .15s; }
.primary-action:hover { background: var(--violet-dark); transform: translateY(-1px); }
.primary-action span { font-size: 1.35rem; }
.form-status { min-height: 20px; margin: -9px 0 0; font-size: .85rem; }

.share-panel { margin-top: 22px; padding: 23px; border-radius: 18px; background: #eafaf1; border: 1px solid #bce9ce; }
.share-panel > div:first-child { display: flex; align-items: center; gap: 9px; }
.share-panel p { color: #446253; line-height: 1.55; }
.success-dot { width: 10px; height: 10px; border-radius: 50%; background: #1d9b5b; box-shadow: 0 0 0 5px rgba(29,155,91,.12); }
.link-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.link-row button { border: 0; border-radius: 11px; padding: 0 16px; color: white; background: #16764a; font-weight: 780; }
.text-button { margin-top: 14px; padding: 0; border: 0; color: #19653f; background: transparent; font-weight: 750; }
.share-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }
.share-post-button, .secondary-button { min-height: 46px; padding: 10px 14px; border-radius: 11px; font-weight: 800; }
.share-post-button { border: 0; color: white; background: var(--violet-dark); }
.secondary-button { border: 1px solid #aacfb9; color: #245c40; background: rgba(255,255,255,.72); }
.share-caption-preview { margin-top: 14px; padding: 15px; border: 1px solid #cfe6d8; border-radius: 12px; background: rgba(255,255,255,.62); }
.share-caption-preview span { color: #47725b; font-size: .7rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.share-caption-preview p { margin: 8px 0 0; white-space: pre-line; color: #294c39; font-size: .86rem; }
.share-status { min-height: 20px; margin: 10px 0 0 !important; font-size: .8rem; }

.live-preview { position: sticky; top: 30px; padding-top: 80px; }
.phone-shell { position: relative; width: min(100%, 390px); aspect-ratio: 9 / 17; margin: auto; padding: 10px; border-radius: 42px; background: #12101d; box-shadow: 0 40px 90px rgba(37,24,55,.23), inset 0 0 0 1px #393347; }
.phone-top { position: absolute; top: 19px; left: 50%; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 6px; width: 92px; height: 23px; transform: translateX(-50%); border-radius: 20px; background: #09080e; }
.phone-top span:first-child { width: 34px; height: 5px; border-radius: 6px; background: #292631; }
.phone-top span:last-child { width: 6px; height: 6px; border-radius: 50%; background: #24233c; }
.preview-scene { position: relative; height: 100%; overflow: hidden; display: flex; padding: 90px 27px 44px; align-items: center; flex-direction: column; text-align: center; border-radius: 34px; color: white; background: linear-gradient(rgba(11,12,39,.16), rgba(18,8,45,.8)), url('/assets/midnight-celebration.webp?v=20260927-2') center/cover; }
.preview-scene::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 40%, transparent, rgba(10,5,28,.36)); }
.preview-scene > * { position: relative; z-index: 1; }
.preview-scene[data-preview-theme="golden"] { filter: sepia(.23) saturate(1.1); }
.preview-scene[data-preview-theme="berry"] { filter: hue-rotate(32deg) saturate(1.2); }
.preview-stars { color: #ffdc8a; font-size: 1.2rem; }
.preview-scene > p { margin: 47px 0 8px; color: #ddd4f7; font-size: .75rem; letter-spacing: .13em; text-transform: uppercase; }
.preview-scene h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(2.5rem, 6vw, 4.1rem); line-height: 1; font-weight: 500; overflow-wrap: anywhere; }
.preview-orbit { display: flex; align-items: center; gap: 21px; margin: 32px 0; }
.preview-orbit span, .preview-orbit i { display: grid; place-items: center; width: 51px; height: 51px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(255,255,255,.1); font-style: normal; }
.preview-orbit b { color: #ffd886; font-size: 1.25rem; }
.preview-scene blockquote { min-height: 68px; margin: 0; color: #f5efff; line-height: 1.55; font-family: Georgia, serif; font-size: 1.04rem; }
.preview-scene button { margin-top: auto; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; padding: 12px 17px; color: #201433; background: #fff7e5; font-weight: 800; }
.preview-caption { text-align: center; color: var(--muted); font-size: .8rem; }

.how-it-feels { padding: 95px max(24px, calc((100% - 1120px) / 2)); background: #19132b; color: white; }
.how-it-feels .section-kicker { color: #b99cff; }
.how-it-feels > h2 { max-width: 760px; margin: 13px 0 45px; font: 500 clamp(2.3rem, 4vw, 4rem)/1.06 Georgia, serif; letter-spacing: -.04em; }
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature-row article { min-height: 235px; padding: 24px; border: 1px solid rgba(255,255,255,.1); border-radius: 20px; background: rgba(255,255,255,.045); }
.feature-row article > span { display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 9px; border-radius: 12px; color: #24173d; background: #f2c969; font-weight: 900; }
.feature-row h3 { margin: 42px 0 9px; }
.feature-row p { margin: 0; color: #bdb5ce; line-height: 1.65; }
.creator-app > footer { padding: 32px 24px; text-align: center; color: #777082; font-size: .82rem; }

.experience { min-height: 100svh; color: white; background: #09091d url('/assets/midnight-celebration.webp?v=20260927-2') center top / cover fixed no-repeat; }
.experience[data-theme="golden"] { --experience-accent: #ffd069; }
.experience[data-theme="berry"] { --experience-accent: #ff8db3; }
.experience[data-theme="midnight"] { --experience-accent: #bea5ff; }
.experience::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: linear-gradient(rgba(6,7,30,.3), #09091d 90svh); }
.locked-view, .welcome-view { position: relative; z-index: 1; min-height: 100svh; display: grid; place-content: center; justify-items: center; padding: 40px 24px; text-align: center; }
.tiny-kicker { color: var(--experience-accent, #bea5ff); }
.locked-view h1, .welcome-view h1 { max-width: 950px; margin: 13px 0; font: 500 clamp(4rem, 12vw, 9rem)/.9 Georgia, serif; letter-spacing: -.07em; overflow-wrap: anywhere; }
.experience-opening { max-width: 680px; min-height: 30px; margin: 20px auto 35px; color: #e1d9f3; font: 1.2rem/1.65 Georgia, serif; }
.reveal-button { padding: 15px 21px; border: 1px solid rgba(255,255,255,.32); border-radius: 999px; color: #1a1230; background: #fff4d8; font-weight: 850; box-shadow: 0 15px 45px rgba(0,0,0,.3); }
.reveal-button span { margin-left: 7px; }
.from-line { margin-top: 17px; color: #a9a1bd; font-size: .85rem; }
.countdown { display: flex; gap: 10px; margin: 28px 0 7px; }
.countdown div { min-width: 78px; padding: 15px 9px; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; background: rgba(10,8,30,.42); backdrop-filter: blur(8px); }
.countdown strong { display: block; font-size: 1.6rem; }
.countdown span { color: #aaa2bd; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }
.locked-note { color: #aaa2bd; }

.story-view { position: relative; z-index: 1; padding-top: 10px; background: linear-gradient(transparent, #09091d 220px); }
.reveal-section { width: min(1060px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0; }
.story-intro { text-align: center; }
.story-intro { padding-bottom: 42px; }
.story-intro h2, .gifts-section h2, .cake-section h2 { max-width: 760px; margin: 14px auto 18px; font: 500 clamp(2.5rem, 6vw, 5.2rem)/1 Georgia, serif; letter-spacing: -.05em; }
.story-intro > p:last-child { max-width: 610px; margin: auto; color: #b8b0ca; line-height: 1.75; }
.message-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.message-grid article { padding: 24px; border: 1px solid rgba(255,255,255,.12); border-radius: 20px; background: rgba(255,255,255,.055); }
.message-grid article > span { color: var(--experience-accent); font-size: 1.05rem; font-weight: 900; }
.card-label { margin: 24px 0 10px; color: #aaa1ba; font-size: .72rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.message-grid blockquote { margin: 0; overflow-wrap: anywhere; font: 1.22rem/1.55 Georgia, serif; }
.gifts-section, .cake-section { text-align: center; }
.gift-shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 30px; }
.gift-box { min-height: 205px; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 22px; border: 1px solid rgba(255,255,255,.15); border-radius: 20px; color: white; background: rgba(255,255,255,.055); transition: transform .2s, border-color .2s, background .2s; }
.gift-box:hover { transform: translateY(-3px); border-color: var(--experience-accent); }
.gift-box .gift-icon { font-size: 3.5rem; }
.gift-box strong { font-size: 1rem; }
.gift-box p { min-height: 48px; margin: 0; color: #b8b0ca; line-height: 1.5; }
.gift-box:not(.opened) p { display: none; }
.gift-box:not(.opened)::after { content: "Tap to unwrap"; color: #aaa1ba; font-size: .72rem; font-weight: 760; text-transform: uppercase; letter-spacing: .1em; }
.gift-box.opened { border-color: var(--experience-accent); background: rgba(255,255,255,.09); }
.cake { margin: 30px 0 18px; font-size: clamp(6rem, 15vw, 10rem); filter: drop-shadow(0 18px 30px rgba(0,0,0,.28)); }
.cake.out { filter: grayscale(.25) brightness(.75) drop-shadow(0 18px 30px rgba(0,0,0,.28)); }
.candle-button { padding: 14px 19px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: white; background: rgba(255,255,255,.1); font-weight: 760; }
.candle-message { min-height: 28px; color: var(--experience-accent); font-family: Georgia, serif; }
.letter-section { text-align: center; }
.letter-paper { max-width: 740px; margin: 28px auto 0; padding: clamp(32px, 7vw, 70px); text-align: left; border-radius: 9px; color: #2d2540; background: #fffaf0; box-shadow: 0 35px 90px rgba(0,0,0,.28); transform: rotate(-.45deg); }
.letter-paper p { white-space: pre-line; font: 1.15rem/1.9 Georgia, serif; }
.letter-greeting { font-size: 1.45rem !important; }
.letter-signoff { margin-top: 30px; color: #655975; font-style: italic !important; }
.experience-footer { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 17px; padding: 34px 24px 62px; text-align: center; }
.experience-footer button { min-height: 48px; border-radius: 999px; font-weight: 800; }
.experience-share-panel { width: min(720px, 100%); padding: 24px; border: 1px solid rgba(255,255,255,.12); border-radius: 24px; background: rgba(255,255,255,.055); }
.experience-share-title { margin: 0 0 17px; font: 1.25rem/1.3 Georgia, serif; }
.social-share-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.social-button { padding: 11px 13px; border: 1px solid rgba(255,255,255,.18); color: white; background: rgba(255,255,255,.08); }
.social-button:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.42); }
.social-button.whatsapp { background: #187d45; }
.social-button.facebook { background: #2856a3; }
.social-button.x-social { background: #17171b; }
.social-button.instagram { background: linear-gradient(120deg, #714bd2, #c13584 52%, #e86a35); }
.memory-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }
#downloadMemory { padding: 13px 20px; border: 0; color: #201433; background: #fff4d8; box-shadow: 0 12px 34px rgba(0,0,0,.18); }
#downloadMemory:hover { background: #ffe8af; transform: translateY(-1px); }
#shareExperience { padding: 13px 20px; border: 1px solid rgba(255,255,255,.22); color: white; background: rgba(255,255,255,.07); }
#shareExperience:hover { background: rgba(255,255,255,.12); transform: translateY(-1px); }
#makeAnother { min-height: auto; padding: 8px 3px; border: 0; color: #aaa1ba; background: transparent; text-decoration: underline; text-underline-offset: 5px; }
#makeAnother:hover { color: white; }
#experienceShareStatus { min-height: 20px; margin: 12px 0 0; color: #b8b0ca; font-size: .82rem; }

@media (max-width: 960px) {
  .creator-layout { grid-template-columns: 1fr; gap: 20px; }
  .builder { max-width: none; }
  .live-preview { position: static; order: -1; padding-top: 0; }
  .phone-shell { width: 300px; }
  .preview-scene { padding-top: 72px; }
  .preview-scene > p { margin-top: 25px; }
  .feature-row, .message-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .site-header, .creator-layout { width: min(100% - 28px, 1240px); }
  .privacy-note { display: none; }
  .creator-layout { margin-top: 12px; }
  .builder h1 { font-size: 3.15rem; }
  .field-grid.two, .gift-picker { grid-template-columns: 1fr 1fr; }
  .share-actions { grid-template-columns: 1fr; }
  fieldset { padding: 19px; }
  .live-preview { display: none; }
  .feature-row { grid-template-columns: 1fr; }
  .how-it-feels { padding-top: 70px; padding-bottom: 70px; }
  .countdown { gap: 5px; }
  .countdown div { min-width: 64px; padding: 12px 5px; }
  .reveal-section { padding: 54px 0; }
  .gift-shelf { grid-template-columns: 1fr; }
  .social-share-actions { grid-template-columns: 1fr 1fr; }
  .memory-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
