:root {
  --red: #9f2430;
  --red-deep: #68121e;
  --red-dark: #3f0a12;
  --gold: #c69b52;
  --gold-light: #efd298;
  --ink: #2b1a16;
  --muted: #7d6961;
  --cream: #fff9ef;
  --paper: #fffdf8;
  --line: rgba(79, 46, 35, 0.14);
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #f4ecdf;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 5% 12%, rgba(198, 155, 82, 0.16), transparent 26rem),
    radial-gradient(circle at 96% 48%, rgba(159, 36, 48, 0.09), transparent 30rem),
    linear-gradient(180deg, #fffaf2 0%, #f5ede1 100%);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* Keep one real, route-specific image as the first body image for link
   preview crawlers that do not consume Open Graph metadata. */
.share-crawler-image {
  position: absolute;
  top: 0;
  left: -10000px;
  width: 300px;
  height: 300px;
  object-fit: cover;
  pointer-events: none;
}

body[data-view="invite"] {
  overflow: hidden;
  background: #35080f;
}

[hidden] {
  display: none !important;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(198, 155, 82, 0.56);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 540px;
  height: 540px;
  border: 1px solid rgba(198, 155, 82, 0.11);
  border-radius: 50%;
  pointer-events: none;
}

.ambient::before,
.ambient::after {
  position: absolute;
  border: inherit;
  border-radius: inherit;
  content: "";
}

.ambient::before { inset: 40px; }
.ambient::after { inset: 78px; }
.ambient-one { top: 120px; left: -430px; }
.ambient-two { right: -450px; bottom: 70px; border-color: rgba(159, 36, 48, 0.08); }

#app {
  position: relative;
  z-index: 1;
}

.builder-view {
  width: min(1220px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  border-bottom: 1px solid rgba(78, 45, 34, 0.09);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand-seal {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 10px 3px 10px 3px;
  background: linear-gradient(145deg, #bb3540, #72131e);
  box-shadow: 0 8px 22px rgba(128, 23, 32, 0.21);
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 22px;
}

.brand > span:last-child {
  display: grid;
  gap: 1px;
}

.brand strong {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.18em;
}

.brand small {
  color: #9a8278;
  font-family: Georgia, serif;
  font-size: 7px;
  letter-spacing: 0.18em;
}

.local-badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid rgba(68, 113, 78, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  color: #55735c;
  font-size: 11px;
  font-weight: 600;
}

.local-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #659675;
  box-shadow: 0 0 0 4px rgba(101, 150, 117, 0.1);
}

.builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(470px, 1.08fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
  min-height: calc(100vh - 81px);
  padding: 68px 0 76px;
}

.builder-intro {
  position: relative;
  padding: 28px 0;
}

.eyebrow {
  display: flex;
  gap: 11px;
  align-items: center;
  margin: 0 0 22px;
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.eyebrow span {
  width: 25px;
  height: 1px;
  background: var(--gold);
}

.builder-intro h1 {
  max-width: 620px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(45px, 5vw, 68px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.builder-intro h1 em {
  display: block;
  margin-top: 8px;
  color: var(--red);
  font-style: normal;
}

.intro-copy {
  max-width: 540px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.flow-preview {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 35px;
}

.flow-preview > div {
  display: flex;
  min-width: 0;
  gap: 9px;
  align-items: center;
}

.flow-preview > div > b {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(159, 36, 48, 0.22);
  border-radius: 50%;
  color: var(--red);
  font-family: Georgia, serif;
  font-size: 9px;
}

.flow-preview > div > span {
  display: grid;
  gap: 2px;
}

.flow-preview strong { font-size: 11px; }
.flow-preview small { color: #a18f87; font-size: 8px; white-space: nowrap; }
.flow-preview > i { color: #c3a88c; font-size: 13px; font-style: normal; }

.mini-invite {
  position: relative;
  width: 230px;
  height: 300px;
  margin: 44px 0 0 auto;
  padding: 10px;
  transform: rotate(3deg);
  border-radius: 3px;
  background: linear-gradient(145deg, #a92833, #74131e);
  box-shadow: 0 28px 60px rgba(104, 18, 30, 0.22);
}

.mini-invite::before {
  position: absolute;
  z-index: -1;
  top: 24px;
  right: 34px;
  width: 205px;
  height: 270px;
  transform: rotate(-9deg);
  border: 1px solid rgba(159, 36, 48, 0.16);
  border-radius: 3px;
  background: #f8ecdc;
  box-shadow: 0 18px 40px rgba(76, 38, 27, 0.1);
  content: "";
}

.mini-frame {
  display: grid;
  height: 100%;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(239, 210, 152, 0.65);
  color: #f6dfaf;
}

.mini-frame > span { font-family: Georgia, serif; font-size: 6px; letter-spacing: 0.3em; }
.mini-frame > b { margin-top: 18px; font-family: var(--serif); font-size: 71px; font-weight: 500; }
.mini-frame > i { margin-top: 12px; font-family: var(--serif); font-size: 12px; font-style: normal; letter-spacing: 0.25em; }
.mini-frame > div { display: flex; gap: 35px; margin-top: 37px; }
.mini-frame em { font-size: 8px; font-style: normal; letter-spacing: 0.2em; }

.invite-form {
  padding: clamp(28px, 4vw, 46px);
  border: 1px solid rgba(78, 45, 34, 0.12);
  border-radius: 25px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 28px 80px rgba(78, 36, 28, 0.1);
  backdrop-filter: blur(18px);
}

.form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--line);
}

.form-heading > div { display: grid; gap: 4px; }
.form-heading span { color: #a58b7f; font-family: Georgia, serif; font-size: 8px; letter-spacing: 0.18em; }
.form-heading h2 { margin: 0; font-family: var(--serif); font-size: 25px; font-weight: 600; letter-spacing: 0.03em; }
.form-heading > b { color: rgba(159, 36, 48, 0.12); font-family: var(--serif); font-size: 52px; font-weight: 500; }

.form-error {
  margin: -7px 0 19px;
  padding: 11px 13px;
  border: 1px solid rgba(159, 36, 48, 0.2);
  border-radius: 9px;
  background: rgba(159, 36, 48, 0.06);
  color: #84212c;
  font-size: 12px;
  line-height: 1.5;
}

.invite-form fieldset {
  display: grid;
  gap: 13px;
  min-width: 0;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.invite-form legend {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 11px;
  color: #6b554d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.invite-form legend span {
  color: var(--red);
  font-family: Georgia, serif;
  font-size: 9px;
}

.invite-form legend small {
  margin-left: auto;
  color: #a18e86;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.date-row { grid-template-columns: 1.25fr 0.75fr; }

.field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.field > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: #79655d;
  font-size: 10px;
  font-weight: 700;
}

.field small {
  color: #aa9991;
  font-size: 9px;
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(78, 45, 34, 0.13);
  border-radius: 10px;
  outline: 0;
  background: rgba(255, 255, 255, 0.72);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input {
  height: 46px;
  padding: 0 13px;
}

.field textarea {
  min-height: 80px;
  padding: 11px 13px;
  line-height: 1.55;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder { color: #b8aaa4; }

.field input:focus,
.field textarea:focus {
  border-color: rgba(159, 36, 48, 0.46);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(159, 36, 48, 0.07);
}

.share-choice-fieldset {
  padding-top: 2px !important;
}

.icon-choice-grid,
.copy-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.choice-label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.choice-label > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.icon-choice-card,
.copy-choice > span {
  display: flex;
  min-height: 72px;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(78, 45, 34, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.icon-choice-card img {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 10px;
  object-fit: cover;
}

.icon-choice-card > span,
.copy-choice > span {
  min-width: 0;
}

.icon-choice-card > span {
  display: grid;
  gap: 4px;
}

.icon-choice-card strong,
.copy-choice strong {
  color: #503b34;
  font-size: 10px;
}

.icon-choice-card small,
.copy-choice small {
  color: #9c8981;
  font-size: 8px;
  line-height: 1.5;
}

.copy-choice > span {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px 12px;
}

.choice-label:hover > span {
  transform: translateY(-1px);
  border-color: rgba(159, 36, 48, 0.3);
}

.choice-label > input:checked + span {
  border-color: rgba(159, 36, 48, 0.58);
  background: rgba(159, 36, 48, 0.055);
  box-shadow: 0 0 0 3px rgba(159, 36, 48, 0.06);
}

.choice-label > input:focus-visible + span {
  outline: 3px solid rgba(198, 155, 82, 0.56);
  outline-offset: 2px;
}

.share-card-preview {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 1px 0 18px;
  padding: 12px;
  border: 1px solid rgba(78, 45, 34, 0.1);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(78, 36, 28, 0.055);
}

.share-card-preview img {
  width: 64px;
  height: 64px;
  border-radius: 9px;
  object-fit: cover;
}

.share-card-preview p {
  display: grid;
  min-width: 0;
  gap: 3px;
  margin: 0;
}

.share-card-preview p > span {
  color: #9b8981;
  font-size: 8px;
}

.share-card-preview strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-card-preview small {
  display: -webkit-box;
  overflow: hidden;
  color: #8e7b74;
  font-size: 9px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.privacy-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 2px 0 18px;
  padding: 13px;
  border-radius: 10px;
  background: #f7efe3;
  color: #79665e;
}

.privacy-note > span { color: var(--gold); }
.privacy-note p { margin: 0; font-size: 10px; line-height: 1.65; }
.privacy-note strong { color: #523f38; }

.generate-button {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 15px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #ad2c38, #7b1521);
  box-shadow: 0 14px 30px rgba(123, 21, 33, 0.22);
  color: #fffaf0;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.generate-button i { font-size: 18px; font-style: normal; font-weight: 400; transition: transform 160ms ease; }
.generate-button:hover i { transform: translateX(4px); }
.submit-note { margin: 10px 0 0; color: #a08e87; font-size: 9px; text-align: center; }

.builder-footer {
  display: flex;
  justify-content: space-between;
  padding: 25px 0 34px;
  border-top: 1px solid rgba(78, 45, 34, 0.09);
  color: #9b8981;
  font-size: 9px;
  letter-spacing: 0.03em;
}

/* Two-page invitation */
.invite-view {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: 12px;
  background:
    radial-gradient(circle at 50% 12%, rgba(192, 76, 75, 0.24), transparent 26rem),
    #35080f;
}

.invite-stage {
  position: relative;
  width: min(100%, 480px);
  height: min(900px, calc(100vh - 24px));
  height: min(900px, calc(100dvh - 24px));
  overflow: hidden;
  border: 1px solid rgba(239, 210, 152, 0.16);
  border-radius: 22px;
  background: var(--cream);
  box-shadow: 0 30px 90px rgba(18, 2, 7, 0.44);
  touch-action: pan-y;
}

.invite-music {
  display: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.music-toggle {
  position: absolute;
  z-index: 20;
  top: max(14px, env(safe-area-inset-top));
  right: max(72px, calc(58px + env(safe-area-inset-right)));
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(239, 210, 152, 0.52);
  border-radius: 50%;
  background: rgba(78, 11, 21, 0.42);
  box-shadow: 0 7px 20px rgba(42, 3, 10, 0.16);
  color: #f7dfad;
  backdrop-filter: blur(8px);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.music-toggle::after {
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(239, 210, 152, 0.38);
  border-radius: inherit;
  content: "";
  opacity: 0;
  pointer-events: none;
}

.music-disc {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 14px;
  line-height: 1;
}

.music-toggle.is-playing .music-disc {
  animation: music-turn 7s linear infinite;
}

.music-toggle.is-playing::after {
  animation: music-pulse 2.4s ease-out infinite;
}

.invite-stage[data-page="content"] .music-toggle {
  border-color: rgba(159, 36, 48, 0.2);
  background: rgba(255, 250, 240, 0.86);
  color: var(--red);
}

@keyframes music-turn {
  to { transform: rotate(360deg); }
}

@keyframes music-pulse {
  0% { transform: scale(0.9); opacity: 0; }
  24% { opacity: 0.55; }
  100% { transform: scale(1.28); opacity: 0; }
}

.invite-page {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: transform 620ms cubic-bezier(0.76, 0, 0.24, 1), opacity 420ms ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(159, 36, 48, 0.25) transparent;
}

.welcome-page {
  z-index: 2;
  display: grid;
  place-items: center;
  padding: max(26px, env(safe-area-inset-top)) 25px max(24px, env(safe-area-inset-bottom));
  overflow: hidden;
  transform: translateY(0);
  background:
    radial-gradient(circle at 50% 38%, rgba(213, 96, 74, 0.39), transparent 22rem),
    linear-gradient(145deg, #7c1521 0%, #a62c34 48%, #62101b 100%);
  color: #f7dfad;
}

.content-page {
  z-index: 3;
  transform: translateY(100%);
  background: #fff9ee;
  opacity: 0.98;
}

.invite-stage[data-page="content"] .welcome-page {
  transform: translateY(-18%);
  opacity: 0;
}

.invite-stage[data-page="content"] .content-page {
  transform: translateY(0);
  opacity: 1;
}

.welcome-pattern,
.welcome-pattern::before,
.welcome-pattern::after {
  position: absolute;
  border: 1px solid rgba(239, 210, 152, 0.13);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.welcome-pattern {
  top: -165px;
  right: -190px;
  width: 420px;
  height: 420px;
  box-shadow: -350px 750px 0 12px rgba(239, 210, 152, 0.025), -350px 750px 0 13px rgba(239, 210, 152, 0.1);
}

.welcome-pattern::before { inset: 36px; }
.welcome-pattern::after { inset: 72px; }

.welcome-frame {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 560px;
  place-items: center;
  align-content: center;
  padding: 35px 18px;
  border: 1px solid rgba(239, 210, 152, 0.68);
  text-align: center;
}

.welcome-frame::before {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(239, 210, 152, 0.22);
  content: "";
  pointer-events: none;
}

.welcome-frame::after {
  position: absolute;
  top: 18px;
  left: 50%;
  width: 50px;
  height: 8px;
  transform: translateX(-50%);
  border-top: 1px solid rgba(239, 210, 152, 0.6);
  border-bottom: 1px solid rgba(239, 210, 152, 0.28);
  content: "";
}

.welcome-en {
  margin: 0 0 10px;
  font-family: Georgia, serif;
  font-size: 8px;
  letter-spacing: 0.34em;
}

.welcome-label {
  margin: 0;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.38em;
}

.welcome-share-icon {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  margin-top: 17px;
  border: 2px solid rgba(255, 247, 225, 0.8);
  border-radius: 17px;
  box-shadow: 0 9px 24px rgba(48, 5, 12, 0.24);
  object-fit: cover;
}

.welcome-share-icon + .double-happiness {
  margin-top: clamp(14px, 3vh, 24px);
}

.double-happiness {
  position: relative;
  margin: clamp(20px, 5vh, 42px) 0 18px;
  font-family: var(--serif);
  font-size: clamp(88px, 15vh, 132px);
  font-weight: 500;
  line-height: 0.85;
  text-shadow: 0 10px 30px rgba(48, 5, 12, 0.2);
}

.double-happiness::before {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 155px;
  height: 155px;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1px solid rgba(239, 210, 152, 0.14);
  content: "";
}

.welcome-names {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr);
  width: min(100%, 360px);
  align-items: center;
  font-family: var(--serif);
}

.welcome-names strong {
  overflow-wrap: anywhere;
  font-size: clamp(24px, 6vw, 34px);
  font-weight: 500;
  line-height: 1.24;
}

.welcome-names span { font-size: 12px; opacity: 0.75; }

.welcome-divider {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 180px;
  margin: 22px 0 16px;
}

.welcome-divider i { height: 1px; flex: 1; background: rgba(239, 210, 152, 0.5); }
.welcome-divider b { width: 7px; height: 7px; transform: rotate(45deg); background: var(--gold-light); }

.welcome-date { margin: 0; font-family: Georgia, var(--serif); font-size: 13px; letter-spacing: 0.07em; }
.welcome-copy { margin: 21px 0 0; font-family: var(--serif); font-size: 12px; line-height: 1.9; letter-spacing: 0.08em; opacity: 0.82; }

.open-invite {
  display: inline-flex;
  min-width: 154px;
  min-height: 49px;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin-top: clamp(26px, 6vh, 48px);
  border: 1px solid rgba(239, 210, 152, 0.72);
  border-radius: 999px;
  background: rgba(255, 248, 229, 0.09);
  color: #f9e7bd;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  backdrop-filter: blur(7px);
}

.open-invite i { font-size: 15px; font-style: normal; animation: nudge 1.7s ease-in-out infinite; }
.gesture-tip { margin: 12px 0 0; font-size: 8px; letter-spacing: 0.1em; opacity: 0.48; }

@keyframes nudge {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(3px); }
}

.content-paper {
  position: relative;
  min-height: 100%;
  padding: max(20px, env(safe-area-inset-top)) 28px max(36px, env(safe-area-inset-bottom));
  background:
    repeating-linear-gradient(4deg, rgba(114, 74, 50, 0.017) 0 1px, transparent 1px 15px),
    linear-gradient(180deg, #fffaf0, #f8eee0);
}

.content-paper::before {
  position: absolute;
  top: 74px;
  right: -110px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(159, 36, 48, 0.06);
  border-radius: 50%;
  box-shadow: inset 0 0 0 35px rgba(159, 36, 48, 0.012), inset 0 0 0 70px rgba(159, 36, 48, 0.01);
  content: "";
  pointer-events: none;
}

.content-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
}

.content-header > span {
  color: #a38779;
  font-family: Georgia, serif;
  font-size: 7px;
  letter-spacing: 0.26em;
  text-align: center;
}

.round-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(89, 50, 39, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.52);
  color: #7e5f53;
  font-size: 17px;
}

.content-title-block {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  padding: 39px 0 28px;
  text-align: center;
}

.content-seal {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(159, 36, 48, 0.65);
  border-radius: 5px;
  background: var(--red);
  box-shadow: inset 0 0 0 4px #fff4e7, inset 0 0 0 5px rgba(255, 255, 255, 0.55);
  color: #f9dfaa;
  font-family: var(--serif);
  font-size: 26px;
}

.content-title-block > p { margin: 16px 0 13px; color: var(--red); font-size: 10px; font-weight: 700; letter-spacing: 0.25em; }
.content-title-block h1 { display: flex; flex-wrap: wrap; gap: 9px 15px; align-items: center; justify-content: center; margin: 0; font-family: var(--serif); font-size: clamp(28px, 8vw, 40px); font-weight: 500; line-height: 1.25; }
.content-title-block h1 span { overflow-wrap: anywhere; }
.content-title-block h1 i { color: var(--gold); font-family: Georgia, serif; font-size: 20px; font-style: italic; }

.content-paper blockquote {
  position: relative;
  z-index: 1;
  margin: 0 auto 28px;
  padding: 20px 24px;
  border-top: 1px solid rgba(198, 155, 82, 0.35);
  border-bottom: 1px solid rgba(198, 155, 82, 0.35);
  color: #70584f;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.9;
  text-align: center;
}

.date-card {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  margin-bottom: 14px;
  padding: 22px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #9c2430, #70131f);
  box-shadow: 0 16px 35px rgba(112, 19, 31, 0.18);
  color: #f8e5bd;
}

.date-card::before,
.date-card::after {
  position: absolute;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(248, 229, 189, 0.12);
  border-radius: 50%;
  content: "";
}

.date-card::before { top: -58px; right: -40px; }
.date-card::after { bottom: -72px; left: -35px; }
.date-card > span { font-family: Georgia, serif; font-size: 9px; letter-spacing: 0.28em; }
.date-card > strong { display: flex; gap: 14px; align-items: center; margin: 9px 0 6px; font-family: Georgia, serif; font-size: 42px; font-weight: 400; }
.date-card > strong i { color: rgba(248, 229, 189, 0.48); font-size: 18px; font-style: normal; }
.date-card > small { font-size: 9px; letter-spacing: 0.08em; opacity: 0.78; }

.detail-list { position: relative; z-index: 1; display: grid; gap: 10px; }
.detail-item { display: flex; gap: 14px; align-items: center; min-height: 74px; padding: 14px 16px; border: 1px solid rgba(83, 48, 38, 0.11); border-radius: 12px; background: rgba(255, 255, 255, 0.54); }
.detail-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(159, 36, 48, 0.22); border-radius: 50%; color: var(--red); font-family: var(--serif); font-size: 15px; }
.detail-item p { display: grid; gap: 3px; margin: 0; }
.detail-item small { color: #a18e86; font-size: 8px; letter-spacing: 0.13em; }
.detail-item strong { color: #4e352e; font-family: var(--serif); font-size: 16px; font-weight: 600; line-height: 1.35; }
.detail-item em { color: #8d7971; font-size: 10px; font-style: normal; line-height: 1.5; }

.await-block { display: grid; justify-items: center; padding: 40px 10px 36px; text-align: center; }
.await-block i { position: relative; width: 8px; height: 8px; transform: rotate(45deg); background: var(--gold); }
.await-block i::before, .await-block i::after { position: absolute; top: 3px; width: 45px; height: 1px; background: rgba(198, 155, 82, 0.34); content: ""; }
.await-block i::before { right: 18px; }
.await-block i::after { left: 18px; }
.await-block p { margin: 17px 0 6px; color: var(--red); font-family: var(--serif); font-size: 16px; letter-spacing: 0.16em; }
.await-block span { color: #9b877f; font-size: 9px; }

.share-panel {
  display: grid;
  gap: 9px;
  padding: 21px;
  border: 1px solid rgba(83, 48, 38, 0.11);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.55);
}

.share-panel > p { display: grid; gap: 5px; margin: 0 0 7px; text-align: center; }
.share-panel > p strong { font-family: var(--serif); font-size: 15px; }
.share-panel > p span { color: #9b8981; font-size: 8px; line-height: 1.5; }
.share-panel button { min-height: 47px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.share-primary { border: 0; background: linear-gradient(135deg, #ad2c38, #7b1521); color: #fff9ee; }
.share-secondary { border: 1px solid rgba(159, 36, 48, 0.24); background: #fffaf2; color: var(--red); }
.make-mine { min-height: 38px !important; border: 0; background: transparent; color: #8e7770; font-size: 9px !important; text-decoration: underline; text-underline-offset: 3px; }

.invite-footer { display: grid; justify-items: center; padding: 32px 0 2px; color: #a39088; }
.invite-footer span { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: var(--red); color: #f5dba8; font-family: var(--serif); }
.invite-footer p { margin: 7px 0 0; font-size: 8px; letter-spacing: 0.12em; }

.page-dots {
  position: absolute;
  z-index: 10;
  top: 50%;
  right: 13px;
  display: grid;
  gap: 8px;
  transform: translateY(-50%);
}

.page-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 1px solid rgba(239, 210, 152, 0.64);
  border-radius: 50%;
  background: transparent;
  transition: height 180ms ease, background 180ms ease, border-radius 180ms ease;
}

.page-dots button.active { height: 22px; border-radius: 999px; background: #efd298; }
.invite-stage[data-page="content"] .page-dots button { border-color: rgba(159, 36, 48, 0.45); }
.invite-stage[data-page="content"] .page-dots button.active { background: var(--red); }

.error-view {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
}

.error-card {
  display: grid;
  width: min(100%, 470px);
  justify-items: center;
  padding: 48px 36px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 30px 80px rgba(73, 35, 27, 0.12);
  text-align: center;
}

.error-card > span { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; background: var(--red); color: #f5dba8; font-family: var(--serif); font-size: 25px; }
.error-card > p:first-of-type { margin: 17px 0 8px; color: #a48c82; font-family: Georgia, serif; font-size: 8px; letter-spacing: 0.2em; }
.error-card h1 { margin: 0; font-family: var(--serif); font-size: 28px; font-weight: 600; }
#link-error-message { margin: 19px 0 8px; color: var(--red); font-size: 12px; font-weight: 700; }
.error-card > p:last-of-type { max-width: 340px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.error-card button { min-width: 190px; min-height: 48px; margin-top: 25px; border: 0; border-radius: 10px; background: var(--red); color: #fff8ed; font-weight: 700; }

.toast {
  position: fixed;
  z-index: 50;
  right: 22px;
  bottom: max(22px, env(safe-area-inset-bottom));
  max-width: min(380px, calc(100% - 44px));
  padding: 13px 17px;
  transform: translateY(12px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 11px;
  background: rgba(38, 21, 17, 0.92);
  box-shadow: 0 16px 40px rgba(31, 13, 9, 0.23);
  color: #fff9ef;
  font-size: 11px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show { transform: translateY(0); opacity: 1; }
.clipboard-fallback { position: fixed; top: -9999px; left: -9999px; }

@media (max-width: 960px) {
  .builder-layout { grid-template-columns: minmax(0, 0.82fr) minmax(430px, 1.18fr); gap: 38px; }
  .flow-preview > div > span { display: none; }
  .flow-preview { gap: 14px; }
}

@media (max-width: 780px) {
  .builder-view { width: min(100% - 28px, 620px); }
  .site-header { min-height: 70px; }
  .builder-layout { grid-template-columns: 1fr; gap: 44px; min-height: 0; padding: 52px 0 62px; }
  .builder-intro { display: grid; justify-items: center; padding: 0; text-align: center; }
  .eyebrow { justify-content: center; }
  .builder-intro h1 { font-size: clamp(40px, 11vw, 58px); }
  .intro-copy { font-size: 14px; }
  .flow-preview > div > span { display: grid; }
  .mini-invite { margin: 42px auto 0; }
  .builder-footer { flex-direction: column; gap: 7px; align-items: center; text-align: center; }
}

@media (max-width: 520px) {
  .builder-view { width: min(100% - 20px, 460px); }
  .site-header { min-height: 64px; }
  .brand-seal { width: 33px; height: 33px; font-size: 19px; }
  .brand strong { font-size: 18px; }
  .local-badge { padding: 7px 10px; font-size: 9px; }
  .builder-layout { padding-top: 42px; }
  .eyebrow { font-size: 9px; }
  .builder-intro h1 { letter-spacing: -0.07em; }
  .intro-copy { padding: 0 8px; line-height: 1.75; }
  .flow-preview { width: 100%; justify-content: center; gap: 8px; }
  .flow-preview > div { gap: 5px; }
  .flow-preview > div > b { width: 28px; height: 28px; }
  .flow-preview strong { font-size: 9px; }
  .flow-preview small { display: none; }
  .mini-invite { width: 190px; height: 248px; }
  .mini-invite::before { width: 170px; height: 220px; }
  .mini-frame > b { font-size: 58px; }
  .invite-form { padding: 26px 19px; border-radius: 20px; }
  .form-heading h2 { font-size: 22px; }
  .form-heading > b { font-size: 43px; }
  .field-row { grid-template-columns: 1fr; }
  .date-row { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
  .copy-choice-grid { grid-template-columns: 1fr; }
  .icon-choice-card { gap: 7px; padding: 7px; }
  .icon-choice-card img { width: 48px; height: 48px; }
  .builder-footer { font-size: 8px; }

  .invite-view { padding: 0; }
  .invite-stage { width: 100%; height: 100vh; height: 100dvh; border: 0; border-radius: 0; }
  .content-paper { padding-inline: 21px; }
  .welcome-frame { min-height: 500px; }
  .toast { right: 50%; bottom: max(14px, env(safe-area-inset-bottom)); width: max-content; transform: translate(50%, 12px); text-align: center; }
  .toast.show { transform: translate(50%, 0); }
}

@media (max-height: 680px) {
  .welcome-frame { min-height: 0; padding-block: 22px; }
  .double-happiness { margin: 17px 0 12px; font-size: 80px; }
  .welcome-divider { margin: 15px 0 11px; }
  .welcome-copy { margin-top: 13px; line-height: 1.6; }
  .open-invite { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .music-toggle.is-playing .music-disc,
  .music-toggle.is-playing::after {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
