@font-face { font-family: "HoaTay1"; src: url("fonts/hoatay1.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Quicksand"; src: url("fonts/quicksand.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "scarlet-bradley.regular"; src: url("fonts/scarlet-bradleyregular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Sunshine Script"; src: url("fonts/sunshine-script.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("fonts/montserrat.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Roboto"; src: url("fonts/roboto.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Aquarelle"; src: url("fonts/aquarelle.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Belinda Avenue"; src: url("fonts/belinda-avenue.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "RetroSignature"; src: url("fonts/retrosignature.woff2") format("woff2"); font-display: swap; }

:root {
  color-scheme: light;
  --canvas-scale: 1;
  font-family: Arial, Helvetica, sans-serif;
  background: #eeeeee;
  color: #333;
}

* { box-sizing: border-box; }
html { background: #eeeeee; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: #eeeeee; }
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.public-view { position: relative; min-height: 100vh; overflow-x: hidden; }
.canvas-shell {
  position: relative;
  width: min(100%, 430px);
  height: calc(6641px * var(--canvas-scale));
  margin: 0 auto;
  overflow: hidden;
  background: #fafafa;
  box-shadow: 0 0 20px rgb(0 0 0 / 8%);
}

.canvas {
  position: absolute;
  top: 0;
  left: 50%;
  width: 430px;
  height: 6641px;
  overflow: hidden;
  background: #fafafa;
  transform: translateX(-50%) scale(var(--canvas-scale));
  transform-origin: top center;
}

.canvas-uses-zoom .canvas {
  left: 0;
  zoom: var(--canvas-scale);
  transform: none;
  transform-origin: top left;
}

.loading {
  position: absolute;
  inset: 120px 0 auto;
  margin: 0;
  color: #777;
  text-align: center;
  font: 14px "Quicksand", sans-serif;
}

.node {
  position: absolute;
  box-sizing: border-box;
  transform-origin: center;
}

.text-node:not(.button-caption) { overflow: visible; }
.text-node.button-caption { overflow: hidden; }
.text-node__content {
  display: grid;
  align-content: center;
  width: 100%;
  height: 100%;
  white-space: normal;
  overflow-wrap: break-word;
}
.text-node__content > div { width: 100%; }
.text-node a { color: inherit; text-decoration: inherit; }
.text-node > a { display: block; width: 100%; height: 100%; }
.button-caption { cursor: pointer; }
.button-caption > a,
.button-caption .text-node__content {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.button-caption .text-node__content {
  line-height: 1 !important;
  white-space: nowrap;
}
.button-caption .text-node__content > div { width: 100%; }

/*
 * Canvas rich text is stored as a plain first line followed by <div> lines.
 * Grid keeps those fragments in vertical document order. Flex would shrink
 * them into narrow columns, which broke Vietnamese sentences word-by-word.
 */
#node-o06UC0RYvH,
#node-Cwh7NCugke {
  height: 36px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
}

/* Script fonts have taller glyph boxes than their editor measurements. */
#node-3W_JLuREJ8 { top: 60px !important; height: 34px !important; }
#node-hZXCJ5aR_A { top: 5468px !important; height: 48px !important; }

.photo-node { overflow: hidden; }
.photo-node img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.material-node { overflow: hidden; }
.material-node img { display: block; width: 100%; height: 100%; object-fit: fill; }
.material-node--mask { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }

.reveal { opacity: 0; }
.effects-ready .reveal {
  transition:
    opacity var(--entrance-duration, 1s) var(--entrance-easing, ease-out) var(--entrance-delay, 0s),
    transform var(--entrance-duration, 1s) var(--entrance-easing, ease-out) var(--entrance-delay, 0s);
}
.reveal.is-animating { backface-visibility: hidden; will-change: transform, opacity; }
.reveal.effect-slide-up { transform: translateY(68px) rotate(var(--rotation, 0deg)); }
.reveal.effect-slide-left { transform: translateX(76px) rotate(var(--rotation, 0deg)); }
.reveal.effect-slide-right { transform: translateX(-76px) rotate(var(--rotation, 0deg)); }
.reveal.effect-fade-in { transform: scale(.92) rotate(var(--rotation, 0deg)); }
.reveal.is-visible { opacity: var(--target-opacity, 1); transform: translate(0, 0) scale(1) rotate(var(--rotation, 0deg)); }

.continuous-wobble.motion-running:not(.reveal) {
  animation: wobble var(--motion-duration, 2s) ease-in-out var(--motion-delay, 0s) infinite;
}
.continuous-wobble.motion-running.is-visible {
  animation: wobble var(--motion-duration, 2s) ease-in-out calc(var(--entrance-total, 0s) + var(--motion-delay, 0s)) infinite;
}
@keyframes wobble {
  0%, 100% { transform: rotate(calc(var(--rotation, 0deg) - 3deg)); }
  50% { transform: rotate(calc(var(--rotation, 0deg) + 3deg)); }
}

.continuous-pulse.motion-running:not(.reveal) {
  animation: node-pulse var(--motion-duration, 2s) ease-in-out var(--motion-delay, 0s) infinite;
}
.continuous-pulse.motion-running.is-visible {
  animation: node-pulse var(--motion-duration, 2s) ease-in-out calc(var(--entrance-total, 0s) + var(--motion-delay, 0s)) infinite;
}
@keyframes node-pulse {
  0%, 100% { transform: scale(1) rotate(var(--rotation, 0deg)); }
  50% { transform: scale(1.055) rotate(var(--rotation, 0deg)); }
}

.calendar-card {
  width: 100%; height: 100%; padding: 16px 18px 12px; color: #5a4b4b; background: #fff;
  box-shadow: 0 6px 18px rgb(0 0 0 / 10%); font-family: "Roboto", sans-serif;
}
.calendar-card__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; color: #611010; }
.calendar-card__head strong { font-size: 20px; font-weight: 500; }
.calendar-card__week, .calendar-card__days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.calendar-card__week { margin-bottom: 7px; color: #8c7e7e; font-size: 10px; }
.calendar-card__days span { position: relative; display: grid; place-items: center; height: 29px; font-size: 10px; }
.calendar-card__days .muted { color: #c7c0c0; }
.calendar-card__days .marked { z-index: 1; color: #fff; font-weight: 700; }
.calendar-card__days .marked::before {
  position: absolute; z-index: -1; width: 25px; height: 23px; content: "♥"; color: #e5a5ad; font-size: 28px; line-height: 24px;
}
.calendar-card__note { margin: 9px 0 0; color: #9d7878; text-align: center; font-size: 9px; letter-spacing: .04em; }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; width: 100%; height: 100%; }
.countdown__unit { display: grid; place-content: center; border-radius: 1px; color: #fff; background: #8a0d0d; text-align: center; }
.countdown__value { display: block; font-size: 19px; font-weight: 700; line-height: 1; }
.countdown__label { display: block; margin-top: 7px; font-size: 8px; text-transform: uppercase; }

.rsvp-card {
  width: 100%; height: 100%; padding: 16px; border: 1px solid #e0e0e0; border-radius: 5px; color: #333; background: #fff;
  box-shadow: 0 2px 10px rgb(0 0 0 / 10%); font-family: Arial, sans-serif;
}
.rsvp-card h2 { margin: 0 0 8px; color: #611010; text-align: center; font: 22px Georgia, serif; }
.rsvp-card > p { margin: 0 auto 13px; color: #777; text-align: center; font-size: 10px; line-height: 1.45; }
.rsvp-card__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.rsvp-card label { display: grid; gap: 4px; color: #555; font-size: 9px; }
.rsvp-card label:first-child { grid-column: 1 / -1; }
.rsvp-card input, .rsvp-card select { width: 100%; height: 31px; padding: 0 8px; border: 1px solid #ddd; border-radius: 4px; color: #444; background: #fff; font-size: 10px; }
.rsvp-card button { width: 100%; height: 34px; margin-top: 11px; border: 0; border-radius: 999px; color: #fff; background: #611010; font-size: 10px; cursor: pointer; }

.gallery { position: relative; width: 100%; height: 100%; padding: 3px; }
.gallery__main { position: relative; width: 100%; height: 310px; overflow: hidden; border-radius: 7px; background: #eee; }
.gallery__main img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery__arrow { position: absolute; top: 50%; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; color: #777; background: rgb(255 255 255 / 90%); font-size: 22px; transform: translateY(-50%); cursor: pointer; }
.gallery__arrow--prev { left: 8px; }
.gallery__arrow--next { right: 8px; }
.gallery__full { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 25px; height: 25px; border: 0; border-radius: 4px; color: #fff; background: rgb(0 0 0 / 35%); cursor: pointer; }
.gallery__thumbs { display: flex; gap: 6px; height: 61px; margin-top: 7px; overflow-x: auto; scrollbar-width: none; }
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumb { flex: 0 0 55px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 3px; background: none; cursor: pointer; }
.gallery__thumb.active { border-color: #611010; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

.qr-node { padding: 5px; border-radius: 10px; background: #fff; cursor: pointer; }
.qr-node img { display: block; width: 100%; height: 100%; object-fit: contain; }

.edit-button {
  display: none; position: fixed; z-index: 50; top: 16px; right: max(8px, calc(50vw - 247px)); width: 32px; height: 32px; padding: 7px; border: 0; border-radius: 11px;
  color: #fff; background: rgb(116 116 116 / 78%); box-shadow: 0 2px 10px rgb(0 0 0 / 18%); cursor: pointer; backdrop-filter: blur(4px);
}
.edit-button svg, .live-toolbar svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.75; }

.live-toolbar {
  position: fixed; z-index: 50; right: max(12px, calc(50vw - 248px)); bottom: 22px; display: grid; gap: 8px; padding: 7px; border-radius: 22px;
  background: rgb(255 255 255 / 88%); box-shadow: 0 8px 30px rgb(0 0 0 / 18%); backdrop-filter: blur(8px);
}
.live-toolbar button { display: grid; place-items: center; width: 34px; height: 34px; padding: 8px; border: 0; border-radius: 50%; color: #fff; background: #7a1516; cursor: pointer; }
.live-toolbar span { font-size: 14px; line-height: 1; }
.live-toolbar button.playing { animation: pulse 1.7s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgb(122 21 22 / 15%); } }
.page-hidden .motion-running,
.page-hidden .live-toolbar button.playing { animation-play-state: paused !important; }

.modal { width: min(92vw, 390px); padding: 0; border: 0; border-radius: 22px; color: #5f1718; background: transparent; box-shadow: 0 22px 70px rgb(0 0 0 / 34%); }
.modal::backdrop { background: rgb(28 18 18 / 68%); backdrop-filter: blur(5px); }
.modal__card { position: relative; display: grid; justify-items: center; gap: 10px; margin: 0; padding: 28px 24px 24px; border-radius: 22px; background: #fffdfb; text-align: center; }
.modal__card h2, .modal__card p { margin: 0; }
.modal__card h2 { font: 28px Georgia, serif; }
.modal__card p { color: #706060; font-size: 13px; line-height: 1.55; }
.modal__eyebrow { color: #a63b3c !important; font-size: 10px !important; letter-spacing: .17em; }
.modal__gift-icon { width: 54px; height: 54px; object-fit: contain; }
.modal__qr { width: 170px; height: 170px; object-fit: contain; }
.modal__close { position: absolute; z-index: 3; top: 10px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; color: #7d1718; background: #f8eeee; font-size: 24px; line-height: 1; cursor: pointer; }

.modal--lightbox { width: min(94vw, 820px); max-width: none; border-radius: 10px; }
.lightbox__frame { position: relative; display: grid; place-items: center; min-height: min(84vh, 720px); margin: 0; padding: 20px; background: #161313; }
.lightbox__frame img { display: block; max-width: 100%; max-height: 78vh; object-fit: contain; }
.modal__close--light { color: #fff; background: rgb(255 255 255 / 15%); }
.lightbox__nav { position: absolute; z-index: 2; top: 50%; width: 44px; height: 58px; border: 0; color: #fff; background: rgb(0 0 0 / 35%); font-size: 38px; transform: translateY(-50%); cursor: pointer; }
.lightbox__nav--prev { left: 0; }
.lightbox__nav--next { right: 0; }

.toast { position: fixed; z-index: 80; left: 50%; bottom: 24px; max-width: min(90vw, 420px); padding: 11px 16px; border-radius: 999px; color: #fff; background: #5f1718; box-shadow: 0 8px 26px rgb(0 0 0 / 20%); font-size: 13px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 520px) {
  .canvas-shell { box-shadow: none; }
  .live-toolbar { right: 8px; bottom: 12px; }
  .live-toolbar button { width: 32px; height: 32px; }
  .edit-button, .live-toolbar { backdrop-filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .effects-ready .reveal {
    transition-duration: 1.1s;
  }
  .continuous-wobble,
  .continuous-pulse,
  .live-toolbar button.playing {
    animation-duration: 3s;
  }
}
