:root {
  --paper: #fff7ea;
  --cream: #fffdf7;
  --ink: #341039;
  --muted: #735d75;
  --line: #e1d5ca;
  --coral: #ff5f66;
  --yellow: #ffbf2f;
  --periwinkle: #7187f5;
  --teal: #087f83;
  --purple: #5f4aa6;
  --sage: #65755d;
  --terracotta: #a9583f;
  --success: #2d7051;
}

* { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; }
body { margin: 0; min-height: 100svh; color: var(--ink); background: radial-gradient(circle at 50% -10%, white, transparent 34%), var(--paper); font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body.booting { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, label, input, select, textarea { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }

.boot-screen { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; background: var(--paper); opacity: 1; transition: opacity .28s ease; }
.boot-screen svg { width: 84px; height: 84px; filter: drop-shadow(0 12px 24px rgba(52,16,57,.10)); animation: boot-boop 1.15s ease-in-out infinite; }
.boot-screen.is-ready { opacity: 0; pointer-events: none; }

@keyframes boot-boop {
  0%, 100% { transform: scale(.96); }
  50% { transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  .boot-screen { transition-duration: .01ms; }
  .boot-screen svg { animation: none; }
}

/* SNOOTIKI HOME — the public front door. */
.site-home { min-height: 100svh; overflow: hidden; color: var(--ink); background: var(--paper); }
.site-home-nav { width: min(100%, 1180px); min-height: 86px; margin: 0 auto; padding: max(1rem, env(safe-area-inset-top)) clamp(1.1rem, 5vw, 3.4rem) 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.site-home-brand { width: clamp(158px, 22vw, 230px); color: inherit; }
.site-home-brand svg { width: 100%; height: auto; display: block; overflow: visible; filter: drop-shadow(0 8px 18px rgba(52,16,57,.06)); }
.site-home-nav > span { color: var(--muted); font-family: Georgia, serif; font-size: .95rem; font-style: italic; }
.site-home main { width: min(100%, 1180px); margin: 0 auto; }
.site-home-hero { min-height: calc(100svh - 86px); padding: clamp(2rem, 7vw, 6rem) clamp(1.1rem, 5vw, 3.4rem) clamp(4rem, 8vw, 7rem); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); align-items: center; gap: clamp(2.5rem, 7vw, 6.5rem); }
.site-home-copy { position: relative; z-index: 2; }
.site-home-eyebrow { margin: 0 0 1rem; color: var(--teal); font-size: .72rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.site-home-copy h1 { max-width: 680px; margin: 0; font-family: Georgia, serif; font-size: clamp(3.8rem, 8.2vw, 7.4rem); font-weight: 500; line-height: .88; letter-spacing: -.065em; }
.site-home-copy h1 em { color: var(--coral); font-style: italic; font-weight: 400; }
.site-home-lead { max-width: 570px; margin: 1.8rem 0 0; color: var(--muted); font-family: Georgia, serif; font-size: clamp(1.12rem, 2vw, 1.42rem); line-height: 1.55; }
.site-home-product { position: relative; width: min(82%, 360px); margin: 1rem 0 -.1rem; }
.site-home-product::after { content: ""; position: absolute; inset: 13% 5% 4% 9%; z-index: -1; background: rgba(52,16,57,.11); border-radius: 50%; filter: blur(28px); transform: translateY(10px) rotate(-3deg); }
.site-home-product img { width: 100%; height: auto; display: block; border-radius: 32%; filter: saturate(.98) drop-shadow(0 14px 28px rgba(52,16,57,.07)); -webkit-mask-image: radial-gradient(ellipse 74% 72% at 50% 51%, #000 58%, rgba(0,0,0,.95) 72%, transparent 100%); mask-image: radial-gradient(ellipse 74% 72% at 50% 51%, #000 58%, rgba(0,0,0,.95) 72%, transparent 100%); transform: rotate(-1.25deg); }
.site-home-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .85rem; }
.site-home-actions a { min-height: 54px; padding: .9rem 1.25rem; display: inline-flex; align-items: center; justify-content: center; gap: .9rem; border-radius: 999px; font-weight: 850; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.site-home-actions a:active { transform: translateY(2px); }
.site-home-primary { color: var(--cream); background: var(--ink); box-shadow: 5px 6px 0 var(--yellow); }
.site-home-secondary { color: var(--ink); background: var(--cream); border: 2px solid var(--ink); box-shadow: 4px 5px 0 var(--teal); }
.site-home-memory-action { box-shadow: 4px 5px 0 #e5cb93; }
.site-home-portrait { position: relative; width: min(100%, 470px); justify-self: center; padding: 2.8rem 1.4rem 2.2rem; }
.site-home-portrait::before { content: ""; position: absolute; inset: 3% -5% 0; background: var(--periwinkle); border: 3px solid var(--ink); border-radius: 48% 48% 22% 22% / 35% 35% 18% 18%; transform: rotate(2deg); }
.site-home-portrait figure { position: relative; z-index: 2; margin: 0; padding: .75rem .75rem 1.4rem; background: var(--cream); border: 3px solid var(--ink); border-radius: 50% 50% 12px 12px; box-shadow: 10px 12px 0 var(--ink); transform: rotate(-2deg); }
.site-home-portrait img { width: 100%; aspect-ratio: .84 / 1; display: block; object-fit: cover; object-position: center; border-radius: 49% 49% 5px 5px; }
.site-home-portrait figcaption { padding: 1rem .3rem 0; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.site-home-portrait figcaption span { color: var(--teal); font-size: .67rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.site-home-portrait figcaption strong { font-family: Georgia, serif; font-size: 1.55rem; font-style: italic; font-weight: 500; }
.site-home-sun { position: absolute; z-index: 1; width: 120px; aspect-ratio: 1; right: -7%; top: -2%; background: var(--yellow); border: 3px solid var(--ink); border-radius: 50%; }
.site-home-spark { position: absolute; z-index: 3; color: var(--yellow); font-size: 2.2rem; text-shadow: 2px 2px 0 var(--ink); }
.site-home-spark-one { left: -6%; top: 18%; }
.site-home-spark-two { right: -3%; bottom: 22%; color: var(--coral); font-size: 1.5rem; }
.site-home-boop { position: absolute; z-index: 4; right: -2%; top: 25%; padding: .6rem .8rem; color: var(--cream); background: var(--teal); border: 2px solid var(--ink); box-shadow: 3px 4px 0 var(--yellow); font-weight: 900; transform: rotate(8deg); }
.site-home-meet { padding: clamp(4.5rem, 9vw, 8rem) clamp(1.1rem, 5vw, 3.4rem); }
.site-home-meet-heading { max-width: 780px; margin-bottom: clamp(2.2rem, 5vw, 4rem); }
.site-home-meet-heading h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(3rem, 6.5vw, 6rem); font-weight: 400; line-height: .94; letter-spacing: -.055em; }
.site-home-meet-heading h2 em { color: var(--coral); font-style: italic; font-weight: 400; }
.site-home-meet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 1.7rem); }
.site-home-meet-card { min-width: 0; overflow: hidden; color: inherit; background: var(--cream); border: 2px solid var(--ink); border-radius: 24px; box-shadow: 7px 8px 0 var(--ink); text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; }
.site-home-meet-card:hover { transform: translateY(-5px); box-shadow: 10px 13px 0 var(--ink); }
.site-home-meet-card:active { transform: translateY(1px); box-shadow: 4px 5px 0 var(--ink); }
.site-home-meet-card figure { margin: 0; overflow: hidden; aspect-ratio: 1 / .88; background: #ddd; }
.site-home-meet-card img { width: 100%; height: 100%; display: block; object-fit: cover; }
.site-home-meet-card > div { min-height: 220px; padding: 1.3rem 1.25rem 1.4rem; display: flex; flex-direction: column; align-items: flex-start; }
.site-home-meet-card span { margin: 0 0 .75rem; font-size: .68rem; font-weight: 900; letter-spacing: .13em; }
.site-home-meet-card h3 { margin: 0 0 .45rem; font-family: Georgia, serif; font-size: clamp(1.65rem, 3vw, 2.3rem); font-weight: 500; letter-spacing: -.035em; }
.site-home-meet-card p { margin: 0 0 1.4rem; font-family: Georgia, serif; font-size: 1rem; line-height: 1.45; }
.site-home-meet-card strong { margin-top: auto; font-size: .8rem; }
.site-home-meet-card strong b { margin-left: .35rem; }
.site-home-meet-card.is-yappy { background: #ff665f; }
.site-home-meet-card.is-yappy figure { border-bottom: 8px solid var(--yellow); }
.site-home-meet-card.is-yappy span { color: #172c38; }
.site-home-meet-card.is-homebody { color: #31352e; background: #d9c4a5; }
.site-home-meet-card.is-homebody figure { border-bottom: 8px solid #65755d; }
.site-home-meet-card.is-homebody span { color: #a9583f; }
.site-home-meet-card.is-memory { color: #fff9ed; background: #202538; border-color: #e5cb93; box-shadow: 7px 8px 0 #e5cb93; }
.site-home-meet-card.is-memory:hover { box-shadow: 10px 13px 0 #e5cb93; }
.site-home-meet-card.is-memory:active { box-shadow: 4px 5px 0 #e5cb93; }
.site-home-meet-card.is-memory figure { border-bottom: 8px solid #e5cb93; filter: saturate(.78); }
.site-home-meet-card.is-memory span,
.site-home-meet-card.is-memory strong { color: #e5cb93; }
.site-home-feelings { margin: 0 clamp(1.1rem, 5vw, 3.4rem); padding: clamp(4.2rem, 8vw, 7rem) clamp(1.2rem, 5vw, 4.5rem); color: var(--cream); background: var(--ink); border-radius: clamp(24px, 4vw, 52px); text-align: center; }
.site-home-feelings .site-home-eyebrow { color: #79d2d2; }
.site-home-feelings h2 { max-width: 970px; margin: 0 auto; font-family: Georgia, serif; font-size: clamp(3rem, 7vw, 6.2rem); font-weight: 400; line-height: .94; letter-spacing: -.055em; }
.site-home-feelings h2 em { color: var(--coral); font-style: italic; font-weight: 400; }
.site-home-feelings-copy { max-width: 660px; margin: 2rem auto 0; color: rgba(255,247,234,.74); font-family: Georgia, serif; font-size: clamp(1.08rem, 2vw, 1.35rem); line-height: 1.55; }
.site-home-footer { min-height: 190px; padding: 3.5rem 1.2rem max(3rem, env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: center; gap: .7rem; color: var(--ink); }
.site-home-footer svg { width: 34px; height: 34px; filter: drop-shadow(0 5px 10px rgba(52,16,57,.12)); }
.site-home-footer strong { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; }

@media (max-width: 760px) {
  .site-home-nav { min-height: 76px; }
  .site-home-nav > span { display: none; }
  .site-home-hero { min-height: auto; padding-top: 2.8rem; grid-template-columns: 1fr; gap: 3.3rem; }
  .site-home-copy h1 { font-size: clamp(3.55rem, 17vw, 5.4rem); }
  .site-home-product { width: min(88vw, 350px); margin: 1rem auto -.2rem; }
  .site-home-portrait { width: min(94%, 430px); }
  .site-home-meet-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .site-home-meet-card { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); border-radius: 18px; }
  .site-home-meet-card figure { height: 100%; aspect-ratio: auto; border-right: 7px solid; border-bottom: 0 !important; }
  .site-home-meet-card > div { min-height: 230px; padding: 1.15rem 1rem; }
  .site-home-meet-card h3 { font-size: 1.75rem; }
  .site-home-meet-card.is-yappy figure { border-right-color: var(--yellow); }
  .site-home-meet-card.is-homebody figure { border-right-color: #65755d; }
  .site-home-meet-card.is-memory figure { border-right-color: #e5cb93; }
  .site-home-feelings { margin-inline: .75rem; padding-inline: 1.1rem; }
}

@media (max-width: 440px) {
  .site-home-meet-card { grid-template-columns: 1fr; }
  .site-home-meet-card figure { aspect-ratio: 1.2 / 1; border-right: 0; border-bottom: 7px solid !important; }
}

.app-header { position: sticky; z-index: 40; top: 0; min-height: 66px; padding: max(.65rem, env(safe-area-inset-top)) 1rem .65rem; display: flex; align-items: center; gap: .7rem; color: var(--cream); background: rgba(52,16,57,.96); border-bottom: 1px solid rgba(255,255,255,.15); backdrop-filter: blur(14px); }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; }
.brand-mark svg { width: 40px; height: 40px; display: block; filter: drop-shadow(0 5px 12px rgba(0,0,0,.13)); }
.app-header > div:nth-child(2) { display: flex; flex-direction: column; line-height: 1.05; }
.brand-kicker { color: #eaddec; font-size: .61rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.app-header strong { font-size: 1rem; }
.prototype-chip { margin-left: auto; padding: .35rem .55rem; color: #d7e2e4; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.app-shell { width: min(100%, 720px); min-height: calc(100svh - 66px); margin: 0 auto; background: rgba(255,255,255,.12); }
.claim-screen, .waiting-screen, .success-screen { min-height: calc(100svh - 66px); padding: 2.6rem 1.25rem max(2.5rem, env(safe-area-inset-bottom)); display: flex; flex-direction: column; justify-content: center; }

.welcome-screen { position: fixed; z-index: 200; inset: 0; min-height: 100svh; overflow: hidden; display: grid; place-items: center; padding: max(2.5rem, env(safe-area-inset-top)) 1.5rem max(2.5rem, env(safe-area-inset-bottom)); color: #341039; background: #fff7ea; opacity: 0; cursor: pointer; transition: opacity .75s cubic-bezier(.22,.61,.36,1); }
.welcome-screen.visible { opacity: 1; }
.welcome-screen.leaving { opacity: 0; }
.welcome-screen:focus-visible { outline: 3px solid #7187f5; outline-offset: -7px; }
.welcome-inner { position: relative; z-index: 2; width: min(100%, 590px); display: flex; flex-direction: column; align-items: center; text-align: center; opacity: 0; transform: translateY(14px) scale(.985); transition: opacity .9s .12s ease, transform 1s .12s cubic-bezier(.22,.61,.36,1); }
.welcome-screen.visible .welcome-inner { opacity: 1; transform: translateY(0) scale(1); }
.welcome-screen.leaving .welcome-inner { opacity: 0; transform: translateY(-8px) scale(1.01); transition-delay: 0s; transition-duration: .5s; }
.snootiki-logo { width: min(92%, 470px); height: auto; overflow: visible; filter: drop-shadow(0 14px 24px rgba(52,16,57,.07)); }
.welcome-rule { width: 42px; height: 2px; margin: 1.3rem 0 1.55rem; background: linear-gradient(90deg, #ff5f66, #7187f5); border-radius: 999px; }
.welcome-screen h1 { margin: 0; color: #341039; font-family: Georgia, serif; font-size: clamp(2.35rem, 10vw, 4.35rem); font-weight: 500; line-height: 1.03; letter-spacing: -.045em; }
.welcome-screen p { margin: 1.15rem 0 0; color: #735d75; font-family: Georgia, serif; font-size: clamp(1rem, 4.3vw, 1.25rem); line-height: 1.55; }
.welcome-prompt { margin-top: 2rem; padding: .72rem 1.05rem; display: inline-flex; align-items: center; gap: .65rem; color: #fff7ea; background: #341039; border: 1px solid rgba(52,16,57,.16); border-radius: 999px; box-shadow: 0 10px 28px rgba(52,16,57,.14); font-size: .76rem; font-weight: 800; letter-spacing: .06em; transition: transform .2s ease, box-shadow .2s ease; }
.welcome-prompt b { color: #ff7b80; font-size: 1rem; }
.welcome-screen:hover .welcome-prompt { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(52,16,57,.18); }
.welcome-screen:active .welcome-prompt { transform: translateY(1px) scale(.985); }
.welcome-glow { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .72; transform: scale(.92); transition: transform 1.8s cubic-bezier(.22,.61,.36,1); }
.welcome-screen.visible .welcome-glow { transform: scale(1); }
.welcome-glow-one { width: min(82vw, 560px); aspect-ratio: 1; top: -31%; right: -37%; background: radial-gradient(circle, rgba(255,95,102,.20), rgba(255,95,102,0) 68%); }
.welcome-glow-two { width: min(96vw, 660px); aspect-ratio: 1; bottom: -38%; left: -43%; background: radial-gradient(circle, rgba(113,135,245,.15), rgba(113,135,245,0) 70%); }

.claim-art { position: relative; width: 210px; height: 210px; margin: 0 auto 1.8rem; display: grid; place-items: center; }
.key-disc { position: relative; z-index: 2; width: 128px; height: 128px; display: grid; place-items: center; color: var(--cream); background: var(--coral); border: 5px solid var(--ink); border-radius: 50%; box-shadow: 10px 12px 0 var(--yellow), 16px 18px 0 var(--ink); transform: rotate(-5deg); }
.key-signal { position: absolute; top: 23px; left: 18px; font-family: monospace; font-size: .95rem; font-weight: 900; transform: rotate(-42deg); }
.key-paw { font-size: 3rem; text-shadow: 18px -6px 0 var(--cream), -14px -5px 0 var(--cream), 0 -20px 0 var(--cream); transform: scale(.35); }
.orbit { position: absolute; border: 2px dashed var(--teal); border-radius: 50%; }
.orbit-one { inset: 11px; animation: slow-spin 20s linear infinite; }
.orbit-two { inset: 34px; border-color: var(--purple); animation: slow-spin 14s linear infinite reverse; }
.eyebrow { margin: 0 0 .65rem; color: var(--teal); font-size: .68rem; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
.claim-screen h1, .waiting-screen h1, .success-screen h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(2.7rem, 12vw, 4.8rem); font-weight: 500; line-height: .98; letter-spacing: -.05em; }
.claim-screen h1 em, .waiting-screen h1 em { color: var(--coral); font-style: italic; }
.waiting-screen { text-align: center; }
.waiting-mark { width: 104px; height: 104px; margin: 0 auto 1.7rem; display: grid; place-items: center; color: var(--ink); background: var(--yellow); border: 3px solid var(--ink); border-radius: 48% 52% 44% 56%; box-shadow: 7px 8px 0 var(--teal); font-size: 1.9rem; transform: rotate(-4deg); }
.waiting-mark span { animation: memorial-breathe 2.4s ease-in-out infinite; }
.waiting-screen .eyebrow { text-align: center; }
.waiting-screen .lead { max-width: 480px; margin-inline: auto; }
.lead { margin: 1.25rem 0 1.5rem; color: var(--muted); font-family: Georgia, serif; font-size: 1.05rem; line-height: 1.5; }
.key-status-card, .ready-key-card { margin-bottom: 1.1rem; padding: .95rem 1rem; display: flex; align-items: center; justify-content: space-between; background: var(--cream); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 30px rgba(23,44,56,.07); }
.key-status-card span:first-child { display: flex; flex-direction: column; }
.key-status-card small, .ready-key-card small { color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.key-status-card strong, .ready-key-card strong { font-size: 1rem; letter-spacing: .05em; }
.status-dot, .ready-status { padding: .4rem .6rem; color: var(--terracotta); background: #f4e0d4; border-radius: 999px; font-size: .7rem; font-weight: 800; }
.privacy-note, .upload-note, .seal-note { margin: .85rem auto 0; color: var(--muted); font-size: .72rem; line-height: 1.45; text-align: center; }

.primary-button, .secondary-button, .seal-button, .back-button { min-height: 52px; padding: .82rem 1.05rem; border-radius: 10px; font-weight: 850; cursor: pointer; transition: transform .18s, box-shadow .18s, opacity .18s; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: .7rem; color: white; background: var(--ink); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--yellow); }
.secondary-button { color: var(--ink); background: var(--cream); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--teal); }
.seal-button { color: white; background: var(--success); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--yellow); }
.back-button { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.primary-button:active, .secondary-button:active, .seal-button:active { transform: translate(3px,3px); box-shadow: 1px 1px 0 var(--yellow); }
.wide { width: 100%; }
.text-button { padding: .3rem; color: var(--ink); background: transparent; border: 0; font-size: .8rem; font-weight: 800; cursor: pointer; }
.text-button.centered { align-self: center; margin-top: 1rem; }

.creator { padding-bottom: max(2rem, env(safe-area-inset-bottom)); }
.creator-topline { padding: .9rem 1.1rem .45rem; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .72rem; }
.creator-topline span { padding: .3rem .5rem; color: var(--success); background: #e0eee5; border-radius: 999px; font-weight: 800; }
.progress-wrap { padding: .4rem 1.25rem 1.25rem; border-bottom: 1px solid var(--line); }
.progress-copy { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.progress-copy span { color: var(--muted); font-size: .7rem; font-weight: 800; }
.progress-copy strong { font-family: Georgia, serif; font-size: 1.12rem; font-weight: 600; }
.progress-track { height: 5px; margin-top: .75rem; overflow: hidden; background: #ded8cd; border-radius: 999px; }
.progress-track span { display: block; width: 20%; height: 100%; background: linear-gradient(90deg, var(--teal), var(--coral)); border-radius: inherit; transition: width .4s ease; }

.step { display: none; padding: 2.1rem 1.25rem 1.4rem; }
.step.active { display: block; animation: step-in .45s ease both; }
.step h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(2rem, 9.5vw, 3.4rem); font-weight: 500; line-height: 1; letter-spacing: -.045em; }
.step-intro { margin: .9rem 0 1.5rem; color: var(--muted); font-family: Georgia, serif; font-size: .96rem; line-height: 1.48; }

.theme-grid { display: grid; gap: 1rem; }
.theme-card { position: relative; display: grid; grid-template-columns: 130px 1fr; min-height: 155px; overflow: hidden; background: var(--cream); border: 2px solid var(--line); border-radius: 16px; cursor: pointer; transition: border .2s, transform .2s, box-shadow .2s; }
.theme-card input { position: absolute; opacity: 0; pointer-events: none; }
.theme-card.selected { border-color: var(--ink); box-shadow: 5px 6px 0 var(--ink); transform: translateY(-2px); }
.theme-check { position: absolute; z-index: 5; top: .6rem; right: .6rem; width: 28px; height: 28px; display: grid; place-items: center; color: white; background: var(--ink); border-radius: 50%; opacity: 0; font-weight: 900; }
.theme-card.selected .theme-check { opacity: 1; }
.theme-visual { position: relative; overflow: hidden; display: block; min-height: 155px; }
.theme-visual img { width: 100%; height: 100%; display: block; object-fit: cover; }
.theme-copy { padding: 2.8rem .85rem .8rem; display: flex; flex-direction: column; }
.theme-copy strong { font-size: 1rem; }
.theme-copy small { margin: .25rem 0 .6rem; color: var(--teal); font-size: .63rem; font-weight: 850; text-transform: uppercase; }
.theme-copy > span { color: var(--muted); font-family: Georgia, serif; font-size: .82rem; line-height: 1.35; }
.yappy-theme .theme-visual { background: var(--coral); }
.yappy-theme .theme-visual img { filter: saturate(1.1); }
.yappy-theme .theme-visual b { position: absolute; left: .35rem; bottom: .65rem; padding: .25rem .35rem; color: var(--yellow); background: var(--teal); border: 2px solid var(--ink); font-family: Impact, sans-serif; font-size: 1.35rem; transform: rotate(-5deg); }
.scribble { position: absolute; width: 34px; border-top: 5px double var(--yellow); }
.scribble-a { top: 15px; left: 8px; transform: rotate(18deg); }
.scribble-b { right: 8px; bottom: 15px; border-color: var(--purple); transform: rotate(-22deg); }
.homebody-theme .theme-visual { display: grid; place-items: center; padding: .7rem; background: linear-gradient(rgba(101,117,93,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(101,117,93,.09) 1px, transparent 1px), #d9c4a5; background-size: 14px 14px; }
.homebody-mini-cover { position: relative; z-index: 2; width: 88%; min-height: 132px; padding: .75rem .45rem .55rem; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #31352e; background: #faf5e9; border: 1px solid rgba(49,53,46,.4); border-radius: 48% 48% 5px 5px / 20% 20% 5px 5px; box-shadow: 0 7px 14px rgba(61,76,61,.18), inset 0 0 0 4px #f3ead9; text-align: center; }
.homebody-mini-cover svg { width: 24px; height: 24px; fill: none; stroke: #a9583f; stroke-width: 5; stroke-linejoin: round; }
.homebody-mini-cover small { margin-top: .15rem; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .42rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.homebody-mini-cover b { margin-top: .08rem; color: #3d4c3d; font-family: "Segoe Print", "Bradley Hand", cursive; font-size: 1.15rem; line-height: 1; }
.homebody-mini-cover i { width: 70%; margin: .35rem 0; border-top: 1px dashed #b87b71; }
.homebody-mini-cover em { padding: .22rem .35rem; color: #faf5e9; background: #3d4c3d; box-shadow: 2px 2px 0 #d4a23f; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .4rem; font-style: normal; font-weight: 800; }
.homebody-mini-quilt { position: absolute; width: 52px; aspect-ratio: 1; opacity: .75; background: conic-gradient(from 45deg, #a9583f 0 25%, #d4a23f 0 50%, #4c6674 0 75%, #65755d 0); border: 3px solid #faf5e9; box-shadow: 0 0 0 1px #31352e; }
.homebody-mini-quilt-one { left: -22px; top: -18px; transform: rotate(12deg); }
.homebody-mini-quilt-two { right: -24px; bottom: -20px; transform: rotate(-9deg); }
.memorial-theme .theme-visual { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .8rem .55rem; color: #fff9ed; background: radial-gradient(circle at 50% 42%, rgba(229,203,147,.16), transparent 27%), radial-gradient(circle at 18% 20%, rgba(255,255,255,.7) 0 1px, transparent 2px), radial-gradient(circle at 80% 24%, rgba(255,255,255,.4) 0 1px, transparent 2px), radial-gradient(circle at 72% 80%, rgba(229,203,147,.55) 0 1px, transparent 2px), linear-gradient(155deg, #202538, #30263e 60%, #171c2d); text-align: center; }
.memorial-mini-star { color: #e5cb93; font-size: .78rem; line-height: 1; }
.memorial-theme .theme-visual small { margin-top: .45rem; color: #e5cb93; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .4rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.memorial-theme .theme-visual b { margin-top: .25rem; color: #fff9ed; font-family: Georgia, serif; font-size: 1.35rem; font-weight: 400; line-height: 1; letter-spacing: -.04em; }
.memorial-mini-rule { width: 28px; height: 1px; margin: .55rem 0; background: #e5cb93; }
.memorial-theme .theme-visual em { padding: .25rem .42rem; color: #202538; background: #e5cb93; border-radius: 999px; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .38rem; font-style: normal; font-weight: 800; }
.memorial-theme .theme-copy small { color: #6c648b; }
.sample-links { margin-top: 1.2rem; display: grid; gap: .55rem; }
.sample-links button { width: 100%; padding: .7rem .8rem; color: var(--teal); background: rgba(255,255,255,.35); border: 1px solid var(--line); border-radius: 8px; font-size: .76rem; font-weight: 800; text-align: left; cursor: pointer; }

.form-stack { display: grid; gap: 1rem; }
.form-stack label, .dedication-card { display: grid; gap: .45rem; }
.form-stack label > span, .dedication-card label { font-size: .76rem; font-weight: 850; }
.form-stack label > span b { margin-left: .35rem; color: var(--coral); font-size: .58rem; text-transform: uppercase; }
.form-stack label > span small { color: var(--muted); font-weight: 500; }
input, select, textarea { width: 100%; padding: .85rem .9rem; color: var(--ink); background: var(--cream); border: 1px solid #bdb5a8; border-radius: 9px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,127,131,.14); }
textarea { resize: vertical; }
.live-title-card { margin-top: 1.3rem; padding: 1rem; display: flex; flex-direction: column; color: white; background: var(--ink); border-radius: 14px; box-shadow: 5px 6px 0 var(--yellow); }
.live-title-card span { color: #b9c6ca; font-size: .62rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.live-title-card strong { margin: .5rem 0 .1rem; font-family: Georgia, serif; font-size: 2.2rem; font-weight: 500; line-height: 1; }
.live-title-card small { color: #e2d8c4; font-family: Georgia, serif; font-style: italic; }

.photo-summary { margin-bottom: .9rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .68rem; }
.photo-summary span:last-child { max-width: 60%; text-align: right; }
.photo-summary strong { color: var(--success); }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.photo-card { position: relative; padding: .45rem; background: var(--cream); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 5px 18px rgba(52,16,57,.06); transition: opacity .18s ease, transform .18s ease, outline-color .18s ease; }
.photo-card.dragging { opacity: .55; transform: scale(.975); }
.photo-card.drag-target { outline: 3px solid var(--periwinkle); outline-offset: 3px; }
.photo-enlarge { width: 100%; padding: 0; display: block; overflow: hidden; background: transparent; border: 0; border-radius: 8px; cursor: zoom-in; }
.photo-card img { width: 100%; aspect-ratio: 1 / .9; display: block; object-fit: cover; border-radius: 8px; }
.photo-card.cover { outline: 3px solid var(--yellow); border-color: var(--ink); }
.photo-card.cover.drag-target { outline-color: var(--periwinkle); }
.photo-position { position: absolute; top: .7rem; left: .7rem; min-width: 28px; height: 28px; padding: 0 .4rem; display: grid; place-items: center; color: white; background: rgba(23,44,56,.9); border-radius: 999px; font-size: .65rem; font-weight: 900; }
.photo-drag-handle { position: absolute; z-index: 4; top: .72rem; right: .72rem; width: 31px; height: 31px; display: grid; place-items: center; color: white; background: rgba(52,16,57,.9); border: 1px solid rgba(255,255,255,.55); border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,.16); font-size: 1rem; font-weight: 900; line-height: 1; cursor: grab; touch-action: none; user-select: none; }
.photo-drag-handle:active { cursor: grabbing; }
.photo-actions { padding-top: .45rem; display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; }
.photo-actions button { min-height: 30px; padding: .3rem; display: grid; place-items: center; color: var(--ink); background: #eee8dc; border: 0; border-radius: 6px; font-size: .62rem; font-weight: 800; cursor: pointer; }
.photo-actions .replace-button { grid-column: 1 / -1; color: white; background: var(--teal); }
.replace-input { display: none; }
.photo-actions button:disabled { opacity: .35; cursor: default; }

.dedication-card { position: relative; margin-bottom: 1.3rem; padding: 1rem; background: #ece5d8; border-radius: 12px; }
.dedication-card small { color: var(--muted); font-size: .65rem; text-align: right; }
.caption-list { display: grid; gap: .75rem; }
.caption-row { display: grid; grid-template-columns: 58px 1fr; gap: .7rem; align-items: center; }
.caption-row img { width: 58px; height: 58px; object-fit: cover; border-radius: 9px; }
.caption-row label { display: grid; gap: .3rem; color: var(--muted); font-size: .62rem; font-weight: 800; }
.caption-row textarea { min-height: 58px; padding: .65rem .7rem; font-size: .8rem; line-height: 1.35; resize: vertical; }

.review-card { overflow: hidden; margin-bottom: 1rem; display: grid; grid-template-columns: 42% 1fr; background: var(--cream); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 32px rgba(23,44,56,.08); }
.review-cover { position: relative; min-height: 250px; overflow: hidden; background: var(--coral); }
.review-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.review-cover span { position: absolute; left: .55rem; bottom: .55rem; padding: .35rem .45rem; color: var(--yellow); background: var(--ink); border: 2px solid white; font-size: .72rem; font-weight: 900; transform: rotate(-3deg); }
.review-details { padding: 1rem .85rem; }
.review-details .eyebrow { margin-bottom: .25rem; }
.review-details h3 { margin: 0; font-family: Georgia, serif; font-size: 1.7rem; font-weight: 500; line-height: 1; }
.review-details > p:not(.eyebrow) { margin: .35rem 0 1rem; color: var(--muted); font-family: Georgia, serif; font-size: .82rem; font-style: italic; }
.review-details dl { margin: 0; display: grid; gap: .65rem; }
.review-details dl div { padding-top: .55rem; display: flex; justify-content: space-between; gap: .5rem; border-top: 1px solid var(--line); font-size: .68rem; }
.review-details dt { color: var(--muted); }
.review-details dd { margin: 0; font-weight: 800; }
#previewButton { margin-bottom: .75rem; }
.form-navigation { position: sticky; z-index: 30; bottom: 0; padding: .85rem 1.1rem max(.85rem, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 100px 1fr; gap: .7rem; background: rgba(247,241,229,.95); border-top: 1px solid var(--line); backdrop-filter: blur(12px); }
.form-navigation.review-only { grid-template-columns: 1fr; }

.gift-preview { position: fixed; z-index: 100; inset: 0; overflow: auto; background: var(--paper); }
.preview-toolbar { position: sticky; z-index: 120; top: 0; min-height: 56px; padding: max(.65rem, env(safe-area-inset-top)) 1rem .65rem; display: flex; align-items: center; justify-content: space-between; color: white; background: rgba(23,44,56,.94); backdrop-filter: blur(12px); }
.preview-toolbar span { font-size: .75rem; font-weight: 800; }
.preview-toolbar button { padding: .45rem .7rem; color: var(--ink); background: white; border: 0; border-radius: 999px; font-size: .72rem; font-weight: 850; cursor: pointer; }
.preview-experience { max-width: 650px; margin: 0 auto; }
.preview-hero, .preview-closing { min-height: calc(100svh - 56px); padding: 5rem 1.25rem 3rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.preview-hero > p { margin: 0 0 .5rem; font-size: .7rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.preview-hero h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(4rem, 20vw, 7rem); font-weight: 500; line-height: .85; letter-spacing: -.06em; }
.preview-hero > span { margin: .65rem 0 1.5rem; font-family: Georgia, serif; font-style: italic; }
.preview-hero img { width: min(85vw, 500px); aspect-ratio: 1 / 1; display: block; object-fit: cover; }
.preview-memories { padding: 3rem 1.25rem; display: grid; gap: 2.5rem; }
.preview-memory { margin: 0; }
.preview-memory img { width: 100%; max-height: 70svh; display: block; object-fit: cover; }
.preview-memory figcaption { margin-top: .7rem; font-family: Georgia, serif; text-align: center; }
.preview-closing p { margin: 0 0 1.4rem; font-family: Georgia, serif; font-size: clamp(2.4rem, 12vw, 4.5rem); line-height: 1; letter-spacing: -.04em; }
.preview-closing span { font-size: .66rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.preview-signature { display: inline-flex; align-items: center; gap: .55rem; }
.preview-signature svg { width: 24px; height: 24px; display: block; filter: drop-shadow(0 4px 10px rgba(0,0,0,.14)); }
.yappy-preview .preview-hero { color: var(--ink); background: var(--coral); }
.yappy-preview .preview-hero h2 { color: var(--yellow); font-family: Impact, sans-serif; -webkit-text-stroke: 2px var(--ink); text-shadow: 5px 5px 0 var(--teal); }
.yappy-preview .preview-hero img { border: 5px solid var(--ink); border-radius: 9% 18% 8% 14%; box-shadow: 10px 12px 0 var(--ink); transform: rotate(-2deg); }
.yappy-preview .preview-memories { background: var(--yellow); }
.yappy-preview .preview-memory { padding: .65rem .65rem 1rem; background: white; border: 3px solid var(--ink); box-shadow: 7px 8px 0 var(--ink); transform: rotate(-1deg); }
.yappy-preview .preview-memory:nth-child(even) { transform: rotate(1.5deg); }
.yappy-preview .preview-closing { color: white; background: var(--purple); }
.homebody-preview .preview-hero { color: var(--ink); background: #d9c4a5; }
.homebody-preview .preview-hero h2 { color: var(--sage); font-family: "Segoe Print", cursive; }
.homebody-preview .preview-hero img { padding: .6rem .6rem 2.4rem; background: var(--cream); border: 9px solid var(--sage); border-radius: 48% 48% 5px 5px; box-shadow: 0 14px 34px rgba(23,44,56,.2); }
.homebody-preview .preview-memories { background: var(--paper); }
.homebody-preview .preview-memory { padding: .65rem .65rem 1rem; background: white; border: 1px solid var(--line); box-shadow: 5px 8px 18px rgba(23,44,56,.15); transform: rotate(-1deg); }
.homebody-preview .preview-memory:nth-child(even) { transform: rotate(1deg); }
.homebody-preview .preview-closing { color: var(--cream); background: var(--sage); }
.memorial-preview .preview-hero { color: #fff7ea; background: #30344d; }
.memorial-preview .preview-hero > p { color: #f4dfaa; }
.memorial-preview .preview-hero h2 { color: #f4dfaa; font-family: Georgia, serif; font-style: italic; text-shadow: 0 8px 28px rgba(0,0,0,.2); }
.memorial-preview .preview-hero > span { color: #eee5dc; }
.memorial-preview .preview-hero img { padding: .55rem; background: #fff7ea; border: 1px solid #f4dfaa; border-radius: 50% 50% 5px 5px; box-shadow: 0 18px 44px rgba(0,0,0,.28); filter: saturate(.82) contrast(.97); }
.memorial-preview .preview-memories { background: #eee9e1; }
.memorial-preview .preview-memory { padding: .7rem .7rem 1.15rem; background: #fffdf7; border: 1px solid #d7c8aa; box-shadow: 0 9px 26px rgba(48,52,77,.12); }
.memorial-preview .preview-memory figcaption { color: #5f566a; font-style: italic; }
.memorial-preview .preview-closing { color: #fff7ea; background: #341039; }
.memorial-preview .preview-closing span { color: #f4dfaa; }

/* YAPPY! is an experience, not a generic gallery skin. */
.gift-preview.experience-locked { overflow: hidden; }
.preview-experience.yappy-preview { max-width: none; color: #172c38; background: #eee9de; font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif; }
.yappy-svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }

.yappy-intro {
  position: fixed;
  z-index: 105;
  inset: 0;
  min-height: 100svh;
  padding-top: 56px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #172c38;
  background: #ff7044;
  transition: transform .9s cubic-bezier(.76,0,.24,1), visibility .9s;
}
.yappy-intro.dismissed { visibility: hidden; transform: translateY(-105%); }
.yappy-paint-bands {
  position: absolute;
  inset: -8%;
  opacity: .95;
  background: repeating-linear-gradient(177deg, #05858b 0 8%, #17a9ad 8% 13%, #ffd738 13% 25%, #f49a28 25% 33%, #ff7044 33% 41%, #6147b9 41% 49%, #159ab3 49% 58%, #ffd738 58% 70%);
  filter: saturate(1.08);
  transform: rotate(-3deg) scale(1.1);
}
.yappy-paint-bands::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 2px, rgba(0,0,0,.035) 2px 4px); mix-blend-mode: overlay; }
.yappy-intro-copy { position: relative; z-index: 3; width: min(90%, 620px); padding: 2rem 1rem; text-align: center; animation: yappy-rise-in .9s .15s both; }
.yappy-eyebrow,
.yappy-small-kicker,
.yappy-section-label,
.yappy-party-kicker { margin: 0 0 .75rem; font-size: .74rem; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
.yappy-eyebrow { display: inline-block; padding: .58rem .85rem; color: #172c38; background: #eee9de; border: 3px solid #172c38; box-shadow: 5px 5px 0 #172c38; transform: rotate(-2deg); }
.yappy-block-title { margin: .9rem 0 .25rem; color: #ffd738; font-family: Impact, Haettenschweiler, "Arial Black", sans-serif; font-size: clamp(4.7rem, 21vw, 9rem); font-weight: 950; line-height: .8; letter-spacing: -.055em; text-transform: uppercase; -webkit-text-stroke: 3px #172c38; text-shadow: 4px 4px 0 #172c38, 8px 8px 0 #05858b, 12px 12px 0 #172c38; transform: skewY(-2deg); }
.yappy-formal-name { margin: 1.25rem 0 0; font-size: clamp(1.45rem, 6vw, 2.3rem); font-weight: 950; }
.yappy-subtitle { margin: .25rem 0 1.65rem; font-family: Georgia, serif; font-size: clamp(1rem, 4.3vw, 1.35rem); font-style: italic; font-weight: 700; }
.yappy-begin-button,
.yappy-top-button { min-height: 54px; padding: .85rem 1.2rem; display: inline-flex; align-items: center; gap: 1rem; color: #eee9de; background: #172c38; border: 3px solid #172c38; border-radius: 999px; box-shadow: 5px 5px 0 rgba(255,255,255,.75); font-weight: 900; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.yappy-begin-button:active,
.yappy-top-button:active { box-shadow: 1px 1px 0 rgba(255,255,255,.75); transform: translate(4px,4px); }
.yappy-intro-paw { position: absolute; z-index: 2; width: 70px; height: 70px; fill: none; stroke: #eee9de; stroke-width: 5; opacity: .8; }
.yappy-paw-one { top: 12%; left: 6%; transform: rotate(-18deg); }
.yappy-paw-two { right: 4%; bottom: 8%; transform: rotate(18deg) scale(.8); }
.yappy-scribble { position: absolute; z-index: 2; width: 72px; height: 28px; border-top: 7px double #f0648d; transform: rotate(15deg); }
.yappy-scribble-one { right: 8%; top: 20%; }
.yappy-scribble-two { left: 8%; bottom: 14%; border-color: #ffd738; transform: rotate(-18deg); }

.yappy-mini-header { position: fixed; z-index: 90; top: max(4.35rem, calc(env(safe-area-inset-top) + 3.6rem)); left: 50%; width: min(calc(100% - 1.25rem), 580px); min-height: 48px; padding: .4rem .55rem .4rem .4rem; display: flex; align-items: center; gap: .55rem; color: #eee9de; background: rgba(23,44,56,.92); border: 2px solid rgba(255,255,255,.38); border-radius: 999px; box-shadow: 0 8px 30px rgba(23,44,56,.2); backdrop-filter: blur(12px); transform: translate(-50%, -220%); transition: transform .5s .4s cubic-bezier(.2,.8,.2,1); }
.yappy-mini-header.visible { transform: translate(-50%, 0); }
.yappy-mini-header > span:nth-child(2) { overflow: hidden; font-size: .9rem; font-weight: 950; letter-spacing: .05em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.yappy-mini-header button { margin-left: auto; color: #eee9de; background: transparent; border: 0; font-size: .75rem; font-weight: 850; cursor: pointer; }
.yappy-mini-paw { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; background: #ffd738; border-radius: 50%; }
.yappy-mini-paw svg { width: 24px; height: 24px; fill: #172c38; }

.yappy-gallery { max-width: 720px; margin: 0 auto; overflow: hidden; background: #eee9de; box-shadow: 0 0 80px rgba(23,44,56,.15); }
.yappy-panel { position: relative; min-height: calc(100svh - 56px); padding: 6.4rem 1.3rem 4rem; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.yappy-coral-panel { background: #ff7044; }
.yappy-photo-frame { position: relative; z-index: 2; overflow: hidden; background: #eee9de; border: 4px solid #172c38; box-shadow: 10px 12px 0 #172c38; }
.yappy-photo-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.yappy-hero-frame { width: min(86vw, 540px); aspect-ratio: 1 / 1; margin: 0 auto; border-radius: 8% 17% 7% 13%; transform: rotate(-2deg); }
.yappy-hero-frame::after,
.yappy-moment::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 8px rgba(255,255,255,.12); }
.yappy-yay-sticker { position: relative; z-index: 4; align-self: flex-end; margin: -2.2rem .4rem 0 0; padding: .65rem .8rem .55rem; color: #ffd738; background: #05858b; border: 3px solid #172c38; box-shadow: 6px 6px 0 #172c38; font-family: Impact, "Arial Black", sans-serif; font-size: clamp(2.5rem, 12vw, 4.5rem); letter-spacing: -.03em; line-height: .85; -webkit-text-stroke: 2px #172c38; transform: rotate(4deg); }
.yappy-caption-card { position: relative; z-index: 3; width: fit-content; max-width: 90%; margin: 2rem auto 0; padding: .8rem 1rem; color: white; background: #05858b; border: 3px solid #172c38; box-shadow: 5px 5px 0 #172c38; font-family: Georgia, serif; font-weight: 700; text-align: center; transform: rotate(-1deg); }
.yappy-doodle { position: absolute; z-index: 1; font-family: "Comic Sans MS", cursive; font-size: 5rem; font-weight: 900; }
.yappy-doodle-spiral { top: 9%; right: 2%; color: #2356a8; transform: rotate(15deg); }
.yappy-doodle-zig { bottom: 5%; left: 2%; color: #19b96b; transform: rotate(-35deg); }

.yappy-paper-panel { background: #eee9de; }
.yappy-paper-panel h2,
.yappy-moments-panel h2,
.yappy-party-panel h2,
.yappy-portrait-panel h2,
.yappy-closing h2 { position: relative; z-index: 3; margin: 0 0 1.6rem; font-family: Impact, "Arial Black", sans-serif; font-size: clamp(3.3rem, 15vw, 6rem); line-height: .88; letter-spacing: -.035em; text-transform: uppercase; }
.yappy-paper-panel h2 span { color: #6147b9; }
.yappy-nap-frame { width: 90%; aspect-ratio: 4 / 3; margin: .5rem auto; border-radius: 46% 5% 41% 4%; box-shadow: 10px 12px 0 #6147b9; transform: rotate(2deg); }
.yappy-hand-note { position: relative; z-index: 4; align-self: flex-end; max-width: 88%; margin: -1.1rem .8rem 0 0; padding: .65rem .8rem; color: #172c38; background: #ffd738; border: 3px solid #172c38; box-shadow: 5px 5px 0 #172c38; font-family: "Comic Sans MS", cursive; font-size: 1rem; font-weight: 900; transform: rotate(-5deg); }
.yappy-float-bone { position: absolute; right: 1rem; top: 12%; width: 100px; height: 55px; fill: none; stroke: #6147b9; stroke-width: 5; transform: rotate(16deg); }

.yappy-adventure-panel { color: white; background: #05858b; }
.yappy-sunburst { position: absolute; inset: -20%; background: repeating-conic-gradient(from 5deg, rgba(255,215,56,.17) 0 8deg, transparent 8deg 18deg); }
.yappy-section-label { position: relative; z-index: 2; color: #ffd738; }
.yappy-adventure-frame { width: 92%; aspect-ratio: 1.3 / 1; margin: 0 auto; box-shadow: 12px 12px 0 #ffd738; transform: rotate(1.5deg); }
.yappy-adventure-title { position: relative; z-index: 4; margin: -1rem 0 0; color: #ff7044; font-family: Impact, "Arial Black", sans-serif; font-size: clamp(4rem, 17vw, 7rem); line-height: .79; letter-spacing: -.04em; -webkit-text-stroke: 3px #172c38; text-shadow: 5px 5px 0 #ffd738, 9px 9px 0 #172c38; transform: rotate(-3deg); }
.yappy-float-paw { position: absolute; right: 1rem; bottom: 5%; width: 74px; height: 74px; fill: none; stroke: #19b96b; stroke-width: 5; transform: rotate(16deg); }

.yappy-moments-panel { min-height: auto; padding-top: 6.8rem; background: #ffd738; }
.yappy-moments-panel h2 { color: #2356a8; text-shadow: 4px 4px 0 #eee9de, 7px 7px 0 #172c38; -webkit-text-stroke: 2px #172c38; }
.yappy-moment-grid { position: relative; z-index: 2; padding: .6rem .4rem 3rem; display: grid; gap: 2.3rem; }
.yappy-moment { position: relative; margin: 0; padding: .65rem .65rem 1rem; background: #eee9de; border: 3px solid #172c38; box-shadow: 8px 9px 0 #172c38; }
.yappy-moment img { width: 100%; aspect-ratio: 1 / .88; display: block; object-fit: cover; border: 2px solid #172c38; }
.yappy-moment figcaption { padding: .75rem .25rem .1rem; font-family: "Comic Sans MS", cursive; font-size: 1rem; font-weight: 900; text-align: center; }
.yappy-card-1 { transform: rotate(-2deg); }
.yappy-card-2 { transform: rotate(2.5deg); }
.yappy-card-3 { transform: rotate(-1deg); }

.yappy-party-panel { color: white; background: #6147b9; }
.yappy-party-panel h2 { color: #ffd738; text-shadow: 5px 5px 0 #f0648d, 9px 9px 0 #172c38; -webkit-text-stroke: 2px #172c38; }
.yappy-party-kicker { color: #ffc9db; }
.yappy-party-photo { width: 86%; aspect-ratio: .9 / 1; margin: 0 auto; border-radius: 49% 49% 8% 8%; box-shadow: 10px 12px 0 #f0648d; transform: rotate(2deg); }
.yappy-party-photo img { min-height: 135%; object-fit: cover; transform: translateY(-8.7%); }
.yappy-party-note { position: relative; z-index: 4; align-self: flex-end; max-width: 88%; margin: -1.7rem 0 0; padding: .8rem 1rem; color: #172c38; background: #eee9de; border: 3px solid #172c38; box-shadow: 5px 5px 0 #172c38; font-family: Georgia, serif; font-size: 1rem; font-weight: 700; transform: rotate(-3deg); }
.yappy-confetti { position: absolute; inset: 0; opacity: .7; background-image: radial-gradient(#ffd738 2px, transparent 3px), radial-gradient(#f0648d 3px, transparent 4px), radial-gradient(#19b96b 2px, transparent 3px); background-size: 47px 47px, 71px 71px, 89px 89px; background-position: 0 0, 23px 9px, 11px 31px; }

.yappy-portrait-panel { min-height: calc(100svh - 56px); color: white; background: #2356a8; text-align: center; }
.yappy-portrait-halo { position: absolute; left: 50%; top: 7%; width: 70vw; max-width: 500px; aspect-ratio: 1; background: #ffd738; border-radius: 50%; transform: translateX(-50%); }
.yappy-portrait-frame { width: 72%; max-width: 450px; aspect-ratio: .83 / 1; margin: 0 auto 2.3rem; border-radius: 50% 50% 8% 8%; box-shadow: 11px 12px 0 #ff7044; }
.yappy-portrait-frame img { object-position: 55% center; }
.yappy-portrait-panel .yappy-small-kicker { position: relative; z-index: 3; color: #bdeeff; }
.yappy-portrait-panel h2 { color: #ffd738; text-shadow: 4px 4px 0 #ff7044, 8px 8px 0 #172c38; -webkit-text-stroke: 2px #172c38; }
.yappy-final-title { position: relative; z-index: 3; margin: 0; font-family: Georgia, serif; font-size: 1.15rem; font-style: italic; font-weight: 700; }
.yappy-final-bone { position: absolute; left: 1rem; bottom: 3%; width: 100px; height: 55px; fill: none; stroke: #f0648d; stroke-width: 5; transform: rotate(-18deg); }

.yappy-closing { position: relative; min-height: calc(100svh - 56px); padding: 6rem 1.3rem max(3rem, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #172c38; background: #eee9de; text-align: center; }
.yappy-closing-paw { width: 78px; height: 78px; margin-bottom: 1rem; fill: none; stroke: #19b96b; stroke-width: 5; transform: rotate(-8deg); }
.yappy-closing > p { margin: 0 0 .5rem; font-family: Georgia, serif; font-size: 1.1rem; font-style: italic; font-weight: 700; }
.yappy-closing h2 { color: #ff7044; text-shadow: 4px 4px 0 #ffd738, 7px 7px 0 #172c38; -webkit-text-stroke: 2px #172c38; }
.yappy-closing blockquote { max-width: 520px; margin: 1rem 0 1.5rem; font-family: Georgia, serif; font-size: 1.15rem; font-style: italic; line-height: 1.45; }
.yappy-top-button { margin-top: .25rem; box-shadow: 5px 5px 0 #ffd738; }
.yappy-closing .preview-signature { margin-top: 3rem; color: #172c38; font-size: .66rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; opacity: .62; }
.yappy-reveal { opacity: 0; transform: translateY(35px); transition: opacity .75s ease, transform .85s cubic-bezier(.2,.8,.2,1); }
.yappy-reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes yappy-rise-in { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (min-width: 620px) {
  .yappy-panel { padding-inline: 3rem; }
  .yappy-moment-grid { grid-template-columns: 1fr 1fr; }
  .yappy-card-3 { grid-column: 1 / -1; width: 72%; justify-self: center; }
}

/* HOMEBODY — a warm, tactile album with its own pacing and compositions. */
.preview-experience.homebody-preview { max-width: none; color: #31352e; background: #f3ead9; font-family: Georgia, "Times New Roman", serif; }
.homebody-svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.homebody-intro { position: fixed; z-index: 105; inset: 0; min-height: 100svh; padding: calc(56px + 1.2rem) 1.2rem 1.2rem; display: grid; place-items: center; overflow: hidden; background: linear-gradient(rgba(101,117,93,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(101,117,93,.06) 1px, transparent 1px), #d9c4a5; background-size: 22px 22px; transition: opacity 1s ease, transform 1.1s cubic-bezier(.2,.7,.2,1), visibility 1.1s; }
.homebody-intro.dismissed { visibility: hidden; opacity: 0; transform: scale(1.05); }
.homebody-intro-card { position: relative; z-index: 3; width: min(92%, 540px); padding: 3.1rem 1.4rem 2.5rem; background: #faf5e9; border: 1px solid rgba(49,53,46,.35); border-radius: 48% 48% 10px 10px / 20% 20% 10px 10px; box-shadow: 0 20px 60px rgba(61,76,61,.22), inset 0 0 0 8px #f3ead9, inset 0 0 0 9px rgba(49,53,46,.25); text-align: center; animation: homebody-settle .9s .1s both; }
.homebody-little-house { width: 56px; height: 56px; fill: none; stroke: #a9583f; stroke-width: 4; stroke-linejoin: round; }
.homebody-overline { margin: .55rem 0 .7rem; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .75rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.homebody-intro h2 { margin: 0; color: #3d4c3d; font-family: "Segoe Print", "Bradley Hand", cursive; font-size: clamp(4rem, 18vw, 7rem); font-weight: 700; line-height: .95; letter-spacing: -.055em; }
.homebody-stitched-rule { width: 74%; margin: 1.15rem auto; border-top: 2px dashed #b87b71; }
.homebody-formal-name { margin: 0; font-size: 1.2rem; font-weight: 700; }
.homebody-subtitle { margin: .35rem 0 1.6rem; color: #a9583f; font-size: 1rem; font-style: italic; }
.homebody-album-button { min-height: 52px; padding: .85rem 1.15rem; display: inline-flex; align-items: center; justify-content: center; gap: .8rem; color: #faf5e9; background: #3d4c3d; border: 1px solid #31352e; border-radius: 4px; box-shadow: 4px 4px 0 #d4a23f; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .88rem; font-weight: 800; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.homebody-album-button:active { box-shadow: 1px 1px 0 #d4a23f; transform: translate(3px,3px); }
.homebody-quilt { position: absolute; width: 170px; aspect-ratio: 1; opacity: .75; background: conic-gradient(from 45deg, #a9583f 0 25%, #d4a23f 0 50%, #4c6674 0 75%, #65755d 0); border: 8px solid #faf5e9; box-shadow: 0 0 0 1px #31352e; }
.homebody-quilt-one { left: -75px; top: 0; transform: rotate(12deg); }
.homebody-quilt-two { right: -78px; bottom: -72px; transform: rotate(-9deg); }
.homebody-intro-sprig { position: absolute; width: 95px; height: 95px; fill: none; stroke: #65755d; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.homebody-sprig-one { right: 1%; top: 16%; transform: rotate(18deg); }
.homebody-sprig-two { left: 1%; bottom: 13%; transform: rotate(-25deg); }

.homebody-mini-header { position: fixed; z-index: 90; top: max(4.35rem, calc(env(safe-area-inset-top) + 3.6rem)); left: 50%; width: min(calc(100% - 1.25rem), 600px); min-height: 48px; padding: .4rem .55rem .4rem .45rem; display: flex; align-items: center; gap: .6rem; color: #faf5e9; background: rgba(61,76,61,.93); border: 1px solid rgba(255,255,255,.35); border-radius: 5px; box-shadow: 0 8px 30px rgba(49,53,46,.18); backdrop-filter: blur(12px); transform: translate(-50%, -220%); transition: transform .6s .45s ease; }
.homebody-mini-header.visible { transform: translate(-50%, 0); }
.homebody-mini-header svg { flex: 0 0 auto; width: 30px; height: 30px; fill: none; stroke: #d4a23f; stroke-width: 5; }
.homebody-mini-header span { overflow: hidden; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-overflow: ellipsis; white-space: nowrap; }
.homebody-mini-header button { margin-left: auto; color: #faf5e9; background: transparent; border: 0; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .72rem; font-weight: 700; cursor: pointer; }
.homebody-album { max-width: 720px; margin: 0 auto; overflow: hidden; background: #faf5e9; box-shadow: 0 0 80px rgba(49,53,46,.18); }
.homebody-panel { position: relative; min-height: calc(100svh - 56px); padding: 6.4rem 1.3rem 4rem; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.homebody-chapter-number { position: absolute; right: 1.2rem; top: 5.4rem; margin: 0; color: currentColor; font-size: .75rem; letter-spacing: .15em; opacity: .5; }
.homebody-panel h2,
.homebody-closing h2 { position: relative; z-index: 2; margin: 0 0 2rem; font-size: clamp(2.7rem, 12vw, 5.3rem); font-weight: 400; line-height: .98; letter-spacing: -.045em; }
.homebody-panel h2 em,
.homebody-closing h2 em { color: #a9583f; font-family: "Segoe Print", "Bradley Hand", cursive; font-style: normal; }
.homebody-welcome { padding-top: 7rem; background: #a7bcb9; }
.homebody-wallpaper { position: absolute; inset: 0; opacity: .35; background-image: radial-gradient(#faf5e9 1px, transparent 1px); background-size: 18px 18px; }
.homebody-welcome-copy { position: relative; z-index: 2; }
.homebody-welcome-copy h2 em { color: #f3ead9; }
.homebody-hero-photo { position: relative; z-index: 2; width: min(83vw, 520px); margin: .3rem auto 0; padding: .8rem .8rem 2.8rem; background: #faf5e9; border: 10px solid #3d4c3d; outline: 2px solid #31352e; box-shadow: 0 16px 30px rgba(49,53,46,.24); transform: rotate(-1.2deg); }
.homebody-hero-photo img { width: 100%; aspect-ratio: 1 / 1; display: block; object-fit: cover; }
.homebody-hero-photo figcaption { position: absolute; left: 0; right: 0; bottom: .65rem; font-family: "Segoe Print", "Bradley Hand", cursive; font-size: 1.1rem; text-align: center; }
.homebody-corner-heart { position: absolute; right: -15px; bottom: 4%; width: 95px; height: 95px; fill: none; stroke: #a9583f; stroke-width: 5; transform: rotate(12deg); }
.homebody-quiet { background: #f3ead9; }
.homebody-quiet h2 { color: #3d4c3d; }
.homebody-cushion-frame { position: relative; z-index: 2; width: 94%; margin: 0 auto; padding: .9rem; background: rgba(255,255,255,.48); border: 2px dashed #a9583f; border-radius: 42% 8% 38% 9%; }
.homebody-cushion-frame > div { overflow: hidden; aspect-ratio: 4 / 3; border-radius: 39% 6% 34% 7%; box-shadow: inset 0 0 0 8px rgba(255,255,255,.2); }
.homebody-cushion-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.homebody-cushion-frame figcaption { padding: .75rem .25rem .1rem; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.homebody-margin-note { position: relative; z-index: 3; align-self: flex-end; margin: -1rem .3rem 0 0; padding: .65rem .8rem; color: #faf5e9; background: #a9583f; font-family: "Segoe Print", "Bradley Hand", cursive; font-size: .85rem; transform: rotate(-4deg); }
.homebody-postcard { color: #faf5e9; background: #4c6674; }
.homebody-postcard .homebody-overline { color: #d9e7e4; }
.homebody-postcard h2 { max-width: 94%; }
.homebody-sun-wash { position: absolute; right: -22%; top: -8%; width: 88vw; max-width: 620px; aspect-ratio: 1; background: #d4a23f; border-radius: 50%; opacity: .23; }
.homebody-postcard-card { position: relative; z-index: 2; width: 95%; margin: 0 auto; padding: .65rem .65rem 1rem; color: #31352e; background: #faf5e9; border: 1px solid #31352e; box-shadow: 10px 12px 0 rgba(49,53,46,.45); transform: rotate(1.5deg); }
.homebody-postcard-card img { width: 100%; aspect-ratio: 1.3 / 1; display: block; object-fit: cover; }
.homebody-postcard-card figcaption { padding: .75rem .25rem 0; display: flex; justify-content: space-between; gap: 1rem; font-family: "Segoe Print", "Bradley Hand", cursive; font-size: .8rem; }
.homebody-postcard-sprig { position: absolute; right: -10px; bottom: 0; width: 120px; height: 120px; fill: none; stroke: #d4a23f; stroke-width: 4; transform: rotate(12deg); }
.homebody-little-things { min-height: auto; padding-top: 6.8rem; background: #faf5e9; }
.homebody-little-things h2 { color: #a9583f; }
.homebody-scrapbook-grid { padding: .5rem .5rem 3rem; display: grid; gap: 2.2rem; }
.homebody-scrap { position: relative; z-index: 2; margin: 0; padding: .65rem .65rem 1rem; background: white; border: 1px solid rgba(49,53,46,.35); box-shadow: 5px 8px 17px rgba(49,53,46,.17); }
.homebody-scrap img { width: 100%; aspect-ratio: 1 / .9; display: block; object-fit: cover; }
.homebody-scrap figcaption { padding-top: .65rem; font-family: "Segoe Print", "Bradley Hand", cursive; text-align: center; }
.homebody-tape { position: absolute; z-index: 3; top: -13px; left: 50%; width: 74px; height: 26px; background: rgba(212,162,63,.65); transform: translateX(-50%) rotate(-2deg); }
.homebody-photo-1 { transform: rotate(-1.8deg); }
.homebody-photo-2 { transform: rotate(2deg); }
.homebody-photo-3 { transform: rotate(-.8deg); }
.homebody-celebration { color: #faf5e9; background: #a9583f; }
.homebody-celebration .homebody-overline { color: #f3d9cc; }
.homebody-celebration h2 em { color: #d4a23f; }
.homebody-party-frame { position: relative; z-index: 2; width: 85%; aspect-ratio: .92 / 1; margin: 0 auto; overflow: hidden; border: 12px solid #f3ead9; outline: 1px solid #31352e; border-radius: 48% 48% 4px 4px; box-shadow: 10px 12px 0 #3d4c3d; transform: rotate(-1deg); }
.homebody-party-frame img { width: 100%; min-height: 136%; display: block; object-fit: cover; transform: translateY(-8.8%); }
.homebody-hand-note { position: relative; z-index: 3; align-self: flex-end; max-width: 88%; margin: -1.2rem 0 0; padding: .7rem .85rem; color: #31352e; background: #d4a23f; box-shadow: 4px 4px 0 #31352e; font-family: "Segoe Print", "Bradley Hand", cursive; font-size: .85rem; transform: rotate(3deg); }
.homebody-portrait { min-height: calc(108svh - 56px); background: #65755d; text-align: center; }
.homebody-portrait-arch { position: absolute; left: 50%; top: 8%; width: 80%; max-width: 540px; height: 75%; background: #f3ead9; border-radius: 50% 50% 6px 6px; transform: translateX(-50%); }
.homebody-heirloom-frame { position: relative; z-index: 2; width: 68%; max-width: 420px; aspect-ratio: .82 / 1; margin: 0 auto 2.3rem; padding: 8px; overflow: hidden; background: #d4a23f; border: 5px double #31352e; border-radius: 50% 50% 4px 4px; box-shadow: 0 14px 35px rgba(49,53,46,.28); }
.homebody-heirloom-frame img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 54% center; border-radius: 48% 48% 2px 2px; }
.homebody-portrait-copy { position: relative; z-index: 3; color: #3d4c3d; }
.homebody-portrait-copy .homebody-overline { color: #a9583f; }
.homebody-portrait-copy h2 { margin-bottom: .7rem; color: #3d4c3d; }
.homebody-portrait-copy > p:last-child { margin: 0; color: #faf5e9; font-style: italic; font-weight: 700; text-shadow: 0 1px 2px rgba(49,53,46,.55); }
.homebody-closing { position: relative; min-height: calc(95svh - 56px); padding: 6rem 1.3rem max(3rem, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; color: #31352e; background: #f3ead9; text-align: center; }
.homebody-closing-house { width: 72px; height: 72px; margin-bottom: .8rem; fill: none; stroke: #3d4c3d; stroke-width: 4; }
.homebody-closing h2 { max-width: 600px; margin-bottom: 1.2rem; color: #3d4c3d; }
.homebody-closing-heart { width: 45px; height: 45px; margin-bottom: 1.5rem; fill: #a9583f; stroke: none; }
.homebody-closing .preview-signature { margin-top: 3rem; color: #31352e; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .66rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; opacity: .55; }
.homebody-reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s ease, transform 1.1s cubic-bezier(.2,.7,.2,1); }
.homebody-reveal.visible { opacity: 1; transform: translateY(0); }
@keyframes homebody-settle { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* IN LOVING MEMORY — a quiet, cinematic remembrance. */
.preview-experience.memorial-preview { max-width: none; color: #342f42; background: #f2eee8; font-family: Georgia, "Times New Roman", serif; }
.memorial-intro { position: fixed; z-index: 105; inset: 0; min-height: 100svh; padding: 56px 1.4rem 1.4rem; display: grid; place-items: center; overflow: hidden; color: #fff9ed; background: #202538; transition: opacity 1.3s ease, filter 1.3s ease, visibility 1.3s; }
.memorial-intro.dismissed { visibility: hidden; opacity: 0; filter: blur(8px); }
.memorial-night { position: absolute; inset: 0; background: radial-gradient(circle at 50% 35%, rgba(229,203,147,.16), transparent 24%), radial-gradient(circle at 20% 18%, rgba(255,255,255,.55) 0 1px, transparent 2px), radial-gradient(circle at 78% 24%, rgba(255,255,255,.35) 0 1px, transparent 2px), radial-gradient(circle at 67% 78%, rgba(229,203,147,.35) 0 1px, transparent 2px), linear-gradient(160deg, #202538, #30263e 58%, #171c2d); }
.memorial-intro-star { position: absolute; top: 16%; left: 50%; color: #e5cb93; font-size: 1.45rem; transform: translateX(-50%); animation: memorial-breathe 3s ease-in-out infinite; }
.memorial-intro-copy { position: relative; z-index: 2; width: min(100%, 620px); display: flex; flex-direction: column; align-items: center; text-align: center; animation: memorial-arrive 1.4s .15s both; }
.memorial-intro-copy > p { margin: 0 0 1.2rem; color: #e5cb93; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .76rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; }
.memorial-intro h2 { margin: 0; color: #fff9ed; font-size: clamp(4rem, 19vw, 8rem); font-weight: 400; line-height: .88; letter-spacing: -.065em; }
.memorial-gold-rule { width: 54px; height: 1px; margin: 1.6rem 0; display: block; background: #e5cb93; }
.memorial-intro-copy strong { font-size: 1.05rem; font-weight: 400; }
.memorial-intro-copy em { margin: .35rem 0 1.8rem; color: #d8d1c9; font-size: 1rem; }
.memorial-button { min-height: 52px; padding: .85rem 1.2rem; display: inline-flex; align-items: center; gap: .8rem; color: #202538; background: #e5cb93; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.18); font-family: ui-sans-serif, system-ui, sans-serif; font-size: .85rem; font-weight: 800; cursor: pointer; transition: transform .25s, background .25s; }
.memorial-button:active { background: #f0dcad; transform: scale(.97); }
.memorial-mini-header { position: fixed; z-index: 90; top: max(4.35rem, calc(env(safe-area-inset-top) + 3.6rem)); left: 50%; width: min(calc(100% - 1.25rem), 600px); min-height: 48px; padding: .45rem .65rem; display: flex; align-items: center; gap: .6rem; color: #fff9ed; background: rgba(32,37,56,.9); border: 1px solid rgba(229,203,147,.42); border-radius: 999px; box-shadow: 0 12px 35px rgba(0,0,0,.2); backdrop-filter: blur(14px); transform: translate(-50%, -220%); transition: transform .8s .5s cubic-bezier(.2,.7,.2,1); }
.memorial-mini-header.visible { transform: translate(-50%, 0); }
.memorial-mini-header > span { color: #e5cb93; }
.memorial-mini-header strong { overflow: hidden; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .72rem; letter-spacing: .04em; text-overflow: ellipsis; white-space: nowrap; }
.memorial-mini-header button { margin-left: auto; color: #fff9ed; background: transparent; border: 0; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .7rem; cursor: pointer; }
.memorial-story { max-width: 720px; margin: 0 auto; overflow: hidden; background: #f2eee8; box-shadow: 0 0 90px rgba(27,25,38,.18); }
.memorial-panel { position: relative; min-height: calc(100svh - 56px); padding: 7rem 1.4rem 4rem; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.memorial-kicker { margin: 0 0 1rem; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .75rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.memorial-opening { align-items: center; color: #fff9ed; background: linear-gradient(165deg, #283049, #30263e); text-align: center; }
.memorial-opening .memorial-kicker { color: #e5cb93; }
.memorial-opening-portrait { position: relative; width: min(72vw, 430px); aspect-ratio: .83 / 1; margin: .8rem auto 2rem; padding: 8px; overflow: hidden; background: #fff9ed; border: 1px solid #e5cb93; border-radius: 50% 50% 4px 4px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.memorial-opening-portrait::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(229,203,147,.7); border-radius: 49% 49% 2px 2px; pointer-events: none; }
.memorial-opening-portrait img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 48% 48% 2px 2px; filter: saturate(.82) contrast(.98); }
.memorial-opening h2 { margin: 0; font-size: clamp(3.8rem, 17vw, 7rem); font-weight: 400; line-height: .9; letter-spacing: -.055em; }
.memorial-opening > p:not(.memorial-kicker) { margin: .6rem 0 2rem; color: #d8d1c9; font-size: 1.05rem; font-style: italic; }
.memorial-scroll-cue { color: #e5cb93; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.memorial-days { background: #f2eee8; }
.memorial-section-number { position: absolute; right: 1.4rem; top: 5.6rem; margin: 0; color: #a98c5a; font-size: .8rem; letter-spacing: .18em; }
.memorial-days .memorial-kicker,
.memorial-details .memorial-kicker { color: #8b6d3f; }
.memorial-days h2,
.memorial-details h2 { margin: 0 0 2.6rem; color: #342f42; font-size: clamp(3.2rem, 14vw, 6.2rem); font-weight: 400; line-height: .92; letter-spacing: -.05em; }
.memorial-pair { display: grid; gap: 2.3rem; }
.memorial-pair figure { margin: 0; padding: .65rem .65rem 1rem; background: #fffdf8; border: 1px solid #d8c9ad; box-shadow: 0 14px 35px rgba(52,47,66,.11); }
.memorial-pair figure:first-child { transform: rotate(-1.2deg); }
.memorial-pair figure:last-child { transform: rotate(1.4deg); }
.memorial-pair img { width: 100%; aspect-ratio: 1 / .82; display: block; object-fit: cover; filter: saturate(.86); }
.memorial-pair figcaption { padding-top: .75rem; color: #655c6e; font-size: .95rem; font-style: italic; text-align: center; }
.memorial-light { min-height: calc(110svh - 56px); padding: 0; align-items: center; color: white; background: #171c2d; text-align: center; }
.memorial-light > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.7) contrast(.95); }
.memorial-light-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(20,24,39,.22), rgba(20,24,39,.72) 68%, rgba(20,24,39,.92)); }
.memorial-light-copy { position: relative; z-index: 2; width: 100%; margin-top: auto; padding: 5rem 1.5rem 4.5rem; }
.memorial-light-copy > span { color: #e5cb93; font-size: 1.4rem; }
.memorial-light-copy p { margin: 1rem 0 .8rem; font-size: clamp(3.2rem, 14vw, 6rem); line-height: .94; letter-spacing: -.05em; }
.memorial-light-copy small { color: #eee5dc; font-size: 1rem; font-style: italic; }
.memorial-details { min-height: auto; padding-top: 7.2rem; background: #e8e2dc; }
.memorial-detail-grid { padding: .5rem .25rem 3rem; display: grid; gap: 2.5rem; }
.memorial-detail-grid figure { margin: 0; padding: .7rem .7rem 1.2rem; background: #fffdf8; border: 1px solid #d5c5aa; box-shadow: 0 15px 38px rgba(52,47,66,.12); }
.memorial-detail-grid img { width: 100%; aspect-ratio: 1 / .9; display: block; object-fit: cover; filter: saturate(.83); }
.memorial-detail-grid figcaption { padding-top: .8rem; color: #655c6e; font-size: .95rem; font-style: italic; text-align: center; }
.memorial-detail-1 { transform: rotate(-1.1deg); }
.memorial-detail-2 { transform: translateX(2%) rotate(1.2deg); }
.memorial-detail-3 { transform: rotate(-.5deg); }
.memorial-final-portrait { align-items: center; color: #fff9ed; background: #3b3147; text-align: center; }
.memorial-halo { position: absolute; left: 50%; top: 10%; width: min(80vw, 520px); aspect-ratio: 1; background: radial-gradient(circle, rgba(229,203,147,.38), rgba(229,203,147,.08) 48%, transparent 70%); border-radius: 50%; transform: translateX(-50%); }
.memorial-final-portrait figure { position: relative; z-index: 2; width: min(70vw, 410px); aspect-ratio: .82 / 1; margin: 0 auto 2.2rem; padding: 7px; overflow: hidden; background: #e5cb93; border: 1px solid #fff9ed; border-radius: 50% 50% 5px 5px; box-shadow: 0 22px 55px rgba(0,0,0,.32); }
.memorial-final-portrait img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 49% 49% 3px 3px; filter: saturate(.8); }
.memorial-final-portrait .memorial-kicker { position: relative; z-index: 2; color: #e5cb93; }
.memorial-final-portrait h2 { position: relative; z-index: 2; margin: 0; font-size: clamp(2.7rem, 12vw, 5rem); font-weight: 400; line-height: .96; }
.memorial-final-portrait > p:last-child { position: relative; z-index: 2; margin: .7rem 0 0; color: #ddd3cf; font-size: 1rem; font-style: italic; }
.memorial-closing { position: relative; min-height: calc(100svh - 56px); padding: 7rem 1.4rem max(4rem, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff9ed; background: radial-gradient(circle at 50% 38%, rgba(229,203,147,.13), transparent 30%), #202538; text-align: center; }
.memorial-closing-star { color: #e5cb93; font-size: 1.8rem; animation: memorial-breathe 3s ease-in-out infinite; }
.memorial-closing .memorial-kicker { margin-top: 1.3rem; color: #e5cb93; }
.memorial-closing blockquote { max-width: 580px; margin: 1rem 0 .4rem; font-size: clamp(2rem, 9vw, 3.8rem); line-height: 1.05; letter-spacing: -.035em; }
.memorial-closing h2 { margin: 0 0 2rem; font-size: clamp(3.5rem, 15vw, 6.5rem); font-weight: 400; line-height: .9; letter-spacing: -.055em; }
.memorial-closing .preview-signature { margin-top: 3rem; color: #e5cb93; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .66rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; opacity: .7; }
.memorial-reveal { opacity: 0; transform: translateY(18px); filter: blur(3px); transition: opacity 1.25s ease, transform 1.35s cubic-bezier(.2,.7,.2,1), filter 1.25s ease; }
.memorial-reveal.visible { opacity: 1; filter: blur(0); transform: translateY(0); }
@keyframes memorial-arrive { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes memorial-breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

@media (min-width: 620px) {
  .homebody-panel,
  .memorial-panel { padding-inline: 3rem; }
  .homebody-scrapbook-grid,
  .memorial-detail-grid { grid-template-columns: 1fr 1fr; }
  .homebody-photo-3,
  .memorial-detail-3 { grid-column: 1 / -1; width: 72%; justify-self: center; }
  .memorial-pair { grid-template-columns: 1fr 1fr; align-items: center; }
  .memorial-pair figure:last-child { margin-top: 5rem; }
}

dialog { width: min(calc(100% - 2rem), 430px); padding: 1.5rem; color: var(--ink); background: var(--cream); border: 2px solid var(--ink); border-radius: 16px; box-shadow: 10px 12px 0 var(--ink); }
dialog::backdrop { background: rgba(23,44,56,.68); backdrop-filter: blur(3px); }
.dialog-icon { width: 45px; height: 45px; display: grid; place-items: center; color: var(--ink); background: var(--yellow); border-radius: 50%; }
dialog h2 { margin: .8rem 0 .45rem; font-family: Georgia, serif; font-size: 2rem; font-weight: 500; }
dialog p { margin: 0 0 1.2rem; color: var(--muted); font-family: Georgia, serif; line-height: 1.45; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.photo-dialog { width: min(calc(100% - 1rem), 720px); max-height: 92svh; padding: .6rem; overflow: hidden; background: var(--cream); border: 1px solid rgba(255,255,255,.72); border-radius: 18px; box-shadow: 0 24px 80px rgba(52,16,57,.35); }
.photo-dialog::backdrop { background: rgba(52,16,57,.72); backdrop-filter: blur(8px); }
.photo-dialog-toolbar { min-height: 46px; padding: .25rem .3rem .5rem .55rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.photo-dialog-toolbar span { color: var(--muted); font-size: .72rem; font-weight: 800; }
.photo-dialog-toolbar button { padding: .5rem .75rem; color: var(--cream); background: var(--ink); border: 0; border-radius: 999px; font-size: .72rem; font-weight: 800; cursor: pointer; }
.photo-dialog img { width: 100%; max-height: calc(92svh - 64px); display: block; object-fit: contain; background: #eadfd4; border-radius: 12px; }

.success-screen { text-align: center; }
.success-seal { width: 92px; height: 92px; margin: 0 auto 1.5rem; display: grid; place-items: center; color: var(--ink); background: var(--yellow); border: 4px solid var(--ink); border-radius: 50%; box-shadow: 8px 9px 0 var(--success); font-size: 2rem; }
.ready-key-card { text-align: left; }
.ready-icon { color: var(--teal); font-family: monospace; font-weight: 900; }
.ready-key-card div { margin-right: auto; margin-left: .8rem; display: flex; flex-direction: column; }
.private-link-card { margin: 0 0 1rem; padding: 1rem; display: grid; gap: .35rem; text-align: left; background: #ebe4d7; border-radius: 12px; }
.private-link-card span { font-size: .68rem; font-weight: 850; }
.private-link-card a { overflow: hidden; color: var(--teal); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .76rem; font-weight: 700; text-decoration-thickness: 1px; text-overflow: ellipsis; white-space: nowrap; }
.private-link-card small { color: var(--muted); font-size: .62rem; }

body.recipient-mode { overflow: hidden; background: #172c38; }
body.recipient-mode .app-header,
body.recipient-mode .app-shell,
body.recipient-mode .preview-toolbar { display: none; }
body.recipient-mode .gift-preview { z-index: 300; }
body.recipient-mode .yappy-intro { padding-top: 0; }
body.recipient-mode .homebody-intro { padding-top: 1.2rem; }
body.recipient-mode .memorial-intro { padding-top: 1.4rem; }
body.recipient-mode .yappy-mini-header,
body.recipient-mode .homebody-mini-header,
body.recipient-mode .memorial-mini-header { top: max(.65rem, env(safe-area-inset-top)); }

.sound-toggle { position: fixed; z-index: 360; right: max(.8rem, env(safe-area-inset-right)); bottom: max(.85rem, env(safe-area-inset-bottom)); min-height: 44px; padding: .55rem .72rem; display: inline-flex; align-items: center; gap: .4rem; color: var(--cream); background: rgba(52,16,57,.9); border: 1px solid rgba(255,255,255,.34); border-radius: 999px; box-shadow: 0 9px 28px rgba(23,44,56,.2); backdrop-filter: blur(12px); font-size: .68rem; font-weight: 850; cursor: pointer; transition: opacity .2s ease, transform .2s ease, background .2s ease; }
.sound-toggle:active { transform: scale(.96); }
.sound-toggle:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.sound-toggle[aria-pressed="false"] { color: var(--muted); background: rgba(255,253,247,.92); border-color: rgba(52,16,57,.18); }
.sound-toggle-icon { width: 22px; height: 22px; display: grid; place-items: center; color: var(--ink); background: var(--yellow); border-radius: 50%; font-size: .85rem; line-height: 1; }
.sound-toggle[aria-pressed="false"] .sound-toggle-icon { color: var(--cream); background: var(--muted); }
.owner-edit-button { position: fixed; z-index: 360; left: max(.8rem, env(safe-area-inset-left)); bottom: max(.85rem, env(safe-area-inset-bottom)); min-height: 44px; padding: .65rem .85rem; display: inline-flex; align-items: center; gap: .4rem; color: var(--ink); background: rgba(255,253,247,.94); border: 1px solid rgba(52,16,57,.22); border-radius: 999px; box-shadow: 0 9px 28px rgba(23,44,56,.18); backdrop-filter: blur(12px); font-size: .7rem; font-weight: 850; cursor: pointer; }
.owner-edit-button:active { transform: scale(.96); }

.toast { position: fixed; z-index: 150; left: 50%; bottom: max(1.2rem, env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 2rem); padding: .7rem .9rem; color: white; background: var(--ink); border-radius: 999px; box-shadow: 0 10px 30px rgba(23,44,56,.25); font-size: .72rem; font-weight: 800; opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes slow-spin { to { transform: rotate(360deg); } }
@keyframes step-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 600px) {
  .claim-screen, .waiting-screen, .success-screen, .step { padding-inline: 2.5rem; }
  .theme-grid { grid-template-columns: 1fr 1fr; }
  .theme-card { grid-template-columns: 1fr; }
  .memorial-theme { grid-column: 1 / -1; grid-template-columns: 42% 1fr; }
  .memorial-theme .theme-copy { justify-content: center; padding: 2.2rem 1.25rem; }
  .photo-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 380px) {
  .welcome-break { display: none; }
}

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