* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: 'Noto Serif SC', serif;
  color: #6b3f47;
  background: #fff6f6;
}

button,
input,
textarea {
  font: inherit;
}

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

.rose-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  padding: clamp(14px, 3vw, 34px);
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 196, 210, 0.75), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(232, 199, 132, 0.34), transparent 28%),
    linear-gradient(135deg, #fff7f4 0%, #ffe6ec 44%, #fff8ee 100%);
  isolation: isolate;
  transition: background 0.7s ease;
}

.rose-stage.garden-open {
  background:
    radial-gradient(circle at 50% 64%, rgba(255, 238, 214, 0.58), transparent 22%),
    radial-gradient(circle at 15% 15%, rgba(255, 196, 210, 0.86), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(232, 199, 132, 0.48), transparent 28%),
    radial-gradient(circle at 50% 86%, rgba(255, 223, 232, 0.82), transparent 26%),
    linear-gradient(135deg, #fff7f4 0%, #ffe3eb 44%, #fff5e9 100%);
}

.rose-stage::before,
.rose-stage::after {
  content: '';
  position: absolute;
  inset: 4vmin;
  border: 1px solid rgba(196, 139, 116, 0.28);
  border-radius: 42px;
  pointer-events: none;
}

.rose-stage::after {
  inset: 6vmin;
  border-style: dashed;
  opacity: 0.45;
}

.ambient {
  position: absolute;
  width: 34vmax;
  height: 34vmax;
  border-radius: 50%;
  filter: blur(34px);
  opacity: 0.5;
  z-index: -1;
}

.ambient-one {
  left: -12vmax;
  bottom: -12vmax;
  background: #ffb6c9;
}

.ambient-two {
  right: -12vmax;
  top: -10vmax;
  background: #ecd49a;
}

.garden-atmosphere,
.garden-atmosphere span {
  pointer-events: none;
}

.garden-atmosphere {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.vine {
  position: absolute;
  width: 32vmin;
  height: 52vmin;
  border: 1px solid rgba(167, 119, 87, 0.18);
  border-left: 0;
  border-bottom: 0;
  border-radius: 50%;
  opacity: 0.55;
  filter: blur(0.2px);
}

.vine::before,
.vine::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 12px;
  border-radius: 100% 0 100% 0;
  background: rgba(185, 139, 100, 0.18);
}

.vine::before {
  top: 24%;
  right: 14%;
  rotate: -18deg;
}

.vine::after {
  top: 48%;
  right: 0;
  rotate: 28deg;
}

.vine-left {
  left: 3vw;
  top: 14vh;
  rotate: -16deg;
}

.vine-right {
  right: 4vw;
  bottom: 9vh;
  rotate: 164deg;
}

.ground-glow {
  position: absolute;
  left: 50%;
  bottom: 4vh;
  width: 58vw;
  height: 16vh;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(220, 161, 133, 0.2), transparent 68%);
  transform: translateX(-50%);
  opacity: 0.62;
}

.petal-field,
.petal-field span {
  pointer-events: none;
}

.petal-field span {
  position: absolute;
  width: 18px;
  height: 28px;
  border-radius: 70% 20% 70% 20%;
  background: rgba(238, 132, 158, 0.24);
  animation: floatPetal 8s ease-in-out infinite;
}

.petal-field span:nth-child(1) { left: 12%; top: 20%; animation-delay: -1s; }
.petal-field span:nth-child(2) { left: 22%; bottom: 16%; animation-delay: -4s; }
.petal-field span:nth-child(3) { right: 14%; top: 18%; animation-delay: -2s; }
.petal-field span:nth-child(4) { right: 24%; bottom: 18%; animation-delay: -5s; }
.petal-field span:nth-child(5) { left: 50%; top: 9%; animation-delay: -3s; }
.petal-field span:nth-child(6) { right: 46%; bottom: 8%; animation-delay: -6s; }

@keyframes floatPetal {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(12deg); }
  50% { transform: translate3d(14px, -18px, 0) rotate(32deg); }
}

.hero-card {
  position: relative;
  z-index: 3;
  width: min(900px, 100%);
  max-height: calc(100svh - 28px);
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid rgba(198, 142, 112, 0.3);
  border-radius: clamp(26px, 5vw, 46px);
  background:
    linear-gradient(145deg, rgba(255, 255, 252, 0.9), rgba(255, 235, 240, 0.72)),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.78), transparent 38%);
  box-shadow:
    0 34px 96px rgba(158, 83, 103, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -18px 48px rgba(255, 221, 229, 0.24);
  backdrop-filter: blur(18px);
  text-align: center;
  transition: width 0.6s ease, padding 0.6s ease, transform 0.6s ease, box-shadow 0.6s ease;
}

.hero-card::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(210, 166, 126, 0.16);
  border-radius: calc(clamp(26px, 5vw, 46px) - 10px);
  pointer-events: none;
}


.garden-open .hero-card {
  width: min(680px, 46vw);
  padding: clamp(20px, 3vw, 36px);
  transform: translateY(-7px) scale(0.965);
  box-shadow: 0 24px 72px rgba(158, 83, 103, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  animation: heroStepBack 0.82s cubic-bezier(0.22, 1, 0.36, 1);
}

.garden-open h1 {
  font-size: clamp(3.2rem, 5.8vw, 5.4rem);
}

.clock-panel {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(213, 163, 128, 0.32);
}

.clock-time {
  font-size: clamp(1.5rem, 4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #9b5867;
}

.clock-date {
  font-size: 0.95rem;
  color: #9f7472;
}

.eyebrow {
  margin: 18px 0 6px;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #bc8a6d;
}

h1 {
  margin: 0;
  font-family: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
  font-size: clamp(3.2rem, 9vw, 7.2rem);
  font-weight: 400;
  color: #9d4e63;
  text-shadow: 0 12px 34px rgba(202, 107, 132, 0.18);
}

.subtitle {
  margin: 6px auto 18px;
  max-width: 620px;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  line-height: 1.8;
  color: #876061;
}

.search-box {
  display: flex;
  width: min(680px, 100%);
  margin: 0 auto 18px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(203, 143, 112, 0.34);
  box-shadow: 0 14px 42px rgba(156, 76, 98, 0.12);
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 18px;
  color: #6f444c;
}

.search-box button {
  border: 0;
  border-radius: 999px;
  padding: 10px 24px;
  color: #fffaf4;
  cursor: pointer;
  background: linear-gradient(135deg, #c97184, #d7ac74);
  box-shadow: 0 10px 22px rgba(188, 106, 125, 0.28);
}

.garden-controls {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 124px;
}

.rose-seal {
  position: relative;
  display: inline-grid;
  place-items: center;
  gap: 2px;
  min-width: 118px;
  min-height: 118px;
  margin-top: 6px;
  border: 1px solid rgba(190, 117, 126, 0.38);
  border-radius: 48% 52% 46% 54%;
  color: #9f5866;
  cursor: pointer;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.88), transparent 32%),
    radial-gradient(circle at 42% 58%, rgba(218, 115, 137, 0.14), transparent 34%),
    linear-gradient(145deg, rgba(255, 239, 239, 0.88), rgba(244, 210, 196, 0.7));
  box-shadow:
    inset 0 0 0 8px rgba(255, 255, 255, 0.28),
    inset 0 -10px 24px rgba(188, 93, 116, 0.08),
    0 18px 42px rgba(168, 88, 104, 0.16);
  transition: transform 0.24s ease, box-shadow 0.24s ease, opacity 0.4s ease;
}

.rose-seal::before,
.rose-seal::after {
  content: '';
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(185, 115, 121, 0.24);
  border-radius: 50%;
  pointer-events: none;
}

.rose-seal::after {
  inset: -8px;
  border-style: dashed;
  opacity: 0.42;
  animation: sealBreath 3.8s ease-in-out infinite;
}

.seal-bloom {
  font-size: 2rem;
  line-height: 1;
  color: #c27384;
}

.seal-text {
  font-size: 0.92rem;
  letter-spacing: 0.14em;
}

.rose-seal small {
  font-size: 0.7rem;
  color: #b88a7b;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.rose-seal:hover,
.rose-seal:focus-visible {
  transform: translateY(-5px) scale(1.025) rotate(-2deg);
  border-color: rgba(195, 104, 124, 0.52);
  box-shadow:
    inset 0 0 0 8px rgba(255, 255, 255, 0.34),
    inset 0 -10px 24px rgba(188, 93, 116, 0.08),
    0 24px 56px rgba(168, 88, 104, 0.22);
}

.rose-seal:hover small,
.rose-seal:focus-visible small {
  opacity: 1;
  transform: translateY(0);
}

.rose-seal.blooming {
  animation: rosePress 0.82s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.rose-seal.blooming::after {
  animation: roseRipple 0.9s ease-out forwards;
}

.garden-open .rose-seal,
.garden-closing .rose-seal {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px) scale(0.82);
}

@keyframes rosePress {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  20% { transform: translateY(3px) scale(0.96); opacity: 1; }
  52% { transform: translateY(-6px) scale(1.16) rotate(-4deg); opacity: 0.86; }
  100% { transform: translateY(-16px) scale(0.78); opacity: 0; }
}

@keyframes roseRipple {
  0% { transform: scale(0.9); opacity: 0.68; }
  100% { transform: scale(2.05); opacity: 0; }
}

@keyframes heroStepBack {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-11px) scale(0.982); }
  100% { transform: translateY(-7px) scale(0.965); }
}

@keyframes gardenGlow {
  0% { opacity: 0.52; transform: translateX(-50%) scaleX(0.72); }
  55% { opacity: 0.9; transform: translateX(-50%) scaleX(1.08); }
  100% { opacity: 0.7; transform: translateX(-50%) scaleX(1); }
}

.garden-open .ground-glow {
  animation: gardenGlow 1.15s ease-out both;
}

.secret-garden {
  position: absolute;
  inset: clamp(34px, 5vw, 76px);
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.985);
  filter: blur(2px);
  transition:
    opacity 0.7s ease,
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.7s ease;
}

.garden-open .secret-garden {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  filter: blur(0);
}

.garden-close {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 11px;
  border: 1px solid rgba(195, 129, 132, 0.34);
  border-radius: 999px;
  color: #9f5866;
  cursor: pointer;
  background: rgba(255, 250, 246, 0.82);
  box-shadow: 0 12px 28px rgba(156, 76, 98, 0.12);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -38%) scale(0.92);
  transition:
    opacity 0.38s ease 0.36s,
    transform 0.46s cubic-bezier(0.22, 1, 0.36, 1) 0.36s,
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.garden-close span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(201, 113, 132, 0.12);
  font-size: 1.2rem;
  line-height: 1;
}

.garden-close small {
  color: #ad8079;
}

.garden-open .garden-close {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.garden-closing .garden-close {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -42%) scale(0.96);
  transition-delay: 0s;
}

.garden-close:hover,
.garden-close:focus-visible {
  border-color: rgba(195, 104, 124, 0.48);
  background: rgba(255, 252, 249, 0.92);
  box-shadow: 0 16px 34px rgba(156, 76, 98, 0.15);
  transform: translate(-50%, calc(-50% - 2px)) scale(1.01);
}

.garden-close:active {
  transform: translate(-50%, -50%) scale(0.98);
}

.garden-actions {
  display: contents;
}

.garden-widget {
  position: absolute;
  opacity: 0;
  filter: blur(6px);
  will-change: transform, opacity, filter;
}

.garden-widget::after {
  content: '';
  position: absolute;
  inset: -24px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(255, 220, 230, 0.32), transparent 64%);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.garden-open .garden-widget {
  opacity: 1;
  filter: blur(0);
}

.garden-open .garden-widget::after {
  animation: widgetAura 1.05s ease-out both;
}

.memorial-card.garden-widget {
  left: 3vw;
  bottom: 8vh;
  transform: translate(-28px, 24px) scale(0.94) rotate(-4deg);
}

.garden-open .memorial-card.garden-widget {
  animation: notePinIn 0.94s cubic-bezier(0.2, 1.2, 0.34, 1) 0.38s both;
}

.garden-gate {
  left: 8vw;
  top: 16vh;
  transform-origin: left center;
  transform: perspective(700px) translateX(-34px) rotateY(-18deg) scale(0.96);
}

.garden-open .garden-gate {
  animation: gateOpenIn 0.9s cubic-bezier(0.2, 1, 0.34, 1) 0.52s both;
}

.garden-letter {
  right: 7vw;
  top: 19vh;
  transform: translate(36px, -28px) scale(0.94) rotate(8deg);
}

.garden-open .garden-letter {
  animation: letterDriftIn 0.96s cubic-bezier(0.2, 1, 0.34, 1) 0.66s both;
}

.garden-album {
  right: 6vw;
  bottom: 9vh;
  transform: translate(28px, 38px) scale(0.9) rotate(-6deg);
}

.garden-open .garden-album {
  animation: albumSettleIn 0.92s cubic-bezier(0.2, 1, 0.34, 1) 0.82s both;
}

.feature-card.blooming {
  animation: featureBloom 0.28s ease;
}

.garden-closing .garden-widget {
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  filter: blur(4px);
  animation: none;
  transition:
    opacity 0.42s ease,
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.42s ease;
}

.garden-closing .secret-garden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.992);
  filter: blur(3px);
  transition:
    opacity 0.48s ease,
    transform 0.54s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.48s ease;
}

.garden-closing .hero-card {
  animation: heroReturn 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes heroReturn {
  from { transform: translateY(-7px) scale(0.965); }
  to { transform: translateY(0) scale(1); }
}

@keyframes notePinIn {
  0% { opacity: 0; transform: translate(-28px, 24px) scale(0.94) rotate(-4deg); filter: blur(6px); }
  62% { opacity: 1; transform: translate(4px, -3px) scale(1.015) rotate(1deg); filter: blur(0); }
  82% { transform: translate(-2px, 1px) scale(0.995) rotate(-1.5deg); }
  100% { opacity: 1; transform: translate(0, 0) scale(1) rotate(-1deg); filter: blur(0); }
}

@keyframes gateOpenIn {
  0% { opacity: 0; transform: perspective(700px) translateX(-34px) rotateY(-18deg) scale(0.96); filter: blur(6px); }
  54% { opacity: 1; transform: perspective(700px) translateX(4px) rotateY(4deg) scale(1.01); filter: blur(0); }
  100% { opacity: 1; transform: perspective(700px) translateX(0) rotateY(0) scale(1); filter: blur(0); }
}

@keyframes letterDriftIn {
  0% { opacity: 0; transform: translate(36px, -28px) scale(0.94) rotate(8deg); filter: blur(6px); }
  45% { opacity: 0.86; transform: translate(-6px, 6px) scale(1.01) rotate(0deg); filter: blur(1px); }
  72% { transform: translate(2px, -2px) scale(1) rotate(4deg); }
  100% { opacity: 1; transform: translate(0, 0) scale(1) rotate(3deg); filter: blur(0); }
}

@keyframes albumSettleIn {
  0% { opacity: 0; transform: translate(28px, 38px) scale(0.9) rotate(-6deg); filter: blur(6px); }
  52% { opacity: 1; transform: translate(-3px, -8px) scale(1.025) rotate(-1deg); filter: blur(0); }
  78% { transform: translate(1px, 3px) scale(0.992) rotate(-2.6deg); }
  100% { opacity: 1; transform: translate(0, 0) scale(1) rotate(-2deg); filter: blur(0); }
}

@keyframes widgetAura {
  0% { opacity: 0; transform: scale(0.82); }
  42% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.12); }
}

@keyframes featureBloom {
  0%, 100% { transform: translateY(-5px) scale(1); }
  50% { transform: translateY(-8px) scale(1.04) rotate(-1deg); }
}


@keyframes softShake {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-6px); }
  70% { transform: translateX(6px); }
}

.memorial-card {
  width: min(540px, 100%);
  margin: 0 auto 22px;
  padding: 16px 22px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 241, 232, 0.72));
  border: 1px solid rgba(210, 160, 118, 0.38);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 16px 36px rgba(167, 88, 105, 0.13);
}

.secret-garden .memorial-card {
  width: min(360px, 24vw);
  margin: 0;
  text-align: left;
}

.secret-garden .memorial-card::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 34px;
  width: 64px;
  height: 18px;
  border-radius: 999px;
  background: rgba(218, 172, 116, 0.32);
  rotate: -4deg;
}

.memorial-kicker {
  display: block;
  color: #b98275;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.memorial-card strong {
  display: block;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  color: #a74f65;
}

.memorial-card p {
  margin: 4px 0 8px;
  line-height: 1.6;
}

.memorial-card small {
  color: #ad827e;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.feature-card {
  min-height: 112px;
  padding: 18px;
  border: 1px solid rgba(205, 149, 119, 0.32);
  border-radius: 28px;
  background: rgba(255, 250, 246, 0.66);
  color: #744750;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(156, 76, 98, 0.1);
  transition:
    transform 0.26s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.26s ease,
    border-color 0.26s ease,
    box-shadow 0.26s ease;
}

.secret-garden .feature-card {
  width: min(240px, 18vw);
  min-height: 138px;
  overflow: hidden;
  background: rgba(255, 250, 246, 0.76);
  backdrop-filter: blur(10px);
}

.secret-garden .feature-card::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(210, 160, 118, 0.16);
  border-radius: 20px;
  pointer-events: none;
}

.garden-gate::after,
.garden-letter::after,
.garden-album::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.garden-gate::after {
  right: 18px;
  bottom: 16px;
  width: 42px;
  height: 54px;
  border: 1px solid rgba(176, 112, 101, 0.2);
  border-radius: 22px 22px 4px 4px;
}

.garden-letter::after {
  right: -18px;
  top: -18px;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, rgba(215, 172, 116, 0.34), transparent 55%);
  rotate: 45deg;
}

.garden-album::after {
  display: none;
}

.garden-gate {
  rotate: -3deg;
}

.garden-letter {
  rotate: 3deg;
}

.garden-album {
  rotate: -2deg;
  background: linear-gradient(145deg, rgba(255, 246, 235, 0.94), rgba(250, 232, 218, 0.86));
  box-shadow: none;
}


.garden-open .feature-card:hover,
.garden-open .feature-card:focus-visible {
  transform: translateY(-5px) scale(1.015);
  border-color: rgba(195, 104, 124, 0.45);
  background: rgba(255, 252, 248, 0.9);
  box-shadow: 0 14px 30px rgba(156, 76, 98, 0.12);
}

.garden-open .feature-card:hover .feature-icon,
.garden-open .feature-card:focus-visible .feature-icon {
  transform: translateY(-2px) rotate(-4deg) scale(1.06);
}

.garden-open .garden-album:hover,
.garden-open .garden-album:focus-visible {
  box-shadow: none;
}

.feature-icon {
  display: block;
  margin-bottom: 8px;
  font-size: 1.6rem;
  color: #c17484;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-card strong,
.feature-card small {
  display: block;
}

.feature-card small {
  margin-top: 5px;
  line-height: 1.5;
  color: #9b7373;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(84, 45, 57, 0.24);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 20;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  display: none;
  position: relative;
  width: min(760px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  padding: clamp(20px, 3vw, 30px);
  border-radius: 34px;
  border: 1px solid rgba(212, 165, 118, 0.48);
  background: linear-gradient(145deg, rgba(255, 252, 247, 0.96), rgba(255, 237, 243, 0.94));
  box-shadow: 0 32px 90px rgba(88, 43, 58, 0.24);
  transform: translateY(12px) scale(0.98);
}

.modal.active {
  display: block;
  animation: modalIn 0.2s ease forwards;
}

@keyframes modalIn {
  to { transform: translateY(0) scale(1); }
}

.large-modal {
  width: min(1120px, 100%);
}

.album-modal {
  width: min(1120px, 100%);
  max-height: min(90vh, 900px);
}

.large-modal {
  min-height: min(82vh, 820px);
}

.album-modal {
  min-height: min(84vh, 820px);
  box-shadow: none;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: #a45c6c;
  font-size: 1.6rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: rgba(255, 250, 247, 0.96);
  transform: translateY(-2px) scale(1.04);
}

.modal-header p {
  margin: 0 0 4px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #bf9274;
  font-size: 0.75rem;
}

.modal-header h2 {
  margin: 0 0 20px;
  font-size: 2rem;
  color: #9d4e63;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.link-card {
  display: block;
  min-height: 138px;
  padding: 20px;
  border-radius: 26px;
  border: 1px solid rgba(209, 155, 117, 0.34);
  background: rgba(255, 255, 255, 0.56);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.link-card:hover {
  transform: translateY(-4px);
}

.link-card span {
  display: block;
  font-size: 1.8rem;
  color: #c17386;
}

.link-card strong,
.link-card small {
  display: block;
  margin-top: 8px;
}

.letters-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) minmax(320px, 1.5fr);
  gap: 18px;
}

.letter-list {
  display: grid;
  gap: 10px;
  align-content: start;
  max-height: 68vh;
  overflow: auto;
  padding-right: 4px;
}

.letter-item {
  padding: 14px;
  border: 1px solid rgba(209, 155, 117, 0.3);
  border-radius: 20px;
  background: rgba(255,255,255,0.58);
  text-align: left;
  color: #744750;
  cursor: pointer;
}

.letter-item.active {
  background: #fff8f4;
  border-color: rgba(193, 104, 125, 0.48);
  box-shadow: 0 12px 24px rgba(160, 82, 101, 0.12);
}

.letter-item small,
.letter-item strong,
.letter-item span {
  display: block;
}

.letter-item small,
.letter-item span {
  color: #a47b78;
}

.letter-paper {
  min-height: min(68vh, 620px);
  padding: clamp(22px, 4vw, 42px);
  border-radius: 24px;
  border: 1px solid rgba(224, 156, 172, 0.45);
  background:
    linear-gradient(rgba(255,255,255,0.58), rgba(255,255,255,0.58)),
    repeating-linear-gradient(#fffaf6 0, #fffaf6 31px, #f4d9df 32px);
  box-shadow: inset 0 0 0 8px rgba(255, 245, 246, 0.58), 0 18px 46px rgba(140, 76, 88, 0.13);
}

.letter-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #ad8079;
  font-size: 0.92rem;
}

.letter-paper h3 {
  font-family: 'ZCOOL XiaoWei', serif;
  font-size: 2.1rem;
  color: #9d4e63;
}

.letter-paper p {
  white-space: pre-wrap;
  line-height: 2.05;
  font-size: 1.05rem;
}

.album-shell {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 12px;
  padding: 6px 24px 62px;
}


.album-control {
  position: absolute;
  bottom: 6px;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #cc7c8e, #d7ac74);
  color: white;
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(171, 92, 110, 0.24);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.album-control:hover,
.album-control:focus-visible {
  filter: brightness(1.04);
  transform: translateY(-2px) scale(1.04);
}

#prevPhoto {
  left: 26px;
}

#nextPhoto {
  right: 26px;
}

.album-spread {
  display: grid;
  grid-template-columns: 1fr;
  min-height: min(66vh, 620px);
  padding: 14px;
  border-radius: 28px;
  background: linear-gradient(145deg, #fff7ee, #f7dfca);
  box-shadow: none;
}

.album-wall-page {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: min(62vh, 580px);
  overflow: hidden;
  border: 1px solid rgba(190, 139, 95, 0.24);
  border-radius: 22px;
  background: linear-gradient(145deg, #fffaf2, #fff2e4);
  box-shadow: none;
}

.album-wall-page::before {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(214, 173, 127, 0.16);
  border-radius: 16px;
  pointer-events: none;
}

.album-wall-item {
  position: absolute;
  overflow: hidden;
  transform-origin: center;
}

.album-wall-item.photo-item {
  border: 6px solid rgba(255, 255, 255, 0.88);
  border-radius: 16px;
  background: #f2dfcf;
  box-shadow: none;
}

.album-wall-item.photo-item img {
  width: 115%;
  height: 115%;
  object-fit: cover;
  object-position: 50% 50%;
  transform-origin: center;
}

.album-wall-item.text-item {
  display: grid;
  place-items: center;
  padding: 10px 14px;
  white-space: pre-wrap;
  line-height: 1.55;
  text-align: center;
  border: 1px solid rgba(202, 140, 116, 0.2);
  border-radius: 16px;
  background: rgba(255, 250, 246, 0.78);
  box-shadow: none;
}

.album-wall-item.icon-item {
  display: grid;
  place-items: center;
  color: #c17484;
  overflow: visible;
  filter: drop-shadow(0 6px 10px rgba(153, 82, 98, 0.08));
}

.album-wall-item.icon-item .wall-icon-svg {
  display: block;
  width: 1em;
  height: 1em;
}

.album-wall-item.icon-item svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.album-wall-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 26px;
  color: #825b5c;
  text-align: center;
  line-height: 1.7;
}

.album-photo-page {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  min-height: min(62vh, 580px);
  padding: 20px;
  background:
    linear-gradient(rgba(255, 250, 241, 0.9), rgba(255, 250, 241, 0.9)),
    repeating-linear-gradient(90deg, rgba(214, 173, 127, 0.12) 0 1px, transparent 1px 18px);
  border: 1px solid rgba(190, 139, 95, 0.28);
  box-shadow: inset 0 0 0 8px rgba(255, 244, 232, 0.58);
}

.album-photo-page:first-child {
  border-radius: 20px 4px 4px 20px;
}

.album-photo-page:last-child {
  border-radius: 4px 20px 20px 4px;
}

.album-photo-page::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(214, 173, 127, 0.2);
  border-radius: 14px;
  pointer-events: none;
}

.album-photo-page::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 18px;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, rgba(220, 177, 132, 0.4), transparent 50%);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
}

.album-image-frame {
  width: min(100%, 480px);
  height: min(48vh, 430px);
  overflow: hidden;
  border: 7px solid rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  box-shadow: 0 18px 36px rgba(92, 61, 55, 0.2);
  background: #f2dfcf;
}

.album-image-frame img {
  width: 115%;
  height: 115%;
  object-fit: cover;
  object-position: 50% 50%;
  transform-origin: center;
  will-change: transform;
}

.album-photo-page img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-photo-page p,
.album-empty {
  margin: 12px 0 0;
  line-height: 1.55;
  color: #825b5c;
  text-align: center;
}

.album-page {
  text-align: center;
  color: #a47b78;
}

.site-footer {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 6;
  transform: translateX(-50%);
  font-size: 0.78rem;
  line-height: 1;
}

.icp-link {
  color: rgba(125, 82, 84, 0.66);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s ease;
}

.icp-link:hover,
.icp-link:focus-visible {
  color: rgba(157, 78, 99, 0.9);
  text-decoration: underline;
}

.empty-state {
  color: #9f7472;
  line-height: 1.7;
}

@media (min-width: 761px) and (max-width: 1024px) {
  .rose-stage {
    padding: 22px;
  }

  .hero-card,
  .garden-open .hero-card {
    width: min(900px, 100%);
    padding: 28px;
    transform: none;
  }

  .secret-garden {
    position: static;
    display: none;
    width: min(900px, 100%);
    margin-top: 14px;
  }

  .garden-open .secret-garden {
    display: grid;
  }

  .garden-widget,
  .memorial-card.garden-widget,
  .garden-gate,
  .garden-letter,
  .garden-album {
    position: static;
    width: 100%;
    rotate: 0deg;
  }

  .garden-close {
    position: absolute;
    justify-self: auto;
    margin-bottom: 0;
  }

  .garden-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 12px;
  }

  .garden-controls {
    min-height: 96px;
  }

  .rose-seal {
    min-width: 96px;
    min-height: 96px;
  }

  h1 {
    font-size: clamp(4.2rem, 8vw, 5.8rem);
  }

  .feature-grid,
  .garden-actions {
    gap: 12px;
  }

  .feature-card {
    min-height: 104px;
    padding: 15px;
  }

  .modal {
    max-height: 86svh;
    padding: 24px;
  }

  .large-modal {
    width: min(930px, 100%);
  }

  .album-modal {
    width: min(860px, 100%);
  }

  .letters-layout {
    grid-template-columns: minmax(210px, 0.75fr) minmax(300px, 1.4fr);
  }

  .album-spread {
    min-height: 430px;
    padding: 18px;
  }

  .album-photo-page {
    min-height: 390px;
    padding: 16px;
  }

  .album-image-frame {
    height: 300px;
  }
}

@media (max-width: 760px) {
  .rose-stage {
    padding: 10px;
  }

  .hero-card,
  .garden-open .hero-card {
    width: 100%;
    padding: 14px;
    border-radius: 24px;
    max-height: calc(100svh - 12px);
    transform: none;
  }

  .secret-garden {
    position: static;
    display: none;
    width: 100%;
    margin-top: 8px;
  }

  .garden-open .secret-garden {
    display: grid;
  }

  .garden-widget,
  .memorial-card.garden-widget,
  .garden-gate,
  .garden-letter,
  .garden-album {
    position: static;
    width: 100%;
    rotate: 0deg;
  }

  .garden-close {
    position: absolute;
    justify-self: auto;
    margin-bottom: 0;
  }

  .garden-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 7px;
  }

  .garden-controls {
    min-height: 76px;
  }

  .rose-seal {
    min-width: 76px;
    min-height: 76px;
    margin-top: 0;
  }

  .seal-bloom {
    font-size: 1.45rem;
  }

  .seal-text {
    font-size: 0.76rem;
  }

  .rose-seal small {
    display: none;
  }

  .clock-panel {
    display: grid;
    gap: 0;
    padding: 6px 14px;
  }

  .clock-time {
    font-size: 1.55rem;
  }

  .clock-date {
    font-size: 0.78rem;
  }

  .eyebrow {
    margin: 10px 0 4px;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
  }

  h1 {
    font-size: clamp(2.35rem, 12vw, 3rem);
  }

  .subtitle {
    margin: 4px auto 10px;
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .search-box {
    margin-bottom: 10px;
    padding: 5px;
  }

  .search-box input {
    padding: 8px 10px;
  }

  .search-box button {
    padding: 8px 14px;
  }

  .memorial-card {
    margin-bottom: 10px;
    padding: 10px 14px;
    border-radius: 22px;
  }

  .memorial-card strong {
    font-size: 1.45rem;
  }

  .memorial-card p {
    margin: 2px 0 4px;
    line-height: 1.35;
    font-size: 0.88rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .feature-card {
    min-height: auto;
    padding: 9px 12px;
    border-radius: 20px;
  }

  .feature-icon {
    margin-bottom: 3px;
    font-size: 1.25rem;
  }

  .feature-card small {
    margin-top: 2px;
    line-height: 1.3;
  }

  .modal-backdrop {
    padding: 8px;
  }

  .modal {
    width: 100%;
    max-height: 94svh;
    padding: 18px;
    border-radius: 24px;
  }

  .modal-header h2 {
    margin-bottom: 14px;
    font-size: 1.6rem;
  }

  .letters-layout {
    grid-template-columns: 1fr;
  }

  .letter-list {
    max-height: 160px;
  }

  .letter-paper {
    min-height: 300px;
    padding: 22px;
  }

  .album-shell {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 4px 0 50px;
  }

  .album-control {
    display: block;
    bottom: 4px;
    width: 38px;
    height: 38px;
    font-size: 1.6rem;
  }

  #prevPhoto {
    left: 14px;
  }

  #nextPhoto {
    right: 14px;
  }

  .album-spread {
    grid-template-columns: 1fr;
    min-height: 350px;
    padding: 10px;
  }

  .album-photo-page {
    min-height: 320px;
    padding: 12px;
  }

  .album-image-frame {
    height: 225px;
  }

  .album-photo-page:nth-child(2) {
    display: none;
  }
}

@media (max-width: 380px), (max-height: 700px) and (max-width: 760px) {
  .hero-card {
    padding: 10px;
  }

  .clock-time {
    font-size: 1.35rem;
  }

  h1 {
    font-size: 2.25rem;
  }

  .subtitle,
  .feature-card small,
  .memorial-card p,
  .memorial-card small {
    font-size: 0.8rem;
  }

  .feature-card {
    padding: 7px 10px;
  }

  .memorial-card {
    padding: 8px 12px;
  }
}

@media (max-height: 760px) and (min-width: 761px) {
  .hero-card {
    padding: 20px 32px;
  }

  h1 {
    font-size: 4.6rem;
  }

  .memorial-card {
    padding: 12px 18px;
  }

  .feature-card {
    min-height: 96px;
    padding: 14px;
  }
}
