@import "./tokens.d5723418.css";

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  /* body 는 dim 톤, 본문 main.invite 만 가운데 모바일 frame 으로 부각.
     모바일 viewport 에서는 main.invite 가 풀폭이라 dim 영역이 자연 노출되지 않는다. */
  background: #2A2522;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body { display: flex; justify-content: center; }

/* 페이지 전체 별 패턴 — bg_star.png를 main 배경 위에 살짝 깔리게 */
main.invite {
  width: 100%;
  background-color: var(--color-bg);
  background-image: url("../assets/images/bg-shared-stars.06a083f2.png");
  background-position: center top;
  background-size: var(--screen-w) auto;
  background-repeat: repeat;
  position: relative;
}
/* 601px 이상은 모바일 목업을 데스크탑 화면 중앙에 띄우고,
   모바일로 판단되는 폭에서는 실제 viewport 전체를 사용한다. */
@media (min-width: 601px) {
  main.invite { max-width: var(--screen-w); }
}

html.reveal-ready main.invite > [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 720ms ease,
    transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
html.reveal-ready main.invite > [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  html.reveal-ready main.invite > [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }
}

/* 사진은 절대로 확대되지 않는다 — 폰트는 커질지언정 이미지는 declared 크기 이하로만 렌더 */
img {
  display: block;
  max-width: 100%;
  height: auto;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  touch-action: pan-y; /* pinch-zoom 차단, 페이지 세로 스크롤은 허용 */
}

[data-protected] {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
button:focus { outline: none; }
button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }

/* 영문 손글씨 헤더 (시안: Noto Serif KR italic 32~36 + 80px stroke underline) */
.hand-h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 32px;
  font-style: italic;
  font-weight: 400;
  color: var(--color-text);
  text-align: center;
  letter-spacing: -0.01em;
}
/* 손글씨 underline — .pen Z0LCDv path: viewBox 100×8, 80×8 렌더, 2px round stroke. */
.hand-h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 8px;
  margin: 4px auto 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8'><path d='M2 4.7C17 1.6 30 .9 45 3.8c17 3.3 32 2.4 53-.9' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8'><path d='M2 4.7C17 1.6 30 .9 45 3.8c17 3.3 32 2.4 53-.9' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
}

/* 풀폭 다크 CTA */
.btn-dark {
  width: 100%;
  height: 48px;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font-body);
}
.btn-default,
.btn-outline {
  width: 100%;
  height: 48px;
  background: #fff;
  color: var(--color-accent);
  border-radius: var(--radius-card);
  border: 1.5px solid var(--color-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
}

/* lucide 스타일 단색 SVG 아이콘 (인라인 mask) */
.ic {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--ic-svg) center / contain no-repeat;
          mask: var(--ic-svg) center / contain no-repeat;
}
/* 시안 SSOT — 모든 아이콘은 Pencil 의 lucide iconFontName 에 매핑된 표준
   Lucide path 를 그대로 사용한다. .ic-cal-plus = lucide calendar-plus,
   .ic-msg = message-circle, .ic-img-plus = image-plus, .ic-share = share-2,
   .ic-up = arrow-up, .ic-down = chevron-down. */
.ic-cal-plus { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M8 2v4'/><path d='M16 2v4'/><path d='M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8'/><path d='M3 10h18'/><path d='M16 19h6'/><path d='M19 16v6'/></svg>"); }
.ic-msg { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M7.9 20A9 9 0 1 0 4 16.1L2 22z'/></svg>"); }
.ic-img-plus { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M16 5h6'/><path d='M19 2v6'/><path d='M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5'/><path d='m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21'/><circle cx='9' cy='9' r='2'/></svg>"); }
.ic-share { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='18' cy='5' r='3'/><circle cx='6' cy='12' r='3'/><circle cx='18' cy='19' r='3'/><line x1='8.59' x2='15.42' y1='13.51' y2='17.49'/><line x1='15.41' x2='8.59' y1='6.51' y2='10.49'/></svg>"); }
.ic-up { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 19V5'/><path d='m5 12 7-7 7 7'/></svg>"); }
.ic-down { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>"); }
.ic-prev { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='15 18 9 12 15 6'/></svg>"); }
.ic-next { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>"); }
.ic-trash { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 6h18'/><path d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6'/><path d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/><line x1='10' y1='11' x2='10' y2='17'/><line x1='14' y1='11' x2='14' y2='17'/></svg>"); }
.ic-lock { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='11' width='18' height='11' rx='2' ry='2'/><path d='M7 11V7a5 5 0 0 1 10 0v4'/></svg>"); }
.ic-check-circle { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21.801 10A10 10 0 1 1 17 3.335'/><path d='m9 11 3 3L22 4'/></svg>"); }
.ic-wifi-off { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='1' y1='1' x2='23' y2='23'/><path d='M16.72 11.06A10.94 10.94 0 0 1 19 12.55'/><path d='M5 12.55a10.94 10.94 0 0 1 5.17-2.39'/><path d='M10.71 5.05A16 16 0 0 1 22.58 9'/><path d='M1.42 9a15.91 15.91 0 0 1 4.7-2.88'/><path d='M8.53 16.11a6 6 0 0 1 6.95 0'/><line x1='12' y1='20' x2='12.01' y2='20'/></svg>"); }
.ic-hourglass { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 22h14'/><path d='M5 2h14'/><path d='M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22'/><path d='M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2'/></svg>"); }
.ic-smartphone { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='5' y='2' width='14' height='20' rx='2' ry='2'/><line x1='12' y1='18' x2='12.01' y2='18'/></svg>"); }
.ic-cal-clock { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5'/><path d='M16 2v4'/><path d='M8 2v4'/><path d='M3 10h5'/><path d='M17.5 17.5 16 16.25V14'/><path d='M22 16a6 6 0 1 1-12 0 6 6 0 0 1 12 0z'/></svg>"); }
.ic-shield { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/><path d='m9 12 2 2 4-4'/></svg>"); }
.ic-arrow-left { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m12 19-7-7 7-7'/><path d='M19 12H5'/></svg>"); }
.ic-send { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z'/><path d='m21.854 2.147-10.94 10.939'/></svg>"); }
.ic-check { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-4-4'/></svg>"); }
.ic-camera { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z'/><circle cx='12' cy='13' r='3'/></svg>"); }
.ic-image { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect width='18' height='18' x='3' y='3' rx='2' ry='2'/><circle cx='9' cy='9' r='2'/><path d='m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21'/></svg>"); }
.ic-images { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M18 22H4a2 2 0 0 1-2-2V6'/><path d='m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18'/><circle cx='12' cy='8' r='2'/><rect width='16' height='16' x='6' y='2' rx='2'/></svg>"); }
.ic-music { --ic-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 18V5l12-2v13'/><circle cx='6' cy='18' r='3'/><circle cx='18' cy='16' r='3'/></svg>"); }

.bgm-toggle {
  --bgm-level: 0;
  --bgm-hop: calc(2px + var(--bgm-level) * 5px);
  --bgm-sway: calc(8deg + var(--bgm-level) * 10deg);
  position: fixed;
  z-index: 80;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, calc((100vw - var(--screen-w)) / 2 + 14px));
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: #D699A5;
  border: 1px solid rgba(234, 211, 206, 0.9);
  box-shadow: 0 6px 16px rgba(74, 61, 56, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  overflow: visible;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}
.bgm-toggle::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 0;
  border-radius: inherit;
  border: 1px solid rgba(214, 153, 165, 0.44);
  box-shadow: 0 0 0 8px rgba(214, 153, 165, 0.12);
  opacity: 0;
  transform: scale(0.82);
  pointer-events: none;
}
.bgm-toggle .ic {
  position: relative;
  z-index: 2;
  width: 19px;
  height: 19px;
  transform-origin: 50% 76%;
}
.bgm-toggle[data-state="playing"] {
  background: rgba(255, 255, 255, 0.48);
  color: #D699A5;
  border-color: rgba(255, 255, 255, 0.86);
  box-shadow: 0 6px 16px rgba(74, 61, 56, 0.16);
}
.bgm-toggle[data-state="playing"]::before {
  animation: bgmPulse 1180ms cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.bgm-toggle[data-state="playing"] .ic {
  animation: bgmIconDance 980ms cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

@keyframes bgmPulse {
  0% {
    opacity: 0.42;
    transform: scale(0.86);
    box-shadow: 0 0 0 3px rgba(214, 153, 165, 0.14);
  }
  42% {
    opacity: 0.7;
    transform: scale(calc(1.05 + var(--bgm-level) * 0.26));
    box-shadow: 0 0 0 12px rgba(214, 153, 165, 0.18);
  }
  100% {
    opacity: 0;
    transform: scale(calc(1.22 + var(--bgm-level) * 0.42));
    box-shadow: 0 0 0 18px rgba(214, 153, 165, 0);
  }
}

@keyframes bgmIconDance {
  0%, 100% {
    transform: translateY(0) rotate(calc(var(--bgm-sway) * -0.55)) scale(1);
  }
  18% {
    transform: translateY(calc(var(--bgm-hop) * -1)) rotate(var(--bgm-sway)) scale(1.08);
  }
  34% {
    transform: translateY(calc(var(--bgm-hop) * -0.28)) rotate(calc(var(--bgm-sway) * 0.24)) scale(0.98);
  }
  56% {
    transform: translateY(calc(var(--bgm-hop) * -0.72)) rotate(calc(var(--bgm-sway) * -1)) scale(1.05);
  }
  76% {
    transform: translateY(calc(var(--bgm-hop) * -0.18)) rotate(calc(var(--bgm-sway) * -0.14)) scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .bgm-toggle[data-state="playing"] .ic {
    animation: none;
    transform: none;
  }
}
.bgm-note {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  color: rgba(214, 153, 165, 0.86);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(var(--note-scale));
  animation: bgmNoteRise 1500ms ease-out forwards;
  -webkit-animation: bgmNoteRise 1500ms ease-out forwards;
}

@keyframes bgmNoteRise {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(calc(var(--note-scale) * 0.72)) rotate(0deg);
  }
  12% {
    opacity: 0.9;
    transform: translate(calc(-50% + var(--note-x) * 0.22), calc(-50% - 12px)) scale(calc(var(--note-scale) * 1.18)) rotate(calc(var(--note-rot) * 0.25));
  }
  28% {
    opacity: 0.88;
    transform: translate(calc(-50% + var(--note-x) * 0.46), calc(-50% - 26px)) scale(calc(var(--note-scale) * 0.92)) rotate(calc(var(--note-rot) * 0.45));
  }
  100% {
    opacity: 0;
    transform:
      translate(calc(-50% + var(--note-x)), calc(-50% - var(--note-y)))
      scale(var(--note-scale))
      rotate(var(--note-rot));
  }
}

/* ===== HERO (.pen nDvkh, 720h) ============================ */
.hero {
  position: relative;
  height: 720px;
  padding: 0;
}
.hero__book {
  position: absolute;
  left: 50%; top: 98px;
  transform: translateX(-50%);
  width: 290px; height: 433px;
}
.hero__cover { width: 100%; height: 100%; object-fit: contain; }
.hero__inset {
  position: absolute;
  /* QdBNu: x=149, y=221, 100×123. hero 기준 x=149/y=221 → book 기준 x=99, y=123 */
  left: 99px; top: 123px;
  width: 100px; height: 123px;
  object-fit: cover;
}
.hero__hr {
  width: 80px;
  height: 1px;
  background: var(--color-pink);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.hero__hr--top { top: 540px; }
.hero__hr--bottom { top: 683px; }
.hero__line {
  position: absolute;
  left: 0; right: 0;
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  text-align: center;
  color: var(--color-text);
  line-height: 1.5;
}
.hero__line:nth-of-type(1) { top: 560px; }
.hero__line:nth-of-type(2) { top: 600px; }
.hero__line:nth-of-type(3) { top: 639px; }

/* ===== HEART LOCKET (hero와 greeting 사이 데코) ============= */
.heart-locket {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 0;
}
.heart-locket__img {
  width: 290px;
  height: auto;
  display: block;
}

/* ===== GREETING (.pen QOuES) ============================== */
.greeting {
  padding: 40px 24px;
  display: flex;
  justify-content: center;
  align-items: stretch;
  position: relative;
}
.greeting__paper {
  width: 100%;
  aspect-ratio: 633 / 933;
  margin: 0;
  padding: 0;
  background-image: url("../assets/images/bg-greeting.cfdbb9d5.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  position: relative;
  filter: drop-shadow(0 0 6px rgba(214, 153, 165, 0.35));
  display: flex;
  align-items: center;
  justify-content: center;
}
.greeting__inner {
  position: relative;
  width: 100%;
  padding: 0;
  text-align: center;
  color: var(--color-text);
  font-family: var(--font-body);
  box-sizing: border-box;
}
.greeting .hand-h2 { font-size: 32px; font-style: normal; margin: 0 0 60px; }
.greeting__quote {
  white-space: pre-line;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-body);
  margin: 0 0 9px;
}
.greeting__cite {
  font-size: 13px;
  color: var(--color-text-body);
  margin: 0 0 26px;
}
.greeting__body {
  white-space: pre-line;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-body);
  margin: 0 0 33px;
}
.greeting__parents {
  display: flex; flex-direction: column; gap: 1px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text);
  letter-spacing: 0.06em;
}
.greeting__parents strong { font-weight: 700; }

/* ===== CALENDAR (.pen uSwXJ) ============================= */
.calendar {
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cal-card {
  background-image: url("../assets/images/bg-calendar.cbe3034f.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-color: #fff;
  border-radius: 12px;
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.cal-head { text-align: center; }
.cal-head .hand-h2 { font-size: 32px; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
}
.cal-h, .cal-d {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--color-text);
}
.cal-h { font-weight: 500; color: var(--color-text-soft); }
.cal-h--sun, .cal-d--sun { color: var(--color-pink); }
.cal-d { font-size: 14px; }
.cal-d--today {
  background: var(--color-pink);
  color: #fff;
  border-radius: 999px;
  width: 28px; height: 28px;
  margin: auto;
}

/* ===== MAP (.pen Fx0C2) ================================== */
.map {
  padding: 40px 24px;
  display: flex; flex-direction: column;
  gap: 16px;
}
.map .hand-h2 { font-size: 32px; }
/* 시안 jMap(A3jsn) — fills=[#FFFFFF, image fit] 의 코드 정합. img 단독으로
   background 를 깔면 transparent png 영역에서 시인성이 떨어지므로 흰 카드
   wrapper 로 감싸 명시적으로 흰 배경을 확보한다. */
.map__illust-wrap {
  width: 100%;
  height: 230px;
  margin-top: 40px;
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}
.map__illust {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.map-viewer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: #FFFCFA;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 210;
  overflow: hidden;
  touch-action: none;
}
.map-viewer[data-open="1"] { display: flex; }
@media (min-width: 601px) {
  .map-viewer { width: var(--screen-w); }
}
.map-viewer__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.86);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--color-border);
  box-shadow: 0 6px 16px rgba(74, 61, 56, 0.16);
  z-index: 2;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.map-viewer__stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}
.map-viewer__img {
  max-width: calc(100% - 32px);
  max-height: 86vh;
  object-fit: contain;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
  touch-action: none;
  transform-origin: center;
  will-change: transform;
}
.map-viewer__hint {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  margin: 0;
  color: var(--color-text-muted);
  font-family: "Noto Serif KR", serif;
  font-size: 11px;
  letter-spacing: 1px;
  text-align: center;
  pointer-events: none;
}
.map__btn-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 8px;
}
.map__btn {
  height: 48px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-family: var(--font-body);
}
.map__btn img { width: 22px; height: 22px; border-radius: 5px; }
.map__info {
  background: var(--color-bg-soft);
  border-radius: 8px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}
.map__info > div {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: start;
}
.map__info dt {
  font-weight: 700;
  font-size: 13px;
  color: var(--color-accent);
  margin: 0;
}
.map__info dd {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text);
  margin: 0;
}

/* ===== MOMENTS (.pen HrYRB) — h2 y=24, stage 390×480 @y=120, total h=660 */
.moments {
  padding: 24px 24px 60px;
  position: relative;
  overflow: hidden;
}
/* Pencil g54Go: fontSize 36 italic */
.moments .hand-h2 { font-size: 36px; }
.moments__stage {
  position: relative;
  margin: 44px -24px 0;
  height: 480px;
  width: auto;
}
/* 시안 SSOT(HrYRB · cqbu5 hPgrid). 4 카드 모두 동일 168×204 흰 프레임 +
   140×140 정사각 사진 + padding[top14·right14·bottom50·left14] 로 폴라로이드
   특유의 두꺼운 아래 여백을 만든다. 회전과 좌표만 카드별로 다르다.
   .pen frame: CQ4QZ(hP1) cYzdV(hP2) dyxf4(hP3) oXZPn(hP4). */
.polaroid {
  --polaroid-x: 0px;
  --polaroid-y: 0px;
  --polaroid-rot: 0deg;
  --polaroid-from-x: 0px;
  --polaroid-from-y: 0px;
  position: absolute;
  width: 168px;
  height: 204px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.9), rgba(246,242,236,0.26) 100%),
    repeating-linear-gradient(90deg, rgba(74,61,56,0.028) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.42) 0 1px, transparent 1px 5px),
    #FFFEFA;
  border: 1px solid rgba(221, 216, 207, 0.9);
  border-radius: 1px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    inset 0 -14px 24px rgba(196, 187, 176, 0.12),
    1px 1px 0 rgba(255,255,255,0.9),
    5px 7px 2px rgba(74, 61, 56, 0.18),
    7px 11px 16px rgba(74, 61, 56, 0.14);
  margin: 0;
  transform: translate(var(--polaroid-x), var(--polaroid-y)) rotate(var(--polaroid-rot));
}
.polaroid::before,
.polaroid::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.polaroid::before {
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,0.74) 0 0.8px, transparent 1px),
    radial-gradient(circle at 68% 72%, rgba(158,148,136,0.13) 0 0.7px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.42), transparent 18%, transparent 78%, rgba(128,116,105,0.08));
  background-size: 10px 10px, 12px 12px, 100% 100%;
  opacity: 0.72;
}
.polaroid::after {
  border-radius: 1px;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.64),
    inset -1px 0 0 rgba(126,118,108,0.10),
    inset 0 -1px 0 rgba(126,118,108,0.14);
}
.polaroid img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  display: block;
  margin: 14px 14px 50px 14px;
  background: #050505;
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,0.34),
    0 1px 0 rgba(255,255,255,0.78),
    0 2px 4px rgba(74,61,56,0.18);
  position: relative;
  z-index: 1;
}
/* SSOT 좌표는 cqbu5 기준이며, cqbu5 는 stage(pJydp) 의 top padding 16 만큼
   아래로 밀려 있다. .moments__stage 가 pJydp 와 같은 박스이므로 top 값에
   16 을 더해 stage 기준 좌표로 변환한다.
   Pencil 회전은 CCW-positive(수학 컨벤션) 이므로 CSS clockwise-positive
   로 변환할 때 부호를 뒤집는다 — Pencil 352(=-8 CCW) → CSS rotate(8deg).
   reveal 전에는 같은 각도를 유지한 채 사방 바깥에서 들어오고, 최종 좌표와
   회전값은 시안 그대로 보존한다. */
.polaroid--1 { left: calc(50% - 172px); top: 32px;  --polaroid-rot: 8deg;  --polaroid-from-x: -88px; --polaroid-from-y: -76px; }
.polaroid--2 { left: calc(50% - 2px);   top: 72px;  --polaroid-rot: -5deg; --polaroid-from-x: 88px;  --polaroid-from-y: -76px; }
.polaroid--3 { left: calc(50% - 142px); top: 252px; --polaroid-rot: -8deg; --polaroid-from-x: -88px; --polaroid-from-y: 76px; }
.polaroid--4 { left: calc(50% + 8px);   top: 292px; --polaroid-rot: 5deg;  --polaroid-from-x: 88px;  --polaroid-from-y: 76px; }

html.reveal-ready .moments[data-reveal]:not(.is-visible) .polaroid {
  --polaroid-x: var(--polaroid-from-x);
  --polaroid-y: var(--polaroid-from-y);
  opacity: 0;
}
html.reveal-ready .moments[data-reveal].is-visible .polaroid {
  --polaroid-x: 0px;
  --polaroid-y: 0px;
  opacity: 1;
  transition:
    opacity 760ms ease,
    transform 920ms cubic-bezier(0.22, 1, 0.36, 1);
}
html.reveal-ready .moments[data-reveal].is-visible .polaroid--2 { transition-delay: 80ms; }
html.reveal-ready .moments[data-reveal].is-visible .polaroid--3 { transition-delay: 150ms; }
html.reveal-ready .moments[data-reveal].is-visible .polaroid--4 { transition-delay: 220ms; }
@media (prefers-reduced-motion: reduce) {
  html.reveal-ready .moments[data-reveal] .polaroid {
    --polaroid-x: 0px;
    --polaroid-y: 0px;
    opacity: 1;
    transition: none;
  }
}

/* ===== ACCOUNT — 두 다크 아코디언 ========================= */
.account {
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* 시안 SSOT(KmKj7, 02a 계좌 아코디언). 다크 브라운 외피 + 펼침 시 cream
   panel 안에 흰색 rounded row 카드. 화살표는 우측 정렬 chevron-down(open
   시 위로 회전). 펼침/접힘은 JS-driven height 트랜지션 (main.js setupAccordions). */
.acc {
  background: var(--color-accent);
  border-radius: 12px;
  overflow: hidden;
}
.acc__head {
  width: 100%;
  height: 52px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.24em;
  cursor: pointer;
}
.acc__arrow {
  width: 14px;
  height: 14px;
  color: #fff;
  transition: transform 0.2s ease;
}
.acc[data-open="true"] .acc__arrow { transform: rotate(180deg); }
/* 슬라이드 애니메이션 — 닫힌 상태는 height 0 + opacity 0, 열린 직후 JS 가
   scrollHeight 픽셀값을 지정하여 transition. transitionend 시점에 height
   를 auto 로 풀어 동적 컨텐츠(빈 row 등)에도 대응. prefers-reduced-motion
   에서는 transition 제거. */
.acc__panel {
  height: 0;
  opacity: 0;
  overflow: hidden;
  background: var(--color-bg-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: height 280ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms ease;
}
/* 첫 row 위쪽과 마지막 row 아래쪽에 cream panel 패딩이 보이도록 row 마진 처리.
   panel 자체에 padding 을 두면 height 0 일 때 잔존 영역이 생기므로 row 측에 처리. */
.acc__panel > .acc__row:first-child { margin-top: 12px; }
.acc__panel > .acc__row:last-child { margin-bottom: 12px; }
.acc__panel > .acc__row { margin-left: 12px; margin-right: 12px; }
.acc__panel:empty { display: none; }
@media (prefers-reduced-motion: reduce) {
  .acc__panel { transition: none; }
  .acc__arrow { transition: none; }
}
.acc__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.acc__role { font-size: 11px; color: var(--color-text-soft); font-weight: 500; letter-spacing: 0.08em; }
.acc__name { font-size: 14px; color: var(--color-text); font-weight: 600; margin-top: 4px; }
.acc__bank { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.acc__copy {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  color: var(--color-text);
  white-space: nowrap;
}

/* ===== GUESTBOOK (.pen ETH49) ============================ */
.gb {
  margin-top: 90px;
  padding: 0 24px 40px;
  display: flex; flex-direction: column;
  gap: 16px;
}
.gb__panel {
  padding: 64px 48px 56px;
  display: flex; flex-direction: column;
  align-items: center;
  gap: 16px;
  background-image: url("../assets/images/bg-guestbook.3dfe2064.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.gb .hand-h2 { margin-top: 40px; font-size: 32px; }
.gb__sub {
  font-size: 13px;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-align: center;
  margin: 0;
}
.gb__list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0 24px;
}
.gb__empty {
  text-align: center;
  font-size: 12px;
  color: var(--color-text-soft);
  padding: 32px 0;
  margin: 0;
}
.gb__empty--card {
  box-sizing: border-box;
  width: 100%;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 32px 16px;
}
.gb__item {
  background: var(--color-bg-soft);
  border-radius: 8px;
  padding: 14px;
  display: flex; flex-direction: column;
  gap: 6px;
}
.gb__head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px;
}
.gb__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}
.gb__date {
  font-size: 11px;
  color: var(--color-text-muted);
}
.gb__msg {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-body);
  white-space: pre-line;
  word-break: break-word;
}
.gb__head-right {
  display: inline-flex; align-items: baseline; gap: 6px;
}
.gb__delete {
  font-size: 13px;
  line-height: 1;
  color: var(--color-text-muted);
  background: none;
  border: none;
  padding: 0 2px;
  cursor: pointer;
}
.gb__delete:hover {
  color: var(--color-text);
}
.gb__pager {
  display: flex; justify-content: center;
  gap: 6px;
  padding: 6px 0;
  width: 342px;
  max-width: calc(100% - 48px);
  align-self: center;
}
.gb__pager button, .gb__pager span {
  width: 32px; height: 32px;
  box-sizing: border-box;
  border-radius: var(--radius-card);
  border: 1.5px solid var(--color-accent);
  background: #fff;
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gb__pager span { border: none; color: var(--color-text-soft); }
.gb__pager .active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  font-weight: 700;
}
.gb__pager button:disabled {
  color: rgba(74, 61, 56, 0.38);
  cursor: not-allowed;
}
.gb__pager .ic { width: 14px; height: 14px; color: var(--color-text-muted); }
.gb__cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 8px;
  width: 100%;
  align-self: center;
}

/* ===== FOOTER (.pen m3btJF) ============================== */
.footer {
  padding: 40px 24px;
  display: flex; flex-direction: column;
  gap: 12px;
}

/* 임시 — 콘페티 테스트 버튼. 검수 후 제거. 일반 outline 버튼과 시각적으로 구분되도록
   점선 테두리 + 약간 작은 폰트로 "테스트용" 임을 명확히 한다. */
.footer__confetti-test {
  border-style: dashed;
  font-size: 13px;
  opacity: 0.85;
}

/* ===== DIALOGS — .pen 04a~04i 1:1 매칭 ============ */
dialog.modal {
  border: 1px solid var(--color-border);
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  max-width: 290px;
  width: calc(100vw - 64px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.13);
  color: var(--color-text);
}
dialog.modal::backdrop { background: rgba(0,0,0,0.4); }

/* 아이콘 다이얼로그: 가운데 정렬 + gap 14 (열린 상태에서만 렌더) */
dialog.modal--icon[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* 28×28 단색 lucide 아이콘 (.dlg-ic--{tone}) */
.dlg-ic {
  width: 28px;
  height: 28px;
  display: inline-block;
}
.dlg-ic--danger { color: #C4524F; }
.dlg-ic--accent { color: var(--color-accent); }
.dlg-ic--soft { color: #B89684; }
/* .dlg-ic 위에서 .ic 클래스도 같이 부착해 SVG mask 적용 */
.dlg-ic.ic { background: currentColor; }

/* 제목 — 15px bold #1A1A1A */
dialog.modal h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  color: #1A1A1A;
  line-height: 1.4;
}

/* 본문 — 12px #5A5A5A center lineHeight 1.6 */
dialog.modal p {
  margin: 0;
  font-size: 12px;
  color: #5A5A5A;
  text-align: center;
  line-height: 1.6;
  font-weight: 400;
}

/* 폼 다이얼로그 (write/manage/edit) — 폼 필드는 좌측 정렬 */
dialog.modal:not(.modal--icon) h3 { margin-bottom: 12px; }
dialog.modal:not(.modal--icon) p { margin-bottom: 16px; }

dialog.modal .field {
  display: block;
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--color-text-muted);
  width: 100%;
  text-align: left;
}
dialog.modal .field input,
dialog.modal .field textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background: var(--color-bg);
  color: var(--color-text);
}

/* actions: gap 8, padding-top 6 (시안 d?r padding [6,0,0,0]) */
dialog.modal .actions {
  display: flex;
  gap: 8px;
  width: 100%;
  padding-top: 6px;
}
dialog.modal .actions button {
  flex: 1;
  height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
}
dialog.modal .ghost { background: #FAF6F2; color: #1A1A1A; }
dialog.modal .primary { background: var(--color-accent); color: #fff; }
dialog.modal .danger { background: #C4524F; color: #fff; }

dialog.modal .error {
  color: #C4524F;
  font-size: 12px;
  margin: -4px 0 8px;
  text-align: center;
  min-height: 1em;
  width: 100%;
}

/* helper-link (04b 04i 등 하단 텍스트 링크) */
dialog.modal .helper-link {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #C4524F;
  background: none;
  padding: 6px 0 0;
  font-weight: 500;
}
dialog.modal .helper-link .ic { width: 14px; height: 14px; color: #C4524F; }

/* ===== POPUP LAYER (시안 1존 L6 표준 — v4oJxh, WRQPP) =================
   dialog 와 다른 별도 컴포넌트. 화면을 완전히 덮어 메인 페이지 위에 새
   페이지가 열린 듯한 연출. 자체 헤더(arrow-left + 제목) + 스크롤 가능한
   본문. body scroll 은 popup 모듈이 lock 한다. */
.popup {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: 1000;
  background-color: var(--color-bg);
  background-image: url("../assets/images/bg-shared-stars.06a083f2.png");
  background-position: center top;
  background-size: var(--screen-w) auto;
  background-repeat: repeat;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  transition: opacity 220ms ease;
}
.popup[data-open="true"] { opacity: 1; }
.popup[hidden] { display: none !important; }

@media (min-width: 601px) {
  .popup { width: var(--screen-w); }
}

.popup__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 1;
}
.popup__back {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  color: var(--color-text);
  cursor: pointer;
}
.popup__back .ic { width: 22px; height: 22px; }
.popup__title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
}

.popup__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  flex: 1;
}
.popup__intro {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
  letter-spacing: 0.04em;
}
.popup__field { display: block; }
.popup__field > span {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-accent);
}
.popup__field input,
.popup__field textarea {
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: var(--color-text);
  resize: vertical;
}
.popup__field--ta textarea { min-height: 140px; }
.popup__counter {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--color-text-muted);
  text-align: right;
  font-family: var(--font-ui);
}
.popup__counter[hidden] { display: none; }
.popup__error {
  margin: 0;
  min-height: 1em;
  font-size: 12px;
  color: #C4524F;
  text-align: center;
}
.popup__submit {
  height: 52px;
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
}
.popup__submit .ic { width: 18px; height: 18px; }

/* 업로드 팝업 전용 — 안내 박스 + 파일 선택 박스 (dashed border) */
.popup__notice {
  background: var(--color-bg-soft);
  border-radius: 8px;
  padding: 16px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--color-text-body);
}
.popup__notice h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-accent);
}
.popup__notice p { margin: 0; }
/* 시안 WRQPP filePick — 솔리드 1.5px #B89684 테두리, 다크 브라운 파일 선택 버튼.
   기존 dashed 였던 테두리는 시안에 맞춰 solid 로 교체. */
.popup__filepick {
  background: var(--color-bg-soft);
  border: 1.5px solid #B89684;
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
.popup__filepick-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}
.popup__filepick-sub {
  margin: 0;
  font-size: 11px;
  color: var(--color-text-muted);
}
.popup__filepick-row {
  width: 100%;
  margin-top: 8px;
}
/* 시안 G23AR/Hwq4P 계열 — 다크 브라운 #4A3D38 풀필 + 흰 텍스트/아이콘, cornerRadius 10. */
.popup__pick-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.popup__pick-btn .ic { width: 20px; height: 20px; }
.popup__pick-btn:active { opacity: 0.85; }

/* "X개 선택됨" 안내 — 파일 선택 후에만 표시 */
.popup__filepick-status {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-accent);
  min-height: 1em;
}
.popup__filepick-status:empty { display: none; }

.popup__progress {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
  min-height: 1em;
}
.popup__progress:empty { display: none; }

.popup__selected {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.popup__selected[hidden] { display: none; }
.popup__selected-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.popup__selected-head strong {
  font-size: 13px;
  color: var(--color-accent);
}
.popup__selected-head span {
  font-size: 12px;
  color: var(--color-text-muted);
}
.popup__selected-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.popup__selected-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.popup__selected-thumb {
  height: 72px;
  border-radius: 8px;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}
.popup__selected-thumb .ic {
  width: 24px;
  height: 24px;
}
.popup__selected-card p {
  margin: 0;
  font-size: 10px;
  line-height: 1.3;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.popup__selected-card button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 시안 Ffgn9 — 별도 업로드 확정 버튼. height 52, dark fill, lucide check + "업로드". */
.popup__upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  padding: 0 16px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.popup__upload-btn .ic { width: 18px; height: 18px; }
.popup__upload-btn:disabled { opacity: 0.42; cursor: not-allowed; }
.popup__upload-btn:not(:disabled):active { opacity: 0.85; }
@media (prefers-reduced-motion: reduce) {
  .popup { transition: none; }
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(26, 26, 26, 0.92);
  color: #fff;
  font-size: 12px;
  z-index: 100;
  pointer-events: none;
  animation: toast-fade 2.4s ease;
}
@keyframes toast-fade {
  0% { opacity: 0; transform: translate(-50%, 16px); }
  10% { opacity: 1; transform: translate(-50%, 0); }
  90% { opacity: 1; }
  100% { opacity: 0; }
}

/* ===== PHOTO VIEWER ===== */
.photo-viewer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  touch-action: pan-y;
}
.photo-viewer[data-open="1"] { display: flex; }
@media (min-width: 601px) {
  .photo-viewer { width: var(--screen-w); }
}
.photo-viewer__img {
  max-width: calc(100% - 32px);
  max-height: 88vh;
  object-fit: contain;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  /* 드래그 핸들러를 위해 [data-protected] 의 pointer-events:none 을 override */
  pointer-events: auto;
  touch-action: pan-y;
  transition: transform 240ms ease, opacity 240ms ease;
  transform: translateX(0);
  opacity: 1;
}
.photo-viewer__img.is-exit-left   { transform: translateX(-110%); opacity: 0; }
.photo-viewer__img.is-exit-right  { transform: translateX(110%);  opacity: 0; }
.photo-viewer__img.is-enter-left  { transform: translateX(-110%); opacity: 0; transition: none; }
.photo-viewer__img.is-enter-right { transform: translateX(110%);  opacity: 0; transition: none; }
.photo-viewer__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1.5px solid rgba(255,255,255,0.9);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25), 0 2px 8px rgba(0,0,0,0.4);
  cursor: pointer;
  z-index: 2;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.photo-viewer__close:hover { background: rgba(0,0,0,0.6); }
.photo-viewer__counter {
  position: absolute;
  top: 28px; left: 0; right: 0;
  text-align: center;
  color: #fff;
  font-family: "Noto Serif KR", serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  pointer-events: none;
}
/* 좌우 화살표 — 시안 lOhBT/H4DEZO: 36×36 원형, lucide chevron-left/right 22×22, 흰 stroke,
   반투명 검은 원판 + 1.5px 흰 외곽선. 어떤 배경(밝은 사진/어두운 사진)에서도 고대비. */
.photo-viewer__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1.5px solid rgba(255,255,255,0.9);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25), 0 2px 8px rgba(0,0,0,0.4);
  cursor: pointer;
  z-index: 2;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.photo-viewer__arrow:hover { background: rgba(0,0,0,0.6); }
.photo-viewer__arrow--prev { left: 8px; }
.photo-viewer__arrow--next { right: 8px; }
.photo-viewer__dots {
  position: absolute;
  bottom: 56px; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.photo-viewer__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.33); /* 시안 #FFFFFF55 */
}
/* 시안 — active dot 은 8×8 / 흰색 */
.photo-viewer__dot.is-active { width: 8px; height: 8px; background: #fff; }
.photo-viewer__hint {
  position: absolute;
  bottom: 24px; left: 0; right: 0;
  text-align: center;
  color: rgba(255,255,255,0.67);
  font-family: "Noto Serif KR", serif;
  font-size: 11px;
  letter-spacing: 1px;
  margin: 0;
  pointer-events: none;
}

/* ===== UPLOAD PAGE ===== */
.upload-page { padding: 32px 24px 48px; text-align: center; }
.upload-page input[type="file"] { display: none; }
.upload-page__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 20px;
}
.upload-page__list img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  border-radius: 6px;
}
.upload-progress { font-size: 12px; color: var(--color-text-muted); margin-top: 12px; }
.upload-actions { display: flex; gap: 12px; justify-content: center; margin-top: 14px; }

.upload-notice {
  text-align: left;
  background: #FAF6F2;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 16px 0 20px;
}
.upload-notice strong {
  display: block;
  font-size: 13px;
  color: #4A3D38;
  margin-bottom: 6px;
}
.upload-notice ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  color: var(--color-text-body);
  line-height: 1.7;
}
.upload-notice li::before { content: "• "; color: #B89684; }

.upload-name {
  display: block;
  text-align: left;
  max-width: 320px;
  margin: 0 auto 20px;
  font-size: 13px;
  color: #4A3D38;
  font-weight: 600;
}
.upload-name input {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px solid #EAD3CE;
  border-radius: 8px;
  background: #fff;
  font-size: var(--size-body);
  font-family: inherit;
  font-weight: 400;
  color: var(--color-text);
}

.upload-pick {
  border: 1.5px solid #B89684;
  border-radius: 12px;
  background: #FAF6F2;
  padding: 18px 16px;
  margin: 0 0 18px;
}
.upload-pick__title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #1A1A1A;
}
.upload-pick__sub {
  font-size: 11px;
  color: #5A5A5A;
  margin: 4px 0 0;
}

.upload-selected {
  text-align: left;
  margin: 20px 0;
}
.upload-selected__hdr {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.upload-selected__hdr strong { font-size: 13px; color: #4A3D38; }
.upload-selected__summary { font-size: 12px; color: #6B6B6B; }
.upload-selected__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.upload-card { display: flex; flex-direction: column; gap: 4px; }
.upload-card__thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #E0D8D0;
}
.upload-card__img,
.upload-card__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.upload-card__video-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding-left: 2px;
}
.upload-card__video-badge[style*="display: "] { display: flex; }
.upload-card__action {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 11px;
  background: rgba(26, 26, 26, 0.8);
  color: #fff;
  border: 0;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.upload-card__action::before { content: "×"; font-size: 16px; }
.upload-card[data-state="done"] .upload-card__action::before { content: "🗑"; font-size: 12px; }
.upload-card__progress {
  position: absolute;
  inset: auto 0 0 0;
  height: 24px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.upload-card__progress::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--upload-progress, 0%);
  background: rgba(184, 150, 132, 0.85);
  transition: width 0.15s ease;
}
.upload-card__progress-pct { position: relative; }
.upload-card__check,
.upload-card__fail {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.upload-card__check { background: #4A6B4A; }
.upload-card__fail  { background: #B85050; }

.upload-card[data-state="uploading"] .upload-card__action { display: none; }
.upload-card[data-state="uploading"] .upload-card__progress { display: flex; }
.upload-card[data-state="done"] .upload-card__check { display: flex; }
.upload-card[data-state="failed"] .upload-card__fail { display: flex; }
.upload-card[data-state="deleting"] .upload-card__action { display: none; }
.upload-card[data-state="deleting"] { opacity: 0.5; }

.upload-card__name {
  font-size: 10px;
  color: #6B6B6B;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-submit {
  width: 100%;
  padding: 14px 16px;
  background: #4A3D38;
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  margin-top: 4px;
}
.upload-submit:disabled { opacity: 0.4; cursor: not-allowed; }
.upload-submit__check { font-size: 16px; }

.upload-back { margin-top: 28px; }
