:root {
  color-scheme: light;
  --paper: #fbf5eb;
  --paper-strong: #fffaf1;
  --ink: #2e332b;
  --muted: #746d62;
  --line: #e2d6c3;
  --sage: #667a62;
  --rose: #bd7d74;
  --gold: #b9965d;
  --shadow: 0 18px 42px rgba(69, 55, 37, 0.13);
  font-family: "Noto Serif KR", "Apple SD Gothic Neo", "Malgun Gothic", serif;
}

* {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  word-break: keep-all;
  overflow-wrap: break-word;
}

html {
  scroll-behavior: smooth;
}

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

button,
input,
select {
  font: inherit;
}

.invitation {
  width: min(100%, 480px);
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 80px rgba(54, 42, 30, 0.16);
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.hero__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 52%;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(38, 31, 25, 0.28), rgba(38, 31, 25, 0.1) 36%, rgba(255, 250, 241, 0.8) 100%),
    linear-gradient(to top, rgba(255, 250, 241, 0.88), transparent 46%);
  z-index: -1;
}

.hero__content {
  width: min(78%, 340px);
  padding: 72px 0 42px;
  text-align: center;
  animation: rise 900ms ease-out both;
}

.eyebrow,
.section__label {
  margin: 0 0 18px;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: #fffaf3;
  text-shadow: 0 2px 18px rgba(38, 31, 25, 0.38);
  font-size: clamp(3.4rem, 17vw, 5.5rem);
  line-height: 0.98;
  font-weight: 500;
}

.hero__date {
  margin: 34px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  color: #fffaf3;
  text-shadow: 0 2px 14px rgba(38, 31, 25, 0.35);
  word-break: normal;
}

.hero__place {
  margin: 0;
  color: #fffaf3;
  text-shadow: 0 2px 14px rgba(38, 31, 25, 0.35);
  font-size: 0.95rem;
}

.quick-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 54px;
  background: rgba(251, 245, 235, 0.9);
  border-block: 1px solid rgba(186, 160, 116, 0.32);
  backdrop-filter: blur(14px);
}

.quick-nav a {
  display: grid;
  place-items: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.86rem;
}

.section {
  padding: 72px 28px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.section h2 {
  margin: 0 0 24px;
  font-size: 1.45rem;
  font-weight: 600;
}

.section p {
  margin: 10px auto;
  max-width: 34ch;
  color: var(--muted);
  line-height: 1.85;
}

.keep {
  display: inline-block;
  white-space: nowrap;
}

.intro {
  background: var(--paper-strong);
}

.intro-message {
  display: grid;
  gap: 4px;
}

.intro-message span {
  display: block;
  white-space: nowrap;
}

.family {
  display: grid;
  gap: 28px;
}

.family p {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.family strong {
  font-size: 1.28rem;
  font-weight: 600;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--sage);
  border-radius: 999px;
  background: transparent;
  color: var(--sage);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.button--dark {
  background: var(--sage);
  color: #fffaf3;
}

.info-list {
  margin: 0;
  display: grid;
  gap: 12px;
  text-align: left;
}

.info-list div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: baseline;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.info-list dt {
  color: var(--gold);
  font-size: 0.88rem;
}

.info-list dd {
  margin: 0;
  line-height: 1.55;
}

.gallery {
  background: #f5ede1;
}

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

.photo {
  aspect-ratio: 3 / 4;
  border: 0;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.photo--one {
  grid-column: 1 / -1;
  aspect-ratio: 4 / 5;
  background-image: url("assets/photos/photo-1.jpg");
  background-position: center 38%;
}

.photo--two {
  background-image: url("assets/photos/photo-2.jpg");
  background-position: center;
}

.photo--three {
  background-image: url("assets/photos/photo-3.jpg");
  background-position: center 38%;
}

.photo--four {
  background-image: url("assets/photos/photo-4.jpg");
  background-position: center;
}

.photo--five {
  background-image: url("assets/photos/photo-5.jpg");
  background-position: center;
}

.map-card {
  padding: 8px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.map-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.transport {
  margin-top: 22px;
}

.transit-guide {
  display: grid;
  gap: 0;
  margin-top: 28px;
  text-align: left;
}

.transit-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.transit-guide strong {
  color: var(--sage);
  font-size: 0.92rem;
  line-height: 1.55;
}

.transit-copy {
  display: grid;
  gap: 7px;
}

.transit-copy p {
  max-width: none;
  margin: 0;
  line-height: 1.62;
}

.route-line {
  display: grid;
  grid-template-columns: minmax(0, max-content) 18px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.bus-line {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 8px;
}

.parking-line {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
}

.parking-note {
  margin-top: 3px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fffaf3;
  color: var(--muted);
  font-size: 0.88rem;
}

.transit-label {
  color: var(--gold);
  font-weight: 600;
  white-space: nowrap;
}

.route-arrow {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
}

.rsvp-form {
  display: grid;
  gap: 14px;
  text-align: left;
}

.rsvp-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.rsvp-form input,
.rsvp-form select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fffaf3;
  color: var(--ink);
}

.rsvp-form .button {
  width: 100%;
  margin-top: 8px;
}

.form-result {
  min-height: 28px;
}

.account-list {
  display: grid;
  gap: 10px;
  text-align: left;
}

.account-toggle {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf3;
  color: var(--ink);
  cursor: pointer;
}

.account-list p {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px;
  border-radius: 8px;
  background: #efe5d7;
  color: var(--ink);
  text-align: center;
}

.share {
  padding-bottom: 96px;
  background: var(--paper-strong);
}

.bottom-qr {
  display: block;
  width: 148px;
  height: 148px;
  margin: 34px auto 0;
  border-radius: 8px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  width: min(calc(100% - 32px), 420px);
  padding: 14px 16px;
  border-radius: 999px;
  background: rgba(46, 51, 43, 0.92);
  color: #fffaf3;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
  z-index: 20;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.photo-dialog {
  width: min(calc(100% - 28px), 460px);
  max-height: 88svh;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.photo-dialog::backdrop {
  background: rgba(23, 23, 19, 0.78);
}

.photo-dialog img {
  display: block;
  width: 100%;
  max-height: 88svh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.photo-dialog__close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 250, 243, 0.58);
  border-radius: 50%;
  background: rgba(46, 51, 43, 0.72);
  color: #fffaf3;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 360px) {
  .section {
    padding-inline: 20px;
  }

  .intro-message span {
    white-space: normal;
  }

  .button {
    width: 100%;
  }

  .transit-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .route-line {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .route-arrow {
    display: none;
  }
}
