:root {
  --ink: #333333;
  --ink-soft: #6b6b6b;
  --line: rgba(0, 0, 0, 0.08);
  --line-soft: rgba(0, 0, 0, 0.05);
  --bg: #ffffff;
  --bg-muted: #f4f3f1;
  --gold: #b3925a;
  --red: #d3564a;
  --radius-pill: 1000px;
  --radius-md: 12px;
  --max-width: 430px;
  --font-serif: 'Noto Serif KR', serif;
  --font-display: 'Cormorant Garamond', serif;
  --font-script: 'Meddon', cursive;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-serif);
  color: var(--ink);
  background: #e9e7e3;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.invite {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* ---------- Cover ---------- */
.cover {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
}

.cover__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.55) 100%);
}

.cover__names {
  position: absolute;
  top: 28px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  color: #fff;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.5px;
}

.cover__bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  text-align: center;
  padding: 0 30px;
  color: #fff;
}

.cover__script {
  font-family: var(--font-script);
  font-size: 30px;
  line-height: 1.15;
  color: #f3e3bd;
  margin: 0 0 16px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

.cover__quote {
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.85);
  white-space: pre-line;
}

.cover__scroll {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
}

.cover__scroll span {
  display: block;
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.7);
  animation: scrollDown 1.8s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ---------- Shared section ---------- */
.section {
  padding: 64px 28px;
  text-align: center;
  border-top: 1px solid var(--line-soft);
}

.badge {
  display: inline-block;
  margin: 0 0 22px;
  padding: 6px 20px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--ink);
}

.deco-label {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--gold);
  text-transform: uppercase;
}

.section__title {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
}

.divider {
  width: 1px;
  height: 44px;
  background: var(--line);
  margin: 28px auto;
}

/* ---------- Invitation ---------- */
.invitation__date {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 500;
}

.invitation__venue {
  margin: 0 0 34px;
  font-size: 14px;
  color: var(--ink-soft);
}

.invitation__message {
  margin: 0;
  font-size: 14.5px;
  line-height: 2;
  color: #444;
  white-space: pre-line;
}

.family-line {
  margin: 0 0 6px;
  font-size: 14.5px;
  letter-spacing: -0.2px;
}

.family-line b {
  font-weight: 700;
  margin: 0 2px;
}

.btn {
  border: none;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn--pill {
  margin-top: 30px;
  padding: 13px 30px;
  background: var(--bg-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
}

.contact-panel {
  max-width: 320px;
  margin: 0 auto;
  max-height: 0;
  overflow: hidden;
  text-align: left;
  transition: max-height 0.28s ease;
}

.contact-panel.is-open {
  margin-top: 14px;
}

.contact-panel__inner {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
}

.contact-row:last-child {
  border-bottom: none;
}

.contact-row__icon {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.contact-row span:nth-child(2) {
  flex: 1;
}

.contact-row__arrow {
  color: var(--ink-soft);
}

/* ---------- Calendar ---------- */
.calendar__bigdate {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 700;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}

.calendar__sub {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--ink-soft);
}

.calendar__dday {
  margin: 0 0 30px;
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 1px;
}

.calendar {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 12px;
  font-size: 13px;
}

.calendar .dow {
  color: var(--ink-soft);
  font-weight: 600;
  padding-bottom: 8px;
}

.calendar .dow--sun,
.calendar .day--sun {
  color: var(--red);
}

.calendar .day {
  width: 30px;
  height: 30px;
  line-height: 30px;
  margin: 0 auto;
  border-radius: 50%;
}

.calendar .day--empty {
  visibility: hidden;
}

.calendar .day--target {
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 22px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
}

.gallery img[hidden] {
  display: none;
}

.btn--ghost {
  width: 100%;
  padding: 13px;
  background: var(--bg-muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- Location ---------- */
.location__venue {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 700;
}

.location__hall {
  margin: 0 0 4px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.location__address {
  margin: 0 0 22px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.map-frame {
  height: 200px;
  border-radius: var(--radius-md);
  background: repeating-linear-gradient(135deg, #f1efec, #f1efec 10px, #ebe8e3 10px, #ebe8e3 20px);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  margin-bottom: 16px;
  text-align: center;
  padding: 0 20px;
}

.map-frame small {
  font-size: 11px;
  opacity: 0.8;
}

.map-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 34px;
}

.btn--outline {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--ink);
  text-decoration: none;
}

.transport {
  text-align: left;
  border-top: 1px solid var(--line-soft);
}

.transport-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}

.transport-item__icon {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.transport-item__title {
  margin: 0 0 6px;
  font-size: 14.5px;
  font-weight: 700;
}

.transport-item__lines p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ---------- Accounts ---------- */
.accordion {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  text-align: left;
}

.accordion__head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  background: var(--bg-muted);
  border: none;
  font-size: 14.5px;
  font-weight: 500;
}

.accordion__head .chev {
  transition: transform 0.2s ease;
}

.accordion.is-open .accordion__head .chev {
  transform: rotate(180deg);
}

.accordion__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-top: 1px solid var(--line-soft);
  gap: 10px;
}

.account-row__info p {
  margin: 0;
  font-size: 14px;
}

.account-row__info .role {
  color: var(--ink-soft);
  font-size: 12.5px;
  margin-bottom: 3px;
}

.account-row__copy {
  flex: none;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-muted);
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.account-row__copy.is-copied {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ---------- Share ---------- */
.share-section {
  padding-bottom: 90px;
}

.btn--dark {
  padding: 15px 46px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.footer-note {
  margin: 26px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
}

/* ---------- To top ---------- */
.totop {
  position: fixed;
  right: max(18px, calc(50vw - var(--max-width) / 2 + 18px));
  bottom: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 40;
}

.totop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: #0b0b0b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__count {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  letter-spacing: 1px;
}

.lightbox__stage {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: pan-y;
}

.lightbox__track {
  display: flex;
}

.lightbox__track.is-animating {
  transition: transform 0.28s ease;
}

.lightbox__track img {
  flex: none;
  width: 100vw;
  max-height: 76vh;
  object-fit: contain;
  padding: 0 24px;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  font-size: 16px;
  z-index: 2;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: none;
  font-size: 20px;
  z-index: 2;
}

.lightbox__nav--prev { left: 10px; }
.lightbox__nav--next { right: 10px; }

.lightbox__dots {
  display: flex;
  gap: 6px;
  margin-top: 18px;
}

.lightbox__dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox__dots span.is-active {
  background: #fff;
  transform: scale(1.3);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 10px);
  background: rgba(30, 30, 30, 0.92);
  color: #fff;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}

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

/* ---------- Scroll reveal ---------- */
.section {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---------- Press feedback ---------- */
.btn,
.account-row__copy,
.gallery img,
.accordion__head,
.contact-row,
.map-links a {
  transition: transform 0.12s ease, background 0.15s ease, opacity 0.15s ease;
}

.btn:active,
.account-row__copy:active,
.gallery img:active,
.accordion__head:active,
.contact-row:active,
.map-links a:active {
  transform: scale(0.96);
}

@media (prefers-reduced-motion: reduce) {
  .section {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cover__scroll span {
    animation: none;
  }

  .btn:active,
  .account-row__copy:active,
  .gallery img:active,
  .accordion__head:active,
  .contact-row:active,
  .map-links a:active {
    transform: none;
  }

  .lightbox__track.is-animating {
    transition: none;
  }
}
