/* Western editorial stationery with a restrained Chinese double-happiness seal. */
:root {
  --red: #38483f;
  --deep: #e9ede7;
  --paper: #faf9f8;
  --pink: #eee8e8;
  --ink: #39423c;
  --muted: #68736b;
  --gold: #7a7d65;
  --line: #cdd4cc;
  --seal: #853e4d;
  --serif: "Songti TC", "Noto Serif TC", "PMingLiU", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.85 var(--serif); letter-spacing: 0; -webkit-font-smoothing: antialiased; }
body:has(dialog[open]) { overflow: hidden; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p, figure { margin: 0; }
img { display: block; width: 100%; -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
a { color: inherit; text-underline-offset: 5px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
button:disabled, [aria-disabled="true"] { opacity: .45; cursor: default; }
.inner { width: min(100% - 48px, 980px); margin: auto; }
.section { padding: 72px 0; }
.eyebrow { color: var(--gold); font: 10px/1.8 var(--sans); margin-bottom: 16px; }
h2 { color: var(--red); font-size: 29px; line-height: 1.65; font-weight: 400; overflow-wrap: anywhere; }
.section-lead { color: var(--muted); margin-top: 14px; font-size: 14px; }

/* The engraving remains a complete full-bleed design when no cover photo exists. */
.hero { position: relative; isolation: isolate; display: grid; grid-template-rows: auto 1fr auto; min-height: 92svh; background: #f6f2f3 url("assets/white-rose-paper.jpg") center/cover no-repeat; padding: 22px 24px 20px; text-align: center; color: var(--red); }
.cover { position: absolute; inset: 0; height: 100%; object-fit: cover; z-index: -2; }
.hero.has-photo { background-image: none; color: white; }
.hero.has-photo::before { content: ""; position: absolute; inset: 0; background: #210a194d; z-index: -1; }
.masthead, .hero-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: min(100%, 1180px); margin: auto; font: 9px/1.8 var(--sans); }
.masthead { padding-bottom: 15px; border-bottom: 1px solid #74807428; }
.masthead > :nth-child(2) { display: none; }
.hero-content { width: min(100%, 720px); margin: auto; padding: 24px 0 6px; }
.seal { width: 36px; height: 36px; display: grid; place-items: center; margin: 0 auto 25px; border: 1px solid currentColor; outline: 1px solid currentColor; outline-offset: 3px; border-radius: 2px; font-size: 24px; line-height: 1; color: var(--seal); }
.hero .eyebrow { color: inherit; margin: 25px 0 22px; font-size: 9px; }
h1 { font-weight: 400; overflow-wrap: anywhere; }
.amp { font: italic 16px/1 Georgia, serif; padding: 0 13px; }
.english { font: italic 43px/1.35 Georgia, "Times New Roman", serif; margin-top: 12px; }
.chinese-names { margin-top: 17px; font-size: 19px; }
.display-title { font: 34px/1.25 Georgia, "Times New Roman", serif; }
.display-title em { font-weight: 400; }
.chinese-subtitle { font-size: 14px; margin-top: 17px; color: var(--muted); }
.date-mark { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 25px auto 8px; }
.date-mark span { font: 10px/1.5 var(--sans); border-block: 1px solid #74807455; padding: 8px 0; min-width: 70px; }
.date-mark b { font: 44px/1 Georgia, serif; }
#heroDate { font-size: 13px; }
#heroTime { font: 12px/1.8 var(--sans); margin-top: 5px; min-height: 22px; }
.countdown { font-size: 12px; margin-top: 14px; }
.scroll { display: grid; place-items: center; text-decoration: none; width: 44px; height: 44px; margin: 5px auto 0; font-size: 24px; }
.hero-foot { font-size: 8px; border-top: 1px solid #74807428; padding-top: 13px; }
.hero.has-photo .seal, .hero.has-photo .eyebrow { color: white; }
.hero.has-photo .date-mark span { border-color: #fff9; }
.hero.has-photo .masthead, .hero.has-photo .hero-foot { border-color: #fff6; }

/* Secondary arched portrait with fixed proportions and room for its seal. */
.story { background: #fffbfb; padding-top: 40px; }
.story-layout { display: grid; gap: 45px; align-items: center; }
.portrait-wrap { position: relative; width: min(100% - 26px, 330px); margin: auto; }
.portrait-caption { text-align: center; font: 9px/1.5 var(--sans); color: var(--gold); margin-bottom: 18px; }
.portrait-frame { position: relative; aspect-ratio: 3/4; border-radius: 50% 50% 0 0; overflow: hidden; background: var(--pink); outline: 1px solid var(--line); outline-offset: 8px; }
.portrait-frame img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.portrait-art { height: 100%; display: grid; place-items: center; background: url("assets/white-rose-paper.jpg") center/cover; }
.portrait-art span { font: italic 46px/1.25 Georgia, serif; color: var(--red); }
.portrait-seal { position: absolute; right: -15px; bottom: 23px; display: grid; place-items: center; width: 43px; height: 43px; color: #fff5f5; background: var(--seal); border-radius: 50%; border: 3px double #ce969b; font-size: 24px; transform: rotate(-9deg); }
.story-copy { text-align: center; }
.story-copy h2 { font-size: 34px; }
.story-copy h2 span { padding-left: 1em; }
.short-rule { width: 42px; height: 1px; background: var(--gold); margin: 24px auto; }
#message { color: var(--muted); max-width: 360px; margin: auto; font-size: 15px; }
.story-signature { color: var(--red); font: italic 26px/1.5 Georgia, serif; margin-top: 24px; }

.details { color: var(--ink); background: var(--deep); text-align: center; }
.details .eyebrow { color: var(--gold); }
.details h2 { color: var(--red); }
.details .section-lead { color: var(--muted); }
.timeline { margin: 36px 0 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 26px 0 26px 65px; text-align: left; border-bottom: 1px solid var(--line); }
.event-no { position: absolute; left: 0; top: 22px; font: italic 30px/1.3 Georgia, serif; color: #818d7c; }
.event-en { color: var(--gold); font: 9px/1.5 var(--sans); }
.timeline h3 { font-size: 23px; font-weight: 400; margin-top: 5px; }
.event-time { font: 25px/1.5 Georgia, var(--serif); margin-top: 5px; }
.event-note { color: var(--muted); font-size: 12px; margin-top: 5px; }
.details-venue { color: var(--muted); margin-top: 30px; font-size: 13px; }

/* Direct four-step route, without transport-mode tabs. */
.location { background: #f6f2f3; }
.location-heading { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.location-heading h2 { font-size: 36px; }
.small-seal { flex-shrink: 0; border: 1px solid var(--red); padding: 6px; color: var(--red); font-size: 17px; writing-mode: vertical-rl; line-height: 1.3; }
.venue-info { border-bottom: 1px solid var(--line); padding: 24px 0 30px; }
.venue-name { color: var(--red); font-size: 20px; overflow-wrap: anywhere; }
#address { font: 13px/1.8 var(--sans); color: var(--muted); margin-top: 10px; user-select: text; }
.walking-guide { padding-top: 28px; }
.walking-heading h3 { font-size: 20px; font-weight: 400; color: var(--red); }
.walking-heading > span { display: block; font: 9px/1.6 var(--sans); color: var(--muted); margin-top: 6px; }
.route { list-style: none; padding: 0; margin: 30px 0; }
.route li { position: relative; display: grid; grid-template-columns: 33px 1fr; gap: 18px; padding-bottom: 27px; }
.route li:not(:last-child)::before { content: ""; position: absolute; left: 16px; top: 34px; bottom: 0; width: 1px; background: var(--line); }
.step-number { width: 33px; height: 33px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font: 12px/1 Georgia, serif; color: var(--red); }
.waypoint { display: block; font: 10px/1.5 var(--sans); color: var(--gold); padding: 1px 0 5px; }
.route h4 { font-size: 18px; font-weight: 400; color: var(--red); }
.route p { font: 13px/1.85 var(--sans); margin-top: 7px; color: var(--muted); }
.route-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 15px; font: 11px/1.8 var(--sans); color: var(--muted); }
.actions { display: grid; gap: 12px; margin-top: 25px; }
.button { display: flex; gap: 12px; align-items: center; justify-content: center; min-height: 50px; padding: 12px; font: 13px/1.7 var(--sans); text-decoration: none; border: 1px solid var(--red); border-radius: 2px; background: var(--red); color: white; }
.button.secondary { color: var(--red); background: transparent; }
.status { min-height: 28px; font: 12px/1.8 var(--sans); color: var(--red); margin-top: 9px; }

.moments { text-align: center; background: #fffbfb; }
.empty-moments { margin: 30px auto 0; border-block: 1px solid var(--line); padding: 25px; color: var(--muted); font-size: 13px; }
.empty-moments span { display: block; color: var(--red); font: italic 28px/1.6 Georgia, serif; margin-bottom: 8px; }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 83%; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 0 18px; margin-top: 32px; overscroll-behavior-x: contain; }
.gallery figure { scroll-snap-align: center; min-width: 0; }
.photo-button { display: block; padding: 0; width: 100%; aspect-ratio: 3/4; border: 0; background: var(--pink); overflow: hidden; }
.gallery figure:first-child .photo-button { border-radius: 50% 50% 0 0; }
.photo-button img { height: 100%; object-fit: cover; }
.gallery figcaption { display: flex; justify-content: space-between; margin-top: 12px; font: 10px/1.6 var(--sans); color: var(--muted); }
.photo-pending { display: grid; place-items: center; }
.photo-pending::after { content: "相片暫未載入"; color: var(--muted); font-size: 14px; }

footer { text-align: center; padding: 70px 24px 100px; background: #f6f2f3 url("assets/white-rose-paper.jpg") center 64%/cover; }
footer .seal { width: 30px; height: 30px; font-size: 21px; }
footer > p { font-size: 23px; color: var(--red); margin-top: 24px; }
.footer-names { display: block; color: var(--red); font: italic 26px/1.5 Georgia, serif; margin: 12px 0; }
footer small { font: 9px/1.8 var(--sans); color: var(--muted); }
footer > a { display: grid; place-items: center; margin: 20px auto 0; width: 44px; height: 44px; text-decoration: none; color: var(--red); }
.quick-nav { position: fixed; z-index: 8; inset: auto 0 0; display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom); background: #fffbfbfa; border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .2s ease; }
.quick-nav.visible { transform: translateY(0); }
.quick-nav a { flex: 1; max-width: 200px; text-align: center; padding: 14px 5px; color: var(--red); font: 12px/1.8 var(--sans); text-decoration: none; }
.connection { position: fixed; z-index: 12; bottom: 62px; left: 16px; right: 16px; padding: 12px; margin: auto; max-width: 560px; color: var(--red); background: white; border: 1px solid var(--line); font: 12px/1.6 var(--sans); }
dialog { border: 0; padding: 64px 18px 12px; width: min(100% - 24px, 1000px); max-height: 94svh; background: #23171def; color: white; }
dialog::backdrop { background: #140d13de; }
#fullPhoto { width: 100%; height: 66svh; object-fit: contain; }
.lightbox-close { position: absolute; right: 10px; top: 8px; }
dialog button { border: 0; background: transparent; color: white; font-size: 29px; width: 48px; height: 48px; }
.lightbox-controls { display: flex; align-items: center; justify-content: center; gap: 28px; }
#photoCounter { font: 12px/1.8 var(--sans); min-width: 50px; text-align: center; }

@media (max-width: 359px) {
  .english { font-size: 36px; }
  .hero { padding-inline: 18px; }
  .location-heading h2 { font-size: 32px; }
}
@media (min-width: 700px) {
  .section { padding: 100px 0; }
  .story { padding-top: 44px; }
  .hero { min-height: 90svh; padding: 25px 48px; background-size: 100% auto; }
  .masthead > :nth-child(2) { display: block; }
  .masthead, .hero-foot { font-size: 10px; }
  .english { font-size: 70px; }
  .hero-content { padding: 35px 0 15px; }
  .hero .seal { width: 39px; height: 39px; font-size: 27px; }
  .story-layout { grid-template-columns: 1fr 1fr; gap: 75px; max-width: 850px; }
  .story-copy { text-align: left; }
  .story-copy h2 { font-size: 43px; }
  .short-rule { margin-inline: 0; }
  #message { margin-left: 0; }
  h2, .display-title { font-size: 42px; }
  .timeline { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 50px; }
  .timeline li { text-align: center; border-bottom: 0; padding: 0 25px; }
  .timeline li + li { border-left: 1px solid var(--line); }
  .event-no { position: static; display: block; font-size: 38px; margin-bottom: 20px; }
  .event-time { font-size: 31px; }
  .details-venue { margin-top: 48px; }
  .location .inner { max-width: 850px; }
  .location-heading h2 { font-size: 42px; }
  .venue-name { font-size: 24px; }
  .route { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 50px; }
  .route li:not(:last-child)::before { display: none; }
  .actions { grid-template-columns: 2fr 1fr; }
  .gallery { grid-auto-columns: 37%; }
  .gallery figure:nth-child(even) { padding-top: 38px; }
  footer { background-size: 100% auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .quick-nav { transition: none; }
}
