@font-face {
  font-family: "ZCOOL XiaoWei Local";
  src: url("./Josefin_Sans,ZCOOL_XiaoWei/ZCOOL_XiaoWei/ZCOOLXiaoWei-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ead9b7;
  --paper-soft: #f3ead7;
  --wine: #87312d;
  --wine-soft: rgba(135, 49, 45, 0.16);
  --ink: #3a3228;
  --font-xiaowei: "ZCOOL XiaoWei Local", "ZCOOL XiaoWei", "Songti SC", "STSong", serif;
  color-scheme: light;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #d7c8aa;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: #d7c8aa;
}

button,
input {
  font: inherit;
}

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

.app-shell {
  position: relative;
  width: min(100vw, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: visible;
  background: var(--paper);
  box-shadow: 0 0 70px rgba(53, 43, 29, 0.2);
}

.top-actions {
  position: fixed;
  z-index: 30;
  top: max(9px, env(safe-area-inset-top));
  left: 50%;
  width: min(100vw, 430px);
  display: flex;
  justify-content: space-between;
  padding: 0 8px 0 17px;
  transform: translateX(-50%);
  pointer-events: none;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: var(--wine);
  background: rgba(243, 234, 215, 0.42);
  box-shadow: 0 8px 22px rgba(60, 43, 24, 0.14);
  backdrop-filter: blur(6px);
  cursor: pointer;
  pointer-events: auto;
}

.icon-button:active {
  transform: translateY(1px) scale(0.98);
}

.menu-toggle {
  display: grid;
  place-content: center;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.music-toggle {
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.music-icon {
  display: block;
  width: 26px;
  height: 34px;
  fill: currentColor;
  filter: drop-shadow(0 2px 4px rgba(80, 45, 30, 0.18));
}

.music-flag {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.music-toggle[data-state="playing"] {
  color: var(--wine);
  background: transparent;
}

.music-toggle[data-state="playing"] .music-icon {
  animation: musicPulse 1300ms ease-in-out infinite;
}

.music-toggle[data-state="missing"] {
  opacity: 0.45;
}

.drawer {
  position: fixed;
  z-index: 40;
  top: 0;
  left: calc((100vw - min(100vw, 430px)) / 2);
  width: min(78vw, 310px);
  height: 100dvh;
  padding: max(72px, calc(env(safe-area-inset-top) + 60px)) 28px 28px;
  background: rgba(242, 230, 207, 0.96);
  border-right: 1px solid rgba(135, 49, 45, 0.18);
  transform: translateX(-110%);
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
  backdrop-filter: blur(18px);
  font-family: var(--font-xiaowei);
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer a,
.drawer-map-trigger,
.drawer-close {
  display: block;
  width: 100%;
  padding: 16px 0;
  color: var(--wine);
  text-align: left;
  text-decoration: none;
  letter-spacing: 0.18em;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(135, 49, 45, 0.16);
}

.drawer-map-trigger {
  font: inherit;
}

.drawer-close {
  color: rgba(58, 50, 40, 0.64);
}

.image-page {
  position: relative;
  display: none;
  overflow: visible;
  background: var(--paper);
  scroll-margin-top: 0;
}

.image-page.is-active {
  display: block;
}

.art-shell {
  position: relative;
  width: 100%;
  line-height: 0;
  background: var(--paper);
}

.page-art {
  display: block;
  width: 100%;
  height: auto;
}

.image-hotspot {
  position: absolute;
  z-index: 8;
  display: block;
  color: transparent;
  background: transparent;
  border: 0;
  text-decoration: none;
  border-radius: 10px;
  cursor: pointer;
}

.image-hotspot span,
.rsvp-submit-hotspot span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.image-hotspot:focus-visible,
.rsvp-submit-hotspot:focus-visible {
  outline: 2px solid rgba(135, 49, 45, 0.82);
  outline-offset: 4px;
  background: rgba(135, 49, 45, 0.07);
}

.cover-hotspot {
  top: 67.3%;
  width: 21.7%;
  height: 11.2%;
}

.cover-hotspot-guide {
  left: 2.4%;
}

.cover-hotspot-story {
  left: 26.3%;
}

.cover-hotspot-map {
  left: 50.4%;
}

.cover-hotspot-rsvp {
  left: 74.3%;
}

.guide-map-hotspot {
  left: 24.4%;
  top: 37.1%;
  width: 51.6%;
  height: 7.3%;
}

.rsvp-shell {
  overflow: hidden;
}

.rsvp-page {
  min-height: 100dvh;
}

.rsvp-design-form {
  position: absolute;
  inset: 0;
  z-index: 10;
  --rsvp-field-left: 23%;
  --rsvp-field-width: 55.375%;
  --rsvp-field-height: 2.3%;
  --rsvp-options-left: 23%;
  --rsvp-options-width: 55.375%;
  pointer-events: none;
}

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

.rsvp-field {
  position: absolute;
  left: var(--rsvp-field-left);
  width: var(--rsvp-field-width);
  height: var(--rsvp-field-height);
  padding: 0 14px;
  color: var(--wine);
  text-align: center;
  line-height: 1;
  background: transparent;
  border: 0;
  border-radius: 999px;
  outline: none;
  pointer-events: auto;
  appearance: textfield;
  font-size: clamp(11px, 3vw, 14px);
  font-family: var(--font-xiaowei);
}

.rsvp-select-trigger {
  display: block;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.rsvp-field::-webkit-outer-spin-button,
.rsvp-field::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.rsvp-field:focus {
  box-shadow:
    inset 0 0 0 1px rgba(135, 49, 45, 0.34),
    0 0 0 3px rgba(135, 49, 45, 0.08);
  background: rgba(255, 252, 244, 0.18);
}

.rsvp-select-trigger:focus,
.rsvp-select-trigger:focus-visible {
  background: transparent;
  box-shadow: none;
}

.rsvp-select-trigger::after {
  content: "";
  position: absolute;
  top: 42.4%;
  right: 7px;
  width: 7px;
  height: 7px;
  color: var(--wine);
  border-right: 1.2px solid currentColor;
  border-bottom: 1.2px solid currentColor;
  opacity: 0.86;
  transform: translateY(-50%) rotate(45deg);
}

.rsvp-select-trigger.has-value::before {
  content: attr(data-label);
}

.rsvp-options {
  position: absolute;
  z-index: 18;
  left: var(--rsvp-options-left);
  top: calc(27.2% + var(--rsvp-field-height));
  display: none;
  width: var(--rsvp-options-width);
  padding: 0;
  overflow: hidden;
  background: rgba(255, 252, 244, 0.9);
  border: 1px solid rgba(135, 49, 45, 0.1);
  border-radius: 0 0 8px 8px;
  box-shadow: none;
  pointer-events: auto;
  backdrop-filter: blur(1px);
}

.rsvp-options.is-open {
  display: block;
}

.rsvp-options button {
  display: block;
  width: 100%;
  min-height: clamp(38px, 7.45vw, 60px);
  padding: 0 12px;
  color: var(--wine);
  text-align: center;
  letter-spacing: 0.08em;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: clamp(12px, 3.5vw, 15px);
  font-family: var(--font-xiaowei);
}

.rsvp-options button + button {
  border-top: 1px solid rgba(135, 49, 45, 0.1);
}

.rsvp-options button:active,
.rsvp-options button[aria-selected="true"] {
  background: rgba(135, 49, 45, 0.08);
}

.field-relationship {
  left: var(--rsvp-options-left);
  width: var(--rsvp-options-width);
  top: 27.2%;
}

.field-name {
  top: 32.4%;
}

.field-guests {
  top: 37.55%;
}

.field-phone {
  top: 42.75%;
}

.field-wechat {
  top: 47.95%;
}

.field-remark {
  top: 53.15%;
}

.rsvp-submit-hotspot {
  position: absolute;
  left: 36.125%;
  top: 59%;
  width: 27.75%;
  height: 3.6%;
  padding: 0;
  color: transparent;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  pointer-events: auto;
}

.rsvp-submit-hotspot:disabled {
  cursor: wait;
}

.form-status {
  position: absolute;
  left: 18%;
  right: 18%;
  top: 64.4%;
  margin: 0;
  padding: 6px 8px;
  color: var(--wine);
  text-align: center;
  line-height: 1.45;
  font-size: clamp(11px, 3vw, 13px);
  font-family: var(--font-xiaowei);
  background: rgba(244, 235, 215, 0.72);
  border-radius: 999px;
  pointer-events: none;
}

.form-status:empty {
  display: none;
}

.route-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: end center;
  padding: 18px 18px max(20px, env(safe-area-inset-bottom));
  background: rgba(36, 30, 24, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.route-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.route-dialog {
  width: min(100%, 360px);
  padding: 24px 22px 18px;
  color: var(--wine);
  text-align: center;
  font-family: var(--font-xiaowei);
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 249, 235, 0.72), transparent 34%),
    var(--paper-soft);
  border: 1px solid rgba(135, 49, 45, 0.16);
  border-radius: 18px;
  box-shadow: 0 22px 70px rgba(42, 31, 22, 0.28);
  transform: translateY(24px);
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.route-modal.is-open .route-dialog {
  transform: translateY(0);
}

.route-kicker {
  margin: 0 0 6px;
  font-family: var(--font-xiaowei);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(135, 49, 45, 0.62);
}

.route-dialog h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.route-address {
  margin: 10px 0 18px;
  color: rgba(58, 50, 40, 0.72);
  font-size: 14px;
}

.route-options {
  display: grid;
  gap: 10px;
}

.route-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  color: var(--wine);
  background: rgba(255, 252, 244, 0.62);
  border: 1px solid rgba(135, 49, 45, 0.12);
  border-radius: 12px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.route-option:active {
  transform: scale(0.99);
  background: rgba(255, 252, 244, 0.86);
}

.route-option strong {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.route-option small {
  color: rgba(58, 50, 40, 0.54);
  font-family: var(--font-xiaowei);
  font-size: 11px;
}

.route-close {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  color: rgba(58, 50, 40, 0.7);
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(135, 49, 45, 0.12);
  cursor: pointer;
  letter-spacing: 0.12em;
}

@keyframes musicPulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .drawer {
    transition: none;
  }

  .route-modal,
  .route-dialog {
    transition: none;
  }

  .music-toggle[data-state="playing"] .music-icon {
    animation: none;
  }
}
