/* Panel cards — palette c1–c4 (249,248,246 → 239,233,227 → 217,207,199 → 201,181,156) */

:root {
  --c1: 249, 248, 246;
  --c2: 239, 233, 227;
  --c3: 217, 207, 199;
  --c4: 201, 181, 156;
  --mt-latte: rgb(var(--c3));
  --mt-cream: rgba(var(--c1), 0.98);
  --mt-cream-soft: rgba(var(--c2), 0.96);
  --mt-foam: rgba(var(--c1), 0.72);
  --mt-ink: rgb(118, 104, 92);
  --mt-border: rgba(var(--c4), 0.55);
  --panel-cream: var(--mt-cream);
  --panel-cream-border: var(--mt-border);
  --panel-ink: var(--mt-ink);
  --panel-accent: rgb(var(--c4));
  --panel-shadow: 0 18px 48px rgba(80, 62, 48, 0.08), 0 2px 8px rgba(70, 55, 42, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  /* Match left/right so cards don’t look shifted on wide screens */
  --panel-inset-line: inset 4px 0 0 0 rgba(var(--c4), 0.38), inset -4px 0 0 0 rgba(var(--c4), 0.38);
}

html {
  /* Balance scrollbar gutter so content doesn’t sit visually left of center */
  scrollbar-gutter: stable both-edges;
}

body {
  background: linear-gradient(
    165deg,
    rgb(var(--c2)) 0%,
    rgb(var(--c3)) 42%,
    rgb(var(--c4)) 88%,
    rgb(var(--c3)) 100%
  );
  background-attachment: fixed;
}

/* Hero: no overlay — fixed bg shows through as-is */
#header {
  background: none;
}

/* Don’t use #header > * — it overrides position:absolute on .header__scroll */
#header > .header__monogram,
#header > .header__title {
  position: relative;
  z-index: 1;
}

/*
 * logo.png 3000×2000 — keep natural aspect; max bounds + contain (no fixed ratio).
 */
#header .header__monogram {
  display: block;
  width: auto;
  height: auto;
  max-width: min(92vw, 300px);
  max-height: 200px;
  margin-inline: auto;
  margin-top: -0.5rem;
  object-fit: contain;
  object-position: top center;
  flex-shrink: 0;
}

#header .header__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.32rem;
  margin: 0.3rem 0 0;
  text-align: center;
  font-size: inherit;
  font-weight: 400;
}

#header .header__date {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: rgba(255, 252, 248, 0.97);
  text-shadow: 0 1px 18px rgba(80, 50, 40, 0.15);
}

#header .header__names {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(0.68rem, 2.8vw, 0.8rem);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 250, 244, 0.99);
  text-shadow: 0 1px 20px rgba(70, 45, 35, 0.12);
  line-height: 1.45;
}

#header .header__names--aligned {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  justify-content: center;
  column-gap: 0.38em;
  width: clamp(13rem, 68vw, 18rem);
  margin-inline: auto;
}

#header .header__names--aligned .header__name-part:first-child {
  justify-self: end;
  text-align: right;
}

#header .header__names--aligned .header__name-part:last-child {
  justify-self: start;
  text-align: left;
}

#header .header__names--aligned .header__name-amp {
  letter-spacing: 0;
  margin-inline: 0.1em;
  transform: translateY(-0.03em);
}

#header .header__names[lang="zh-Hant"] {
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: clamp(0.72rem, 3vw, 0.9rem);
  letter-spacing: 0.2em;
  text-transform: none;
}

#header .header__names:not([lang="zh-Hant"]) {
  font-family: "Cormorant Garamond", "Noto Serif TC", Georgia, serif;
}

/* Form (/form/): hero title fonts stay like Chinese layout when UI language is EN */
body.page-form #header .header__names:not([lang="zh-Hant"]) {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

#header .header__scroll {
  position: absolute;
  left: 50%;
  bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 2;
  width: max-content;
  max-width: 100%;
  margin: 0;
}

#header #scroll-line {
  color: rgba(255, 248, 242, 0.92);
}

/*
 * Form + home: show one language at a time.
 * Use :lang() + [lang] so toggling document.documentElement.lang always matches; wedding.js also sets [hidden].
 */
html:lang(zh-Hant) [data-form-lang="en"]:not(.form-lang-switch__btn),
html[lang="zh-Hant"] [data-form-lang="en"]:not(.form-lang-switch__btn),
html:lang(zh) [data-form-lang="en"]:not(.form-lang-switch__btn),
html[lang="zh"] [data-form-lang="en"]:not(.form-lang-switch__btn) {
  display: none !important;
}

html:lang(en) [data-form-lang="zh"]:not(.form-lang-switch__btn),
html[lang="en"] [data-form-lang="zh"]:not(.form-lang-switch__btn) {
  display: none !important;
}

/* Form + home: fixed zh / en switch */
.form-lang-switch {
  position: fixed;
  top: max(0.45rem, env(safe-area-inset-top, 0px));
  right: max(0.45rem, env(safe-area-inset-right, 0px));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.28em;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  background: rgba(42, 32, 26, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 14px rgba(40, 28, 22, 0.18);
}

.form-lang-switch__btn {
  margin: 0;
  padding: 0.12em 0.28em;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 246, 238, 0.92);
  font: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.form-lang-switch__btn:hover,
.form-lang-switch__btn:focus-visible {
  color: #fff;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-lang-switch__btn[aria-pressed="true"] {
  color: #fff;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
}

.form-lang-switch__sep {
  color: rgba(255, 240, 230, 0.5);
  user-select: none;
}

@keyframes wedding-section-cue-nudge {
  0%,
  100% {
    transform: translateY(-2px);
  }
  50% {
    transform: translateY(2px);
  }
}

/* Panel down chevrons (intro/invite form+home; countdown/schedule/dresscode home); same SVG as hero; injected by wedding.js */
.section-scrollCue {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.2rem 0.45rem;
  text-decoration: none;
  color: rgba(90, 70, 56, 0.88);
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.section-scrollCue--down {
  bottom: max(0.28rem, env(safe-area-inset-bottom, 0px));
}

.section-scrollCue__arrow {
  display: block;
  width: 1.15rem;
  height: 1.25rem;
  line-height: 0;
  color: inherit;
  animation: wedding-section-cue-nudge 1.35s ease-in-out infinite;
  will-change: transform;
}

.section-scrollCue__arrow svg {
  display: block;
  width: 100%;
  height: 100%;
}

.section-scrollCue:hover,
.section-scrollCue:focus-visible {
  color: rgba(62, 44, 32, 0.95);
  outline: none;
}

.panel-card--invite .section-scrollCue,
.invite.panel-card.panel-card--invite .section-scrollCue {
  color: rgba(255, 248, 242, 0.9);
}

.panel-card--invite .section-scrollCue:hover,
.panel-card--invite .section-scrollCue:focus-visible,
.invite.panel-card.panel-card--invite .section-scrollCue:hover,
.invite.panel-card.panel-card--invite .section-scrollCue:focus-visible {
  color: #fff;
}

/* Home: cue lives on full-viewport slot (above/beside letterboxed card) — light chevron on bg */
body.page-home .page-scroll > .mobile-snap-slot > .section-scrollCue--down {
  color: rgba(255, 248, 242, 0.92);
}

body.page-home .page-scroll > .mobile-snap-slot > .section-scrollCue--down:hover,
body.page-home .page-scroll > .mobile-snap-slot > .section-scrollCue--down:focus-visible {
  color: #fff;
}

/* Shared “floating card” shell */
.panel-card {
  position: relative;
  display: block;
  width: 100%;
  max-width: min(52rem, calc(100% - 2.5rem));
  margin-inline: auto;
  margin-top: 2.25rem;
  margin-bottom: 2.75rem;
  border-radius: 22px;
  box-sizing: border-box;
  border: 1px solid var(--panel-cream-border);
  box-shadow: var(--panel-shadow), var(--panel-inset-line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* body sets text-indent — undo so centered copy lines up with the card */
  text-indent: 0;
}

.panel-card--cream {
  background: var(--panel-cream);
  color: var(--panel-ink);
}

/* Canelé beside panel section titles (Album uses plain h2 below) */
#schedule.panel-card > h2,
#transportation.panel-card > h2,
#RSVP.panel-card > h2,
#countdown-area.panel-card > h2,
.countdown-area.panel-card > h2,
.photo-video.panel-card > h2 {
  position: relative;
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  margin-top: 0;
  margin-bottom: 0.4rem;
  margin-left: auto;
  margin-right: auto;
  padding-right: 1.2rem;
  box-sizing: border-box;
}

#schedule.panel-card > h2::before,
#transportation.panel-card > h2::before,
#RSVP.panel-card > h2::before,
#countdown-area.panel-card > h2::before,
#dresscode.panel-card .dresscode-box > h2::before {
  content: "";
  position: absolute;
  width: 1.5rem;
  height: 1.5rem;
  right: 0.35rem;
  bottom: 0;
  background-image: url("../images/canele.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center bottom;
  transform: rotate(30deg);
  transform-origin: 100% 100%;
  opacity: 0.3;
  pointer-events: none;
  z-index: 1;
}

#dresscode.panel-card .dresscode-box > h2 {
  position: relative;
  top: auto;
  left: auto;
  margin: 0 auto 0.38rem;
  z-index: 2;
  white-space: normal;
  text-align: center;
  padding-right: 1.2rem;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(0.65rem);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.12s,
    transform 0.62s cubic-bezier(0.22, 1, 0.36, 1) 0.12s;
}

#dresscode.panel-card .dresscode-box.active > h2 {
  opacity: 1;
  transform: translateY(0);
}

#dresscode.panel-card .dresscode-box:not(.active) > h2 {
  transition-delay: 0s;
}

#dresscode.panel-card .dresscode-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(20rem, 100%);
  max-width: 100%;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(1.35rem);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

#dresscode.panel-card .dresscode-box.active {
  width: min(20rem, 100%);
  opacity: 1;
  transform: translateY(0);
}

#dresscode.panel-card #dresscode-content {
  position: relative;
  z-index: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  opacity: 0;
  transform: translateY(0.85rem) scale(0.988);
  transition: opacity 0.55s ease 0.18s,
    transform 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.18s,
    box-shadow 0.65s ease 0.22s;
  box-shadow: 0 10px 0 transparent;
}

#dresscode.panel-card .dresscode-box.active #dresscode-content {
  opacity: 1;
  transform: translateY(0) scale(1);
  box-shadow: 0 18px 40px rgba(55, 44, 36, 0.12);
}

#dresscode.panel-card .dresscode-box:not(.active) #dresscode-content {
  transition-delay: 0s;
}

#dresscode.panel-card #dresscode-content::after {
  opacity: 0;
  transition: opacity 0.5s ease 0.32s;
}

#dresscode.panel-card .dresscode-box.active #dresscode-content::after {
  opacity: 1;
}

#dresscode.panel-card .dresscode-box:not(.active) #dresscode-content::after {
  transition-delay: 0s;
}

#dresscode.panel-card .dresscode-box:not(.active) #dresscode-grid > * {
  opacity: 0;
  transform: translateY(0.5rem);
  transition-delay: 0s !important;
}

#dresscode.panel-card .dresscode-box.active #dresscode-grid > * {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.42s ease, transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

#dresscode.panel-card .dresscode-box.active #dresscode-grid > *:nth-child(1) {
  transition-delay: 0.26s;
}
#dresscode.panel-card .dresscode-box.active #dresscode-grid > *:nth-child(2) {
  transition-delay: 0.3s;
}
#dresscode.panel-card .dresscode-box.active #dresscode-grid > *:nth-child(3) {
  transition-delay: 0.34s;
}
#dresscode.panel-card .dresscode-box.active #dresscode-grid > *:nth-child(4) {
  transition-delay: 0.38s;
}
#dresscode.panel-card .dresscode-box.active #dresscode-grid > *:nth-child(5) {
  transition-delay: 0.42s;
}
#dresscode.panel-card .dresscode-box.active #dresscode-grid > *:nth-child(6) {
  transition-delay: 0.46s;
}
#dresscode.panel-card .dresscode-box.active #dresscode-grid > *:nth-child(7) {
  transition-delay: 0.5s;
}
#dresscode.panel-card .dresscode-box.active #dresscode-grid > *:nth-child(8) {
  transition-delay: 0.54s;
}

/* Invite + intro: no card chrome — BG shows through; light type */
#invite.panel-card.panel-card--invite,
#intro.panel-card.panel-card--invite {
  position: relative;
  z-index: 5;
  padding-top: 2.65rem;
  padding-bottom: 2.65rem;
  max-width: 100%;
  width: 100%;
  margin-inline: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: rgba(255, 252, 248, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  /* Legacy #invite / #intro use overflow:hidden — clips last lines when flex/snap layout is tight */
  overflow: visible;
}

#invite.panel-card.panel-card--invite {
  gap: 0.45rem;
}

#intro.panel-card.panel-card--invite {
  overflow: visible;
}

/* Invite window — same width scale as .intro-photo */
#invite.panel-card.panel-card--invite > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: min(42rem, 100%);
  max-width: 100%;
  box-sizing: border-box;
}

#invite.panel-card.panel-card--invite .invite-img {
  width: min(252px, 64vw);
  max-width: 100%;
}

/* Intro inner layout (no chip) */
#intro.panel-card .intro-box.intro-box--unified {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  flex: 0 0 auto;
  min-width: 0;
  box-sizing: border-box;
  width: min(42rem, 100%);
  max-width: none;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
  border-radius: 0;
}

#intro.panel-card .intro-photo {
  margin: 0 auto;
  padding: 0;
  /* Portrait frame (e.g. invite / couple photo) */
  width: min(280px, 72vw);
  max-width: 100%;
  aspect-ratio: 908 / 1198;
  overflow: hidden;
  line-height: 0;
  flex-shrink: 0;
  border-radius: clamp(14px, 3vw, 22px);
  box-shadow: 0 4px 24px rgba(18, 12, 10, 0.35);
}

#intro.panel-card .intro-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

#intro.panel-card .intro-content.intro-content--unified {
  margin: 0;
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
  padding: clamp(1rem, 2.8vw, 1.55rem) clamp(1.1rem, 3vw, 1.75rem) clamp(1.2rem, 2.8vw, 1.75rem);
  text-align: center;
  line-height: 1.85;
  letter-spacing: 0.06em;
  text-indent: 0;
}

#intro.panel-card.panel-card--invite .intro-content.intro-content--unified p {
  color: rgba(255, 252, 248, 0.94);
  text-shadow: 0 1px 4px rgba(18, 12, 10, 0.55);
}

#intro.panel-card .intro-content.intro-content--unified p {
  margin: 0;
}

#intro.panel-card .intro-content.intro-content--unified p .intro-content__lede {
  display: block;
  margin-bottom: clamp(0.45rem, 1.5vw, 0.65rem);
}

#intro.panel-card .intro-content.intro-content--unified p .intro-content__divider {
  display: block;
  margin: 0 auto clamp(0.65rem, 2.2vw, 1rem);
  font-size: clamp(0.68rem, 2.1vw, 0.8rem);
  letter-spacing: 0.04em;
  line-height: 1.5;
  opacity: 0.9;
  text-align: center;
}

@media (min-width: 641px) {
  #intro.panel-card .intro-photo {
    width: min(340px, 52%);
  }

  #invite.panel-card.panel-card--invite .invite-img {
    width: min(304px, 46%);
  }
}

#invite.panel-card.panel-card--invite h2 {
  color: rgba(255, 252, 248, 0.98);
  text-shadow: 0 1px 4px rgba(18, 12, 10, 0.55);
}

#invite.panel-card.panel-card--invite p {
  color: rgba(255, 252, 248, 0.94);
  text-shadow: 0 1px 4px rgba(18, 12, 10, 0.55);
}

/* Schedule */
#schedule.panel-card {
  padding-top: 1.85rem;
  padding-bottom: 4.75rem;
  background: linear-gradient(180deg, rgba(var(--c1), 0.98) 0%, rgba(var(--c2), 0.95) 100%);
}

#schedule.panel-card h2 {
  color: var(--panel-accent);
}

@media screen and (max-width: 799px) {
  #schedule.panel-card #timeline {
    padding-top: 0.65rem;
  }

  #schedule.panel-card #timeline::before {
    top: 2.65rem;
  }
}

@media screen and (min-width: 800px) {
  #schedule.panel-card #timeline {
    padding-top: 0.65rem;
  }
}

/* Transportation — same treatment as Schedule */
#transportation.panel-card {
  padding-top: 1.85rem;
  padding-bottom: 2.65rem;
  background: linear-gradient(180deg, rgba(var(--c1), 0.98) 0%, rgba(var(--c2), 0.95) 100%);
}

#transportation.panel-card > h2 {
  background: none;
  border-radius: 0;
  color: var(--panel-accent);
}

#transportation.panel-card #transportation-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

#transportation.panel-card #transportation-box::before,
#transportation.panel-card #transportation-box::after {
  content: none;
}

/* Match body / .intro-content: 14px, wide line-height, 3px tracking (see wedding.css body) */
#transportation.panel-card #transportation-content {
  font-family: "Noto Serif TC", "Songti TC", "PingFang TC", serif;
  font-size: clamp(0.875rem, 2.4vw, 1rem);
  font-weight: 500;
  line-height: 1.85;
  letter-spacing: 3px;
  justify-content: flex-start;
  padding: 0.85rem 1rem 0.35rem;
  max-width: min(36rem, 100%);
}

html[lang="en"] #transportation.panel-card #transportation-content {
  font-family: "Cormorant Garamond", "Noto Serif TC", Georgia, serif;
  letter-spacing: 0.06em;
}

html[lang="en"] #transportation.panel-card .theplace .map-open-link {
  font-family: "Cormorant Garamond", "Noto Serif TC", Georgia, serif;
}

html[lang="en"] #transportation.panel-card .theplace__zh {
  font-family: "Noto Serif TC", "Songti TC", serif;
}

html[lang="en"] body:not(.page-form) #header .header__date {
  font-family: "Cormorant Garamond", Georgia, serif;
}

/* English form: story + invite copy — Lora (readable editorial serif) */
html[lang="en"] #intro.panel-card.panel-card--invite .intro-content.intro-content--unified,
html[lang="en"] #intro.panel-card.panel-card--invite .intro-content.intro-content--unified p {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0.02em;
}

html[lang="en"]
  #intro.panel-card.panel-card--invite
  .intro-content.intro-content--unified
  p
  .intro-content__lede {
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.03em;
}

html[lang="en"] #invite.panel-card.panel-card--invite.invite p {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0.025em;
  line-height: 1.78;
}

/* English form: address / MRT / parking — DM Sans (legible, slightly softer than geometric sans) */
html[lang="en"] #transportation.panel-card.panel-card--cream .guide {
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
}

#transportation.panel-card .theplace {
  margin: 0 auto 0.35rem;
  text-align: center;
}

#transportation.panel-card .theplace .map-open-link {
  position: static;
  opacity: 1 !important;
  width: auto;
  height: auto;
  /* One fluid scale + em padding so mobile/desktop proportions match (rem padding + vw fonts felt mismatched). */
  font-size: clamp(0.9rem, 0.78rem + 1.15vw, 1.2rem);
  padding: 0.62em 1.45em;
  border-radius: 999px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.16em;
  background-color: rgb(118, 98, 82) !important;
  color: #fff !important;
  text-decoration: none;
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-weight: 500;
  line-height: 1.38;
  letter-spacing: 0.09em;
  text-align: center;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  transition: background 0.2s ease, transform 0.2s ease;
}

#transportation.panel-card .theplace .map-open-link:hover {
  background-color: rgb(132, 110, 92) !important;
  animation: none;
}

#transportation.panel-card .theplace__zh {
  font-size: 1em;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.12em;
  color: #fff;
}

#transportation.panel-card .theplace__en {
  font-family: "Cormorant Garamond", ui-serif, Georgia, serif;
  font-size: 0.74em;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.92);
}

#transportation.panel-card .guide {
  display: grid;
  margin-top: 1.35rem;
  padding: 0.35rem 0 0 0.2rem;
  row-gap: 0.65rem;
  grid-template-columns: 22px auto;
  font-family: inherit;
  font-weight: 500;
  opacity: 1;
  transform: none;
  transition: none;
}

#transportation.panel-card .guide svg {
  width: 14px !important;
  height: 14px !important;
  padding-top: 0.25rem !important;
}

/* Home-only cream panels: match /form/ transportation body typography */
#schedule.panel-card .activity {
  font-family: "Noto Serif TC", "Songti TC", "PingFang TC", serif;
  font-size: clamp(0.875rem, 2.4vw, 1rem);
  font-weight: 500;
  line-height: 1.85;
  letter-spacing: 3px;
  text-indent: 0;
}

#schedule.panel-card .time {
  font-family: "Noto Serif TC", "Songti TC", "PingFang TC", serif;
  font-size: clamp(0.68rem, 2vw, 0.8125rem);
  font-weight: 600;
  letter-spacing: 0.12em;
}

.countdown-area.panel-card > p,
.countdown-area.panel-card .countdown-area-box > p {
  font-family: "Noto Serif TC", "Songti TC", "PingFang TC", serif;
  font-size: clamp(0.875rem, 2.4vw, 1rem);
  font-weight: 500;
  line-height: 1.85;
  letter-spacing: 3px;
  text-indent: 0;
  padding: 0.45rem 0;
}

.countdown-area.panel-card .countdown-area-box > div {
  font-family: "Noto Serif TC", "Songti TC", "PingFang TC", serif;
  font-size: clamp(1rem, 2.8vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.photo-video.panel-card .album-credit {
  font-family: "Noto Serif TC", "Songti TC", "PingFang TC", serif;
  font-size: clamp(0.625rem, 1.5vw, 0.6875rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-indent: 0;
}

#dresscode.panel-card #dresscode-grid > div:not(.circle) {
  font-family: "Noto Serif TC", "Songti TC", "PingFang TC", serif;
  font-size: clamp(0.875rem, 2.4vw, 1rem);
  font-weight: 500;
  letter-spacing: 3px;
  text-indent: 0;
}

/* Dress code */
#dresscode.panel-card {
  padding: 3.1rem 1rem 4.25rem;
  background: linear-gradient(165deg, rgba(var(--c1), 0.97) 0%, rgba(var(--c3), 0.94) 100%);
}

/* Album */
.photo-video.panel-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.2rem 1rem 3.1rem;
  background: linear-gradient(180deg, rgba(var(--c1), 0.98) 0%, rgba(var(--c2), 0.96) 100%);
}

.photo-video.panel-card #photo-gallery {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
}

.photo-video.panel-card h2 {
  color: var(--panel-accent);
}

/* Countdown */
.countdown-area.panel-card {
  padding: 1.85rem 1rem 2.75rem;
  background: linear-gradient(135deg, rgba(var(--c1), 0.98) 0%, rgba(var(--c3), 0.94) 100%);
  border: 1px solid rgba(var(--c2), 0.85);
}

.countdown-area.panel-card h2 {
  color: var(--panel-accent);
}

.countdown-area.panel-card .countdown-area-box {
  margin-top: 0.22rem;
}

/* Home countdown: English sign-off — script face; same optical size band as zh line above (.countdown-area.panel-card > p). */
#countdown-area.panel-card > p.countdown-area__tagline .countdown-area__tagline-en {
  font-family: "Petit Formal Script", "Cormorant Garamond", ui-serif, Georgia, serif;
  font-size: clamp(0.875rem, 2.4vw, 1rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.85;
}

/* RSVP — same shell size / rhythm as Transportation */
#RSVP.panel-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1.85rem;
  padding-bottom: 2.65rem;
  padding-left: 0;
  padding-right: 0;
  background: linear-gradient(180deg, rgba(var(--c1), 0.98) 0%, rgba(var(--c2), 0.95) 100%);
}

#RSVP.panel-card > h2 {
  background: none;
  border-radius: 0;
  color: var(--panel-accent);
  margin-top: 0;
}

#RSVP.panel-card #RSVParea {
  order: 1;
  margin-top: 0;
  width: 100%;
  max-width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
  border-radius: 16px;
}

#RSVP.panel-card .rsvp-google-form-frame {
  display: block;
  width: 100%;
  min-height: 960px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.35);
}

#RSVP.panel-card .rsvp-embed-placeholder {
  margin: 0;
  padding: 1rem 1.1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  text-align: left;
  text-indent: 0;
  color: rgba(var(--c4), 0.95);
  background: rgba(var(--c1), 0.45);
  border-radius: 14px;
  border: 1px dashed rgba(var(--c4), 0.35);
}

#RSVP.panel-card .rsvp-embed-placeholder code {
  font-size: 0.82em;
  word-break: break-all;
}

/* Matching pill buttons for 出席 / 無法出席 */
#RSVP.panel-card .attend-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  width: 100%;
  margin: 0 0 0.25rem;
}

#RSVP.panel-card .attend-options .attend {
  margin: 0;
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 2rem;
  box-sizing: border-box;
  text-align: center;
  border: 1px solid rgba(var(--c4), 0.5);
  border-radius: 999px;
  background: rgba(var(--c1), 0.42);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#RSVP.panel-card .attend-options .attend:hover {
  background: rgba(var(--c2), 0.55);
  border-color: rgba(var(--c4), 0.62);
}

#RSVP.panel-card .attend-options .attend:has(input:checked) {
  background: rgba(var(--c4), 0.18);
  border-color: rgba(var(--c4), 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Footer — text only */
footer.panel-card--footer {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  width: 100%;
  max-width: none;
  margin-inline: auto;
  margin-top: 0.2rem;
  margin-bottom: 1rem;
  padding: 0.15rem 1rem 0.6rem;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.95);
  border: none;
  box-shadow: none;
  text-indent: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
}

footer.panel-card--footer > div {
  padding: 0;
  color: rgba(255, 255, 255, 0.95);
}

body.page-form footer.panel-card--footer [data-form-lang="en"],
body.page-home footer.panel-card--footer [data-form-lang="en"] {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0.07em;
  line-height: 1.65;
}

footer.panel-card--footer div a:link,
footer.panel-card--footer div a:visited {
  color: rgba(255, 255, 255, 0.95);
}

footer.panel-card--footer div a:hover,
footer.panel-card--footer div a:active {
  color: #fff;
}

footer.panel-card--footer .footer__monogram {
  display: block;
  width: min(96px, 26vw);
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

/* Google Maps embed */
.map.map--embed {
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.map.map--embed iframe {
  width: 100%;
  max-width: 500px;
  height: min(380px, 52vh);
  border-radius: 20px;
  display: block;
  box-shadow: 0 12px 36px rgba(80, 62, 48, 0.1);
}

.map.map--embed .map-open-link {
  position: static;
  opacity: 1 !important;
  width: auto;
  height: auto;
  padding: 10px 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(var(--c4), 0.95) !important;
  color: var(--mt-ink) !important;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 2px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.map.map--embed .map-open-link:hover {
  background-color: rgb(175, 155, 132) !important;
  animation: none;
}

/* Hero: phone + tablet portrait (narrow); wide tablet / desktop keeps centered flex hero from wedding.css */
@media (max-width: 900px) {
  header {
    display: grid;
    grid-template-columns: 1fr;
    /* Top breathing · monogram · title · flex gap · scroll pinned to viewport bottom */
    grid-template-rows: minmax(0, 0.4fr) auto auto 1fr auto;
    justify-items: center;
    align-content: start;
    width: 100%;
    min-height: 100dvh;
    min-height: 100svh;
    padding: max(0.65rem, env(safe-area-inset-top, 0px)) 1rem max(0.5rem, env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    touch-action: pan-y;
    /* Don’t trap vertical scroll (overflow:hidden on hero was blocking iOS) */
    overflow-x: hidden;
    overflow-y: visible;
  }

  /* Pass drags through logo + titles; only the Scroll control stays tappable */
  #header > *:not(.header__scroll) {
    pointer-events: none;
  }

  #header .header__monogram {
    grid-row: 2;
    align-self: center;
    width: auto;
    height: auto;
    max-width: min(86vw, 300px);
    max-height: min(150px, 40vw);
    object-fit: contain;
    object-position: top center;
  }

  #header .header__title {
    grid-row: 3;
    margin-top: 0;
    gap: 0.34rem;
  }

  /* Stable row height for scroll cue (clip-path animation on #scroll-line) */
  #header .header__scroll {
    grid-row: 5;
    position: static;
    transform: none;
    left: auto;
    bottom: auto;
    min-height: 2.75rem;
    height: auto;
    box-sizing: border-box;
    margin-top: 0;
    align-self: center;
    touch-action: pan-y;
    pointer-events: auto;
  }
}

@media (max-width: 640px) {
  /* More page visible at sides — card doesn’t hug the screen */
  .panel-card {
    width: min(52rem, calc(100% - 2.75rem));
    max-width: calc(100vw - 2.75rem);
    margin-top: 1.5rem;
    margin-bottom: 1.75rem;
    border-radius: 16px;
    box-shadow: 0 10px 32px rgba(80, 62, 48, 0.07), 0 1px 4px rgba(70, 55, 42, 0.04),
      inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 3px 0 0 0 rgba(var(--c4), 0.3), inset -3px 0 0 0 rgba(var(--c4), 0.3);
  }

  #invite.panel-card.panel-card--invite,
  #intro.panel-card.panel-card--invite {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  footer.panel-card--footer {
    width: 100%;
    max-width: none;
    padding-inline: 1.25rem;
  }

  #intro.panel-card .intro-box.intro-box--unified {
    width: 100%;
  }

  #intro.panel-card .intro-photo {
    width: min(270px, 78vw);
  }

  #invite.panel-card.panel-card--invite .invite-img {
    width: min(242px, 70vw);
  }

  .map.map--embed iframe {
    height: min(280px, 45vh);
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  #dresscode.panel-card .dresscode-box,
  #dresscode.panel-card .dresscode-box > h2,
  #dresscode.panel-card #dresscode-content,
  #dresscode.panel-card #dresscode-content::after,
  #dresscode.panel-card .dresscode-box #dresscode-grid > * {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  #dresscode.panel-card .dresscode-box:not(.active),
  #dresscode.panel-card .dresscode-box:not(.active) > h2,
  #dresscode.panel-card .dresscode-box:not(.active) #dresscode-content,
  #dresscode.panel-card .dresscode-box:not(.active) #dresscode-grid > * {
    transform: none !important;
  }
}

