/* 星露谷物语风格婚礼请柬 - 宝鸡定制版 */
:root {
  --sky-top: #65b7ee;
  --sky-mid: #9edbff;
  --grass: #5f9f4c;
  --grass-dark: #32703d;
  --wood: #8b552f;
  --wood-dark: #4f2f22;
  --cream: #fff1bf;
  --paper: #f6dca1;
  --paper-dark: #bf8548;
  --ink: #3d2518;
  --berry: #b73d42;
  --gold: #f3c65c;
  --shadow: rgba(36, 24, 13, 0.32);
  --frame-width: 430px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 230, 130, 0.24), transparent 24rem),
    linear-gradient(135deg, #183d38 0%, #244c3d 38%, #101d2d 100%);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  overflow-x: hidden;
}

body.blessing-locked {
  overflow: hidden;
  overscroll-behavior: none;
}
body.blessing-locked .page-dots,
body.blessing-locked .scroll-hint,
body.blessing-locked .music-toggle {
  pointer-events: none;
  opacity: 0.42;
}
body.blessing-locked .petal,
body.blessing-locked .music-heart-trigger,
body.blessing-locked .music-heart-trigger::before {
  animation-play-state: paused;
}

.phone-frame {
  position: relative;
  width: min(100vw, var(--frame-width));
  min-height: 100vh;
  margin: 0 auto;
  background: #72bc58;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.06), 0 24px 80px rgba(0, 0, 0, 0.4);
  overflow-x: hidden;
}

.screen {
  position: relative;
  min-height: 100svh;
  padding: max(22px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.page-dots {
  position: fixed;
  z-index: 20;
  top: 50%;
  right: max(10px, calc((100vw - var(--frame-width)) / 2 + 10px));
  display: grid;
  gap: 9px;
  transform: translateY(-50%);
}
.dot {
  width: 9px;
  height: 9px;
  border: 2px solid #fff7ce;
  background: #704221;
  box-shadow: 0 2px 0 #2f1e17;
  image-rendering: pixelated;
}
.dot.is-active { background: var(--gold); }

.music-toggle {
  position: fixed;
  z-index: 25;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, calc((100vw - var(--frame-width)) / 2 + 14px));
  width: 46px;
  height: 46px;
  padding: 0;
  color: #fff5c9;
  cursor: pointer;
  background: #704221;
  border: 4px solid #3d2518;
  border-radius: 5px;
  box-shadow: 0 5px 0 #2f1e17, inset 3px 3px 0 rgba(255, 255, 255, 0.2), inset -3px -3px 0 rgba(44, 24, 14, 0.28);
  image-rendering: pixelated;
  transition: transform 150ms cubic-bezier(0.22, 1, 0.36, 1), background-color 150ms ease;
}
.music-toggle:hover, .music-toggle:focus-visible { background: #8f572d; }
.music-toggle:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #2f1e17, inset 3px 3px 0 rgba(255, 255, 255, 0.2), inset -3px -3px 0 rgba(44, 24, 14, 0.28);
}
.music-toggle.is-playing {
  color: #fff9df;
  background: #9b4e58;
}
.music-toggle__note {
  display: block;
  font-family: Georgia, serif;
  font-size: 28px;
  line-height: 32px;
  text-shadow: 2px 2px 0 #3d2518;
}

.music-heart-trigger {
  position: absolute;
  z-index: 12;
  top: 50%;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 14px;
  width: 168px;
  min-height: 148px;
  padding: 18px 14px 16px;
  color: #fff7d2;
  cursor: pointer;
  background: rgba(112, 66, 33, 0.8);
  border: 4px solid #3d2518;
  border-radius: 8px;
  box-shadow: 0 6px 0 #2f1e17, inset 3px 3px 0 rgba(255, 255, 255, 0.18);
  transform: translate(-50%, -50%);
  image-rendering: pixelated;
  animation: heart-idle 1.4s ease-in-out infinite;
}
.music-heart-trigger::before {
  content: "";
  position: absolute;
  inset: -7px;
  border: 2px solid rgba(255, 238, 154, 0.85);
  border-radius: 11px;
  animation: heart-ring 1.4s ease-out infinite;
}
.music-heart-trigger__heart {
  position: relative;
  width: 52px;
  height: 52px;
  background: #e35b72;
  box-shadow: inset -6px -6px 0 #9f2f48, inset 6px 6px 0 #ff9aad, 0 5px 0 #5b2232;
  transform: rotate(45deg);
}
.music-heart-trigger__heart::before,
.music-heart-trigger__heart::after {
  content: "";
  position: absolute;
  width: 52px;
  height: 52px;
  background: #e35b72;
  box-shadow: inset -6px -6px 0 #9f2f48, inset 6px 6px 0 #ff9aad;
}
.music-heart-trigger__heart::before { left: -26px; }
.music-heart-trigger__heart::after { top: -26px; }
.music-heart-trigger__label {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-shadow: 2px 2px 0 #3d2518;
}
.heart-burst {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  opacity: 0;
  background: #ff7f96;
  transform: translate(-50%, -50%) rotate(45deg) scale(0.6);
}
.heart-burst::before, .heart-burst::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: #ff7f96;
}
.heart-burst::before { left: -7px; }
.heart-burst::after { top: -7px; }

.music-heart-trigger.is-activating {
  pointer-events: none;
  animation: heart-activate 720ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.music-heart-trigger.is-activating::before { animation: heart-flash 720ms ease-out forwards; }
.music-heart-trigger.is-activating .heart-burst-one { animation: heart-burst-one 720ms ease-out forwards; }
.music-heart-trigger.is-activating .heart-burst-two { animation: heart-burst-two 720ms ease-out forwards; }
.music-heart-trigger.is-activating .heart-burst-three { animation: heart-burst-three 720ms ease-out forwards; }
.music-heart-trigger.is-activating .heart-burst-four { animation: heart-burst-four 720ms ease-out forwards; }
.music-heart-trigger.is-hidden { display: none; }

.hero-screen {
  justify-content: flex-start;
  padding: 0;
  background: #f4b5c7;
}
.hero-screen::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: url("./bg.png") center center / 100% 100% no-repeat;
}
.hero-screen .sun, .hero-screen .cloud, .hero-screen .mountains,
.hero-screen .title-board, .hero-screen .couple-stage, .hero-screen .dialog-box { display: none; }

.peach-blossom-rain {
  position: absolute;
  z-index: 8;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.petal {
  position: absolute;
  top: -12%;
  width: 14px;
  height: 12px;
  opacity: 0;
  background: #ffb3c7;
  box-shadow: inset -3px -3px 0 #df718f, inset 2px 2px 0 #ffe8ef;
  border-radius: 70% 30% 65% 35%;
  animation: petal-fall var(--petal-duration) linear var(--petal-delay) infinite;
}
.petal-1 { left: 6%; --petal-duration: 8.6s; --petal-delay: -5.3s; --petal-scale: 1; }
.petal-2 { left: 16%; --petal-duration: 10.2s; --petal-delay: -1.8s; --petal-scale: 0.8; }
.petal-3 { left: 27%; --petal-duration: 9.1s; --petal-delay: -7.6s; --petal-scale: 1; }
.petal-4 { left: 38%; --petal-duration: 11.4s; --petal-delay: -3.1s; --petal-scale: 1.12; }
.petal-5 { left: 48%; --petal-duration: 8.9s; --petal-delay: -6.2s; --petal-scale: 0.72; }
.petal-6 { left: 58%; --petal-duration: 10.8s; --petal-delay: -9.4s; --petal-scale: 1; }
.petal-7 { left: 68%; --petal-duration: 9.6s; --petal-delay: -4.5s; --petal-scale: 1.06; }
.petal-8 { left: 77%; --petal-duration: 11.1s; --petal-delay: -1.1s; --petal-scale: 0.76; }
.petal-9 { left: 88%; --petal-duration: 8.3s; --petal-delay: -6.9s; --petal-scale: 1; }
.petal-10 { left: 12%; --petal-duration: 12s; --petal-delay: -10.6s; --petal-scale: 0.65; }
.petal-11 { left: 72%; --petal-duration: 8.7s; --petal-delay: -2.7s; --petal-scale: 0.88; }
.petal-12 { left: 92%; --petal-duration: 10.5s; --petal-delay: -8.1s; --petal-scale: 0.7; }
.hero-screen:not(.is-visible) .petal { animation-play-state: paused; }

.sprite-parade {
  position: absolute;
  z-index: 9;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.sprite-actor {
  position: absolute;
  width: var(--sprite-size);
  height: var(--sprite-size);
  object-fit: contain;
  opacity: 0;
  image-rendering: pixelated;
  transform: translate3d(var(--sprite-start-x), 0, 0) scaleX(var(--sprite-flip)) scale(0.82);
  transition: transform 820ms cubic-bezier(0.25, 1, 0.5, 1) var(--sprite-delay), opacity 180ms ease var(--sprite-delay);
}
.sprite-parade.is-active .sprite-actor.is-ready {
  opacity: 1;
  transform: translate3d(0, 0, 0) scaleX(var(--sprite-flip)) scale(1);
}
body.blessing-locked .sprite-parade { visibility: hidden; }

.sun {
  position: absolute;
  top: 72px;
  right: 28px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ffde68;
  box-shadow: 0 0 0 8px rgba(255, 222, 104, 0.2), 0 0 38px rgba(255, 196, 75, 0.7);
}
.cloud {
  position: absolute;
  width: 80px;
  height: 24px;
  background: #fff4d8;
  border: 4px solid rgba(93, 72, 53, 0.18);
  box-shadow: 18px 8px 0 #fff4d8, 38px -2px 0 #fff4d8;
  opacity: 0.88;
  animation: drift 9s ease-in-out infinite alternate;
}
.cloud-one { top: 132px; left: 22px; }
.cloud-two { top: 206px; right: 64px; transform: scale(0.7); animation-duration: 11s; }

.mountains {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: 35%;
  height: 150px;
  background:
    linear-gradient(135deg, transparent 50%, #65965c 50%) 0 100% / 180px 125px repeat-x,
    linear-gradient(45deg, transparent 50%, #547c5e 50%) 86px 100% / 190px 145px repeat-x;
  opacity: 0.78;
}

.title-board {
  position: relative;
  z-index: 3;
  width: min(92%, 356px);
  margin: 0 auto;
  padding: 16px 18px 18px;
  text-align: center;
  color: #ffe58f;
  background:
    linear-gradient(90deg, transparent 0 10px, rgba(255, 255, 255, 0.08) 10px 12px, transparent 12px 30px),
    linear-gradient(180deg, #9d6336, #6e3e25);
  border: 5px solid var(--wood-dark);
  border-radius: 8px;
  box-shadow: 0 6px 0 #2f1e17, 0 18px 28px rgba(49, 28, 12, 0.24);
  text-shadow: 2px 2px 0 #5a2c1a, -1px -1px 0 #5a2c1a;
}
.title-board::before, .title-board::after {
  content: "";
  position: absolute;
  bottom: -34px;
  width: 18px;
  height: 36px;
  background: var(--wood-dark);
  box-shadow: inset 3px 0 rgba(255, 255, 255, 0.08);
}
.title-board::before { left: 46px; }
.title-board::after { right: 46px; }
.title-kicker {
  display: block;
  font-size: 13px;
  letter-spacing: 0.34em;
  opacity: 0.95;
}
.title-board strong {
  display: block;
  margin-top: 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(31px, 9vw, 43px);
  line-height: 1;
  letter-spacing: 0.04em;
}

.couple-stage {
  position: relative;
  z-index: 4;
  width: 100%;
  min-height: 276px;
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 26px;
}
.farmer {
  position: relative;
  width: 88px;
  height: 176px;
  filter: drop-shadow(0 8px 0 rgba(40, 50, 30, 0.18));
}
.farmer span { position: absolute; display: block; }
.head {
  left: 22px; top: 42px;
  width: 45px; height: 48px;
  background: #f2b27d;
  border: 4px solid #5b3925;
  border-radius: 12px 12px 10px 10px;
}
.head::before, .head::after {
  content: "";
  position: absolute;
  top: 18px;
  width: 5px; height: 5px;
  background: #39241c;
  box-shadow: 0 8px 0 #c35b56;
}
.head::before { left: 10px; }
.head::after { right: 10px; }
.hair {
  left: 17px; top: 37px;
  width: 55px; height: 28px;
  background: #5d3728;
  border: 4px solid #432318;
  border-radius: 13px 13px 7px 7px;
}
.body {
  left: 17px; top: 90px;
  width: 55px; height: 56px;
  border: 4px solid #4c2d20;
  border-radius: 9px;
}
.legs {
  left: 24px; top: 142px;
  width: 40px; height: 28px;
  border-left: 14px solid #395878;
  border-right: 14px solid #395878;
  border-bottom: 8px solid #4b2b1b;
}
.groom .hat {
  z-index: 2;
  left: 12px; top: 14px;
  width: 65px; height: 24px;
  background: #b67b36;
  border: 4px solid #593820;
  box-shadow: 10px -13px 0 -1px #d49a48, 10px -17px 0 3px #593820;
}
.groom .body { background: linear-gradient(90deg, #325f9d 0 38%, #ffe2a6 38% 50%, #325f9d 50%); }
.bride .veil {
  z-index: 1;
  left: 10px; top: 20px;
  width: 70px; height: 96px;
  background: rgba(255, 246, 222, 0.72);
  border: 4px solid rgba(87, 65, 44, 0.4);
  border-radius: 32px 32px 14px 14px;
}
.bride .hair { background: #3d2720; }
.bride .body { background: linear-gradient(180deg, #fff7df, #f4cbd0); }
.bride .legs { border-left-color: #fff7df; border-right-color: #fff7df; }

.heart-pixel {
  width: 28px; height: 28px;
  margin-bottom: 118px;
  background: var(--berry);
  transform: rotate(45deg);
  animation: heartbeat 1.7s ease-in-out infinite;
  box-shadow: 0 0 0 4px #7b252c;
}
.heart-pixel::before, .heart-pixel::after {
  content: "";
  position: absolute;
  width: 28px; height: 28px;
  background: var(--berry);
  border-radius: 50%;
}
.heart-pixel::before { left: -14px; }
.heart-pixel::after { top: -14px; }

.dialog-box {
  position: relative;
  z-index: 6;
  width: 100%;
  margin-top: 10px;
  padding: 28px 18px 18px;
  background: #fff0bf;
  border: 5px solid #6a3d23;
  border-radius: 6px;
  box-shadow: inset 0 0 0 4px #d69b56, 0 7px 0 #2b1b13;
}
.dialog-name {
  position: absolute;
  top: -17px; left: 17px;
  padding: 5px 14px;
  color: #fff7d8;
  font-weight: 800;
  background: #7f4d2d;
  border: 4px solid #4b2b1d;
  border-radius: 4px;
}
.dialog-box p {
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.letter-screen {
  justify-content: flex-start;
  gap: 8px;
  padding-top: max(18px, env(safe-area-inset-top));
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 233, 144, 0.55), transparent 145px),
    radial-gradient(circle at 88% 90%, rgba(194, 87, 61, 0.3), transparent 150px),
    linear-gradient(180deg, #579b4b, #2f6f3f);
}
.letter-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(255, 255, 255, 0.06) 22px 24px),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(36, 74, 39, 0.12) 22px 24px);
}

.couple-name-board {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 5vw, 26px);
  width: min(100%, 365px);
  min-height: 78px;
  margin: 0 auto 2px;
  padding: 13px 18px 12px;
  color: #fff4c5;
  font-weight: 900;
  text-shadow: 2px 2px 0 rgba(73, 39, 24, 0.82);
  background: rgba(67, 39, 25, 0.22);
  border-top: 2px solid rgba(255, 231, 158, 0.85);
  border-bottom: 2px solid rgba(72, 39, 24, 0.68);
  box-shadow: 0 1px 0 rgba(255, 239, 181, 0.22);
}
.couple-name-board::before, .couple-name-board::after {
  content: "✦";
  position: absolute;
  top: 50%;
  color: #ffe39a;
  font-size: 12px;
  line-height: 1;
  text-shadow: 1px 1px 0 #694126;
  transform: translateY(-50%);
}
.couple-name-board::before { left: 10px; }
.couple-name-board::after { right: 10px; }
.couple-name-board__person {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
}
.couple-name-board__person small {
  color: #f8d791;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}
.couple-name-board__person b {
  color: #fff8d5;
  font-size: clamp(24px, 7vw, 31px);
  line-height: 1.05;
  white-space: nowrap;
}
.couple-name-board__heart {
  position: relative;
  width: 11px; height: 11px;
  flex: 0 0 11px;
  margin-top: 14px;
  background: #ffaaa0;
  transform: rotate(45deg);
  box-shadow: 2px 2px 0 #8e4435;
}
.couple-name-board__heart::before, .couple-name-board__heart::after {
  content: "";
  position: absolute;
  width: 11px; height: 11px;
  background: #ffaaa0;
  border-radius: 50%;
}
.couple-name-board__heart::before { left: -6px; }
.couple-name-board__heart::after { top: -6px; }

.letter-card {
  position: relative;
  z-index: 2;
  max-height: calc(100svh - 92px);
  padding: 34px 17px 16px;
  overflow-y: auto;
  color: #412616;
  background:
    radial-gradient(circle at 22px 30px, rgba(255, 255, 255, 0.34), transparent 72px),
    linear-gradient(180deg, #fff0bd, var(--paper));
  border: 7px solid var(--paper-dark);
  border-radius: 14px 14px 26px 26px;
  box-shadow: inset 0 0 0 3px #7a4a28, 0 12px 0 #68421f, 0 24px 38px rgba(28, 38, 18, 0.34);
}
.letter-card::before, .letter-card::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px;
  height: 16px;
  background: linear-gradient(90deg, #7d4b2b, #b8753d, #7d4b2b);
  border: 4px solid #56331f;
  border-radius: 999px;
}
.letter-card::before { top: 9px; }
.letter-card::after { bottom: 9px; }
.letter-ribbon {
  position: absolute;
  top: 18px; right: 26px;
  padding: 5px 10px;
  color: #fff7d4;
  font-size: 12px;
  font-weight: 800;
  background: var(--berry);
  border: 3px solid #6d242a;
  border-radius: 4px;
  transform: rotate(3deg);
}
.letter-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.2;
  color: #7b371c;
}
.letter-card p {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.66;
  font-weight: 650;
}
.event-lines {
  margin: 14px 0;
  padding: 12px 13px;
  background: rgba(126, 76, 41, 0.11);
  border: 3px dashed rgba(111, 62, 32, 0.55);
  border-radius: 10px;
}
.event-lines p {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  margin: 0;
}
.event-lines p + p { margin-top: 8px; }
.event-lines span {
  color: #8c3a24;
  font-weight: 900;
}
.letter-card footer {
  margin-top: 15px;
  padding-right: 58px;
  text-align: right;
  color: #7b371c;
  font-weight: 900;
}
.wax-seal {
  position: sticky;
  bottom: 0;
  left: 100%;
  width: 46px; height: 46px;
  margin-left: auto;
  display: grid;
  place-items: center;
  color: #ffe6a5;
  font-size: 22px;
  font-weight: 900;
  background: #b63c3b;
  border: 4px solid #762123;
  border-radius: 50%;
  box-shadow: 0 4px 0 #522018;
}

.letter-calendar {
  position: relative;
  z-index: 2;
  width: min(100%, 384px);
  margin: 10px auto 4px;
}
.calendar-board {
  position: relative;
  z-index: 1;
  width: min(100%, 384px);
  margin: 0 auto;
  padding: 13px 12px 11px;
  color: #4b2a19;
  background: linear-gradient(90deg, #704122, #a56634 12%, #824a27 88%, #56301e);
  border: 5px solid #3f2519;
  border-radius: 8px;
  box-shadow: inset 3px 3px 0 rgba(255, 224, 151, 0.22), inset -3px -3px 0 rgba(42, 22, 14, 0.32), 0 8px 0 #2e1b14, 0 20px 34px rgba(24, 47, 29, 0.36);
}
.calendar-board__header {
  padding: 12px 10px 10px;
  text-align: center;
  background: #f8df9c;
  border: 4px solid #59351f;
  box-shadow: inset 0 0 0 2px #d29a55;
}
.calendar-board__season {
  display: block;
  color: #a34131;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.calendar-board h2 {
  margin: 3px 0 2px;
  color: #613420;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  line-height: 1.1;
  letter-spacing: 0.05em;
}
.calendar-board__header p { margin: 0; font-size: 12px; font-weight: 700; }
.wedding-countdown {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 9px;
  padding: 4px 12px 5px;
  color: #fff8d5;
  background: #a34131;
  border: 2px solid #713021;
  box-shadow: 2px 2px 0 rgba(89, 53, 31, 0.28);
}
.wedding-countdown__label, .wedding-countdown__unit { font-size: 11px; font-weight: 900; }
.wedding-countdown strong {
  min-width: 2ch;
  color: #ffe68b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  line-height: 1;
  text-align: center;
}
.wedding-countdown.is-today { background: #bd4d57; }
.wedding-countdown.is-today strong { font-size: 17px; }

.calendar-weekdays, .calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-weekdays {
  margin-top: 11px;
  color: #fff2be;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-shadow: 1px 2px 0 #402416;
}
.calendar-weekdays span:first-child { color: #ffc3a2; }
.calendar-grid {
  gap: 3px;
  margin-top: 5px;
  padding: 6px;
  background: #f7d991;
  border: 4px solid #57331f;
  box-shadow: inset 0 0 0 2px #c5884a;
}
.calendar-day {
  position: relative;
  display: grid;
  min-height: 38px;
  place-items: center;
  color: #55321f;
  font-size: 16px;
  font-weight: 900;
  background: #fff1bd;
  border: 2px solid #d9a966;
  box-shadow: inset 1px 1px 0 #fff9d8;
}
.calendar-day--empty {
  background: rgba(202, 148, 77, 0.28);
  border-color: transparent;
  box-shadow: none;
}
.calendar-day--wedding {
  min-height: 52px;
  color: #fff4ce;
  background: #bd4d57;
  border-color: #6f2730;
  box-shadow: inset 3px 3px 0 #ee8390, inset -3px -3px 0 #87313e, 0 2px 0 #5a2229;
}
.calendar-day--wedding > span { position: absolute; top: 3px; left: 5px; }
.calendar-day__heart {
  position: absolute;
  top: 13px; left: 50%;
  width: 13px; height: 13px;
  background: #ffe68b;
  box-shadow: 2px 2px 0 #88303a;
  transform: translateX(-50%) rotate(45deg);
}
.calendar-day__heart::before, .calendar-day__heart::after {
  content: "";
  position: absolute;
  width: 13px; height: 13px;
  background: #ffe68b;
}
.calendar-day__heart::before { left: -7px; }
.calendar-day__heart::after { top: -7px; }
.calendar-day--wedding small {
  position: absolute;
  right: 2px; bottom: 2px;
  font-size: 8px;
  line-height: 1;
  white-space: nowrap;
}
.calendar-board__footer {
  margin-top: 9px;
  color: #fff1bb;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-align: center;
  text-shadow: 1px 2px 0 #442718;
}
.calendar-board__footer span { color: #ffd26e; }

.map-screen {
  background:
    radial-gradient(circle at 16% 14%, #ffd76f 0 0.1rem, transparent 0.12rem),
    radial-gradient(circle at 82% 24%, #fff4bf 0 0.12rem, transparent 0.14rem),
    linear-gradient(180deg, #2e547a 0%, #315c7e 36%, #255d45 37%, #173b2c 100%);
  background-size: auto, auto, 100% 100%;
}
.map-screen::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 38%;
  background:
    linear-gradient(135deg, transparent 50%, rgba(95, 159, 76, 0.7) 50%) 0 0 / 84px 54px repeat-x,
    linear-gradient(180deg, rgba(74, 130, 63, 0.95), #294f32);
}
.map-card {
  position: relative;
  z-index: 2;
  padding: 20px 16px 18px;
  background: #f6dfaa;
  border: 6px solid #6c3f24;
  border-radius: 16px;
  box-shadow: inset 0 0 0 4px #c98c4c, 0 10px 0 #301c14, 0 22px 36px rgba(0, 0, 0, 0.26);
}
.map-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}
.map-pin {
  position: relative;
  width: 42px; height: 42px;
  background: var(--berry);
  border: 4px solid #6d242a;
  transform: rotate(45deg);
  border-radius: 50% 50% 50% 4px;
  box-shadow: 0 4px 0 #3a1c16;
}
.map-pin::after {
  content: "";
  position: absolute;
  inset: 10px;
  background: #ffe18b;
  border-radius: 50%;
}
.eyebrow {
  margin: 0 0 2px;
  color: #8b3e25;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.map-header h2 { margin: 0; font-size: 25px; }
.map-frame {
  position: relative;
  display: block;
  height: min(42svh, 312px);
  min-height: 250px;
  overflow: hidden;
  background: #6ca756;
  border: 5px solid #5b3420;
  border-radius: 10px;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.18);
}
.map-frame img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}
.location-note {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding: 10px 12px;
  color: #fff5cc;
  background: #674026;
  border: 3px solid #3f2518;
  border-radius: 8px;
  font-weight: 800;
}
.travel-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.travel-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
  padding: 10px 9px;
  color: #56331f;
  background: #fff0bd;
  border: 3px solid #7a4a28;
  border-radius: 8px;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.42), 0 3px 0 #c98c4c;
}
.travel-card--train {
  background: #e7f3d0;
  border-color: #47713e;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.46), 0 3px 0 #89b768;
}
.travel-card > div { position: relative; z-index: 1; min-width: 0; }
.travel-card h3, .travel-card p { margin: 0; }
.travel-card h3 { margin-bottom: 4px; color: #8b3e25; font-size: 14px; line-height: 1.15; }
.travel-card--train h3 { color: #35633b; }
.travel-card p { font-size: 12px; line-height: 1.45; font-weight: 700; }
.travel-icon {
  position: relative;
  z-index: 0;
  align-self: center;
  justify-self: center;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  image-rendering: pixelated;
}
.travel-icon--car { width: 64px; height: 52px; background-image: url("./car.png"); }
.travel-icon--train { width: 54px; height: 54px; background-image: url("./horse.png"); }

.stay-transfer-note {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px 11px;
  color: #51321f;
  background: #fff0bd;
  border: 3px solid #7a4a28;
  border-radius: 8px;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.42), 0 3px 0 #c98c4c;
}
.stay-transfer-note__icon {
  align-self: start;
  display: grid;
  width: 42px; height: 38px;
  place-items: center;
  color: #fff2bf;
  font-family: Georgia, serif;
  font-size: 29px;
  font-weight: 900;
  line-height: 1;
  background: #b85a47;
  border: 3px solid #6b3028;
  border-radius: 4px;
  box-shadow: inset 3px 3px 0 #e58b6b, 0 3px 0 #653027;
}
.stay-transfer-note p { margin: 0; font-size: 12px; line-height: 1.55; font-weight: 700; }
.stay-transfer-note__title { margin-bottom: 4px !important; color: #8b3e25; font-size: 15px !important; font-weight: 900 !important; }
.stay-transfer-note__reminder {
  margin-top: 7px !important;
  padding-top: 7px;
  color: #6a4227;
  border-top: 2px dashed rgba(122, 74, 40, 0.48);
}
.map-actions { display: grid; gap: 10px; }

.food-screen {
  justify-content: flex-start;
  overflow: visible;
  padding-top: max(28px, env(safe-area-inset-top));
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 222, 126, 0.58), transparent 128px),
    radial-gradient(circle at 84% 24%, rgba(255, 137, 85, 0.28), transparent 140px),
    linear-gradient(180deg, #86c7dd 0%, #d6a95f 43%, #7b4d2d 100%);
}
.food-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background:
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, 0.18) 18px 20px),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(86, 47, 26, 0.15) 22px 24px);
}
.food-heading, .food-list { position: relative; z-index: 1; }
.food-heading {
  margin-bottom: 14px;
  padding: 16px 17px;
  color: #3f2a18;
  background: #fff0bd;
  border: 4px solid #714727;
  border-radius: 10px;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.38), 0 5px 0 #b9743e;
}
.food-heading h2, .food-heading p { margin: 0; }
.food-heading h2 { margin: 4px 0 6px; color: #9a3c24; font-size: 25px; line-height: 1.15; }
.food-heading > p:last-child { font-size: 14px; line-height: 1.55; font-weight: 700; }
.food-list { display: grid; gap: 14px; }
.food-card {
  overflow: hidden;
  background: #ffe0a6;
  border: 4px solid #6a4125;
  border-radius: 12px;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.34), 0 6px 0 rgba(69, 44, 25, 0.42);
}
.food-card--noodles {
  background: #fff0bd;
  border-color: #7b4325;
}
.food-card--skin {
  background: #f8d0a0;
  border-color: #8a3f2a;
}
.food-card--vinegar {
  background: #e8d5b8;
  border-color: #6b4a2e;
}
.food-photo {
  height: 104px;
  overflow: hidden;
  background: #7b4d2d;
  border-bottom: 4px solid rgba(79, 47, 34, 0.65);
}
.food-photo img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.food-card__body { padding: 13px 15px 15px; }
.food-card__tag, .food-card h3, .food-card p { margin: 0; }
.food-card__tag {
  margin-bottom: 5px;
  color: #a34131;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.food-card h3 { margin-bottom: 8px; color: #7b371c; font-size: 19px; line-height: 1.2; }
.food-card p { color: #4f321e; font-size: 14px; line-height: 1.58; font-weight: 700; }
.food-card p + p { margin-top: 7px; }

.tour-screen {
  justify-content: flex-start;
  overflow: visible;
  padding-top: max(28px, env(safe-area-inset-top));
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 232, 156, 0.58), transparent 130px),
    radial-gradient(circle at 88% 28%, rgba(110, 180, 212, 0.36), transparent 145px),
    linear-gradient(180deg, #87c5d9 0%, #6fbf72 46%, #34774b 100%);
}
.tour-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background:
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, 0.18) 18px 20px),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(40, 92, 49, 0.16) 22px 24px);
}
.tour-heading, .tour-list { position: relative; z-index: 1; }
.tour-heading {
  margin-bottom: 14px;
  padding: 16px 17px;
  color: #3f2a18;
  background: #fff0bd;
  border: 4px solid #714727;
  border-radius: 10px;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.38), 0 5px 0 #c98c4c;
}
.tour-heading h2, .tour-heading p { margin: 0; }
.tour-heading h2 { margin: 4px 0 6px; color: #7b371c; font-size: 25px; line-height: 1.15; }
.tour-heading > p:last-child { font-size: 14px; line-height: 1.55; font-weight: 700; }
.tour-list { display: grid; gap: 14px; }
.tour-card {
  overflow: hidden;
  background: #f7dda2;
  border: 4px solid #6a4125;
  border-radius: 12px;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.34), 0 6px 0 rgba(69, 44, 25, 0.42);
}
.tour-card--park {
  background: #e8f0bd;
  border-color: #4f733e;
}
.tour-card--museum { background: #f2d9aa; }
.tour-card--street {
  background: #ead0b2;
  border-color: #7f5134;
}
.tour-card--factory {
  background: #d9e0f0;
  border-color: #4a5a7a;
}
.tour-card--river {
  background: #d0e8d8;
  border-color: #3a6b4a;
}
.tour-photo-placeholder {
  position: relative;
  display: grid;
  min-height: 94px;
  place-items: center;
  color: rgba(61, 37, 24, 0.7);
  font-weight: 900;
  letter-spacing: 0.08em;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32) 0 10px, transparent 10px 20px),
    linear-gradient(180deg, #9fd3e8 0 46%, #78b96b 46% 100%);
  background-size: 20px 20px, auto;
  border-bottom: 4px solid rgba(79, 47, 34, 0.65);
}
.tour-photo-placeholder--filled {
  display: block;
  background: #6fae79;
}
.tour-photo-placeholder--filled::before, .tour-photo-placeholder--filled::after { display: none; }
.tour-photo-placeholder--filled img {
  display: block;
  width: 100%;
  min-height: 94px;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.tour-photo-placeholder::before {
  content: "";
  position: absolute;
  right: 18px; bottom: 20px;
  width: 72px; height: 34px;
  background:
    radial-gradient(circle at 22% 74%, #2d7f56 0 12px, transparent 13px),
    radial-gradient(circle at 52% 62%, #3d965d 0 16px, transparent 17px),
    radial-gradient(circle at 78% 72%, #2d7f56 0 12px, transparent 13px);
}
.tour-photo-placeholder::after {
  content: "替换图片占位";
  position: absolute;
  right: 10px; bottom: 8px;
  padding: 3px 6px;
  color: #fff4c2;
  font-size: 10px;
  background: rgba(72, 45, 26, 0.78);
  border: 2px solid rgba(255, 231, 157, 0.68);
}
.tour-card__body { padding: 13px 15px 15px; }
.tour-card__tag, .tour-card h3, .tour-card p { margin: 0; }
.tour-card__tag {
  margin-bottom: 5px;
  color: #3f7841;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.tour-card h3 { margin-bottom: 6px; color: #7b371c; font-size: 19px; line-height: 1.2; }
.tour-distance {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 7px;
  color: #fff4c2;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  background: #6e9b4c;
  border: 2px solid #3f642f;
  border-radius: 3px;
  box-shadow: 2px 2px 0 rgba(67, 42, 25, 0.32);
}
.tour-card--museum .tour-distance { background: #c47a40; border-color: #7a4428; }
.tour-card--street .tour-distance { background: #9a5b6a; border-color: #653747; }
.tour-card--factory .tour-distance { background: #5a6a8a; border-color: #3a4a6a; }
.tour-card--river .tour-distance { background: #4a8a6a; border-color: #2a5a4a; }
.tour-card p { color: #4f321e; font-size: 14px; line-height: 1.62; font-weight: 700; }
.tour-card p + p { margin-top: 7px; }

.pixel-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  color: #fff8dc;
  text-align: center;
  text-decoration: none;
  font: inherit;
  font-weight: 900;
  background: #83502f;
  border: 4px solid #3f2619;
  border-radius: 7px;
  box-shadow: 0 5px 0 #23140f;
  cursor: pointer;
}
.pixel-button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #23140f;
}
.pixel-button.primary {
  color: #442611;
  background: #f2c35b;
}
.pixel-button.ghost {
  color: #52321e;
  background: #ffe6a7;
}
.pixel-button:focus-visible, .dot:focus-visible, .scroll-hint:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.toast {
  position: fixed;
  z-index: 30;
  left: 50%; bottom: 28px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  color: #fff7d7;
  background: #51301f;
  border: 3px solid #fff0bd;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, 24px);
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@keyframes heartbeat {
  0%, 100% { transform: rotate(45deg) scale(1); }
  35% { transform: rotate(45deg) scale(1.14); }
  55% { transform: rotate(45deg) scale(0.96); }
}
@keyframes heart-idle {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, calc(-50% - 5px)) scale(1.04); }
}
@keyframes heart-ring {
  0% { opacity: 0.82; transform: scale(0.92); }
  70%, 100% { opacity: 0; transform: scale(1.16); }
}
@keyframes heart-activate {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  24% { opacity: 1; transform: translate(-50%, -50%) scale(1.18); }
  48% { opacity: 1; transform: translate(-50%, -50%) scale(0.94); }
  72% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.36); }
}
@keyframes heart-flash {
  0% { opacity: 0.8; transform: scale(0.92); }
  45% { opacity: 1; transform: scale(1.28); }
  100% { opacity: 0; transform: scale(1.54); }
}
@keyframes heart-burst-one {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(0.5); }
  24% { opacity: 1; }
  100% { opacity: 0; transform: translate(-76px, -86px) rotate(45deg) scale(1); }
}
@keyframes heart-burst-two {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(0.5); }
  24% { opacity: 1; }
  100% { opacity: 0; transform: translate(58px, -82px) rotate(45deg) scale(0.9); }
}
@keyframes heart-burst-three {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(0.5); }
  24% { opacity: 1; }
  100% { opacity: 0; transform: translate(-86px, 56px) rotate(45deg) scale(0.85); }
}
@keyframes heart-burst-four {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(0.5); }
  24% { opacity: 1; }
  100% { opacity: 0; transform: translate(70px, 58px) rotate(45deg) scale(1); }
}
@keyframes petal-fall {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0deg) scale(var(--petal-scale)); }
  12% { opacity: 0.9; }
  48% { transform: translate3d(28px, 54svh, 0) rotate(170deg) scale(var(--petal-scale)); }
  82% { opacity: 0.8; }
  100% { opacity: 0; transform: translate3d(-22px, 116svh, 0) rotate(360deg) scale(var(--petal-scale)); }
}
@keyframes drift {
  from { translate: -8px 0; }
  to { translate: 12px 3px; }
}

@media (min-width: 431px) {
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.07), transparent 14%, transparent 86%, rgba(255, 255, 255, 0.07)),
      radial-gradient(circle at 50% 0, rgba(255, 230, 130, 0.14), transparent 36rem);
  }
}
@media (max-width: 360px) {
  .screen { padding-left: 13px; padding-right: 13px; }
  .title-board strong { font-size: 30px; }
  .couple-stage { gap: 14px; }
  .letter-card { padding-left: 14px; padding-right: 14px; }
  .letter-card p { font-size: 12px; }
  .couple-name-board { gap: 10px; min-height: 72px; padding-left: 24px; padding-right: 24px; }
  .couple-name-board__person b { font-size: 23px; }
  .couple-name-board__person small { font-size: 10px; }
  .couple-name-board__heart { width: 11px; height: 11px; flex-basis: 11px; }
  .couple-name-board__heart::before, .couple-name-board__heart::after { width: 11px; height: 11px; }
  .couple-name-board__heart::before { left: -6px; }
  .couple-name-board__heart::after { top: -6px; }
}
@media (max-width: 360px) {
  .travel-guide { grid-template-columns: 1fr; }
}

.letter-screen .letter-card {
  max-height: none;
  padding: 46px 24px 26px;
  overflow: visible;
}
.letter-screen .letter-card h2 { margin: 0 0 12px; font-size: 24px; line-height: 1.2; }
.letter-screen .letter-card p { margin: 0 0 10px; font-size: 15px; line-height: 1.66; }
.letter-screen .event-lines { margin: 14px 0; padding: 12px 13px; }
.letter-screen .event-lines p + p { margin-top: 8px; }

@media (max-width: 360px) {
  .letter-screen .letter-card { padding-left: 14px; padding-right: 14px; }
  .letter-screen .letter-card p { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
