:root {
  --paper: #EFF3EE;       /* pale jade-tinted paper */
  --paper-2: #E4EAE2;     /* slightly deeper panel tone */
  --ink: #1B2430;         /* near-black ink for text */
  --ink-soft: #4A5563;    /* secondary text */
  --seal: #B33A3A;        /* muted vermillion accent, used sparingly */
  --line: #C9D2C6;        /* hairline borders */
  --gold: #A9812F;        /* muted brass, for small details only */
  --white: #FFFFFF;

  /* System font stacks only — no webfont CDN calls, so the page loads
     reliably from mainland China as well as the US. */
  --font-display: Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
}

a { color: inherit; }

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

.eyebrow {
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.seal-mark {
  width: 10px;
  height: 10px;
  background: var(--seal);
  border-radius: 50%;
  display: inline-block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 4px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover { background: #33404F; }

.btn.secondary {
  background: transparent;
  color: var(--ink);
}

.btn.secondary:hover { background: var(--paper-2); }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input[type="text"], input[type="number"], input[type="password"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
}

label {
  display: block;
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field { margin-bottom: 20px; }

.field-hint {
  font-size: 13px;
  color: var(--ink-soft);
  margin: -4px 0 12px;
  line-height: 1.5;
}

input[type="email"], input[type="tel"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 32px;
}

.error-text {
  color: var(--seal);
  font-size: 14px;
  margin-top: 8px;
}

/* --- Site nav (index / photos) --- */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  max-width: 960px;
  margin: 0 auto;
}
.site-nav .mark { font-family: var(--font-display); font-size: 18px; text-decoration: none; color: inherit; }
.site-nav .links { display: flex; gap: 22px; font-size: 14px; }
.site-nav .links a { text-decoration: none; color: var(--ink-soft); }
.site-nav .links a:hover { color: var(--ink); }

.lang-toggle {
  display: flex;
  gap: 4px;
  font-size: 13px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
}
.lang-toggle button {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-soft);
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--white);
}

.container.wide { max-width: 960px; }

/* --- Hero --- */
.hero-block { text-align: center; padding: 40px 24px 20px; }
.hero-block h1 { font-family: var(--font-display); font-size: 40px; font-weight: 500; margin: 14px 0 6px; }
.hero-block .date { font-size: 16px; color: var(--ink-soft); }

/* --- Sections --- */
.section { max-width: 640px; margin: 0 auto; padding: 48px 24px; border-top: 1px solid var(--line); }
.section h2 { font-family: var(--font-display); font-size: 24px; font-weight: 500; margin: 0 0 18px; }
.section p { line-height: 1.7; color: var(--ink-soft); }

.detail-row { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.detail-row:last-child { border-bottom: none; }
.detail-row .label { width: 110px; flex-shrink: 0; font-size: 13px; color: var(--ink-soft); padding-top: 2px; }
.detail-row .value { font-size: 15px; }
.detail-row .value .sub { color: var(--ink-soft); font-size: 14px; margin-top: 2px; }
.direction-links { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.direction-links a {
  font-size: 13px; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: 4px; padding: 5px 10px;
  background: var(--white);
}
.direction-links a:hover { background: var(--paper-2); }

.wechat-qr-wrap {
  text-align: center;
  margin: 20px 0 8px;
}
.wechat-qr {
  width: min(240px, 70vw);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}
.wechat-qr-note {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 10px 0 0;
}
.wechat-downloads {
  margin-top: 18px;
}
.travel-guide h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  margin: 28px 0 10px;
}
.travel-guide ul {
  margin: 0 0 8px;
  padding-left: 1.2em;
  color: var(--ink-soft);
  line-height: 1.7;
}
.travel-guide li { margin-bottom: 6px; }
.travel-guide a { color: var(--ink); }

/* --- Homepage photo background --- */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.page-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
body.home {
  position: relative;
  background: transparent;
  padding: 0 16px 40px;
}
body.home > :not(.page-bg) {
  position: relative;
  z-index: 1;
}
.content-panel {
  background: rgba(239, 243, 238, 0.95);
  border: 1px solid rgba(201, 210, 198, 0.95);
  border-radius: 6px;
  box-shadow: 0 8px 28px rgba(27, 36, 48, 0.16);
}
body.home .site-nav.content-panel {
  margin-top: 16px;
  margin-bottom: 12px;
}
body.home .hero-block.content-panel,
body.home .section.content-panel,
body.home .rsvp-cta.content-panel,
body.home footer.content-panel {
  max-width: 640px;
  margin: 16px auto;
}
body.home .rsvp-cta.content-panel p {
  margin: 0;
}
.event-details .detail-row .label {
  width: 138px;
}
.venue-photo {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  border-radius: 4px;
  margin: 0 0 8px;
}

/* --- Photo gallery --- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery figure { margin: 0; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 4px; background: var(--paper-2); cursor: pointer; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery .empty-note { grid-column: 1 / -1; text-align: center; color: var(--ink-soft); font-size: 14px; padding: 40px 0; }

.lightbox {
  position: fixed; inset: 0; background: rgba(27,36,48,0.9);
  display: none; align-items: center; justify-content: center; padding: 24px; z-index: 50;
}
.lightbox img { max-height: 90vh; max-width: 90vw; border-radius: 4px; }
.lightbox .close-btn { position: absolute; top: 20px; right: 24px; color: var(--white); background: none; border: none; font-size: 28px; cursor: pointer; }

.rsvp-cta { text-align: center; padding: 56px 24px; }
footer { text-align: center; padding: 32px 24px; font-size: 13px; color: var(--ink-soft); }

@media (max-width: 480px) {
  .hero-block h1 { font-size: 30px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .event-details .detail-row {
    flex-direction: column;
    gap: 6px;
  }
  .event-details .detail-row .label { width: auto; }
  .venue-photo { height: 160px; }
}
