* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: #ddd4c9;
}
body {
  overflow-x: hidden;
}
#viewport {
  position: relative;
  width: min(100%, 375px);
  margin: auto;
  overflow: hidden;
  background: #e9e1d7;
}
#canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 375px;
  height: 6494px;
  transform-origin: top left;
  overflow: hidden;
  background: #e7dfd4;
}
.layer {
  position: absolute;
}
.layer .ani-wrap,
.layer .rotate-wrap,
.layer .ele-img-bg,
.layer .ele-bg-wrap {
  width: 100%;
  height: 100%;
}
.layer .ele-img-bg {
  overflow: hidden;
}
.layer .ele-bg-wrap {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.layer .text-stroke-layer {
  display: none;
}
.layer .text-editor {
  position: relative;
}
.layer .text-common {
  box-sizing: border-box;
}
.layer .f-input input {
  pointer-events: auto;
  border: 0;
  outline: none;
  background: transparent;
  width: 100%;
  height: 100%;
}
.layer .f-input .ani-wrap {
  display: flex;
  align-items: center;
  padding: 0 6px;
}
.layer .require {
  color: #c33;
  padding-right: 5px;
}
.layer .f-submit {
  cursor: pointer;
}
.layer .f-submit .ani-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}
.layer .e-shape svg {
  width: 100%;
  height: 100%;
}
.layer.effect {
  pointer-events: none;
}
.effect-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.effect-wrap i {
  position: absolute;
  background-size: contain;
  background-repeat: no-repeat;
  top: -35px !important;
  animation-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes fall {
  from {
    transform: translateY(0) rotate(0);
  }
  to {
    transform: translateY(640px) rotate(360deg);
  }
}
.reveal {
  opacity: 0;
  transition:
    opacity 0.9s ease,
    translate 0.9s ease;
  translate: 0 20px;
}
.reveal.visible {
  opacity: 1;
  translate: 0 0;
}
#music {
  position: fixed;
  top: 16px;
  right: max(16px, calc((100vw - 375px) / 2 + 12px));
  width: 34px;
  height: 34px;
  border: 1px solid #fff9;
  border-radius: 50%;
  background: #ad8b68bb;
  color: white;
  font-size: 20px;
  z-index: 20;
  cursor: pointer;
}
#music.playing {
  animation: spin 4s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
#notice {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #333d;
  color: white;
  padding: 10px 18px;
  border-radius: 5px;
  z-index: 40;
  display: none;
  white-space: nowrap;
}
.map-link {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.layer .can-wrap3 {
  width: 100%;
  height: 100%;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    translate: none;
  }
}
.wedding-title {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-family: "STKaiti", "KaiTi", "Kaiti SC", serif;
  font-weight: 700;
  color: #211b1a;
  white-space: nowrap;
}
.wedding-title-main {
  font-size: 48px;
  letter-spacing: 2px;
  line-height: 1.1;
}
.wedding-title-sub {
  font-size: 21px;
  letter-spacing: 3px;
  line-height: 1.2;
  color: #bc5151;
}

/* Mobile screens use the full width; the desktop margins continue the paper texture. */
body {
  background: #ddd4c9 url("assets/9d5032ece297b7141218e0ff0da5aa72.png") center
    top / 375px auto repeat;
}
@media (max-width: 768px) {
  #viewport {
    width: 100%;
  }
  #music {
    right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .effect-wrap { display: none; }
}

.amap-view { width: 100%; height: 100%; background: #eee8df; }
.amap-navigation { position: absolute; right: 6px; bottom: 6px; z-index: 10; background: #cd3d3f; color: white; padding: 6px 9px; border-radius: 4px; font-size: 12px; text-decoration: none; }
