:root {
  --bg: #f7efe3;
  --paper: #fffaf2;
  --paper-soft: #fbf4ea;
  --text: #3f3328;
  --muted: #8b7a69;
  --line: #e8d8c6;
  --accent: #8f6345;
  --accent-dark: #6f4931;
  --accent-soft: #ead6c4;
  --shadow: 0 18px 45px rgba(80, 54, 35, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(255, 250, 242, 0.9), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  line-height: 1.7;
}

img {
  display: block;
  max-width: 100%;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: 100%;
  min-height: 100vh;
  padding: 0;
}

.invitation {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.section {
  padding: 74px 24px;
  text-align: center;
}

.cover {
  padding: 0 0 52px;
}

.cover-photo-wrap {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--accent-soft);
  overflow: hidden;
}

.cover-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-text {
  padding: 42px 24px 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-weight: 500;
  letter-spacing: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.35;
}

h2 {
  font-size: 23px;
  line-height: 1.45;
}

.couple-name {
  margin: 30px 0 12px;
  font-size: 24px;
  font-weight: 600;
}

.couple-name span {
  display: inline-block;
  margin: 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.wedding-date,
.wedding-place {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.quick-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 52px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.94);
  backdrop-filter: blur(12px);
}

.quick-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 600;
}

.message {
  margin: 30px 0 0;
  color: #5a4c40;
  font-size: 16px;
}

.parents {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.parents p {
  margin: 8px 0;
  color: var(--muted);
  font-size: 15px;
}

.parents strong {
  color: var(--text);
  font-weight: 600;
}

.parents span {
  color: var(--accent-dark);
  font-weight: 700;
}

.date-section {
  background: var(--paper-soft);
}

.date-card {
  margin: 30px auto 24px;
  padding: 30px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.7);
}

.date-large {
  margin: 0;
  color: var(--accent-dark);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
}

.date-detail {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.dday {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin: 22px 0 0;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fffdf9;
  font-size: 14px;
  font-weight: 700;
}

.button-row,
.contact-grid {
  display: grid;
  gap: 10px;
}

.button-row {
  grid-template-columns: 1fr;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background: var(--accent);
  color: #fffdf9;
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-ghost {
  border-color: var(--accent-soft);
  background: #fffaf2;
  color: var(--accent-dark);
}

.button-light {
  border-color: var(--line);
  background: #fffaf2;
  color: var(--text);
}

.disabled-link {
  opacity: 0.58;
  cursor: default;
  pointer-events: none;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 30px;
}

.gallery-item {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--accent-soft);
  cursor: pointer;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 280ms ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-wide {
  grid-column: 1 / -1;
}

.gallery-wide img {
  aspect-ratio: 16 / 10;
}

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

.info-list div,
.account-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 250, 242, 0.72);
}

.info-list span,
.account-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

.info-list strong,
.account-number {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.contact-grid {
  grid-template-columns: 1fr 1fr;
  margin-top: 30px;
}

.account-list {
  display: grid;
  gap: 12px;
  margin-top: 30px;
  text-align: left;
}

.account-card {
  display: grid;
  gap: 12px;
}

.account-title {
  margin: 0;
  color: var(--accent-dark);
  font-size: 15px;
  font-weight: 700;
}

.account-meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.sub-text {
  margin: 18px 0 24px;
  color: var(--muted);
  font-size: 15px;
}

.location-viewer {
  margin-top: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.72);
  overflow: hidden;
}

.guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  text-align: left;
}

.guide-header p {
  margin: 0;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 700;
}

.zoom-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  background: #fffaf2;
  color: var(--accent-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.zoom-button span {
  position: relative;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.zoom-button span::after {
  position: absolute;
  right: -6px;
  bottom: -5px;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform: rotate(45deg);
}

.guide-image-button {
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}

.guide-image {
  width: 100%;
  height: auto;
}

.guide-modal {
  padding: 76px 16px 24px;
}

.guide-modal-image {
  width: auto;
  max-width: min(100%, 960px);
  max-height: calc(100vh - 116px);
  border-radius: 16px;
  background: #fff;
  object-fit: contain;
}

.footer {
  padding: 48px 24px 58px;
  border-top: 1px solid var(--line);
  background: var(--paper-soft);
  text-align: center;
}

.footer p {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 15px;
}

.footer a {
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 700;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 40;
  max-width: calc(100% - 40px);
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(63, 51, 40, 0.92);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(38, 28, 21, 0.88);
}

.modal.is-open {
  display: flex;
}

.modal img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 18px;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 481px) {
  .page-shell {
    padding: 28px 0;
  }

  .invitation {
    border-radius: 24px;
  }

  .button-row {
    grid-template-columns: 1fr 1fr;
  }

  .map-actions {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 360px) {
  .section {
    padding-left: 18px;
    padding-right: 18px;
  }

  h1 {
    font-size: 27px;
  }

  h2 {
    font-size: 21px;
  }

  .date-large {
    font-size: 29px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
