/* 추억의 필름 스타일 (src/designs/film/Template.tsx 와 짝). 390px 폭 모바일 기준 */
@font-face {
  font-family: 'DdalEomma'; /* 나눔손글씨 딸에게 엄마가 (NAVER, 글자 일부만 담은 파일) */
  src: url(/fonts/nanum-ddal/NanumDdarEGeEomMaGa-subset.woff2) format('woff2');
  font-display: swap;
}
:root {
  --paper: #ffffff;
  --print: #fdfbf6;
  --sepia: #e8ddc8;
  --ink: #2b2723;
  --ink-soft: #5e564d;
  --film: #191614;
  --stamp: #f09a4f;
  --green: #2f4a3c;
  --line: #d8cdb9;
  --font-body: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  --font-hand: 'DdalEomma', 'Noto Sans KR', cursive;
  --font-script: 'Mrs Saint Delafield', 'DdalEomma', cursive;
  --shadow-print: 0 6px 18px rgba(43, 39, 35, 0.16);
  --shadow-film: 0 10px 26px rgba(25, 22, 20, 0.32);
  --film-look: saturate(0.9) contrast(0.96) sepia(0.14);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: #ece6d9; color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.8; word-break: keep-all; }
p, h1, h2, h3, ul { margin: 0; padding: 0; }
ul { list-style: none; }
img { max-width: none; }
a { color: var(--green); }
a:hover { color: var(--film); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.film { width: 100%; max-width: 430px; margin: 0 auto; background: var(--paper); overflow: hidden; box-shadow: 0 0 40px rgba(43, 39, 35, 0.1); }

/* 필름 질감 */
.f-grain { position: absolute; inset: 0; background: url(/designs/film/grain.png); opacity: 0.32; mix-blend-mode: overlay; pointer-events: none; }
.f-holes-v { width: 22px; height: 100%; background: url(/designs/film/holes-v.svg) repeat-y center top; }
.f-holes-h { height: 22px; background: url(/designs/film/holes-h.svg) repeat-x left center; }
.f-stamp { position: absolute; right: 12px; bottom: 10px; color: var(--stamp); font-size: 13px; font-weight: 500; letter-spacing: 3px; line-height: 1; text-shadow: 0 0 6px rgba(240, 154, 79, 0.7); }

/* 표지 */
.f-cover { position: relative; height: 844px; overflow: hidden; background: var(--sepia); }
.f-bg { position: absolute; width: 184px; display: flex; flex-direction: column; gap: 10px; opacity: 0.5; filter: sepia(1) saturate(0.55) brightness(1.08); }
.f-bg img { display: block; width: 184px; height: 276px; object-fit: cover; }
.f-bg--l { left: -70px; top: -24px; }
.f-bg--r { right: -70px; top: -150px; }
.f-reel { position: absolute; left: 50%; margin-left: -165px; top: -30px; width: 330px; height: 910px; background: var(--film); box-shadow: var(--shadow-film); transform: rotate(-1.5deg); display: flex; overflow: hidden; }
.f-rail { flex: none; width: 40px; display: flex; justify-content: center; }
.f-rail__text { width: 16px; height: 100%; writing-mode: vertical-rl; font-size: 12px; font-weight: 500; letter-spacing: 3px; line-height: 16px; color: var(--stamp); white-space: nowrap; overflow: hidden; }
.f-rail__text--flip { transform: rotate(180deg); }
.f-frames { position: relative; width: 250px; padding-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.f-blur { width: 250px; border-radius: 6px; overflow: hidden; }
.f-blur img { display: block; width: 250px; object-fit: cover; filter: blur(5px) brightness(0.55) saturate(0.9); transform: scale(1.15); }
.f-blur--a { height: 150px; }
.f-blur--a img { height: 150px; object-position: 50% 30%; }
.f-blur--b { height: 330px; }
.f-blur--b img { height: 330px; object-position: 50% 80%; filter: blur(6px) brightness(0.55) saturate(0.9); }
.f-script-top { position: absolute; top: 70px; left: 0; width: 250px; text-align: center; font-family: var(--font-script); font-size: 38px; line-height: 1.3; color: #fff; text-shadow: 0 2px 12px rgba(25, 22, 20, 0.5); }
.f-main { position: relative; }
.f-main img { display: block; width: 250px; height: 340px; object-fit: cover; object-position: 50% 62%; border-radius: 6px; filter: var(--film-look); }
.f-names { position: absolute; top: 504px; left: 0; width: 250px; padding: 0 14px; color: #fff; text-shadow: 0 2px 14px rgba(25, 22, 20, 0.5); }
.f-names h1 { font-family: var(--font-script); font-weight: 400; font-size: var(--nm, 84px); line-height: 0.95; }
.f-names span { display: block; overflow-wrap: anywhere; }
.f-names .amp { text-align: center; font-size: 52px; line-height: 0.9; }
.f-names .bride { text-align: right; }

/* 공통 섹션 */
.f-sec { padding: 64px 24px 72px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.f-eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 4px; color: var(--green); line-height: 1.4; }
.f-h2 { margin-top: 10px; font-weight: 500; font-size: 22px; letter-spacing: 1px; line-height: 1.5; }
.f-sub { margin-top: 16px; font-size: 14px; color: var(--ink-soft); }
.f-hint { margin-top: 24px; font-size: 12px; color: var(--ink-soft); line-height: 1.6; }
.f-btn { height: 52px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font-size: 15px; font-weight: 500; transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease; }
.f-btn--ink { background: var(--ink); color: var(--paper); }
.f-btn--line { width: 100%; max-width: 342px; margin-top: 16px; border-color: var(--green); color: var(--green); }
.f-btn--sm { height: 48px; font-size: 14px; }
.f-btn--ink-line { border-color: var(--ink); color: var(--ink); }
@media (hover: hover) {
  .f-btn:hover { transform: translateY(-2px); }
  .f-btn--line:hover { background: var(--green); color: var(--paper); }
  .f-btn--ink-line:hover { background: var(--ink); color: var(--paper); }
}

/* 인사말 */
.f-greeting__text { margin-top: 36px; }
.f-rule { width: 40px; height: 1px; background: var(--line); margin: 40px 0; }
.f-families { display: flex; flex-direction: column; gap: 6px; }
.f-families span { color: var(--ink-soft); }
.f-families strong { margin-left: 10px; font-size: 18px; font-weight: 700; }

/* 편지 */
.f-letter { padding: 24px 24px 80px; display: flex; flex-direction: column; align-items: center; overflow: hidden; }
.f-letter__photo { width: 302px; max-width: 100%; box-shadow: var(--shadow-print); transform: rotate(1.2deg); }
.f-letter__photo img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; filter: var(--film-look); }
.f-note { position: relative; z-index: 2; width: 248px; max-width: 100%; padding: 20px 16px 18px; text-align: center; font-family: var(--font-hand); font-size: 18px; line-height: 1.28; color: var(--ink); min-height: 200px; transform: rotate(-2.5deg); }
.f-note::before { content: ''; position: absolute; z-index: -1; top: 19px; bottom: -14px; left: -14px; right: -30px; background: url(/designs/film/paint.png) center / 100% 100% no-repeat; }
.f-note--over { margin-top: -192px; margin-left: 32px; min-height: 251px; }
.f-note p { overflow-wrap: anywhere; }
.f-note__from { margin-top: 12px; }

/* 예식 안내 */
.f-day { padding: 64px 0 72px; }
.f-day__when { margin-top: 24px; padding: 0 24px; }
.f-band { align-self: stretch; margin-top: 32px; padding: 22px 0; overflow: hidden; }
.f-band__reel { position: relative; width: 430px; margin-left: calc(50% - 215px); background: var(--film); box-shadow: var(--shadow-film); display: flex; flex-direction: column; overflow: hidden; }
.f-band--tilt-l .f-band__reel { transform: rotate(-2deg); }
.f-band--tilt-r .f-band__reel { transform: rotate(1.5deg); }
.f-band__text { height: 18px; padding: 2px 26px 0; font-size: 12px; font-weight: 500; letter-spacing: 3px; line-height: 16px; color: var(--stamp); white-space: nowrap; overflow: hidden; text-align: left; }
.f-band__text--end { padding: 0 26px 2px; text-align: right; }
.f-band__frames { display: flex; gap: 12px; margin: 4px 0 4px -247px; }
.f-band__frame { position: relative; flex: none; width: 300px; height: 200px; }
.f-band__frame img { display: block; width: 300px; height: 200px; object-fit: cover; border-radius: 6px; filter: var(--film-look); }
.f-cal__month { margin-top: 40px; font-size: 16px; font-weight: 500; letter-spacing: 2px; line-height: 1.6; }
.f-cal { width: 100%; max-width: 308px; margin-top: 16px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: 44px; align-items: center; justify-items: center; font-size: 14px; line-height: 1; }
.f-cal__dow { font-size: 12px; font-weight: 500; color: var(--ink-soft); }
.f-cal__day { position: relative; z-index: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--green); color: var(--paper); font-weight: 500; display: flex; align-items: center; justify-content: center; }
.f-dday { margin-top: 32px; color: var(--ink-soft); }
.f-dday strong { font-weight: 700; color: var(--ink); }
@keyframes day-ripple { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(2.3); opacity: 0; } }
.day-pulse::before, .day-pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--green); z-index: -1; animation: day-ripple 2s ease-out infinite; }
.day-pulse::after { animation-delay: 1s; }

/* 갤러리: 인화 사진을 흩어 놓은 모양 */
.f-gallery { overflow: hidden; }
.f-collage { position: relative; flex: none; width: 390px; margin-top: 40px; }
.fg { position: absolute; padding: 0; border: 0; background: none; cursor: zoom-in; transition: transform 0.3s ease; }
.fg img { display: block; width: 100%; height: 100%; object-fit: cover; box-shadow: var(--shadow-print); }
.fg:nth-child(1) { left: 12px; top: 8px; width: 190px; height: 285px; transform: rotate(-3deg); }
.fg:nth-child(2) { left: 186px; top: 64px; width: 190px; height: 285px; transform: rotate(2.5deg); }
.fg:nth-child(3) { left: 18px; top: 262px; width: 240px; height: 160px; transform: rotate(-2deg); }
.fg:nth-child(4) { left: 192px; top: 372px; width: 184px; height: 276px; transform: rotate(-2deg); }
.fg:nth-child(5) { left: 10px; top: 404px; width: 190px; height: 285px; transform: rotate(2deg); }
.fg:nth-child(6) { left: 98px; top: 656px; width: 276px; height: 184px; transform: rotate(1.5deg); }
@media (hover: hover) { .fg:hover { transform: rotate(0deg) scale(1.04); z-index: 3; } }

/* 오시는 길 */
.f-loc__name { margin-top: 28px; font-size: 17px; font-weight: 500; line-height: 1.6; }
.f-loc__addr { margin-top: 4px; font-size: 14px; color: var(--ink-soft); }
.f-map { width: 100%; max-width: 342px; margin-top: 28px; }
.f-map img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.f-map--blank { height: 220px; border: 1px solid var(--line); background-color: var(--print); background-image: repeating-linear-gradient(0deg, transparent 0 43px, var(--line) 43px 44px), repeating-linear-gradient(90deg, transparent 0 56px, var(--line) 56px 57px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.f-map--blank span { padding: 2px 10px; background: var(--print); font-size: 12px; color: var(--ink-soft); line-height: 1.6; }
.f-maplinks { width: 100%; max-width: 342px; margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.f-maplink { height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--ink); color: var(--ink); font-size: 13px; text-decoration: none; transition: background-color 0.18s ease, color 0.18s ease; }
@media (hover: hover) { .f-maplink:hover { background: var(--ink); color: var(--paper); } }
.f-transit { width: 100%; max-width: 342px; margin-top: 48px; display: flex; flex-direction: column; gap: 28px; text-align: left; }
.f-transit > div { display: flex; flex-direction: column; gap: 6px; padding-top: 20px; border-top: 1px solid var(--line); }
.f-transit h3 { font-size: 15px; font-weight: 500; line-height: 1.6; }
.f-transit p { font-size: 14px; color: var(--ink-soft); overflow-wrap: anywhere; }

/* 참석 · 계좌 */
.f-rsvp__text { margin-top: 24px; }
.f-rsvp .f-btn { margin-top: 36px; width: 220px; }
.f-acc__list { width: 100%; max-width: 342px; margin-top: 40px; text-align: left; }
.f-acc__group { border-top: 1px solid var(--ink); }
.f-acc__group:last-child { border-bottom: 1px solid var(--ink); }
.f-acc__group summary { list-style: none; min-height: 56px; padding: 0 4px; display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 500; cursor: pointer; }
.f-acc__group summary::-webkit-details-marker { display: none; }
.f-acc__group summary svg { transition: transform 0.2s ease; }
.f-acc__group[open] summary svg { transform: rotate(180deg); }
.f-acc__group ul { padding: 0 4px 8px; }
.f-acc__group li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.f-acc__who { display: block; font-size: 15px; font-weight: 500; line-height: 1.6; }
.f-acc__no { display: block; font-size: 14px; color: var(--ink-soft); line-height: 1.6; overflow-wrap: anywhere; }
.f-acc__group li button { flex: none; min-width: 64px; height: 44px; border: 1px solid var(--ink); background: transparent; font-size: 13px; }

/* 방명록 */
.f-gb__list { width: 100%; max-width: 342px; margin-top: 44px; display: flex; flex-direction: column; gap: 22px; text-align: left; }
.f-gb__item { width: 296px; max-width: 100%; padding: 18px 20px 16px; background: var(--print); box-shadow: var(--shadow-print); align-self: flex-start; transform: rotate(-1.5deg); transition: transform 0.25s ease; }
.f-gb__item:nth-of-type(4n + 2) { align-self: flex-end; transform: rotate(1.2deg); }
.f-gb__item:nth-of-type(4n + 3) { transform: rotate(-0.6deg); }
.f-gb__item:nth-of-type(4n) { align-self: flex-end; transform: rotate(1.4deg); }
@media (hover: hover) { .f-gb__item:hover { transform: rotate(0deg) translateY(-3px); } }
.f-gb__msg { white-space: pre-line; overflow-wrap: anywhere; }
.f-gb__meta { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); line-height: 1.6; }
.f-gb__meta b { font-weight: 500; color: var(--ink); }
.f-gb__meta button { min-width: 44px; min-height: 44px; margin: -10px -8px -10px 0; padding: 0 8px; border: 0; background: none; color: var(--ink-soft); font-size: 12px; text-decoration: underline; }
.f-gb__empty { margin-top: 30px; }
.f-gb__empty[hidden], .f-more[hidden] { display: none; }
.f-more { min-width: 200px; min-height: 44px; margin-top: 28px; padding: 0 16px; border: 0; background: none; color: var(--ink-soft); font-size: 13px; display: inline-flex; gap: 8px; justify-content: center; align-items: center; }
.f-more span:first-child { text-decoration: underline; text-underline-offset: 4px; }

/* 맺음 */
.f-end { padding: 0 0 72px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.f-end__title { margin-top: 40px; padding: 0 24px; }
.f-end__names { margin-top: 8px; font-size: 13px; letter-spacing: 2px; color: var(--ink-soft); line-height: 1.6; }
.f-share { width: 100%; max-width: 342px; margin-top: 36px; padding: 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.f-share .f-btn { margin-top: 0; width: auto; }

/* 하객 입력 창: 공통 틀(invite-guest.css)의 기본 색이 이 디자인과 같다. 글꼴만 맞춘다 */
.gd { --g-font: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif; }

/* 필름이 흐르는 움직임: 같은 속도(1초에 36px)로 구멍·글자·사진이 한 방향으로 흐른다.
   표지의 세로 띠는 아래로, 위쪽 가로 띠는 왼쪽으로, 맨 아래 가로 띠는 오른쪽으로 */
@keyframes f-run-x { to { transform: translateX(-50%); } }
@keyframes f-run-y { to { transform: translateY(-50%); } }
@keyframes f-holes-x { to { background-position-x: -28px; } }
@keyframes f-holes-y { to { background-position-y: 28px; } }
@keyframes f-frames { to { transform: translateX(-936px); } }
.f-run { display: inline-block; white-space: nowrap; animation: f-run-x var(--flow-dur, 22s) linear infinite; }
.f-run--v { display: block; width: 16px; height: max-content; animation-name: f-run-y; }
.f-rail--r .f-run--v { animation-direction: reverse; }
.f-holes-h { animation: f-holes-x calc(28 / 36 * 1s) linear infinite; }
.f-holes-v { animation: f-holes-y calc(28 / 36 * 1s) linear infinite; }
.f-band__frames { animation: f-frames calc(936 / 36 * 1s) linear infinite; will-change: transform; }
.f-band--tilt-r .f-run, .f-band--tilt-r .f-holes-h, .f-band--tilt-r .f-band__frames { animation-direction: reverse; }

/* 사진 크게 보기 · 안내 문구 · 스크롤 등장 */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(25, 22, 20, 0.94); color: #fff; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: transparent; }
.lightbox__figure { max-width: min(92vw, 720px); text-align: center; }
.lightbox__figure img { display: block; max-width: 100%; max-height: 80dvh; margin: 0 auto; object-fit: contain; filter: var(--film-look); }
.lightbox__figure figcaption { margin-top: 14px; font-size: 14px; opacity: 0.9; }
.lightbox__close, .lightbox__nav { position: absolute; width: 48px; height: 48px; border: 0; border-radius: 24px; background: rgba(255, 255, 255, 0.14); color: #fff; display: flex; align-items: center; justify-content: center; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 12px; }
.lightbox__nav--next { right: 12px; }
.toast { position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px); padding: 12px 20px; background: rgba(25, 22, 20, 0.94); color: #fff; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; white-space: nowrap; z-index: 100; }
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
