/* 깔끔한 미니멀 — 색·글꼴 세부는 나중에 함께 확정 */
:root {
  --bg: #ffffff;
  --text: #222222;
  --muted: #8a8a8a;
  --line: #e6e6e6;
  --accent: #222222;
  --soft: rgba(0, 0, 0, 0.025);   /* 접는 칸·빈 자리 배경 */
  --field: rgba(255, 255, 255, 0.75); /* 입력칸·버튼 배경 */
}

/* 테마별 색 (관리자 > 테마). --theme-en: 커버·섹션 제목 위 영문 글씨체 */
[data-theme="t1"] { --bg: #fbfaf8; --text: #2b2b2b; --muted: #8c8a86; --line: #e8e5e0; --accent: #2b2b2b; --theme-en: "Cormorant Garamond"; }
[data-theme="t2"] { --bg: #ffffff; --text: #222222; --muted: #8a8a8a; --line: #ececec; --accent: #222222; --theme-en: "Great Vibes"; }
[data-theme="t3"] { --bg: #f3efe8; --text: #3b342c; --muted: #8f8576; --line: #e0d8cb; --accent: #6b5b48; --theme-en: "Cormorant Garamond"; }
[data-theme="t4"] { --bg: #faf6f3; --text: #3a3030; --muted: #9a8a86; --line: #eadfda; --accent: #b0736b; --theme-en: "Sacramento"; }
[data-theme="t5"] { --bg: #f2f2f2; --text: #1f1f1f; --muted: #7d7d7d; --line: #dcdcdc; --accent: #1f1f1f; --theme-en: "Space Mono"; }
[data-theme="t6"] { --bg: #f0efed; --text: #1c1c1c; --muted: #858380; --line: #dcd9d4; --accent: #1c1c1c; --theme-en: "Playfair Display"; }
[data-theme="t7"] { --bg: #ffffff; --text: #2a2a2a; --muted: #8f8f8f; --line: #ededed; --accent: #3f4a36; --theme-en: "Cormorant Garamond"; }
[data-theme="t8"] { --bg: #f7f5f3; --text: #2e2a27; --muted: #8c8580; --line: #e6e0da; --accent: #8a7461; --theme-en: "Cormorant Garamond"; }
[data-theme="t9"] { --bg: #eef1ec; --text: #2c332b; --muted: #7c8679; --line: #d7ded3; --accent: #5d6f58; --theme-en: "Montserrat"; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  /* 청첩장 글꼴: 마루 부리 (네이버). 바꿀 때는 이 줄과 index.html의 글꼴 링크만 수정 */
  font-family: var(--font-ko, "MaruBuri"), "Apple SD Gothic Neo", "Malgun Gothic", serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
[hidden] { display: none !important; }

.center-screen {
  min-height: 100svh;
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* 불러오는 중 */
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { background: var(--muted); } }

/* 이름 · 날짜 */
.names { font-size: 22px; letter-spacing: 0.08em; margin: 0; }
.names .amp { margin: 0 12px; color: var(--muted); font-weight: 300; }
.date { font-size: 14px; color: var(--muted); margin: 12px 0 0; letter-spacing: 0.02em; }
.line { width: 32px; border: 0; border-top: 1px solid var(--line); margin: 40px auto; }
.message { font-size: 15px; white-space: pre-line; margin: 0; }
.muted { color: var(--muted); }
.placeholder { color: #c4c4c4; }

/* 배경음악 버튼 (오른쪽 위, 오프닝 위에도 보이게) */
.music-btn {
  position: fixed; top: 14px; right: 14px; z-index: 45;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.1); background: rgba(255, 255, 255, 0.85);
  font-size: 16px; color: #999; line-height: 1; padding: 0;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.music-btn.on { color: var(--text); animation: spin 6s linear infinite; }
.music-btn:not(.on)::after {
  content: ""; position: absolute; left: 9px; right: 9px; top: 50%; height: 1px;
  background: #999; transform: rotate(-45deg);
}
@keyframes spin { to { transform: rotate(360deg); } }
.music-preview { width: 100%; margin-top: 4px; }

/* ── 커버 (오프닝 다음 맨 위 화면) ── */
#cover { max-width: 480px; margin: 0 auto; }
.cv { --k: var(--cvk, 1); }
.cv .en { --k: var(--cve, 1); }
.cv { position: relative; min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); color: var(--text); text-align: center; line-height: 1.4; }
.cv p { margin: 0; }
.cv .en { font-family: var(--font-cover-en, var(--theme-en, "Cormorant Garamond")), var(--font-ko, "MaruBuri"), serif; }
.cv-photo { flex: 1; position: relative; min-height: 0; }
.cv-photo > img, .cv-photo > .cv-noimg, .cv-arch > img, .cv-arch > .cv-noimg, .cv-bg > img, .cv-bg > .cv-noimg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.cv-noimg { display: flex !important; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.07); color: var(--muted); font-size: calc(14px * var(--k, 1)); }
.cv-full { color: #fff; }
.cv-bg { position: absolute; inset: 0; }
.cv-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.12), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 55%, rgba(0,0,0,.42)); }
.cv-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 22px 44px; }
.cv-script { font-size: calc(76px * var(--k, 1)); line-height: 0.95; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25); }
.cv-week { font-size: calc(11px * var(--k, 1)); letter-spacing: 0.35em; margin-top: 8px !important; color: var(--muted); }
.cv-date { font-size: calc(30px * var(--k, 1)); letter-spacing: 0.06em; line-height: 1.2; }
.cv-small { font-size: calc(14px * var(--k, 1)); letter-spacing: 0.12em; margin-top: 6px !important; }

/* 1 날짜 + 사진 */
.cv-t1 .cv-top { padding: 60px 20px 30px; }
/* 손글씨 테마의 날짜 줄은 읽기 쉬운 세리프로 */
.cv .en.cv-row, .cv-t4 .en.cv-small { font-family: "Cormorant Garamond", serif; }
/* 2 Getting Married */
.cv-t2 .cv-script { text-align: left; padding-left: 6px; }
.cv-t2 .cv-row { display: flex; justify-content: space-between; font-size: calc(14px * var(--k, 1)); letter-spacing: 0.25em; margin-top: 26px !important; padding: 0 6px; }
/* 3 세로 이름 */
.cv-t3 .cv-vnames { display: flex; justify-content: center; align-items: center; gap: 28px; padding: 60px 0 36px; }
.cv-t3 .v { writing-mode: vertical-rl; text-orientation: upright; font-size: calc(22px * var(--k, 1)); letter-spacing: 0.35em; }
.cv-slash { width: 1px; height: 46px; background: var(--text); transform: rotate(35deg); opacity: 0.6; }
.cv-t3 .cv-when { padding: 34px 20px 0; font-size: calc(15px * var(--k, 1)); }
.cv-rule { width: calc(100% - 64px); margin: 16px auto; border: 0; border-top: 1px solid var(--line); }
.cv-t3 .cv-where { font-size: calc(14px * var(--k, 1)); padding-bottom: 48px; }
/* 4 손글씨 사선 */
.cv-t4 .cv-tilt { position: absolute; left: 0; right: 0; top: 20%; font-size: calc(70px * var(--k, 1)); line-height: 1.05; transform: rotate(-12deg); }
.cv-t4 .cv-names { font-size: calc(20px * var(--k, 1)); letter-spacing: 0.08em; }
/* 5 필름 프레임 */
.cv-t5 { background: linear-gradient(180deg, #2b2b2b, #9a9a9a 50%, #2b2b2b); color: #f2f2f2; padding: 32px 32px; }
.cv-t5 .en { font-size: calc(12px * var(--k, 1)); letter-spacing: 0.22em; text-transform: uppercase; white-space: nowrap; }
.cv-ftop { position: absolute; top: 9px; left: 0; right: 0; }
.cv-fbot { position: absolute; bottom: 9px; left: 0; right: 0; }
.cv-fside { position: absolute; top: 50%; writing-mode: vertical-rl; }
.cv-fside.l { left: 7px; transform: translateY(-50%) rotate(180deg); }
.cv-fside.r { right: 7px; transform: translateY(-50%); }
/* 6 매거진 */
.cv-t6 { padding: 52px 0 44px; }
.cv-mag { font-size: calc(62px * var(--k, 1)); line-height: 0.98; position: relative; z-index: 1; text-transform: uppercase; }
.cv-t6 .cv-photo { width: 76%; margin: -30px auto 0; }
.cv-stamp { position: absolute; right: -36px; bottom: 28px; width: 92px; height: 92px; z-index: 2; background: var(--bg); border-radius: 50%; animation: spin 18s linear infinite; }
.cv-stamp text { font-size: calc(10.5px * var(--k, 1)); letter-spacing: 1.5px; fill: var(--text); font-family: var(--font-cover-en, var(--theme-en)), serif; }
.cv-msg { font-size: calc(19px * var(--k, 1)); line-height: 1.35; margin-top: 26px !important; padding: 0 24px; }
.cv-t6 .cv-small { color: var(--muted); font-size: calc(13px * var(--k, 1)); margin-top: 14px !important; letter-spacing: 0.08em; }
/* 7 뉴 비기닝 */
.cv-t7 .cv-top { padding: 56px 20px 32px; }
.cv-eyebrow { font-size: calc(13px * var(--k, 1)); letter-spacing: 0.3em; color: var(--muted); text-transform: uppercase; }
.cv-t7 .cv-names { font-size: calc(20px * var(--k, 1)); margin-top: 14px !important; letter-spacing: 0.1em; }
.cv-t7 .cv-names span { font-size: calc(15px * var(--k, 1)); margin: 0 6px; color: var(--muted); }
.cv-t7 .cv-photo { border-radius: 16px 16px 0 0; overflow: hidden; }
/* 8 아치 */
.cv-t8 .cv-top { padding: 56px 20px 28px; }
.cv-arch { flex: 1; position: relative; width: 84%; margin: 0 auto; border-radius: 1000px 1000px 0 0; overflow: hidden; }
.cv-t8 .cv-names { padding: 26px 0 44px; font-size: calc(18px * var(--k, 1)); letter-spacing: 0.12em; }
/* 9 유리 카드 */
.cv-glass {
  position: absolute; left: 18px; right: 18px; padding: 18px 16px; border-radius: 16px; color: #fff;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.32);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.cv-glass.top { top: 46px; }
.cv-glass.bottom { bottom: 46px; }
.cv-t9 .cv-s { font-size: calc(12px * var(--k, 1)); letter-spacing: 0.06em; }
.cv-t9 .cv-names { font-size: calc(18px * var(--k, 1)); margin-top: 8px !important; letter-spacing: 0.06em; }
.cv-t9 .cv-names span { font-size: calc(14px * var(--k, 1)); margin: 0 4px; }
.cv-t9 .cv-when { font-size: calc(14px * var(--k, 1)); letter-spacing: 0.08em; }
.cv-t9 .bottom .cv-s { margin-top: 6px !important; font-size: calc(11px * var(--k, 1)); letter-spacing: 0.2em; }

/* 섹션 제목 위 작은 영문 (테마 글씨체) */
.section-title[data-en]::before {
  content: attr(data-en); display: block; margin-bottom: 6px;
  font-family: var(--font-cover-en, var(--theme-en, "Cormorant Garamond")), serif;
  font-size: 12px; font-weight: 400; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted);
}
[data-theme="t2"] .section-title[data-en]::before,
[data-theme="t4"] .section-title[data-en]::before { font-size: 30px; letter-spacing: 0; text-transform: none; line-height: 1.1; color: var(--accent); }
[data-theme="t6"] .section-title[data-en]::before { font-size: 22px; letter-spacing: 0.04em; color: var(--text); }
[data-theme="t5"] .section-title[data-en]::before { font-size: 11px; letter-spacing: 0.22em; }

/* 오프닝: 사진이 자동으로 바뀌다가 사라짐 (누르면 건너뛰기) */
.opening {
  position: fixed; inset: 0; z-index: 40; background: #000; cursor: pointer;
  transition: opacity 0.9s ease;
}
.opening.closing { opacity: 0; pointer-events: none; }
.opening-stack img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.9s ease;
}
.opening-stack img.active { opacity: 1; }
.opening-text {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  margin: 0; padding: 0 24px; text-align: center; color: #fff; white-space: pre-line;
  font-family: var(--font-en, "Cormorant Garamond"), var(--font-ko, "MaruBuri"), serif; font-size: calc(44px * var(--opk, 1)); line-height: 1.1; letter-spacing: 0.02em;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.3);
  opacity: 0; transition: opacity 1.2s ease 0.3s;
}
.opening.text-in .opening-text { opacity: 1; }

/* 인사말 */
.greeting { font-size: 15px; line-height: 2; white-space: pre-line; }
.section.greeting-section { border-top: 0; }

/* 혼주 성함 */
.family { margin-top: 40px; font-size: 15px; line-height: 2.1; }
.family p { margin: 0; }
.family span { color: var(--muted); }
.family strong { font-weight: 600; }

/* 마음 전하실 곳 */
.acc-group { margin-top: 10px; text-align: left; }
.acc-toggle {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  font: inherit; font-size: 14px; padding: 14px 16px; cursor: pointer;
  background: var(--soft); border: 1px solid var(--line); border-radius: 10px; color: var(--text);
}
.acc-toggle[aria-expanded="true"] span { transform: rotate(180deg); }
.acc-toggle span { transition: transform 0.2s; color: var(--muted); }
.acc-list { list-style: none; margin: 0; padding: 4px 16px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; }
.acc-toggle[aria-expanded="true"] { border-radius: 10px 10px 0 0; }
.acc-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); }
.acc-item:first-child { border-top: 0; }
.acc-role { font-size: 13px; color: var(--muted); margin: 0 !important; }
.acc-role strong { color: var(--text); font-weight: 600; margin-left: 4px; }
.acc-num { font-size: 14px; margin: 2px 0 0 !important; }
.map-buttons.small { margin-top: 10px; }
.map-buttons.small .map-btn { padding: 8px 0; font-size: 12px; text-align: center; }

/* 갤러리 */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.gallery-item { padding: 0; border: 0; background: var(--soft); aspect-ratio: 1; cursor: pointer; overflow: hidden; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 크게 보기 */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.92);
  display: flex; align-items: center; justify-content: center;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-close, .lb-nav {
  position: absolute; background: none; border: 0; color: #fff; cursor: pointer; font-family: sans-serif;
}
.lb-close { top: 12px; right: 12px; font-size: 24px; padding: 10px; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 44px; padding: 10px 14px; opacity: 0.8; }
.lb-prev { left: 0; }
.lb-next { right: 0; }
.lb-count { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: #ddd; font-size: 13px; margin: 0; }
#map-image img { cursor: zoom-in; }

/* 공유 */
.share-section { display: grid; gap: 10px; padding-top: 48px; padding-bottom: 64px; }
.share-btn {
  font: inherit; font-size: 14px; padding: 13px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--field); color: var(--text);
}
.share-btn.kakao { background: #fee500; border-color: #fee500; color: #191919; }

/* 일정 등록 페이지 */
.cal-page .date { margin-top: 6px; }
.cal-buttons { display: grid; gap: 10px; width: 100%; max-width: 320px; margin-top: 36px; }
.cal-buttons .share-btn { display: block; text-decoration: none; text-align: center; }
.share-btn.primary-btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.hint-small { font-size: 12px; color: var(--muted); margin-top: 12px; }
.back-link { margin-top: 32px; font-size: 13px; color: var(--muted); }

/* 청첩장 섹션 공통 */
.section {
  max-width: 480px;
  margin: 0 auto;
  padding: 72px 28px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.section-title { font-size: 18px; font-weight: 600; letter-spacing: 0.1em; margin: 0 0 32px; }
.section p { margin: 0; }

/* 날짜 · 달력 · D-day */
.cal-date { font-size: 15px; }
.cal { margin: 32px auto 0; max-width: 300px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-month { font-size: 15px; letter-spacing: 0.1em; margin-bottom: 16px !important; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 6px; font-size: 13px; }
.cal-grid span { display: flex; align-items: center; justify-content: center; height: 34px; }
.cal-head { color: var(--muted); font-size: 12px; }
.cal-grid .sun { color: #c0504d; }
.cal-day.wedding { position: relative; color: #fff; font-weight: 600; z-index: 0; }
.cal-day.wedding::before {
  content: ""; position: absolute; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); z-index: -1;
}
.dday { margin-top: 28px !important; font-size: 14px; color: var(--muted); }
.dday strong { color: var(--text); font-weight: 600; }

/* 오시는 길 */
.venue-name { font-size: 17px; font-weight: 600; }
.venue-addr { font-size: 14px; color: var(--muted); margin-top: 6px !important; }
.copy-btn {
  font: inherit; font-size: 12px; color: var(--muted);
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 1px 10px; margin-left: 6px; cursor: pointer; vertical-align: 1px;
}
.placeholder-box {
  display: flex; align-items: center; justify-content: center;
  background: var(--soft); border: 1px dashed var(--line); color: #c4c4c4; font-size: 13px;
}
.map-image { width: 100%; aspect-ratio: 4 / 3; margin: 24px 0 12px; border-radius: 8px; overflow: hidden; }
.map-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.map-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.map-btn {
  padding: 11px 0; border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; color: var(--text); text-decoration: none;
}
.info-block { margin-top: 40px; text-align: left; }
.info-block h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.info-block p { font-size: 14px; }
.info-block p.muted { margin-top: 4px; }

/* 마음 남기기 */
.gb-form { text-align: left; }
.gb-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-bottom: 8px; }
.gb-form input, .gb-form textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--field);
}
.gb-form textarea { resize: none; display: block; }
.gb-form input:focus, .gb-form textarea:focus { outline: none; border-color: #bbb; }
.gb-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.gb-count { font-size: 12px; color: var(--muted); }
.gb-submit {
  font: inherit; font-size: 14px; padding: 9px 22px; border-radius: 8px; cursor: pointer;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
}
.gb-submit:disabled { opacity: 0.5; }
.comment-list { list-style: none; padding: 0; margin: 32px 0 0; text-align: left; }
.comment { padding: 16px 0; border-top: 1px solid var(--line); }
.comment:last-child { border-bottom: 1px solid var(--line); }
.comment-head { display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.comment-date { font-size: 12px; color: var(--muted); }
.comment-del {
  margin-left: auto; font: inherit; font-size: 12px; color: #b5b5b5;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.comment-msg { font-size: 14px; margin-top: 6px !important; white-space: pre-line; word-break: break-word; }
.gb-empty { font-size: 13px; margin-top: 24px !important; }
.gb-more {
  margin-top: 20px; font: inherit; font-size: 13px; color: var(--muted);
  background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 24px; cursor: pointer;
}

/* 복사 알림 */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  background: rgba(34, 34, 34, 0.9); color: #fff; font-size: 13px;
  padding: 10px 18px; border-radius: 999px; z-index: 20;
}

/* 관리자 미리보기 띠 */
.preview-banner {
  position: sticky; top: 0; z-index: 10;
  background: #fff7e0; color: #7a5b00;
  font-size: 12px; text-align: center; padding: 8px 12px;
}
.preview-banner a { color: inherit; }

/* 관리자 페이지 */
body.admin { background: #f6f6f6; font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
.admin-wrap { max-width: 420px; margin: 0 auto; padding: 40px 20px; }
.admin h1 { font-size: 20px; font-weight: 600; margin: 0 0 24px; }
.card { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.card p { margin: 0 0 12px; }
.label { font-size: 13px; color: var(--muted); }
.status { font-size: 22px; font-weight: 600; }
.status.on { color: #1a7f37; }
.status.off { color: #9a6700; }
.hint { font-size: 12px; color: var(--muted); margin: 10px 0 0 !important; }
.btn {
  display: block; width: 100%; padding: 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--field); color: var(--text);
  font-size: 15px; font-family: inherit; text-align: center; text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:disabled { opacity: 0.5; }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; font: inherit; cursor: pointer; }
.signed-in-as { font-size: 13px; color: var(--muted); text-align: center; }
.error { color: #c62828; font-size: 13px; }
.admin-comments { margin: 4px 0 12px; }
.edit-form fieldset { border: 0; padding: 0; margin: 0 0 20px; }
.edit-form legend { font-size: 15px; font-weight: 600; padding: 0; margin-bottom: 10px; }
.hint-inline { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.edit-form label { display: block; font-size: 13px; color: #555; margin-bottom: 10px; }
.edit-form input, .edit-form textarea {
  display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 15px; color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--field);
}
.edit-form textarea { resize: vertical; }
.font-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.font-tab { font: inherit; font-size: 13px; padding: 9px 0; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: #666; }
.font-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.font-target-label { display: block; font-size: 13px; color: #555; margin-bottom: 8px; }
.font-target { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.font-opt.same-as-base { background: #fafafa; }
.font-search { width: 100%; font: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; }
.font-list { max-height: 460px; overflow-y: auto; margin-bottom: 12px; padding-right: 2px; }
.font-group { font-size: 12px; color: var(--muted); margin: 12px 0 6px !important; }
.font-opt {
  display: block; width: 100%; text-align: center; padding: 14px 12px; margin-bottom: 8px; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; color: var(--text);
}
.font-opt.selected { border: 2px solid var(--accent); padding: 13px 11px; background: #fafafa; }
.font-name { display: block; font-family: -apple-system, "Malgun Gothic", sans-serif; font-size: 11px; color: var(--muted); text-align: left; margin-bottom: 6px; }
.font-badge { font-style: normal; background: #eee; border-radius: 4px; padding: 0 5px; margin-left: 4px; }
.fs-names { display: block; font-size: 21px; letter-spacing: .05em; }
.fs-text { display: block; font-size: 13px; color: #666; margin-top: 4px; line-height: 1.7; }
.fs-en { display: block; font-size: 32px; line-height: 1.15; }
.fs-en-it { display: block; font-size: 24px; font-style: italic; color: #666; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.acc-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.acc-edit p { grid-column: span 2; margin: 0 !important; font-size: 13px; color: #555; }
.acc-edit input[name$="number"] { grid-column: span 2; }
.edit-form .acc-edit input { margin-top: 0; }
.photo-group { margin-bottom: 22px; }
.photo-group-head { display: flex; align-items: center; justify-content: space-between; font-size: 15px; }
.photo-add { font-size: 13px; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; cursor: pointer; }
.photo-group .hint { margin: 4px 0 10px !important; }
.photo-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-item { position: relative; }
.photo-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; background: #eee; }
.photo-num { position: absolute; top: 4px; left: 4px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; border-radius: 4px; padding: 0 5px; }
.photo-num:empty { display: none; }
.photo-og { grid-column: span 2; }
.photo-og img { aspect-ratio: 4 / 3; }
.photo-tools { display: flex; gap: 4px; margin-top: 4px; }
.photo-tools button { flex: 1; font: inherit; font-size: 12px; padding: 4px 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.photo-tools button:disabled { opacity: .35; }
.admin-comments .comment-del { color: #c62828; }

/* 관리자: 테마 고르기 (작은 커버 미리보기) */
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.theme-opt { padding: 0; border: 1px solid #e6e6e6; border-radius: 10px; background: #fff; cursor: pointer; overflow: hidden; text-align: left; font: inherit; color: #222; }
.theme-opt.selected { outline: 2px solid #222; outline-offset: 1px; }
.theme-mini { position: relative; width: 100%; aspect-ratio: 480 / 853; overflow: hidden; }
.theme-scale { position: absolute; top: 0; left: 0; width: 480px; height: 853px; transform: scale(var(--s, 0.24)); transform-origin: 0 0; pointer-events: none; }
.theme-mini .cv { min-height: 0; height: 853px; }
.theme-name { display: block; font-size: 11px; line-height: 1.4; padding: 6px 7px; font-family: -apple-system, "Malgun Gothic", sans-serif; color: #444; background: #fff; }
.theme-texts { margin-bottom: 6px; }

/* 관리자: 글씨 크기 */
.size-row { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.size-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: #555; margin-bottom: 8px; }
.size-head strong { font-size: 14px; color: var(--text); }
.size-btns { display: flex; gap: 6px; }
.size-btns button, .size-fine button { flex: 1; font: inherit; font-size: 13px; padding: 8px 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #444; cursor: pointer; }
.size-btns button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.size-fine { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.size-fine span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.size-fine button:disabled { opacity: 0.35; }
