:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ink: #24322d;
  --muted: #69776f;
  --paper: #fffaf4;
  --warm: #f5eee5;
  --sage: #587568;
  --sage-dark: #334d43;
  --rose: #b66f62;
  --rose-dark: #8d4c42;
  --gold: #9c7655;
  --line: rgba(52, 70, 61, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  flex: 0 0 auto;
}

.hero {
  min-height: 92svh;
  position: relative;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #7d806a url('/images/wedding/hero-bike.jpg') 0% 56% / auto 112% no-repeat;
}

.heroOverlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(27, 26, 22, 0.18) 0%, rgba(27, 26, 22, 0.16) 35%, rgba(24, 29, 25, 0.74) 100%),
    linear-gradient(90deg, rgba(29, 32, 28, 0.46), rgba(29, 32, 28, 0.02) 72%);
}

.heroInner {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  padding: 88px 22px 42px;
  color: #fffdf8;
}

.eyebrow,
.sectionKicker {
  margin: 0 0 10px;
  color: var(--rose-dark);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f8dfc8;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.15rem;
  font-weight: 500;
  line-height: 1.02;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.26);
}

.names {
  margin: 12px 0 0;
  font-size: 1.32rem;
  font-weight: 700;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.26);
}

.heroMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.iconText,
.primaryAction,
.secondaryAction,
.venueActions a,
.submitButton,
.adminActions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.iconText {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  font-size: 0.92rem;
}

.inviteLine {
  max-width: 510px;
  margin: 22px 0 0;
  color: rgba(255, 253, 248, 0.88);
  font-size: 1.05rem;
  line-height: 1.8;
}

.heroActions {
  display: flex;
  gap: 12px;
  margin-top: 26px;
}

.primaryAction,
.secondaryAction,
.submitButton,
.adminActions button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.primaryAction {
  padding: 0 18px;
  background: #fffaf4;
  color: var(--sage-dark);
}

.secondaryAction {
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  color: #fffdf8;
}

main {
  background: var(--paper);
}

.section,
.detailsBand,
.rsvpBand {
  padding: 58px 20px;
}

.sectionHead {
  width: min(100%, 980px);
  margin: 0 auto 24px;
}

.sectionHead h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.18;
}

.sectionIntro {
  max-width: 640px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.storyTimeline {
  width: min(100%, 980px);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.storyMoment,
.venuePanel,
.scheduleItem,
.lodgingNote,
.rsvpForm,
.adminLogin,
.summaryGrid article,
.rsvpRow,
.emptyState {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 244, 0.82);
  box-shadow: 0 12px 32px rgba(52, 70, 61, 0.08);
}

.storyMoment {
  overflow: hidden;
  background: #fffdf8;
}

.storyMoment img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.storyMomentCopy {
  padding: 18px;
}

.storyMoment time {
  color: var(--rose-dark);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.storyMoment h3 {
  margin: 9px 0 8px;
  font-size: 1.12rem;
}

.storyMoment p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.storyMoment[data-moment="begining"] img {
  object-position: center 46%;
}

.storyMoment[data-moment="study"] img {
  object-position: center 42%;
}

.storyMoment[data-moment="cooking"] img {
  object-position: 64% 54%;
}

.storyMoment[data-moment="universal"] img {
  aspect-ratio: 4 / 5;
}

.storyMoment[data-moment="universal"] img {
  object-position: center 38%;
}

.storyMoment[data-moment="yunnan"] img {
  object-position: center 46%;
}

.storyMoment.isFeature img {
  aspect-ratio: 16 / 11;
  object-position: center 55%;
}

.storyMoment[data-moment="engage"] img {
  object-position: 64% 72%;
}

.venuePanel h3,
.scheduleItem h3,
.lodgingNote h3 {
  margin: 10px 0 8px;
  font-size: 1.12rem;
}

.venuePanel p,
.scheduleItem p,
.lodgingNote p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.photoEssay {
  padding: 8px 20px 62px;
  background: var(--paper);
}

.photoEssay img,
.promisePhoto img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photoEssay figure,
.promisePhoto {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fffdf8;
  box-shadow: 0 16px 44px rgba(52, 70, 61, 0.1);
}

.essayLead {
  position: relative;
  width: min(100%, 980px);
  height: min(48svh, 440px);
  margin: 0 auto;
}

.essayLead img {
  object-position: center 68%;
}

.essayLead::after,
.promisePhoto::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(25, 32, 28, 0.02), rgba(25, 32, 28, 0.6));
  pointer-events: none;
}

.essayLead figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  color: #fffdf8;
}

.essayLead span,
.promisePhoto p {
  display: block;
  margin: 0 0 8px;
  color: #f8dfc8;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.essayLead strong,
.promisePhoto h2 {
  display: block;
  max-width: 620px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1.18;
}

.essayPair {
  width: min(100%, 980px);
  display: grid;
  gap: 12px;
  margin: 12px auto 0;
}

.essayPair figure {
  display: grid;
  grid-template-rows: minmax(250px, 44svh) auto;
}

.essayPair figcaption {
  padding: 14px 16px 16px;
  color: var(--sage-dark);
  font-weight: 800;
  line-height: 1.6;
}

.photoEssay .essayFinal {
  width: min(100%, 980px);
  display: grid;
  grid-template-rows: minmax(250px, 44svh) auto;
  margin: 12px auto 0;
}

.essayFinal img {
  object-position: 58% 88%;
}

.essayFinal figcaption {
  padding: 14px 16px 16px;
  color: var(--sage-dark);
  font-weight: 800;
  line-height: 1.6;
}

.detailsBand {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(238, 243, 236, 0.92) 0%, rgba(255, 250, 244, 0.95) 100%),
    url('/images/wedding/window.jpg') center / cover no-repeat;
}

.detailsBand > * {
  position: relative;
  z-index: 1;
}

.detailsGrid {
  width: min(100%, 980px);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.venuePanel {
  min-height: 260px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(38, 58, 50, 0.9), rgba(33, 45, 39, 0.66)),
    url('/images/wedding/garden.jpg') 50% 42% / cover no-repeat;
  color: #fffdf8;
}

.panelIcon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
}

.panelIcon svg {
  width: 22px;
  height: 22px;
}

.venuePanel p {
  color: rgba(255, 253, 248, 0.82);
}

.venueActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.venueActions a {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fffdf8;
  font-weight: 700;
}

.scheduleList {
  display: grid;
  gap: 10px;
}

.scheduleItem {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 15px;
  min-height: 98px;
  padding: 18px;
}

.scheduleItem time {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: #f2e1d7;
  color: var(--rose-dark);
  font-weight: 800;
}

.scheduleItem h3 {
  margin-top: 2px;
}

.lodgingNote {
  width: min(100%, 980px);
  margin: 14px auto 0;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  padding: 18px;
}

.lodgingNote svg {
  width: 22px;
  height: 22px;
  color: var(--gold);
  margin-top: 3px;
}

.promisePhoto {
  position: relative;
  min-height: 58svh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.promisePhoto img {
  position: absolute;
  inset: 0;
  object-position: 36% center;
}

.promisePhoto div {
  position: relative;
  z-index: 1;
  min-height: 58svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 36px 20px;
  color: #fffdf8;
}

.promisePhoto h2 {
  margin: 0;
}

.rsvpBand {
  background: linear-gradient(180deg, #fffaf4 0%, #f4ece0 100%);
}

.rsvpForm {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 18px;
  background: #fffdf8;
}

.rsvpForm label,
.adminLogin label {
  display: grid;
  gap: 8px;
  margin-bottom: 15px;
}

.rsvpForm label span,
.adminLogin label span,
.fieldLabel {
  color: var(--sage-dark);
  font-size: 0.92rem;
  font-weight: 800;
}

.rsvpForm input,
.rsvpForm textarea,
.adminLogin input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(52, 70, 61, 0.2);
  border-radius: 8px;
  background: #fffaf4;
  color: var(--ink);
  outline: none;
  padding: 12px 13px;
}

.rsvpForm textarea {
  resize: vertical;
  min-height: 108px;
}

.rsvpForm input:focus,
.rsvpForm textarea:focus,
.adminLogin input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(88, 117, 104, 0.15);
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.fieldBlock {
  margin: 16px 0;
}

.radioGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 9px;
}

.radioCard {
  min-height: 70px;
  margin: 0;
  padding: 13px;
  border: 1px solid rgba(52, 70, 61, 0.17);
  border-radius: 8px;
  background: #fffaf4;
  cursor: pointer;
}

.radioCard input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radioCard span {
  display: block;
  color: var(--ink);
  font-weight: 800;
}

.radioCard small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.radioCard.isSelected {
  border-color: var(--sage);
  background: #eaf1ec;
  box-shadow: inset 0 0 0 1px var(--sage);
}

.guestStepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid rgba(52, 70, 61, 0.14);
  border-radius: 8px;
  background: #f7f1e8;
}

.guestStepper p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.stepperControl {
  display: grid;
  grid-template-columns: 38px 38px 38px;
  align-items: center;
  gap: 6px;
}

.stepperControl button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(52, 70, 61, 0.2);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--sage-dark);
}

.stepperControl button:disabled {
  opacity: 0.4;
}

.stepperControl strong {
  text-align: center;
  font-size: 1.18rem;
}

.privacyCopy {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.submitButton {
  width: 100%;
  background: var(--sage-dark);
  color: #fffdf8;
}

.submitButton:disabled {
  cursor: wait;
  opacity: 0.76;
}

.formStatus {
  margin: 13px 0 0;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
}

.formStatus.success {
  background: #e7f0ea;
  color: var(--sage-dark);
}

.formStatus.error {
  background: #f8e3dd;
  color: var(--rose-dark);
}

.formStatus.loading {
  background: #f0ebe4;
  color: var(--ink);
}

.footer {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  background: var(--sage-dark);
  color: #fffdf8;
  font-weight: 700;
}

.adminBody {
  min-height: 100svh;
  background:
    linear-gradient(180deg, rgba(238, 243, 236, 0.92), rgba(255, 250, 244, 0.94)),
    url('/images/hero-garden.png') center / cover fixed;
}

.adminShell,
.adminDashboard {
  min-height: 100svh;
  padding: 30px 18px;
}

.adminLogin {
  width: min(100%, 420px);
  margin: 8vh auto 0;
  padding: 24px;
  background: rgba(255, 253, 248, 0.94);
}

.adminMark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e7f0ea;
  color: var(--sage-dark);
}

.adminMark svg {
  width: 25px;
  height: 25px;
}

.adminLogin h1,
.adminHeader h1 {
  margin: 14px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
}

.adminLogin p {
  color: var(--muted);
  line-height: 1.6;
}

.adminDashboard {
  padding: 24px 18px 52px;
}

.adminHeader,
.summaryGrid,
.rsvpList,
.dashboardError {
  width: min(100%, 1080px);
  margin-left: auto;
  margin-right: auto;
}

.adminHeader {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.adminActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.adminActions button {
  width: auto;
  min-height: 42px;
  padding: 0 13px;
  background: var(--sage-dark);
  color: #fffdf8;
}

.summaryGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.summaryGrid article {
  padding: 18px;
}

.summaryGrid svg {
  width: 22px;
  height: 22px;
  color: var(--gold);
}

.summaryGrid strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
  font-weight: 800;
}

.summaryGrid p {
  margin: 3px 0 0;
  color: var(--muted);
}

.rsvpList {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.rsvpRow {
  padding: 16px;
  background: rgba(255, 253, 248, 0.94);
}

.rsvpPerson {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rsvpPerson strong {
  font-size: 1.08rem;
}

.rsvpPerson span,
.rsvpRow p {
  color: var(--muted);
}

.rsvpTags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.rsvpTags span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  background: #eaf1ec;
  color: var(--sage-dark);
  font-weight: 800;
  font-size: 0.88rem;
}

.rsvpMessage {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.emptyState {
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

@media (min-width: 760px) {
  .hero {
    min-height: 88svh;
    background-image: url('/images/wedding/hero-bike.jpg');
    background-position: center 42%;
  }

  .heroInner {
    padding: 110px 42px 58px;
  }

  .hero h1 {
    font-size: 5.6rem;
  }

  .names {
    font-size: 1.55rem;
  }

  .section,
  .detailsBand,
  .rsvpBand {
    padding: 78px 34px;
  }

  .photoEssay {
    padding: 8px 34px 86px;
  }

  .sectionHead h2 {
    font-size: 2.6rem;
  }

  .storyTimeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .storyMoment.isFeature {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(270px, 0.8fr);
  }

  .storyMoment.isFeature img {
    height: 100%;
    min-height: 430px;
    aspect-ratio: auto;
  }

  .storyMoment.isFeature .storyMomentCopy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px;
  }

  .storyMoment.isFeature h3 {
    font-size: 1.5rem;
  }

  .detailsGrid {
    grid-template-columns: 1fr 1.1fr;
    align-items: stretch;
  }

  .essayPair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .essayLead {
    height: min(56svh, 520px);
  }

  .promisePhoto div {
    padding: 58px 42px;
  }

  .promisePhoto h2 {
    font-size: 3rem;
  }

  .radioGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lodgingGrid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .rsvpForm {
    padding: 24px;
  }
}

@media (max-width: 430px) {
  .heroActions,
  .adminHeader,
  .rsvpPerson {
    align-items: stretch;
    flex-direction: column;
  }

  .primaryAction,
  .secondaryAction {
    width: 100%;
  }

  .radioGrid,
  .summaryGrid {
    grid-template-columns: 1fr;
  }

  .scheduleItem {
    grid-template-columns: 62px 1fr;
    padding: 14px;
  }

  .scheduleItem time {
    width: 54px;
    height: 54px;
    font-size: 0.9rem;
  }

  .guestStepper {
    align-items: flex-start;
    flex-direction: column;
  }
}
