/* =========================================================
   1) ROOT / THEME
========================================================= */
:root {
  --bg: #ebe9e4;
  --paper: #f8f6f2;
  --text: #5e564d;
  --muted: #9b9389;
  --line: #e3ddd5;
  --olive: #7a7f5f;
  --cream: #f8f2e8;
  --shadow: 0 18px 40px rgba(64, 54, 43, 0.08);
  --max-width: 430px;
  --hero-gap: 92px;
  --inner-gap: 60px;
  --section-eyebrow-color: #7a7f5f;
  --section-eyebrow-size: 14px;
  --section-eyebrow-top-space: 92px;
  --section-eyebrow-bottom-space: 60px;
  --section-eyebrow-letter-spacing: 0.14em;
  --ui-sans: "IBM Plex Sans KR", sans-serif;
  --ui-serif: "Arvo", serif;
  --ui-hand: "Gowun Dodum", sans-serif;
  --soft-label: #a29a90;
}

/* =========================================================
   2) RESET / BASE
========================================================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow: auto;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui-sans);
  overflow: auto;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
a {
  font: inherit;
}

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

/* =========================================================
   3) PAGE LAYOUT
========================================================= */
.page-bg {
  min-height: 100vh;
  padding: 12px 10px 36px;
  width: 100%;
  overflow-x: hidden;
}

.invite-wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.paper-card {
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.paper-section {
  padding: 58px 28px;
  text-align: center;
  background: var(--paper);
}

.photo-block {
  background: transparent;
  overflow: hidden;
}

/* =========================================================
   4) HERO / PHOTO
========================================================= */
.photo-hero {
  position: relative;
  height: 760px;
  background: transparent;
  overflow: hidden;
}

#hero-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.photo-middle {
  position: relative;
  height: 280px;
  overflow: hidden;
  background: transparent;
}

.photo-middle-motion {
  position: relative;
}

.middle-slideshow {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
}

.middle-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.9s ease-in-out;
}

.middle-slide.is-active {
  opacity: 1;
}

.middle-slide-blank {
  display: none;
}

.middle-frame {
  display: none;
}

.photo-closing {
  position: relative;
  height: 800px;
  background: #f5f3f0;
  overflow: hidden;
  margin-top: 0;
  padding-bottom: 0;
}


.hero-header {
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
  z-index: 15;
  font-family: var(--ui-sans);
  font-size: 12px;
  font-weight: 600;
  color: #f8f6f2;
  letter-spacing: 0.05em;
}

.hero-groom {
  flex: 1;
  text-align: left;
  margin-left: -20px;
}

.hero-date {
  flex: 1;
  text-align: center;
}

.hero-bride {
  flex: 1;
  text-align: right;
  margin-right: -20px;
}

/* =========================================================
   5) COMMON LABELS / TITLES
========================================================= */
.invitation-label,
.mini-label,
.gallery-label,
.contact-label,
.location-kicker,
.section-title,
.dday-label,
.location-detail-label {
  font-family: var(--ui-serif);
  font-weight: 400;
  text-align: center;
  text-transform: uppercase;
  color: var(--soft-label);
}

.invitation-label,
.mini-label,
.gallery-label,
.contact-label,
.contact-label,
.location-kicker {
  margin: 0 0 var(--section-eyebrow-bottom-space);
  font-size: 14px;
  letter-spacing: 0.14em;
  color: #7a7f5f;
}

.section-title {
  margin: 6px 0 0;
  font-size: 20px;
  letter-spacing: 0.08em;
  color: var(--soft-label);
}

.contact-label {
  margin: 0 0 56px;
}

/* =========================================================
   6) INVITATION
========================================================= */
.invitation-section {
  padding-top: var(--section-eyebrow-top-space);
  padding-bottom: 102px;
}

.family-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 30px;
}

.family-line {
  margin: 0;
  font-family: var(--ui-sans);
  font-size: 12px;
  line-height: 1.9;
  color: #9b9389;
}

.couple-names {
  margin: 0;
  font-family: var(--ui-sans);
  font-size: 22px;
  line-height: 1.7;
  color: #4f4942;
}

.heart {
  display: inline-block;
  margin: 0 8px;
  font-size: 12px;
  color: #736b63;
  transform: translateY(-1px);
}

.invitation-divider {
  width: 1px;
  height: 48px;
  margin: 30px auto 34px;
  background: var(--line);
}

.invitation-message-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.invitation-message-block p {
  margin: 0;
  font-family: var(--ui-sans);
  font-size: 16px;
  line-height: 2.02;
  color: #7b746b;
}

/* =========================================================
   7) CALENDAR
========================================================= */
.calendar-section {
  position: relative;
  padding-top: 88px;
  padding-bottom: 96px;
  border-top: 0;
}

.calendar-section .mini-label {
  margin-bottom: var(--section-eyebrow-bottom-space);
}

.calendar-wrap {
  max-width: 270px;
  margin: 14px auto 0;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-weekdays {
  margin-bottom: 12px;
}

.calendar-weekdays div {
  font-family: var(--ui-sans);
  font-size: 11px;
  font-weight: 300;
  color: var(--soft-label);
}

.calendar-grid {
  row-gap: 10px;
}

.calendar-day {
  position: relative;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ui-serif);
  font-size: 15px;
  color: #5e564d;
}

.calendar-day-number {
  position: relative;
  z-index: 2;
}

.calendar-day.empty {
  color: transparent;
}

.calendar-day.active {
  width: 32px;
  height: 32px;
  margin: 0 auto;
  border-radius: 999px;
  background: #767b5c;
  color: #fff;
  font-weight: 400;
}

.calendar-day-ring,
.calendar-ring-bg,
.calendar-ring-fg {
  display: none;
}

.calendar-bottom-text {
  display: none;
}

/* =========================================================
   8) D-DAY
========================================================= */
.dday-paper-bg {
  display: none !important;
}

.dday-inner {
  position: static !important;
  inset: auto !important;
  display: block !important;
  padding: 0 !important;
  color: inherit !important;
}

.dday-section {
  padding: 34px 18px 38px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: #6e803a;
  text-align: center;
  overflow: hidden;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.dday-label {
  margin: 0;
  font-family: var(--ui-serif);
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--soft-label);
}

.countdown-inline {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.count-inline-item {
  position: relative;
  text-align: center;
}

.count-inline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 0;
  width: 1px;
  height: 38px;
  background: rgba(110, 128, 58, 0.22);
  transform: scaleX(0.7);
  transform-origin: center;
}

.count-inline-number {
  display: block;
  font-family: var(--ui-serif);
  font-size: 42px;
  line-height: 1;
  font-weight: 500;
  color: #6e803a;
}

.count-inline-label {
  display: block;
  margin-top: 13px;
  font-family: var(--ui-sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1;
  color: var(--soft-label);
  transform: translateY(1px);
}

.dday-date-text {
  display: none;
}

/* =========================================================
   9) GALLERY
========================================================= */
.gallery-section {
  position: relative;
  padding-top: 96px;
  padding-bottom: 108px;
  border-top: 0;
}

.gallery-label {
  margin: 0 0 var(--section-eyebrow-bottom-space);
}

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

.gallery-item {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: #e9e4dc;
  border-radius: 4px;
  cursor: pointer;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item.portrait,
.gallery-item.tall,
.gallery-item.landscape,
.gallery-item.square {
  aspect-ratio: 1 / 1;
}

.gallery-load-more-btn {
  display: block;
  margin: 32px auto 0;
  padding: 8px 28px;
  border: 1px solid var(--olive);
  border-radius: 6px;
  background: transparent;
  font-family: var(--ui-hand);
  font-size: 14px;
  color: var(--olive);
  cursor: pointer;
  transition: all 0.25s ease;
}

.gallery-load-more-btn:hover {
  background: rgba(122, 127, 95, 0.08);
}

/* =========================================================
   10) GALLERY LIGHTBOX
========================================================= */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(18, 18, 18, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox-stage {
  width: min(88vw, 520px);
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox-stage img {
  width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
}

.gallery-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 30px;
  cursor: pointer;
}

.gallery-lightbox-nav.prev {
  left: 14px;
}

.gallery-lightbox-nav.next {
  right: 14px;
}

/* =========================================================
   11) LOCATION
========================================================= */
.location-section {
  position: relative;
  padding-top: 96px;
  padding-bottom: 108px;
  text-align: center;
  border-top: 0;
  background: #7a7f5f;
}

.location-section::before {
  display: none;
}

.location-shell {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  text-align: center;
}

.location-kicker {
  margin: 0 0 var(--section-eyebrow-bottom-space);
  color: #e8e5df;
}

.location-title,
.location-title-sub {
  font-family: var(--ui-sans);
  text-align: center;
  word-break: keep-all;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.location-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.42;
  color: #f8f6f2;
}

.location-title-sub {
  margin: 6px 0 0;
  font-size: 20px;
  line-height: 1.35;
  color: #e8e5df;
}

.location-divider {
  width: 100%;
  height: 1px;
  background: rgba(248, 246, 242, 0.28);
  margin: 26px 0 0;
}

.location-detail-list {
  width: 100%;
  margin: 0 auto;
}

.location-detail-label {
  margin: 0;
  font-family: var(--ui-serif);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: #e8e5df;
  text-transform: uppercase;
  text-align: left;
}

.location-detail-value {
  margin: 0;
  font-family: var(--ui-hand);
  font-size: clamp(12px, 3.6vw, 15px);
  line-height: 1.9;
  color: #f0ede8;
  white-space: nowrap; 
}

.location-detail-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  column-gap: 16px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid rgba(248, 246, 242, 0.15);
  text-align: left;
}

.location-detail-inline {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  min-width: 0;
  flex-wrap: nowrap;
}

.location-detail-inline .location-detail-value {
  flex: 0 0 auto;
  margin: 0;
}

.location-map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding: 6px 12px;
  border: 1px solid rgba(248, 246, 242, 0.35);
  background: rgba(248, 246, 242, 0.1);
  font-family: var(--ui-hand);
  font-size: 12px;
  line-height: 1;
  color: #f0ede8;
  white-space: nowrap;
  cursor: pointer;
  flex: 0 0 auto;
}

.location-detail-row-transport {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  column-gap: 16px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid rgba(248, 246, 242, 0.15);
  text-align: left;
}

.location-detail-row-transport .location-detail-label {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-family: var(--ui-serif);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: #e8e5df;
  text-transform: uppercase;
}

.location-transport-table {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 14px;
  margin: 12px 0 0 0;
  min-width: 0;
}

.location-transport-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  column-gap: 16px;
  align-items: flex-start;
}

.location-transport-kind-wrap {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  min-width: 0;
}

.location-transport-desc {
  min-width: 0;
  margin: 0;
}

.location-transport-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f0ede8;
  flex-shrink: 0;
  margin-top: 0;
}

.location-transport-icon svg {
  width: 14px;
  height: 14px;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.location-transport-kind {
  margin: 0;
  font-family: var(--ui-hand);
  font-size: 13px;
  line-height: 1.6;
  font-weight: 700;
  color: #f8f6f2;
  white-space: nowrap;
}

.location-transport-desc p {
  margin: 0;
  font-family: var(--ui-hand);
  font-size: 13px;
  line-height: 1.6;
  color: #f0ede8;
}

.location-transport-desc p + p {
  margin-top: 2px;
}

/* =========================================================
   12) WITH GRATITUDE / CONTACT
========================================================= */
.contact-section {
  position: relative;
  padding-top: 200px;
  padding-bottom: 100px;  
  text-align: left;
  background: #f5f3f0;
}

.contact-section::before {
  display: none;
}

.contact-shell {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  text-align: left;
}

.contact-intro {
  max-width: 380px;
  margin: 0 auto 50px;
  text-align: center;
}

.contact-intro p {
  margin: 0;
  font-family: var(--ui-hand);
  font-size: 15px;
  line-height: 1.95;
  color: #6b635a;
  word-break: keep-all;
  overflow-wrap: break-word;
}



.contact-intro p + p {
  margin-top: 2px;
}

.contact-accordion {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.accordion-toggle {
  width: 100%;
  padding: 16px 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #6b635a;
  cursor: pointer;
}

.accordion-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.accordion-group-title {
  font-family: var(--ui-sans);
  font-size: 15px;
  color: #7f776e;
}

.accordion-flower {
  font-size: 12px;
  color: #a59d93;
  transform: translateY(-1px);
}

.accordion-arrow {
  position: relative;
  width: 12px;
  height: 12px;
}

.accordion-arrow::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #a39b91;
  border-bottom: 1.5px solid #a39b91;
  transform: rotate(45deg);
  transition: transform 0.22s ease;
}

.accordion-group.is-open .accordion-arrow::before {
  transform: rotate(-135deg);
}

.accordion-panel {
  display: none;
  padding: 12px 0;
}

.accordion-group.is-open .accordion-panel {
  display: block;
}

.contact-card {
  background: rgba(122, 127, 95, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.contact-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.contact-relation {
  font-family: var(--ui-sans);
  font-size: 12px;
  font-weight: 600;
  color: #7a7f5f;
  letter-spacing: 0.05em;
}

.contact-name-title {
  font-family: var(--ui-sans);
  font-size: 15px;
  font-weight: 600;
  color: #4f4942;
}

.contact-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  gap: 12px;
  align-items: center;
}

.contact-item-label {
  font-family: var(--ui-sans);
  font-size: 12px;
  font-weight: 500;
  color: #9b9389;
  text-align: left;
  white-space: nowrap; 
}

.contact-item-value {
  font-family: var(--ui-hand);
  font-size: clamp(11px, 3.6vw, 14px);
  color: #5e564d;
  white-space: nowrap; 
  text-align: left;
}

.contact-item-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.contact-action-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #dfd8cf;
  border-radius: 50%;
  background: #fbfaf7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8e867d;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.contact-action-btn:hover {
  background: #f1ece5;
}

.contact-action-btn svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================================================
   13) INVITE SHARE SECTION
========================================================= */
.invite-share-section {
  max-width: 340px;
  margin: 200px auto 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.invite-share-label {
  margin: 0 0 15px;
  font-family: var(--ui-serif);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: #a29a90;
  text-transform: uppercase;
}

.invite-share-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.invite-share-item:last-child {
  margin-bottom: 0;
}

.invite-share-text {
  font-family: var(--ui-hand);
  font-size: 14px;
  color: #5e564d;
  flex: 1;
}

.invite-share-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #dfd8cf;
  border-radius: 50%;
  background: #fbfaf7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8e867d;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.invite-share-btn:hover {
  background: #f1ece5;
}

.invite-share-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.share-kakao-btn svg {
  fill: currentColor;
  stroke: none;
}

.invite-share-btn-large {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  background: #7a7f5f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--ui-hand);
  font-size: 14px;
  font-weight: 400;
  color: #f8f6f2;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-bottom: 10px;
}

.invite-share-btn-large:last-child {
  margin-bottom: 0;
}

.invite-share-btn-large:hover {
  background: #6b7252;
}

.invite-share-btn-large span {
  flex: 1;
  text-align: left;
}

.invite-share-btn-large .btn-icon {
  width: 18px;
  height: 18px;
  margin-left: 12px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.copy-invite-url-btn.copied .btn-icon {
  stroke: none;
}

.copy-invite-url-btn.copied::after {
  content: '✓';
  font-size: 16px;
  color: #f8f6f2;
  margin-left: 8px;
}

.share-kakao-btn {
  background: #FFE812;
  color: #1a1a1a;
}

.share-kakao-btn:hover {
  background: #FFD700;
}

.share-kakao-btn span {
  color: #1a1a1a;
}

.share-kakao-btn .kakao-logo {
  width: 20px;
  height: 20px;
  margin-left: 12px;
  flex-shrink: 0;
}

/* =========================================================
   14) CLOSING
========================================================= */
.closing-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;  /* 하단으로 */
  align-items: center;
  padding: 0 20px 40px;  /* 아래쪽 패딩만 */
  text-align: center;
}

.closing-date {
  margin: 0 0 10px;
  font-family: var(--ui-serif);
  font-size: 28px;
  color: #fff8ee;
  letter-spacing: 0.08em;
}

.closing-text {
  margin: 0;
  font-family: var(--ui-sans); 
  font-size: 12px; 
  font-weight: 600;
  letter-spacing: 0.05em; 
  line-height: 1.8;
  color: #f8f6f2;  
  word-break: keep-all;
}

/* =========================================================
   15) MAP MODAL
========================================================= */
.map-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 100;
}

.map-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.map-modal {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: min(100%, 500px);
  padding: 18px 16px 20px;
  background: #f8f6f2;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
  transform: translate(-50%, 105%);
  transition: transform 0.3s ease;
  z-index: 110;
}

.map-modal.is-open {
  transform: translate(-50%, 0);
}

.map-modal-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.map-modal-title {
  margin: 0 0 6px;
  font-family: var(--ui-sans);
  font-size: 18px;
  color: #4f4942;
}

.map-modal-address {
  margin: 0;
  font-family: var(--ui-sans);
  font-size: 13px;
  line-height: 1.7;
  color: #8a8278;
}

.map-close-btn {
  border: 0;
  background: transparent;
  font-size: 28px;
  color: #756d64;
  cursor: pointer;
}

.map-placeholder {
  position: relative;
  height: 240px;
  border-radius: 18px;
  background: linear-gradient(135deg, #efe9df, #f7f3ed);
  overflow: hidden;
}

.map-canvas {
  position: absolute;
  inset: 0;
}

.map-placeholder.is-live .map-pin,
.map-placeholder.is-live .map-chip,
.map-placeholder.is-live .map-guide {
  display: none;
}

.map-pin {
  position: absolute;
  top: 88px;
  left: 50%;
  width: 26px;
  height: 26px;
  background: var(--olive);
  border-radius: 50% 50% 50% 0;
  transform: translateX(-50%) rotate(-45deg);
}

.map-pin::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #f8f2e8;
}

.map-chip {
  position: absolute;
  left: 50%;
  top: 126px;
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  font-family: var(--ui-sans);
  font-size: 12px;
  color: #5d564e;
  white-space: nowrap;
}

.map-guide {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  margin: 0;
  text-align: center;
  font-family: var(--ui-sans);
  font-size: 12px;
  color: #8a8278;
}

.map-app-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.map-app-btn {
  height: 42px;
  border-radius: 12px;
  background: #ece6dc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ui-sans);
  font-size: 13px;
  color: #534d45;
}

/* =========================================================
   16) SCROLL REVEAL
========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
  will-change: opacity, transform;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
  will-change: opacity, transform;
}

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

.reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
  will-change: opacity, transform;
}

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

.stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}

.stagger.is-visible > *:nth-child(1) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.05s;
}

.stagger.is-visible > *:nth-child(2) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.14s;
}

.stagger.is-visible > *:nth-child(3) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.23s;
}

.stagger.is-visible > *:nth-child(4) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.32s;
}

.stagger.is-visible > *:nth-child(5) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.41s;
}

.stagger.is-visible > *:nth-child(6) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.50s;
}

.stagger.is-visible > *:nth-child(7) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.59s;
}

.stagger.is-visible > *:nth-child(8) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.68s;
}

/* =========================================================
   17) REDUCED MOTION
========================================================= */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* =========================================================
   18) HERO PETAL EFFECT
========================================================= */
.photo-hero {
  position: relative;
  overflow: hidden;
}

#petalCanvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  display: block;
}

/* =========================================================
   19) HANDWRITING ANIMATION
========================================================= */
.handwriting-svg {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 700px;
  z-index: 20;
  pointer-events: none;
  filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.3));
}

.outline-text {
  font-family: "Great Vibes", cursive;
  font-weight: bold;
  fill: none;
  stroke: #f8f6f2;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
}

/* =========================================================
   20) MOBILE RESPONSIVE
========================================================= */
@media (max-width: 420px) {
  :root {
    --hero-gap: 84px;
    --inner-gap: 52px;
    --section-eyebrow-top-space: 84px;
    --section-eyebrow-bottom-space: 52px;
    --section-eyebrow-size: 14px;
  }

  .page-bg {
    padding: 8px 8px 28px;
  }

  .paper-section {
    padding: 50px 22px;
  }

  .photo-hero {
    height: 620px;
    overflow: hidden;
  }

  #hero-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
  }

  .photo-middle {
    height: 250px;
  }

  .photo-closing {
    height: 700px;
    background: #f5f3f0;
    margin-top: 0;
  }

  
  .closing-overlay {
    padding: 0 20px 30px;
  }

  .hero-header {
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  .hero-groom,
  .hero-bride {
    margin: 0;
  }

  /* invitation */
  .invitation-section {
    padding-top: var(--section-eyebrow-top-space);
    padding-bottom: 92px;
  }

  .family-line {
    font-size: 11px;
  }

  .couple-names {
    font-size: 20px;
  }

  .invitation-message-block p {
    font-size: 15px;
  }

  /* labels */
  .invitation-label,
  .mini-label,
  .gallery-label,
  .contact-label,
  .location-kicker {
    margin-bottom: var(--section-eyebrow-bottom-space);
    letter-spacing: 0.12em;
  }

  .section-title {
    margin-top: 4px;
    font-size: 18px;
    letter-spacing: 0.06em;
  }

  /* calendar */
  .calendar-section {
    padding-top: 78px;
    padding-bottom: 84px;
  }

  .calendar-section .mini-label {
    margin-bottom: var(--section-eyebrow-bottom-space);
  }

  .calendar-wrap {
    max-width: 250px;
    margin-top: 12px;
  }

  .calendar-day {
    font-size: 14px;
  }

  .calendar-day.active {
    width: 30px;
    height: 30px;
  }

  /* dday */
  .dday-section {
    padding: 30px 16px 34px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.72);
  }

  .countdown-inline {
    margin-top: 20px;
  }

  .count-inline-number {
    font-size: 36px;
  }

  .count-inline-label {
    margin-top: 13px;
    font-size: 11px;
    transform: translateY(1px);
  }

  .count-inline-item:not(:last-child)::after {
    top: 7px;
    height: 34px;
  }

  /* gallery */
  .gallery-section {
    padding-top: 86px;
    padding-bottom: 96px;
  }

  .gallery-label {
    margin-bottom: 32px;
  }

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

  .gallery-load-more-btn {
    margin-top: 28px;
    padding: 8px 24px;
    font-size: 13px;
  }

  /* location */
  .location-section {
    padding-top: 86px;
    padding-bottom: 96px;
  }

  .location-shell {
    max-width: 100%;
  }

  .location-kicker {
    margin-bottom: var(--section-eyebrow-bottom-space);
  }

  .location-title {
    font-size: 24px;
    line-height: 1.38;
  }

  .location-title-sub {
    margin-top: 6px;
    font-size: 18px;
    line-height: 1.32;
    color: #e8e5df;
  }

  .location-divider {
    margin-top: 22px;
  }

  .location-detail-row {
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 14px;
    padding: 16px 0;
  }

  .location-detail-row-transport {
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 14px;
    padding: 16px 0;
  }

  .location-detail-row-transport .location-detail-label {
    font-size: 11px;
  }

  .location-transport-table {
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 12px;
    margin-top: 10px;
  }

  .location-transport-row {
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 14px;
  }

  .location-transport-kind-wrap {
    gap: 6px;
  }

  .location-transport-icon {
    width: 14px;
    height: 14px;
    min-width: 14px;
  }

  .location-transport-icon svg {
    width: 11px;
    height: 11px;
  }

  .location-transport-kind,
  .location-transport-desc p {
    font-size: 12px;
    line-height: 1.5;
  }

  /* contact */
  .contact-section {
    padding-top: 130px;
    padding-bottom: 80px; 
    background: #f5f3f0;
  }

  .contact-label {
    margin: 0 0 56px;
  }

  .contact-intro {
    max-width: 100%;  /* 모바일은 가득 채우기 */
    margin: 0 auto 30px;
  }

  .contact-intro p {
    font-size: 14px;
    line-height: 1.9;
    white-space: nowrap;
  }

  .contact-card {
    padding: 14px;
    margin-bottom: 10px;
  }

  .contact-card-header {
    gap: 6px;
    margin-bottom: 12px;
  }

  .contact-relation {
    font-size: 11px;
  }

  .contact-name-title {
    font-size: 14px;
  }

  .contact-item {
    grid-template-columns: 52px 1fr auto; 
    gap: 6px;                             
  }

  .contact-item-label {
    font-size: 10px;
    flex-basis: 45px;
  }

  .contact-item-value {

  }

  .contact-item-actions {
    gap: 4px;
  }

  .contact-action-btn {
    width: 26px;
    height: 26px;
  }

  .contact-action-btn svg {
    width: 13px;
    height: 13px;
  }

  /* invite share */
  .invite-share-section {
    margin: 100px auto 150px;
  }

  .invite-share-label {
    margin: 0 0 12px;
  }

  /* closing text */

  .closing-text {
    font-family: var(--ui-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #f8f6f2;
  }

  /* handwriting */
  .handwriting-svg {
    max-width: 90%;
  }

  .outline-text {
    font-size: 200px !important;
  }
}

