:root {
  --ivory: #f7f3ec;
  --paper: #fffdf9;
  --beige: #e9dfd1;
  --beige-deep: #d4c3b0;
  --brown: #765f50;
  --brown-dark: #43372f;
  --muted: #8a7e75;
  --line: rgba(118, 95, 80, 0.2);
  --shadow: 0 22px 70px rgba(67, 55, 47, 0.13);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Noto Serif KR", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #ded8d0;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--brown-dark);
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.8), transparent 30%),
    #ded8d0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.8;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

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

button,
summary {
  font: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  color: var(--paper);
  background: var(--brown-dark);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.hero {
  position: relative;
  min-height: 100svh;
  padding: 20px 20px calc(64px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--ivory);
}

.photo-frame {
  position: relative;
  overflow: hidden;
  background: var(--beige);
}

.hero-photo {
  min-height: 62svh;
  border-radius: 48% 48% 8px 8px / 24% 24% 8px 8px;
}

.hero-photo img {
  width: 100%;
  height: 62svh;
  min-height: 460px;
  object-fit: cover;
}

.photo-label {
  position: absolute;
  right: 16px;
  bottom: 14px;
  padding: 3px 10px;
  color: rgba(255, 253, 249, 0.9);
  border: 1px solid rgba(255, 253, 249, 0.5);
  border-radius: 999px;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.hero-copy {
  padding-top: 34px;
  text-align: center;
}

.eyebrow,
.section-number,
.role {
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 10px 0 8px;
  font-family: var(--serif);
  font-size: clamp(29px, 8vw, 35px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.ampersand {
  display: inline-block;
  margin: 0 8px;
  color: var(--brown);
  font-size: 0.75em;
  font-style: italic;
}

.hero-date {
  margin: 0;
  color: var(--brown);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.1em;
}

.hero-place {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.section {
  padding: 88px 28px;
  text-align: center;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section h2 {
  margin: 8px 0 30px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.ornament {
  width: 1px;
  height: 42px;
  margin: 0 auto 28px;
  background: var(--beige-deep);
}

.invitation-message {
  margin: 0 0 24px;
  color: #5d5148;
  line-height: 2.15;
}

.couple {
  background: var(--ivory);
}

.couple-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  gap: 18px;
}

.couple h3,
.contact h3 {
  margin: 4px 0 10px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
}

.couple-divider {
  width: 1px;
  height: 84px;
  background: var(--line);
}

.pending-text {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.date-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto 36px;
}

.date-month {
  color: var(--brown);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.date-card strong {
  margin: 5px 0;
  font-family: var(--serif);
  font-size: 74px;
  font-weight: 400;
  line-height: 1;
}

.date-detail {
  color: var(--muted);
}

.calendar {
  padding: 22px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.calendar-head,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px 4px;
  align-items: center;
}

.calendar-head {
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 10px;
}

.calendar-days span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  justify-self: center;
  font-family: var(--serif);
  font-size: 12px;
}

.calendar-days span:nth-child(7n + 1) {
  color: #a26f6f;
}

.calendar-days .wedding-day {
  color: var(--paper);
  border-radius: 50%;
  background: var(--brown);
  box-shadow: 0 0 0 4px rgba(118, 95, 80, 0.12);
}

.countdown {
  min-height: 1.8em;
  margin: 26px 0 0;
  color: var(--brown);
  font-family: var(--serif);
  font-size: 15px;
}

.location h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.location {
  padding-bottom: 32px;
}

.location > p {
  margin: 0;
  color: var(--brown);
}

.location address {
  margin: 12px 0 16px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.location .venue-notice {
  margin: 0 0 18px;
  padding: 11px 14px;
  color: var(--brown);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ivory);
  font-size: 12px;
}

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

.text-link {
  display: inline-flex;
  padding: 7px 16px;
  border: 1px solid var(--beige-deep);
  border-radius: 999px;
  color: var(--brown);
  font-size: 12px;
  text-underline-offset: 3px;
}

.map-section {
  padding: 0 20px 88px;
  background: var(--ivory);
}

.map-card {
  margin: 0;
}

.map-card a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.map-card img {
  width: 100%;
  height: auto;
}

.map-card figcaption {
  padding: 10px 20px 22px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.map-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.map-details > div {
  position: relative;
  padding: 0 7px;
}

.map-details > div + div {
  border-left: 1px solid var(--line);
}

.map-detail-icon {
  display: grid;
  width: 34px;
  height: 34px;
  margin: 0 auto 7px;
  place-items: center;
  border-radius: 50%;
  background: rgba(118, 95, 80, 0.1);
  font-size: 15px;
  filter: grayscale(1);
}

.map-details dt {
  color: var(--brown);
  font-family: var(--serif);
  font-size: 14px;
}

.map-details dd {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.route-guide {
  margin-top: 22px;
  padding: 18px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 249, 0.65);
}

.route-title {
  margin: 0 0 13px;
  color: var(--brown);
  font-family: var(--serif);
  font-size: 13px;
  text-align: center;
}

.route-guide ol {
  display: flex;
  margin: 0;
  padding: 0;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  list-style: none;
}

.route-guide li {
  position: relative;
  flex: 1;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.route-guide li:not(:last-child)::after {
  position: absolute;
  top: 9px;
  right: -6px;
  color: var(--beige-deep);
  content: "›";
  font-size: 16px;
}

.route-guide li span {
  display: grid;
  width: 19px;
  height: 19px;
  margin: 0 auto 6px;
  place-items: center;
  color: var(--paper);
  border-radius: 50%;
  background: var(--brown);
  font-family: var(--serif);
  font-size: 10px;
}

.parking-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
}

.section-intro {
  margin: -12px 0 28px;
  color: var(--muted);
  font-size: 13px;
}

.account details {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  text-align: left;
  background: var(--paper);
}

.account summary {
  position: relative;
  padding: 15px 42px 15px 16px;
  color: var(--brown);
  cursor: pointer;
  list-style: none;
}

.account summary::-webkit-details-marker {
  display: none;
}

.account summary::after {
  position: absolute;
  top: 50%;
  right: 17px;
  content: "+";
  font-family: var(--serif);
  font-size: 20px;
  transform: translateY(-50%);
}

.account details[open] summary::after {
  content: "−";
}

.account-content {
  padding: 14px 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--ivory);
  font-size: 13px;
}

.account-content p {
  margin: 0;
}

.account-row {
  display: flex;
  padding: 12px 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-row + .account-row {
  border-top: 1px solid var(--line);
}

.account-row > div {
  display: flex;
  flex-direction: column;
}

.account-row span {
  color: var(--muted);
  font-size: 10px;
}

.account-row strong {
  color: var(--brown-dark);
  font-size: 13px;
  font-weight: 600;
}

.account-row > p {
  color: var(--muted);
  font-size: 11px;
}

.contact {
  background: var(--ivory);
}

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

.contact-grid article {
  padding: 20px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.55);
}

.contact-actions {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.button {
  display: inline-flex;
  min-height: 34px;
  padding: 6px 13px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--beige-deep);
  border-radius: 999px;
  color: var(--brown);
  font-size: 12px;
  text-decoration: none;
}

.button.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

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

.featured-carousel {
  position: relative;
  grid-column: 1 / -1;
}

.gallery-item {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--beige);
  cursor: zoom-in;
}

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

.gallery-item-last {
  grid-column: 1 / -1;
}

.gallery-item-last img {
  aspect-ratio: 1.48 / 1;
}

.carousel-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 1.48 / 1;
}

.carousel-viewport .carousel-slide {
  position: absolute;
  inset: 0;
  height: 100%;
  aspect-ratio: auto;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 800ms ease,
    transform 500ms ease;
}

.carousel-viewport .carousel-slide.is-active {
  opacity: 1;
}

.carousel-controls {
  position: absolute;
  right: 0;
  bottom: 12px;
  left: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 7px;
  pointer-events: none;
}

.carousel-controls button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 1px solid rgba(255, 253, 249, 0.9);
  border-radius: 50%;
  background: rgba(67, 55, 47, 0.35);
  box-shadow: 0 1px 4px rgba(67, 55, 47, 0.2);
  cursor: pointer;
  pointer-events: auto;
}

.carousel-controls button.is-active {
  background: var(--paper);
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.02);
}

.gallery-item:focus-visible,
.lightbox-close:focus-visible,
.account summary:focus-visible,
.text-link:focus-visible {
  outline: 2px solid var(--brown);
  outline-offset: 3px;
}

.coming-soon {
  padding: 34px 20px;
  color: var(--muted);
  border: 1px dashed var(--beige-deep);
  background: var(--ivory);
}

.coming-soon span {
  display: block;
  margin-bottom: 8px;
  color: var(--brown);
  font-family: var(--serif);
  font-size: 24px;
}

.coming-soon p {
  margin: 0;
  font-size: 13px;
}

.footer {
  padding: 100px 28px calc(70px + env(safe-area-inset-bottom));
  color: var(--paper);
  background: var(--brown-dark);
  text-align: center;
}

.footer .section-number {
  color: rgba(255, 253, 249, 0.55);
}

.footer-title {
  margin: 18px 0 14px;
  font-family: var(--serif);
  font-size: 36px;
  font-style: italic;
}

.footer > p:not(.section-number, .footer-title, .footer-names) {
  margin: 0;
  color: rgba(255, 253, 249, 0.7);
  font-size: 12px;
}

.footer-names {
  margin: 28px 0 0;
  font-family: var(--serif);
  letter-spacing: 0.08em;
}

.lightbox {
  width: min(calc(100% - 28px), 820px);
  max-height: calc(100svh - 28px);
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(31, 27, 24, 0.88);
  backdrop-filter: blur(4px);
}

.lightbox img {
  width: 100%;
  max-height: calc(100svh - 72px);
  object-fit: contain;
}

.lightbox-close {
  display: block;
  margin: 0 0 10px auto;
  padding: 6px 12px;
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(31, 27, 24, 0.7);
  cursor: pointer;
}

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

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  .hero {
    padding-right: 14px;
    padding-left: 14px;
  }

  .contact-actions {
    flex-direction: column;
  }
}

@media (min-width: 431px) {
  body {
    padding: 34px 0;
  }

  .invitation-shell {
    border-radius: 4px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

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

@media print {
  html,
  body {
    background: #fff;
  }

  body {
    padding: 0;
  }

  .invitation-shell {
    width: 100%;
    box-shadow: none;
  }

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