:root {
  --bg: #ffffff;
  --surface: #f7faf6;
  --ink: #292b2d;
  --muted: #747a77;
  --sage: #718d5d;
  --sage-dark: #4f6c42;
  --sage-pale: #eaf1e5;
  --blue: #548fc8;
  --blue-pale: #e8f1f8;
  --coral: #e47f68;
  --line: #e3e9e1;
  --shadow: 0 18px 48px rgba(51, 69, 47, 0.11);
  --radius: 8px;
  --page: min(1440px, calc(100vw - 96px));
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body::selection { background: var(--sage-pale); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
img, video { display: block; max-width: 100%; }
svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.site-header {
  height: 82px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  width: var(--page);
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 30;
  background: rgba(255,255,255,.96);
}
.brand {
  justify-self: start;
  color: var(--sage);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 38px;
  letter-spacing: 0;
  line-height: 1;
}
.brand span { color: var(--blue); font-size: .72em; }
.site-nav { justify-self: center; display: flex; align-items: center; gap: 38px; }
.site-nav a {
  position: relative;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 30px 2px 26px;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 50%; right: 50%; bottom: 17px;
  height: 2px;
  background: var(--sage);
  transition: left .2s ease, right .2s ease;
}
.site-nav a:hover::after, .site-nav a:focus-visible::after { left: 0; right: 0; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.header-upload, .header-admin {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 20px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 14px;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.header-upload { border: 1px solid var(--sage); background: var(--sage); color: white; box-shadow: 0 7px 18px rgba(77,106,64,.15); }
.header-upload:hover { background: var(--sage-dark); border-color: var(--sage-dark); transform: translateY(-1px); }
.header-admin { border: 1px solid #c9d5c5; color: var(--sage-dark); background: white; }
.header-admin:hover { border-color: var(--sage); background: var(--sage-pale); transform: translateY(-1px); }
.header-admin svg { width: 17px; height: 17px; }
.mobile-menu { display: none; }

.flash-stack { position: fixed; top: 94px; right: 24px; z-index: 100; display: grid; gap: 8px; }
.flash { max-width: 420px; padding: 13px 18px; background: white; border: 1px solid var(--line); border-left: 4px solid var(--sage); box-shadow: var(--shadow); border-radius: 7px; font-size: 14px; }
.flash.error { border-left-color: var(--coral); }

.button {
  min-height: 51px;
  padding: 0 28px;
  border-radius: 7px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: .03em;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--sage); color: white; box-shadow: 0 8px 22px rgba(77, 106, 64, .16); }
.button.primary:hover { background: var(--sage-dark); box-shadow: 0 12px 28px rgba(77, 106, 64, .23); }
.button.secondary { background: white; color: var(--sage-dark); border-color: var(--sage); }
.button.secondary:hover { background: var(--sage-pale); }
.button.danger { background: white; color: #a84f40; border-color: #dba89e; }
.button.danger:hover { background: #fff3f0; }
.button.compact { min-height: 38px; padding: 0 17px; font-size: 13px; }

.home-hero {
  width: var(--page);
  min-height: 435px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(520px, .95fr) minmax(0, 1.55fr);
  align-items: center;
  gap: clamp(40px, 4vw, 70px);
  padding: 35px 0 20px;
  overflow: hidden;
}
.hero-copy { position: relative; z-index: 2; padding-left: 72px; }
.hero-copy::before {
  content: "";
  position: absolute;
  width: 58px; height: 116px;
  left: 0; top: 12px;
  background: var(--sage-pale);
  border-radius: 70% 20% 60% 25%;
  transform: rotate(17deg);
  opacity: .9;
}
.hero-copy::after {
  content: "";
  position: absolute;
  left: -18px; bottom: -38px;
  width: 84px; height: 112px;
  border-left: 2px solid #b9cbb0;
  border-radius: 50%;
  transform: rotate(-20deg);
  opacity: .7;
}
.hero-copy h1 {
  margin: 0;
  font-size: clamp(48px, 4vw, 58px);
  line-height: 1.28;
  letter-spacing: -.04em;
  font-weight: 750;
}
.hero-copy h1 span { color: var(--blue); white-space: nowrap; }
.hero-copy p { margin: 24px 0 29px; color: var(--muted); font-size: 18px; letter-spacing: .02em; }
.hero-actions { display: flex; gap: 18px; }

.hero-collage { height: 380px; position: relative; }
.hero-frame {
  margin: 0;
  background: white;
  padding: 9px;
  border: 1px solid #dfe5dd;
  box-shadow: var(--shadow);
  position: absolute;
}
.hero-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-frame:hover { border-color: #a9bca2; }
.hero-like-count { position: absolute; right: 17px; bottom: 16px; min-width: 42px; height: 28px; padding: 0 8px; border-radius: 6px; background: rgba(255,255,255,.92); color: #bd5661; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 11px; font-weight: 750; }
.hero-like-count svg { width: 14px; height: 14px; fill: currentColor; }
.hero-main .hero-like-count { left: 17px; right: auto; }
.hero-frame figcaption {
  position: absolute;
  left: 17px; bottom: 16px;
  background: rgba(255,255,255,.9);
  color: #5b625d;
  font-size: 10px;
  padding: 4px 7px;
  letter-spacing: .03em;
}
.hero-main { width: 73%; height: 320px; left: 0; top: 24px; transform: rotate(-1.8deg); z-index: 2; }
.hero-small { width: 31%; height: 148px; right: 0; z-index: 3; }
.hero-small-top { top: 8px; transform: rotate(2.5deg); }
.hero-small-bottom { top: 184px; transform: rotate(3.4deg); }
.hand-date {
  position: absolute;
  left: 54%; bottom: 0;
  color: var(--coral);
  font-family: "Bradley Hand", "Comic Sans MS", cursive;
  font-size: 22px;
  transform: rotate(-4deg);
  letter-spacing: .04em;
}
.hand-date::after { content: ""; position: absolute; left: 4px; right: -12px; bottom: -7px; border-bottom: 1px solid currentColor; transform: rotate(-2deg); }
.hero-empty { height: 390px; display: grid; place-items: center; border: 1px dashed #b8c7b2; background: var(--surface); color: var(--muted); }

.timeline-section { width: var(--page); margin: 0 auto; padding: 20px 0 100px; }
.section-heading { position: relative; display: flex; align-items: baseline; gap: 22px; padding-left: 80px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.timeline-dot { position: absolute; left: 52px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--sage); }
.timeline { position: relative; padding-left: 80px; }
.timeline::before { content: ""; position: absolute; left: 56px; top: 0; bottom: 0; width: 1px; background: #bdcdb7; }
.timeline-event {
  min-height: 170px;
  position: relative;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  padding: 12px 0;
}
.timeline-marker { position: absolute; left: -31px; top: 74px; width: 17px; height: 17px; border: 2px solid #a7bd9d; background: white; border-radius: 50%; display: grid; place-items: center; }
.timeline-marker span { width: 5px; height: 5px; border-radius: 50%; background: var(--sage); }
.event-meta { padding: 16px 10px 16px 0; display: flex; flex-direction: column; justify-content: center; }
.event-meta time { color: var(--blue); font-weight: 700; font-size: 14px; letter-spacing: .03em; }
.event-meta h3 { font-size: 23px; margin: 5px 0 4px; letter-spacing: -.02em; }
.event-meta p { color: var(--muted); margin: 0 0 9px; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.event-counts { display: flex; gap: 16px; color: #777e79; font-size: 12px; }
.event-counts span { display: inline-flex; align-items: center; gap: 6px; }
.event-counts svg { width: 15px; height: 15px; }
.event-counts .video-count { color: var(--coral); }
.event-strip {
  min-width: 0;
  min-height: 145px;
  display: grid;
  grid-template-columns: 2.7fr repeat(4, minmax(90px, 1fr));
  gap: 6px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  overflow: hidden;
}
.event-strip:hover { border-color: #adbea7; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(51,69,47,.08); }
.strip-photo, .strip-video { margin: 0; position: relative; overflow: hidden; min-width: 0; background: var(--surface); }
.strip-photo img, .strip-video video { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.event-strip:hover img { transform: scale(1.025); }
.strip-photo figcaption { position: absolute; left: 6px; bottom: 5px; background: rgba(255,255,255,.88); padding: 2px 5px; font-size: 8px; color: #59615a; }
.strip-video { display: grid; place-items: center; }
.video-placeholder { grid-area: 1/1; color: #879185; font-size: 12px; letter-spacing: .12em; }
.strip-video svg { grid-area: 1/1; z-index: 2; color: var(--sage); width: 36px; height: 36px; }
.strip-more { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); background: rgba(36,44,38,.72); color: white; padding: 9px 12px; border-radius: 999px; font-weight: 700; }
.strip-empty { grid-column: 1/-1; display: grid; place-items: center; color: var(--muted); background: var(--surface); }

.memory-cta { width: var(--page); margin: 0 auto 100px; padding: 52px 62px; background: var(--sage-pale); display: flex; align-items: center; justify-content: space-between; gap: 40px; border-radius: 10px; }
.memory-cta h2 { margin: 0 0 8px; font-size: 28px; }
.memory-cta p { margin: 0; color: #687266; }

.guestbook-cta { width: var(--page); margin: 0 auto 42px; padding: 30px 2px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 36px; }
.guestbook-cta h2 { margin: 0 0 4px; font-size: 25px; }
.guestbook-cta p { margin: 0; color: var(--muted); }

.guestbook-page { width: var(--page); margin: 0 auto; padding: 68px 4% 110px; }
.guestbook-intro { max-width: 760px; margin-bottom: 34px; }
.guestbook-intro h1 { margin: 0 0 9px; font-size: 48px; line-height: 1.2; }
.guestbook-intro p { margin: 0; color: var(--muted); font-size: 17px; }
.guestbook-layout { display: grid; grid-template-columns: minmax(320px, .72fr) minmax(0, 1.28fr); gap: 54px; align-items: start; }
.guestbook-form { position: sticky; top: 24px; box-shadow: none; background: var(--surface); }
.website-field { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.message-kind { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.message-kind legend { margin-bottom: 7px; color: #4c514d; font-size: 13px; font-weight: 650; }
.message-kind label { display: block; }
.panel-form .message-kind input { position: absolute; width: 1px; height: 1px; min-height: 0; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.message-kind span { min-height: 43px; border: 1px solid #cfd8cc; border-radius: 6px; background: white; display: grid; place-items: center; color: var(--muted); font-size: 13px; font-weight: 650; cursor: pointer; }
.message-kind input:checked + span { border-color: var(--sage); background: var(--sage-pale); color: var(--sage-dark); box-shadow: 0 0 0 2px rgba(113,141,93,.09); }
.message-kind input:focus-visible + span { outline: 3px solid rgba(113,141,93,.2); }
.guestbook-submit { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.guestbook-submit p { margin: 0; color: var(--muted); font-size: 12px; }
.guestbook-feed-heading { min-height: 52px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.guestbook-feed-heading h2 { margin: 0; font-size: 25px; }
.guestbook-feed-heading > span { width: 27px; height: 27px; border-radius: 50%; background: var(--sage-pale); color: var(--sage-dark); display: grid; place-items: center; font-size: 12px; }
.guestbook-list { display: grid; }
.guestbook-entry { padding: 24px 2px; border-bottom: 1px solid var(--line); }
.guestbook-entry header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 9px; }
.guestbook-entry header > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.guestbook-entry strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guestbook-entry time { flex: none; color: var(--muted); font-size: 11px; }
.guestbook-kind { padding: 2px 6px; border-radius: 5px; background: var(--blue-pale); color: #47749e; font-size: 10px; }
.guestbook-kind.suggestion { background: #fff0ec; color: #a85b4d; }
.guestbook-entry p { margin: 0; color: #515653; white-space: pre-wrap; overflow-wrap: anywhere; }

.site-footer { min-height: 140px; width: var(--page); margin: 0 auto; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; }
.site-footer > div { display: grid; gap: 4px; }
.site-footer strong { color: var(--sage); font-family: Georgia, serif; font-size: 25px; letter-spacing: .08em; }
.site-footer nav { display: flex; gap: 28px; }
.site-footer a:hover { color: var(--sage-dark); }

.event-hero { width: var(--page); margin: 0 auto; padding: 58px 4% 52px; background: var(--surface); border-bottom: 1px solid var(--line); position: relative; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 36px; }
.event-hero .back-link { position: absolute; top: 22px; left: 4%; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.event-hero time { color: var(--blue); font-weight: 700; letter-spacing: .05em; }
.event-hero h1 { margin: 4px 0 4px; font-size: clamp(42px, 5vw, 68px); line-height: 1.2; }
.event-hero p { margin: 0; color: var(--muted); font-size: 17px; }
.event-actions { display: flex; gap: 12px; }
.back-link svg { width: 17px; }

.gallery-section { width: var(--page); margin: 0 auto; padding: 48px 0 100px; }
.gallery-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.gallery-heading h2 { margin: 0; font-size: 28px; }
.gallery-heading p { margin: 0; color: var(--muted); }
.gallery-grid { columns: 4 260px; column-gap: 10px; }
.gallery-item { width: 100%; display: inline-block; margin: 0 0 10px; background: #eef2ec; position: relative; overflow: hidden; break-inside: avoid; text-align: left; }
.gallery-open { width: 100%; display: block; border: 0; padding: 0; background: transparent; cursor: zoom-in; text-align: left; }
.gallery-open img { width: 100%; height: auto; transition: transform .45s ease; }
.gallery-item:hover .gallery-open img { transform: scale(1.025); }
.gallery-item-meta { position: absolute; inset: auto 0 0; min-height: 56px; padding: 9px 10px; color: white; background: linear-gradient(to top, rgba(19,27,20,.82), rgba(19,27,20,.08)); display: flex; align-items: end; justify-content: space-between; gap: 10px; opacity: 0; pointer-events: none; transition: opacity .2s; font-size: 11px; }
.gallery-item:hover .gallery-item-meta, .gallery-item:focus-within .gallery-item-meta { opacity: 1; }
.gallery-item-meta em { font-style: normal; font-size: 9px; background: rgba(255,255,255,.9); color: #556052; padding: 3px 5px; }
.gallery-item-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; pointer-events: auto; }
.gallery-action { min-width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.28); border-radius: 6px; padding: 0 9px; background: rgba(15,22,16,.5); color: white; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 11px; font-weight: 700; cursor: pointer; backdrop-filter: blur(8px); }
.gallery-action:hover { background: rgba(255,255,255,.94); color: var(--sage-dark); }
.gallery-action svg { width: 16px; height: 16px; }
.like-button.liked { color: #d95d65; background: rgba(255,255,255,.96); }
.like-button.liked svg { fill: currentColor; }
.like-button:disabled { cursor: default; }
.like-button[aria-busy="true"] { opacity: .65; }
.gallery-video { cursor: default; }
.gallery-video video { width: 100%; }
.gallery-video-meta { opacity: 1; }

.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; padding: 0; margin: 0; border: 0; background: rgba(17,20,18,.96); color: white; overflow: hidden; }
.lightbox::backdrop { background: rgba(17,20,18,.96); }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; }
.lightbox-stage { min-height: 0; display: grid; place-items: center; padding: 44px 90px 12px; }
.lightbox-stage img, .lightbox-stage video { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; }
.lightbox-stage video { display: none; }
.lightbox.loading .lightbox-stage::after { content: ""; position: fixed; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px; border: 2px solid rgba(255,255,255,.25); border-top-color: white; border-radius: 50%; animation: media-spin .8s linear infinite; }
@keyframes media-spin { to { transform: rotate(360deg); } }
.lightbox-close, .lightbox-nav { position: fixed; border: 1px solid rgba(255,255,255,.25); color: white; background: rgba(0,0,0,.3); display: grid; place-items: center; cursor: pointer; }
.lightbox-close { top: 22px; right: 24px; width: 42px; height: 42px; border-radius: 50%; }
.lightbox-nav { top: 50%; width: 48px; height: 68px; transform: translateY(-50%); }
.lightbox-nav.previous { left: 20px; }
.lightbox-nav.next { right: 20px; }
.lightbox-caption { min-height: 78px; padding: 12px 7vw 22px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.lightbox-caption-copy { display: grid; }
.lightbox-caption span { color: rgba(255,255,255,.6); font-size: 11px; }
.lightbox-actions { display: flex; align-items: center; gap: 8px; }
.lightbox-action { min-height: 42px; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; padding: 0 13px; color: white; background: rgba(255,255,255,.06); display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 13px; cursor: pointer; }
.lightbox-action:hover { background: white; color: #182019; }
.lightbox-action svg { width: 17px; height: 17px; }
.lightbox-like.liked { color: #ff9297; background: rgba(255,255,255,.12); }
.lightbox-like.liked svg { fill: currentColor; }

.slideshow-page { background: #0c100d; color: white; overflow: hidden; }
.slideshow-page .site-header { display: none; }
.slideshow-page main { height: 100vh; height: 100dvh; }
body.slideshow-open { overflow: hidden; }
.slideshow[hidden] { display: none !important; }
.slideshow { height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto 1fr auto 3px; background: #0c100d; color: white; position: relative; overflow: hidden; isolation: isolate; }
.slideshow-overlay { position: fixed; inset: 0; z-index: 200; }
.slideshow-topbar { min-height: 66px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.1); background: rgba(9,12,10,.74); backdrop-filter: blur(16px); position: relative; z-index: 8; }
.slideshow-topbar a, .slideshow-exit { display: inline-flex; align-items: center; gap: 7px; color: rgba(255,255,255,.76); font-size: 13px; border: 0; background: none; padding: 8px 0; cursor: pointer; }
.slideshow-status { display: flex; gap: 18px; align-items: baseline; }
.slideshow-topbar span { color: rgba(255,255,255,.48); font-size: 12px; }
.slideshow-topbar .music-now { color: rgba(216,228,208,.72); }
.slideshow-stage { min-height: 0; position: relative; overflow: hidden; background: #080b09; }
.slide { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; opacity: 0; transition: opacity 1.05s cubic-bezier(.22,.61,.36,1); pointer-events: none; overflow: hidden; }
.slide.active { opacity: 1; pointer-events: auto; z-index: 2; }
.slide-backdrop { position: absolute; inset: -9%; z-index: 0; background-position: center; background-size: cover; filter: blur(34px) brightness(.36) saturate(.82); opacity: .78; transform: scale(1.13); }
.slide::after { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(circle at center, transparent 45%, rgba(4,7,5,.32) 100%); pointer-events: none; }
.slide img, .slide video { position: relative; z-index: 2; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.slide img { transform: scale(1.02); }
.slide.active img { will-change: transform; }
.slide.active.motion-0 img { animation: memory-drift-one 7.5s cubic-bezier(.2,.55,.25,1) both; }
.slide.active.motion-1 img { animation: memory-drift-two 7.5s cubic-bezier(.2,.55,.25,1) both; }
.slide.active.motion-2 img { animation: memory-drift-three 7.5s cubic-bezier(.2,.55,.25,1) both; }
.slide.active.motion-3 img { animation: memory-drift-four 7.5s cubic-bezier(.2,.55,.25,1) both; }
@keyframes memory-drift-one { from { transform: scale(1.02) translate3d(-.8%, .3%, 0); } to { transform: scale(1.085) translate3d(.8%, -.4%, 0); } }
@keyframes memory-drift-two { from { transform: scale(1.075) translate3d(.8%, .4%, 0); } to { transform: scale(1.025) translate3d(-.7%, -.3%, 0); } }
@keyframes memory-drift-three { from { transform: scale(1.025) translate3d(.2%, .8%, 0); } to { transform: scale(1.08) translate3d(-.4%, -.7%, 0); } }
@keyframes memory-drift-four { from { transform: scale(1.08) translate3d(-.6%, -.4%, 0); } to { transform: scale(1.025) translate3d(.6%, .4%, 0); } }
.slide figcaption { position: absolute; z-index: 4; left: 32px; bottom: 18px; padding: 10px 13px; background: rgba(9,13,10,.64); backdrop-filter: blur(12px); display: grid; opacity: 0; transform: translateY(8px); }
.slide.active figcaption { animation: memory-caption .8s .28s ease both; }
@keyframes memory-caption { to { opacity: 1; transform: translateY(0); } }
.slide figcaption span { color: rgba(255,255,255,.64); font-size: 10px; }
.slide-loading { display: none; position: absolute; z-index: 5; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px; border: 2px solid rgba(255,255,255,.2); border-top-color: rgba(255,255,255,.9); border-radius: 50%; animation: media-spin .8s linear infinite; }
.slide.loading .slide-loading { display: block; }
.slide.load-error::before { content: "这张影像暂时无法加载"; position: absolute; z-index: 5; color: rgba(255,255,255,.68); font-size: 13px; }
.slideshow-controls { min-height: 76px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 6px 18px; background: linear-gradient(to bottom, rgba(12,16,13,.82), #0c100d); position: relative; z-index: 7; }
.slideshow-controls button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: transparent; color: white; display: grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.slideshow-controls button:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.36); transform: translateY(-1px); }
.slideshow-controls .play-toggle { width: 52px; height: 52px; background: white; color: #182019; }
.slideshow-controls .music-switch { width: auto; min-width: 124px; padding: 0 15px; border-radius: 999px; display: inline-flex; gap: 8px; font-size: 12px; }
.music-switch svg { width: 17px; height: 17px; }
.play-icon { display: none; }
.paused .pause-icon { display: none; }
.paused .play-icon { display: block; }
.volume-on-icon { display: none; }
.music-enabled .volume-on-icon { display: block; }
.music-enabled .volume-off-icon { display: none; }
.music-blocked [data-music-toggle] { border-color: var(--coral); color: #ffd6cd; box-shadow: 0 0 0 4px rgba(228,127,104,.12); }
.slideshow-progress { background: rgba(255,255,255,.1); }
.slideshow-progress span { display: block; height: 3px; width: 0; background: var(--sage); }
.slideshow-progress span.running { animation: slide-progress 7.5s linear; }
@keyframes slide-progress { from { width: 0; } to { width: 100%; } }
.slideshow-empty { height: 100%; display: grid; place-items: center; color: rgba(255,255,255,.6); }

.form-page { width: min(900px, calc(100vw - 48px)); margin: 0 auto; padding: 68px 0 100px; }
.form-page.narrow { width: min(540px, calc(100vw - 48px)); }
.form-intro { margin-bottom: 30px; position: relative; }
.form-intro h1 { margin: 0 0 9px; font-size: 42px; line-height: 1.25; }
.form-intro p { color: var(--muted); margin: 0; max-width: 690px; }
.leaf-mark { width: 32px; height: 44px; display: block; background: var(--sage-pale); border-radius: 80% 20% 70% 30%; transform: rotate(28deg); margin-bottom: 12px; }
.panel-form { display: grid; gap: 20px; padding: 30px; border: 1px solid var(--line); background: white; box-shadow: 0 14px 44px rgba(58,74,55,.07); border-radius: 9px; }
.panel-form label { display: grid; gap: 7px; font-size: 13px; font-weight: 650; color: #4c514d; }
.panel-form input, .panel-form select, .panel-form textarea { width: 100%; min-height: 46px; border: 1px solid #cfd8cc; border-radius: 6px; padding: 10px 13px; color: var(--ink); background: white; outline: none; }
.panel-form textarea { resize: vertical; }
.panel-form input:focus, .panel-form select:focus, .panel-form textarea:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(113,141,93,.13); }
.event-create { margin-bottom: 22px; border: 1px solid #cfdcc9; border-radius: 9px; background: var(--surface); overflow: hidden; }
.event-create summary { min-height: 92px; padding: 19px 22px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 15px; align-items: center; cursor: pointer; list-style: none; }
.event-create summary::-webkit-details-marker { display: none; }
.event-create summary:focus-visible { outline: 3px solid rgba(113,141,93,.2); outline-offset: -3px; }
.event-create-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--sage-dark); background: var(--sage-pale); }
.event-create-icon svg { width: 21px; height: 21px; transition: transform .2s ease; }
.event-create[open] .event-create-icon svg { transform: rotate(45deg); }
.event-create-copy { display: grid; min-width: 0; }
.event-create-copy strong { font-size: 16px; }
.event-create-copy small { color: var(--muted); font-size: 12px; font-weight: 400; }
.event-create-action { color: var(--sage-dark); font-size: 13px; font-weight: 700; }
.event-create-open { display: none; }
.event-create[open] .event-create-closed { display: none; }
.event-create[open] .event-create-open { display: inline; }
.event-create-form { padding-top: 24px; border: 0; border-top: 1px solid #dce6d8; border-radius: 0; box-shadow: none; background: white; }
.event-create-fields { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(190px, .65fr); gap: 18px; }
.event-create-footer { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.event-create-footer p { margin: 0; color: var(--muted); font-size: 12px; }
.drop-zone { min-height: 220px; border: 1px dashed #9eb391 !important; border-radius: 8px; background: var(--surface); display: flex !important; align-items: center; justify-content: center; flex-direction: column; text-align: center; cursor: pointer; padding: 26px; transition: background .2s, border .2s; }
.drop-zone.dragging { background: var(--sage-pale); border-style: solid !important; }
.drop-zone input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop-zone svg { width: 34px; height: 34px; color: var(--sage); margin-bottom: 9px; }
.drop-zone strong { font-size: 17px; }
.drop-zone span { color: var(--muted); font-weight: 400; font-size: 12px; }
.file-selection-summary { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; }
.file-selection-summary[hidden] { display: none; }
.file-selection-summary > span { display: inline-flex; align-items: baseline; gap: 8px; }
.file-selection-summary strong { color: var(--ink); font-size: 13px; }
.file-selection-summary small { font-size: 11px; }
.file-selection-summary button { border: 0; background: none; padding: 5px 0; color: var(--sage-dark); font-size: 12px; font-weight: 700; cursor: pointer; }
.file-selection-message { min-height: 0; margin: -14px 0 0; color: var(--coral); font-size: 12px; }
.file-selection-message:empty { display: none; }
.file-preview { display: grid; grid-template-columns: repeat(auto-fill, 68px); gap: 8px; }
.file-thumb { width: 68px; height: 68px; margin: 0; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--blue-pale); }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: #52779a; font-size: 10px; font-weight: 750; letter-spacing: .04em; }
.file-thumb-fallback[hidden] { display: none; }
.file-thumb figcaption { position: absolute; inset: auto 0 0; padding: 13px 5px 4px; color: white; background: linear-gradient(transparent, rgba(24,30,26,.78)); font-size: 8px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-thumb-remove { position: absolute; top: 3px; right: 3px; z-index: 2; width: 19px; height: 19px; padding: 0; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.62); border-radius: 50%; background: rgba(25,31,27,.7); color: white; font-size: 14px; line-height: 1; cursor: pointer; }

.admin-shell { width: var(--page); margin: 0 auto; padding: 50px 0 100px; }
.admin-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 35px; }
.admin-heading h1 { margin: 0; font-size: 42px; }
.admin-heading p { margin: 2px 0 0; color: var(--muted); }
.text-button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 8px; }
.admin-section { margin-top: 44px; }
.admin-section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.admin-section-title h2 { margin: 0; font-size: 24px; }
.admin-section-title span { min-width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-pale); color: var(--sage-dark); font-size: 12px; }
.pending-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pending-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: white; }
.pending-preview { height: 220px; background: var(--surface); }
.pending-preview img, .pending-preview video { width: 100%; height: 100%; object-fit: cover; }
.pending-info { padding: 14px 16px; display: grid; gap: 3px; }
.pending-info span { color: var(--muted); font-size: 11px; }
.pending-info p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.pending-actions { padding: 0 16px 16px; display: flex; gap: 8px; }
.published-admin-grid { display: grid; border-top: 1px solid var(--line); }
.published-admin-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 15px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.published-admin-preview { width: 76px; height: 56px; overflow: hidden; background: var(--surface); }
.published-admin-preview img, .published-admin-preview video { width: 100%; height: 100%; object-fit: cover; }
.published-admin-row > div:nth-child(2) { min-width: 0; display: grid; }
.published-admin-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.published-admin-row span, .admin-note { color: var(--muted); font-size: 11px; }
.split-admin { display: grid; grid-template-columns: 1.2fr .8fr; gap: 50px; align-items: start; }
.admin-event-list { display: grid; border-top: 1px solid var(--line); }
.admin-event-list a { display: grid; grid-template-columns: 100px 1fr auto; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.admin-event-list time, .admin-event-list span { color: var(--muted); font-size: 12px; }
.create-event { box-shadow: none; background: var(--surface); }
.create-event h2 { margin: 0; }

.about-page { width: var(--page); margin: 0 auto; padding: 90px 7% 120px; }
.about-lead { max-width: 900px; margin-bottom: 70px; }
.about-lead h1 { font-size: clamp(48px, 6vw, 82px); line-height: 1.2; margin: 0 0 22px; letter-spacing: -.04em; }
.about-lead p { font-size: 20px; color: var(--muted); max-width: 680px; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; border-top: 1px solid var(--line); padding-top: 35px; }
.about-grid h2 { font-size: 21px; }
.about-grid p { color: var(--muted); }
.music-credits { margin-top: 62px; padding-top: 30px; border-top: 1px solid var(--line); color: var(--muted); }
.music-credits h2 { color: var(--ink); font-size: 21px; }
.music-credits ul { margin: 8px 0 0; padding-left: 20px; }
.music-credits a { color: var(--sage-dark); text-decoration: underline; text-underline-offset: 3px; }
.empty-state { padding: 50px; text-align: center; background: var(--surface); border: 1px dashed #b8c8b1; color: var(--muted); }
.empty-state h3 { color: var(--ink); margin: 0 0 5px; }
.empty-state p { margin: 0; }
.empty-page { min-height: 60vh; display: grid; place-items: center; place-content: center; text-align: center; gap: 10px; }
.empty-page h1, .empty-page p { margin: 0; }

@media (max-width: 1500px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-nav { display: none; position: absolute; top: 70px; left: 0; right: 0; background: white; padding: 18px; box-shadow: var(--shadow); flex-direction: column; gap: 0; align-items: stretch; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px 8px; }
  .site-nav a::after { display: none; }
  .header-actions { margin-right: 52px; }
  .mobile-menu { display: grid; position: absolute; right: 0; width: 40px; height: 40px; border: 0; background: transparent; align-content: center; gap: 6px; cursor: pointer; }
  .mobile-menu span { display: block; width: 22px; height: 2px; background: var(--ink); }
}

@media (max-width: 1180px) {
  :root { --page: calc(100vw - 56px); }
  .home-hero { grid-template-columns: .8fr 1.2fr; gap: 40px; }
  .hero-copy { padding-left: 20px; }
  .hero-copy::before, .hero-copy::after { display: none; }
  .hero-main { width: 78%; }
  .hero-small { width: 34%; }
  .event-strip { grid-template-columns: 2fr repeat(3, 1fr); }
  .event-strip > :nth-child(5) { display: none; }
  .gallery-grid { columns: 3 240px; }
}

@media (max-width: 1080px) {
  .home-hero { min-height: auto; grid-template-columns: 1fr; padding-top: 55px; }
  .hero-copy { max-width: 650px; }
  .hero-collage { height: 500px; }
  .hero-main { width: 71%; }
  .hero-small { width: 31%; }
  .timeline-event { grid-template-columns: 180px 1fr; }
  .event-strip { grid-template-columns: 1.8fr repeat(2, 1fr); }
  .event-strip > :nth-child(4), .event-strip > :nth-child(5) { display: none; }
  .memory-cta { padding: 38px; }
  .pending-grid { grid-template-columns: repeat(2, 1fr); }
  .split-admin { grid-template-columns: 1fr; }
  .guestbook-layout { grid-template-columns: 1fr; gap: 42px; }
  .guestbook-form { position: static; }
  .about-grid { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 760px) {
  :root { --page: calc(100vw - 32px); }
  body { font-size: 15px; }
  .site-header { height: 68px; }
  .brand { font-size: 29px; }
  .header-actions { gap: 6px; margin-right: 45px; }
  .header-upload, .header-admin { min-height: 36px; padding: 0 11px; font-size: 12px; }
  .header-upload svg { display: none; }
  .header-admin { width: 36px; padding: 0; }
  .header-admin span { display: none; }
  .site-nav { top: 62px; }
  .home-hero { padding: 42px 0 28px; gap: 30px; }
  .hero-copy { padding-left: 4px; }
  .hero-copy h1 { font-size: 42px; }
  .hero-copy h1 span { white-space: normal; }
  .hero-copy p { font-size: 15px; margin: 16px 0 22px; }
  .hero-actions { gap: 10px; }
  .button { min-height: 46px; padding: 0 19px; font-size: 13px; }
  .hero-collage { height: 335px; }
  .hero-main { width: 83%; height: 265px; top: 10px; }
  .hero-small { width: 33%; height: 118px; }
  .hero-small-top { top: 4px; }
  .hero-small-bottom { top: 145px; }
  .hand-date { font-size: 16px; left: 46%; bottom: 5px; }
  .timeline-section { padding-bottom: 65px; }
  .section-heading { padding-left: 28px; display: block; }
  .section-heading h2 { font-size: 24px; }
  .section-heading p { font-size: 12px; margin-top: 2px; }
  .timeline-dot { left: 3px; top: 12px; }
  .timeline { padding-left: 28px; }
  .timeline::before { left: 7px; }
  .timeline-event { min-height: 0; display: block; padding: 12px 0 27px; }
  .timeline-marker { left: -28px; top: 64px; }
  .event-meta { padding: 6px 0 12px; }
  .event-meta h3 { font-size: 21px; }
  .event-strip { min-height: 110px; grid-template-columns: 2fr 1fr 1fr; }
  .strip-photo figcaption { display: none; }
  .memory-cta { margin-bottom: 65px; padding: 30px 24px; display: grid; }
  .memory-cta h2 { font-size: 22px; }
  .guestbook-cta { margin-bottom: 34px; padding: 26px 0; display: grid; gap: 18px; }
  .guestbook-cta h2 { font-size: 22px; }
  .site-footer { min-height: 170px; align-items: start; padding: 35px 0; display: grid; }
  .site-footer nav { flex-wrap: wrap; }
  .event-hero { grid-template-columns: 1fr; padding: 64px 20px 32px; }
  .event-hero .back-link { left: 20px; }
  .event-hero h1 { font-size: 42px; }
  .event-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .gallery-section { padding-top: 32px; }
  .gallery-grid { columns: 2 150px; }
  .gallery-item-meta { opacity: 1; padding-top: 22px; }
  .gallery-action { min-width: 42px; height: 42px; padding: 0 10px; }
  .lightbox-stage { padding: 58px 12px 8px; }
  .lightbox-nav { width: 42px; height: 55px; }
  .lightbox-nav.previous { left: 8px; }
  .lightbox-nav.next { right: 8px; }
  .lightbox-caption { padding: 10px 14px 18px; }
  .lightbox-actions { gap: 6px; }
  .lightbox-action { min-height: 42px; padding: 0 11px; }
  .form-page { width: calc(100vw - 32px); padding: 45px 0 70px; }
  .form-intro h1 { font-size: 34px; }
  .panel-form { padding: 20px; }
  .event-create summary { min-height: 82px; padding: 15px; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
  .event-create-icon { width: 40px; height: 40px; }
  .event-create-action { display: none !important; }
  .event-create-fields { grid-template-columns: 1fr; gap: 20px; }
  .event-create-footer { align-items: stretch; flex-direction: column; gap: 14px; }
  .event-create-footer .button { width: 100%; }
  .pending-grid { grid-template-columns: 1fr; }
  .published-admin-row { grid-template-columns: 62px minmax(0, 1fr); }
  .published-admin-row form { grid-column: 2; }
  .published-admin-preview { width: 62px; height: 50px; }
  .admin-heading h1 { font-size: 34px; }
  .admin-event-list a { grid-template-columns: 1fr auto; }
  .admin-event-list time { grid-column: 1/-1; }
  .about-page { padding: 58px 2px 80px; }
  .about-lead h1 { font-size: 45px; }
  .guestbook-page { padding: 48px 0 80px; }
  .guestbook-intro h1 { font-size: 38px; }
  .guestbook-intro p { font-size: 15px; }
  .guestbook-layout { gap: 34px; }
  .guestbook-submit { align-items: stretch; flex-direction: column; }
  .guestbook-submit .button { width: 100%; }
  .guestbook-entry { padding: 20px 0; }
  .guestbook-entry header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .slideshow-topbar { padding: 0 14px; }
  .slideshow-status { gap: 9px; }
  .slideshow-topbar .music-now { display: none; }
  .slideshow-controls { gap: 8px; padding-inline: 10px; }
  .slideshow-controls .music-switch { min-width: 42px; width: 42px; padding: 0; border-radius: 50%; }
  .music-switch span { display: none; }
  .slide figcaption { left: 12px; bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .slide.active img { animation: none !important; transform: none !important; }
}
