:root {
  --bg: #f7f1e9;
  --surface: #ffffff;
  --surface-2: #f5eee4;
  --text: #2a1e15;
  --muted: #7c6a5b;
  --border: #eadfd1;
  --primary: #7a4a2a;
  --primary-ink: #ffffff;
  --primary-soft: #f4e8dc;
  --owner: #c98a12;
  --owner-soft: #fdf2d6;
  --good: #2f7d4f;
  --good-soft: #e3f2e8;
  --bad: #b4432f;
  --bad-soft: #f8e4df;
  --shadow: 0 6px 24px rgba(43, 33, 24, 0.12);
  --radius: 12px;
  --topbar-h: 56px;
  --panel-w: 400px;
  --detail-w: 400px;
  color-scheme: light;
}

/* 나이트 모드. data-theme 은 js/theme-init.js 가 화면을 그리기 전에 정한다 (고른 적 없으면 기기 설정을 따른다) */
:root[data-theme="dark"] {
  --bg: #1c1814;
  --surface: #26211c;
  --surface-2: #2f2923;
  --text: #f1eae0;
  --muted: #a99a8a;
  --border: #3a322b;
  --primary: #d9a26b;
  --primary-ink: #1c1814;
  --primary-soft: #3a2d22;
  --owner: #e8b54a;
  --owner-soft: #3a3020;
  --good: #6cc38f;
  --good-soft: #1f3327;
  --bad: #e58a78;
  --bad-soft: #3a2420;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: var(--primary); }

/* ---------- 상단 바 ---------- */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); flex-shrink: 0; }
/* 앱 아이콘 (web/img/icon). 그림에 둥근 모서리가 들어 있다 */
.brand-mark { width: 32px; height: 32px; display: block; object-fit: contain; flex: none; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.search { flex: 1; max-width: 460px; position: relative; }
.search input {
  width: 100%; height: 38px; padding: 0 44px 0 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2); outline: none;
}
.search input:focus { border-color: var(--primary); background: var(--surface); }
.search-btn {
  position: absolute; right: 4px; top: 4px; width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: var(--primary); color: var(--primary-ink); display: grid; place-items: center;
}
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; width: max(100%, 380px); max-height: min(70vh, 560px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  z-index: 60; padding: 4px 0; overscroll-behavior: contain;
}
.sr-group h4 { margin: 0; padding: 10px 14px 4px; font-size: 12px; color: var(--muted); font-weight: 700; }
.sr-item {
  display: grid; gap: 2px; width: 100%; text-align: left; border: 0; background: none; padding: 8px 14px; color: var(--text);
}
.sr-item:hover, .sr-item:focus-visible { background: var(--surface-2); outline: none; }
.sr-name { font-weight: 700; font-size: 14.5px; }
.sr-branch { font-weight: 500; color: var(--muted); }
.sr-sub { font-size: 12.5px; color: var(--muted); }
.sr-badge {
  display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 700;
  background: var(--owner-soft); color: var(--owner); vertical-align: 1px;
}
.sr-empty { padding: 14px; font-size: 13.5px; color: var(--muted); }
.sr-notice { margin: 6px 14px; font-size: 12px; color: var(--owner); font-weight: 600; }
.sr-foot { margin: 6px 14px 4px; font-size: 11px; color: var(--muted); }
.account { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.account .who {
  font-weight: 600; font-size: 14px; border: 0; background: none; padding: 4px 6px; border-radius: 8px;
  max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account .who:hover { background: var(--surface-2); color: var(--primary); }
.badge-owner {
  display: inline-flex; align-items: center; gap: 2px; padding: 1px 7px; border-radius: 999px;
  background: var(--owner-soft); color: var(--owner); font-size: 12px; font-weight: 700;
}
/* 👑 왕관은 글자보다 낮아 보여서 2px 올린다 (dom.js 의 crown()) */
.crown { position: relative; top: -2px; }

/* ---------- 버튼 ---------- */
.btn {
  height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; color: var(--text); white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary); filter: brightness(1.08); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { color: var(--bad); }
.btn-solid-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-solid-danger:hover { background: var(--bad); filter: brightness(1.08); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* ---------- 레이아웃 ---------- */
.layout { display: flex; height: calc(100% - var(--topbar-h)); position: relative; }
.panel {
  width: var(--panel-w); flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; min-height: 0; position: relative; z-index: 10;
}
.panel-view { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.panel-grip { display: none; }
.map-wrap { flex: 1; position: relative; min-width: 0; isolation: isolate; } /* 마커가 목록 패널 위로 올라오지 않게 */
/* MapLibre 의 .maplibregl-map { position: relative } 보다 우선하도록 선택자를 구체적으로 둔다 */
.map-wrap > .map { position: absolute; inset: 0; z-index: 0; background: var(--surface-2); } /* 지도 버튼·안내가 마커 위에 오도록 */
.map-inner { width: 100%; height: 100%; } /* 지도 엔진이 그리는 요소. 엔진이 넣는 position 스타일과 상관없이 크기를 채운다 */

/* ---------- 탭 ---------- */
.tabs { display: flex; border-bottom: 1px solid var(--border); padding: 0 8px; flex-shrink: 0; }
.tab {
  flex: 1; height: 46px; border: 0; background: none; font-weight: 700; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--primary); }
.tab-panel { flex: 1; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }

/* ---------- 필터 ---------- */
/* 검색필터: 목록과 구분되게 테두리 있는 흰 상자로 띄우고, 맨 위에 옅은 갈색 제목 띠를 둔다 */
.filters {
  margin: 10px 10px 4px; padding: 0 12px 8px; border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border)); border-radius: 14px;
  background: var(--surface); display: grid; gap: 8px; overflow: hidden;
}
.filters-head {
  display: flex; align-items: center; gap: 8px; margin: 0 -12px 2px; padding: 8px 12px;
  background: color-mix(in srgb, var(--primary-soft) 70%, var(--surface)); border-bottom: 1px solid color-mix(in srgb, var(--primary) 14%, var(--border));
}
.filters-title { margin: 0; font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.filters-title svg { flex: none; color: var(--primary); }
.filters-count { font-size: 12px; font-weight: 700; color: var(--primary); }
.filters-head .spacer { flex: 1; }
/* 휴대폰: 제목을 눌러 접고 편다. 접으면 제목 띠만 남는다 */
.filters-toggle { display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 0; font: inherit; color: inherit; }
.filters-toggle svg { flex: none; color: var(--primary); }
.filters-caret { font-size: 12px; color: var(--muted); }
.filters.is-collapsed { padding-bottom: 0; }
.filters.is-collapsed .filters-head { margin-bottom: 0; border-bottom: 0; }
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* 보기 방식 전환: 주변 카페 모두 / 리뷰된 카페만 (상단 검색창 오른쪽) */
.view-scope { display: flex; flex-shrink: 0; padding: 3px; gap: 2px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.view-scope button { height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: none; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.view-scope button:hover { color: var(--text); background: var(--surface-2); }
/* 고른 쪽을 확실히: 갈색 바탕 + 흰 글씨 */
.view-scope button[aria-checked="true"] { background: var(--primary); color: var(--primary-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); }
.view-scope .scope-short { display: none; }
.filter-label { font-size: 12px; font-weight: 700; color: var(--muted); width: 54px; flex-shrink: 0; }
/* 주차 중분류 줄: 대분류 줄 아래에 들여서 딸린 줄로 보이게 */
.filter-sub { padding-left: 14px; }
.filter-sub .filter-label { width: 54px; font-weight: 600; }
/* 카공·커피 별점 고르기: 칩 모양 안에 별 다섯 개. 누른 별까지 노랗게 ("★N 이상") */
.star-filter {
  height: 30px; padding: 0 10px 0 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--text);
}
.star-filter.is-on { border-color: #e8a400; background: color-mix(in srgb, #e8a400 10%, var(--surface)); }
.star-filter-stars { display: inline-flex; }
.star-btn { border: 0; background: none; padding: 0 1px; font-size: 15px; line-height: 1; color: var(--border); cursor: pointer; }
.star-btn.on { color: #e8a400; }
/* 마우스를 올린 별까지 미리 노랗게 */
.star-filter-stars:hover .star-btn { color: #e8a400; }
.star-filter-stars .star-btn:hover ~ .star-btn { color: var(--border); }
.star-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; border-radius: 4px; }
.star-filter-hint { font-size: 12px; color: var(--muted); }
.chip {
  height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text);
  display: inline-flex; align-items: center; gap: 4px;
}
.chip:hover { border-color: var(--primary); }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.chip.chip-owner[aria-pressed="true"] { background: var(--owner); border-color: var(--owner); color: #fff; }
.filters-more { justify-self: start; border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 600; padding: 2px 0; }
.filters-reset { border: 0; background: none; color: var(--primary); font-size: 13px; font-weight: 600; padding: 2px 0; }
.filter-foot { display: flex; justify-content: space-between; align-items: center; }

/* ---------- 목록 ---------- */
.list-status { padding: 10px 16px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--border); }
.list-status strong { color: var(--text); }
.list-status.warn { background: var(--owner-soft); color: var(--text); }
.cafe-list, .reviewed-list, .review-list { list-style: none; margin: 0; padding: 0; }
/* 지도 속 카페·운영자 리뷰 목록: 카페마다 테두리 있는 카드로 띄워 서로 구분되게 한다 */
.cafe-list, .reviewed-list { padding: 8px 10px 10px; display: grid; gap: 8px; }
.cafe-item {
  padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(60, 40, 20, 0.06); cursor: pointer; display: grid; gap: 4px;
}
.cafe-item:hover { background: var(--surface-2); border-color: var(--muted); }
.cafe-item.is-active { background: var(--surface-2); border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
/* 목록 카드의 사진: 최근 3장을 작게 */
/* 3칸이 카드 너비를 채운다. 칸은 정사각형(1:1)이고, 사진은 늘리지 않고 가운데를 맞춰 넘치는 부분만 가린다 */
.cafe-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 4px; }
.cafe-thumbs img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.cafe-item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.cafe-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; font-weight: 700; }
.cafe-title .branch { font-weight: 500; color: var(--muted); font-size: 13px; }
/* 목록: 카페 이름 오른쪽의 운영자 정보 (👑 운영자 추천, 추천을 켜지 않았으면 👑 만) */
.owner-info { align-self: center; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.owner-info .study-pick { padding: 1px 8px; font-weight: 700; white-space: nowrap; }
/* 목록 둘째 줄: 평균 카공·커피 별점(노란색)과 리뷰 수 */
.cafe-avgs { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12.5px; color: var(--muted); }
.cafe-avgs b { color: #e8a400; }
.cafe-sub { font-size: 12.5px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  font-size: 12px; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-weight: 600;
}
.tag.good { background: var(--good-soft); color: var(--good); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.owner { background: var(--owner-soft); color: var(--owner); }
/* 목록 카드의 태그는 색을 빼서 차분하게 보여 준다 */
.cafe-item .tags .tag { background: var(--surface-2); color: var(--muted); }
/* 마우스를 올리거나 고른 줄은 배경이 --surface-2 라 태그가 묻히므로 태그를 밝게 뒤집는다 */
.cafe-item:hover .tags .tag, .cafe-item.is-active .tags .tag { background: var(--surface); }
.empty { padding: 32px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.empty-hint { margin: 10px 0 0; font-size: 12.5px; }

/* ---------- 상세 ---------- */
.detail { overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
/* 카페 상세 머리말(이름·주소·버튼): 운영자 리뷰와 카공 정보가 빨리 보이도록 얇게 */
.detail-head { padding: 10px 16px 10px; border-bottom: 1px solid var(--border); display: grid; gap: 4px; }
.back { justify-self: start; border: 0; background: none; color: var(--muted); font-weight: 600; padding: 4px 0; font-size: 14px; }
.detail-head h2 { margin: 0; font-size: 19px; letter-spacing: -0.02em; line-height: 1.3; }
.detail-head h2 .branch { font-size: 15px; color: var(--muted); font-weight: 600; margin-left: 4px; }
/* 카페 이름 오른쪽: 위치 수정 */
.detail-title { display: flex; align-items: center; gap: 8px; }
.detail-title h2 { min-width: 0; }
.loc-fix-btn { flex: none; font-weight: 600; color: var(--muted); }
.loc-fix-btn:hover { color: var(--primary); border-color: var(--primary); }
.detail-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.detail-actions .btn { height: 34px; padding: 0 12px; font-size: 13.5px; }
.section { padding: 16px; border-bottom: 1px solid var(--border); }
.section h3 { margin: 0 0 10px; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.section h3 .count { color: var(--muted); font-weight: 600; font-size: 13px; }
.section h3 .spacer { flex: 1; }
/* 카공 정보: 3칸씩 촘촘하게 */
/* 카공 정보: 별점 한 줄 + '이름 값' 한 줄짜리 작은 칸들 (높이를 줄이려고 값이 없는 항목은 빼고 줄바꿈으로 채운다).
   관리 화면도 .stat 을 쓰므로(admin.css) 여기 규칙은 .stats 안으로 좁힌다 */
.stats-section h3 { margin-bottom: 6px; }
.stat-scores { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.stat-score { white-space: nowrap; }
.stats { display: flex; flex-wrap: wrap; gap: 5px; }
.stats .stat {
  position: relative; display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 9px; border: 0; border-radius: 8px;
  background: var(--surface-2); font-size: 12.5px; line-height: 1.5; text-align: left; max-width: 100%;
}
.stats .stat-label { color: var(--muted); font-weight: 600; white-space: nowrap; }
.stats .stat-value { font-weight: 700; word-break: keep-all; overflow-wrap: break-word; }
.stats .stat-value.good { color: var(--good); }
.stats .stat-value.bad { color: var(--bad); }
/* 추가 정보가 있는 칸: ⓘ 표시. 마우스를 올리거나(:hover), 키보드로 가거나(:focus-visible), 누르면(.is-open) 말풍선이 뜬다 */
.stat.has-more { cursor: pointer; }
.stat-more { color: var(--muted); font-size: 12px; }
.stat-pop {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 5; width: max-content; max-width: min(280px, 78vw);
  padding: 9px 12px; border-radius: 10px; background: var(--text); color: var(--surface); box-shadow: var(--shadow);
  font-size: 12.5px; font-weight: 500; line-height: 1.5; white-space: normal; word-break: keep-all;
}
.stat.pop-right .stat-pop { left: auto; right: 0; }
/* 말풍선을 연 칸은 옆 칸들보다 위에 그린다. 칸마다 마우스를 올리면 움직이는 효과(theme.css)가 있어
   각자 그리는 층이 생기므로, 그대로 두면 뒤에 오는 칸이 말풍선을 덮는다 */
.stats .stat.has-more:hover, .stats .stat.has-more:focus-visible, .stats .stat.has-more.is-open { z-index: 10; }
/* 칸 아래 보이는 자리가 모자라면 말풍선을 칸 위로 띄운다 (detail.js 가 pop-up 을 붙인다) */
.stat.pop-up .stat-pop { top: auto; bottom: calc(100% + 6px); }
/* 크기를 재는 동안만 보이지 않게 펼친다 */
.stat.is-measuring .stat-pop { display: grid; visibility: hidden; animation: none; }
.stat.has-more:hover .stat-pop, .stat.has-more:focus-visible .stat-pop, .stat.has-more.is-open .stat-pop { display: grid; gap: 2px; }
.stat-pop strong { font-weight: 700; }
.stat-pop strong:not(:first-child) { margin-top: 6px; }
.stats-note { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.detail-close { display: none; }

/* 넓은 화면(1100px 이상): 네이버 지도처럼 목록은 그대로 두고 그 오른쪽에 상세 패널을 펼쳐 지도 위에 띄운다.
   목록 + 상세를 펼쳐도 지도가 300px 이상 남는 폭이다. 이보다 좁으면 상세가 목록 자리를 대신한다. */
@media (max-width: 1099px) {
  .panel.has-detail > #view-home { display: none; }
}
@media (min-width: 1100px) {
  /* 목록과 붙지 않게 띄운 둥근 카드로 보여 준다 (목록과 한눈에 구분되게) */
  .layout { --detail-gap: 10px; --detail-edge: calc(var(--detail-w) + var(--detail-gap) * 2); }
  .panel > #view-detail {
    position: absolute; top: var(--detail-gap); bottom: var(--detail-gap); left: calc(100% + var(--detail-gap)); width: var(--detail-w);
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
    box-shadow: 0 10px 32px rgba(43, 33, 24, 0.2), 0 2px 6px rgba(43, 33, 24, 0.08);
    animation: detail-in 0.18s ease-out;
  }
  .panel > #view-detail .back { display: none; }
  .detail-close {
    display: grid; place-items: center; position: absolute; top: 8px; right: 8px; z-index: 1;
    width: 36px; height: 36px; border: 0; border-radius: 50%; background: none;
    color: var(--muted); font-size: 26px; line-height: 1;
  }
  .detail-close:hover { background: var(--surface-2); color: var(--text); }
  .detail-close:focus-visible { outline: 2px solid var(--primary); }
  .panel > #view-detail .detail-head { padding-top: 12px; padding-right: 52px; } /* 닫기 버튼 자리 */
  /* 상세 패널이 지도 왼쪽을 덮는 동안 지도 출처 표시가 가려지지 않게 보이는 폭 안에서 줄바꿈한다 */
  .layout:has(.panel.has-detail) .maplibregl-ctrl-bottom-right { max-width: calc(100% - var(--detail-edge) - 16px); }
  /* 상세 패널에 가려지지 않은 지도 영역의 가운데에 둔다 */
  .layout:has(.panel.has-detail) .map-search-btn { left: calc(var(--detail-edge) + (100% - var(--detail-edge)) / 2); }
  /* 데이터 출처 안내도 상세 패널 뒤로 숨지 않게 옮긴다 */
  .layout:has(.panel.has-detail) .map-notice { left: calc(var(--detail-edge) + 8px); }
}
@keyframes detail-in {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .panel > #view-detail, .map-search-btn { animation: none; }
}

.study-pick { background: var(--good-soft); color: var(--good); border-radius: 999px; padding: 2px 10px; }
.study-pick-check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; cursor: pointer; flex-wrap: wrap; }
.study-pick-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.study-pick-check .field-hint { font-weight: 500; }
.owner-fields-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.meta-line { font-size: 12px; color: var(--muted); }

.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photo {
  aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 0; padding: 0; background: var(--surface-2);
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { border: 0; background: none; padding: 4px 10px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }

.review { padding: 12px 0; border-bottom: 1px solid var(--border); display: grid; gap: 6px; }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.review-head .nick { font-weight: 700; }
.review-head .study-pick { padding: 1px 8px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.review-head .date { color: var(--muted); margin-left: auto; }
.review .text { margin: 0; font-size: 14.5px; }
.stars { color: var(--owner); letter-spacing: 1px; white-space: nowrap; }
.stars .star-off { color: var(--border); } /* 빈 별: 채운 별과 확실히 구분되게 흐린 색 */
/* 커피맛 별점 칩: 고르면 바탕(갈색)과 별(금색)이 겹쳐 안 보이므로 별을 바탕과 대비되는 색으로 */
.chip-stars[aria-pressed="true"] .stars { color: var(--primary-ink); }
/* 종합 카공 별점: 리뷰 창 오른쪽 아래에 조금 크게, 다른 항목과 다른 금색 상자로 */
.review-form .rating-field {
  margin-top: 4px; padding: 10px 12px; border-radius: 12px;
  background: var(--owner-soft); border: 1px solid color-mix(in srgb, var(--owner) 45%, transparent);
}
.review-form .rating-field .chip { background: var(--surface); border-color: color-mix(in srgb, var(--owner) 35%, var(--border)); }
.review-form .rating-field .chip[aria-pressed="true"] { background: var(--owner); border-color: var(--owner); }
@media (min-width: 1100px) {
  body.is-picking-location .panel > #view-detail { visibility: hidden; } /* 위치를 고르는 동안 상세 카드가 지도 가운데를 가리지 않게 */
}
.review-form .parking-sub { display: grid; gap: 4px; }
.review-form .parking-amount { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.review-form .parking-amount input { margin: 0; accent-color: var(--primary); }
.review-form .chip:disabled { opacity: 0.45; cursor: default; }
.review-form .note-inline { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 2px; }
.review-form .note-inline .field-label { white-space: nowrap; }
.review-form .rating-field .field-label { font-size: 13.5px; color: var(--owner); }
.review-form .rating-field .chip { height: 32px; font-size: 14px; }
/* 모든 항목을 고르기 전에는 종합 카공 별점을 잠가 둔다 */
.review-form .rating-field.is-locked .chip { opacity: 0.4; cursor: not-allowed; }
.rating-hint { margin: 0; font-size: 12px; color: var(--muted); }
.rating-hint:empty { display: none; }
.rating-hint.is-ready { color: var(--owner); font-weight: 700; }
.rating-hint.is-warn { color: var(--bad); font-weight: 700; }

/* ---------- 최근 리뷰 카페 탭 ---------- */
.reviewed-intro {
  margin: 0; padding: 12px 16px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--border);
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
}
.reviewed-back { font-size: 13px; }
.reviewed-who { color: var(--text); font-weight: 700; }
/* 카드는 지도 속 카페 목록과 같다 (.cafe-item). 쓴 사람 줄과 한줄리뷰(두 줄까지)를 이름 아래에 둔다 */
.reviewer-line { font-size: 12.5px; color: var(--muted); }
.reviewer-link { font-size: 12.5px; }
.reviewed-list .excerpt {
  margin: 0; font-size: 13.5px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- 지도 위 요소 ---------- */
.map-banner {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 5;
  background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center;
}
.map-banner.info { background: var(--surface); color: var(--text); }
/* 지도를 움직이면 아래쪽 가운데에 뜨는 "현 지도에서 검색" 버튼 */
.map-search-btn {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 6;
  display: inline-flex; align-items: center; gap: 7px; height: 46px; padding: 0 22px 0 18px;
  border: 0; border-radius: 999px; background: #1565d8; color: #fff;
  font-size: 16px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(21, 101, 216, 0.35), 0 2px 6px rgba(0, 0, 0, 0.18);
  animation: search-btn-in 0.18s ease-out;
}
.map-search-btn:hover { background: #0f57c2; }
.map-search-btn:active { transform: translateX(-50%) scale(0.97); }
.map-search-btn:focus-visible { outline: 3px solid #9cc2ff; outline-offset: 2px; }
.map-search-btn svg { flex-shrink: 0; }
.map-search-btn:disabled {
  background: #4a4d52; font-size: 14px; font-weight: 700; cursor: default;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.map-search-btn:disabled svg { display: none; }
@keyframes search-btn-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.map-fab {
  position: absolute; right: 10px; bottom: 44px; z-index: 5; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow);
  display: grid; place-items: center;
}
/* 미등록 카페 등록: 내 위치 버튼 왼쪽 */
.map-fab-add { right: 62px; width: auto; padding: 0 14px 0 11px; display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.map-fab-add:hover { border-color: var(--primary); color: var(--primary); }
.map-wrap.is-picking .map-fab-add { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.map-wrap.is-picking .map-search-btn { display: none; }
/* 위치 고르기: 지도 가운데 고정 핀 + 아래쪽 안내 */
/* 카페 핀(갈색·금색)·검색 장소 핀(빨강)과 겹치지 않는 선명한 주황. 고르는 동안 다른 핀은 흐리게 한다 */
.pick-pin {
  --pick: #ff5a00;
  position: absolute; left: 50%; top: 50%; z-index: 6; pointer-events: none; transform: translate(-50%, -100%);
  display: grid; justify-items: center; animation: pick-drop 0.3s ease-out;
}
.pick-pin::after { content: ""; width: 4px; height: 22px; background: var(--pick); border-radius: 0 0 2px 2px; box-shadow: 0 0 0 1.5px #fff; }
.pick-pin-head {
  width: 46px; height: 46px; border-radius: 50%; background: var(--pick); border: 4px solid #fff; display: grid; place-items: center;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.pick-pin-head::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.pick-pin-spot {
  position: absolute; left: 50%; bottom: 0; width: 12px; height: 12px; transform: translate(-50%, 50%); border-radius: 50%;
  background: var(--pick); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.pick-pin-spot::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 3px solid var(--pick);
  animation: pick-pulse 1.4s ease-out infinite;
}
@keyframes pick-drop { from { transform: translate(-50%, -150%); opacity: 0; } }
@keyframes pick-pulse { from { transform: scale(1); opacity: 0.9; } to { transform: scale(4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pick-pin, .pick-pin-spot::after { animation: none; } }
.map-wrap.is-picking .pin-wrap { opacity: 0.45; }
.pick-bar {
  position: absolute; left: 50%; bottom: 100px; transform: translateX(-50%); z-index: 7; width: min(420px, calc(100% - 24px));
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px;
  display: grid; gap: 4px; font-size: 14px;
}
.pick-bar span { color: var(--muted); font-size: 13px; }
.pick-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.modal-add-cafe { max-width: 440px; }
.add-cafe-form { display: grid; gap: 12px; }
.add-cafe-form .field input:disabled { background: color-mix(in srgb, var(--border) 55%, var(--surface)); border-style: dashed; color: var(--muted); cursor: not-allowed; }
.naver-find { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-naver-find { border-color: #03c75a; color: #03a14a; font-weight: 700; flex: none; }
.btn-naver-find:not(:disabled):hover { background: #03c75a; color: #fff; }
.naver-find .field-hint { flex: 1; min-width: 180px; }
/* 링크 복사 방법 안내 (항상 펼침). 그림은 web/img 의 네이버 지도 캡처, 없으면 비슷한 모양을 그린다 */
.naver-guide { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 13px; display: grid; gap: 6px; }
.naver-guide-title { font-size: 13px; color: var(--muted); }
.naver-guide ol { margin: 0; padding-left: 20px; display: grid; gap: 3px; }
.guide-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
@media (max-width: 420px) { .guide-figs { grid-template-columns: 1fr; } }
.guide-fig { margin: 0; display: grid; grid-template-rows: 1fr auto; gap: 4px; }
.guide-fig figcaption { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.guide-pic { position: relative; }
.guide-pic img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; }
/* 캡처 속에서 누를 버튼 자리. copy: 공유하기 창 오른쪽 아래 "복사" */
.guide-mark { position: absolute; border: 3px solid #ff5a00; border-radius: 8px; box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.25); pointer-events: none; }
.guide-mark.copy { left: 80%; top: 82%; width: 18%; height: 16%; }
.guide-mock {
  min-height: 100%; display: grid; gap: 8px; align-content: center; justify-items: center; padding: 12px 10px;
  background: #fff; color: #222; border: 1px solid var(--border); border-radius: 10px; font-size: 12px;
}
.guide-mock .is-target { outline: 3px solid #ff5a00; outline-offset: 1px; border-radius: 6px; }
.place-mock-sub { color: #777; font-size: 11px; }
.place-mock-actions { display: flex; gap: 8px; }
.place-mock-actions span { display: grid; justify-items: center; gap: 2px; padding: 3px 4px; font-size: 11px; color: #444; }
.place-mock-actions i { font-style: normal; font-size: 15px; line-height: 1; }
.share-mock-row { width: 100%; display: flex; border: 1px solid #ddd; border-radius: 8px; font-size: 11.5px; }
.share-mock-url { flex: 1; min-width: 0; padding: 7px 8px; color: #1a5fd0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-mock-copy { padding: 7px 10px; background: #f3f3f3; border-left: 1px solid #ddd; font-weight: 700; }
.link-btn { border: 0; background: none; padding: 0; color: var(--primary); font: inherit; font-weight: 700; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.user-cafe-note { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.removal-pending { color: var(--owner); font-weight: 700; }
.map-notice {
  position: absolute; left: 8px; bottom: 3px; margin: 0; z-index: 5; font-size: 11px; color: var(--muted);
  background: color-mix(in srgb, var(--surface) 85%, transparent); padding: 2px 8px; border-radius: 6px;
  white-space: nowrap; /* 한 줄로. 오른쪽 아래 네이버 로고·저작권 표시와 같은 줄에 둔다 */
}
.map-fallback {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; text-align: center; padding: 24px;
  color: var(--muted); font-size: 14px;
}
.map-fallback strong { color: var(--text); font-size: 16px; }
.map-fallback code { background: var(--surface); padding: 1px 6px; border-radius: 4px; }

/* 지도 마커 (네이버 지도 HTML 마커 안에 들어간다) */
.pin {
  --pin: #8a7b6d;
  width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--pin); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  display: grid; place-items: center; cursor: pointer; transition: transform 0.1s;
}
.pin > span { transform: rotate(45deg); color: #fff; font-size: 12px; font-weight: 800; line-height: 1; }
.pin.reviewed { --pin: #6b4226; }
.pin.owner { --pin: #c98a12; }
.pin.selected { transform: rotate(-45deg) scale(1.3); border-color: #2b2118; }
.pin.place { --pin: #d93025; width: 30px; height: 30px; }
/* 겹친 카페 묶음 (map.js): 카페 수를 적은 동그라미. 핀 숫자(리뷰 수)와 헷갈리지 않게 모양을 달리한다.
   색은 묶음 안에서 가장 중요한 카페를 따른다: 운영자 리뷰(금색) > 리뷰 있음(갈색) > 나머지(회색) */
.pin-wrap.cluster-wrap { width: 40px; height: 40px; display: grid; place-items: center; }
.cluster {
  --pin: #8a7b6d;
  min-width: 32px; height: 32px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center;
  background: var(--pin); border: 2px solid #fff; color: #fff; font-size: 13px; font-weight: 800; line-height: 1;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--pin) 30%, transparent), 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer; transition: transform 0.12s;
}
.cluster:hover { transform: scale(1.12); }
.cluster.reviewed { --pin: #7a4a2a; }
.cluster.owner { --pin: #d9980f; }
/* 지도 버튼·출처 표시가 카페 핀(z-index 10~200)에 가리지 않게 */
.maplibregl-ctrl-top-left, .maplibregl-ctrl-top-right, .maplibregl-ctrl-bottom-left, .maplibregl-ctrl-bottom-right { z-index: 300; }
/* 마커 바깥 요소. MapLibre 는 이 요소를 position: absolute 로 배치하므로 CSS 로 position 을 주지 않는다.
   (네이버 엔진은 요소에 직접 relative 를 준다. 이름표는 이 요소를 기준으로 놓인다) */
.pin-wrap { width: 26px; height: 26px; cursor: pointer; }
.me-dot {
  width: 16px; height: 16px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(26, 115, 232, 0.25), 0 1px 4px rgba(0, 0, 0, 0.35);
}
.pin-label {
  position: absolute; left: 50%; top: -30px; transform: translateX(-50%); white-space: nowrap;
  background: #2b2118; color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px;
  pointer-events: none;
}

/* ---------- 모달 ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20, 14, 8, 0.5); z-index: 100;
  display: grid; place-items: center; padding: 16px;
}
.modal {
  background: var(--surface); border-radius: 16px; width: 100%; max-width: 480px;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.modal-head { display: flex; align-items: center; padding: 16px 18px 8px; gap: 8px; }
.modal-head h3 { margin: 0; font-size: 18px; flex: 1; }
.modal-close { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); padding: 4px; }
.modal-body { padding: 8px 18px 16px; overflow-y: auto; display: grid; gap: 16px; min-height: 0; flex: 1 1 auto; overscroll-behavior: contain; }
.modal-foot { padding: 12px 18px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.modal-foot .grow { flex: 1; }
/* 사진 크게 보기: 사진을 화면 안에 맞춰 스크롤 없이 보여 주고, 좌우 화살표로 넘긴다 */
.modal-photo { max-width: 960px; background: #000; color: #fff; }
.modal-photo .modal-head h3, .modal-photo .modal-close, .modal-photo .meta-line { color: #fff; }
.modal-photo .modal-body { padding: 0; overflow: hidden; display: block; }
.modal-photo .modal-foot { border-top-color: rgba(255, 255, 255, 0.15); align-items: center; }
.photo-view { position: relative; display: flex; align-items: center; justify-content: center; }
/* 머리말·바닥글·바깥 여백을 뺀 높이 안에 들어오게 한다 */
.photo-view img { display: block; max-width: 100%; max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); object-fit: contain; }
.photo-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 10px;
  background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 34px; line-height: 1; padding: 0 0 6px;
}
.photo-nav:hover { background: rgba(0, 0, 0, 0.7); }
/* 창을 열면 첫 화살표에 포커스가 가는데, 그때 생기는 테두리(포커스 표시)는 사진을 가려 보여 주지 않는다 */
.photo-nav:focus, .photo-nav:focus-visible { outline: none; }
.photo-nav.prev { left: 8px; }
.photo-nav.next { right: 8px; }

.field { display: grid; gap: 6px; }
.field > label, .field-label { font-size: 13px; font-weight: 700; }
.field-hint { font-size: 12px; color: var(--muted); font-weight: 500; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="number"],
.field textarea, .field select, .tier-row input, .tier-row select {
  width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; background: var(--surface); outline: none;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .tier-row input:focus, .tier-row select:focus { border-color: var(--primary); }
.options { display: flex; flex-wrap: wrap; gap: 6px; }
.counter { font-size: 12px; color: var(--muted); text-align: right; }
.tier-row { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 6px; align-items: center; font-size: 13px; }
.tier-row .x { border: 0; background: none; color: var(--muted); font-size: 18px; padding: 0 4px; }
.music-note { width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; background: var(--surface); outline: none; }
.music-note:focus { border-color: var(--primary); }
.naver-map-icon { flex-shrink: 0; margin-left: -3px; }
/* 네이버지도에서 보기: 흰 버튼이면 묻히고 진한 초록이면 너무 튀어서, 연한 초록 바탕에 짙은 초록 글자로 둔다 */
.btn.btn-naver-map {
  background: color-mix(in srgb, #03c75a 12%, var(--surface)); border-color: color-mix(in srgb, #03c75a 35%, var(--surface));
  color: color-mix(in srgb, #03a14a 80%, var(--text));
}
.btn.btn-naver-map:hover { background: color-mix(in srgb, #03c75a 20%, var(--surface)); border-color: color-mix(in srgb, #03c75a 50%, var(--surface)); }
/* 리뷰 쓰기 창: 넓게 두 칸으로 나눠 스크롤 없이 한 화면에 */
.modal-review { max-width: 880px; }
.review-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 28px; align-items: start; }
.rf-col { display: grid; gap: 9px; min-width: 0; align-content: start; }
.rf-wide { grid-column: 1 / -1; }
/* 리뷰와 함께 올릴 사진: 고른 사진을 작게 보여 주고 × 로 뺀다 */
.rf-photos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rf-photo { position: relative; width: 52px; height: 52px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.rf-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rf-photo .x { position: absolute; top: 0; right: 0; width: 20px; height: 20px; border: 0; border-radius: 0 0 0 8px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 14px; line-height: 1; padding: 0; }
.review-form .field { gap: 5px; }
.review-form .field-label { font-size: 12.5px; }
.review-form .field-inline { grid-template-columns: 62px minmax(0, 1fr); align-items: center; gap: 8px; }
.review-form .options > .music-note { flex: 1 1 110px; min-width: 0; height: 28px; padding: 0 10px; font-size: 13px; }
.review-form .label-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 700; }
.review-form .label-row .counter { font-weight: 400; }
.modal-review .modal-head { padding: 12px 18px 4px; }
.modal-review .modal-body { padding-bottom: 12px; }
.modal-review .modal-foot { padding: 10px 18px 12px; align-items: center; }
.rf-foot-hint { margin: 0; }
.review-form .chip { height: 28px; padding: 0 10px; font-size: 12.5px; }
.review-form .options { gap: 5px; }
.review-form .tier-row { gap: 5px; }
.tier-row input.is-any::placeholder { color: var(--text); font-weight: 700; opacity: 1; }
.review-form .tier-row input, .review-form .tier-row select { padding: 6px 10px; }
.review-form .field input[type="text"] { padding: 7px 11px; }
.review-form .field textarea { min-height: 52px; }
.review-form .owner-fields { padding: 10px 12px; gap: 8px; }
@media (max-width: 767px) {
  .review-form { grid-template-columns: minmax(0, 1fr); } /* 휴대폰은 한 칸 (화면이 짧아 스크롤은 남는다) */
  .rf-foot-hint { visibility: hidden; } /* 버튼 자리가 좁다 */
}
.owner-fields { border: 1px dashed var(--owner); border-radius: 12px; padding: 12px; display: grid; gap: 12px; background: var(--owner-soft); }
.form-error { color: var(--bad); font-size: 13px; margin: 0; white-space: pre-line; }
.auth-switch { font-size: 13px; color: var(--muted); text-align: center; margin: 0; }
.auth-switch button { border: 0; background: none; color: var(--primary); font-weight: 700; padding: 0; }

/* 로그인 창: 네이버 로그인 버튼 중심 */
.modal-login { max-width: 400px; }
.login-box { display: grid; gap: 14px; padding-bottom: 4px; }
.login-reason { margin: 0; text-align: center; font-weight: 700; font-size: 15px; }
.btn-naver { /* 네이버 로그인 버튼 가이드: 네이버 초록 바탕 + 흰 N 로고 */
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 50px; border-radius: 10px;
  background: #03c75a; color: #fff; font-size: 16px; font-weight: 800; text-decoration: none;
}
.btn-naver:hover { filter: brightness(0.96); }
.btn-naver:focus-visible { outline: 3px solid #9be3bd; outline-offset: 2px; }
.naver-n { display: grid; place-items: center; }
.login-easy { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--good-soft); color: var(--good); text-align: center; font-size: 14px; }
.login-notice { margin: 0; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.5; }
.login-notice a { color: inherit; font-weight: 700; }

/* ---------- 신고·제보 창 ---------- */
.report-options { display: grid; gap: 6px; }
.report-option {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; font-size: 14px;
}
.report-option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.report-option input { accent-color: var(--primary); margin: 0; }

/* ---------- 내 정보 창 ---------- */
.modal-my { max-width: 600px; }
.my-page { display: grid; gap: 14px; }
.my-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.my-tab {
  border: 0; background: none; padding: 8px 12px; font-weight: 700; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.my-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--primary); }
.my-pane { display: grid; gap: 12px; align-content: start; }
.my-pane .muted { color: var(--muted); }
.my-pane .small { font-size: 13px; margin: 0; }
.my-reviews { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.my-review { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; }
.my-review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13.5px; }
.my-review-head .date { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.my-review-text { margin: 0; font-size: 13.5px; overflow-wrap: anywhere; }
.my-badge { padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--bad-soft); color: var(--bad); }
.my-section { display: grid; gap: 8px; }
.my-section h4 { margin: 0; font-size: 14px; }
.my-section .field-hint, .my-section .form-error { margin: 0; }
.my-row { display: flex; gap: 8px; }
.my-row input { flex: 1; min-width: 0; height: 36px; border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; background: var(--surface); }
.my-row input:disabled { opacity: 0.6; }
.my-links { margin: 0; font-size: 14px; }
.my-links a { color: var(--primary); font-weight: 600; }
.my-danger { border: 1px solid var(--bad-soft); border-radius: 12px; padding: 10px 14px; }
.my-danger > summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--bad); }
.my-danger[open] { gap: 10px; }
.my-danger > .btn { justify-self: start; }
.my-warn { margin: 0; padding-left: 18px; font-size: 13px; display: grid; gap: 4px; }
.my-page .check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.my-page .check input { width: 16px; height: 16px; accent-color: var(--bad); }

/* ---------- 카페 상세: 숨긴 카페 안내, 정보 제보, 신고 ---------- */
.hidden-banner {
  padding: 8px 12px; border-radius: 10px; background: var(--bad-soft); color: var(--bad); font-size: 13px; font-weight: 600;
}
.cafe-sub .sub-report { font-size: inherit; color: var(--muted); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.cafe-sub .sub-report:hover { color: var(--primary); }
.report-link { border: 0; background: none; padding: 0 2px; font-size: 12px; color: var(--muted); cursor: pointer; }
.report-link:hover { color: var(--bad); text-decoration: underline; }

/* 지도 아래 출처 안내 옆 약관 링크 */
.map-notice a { color: inherit; font-weight: 700; }
/* 네이버 지도 SDK 의 '© NAVER Corp.' 글자가 옆의 초록 NAVER 로고보다 2px 아래에 그려져 가운데를 맞춘다 (위치만 옮기고 가리지 않는다) */
.map .map_copyright { position: relative; top: -2px; }
.notice-sep { margin: 0 4px; }
.email-toggle { justify-self: center; border: 0; background: none; padding: 2px 4px; color: var(--muted); font-size: 13px; text-decoration: underline; }
.email-login { border-top: 1px solid var(--border); padding-top: 14px; }

/* 로그인하지 않은 이용자에게 목록 끝에서 보여 주는 "로그인하면 N곳 더" 칸 */
.list-gate { position: relative; padding: 0 16px 20px; border-bottom: 1px solid var(--border); overflow: hidden; }
.gate-ghost { display: grid; gap: 10px; padding-top: 14px; filter: blur(3px); opacity: 0.7; }
.gate-ghost span { display: block; height: 46px; border-radius: 10px; background: var(--surface-2); }
.gate-body {
  position: relative; margin-top: -58px; display: grid; gap: 10px; justify-items: center; text-align: center;
  padding: 16px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 88%, transparent);
}
.gate-body strong { font-size: 14.5px; }
.sr-gate .sr-name { color: var(--primary); font-size: 13.5px; }

/* ---------- 토스트 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 12px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow); max-width: calc(100% - 32px);
}

/* ---------- 모바일: 목록을 아래쪽 시트로 ---------- */
@media (max-width: 767px) {
  .topbar { gap: 8px; padding: 0 12px; }
  .view-scope button { padding: 0 9px; }
  .view-scope .scope-long { display: none; }
  .view-scope .scope-short { display: inline; }
  .brand-name { display: none; }
  /* 검색창 자리를 넓히려고 로그아웃은 내 정보 창(닉네임을 누르면 열림)에서만 한다 */
  .account .logout-btn { display: none; }
  .account .who { max-width: 96px; }
  .layout { flex-direction: column-reverse; }
  .panel {
    width: 100%; height: 44%; border-right: 0; border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0; margin-top: -16px; box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    transition: height 0.2s ease;
  }
  .panel.expanded { height: 82%; }
  .panel-grip {
    display: block; border: 0; background: none; height: 20px; flex-shrink: 0; position: relative; width: 100%;
  }
  .panel-grip::after {
    content: ""; position: absolute; left: 50%; top: 8px; width: 40px; height: 4px; margin-left: -20px;
    border-radius: 2px; background: var(--border);
  }
  .tabs { padding: 0; }
  .map-fab { bottom: 56px; right: 10px; width: 40px; height: 40px; }
  .map-fab-add { right: 56px; width: auto; font-size: 13px; padding: 0 11px 0 9px; }
  .pick-bar { bottom: 110px; }
  .map-search-btn { bottom: 54px; height: 42px; font-size: 15px; padding: 0 18px 0 15px; } /* 아래 시트가 지도 영역을 16px 덮는다. 아래 약관 줄과 띄운다 */
  /* 지도는 시트 위에서 끝낸다. 지도 아래쪽의 네이버 로고·저작권 표시가 시트에 가리면 안 된다 */
  .map-wrap > .map { bottom: 16px; }
  .search-results { position: fixed; top: calc(var(--topbar-h) - 4px); left: 8px; right: 8px; width: auto; max-height: 65vh; }
  /* 네이버 로고와 같은 높이. 도메인까지 한 줄에 넣고도 오른쪽 아래 © NAVER Corp. 와 겹치지 않게 줄였다 (폭 390px 휴대폰 기준) */
  .map-notice { bottom: 19px; font-size: 10px; line-height: 1.35; padding: 2px 5px; }
  .notice-sep { margin: 0 2px; }
  .map-banner { top: 10px; font-size: 13px; }
  .modal-backdrop { place-items: end center; padding: 0; }
  .modal { border-radius: 16px 16px 0 0; max-height: 92vh; max-height: 92dvh; }
  .photo-view img { max-height: calc(92vh - 130px); max-height: calc(92dvh - 130px); }
}
@media (max-width: 389px) {
  /* 폭 360px 대 휴대폰: 글자를 조금 더 줄여 네이버 로고·저작권 표시와 같은 줄에 맞춘다 */
  .map-notice { left: 6px; font-size: 9.5px; letter-spacing: -0.2px; padding: 2px 4px; }
  .notice-sep { margin: 0 1px; }
}

/* ---------- 카페 광고 (검색필터 위 한 칸) ---------- */
.ad-slot { margin: 10px 10px 0; }
.ad-card {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; text-align: left;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text); text-decoration: none; cursor: pointer;
}
.ad-card:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); background: var(--surface); }
.ad-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.ad-thumb { width: 48px; height: 48px; flex: none; border-radius: 9px; object-fit: cover; background: var(--surface); }
.ad-thumb-empty { display: grid; place-items: center; font-size: 22px; }
.ad-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ad-top { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); min-width: 0; }
.ad-label { flex: none; padding: 0 5px; border-radius: 4px; border: 1px solid var(--border); font-size: 10.5px; font-weight: 700; line-height: 16px; }
.ad-cafe { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ad-title { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-desc { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-go { flex: none; font-size: 20px; color: var(--muted); }

/* ---------- 문의·건의 게시판 ---------- */
.board-link { display: inline-flex; align-items: center; gap: 4px; }
.board-link-icon { font-size: 14px; }
/* 좁은 화면: 상단 검색창 자리가 모자라 숨긴다. 지도 아래 안내 줄과 내 정보 창의 '문의·건의' 링크로 연다 */
@media (max-width: 767px) {
  .account .board-link { display: none; }
}
.modal-board { max-width: 600px; }
.board { display: grid; gap: 12px; }
.board-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.board-toolbar .grow { flex: 1; }
.board-sep { width: 1px; height: 18px; background: var(--border); margin: 0 2px; }
.board-items { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--border); }
.board-item {
  width: 100%; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "kind title status" "kind meta status";
  align-items: center; gap: 2px 10px; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--border); background: none; text-align: left; cursor: pointer;
}
.board-item:hover { background: var(--surface-2); }
.board-item .board-kind { grid-area: kind; }
.board-item-title { grid-area: title; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-item .board-item-meta { grid-area: meta; }
.board-item .board-status { grid-area: status; }
.board-item-meta { margin: 0; font-size: 12.5px; color: var(--muted); }
.board-kind { padding: 1px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.board-kind.kind-inquiry { background: color-mix(in srgb, #1565d8 12%, var(--surface)); color: color-mix(in srgb, #1565d8 80%, var(--text)); }
.board-kind.kind-suggestion { background: var(--good-soft); color: var(--good); }
.board-status { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.board-status.is-done { color: var(--good); }
.board-empty { margin: 0; padding: 24px 8px; text-align: center; color: var(--muted); font-size: 14px; }
.board-pager { display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.board-back { padding: 0; }
.board-post { display: grid; gap: 6px; }
.board-post-head { display: flex; align-items: center; gap: 8px; }
.board-post-title { margin: 0; font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.board-post-body { font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px 0; }
.board-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.board-form-actions { justify-content: flex-end; }
.board-answer-area { display: grid; gap: 12px; }
.board-answer { border-radius: 12px; padding: 10px 14px; background: color-mix(in srgb, var(--primary-soft) 60%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border)); }
.board-answer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.board-answer .board-post-body { padding: 6px 0 2px; }
.board-waiting { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 13px; }
.board-answer-form { border-top: 1px dashed var(--border); padding-top: 12px; }
.board-answer-form textarea { min-height: 100px; }
.board-form .field textarea { min-height: 180px; }

/* ---------- 화이트/나이트 모드 ---------- */
/* 상단 바의 해·달 버튼 (js/theme.js) */
.theme-btn { width: 34px; padding: 0; justify-content: center; color: var(--muted); }
.theme-btn:hover { color: var(--primary); }
@media (max-width: 767px) { .theme-btn { width: 28px; } } /* 휴대폰은 검색창 자리를 조금이라도 더 남긴다 */

/* ---------- 리뷰어 메달 (format.js 의 REVIEWER_BADGES) ---------- */
.medal { margin-right: 3px; font-size: 0.95em; cursor: default; }

/* ---------- 내 정보 > 내 리뷰: 활동 요약 (js/myActivity.js) ---------- */
.my-activity { display: grid; gap: 14px; }
.my-activity:empty { display: none; }
.act-badge {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--owner-soft) 70%, var(--surface)); border: 1px solid color-mix(in srgb, var(--owner) 30%, var(--border));
}
.act-badge-icon { font-size: 34px; line-height: 1; flex: none; }
.act-badge-text { display: grid; gap: 3px; flex: 1; min-width: 0; }
.act-badge-text strong { font-size: 15px; }
.act-note { font-size: 12.5px; color: var(--muted); }
/* 다음 메달까지: 같은 금색 계열의 옅은 바탕 위에 채운 만큼 */
.act-meter { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--owner) 18%, var(--surface)); overflow: hidden; margin-top: 3px; }
.act-meter span { display: block; height: 100%; border-radius: 999px; background: var(--owner); }
.act-section { display: grid; gap: 8px; border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.act-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.act-head h4 { margin: 0; font-size: 14px; }
.act-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.act-chips .chip { height: 26px; font-size: 12px; padding: 0 9px; }
.act-map { height: 240px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.act-map .maplibregl-map { height: 100%; }
.act-summary { margin: 0; font-size: 13px; color: var(--muted); }
.act-summary strong { color: var(--text); }
/* 리뷰한 카페 점: 지도는 나이트 모드에서도 밝으므로 색을 고정한다. 흰 테두리로 겹쳐도 하나씩 보이게 */
.mini-dot { width: 12px; height: 12px; border-radius: 50%; background: #7a4a2a; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
/* 지역별 카페 수: 한 가지 값이라 한 색 막대 */
.act-bars { display: grid; gap: 4px; }
.act-bar {
  display: grid; grid-template-columns: minmax(64px, 30%) 1fr auto; align-items: center; gap: 8px;
  width: 100%; padding: 3px 4px; border: 0; border-radius: 6px; background: none; font-size: 12.5px; text-align: left; color: var(--text);
}
button.act-bar:hover, button.act-bar:focus-visible { background: var(--surface-2); outline: none; }
.act-bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.act-bar-track { height: 10px; }
.act-bar-fill { display: block; height: 100%; min-width: 4px; border-radius: 0 4px 4px 0; background: var(--primary); }
.act-bar-value { color: var(--muted); font-variant-numeric: tabular-nums; }
/* 방문 통계 세로 막대: 왼쪽 눈금 + 그림 + 아래 날짜 */
.vchart { display: grid; grid-template-columns: 22px 1fr; grid-template-rows: 130px auto; column-gap: 6px; row-gap: 4px; }
.vc-axis { position: relative; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vc-axis span { position: absolute; right: 0; transform: translateY(50%); line-height: 1; }
.vc-plot { position: relative; }
.vc-grid { position: absolute; left: 0; right: 0; height: 1px; background: var(--border); }
.vc-cols { position: absolute; inset: 0; display: flex; }
.vc-col { flex: 1; position: relative; display: flex; align-items: flex-end; justify-content: center; outline: none; cursor: default; }
.vc-col:hover, .vc-col:focus-visible { background: color-mix(in srgb, var(--primary) 7%, transparent); border-radius: 6px 6px 0 0; }
.vc-bar { width: min(24px, 62%); border-radius: 4px 4px 0 0; background: var(--primary); }
.vc-tip {
  display: none; position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); z-index: 2;
  padding: 5px 9px; border-radius: 8px; background: var(--ink-grad, var(--text)); color: var(--ink-text, var(--surface));
  font-size: 12px; white-space: nowrap; box-shadow: var(--shadow); pointer-events: none;
}
.vc-col:hover .vc-tip, .vc-col:focus-visible .vc-tip { display: block; }
/* 끝 칸의 말풍선이 그림 밖으로 나가지 않게 안쪽으로 붙인다 */
.vc-col:first-child .vc-tip { left: 0; transform: none; }
.vc-col:last-child .vc-tip { left: auto; right: 0; transform: none; }
.vc-xlabels { display: flex; font-size: 11px; color: var(--muted); }
.vc-xlabels span { flex: 1; text-align: center; white-space: nowrap; }
.vc-xlabels .is-current { color: var(--text); font-weight: 700; }
.act-bar-rest { margin: 2px 4px 0; font-size: 12px; color: var(--muted); }
/* 내 리뷰 아래 내가 올린 사진: 카페 상세 사진 칸(.photo)을 작게 한 줄로 */
.my-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.my-photos .photo { width: 64px; height: 64px; aspect-ratio: auto; }
/* 내 리뷰: 카페 이름(누르면 리뷰 고치기) 오른쪽의 '카페로 가기' */
.my-go-cafe { height: 24px; padding: 0 8px; font-size: 12px; border-radius: 7px; color: var(--muted); }
.my-go-cafe:hover { color: var(--primary); border-color: var(--primary); }
/* 계정 탭: 리뷰어 메달 안내 (10단계 표) */
.medal-now { margin: 0; font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; }
.medal-now strong { color: var(--text); }
.medal-now-icon { font-size: 20px; line-height: 1; }
.medal-ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; }
@media (max-width: 480px) { .medal-ladder { grid-template-columns: minmax(0, 1fr); } }
.medal-ladder li {
  display: grid; grid-template-columns: 38px 24px minmax(0, 1fr) auto; align-items: center; gap: 6px;
  padding: 5px 8px; border-radius: 8px; font-size: 12.5px; color: var(--muted);
}
.medal-ladder li.is-done { color: var(--text); }
.medal-ladder li.is-now { color: var(--text); background: var(--owner-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--owner) 45%, transparent); font-weight: 700; }
.medal-step { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.medal-icon { font-size: 17px; line-height: 1; text-align: center; }
/* 아직 받지 못한 단계는 흐리게 */
.medal-ladder li:not(.is-done):not(.is-now) .medal-icon { filter: grayscale(1); opacity: 0.55; }
.medal-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.medal-min { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.medal-rules { color: var(--muted); font-size: 12.5px; }
/* 개척자: 카페의 첫 이용자 리뷰 */
.pioneer-line { margin: -4px 0 6px; font-size: 12.5px; color: var(--muted); }
.pioneer-line strong { color: var(--text); }
.pioneer-tag { padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--bad-soft); color: var(--bad); white-space: nowrap; }
/* 도장깨기 (js/myActivity.js 의 STAMPS) */
.stamps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 480px) { .stamps { grid-template-columns: minmax(0, 1fr); } }
.stamp { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.stamp-icon { font-size: 24px; line-height: 1; flex: none; }
/* 아직 도장이 하나도 없는 목표는 흐리게 */
.stamp:not(.is-on) .stamp-icon { filter: grayscale(1); opacity: 0.5; }
.stamp.is-done { background: var(--owner-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--owner) 40%, transparent); }
.stamp-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.stamp-text strong { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.stamp-level { font-size: 10px; letter-spacing: 1px; color: var(--owner); font-weight: 400; }
.stamp-text .act-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.stamp-meter { margin-top: 1px; height: 4px; }
/* 리뷰 창 야외자리: 있음/없음(하나만)과 따로 켜는 '통창 열림' 사이 구분선 */
.chip-sep { width: 1px; height: 18px; background: var(--border); margin: 0 2px; align-self: center; }
.chip-toggle[aria-pressed="false"] { border-style: dashed; }

/* ---------- 휴대폰: 상단 바 버튼을 지도 위로 ----------
   상단 바는 검색창에 자리를 내준다. 보기 방식(전체·리뷰)과 카페 등록(main.js 가 옮긴다)은 지도 오른쪽 위 확대·축소 버튼 왼쪽에,
   화이트/나이트 버튼은 내 위치 버튼 위에 띄운다.
   .map-quick 의 right 는 확대·축소 버튼(네이버 SMALL·MapLibre 모두 폭 약 29px, 오른쪽 여백 6~10px) 왼쪽에 맞춘 값이다 */
.map-quick, .map-fab-theme { display: none; }
@media (max-width: 767px) {
  .topbar .view-scope, .account .theme-btn { display: none; }
  .map-quick { display: flex; align-items: center; gap: 6px; position: absolute; top: 10px; right: 46px; z-index: 5; }
  .map-quick .view-scope { box-shadow: var(--shadow); }
  .map-quick .map-fab-add { position: static; height: 38px; border-radius: 999px; }
  .map-fab.map-fab-theme { display: grid; bottom: 104px; width: 40px; height: 40px; padding: 0; color: var(--text); } /* 내 위치 버튼(bottom 56px, 높이 40px) 위 */
  .layout:has(.panel.expanded) .map-fab-theme { display: none; } /* 목록을 크게 펼쳐 지도가 낮아지면 위쪽 버튼과 겹친다 */
  .map-banner { top: 58px; max-width: calc(100% - 100px); } /* 위쪽 버튼·확대 버튼과 겹치지 않게 */
}
