/* ─── Variables ──────────────────────────────────────────────────────────── */
:root {
  --pink:       #E8899A;
  --pink-dark:  #C96D7D;
  --pink-light: #F5D0D8;
  --pink-bg:    #FDF5F7;
  --bg:         #FFFFFF;
  --bg-alt:     #F9F9F9;
  --text:       #333333;
  --text-mid:   #666666;
  --text-muted: #999999;
  --border:     #EEEEEE;
  --red:        #E84040;
  --blue:       #3367D6;
  --radius:     12px;
  --max-w:      480px;
  --font-serif: 'Noto Serif KR', Georgia, serif;
  --font-sans:  'Noto Sans KR', -apple-system, sans-serif;
  --font-hand:  'Dancing Script', cursive;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ─── Intro Screen ───────────────────────────────────────────────────────── */
#intro-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #fffaf8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}
#intro-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}
#intro-screen.gone {
  visibility: hidden;
}

.intro-text-wrap {
  text-align: center;
  line-height: 1.35;
}

.intro-line {
  font-family: var(--font-hand);
  font-size: clamp(42px, 12vw, 58px);
  font-weight: 700;
  color: #cf8f96;
  clip-path: inset(-25% 101% -25% -3%);
}

/* ─── Hero draw text ────────────────────────────────────────────────────── */
.hero-draw-wrap {
  text-align: center;
  line-height: 1.2;
}

.hero-draw-1 {
  font-family: var(--font-hand);
  font-size: clamp(36px, 10vw, 48px);
  font-weight: 700;
  color: #cf8f96;
  letter-spacing: 0.04em;
  text-shadow:
    0 1px 4px rgba(255, 255, 255, 0.2),
    0 4px 28px rgba(0, 0, 0, 0.5);
}

.hero-draw-2 {
  font-family: var(--font-hand);
  font-size: clamp(42px, 12vw, 58px);
  font-weight: 700;
  color: #cf8f96;
  letter-spacing: 0.04em;
  text-shadow:
    0 1px 4px rgba(255, 255, 255, 0.2),
    0 4px 28px rgba(0, 0, 0, 0.5);
}

.hero-draw-deco {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.hero-draw-deco::before,
.hero-draw-deco::after {
  content: '';
  display: block;
  width: 36px;
  height: 1px;
  background: rgba(207, 143, 150, 0.55);
}
.hero-draw-deco-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(207, 143, 150, 0.75);
}

/* ─── Write animation ───────────────────────────────────────────────────── */
@keyframes writeReveal {
  to { clip-path: inset(-25% -3% -25% -3%); }
}

/* ─── Reveal Animation ───────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-fade {
  opacity: 0;
  transition: opacity 0.9s ease;
}

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible,
.reveal-scale.visible,
.reveal-fade.visible {
  opacity: 1;
  transform: none;
}

/* 스태거 딜레이 */
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.40s; }

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 52px 24px;
  text-align: center;
}

.section-title-kr {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  color: var(--pink);
  margin-bottom: 20px;
  letter-spacing: 0.06em;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.s-hero {
  position: relative;
  height: 100svh;
  min-height: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  background: #111;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/images/hero/3X4A0055.webp');
  background-size: cover;
  background-position: calc(50% + 10px) top;
}

@media (hover: hover) {
  /* 데스크탑에서만 패럴랙스용 GPU 레이어 활성화 */
  .hero-bg {
    transform: translateZ(0);
    will-change: transform;
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.28) 0%,
    rgba(0, 0, 0, 0.10) 40%,
    rgba(0, 0, 0, 0.18) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 110px 32px 0;
  text-align: center;
  opacity: 0;
  filter: blur(6px);
  transition: opacity 1.6s cubic-bezier(0.4, 0, 0.2, 1),
              filter 1.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-content.visible {
  opacity: 1;
  filter: blur(0px);
}

.hero-bottom {
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s,
              transform 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}
.hero-bottom.visible {
  opacity: 1;
}

.hero-bottom {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-w);
  padding: 0 32px 48px;
  text-align: center;
}

.hero-divider {
  width: 40px;
  height: 1px;
  background: rgba(232, 160, 170, 0.6);
  margin: 0 auto 16px;
}

.hero-date-text {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.08em;
  line-height: 1;
  margin-bottom: 8px;
}

.hero-venue-text {
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.1em;
}

/* ─── Greeting ───────────────────────────────────────────────────────────── */
.s-greeting {
  background: var(--bg);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 56px;
}

.greeting-date-bar {
  padding: 24px 0 28px;
  text-align: center;
}

.date-bar-line {
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}

.date-bar-text p {
  font-size: 14px;
  color: var(--text);
  line-height: 2.0;
  letter-spacing: 0.03em;
  font-weight: 300;
}

.greeting-body-wrap {
  text-align: center;
}

.greeting-invite-title {
  font-size: 17px;
  font-weight: 400;
  color: var(--pink);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.greeting-text {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 300;
  line-height: 2.3;
  color: var(--text-mid);
  white-space: pre-line;
  margin-bottom: 24px;
}

.greeting-verse {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 300;
  line-height: 2.1;
  color: var(--text-mid);
  white-space: pre-line;
  margin-bottom: 32px;
}

.greeting-contacts {
  margin-bottom: 24px;
}

.greeting-contact-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  line-height: 2.4;
  font-weight: 300;
}

.greeting-contact-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 13px;
  flex-shrink: 0;
}

.btn-contact-modal {
  display: block;
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  padding: 13px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-mid);
  background: var(--bg);
  letter-spacing: 0.04em;
  transition: background 0.2s;
}

.btn-contact-modal:active { background: var(--bg-alt); }

/* ─── Ceremony ───────────────────────────────────────────────────────────── */
.s-ceremony {
  background: var(--bg-alt);
}

.ceremony-date-text {
  font-size: 14px;
  color: var(--text);
  font-weight: 300;
  line-height: 1.9;
  margin-bottom: 2px;
}

.ceremony-venue-text {
  font-size: 14px;
  color: var(--text);
  font-weight: 300;
  margin-bottom: 24px;
}

.ceremony-photo-wrap {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}

.ceremony-photo-wrap img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: calc(50% + 10px) center;
}

/* Calendar */
.calendar-wrap {
  text-align: center;
}

.cal-month-kr {
  font-size: 20px;
  font-weight: 400;
  color: var(--pink);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}

.cal-weekdays span {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  text-align: center;
  padding: 4px 0;
}

.cal-weekdays .sun { color: var(--red); }
.cal-weekdays .sat { color: var(--blue); }

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

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 300;
  color: var(--text);
  border-radius: 50%;
}

.cal-day.empty { color: transparent; }
.cal-day.sun { color: var(--red); }
.cal-day.sat { color: var(--blue); }

.cal-day.wedding {
  background: var(--pink);
  color: #fff !important;
  font-weight: 500;
  font-size: 14px;
}

/* ─── Countdown ──────────────────────────────────────────────────────────── */
.s-countdown {
  background: var(--bg);
}

.countdown-label {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.cd-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.cd-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--pink-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cd-num {
  font-size: 22px;
  font-weight: 400;
  color: var(--text);
  line-height: 1;
}

.cd-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.cd-dday {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 300;
  color: var(--text-mid);
  letter-spacing: 0.06em;
  padding: 12px 0;
}

/* ─── Gallery ────────────────────────────────────────────────────────────── */
.s-gallery {
  background: var(--bg-alt);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-bottom: 16px;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  cursor: pointer;
  transition: opacity 0.2s;
}

.gallery-grid img:active { opacity: 0.8; }

.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 300;
  padding: 40px 0;
}

.gallery-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  padding: 9px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  letter-spacing: 0.06em;
  transition: color 0.2s, border-color 0.2s;
}
.gallery-more-btn:hover {
  color: var(--pink);
  border-color: var(--pink-light);
}

/* ─── Location ───────────────────────────────────────────────────────────── */
.s-location {
  background: #2a2f45;
}

.s-location .section-title-kr {
  color: #e0a0aa;
}

.venue-info {
  margin-bottom: 20px;
}

.venue-name-hall {
  font-size: 18px;
  font-weight: 400;
  color: #f5e8eb;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.venue-address {
  font-size: 13px;
  font-weight: 300;
  color: rgba(240, 210, 218, 0.5);
  letter-spacing: 0.03em;
}

.copy-address-btn {
  background: none;
  border: none;
  padding: 0;
  margin-left: 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: rgba(224, 160, 170, 0.6);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(224, 160, 170, 0.3);
  vertical-align: middle;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.copy-address-btn:hover {
  color: rgba(224, 160, 170, 0.9);
  text-decoration-color: rgba(224, 160, 170, 0.6);
}
.copy-address-btn.copied {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}

.map-box {
  width: 100%;
  height: 260px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #2a2a2a;
  margin-bottom: 16px;
}

.map-placeholder {
  width: 100%;
  height: 200px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
}

.nav-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 32px;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 13px 6px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.07);
  transition: background 0.2s;
}

.nav-btn:active { background: rgba(255, 255, 255, 0.14); }

.nav-icon-t {
  font-family: sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #ff6b6b;
  line-height: 1;
}

.nav-btn.kakao-navi {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-btn.kakao-navi svg { color: #F9E000; }

.nav-btn.naver-map {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-btn.naver-map svg { color: #03C75A; }

.transport-info {
  text-align: left;
}

.transport-section {
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.transport-section-title {
  font-size: 12px;
  font-weight: 400;
  color: #cf8f96;
  margin-bottom: 10px;
  letter-spacing: 0.06em;
}

.transport-section-body {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.9;
  white-space: pre-line;
}

/* ─── Accounts ───────────────────────────────────────────────────────────── */
.s-accounts {
  background: var(--bg-alt);
}

.accounts-desc {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 2.0;
  margin-bottom: 24px;
}

.account-groups {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* 신랑측/신부측 outer accordion */
.side-group {
  background: var(--bg);
}

.side-group + .side-group {
  border-top: 1px solid var(--border);
}

.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 20px;
  cursor: pointer;
  user-select: none;
}

.side-head-title {
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
}

.side-chevron {
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: center;
}

.side-group.open .side-chevron {
  transform: rotate(180deg);
}

.side-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.side-group.open .side-body {
  max-height: 900px;
}

/* Inner account entries */
.account-entry {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.account-entry-role {
  font-size: 13px;
  color: var(--pink);
  margin-bottom: 8px;
  font-weight: 400;
  text-align: left;
}

.account-entry-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-entry-left {
  text-align: left;
}

.account-entry-number {
  font-family: monospace;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 3px;
}

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

.account-entry-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.btn-copy {
  font-size: 12px;
  font-family: var(--font-sans);
  font-weight: 400;
  padding: 7px 16px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-mid);
  border: 1px solid var(--border);
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-copy:active { background: var(--bg-alt); }
.btn-copy.copied { color: #4CAF50; border-color: #C8E6C9; }

.btn-kakao-pay {
  font-size: 12px;
  font-family: var(--font-sans);
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 6px;
  background: #FEE500;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
  transition: opacity 0.15s;
  text-decoration: none;
}

.btn-kakao-pay:active { opacity: 0.8; }

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 40px 32px 56px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-names {
  margin-bottom: 10px;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--text);
}

.footer-brand-sub {
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.35em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.footer-date {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  font-weight: 300;
}

.footer-monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.footer-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.footer-person-name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.18em;
}

.footer-initials {
  font-size: 11px;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.22em;
}

.footer-heart {
  color: var(--pink);
  font-size: 15px;
  padding-bottom: 14px;
}

/* ─── Contact Modal ──────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal.hidden { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
}

.modal-sheet {
  position: relative;
  z-index: 1;
  background: var(--bg);
  width: 100%;
  max-width: var(--max-w);
  border-radius: 20px 20px 0 0;
  padding: 16px 24px 44px;
  max-height: 80svh;
  overflow-y: auto;
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.modal-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  margin-bottom: 20px;
}

.modal-contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.modal-contact-info {
  text-align: left;
}

.modal-contact-role {
  font-size: 11px;
  color: var(--pink);
  margin-bottom: 2px;
}

.modal-contact-name {
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
}

.modal-contact-btns {
  display: flex;
  gap: 6px;
}

.modal-contact-btn {
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 400;
  border: 1px solid var(--border);
  color: var(--text-mid);
  background: var(--bg);
  display: inline-block;
  transition: background 0.15s;
}

.modal-contact-btn:active { background: var(--bg-alt); }

/* ─── Lightbox ───────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox.hidden { display: none; }

.lb-img-wrap {
  max-width: 100%;
  max-height: 80svh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img-wrap img {
  max-width: 100%;
  max-height: 80svh;
  object-fit: contain;
  border-radius: 8px;
}

.lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  color: #fff;
  font-size: 24px;
  padding: 8px;
  opacity: 0.7;
  z-index: 1001;
  transition: opacity 0.2s;
}

.lb-close:hover { opacity: 1; }

.lb-prev, .lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 40px;
  padding: 16px;
  opacity: 0.5;
  z-index: 1001;
  line-height: 1;
  transition: opacity 0.2s;
}

.lb-prev { left: 8px; }
.lb-next { right: 8px; }
.lb-prev:hover, .lb-next:hover { opacity: 1; }

.lb-caption {
  position: fixed;
  bottom: 24px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 300;
  text-align: center;
}

/* ─── BGM ────────────────────────────────────────────────────────────────── */
.bgm-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 900;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}

.bgm-btn:active { transform: scale(0.93); }

.bgm-icon {
  font-size: 16px;
  color: #fff;
  line-height: 1;
  display: block;
}

.bgm-icon.playing { animation: spin-note 3s linear infinite; }
.bgm-icon.paused { animation: none; opacity: 0.5; }

@keyframes spin-note {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}

/* ─── Guestbook ──────────────────────────────────────────────────────────── */
.s-guestbook {
  background: var(--bg);
}

.guestbook-desc {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 24px;
  letter-spacing: 0.03em;
}

.btn-write-guest {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 13px 28px;
  background: var(--pink);
  color: #fff;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.03em;
  margin-bottom: 32px;
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(232, 137, 154, 0.35);
}

.btn-write-guest:active {
  opacity: 0.85;
  transform: scale(0.97);
}

/* ── Loading ── */
.gb-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 40px 0;
}

.gb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pink-light);
  animation: gb-pulse 1.2s ease-in-out infinite;
}

.gb-dot:nth-child(2) { animation-delay: 0.2s; }
.gb-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes gb-pulse {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
  40%           { transform: scale(1.2); opacity: 1; }
}

/* ── List ── */
.guestbook-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

/* ── Card ── */
.gb-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  transition: box-shadow 0.2s;
}

.gb-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.gb-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.gb-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gb-card-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.gb-card-date {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 300;
}

.gb-card-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.gb-card-delete:hover {
  color: var(--red);
  background: rgba(232, 64, 64, 0.06);
}

.gb-card-message {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.75;
  word-break: break-word;
  white-space: pre-line;
}

/* ── 모달 카드 삭제 버튼 (텍스트형) ── */
.guestbook-all-list .gb-card-header {
  align-items: flex-start;
}
.guestbook-all-list .gb-card-name {
  color: var(--pink-dark);
  font-size: 15px;
}
.guestbook-all-list .gb-card-delete {
  width: auto;
  height: auto;
  font-size: 12px;
  color: var(--text-muted);
  padding: 2px 4px;
  border-radius: 4px;
}
.guestbook-all-list .gb-card-delete:hover {
  color: var(--red);
  background: rgba(232, 64, 64, 0.06);
}
.guestbook-all-list .gb-card-date {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Empty / Error ── */
.gb-empty {
  text-align: center;
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 2.0;
  padding: 40px 0;
}

.gb-error { color: var(--red); }

.gb-firebase-notice {
  text-align: center;
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 2.0;
  padding: 32px 0;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.gb-firebase-notice strong {
  color: var(--text);
  font-weight: 400;
}

/* ── Load More ── */
.btn-gb-more {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  transition: background 0.15s;
}
.btn-gb-more:active { background: var(--bg-alt); }

/* ── 전체보기 버튼 ── */
.guestbook-list-wrap {
  position: relative;
}
.btn-gb-view-all {
  display: block;
  margin: 12px 0 0 auto;
  padding: 0;
  background: none;
  border: none;
  font-size: 13px;
  color: var(--pink-dark);
  letter-spacing: 0.02em;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.btn-gb-view-all:active { opacity: 0.6; }
.btn-gb-view-all.hidden { display: none; }

/* ── 방명록 전체보기 풀스크린 모달 ── */
.gb-all-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #fffaf8;
  display: flex;
  flex-direction: column;
  transition: opacity 0.25s;
}
.gb-all-modal.hidden { display: none; }

.gb-all-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.gb-all-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.03em;
}
.gb-all-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-mid);
  line-height: 1;
  padding: 4px;
}

.guestbook-all-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 16px 40px;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Form ── */
.gb-field {
  margin-bottom: 16px;
  position: relative;
}

.gb-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 7px;
  letter-spacing: 0.03em;
}

.gb-label-hint {
  font-size: 11px;
  color: var(--pink);
  font-weight: 300;
}

.gb-input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 300;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}

.gb-input:focus {
  border-color: var(--pink);
}

.gb-input::placeholder {
  color: var(--text-muted);
  font-weight: 300;
}

.gb-input-center {
  text-align: center;
  letter-spacing: 0.2em;
  font-size: 18px;
}

.gb-textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 300;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  outline: none;
  resize: none;
  line-height: 1.75;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}

.gb-textarea:focus {
  border-color: var(--pink);
}

.gb-textarea::placeholder {
  color: var(--text-muted);
  font-weight: 300;
}

.gb-char-count {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 300;
  pointer-events: none;
}

.btn-gb-submit {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--pink);
  color: #fff;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 400;
  font-family: var(--font-sans);
  letter-spacing: 0.04em;
  transition: opacity 0.15s;
  margin-top: 4px;
}

.btn-gb-submit:disabled {
  opacity: 0.5;
}

/* ── Delete Modal ── */
.gb-delete-sheet {
  max-width: var(--max-w);
}

.gb-delete-desc {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.7;
}

.gb-delete-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.btn-gb-cancel {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 300;
  font-family: var(--font-sans);
  color: var(--text-mid);
  background: var(--bg);
  transition: background 0.15s;
}

.btn-gb-cancel:active { background: var(--bg-alt); }

.btn-gb-delete {
  padding: 14px;
  background: var(--red);
  color: #fff;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 400;
  font-family: var(--font-sans);
  transition: opacity 0.15s;
}

.btn-gb-delete:disabled { opacity: 0.5; }

/* ─── Utilities ──────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ─── Shake Animation ────────────────────────────────────────────────────── */
@keyframes gb-shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

.gb-shake { animation: gb-shake 0.35s ease; }

/* ─── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
