/* ===== Shared birthday layout. Each card's theme block below overrides the tokens and intro. ===== */
:root {
  --bg: #fff; --bg2: #f6f6f6; --ink: #222; --muted: #666; --accent: #e44; --accent2: #fb3; --accent-ink: #fff;
  --panel: rgba(255,255,255,.9); --line: rgba(0,0,0,.12);
  --display: Georgia, serif; --body: system-ui, sans-serif; --script: cursive;
  --radius: 22px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.is-locked { overflow: hidden; height: 100svh; }
img, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

/* ---------- Intro ---------- */
.intro { position: fixed; inset: 0; z-index: 40; background: var(--intro-bg, #000); overflow: hidden; transition: opacity 1s ease, visibility 0s linear 1s; }
.intro.is-gone { opacity: 0; visibility: hidden; }
.intro__film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.intro__cover { position: absolute; inset: 0; pointer-events: none; }
.intro__text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: max(11svh, 70px) 20px max(8svh, 48px); text-align: center; transition: opacity .7s ease, transform .7s ease; }
.intro__text .tap { margin-top: auto; }
.intro.is-tapped .intro__text { opacity: 0; transform: translateY(20px); pointer-events: none; }
.intro__kicker { margin: 0; text-shadow: 0 1px 8px rgba(0,0,0,.6); font-size: 13px; letter-spacing: .28em; text-transform: uppercase; color: var(--intro-ink, #fff); opacity: .9; }
.intro__names { margin: 0 0 8px; font: 400 clamp(40px, 12vw, 64px)/1 var(--display); color: var(--intro-ink, #fff); text-shadow: 0 3px 18px rgba(0,0,0,.35); }
.intro__names span { display: block; margin-top: 8px; font-family: var(--script); font-size: .62em; color: var(--intro-sub, var(--accent2)); text-shadow: 0 2px 12px rgba(0,0,0,.55), 0 0 2px rgba(0,0,0,.4); }
.tap { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 16px; letter-spacing: .04em; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.3); animation: tapPulse 2.2s ease-in-out infinite; }
.tap:focus-visible { outline: 3px solid var(--accent2); outline-offset: 4px; }
.tap__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent2); box-shadow: 0 0 0 0 var(--accent2); animation: dot 1.6s ease-out infinite; }
@keyframes tapPulse { 50% { transform: scale(1.05); } }
@keyframes dot { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.6); } 100% { box-shadow: 0 0 0 12px rgba(255,255,255,0); } }

/* ---------- Controls ---------- */
.controls { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 50; display: flex; gap: 8px; }
.controls[hidden], .ctl[hidden] { display: none; }
.ctl { border: 0; background: rgba(0,0,0,.45); color: #fff; padding: 9px 16px; border-radius: 999px; cursor: pointer; backdrop-filter: blur(6px); font-size: 14px; }
.ctl--round { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; }
.ctl svg { width: 22px; height: 22px; fill: currentColor; }
.ctl[aria-pressed="true"] .ico-off, .ctl[aria-pressed="false"] .ico-on { display: none; }

/* ---------- Common type ---------- */
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.display { margin: 0 0 22px; font: 400 clamp(34px, 9vw, 52px)/1.08 var(--display); color: var(--ink); }
.display em { font-style: normal; font-family: var(--script); color: var(--accent); }
section { padding: 84px 22px; text-align: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border-radius: 999px; border: 2px solid var(--accent); color: var(--accent); background: transparent; text-decoration: none; font-weight: 600; cursor: pointer; }
.btn--solid { background: var(--accent); color: var(--accent-ink); }
.btn:focus-visible { outline: 3px solid var(--accent2); outline-offset: 3px; }

/* ---------- Animations ---------- */
.fade { opacity: 0; }
body.is-open .fade { animation: fadeUp 1s cubic-bezier(.2,.7,.2,1) var(--d, 0s) forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; padding: 0; display: grid; align-items: start; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; background: var(--hero-bg) center / cover no-repeat; }
.hero__bg::after { content: ""; position: absolute; inset: 0; background: var(--hero-shade, linear-gradient(rgba(0,0,0,.35), transparent 55%)); }
.hero__text { position: relative; padding: max(12svh, 80px) 20px 0; display: grid; justify-items: center; color: var(--hero-ink, #fff); }
.hero__text .eyebrow { color: var(--hero-ink, #fff); opacity: .95; }
.hero__name { margin: 0; font: 400 clamp(56px, 17vw, 96px)/.95 var(--display); text-shadow: 0 4px 24px rgba(0,0,0,.3); }
.hero__turns { margin: 6px 0 0; font: 400 clamp(24px, 7vw, 34px)/1 var(--script); color: var(--accent2); }
.hero__age { margin: 0; font: 700 clamp(110px, 34vw, 180px)/.9 var(--display); color: var(--accent2); text-shadow: 0 6px 0 var(--age-shadow, rgba(0,0,0,.25)), 0 10px 30px rgba(0,0,0,.3); }
.hero__date { margin: 10px 0 0; font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- Invite ---------- */
.invite { background: var(--bg); }
.invite__inner { max-width: 560px; margin: 0 auto; }
.invite__lead { margin: 0 0 18px; font-size: 18px; }
.invite__lead span { color: var(--muted); font-size: 16px; }
.invite__name { margin: 0 0 18px; font: 400 clamp(44px, 12vw, 68px)/1 var(--script); color: var(--accent); }
.invite__line { margin: 0; color: var(--muted); }

/* ---------- Window ---------- */
.window { background: var(--bg2); }
.window__frame { width: min(78vw, 340px); aspect-ratio: 9 / 16; margin: 0 auto 36px; border-radius: var(--frame-radius, 28px); overflow: hidden; box-shadow: 0 0 0 6px var(--panel), 0 0 0 8px var(--accent2), 0 24px 60px rgba(0,0,0,.25); background: #000; }
.window__film { width: 100%; height: 100%; object-fit: cover; }
.window__text { max-width: 560px; margin: 0 auto 50px; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fact { background: var(--panel); border-radius: 18px; padding: 16px 12px; box-shadow: 0 6px 18px rgba(0,0,0,.06); border: 1px solid var(--line); }
.fact b { display: block; font-size: 28px; line-height: 1.1; }
.fact small { display: block; margin-top: 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.fact span { display: block; margin-top: 2px; font-weight: 600; }
.count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 460px; margin: 0 auto; }
.count__unit { background: var(--accent); color: var(--accent-ink); border-radius: 18px; padding: 14px 4px 10px; box-shadow: 0 8px 0 var(--count-shadow, rgba(0,0,0,.18)); }
.count__unit b { display: block; font: 700 30px/1 var(--display); }
.count__unit small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }

/* ---------- Plan ---------- */
.venue { max-width: 520px; margin: 0 auto 40px; background: var(--panel); border: 2px dashed var(--accent2); border-radius: var(--radius); padding: 26px 20px; }
.venue__when { margin: 0; font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.venue__place { margin: 6px 0 2px; font: 400 26px/1.2 var(--display); }
.venue__addr { margin: 0 0 18px; color: var(--muted); }
.venue__actions, .rsvp__actions, .foot__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.plan__list { list-style: none; margin: 0 auto; padding: 0; max-width: 520px; display: grid; gap: 16px; text-align: left; }
.stop { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; }
.stop__icon { width: 64px; height: 64px; display: grid; place-items: center; font-size: 30px; border-radius: 50%; background: var(--panel); border: 3px solid var(--accent2); transform: scale(.6) rotate(-20deg); transition: transform .6s cubic-bezier(.3,1.6,.5,1); }
.stop.is-on .stop__icon { transform: none; }
.stop__card { background: var(--panel); border-radius: 18px; padding: 14px 16px; border: 1px solid var(--line); }
.stop__when { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.stop__name { margin: 2px 0 4px; font: 400 22px/1.2 var(--display); }
.stop__note { margin: 0; font-size: 15px; color: var(--muted); }
.notes { max-width: 520px; margin: 34px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.note { background: var(--panel); border-radius: 18px; padding: 18px 12px; border: 1px solid var(--line); }
.note__icon { font-size: 30px; }
.note h3 { margin: 4px 0; font: 400 20px/1.2 var(--display); color: var(--accent); }
.note p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- RSVP ---------- */
.rsvp { background: var(--bg2); }
.rsvp__form { max-width: 480px; margin: 0 auto; display: grid; gap: 16px; text-align: left; background: var(--panel); padding: 24px 20px; border-radius: var(--radius); border: 1px solid var(--line); }
.field { display: grid; gap: 6px; }
.field > span, .choice legend { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: #222; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.choice label { display: flex; }
.choice input { position: absolute; opacity: 0; }
.choice span { flex: 1; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--line); cursor: pointer; background: #fff; color: #222; }
.choice input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.choice input:focus-visible + span { outline: 2px solid var(--accent2); outline-offset: 2px; }

/* ---------- Footer ---------- */
.foot { padding: 70px 22px 80px; text-align: center; background: var(--bg); }
.foot__img { width: 150px; height: 150px; object-fit: cover; border-radius: 50%; margin: 0 auto 20px; box-shadow: 0 0 0 5px var(--panel), 0 0 0 7px var(--accent2); }
.foot__big { margin: 0; font: 400 clamp(34px, 10vw, 52px)/1.1 var(--script); color: var(--accent); }
.foot__names { margin: 8px 0 26px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 70; background: #222; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; max-width: calc(100% - 32px); visibility: hidden; transition: transform .4s ease, visibility 0s linear .4s; }
.toast.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform .4s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .fade, .reveal { opacity: 1; transform: none; }
}

/* ===== Mermaid Lagoon theme ===== */
:root { --bg: #EAF8F8; --bg2: #D9F0F2; --ink: #0D3B4A; --muted: #4F7480; --accent: #128A9A; --accent2: #FF8FA3; --accent-ink: #fff;
  --panel: #ffffff; --line: #c6e6ea;
  --display: "Lilita One", system-ui, sans-serif; --body: "Nunito", system-ui, sans-serif; --script: "Pacifico", cursive;
  --hero-bg: url("img/end.webp"); --intro-bg: #0b4a5a; --intro-sub: #fff; --hero-shade: linear-gradient(rgba(0,52,72,.5), rgba(0,52,72,0) 58%); --age-shadow: #b8475e; --count-shadow: #0b5f6b; }
.hero__age { color: #fff; text-shadow: 0 6px 0 var(--accent2), 0 10px 30px rgba(0,0,0,.3); }
.hero__turns { color: #fff; }
.display em { color: #E2607A; }
.invite__name { color: var(--accent); }
.count__unit { border-radius: 50%; aspect-ratio: 1; display: grid; place-content: center; background: radial-gradient(circle at 35% 30%, #5fd0d9, var(--accent)); box-shadow: inset 0 0 0 3px rgba(255,255,255,.35), 0 8px 0 var(--count-shadow); }
.shell { position: absolute; left: 50%; top: 56%; width: 56vmin; height: 56vmin; filter: drop-shadow(0 12px 24px rgba(0,40,60,.35)); transform: translate(-50%, -50%); }
.shell__top, .shell__bottom { position: absolute; left: 0; right: 0; height: 50%; transition: transform 1.3s cubic-bezier(.6,0,.2,1), opacity 1s ease .4s; }
.shell__top { top: 0; border-radius: 50% 50% 8% 8% / 90% 90% 10% 10%;
  background: repeating-conic-gradient(from 270deg at 50% 100%, #ffd1db 0 9deg, #ffb3c3 9deg 18deg); box-shadow: inset 0 -8px 20px rgba(200,80,110,.25); transform-origin: 50% 100%; }
.shell__bottom { bottom: 0; border-radius: 8% 8% 50% 50% / 10% 10% 60% 60%; background: linear-gradient(#ffc7d3, #f59ab0); transform-origin: 50% 0; }
.shell__pearl { position: absolute; left: 50%; top: 50%; width: 18%; height: 18%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #e8e4f5 50%, #b9b2d6); box-shadow: 0 0 30px 8px rgba(255,255,255,.6); transition: transform 1.4s ease, opacity 1s ease .6s; }
.intro.is-opening .shell__top { transform: rotateX(70deg) translateY(-40%); opacity: 0; }
.intro.is-opening .shell__bottom { transform: rotateX(-60deg) translateY(30%); opacity: 0; }
.intro.is-opening .shell__pearl { transform: translate(-50%, -50%) scale(10); opacity: 0; }
.intro:not(.is-tapped) .shell { animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, -54%); } }
.bubbles i { position: absolute; bottom: -40px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.8), transparent 40%); animation: rise 6s linear infinite; }
.bubbles i:nth-child(1) { left: 10%; animation-delay: 0s; }
.bubbles i:nth-child(2) { left: 24%; width: 10px; height: 10px; animation-delay: 1.5s; }
.bubbles i:nth-child(3) { left: 38%; animation-delay: 3s; }
.bubbles i:nth-child(4) { left: 55%; width: 26px; height: 26px; animation-delay: .8s; }
.bubbles i:nth-child(5) { left: 68%; width: 12px; height: 12px; animation-delay: 2.2s; }
.bubbles i:nth-child(6) { left: 80%; animation-delay: 4s; }
.bubbles i:nth-child(7) { left: 90%; width: 10px; height: 10px; animation-delay: 1s; }
.bubbles i:nth-child(8) { left: 47%; width: 14px; height: 14px; animation-delay: 5s; }
@keyframes rise { to { transform: translate(20px, -110vh); } }
.window__frame { border-radius: 50% 50% 30px 30px / 30% 30% 30px 30px; }
.stop__icon { background: #e8fbfd; }
.venue { border-color: var(--accent); }
