/* Shared shell: phone frame on desktop, full-bleed on phones, + common widgets.
   Each template sets the tokens below and styles its own sections. */
:root {
  --bg: #fff; --ink: #222; --muted: #777; --accent: #b08d57; --line: rgba(0,0,0,.12);
  --card: #fff; --fd: 'Playfair Display', serif; --fs: 'Great Vibes', cursive; --fb: 'Be Vietnam Pro', system-ui, sans-serif;
  --stage: #ecebe8;
}
* { box-sizing: border-box; margin: 0; padding: 0 }
html, body { height: 100% }
body { background: var(--stage); font-family: var(--fb); color: var(--ink); -webkit-font-smoothing: antialiased; overflow: hidden }
img { display: block; max-width: 100% }
button, input, textarea, select { font: inherit; color: inherit }
[hidden] { display: none !important }

.k-phone { position: relative; width: 100%; max-width: 430px; height: 100dvh; margin: 0 auto; background: var(--bg); overflow: hidden }
@media (min-width: 641px) {
  body { display: grid; place-items: center }
  .k-phone { height: min(900px, 94dvh); border-radius: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.04) }
}
.k-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; overscroll-behavior: contain; scrollbar-width: none }
.k-scroll::-webkit-scrollbar { display: none }

/* reveal */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1) }
[data-reveal="left"] { transform: translateX(-36px) }
[data-reveal="right"] { transform: translateX(36px) }
[data-reveal="zoom"] { transform: scale(.92) }
[data-reveal].in { opacity: 1; transform: none }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none } }

/* calendar */
[data-calendar] { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px 0; text-align: center; font-size: 13px }
[data-calendar] .cal-h { font-weight: 600; font-size: 11px; opacity: .6; letter-spacing: .05em }
[data-calendar] span { line-height: 32px; position: relative }
[data-calendar] .cal-on i { font-style: normal; position: relative; z-index: 1; color: #fff; font-weight: 700 }
[data-calendar] .cal-on::before { content: '❤'; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-52%); font-size: 34px; line-height: 1; color: var(--accent); animation: k-beat 1.4s infinite }
@keyframes k-beat { 0%,100% { transform: translate(-50%,-52%) scale(1) } 15% { transform: translate(-50%,-52%) scale(1.15) } 30% { transform: translate(-50%,-52%) scale(1) } }

/* forms */
.k-field { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.7); outline: none; font-size: 14px }
.k-field:focus { border-color: var(--accent) }
textarea.k-field { min-height: 84px; resize: vertical }
.k-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; transition: transform .15s, filter .15s }
.k-btn:active { transform: scale(.97) }
.k-btn.ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px currentColor }
.k-radio { display: flex; gap: 8px }
.k-radio label { flex: 1; position: relative; cursor: pointer }
.k-radio input { position: absolute; opacity: 0 }
.k-radio span { display: block; text-align: center; padding: 10px 8px; border-radius: 10px; border: 1px solid var(--line); font-size: 13px; transition: .2s }
.k-radio input:checked + span { background: var(--accent); color: #fff; border-color: var(--accent) }
.k-stack { display: grid; gap: 10px }

/* wishes list */
[data-wishes] { list-style: none; display: grid; gap: 10px; max-height: 300px; overflow-y: auto; padding-right: 4px }
[data-wishes] li { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.65); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.5 }
[data-wishes] b { display: block; font-size: 13px; color: var(--accent); margin-bottom: 2px }

/* bottom action bar */
.k-bar { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 30; display: flex; gap: 8px; align-items: center; pointer-events: none }
.k-bar > * { pointer-events: auto }
.k-bar .k-bar-wish { flex: 1; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(0,0,0,.38); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; font-size: 13px; text-decoration: none; border: 0; cursor: pointer; opacity: .92 }
.k-ico { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(0,0,0,.38); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; font-size: 17px; cursor: pointer; flex: none }
.k-ico.pill { width: auto; padding: 0 14px; border-radius: 999px; gap: 6px; display: flex; font-size: 13px }
[data-music].on { animation: k-spin 4s linear infinite }
@keyframes k-spin { to { transform: rotate(360deg) } }

/* hearts */
.k-heart { position: absolute; z-index: 40; pointer-events: none; color: #ff4d6d; animation: k-fly 2s ease-out forwards }
@keyframes k-fly { 0% { opacity: 1; transform: translate(-50%,0) scale(.6) } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), var(--dy)) scale(1.3) rotate(25deg) } }

/* floating wish bubble */
.k-bubble { position: absolute; left: 14px; bottom: 64px; z-index: 25; max-width: 72%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: rgba(255,255,255,.9); color: #333; font-size: 12px; line-height: 1.4; box-shadow: 0 6px 20px rgba(0,0,0,.12); animation: k-bub 6s ease forwards; pointer-events: none }
.k-bubble b { color: var(--accent) }
@keyframes k-bub { 0% { opacity: 0; transform: translateY(14px) } 10%,80% { opacity: 1; transform: none } 100% { opacity: 0; transform: translateY(-40px) } }

/* modal */
.k-modal { position: absolute; inset: 0; z-index: 50; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; opacity: 0; pointer-events: none; transition: opacity .25s }
.k-modal.on { opacity: 1; pointer-events: auto }
.k-sheet { position: relative; width: 100%; max-height: 86%; overflow-y: auto; background: #fff; color: #222; border-radius: 22px 22px 0 0; padding: 26px 20px 30px; transform: translateY(40px); transition: transform .3s; font-family: var(--fb) }
.k-modal.on .k-sheet { transform: none }
.k-sheet h3 { font-family: var(--fd); font-size: 24px; font-weight: 500; margin-bottom: 6px }
.k-muted { color: #777; font-size: 13.5px; line-height: 1.55; margin-bottom: 16px }
.k-x { position: absolute; right: 14px; top: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f1f1f1; font-size: 20px; cursor: pointer }
.k-gift { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid #eee; border-radius: 14px; margin-bottom: 10px }
.k-gift img { width: 96px; height: 96px; border-radius: 8px; object-fit: contain; background: #fafafa }
.k-gift small { display: block; color: #888; font-size: 12px }
.k-gift b { display: block; font-size: 15px; margin: 2px 0 8px; letter-spacing: .02em }
.k-copy { border: 1px dashed #ccc; background: #fafafa; border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer }
.k-copy span { color: var(--accent); font-weight: 600; margin-left: 6px }

/* lightbox */
.k-lb { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center }
.k-lb.on { display: flex }
.k-lb img { max-width: 94vw; max-height: 86vh; border-radius: 6px }
.k-lb button { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 26px; cursor: pointer }
.k-lb-x { top: 16px; right: 16px } .k-lb-p { left: 12px } .k-lb-n { right: 12px }

/* toast */
.k-toast { position: fixed; left: 50%; top: 24px; z-index: 120; transform: translate(-50%,-20px); opacity: 0; background: #222; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 13px; transition: .3s; pointer-events: none; font-family: var(--fb) }
.k-toast.on { opacity: 1; transform: translate(-50%,0) }

/* desktop QR */
.k-qr { position: fixed; right: 24px; bottom: 24px; width: 168px; padding: 14px; background: #fff; border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.12); text-align: center; font-size: 11.5px; color: #555; font-family: var(--fb) }
.k-qr img { width: 130px; height: 130px; margin: 4px auto 8px }
.k-qr button { position: absolute; top: 4px; right: 8px; border: 0; background: none; font-size: 18px; color: #999; cursor: pointer }

.k-credit { text-align: center; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; opacity: .55; padding: 26px 0 90px }
.k-credit a { color: inherit }

/* VI | EN switch */
.k-lang { position: absolute; top: 14px; right: 14px; z-index: 70; display: flex; padding: 3px; border-radius: 999px; background: rgba(0,0,0,.32); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px) }
.k-lang button { border: 0; background: none; color: rgba(255,255,255,.8); font: 600 11px/1 var(--fb); letter-spacing: .08em; padding: 7px 10px; border-radius: 999px; cursor: pointer }
.k-lang button.on { background: #fff; color: #222 }

/* richer scroll motion: data-reveal="mask|blur", data-stagger, data-split, data-parallax */
[data-reveal="mask"] { opacity: 1; transform: none; clip-path: inset(100% 0 0 0); transition: clip-path 1.3s cubic-bezier(.7,0,.2,1) }
[data-reveal="mask"].in { clip-path: inset(0 0 0 0) }
[data-reveal="mask"] img, img[data-reveal="mask"] { transform: scale(1.18); transition: transform 1.8s cubic-bezier(.2,.7,.2,1) }
[data-reveal="mask"].in img, img[data-reveal="mask"].in { transform: none }
[data-reveal="blur"] { filter: blur(12px); transform: scale(1.04) }
[data-reveal="blur"].in { filter: none }
[data-stagger] > * { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 90ms) }
[data-stagger].in > * { opacity: 1; transform: none }
[data-split] .w { display: inline-block; white-space: nowrap }
[data-split] .ch { display: inline-block; opacity: 0; transform: translateY(.55em) rotate(6deg); transition: opacity .5s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 28ms) }
[data-split].in .ch { opacity: 1; transform: none }
[data-parallax] { will-change: transform }
@media (prefers-reduced-motion: reduce) {
  [data-reveal="mask"], [data-reveal="blur"] { clip-path: none; filter: none }
  [data-reveal="mask"] img, img[data-reveal="mask"] { transform: none }
  [data-stagger] > *, [data-split] .ch { opacity: 1; transform: none; transition: none }
}

/* editor-driven options */
.k-mapframe { display: block; width: 100%; height: 190px; border: 0; border-radius: 10px; margin-top: 14px; background: rgba(0,0,0,.05) }
.k-addr { display: block; font-size: .92em; opacity: .8; margin-top: 2px }
.k-thanks { font-size: 15px; line-height: 1.7; margin: 14px auto 0; max-width: 340px; white-space: pre-line; opacity: .92 }
.k-greet { font-size: 13px; letter-spacing: .08em; opacity: .85; max-width: 300px; text-align: center; line-height: 1.5 }
[data-gallery][data-layout="grid"] { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 4px !important; animation: none !important; transform: none !important; width: auto !important; overflow: visible !important }
[data-gallery][data-layout="grid"] > * { grid-column: auto !important; grid-row: auto !important; width: auto !important; margin: 0 !important; transform: none !important; padding: 0 !important }
[data-gallery][data-layout="grid"] img { width: 100% !important; height: auto !important; aspect-ratio: 1 !important; object-fit: cover; border-radius: 2px !important; margin: 0 !important }

/* wedding-website blocks injected by core.js (dress code, travel, party, registry, FAQ, livestream, photos) */
.k-xs { padding: 52px 26px; text-align: center; position: relative; z-index: 5;
  /* readable on painted / photo / ribbon backgrounds: a soft band in the design's own paper colour (override with --xs-bg) */
  background: var(--xs-bg, color-mix(in srgb, var(--bg) 93%, transparent)); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px) }
.k-xs + .k-xs { padding-top: 8px }
.k-xs-eyebrow { font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; font-weight: 500 }
.k-xs-h { font-family: var(--fd); font-weight: 500; font-size: 24px; line-height: 1.2; margin: 6px 0 }
.k-xs-p { font-size: 14px; line-height: 1.6; opacity: .88; margin-top: 4px; white-space: pre-line }
.k-xs .k-btn { margin-top: 14px }
.k-xs-card { padding: 18px 16px; border: 1px solid var(--line); border-radius: 14px; margin-top: 12px; background: color-mix(in srgb, currentColor 5%, transparent) }
.k-swatches { display: flex; justify-content: center; gap: 10px; margin-top: 16px }
.k-swatches i { width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.08) }
.k-xs-links { display: grid; gap: 10px; margin-top: 10px }
.k-xs-link { display: flex; flex-direction: column; padding: 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; background: color-mix(in srgb, currentColor 5%, transparent) }
.k-xs-link b { font-family: var(--fd); font-weight: 500; font-size: 20px }
.k-xs-link small { font-size: 11.5px; opacity: .6; letter-spacing: .04em }
.k-xs-party { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 10px; margin-top: 8px }
.k-xs-party figure { width: 104px }
.k-xs-party img, .k-xs-party span { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin: 0 auto 8px; display: grid; place-items: center; background: var(--line); font-family: var(--fd); font-size: 30px; color: var(--accent) }
.k-xs-party b { display: block; font-weight: 500; font-size: 14px }
.k-xs-party small { display: block; font-size: 12px; opacity: .7 }
.k-xs-faq { text-align: left; border-bottom: 1px solid var(--line); padding: 14px 2px }
.k-xs-faq summary { cursor: pointer; font-weight: 500; font-size: 15px; list-style: none; display: flex; justify-content: space-between; gap: 12px }
.k-xs-faq summary::after { content: '+'; color: var(--accent); font-size: 18px; line-height: 1 }
.k-xs-faq[open] summary::after { content: '–' }
.k-xs-faq p { font-size: 14px; line-height: 1.6; opacity: .85; margin-top: 8px; white-space: pre-line }
.k-ics { display: block; margin-top: 8px; font-size: 12px; opacity: .75; color: inherit; text-decoration: underline; text-underline-offset: 3px; text-align: center; flex-basis: 100% }
.k-deadline { font-size: 13px; text-align: center; opacity: .85; font-style: italic }
.k-closed > :not([data-dl]) { display: none !important }
.k-gate { position: absolute; inset: 0; z-index: 200; display: grid; place-items: center; padding: 30px; background: var(--bg); text-align: center }
.k-gate > div { display: grid; gap: 12px; width: 100%; max-width: 300px }
.k-gate b { font-family: var(--fd); font-size: 30px; font-weight: 500 }
.k-gate p { font-size: 13px; opacity: .75 }
