@font-face {
  font-family: "Fusion Pixel";
  src: url("assets/fonts/fusion-pixel-12px-zh_cn.woff2") format("woff2");
  font-display: swap;
}

:root {
  --forest-deep: #1c2b22;
  --forest: #2e4a38;
  --moss: #55764f;
  --moss-soft: #6f9070;
  --sage: #a9c5a0;
  --sage-soft: #c8dcc0;
  --cream: #f6f1e0;
  --cream-deep: #efe6cc;
  --bark: #6b4f33;
  --bark-dark: #3e2f20;
  --gold: #e0b45c;
  --gold-bright: #f4d03f;
  --rose: #d96a55;
  --ink: #33402f;
  --grass: #4d6f4e;
  --grass-deep: #3c5a40;
  --px: 4px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Fusion Pixel", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--forest-deep);
  line-height: 1.8;
  letter-spacing: 0.02em;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; display: block; }
.pixelated { image-rendering: pixelated; }

.pxi { width: 16px; height: 16px; vertical-align: -2px; }
.pxi.big { width: 24px; height: 24px; vertical-align: -6px; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 18px; }

/* ---------- sections with blended transitions ---------- */
.sec { position: relative; padding: 64px 0 76px; scroll-margin-top: calc(62px + env(safe-area-inset-top)); }
.sec::before {
  content: "";
  position: absolute;
  top: -56px;
  left: 0;
  right: 0;
  height: 56px;
  pointer-events: none;
}

.sec-cream { background: var(--cream); }
#invite::before, #timeline::before { content: none; }
#gallery::before { background: linear-gradient(#3c5a40, var(--cream)); }

.sec-grass { background: linear-gradient(var(--grass), var(--grass-deep)); }
.sec-grass::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(28, 43, 34, 0.22) 2px, transparent 3px) 0 0 / 26px 26px;
}

.sec-sage { background: linear-gradient(var(--sage-soft), var(--sage)); }
#venue::before { background: linear-gradient(var(--cream), var(--sage-soft)); }

.sec-night {
  background:
    linear-gradient(rgba(16, 26, 19, 0.72), rgba(16, 26, 19, 0.72)),
    url("assets/img/night-forest.webp") center / cover no-repeat;
  text-align: center;
  padding: 88px 0 96px;
}
.sec-night::before { background: linear-gradient(var(--grass-deep), #141f18); }
.sec-night::after {
  content: "";
  position: absolute;
  bottom: -56px;
  left: 0;
  right: 0;
  height: 56px;
  background: linear-gradient(#141f18, #24382c);
  pointer-events: none;
  z-index: 1;
}

/* subtle leaf-dot texture */
.sec-cream::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.sec-cream::after { background: radial-gradient(circle, rgba(91, 122, 82, 0.10) 3px, transparent 4px) 0 0 / 34px 34px; }
.sec > .wrap { position: relative; z-index: 2; }

.section-title {
  font-size: clamp(22px, 6vw, 32px);
  text-align: center;
  margin: 0 0 8px;
  color: var(--forest);
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.5);
}
.section-title.light { color: var(--cream); text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5); }
.section-sub { text-align: center; margin: 0 0 26px; color: var(--moss); }

/* ---------- pixel chrome ---------- */
.panel {
  background: #fbf7e9;
  border: var(--px) solid var(--bark-dark);
  box-shadow:
    inset 0 0 0 var(--px) var(--cream-deep),
    0 0 0 var(--px) var(--bark),
    0 10px 0 rgba(0, 0, 0, 0.18);
  clip-path: polygon(
    0 8px, 8px 8px, 8px 0,
    calc(100% - 8px) 0, calc(100% - 8px) 8px, 100% 8px,
    100% calc(100% - 8px), calc(100% - 8px) calc(100% - 8px), calc(100% - 8px) 100%,
    8px 100%, 8px calc(100% - 8px), 0 calc(100% - 8px)
  );
  padding: 26px 18px;
}
@media (min-width: 520px) { .panel { padding: 32px 28px; } }

/* ---------- nav ---------- */
.topnav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  gap: 2px;
  padding: 6px 8px;
  padding-top: calc(6px + env(safe-area-inset-top));
  background: rgba(28, 43, 34, 0.94);
  border-bottom: 3px solid var(--forest);
}
.topnav a {
  color: var(--sage-soft);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px;
  border: 2px solid transparent;
  white-space: nowrap;
}
.topnav a:hover, .topnav a:focus-visible {
  border-color: var(--gold);
  color: var(--gold-bright);
  outline: none;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  background: #23402f;
  display: flex;
  justify-content: center;
  overflow: hidden;
}
.hero-stage {
  position: relative;
  width: 100%;
  max-width: calc(100svh * 0.5777);
  height: 100svh;
  min-height: 560px;
}
.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26px;
  background: linear-gradient(rgba(77, 111, 78, 0), var(--grass));
  pointer-events: none;
  z-index: 2;
}
.hero-names {
  position: absolute;
  top: 43.2%;
  left: 0;
  right: 0;
  z-index: 2;
  margin: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
}
.hero-person { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.hero-person .role {
  font-style: normal;
  font-size: 12px;
  color: var(--forest-deep);
  background: var(--sage-soft);
  border: 2px solid var(--bark-dark);
  padding: 0 6px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}
.hero-person .nm {
  font-size: clamp(22px, 6vw, 30px);
  color: var(--cream);
  text-shadow: 2px 2px 0 rgba(18, 32, 22, 0.85), 0 0 10px rgba(18, 32, 22, 0.5);
}
.hero-names .amp {
  align-self: center;
  color: var(--rose);
  font-size: clamp(22px, 6vw, 30px);
  text-shadow: 2px 2px 0 rgba(18, 32, 22, 0.85);
}
.scroll-hint {
  position: absolute;
  left: 50%;
  top: 80.4%;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  color: var(--forest-deep);
  background: var(--gold-bright);
  border: 4px solid var(--bark-dark);
  box-shadow: 0 6px 0 var(--bark-dark);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
  animation: bob 1.6s steps(2, jump-none) infinite;
}
.scroll-hint span { font-size: 11px; }
.scroll-hint:active { transform: translateX(-50%) translateY(4px); box-shadow: 0 2px 0 var(--bark-dark); }
@keyframes bob { 0% { transform: translateX(-50%) translateY(0); } 100% { transform: translateX(-50%) translateY(6px); } }

/* ---------- invite board (big wooden sign) ---------- */
#invite { padding-top: 0; }
.inv-scene {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 38svh;
  min-height: 250px;
  object-fit: cover;
  object-position: 50% 46%;
}
#invite > .wrap { margin-top: -44px; z-index: 3; }
.invite-board {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 16px 16px;
  line-height: 1.5;
  background: #eee7c6;
  border: 8px solid var(--bark);
  box-shadow:
    inset 0 0 0 4px #8fae7f,
    0 0 0 5px var(--bark-dark),
    0 12px 0 rgba(0, 0, 0, 0.32);
}
.ib-vine { position: absolute; width: 46px; height: 46px; z-index: 1; pointer-events: none; }
.deco-tl { top: 6px; left: 6px; transform: scaleX(-1); }
.deco-tr { top: 6px; right: 6px; }
.deco-bl { bottom: 6px; left: 6px; transform: scaleY(-1); }
.deco-br { bottom: 6px; right: 6px; transform: scale(-1); }
.ib-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  font-size: clamp(26px, 7vw, 36px);
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.25;
  color: #33402f;
}
.ib-garland { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 5px 0 8px; line-height: 1; }
.ib-garland .pxi { width: 20px; height: 20px; }
.g-line { width: 72px; height: 4px; background: repeating-linear-gradient(90deg, var(--moss) 0 6px, transparent 6px 10px); }
.ib-names {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  margin: 0 0 6px;
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 400;
  line-height: 1.25;
  color: var(--rose);
}
.ib-names .amp { font-size: 0.65em; }
.ib-dash { border: 0; border-top: 3px dashed rgba(62, 47, 32, 0.5); margin: 10px 4px 4px; }
.ib-list { list-style: none; margin: 0; padding: 0; text-align: left; }
.ib-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 10px;
  font-size: 18px;
  line-height: 1.5;
  border: 3px solid rgba(107, 79, 51, 0.55);
  background: rgba(255, 253, 240, 0.55);
}
.ib-list .pxi.big { flex: 0 0 auto; width: 28px; height: 28px; margin-top: 3px; }
.ib-list .k { color: #4a3826; font-weight: 700; white-space: nowrap; }
.ib-list .v { color: var(--ink); }
@media (max-width: 430px) {
  .ib-list li { font-size: 15px; gap: 6px; padding: 5px 8px; }
  .ib-list .pxi.big { width: 22px; height: 22px; margin-top: 4px; }
}
.ib-foot { margin: 12px 0 0; }

.info-list { list-style: none; margin: 0; padding: 0; text-align: left; }
.info-list li {
  display: grid;
  grid-template-columns: 28px 56px 1fr;
  gap: 8px;
  align-items: start;
  padding: 10px 2px;
  border-bottom: 2px dashed rgba(91, 122, 82, 0.4);
  font-size: 15px;
}
.info-list li:last-child { border-bottom: 0; }
.info-list .k { color: var(--moss); font-weight: 700; }
.info-list .v { color: var(--ink); }

/* ---------- countdown ---------- */
.count-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 26px auto 18px;
  max-width: 480px;
}
.count-box {
  padding: 14px 4px 10px;
  background: rgba(10, 18, 12, 0.55);
  border: 4px solid var(--moss-soft);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.06);
}
.count-box span {
  display: block;
  font-size: clamp(24px, 7.5vw, 40px);
  color: var(--gold-bright);
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.55);
  font-variant-numeric: tabular-nums;
}
.count-box small { color: var(--sage-soft); font-size: 13px; }
.count-note { color: var(--sage-soft); margin: 0; font-size: 15px; }

/* ---------- timeline ---------- */
.sec-tl {
  background: linear-gradient(#24382c, #3c5a40);
  text-align: center;
  padding: 26px 0 30px;
}
.sec-tl::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(242, 181, 168, 0.16) 2px, transparent 3px) 0 0 / 96px 96px,
    radial-gradient(circle, rgba(242, 181, 168, 0.12) 2px, transparent 3px) 48px 36px / 96px 96px,
    radial-gradient(circle, rgba(169, 197, 160, 0.10) 2px, transparent 3px) 24px 72px / 96px 96px;
}
.tl-frame { position: absolute; inset: 0; pointer-events: none; }
.tl-lantern { position: absolute; top: 0; width: 30px; height: 30px; }
.tl-lantern.L { left: 7%; }
.tl-lantern.R { right: 7%; }
.tl-bird { position: absolute; top: 74px; left: 9%; width: 26px; height: 26px; }
.tl-vine { position: absolute; width: 34px; height: 34px; top: 128px; }
.tl-vine-l { left: 5%; }
.tl-vine-r { right: 5%; transform: scaleX(-1); }
.tl-welcome {
  position: absolute;
  top: 46px;
  right: 5%;
  padding: 6px 8px;
  background: linear-gradient(#8a6a42, #6b4f33);
  border: 3px solid var(--bark-dark);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
  color: #f6f1e0;
  font-size: 10px;
  line-height: 1.5;
  text-align: left;
}
.tl-welcome .pxi { width: 10px; height: 10px; margin-top: 2px; }
@media (max-width: 560px) { .tl-welcome, .tl-bird { display: none; } }
.tl-garland { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 4px; }
.tl-garland .g-line { flex: 0 0 48px; height: 3px; background: var(--sage); }
.tl-sign {
  display: inline-block;
  margin: 0 auto 6px;
  padding: 6px 20px;
  font-size: clamp(20px, 5.5vw, 26px);
  color: #f6f1e0;
  background: linear-gradient(#8a6a42, #6b4f33);
  border: 4px solid var(--bark-dark);
  box-shadow: inset 0 0 0 2px rgba(246, 241, 224, 0.25), 0 6px 0 rgba(0, 0, 0, 0.25);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
  clip-path: polygon(
    0 8px, 8px 8px, 8px 0,
    calc(100% - 8px) 0, calc(100% - 8px) 8px, 100% 8px,
    100% calc(100% - 8px), calc(100% - 8px) calc(100% - 8px), calc(100% - 8px) 100%,
    8px 100%, 8px calc(100% - 8px), 0 calc(100% - 8px)
  );
}
.tl-sign .pxi { vertical-align: -4px; }
.tl-sub { margin: 0 0 14px; color: var(--sage); font-size: 14px; }
.tl-sub .pxi { width: 12px; height: 12px; vertical-align: -2px; }
.tl-list { list-style: none; margin: 0 auto; padding: 0; max-width: 560px; position: relative; }
.tl-list::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px;
  bottom: 10px;
  width: 4px;
  margin-left: -2px;
  background: repeating-linear-gradient(var(--sage) 0 12px, transparent 12px 24px);
}
.tl-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 14px;
}
.tl-item:last-child { margin-bottom: 0; }
.tl-item.flip { flex-direction: row-reverse; }
.tl-card { width: 54%; }
.tl-date {
  display: inline-block;
  padding: 1px 8px;
  background: var(--gold);
  border: 3px solid var(--bark-dark);
  color: var(--bark-dark);
  font-size: 13px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}
.tl-word {
  display: block;
  margin-top: 6px;
  font-size: 17px;
  color: var(--gold-bright);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
}
.tl-node {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  padding: 4px;
  box-sizing: content-box;
  background: #fbf7e9;
  border: 3px solid var(--bark);
  z-index: 1;
}
.tl-photo {
  width: 40%;
  margin: 0;
  padding: 4px;
  background: #fffdf4;
  border: 3px solid var(--bark-dark);
  box-shadow: 0 0 0 3px var(--gold), 0 6px 0 rgba(0, 0, 0, 0.25);
}
.tl-photo img { width: 100%; height: auto; }
.tl-item:nth-child(odd) .tl-photo { transform: rotate(-1.4deg); }
.tl-item:nth-child(even) .tl-photo { transform: rotate(1.4deg); }
.tl-end { margin: 14px 0 0; color: #f2b5a8; font-size: 15px; font-weight: 700; }
@media (max-width: 430px) {
  .tl-card { width: 46%; }
  .tl-photo { width: 42%; }
  .tl-date { font-size: 12px; padding: 1px 6px; }
  .tl-word { font-size: 15px; }
  .tl-sub { font-size: 12px; }
  .tl-end { font-size: 13px; }
}

.firefly {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffe9a3;
  box-shadow: 0 0 10px 3px rgba(255, 224, 130, 0.75);
  animation: glow 3.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes glow {
  0%, 100% { opacity: 0.1; transform: translateY(0); }
  50% { opacity: 0.95; transform: translateY(-14px); }
}

/* ---------- gallery carousel ---------- */
.carousel {
  position: relative;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 6px 0 10px;
}
.carousel::-webkit-scrollbar { display: none; }
.track {
  display: flex;
  gap: 16px;
  width: max-content;
}
.frame {
  margin: 0;
  flex: 0 0 320px;
  scroll-snap-align: center;
  background: #fbf7e9;
  border: 4px solid var(--bark-dark);
  box-shadow: 0 0 0 4px var(--moss-soft), 0 8px 0 rgba(0, 0, 0, 0.15);
  padding: 8px;
  cursor: zoom-in;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform: scale(0.92);
  opacity: 0.7;
}
.frame.active { transform: scale(1); opacity: 1; }
.frame img {
  width: 100%;
  height: 250px;
  object-fit: contain;
  background: #fbf7e9;
}
.car-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  background: var(--gold-bright);
  border: 3px solid var(--bark-dark);
  box-shadow: 0 4px 0 var(--bark-dark);
  cursor: pointer;
  padding: 0 0 4px;
  touch-action: manipulation;
}
.car-arrow:active { transform: translateY(calc(-50% + 3px)); box-shadow: 0 1px 0 var(--bark-dark); }
.car-arrow.prev { left: 2px; }
.car-arrow.next { right: 2px; }
.car-dots {
  display: grid;
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;
  justify-content: center;
  column-gap: 10px;
  row-gap: 8px;
  margin-top: 12px;
}
.car-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  background: var(--sage);
  border: 2px solid var(--moss);
  cursor: pointer;
}
.car-dots button.on { background: var(--gold-bright); border-color: var(--bark); transform: scale(1.25); }

/* ---------- venue ---------- */
.venue-panel { text-align: center; }
.venue-panel .info-list { margin-bottom: 22px; }
.venue-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--moss);
  color: var(--cream);
  border: 4px solid var(--bark-dark);
  box-shadow: 0 6px 0 var(--bark-dark);
  text-decoration: none;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
}
.nav-btn.ghost { background: #fbf7e9; color: var(--forest); }
.nav-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--bark-dark); }
.venue-note { margin: 18px 0 0; font-size: 13px; line-height: 1.9; color: var(--moss); }

/* ---------- blessing wall ---------- */
.sec-bless { background: linear-gradient(var(--sage), var(--forest-deep)); }
#blessing::before { content: none; }
.bless-sub { color: var(--bark-dark); }
.bless-panel { max-width: 560px; margin: 0 auto; text-align: center; }
.bless-actions { display: flex; gap: 14px; justify-content: center; margin-bottom: 20px; }
.bless-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  color: var(--bark-dark);
  background: var(--cream-deep);
  border: 3px solid var(--bark-dark);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
  padding: 8px 14px;
  cursor: pointer;
}
.bless-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.bless-btn.done { opacity: 0.6; cursor: default; }
.bless-btn.done:active { transform: none; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); }
.bless-count {
  background: var(--forest);
  color: var(--cream);
  min-width: 26px;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 14px;
}
.bless-label { margin: 0 0 8px; font-size: 14px; color: var(--moss); }
.bless-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 12px; }
.bless-chip {
  font-family: inherit;
  font-size: 14px;
  padding: 6px 10px;
  background: #fff;
  color: var(--bark-dark);
  border: 3px solid var(--bark);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15);
  cursor: pointer;
}
.bless-chip.sel { background: var(--gold-bright); border-color: var(--bark-dark); }
.bless-input {
  display: block;
  width: min(240px, 80%);
  margin: 0 auto 14px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fffdf4;
  border: 3px solid var(--bark);
}
.bless-send {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  color: var(--cream);
  background: var(--moss);
  border: 3px solid var(--bark-dark);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
  padding: 9px 18px;
  cursor: pointer;
}
.bless-send:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.bless-send:disabled { opacity: 0.6; cursor: default; }
.bless-btn.pop { animation: btn-pop .45s ease-out; }
@keyframes btn-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.22) translateY(-4px); }
  100% { transform: scale(1); }
}

/* ---------- blessing danmaku (inside #blessing, above the panel) ---------- */
.danmaku {
  position: relative;
  width: 100%;
  height: 102px;
  margin: 0 0 10px;
  pointer-events: none;
  overflow: hidden;
}
.dm-item {
  position: absolute;
  left: 100%;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  white-space: nowrap;
  font-size: 13px;
  color: var(--cream);
  background: rgba(28, 43, 34, 0.82);
  border: 3px solid rgba(244, 208, 63, 0.85);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
  animation: dm-fly var(--dur, 11s) linear forwards;
}
.dm-item .who { color: var(--sage-soft); font-size: 12px; }
.dm-item .pxi { width: 14px; height: 14px; }
@keyframes dm-fly { to { transform: translateX(calc(-100vw - 100%)); } }

/* ---------- like/flower burst fx ---------- */
.fx-layer { position: fixed; inset: 0; z-index: 46; pointer-events: none; overflow: hidden; }
.fx-bit {
  position: fixed;
  width: var(--s, 22px);
  height: var(--s, 22px);
  animation: fx-rise var(--fd, 1.1s) ease-out forwards;
}
@keyframes fx-rise {
  0% { transform: translate(0, 0) scale(.55) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx, 0px), var(--dy, -150px)) scale(1.2) rotate(var(--rot, 20deg)); opacity: 0; }
}

/* ---------- footer ---------- */
.footer {
  position: relative;
  background:
    radial-gradient(circle, rgba(169, 197, 160, 0.07) 2px, transparent 3px) 0 0 / 26px 26px,
    var(--forest-deep);
  color: var(--sage-soft);
  text-align: center;
  padding: 56px 18px calc(56px + env(safe-area-inset-bottom));
}
.footer::before {
  content: "";
  position: absolute;
  top: -56px;
  left: 0;
  right: 0;
  height: 56px;
  background: linear-gradient(var(--forest-deep), var(--forest-deep));
  pointer-events: none;
}
.footer-inner { max-width: 460px; margin: 0 auto; }
.footer-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.footer-divider::before, .footer-divider::after {
  content: "";
  flex: 1;
  height: 4px;
  background: repeating-linear-gradient(90deg, rgba(169, 197, 160, 0.45) 0 8px, transparent 8px 16px);
}
.footer-divider .pxi { width: 20px; height: 20px; }
.footer-invite { margin: 0 0 16px; font-size: 14px; letter-spacing: 0.12em; color: #9db494; }
.footer-couple {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 0 10px;
  font-size: clamp(24px, 7vw, 34px);
  color: var(--gold);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}
.footer-couple .pxi { width: 22px; height: 22px; animation: heartbeat 1.4s steps(2, jump-none) infinite alternate; }
@keyframes heartbeat { from { transform: scale(1); } to { transform: scale(1.3); } }
.footer-meta { margin: 0 0 22px; font-size: 14px; letter-spacing: 0.15em; color: var(--sage-soft); }
.footer-leaves { margin: 0 0 10px; }
.footer-leaves .pxi { width: 14px; height: 14px; margin: 0 6px; opacity: 0.55; }
.footer-leaves .pxi:nth-child(2) { opacity: 0.8; }
.footer-note { margin: 0; font-size: 14px; color: #9db494; }

/* ---------- BGM button & toast ---------- */
.bgm-btn {
  position: fixed;
  left: 14px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  width: 54px;
  padding: 8px 0 6px;
  background: var(--sage-soft);
  color: var(--forest-deep);
  border: 4px solid var(--bark-dark);
  box-shadow: 0 4px 0 var(--bark-dark);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  touch-action: manipulation;
}
.bgm-btn.on { background: var(--gold-bright); }
.bgm-btn.on svg { animation: wiggle 0.9s ease-in-out infinite alternate; }
@keyframes wiggle { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
.bgm-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--bark-dark); }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 70;
  background: rgba(28, 43, 34, 0.95);
  color: var(--cream);
  border: 3px solid var(--gold);
  padding: 8px 16px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.toast.show { opacity: 1; }

/* ---------- falling leaves ---------- */
#leaves { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.leaf {
  position: absolute;
  top: -16px;
  width: 10px;
  height: 10px;
  background: var(--moss-soft);
  border-radius: 0 60% 0 60%;
  animation: fall linear infinite;
  opacity: 0.85;
}
@keyframes fall {
  0% { transform: translate3d(0, -5vh, 0) rotate(0deg); }
  50% { transform: translate3d(var(--sway), 50vh, 0) rotate(200deg); }
  100% { transform: translate3d(0, 108vh, 0) rotate(400deg); }
}

/* ---------- reveal (only when JS is on) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); }
.js .reveal.on { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s ease; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(12, 18, 13, 0.92);
  padding: 16px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(94vw, 860px); text-align: center; }
.lightbox img {
  max-width: 100%;
  max-height: 72vh;
  margin: 0 auto;
  border: 6px solid var(--moss-soft);
  box-shadow: 0 0 0 4px var(--bark-dark);
  object-fit: contain;
  background: #000;
}
.lightbox figcaption { color: var(--cream); margin-top: 12px; }
.lb-btn {
  position: absolute;
  font: inherit;
  font-size: 26px;
  line-height: 1;
  color: var(--ink);
  background: var(--gold-bright);
  border: 4px solid var(--bark-dark);
  box-shadow: 0 4px 0 var(--bark-dark);
  width: 48px;
  height: 48px;
  cursor: pointer;
  padding: 0;
  touch-action: manipulation;
}
.lb-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--bark-dark); }
.lb-close { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lb-prev:active, .lb-next:active { transform: translateY(calc(-50% + 3px)); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .leaf, .scroll-hint, .firefly, .footer-couple .pxi, .bgm-btn.on svg { animation: none; }
  .danmaku, .fx-layer { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
