/* ═══════════════════════════════════════════════════════════
   PilgrimWay — 브랜드 스타일시트 (BRAND.md 기준)
   라이트(양피지) = 공개 홈 기본 / body.dark = 관리자 콘솔
   ═══════════════════════════════════════════════════════════ */
:root {
  --navy: #141b2d;
  --navy-deep: #0e1422;
  --ink: #1c2333;
  --gold: #c9a227;
  --gold-dawn: #e8c877;
  --gold-deep: #b8862d;
  --gold-soft: rgba(201, 162, 39, 0.13);

  --bg: #faf6ec;
  --panel: #ffffff;
  --panel2: #f5eddc;
  --line: #e5dcc6;
  --text: #1c2333;
  --body: #3a4356;
  --dim: #575f6d;
  --blue: #3563a8;
  --green: #3e7c4f;
  --red: #b23a48;

  --radius: 14px;
  --shadow: 0 1px 3px rgba(20, 27, 45, 0.08), 0 4px 16px rgba(20, 27, 45, 0.05);
  --fs-base: 17px;
  --fs-small: 14px;
  --fs-tiny: 13px;
  --touch: 44px;
}
/* 글자 크기 4단계: 보통(기본) → 크게 → 아주 크게 → 최대 */
html[data-fs="1"] { --fs-base: 19px; --fs-small: 16px; --fs-tiny: 15px; }
html[data-fs="2"] { --fs-base: 21px; --fs-small: 18px; --fs-tiny: 16.5px; }
html[data-fs="3"] { --fs-base: 23.5px; --fs-small: 20px; --fs-tiny: 18px; }
html[data-fs="2"] .basket, html[data-fs="3"] .basket, html[data-fs="2"] .map-col, html[data-fs="3"] .map-col { top: 130px; }
html.bigtext { --fs-base: 19px; --fs-small: 16px; --fs-tiny: 15px; }
body.dark {
  --bg: #0f1115;
  --panel: #171a21;
  --panel2: #1e222c;
  --line: #2a2f3c;
  --text: #e8e6e0;
  --body: #cfccc4;
  --dim: #9aa0ae;
  --gold-deep: #d9b45b;
  --blue: #6ea8fe;
  --red: #e06c75;
  --green: #7bc98a;
  --shadow: none;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", -apple-system, "Segoe UI", sans-serif;
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.dark { background: radial-gradient(1200px 600px at 70% -10%, #1a1e2a 0%, var(--bg) 60%); }

/* ── 헤더 ─────────────────────────────────────── */
header {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 24px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 236, 0.92); backdrop-filter: blur(12px);
  flex-wrap: wrap;
}
body.dark header { background: rgba(15, 17, 21, 0.88); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img.logo-h { height: 52px; display: block; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(160deg, #232f4b, var(--navy)); color: var(--gold-dawn);
  font-size: 24px; border: 1px solid rgba(201, 162, 39, 0.4); flex-shrink: 0;
}
.brand h1 { font-size: 20px; letter-spacing: 0.2px; line-height: 1.2; }
.brand h1 .way { color: var(--gold-deep); }
.brand p { font-size: 12.5px; color: var(--dim); }

nav#tabs {
  display: flex; gap: 4px; background: var(--panel); padding: 5px; border-radius: 14px;
  border: 1px solid var(--line); box-shadow: var(--shadow); flex-wrap: wrap;
}
.tab {
  border: none; background: transparent; color: var(--dim);
  padding: 10px 18px; min-height: var(--touch);
  border-radius: 10px; cursor: pointer; font-size: var(--fs-small); font-weight: 700;
  transition: all 0.15s ease; white-space: nowrap;
}
.tab .ts { display: none; }
.tab:hover { color: var(--text); background: var(--gold-soft); }
.tab.active { background: var(--navy); color: var(--gold-dawn); }
body.dark .tab.active { background: var(--gold-soft); color: var(--gold-dawn); }

.header-tools { display: flex; align-items: center; gap: 8px; }
.tool-btn {
  min-height: var(--touch); padding: 7px 13px; border-radius: 10px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); color: var(--body);
  font-size: var(--fs-tiny); font-weight: 700; transition: all 0.14s;
}
.tool-btn:hover { border-color: var(--gold); color: var(--gold-deep); }
.tool-btn.on { background: var(--navy); color: var(--gold-dawn); border-color: var(--navy); }

main { padding: 22px 24px 90px; max-width: 1400px; margin: 0 auto; }
.tab-page { display: none; }
.tab-page.active { display: block; animation: fadein 0.25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.hidden { display: none !important; }
body.no-scroll { overflow: hidden; }
.pill { background: var(--gold-soft); color: var(--gold-deep); border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; }
.hint { color: var(--dim); font-size: var(--fs-tiny); margin: 6px 0 12px; }

/* ── 공지/안내 배너 ───────────────────────────── */
.plan-note, .sync-banner {
  background: rgba(53, 99, 168, 0.08); color: var(--blue); border: 1px solid rgba(53, 99, 168, 0.25);
  border-radius: 12px; padding: 12px 16px; font-size: var(--fs-tiny); margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px; line-height: 1.6;
}
.status-banner {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 12px;
  background: var(--gold-soft); color: var(--gold-deep); font-size: var(--fs-tiny); margin-bottom: 14px;
  border: 1px solid rgba(201, 162, 39, 0.35);
}
.spinner { width: 15px; height: 15px; border: 2px solid rgba(201, 162, 39, 0.3); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 입력 ─────────────────────────────────────── */
input[type="text"], input[type="number"], input:not([type]), textarea, select {
  background: var(--panel); border: 1.5px solid var(--line); color: var(--text);
  border-radius: 11px; padding: 11px 15px; font-size: var(--fs-small); width: 100%; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s; font-family: inherit; min-height: var(--touch);
}
body.dark input[type="text"], body.dark input[type="number"], body.dark input:not([type]), body.dark textarea { background: var(--panel2); }
textarea { min-height: 80px; resize: vertical; line-height: 1.6; }
input:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
input::placeholder, textarea::placeholder { color: var(--dim); opacity: 0.7; }
input[type="number"] { font-variant-numeric: tabular-nums; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }

/* 드롭다운 */
.dd { position: relative; }
.dd-btn {
  background: var(--panel); border: 1.5px solid var(--line); color: var(--body);
  padding: 9px 32px 9px 14px; min-height: var(--touch); border-radius: 10px; cursor: pointer;
  font-size: var(--fs-tiny); font-weight: 600; position: relative; transition: border-color 0.15s;
}
body.dark .dd-btn { background: var(--panel2); }
.dd-btn::after { content: "▾"; position: absolute; right: 11px; color: var(--dim); font-size: 11px; }
.dd-btn:hover { border-color: var(--gold); }
.dd-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 100%; max-width: min(320px, 92vw); z-index: 40;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 5px; box-shadow: 0 12px 30px rgba(20, 27, 45, 0.18); max-height: 300px; overflow-y: auto;
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: all 0.14s ease;
}
body.dark .dd-menu { background: var(--panel2); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); }
.dd.open .dd-menu { opacity: 1; transform: none; pointer-events: auto; }
.dd-item { display: block; width: 100%; text-align: left; background: none; border: none; font: inherit; color: inherit; cursor: pointer; padding: 12px 12px; border-radius: 7px; font-size: var(--fs-tiny); white-space: normal; }
.dd-item:hover { background: var(--gold-soft); color: var(--gold-deep); }
.dd-item.sel { color: var(--gold-deep); font-weight: 700; }

/* ── 유적지 카드 ──────────────────────────────── */
.build-layout { display: grid; grid-template-columns: 1fr 380px; gap: 18px; align-items: start; }
.site-picker { padding: 16px; }
.picker-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.site-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; max-height: calc(100vh - 300px); overflow-y: auto; padding: 2px 4px 2px 2px; }
.site-list.unbounded { max-height: none; overflow: visible; }
.site-item {
  background: var(--panel); border: 1.5px solid var(--line); border-radius: 13px;
  cursor: pointer; transition: all 0.13s ease; position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
body.dark .site-item { background: var(--panel2); }
.site-item:hover { border-color: var(--gold); transform: translateY(-2px); }
.site-item.picked { border-color: var(--gold); background: #fdf9ee; }
body.dark .site-item.picked { background: var(--gold-soft); }
.si-photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--panel2); }
/* 이미지 부드러운 페이드인 + 로딩 스켈레톤 */
.fade-img { opacity: 0; transition: opacity 0.45s ease; }
.fade-img.imgok { opacity: 1; }
.gallery img.fade-img, .si-photo.fade-img { background: linear-gradient(100deg, var(--panel2) 30%, var(--line) 50%, var(--panel2) 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.gallery img.fade-img.imgok, .si-photo.fade-img.imgok { animation: none; background: var(--panel2); }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .fade-img { transition: none; } .fade-img { animation: none !important; } }
.si-photo-empty {
  width: 100%; aspect-ratio: 16 / 9; display: grid; place-items: center;
  background: linear-gradient(160deg, #232f4b, var(--navy)); color: var(--gold-dawn); font-size: 30px;
}
.si-body { padding: 12px 14px 14px; }
.si-name { font-weight: 800; font-size: var(--fs-small); line-height: 1.4; }
.si-altname { color: var(--dim); font-size: var(--fs-tiny); font-weight: 600; margin-top: 2px; line-height: 1.35; }
.si-meta { color: var(--dim); font-size: calc(var(--fs-tiny) - 1px); margin-top: 4px; }
.si-desc { color: var(--body); font-size: var(--fs-tiny); margin-top: 7px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge { display: inline-block; font-size: calc(var(--fs-tiny) - 2px); padding: 1.5px 8px; border-radius: 999px; margin-right: 4px; border: 1px solid var(--line); color: var(--dim); font-weight: 600; }
.badge.cat { color: var(--gold-deep); border-color: rgba(201, 162, 39, 0.45); background: var(--gold-soft); }
.picked-mark {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold); color: #14110a; display: grid; place-items: center;
  font-weight: 800; opacity: 0; transition: opacity 0.13s; box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.site-item.picked .picked-mark { opacity: 1; }
.si-links { margin-top: 9px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ── 바구니 ───────────────────────────────────── */
.basket { padding: 18px; position: sticky; top: 96px; }
.basket h2 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.basket-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; min-height: 40px; }
.basket-item {
  display: flex; align-items: center; gap: 10px; background: var(--panel2);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: var(--fs-tiny);
  animation: pop 0.18s ease;
}
@keyframes pop { from { transform: scale(0.96); opacity: 0; } }
.basket-item .num { width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: var(--gold-dawn); display: grid; place-items: center; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.basket-item .bx { margin-left: auto; color: var(--dim); cursor: pointer; padding: 10px 12px; border-radius: 8px; font-size: 15px; background: none; border: none; min-width: var(--touch); min-height: 38px; }
.basket-item .bx:hover { color: var(--red); background: rgba(178, 58, 72, 0.1); }

button { font-family: inherit; cursor: pointer; }
button.primary {
  background: linear-gradient(135deg, #a9821f, var(--gold)); color: #fffdf5;
  border: none; border-radius: 11px; padding: 11px 20px; min-height: var(--touch);
  font-weight: 800; font-size: var(--fs-small); transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(201, 162, 39, 0.35);
}
button.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
button.primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
button.primary.big { width: 100%; padding: 14px; font-size: 16px; margin-top: 10px; }
button.ghost {
  background: var(--panel); border: 1.5px solid var(--line); color: var(--body);
  border-radius: 10px; padding: 9px 15px; min-height: var(--touch); font-size: var(--fs-tiny); font-weight: 600; transition: all 0.14s;
}
button.ghost:hover { color: var(--text); border-color: var(--gold); }
button.ghost.danger:hover { color: var(--red); border-color: var(--red); }

.toggle-row { display: flex; align-items: center; gap: 10px; font-size: var(--fs-tiny); color: var(--body); margin: 8px 0 12px; cursor: pointer; min-height: var(--touch); }
.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; transition: all 0.18s; }
.switch i::before { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--dim); top: 2px; left: 2px; transition: all 0.18s; }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px var(--gold-soft); border-color: var(--gold); }
.switch input:checked + i { background: var(--gold-soft); border-color: var(--gold); }
.switch input:checked + i::before { transform: translateX(18px); background: var(--gold); }

/* ── 루트 카드 ────────────────────────────────── */
.route-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.route-card { padding: 18px; cursor: pointer; transition: all 0.14s ease; }
.route-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.route-card h3 { font-size: 17px; margin-bottom: 8px; }
.route-card .rc-path { color: var(--dim); font-size: var(--fs-tiny); line-height: 1.6; }
.route-card .rc-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: calc(var(--fs-tiny) - 1px); color: var(--dim); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-ready { background: var(--green); }
.status-working { background: var(--gold); animation: blink 1.2s infinite; }
.status-error { background: var(--red); }
@keyframes blink { 50% { opacity: 0.3; } }
.empty { color: var(--dim); text-align: center; padding: 60px 0; font-size: var(--fs-small); }

/* ── 루트 상세 ────────────────────────────────── */
.detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.detail-head h2 { flex: 1; font-size: 21px; min-width: 200px; }
.detail-head input.title-edit {
  font-size: 20px; font-weight: 800; background: transparent; border: 1.5px solid transparent;
  padding: 6px 10px; border-radius: 8px; width: auto; min-width: 260px; flex: 1;
}
.detail-head input.title-edit:hover, .detail-head input.title-edit:focus { border-color: var(--line); background: var(--panel); }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.export-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.export-btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  background: var(--panel); border: 1.5px solid var(--line); color: var(--body);
  border-radius: 11px; padding: 10px 16px; min-height: var(--touch); font-size: var(--fs-tiny); font-weight: 700;
  transition: all 0.14s; cursor: pointer;
}
.export-btn:hover { border-color: var(--gold); color: var(--gold-deep); transform: translateY(-1px); }
.export-btn .ic { font-size: 17px; }
.export-btn.share { background: var(--navy); color: var(--gold-dawn); border-color: var(--navy); }
.export-btn.share:hover { color: #fff; filter: brightness(1.1); }
.export-btn.share:disabled { opacity: 0.6; cursor: default; }

/* 공유 페이지 CTA */
.share-cta { padding: 16px 20px; margin-bottom: 16px; border-left: 3px solid var(--gold); border-radius: 0 12px 12px 0; }
.share-cta .sc-title { font-weight: 800; font-size: var(--fs-small); color: var(--gold-deep); margin-bottom: 4px; }
.share-cta .sc-body { color: var(--body); font-size: var(--fs-tiny); line-height: 1.6; }
.share-cta-big { text-align: center; padding: 36px 20px; margin-top: 30px; background: var(--navy); border-radius: 16px; color: #e3d3ae; }
.share-cta-big h3 { color: var(--gold-dawn); font-size: 20px; margin-bottom: 8px; }
.share-cta-big p { color: #b8c0cf; font-size: var(--fs-small); line-height: 1.7; max-width: 520px; margin: 0 auto 20px; }
.share-cta-big .sc-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.share-cta-big .primary { text-decoration: none; display: inline-block; }
.share-cta-big .ghost { text-decoration: none; display: inline-flex; align-items: center; background: transparent; color: #e3d3ae; border-color: rgba(227,211,174,0.4); }
.share-cta-big .ghost:hover { color: #fff; border-color: var(--gold-dawn); }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
#map { height: 480px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 1; }
.map-col { position: sticky; top: 96px; }
.map-links { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.overview-card { padding: 20px; margin-bottom: 14px; }
.overview-card h3, .stop-card h3 { font-size: 16px; color: var(--gold-deep); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.commentary { line-height: 1.85; font-size: var(--fs-base); color: var(--body); white-space: pre-wrap; }
.commentary[contenteditable="true"]:hover { outline: 1px dashed var(--line); border-radius: 6px; }
.commentary[contenteditable="true"]:focus { outline: 1.5px solid var(--gold); border-radius: 6px; padding: 4px; }
.commentary.pending { color: var(--dim); font-style: italic; font-size: var(--fs-tiny); }

.stop-card { padding: 20px; margin-bottom: 14px; }
.stop-num { width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: #fffdf5; display: inline-grid; place-items: center; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.stop-meta { color: var(--dim); font-size: var(--fs-tiny); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.leg-line { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: var(--fs-tiny); margin: 4px 0 14px 12px; }
.leg-line::before { content: "↓"; color: var(--gold-deep); }

/* 사진 갤러리 */
.gallery { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; margin: 10px 0 4px; scrollbar-width: thin; }
.gallery img {
  height: 130px; border-radius: 10px; flex-shrink: 0; cursor: zoom-in; object-fit: cover;
  border: 1px solid var(--line); transition: transform 0.14s; background: var(--panel2);
}
.gallery img:hover { transform: scale(1.03); }
.gallery-credit { font-size: calc(var(--fs-tiny) - 2px); color: var(--dim); margin-bottom: 8px; }
.lightbox {
  position: fixed; inset: 0; background: rgba(14, 20, 34, 0.93); z-index: 400;
  display: grid; place-items: center; padding: 20px; cursor: zoom-out;
  opacity: 0; transition: opacity 0.2s ease;
}
.lightbox.show { opacity: 1; }
.lightbox .lb-stage { position: relative; display: grid; place-items: center; }
.lightbox img { max-width: 96vw; max-height: 82vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
/* 낙관적: 캐시 썸네일 즉시(살짝 소프트) → 큰 이미지 로드되면 sharp */
.lightbox .lb-img { filter: blur(6px); transform: scale(1.005); transition: filter 0.3s ease; }
.lightbox .lb-img.sharp { filter: none; }
.lightbox .lb-spin { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.lightbox .lb-spin .spinner { width: 34px; height: 34px; border-width: 3px; }
@media (prefers-reduced-motion: reduce) { .lightbox .lb-img { filter: none; transition: none; } }
.lightbox .lb-cap { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); color: #e3d3ae; font-size: var(--fs-tiny); text-align: center; max-width: 90vw; }
.lightbox .lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%;
  background: rgba(250, 246, 236, 0.12); border: 1px solid rgba(250, 246, 236, 0.3); color: #f5eddc;
  font-size: 22px; display: grid; place-items: center;
}
.lightbox .lb-nav:hover { background: rgba(250, 246, 236, 0.25); }
.lightbox .lb-prev { left: 18px; } .lightbox .lb-next { right: 18px; }
.lightbox .lb-close { position: absolute; top: 18px; right: 18px; width: 46px; height: 46px; border-radius: 50%; background: rgba(250,246,236,0.12); border: 1px solid rgba(250,246,236,0.3); color: #f5eddc; font-size: 20px; }

/* 순례자의 묵상 */
.reflection {
  margin: 14px 0 4px; padding: 14px 18px; border-left: 3px solid var(--gold);
  background: var(--gold-soft); border-radius: 0 12px 12px 0;
  color: var(--body); line-height: 1.85; font-size: var(--fs-small); white-space: pre-wrap;
}
.reflection .r-title { display: block; font-size: 12px; font-weight: 800; letter-spacing: 1.5px; color: var(--gold-deep); margin-bottom: 6px; }
body.dark .reflection { color: var(--body); }

.nb-note { font-size: var(--fs-tiny); color: var(--dim); font-style: italic; }
.nearby h4 .spinner { width: 12px; height: 12px; display: inline-block; vertical-align: -2px; }

.nearby { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.nearby h4 { font-size: 13.5px; color: var(--gold-deep); margin-bottom: 8px; font-weight: 800; }
.nearby h4 .nb-sub { font-size: 11.5px; color: var(--dim); font-weight: 500; margin-left: 6px; }
.nearby-groups { display: flex; flex-direction: column; gap: 8px; }
.nb-row { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.nb-label { font-size: 12.5px; color: var(--gold-deep); min-width: 56px; font-weight: 700; }
.nb-chip {
  font-size: calc(var(--fs-tiny) - 1px); background: var(--panel); border: 1px solid var(--line);
  padding: 9px 14px; border-radius: 999px; color: var(--dim); cursor: pointer; text-decoration: none;
  transition: all 0.12s; display: inline-flex; align-items: center; gap: 4px;
}
body.dark .nb-chip { background: var(--panel2); }
.nb-chip:hover { color: var(--text); border-color: var(--gold); }
.nb-chip b { color: var(--body); font-weight: 700; }

.tts-btn {
  display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1.5px solid var(--line);
  color: var(--blue); border-radius: 999px; padding: 7px 15px; min-height: var(--touch); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 0.14s; margin-left: auto;
}
body.dark .tts-btn { background: var(--panel2); }
.tts-btn:hover { border-color: var(--blue); }
audio { width: 100%; height: 36px; margin-top: 10px; }
body.dark audio { filter: invert(0.88) hue-rotate(180deg); }

/* ── 유적지 관리 (관리자) ─────────────────────── */
.sites-toolbar { display: flex; gap: 12px; margin-bottom: 16px; }
.sites-toolbar input { max-width: 340px; }
.sites-toolbar button { margin-left: auto; }
.mgr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.mgr-item { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.mgr-item .row1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mgr-item .row1 b { font-size: var(--fs-small); }
.mgr-item .acts { margin-left: auto; display: flex; gap: 6px; }
.icon-btn { background: transparent; border: none; color: var(--dim); font-size: 15px; padding: 8px 10px; border-radius: 8px; }
.icon-btn:hover { color: var(--gold-deep); background: var(--gold-soft); }
.icon-btn.del:hover { color: var(--red); background: rgba(178, 58, 72, 0.1); }

/* 사진 관리 (관리자 모달) */
.photo-strip { display: flex; gap: 10px; flex-wrap: wrap; }
.photo-thumb { position: relative; width: 108px; height: 82px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); }
.photo-thumb.is-cover { border: 2px solid var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb .ph-cover { position: absolute; top: 3px; left: 3px; background: var(--gold); color: #14110a; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 999px; }
.photo-thumb .ph-tools { position: absolute; top: 3px; right: 3px; display: flex; gap: 2px; opacity: 0; transition: opacity 0.12s; }
.photo-thumb:hover .ph-tools, .photo-thumb:focus-within .ph-tools { opacity: 1; }
.photo-thumb .ph-btn {
  width: 22px; height: 22px; border-radius: 6px; border: none; cursor: pointer;
  background: rgba(14, 20, 34, 0.78); color: #fff; font-size: 11px; line-height: 1; display: grid; place-items: center;
}
.photo-thumb .ph-btn:hover { background: var(--gold-deep); }
.photo-thumb .ph-btn.ph-x:hover { background: var(--red); }
.photo-thumb .ph-src { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(14,20,34,0.6); color: #e3d3ae; font-size: 9.5px; text-align: center; padding: 1px 2px; }
.photo-thumb { cursor: grab; }
.photo-thumb:active { cursor: grabbing; }
.photo-thumb .ph-grip { position: absolute; left: 4px; bottom: 16px; color: #fff; opacity: 0; font-size: 15px; text-shadow: 0 1px 3px rgba(0,0,0,0.6); pointer-events: none; transition: opacity 0.12s; }
.photo-thumb:hover .ph-grip { opacity: 0.85; }
.photo-thumb.dragging { opacity: 0.4; }
.photo-thumb.drop-to { outline: 2px dashed var(--gold); outline-offset: 2px; }
.photo-add {
  width: 96px; height: 72px; border-radius: 8px; border: 1.5px dashed var(--line); background: transparent;
  color: var(--dim); font-size: 22px; display: grid; place-items: center;
}
.photo-add:hover { border-color: var(--gold); color: var(--gold-deep); }
.photo-progress { font-size: 12.5px; color: var(--blue); }
.photo-addrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.photo-addrow #photoUrlBtn { flex-shrink: 0; }

/* 모달 */
.modal-back { position: fixed; inset: 0; background: rgba(20, 27, 45, 0.55); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; padding: 14px; }
.modal { width: 640px; max-width: 96vw; padding: 26px 28px; max-height: 90vh; overflow-y: auto; }
.modal h2 { font-size: 19px; margin-bottom: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid.four { grid-template-columns: repeat(4, 1fr); }
.form-grid label { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--dim); font-weight: 700; letter-spacing: 0.2px; }
.form-grid .span2 { grid-column: span 2; }
.form-grid label { position: relative; }
.form-grid .req {
  position: absolute; right: 0; top: -1px;
  color: var(--gold-deep); font-size: 10.5px; font-weight: 700;
  border: 1px solid rgba(201, 162, 39, 0.45); border-radius: 999px; padding: 1px 7px;
}

/* WYSIWYG 미니 에디터 */
.rich-editor { border: 1.5px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--panel); }
body.dark .rich-editor { background: var(--panel2); }
.rich-editor:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.re-bar { display: flex; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: rgba(201, 162, 39, 0.05); flex-wrap: wrap; }
.re-btn {
  background: transparent; border: 1px solid transparent; color: var(--body);
  min-width: 32px; height: 30px; padding: 0 8px; border-radius: 7px; cursor: pointer;
  font-size: 13px; font-weight: 700; font-family: inherit;
}
.re-btn:hover { border-color: var(--gold); color: var(--gold-deep); background: var(--gold-soft); }
.re-btn.re-clear { margin-left: auto; font-size: 11.5px; color: var(--dim); font-weight: 600; }
.re-area {
  min-height: 96px; padding: 12px 14px;  /* 내용에 따라 위아래로 자유롭게 늘어남 (상한 없음) */
  font-size: var(--fs-small); line-height: 1.75; outline: none; color: var(--text);
  overflow-wrap: break-word; word-break: break-word;
}
.re-area:empty::before { content: attr(data-ph); color: var(--dim); opacity: 0.7; }
.re-area p { margin: 0 0 8px; }
.re-area ul, .re-area ol { margin: 0 0 8px 20px; }
.commentary p { margin: 0 0 10px; }
.commentary ul, .commentary ol { margin: 0 0 10px 22px; }
.sd-desc p { margin: 0 0 10px; }

/* 폼 섹션 */
.site-form .fsec { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.site-form .fsec:first-of-type { border-top: none; margin-top: 10px; padding-top: 6px; }
.site-form .fsec h4 {
  font-size: 11.5px; font-weight: 800; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--gold-deep); margin-bottom: 12px;
}
.site-form .fhint { font-size: 12px; color: var(--dim); margin-top: 8px; line-height: 1.6; }
.dd-slot .dd { width: 100%; }
.dd-slot .dd-btn { width: 100%; text-align: left; min-height: var(--touch); padding-top: 10px; padding-bottom: 10px; font-size: var(--fs-small); font-weight: 600; }

.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.modal-actions button:not(.primary) { background: transparent; border: 1.5px solid var(--line); color: var(--dim); border-radius: 11px; padding: 11px 18px; min-height: var(--touch); font-size: var(--fs-tiny); cursor: pointer; }
.modal-actions button:not(.primary):hover { color: var(--text); border-color: var(--gold); }

/* 사이트 상세 모달 (공개 홈) */
.site-detail { width: 760px; }
.site-detail .sd-head { display: flex; align-items: flex-start; gap: 10px; }
.site-detail .sd-head h2 { flex: 1; margin-bottom: 4px; font-size: 21px; }
.site-detail .sd-close { background: transparent; border: none; font-size: 22px; color: var(--dim); padding: 6px 10px; border-radius: 8px; }
.site-detail .sd-close:hover { color: var(--text); background: var(--panel2); }
.site-detail .sd-desc { color: var(--body); line-height: 1.8; margin: 10px 0; }

/* 지도 마커 */
.num-marker {
  background: var(--gold); color: #fffdf5; border-radius: 50%; width: 28px; height: 28px;
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
  border: 2px solid #fff; box-shadow: 0 2px 8px rgba(20, 27, 45, 0.4);
}

/* ── 목록/지도 보기 토글 + 둘러보기 지도 ─────────── */
.picker-subhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.view-toggle { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--panel); flex-shrink: 0; }
.view-toggle button { font-family: inherit; border: none; background: none; padding: 7px 16px; font-size: var(--fs-tiny); font-weight: 700; color: var(--dim); cursor: pointer; min-height: 36px; }
.view-toggle button.active { background: var(--navy); color: #f5eddc; }
.browse-map { height: min(70vh, 560px); border-radius: var(--radius); border: 1px solid var(--line); z-index: 1; }
.browse-map.hidden { display: none; }
.map-pin {
  width: 26px; height: 26px; display: grid; place-items: center; font-size: 15px; font-weight: 800;
  color: #fffdf5; background: var(--gold); border: 2px solid #fff; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); box-shadow: 0 2px 7px rgba(20, 27, 45, 0.4);
}
.map-pin.on { background: #159a4e; border-color: #fff; transform: rotate(-45deg) scale(1.22); box-shadow: 0 3px 10px rgba(21, 154, 78, 0.55); z-index: 1000 !important; }
.map-pin span { display: block; transform: rotate(45deg); line-height: 1; }  /* 핀 회전 보정 */
.mappop { width: 190px; }
.mappop img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; margin-bottom: 7px; background: var(--line); }
.mappop-name { font-weight: 800; font-size: 13.5px; color: var(--ink); line-height: 1.35; }
.mappop-meta { font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.mappop-btn { margin-top: 8px; width: 100%; font-family: inherit; cursor: pointer; border-radius: 8px; padding: 7px 10px; font-weight: 800; font-size: 12.5px; border: 1.5px solid var(--gold); background: var(--navy); color: #f5eddc; }
.mappop-btn.on { background: #7a2e2e; border-color: #7a2e2e; }

/* ── 이용 안내 (친절 가이드) ──────────────────── */
.guide-wrap { max-width: 860px; margin: 0 auto; }
.guide-hero { text-align: center; padding: 28px 16px 10px; }
.guide-hero img { height: 92px; }
.guide-hero h2 { font-size: 24px; margin-top: 14px; }
.guide-hero p { color: var(--dim); margin-top: 6px; font-size: var(--fs-small); }
.guide-step { display: flex; gap: 16px; padding: 20px; margin-top: 14px; align-items: flex-start; }
.guide-step .g-num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--gold-dawn);
  display: grid; place-items: center; font-size: 19px; font-weight: 800; flex-shrink: 0;
}
.guide-step h3 { font-size: 18px; margin-bottom: 6px; }
.guide-step p { color: var(--body); line-height: 1.8; font-size: var(--fs-small); }
.guide-step p b { color: var(--gold-deep); }
.guide-tip { background: var(--panel2); border-radius: 10px; padding: 10px 14px; margin-top: 10px; font-size: var(--fs-tiny); color: var(--body); }
.guide-cta { text-align: center; margin: 26px 0 10px; }

/* 첫 방문 환영 오버레이 */
.welcome-back { position: fixed; inset: 0; background: rgba(20, 27, 45, 0.6); backdrop-filter: blur(5px); z-index: 300; display: grid; place-items: center; padding: 16px; }
.welcome-card { max-width: 480px; width: 100%; padding: 30px 28px; text-align: center; }
.welcome-card img { height: 84px; }
.welcome-card h2 { font-size: 22px; margin: 14px 0 8px; }
.welcome-card p { color: var(--body); line-height: 1.8; font-size: var(--fs-small); }
.welcome-card .w-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.welcome-card button { width: 100%; }

/* 푸터 */
footer {
  border-top: 1px solid var(--line); margin-top: 40px; padding: 30px 24px 40px;
  background: var(--navy); color: #9aa3b2; font-size: 13.5px;
}
footer .f-inner { max-width: 1400px; margin: 0 auto; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
footer img { height: 44px; }
footer a { color: #e3d3ae; text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* 모바일 하단 고정 '루트 짜기' 바 — 순례지를 담으면 나타남 (데스크톱에선 숨김) */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 450;
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(250, 246, 236, 0.97); backdrop-filter: blur(10px);
  border-top: 1.5px solid var(--gold); box-shadow: 0 -6px 24px rgba(20, 27, 45, 0.12);
}
.mobile-cta span { font-size: var(--fs-small); font-weight: 800; color: var(--ink); }
.mobile-cta span .cnt { color: var(--gold-deep); }
.mobile-cta button { min-height: var(--touch); padding: 11px 22px; font-size: var(--fs-small); flex-shrink: 0; }
@media (max-width: 1000px) {
  .mobile-cta:not(.hidden) { display: flex; }
  /* 바에 가려지지 않게 본문 하단 여유 */
  body.has-mobile-cta main { padding-bottom: 130px; }
}

/* 업데이트 알림 배너 */
.update-banner {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 140%);
  display: flex; align-items: center; gap: 12px; z-index: 600;
  background: var(--navy); color: #f5eddc; border: 1px solid var(--gold);
  border-radius: 14px; padding: 12px 14px 12px 20px; font-size: var(--fs-tiny);
  box-shadow: 0 12px 36px rgba(20, 27, 45, 0.4); max-width: 94vw;
  transition: transform 0.3s ease;
}
.update-banner.show { transform: translate(-50%, 0); }
.update-banner button { font-family: inherit; cursor: pointer; }
.update-banner span { line-height: 1.5; }
.update-banner #updateReload {
  background: linear-gradient(135deg, #a9821f, var(--gold)); color: #fffdf5;
  border: none; border-radius: 9px; padding: 8px 16px; font-weight: 800; font-size: var(--fs-tiny);
  white-space: nowrap; flex-shrink: 0;
}
.update-banner #updateClose { background: none; border: none; color: #9aa3b2; font-size: 15px; padding: 4px 8px; }
.update-banner #updateClose:hover { color: #fff; }

/* 관리자 해설 편집 라벨 */
.cmt-label { font-size: 12px; font-weight: 700; color: var(--gold-deep); margin: 6px 0 6px; }
.cmt-label .cmt-hint { color: var(--dim); font-weight: 500; }
.re-area blockquote { border-left: 3px solid var(--gold); margin: 6px 0; padding: 2px 12px; color: var(--body); }
.re-area h3, .commentary h3, .sd-desc h3 { font-size: 16px; color: var(--gold-deep); margin: 8px 0 4px; }
.commentary blockquote, .sd-desc blockquote { border-left: 3px solid var(--gold); margin: 8px 0; padding: 4px 14px; color: var(--body); font-style: italic; }

#toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy); border: 1px solid var(--gold); color: #f5eddc;
  padding: 13px 24px; border-radius: 13px; font-size: var(--fs-small); opacity: 0;
  pointer-events: none; transition: all 0.22s ease; z-index: 500; box-shadow: 0 10px 30px rgba(20, 27, 45, 0.4);
  max-width: 92vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 모바일 ───────────────────────────────────── */
@media (max-width: 1000px) {
  /* minmax(0,1fr) 유지 — 그냥 1fr로 두면 leaflet 내부 타일이 컬럼을 화면 밖까지 밀어냄 */
  .build-layout, .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .basket, .map-col { position: static; }
  .map-col { min-width: 0; }
  #map { height: 340px; }
  .site-list { max-height: none; }
}
@media (max-width: 640px) {
  header { padding: 10px 12px; gap: 8px; }
  .brand img.logo-h { height: 42px; }
  nav#tabs { order: 3; width: 100%; justify-content: space-between; }
  .tab { flex: 1; padding: 10px 2px; font-size: 14px; text-align: center; }
  .tab .tl { display: none; }
  .tab .ts { display: inline; }
  main { padding: 14px 12px 70px; }
  .site-list { grid-template-columns: 1fr; }
  .route-cards { grid-template-columns: 1fr; }
  .detail-head h2 { font-size: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: span 1; }
  .gallery img { height: 104px; }
  #map { height: 280px; }
  .guide-step { flex-direction: row; padding: 16px; }
  .export-btn { flex: 1 1 calc(50% - 4px); justify-content: center; }
  .form-grid.four { grid-template-columns: 1fr 1fr; }
}

/* ══ 커뮤니티: 체크인 · 감상 나눔 · 내 순례 ══════════════════ */
.auth-chip { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:var(--panel);
  border-radius:99px; padding:5px 12px 5px 6px; cursor:pointer; font:inherit; font-size:.92rem; color:var(--body); }
.auth-chip img { width:24px; height:24px; border-radius:50%; }
.auth-chip.on { border-color:var(--gold); background:var(--gold-soft); }
.auth-chip:hover { border-color:var(--gold-deep); }

.cm-slot { margin-top:14px; }
.cm-checkin-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:12px 0; border-top:1px solid var(--line); }
.cm-checkin { font:inherit; font-weight:700; border:2px solid var(--green); color:var(--green); background:transparent;
  border-radius:99px; padding:9px 18px; cursor:pointer; transition:all .15s; }
.cm-checkin.on { background:var(--green); color:#fff; }
.cm-h { margin:14px 0 8px; display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.cm-h .hint { font-weight:400; }

.cm-composer { border:1px solid var(--line); border-radius:var(--radius); padding:12px; background:var(--panel2); margin-bottom:12px; }
.cm-composer-head { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.cm-composer textarea { width:100%; box-sizing:border-box; font:inherit; border:1px solid var(--line); border-radius:10px; padding:10px; resize:vertical; background:var(--panel); color:var(--text); }
.cm-composer .cm-en { margin-top:6px; border-style:dashed; }
.cm-composer-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:8px; }
.cm-photo-btn { font:inherit; border:1px solid var(--line); background:var(--panel); border-radius:10px; padding:8px 12px; cursor:pointer; color:var(--body); }
.cm-photo-strip { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.cm-thumb { position:relative; }
.cm-thumb img { width:74px; height:74px; object-fit:cover; border-radius:10px; border:1px solid var(--line); }
.cm-thumb button { position:absolute; top:-6px; right:-6px; width:22px; height:22px; border-radius:50%; border:none; background:var(--red); color:#fff; cursor:pointer; font-size:.75rem; line-height:1; }
.cm-badge-admin { background:var(--gold); color:#fff; font-size:.7rem; letter-spacing:.06em; }
.cm-login-inline { font:inherit; width:100%; border:1.5px dashed var(--gold-deep); color:var(--gold-deep); background:var(--gold-soft);
  border-radius:var(--radius); padding:12px; cursor:pointer; font-weight:600; }

.cm-post { border:1px solid var(--line); border-radius:var(--radius); padding:12px 14px; margin-bottom:10px; background:var(--panel); }
.cm-post.is-admin { border:1.5px solid var(--gold); background:linear-gradient(165deg, var(--gold-soft), var(--panel) 55%); box-shadow:0 2px 10px rgba(201,162,39,.14); }
.cm-admin-badge { display:inline-block; font-size:.78rem; font-weight:800; color:var(--gold-deep); letter-spacing:.03em; margin-bottom:6px; }
.cm-post-head { display:flex; align-items:center; gap:8px; }
.cm-ava { width:34px; height:34px; border-radius:50%; object-fit:cover; flex:none; }
.cm-ava-t { display:inline-flex; align-items:center; justify-content:center; background:var(--navy); color:var(--gold-dawn); font-weight:700; }
.cm-who { flex:1; display:flex; flex-direction:column; line-height:1.25; }
.cm-who span { font-size:.82rem; color:var(--dim); }
.cm-del { border:none; background:none; cursor:pointer; font-size:1rem; opacity:.45; }
.cm-del:hover { opacity:1; }
.cm-del.sm { font-size:.85rem; }
.cm-text { margin:8px 0 4px; white-space:pre-wrap; line-height:1.65; color:var(--body); }
.cm-post.is-admin .cm-text { color:var(--ink); font-size:1.02em; }
.cm-photos { display:flex; gap:8px; flex-wrap:wrap; margin:8px 0 2px; }
.cm-photos img { width:110px; height:110px; object-fit:cover; border-radius:10px; border:1px solid var(--line); cursor:zoom-in; }
.cm-actions { display:flex; gap:10px; margin-top:8px; }
.cm-actions button { font:inherit; font-size:.9rem; border:1px solid var(--line); background:var(--panel); border-radius:99px; padding:5px 13px; cursor:pointer; color:var(--body); }
.cm-like.on { border-color:var(--gold); background:var(--gold-soft); color:var(--gold-deep); font-weight:700; }
.cm-replies { border-top:1px dashed var(--line); margin-top:10px; padding-top:10px; }
.cm-reply { display:flex; gap:8px; align-items:flex-start; margin-bottom:8px; }
.cm-reply .cm-ava { width:26px; height:26px; }
.cm-reply-body { flex:1; font-size:.94rem; line-height:1.5; color:var(--body); }
.cm-reply-date { font-size:.78rem; color:var(--dim); margin-left:6px; }
.cm-reply-form { display:flex; gap:8px; margin-top:6px; }
.cm-reply-form input { flex:1; font:inherit; border:1px solid var(--line); border-radius:99px; padding:8px 14px; background:var(--panel); color:var(--text); }
.cm-reply-form .primary.sm, button.primary.sm { padding:8px 14px; font-size:.9rem; }

/* 내 순례 */
.my-wrap { display:grid; gap:14px; max-width:860px; margin:0 auto; }
.cm-my-hero h2 { margin-top:0; }
.cm-progress-main { margin:10px 0 4px; }
.cm-progress-label { font-weight:700; margin-bottom:6px; }
.cm-bar { height:14px; border-radius:99px; background:var(--panel2); border:1px solid var(--line); overflow:hidden; }
.cm-bar i { display:block; height:100%; border-radius:99px; background:linear-gradient(90deg, var(--gold-deep), var(--gold-dawn)); transition:width .5s; }
.cm-bar.sm { height:9px; flex:1; }
.cm-by-country h4 { margin:14px 0 8px; }
.cm-crow { display:flex; align-items:center; gap:10px; margin-bottom:7px; }
.cm-cname { width:110px; flex:none; font-size:.92rem; color:var(--body); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cm-cnum { width:56px; flex:none; text-align:right; font-size:.85rem; color:var(--dim); font-variant-numeric:tabular-nums; }
.cm-ck-row { display:flex; align-items:center; gap:10px; padding:9px 0; border-bottom:1px dashed var(--line); }
.cm-ck-row:last-child { border-bottom:none; }
.cm-ck-body { flex:1; display:flex; flex-direction:column; line-height:1.3; }
.cm-ck-body span { font-size:.83rem; color:var(--dim); }
.cm-view { font:inherit; font-size:.85rem; border:1px solid var(--line); background:var(--panel); border-radius:99px; padding:5px 12px; cursor:pointer; color:var(--body); }
.cm-subscribe { border:1.5px solid var(--gold); background:linear-gradient(165deg, var(--gold-soft), var(--panel) 60%); }
.cm-sub-row { display:flex; gap:8px; flex-wrap:wrap; }
.cm-sub-row input { flex:1; min-width:200px; font:inherit; border:1px solid var(--line); border-radius:10px; padding:10px 14px; background:var(--panel); color:var(--text); }
#tab-my .browse-map { height:340px; border-radius:var(--radius); }
@media (max-width:640px) {
  .cm-cname { width:84px; }
  .cm-photos img { width:88px; height:88px; }
}
.cm-nl-row { display:flex; align-items:center; gap:8px; margin-top:8px; font-size:.92rem; color:var(--gold-deep); font-weight:600; cursor:pointer; }
.cm-nl-row input { width:17px; height:17px; accent-color: var(--gold-deep); }
