@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@300;400;600&display=swap');

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

:root {
  --bg:          #FAFAF7;
  --surface:     #FFFFFF;
  --text:        #2C2C2C;
  --muted:       #888888;
  --accent:      #B88C72;
  --accent-lt:   #F0E4DA;
  --line:        #E8E0D8;
  --serif:       'Noto Serif KR', 'Nanum Myeongjo', Georgia, serif;
  --sans:        -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: #D8D0C8;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

.std-page {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

@media (min-width: 481px) {
  .std-page {
    box-shadow: 0 0 80px rgba(0,0,0,0.22);
  }
}

/* ── Cover ─────────────────────────────── */
.sc-cover {
  position: relative;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cover-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  opacity: 0;
  transition: opacity 2s ease;
}

.cover-photo.is-active {
  opacity: 1;
}

.cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.10) 0%,
    rgba(0,0,0,0.00) 25%,
    rgba(0,0,0,0.20) 55%,
    rgba(0,0,0,0.60) 100%
  );
}

.cover-content {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 0 32px 56px;
  color: #fff;
  text-align: center;
}

.cover-tag {
  font-size: 11px;
  font-family: var(--serif);
  letter-spacing: 0.28em;
  opacity: 0.75;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.cover-dday {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.22em;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 40px;
  padding: 5px 16px;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}

.cover-names {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 300;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  line-height: 1.3;
}

.cover-names .amp {
  padding: 0 12px;
  opacity: 0.6;
  font-weight: 300;
}

.cover-date {
  font-size: 13.5px;
  font-weight: 300;
  letter-spacing: 0.12em;
  line-height: 1.9;
  opacity: 0.88;
}

.cover-venue {
  font-size: 12.5px;
  opacity: 0.65;
  margin-top: 6px;
  letter-spacing: 0.06em;
}

.cover-scroll-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.5);
  font-size: 10px;
  letter-spacing: 0.14em;
  animation: hintBounce 2.4s ease-in-out infinite;
}

.cover-scroll-hint::before {
  content: '';
  display: block;
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.35);
}

@keyframes hintBounce {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) translateY(0); }
  50%       { opacity: 1.0; transform: translateX(-50%) translateY(5px); }
}

/* ── Section base ───────────────────────── */
.sc {
  padding: 68px 0;
}

.sc:nth-child(even) { background: var(--surface); }

.section-inner {
  width: 100%;
  padding: 0 28px;
  text-align: center;
}

.section-tag {
  display: inline-block;
  font-family: var(--serif);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.section-deco {
  color: var(--accent);
  font-size: 17px;
  letter-spacing: 0.35em;
  margin: 18px 0;
}

.section-rule {
  width: 36px;
  height: 1px;
  background: var(--accent);
  margin: 18px auto;
  opacity: 0.6;
}

/* ── Greeting ───────────────────────────── */
.greeting-body {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 300;
  line-height: 2.2;
  color: #555;
  margin-top: 28px;
  word-break: keep-all;
}

/* ── Family ─────────────────────────────── */
.family-wrap {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.family-card {
  background: var(--accent-lt);
  border-radius: 16px;
  padding: 24px 20px;
}

.family-side {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 12px;
}

.family-parents {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.family-name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--text);
  margin-top: 8px;
}

/* ── Gallery ────────────────────────────── */
.sc-gallery { padding-bottom: 0; }

.gallery-slider-wrap {
  margin-top: 32px;
  display: grid;
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  gap: 6px;
  padding: 0 20px 36px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery-slider-wrap::-webkit-scrollbar { display: none; }

.gallery-slide-btn {
  width: calc(32vw - 16px);
  max-width: 140px;
  aspect-ratio: 3/4;
  border-radius: 8px;
  overflow: hidden;
  border: none;
  padding: 0;
  cursor: pointer;
  background: var(--line);
  display: block;
}

.gallery-slide-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

.gallery-slide-btn:active img { transform: scale(0.96); }

.gallery-slide-btn,
.gallery-slider-wrap {
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}


/* ── Lightbox viewer ────────────────────── */
.std-viewer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.95);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.std-viewer.active { opacity: 1; }

.std-viewer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  padding-top: max(14px, env(safe-area-inset-top, 14px));
}

.std-viewer-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 15px;
  padding: 8px;
  cursor: pointer;
  letter-spacing: 0.04em;
}

.std-viewer-counter {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
}

.std-viewer-like {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  padding: 8px;
  cursor: pointer;
}

.std-viewer-like svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.std-viewer-like.liked { color: #ff6b6b; }
.std-viewer-like.liked svg { fill: currentColor; }

.std-viewer-photo-area {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.std-viewer-track {
  display: flex;
  height: 100%;
  transition: transform 0.26s ease;
}

.std-viewer-track.dragging { transition: none; }

.std-viewer-slide,
.std-viewer-slide img {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.std-viewer-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}

.std-viewer-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

.std-viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: none;
  color: rgba(255,255,255,0.75);
  font-size: 28px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.std-viewer-nav.prev { left: 12px; }
.std-viewer-nav.next { right: 12px; }
.std-viewer-nav:disabled { opacity: 0.2; pointer-events: none; }

/* ── Schedule / Calendar ────────────────── */
.schedule-date-big {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text);
  margin: 22px 0 6px;
}

.schedule-time-txt {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
  letter-spacing: 0.06em;
}

.std-calendar {
  background: var(--surface);
  border-radius: 18px;
  padding: 22px 18px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.07);
  margin: 0 auto 24px;
}

.std-cal-header {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.std-cal-year {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.std-cal-month {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
}

.std-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.std-cal-dow {
  font-size: 10.5px;
  color: var(--muted);
  text-align: center;
  padding: 3px 0 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.std-cal-dow.sun { color: #D96B6B; }
.std-cal-dow.sat { color: #6B8CD9; }

.std-cal-day {
  font-size: 12.5px;
  text-align: center;
  padding: 5px 0;
  color: var(--text);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.std-cal-day.sun { color: #D96B6B; }
.std-cal-day.sat { color: #6B8CD9; }
.std-cal-day.empty { }

.std-cal-day.wedding {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}

.schedule-venue-txt {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 4px;
}

.schedule-addr-txt {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Map ─────────────────────────────────── */
.std-map-box {
  width: 100%;
  height: 260px;
  background: var(--line);
  margin-top: 30px;
  position: relative;
}

#weddingMap { width: 100%; height: 100%; }

.map-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.18);
}

.map-overlay span {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 7px 16px;
  border-radius: 20px;
  pointer-events: none;
}

.map-overlay.hidden { display: none; }

.map-links {
  margin: 14px 0 0;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-link-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background 0.12s;
}

.map-link-btn:active { background: var(--accent-lt); }

.map-link-btn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.map-link-btn .ml-chevron {
  margin-left: auto;
  color: var(--muted);
  font-size: 18px;
}

/* ── Transport Info ──────────────────────── */
.transport-info {
  margin: 28px 28px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
}

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

.transport-item:last-child { border-bottom: none; }

.transport-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-lt, #f5f0eb);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.transport-icon svg {
  width: 18px;
  height: 18px;
  color: var(--accent, #8b6f5e);
}

.transport-body { flex: 1; min-width: 0; }

.transport-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.transport-label {
  font-size: 12.5px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 2px;
}

.transport-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Account ─────────────────────────────── */
.account-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 32px;
}

.account-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 20px;
  text-align: left;
}

.account-side-label {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 10px;
}

.account-name-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.account-person-name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
}

.account-bank-name {
  font-size: 12px;
  color: var(--muted);
}

.account-number {
  font-size: 13.5px;
  color: #555;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.account-copy-btn {
  display: block;
  width: 100%;
  padding: 11px;
  background: var(--accent-lt);
  border: none;
  border-radius: 10px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: background 0.12s;
  font-family: inherit;
}

.account-copy-btn:active { background: #dfc5b0; }

/* ── RSVP ────────────────────────────────── */
.rsvp-embedded {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.rsvp-field-lbl {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 9px;
  text-align: left;
}

.rsvp-seg-grp {
  display: flex;
  gap: 8px;
}

.rsvp-seg-btn {
  flex: 1;
  padding: 11px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.rsvp-seg-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 500;
}

.rsvp-text-input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  font-family: inherit;
}

.rsvp-text-input:focus { border-color: var(--accent); }

.rsvp-submit {
  width: 100%;
  padding: 16px;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.05em;
  font-family: inherit;
  transition: background 0.12s;
  margin-top: 4px;
}

.rsvp-submit:active { background: #444; }
.rsvp-submit:disabled { opacity: 0.5; pointer-events: none; }

.rsvp-done-box {
  text-align: center;
  padding: 32px 0;
  display: none;
}

.rsvp-done-box.show { display: block; }

.rsvp-done-emoji { font-size: 52px; margin-bottom: 18px; }

.rsvp-done-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 10px;
}

.rsvp-done-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}

/* ── Guestbook ───────────────────────────── */
.guest-form-std {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 32px;
}

.guest-form-std input,
.guest-form-std textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  resize: none;
  font-family: inherit;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}

.guest-form-std input:focus,
.guest-form-std textarea:focus { border-color: var(--accent); }

.guest-form-std button {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.06em;
  font-family: inherit;
  transition: background 0.12s;
}

.guest-form-std button:active { background: #a07860; }
.guest-form-std button:disabled { opacity: 0.5; pointer-events: none; }

.msg-list-std {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: opacity 0.15s ease;
}

.msg-list-std.is-loading { opacity: 0.4; }

.msg-card-std {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  text-align: left;
  position: relative;
}

.msg-card-std strong { font-size: 14px; font-weight: 600; }

.msg-card-std .msg-date {
  font-size: 11.5px;
  color: var(--muted);
  margin-left: 8px;
}

.msg-card-std p {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.75;
  color: #555;
  word-break: break-all;
}

.msg-del-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 17px;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
}

.msg-del-btn.confirming { color: #e05555; font-size: 12px; }

.empty-msg-std {
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  padding: 36px 0;
}

.msg-pagination-std {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 28px;
}

.msg-page-btn-std {
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.msg-page-btn-std.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.msg-page-btn-std:disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ── Footer ──────────────────────────────── */
.std-footer {
  background: #1E1E1E;
  color: rgba(255,255,255,0.45);
  text-align: center;
  padding: 52px 28px;
  padding-bottom: max(52px, calc(40px + env(safe-area-inset-bottom)));
}

.footer-heart {
  font-size: 22px;
  margin-bottom: 14px;
  color: rgba(255,255,255,0.3);
}

.footer-names {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 300;
  color: rgba(255,255,255,0.82);
  margin-bottom: 8px;
  letter-spacing: 0.1em;
}

.footer-date {
  font-size: 12.5px;
  letter-spacing: 0.12em;
  margin-bottom: 28px;
}

.footer-iphone-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 30px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.1em;
  transition: background 0.15s;
}

.footer-iphone-link:hover { background: rgba(255,255,255,0.14); }

/* ── Toast ───────────────────────────────── */
.toast {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(30,30,30,0.92);
  color: #fff;
  padding: 11px 22px;
  border-radius: 24px;
  font-size: 14px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Scroll fade ─────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-up.visible { opacity: 1; transform: translateY(0); }
