:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #f0efe9;
  --text: #1c1917;
  --muted: #6b6560;
  --line: #e5e2da;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: #ccfbf1;
  --warn: #c2410c;
  --danger: #b91c1c;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(28, 25, 23, .06), 0 4px 16px rgba(28, 25, 23, .05);
  --nav-w: 232px;
  --tab-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #1c1c1b;
    --surface-2: #262624;
    --text: #f2efe9;
    --muted: #a8a29e;
    --line: #34322f;
    --accent: #2dd4bf;
    --accent-ink: #042f2e;
    --accent-soft: #134e4a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
body.no-scroll { overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 .6em; }
img { max-width: 100%; display: block; }
svg { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.pad { padding: 16px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.row.center { justify-content: center; }
.empty { color: var(--muted); padding: 24px 4px; }

/* 레이아웃 */
.shell { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; max-width: 1180px; margin: 0 auto; padding: 16px 16px calc(var(--tab-h) + 24px + env(safe-area-inset-bottom)); outline: none; }
.main > section { margin-top: 24px; }
.sidenav { display: none; }
.tabbar {
  position: fixed; inset: auto 0 0 0; height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); z-index: 1000;
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: .72rem; text-decoration: none; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.on { color: var(--accent); font-weight: 600; }
.tabbar a.cta svg { width: 30px; height: 30px; color: var(--accent); }

@media (min-width: 768px) {
  .tabbar { display: none; }
  .main { padding: 28px 32px 48px; }
  .sidenav {
    display: flex; flex-direction: column; gap: 24px; width: var(--nav-w); flex: none;
    position: sticky; top: 0; height: 100vh; padding: 24px 16px; border-right: 1px solid var(--line); background: var(--surface);
  }
  .navlinks { display: flex; flex-direction: column; gap: 4px; }
  .navlinks a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text); font-weight: 500; text-decoration: none; }
  .navlinks a svg { width: 22px; height: 22px; }
  .navlinks a:hover { background: var(--surface-2); }
  .navlinks a.on { background: var(--accent-soft); color: var(--text); font-weight: 700; }
  .navlinks a.cta { background: var(--accent); color: var(--accent-ink); margin: 8px 0; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  :root { --nav-w: 76px; }
  .sidenav { padding: 24px 10px; align-items: center; }
  .brand span:last-child, .navlinks a span { display: none; }
  .navlinks a { justify-content: center; }
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--text); text-decoration: none !important; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M18 46c8-2 6-14 14-16s10-10 14-12' stroke='white' stroke-width='5' fill='none' stroke-linecap='round'/%3E%3Ccircle cx='18' cy='46' r='5' fill='white'/%3E%3Ccircle cx='46' cy='18' r='5' fill='%23c9b3f0'/%3E%3C/svg%3E") center/100% no-repeat; flex: none; }

/* 카드 */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-body { padding: 12px 14px 14px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sec-head h2 { margin: 0; }
.page-head { margin-bottom: 16px; }
.page-head h1 { margin-bottom: 4px; }

.photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
.photo.ph {
  display: flex; align-items: flex-end; padding: 14px;
  background:
    radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--ph) 55%, transparent), transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--ph) 85%, #000 0%), color-mix(in srgb, var(--ph) 60%, #000 30%));
  color: #fff; font-weight: 700; font-size: 1.05rem; text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.photo.cover { aspect-ratio: 16 / 10; }
.photo.thumb { width: 88px; height: 88px; aspect-ratio: auto; border-radius: 12px; flex: none; font-size: .72rem; padding: 8px; }

.chip { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: var(--chip); background: color-mix(in srgb, var(--chip) 14%, transparent); white-space: nowrap; }
.tag { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); margin-right: 4px; }
.stars { color: #f59e0b; letter-spacing: 1px; }
.stars .dim { color: var(--line); }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: var(--av); color: #fff; font-weight: 700; flex: none; }
.who { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none !important; min-width: 0; }
.who small { display: block; }
.meta-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.stats { display: inline-flex; gap: 12px; color: var(--muted); font-size: .85rem; }
.stats.big { font-size: .95rem; gap: 18px; margin-top: 4px; }
.stats.big b { color: var(--text); }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .9rem; }

.guide-card { display: flex; flex-direction: column; }
.guide-card .cover-link { position: relative; display: block; }
.cover-badge { position: absolute; left: 10px; bottom: 10px; font-size: .75rem; font-weight: 600; background: rgba(0,0,0,.55); color: #fff; padding: 3px 9px; border-radius: 999px; }
.title-link { color: var(--text); }
.fork-line { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--warn); margin: -2px 0 6px; }
.fork-line svg { width: 15px; height: 15px; flex: none; }
.fork-line.big { font-size: .92rem; }

.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 78%); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 10px; margin: 0 -2px; }
.hscroll > * { scroll-snap-align: start; }
@media (min-width: 768px) { .hscroll { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); overflow: visible; } }
.card-grid, .post-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.post-head { padding: 10px 12px; }
.post-head b { display: block; font-size: .92rem; }
.post-head small { font-size: .75rem; }
.spot-line { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--text); margin-bottom: 4px; }

/* 버튼, 입력 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 16px; border-radius: 12px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; white-space: nowrap;
}
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { min-height: 32px; padding: 4px 12px; font-size: .85rem; border-radius: 10px; }
.btn.big { min-height: 48px; padding: 10px 28px; font-size: 1.02rem; }
.btn.danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn.icon-btn { background: var(--surface-2); color: var(--text); }
.btn.icon-btn.on { background: #fee2e2; color: #b91c1c; }
@media (prefers-color-scheme: dark) { .btn.icon-btn.on { background: #450a0a; color: #fca5a5; } }
.btn.light { background: #fff; color: #0f766e; }
.btn.ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }

.input {
  width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit;
}
.input.sm { min-height: 34px; padding: 4px 10px; font-size: .88rem; }
textarea.input { resize: vertical; }
.form { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.grid2, .grid3 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: repeat(3, 1fr); } }

.photo-drop { cursor: pointer; }
.photo-preview { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; aspect-ratio: 16 / 9; max-height: 320px; width: 100%; border: 2px dashed var(--line); border-radius: 14px; background: var(--surface-2); color: var(--muted); overflow: hidden; }
.photo-preview b { color: var(--text); font-size: 1rem; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }

/* 홈 */
.intro { padding: 20px; display: flex; flex-direction: column; gap: 8px; background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.intro h1 { font-size: 1.45rem; }
.trip-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--radius);
  background: linear-gradient(120deg, #0f766e, #155e75); color: #fff; margin-bottom: 8px;
}
.trip-banner > div { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.trip-banner span { font-size: .85rem; opacity: .9; }
.dot-live { width: 10px; height: 10px; border-radius: 50%; background: #fbbf24; box-shadow: 0 0 0 0 rgba(251,191,36,.7); animation: pulse 1.8s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(251,191,36,0); } 100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); } }

/* 탐색 */
.search { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-bottom: 10px; }
@media (max-width: 520px) { .search { grid-template-columns: 1fr 1fr; } .search .input[name=q] { grid-column: 1 / -1; } }
.chips-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.chip-btn { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: .88rem; white-space: nowrap; text-decoration: none !important; }
.chip-btn.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.explore-layout { display: grid; gap: 16px; }
.guide-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); align-content: start; }
@media (min-width: 1024px) {
  .explore-layout { grid-template-columns: minmax(0, 1fr) 420px; }
  .explore-layout .map-box { position: sticky; top: 24px; order: 2; height: calc(100vh - 220px); }
  .guide-list { grid-template-columns: 1fr 1fr; }
}

/* 지도 */
.map-box { width: 100%; height: 260px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); z-index: 0; }
.map-box.tall { height: 320px; }
.map-box.small-map { height: 220px; }
.pin-wrap { background: none; border: none; }
.pin { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--pin); color: #fff; font-size: 12px; font-weight: 800; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.pin.active { width: 30px; height: 30px; }
.leaflet-container { font: inherit; }

/* 가이드 상세 */
.back { display: inline-block; margin-bottom: 8px; color: var(--muted); font-size: .9rem; }
.guide-page { display: grid; gap: 24px; }
.guide-side { display: none; }
.mobile-only { margin: 16px 0; }
@media (min-width: 1024px) {
  .guide-page { grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); align-items: start; }
  .guide-side { display: block; position: sticky; top: 24px; }
  .guide-side .map-box { height: calc(100vh - 48px); }
  .mobile-only { display: none; }
}
.guide-head h1 { font-size: 1.7rem; margin-top: 4px; }
.action-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.follow-box { margin-top: 16px; padding: 14px; border-radius: var(--radius); background: var(--accent-soft); }
.bar { height: 8px; background: color-mix(in srgb, var(--accent) 20%, transparent); border-radius: 999px; margin: 10px 0 8px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .3s; }

.timeline, .stops { list-style: none; margin: 0; padding: 0; }
.day { margin-top: 24px; }
.day-head { display: flex; align-items: baseline; gap: 8px; color: var(--day); font-size: 1.15rem; }
.day-head small { color: var(--muted); font-weight: 500; font-size: .85rem; }
.stops { position: relative; padding-left: 40px; }
.stops::before { content: ""; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 2px; background: repeating-linear-gradient(var(--line) 0 6px, transparent 6px 12px); }
.stop { position: relative; margin-bottom: 12px; }
.stop .num { position: absolute; left: -40px; top: 12px; }
.num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--pin); color: #fff; font-size: .8rem; font-weight: 800; flex: none; box-shadow: 0 0 0 3px var(--bg); }
.stop-card { padding: 12px 14px; transition: box-shadow .3s; }
.stop.flash .stop-card { box-shadow: 0 0 0 3px var(--accent); }
.stop.done .stop-card { opacity: .6; }
.stop.done .num { background: #94a3b8; }
.stop-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stop-top .spot-line { margin: 0; }
.stop-post { display: flex; gap: 12px; margin-top: 8px; }
.stop-post p { margin-bottom: 4px; font-size: .92rem; }
.badge-new { font-size: .72rem; font-weight: 700; color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); padding: 2px 8px; border-radius: 999px; }
.note { margin: 8px 0 0; font-size: .88rem; background: var(--surface-2); padding: 6px 10px; border-radius: 8px; }
.check { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

.lineage { margin-top: 28px; padding: 16px; }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { padding-left: 22px; border-left: 2px solid var(--line); margin-left: 9px; }
.tree li { padding: 6px 0 0; }
.tree a { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 500; }
.tree a.here { font-weight: 800; color: var(--accent); }

/* 편집 */
.edit-list { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; }
.edit-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; flex-wrap: wrap; }
.edit-item .input { margin-top: 6px; }
.day-sel { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.day-sel .input { width: 64px; margin: 0; }
.btns { display: flex; gap: 4px; }
@media (max-width: 560px) { .edit-item .grow { flex-basis: calc(100% - 44px); } .btns { margin-left: auto; } }

/* 프로필, 스팟 */
.profile { display: flex; align-items: center; gap: 16px; padding: 20px; flex-wrap: wrap; }
.spot-head { display: grid; gap: 16px; }
@media (min-width: 768px) { .spot-head { grid-template-columns: 1fr 1fr; align-items: center; } }

/* 모달, 토스트 */
.modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: end center; }
.modal[hidden] { display: none; }
.modal-back { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.modal-card { position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--surface); border-radius: 20px 20px 0 0; padding: 20px; }
.modal-card .form { padding: 0; }
@media (min-width: 600px) { .modal { place-items: center; } .modal-card { border-radius: 20px; } }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 12px; font-size: .9rem; opacity: 0; pointer-events: none; transition: .25s; z-index: 3000; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 768px) { .toast { bottom: 32px; } }

/* ---------- 상용화 추가 ---------- */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 5000; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.sidenav .sitefoot { margin-top: auto; }
.sitefoot { font-size: .75rem; color: var(--muted); line-height: 1.6; }
.sitefoot p { margin: 6px 0 0; }
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.legal-links a { color: var(--muted); }
.mobile-foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); }
@media (min-width: 768px) { .mobile-foot { display: none; } }
.demo-note { font-size: .82rem; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 6px 12px; margin: 0 0 12px; }
.warn { color: var(--warn); }
.vis-badge { position: absolute; right: 10px; top: 10px; font-size: .72rem; font-weight: 700; background: rgba(0,0,0,.6); color: #fff; padding: 3px 9px; border-radius: 999px; }
.post-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.btn.more { min-height: 30px; padding: 0 10px; border: none; font-size: 1.1rem; color: var(--muted); }
.btn.block { width: 100%; }
.btn.kakao { background: #fee500; color: #191600; }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn:disabled { opacity: .6; cursor: progress; }
.loading { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 16px; color: var(--muted); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner, .dot-live { animation: none; } }
.auth-box { max-width: 440px; margin: 24px auto; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.auth-box h1 { margin: 0; }
.form.flat { padding: 0; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 4px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form label.check-line, .switch { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; color: var(--text); font-size: .92rem; }
.check-line input, .switch input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.switch { display: flex; margin: 8px 0; }
.form hr { border: none; border-top: 1px solid var(--line); margin: 0; width: 100%; }
.menu-list { display: flex; flex-direction: column; gap: 8px; }
.menu-list .danger { color: var(--danger); }
.legal { max-width: 760px; }
.legal h2 { font-size: 1.02rem; margin-top: 1.4em; }
.legal ol { padding-left: 1.3em; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .85rem; margin: 8px 0; display: block; overflow-x: auto; }
.legal-table th, .legal-table td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.legal-table th { background: var(--surface-2); }
.account h2 { margin-bottom: 4px; }
@media (min-width: 768px) and (max-width: 1023px) { .sidenav .sitefoot { display: none; } .mobile-foot { display: block; } }
.photo.cover.ph { align-items: flex-start; }

.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; }
.seg a { flex: 1; text-align: center; padding: 8px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 600; }
.seg a.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.pw-rules { list-style: none; margin: -4px 0 0; padding: 0; font-size: .82rem; color: var(--muted); display: grid; gap: 2px; }
.pw-rules li.ok { color: var(--accent); }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; }
.row.between { justify-content: space-between; }
.map-wrap { position: relative; }
.map-box.pick-map { height: 320px; }
.place-search { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 500; display: grid; gap: 6px; }
.place-bar { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 4px 4px 10px; box-shadow: var(--shadow); }
.place-bar .input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 4px; box-shadow: none; }
.place-bar .input:focus { outline: none; }
.place-bar:focus-within { border-color: var(--accent); }
.place-results { list-style: none; margin: 0; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); max-height: 220px; overflow: auto; box-shadow: var(--shadow); }
.place-results li.muted { padding: 8px 10px; font-size: .85rem; }
.place-results button { display: grid; gap: 2px; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 8px; color: var(--text); font: inherit; cursor: pointer; }
.place-results button:hover, .place-results button:focus-visible { background: var(--surface-2); }
.place-results small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 사진 크게 보기 + 덧글 */
.photo-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: inherit; color: inherit; }
.photo-btn.thumb { width: auto; flex: none; }
.cmt-link { font-size: .85rem; }
.modal-card.viewer-card { max-width: 1100px; padding: 0; overflow: hidden; }
.viewer { position: relative; display: flex; flex-direction: column; max-height: 92vh; overflow-y: auto; }
.viewer-close { position: absolute; top: 10px; right: 10px; z-index: 1; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .5); color: #fff; font-size: 1rem; cursor: pointer; }
.viewer-photo { margin: 0; flex: none; display: flex; align-items: center; justify-content: center; background: #0b1214; }
.viewer-photo img { display: block; max-width: 100%; max-height: 70vh; object-fit: contain; }
.viewer-photo .photo.ph { width: 100%; }
.viewer-side { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.viewer-side .who { display: flex; align-items: center; gap: 10px; }
.viewer-side .who span { display: flex; flex-direction: column; }
.viewer-text { margin: 0; white-space: pre-wrap; }
.viewer-side h3 { margin: 6px 0 0; font-size: .95rem; }
.cmts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.cmt { display: flex; gap: 10px; align-items: flex-start; }
.cmt p { margin: 0; }
.cmt-body { white-space: pre-wrap; word-break: break-word; }
.cmt-acts { display: flex; gap: 12px; font-size: .78rem; margin-top: 2px !important; }
.cmt-form { display: flex; gap: 8px; position: sticky; bottom: 0; padding: 8px 0 4px; background: var(--glass, var(--surface)); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.cmt-form .input { flex: 1; min-width: 0; }
@media (min-width: 900px) {
  .viewer { flex-direction: row; height: min(88vh, 780px); overflow: hidden; }
  .viewer-photo { flex: 1; min-width: 0; }
  .viewer-photo img { max-height: 100%; }
  .viewer-side { width: 360px; flex: none; border-left: 1px solid var(--line); min-height: 0; }
  .cmts { flex: 1; overflow-y: auto; min-height: 0; }
  .cmt-form { position: static; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
