/* ============================================
   Joseph & Novilia — Wedding Guidebook
   Shared Stylesheet
   ============================================ */

:root {
  --ink: #2b2418;
  --ink-soft: #5c5341;
  --ink-faint: #8a7d65;
  --paper: #f4ede0;
  --paper-warm: #ebe0cc;
  --paper-deep: #e0d2b8;
  --gold: #a8804a;
  --gold-deep: #7a5a2f;
  --gold-light: #c9a875;
  --terracotta: #b85b3a;
  --terracotta-soft: #d4856a;
  --sage: #6b7a5a;
  --sage-soft: #8a9978;
  --blush: #d4a896;
  --cream: #faf6ed;
  --shadow: rgba(43, 36, 24, 0.08);
  --shadow-deep: rgba(43, 36, 24, 0.15);

  /* Status colors */
  --status-done: #5a7a3a;
  --status-done-bg: #e8eed8;
  --status-progress: #a8804a;
  --status-progress-bg: #f4e8d0;
  --status-tbd: #8a7d65;
  --status-tbd-bg: #ebe4d4;
  --status-no: #9a8a82;
  --status-no-bg: #ede8e3;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Cormorant Garamond', 'Noto Serif TC', Georgia, serif;
  font-synthesis: weight;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
  font-size: 17px;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(168, 128, 74, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(184, 91, 58, 0.04) 0%, transparent 45%);
  min-height: 100vh;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  z-index: 1000;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E");
}

/* ============================================
   NAVIGATION
   ============================================ */
nav.main-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.1rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(244, 237, 224, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(168, 128, 74, 0.18);
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gold-deep);
  text-decoration: none;
  white-space: nowrap;
}

.nav-logo .amp { color: var(--terracotta); font-style: italic; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links > li {
  position: relative;
}

.nav-links a {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.3s;
  font-weight: 400;
  position: relative;
  padding-bottom: 2px;
  cursor: pointer;
  background: none;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-links a:hover { color: var(--terracotta); }
.nav-links a.active { color: var(--terracotta); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--terracotta);
}

@media (max-width: 1280px) {
  nav.main-nav { padding: 1rem 1.5rem; flex-wrap: wrap; }
  .nav-toggle { display: block; order: 2; }
  .lang-switch { order: 1; margin-left: auto; margin-right: 0.6rem; }
  .nav-links {
    order: 3;
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(168, 128, 74, 0.18);
    align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  .nav-links > li { width: 100%; }

  

  
  
  
  
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
  text-align: center;
  padding: 5rem 2rem 3rem;
  position: relative;
}

.page-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: var(--gold);
  margin-bottom: 1.2rem;
}

.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 1.5rem;
}

.page-title em {
  font-style: italic;
  color: var(--terracotta);
  font-weight: 400;
}

.page-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink-soft);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

.page-divider {
  width: 50px;
  height: 1px;
  background: var(--gold);
  margin: 2rem auto;
  position: relative;
}

.page-divider::before,
.page-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateY(-50%);
}

.page-divider::before { left: -10px; }
.page-divider::after { right: -10px; }

/* ============================================
   CONTAINER
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 6rem;
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 2rem 6rem;
}

/* ============================================
   SECTION
   ============================================ */
.section {
  margin-bottom: 4rem;
}

.section-header {
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(168, 128, 74, 0.25);
}

.section-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 2rem;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.section-meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--gold);
}

/* ============================================
   INFO CARDS
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--cream);
  padding: 1.8rem;
  border: 1px solid rgba(168, 128, 74, 0.18);
  border-radius: 2px;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
}

.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.card-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold-deep);
  margin-bottom: 1rem;
}

.card-body {
  font-size: 1.02rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.card-body p { margin-bottom: 0.6rem; }
.card-body p:last-child { margin-bottom: 0; }

.card-body strong {
  color: var(--ink);
  font-weight: 500;
}

.card-body ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

.card-body ul li {
  padding: 0.25rem 0 0.25rem 1.2rem;
  position: relative;
}

.card-body ul li::before {
  content: '·';
  position: absolute;
  left: 0.3rem;
  color: var(--gold);
  font-weight: bold;
}

/* Field row inside cards */

/* Note block inside card */
.card-note {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  background: var(--paper-warm);
  border-left: 2px solid var(--gold);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.card-note strong {
  font-style: normal;
  color: var(--ink);
  display: block;
  margin-bottom: 0.2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* ============================================
   BUTTONS / LINKS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border: 1px solid var(--gold-deep);
  color: var(--gold-deep);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: all 0.4s;
  background: transparent;
  cursor: pointer;
  font-weight: 500;
}

.btn:hover {
  background: var(--gold-deep);
  color: var(--paper);
}

.btn-primary {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
}

.btn-arrow::after {
  content: '→';
  font-size: 1rem;
  letter-spacing: 0;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  text-align: center;
  padding: 4rem 2rem 3rem;
  border-top: 1px solid rgba(168, 128, 74, 0.2);
  background: var(--paper-warm);
  margin-top: 4rem;
}

.footer-ornament {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.6rem;
  color: var(--terracotta);
  margin-bottom: 0.8rem;
}

.footer-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
}

.footer-date {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--gold-deep);
  font-size: 0.95rem;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

.muted { color: var(--ink-faint); }
.italic { font-style: italic; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-up { opacity: 0; animation: fadeUp 1s ease-out forwards; }
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .page-header { padding: 3rem 1.2rem 2rem; }
  .container, .container-narrow { padding: 1.5rem 1.2rem 4rem; }
  .card { padding: 1.4rem; }
  
  
  .card-grid { grid-template-columns: 1fr; }
}

/* ============================================
   GUEST SITE
   ============================================ */

.story p {
  font-size: 1.2rem;
  color: var(--ink-soft);
  line-height: 1.8;
  margin-bottom: 1.2rem;
  text-align: center;
}

.timeline { list-style: none; position: relative; margin: 0 auto; max-width: 720px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 92px;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 1px;
  background: rgba(168, 128, 74, 0.35);
}
.timeline li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  padding: 0 0 2.4rem;
  position: relative;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: 88px;
  top: 0.55rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--gold);
}
.timeline-time {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--gold-deep);
  text-align: right;
  padding-top: 0.25rem;
}
.timeline-title { font-size: 1.45rem; font-weight: 500; line-height: 1.3; }
.timeline-place {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  margin: 0.2rem 0 0.4rem;
}
.timeline-desc { color: var(--ink-soft); font-size: 1.05rem; }

.swatches { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin: 1.5rem 0 0.5rem; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.swatch span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(43, 36, 24, 0.12);
  display: block;
}
.swatch small {
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.faq details {
  background: var(--cream);
  border: 1px solid rgba(168, 128, 74, 0.18);
  margin-bottom: 0.8rem;
  padding: 1.1rem 1.4rem;
}
.faq summary {
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 500;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--gold); font-family: 'Inter', sans-serif; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin-top: 0.7rem; color: var(--ink-soft); font-size: 1.05rem; }

.cta-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2.5rem; }

@media (max-width: 640px) {
  .timeline::before { left: 62px; }
  .timeline li { grid-template-columns: 52px 1fr; gap: 1.6rem; }
  .timeline li::before { left: 58px; }
  .timeline-time { font-size: 0.72rem; letter-spacing: 0.05em; }
}

.verse { max-width: 620px; margin: 0 auto 4rem; text-align: center; font-style: italic; font-size: 1.2rem; color: var(--ink-soft); line-height: 1.7; }
.verse cite { display: block; margin-top: 0.8rem; font-style: normal; font-family: 'Inter', sans-serif; font-size: 0.65rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }

.couple { display: grid; grid-template-columns: 1fr auto 1fr; gap: 2rem; align-items: center; text-align: center; margin-bottom: 4rem; }
.couple-amp { font-style: italic; color: var(--terracotta); font-size: 3rem; }
.couple-name { font-size: 2rem; line-height: 1.2; }
.couple-hanzi { font-size: 1.1rem; color: var(--gold-deep); letter-spacing: 0.2em; margin: 0.3rem 0 0.8rem; }
.couple-parents { color: var(--ink-soft); font-size: 1.05rem; }
@media (max-width: 640px) { .couple { grid-template-columns: 1fr; gap: 1rem; } }

.video-wrap { position: relative; aspect-ratio: 16 / 9; margin: 1rem 0 4rem; border: 1px solid rgba(168, 128, 74, 0.25); background: var(--paper-deep); }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.gallery { columns: 3 220px; column-gap: 0.8rem; margin-bottom: 4rem; }
.gallery a { display: block; margin-bottom: 0.8rem; break-inside: avoid; }
.gallery img { width: 100%; height: auto; display: block; border-radius: 2px; transition: opacity 0.3s; background: var(--paper-deep); }
.gallery img:hover { opacity: 0.88; }

/* Photo strip (home) + gallery grid + lightbox */

 .gallery-grid img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; display: block; border-radius: 2px; background: var(--paper-deep); transition: opacity 0.3s; }
 .gallery-grid a:hover img { opacity: 0.85; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.8rem; }
@media (max-width: 640px) {  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; } }

.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(20, 16, 10, 0.94); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,0.4); }
.lightbox button { position: absolute; background: none; border: none; color: #f4ede0; font-family: 'Inter', sans-serif; cursor: pointer; padding: 1rem; font-size: 1.8rem; line-height: 1; opacity: 0.8; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: 0.5rem; right: 0.8rem; }
.lb-prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.5rem; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); color: #c9a875; font-family: 'Inter', sans-serif; font-size: 0.7rem; letter-spacing: 0.25em; }

/* ============================================
   LANGUAGE SWITCH
   ============================================ */
.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(168, 128, 74, 0.35);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}
.lang-switch button {
  font-family: 'Inter', 'Noto Serif TC', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.7rem;
  min-height: 30px;
  background: none;
  border: 0;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lang-switch button + button { border-left: 1px solid rgba(168, 128, 74, 0.2); }
.lang-switch button[aria-pressed="true"] { background: var(--terracotta); color: var(--paper); }
@media (min-width: 1281px) {
  .main-nav .nav-links { order: 2; margin-left: auto; gap: 1.5rem; }
  .main-nav .lang-switch { order: 3; margin-left: 1.5rem; }
}

/* ============================================
   HOME — one-screen guidebook
   ============================================ */
.home-screen {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: clamp(0.6rem, 2vh, 1.4rem);
  padding: max(0.75rem, env(safe-area-inset-top)) 16px max(0.75rem, env(safe-area-inset-bottom));
}
.home-top { display: flex; justify-content: flex-end; }
.home-title { text-align: center; }
.home-eyebrow {
  font-family: 'Inter', 'Noto Serif TC', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: clamp(0.2rem, 1vh, 0.8rem);
}
.home-names {
  font-weight: 400;
  font-size: clamp(2.1rem, min(7.5vh, 11vw), 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.home-names .amp { font-style: italic; color: var(--terracotta); font-size: 0.75em; margin: 0 0.12em; }
.home-meta {
  font-style: italic;
  font-size: clamp(0.95rem, 2.2vh, 1.25rem);
  color: var(--ink-soft);
  line-height: 1.35;
  margin-top: 0.3em;
}
.home-status {
  display: inline-block;
  margin-top: clamp(0.4rem, 1.4vh, 1rem);
  padding: 0.3rem 1rem;
  border: 1px solid rgba(184, 91, 58, 0.35);
  border-radius: 999px;
  background: rgba(250, 246, 237, 0.7);
  font-family: 'Inter', 'Noto Serif TC', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  line-height: 1.5;
  color: var(--terracotta);
}
.home-status:empty { display: none; }

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: minmax(0, 1fr);
  gap: clamp(0.5rem, 1.4vh, 0.9rem);
  min-height: 0;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.15rem, 0.8vh, 0.45rem);
  padding: 0.5rem;
  min-height: 0;
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid rgba(168, 128, 74, 0.25);
  border-radius: 14px;
  box-shadow: 0 1px 2px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.tile:hover { border-color: var(--gold); box-shadow: 0 6px 18px var(--shadow); }
.tile:active { transform: scale(0.98); }
.tile svg {
  width: clamp(22px, 4.2vh, 36px);
  height: clamp(22px, 4.2vh, 36px);
  flex-shrink: 0;
  color: var(--terracotta);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tile-label { font-size: clamp(1.05rem, 2.7vh, 1.45rem); font-weight: 500; line-height: 1.15; }
.tile-sub {
  font-family: 'Inter', 'Noto Serif TC', sans-serif;
  font-size: clamp(0.58rem, 1.4vh, 0.72rem);
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--ink-faint);
}

.home-foot { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; padding: 0; margin: 0; background: none; border: 0; }
.home-help { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.home-help[hidden] { display: none; }

/* Organiser Call / WhatsApp buttons */
.help-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0.45rem 1rem;
  border: 1px solid var(--sage);
  border-radius: 999px;
  font-family: 'Inter', 'Noto Serif TC', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--sage);
  background: var(--cream);
  text-decoration: none;
  white-space: nowrap;
}
.help-btn-wa { background: var(--sage); color: var(--paper); }
.help-btn:hover { border-color: var(--gold-deep); }
.help-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.organiser-actions { display: flex; justify-content: center; gap: 0.6rem; flex-wrap: wrap; }

.home-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.9rem;
  list-style: none;
}
.home-links a {
  display: inline-block;
  padding: 0.35rem 0;
  font-family: 'Inter', 'Noto Serif TC', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
  text-decoration: none;
}
.home-links a:hover { color: var(--terracotta); }

/* Short phones: drop the tile captions so the six buttons still fit */
@media (max-height: 600px) {
  .tile-sub { display: none; }
}
/* Very short portrait screens (older phones with browser bars showing) */
@media (orientation: portrait) and (max-height: 520px) {
  .home-screen { gap: 0.45rem; padding-top: max(0.5rem, env(safe-area-inset-top)); padding-bottom: max(0.5rem, env(safe-area-inset-bottom)); }
  .home-eyebrow { display: none; }
  .home-status { margin-top: 0.3rem; padding: 0.15rem 0.8rem; }
  .home-grid { gap: 0.4rem; }
  .tile svg { width: 20px; height: 20px; }
  .lang-switch button { min-height: 26px; padding: 0.2rem 0.6rem; }
  .help-btn { min-height: 32px; padding: 0.3rem 0.8rem; font-size: 0.64rem; }
  .home-foot { gap: 0.15rem; }
  .home-links { gap: 0 0.7rem; }
  .home-links a { padding: 0.2rem 0; }
  .home-names { font-size: 2rem; }
}
/* Phones in landscape: 3 × 2 buttons, smaller title */
@media (orientation: landscape) and (max-height: 520px) {
  .home-screen { max-width: 760px; grid-template-rows: auto minmax(0, 1fr) auto; }
  .home-top { position: absolute; top: max(0.5rem, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); }
  .home-eyebrow { display: none; }
  .home-names { font-size: clamp(1.6rem, 9vh, 2.6rem); }
  .home-grid { grid-template-columns: repeat(3, 1fr); }
}
/* Tablets & desktop */
@media (min-width: 900px) and (min-height: 640px) {
  .home-screen { max-width: 980px; padding-left: 2rem; padding-right: 2rem; }
  .home-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(0, 210px); align-content: center; gap: 1.2rem; }
  .tile { border-radius: 18px; }
}

/* ============================================
   THE DAY — highlight what is happening now
   ============================================ */
.timeline li.is-now::before { background: var(--terracotta); border-color: var(--terracotta); box-shadow: 0 0 0 4px rgba(184, 91, 58, 0.18); }
.timeline li.is-now .timeline-title { color: var(--terracotta); }

/* ============================================
   SEATING
   ============================================ */
.seat-search-wrap { max-width: 520px; margin: 0 auto 3.5rem; }
.seat-search {
  width: 100%;
  font-family: 'Cormorant Garamond', 'Noto Serif TC', Georgia, serif;
  font-size: 1.25rem;
  padding: 0.85rem 1.2rem;
  background: var(--cream);
  border: 1px solid rgba(168, 128, 74, 0.4);
  border-radius: 999px;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
.seat-search:focus { outline: none; border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(184, 91, 58, 0.15); }
.seat-search:disabled { opacity: 0.5; }
.seat-results { margin-top: 0.8rem; display: flex; flex-direction: column; gap: 0.5rem; }
.seat-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0.8rem 1.2rem;
  background: var(--cream);
  border: 1px solid rgba(168, 128, 74, 0.25);
  border-radius: 12px;
  font: inherit;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.seat-result:hover { border-color: var(--terracotta); }
.seat-result-name { font-size: 1.15rem; }
.seat-result-table {
  flex-shrink: 0;
  font-family: 'Inter', 'Noto Serif TC', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--terracotta);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
}
.seat-none, .seat-more, .seat-empty, .seat-help { font-style: italic; color: var(--ink-soft); text-align: center; }
.seat-none { padding: 0.5rem 0; }
.seat-more { font-size: 0.95rem; }
.seat-help { margin-top: 2.5rem; }
.seat-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.seat-table { padding: 1.3rem 1.4rem; scroll-margin-top: 6rem; }
.seat-table-name { font-size: 1.35rem; font-weight: 500; margin-bottom: 0.2rem; }
.seat-table .card-subtitle { margin-bottom: 0.6rem; }
.seat-table ul { list-style: none; }
.seat-table li { padding: 0.15rem 0.4rem; margin: 0 -0.4rem; border-radius: 4px; color: var(--ink-soft); }
.seat-table li.is-match { background: rgba(184, 91, 58, 0.14); color: var(--ink); }
.seat-table.flash { animation: seatFlash 1.6s ease-out; }
@keyframes seatFlash {
  0%, 30% { box-shadow: 0 0 0 3px var(--terracotta); }
  100% { box-shadow: 0 0 0 3px transparent; }
}
@media (max-width: 640px) { .seat-tables { grid-template-columns: 1fr; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ============================================
   THE DAY — tea ceremony notice
   ============================================ */
.tea-note { max-width: 720px; margin: 0 auto 3rem; border-left-color: var(--sage); }
.tea-link { display: inline-block; margin-top: 0.5rem; font-style: normal; font-family: 'Inter', 'Noto Serif TC', sans-serif; font-size: 0.7rem; letter-spacing: 0.08em; color: var(--terracotta); }
.rd-link { font-family: 'Inter', 'Noto Serif TC', sans-serif; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); }
.rd-link:hover { color: var(--terracotta); }

/* ============================================
   DETAILED RUNDOWN
   ============================================ */
.rd-controls { margin-bottom: 1.8rem; }
.rd-controls .card-subtitle { margin-bottom: 0.6rem; }
.rd-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.45rem; }
.rd-filter button {
  font-family: 'Inter', 'Noto Serif TC', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.95rem;
  min-height: 36px;
  border: 1px solid rgba(168, 128, 74, 0.4);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink-soft);
  cursor: pointer;
}
.rd-filter button[aria-pressed="true"] { background: var(--terracotta); border-color: var(--terracotta); color: var(--paper); }
.rd-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--cream);
  border: 1px solid rgba(168, 128, 74, 0.25);
  border-radius: 12px;
}
.rd-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 1rem; line-height: 1.45; }
.rd-table thead th {
  font-family: 'Inter', 'Noto Serif TC', sans-serif;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  background: var(--paper-warm);
  text-align: left;
  padding: 0.8rem;
  white-space: nowrap;
}
.rd-table td, .rd-table tbody th { padding: 0.75rem 0.8rem; vertical-align: top; border-top: 1px solid rgba(168, 128, 74, 0.18); text-align: left; font-weight: 400; }
.rd-table td { min-width: 150px; color: var(--ink-soft); }
.rd-table td.rd-none { background-image: linear-gradient(var(--ink-faint), var(--ink-faint)); background-size: 10px 1px; background-repeat: no-repeat; background-position: 0.8rem 1.4rem; opacity: 0.5; }
/* First column stays visible while scrolling sideways */
.rd-table .rd-when { position: sticky; left: 0; z-index: 1; min-width: 150px; max-width: 200px; background: var(--cream); box-shadow: 1px 0 0 rgba(168, 128, 74, 0.25); }
.rd-table thead .rd-when { background: var(--paper-warm); z-index: 2; }
.rd-time { display: block; font-family: 'Inter', 'Noto Serif TC', sans-serif; font-size: 0.72rem; letter-spacing: 0.06em; color: var(--terracotta); }
.rd-activity { display: block; font-weight: 500; color: var(--ink); }
.rd-place { display: block; font-family: 'Inter', 'Noto Serif TC', sans-serif; font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-top: 0.15rem; }
.rd-table tr.is-now td, .rd-table tr.is-now .rd-when { background-color: #f6e4da; }
.rd-table tr.is-now .rd-time::after { content: ' ●'; }
/* One role selected: a simple two-column list */
.rd-table.rd-focused td { width: 100%; min-width: 0; color: var(--ink); }
.rd-table.rd-focused thead th { white-space: normal; }
.rd-empty { text-align: center; font-style: italic; color: var(--ink-soft); padding: 2rem 0; }
.rd-private { max-width: 720px; margin: 0 auto 2rem; border-left-color: var(--sage); font-style: normal; }
.rd-phase th { padding: 0; border-top: 1px solid rgba(168, 128, 74, 0.3); background: var(--paper-warm); text-align: left; }
.rd-phase th span {
  position: sticky;
  left: 0;
  display: inline-block;
  padding: 0.6rem 0.8rem;
  font-family: 'Inter', 'Noto Serif TC', sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
}
.rd-row-link { display: inline-block; margin-top: 0.3rem; font-family: 'Inter', 'Noto Serif TC', sans-serif; font-size: 0.66rem; letter-spacing: 0.06em; color: var(--terracotta); }
.rd-table td { font-size: 0.95rem; }

/* ============================================
   OUR STORY — chapters with photos & film
   ============================================ */
.story-heading { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 1rem 0 2.5rem; }
.story-line { list-style: none; }
.story-step { text-align: center; position: relative; padding-top: 3.2rem; scroll-margin-top: 5rem; }
.story-step:first-child { padding-top: 0; }
/* thin thread joining the chapters */
.story-step + .story-step::before { content: ''; position: absolute; top: 0.6rem; left: 50%; width: 1px; height: 2rem; background: var(--gold); opacity: 0.45; }
.story-year {
  display: inline-block;
  font-family: 'Inter', 'Noto Serif TC', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  border: 1px solid rgba(168, 128, 74, 0.35);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  margin-bottom: 0.8rem;
}
.story-step h3 { font-weight: 500; font-size: 1.6rem; margin-bottom: 0.6rem; }
.story-photos { margin: 1.5rem 0 0; text-align: left; }
.story-film { margin-top: 2.5rem; }
.story-film .card-subtitle { margin-bottom: 0.4rem; }
.story-film .video-wrap { margin: 0.6rem 0 1.2rem; }
.story-note { font-style: italic; color: var(--ink-soft); margin: 0.5rem 0 1.2rem; }
.story-more { text-align: center; font-style: italic; color: var(--ink-faint); margin-top: 3.5rem; }
/* After-wedding sections: the block takes no space until one of them is shown */
.story-later:not(:has(> section:not([hidden]))) { display: none; }

/* Organiser contact in every page footer */
.footer-help { max-width: 420px; margin: 0 auto 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(168, 128, 74, 0.2); }
.footer-help[hidden] { display: none; }
.footer-help-label { font-family: 'Inter', 'Noto Serif TC', sans-serif; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.8rem; }

/* Wedding gift accounts (Guest Guide) */
#gift { scroll-margin-top: 5rem; }
.gift-intro { text-align: center; color: var(--ink-soft); font-size: 1.1rem; max-width: 620px; margin: 0 auto 1.5rem; }
.gift-accounts { display: grid; gap: 0.9rem; }
.gift-account { padding: 1.2rem 1.4rem; }
.gift-account .card-subtitle { margin-bottom: 0.4rem; }
.gift-name { font-size: 1.15rem; }
.gift-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.gift-number { font-family: 'Inter', 'Noto Serif TC', sans-serif; font-size: 1.05rem; letter-spacing: 0.06em; color: var(--ink); font-variant-numeric: tabular-nums; }
.gift-copy { cursor: pointer; }
.gift-copy.is-copied { background: var(--sage); color: var(--paper); }
.gift-code { font-family: 'Inter', 'Noto Serif TC', sans-serif; font-size: 0.7rem; letter-spacing: 0.1em; color: var(--ink-faint); margin-top: 0.3rem; }

/* "Powered by jctech" */
.footer-credit { margin-top: 1.4rem; }
.footer-credit a, .home-credit { font-family: 'Inter', sans-serif; font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); text-decoration: none; }
.footer-credit a:hover, .home-credit:hover { color: var(--terracotta); }
.home-credit { padding: 0.15rem 0; opacity: 0.85; }
