/* GENERATED from invite.css by tools/css/build-invite-css.cjs for "base". Edit invite.css, then rebuild. */
/* =========================================================================
   BeezInvite — invitation page (shared base + 8 layout skins)
   Responsive rules that apply to EVERY template:
   - fluid type with clamp(); long names wrap (overflow-wrap:anywhere) & auto-shrink (.long/.xlong)
   - every photo lives in a fixed aspect-ratio frame with object-fit:cover (any photo shape works)
   - grids reflow with auto-fit/minmax and never exceed the viewport
   ========================================================================= */
:root {
  /* readable text versions of the theme colours; the invite page overrides these with server-computed values */
  --p-ink: var(--p);
  --a-ink: var(--a);
  --muted: color-mix(in srgb, var(--t) 74%, var(--bg));
  --line: color-mix(in srgb, var(--p) 28%, transparent);
  --card-bg: color-mix(in srgb, var(--bg) 88%, #fff);
  --card-border: 1px solid var(--line);
  --card-radius: 22px;
  --card-shadow: 0 18px 40px -24px color-mix(in srgb, var(--p) 45%, transparent);
  --field-bg: color-mix(in srgb, var(--bg) 92%, var(--t) 5%);
  --btn-text: var(--bg);
}
.is-dark { --card-bg: color-mix(in srgb, var(--bg) 82%, #fff 6%); --field-bg: color-mix(in srgb, var(--bg) 80%, #fff 8%); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.inv { margin: 0; background: var(--bg); color: var(--t); font-family: var(--bf); font-size: clamp(15px, .45vw + 13.5px, 17.5px); line-height: 1.7; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
body.intro-on { overflow: hidden; height: 100vh; height: 100dvh; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
.center { text-align: center; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
[hidden] { display: none !important; } /* the hidden attribute always wins over component display rules */
:focus-visible { outline: 2px solid var(--a); outline-offset: 3px; }

.inv-main { position: relative; z-index: 2; }
.sec { padding: clamp(56px, 10vw, 110px) clamp(16px, 4vw, 32px); position: relative; }
.wrap { width: min(760px, 100%); margin-inline: auto; }
.wrap-wide { width: min(1080px, 100%); }
.sec-title { text-align: center; margin-bottom: clamp(26px, 5vw, 44px); }
.sec-title .kick { display: block; letter-spacing: .32em; text-transform: uppercase; font-size: .72rem; color: var(--muted); margin-bottom: 8px; }
.sec-title h2 { font-family: var(--hf); font-size: clamp(2rem, 7vw, 3.3rem); color: var(--p-ink); line-height: 1.1; overflow-wrap: anywhere; }
.divider { display: flex; justify-content: center; color: var(--p-ink); margin: 18px 0; }
.divider svg { width: min(220px, 70%); height: auto; }
.card { background: var(--card-bg); border: var(--card-border); border-radius: var(--card-radius); box-shadow: var(--card-shadow); padding: clamp(20px, 4vw, 30px); overflow-wrap: anywhere; min-width: 0; }

/* Buttons */
.ibtn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .85em 1.6em; border-radius: 999px; border: 1.5px solid var(--p); background: var(--p); color: var(--btn-text); font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; transition: transform .25s, box-shadow .25s, background .25s; max-width: 100%; text-align: center; }
.ibtn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px var(--p); }
.ibtn-ghost { background: transparent; color: var(--p-ink); }
.ibtn-sm { padding: .55em 1.1em; font-size: .85rem; }
.ibtn-block { width: 100%; }
.ibtn[disabled] { opacity: .6; cursor: wait; }

/* ---------- HERO (shared) ---------- */
/* minmax(0,1fr): the hero column can never grow wider than the screen, whatever the content */
.hero { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; text-align: center; position: relative; overflow: hidden; padding: clamp(70px, 10vw, 110px) clamp(18px, 5vw, 40px) clamp(80px, 10vw, 110px); isolation: isolate; }
.hero-in { position: relative; z-index: 2; width: min(680px, 100%); display: grid; justify-items: center; gap: clamp(18px, 3vw, 28px); }
.h-head { letter-spacing: .3em; text-transform: uppercase; font-size: clamp(.68rem, 1.6vw, .8rem); color: var(--muted); margin: 0 0 .6em; }
.names { font-family: var(--hf); color: var(--p-ink); font-size: clamp(2.7rem, 12vw, 6.2rem); line-height: 1.04; margin: .1em 0 .15em; overflow-wrap: anywhere; word-break: break-word; hyphens: auto; max-width: 100%; }
.names.long { font-size: clamp(2.1rem, 9vw, 4.6rem); }
.names.xlong { font-size: clamp(1.75rem, 7vw, 3.5rem); }
.names .amp { display: block; font-size: .48em; color: var(--a-ink); line-height: 1.2; margin: .05em 0; }
.h-second { font-family: var(--hf); font-size: clamp(1.2rem, 4vw, 1.8rem); color: var(--a-ink); margin: 0; }
.h-sub { font-size: clamp(.95rem, 2.4vw, 1.15rem); color: var(--muted); font-style: italic; margin: .3em auto .9em; max-width: 34ch; overflow-wrap: anywhere; }
.h-date { display: inline-flex; align-items: center; gap: clamp(10px, 3vw, 18px); text-transform: uppercase; letter-spacing: .2em; font-size: clamp(.68rem, 1.8vw, .82rem); color: var(--t); }
.h-date span { padding: 6px 0; border-block: 1px solid var(--line); min-width: 0; }
.h-date b { font-family: var(--hf); font-size: clamp(2rem, 6vw, 2.8rem); color: var(--p-ink); letter-spacing: 0; line-height: 1; font-weight: 400; }
.big-num { font-family: var(--hf); font-size: clamp(6rem, 30vw, 12rem); line-height: .9; color: var(--a-ink); -webkit-text-stroke: 3px var(--p); paint-order: stroke fill; text-shadow: 6px 6px 0 var(--p); animation: bounce 2.4s ease-in-out infinite; }
@keyframes bounce { 50% { transform: translateY(-10px) rotate(-3deg); } }

/* the "scroll down" hint is hidden on every template (kept in the markup, never rendered) */
.scroll-cue { display: none; }
.scroll-cue span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 4px; background: var(--p); animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Sections ---------- */
.dear { font-size: 1.1rem; margin-bottom: 0; }
.dear b { font-family: var(--hf); color: var(--p-ink); font-size: 1.6em; font-weight: 400; }
.message { font-size: clamp(1.02rem, 2.4vw, 1.25rem); line-height: 1.85; max-width: 46ch; margin: 0 auto; overflow-wrap: anywhere; }

.cd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 2.5vw, 18px); max-width: 560px; margin: 0 auto; }
.cd > div { background: var(--card-bg); border: var(--card-border); border-radius: 18px; padding: clamp(12px, 3vw, 22px) 4px; box-shadow: var(--card-shadow); min-width: 0; }
.cd b { display: block; font-family: var(--hf); font-size: clamp(1.7rem, 7.5vw, 3rem); line-height: 1.1; color: var(--p-ink); font-variant-numeric: tabular-nums; font-weight: 400; }
.cd span { font-size: clamp(.58rem, 1.8vw, .75rem); text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.cd b.tick { animation: tick .45s ease; }
@keyframes tick { 0% { transform: translateY(-30%); opacity: .2; } 100% { transform: none; opacity: 1; } }
.cd-done { font-family: var(--hf); font-size: 1.8rem; color: var(--p-ink); }

.events { display: grid; gap: clamp(14px, 2.5vw, 22px); grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); }
.events.n1 { max-width: 460px; margin: 0 auto; grid-template-columns: 1fr; }
.events.n2 { max-width: 820px; margin: 0 auto; }
.event { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; transition: transform .35s; }
.event:hover { transform: translateY(-4px); }
.ev-date { width: 74px; height: 74px; border-radius: 50%; display: grid; place-content: center; background: var(--p); color: var(--btn-text); line-height: 1; margin-bottom: 4px; flex: none; }
.ev-date b { font-family: var(--hf); font-size: 1.9rem; font-weight: 400; }
.ev-date span { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; }
.event h3 { font-family: var(--hf); font-size: clamp(1.5rem, 4.5vw, 2rem); color: var(--p-ink); line-height: 1.15; }
.ev-when, .ev-where { display: flex; gap: 8px; align-items: flex-start; justify-content: center; margin: 0; color: var(--muted); font-size: .95rem; text-align: left; }
.ev-when svg, .ev-where svg { flex: none; margin-top: 4px; color: var(--p-ink); }
.ev-where b { color: var(--t); font-weight: 600; }
.event .ibtn { margin-top: auto; }

.map { padding: 8px; overflow: hidden; }
.map iframe { display: block; width: 100%; height: clamp(240px, 45vw, 360px); border: 0; border-radius: calc(var(--card-radius) - 8px); filter: saturate(.85); }
.map-ph { min-height: clamp(200px, 40vw, 300px); display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px 16px; text-align: center; border-radius: calc(var(--card-radius) - 8px);
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--a) 22%, transparent), transparent 60%), repeating-linear-gradient(45deg, color-mix(in srgb, var(--p) 6%, transparent) 0 14px, transparent 14px 28px); }
.map-pin { color: var(--p-ink); animation: mapBob 2.4s ease-in-out infinite; }
@keyframes mapBob { 50% { transform: translateY(-6px); } }
.map-venue { margin: 0; max-width: 34ch; font-weight: 600; }
.map-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.gal { display: grid; gap: clamp(6px, 1.4vw, 12px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gal figure { margin: 0; aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: var(--field-bg); min-width: 0; }
.gal figure button { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.gal img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.gal figure:hover img { transform: scale(1.07); }
.gal.n1 { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
.gal.n1 figure { aspect-ratio: 4 / 3; }
.gal.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; margin: 0 auto; }
.gal.n2 figure { aspect-ratio: 4 / 5; }
.gal.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; margin: 0 auto; }
.gal.n5 figure:first-child { grid-column: span 2; grid-row: span 2; }
@media (max-width: 560px) {
  .gal.n3, .gal.n5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gal.n3 figure:first-child { grid-column: span 2; aspect-ratio: 16 / 10; }
  .gal.n5 figure:first-child { grid-column: span 2; grid-row: auto; aspect-ratio: 16 / 10; }
  .gal.n5.even figure:first-child { grid-column: auto; aspect-ratio: 1; } /* even count: keep rows full */
}

/* Photo collage — the template decides how many photos the gallery frames and the arrangement.
   `dense` lets tiles backfill gaps so every collage stays compact whatever the photo count. */
.gal.collage { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: dense; }
.gal.collage figure { aspect-ratio: 1; }
.gal.collage.col-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gal.collage.col-quad { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; margin-inline: auto; }
.gal.collage.col-feature { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gal.collage.col-feature figure:first-child { grid-column: span 2; grid-row: span 2; }
.gal.collage.col-mosaic { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gal.collage.col-mosaic figure:first-child { grid-column: span 2; grid-row: span 2; }
.gal.collage.col-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gal.collage.col-filmstrip { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(150px, 40%); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding-bottom: 6px; }
.gal.collage.col-filmstrip figure { scroll-snap-align: start; }
/* “add a photo” tiles in the owner preview keep the frame outline instead of a photo */
.gal.collage figure img[src^="data:image/svg+xml"] { opacity: .8; }
@media (max-width: 640px) {
  .gal.collage.col-mosaic, .gal.collage.col-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gal.collage.col-feature figure:first-child { grid-row: auto; aspect-ratio: 1; }
  .gal.collage.col-filmstrip { grid-auto-columns: 62%; }
}

.details { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.detail { text-align: center; }
.detail .d-ico { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 8px; border-radius: 50%; background: color-mix(in srgb, var(--p) 12%, var(--card-bg)); color: var(--p-ink); font-weight: 700; font-size: 1.2rem; }
.detail small { text-transform: uppercase; letter-spacing: .18em; font-size: .68rem; color: var(--muted); }
.detail p { margin: 6px 0 0; font-weight: 600; }
.detail a { color: var(--p-ink); }

/* Story timeline */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--line); transform: translateX(-50%); }
.timeline li { position: relative; width: 50%; padding: 0 34px 26px; }
.timeline li:nth-child(odd) { margin-left: 0; text-align: right; }
.timeline li:nth-child(even) { margin-left: 50%; }
.tl-dot { position: absolute; top: 24px; width: 16px; height: 16px; border-radius: 50%; background: var(--p); box-shadow: 0 0 0 6px color-mix(in srgb, var(--p) 20%, transparent); }
.timeline li:nth-child(odd) .tl-dot { right: -8px; }
.timeline li:nth-child(even) .tl-dot { left: -8px; }
.tl-card small { color: var(--p-ink); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; }
.tl-card h3 { font-family: var(--hf); font-size: clamp(1.4rem, 4vw, 1.8rem); color: var(--p-ink); margin: 4px 0; line-height: 1.2; }
.tl-card p { margin: 0; color: var(--muted); }
@media (max-width: 640px) {
  .timeline::before { left: 8px; }
  .timeline li, .timeline li:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 20px 36px; text-align: left; }
  .timeline li .tl-dot, .timeline li:nth-child(odd) .tl-dot { left: 0; right: auto; }
}

/* Forms */
.form { display: grid; gap: 14px; }
.fld { display: grid; gap: 6px; min-width: 0; }
.fld span { font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.fld input, .fld select, .fld textarea { width: 100%; padding: .8em 1em; border-radius: 14px; border: 1.5px solid var(--line); background: var(--field-bg); color: var(--t); min-width: 0; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--p); box-shadow: 0 0 0 4px color-mix(in srgb, var(--p) 18%, transparent); }
.fld textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 14px; }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 8px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: .75em .6em; border-radius: 14px; border: 1.5px solid var(--line); font-weight: 600; font-size: .9rem; transition: .2s; background: var(--field-bg); }
.seg input:checked + span { background: var(--p); color: var(--btn-text); border-color: var(--p); transform: scale(1.02); }
.seg input:focus-visible + span { outline: 2px solid var(--a); outline-offset: 2px; }
.form-msg { margin: 0; text-align: center; font-weight: 600; color: var(--p-ink); min-height: 1.2em; }
.form-msg.err { color: #e5484d; }
.form.done { animation: pulse .6s; }
@keyframes pulse { 50% { transform: scale(1.015); } }

.wishes { columns: 2 260px; column-gap: 14px; margin-top: 22px; }
.wish { break-inside: avoid; margin: 0 0 14px; padding: 18px 20px; }
.wish p { margin: 0 0 8px; font-style: italic; }
.wish cite { font-size: .8rem; color: var(--muted); font-style: normal; }
.wish.new { animation: pop .6s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }

.inv-footer { padding-bottom: 130px; }
.closing { font-style: italic; color: var(--muted); margin-bottom: 4px; }
.foot-names { font-family: var(--hf); font-size: clamp(2rem, 8vw, 3.4rem); color: var(--p-ink); line-height: 1.15; overflow-wrap: anywhere; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.made-with { display: inline-block; margin-top: 30px; font-size: .78rem; color: var(--muted); text-decoration: none; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line); }

/* Dock */
.dock { position: fixed; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 40; display: flex; gap: 4px; padding: 6px; border-radius: 99px; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); border: 1px solid var(--line); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .35); }
.dock a, .dock button { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--p-ink); background: none; border: 0; cursor: pointer; transition: .2s; }
.dock a:hover, .dock button:hover { background: color-mix(in srgb, var(--p) 14%, transparent); }
.music-btn.playing { background: var(--p) !important; color: var(--btn-text) !important; animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.intro-on .dock { opacity: 0; pointer-events: none; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .92); display: grid; place-items: center; padding: 50px 12px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; animation: pop .35s; }
.lb-x, .lb-nav { position: absolute; background: rgba(255, 255, 255, .12); border: 0; color: #fff; width: 46px; height: 46px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; display: grid; place-items: center; }
.lb-x { top: 14px; right: 14px; font-size: 1.1rem; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }

/* Toast */
.itoast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); z-index: 300; background: var(--t); color: var(--bg); padding: 12px 20px; border-radius: 99px; font-weight: 600; font-size: .9rem; opacity: 0; transition: .3s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.itoast.on { opacity: 1; transform: translate(-50%, 0); }

/* Top bar (demo / preview) */
.topbar { position: sticky; top: 0; z-index: 90; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 16px; background: #12241a; color: #fff; font: 600 .85rem/1.3 system-ui, sans-serif; }
.topbar .tb-free-note { font-weight: 500; opacity: .9; }
.topbar .tb-free-note a { color: #f0d9a0; text-decoration: underline; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tb-btn { padding: 8px 14px; border-radius: 99px; background: linear-gradient(120deg, #2d5a42, #4a7a5c); color: #fff; text-decoration: none; font-weight: 700; white-space: nowrap; }
.tb-btn.ghost { background: rgba(255, 255, 255, .12); }
.intro-on .topbar { position: fixed; left: 0; right: 0; z-index: 160; }

/* Template usage notes (demo page) */
.tips-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 170; width: min(380px, 100%); overflow-y: auto; background: #fff; color: #17281f; padding: 26px 22px 30px; box-shadow: -20px 0 50px rgba(0, 0, 0, .25); font: 400 .92rem/1.6 system-ui, -apple-system, 'Segoe UI', sans-serif; animation: slideIn .35s cubic-bezier(.2, .8, .2, 1); }
.tips-panel[hidden] { display: none; }
.tips-panel h3 { font-size: 1.2rem; font-weight: 800; margin: 0 30px 10px 0; }
.tips-panel h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #5d7266; margin: 18px 0 6px; }
.tips-panel p { margin: 0; }
.tips-panel ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.tips-panel a { color: #2d5a42; }
.tips-panel .tb-btn { color: #fff; }
.tips-plan { background: #f0eee1; border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.tips-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #ece9db; cursor: pointer; }
@keyframes slideIn { from { transform: translateX(100%); } }
.topbar button.tb-btn { border: 0; cursor: pointer; font: inherit; font-weight: 700; }

/* Small screens: the demo bar keeps its title + primary CTA, the rest folds into a ⋯ menu */
.tb-menu { display: none; position: relative; }
.tb-menu > summary { list-style: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.2rem; line-height: 1; font-weight: 700; cursor: pointer; -webkit-user-select: none; user-select: none; }
.tb-menu > summary::-webkit-details-marker { display: none; }
.tb-menu[open] > summary { background: rgba(255, 255, 255, .24); }
.tb-menu-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 95; display: grid; gap: 2px; min-width: 218px; padding: 8px; border-radius: 14px; background: #102018; border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.tb-menu-panel > * { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: #fff; font: 600 .88rem/1.25 system-ui, sans-serif; text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer; }
.tb-menu-panel > *:hover, .tb-menu-panel > *:focus-visible { background: rgba(255, 255, 255, .12); }
@media (max-width: 720px) {
  .topbar { flex-wrap: nowrap; gap: 10px; padding: 9px 12px; }
  .topbar > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-demo .topbar-actions { flex-wrap: nowrap; gap: 8px; }
  .topbar-demo .topbar-actions > .tb-btn.ghost { display: none; }
  .topbar-demo .tb-menu { display: block; }
  .topbar-preview .topbar-actions { flex-wrap: nowrap; gap: 6px; }
  .topbar-preview .tb-btn { padding: 7px 10px; font-size: .76rem; }
  .topbar-preview > span:first-child { font-size: .78rem; }
  .tb-kicker { display: none; } /* the design name + price matter more than "Live demo" on a phone */
}

/* Watermark for unpaid premium preview */
.watermark { position: fixed; inset: -50%; z-index: 150; pointer-events: none; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 60px 90px; transform: rotate(-28deg); }
.watermark span { font: 900 clamp(2rem, 7vw, 4rem)/1 system-ui, sans-serif; color: rgba(128, 128, 128, .13); letter-spacing: .1em; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.is-embed .reveal { transition-duration: .5s; }

/* Effects layer */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.fx { position: absolute; top: -8vh; will-change: transform; }
.fx svg { width: 100%; height: 100%; display: block; }
.fx.fall { animation: fxFall var(--dur) linear var(--delay) infinite; }
.fx.rise { top: auto; bottom: -12vh; animation: fxRise var(--dur) ease-in var(--delay) infinite; }
.fx.twinkle { top: var(--y); animation: fxTwinkle var(--dur) ease-in-out var(--delay) infinite; }
@keyframes fxFall { 0% { transform: translate3d(0, 0, 0) rotate(0); opacity: 0; } 8% { opacity: var(--op, .9); } 50% { transform: translate3d(var(--sway), 55vh, 0) rotate(calc(var(--rot) / 2)); } 92% { opacity: var(--op, .9); } 100% { transform: translate3d(calc(var(--sway) * -1), 115vh, 0) rotate(var(--rot)); opacity: 0; } }
@keyframes fxRise { 0% { transform: translate3d(0, 0, 0); opacity: 0; } 10% { opacity: var(--op, .85); } 50% { transform: translate3d(var(--sway), -60vh, 0) rotate(8deg); } 100% { transform: translate3d(calc(var(--sway) * -1), -125vh, 0) rotate(-8deg); opacity: 0; } }
@keyframes fxTwinkle { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 50% { transform: scale(1) rotate(90deg); opacity: 1; } }
.twinkle { transform-origin: center; transform-box: fill-box; animation: fxTwinkle 3s ease-in-out infinite; }

/* ---------- INTROS ---------- */
.intro { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--bg) 85%, #fff), var(--bg)); transition: opacity .9s ease .3s, visibility 0s 1.3s; }
.intro.opened { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-to { font-family: var(--hf); font-size: clamp(1.4rem, 5vw, 2rem); color: var(--p-ink); text-align: center; margin: 0 0 22px; overflow-wrap: anywhere; }
.intro-btn { margin-top: 28px; padding: .9em 2em; border-radius: 99px; border: 1.5px solid var(--p); background: transparent; color: var(--p-ink); letter-spacing: .25em; text-transform: uppercase; font-size: .75rem; font-weight: 700; cursor: pointer; animation: breathe 2.2s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--p) 12%, transparent); } }

/* Envelope */
.env-stage { display: flex; flex-direction: column; align-items: center; width: 100%; }
.envelope { position: relative; width: min(360px, 84vw); aspect-ratio: 1.45; perspective: 1000px; cursor: pointer; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .25)); }
.env-back { position: absolute; inset: 0; border-radius: 10px; background: color-mix(in srgb, var(--p) 80%, #000); }
.env-letter { position: absolute; left: 7%; right: 7%; top: 8%; bottom: 8%; border-radius: 6px; background: color-mix(in srgb, var(--bg) 90%, #fff); display: grid; place-content: center; text-align: center; padding: 10px; transition: transform 1s cubic-bezier(.3, .8, .3, 1) .6s; z-index: 1; }
.env-letter span { font-family: var(--hf); color: var(--p-ink); font-size: clamp(1.2rem, 5vw, 1.8rem); line-height: 1.15; overflow-wrap: anywhere; }
.env-letter small { letter-spacing: .25em; font-size: .7rem; color: var(--muted); margin-top: 6px; }
.env-front { position: absolute; inset: 0; z-index: 2; border-radius: 10px; background: linear-gradient(to top right, var(--p) 50%, transparent 50.5%) left / 50.5% 100% no-repeat, linear-gradient(to top left, color-mix(in srgb, var(--p) 92%, #000) 50%, transparent 50.5%) right / 50.5% 100% no-repeat; }
.env-front::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, color-mix(in srgb, var(--p) 85%, #fff) 0 44%, transparent 44.5%); clip-path: polygon(0 100%, 50% 40%, 100% 100%); }
.env-flap { position: absolute; left: 0; right: 0; top: 0; height: 58%; z-index: 3; background: color-mix(in srgb, var(--p) 90%, #fff 10%); clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transition: transform .8s cubic-bezier(.4, 0, .2, 1), z-index 0s .4s; }
.env-seal { position: absolute; left: 50%; top: 58%; width: 68px; height: 68px; transform: translate(-50%, -50%); z-index: 4; background: none; border: 0; padding: 0; cursor: pointer; color: var(--a-ink); transition: transform .5s, opacity .4s; display: grid; place-items: center; }
.env-seal svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .3)); }
.env-seal b { position: relative; font-family: var(--hf); color: var(--p-ink); font-size: 1.1rem; font-weight: 400; }
.intro.opening .env-seal { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
.intro.opening .env-flap { transform: rotateX(180deg); z-index: 0; }
.intro.opening .env-letter { transform: translateY(-48%); z-index: 3; }

/* Curtain */
.intro-curtain { background: var(--bg); overflow: hidden; }
.cur { position: absolute; top: 0; bottom: 0; width: 51%; z-index: 1; transition: transform 1.6s cubic-bezier(.7, 0, .3, 1); background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--p) 75%, #000) 0 18px, var(--p) 18px 30px, color-mix(in srgb, var(--p) 85%, #000) 30px 46px); box-shadow: inset 0 -60px 80px -40px rgba(0, 0, 0, .5); }
.cur-l { left: 0; border-right: 3px solid var(--a); }
.cur-r { right: 0; border-left: 3px solid var(--a); }
.cur-center { position: relative; z-index: 2; text-align: center; display: grid; justify-items: center; padding: 30px 22px; border-radius: 26px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(4px); max-width: min(440px, 100%); transition: opacity .5s; }
.cur-orn { width: 110px; color: var(--a-ink); animation: spin 30s linear infinite; margin-bottom: 10px; }
.intro-names { font-family: var(--hf); font-size: clamp(2rem, 9vw, 3.4rem); color: var(--a-ink); line-height: 1.1; overflow-wrap: anywhere; }
.intro-curtain .intro-to { color: var(--t); font-size: 1.1rem; margin-bottom: 8px; }
.intro-curtain .intro-btn { color: var(--a-ink); border-color: var(--a); }
.intro.opening .cur-l { transform: translateX(-102%); }
.intro.opening .cur-r { transform: translateX(102%); }
.intro.opening .cur-center { opacity: 0; }
.intro-curtain.opened { transition-delay: 1.2s; }

/* Seal */
.seal-stage { display: grid; justify-items: center; text-align: center; }
.big-seal { position: relative; width: clamp(140px, 40vw, 190px); aspect-ratio: 1; border: 0; background: none; cursor: pointer; color: var(--p-ink); display: grid; place-items: center; padding: 0; animation: wobble 3s ease-in-out infinite; transition: transform .7s cubic-bezier(.5, -0.4, .5, 1.4), opacity .6s; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .3)); }
.big-seal svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.big-seal b { position: relative; font-family: var(--hf); font-size: clamp(2rem, 7vw, 2.8rem); color: var(--bg); font-weight: 400; }
.intro-hint { margin-top: 22px; letter-spacing: .25em; text-transform: uppercase; font-size: .72rem; color: var(--muted); }
@keyframes wobble { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg) scale(1.03); } }
.intro.opening .big-seal { transform: scale(2.2) rotate(40deg); opacity: 0; animation: none; }

/* =========================================================================
   LAYOUT SKINS
   ========================================================================= */

/* --- FLORAL --- */
.fl-corner.tl { top: -10px; left: -10px; transform: scaleY(-1); animation: sway2 7s ease-in-out infinite; transform-origin: top left; }
.fl-corner.tr { top: -10px; right: -10px; transform: rotate(180deg); animation: sway 8s ease-in-out infinite; transform-origin: top right; }
.fl-corner.bl { bottom: -10px; left: -10px; animation: sway 9s ease-in-out infinite; transform-origin: bottom left; }
.fl-corner.br { bottom: -10px; right: -10px; transform: scaleX(-1); animation: sway2 7.5s ease-in-out infinite; transform-origin: bottom right; }
@keyframes sway { 50% { rotate: 2.5deg; } }
@keyframes sway2 { 50% { rotate: -2.5deg; } }
@keyframes kenburns { to { transform: scale(1.12) translate(-2%, -2%); } }

/* --- ROYAL --- */
@keyframes glow { 50% { opacity: .5; scale: 1.1; } }
@keyframes foil { to { background-position: 250% center; } }

/* --- MODERN (editorial) --- */
.md-grid { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; min-height: 100svh; width: 100%; }
@media (max-width: 820px) {
  .md-grid { grid-template-columns: 1fr; grid-template-rows: minmax(52vh, 1fr) auto; }
}

/* --- CLASSIC (boho card with sprigs + wax seal) --- */
.cl-sprig.l { left: clamp(-26px, -4vw, -10px); animation: sway 6s ease-in-out infinite; }
.cl-sprig.r { right: clamp(-26px, -4vw, -10px); transform: scaleX(-1); animation: sway2 6s ease-in-out infinite; }

/* --- ROMANCE (polaroids + hearts) --- */
@keyframes heartbeat { 0%, 100% { transform: scale(1) translateY(0); } 15% { transform: scale(1.18) translateY(-4px); } 30% { transform: scale(1) translateY(-8px); } }
.pol.front { position: relative; transform: rotate(-4deg); z-index: 2; transition: transform .5s; }
.pol.front:hover { transform: rotate(0) scale(1.03); }
.pol.back { position: absolute; inset: 0; transform: rotate(7deg) translate(14px, 8px); z-index: 1; }
.tape { position: absolute; top: -12px; left: 50%; width: 90px; height: 26px; translate: -50% 0; rotate: -3deg; background: color-mix(in srgb, var(--a) 60%, rgba(255, 255, 255, .6)); z-index: 3; opacity: .85; }

/* --- PARTY (playful neo-brutal) --- */
.pt-blob.b1 { width: 46vmax; height: 46vmax; background: color-mix(in srgb, var(--a) 70%, transparent); top: -18vmax; left: -14vmax; }
.pt-blob.b2 { width: 34vmax; height: 34vmax; background: color-mix(in srgb, var(--p) 45%, transparent); bottom: -14vmax; right: -10vmax; animation-delay: -4s; }
.pt-blob.b3 { width: 14vmax; height: 14vmax; background: color-mix(in srgb, var(--p) 30%, var(--a)); top: 18%; right: 12%; animation-delay: -8s; }
@keyframes morph { 50% { border-radius: 63% 37% 38% 62% / 55% 61% 39% 45%; transform: rotate(30deg) scale(1.06); } }
.pt-balloons.l { left: 2%; top: 12%; }
.pt-balloons.r { right: 2%; bottom: 14%; animation-delay: -3s; }
@keyframes floaty { 50% { transform: translateY(-22px) rotate(3deg); } }
.pt-photo .ring { position: absolute; inset: -14px; border-radius: 50%; border: 3px dashed var(--p); animation: spin 18s linear infinite; }

/* --- HOME (housewarming) --- */
@keyframes swing { 50% { transform: scaleY(1.06); } }

/* --- AURORA (glassmorphism) --- */
@keyframes aurora { 50% { transform: translate(10vw, 8vh) scale(1.15); } 100% { transform: translate(-6vw, 12vh) scale(.9); } }
.glass { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); border-radius: 32px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .2); }

/* --- FESTIVE (lanterns, rangoli, diyas) --- */
.flame { transform-origin: 50% 100%; transform-box: fill-box; animation: flicker 1.6s ease-in-out infinite alternate; }
.flame-glow { animation: glow 2.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes flicker { 0% { transform: scale(1, 1) skewX(0); } 40% { transform: scale(.94, 1.08) skewX(3deg); } 70% { transform: scale(1.04, .95) skewX(-3deg); } 100% { transform: scale(.98, 1.04) skewX(1deg); } }

/* =========================================================================
   15 ADDITIONAL LAYOUTS
   ========================================================================= */

/* --- TEMPLE (Kerala kasavu / South-Indian traditional) --- */
.tp-border.top { top: 0; }
.tp-border.bottom { bottom: 0; transform: scaleY(-1); }
.tp-lamp { color: var(--p-ink); justify-self: center; width: clamp(40px, 11vw, 74px); }
.tp-lamp svg { width: 100%; height: auto; display: block; overflow: visible; }

/* --- DECO (Art Deco / Gatsby) --- */
@keyframes rays { to { transform: scale(1.04); opacity: .8; } }
.dc-corner.tl { top: -14px; left: -14px; } .dc-corner.tr { top: -14px; right: -14px; } .dc-corner.bl { bottom: -14px; left: -14px; } .dc-corner.br { bottom: -14px; right: -14px; }

/* --- PEACOCK --- */
.pk-fan { position: absolute; inset: 0; }
/* Emerald Peacock — "The Peacock's Promise" */
.pkx-cloud.c1 svg { fill: #c4ccd2; } .pkx-cloud.c2 svg { fill: #8d99a3; }
.pkx-cloud.shake { animation: pkx-shake .3s; }
.pkx-stage.flash::after { content: ''; position: absolute; inset: 0; z-index: 4; background: #fff; animation: pkx-flash .5s forwards; pointer-events: none; }
.pkx-feather.story { cursor: pointer; }
.pkx-feather.story:disabled { cursor: default; }
.pkx-stage[data-state="dance"] .pkx-feather.story:not(.got) { filter: drop-shadow(0 0 6px var(--a)) drop-shadow(0 0 12px var(--a)); animation: pkx-glow 1.4s ease-in-out infinite; }
.pkx-feather.got { filter: saturate(.5) brightness(.85); }
.pkx-chapter { width: min(420px, 100%); margin: 18px auto 0; padding: 18px; text-align: center; animation: bp-pop .45s; }
.pkx-chapter[hidden], .pkx-count[hidden], .pkx-done[hidden] { display: none; }
.pkx-chapter small { letter-spacing: .2em; text-transform: uppercase; font-size: .7rem; color: var(--a); }
.pkx-chapter h3 { margin: 6px 0; font-family: var(--hf); font-weight: 400; font-size: 1.5rem; }
.pkx-chapter p { margin: 0; opacity: .9; }
@keyframes pkx-shake { 25% { transform: translateX(-54%) rotate(-3deg); } 75% { transform: translateX(-46%) rotate(3deg); } }
@keyframes pkx-flash { from { opacity: .85; } to { opacity: 0; } }
@keyframes pkx-glow { 50% { filter: drop-shadow(0 0 2px var(--a)); } }

/* --- NEWSPAPER --- */
/* The Wedding Times — "Inside this edition" */
.tmx-clip { position: relative; display: grid; gap: 6px; padding: 18px 16px 16px; border: 0; text-align: left; font: inherit; color: #2a2118; background: #efe3c8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E"); box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .45); transform: rotate(var(--rot)); cursor: pointer; transition: transform .3s; }
.tmx-clip:hover { transform: rotate(0) scale(1.02); }
.tmx-clip small { font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.tmx-clip b { font-family: var(--hf); font-size: 1.15rem; line-height: 1.15; }
.tmx-clip.open .tmx-body { max-height: 8em; }
.tmx-clip:not(.open)::after { content: 'Tap to read ▾'; font-size: .7rem; opacity: .6; }
.tmx-press.rolling .tmx-rollers i { animation: tmx-roll .25s linear infinite; }
.tmx-lever.pulled { transform: rotate(55deg); cursor: default; }
.tmx-press.printed .tmx-out { height: 210px; }
.tmx-signs button.on { background: var(--t); color: var(--bg); }
@keyframes tmx-roll { to { background-position: 24px 0; } }

/* --- TICKET (boarding pass) --- */
.tk-cloud.c1 { top: 12%; left: -20%; } .tk-cloud.c2 { top: 32%; left: -40%; animation-duration: 34s; animation-delay: -12s; scale: .7; }
@keyframes cloud { to { transform: translateX(150vw); } }
@keyframes fly { 0% { transform: translate(0, 30px) rotate(-8deg); } 100% { transform: translate(calc(100vw + 120px), -40px) rotate(-8deg); } }

/* --- POSTCARD (vintage airmail) --- */

/* --- CELESTIAL (night sky) --- */
@keyframes draw { to { stroke-dashoffset: 0; } }

/* --- TROPICAL --- */
@keyframes sunset { to { translate: -50% -42%; opacity: .65; } }
.tr-palm { position: absolute; bottom: 4%; width: clamp(150px, 34vw, 340px); color: color-mix(in srgb, var(--t) 85%, #000); z-index: 1; transform-origin: 10% 90%; animation: palmSway 6s ease-in-out infinite alternate; }
.tr-palm svg { width: 100%; height: auto; display: block; }
.tr-palm.l { left: -4%; }
.tr-palm.r { right: -4%; transform: scaleX(-1); animation-name: palmSwayR; }
@keyframes palmSway { to { rotate: 3deg; } }
@keyframes palmSwayR { to { transform: scaleX(-1) rotate(3deg); } }
@keyframes waves { to { transform: translateX(-600px); } }

/* --- RETRO (70s groovy) --- */
@keyframes spinSlow { to { rotate: 360deg; } }
.rt-daisy.d1 { top: 10%; left: 6%; } .rt-daisy.d2 { top: 16%; right: 6%; animation-direction: reverse; width: clamp(44px, 10vw, 90px); }
/* Groovy Thirty — spin the record + groovy name */
.grx-deck.spinning .grx-ball i { animation: grxBall 1.2s linear infinite; box-shadow: inset -6px -6px 10px rgba(0, 0, 0, .25), 0 0 26px 6px #fff3b0, 0 0 60px 10px rgba(244, 182, 63, .6); }
.grx-deck.spinning .grx-vinyl { animation: grxSpin .9s linear infinite; cursor: default; }
.grx-deck.spinning .grx-arm { transform: rotate(4deg); }
.grx-card li.on { border-style: solid; background: var(--a); animation: grxPop .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes grxSpin { to { transform: rotate(360deg); } }
@keyframes grxBall { to { transform: rotate(360deg); } }
@keyframes grxPop { from { transform: scale(.6); opacity: 0; } }

/* --- MARQUEE (theatre lights) --- */
.mq-spot.l { left: -20vmax; } .mq-spot.r { right: -20vmax; animation-delay: -3s; animation-direction: alternate-reverse; }
@keyframes spotlight { from { rotate: -18deg; } to { rotate: 18deg; } }
@keyframes bulbs { 50% { filter: drop-shadow(0 0 1px var(--a)) brightness(.6); } }
/* Marquee Night — red carpet poses → Walk of Fame star, and the award envelope */
.mqx-rope.l { left: 4%; } .mqx-rope.r { right: 4%; }
.mqx-carpet.flash .mqx-flashes i { animation: mqxFlash .45s ease-out; }
.mqx-carpet.flash .mqx-flashes i:nth-child(2n) { animation-delay: .12s; }
.mqx-carpet.flash .mqx-flashes i:nth-child(3n) { animation-delay: .22s; }
.mqx-cats button.on { background: var(--a); color: #1c0c0c; }
.mqx-envelope.open .mqx-env-flap { transform: rotateX(180deg); z-index: 0; }
.mqx-envelope.open .mqx-card { transform: translateY(-58%); z-index: 3; box-shadow: 0 14px 30px rgba(0, 0, 0, .45); }
@keyframes mqxFlash { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; transform: scale(1.3); } 100% { opacity: 0; transform: scale(1.6); } }

/* --- BOHO (rainbow arch) --- */
.bh-pampas.l { left: 2%; } .bh-pampas.r { right: 2%; transform: scaleX(-1); }

/* --- WATERCOLOR --- */
.is-dark .wc-wash i { mix-blend-mode: screen; }
@keyframes wash { to { transform: translate(6vw, 4vh) rotate(25deg) scale(1.1); border-radius: 58% 42% 40% 60% / 45% 58% 42% 55%; } }
.wc-stroke { position: absolute; left: -6%; top: 22%; width: 112%; height: 56%; z-index: -1; fill: color-mix(in srgb, var(--a) 45%, transparent); }
.wc-stroke path { animation: brushIn 1.4s cubic-bezier(.2, .8, .2, 1) .3s both; transform-origin: left; }
@keyframes brushIn { from { transform: scaleX(0); } }

/* --- LOTUS (pond) --- */
@keyframes ripple { 0% { scale: 0; opacity: .9; } 100% { scale: 1; opacity: 0; } }
.lt-pad { position: absolute; z-index: 1; width: clamp(60px, 14vw, 120px); aspect-ratio: 1.3; border-radius: 50%; background: conic-gradient(from 20deg, transparent 0 18deg, color-mix(in srgb, var(--p) 60%, #3f6b3f) 18deg); opacity: .65; animation: floaty 9s ease-in-out infinite; }
.lt-pad.p1 { left: 6%; top: 62%; } .lt-pad.p2 { right: 8%; top: 70%; animation-delay: -3s; scale: .8; } .lt-pad.p3 { left: 18%; top: 82%; animation-delay: -6s; scale: .6; }
.lt-flower { width: min(200px, 52vw); color: var(--p-ink); margin-top: -14px; }
.lt-flower svg { width: 100%; height: auto; display: block; overflow: visible; }
.lt-flower .petal { transform-box: fill-box; transform-origin: 50% 100%; animation: bloom 1.6s cubic-bezier(.2, .9, .3, 1.2) both; }
.lt-flower g:nth-child(1) .petal, .lt-flower g:nth-child(7) .petal { animation-delay: .6s; } .lt-flower g:nth-child(2) .petal, .lt-flower g:nth-child(6) .petal { animation-delay: .4s; } .lt-flower g:nth-child(3) .petal, .lt-flower g:nth-child(5) .petal { animation-delay: .2s; }
@keyframes bloom { from { scale: 1 .1; opacity: 0; } }

/* --- CHALK (chalkboard) --- */

/* --- STORY (Instagram-story) --- */
.st-bars i.done { background: #fff; }
.st-bars i.now::after { content: ''; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: storyBar 6s linear infinite; }
@keyframes storyBar { from { transform: scaleX(0); } }
.st-sticker.date { background: var(--a); color: #17281f; }

/* Embedded preview (editor iframe / homepage phone): fewer distractions */
.is-embed .hero { min-height: 92vh; }
.is-embed.layout-modern .hero, .is-embed .md-grid { min-height: 92vh; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .fx-layer { display: none; }
}
@media print {
  .intro, .fx-layer, .dock, .topbar, .watermark, .scroll-cue { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---- Readability & responsive fixes from visual QA ---- */
/* Second-name line: derive from the primary colour so it always contrasts with the background */
.h-second { color: color-mix(in srgb, var(--p-ink) 80%, var(--t)); }
/* Retro: lighter 3D shadow on long names / phones so letters stay crisp */
/* Watercolor: deeper name colour and a softer brush stroke */
/* Lotus: smaller flower, lily pads kept clear of the text */
.lt-flower { width: min(170px, 42vw); margin-top: -34px; position: relative; z-index: 3; }
.lt-pad { opacity: .4; z-index: 0; }
.lt-pad.p1 { top: auto; bottom: 8%; left: 4%; } .lt-pad.p2 { top: auto; bottom: 4%; right: 6%; } .lt-pad.p3 { top: auto; bottom: 14%; left: 30%; }
/* Tropical: smaller, softer palms on phones */
@media (max-width: 640px) { .tr-palm { width: clamp(100px, 30vw, 160px); opacity: .55; bottom: 2%; } }
/* Tropical: keep palms at the edges on wide screens so they never cover the text */
@media (min-width: 641px) { .tr-palm { width: clamp(150px, 20vw, 260px); opacity: .8; } }

/* =========================================================================
   INTERACTIVE SECTIONS (premium): scratch card, quiz, guest photo wall
   ========================================================================= */
.scratch { position: relative; width: min(340px, 100%); aspect-ratio: 1.6; margin: 0 auto; border-radius: 22px; overflow: hidden; box-shadow: var(--card-shadow), 0 0 0 1.5px var(--line); }
.scratch-under { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 2px; background: var(--card-bg); }
.scratch-under small { letter-spacing: .25em; text-transform: uppercase; font-size: .7rem; color: var(--muted); }
.scratch-under b { font-family: var(--hf); font-size: clamp(3rem, 14vw, 4.4rem); line-height: 1; color: var(--p-ink); font-weight: 400; }
.scratch-under span { font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .85rem; }
.scratch-under em { font-size: .85rem; color: var(--muted); }
.scratch canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; transition: opacity .6s; }
.scratch.revealed canvas { opacity: 0; pointer-events: none; }
.scratch.revealed .scratch-under b { animation: pop .6s cubic-bezier(.2, .9, .3, 1.4); }
.scratch-hint { position: absolute; left: 0; right: 0; bottom: 10px; margin: 0; font-size: .8rem; font-weight: 700; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .4); pointer-events: none; transition: opacity .3s; animation: breathe 2s ease-in-out infinite; }

.quiz { max-width: 560px; margin: 0 auto; display: grid; gap: 14px; text-align: center; }
.quiz-top { display: flex; align-items: center; gap: 12px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.quiz-bar { flex: 1; height: 6px; border-radius: 9px; background: var(--field-bg); overflow: hidden; }
.quiz-bar i { display: block; height: 100%; width: 0; background: var(--p); border-radius: 9px; transition: width .4s; }
.quiz h3 { font-family: var(--hf); font-size: clamp(1.4rem, 5vw, 1.9rem); color: var(--p-ink); line-height: 1.25; overflow-wrap: anywhere; }
.quiz-opts { display: grid; gap: 10px; }
.quiz-opt { padding: .9em 1em; border-radius: 14px; border: 1.5px solid var(--line); background: var(--field-bg); color: var(--t); font-weight: 600; cursor: pointer; transition: transform .15s, background .2s, border-color .2s; overflow-wrap: anywhere; }
.quiz-opt:hover { transform: translateY(-2px); border-color: var(--p); }
.quiz-opt.right { background: #16a34a; border-color: #16a34a; color: #fff; animation: pop .4s; }
.quiz-opt.wrong { background: #dc2626; border-color: #dc2626; color: #fff; animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.quiz-result { display: grid; gap: 8px; justify-items: center; }
.quiz-score { font-family: var(--hf); font-size: clamp(3rem, 14vw, 4.5rem); color: var(--p-ink); line-height: 1; animation: pop .6s cubic-bezier(.2, .9, .3, 1.4); }

.pw-form { max-width: 640px; margin: 0 auto 22px; }
.pw-pick input[type=file] { padding: .6em; font-size: .85rem; }
/* real grid (not CSS columns, which left a column empty) so the wall fills the form's 640px width edge to edge */
.pw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 640px; margin-inline: auto; }
.pw-grid figure { display: flex; flex-direction: column; margin: 0; border-radius: 14px; overflow: hidden; background: var(--card-bg); box-shadow: var(--card-shadow); }
.pw-grid figure.new { animation: pop .6s cubic-bezier(.2, .9, .3, 1.3); }
.pw-grid button { all: unset; display: block; width: 100%; aspect-ratio: 1; cursor: zoom-in; }
.pw-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pw-grid figcaption { margin-top: auto; font-size: .75rem; padding: 6px 10px; color: var(--muted); overflow-wrap: anywhere; }
/* Host-only controls (the invitation's owner is looking at their own live wall) */
.pw-admin { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 8px 8px; }
.pw-admin form { margin: 0; }
.pw-grid .pw-admin button, .pw-grid .pw-admin summary { all: unset; box-sizing: border-box; display: inline-block; width: auto; aspect-ratio: auto; cursor: pointer; font: 600 .7rem/1.2 var(--bf); padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); color: var(--t); background: var(--field-bg); }
.pw-grid .pw-admin button:hover, .pw-grid .pw-admin summary:hover { border-color: var(--p); }
.pw-admin .pw-del { color: #b91c1c; border-color: #f0c4c4; }
.pw-edit summary { list-style: none; }
.pw-edit summary::-webkit-details-marker { display: none; }
.pw-edit[open] { flex-basis: 100%; }
.pw-edit form { display: flex; gap: 6px; margin-top: 6px; }
.pw-edit input { flex: 1; min-width: 0; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--field-bg); color: var(--t); font: .75rem var(--bf); }
@media (max-width: 520px) { .pw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* =========================================================================
   GEN-Z LAYOUTS: music player, streaming premiere, chat, pastel mandap, Bollywood poster, Y2K
   ========================================================================= */

/* --- MUSIC PLAYER --- */
@keyframes grow { from { transform: scaleX(0); } }
.sp-play.playing { animation: none !important; }

/* --- STREAMING PREMIERE --- */
/* The Big Premiere (wedding) — playful extras */
.bpx-rate button.on { border-color: #fff; background: #fff; animation: bp-pop .4s; }
/* Premiere night section */
.bpx-line.out { opacity: 0; transform: scale(.96); }
.bpx-trailer.playing .bpx-playbtn { display: none; }
.bpx-skipad.d1 { right: auto; left: 10px; }
.bpx-skipad.d2 { bottom: auto; top: 10px; }
.bpx-who.me .bpx-av { background: linear-gradient(135deg, var(--p), #5a0a0e); border-color: #f5c518; animation: bp-glow 2.4s ease-in-out infinite; }
.bpx-spoiler.open .bpx-secret { filter: none; user-select: auto; }
.bpx-spoiler.open small { visibility: hidden; }
.bpx-popbtn.down { transform: translateY(6px); box-shadow: 0 2px 0 #6e0a10, 0 6px 12px rgba(0, 0, 0, .5); }
.bpx-machine.shake .bpx-glass { animation: bpx-rattle .12s linear infinite; }
.bpx-machine.done .bpx-usher { opacity: 1; transform: none; }
.bpx-seat:hover:not(.taken) { background: #6d6d6d; transform: translateY(-2px); }
.bpx-seat.taken { background: #7a5c00; cursor: not-allowed; }
.bpx-seat.on { background: var(--p); animation: bp-pop .4s; }
@keyframes bp-glow { 50% { box-shadow: 0 0 0 4px rgba(245, 197, 24, .35), 0 0 22px rgba(245, 197, 24, .45); } }
@keyframes bpx-rattle { 50% { transform: translateX(1.5px) rotate(.5deg); } }
@keyframes bp-pop { 50% { transform: scale(1.3); } }

/* --- CHAT --- */
/* WhatsApp-style palette, shared by the hero phone and the "How it started" section below */
.ch-bigtext.long { font-size: clamp(1.2rem, 5vw, 1.6rem); }
.ch-bigtext.xlong { font-size: clamp(1.05rem, 4.2vw, 1.35rem); }
@keyframes typing { 30% { transform: translateY(-4px); opacity: 1; } 0%, 60%, 100% { opacity: .4; } }
/* Seen ✓✓ Forever — a chat-app-accurate thread: app header, doodled wallpaper, bubble tails, timestamps,
   blue ticks, typing dots and a real composer. Fluid from a 320px phone up to the desktop card. */
.sf-tick.read { color: var(--wa-tick); }
/* the first bubble after a date divider keeps the classic chat tail */
.sf-play .sf-step.on { opacity: 1; transform: none; }
.sf-lock.open .sf-locked { display: none; }
.sf-lock.open .sf-secret { display: block; animation: bp-pop .5s; }
.sf-lock.open { cursor: default; }
@media (max-width: 560px) {
  .sec-seenforever .sec-title, .sec-seenforever .sf-moral { padding-inline: clamp(16px, 5vw, 24px); }
}
@media (max-width: 360px) { /* keep the emoji row on one line on the narrowest phones */
}

/* --- PASTEL MANDAP (modern-traditional) --- */
.mp-drape.r { animation-delay: -3s; }
@keyframes drape { 50% { transform: skewX(3deg); } }
@keyframes garland { 50% { transform: rotate(4deg); } }

/* --- 90s BOLLYWOOD POSTER --- */

/* --- Y2K CHROME --- */
@keyframes load { from { width: 6%; } to { width: 100%; } }

/* =========================================================================
   SECRET CAPSULE (premium) — daily-clue countdown + grand reveal overlay
   ========================================================================= */
.sec-capsule { overflow: hidden; isolation: isolate; background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--p) 16%, transparent), transparent 70%); }
.sec-capsule.cap-full { min-height: 100vh; min-height: 100svh; display: grid; align-items: center; background: radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--p) 26%, var(--bg)), var(--bg) 72%); }
.cap-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cap-sky i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: var(--a); box-shadow: 0 0 8px var(--a); opacity: 0; animation: capTwinkle var(--d) ease-in-out infinite; }
@keyframes capTwinkle { 50% { opacity: .75; transform: scale(1.4); } }

.cap-orb-wrap { position: relative; width: clamp(210px, 58vw, 290px); aspect-ratio: 1; margin: 0 auto 18px; display: grid; place-items: center; }
.cap-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 80s linear infinite; overflow: visible; }
.cap-ring path { fill: none; stroke: color-mix(in srgb, var(--p) 22%, transparent); stroke-width: 5; stroke-linecap: round; }
.cap-ring path.on { stroke: var(--a); filter: drop-shadow(0 0 4px var(--a)); }
.cap-ring path.now { stroke: var(--p); animation: capSeg 1.6s ease-in-out infinite; }
@keyframes capSeg { 50% { stroke-width: 8; } }
.cap-orb { position: relative; width: 66%; aspect-ratio: 1; border-radius: 50%; animation: capFloat 5s ease-in-out infinite; filter: drop-shadow(0 22px 26px color-mix(in srgb, var(--p) 45%, transparent)); }
.cap-orb::before { content: ''; position: absolute; inset: -20%; z-index: -1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--a) 55%, transparent), transparent 66%); animation: capPulse 3s ease-in-out infinite; }
@keyframes capFloat { 50% { transform: translateY(-10px); } }
@keyframes capPulse { 50% { transform: scale(1.12); opacity: .6; } }
.cap-half { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .78), transparent 22%), radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--a) 78%, #fff), var(--p) 70%, color-mix(in srgb, var(--p) 65%, #000)); background-size: 100% 200%; }
.cap-half.top { top: 0; border-radius: 999px 999px 0 0; background-position: top; }
.cap-half.bot { bottom: 0; border-radius: 0 0 999px 999px; background-position: bottom; }
.cap-half.top::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95), var(--a), rgba(255, 255, 255, .95), transparent); }
.cap-core { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; color: #fff; line-height: 1; text-shadow: 0 2px 12px rgba(0, 0, 0, .4); }
.cap-core b { font-family: var(--hf); font-weight: 400; font-size: clamp(2.6rem, 11vw, 3.7rem); }
.cap-core small { margin-top: 6px; font-size: .6rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.cap-lock { position: absolute; left: 50%; bottom: -7%; translate: -50% 0; z-index: 3; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--p-ink); border: 2px solid var(--a); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .45); }

.cap-opens { color: var(--muted); margin: 8px 0 14px; line-height: 1.5; }
.cap-opens b { color: var(--t); font-weight: 600; }
.cap-cd { margin-bottom: 8px; }
.cap-today { position: relative; max-width: 580px; margin: 26px auto 0; text-align: center; border: 2px solid transparent; background: linear-gradient(var(--card-bg), var(--card-bg)) padding-box, linear-gradient(120deg, var(--p), var(--a), var(--p)) border-box; }
.cap-badge { display: inline-block; margin-bottom: 12px; padding: 5px 14px; border-radius: 99px; background: var(--p); color: var(--btn-text); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.cap-clue { margin: 0 0 12px; font-size: clamp(1.1rem, 3.4vw, 1.35rem); font-style: italic; line-height: 1.55; color: var(--t); min-height: 1.55em; }
.cap-clue.typing::after { content: '▍'; margin-left: 2px; color: var(--p-ink); animation: crBlink .8s steps(2) infinite; font-style: normal; }
.cap-next { color: var(--muted); }
.cap-next b { color: var(--p-ink); font-variant-numeric: tabular-nums; }

.cap-trail { list-style: none; margin: 26px 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.cap-tile { position: relative; min-height: 112px; padding: 12px 9px; border-radius: 16px; display: grid; align-content: start; justify-items: center; gap: 6px; text-align: center; font-size: .8rem; line-height: 1.4; color: var(--muted); background: var(--field-bg); border: 1.5px dashed var(--line); min-width: 0; }
.cap-tile .ct-day { font-size: .64rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--p-ink); }
.cap-tile p { margin: 0; font-size: .8rem; overflow-wrap: anywhere; }
.cap-tile small { font-size: .7rem; }
.cap-tile.open { color: var(--t); background: var(--card-bg); border-style: solid; box-shadow: var(--card-shadow); }
.cap-tile.now { border-color: var(--p); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p) 22%, transparent), var(--card-shadow); }
.ct-lock { color: var(--p-ink); opacity: .5; margin-top: 8px; }
@media (max-width: 640px) { .cap-trail { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cap-tile { min-height: 96px; } }

.cap-guess { max-width: 620px; margin: 0 auto 22px; text-align: left; }
.cap-guess h3 { margin: 0; text-align: center; font-family: var(--hf); color: var(--p-ink); font-size: clamp(1.4rem, 4.4vw, 1.9rem); line-height: 1.2; }
.small-note { margin: 0; text-align: center; font-size: .82rem; color: var(--muted); }
.cap-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }

.cap-is-open .message { margin-bottom: 8px; }
.cap-media { max-width: 720px; margin: 24px auto; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #000; box-shadow: var(--card-shadow); }
.cap-media video, .cap-media iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }
.cap-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 45%), 1fr)); gap: 12px; margin: 24px 0; }
.cap-photos figure { margin: 0; }
.cap-photos button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.cap-photos img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; box-shadow: var(--card-shadow); }
.cap-guesses { margin-top: 34px; }
.cap-guesses h3 { font-family: var(--hf); color: var(--p-ink); font-size: clamp(1.5rem, 4.4vw, 2rem); margin-bottom: 14px; }
.cap-guesses ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cap-guesses li { max-width: 100%; padding: 10px 16px; border-radius: 16px; background: var(--card-bg); border: var(--card-border); box-shadow: var(--card-shadow); text-align: left; }
.cap-guesses li p { margin: 0; font-style: italic; overflow-wrap: anywhere; }
.cap-guesses cite { font-size: .78rem; color: var(--muted); font-style: normal; }
.cap-all { margin-top: 26px; }
.cap-all summary { cursor: pointer; color: var(--p-ink); font-weight: 600; }

/* ---- Reveal overlay ---- */
.cap-reveal { position: fixed; inset: 0; z-index: 148; display: grid; place-items: center; overflow: hidden; color: #fff; font-family: var(--bf); background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--p) 55%, #14271c) 0%, #0b1710 58%, #040906 100%); animation: crIn .6s ease; }
.cap-reveal[hidden] { display: none; }
@keyframes crIn { from { opacity: 0; } }
.cap-reveal::after { content: ''; position: absolute; inset: 0; z-index: 4; background: #fff; opacity: 0; pointer-events: none; }
.cap-reveal.flash::after { animation: crFlash 1s ease-out; }
@keyframes crFlash { 12% { opacity: .92; } 100% { opacity: 0; } }
.cr-canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.cr-rays { position: absolute; left: 50%; top: 50%; z-index: 0; width: 220vmax; height: 220vmax; translate: -50% -50%; opacity: 0; transition: opacity 1.2s; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--a) 24%, transparent) 0deg 6deg, transparent 6deg 18deg); -webkit-mask-image: radial-gradient(circle, #000, transparent 42%); mask-image: radial-gradient(circle, #000, transparent 42%); animation: spin 50s linear infinite; }
.cap-reveal.opened .cr-rays { opacity: 1; }
.cr-x { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 6; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.05rem; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cr-stage { position: relative; z-index: 2; width: min(640px, 100%); padding: 24px 18px; display: grid; justify-items: center; gap: 14px; text-align: center; }
.cr-sealed { transition: opacity .6s, transform .6s; }
.cap-reveal.opened .cr-sealed { opacity: 0; transform: scale(1.08); pointer-events: none; }
.cr-kick { margin: 0; font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; opacity: .85; }
.cr-tease { margin: 0; font-family: var(--hf); font-weight: 400; font-size: clamp(1.8rem, 7vw, 2.8rem); line-height: 1.15; color: #fff; text-shadow: 0 0 24px color-mix(in srgb, var(--a) 70%, transparent); overflow-wrap: anywhere; }
.cr-orb { --hold: 0; position: relative; width: clamp(180px, 52vw, 240px); aspect-ratio: 1; margin: 16px 0 4px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; animation: capFloat 4s ease-in-out infinite; }
.cr-orb .cap-half { left: 13%; right: 13%; height: 37%; z-index: 1; transition: transform 1.1s cubic-bezier(.2, .8, .2, 1), opacity 1s .2s; box-shadow: 0 0 40px color-mix(in srgb, var(--a) 40%, transparent); }
.cr-orb .cap-half.top { top: 13%; }
.cr-orb .cap-half.bot { bottom: 13%; }
.cr-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.cr-ring circle { fill: none; stroke: rgba(255, 255, 255, .18); stroke-width: 3; }
.cr-ring .cr-ring-fill { stroke: var(--a); stroke-linecap: round; stroke-dasharray: 289.03; stroke-dashoffset: calc(289.03 * (1 - var(--hold))); filter: drop-shadow(0 0 6px var(--a)); }
.cr-glow { position: absolute; left: 50%; top: 50%; z-index: 0; width: 26%; height: 26%; translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle, #fff, color-mix(in srgb, var(--a) 70%, #fff) 40%, transparent 70%); opacity: calc(.25 + var(--hold) * .75); scale: calc(1 + var(--hold) * 2.4); transition: scale 1.2s ease-out, opacity 1.4s ease .3s; }
.cr-lock { position: absolute; left: 50%; top: 50%; z-index: 2; width: 48px; height: 48px; translate: -50% -50%; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .94); color: var(--p-ink); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); transition: transform .4s, opacity .4s; }
.cr-orb.holding { animation: crShake .14s linear infinite; }
.cr-orb.nudge { animation: crNudge .45s ease; }
@keyframes crShake { 0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(calc(var(--hold) * -4px), calc(var(--hold) * 2px)) rotate(calc(var(--hold) * -3deg)); } 75% { transform: translate(calc(var(--hold) * 4px), calc(var(--hold) * -2px)) rotate(calc(var(--hold) * 3deg)); } }
@keyframes crNudge { 20% { transform: rotate(-8deg); } 40% { transform: rotate(7deg); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(2deg); } }
.cap-reveal.opened .cr-orb { animation: none; }
.cap-reveal.opened .cr-orb .cap-half.top { transform: translateY(-140%) rotate(-28deg); opacity: 0; }
.cap-reveal.opened .cr-orb .cap-half.bot { transform: translateY(140%) rotate(18deg); opacity: 0; }
.cap-reveal.opened .cr-lock { transform: scale(0) rotate(90deg); opacity: 0; }
.cap-reveal.opened .cr-glow { scale: 16; opacity: 0; }
.cr-hint { margin: 0; font-size: .92rem; opacity: .9; animation: crBlink 2.2s ease-in-out infinite; }
@keyframes crBlink { 50% { opacity: .35; } }
.cr-skip { padding: 4px 8px; border: 0; background: none; color: rgba(255, 255, 255, .62); font-size: .8rem; text-decoration: underline; cursor: pointer; }

.cr-content { position: absolute; inset: 0; z-index: 2; width: 100%; max-width: none; padding: 0; display: block; }
.cr-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: grid; align-content: center; justify-items: center; gap: 18px; padding: max(64px, env(safe-area-inset-top)) 18px max(40px, env(safe-area-inset-bottom)); text-align: center; }
.cr-scroll > .cr-kick { opacity: 0; animation: crUp .6s ease .15s forwards; }
.cr-title { width: min(760px, 100%); margin: 0; font-family: var(--hf); font-weight: 400; font-size: clamp(2.4rem, 10vw, 4.6rem); line-height: 1.1; color: #fff; text-shadow: 0 0 26px color-mix(in srgb, var(--a) 85%, transparent), 0 4px 0 color-mix(in srgb, var(--p) 60%, #000); overflow-wrap: anywhere; }
.cr-title .ch { display: inline-block; white-space: pre; opacity: 0; transform: translateY(.6em) scale(.4) rotate(-12deg); filter: blur(8px); animation: crLetter .75s cubic-bezier(.2, 1.4, .4, 1) forwards; animation-delay: calc(.35s + var(--i) * 45ms); }
@keyframes crLetter { to { opacity: 1; transform: none; filter: none; } }
@keyframes crUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.cr-msg { width: min(560px, 100%); margin: 0; font-size: clamp(1rem, 2.8vw, 1.2rem); line-height: 1.75; opacity: 0; animation: crUp .9s ease forwards; animation-delay: var(--after, 1.2s); overflow-wrap: anywhere; }
.cr-media { width: min(640px, 100%); aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .15); opacity: 0; animation: crUp .9s ease forwards; animation-delay: calc(var(--after, 1.2s) + .3s); }
.cr-media video, .cr-media iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }
.cr-photos { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; padding: 8px 0; width: min(700px, 100%); }
.cr-pol { width: clamp(110px, 28vw, 160px); padding: 8px 8px 26px; border: 0; border-radius: 4px; background: #fff; box-shadow: 0 18px 30px -12px rgba(0, 0, 0, .6); cursor: zoom-in; transform: rotate(var(--r)); opacity: 0; animation: crPol .85s cubic-bezier(.2, 1.3, .4, 1) forwards; animation-delay: calc(var(--after, 1.2s) + .5s + var(--i) * .15s); }
.cr-pol img { width: 100%; aspect-ratio: 1; object-fit: cover; }
@keyframes crPol { from { opacity: 0; transform: translateY(90px) rotate(calc(var(--r) * -4)) scale(.6); } to { opacity: 1; transform: rotate(var(--r)); } }
.cr-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; opacity: 0; animation: crUp .8s ease forwards; animation-delay: calc(var(--after, 1.2s) + .8s); }
.cr-btn { padding: .85em 1.6em; border: 0; border-radius: 99px; background: #fff; color: color-mix(in srgb, var(--p) 55%, #000); font-weight: 700; cursor: pointer; box-shadow: 0 0 0 4px color-mix(in srgb, var(--a) 45%, transparent), 0 14px 30px -10px rgba(0, 0, 0, .6); transition: transform .2s; }
.cr-btn.ghost { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .35); box-shadow: none; }
.cr-btn:hover { transform: translateY(-2px); }
@media print { .cap-reveal { display: none !important; } }

/* ===== Font choices =====
   Every design ships with its own lettering. Once the host picks a font in the editor, it takes over:
   fc-cover   → the cover font on the first page (#home), except the game sections a story template adds below it;
   fc-heading → the heading font on every heading after the first page;
   fc-body    → the body font on all other text after the first page.
   Tamil, Arabic, Urdu and Devanagari text falls back to its own script font, so it never turns into boxes. */
/* the first page keeps the design's lettering even when the heading font changes elsewhere */
.inv-main [id="home"] > :not(section) { --hf: var(--cf); }
body.fc-cover .inv-main [id="home"] > :not(section),
body.fc-cover .inv-main [id="home"] > :not(section) * {
    font-family: var(--cf), 'Noto Serif Tamil', 'Amiri', 'Noto Nastaliq Urdu', 'Yatra One', Georgia, serif !important;
}
body.fc-body .inv-main > :not([id="home"]) :not(:is(h1, h2, h3, h4, h5, h6, .names), :is(h1, h2, h3, h4, h5, h6, .names) *),
body.fc-body .inv-main [id="home"] > section :not(:is(h1, h2, h3, h4, h5, h6, .names), :is(h1, h2, h3, h4, h5, h6, .names) *) {
    font-family: var(--bf), 'Noto Serif Tamil', 'Amiri', 'Noto Nastaliq Urdu', 'Yatra One', system-ui, sans-serif !important;
}
body.fc-heading .inv-main > :not([id="home"]) :is(h1, h2, h3, h4, h5, h6, .names),
body.fc-heading .inv-main > :not([id="home"]) :is(h1, h2, h3, h4, h5, h6, .names) *,
body.fc-heading .inv-main [id="home"] > section :is(h1, h2, h3, h4, h5, h6, .names),
body.fc-heading .inv-main [id="home"] > section :is(h1, h2, h3, h4, h5, h6, .names) * {
    font-family: var(--hf), 'Noto Serif Tamil', 'Amiri', 'Noto Nastaliq Urdu', 'Yatra One', Georgia, serif !important;
}

/* ---- Readable on phones (GO-LIVE-PLAN §3.7): shared small print never goes below 12 px on small screens ---- */
@media (max-width: 767px) {
  .h-head, .h-date, .cd span, .fld span, .sec-title .kick, .detail small, .tl-card small,
  .scratch-under small, .scratch-under span, .scratch-under em, .env-letter small, .pkx-chapter small, .tmx-clip small {
    font-size: max(12px, .75rem);
  }
}
