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

:root {
  /* White-tinted pastel sky palette */
  --sky-50:  #fbfdff;
  --sky-100: #f5f9fc;
  --sky-200: #eaf3f8;
  --sky-300: #deecf4;
  --sky-400: #cadfea;
  --sky-500: #bdd6e4;
  --blue-soft: #94b4c7;
  --blue:    #7fa5bc;
  --blue-deep: #7197af;
  --ink:     #304550;
  --ink-soft:#607987;
  --ink-faint:#96abb7;
  --line:    rgba(75, 112, 136, 0.14);
  --line-soft: rgba(75, 112, 136, 0.08);
  --card:    #ffffff;
  --gold:    #b89b6a;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.84);
  --surface-shadow: 0 18px 46px -27px rgba(53, 85, 106, 0.48);

  --font-ko: 'Noto Serif KR', serif;
  --font-batang: 'Gowun Batang', serif;
  --font-en: 'Cormorant Garamond', serif;
}

html {
  background: var(--sky-200);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ko);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  background: linear-gradient(180deg, #fcfeff 0%, var(--sky-100) 28%, var(--sky-200) 68%, var(--sky-300) 100%);
  overflow-x: hidden;
}

/* Reveal animation — content remains readable if JavaScript is unavailable. */
.reveal {
  opacity: 1;
  transform: none;
}
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* Shared bits */
.kicker {
  font-family: var(--font-en);
  font-size: 14px;
  font-style: italic;
  letter-spacing: 0.22em;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section {
  padding: 62px 30px;
  text-align: center;
  position: relative;
}

/* A shared paper-like surface gives the practical sections a consistent,
   quiet finish while keeping the photography as the focal point. */
.card,
.calendar,
.transport,
.map-btn,
.share-btn.ghost,
.game-section canvas {
  background: linear-gradient(135deg, var(--surface-strong), var(--surface));
  border-color: rgba(255, 255, 255, 0.9);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: min(960px, 200vw);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.hero-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 62% 50%;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(150,190,214,0.2) 0%, rgba(255,255,255,0) 25%),
    linear-gradient(0deg, rgba(31,47,57,0.72) 0%, rgba(31,47,57,0.42) 31%, rgba(31,47,57,0.08) 55%, rgba(255,255,255,0) 72%);
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
  color: #fff;
  padding: 0 20px calc(84px + var(--hero-safe-bottom, env(safe-area-inset-bottom)));
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
/* The event details in the opening frame are never deferred: they are the
   first essential piece of information a guest should be able to read. */
.js .hero .reveal {
  opacity: 1;
  transform: none;
}
.hero-label {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 18px;
  letter-spacing: 0.18em;
  opacity: 0.95;
  margin-bottom: 18px;
  text-shadow: 0 1px 12px rgba(0,0,0,0.25);
}
.hero-names {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-ko);
  font-weight: 400;
  font-size: clamp(28px, 8vw, 32px);
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-shadow: 0 2px 18px rgba(0,0,0,0.32);
}
.hero-names .sprig {
  width: 21px;
  height: 29px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.32));
}
.hero-line {
  width: 1px;
  height: 26px;
  background: rgba(255,255,255,0.7);
  margin: 20px 0;
}
.hero-date {
  font-family: var(--font-en);
  font-size: clamp(13px, 3.8vw, 15px);
  letter-spacing: 0.17em;
  white-space: nowrap;
  text-shadow: 0 1px 12px rgba(0,0,0,0.3);
}
.hero-venue {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.08em;
  opacity: 0.92;
  text-shadow: 0 1px 10px rgba(0,0,0,0.28);
}
.scroll-cue {
  position: absolute;
  bottom: calc(18px + var(--hero-safe-bottom, env(safe-area-inset-bottom)));
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: 12px;
  z-index: 2;
}
.scroll-cue span {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 3px;
  height: 6px;
  margin-left: -1.5px;
  background: #fff;
  border-radius: 2px;
  animation: scrollDot 1.6s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateY(12px); }
}

/* ===== Album ===== */
.strip-section {
  padding: 46px 0 48px;
  text-align: center;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.16) 50%, rgba(255,255,255,0));
  border-top: 1px solid rgba(255,255,255,0.34);
  border-bottom: 1px solid rgba(255,255,255,0.28);
}
.film-strip {
  display: flex;
  gap: 11px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 12px 30px 18px;
  scrollbar-width: none;
}
.film-strip::-webkit-scrollbar { display: none; }
.film-strip .fs-cell {
  flex: 0 0 auto;
  width: 63%;
  aspect-ratio: 4 / 5;
  scroll-snap-align: center;
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: var(--sky-100);
  box-shadow: 0 18px 40px -24px rgba(53, 85, 106, 0.58);
  transform: translateY(var(--orbit-y, 0px)) rotate(var(--orbit-rotate, 0deg)) scale(var(--orbit-scale, 1));
  transform-origin: center 70%;
  transition: transform 0.46s cubic-bezier(.2,.7,.2,1), box-shadow 0.46s ease;
  will-change: transform;
  padding: 0;
  appearance: none;
}
.film-strip .fs-cell.is-orbit-active { box-shadow: 0 22px 42px -24px rgba(53, 85, 106, 0.7); }
.film-strip .fs-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.film-strip .fs-cell:active img { transform: scale(1.04); }
.gallery-meta {
  display: flex;
  align-items: center;
  padding: 0 30px;
}
.gallery-progress {
  display: block;
  height: 3px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(63, 98, 124, 0.28);
}
.gallery-progress span {
  display: block;
  width: 5.88%;
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
  box-shadow: 0 0 5px rgba(95, 134, 163, 0.22);
  transition: width 0.35s ease;
}

/* ===== Invitation card ===== */
.invitation { padding-top: 42px; }
.card {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 20px;
  padding: 36px 28px 32px;
  box-shadow: var(--surface-shadow);
}
.invite-text {
  font-family: var(--font-batang);
  font-size: 15.5px;
  line-height: 2.16;
  color: #486170;
  word-break: keep-all;
  margin-bottom: 28px;
}
.invite-text span {
  display: block;
}
.invite-text span + span {
  margin-top: 14px;
}
.family {
  display: inline-flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.family-row {
  display: flex;
  align-items: baseline;
  gap: 18px;
}
.family-row .role {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--blue);
  width: 30px;
  text-align: right;
}
.family-row .name {
  font-size: 18px;
  letter-spacing: 0.12em;
  color: var(--ink);
}

/* ===== Date / Calendar ===== */
.date-title {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.date-sub {
  font-size: 15px;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
  margin-bottom: 38px;
}
.calendar {
  border-radius: 18px;
  padding: 26px 20px 22px;
  box-shadow: var(--surface-shadow);
  max-width: 330px;
  margin: 0 auto 36px;
}
.cal-head, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.cal-head {
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.cal-head span {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}
.cal-grid span {
  font-family: var(--font-en);
  font-size: 15px;
  color: var(--ink-soft);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-head .sun, .cal-grid .sun { color: #c77f86; }
.cal-head .sat, .cal-grid .sat { color: var(--blue-soft); }
.cal-grid .mark {
  position: relative;
  isolation: isolate;
  color: #fff;
  font-weight: 500;
}
.cal-grid .mark::before {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  z-index: -1;
  box-shadow: 0 6px 16px -6px rgba(92, 134, 158, 0.52);
}
.cal-grid .mark::after {
  content: "♥";
  position: absolute;
  top: -9px;
  right: 2px;
  font-size: 11px;
  color: #c77f86;
}

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}
.cd-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 52px;
}
.cd-num {
  font-family: var(--font-en);
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
}
.cd-label {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.cd-sep {
  font-family: var(--font-en);
  font-size: 24px;
  color: var(--sky-500);
  transform: translateY(-9px);
}
.dday {
  font-family: var(--font-batang);
  font-size: 14px;
  color: var(--blue);
  letter-spacing: 0.02em;
}

/* ===== Location ===== */
.loc-name {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.loc-floor {
  font-size: 14px;
  color: var(--blue);
  margin-bottom: 6px;
  letter-spacing: 0.06em;
}
.loc-address {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 26px;
}
.map-container {
  width: 100%;
  height: 220px;
  border-radius: 16px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 5px solid rgba(255,255,255,0.42);
  box-shadow: var(--surface-shadow);
}
.map-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sky-100);
  color: var(--blue-deep);
  font-size: 13px;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.map-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(255,255,255,0.56);
  border-radius: 16px;
  background: rgba(255,255,255,0.28);
  box-shadow: 0 14px 34px -28px rgba(53, 85, 106, 0.44);
  margin-bottom: 30px;
}
.map-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  padding: 12px 8px;
  border: none;
  border-radius: 10px;
  background: rgba(255,255,255,0.6);
  font-family: var(--font-ko);
  font-size: 13.5px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
}
.map-btn svg { width: 15px; height: 15px; color: var(--blue); }
.map-btn:active { transform: scale(0.98); background: rgba(255,255,255,0.9); }
.transport {
  text-align: left;
  border-radius: 18px;
  padding: 8px 22px;
  box-shadow: var(--surface-shadow);
}
.t-item {
  display: flex;
  gap: 15px;
  padding: 20px 0;
  border-top: 1px solid var(--line-soft);
}
.t-item:first-child { border-top: none; }
.t-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--sky-100);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
}
.t-icon svg { width: 21px; height: 21px; }
.t-content { flex: 1; min-width: 0; }
.t-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--blue);
  margin-bottom: 5px;
}
.t-main {
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.6;
  letter-spacing: 0.01em;
}
.t-sub {
  font-size: 12.5px;
  color: var(--ink-faint);
  line-height: 1.6;
  margin-top: 3px;
}
.bus-route {
  margin-top: 11px;
}
.bus-route + .bus-route {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-soft);
}
.bus-nos {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 7px;
}
.bus-no {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 7px;
  background: var(--sky-200);
  color: var(--blue-deep);
  font-family: var(--font-ko);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
}
.bus-dest {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ===== Game ===== */
.game-title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.game-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.95;
  margin-bottom: 18px;
}
.game-section canvas {
  width: 100%;
  height: 220px;
  display: block;
  border-radius: 16px;
  box-shadow: var(--surface-shadow);
  margin-bottom: 12px;
  cursor: pointer;
  touch-action: none;
}
.game-hint {
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* ===== Account ===== */
.account {
  padding-top: 62px;
  padding-bottom: 90px;
}
.account-panel {
  position: relative;
  padding: 50px 12px 18px;
  border: 1px solid rgba(75, 112, 136, 0.22);
  border-radius: 20px;
  background: rgba(255,255,255,0.24);
}
.account-title {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 40px);
  padding: 8px 26px 9px;
  border-radius: 999px;
  background: var(--sky-100);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.account-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  position: relative;
}
.account-columns::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 50%;
  width: 1px;
  background: var(--line-soft);
}
.account-column {
  min-width: 0;
  padding: 0 4px;
  --account-accent: var(--blue-deep);
  --account-accent-border: rgba(113, 151, 175, 0.38);
}
.bride-account {
  --account-accent: #bd8d99;
  --account-accent-border: rgba(189, 141, 153, 0.38);
}
.account-block + .account-block { margin-top: 28px; }
.account-role {
  margin-bottom: 8px;
  color: var(--account-accent);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.04em;
}
.acc-card {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 64px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-ko);
}
.acc-holder {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
}
.acc-detail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}
.acc-bank {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--ink-soft);
}
.acc-num {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.acc-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  margin-top: 1px;
  padding: 3px 9px;
  border: 1px solid var(--account-accent-border);
  border-radius: 999px;
  background: rgba(255,255,255,0.42);
  color: var(--account-accent);
  font-size: 10px;
  letter-spacing: 0.02em;
  opacity: 1;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.acc-card:active .acc-copy {
  background: var(--account-accent);
  color: #fff;
  transform: scale(0.97);
}
@media (max-width: 350px) {
  .account-panel { padding-right: 7px; padding-left: 7px; }
  .account-column { padding: 0 2px; }
  .account-role { font-size: 14px; }
  .acc-holder { font-size: 13px; }
  .acc-bank { font-size: 10px; }
  .acc-num { font-size: 10.5px; }
}

/* ===== Share ===== */
.share {
  padding-top: 46px;
  padding-bottom: 56px;
}
.game-section { padding-top: 40px; }
.share-title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 22px;
}
.share-btns {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.share-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-family: var(--font-ko);
  font-size: 14.5px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.share-btn:active { transform: scale(0.99); }
.share-btn.kakao { background: #FEE500; color: #191919; }
.share-btn.ghost {
  color: var(--ink);
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 30px 32px 64px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-names {
  font-size: 17px;
  letter-spacing: 0.12em;
  color: var(--ink);
}
.footer-date {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--blue);
}
.footer-thanks {
  font-family: var(--font-batang);
  font-size: 13px;
  color: var(--ink-faint);
  margin-top: 8px;
}

/* ===== Album lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 30, 38, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
}
.lightbox.open { display: flex; opacity: 1; }
.lb-img {
  max-width: 92vw;
  max-height: 82vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lb-close, .lb-nav {
  position: absolute;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  color: #fff;
  cursor: pointer;
}
.lb-close {
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  font-size: 18px;
}
.lb-nav {
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  font-size: 28px;
  line-height: 1;
}
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-counter {
  position: absolute;
  right: 0;
  bottom: 28px;
  left: 0;
  text-align: center;
  color: rgba(255,255,255,0.8);
  font-family: var(--font-en);
  font-size: 14px;
  letter-spacing: 0.15em;
}

@media (max-width: 360px) {
  .hero-names { font-size: 27px; gap: 10px; }
  .section { padding-left: 22px; padding-right: 22px; }
  .cd-item { min-width: 44px; }
  .cd-num { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .film-strip .fs-cell { transition: none; }
}
