/* ============================================================
   매장지도 — Direction A "콘솔" 디자인 시스템
   토큰 → 리셋 → 셸(레일/탑바/하단탭) → 컴포넌트 → 페이지
   ============================================================ */

:root {
  --sans: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", "Noto Sans KR", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --bg: #ffffff;
  --canvas: #f8fafc;
  --border: #e5e7eb;
  --border2: #eef2f6;
  --ink: #0f172a;
  --sub: #64748b;
  --faint: #94a3b8;
  --accent: #2563eb;
  --accent-d: #1d4ed8;
  --accent-soft: #eff4ff;
  --r: 6px;

  --open-bg: #ecfdf3; --open-fg: #067647; --open-bd: #abefc6;
  --closed-bg: #f9fafb; --closed-fg: #64748b; --closed-bd: #e5e7eb;
}

/* ---------- reset ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow-x: hidden; max-width: 100%; }
body.smap-body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  letter-spacing: -0.01em;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
img { display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }
button { font-family: var(--sans); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #d6dbe2; border-radius: 6px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ============================================================
   셸 (app shell)
   ============================================================ */
.smap-app { position: fixed; inset: 0; display: flex; flex-direction: row; background: var(--bg); }

/* 좌측 아이콘 레일 (desktop) */
.smap-rail {
  width: 64px; flex: 0 0 64px; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center;
  padding-top: 14px; gap: 6px; background: #fff; z-index: 5;
}
.smap-rail-brand {
  width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #fff;
  display: grid; place-items: center; margin-bottom: 14px; cursor: pointer;
}
.smap-rail-item {
  width: 44px; height: 44px; border-radius: 9px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: var(--faint);
  background: transparent; cursor: pointer; transition: all .12s ease;
}
.smap-rail-item:hover { color: var(--sub); background: var(--canvas); }
.smap-rail-item.is-active { color: var(--accent); background: var(--accent-soft); }
.smap-rail-item.is-active svg.smap-fill { fill: var(--accent); }

/* 하단 탭바 (mobile) */
.smap-bottomnav { display: none; }

/* 콘텐츠 컬럼 */
.smap-content { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

/* TopBar (서브페이지 공용) */
.smap-topbar {
  height: 54px; flex: 0 0 54px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 20px; gap: 12px; background: #fff;
}
.smap-topbar-back { display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--sub); flex-shrink: 0; }
.smap-topbar-crumb { font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.smap-topbar-title { font-size: 15px; font-weight: 700; white-space: nowrap; }
.smap-topbar-brand { width: 26px; height: 26px; border-radius: 6px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.smap-spacer { flex: 1; }

/* 스크롤 뷰 영역 */
.smap-view { flex: 1; min-height: 0; overflow-y: auto; }
.smap-view--flat { background: var(--canvas); }
.smap-view--map { overflow: hidden; display: flex; flex-direction: column; }

/* ============================================================
   컴포넌트
   ============================================================ */
/* 버튼 */
.smap-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 15px; border-radius: var(--r); font-size: 13.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap; border: 1px solid var(--border); background: #fff;
  color: var(--ink); transition: all .12s ease;
}
.smap-btn:hover { background: var(--canvas); }
.smap-btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; }
.smap-btn.full { width: 100%; }
.smap-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.smap-btn-primary:hover { background: var(--accent-d); border-color: var(--accent-d); }
.smap-btn-ghost { background: transparent; border-color: transparent; color: var(--sub); }
.smap-btn-ghost:hover { background: var(--canvas); }
.smap-btn-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.smap-btn-active svg.smap-fill { fill: var(--accent); }
.smap-btn[disabled] { opacity: .55; cursor: default; }

/* 태그/뱃지 */
.smap-tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); background: #f1f5f9; color: #475569; white-space: nowrap; }
.smap-tag-open { background: var(--open-bg); color: var(--open-fg); border-color: var(--open-bd); }
.smap-tag-closed { background: var(--closed-bg); color: var(--closed-fg); border-color: var(--closed-bd); }
.smap-tag-blue { background: var(--accent-soft); color: var(--accent); border-color: #cfe0ff; }
.smap-tag-gold { background: linear-gradient(135deg, #fdf3d6, #f9e7b0); color: #8a6d00; border-color: #e7c869; font-weight: 700; }

/* 칩 (필터) */
.smap-chip {
  height: 34px; padding: 0 13px; display: inline-flex; align-items: center; gap: 5px;
  border-radius: 999px; border: 1px solid var(--border); background: #fff;
  font-size: 12.5px; color: var(--sub); font-weight: 600; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.smap-chip.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* 입력 */
.smap-field { display: block; margin-bottom: 14px; }
.smap-field-label { font-size: 12.5px; font-weight: 600; color: var(--sub); margin-bottom: 6px; display: block; }
.smap-input, .smap-select {
  width: 100%; height: 40px; border: 1px solid var(--border); border-radius: var(--r);
  padding: 0 12px; font-size: 13.5px; font-family: var(--sans); color: var(--ink); background: #fff; outline: none;
}
.smap-input:focus, .smap-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
textarea.smap-input { height: auto; padding: 12px; line-height: 1.6; resize: vertical; }

/* 드롭다운 셀렉트 (툴바용 컴팩트) */
.smap-select-c { height: 34px; padding: 0 30px 0 14px; border: 1px solid var(--border); border-radius: var(--r); background: #fff; font-size: 13px; color: var(--ink); font-family: var(--sans); cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M5 9l7 7 7-7'/></svg>");
  background-repeat: no-repeat; background-position: right 9px center; }

/* 세그먼트 토글 */
.smap-seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.smap-seg button { height: 32px; padding: 0 11px; display: grid; place-items: center; background: #fff; color: var(--faint); border: 0; border-right: 1px solid var(--border); cursor: pointer; }
.smap-seg button:last-child { border-right: 0; }
.smap-seg button.is-active { background: var(--accent-soft); color: var(--accent); }

/* 알림 */
.smap-alert { padding: 11px 14px; border-radius: var(--r); font-size: 13px; margin-bottom: 14px; line-height: 1.55; }
.smap-alert-err { background: #fef2f2; color: #b42318; border: 1px solid #fecdca; }
.smap-alert-ok  { background: var(--open-bg); color: var(--open-fg); border: 1px solid var(--open-bd); }
.smap-alert-warn { background: #fffaeb; color: #b54708; border: 1px solid #fedf89; }

/* ============================================================
   지도 페이지
   ============================================================ */
.smap-maphead { height: 54px; flex: 0 0 54px; border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 20px; gap: 14px; background: #fff; }
.smap-maphead-title { font-size: 15px; font-weight: 700; white-space: nowrap; }
.smap-maphead-count { font-size: 12.5px; color: var(--sub); font-family: var(--mono); white-space: nowrap; }
.smap-maphead-count b { color: var(--ink); }

.smap-toolbar { display: flex; align-items: center; gap: 8px; padding: 0 20px; height: 52px; flex: 0 0 52px; border-bottom: 1px solid var(--border); background: var(--canvas); }
.smap-toolbar .smap-spacer { flex: 1; }

.smap-notice { display: flex; align-items: center; gap: 7px; padding: 9px 16px; background: var(--accent-soft); color: var(--accent-d); border-bottom: 1px solid #cfe0ff; font-size: 13px; font-weight: 600; flex: 0 0 auto; }
.smap-mapwrap { position: relative; flex: 1; min-height: 0; }
#smap-map { position: absolute; inset: 0; width: 100%; height: 100%; background: #eef1f4; }
/* 채도 낮춘 타일 */
#smap-map .leaflet-tile-pane { filter: saturate(0.62) brightness(1.04) contrast(0.96); }

.smap-zoom { position: absolute; left: 16px; top: 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: 0 1px 3px rgba(15,23,42,.08); z-index: 600; }
.smap-zoom button { width: 34px; height: 34px; display: grid; place-items: center; background: #fff; border: 0; border-bottom: 1px solid var(--border); color: var(--ink); cursor: pointer; }
.smap-zoom button:last-child { border-bottom: 0; }
.smap-zoom button:hover { background: var(--canvas); }

.smap-guestpill { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 7px 16px; font-size: 12.5px; color: var(--sub); box-shadow: 0 4px 14px -6px rgba(15,23,42,.25); z-index: 600; white-space: nowrap; max-width: 92%; }
.smap-guestpill b { color: var(--accent); }

/* 목록 패널 */
.smap-listpanel { position: absolute; left: 0; top: 0; bottom: 0; width: 372px; background: #fff; border-right: 1px solid var(--border); box-shadow: 4px 0 18px -10px rgba(15,23,42,.25); display: flex; flex-direction: column; z-index: 650; }
.smap-listpanel-head { padding: 12px 18px; border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--sub); font-family: var(--mono); }
.smap-listpanel-body { overflow-y: auto; flex: 1; }
.smap-listrow { padding: 13px 18px; border-bottom: 1px solid var(--border2); cursor: pointer; display: flex; align-items: center; gap: 12px; }
.smap-listrow:hover { background: var(--canvas); }
.smap-listrow-main { flex: 1; min-width: 0; }
.smap-listrow-name { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.smap-listrow-name b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smap-listrow-sub { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smap-listrow-dist { font-size: 12.5px; color: var(--sub); font-family: var(--mono); flex-shrink: 0; }

/* 클러스터 마커 */
.smap-cluster { display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-family: var(--mono); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; border: 2px solid rgba(255,255,255,.9); box-shadow: 0 1px 4px rgba(15,23,42,.25); }
.smap-cluster.t0 { background: #dbeafe; color: #1e40af; font-size: 12px; }
.smap-cluster.t1 { background: #93c4fd; color: #fff; font-size: 12px; }
.smap-cluster.t2 { background: #3b82f6; color: #fff; font-size: 14px; }
.smap-cluster.t3 { background: #1d4ed8; color: #fff; font-size: 14px; }
.smap-pin { filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); color: var(--accent); }
.leaflet-popup-content-wrapper { border-radius: var(--r); }

/* ============================================================
   매장 상세
   ============================================================ */
.smap-detail { flex: 1; display: flex; overflow: hidden; }
.smap-detail-info { padding: 26px 32px; overflow-y: auto; flex: 1; }
.smap-detail-map { border-left: 1px solid var(--border); position: relative; flex: 0 0 440px; }
.smap-detail-map #smap-mini { position: absolute; inset: 0; }
.smap-detail-tags { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.smap-detail-name { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 0 0 4px; }
.smap-detail-meta { font-size: 13.5px; color: var(--sub); margin-bottom: 20px; font-family: var(--mono); }
.smap-detail-actions { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.smap-infocard { border: 1px solid var(--border); border-radius: var(--r); padding: 4px 16px; }
.smap-inforow { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border2); }
.smap-inforow:last-child { border-bottom: 0; }
.smap-inforow-label { width: 92px; flex: 0 0 92px; color: var(--sub); font-size: 13px; display: flex; align-items: center; gap: 7px; }
.smap-inforow-label svg { color: var(--faint); }
.smap-inforow-val { font-size: 13.5px; color: var(--ink); word-break: break-all; }
.smap-inforow-val.mono { font-family: var(--mono); }

/* ============================================================
   메모
   ============================================================ */
.smap-memo-wrap { width: 720px; max-width: 100%; margin: 0 auto; padding: 26px 0; }
.smap-memo-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.smap-memo-chip { width: 38px; height: 38px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.smap-memo-head-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smap-memo-head-sub { font-size: 12.5px; color: var(--sub); font-family: var(--mono); }
.smap-memo-card { background: #fff; border: 1px solid var(--border); border-radius: var(--r); padding: 16px; margin-bottom: 22px; }
.smap-memo-card-label { font-size: 12.5px; font-weight: 700; color: var(--sub); margin-bottom: 8px; }
.smap-memo-foot { display: flex; align-items: center; margin-top: 10px; gap: 8px; }
.smap-memo-counter { font-size: 12px; color: var(--faint); font-family: var(--mono); }
.smap-memo-saved { background: #fff; border: 1px solid var(--border); border-radius: var(--r); padding: 14px 16px; border-left: 3px solid var(--accent); }
.smap-memo-saved-body { font-size: 13.5px; line-height: 1.65; margin-bottom: 8px; white-space: pre-wrap; }
.smap-memo-empty { font-size: 13px; color: var(--faint); padding: 20px 0; text-align: center; }
.smap-memo-listitem { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r); background: #fff; cursor: pointer; margin-bottom: 10px; }
.smap-memo-listitem:hover { background: var(--canvas); }

/* ============================================================
   관심매장 / 목록 테이블
   ============================================================ */
.smap-filterbar { height: 52px; flex: 0 0 52px; border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 20px; gap: 8px; background: var(--canvas); overflow-x: auto; }
.smap-filterbar .smap-spacer { flex: 1; }
.smap-filterbar-count { font-size: 12.5px; color: var(--sub); font-family: var(--mono); white-space: nowrap; }
.smap-table-head { display: grid; grid-template-columns: 1fr 130px 110px 110px; padding: 0 24px; height: 38px; align-items: center; border-bottom: 1px solid var(--border); font-size: 11.5px; font-weight: 700; color: var(--faint); background: #fcfdfe; }
.smap-table-row { display: grid; grid-template-columns: 1fr 130px 110px 110px; padding: 0 24px; height: 64px; align-items: center; border-bottom: 1px solid var(--border2); }
.smap-table-row:hover { background: var(--canvas); }
.smap-table-store { display: flex; align-items: center; gap: 12px; cursor: pointer; min-width: 0; }
.smap-table-store b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.smap-table-store span { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.smap-star { color: var(--accent); cursor: pointer; flex-shrink: 0; }
.smap-iconbtn { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: var(--r); display: grid; place-items: center; cursor: pointer; color: var(--sub); background: #fff; }
.smap-iconbtn:hover { background: var(--canvas); }
.smap-empty { padding: 60px 20px; text-align: center; color: var(--faint); font-size: 14px; line-height: 1.7; }

/* ============================================================
   로그인 / 가입 카드
   ============================================================ */
/* 인증 카드 래퍼: grid auto-track가 카드 width(380px)만큼 늘어 좁은 화면을 넘겨(좌측 여백·우측 잘림) 발생하던 문제 방지 — minmax(0,1fr)로 트랙을 컨테이너 폭에 고정 */
.smap-authwrap { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 20px; }
.smap-authcard { width: 380px; max-width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 28px; box-shadow: 0 1px 3px rgba(15,23,42,.06); margin: auto; }
.smap-authcard-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.smap-authcard-brand .b { width: 30px; height: 30px; border-radius: 7px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.smap-authcard-brand .t { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.smap-authcard-sub { font-size: 13px; color: var(--sub); margin-bottom: 20px; }
.smap-authtabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.smap-authtab { padding: 0 2px 10px; margin-right: 18px; font-size: 13.5px; font-weight: 600; color: var(--faint); border-bottom: 2px solid transparent; cursor: pointer; }
.smap-authtab.is-active { font-weight: 700; color: var(--ink); border-bottom-color: var(--accent); }
.smap-authdiv { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--faint); font-size: 12px; }
.smap-authdiv::before, .smap-authdiv::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.smap-captcha-row { display: flex; gap: 10px; align-items: center; }
.smap-captcha-img { height: 40px; width: 130px; border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; background: var(--canvas); flex: 0 0 auto; }
.smap-captcha-row .smap-input { flex: 1; }
.smap-hint { display: block; font-size: 12px; margin-top: 5px; color: var(--faint); }
.smap-hint.ok { color: #067647; }
.smap-hint.err { color: #b42318; }

/* 페이지 패딩 헬퍼 */
.smap-page { max-width: 1100px; margin: 0 auto; padding: 26px 24px; width: 100%; }
.smap-page h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 18px; }
.smap-page-lead { font-size: 13px; color: var(--sub); line-height: 1.6; margin: 0 0 16px; }

/* ============================================================
   IP 조회
   ============================================================ */
.smap-ip-form { display: flex; gap: 8px; margin-bottom: 16px; }
.smap-ip-form .smap-input { flex: 1; font-family: var(--mono); }
.smap-ip-msg { padding: 12px 16px; border-radius: var(--r); font-size: 14px; margin-bottom: 16px; }
.smap-ip-msg-err { background: #fef2f2; color: #b42318; border: 1px solid #fecdca; }
.smap-ip-msg-warn { background: #fffaeb; color: #b54708; border: 1px solid #fedf89; }
.smap-ip-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.smap-ip-addr { font-size: 20px; font-weight: 700; font-family: var(--mono); }
.smap-ip-ver { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: var(--r); }
.smap-ip-meta { font-size: 12px; color: var(--faint); font-family: var(--mono); }
.smap-ip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.smap-ip-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.smap-ip-card h3 { margin: 0 0 12px; font-size: 14px; }
.smap-ip-card-sec { grid-column: 1 / -1; }
.smap-ip-row { display: flex; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--border2); font-size: 13px; }
.smap-ip-row:last-child { border-bottom: 0; }
.smap-ip-k { flex: 0 0 92px; color: var(--sub); }
.smap-ip-v { flex: 1; word-break: break-all; }
.smap-ip-dim { color: var(--faint); }
.smap-ip-verdict { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 10px; }
.smap-ip-verdict-icon { flex: 0 0 auto; display: grid; place-items: center; }
.smap-ip-verdict-body { display: flex; flex-direction: column; }
.smap-ip-verdict-title { font-size: 18px; font-weight: 800; line-height: 1.2; }
.smap-ip-verdict-desc { font-size: 12.5px; margin-top: 3px; opacity: .85; line-height: 1.45; }
.smap-ip-verdict-ok     { background: var(--open-bg); color: var(--open-fg); border: 1px solid var(--open-bd); }
.smap-ip-verdict-warn   { background: #fffaeb; color: #b54708; border: 1px solid #fedf89; }
.smap-ip-verdict-danger { background: #fef2f2; color: #b42318; border: 1px solid #fecdca; }
.smap-ip-rep { margin-top: 10px; padding: 10px 14px; border-radius: var(--r); font-size: 13px; font-weight: 600; line-height: 1.5; background: #fef2f2; color: #b42318; border: 1px solid #fecdca; }
.smap-ip-detect-title { margin: 14px 0 6px; font-size: 12px; color: var(--sub); font-weight: 600; }
.smap-ip-detect { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.smap-ip-detect li { display: flex; align-items: baseline; gap: 10px; font-size: 13px; padding: 7px 11px; background: #fef2f2; border: 1px solid #fecdca; border-radius: var(--r); }
.smap-ip-detect li b { color: #b42318; flex: 0 0 auto; }
.smap-ip-detect li span { color: var(--sub); }
.smap-ip-secsrc { margin-top: 12px; font-size: 11px; color: var(--faint); font-family: var(--mono); }
.smap-ip-krnic { margin-top: 10px; font-size: 12px; }
.smap-ip-krnic summary { cursor: pointer; color: var(--accent); }
.smap-ip-krnic pre { margin: 8px 0 0; padding: 10px; background: var(--canvas); border: 1px solid var(--border2); border-radius: var(--r); font-size: 11px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; max-height: 280px; overflow: auto; }
.smap-ip-map { height: 280px; margin-top: 14px; border-radius: 10px; border: 1px solid var(--border); overflow: hidden; }
.smap-ip-trial { background: #fffaeb; border: 1px solid #fedf89; color: #b54708; padding: 10px 14px; border-radius: var(--r); font-size: 13px; margin-bottom: 16px; line-height: 1.5; }
.smap-ip-quota { display: inline-block; margin-left: 8px; padding: 2px 10px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; font-size: 12px; font-weight: 600; font-family: var(--mono); }

/* ============================================================
   관리자 테이블
   ============================================================ */
.smap-admin-stats { display: flex; gap: 18px; margin-bottom: 16px; font-size: 13px; color: var(--sub); }
.smap-admin-stats b { font-family: var(--mono); }
.smap-admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.smap-admin-table th, .smap-admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border2); text-align: left; font-size: 13px; }
.smap-admin-table th { background: var(--canvas); font-weight: 600; color: var(--sub); font-size: 11.5px; }
.smap-admin-table tr:last-child td { border-bottom: 0; }
.smap-admin-table .mono { font-family: var(--mono); }
.smap-toggle { padding: 4px 12px; border-radius: var(--r); cursor: pointer; border: 1px solid var(--border); background: #fff; font-size: 12px; font-family: var(--mono); }
.smap-toggle.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }

/* 관리자 콘솔 */
.smap-adminbar { display: flex; gap: 4px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: #fff; overflow-x: auto; }
.smap-admintab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--r); font-size: 13.5px; font-weight: 600; color: var(--sub); text-decoration: none; white-space: nowrap; }
.smap-admintab:hover { background: var(--canvas); }
.smap-admintab.is-active { background: var(--accent-soft); color: var(--accent); }
.smap-admintab.is-active svg { color: var(--accent); }
.smap-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.smap-set-group { border: 1px solid var(--border); border-radius: 8px; padding: 16px 18px; margin-bottom: 16px; background: #fff; }
.smap-set-title { font-size: 13px; font-weight: 700; color: var(--sub); margin-bottom: 12px; }
.smap-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 12px; cursor: pointer; }
.smap-pager { display: flex; gap: 6px; align-items: center; justify-content: center; margin: 16px 0; flex-wrap: wrap; }
.smap-pager a, .smap-pager span { padding: 6px 11px; border: 1px solid var(--border); border-radius: var(--r); font-size: 13px; font-family: var(--mono); color: var(--sub); text-decoration: none; }
.smap-pager .is-cur { background: var(--accent); color: #fff; border-color: var(--accent); }
.smap-origin { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.smap-origin.cron { background: #eef2f6; color: #64748b; }
.smap-origin.manual { background: var(--accent-soft); color: var(--accent); }

/* ============================================================
   반응형 (<760 = mobile)
   ============================================================ */
@media (max-width: 759px) {
  .smap-app { flex-direction: column; }
  .smap-rail { display: none; }
  .smap-bottomnav { display: flex; height: 58px; flex: 0 0 58px; border-top: 1px solid var(--border); align-items: center; justify-content: space-around; background: #fff; padding-bottom: 4px; z-index: 5; }
  .smap-bottomnav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--faint); cursor: pointer; min-width: 56px; text-decoration: none; }
  .smap-bottomnav-item.is-active { color: var(--accent); }
  .smap-bottomnav-item.is-active svg.smap-fill { fill: var(--accent); }
  .smap-bottomnav-item span { font-size: 10.5px; font-weight: 600; }

  .smap-topbar, .smap-maphead { padding: 0 14px; }
  .smap-toolbar, .smap-filterbar { padding: 10px 14px; height: auto; flex: none; flex-wrap: wrap; }
  .smap-detail { flex-direction: column; overflow-y: auto; }
  .smap-detail-map { border-left: 0; flex: 0 0 220px; }
  .smap-detail-info { flex: none; padding: 20px 18px; }
  .smap-detail-name { font-size: 23px; }
  .smap-listpanel { width: 100%; }
  .smap-ip-grid { grid-template-columns: 1fr; }
  .smap-table-head { display: none; }
  .smap-table-row { grid-template-columns: 1fr auto; height: auto; padding: 14px 16px; gap: 8px; }
  .smap-table-row .col-cat, .smap-table-row .col-act { display: none; }
  .smap-page { padding: 18px 16px; }
}

/* 데스크탑 전용 노출 헬퍼 */
.smap-desktop-only { }
@media (max-width: 759px) { .smap-desktop-only { display: none !important; } }
.smap-mobile-only { display: none; }
@media (max-width: 759px) { .smap-mobile-only { display: initial; } }

/* ============================================================
   네비 v2 — 통합 헤더 / 햄버거 드로어 / 하단탭 / 상세 모달
   ============================================================ */
.smap-app { flex-direction: row; }           /* 레일 제거: content 단독 */

.smap-header { display: flex; align-items: center; gap: 10px; height: 52px; flex: 0 0 auto; padding: 0 14px; border-bottom: 1px solid var(--border); background: #fff; }
.smap-header-brand { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.smap-header-brand .b { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.smap-header-back { display: inline-flex; align-items: center; gap: 6px; color: var(--sub); flex-shrink: 0; }
.smap-header-title { font-size: 15px; font-weight: 700; white-space: nowrap; }
.smap-header-user { font-size: 12.5px; color: var(--sub); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-family: var(--mono); }
.smap-ham { height: 36px; min-width: 56px; padding: 0 16px; border: 1px solid var(--border); border-radius: 8px; background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); flex-shrink: 0; transition: all .12s ease; }
.smap-ham:hover { background: var(--canvas); border-color: var(--faint); }
.smap-ham:active { transform: scale(.97); }
@media (max-width: 759px) { .smap-ham { min-width: 62px; } }
.smap-mapbar-controls { display: flex; align-items: center; gap: 8px; min-width: 0; }
.smap-mapbar-controls .smap-chip { border-radius: var(--r); height: 32px; padding: 0 11px; }   /* 라디우스 최소화 */
.smap-mapbar-controls .smap-btn.sm { padding: 0 9px; }   /* 아이콘 전용 컴팩트 */

/* 지도 하단 정보 캡션 (전체수 · 업데이트일) */
.smap-mapinfo { position: absolute; left: 14px; bottom: 12px; z-index: 600; background: rgba(255,255,255,.92); border: 1px solid var(--border); border-radius: var(--r); padding: 4px 10px; font-size: 11.5px; color: var(--sub); font-family: var(--mono); white-space: nowrap; box-shadow: 0 1px 3px rgba(15,23,42,.06); }
.smap-mapinfo b { color: var(--ink); }

/* 햄버거 드로어 */
.smap-drawer-ov { position: fixed; inset: 0; background: rgba(15,23,42,.35); opacity: 0; visibility: hidden; transition: opacity .15s; z-index: 1000; }
.smap-drawer-ov.open { opacity: 1; visibility: visible; }
.smap-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 280px; max-width: 84%; background: #fff; border-left: 1px solid var(--border); transform: translateX(100%); transition: transform .18s ease; z-index: 1001; display: flex; flex-direction: column; box-shadow: -8px 0 24px -12px rgba(15,23,42,.3); }
.smap-drawer.open { transform: translateX(0); }
.smap-drawer-head { height: 52px; display: flex; align-items: center; padding: 0 8px 0 16px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 15px; }
.smap-drawer-body { flex: 1; overflow-y: auto; padding: 8px; }
.smap-drawer-item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--r); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.smap-drawer-item:hover { background: var(--canvas); }
.smap-drawer-item.is-active { background: var(--accent-soft); color: var(--accent); }
.smap-drawer-item.is-active svg.smap-fill { fill: var(--accent); }
.smap-drawer-sep { height: 1px; background: var(--border); margin: 8px 4px; }
.smap-drawer-foot { padding: 12px 16px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--sub); font-family: var(--mono); }
.smap-drawer-foot b { color: var(--ink); }

/* 드로어 사용자 섹션 (무료=노말 / 유료=프리미엄) */
.smap-drawer-user { display: flex; align-items: center; gap: 12px; padding: 14px; margin: 2px 0 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--canvas); text-decoration: none; color: inherit; transition: background .12s, border-color .12s; }
.smap-drawer-user:hover { background: #f1f5f9; }
.smap-drawer-user-av { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--border); color: var(--sub); }
.smap-drawer-user-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.smap-drawer-user-name { font-size: 15px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smap-drawer-user-tier { font-size: 12px; color: var(--faint); font-weight: 600; }
.smap-drawer-user-badge { margin-left: auto; align-self: flex-start; }
.smap-drawer-user-exp { font-size: 11px; color: #a07b00; margin: -2px 2px 8px; display: flex; align-items: center; gap: 4px; }

/* 프리미엄(유료) — 골드 톤으로 "있어보이게" */
.smap-drawer-user.is-premium {
  background: linear-gradient(135deg, #fffdf3 0%, #fdf3d6 100%);
  border-color: #e7c869;
  box-shadow: 0 2px 12px -4px rgba(201, 162, 39, .35), inset 0 0 0 1px rgba(255,255,255,.5);
}
.smap-drawer-user.is-premium:hover { background: linear-gradient(135deg, #fffbe9 0%, #fbecc4 100%); }
.smap-drawer-user.is-premium .smap-drawer-user-av {
  background: linear-gradient(135deg, #f6cb45, #d99e16); border-color: #cf9410; color: #fff;
  box-shadow: 0 2px 6px -1px rgba(201,162,39,.5);
}
.smap-drawer-user.is-premium .smap-drawer-user-av svg.smap-fill { fill: #fff; }
.smap-drawer-user.is-premium .smap-drawer-user-tier { color: #9a7100; font-weight: 700; }
.smap-drawer-user-badge { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; color: #fff; padding: 3px 7px; border-radius: 999px; background: linear-gradient(135deg, #e0a800, #c98a00); box-shadow: 0 1px 3px rgba(201,138,0,.4); }

/* 하단탭 (지도페이지 전용, 데스크탑+모바일) */
.smap-bottomtab { display: flex; height: 56px; flex: 0 0 56px; border-top: 1px solid var(--border); background: #fff; align-items: center; justify-content: space-around; padding-bottom: env(safe-area-inset-bottom); }
.smap-bottomtab-item { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--faint); text-decoration: none; min-width: 64px; }
.smap-bottomtab-item span { font-size: 11px; font-weight: 600; }
.smap-bottomtab-item.is-active { color: var(--accent); }
.smap-bottomtab-item.is-active svg.smap-fill { fill: var(--accent); }

/* 상세 모달 / 슬라이드오버 */
.smap-modal-ov { position: fixed; inset: 0; background: rgba(15,23,42,.4); opacity: 0; visibility: hidden; transition: opacity .15s; z-index: 1100; }
.smap-modal-ov.open { opacity: 1; visibility: visible; }
.smap-modal { position: fixed; top: 0; right: 0; bottom: 0; width: 520px; max-width: 100%; background: #fff; transform: translateX(100%); transition: transform .2s ease; z-index: 1101; display: flex; flex-direction: column; box-shadow: -10px 0 30px -14px rgba(15,23,42,.35); }
.smap-modal.open { transform: translateX(0); }
.smap-modal-top { height: 52px; flex: 0 0 52px; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 6px; border-bottom: 1px solid var(--border); }
.smap-modal-close { width: 38px; height: 38px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--sub); border-radius: var(--r); flex-shrink: 0; }
.smap-modal-close:hover { background: var(--canvas); }
.smap-modal-top-title { font-size: 14px; font-weight: 700; color: var(--sub); }
.smap-modal-body { flex: 1; overflow-y: auto; padding: 22px 22px 10px; }
.smap-modal-body .smap-detail-name { font-size: 24px; }
.smap-modal-foot { flex: 0 0 auto; padding: 12px 22px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
#smap-modal-mini { height: 240px; border-radius: var(--r); border: 1px solid var(--border); overflow: hidden; margin-top: 4px; }

/* 가입유도 프롬프트 */
.smap-prompt { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -46%); width: 340px; max-width: 90%; background: #fff; border-radius: 12px; padding: 24px 22px; z-index: 1101; box-shadow: 0 20px 50px -20px rgba(15,23,42,.5); opacity: 0; visibility: hidden; transition: opacity .15s, transform .15s; text-align: center; }
.smap-prompt.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%); }
.smap-prompt .smap-modal-close { position: absolute; top: 8px; right: 8px; }

/* 확인 다이얼로그 (alert/confirm/prompt 대체 — shell.js smDialog) */
.smap-dialog-ov { position: fixed; inset: 0; background: rgba(15,23,42,.42); opacity: 0; visibility: hidden; transition: opacity .14s; z-index: 1200; }
.smap-dialog-ov.open { opacity: 1; visibility: visible; }
.smap-dialog { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -46%); width: 360px; max-width: calc(100vw - 36px); background: #fff; border-radius: 12px; padding: 22px 22px 18px; z-index: 1201; box-shadow: 0 20px 50px -20px rgba(15,23,42,.5); opacity: 0; visibility: hidden; transition: opacity .14s, transform .14s; }
.smap-dialog.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%); }
.smap-dialog-title { font-size: 16px; font-weight: 800; color: var(--ink); margin-bottom: 7px; letter-spacing: -.01em; }
.smap-dialog-msg { font-size: 13.5px; color: var(--sub); line-height: 1.65; white-space: pre-line; word-break: keep-all; }
.smap-dialog-input { width: 100%; margin-top: 14px; }
.smap-dialog-acts { display: flex; gap: 8px; margin-top: 20px; }
.smap-dialog-acts .smap-btn { flex: 1; height: 40px; }
.smap-btn-danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.smap-btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }

/* 단일세션 강제로그아웃 안내 */
.smap-kick { position: fixed; top: 0; left: 0; right: 0; z-index: 2000; background: #b42318; color: #fff; font-size: 13px; font-weight: 600; text-align: center; padding: 9px 14px; }
.smap-kick a { color: #fff; text-decoration: underline; }

/* 블랙 검색 */
.smap-black-search { display: flex; gap: 8px; margin-bottom: 8px; }
.smap-black-search .smap-input { flex: 1; }
.smap-black-note { font-size: 12px; color: var(--faint); line-height: 1.5; margin-bottom: 18px; }
.smap-black-count { font-size: 12.5px; color: var(--sub); font-family: var(--mono); margin-bottom: 12px; }
.smap-black-card { border: 1px solid var(--border); border-radius: 8px; padding: 15px 18px; margin-bottom: 12px; background: #fff; }
.smap-black-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.smap-black-name { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.smap-black-name .smap-tag { vertical-align: middle; }
.smap-black-date { font-size: 11.5px; color: var(--faint); font-family: var(--mono); margin-left: auto; white-space: nowrap; }
.smap-black-fields { display: flex; flex-direction: column; gap: 4px; font-size: 13px; margin-bottom: 10px; }
.smap-black-fields > div { display: flex; gap: 8px; }
.smap-black-fields .k { color: var(--sub); flex: 0 0 52px; }
.smap-black-fields .v { font-family: var(--mono); word-break: break-all; }
.smap-black-content { background: var(--canvas); border: 1px solid var(--border2); border-radius: 6px; padding: 10px 12px; font-size: 12.5px; line-height: 1.6; color: #334155; white-space: pre-wrap; word-break: break-all; }
mark.smap-hl { background: #fff3a0; color: inherit; padding: 0 1px; border-radius: 2px; }

@media (max-width: 759px) {
  .smap-header { flex-wrap: wrap; height: auto; min-height: 48px; padding: 8px 14px; row-gap: 8px; }
  .smap-mapbar-controls { order: 10; flex-basis: 100%; overflow-x: auto; padding-bottom: 2px; }
  .smap-modal { width: 100%; top: auto; height: 92%; transform: translateY(100%); border-top-left-radius: 14px; border-top-right-radius: 14px; }
  .smap-modal.open { transform: translateY(0); }
}

/* ===== 첫 접속 안내(랜딩 슬라이드) ===== */
.smap-welcome-body { margin: 0; height: 100dvh; overflow: hidden; background: #0b1220; font-family: Pretendard, system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
.smap-wel { position: relative; width: 100%; height: 100dvh; overflow: hidden; }

/* 상단 바 (브랜드 + 로그인/가입) */
.smap-wel-top { position: absolute; top: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 18px 14px; }
.smap-wel-brand { display: flex; align-items: center; gap: 9px; color: #fff; }
.smap-wel-logo { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.32); display: grid; place-items: center; color: #fff; }
.smap-wel-name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.smap-wel-auth { display: flex; gap: 8px; }
.smap-wel-auth a { height: 40px; padding: 0 18px; border-radius: 10px; display: inline-flex; align-items: center; font-weight: 700; font-size: 14.5px; transition: transform .12s; }
.smap-wel-auth a:active { transform: scale(.96); }
.smap-wel-auth .login { background: #fff; color: #1e3a8a; box-shadow: 0 6px 18px rgba(0,0,0,.22); }
.smap-wel-auth .signup { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.5); }

/* 슬라이드 */
.smap-wel-track { display: flex; width: 200%; height: 100%; transition: transform .7s cubic-bezier(.65,0,.35,1); will-change: transform; }
.smap-wel-slide { width: 50%; flex: 0 0 50%; height: 100%; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #fff; }
.smap-wel-slide.s-map { background: linear-gradient(135deg, #0b1e4d, #1d4ed8 60%, #3b82f6); }
.smap-wel-slide.s-ip  { background: linear-gradient(160deg, #053b38, #0e7490 58%, #06b6d4); }

/* 배경 SVG 아트 */
.smap-wel-bg { position: absolute; inset: 0; opacity: .55; pointer-events: none; color: #fff; }
.smap-wel-bg svg { width: 100%; height: 100%; display: block; }

/* 전경 */
.smap-wel-fg { position: relative; z-index: 2; text-align: center; padding: 0 26px; display: flex; flex-direction: column; align-items: center; }
.smap-wel-ico { width: clamp(84px,17vw,120px); height: clamp(84px,17vw,120px); border-radius: 28px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); display: grid; place-items: center; color: #fff; animation: smap-wel-float 3.6s ease-in-out infinite; box-shadow: 0 16px 44px rgba(0,0,0,.28); }
.smap-wel-ico svg { width: 48%; height: 48%; }
.smap-wel-h { margin: 28px 0 0; font-size: clamp(26px,5.4vw,42px); font-weight: 800; letter-spacing: -.03em; text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.smap-wel-p { margin: 13px 0 0; font-size: clamp(14px,2.6vw,17px); color: rgba(255,255,255,.88); line-height: 1.65; word-break: keep-all; max-width: 19em; text-shadow: 0 1px 10px rgba(0,0,0,.2); }

/* 점 인디케이터 (하단) */
.smap-wel-dots { position: absolute; left: 0; right: 0; bottom: calc(28px + env(safe-area-inset-bottom)); z-index: 10; display: flex; justify-content: center; gap: 8px; }
.smap-wel-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: rgba(255,255,255,.42); cursor: pointer; padding: 0; transition: width .3s, background .3s; }
.smap-wel-dots button.is-active { width: 24px; border-radius: 5px; background: #fff; }

/* SVG 모션 */
.wel-route { stroke-dasharray: 10 12; animation: wel-dash 3.2s linear infinite; }
@keyframes wel-dash { to { stroke-dashoffset: -176; } }
.wel-pin { transform-box: fill-box; transform-origin: center bottom; animation: wel-bob 2.8s ease-in-out infinite; }
.wel-pin.p2 { animation-delay: .5s; } .wel-pin.p3 { animation-delay: 1s; }
@keyframes wel-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.wel-radar { transform-box: fill-box; transform-origin: center; animation: wel-radar 3.4s ease-out infinite; }
@keyframes wel-radar { 0% { transform: scale(.25); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
.wel-node { transform-box: fill-box; transform-origin: center; animation: wel-node 2.6s ease-in-out infinite; }
.wel-node.n2 { animation-delay: .4s; } .wel-node.n3 { animation-delay: .8s; } .wel-node.n4 { animation-delay: 1.2s; } .wel-node.n5 { animation-delay: 1.6s; }
@keyframes wel-node { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes smap-wel-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

@media (max-width: 520px) {
  .smap-wel-auth a { height: 38px; padding: 0 14px; font-size: 13.5px; }
  .smap-wel-name { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .smap-wel-track { transition: none; }
  .smap-wel-ico, .wel-route, .wel-pin, .wel-radar, .wel-node { animation: none; }
}
