@charset "UTF-8";

:root {
  color-scheme: light;
  --ink: #312b29;
  --paper: #f7f5f1;
  --serif: "Wedding Serif", "Noto Serif SC", "Songti SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-family: var(--sans);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #dcd8d2; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
::selection { background: #b4927d; color: white; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 20; background: white; padding: 12px; }
.skip-link:focus { top: 12px; }
.page-shell { position: relative; max-width: 620px; margin: 0 auto; overflow: hidden; background: var(--paper); box-shadow: 0 18px 64px rgba(46,32,26,.18); }
.topbar { position: absolute; z-index: 5; top: 0; left: 0; width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 20px clamp(20px,5vw,34px); color: #292728; font-size: 11px; letter-spacing: .1em; }
.topbar-name { font-family: var(--serif); font-weight: 600; white-space: nowrap; }
.topbar-name span { padding: 0 3px; font-family: Georgia,serif; font-weight: 400; }
.topbar-date { font-variant-numeric: tabular-nums; white-space: nowrap; }

.opening { background: #faf9f7; }
.opening-inner { padding-top: 68px; }
.opening-rule { display: flex; justify-content: space-between; margin: 0 5% 12px; padding-top: 12px; border-top: 1px solid #a7a29d; font-family: var(--serif); font-size: 11px; letter-spacing: .14em; }
.opening-photo { margin: 0; width: 100%; background: #e7e8e7; }
.opening-photo img { display: block; width: 100%; height: auto; }
.opening-copy { min-height: 255px; display: flex; align-items: center; flex-direction: column; padding: 26px 20px 30px; text-align: center; }
.opening-kicker { margin: 0 0 13px; font-size: 11px; letter-spacing: .25em; color: #615b56; }
.opening h1 { display: flex; justify-content: center; align-items: baseline; gap: clamp(10px,5vw,28px); margin: 0; font-family: var(--serif); font-size: clamp(25px,7vw,42px); font-weight: 500; letter-spacing: .14em; white-space: nowrap; }
.name-join { font-family: Georgia,serif; font-size: .62em; font-weight: 400; letter-spacing: 0; color: #a58b7e; }
.opening-line { margin: 10px 0 24px; font-family: var(--serif); font-size: 14px; letter-spacing: .22em; }
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; color: #66615b; font-size: 11px; letter-spacing: .16em; }
.scroll-cue span { width: 33px; height: 1px; background: #9d918a; }

.chapter { position: relative; min-height: 100svh; padding: clamp(58px,11vw,86px) clamp(18px,5vw,42px) 78px; text-align: center; overflow: hidden; }
.chapter-intro { position: relative; z-index: 1; max-width: 520px; margin: 0 auto 36px; }
.chapter-mark { position: absolute; z-index: -1; top: -56px; left: 50%; transform: translateX(-50%); font-family: var(--serif); font-size: clamp(170px,45vw,300px); line-height: 1; font-weight: 600; opacity: .055; pointer-events: none; }
.chapter-role { margin: 0 0 15px; font-size: 11px; letter-spacing: .26em; }
.chapter h2 { margin: 0 0 24px; font-family: var(--serif); font-size: clamp(48px,14vw,72px); font-weight: 500; line-height: 1.12; letter-spacing: .18em; text-indent: .18em; }
.chapter-poem { margin: 0; font-family: var(--serif); font-size: clamp(15px,3.8vw,18px); line-height: 2.05; letter-spacing: .025em; }
.chapter-end { margin: 28px 0 0; font-family: var(--serif); font-size: 12px; letter-spacing: .08em; opacity: .84; }
.chapter-modern { color: #3c3936; background: #efeeea; }
.chapter-modern .chapter-role { color: #695b54; }
.chapter-red { color: #f9e9d5; background: #630d1e; }
.chapter-red .chapter-mark { opacity: .075; }
.chapter-red .chapter-role { color: #e8c6a3; }
.chapter-chinese { color: #352c2c; background: #e9ded8; }
.chapter-chinese .chapter-role { color: #7b5c5d; }
.chapter-garden { color: #374136; background: #ebe5d9; }
.chapter-garden .chapter-role { color: #52604e; }

.gallery-frame { position: relative; max-width: 496px; margin: 0 auto; }
.carousel-viewport { position: relative; width: 100%; aspect-ratio: 2 / 3; overflow: hidden; background: rgba(255,255,255,.18); }
.carousel-viewport::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.16); pointer-events: none; }
.gallery-status { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; color: inherit; font-family: var(--serif); font-size: 13px; letter-spacing: .08em; text-align: center; }
.gallery-status[hidden] { display: none; }
.slide { position: absolute; inset: 0; margin: 0; visibility: hidden; opacity: 0; transition: opacity .7s ease, visibility .7s; background: rgba(255,255,255,.1); }
.slide.is-active { visibility: visible; opacity: 1; }
.slide img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.slide.is-landscape { display: grid; place-items: center; }
.slide.is-landscape img { width: 100%; height: auto; max-height: 100%; object-fit: contain; }
.carousel-control { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 1px 0; }
.carousel-arrow { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid currentColor; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; opacity: .86; }
.carousel-arrow:hover { opacity: 1; background: rgba(128,128,128,.11); }
.carousel-arrow svg { width: 20px; height: 20px; }
.carousel-arrow-next svg { transform: rotate(180deg); }
.carousel-center { flex: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 9px; }
.carousel-count { font-family: Georgia,serif; font-size: 12px; letter-spacing: .13em; font-variant-numeric: tabular-nums; }
.carousel-progress { display: block; width: min(140px,35vw); height: 1px; background: currentColor; opacity: .34; overflow: hidden; }
.carousel-progress span { display: block; height: 100%; width: 0; background: currentColor; }
.gallery-frame.is-playing .carousel-progress span { animation: photo-progress 4.8s linear forwards; }
@keyframes photo-progress { to { width: 100%; } }
.carousel-dots { display: flex; justify-content: center; gap: 9px; margin-top: 18px; }
.carousel-dot { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: currentColor; opacity: .32; cursor: pointer; }
.carousel-dot[aria-current="true"] { opacity: 1; transform: scale(1.25); }
.gallery-error { margin: 0; padding: 100px 20px; font-size: 14px; }

.invitation { min-height: 100svh; padding: 75px clamp(25px,7vw,52px) 74px; color: #342d28; background: #f4eee3; }
.invitation-inner { max-width: 500px; margin: 0 auto; text-align: center; }
.invitation-ornament { display: flex; align-items: center; justify-content: center; gap: 13px; margin-bottom: 30px; }
.invitation-ornament span { width: 52px; height: 1px; background: #a98870; }
.invitation-ornament i { display: block; width: 7px; height: 7px; border: 1px solid #a98870; transform: rotate(45deg); }
.invitation-date { margin: 0 0 18px; font-family: Georgia,var(--serif); font-size: 12px; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.invitation-date span { margin-left: 10px; font-family: var(--serif); font-size: 11px; }
.invitation h2 { margin: 0; font-family: var(--serif); font-size: clamp(30px,7vw,43px); font-weight: 500; line-height: 1.65; letter-spacing: .08em; }
.invitation-names { margin: 17px 0 55px; font-family: var(--serif); font-size: 13px; letter-spacing: .18em; }
.invitation-names span { padding: 0 8px; font-family: Georgia,serif; }
.schedule { text-align: left; border-top: 1px solid #a89b8a; }
.schedule-item { display: grid; grid-template-columns: 76px 1fr; gap: 16px; align-items: start; padding: 21px 0; border-bottom: 1px solid #c8bcae; }
.schedule-item time { font-family: Georgia,serif; font-size: 25px; font-variant-numeric: tabular-nums; color: #835a4a; }
.schedule-item div { display: flex; flex-direction: column; gap: 8px; padding-top: 2px; }
.schedule-item strong { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: .12em; }
.schedule-item span { font-size: 13px; line-height: 1.6; color: #5d5248; }
.map-links { display: grid; gap: 11px; margin-top: 33px; }
.map-link { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 16px; padding: 14px 18px; color: #f9f4ed; background: #4d4941; text-align: left; text-decoration: none; transition: background .2s ease; }
.map-link:hover { background: #6a5a4e; }
.map-link-text { display: flex; flex-direction: column; gap: 6px; }
.map-link strong { font-family: var(--serif); font-size: 15px; font-weight: 500; letter-spacing: .08em; }
.map-link small { font-size: 12px; color: #e9ded0; }
.map-link svg { flex: none; width: 24px; height: 24px; }
.arrival-guide { margin-top: 20px; border-top: 1px solid #c8bcae; border-bottom: 1px solid #c8bcae; text-align: left; }
.arrival-guide summary { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 2px; cursor: pointer; list-style: none; }
.arrival-guide summary::-webkit-details-marker { display: none; }
.arrival-guide summary span { display: flex; flex-direction: column; gap: 6px; }
.arrival-guide summary strong { font-family: var(--serif); font-size: 15px; font-weight: 500; letter-spacing: .06em; }
.arrival-guide summary small { color: #65584e; font-size: 12px; }
.arrival-guide summary svg { width: 20px; height: 20px; flex: none; transition: transform .2s ease; }
.arrival-guide[open] summary svg { transform: rotate(180deg); }
.arrival-guide-body { padding: 0 0 20px; }
.arrival-guide figure { margin: 8px 0 22px; }
.arrival-guide img { display: block; width: 100%; height: auto; }
.arrival-guide figcaption { padding-top: 9px; color: #64564b; font-family: var(--serif); font-size: 12px; letter-spacing: .06em; }
.arrival-guide-body p { margin: 3px 0 0; color: #64564b; font-size: 12px; line-height: 1.7; }
.music-toggle { position: fixed; z-index: 15; right: max(16px, calc((100vw - 620px) / 2 + 16px)); bottom: calc(18px + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 7px; min-height: 46px; padding: 10px 15px; border: 1px solid #bcae9f; border-radius: 24px; color: #493c35; background: #f9f5ee; box-shadow: 0 5px 18px rgba(54, 37, 30, .18); cursor: pointer; font-family: var(--serif); font-size: 12px; letter-spacing: .04em; }
.music-toggle svg { width: 18px; height: 18px; flex: none; }
.music-toggle.is-playing { color: #fff7ec; background: #64483b; border-color: #64483b; }
.music-toggle:active { transform: translateY(1px); }
.invitation-signoff { margin: 35px 0 0; font-family: var(--serif); font-size: 13px; letter-spacing: .25em; }
.footer { padding: 22px; color: #60564d; background: #f4eee3; border-top: 1px solid #e4d7c7; text-align: center; font-family: var(--serif); font-size: 11px; letter-spacing: .08em; }

@media (max-width: 360px) {
  .topbar { padding-inline: 16px; }
  .opening h1 { gap: 8px; font-size: 24px; }
  .chapter-poem { font-size: 14px; }
  .schedule-item { grid-template-columns: 67px 1fr; gap: 11px; }
  .schedule-item time { font-size: 22px; }
}

@media (min-width: 700px) {
  .opening-inner { padding-top: 77px; }
  .opening-photo { width: 100%; }
  .opening-copy { min-height: 278px; }
  .chapter { padding-top: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide { transition: none; }
  .carousel-progress span { animation: none !important; }
  .map-link { transition: none; }
}
