:root {
  --paper: #faf9f7;
  --paper-soft: #f8f6f4;
  --paper-letter: #fbfaf8;
  --paper-white: #fffdfb;
  --hero: #ede4e3;
  --ink: #3d4142;
  --ink-soft: #5f6661;
  --muted: #6e7171;
  --label: #85746c;
  --accent: #aa9094;
  --accent-line: #b3a0a2;
  --line: #e3dedd;
  --title: 'Gowun Dodum', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --body: 'Gowun Dodum', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --script: 'Allura', 'Snell Roundhand', 'Brush Script MT', cursive;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  scroll-behavior: smooth;
}
html.has-layer,
html.has-layer body {
  overflow: hidden;
}
body {
  margin: 0;
  background: #eeebe9;
  color: var(--ink);
  font-family: var(--body);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
button {
  font: inherit;
  color: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
img {
  display: block;
  max-width: 100%;
}
svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
:focus-visible {
  outline: 2px solid #827078;
  outline-offset: 3px;
}
[role='dialog']:focus {
  outline: none;
}

.page,
.invite-footer {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}
.page {
  overflow: hidden;
  background: var(--paper);
}
@media (min-width: 560px) {
  .page,
  .invite-footer {
    box-shadow: 0 0 36px rgba(60, 55, 58, 0.07);
  }
}
.content {
  width: min(100% - 40px, 480px);
  margin: 0 auto;
}

/* 첫 화면: 검정 인생네컷 */
.fourcut-hero {
  --print-w: min(100vw - 44px, 420px);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 25px 0 30px;
  background: var(--hero);
  color: var(--ink);
  text-align: center;
}
.hero-names {
  margin: 0;
  font: 400 clamp(24px, 6.5vw, 30px)/1.35 var(--title);
  letter-spacing: -0.035em;
}
.hero-names span {
  padding: 0 0.15em;
  color: var(--accent);
}
.hero-intro {
  margin: 5px 0 14px;
  color: #696568;
  font-size: 12.5px;
  line-height: 1.5;
}
.printer {
  width: var(--print-w);
  padding-top: 4px;
}
.printer-slot {
  position: relative;
  z-index: 3;
  height: 7px;
  margin: 0 -2px;
  border-radius: 0 0 4px 4px;
  background: #514b4c;
  box-shadow: 0 2px 3px rgba(30, 23, 22, 0.15);
}
/* 출력구 위쪽만 자르고 옆·아래는 열어 둔다. 기울어진 인화지의 아래 모서리와 그림자가 그대로 보인다. */
.printer-feed {
  margin-top: -3px;
  padding-top: 14px;
  clip-path: inset(0 -40px -80px -40px);
}
.print-stack {
  position: relative;
  transform-origin: 50% 0;
  transform: rotate(-1.2deg);
}
.fourcut-print {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 10px;
  background: #fff;
  color: var(--ink);
  box-shadow:
    0 16px 18px -12px rgba(60, 50, 52, 0.32),
    0 0 0 1px rgba(60, 50, 52, 0.05);
}
.fourcut-print-back {
  position: absolute;
  inset: 0;
  transform: translate(4px, -6px) rotate(-1.6deg);
}
.fourcut-print-front {
  position: relative;
  z-index: 2;
}
.fourcut-frame {
  position: relative;
  min-width: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e4dedb;
}
.fourcut-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.print-footer {
  grid-column: 1 / -1;
  padding: 7px 1px 2px;
  text-align: center;
}
.print-footer .print-signature {
  display: block;
  color: #3d4142;
  font: 400 clamp(28px, 7.3vw, 39px)/0.9 var(--script);
  letter-spacing: 0;
}
.print-footer small {
  display: block;
  margin-top: 6px;
  color: #8a8d8c;
  font: 400 9px/1.4 var(--body);
  letter-spacing: 0.12em;
}
.hero-wedding-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 78px;
  margin-top: 20px;
  padding: 8px 26px 13px;
  border-bottom: 1px solid #8c8282;
  color: #4b4b4d;
}
.hero-wedding-link strong {
  font-size: 16px;
  font-weight: 700;
}
.hero-wedding-link small {
  color: #686669;
  font-size: 13.5px;
  line-height: 1.4;
}

html.js .print-stack {
  transform: translateY(-101%);
}
html.js .fourcut-hero.is-printing .print-stack {
  animation: printFeed 1.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes printFeed {
  0% {
    transform: translateY(-101%);
  }
  30% {
    transform: translateY(-62%);
  }
  36% {
    transform: translateY(-61%);
  }
  62% {
    transform: translateY(-28%);
  }
  68% {
    transform: translateY(-27%);
  }
  90% {
    transform: translateY(1%) rotate(0deg);
  }
  100% {
    transform: translateY(0) rotate(-1.2deg);
  }
}

/* 초대합니다 */
.invitation-letter {
  padding: 56px 0 46px;
  background: var(--paper-letter);
  text-align: center;
}
.invitation-letter h2 {
  margin: 0;
  font: 400 26px/1.5 var(--title);
}
.letter-rule {
  width: 28px;
  height: 1px;
  margin: 17px auto 20px;
  background: var(--accent-line);
}
.invitation-copy {
  margin: 0;
  color: #4c5351;
  font: 400 clamp(13px, 3.6vw, 14.5px)/2 var(--title);
}
.parents {
  display: grid;
  grid-template-columns: auto auto auto;
  justify-content: center;
  align-items: baseline;
  gap: 10px 6px;
  margin-top: 34px;
}
.parents-names {
  justify-self: end;
  font-size: 14px;
}
.parents-rel {
  justify-self: start;
  color: var(--muted);
  font-size: 12px;
}
.parents-child {
  justify-self: start;
  margin-left: 6px;
  font-size: 15.5px;
  font-weight: 700;
}

/* 당신의 자리도 준비했어요 */
.online-wedding-entry {
  padding: 11px 0 50px;
  background: var(--paper-letter);
  text-align: center;
}
.online-wedding-entry h2 {
  margin: 0;
  font: 400 22px/1.45 var(--title);
  letter-spacing: -0.025em;
}
.online-wedding-copy {
  margin: 9px auto 0;
  color: #626464;
  font-size: 12.5px;
  line-height: 1.7;
}
.wedding-room-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 19px 0 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d6cfca;
  border-radius: 5px;
  background: #eee8e4 url('assets/mini-wedding-hall.svg') center 27% / 100% auto no-repeat;
  box-shadow: 0 5px 16px rgba(62, 55, 50, 0.08);
  cursor: pointer;
}
.room-card-couple {
  position: absolute;
  z-index: 2;
  top: 34%;
  left: 50%;
  display: flex;
  gap: 2px;
  height: 46px;
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 1px rgba(58, 51, 50, 0.2));
}
.room-card-couple img {
  height: 100%;
  width: auto;
  image-rendering: pixelated;
}
.room-card-seats {
  position: absolute;
  z-index: 2;
  top: 55%;
  display: grid;
  grid-template-columns: repeat(2, 30px);
  gap: 5px 7px;
}
.room-card-seats.left {
  left: 13%;
}
.room-card-seats.right {
  right: 13%;
}
.room-card-seat {
  position: relative;
  display: block;
  width: 30px;
  height: 33px;
  opacity: 0.72;
}
.room-card-seat img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.room-card-seat.is-open {
  opacity: 1;
  animation: seatInvite 3.2s ease-in-out infinite;
}
.room-card-seat.is-open::before {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1px solid #af8987;
  border-radius: 8px;
  box-shadow: 0 0 0 5px #fff8f1aa;
}
.room-card-seat.is-open::after {
  content: '여기 비어 있어요';
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  padding: 4px 7px;
  border: 1px solid #d5c6c2;
  border-radius: 3px;
  background: #fffdfbef;
  color: #534f50;
  font-size: 9px;
  line-height: 1.2;
}
.room-card-bottom {
  position: absolute;
  z-index: 4;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 49px;
  padding: 10px 14px;
  border-top: 1px solid #d9d1cc;
  background: var(--paper-white);
  color: #434748;
  text-align: left;
}
.room-card-bottom strong {
  display: block;
  font-size: 13px;
  line-height: 1.3;
}
.room-card-arrow {
  font-size: 19px;
  line-height: 1;
}
@keyframes seatInvite {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

/* 공통 섹션 제목 */
.wedding-guide h2,
.gift-accounts h2,
.studio-gallery h2 {
  margin: 0 0 20px;
  font: 400 24px/1.4 var(--title);
  text-align: center;
}

/* 예식 안내 */
.wedding-guide {
  padding: 42px 0 36px;
  background: var(--paper-soft);
}
.calendar {
  padding: 2px 4px 20px;
  text-align: center;
}
.calendar-month {
  margin: 0 0 14px;
  color: #a07a82;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.calendar-week,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.calendar-week span {
  padding-bottom: 8px;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1;
}
.calendar-days span {
  display: grid;
  place-items: center;
  height: 40px;
  color: #6a6f6c;
  font-size: 14px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.calendar-week .is-sunday,
.calendar-days .is-sunday {
  color: #b07a84;
}
.calendar-days .is-wedding {
  position: relative;
  z-index: 0;
  color: #fff;
  font-weight: 700;
  padding: 0 0 5px 1px;
}
.calendar-days .is-wedding::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 36px;
  transform: translate(-50%, -50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 36'%3E%3Cpath fill='%23c08c95' d='M20 35C20 35 1 23.6 1 11.2 1 5.4 5.5 1 11 1c3.9 0 7.1 2.1 9 5.3C21.9 3.1 25.1 1 29 1c5.5 0 10 4.4 10 10.2C39 23.6 20 35 20 35z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.countdown {
  padding: 22px 0 26px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.countdown-units {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.countdown-units div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 62px;
}
.countdown-units div + div {
  border-left: 1px solid var(--line);
}
.countdown-units b {
  font: 400 25px/1.15 var(--title);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.countdown-units span {
  margin-top: 5px;
  color: #8e9190;
  font-size: 9px;
  letter-spacing: 0.14em;
}
.countdown-message {
  margin: 16px 0 0;
  color: #4c5351;
  font-size: 13.5px;
  line-height: 1.7;
}
.countdown-message b {
  color: #a07a82;
}
.heart {
  color: #c08c95;
}
.countdown.is-over .countdown-units {
  display: none;
}

.guide-summary {
  border-top: 1px solid var(--line);
}
.guide-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.guide-row > span {
  color: var(--label);
  font-size: 12px;
  font-weight: 700;
}
.guide-row strong {
  display: block;
  font-size: 15px;
  line-height: 1.45;
}
.guide-row small {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.6;
}
.text-button {
  display: block;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--label);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #cfc6c3;
  cursor: pointer;
}

.map-preview {
  position: relative;
  height: 220px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid #ddd8d6;
  border-radius: 6px;
  background: #e9ebe8;
}
.map-canvas,
.map-fallback {
  position: absolute;
  inset: 0;
}
.map-fallback iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.map-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
  padding: 6px 9px;
  border-radius: 14px 14px 14px 2px;
  background: #655b5e;
  box-shadow: 0 2px 8px #0003;
  color: #fff;
  font-size: 11px;
  pointer-events: none;
  white-space: nowrap;
}
.map-preview.is-loaded .map-fallback {
  display: none;
}
.map-marker {
  position: relative;
}
.map-marker span {
  position: absolute;
  left: 0;
  bottom: 0;
  transform: translate(0, -2px);
  padding: 6px 9px;
  border-radius: 14px 14px 14px 2px;
  background: #655b5e;
  box-shadow: 0 2px 8px #0003;
  color: #fff;
  font: 400 11px/1.2 var(--body);
  white-space: nowrap;
}
.map-lock {
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #d8d1cf;
  border-radius: 999px;
  background: #fffdfbf2;
  color: #464c49;
  font-size: 11.5px;
  box-shadow: 0 2px 6px rgba(50, 45, 48, 0.12);
  cursor: pointer;
}
.map-lock svg {
  width: 14px;
  height: 14px;
}
.map-lock[aria-pressed='true'] .lock-shackle {
  transform: translate(4px, -1px);
}

.map-apps {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin-top: 18px;
}
.map-apps a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: #464c49;
  font-size: 12px;
}
.map-apps img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  box-shadow: 0 1px 4px rgba(50, 45, 48, 0.13);
}

.parking-summary {
  margin: 22px 0 0;
  color: #5e645f;
  font-size: 12.5px;
  line-height: 1.55;
}
.parking-details {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.parking-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  cursor: pointer;
  list-style: none;
  font-size: 12.5px;
}
.parking-details summary::-webkit-details-marker {
  display: none;
}
.parking-details summary::after {
  content: '+';
  color: #8c7971;
  font-size: 20px;
}
.parking-details[open] summary::after {
  content: '−';
}
.parking-details dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px;
  margin: 0;
  padding: 0 0 15px;
  font-size: 12px;
  line-height: 1.55;
}
.parking-details dt {
  font-weight: 700;
}
.parking-details dd {
  margin: 0;
  color: #5e645f;
}

/* 마음 전하실 곳 */
.gift-accounts {
  padding: 38px 0 46px;
  background: var(--paper-white);
}
.gift-intro {
  margin: -5px 0 18px;
  color: #666b66;
  font-size: 12.5px;
  line-height: 1.6;
  text-align: center;
}
.gift-account-list {
  border-top: 1px solid var(--line);
}
.gift-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 65px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.gift-account-role {
  display: block;
  color: #867269;
  font-size: 11.5px;
}
.gift-account-name {
  display: block;
  margin-top: 2px;
  font-size: 14.5px;
  line-height: 1.4;
}
.gift-account-number,
.gift-account-pending {
  display: block;
  margin-top: 2px;
  color: #5b625d;
  font-size: 12.5px;
  line-height: 1.4;
}
.gift-account-number {
  user-select: all;
}
.gift-account-pending {
  color: #96908a;
}
.gift-account-copy {
  flex: none;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #c3b9af;
  background: transparent;
  color: #3e4843;
  font-size: 11.5px;
  cursor: pointer;
}

/* 우리의 사진 */
.studio-gallery {
  padding: 42px 0 44px;
  background: var(--paper-soft);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.gallery-item {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #dfd8cf;
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
html.js .gallery-grid:not(.is-expanded) .is-extra {
  display: none;
}
.gallery-more {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
  border: 1px solid #c3b9af;
  background: transparent;
  color: #3e4843;
  font-size: 12.5px;
  cursor: pointer;
}

.invite-footer {
  padding: 24px 10px 30px;
  border-top: 1px solid var(--line);
  background: var(--paper-soft);
  color: #827a72;
  font-size: 11.5px;
  line-height: 1.7;
  text-align: center;
}

/* 사진 뷰어 */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: #141516;
}
.viewer-top {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: env(safe-area-inset-top) 6px 0 20px;
  color: rgba(255, 255, 255, 0.82);
}
.viewer-count {
  font-size: 13px;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}
.viewer-close {
  width: 52px;
  height: 52px;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
}
.viewer-close svg {
  display: block;
  width: 24px;
  height: 24px;
  margin: auto;
}
.viewer-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
.viewer-track::-webkit-scrollbar {
  display: none;
}
.viewer-slide {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(56px + env(safe-area-inset-top)) 0 calc(40px + env(safe-area-inset-bottom));
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.viewer-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.viewer-nav {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}
.viewer-nav svg {
  display: block;
  width: 22px;
  height: 22px;
  margin: auto;
}
.viewer-nav.prev {
  left: 14px;
}
.viewer-nav.next {
  right: 14px;
}
@media (pointer: coarse) {
  .viewer-nav {
    display: none;
  }
}

/* 온라인 예식장 창 */
.wedding-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: #f8f5f1;
}
.iw-topbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 51px;
  padding: env(safe-area-inset-top) max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
  border-bottom: 1px solid #eadfdb;
  background: #fffaf6;
  color: #51484a;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.iw-close {
  flex: none;
  padding: 12px 5px 12px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
}
.iw-brand {
  overflow: hidden;
  color: #866f76;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: right;
  white-space: nowrap;
}
.iw-frame {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  border: 0;
  background: #faf7f2;
}

/* 스크롤하면 떠오르기 */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 360px) {
  .online-wedding-copy {
    font-size: 11.5px;
  }
  .map-apps {
    gap: 24px;
  }
  .countdown-units div {
    width: 56px;
  }
}
@media (max-height: 700px) {
  .fourcut-hero {
    min-height: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  html.js .print-stack {
    transform: rotate(-1.2deg);
  }
  html.js .fourcut-hero.is-printing .print-stack {
    animation: none;
  }
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .room-card-seat.is-open {
    animation: none;
  }
}
