/* 5.8절 컬러, 타이포그래피, CSS 변수 (정본 승격값) */
:root {
  --bg: #ffffff;
  --paper: #f6f2ec;
  --surface: #ffffff;
  --surface2: #fbf9f6;
  --ink: #1d1710;
  --ink2: #57493a;
  --ink3: #8a7a68;
  --line: #e6ddd0;
  --line2: #efe8dd;
  --red: #cf2417;
  --red-dark: #a81c10;
  --red-soft: #fdeeea;
  --amber: #b97a0e;
  --amber-soft: #fdf3e0;
  --green: #1e7a46;
  --green-soft: #e8f5ec;
  --pin: #cf2417;
  --shadow: 0 10px 30px rgba(60, 35, 10, 0.10);
  --radius: 14px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.serif {
  font-family: 'Noto Serif KR', Georgia, serif;
}

.text-red {
  color: var(--red);
}

.text-green {
  color: var(--green);
}

.badge-verify-confirmed {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid var(--green);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.badge-verify-unverified {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink3);
  background: var(--paper);
  border: 1px dashed var(--line);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 5.1 공통 셸: 얇은 헤더 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(60, 35, 10, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 70px;
}

.header-brand .brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.2;
}

.tag-draft {
  font-size: 11px;
  font-family: sans-serif;
  font-weight: 700;
  background: var(--amber-soft);
  color: var(--amber);
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 4px;
}

.brand-sub {
  font-size: 12px;
  color: var(--ink3);
  font-weight: 500;
}

/* 5.7절 광고 슬롯 1 */
.header-ad {
  flex: 1;
  max-width: 468px;
  height: 60px;
}

.ad-slot {
  background-color: var(--surface2);
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ad-placeholder {
  text-align: center;
}

.ad-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink3);
  letter-spacing: -0.2px;
}

/* 5.9절 상단바 지역 선택 버튼 */
.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.region-selector-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}

.region-selector-btn:hover {
  background: var(--surface);
  border-color: var(--ink);
  transform: translateY(-1px);
}

.stat-badge {
  font-size: 13px;
  color: var(--ink2);
  background: var(--surface2);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line2);
}

/* GNB 메뉴 */
.gnb-nav {
  background-color: var(--surface2);
  border-top: 1px solid var(--line2);
  border-bottom: 1px solid var(--line);
}

.gnb-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
}

.gnb-links {
  display: flex;
  gap: 20px;
}

.gnb-link {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink2);
  padding: 10px 0;
  position: relative;
  cursor: pointer;
  transition: color 0.15s ease;
}

.gnb-link:hover,
.gnb-link.on {
  color: var(--red);
}

.gnb-link.on::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--red);
}

.counter {
  font-size: 11px;
  background: var(--paper);
  color: var(--ink3);
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
}

/* 검색 드롭다운 */
.gnb-search-wrap {
  position: relative;
}

.gnb-search-wrap input {
  padding: 6px 14px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  width: 220px;
  outline: none;
  transition: all 0.2s;
}

.gnb-search-wrap input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red-soft);
  width: 260px;
}

.search-dropdown {
  position: absolute;
  top: 36px;
  right: 0;
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 120;
  max-height: 400px;
  overflow-y: auto;
  padding: 8px 0;
}

.search-group-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink3);
  padding: 6px 14px;
  text-transform: uppercase;
  background: var(--surface2);
}

.search-item {
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 1px solid var(--line2);
  transition: background 0.15s;
}

.search-item:hover {
  background: var(--paper);
}

.search-item-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.search-item-sub {
  font-size: 12px;
  color: var(--ink3);
}

/* 필터 바 */
.filter-section {
  background-color: var(--surface);
  border-bottom: 1px solid var(--line2);
  padding: 10px 0;
}

.filter-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink3);
  min-width: 36px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink2);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.chip.on {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* 메인 컨텐츠 & 5.2 데스크톱 3분할 */
.main-content {
  background-color: var(--paper);
  padding: 16px 0 40px;
  min-height: calc(100vh - 180px);
}

.map-layout {
  display: grid;
  grid-template-columns: 310px 1fr 340px;
  gap: 16px;
  align-items: stretch;
  height: min(780px, calc(100vh - 190px));
  min-height: 600px;
}

/* 1칸: 목록 패널 */
.panel-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  height: 640px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface2);
}

.panel-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.panel-title .count {
  color: var(--red);
  margin-left: 4px;
}

.panel-hint {
  font-size: 12px;
  color: var(--ink3);
}

.card-scroll-area {
  flex: 1;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.16) transparent;
  padding: 12px 8px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
}

/* 슬림 스크롤바 (우측 침범 방지 계산) */
.card-scroll-area::-webkit-scrollbar {
  width: 6px;
}

.card-scroll-area::-webkit-scrollbar-track {
  background: transparent;
}

.card-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
  border-radius: 4px;
}

.card-scroll-area::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.32);
}

/* 좌측 컴팩트 맛집 리스트 카드 (상호·대표메뉴·채널확인됨 중심, 다건 노출 최적화) */
.place-card {
  box-sizing: border-box;
  width: calc(100% - 12px);
  margin: 0 auto 10px auto !important;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  transform: none !important;
}

.place-card:hover {
  transform: none !important;
  border-color: #e11d48;
  background: #fffafa;
  box-shadow: 0 3px 12px rgba(225, 29, 72, 0.12);
}

.place-card.map-selected {
  transform: none !important;
  border-color: #e11d48 !important;
  background: #fff5f5 !important;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.18) !important;
}

/* 좌측 컴팩트 썸네일 */
.card-thumb-wrap {
  position: relative;
  width: 72px !important;
  height: 56px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  background: #f1f5f9;
  flex: 0 0 72px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-thumb-fallback {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  font-size: 24px;
}

/* 카드 본문 */
.card-content-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.card-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.card-name-group {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.card-pin-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  background: #e11d48;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 50%;
  flex-shrink: 0;
}

.card-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-row-menu {
  display: flex;
  align-items: center;
}

.card-menu-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 4px;
  padding: 1px 6px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-row-addr {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-addr-badge {
  font-weight: 700;
  color: #334155;
  flex-shrink: 0;
}

.card-addr-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 도로·노선번호 토글 버튼 */
.map-shield-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.18s ease;
}

.map-shield-toggle:hover {
  background: #ffffff;
  border-color: #e11d48;
  color: #e11d48;
  box-shadow: 0 3px 8px rgba(225, 29, 72, 0.15);
}

.map-shield-toggle.active {
  background: #e11d48;
  border-color: #e11d48;
  color: #ffffff;
}

.card-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-name-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.card-pin-num {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--red);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-verify-confirmed {
  font-size: 10.5px;
  font-weight: 700;
  color: #027a48;
  background: #ecfdf3;
  border: 1px solid #d1fadf;
  padding: 1.5px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-verify-unverified {
  font-size: 10.5px;
  font-weight: 700;
  color: #b54708;
  background: #fffaeb;
  border: 1px solid #fedf89;
  padding: 1.5px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-row-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink3);
}

.card-menu-tag {
  font-weight: 700;
  color: #8b3e10;
  background: #fdf5ed;
  padding: 1px 6px;
  border-radius: 3px;
}

.card-addr-hint {
  color: var(--ink3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-load-more {
  width: 100%;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin: 8px 0 24px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-load-more:hover {
  background: var(--paper);
  border-color: var(--red);
  color: var(--red);
}

/* obsolete thumb removed */

.pin-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--red);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.unpinned-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--amber);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.play-mark {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(29, 23, 16, 0.75);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.card-info {
  padding: 10px 12px 12px;
}

.card-name-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
}

.card-name {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink);
}

.card-category {
  font-size: 12px;
  color: var(--ink3);
  font-weight: 600;
}

.card-neighborhood {
  font-size: 12.5px;
  color: var(--ink2);
  margin-bottom: 6px;
  font-weight: 500;
}

.card-video-title {
  font-size: 12.5px;
  color: var(--ink3);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 2칸: 지도 패널 */
.panel-map {
  position: relative;
  height: 640px;
  background: #eee;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

#map-container {
  width: 100%;
  height: 100%;
}

.map-brief-chip {
  position: absolute;
  left: 12px;
  top: 12px;
  max-width: 264px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
  pointer-events: none;
  z-index: 10;
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.brief-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--red);
  margin-bottom: 2px;
}

.brief-meta {
  font-size: 12.5px;
  color: var(--ink2);
  font-weight: 600;
  margin-bottom: 4px;
}

.brief-note {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 6px;
}

.brief-hint {
  font-size: 11.5px;
  color: var(--ink3);
  font-weight: 500;
}

.map-btn-locate {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 5;
}

.map-stamp-marker {
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 50% 4px;
  background-color: var(--pin);
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 10px rgba(60, 35, 10, 0.35);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s;
}

.marker-number {
  transform: rotate(45deg);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.map-stamp-marker:hover,
.map-stamp-marker.is-selected {
  background-color: var(--ink);
  transform: scale(1.22) rotate(-45deg);
  z-index: 20;
}

/* 3칸: 상세 패널 (5.5절) */
.panel-detail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: sticky;
  top: 118px;
  max-height: calc(100vh - 134px);
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.detail-placeholder {
  padding: 40px 24px;
  text-align: center;
  color: var(--ink3);
}

.placeholder-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.placeholder-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink2);
  margin-bottom: 6px;
}

.placeholder-desc {
  font-size: 13.5px;
  line-height: 1.5;
}

.detail-content {
  padding: 20px;
}

/* 우측 상세 패널 유튜브 썸네일 & 영상 재생 배지 */
.detail-cover-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  margin-bottom: 14px;
  background: #0f172a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-cover-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain !important;
  display: block;
  background: #0f172a;
}

.detail-menu-highlight {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #c2410c;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 6px;
}

.detail-menu-unconfirmed {
  color: #64748b;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.detail-cover-wrap:hover .detail-cover-img {
  transform: scale(1.03);
}

.detail-play-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(207, 36, 23, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 5px;
}

.detail-header {
  margin-bottom: 16px;
}

.detail-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.detail-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink3);
  background: var(--surface2);
  padding: 2px 8px;
  border-radius: 4px;
}

.detail-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 4px;
}

.detail-sub {
  font-size: 13.5px;
  color: var(--ink2);
  font-weight: 500;
}

.fact-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}

.fact {
  background: var(--surface2);
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}

.fact-label {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink3);
  margin-bottom: 2px;
  text-transform: uppercase;
}

.fact-value {
  font-size: 13.8px;
  font-weight: 600;
  color: var(--ink);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.btn-red {
  background: var(--red);
  color: #fff;
}

.btn-red:hover {
  background: var(--red-dark);
}

.btn-line {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}

.recs-section {
  border-top: 1px solid var(--line2);
  padding-top: 16px;
  margin-top: 16px;
}

.recs-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 12px;
}

.recs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rec-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 8px 12px;
}

.rec-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.rec-info {
  flex: 1;
  min-width: 0;
}

.rec-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}

.rec-video-link {
  font-size: 12px;
  color: var(--ink3);
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-video-link:hover {
  color: var(--red);
}

/* 5.7절 광고 슬롯 2 & 3 */
.bottom-ad-section {
  margin-top: 20px;
}

.ad-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ad-slot-bottom {
  height: 120px;
}

/* 유튜버 모음 (/channel) & 지역 모음 (/region) 스타일 */
.page-header {
  margin-bottom: 24px;
}

.page-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 6px;
}

.page-desc {
  font-size: 14.5px;
  color: var(--ink3);
}

.creators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 640px) {
  .creators-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.creator-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.creator-card:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  box-shadow: 0 6px 16px rgba(60, 35, 10, 0.08);
}

.creator-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 고정 크기 원형 아바타 (72px, 원본 크기 영향 원천 차단) */
.creator-card-avatar {
  width: 72px !important;
  height: 72px !important;
  min-width: 72px !important;
  min-height: 72px !important;
  max-width: 72px !important;
  max-height: 72px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid var(--line);
  background: var(--paper);
  flex-shrink: 0;
  display: block;
}

.creator-card-header-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.creator-region-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  background: #fdf2f2;
  border: 1px solid rgba(207, 36, 23, 0.15);
  padding: 2px 8px;
  border-radius: 10px;
  line-height: 1.4;
}

.creator-card-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creator-card-handle {
  font-size: 12.5px;
  color: var(--ink3);
  margin: 0;
}

.creator-card-desc {
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.5;
  margin: 0;
  flex: 1;
  min-height: 38px;
}

.creator-card-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--surface2);
  padding: 10px 12px;
  border-radius: 8px;
  text-align: center;
}

.stat-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-box .stat-lbl {
  font-size: 11px;
  color: var(--ink3);
  font-weight: 600;
}

.stat-box .stat-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.stat-box .stat-val.text-red {
  color: var(--red);
}

.creator-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.creator-card-actions .btn {
  flex: 1;
  text-align: center;
  justify-content: center;
  font-size: 12.5px;
  padding: 8px 10px;
}

.regions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.creator-big-card,
.region-big-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.creator-big-card:hover,
.region-big-card:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
}

.creator-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.creator-big-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.creator-meta-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

.creator-meta-handle {
  font-size: 12.5px;
  color: var(--ink3);
}

.creator-stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  background: var(--surface2);
  padding: 10px 14px;
  border-radius: 8px;
}

.creator-stat-item {
  display: flex;
  flex-direction: column;
}

.creator-stat-val {
  font-size: 18px;
  font-weight: 900;
  color: var(--red);
}

.creator-stat-lbl {
  font-size: 11.5px;
  color: var(--ink3);
}

.region-card-name {
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 6px;
}

.region-card-count {
  font-size: 26px;
  font-weight: 900;
  color: var(--red);
  margin-bottom: 8px;
}

.region-card-note {
  font-size: 12.5px;
  color: var(--ink3);
}

.uncollected-card {
  border-style: dashed;
  opacity: 0.75;
}

.uncollected-card:hover {
  opacity: 1;
}

/* 소개 페이지 (/about) */
.about-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 32px;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.about-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 12px;
}

.about-lead {
  font-size: 17px;
  color: var(--ink2);
  margin-bottom: 24px;
  line-height: 1.6;
}

.about-section {
  margin-bottom: 24px;
}

.about-sub {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
}

.about-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14.5px;
  color: var(--ink2);
}

.highlight-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 20px;
}

/* 5.9절 상단바 지역 전환 모달 */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(29, 23, 16, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  width: 100%;
  max-width: 520px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface2);
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--ink3);
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-hint {
  font-size: 13px;
  color: var(--ink3);
  line-height: 1.4;
}

.region-select-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.select-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink3);
}

.country-pill-list,
.region-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
}

.pill:hover {
  border-color: var(--ink);
}

.pill.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.pill.uncollected {
  border-style: dashed;
  color: var(--ink3);
}

/* 모바일 전용 시트 & 바 */
.mobile-sheet {
  display: none;
}

.mobile-action-bar {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--line2);
  background: var(--surface);
  position: sticky;
  bottom: 0;
}

.mobile-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.btn-call {
  background: var(--green);
  color: #fff;
}

.btn-map {
  background: var(--red);
  color: #fff;
}

/* 푸터 */
.site-footer {
  background-color: var(--surface);
  border-top: 1px solid var(--line);
  padding: 28px 0;
  margin-top: 40px;
}

.footer-inner {
  text-align: center;
}

.footer-title {
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 4px;
}

.footer-text,
.footer-map-attribution {
  font-size: 12px;
  color: var(--ink3);
  line-height: 1.6;
}

.footer-map-attribution a {
  color: var(--ink2);
}

/* 5.4절 반응형 브레이크포인트 */
@media (max-width: 900px) {
  .site-header .header-inner {
    height: auto;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .header-ad {
    max-width: 100%;
    order: 3;
    height: 50px;
  }

  .map-layout {
    display: block;
  }

  .panel-map {
    height: min(66svh, 560px);
    min-height: 430px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .panel-list,
  .panel-detail {
    display: none;
  }

  .mobile-sheet {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48svh;
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 99;
    transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .sheet-handle-bar {
    padding: 10px;
    text-align: center;
    cursor: pointer;
  }

  .sheet-handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--line);
    margin: 0 auto 8px;
  }

  .sheet-summary {
    font-size: 14px;
    font-weight: 700;
  }

  .sheet-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px 16px;
  }

  .ad-grid-2 {
    grid-template-columns: 1fr;
  }

  .ad-slot-bottom {
    height: 90px;
  }
}

/* 7.1절 PWA 앱 설치 유도 배너 */
.pwa-install-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 150;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
  padding: 12px 16px;
  max-width: 360px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.pwa-banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-banner-icon {
  font-size: 24px;
}

.pwa-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pwa-banner-text strong {
  font-size: 13.5px;
  color: var(--ink);
}

.pwa-banner-text span {
  font-size: 11.5px;
  color: var(--ink3);
}

.pwa-banner-close {
  background: none;
  border: none;
  color: var(--ink3);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
}

/* 7.2절 Toss Mini-App (앱인토스) 웹뷰 분기 스타일 */
.toss-app-mode .site-header {
  padding-top: env(safe-area-inset-top, 0px);
}

.toss-app-mode .header-ad,
.toss-app-mode .bottom-ad-section {
  display: none !important; /* 토스 앱 규정: 외부 배너 광고 숨김 */
}

.toss-app-mode .gnb-nav {
  display: none !important; /* 토스 네이티브 내비게이션 바와의 중복 방지 */
}

.toss-app-mode .site-footer {
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}


.panel-list, .panel-map, .panel-detail {
  height: 100%;
  box-sizing: border-box;
}

.panel-list {
  display: flex;
  flex-direction: column;
}

.card-scroll-area {
  flex: 1;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  padding: 10px 6px;
}


/* =====================================================================
   맛지도 모바일 레이아웃 보정  v20261108
   - style.css 맨 끝에 덧붙인다(지도 화면과 서버 렌더링 페이지가 모두 style.css를 쓰므로
     HTML·server.js를 고치지 않아도 양쪽에 적용됨). 데이터·API·기능은 건드리지 않음.
   - 원인 1: style.css 맨 끝의 `.panel-list,.panel-map,.panel-detail{height:100%}` 와
            `.panel-list{display:flex}` 가 900px 이하 규칙을 다시 덮어써서
            지도 높이가 무너지고 숨겨야 할 목록/상세가 뒤엉켜 나옴.
   - 원인 2: 바텀시트 상태(state-*) CSS가 아예 없어 시트가 화면 절반을 항상 가림.
   - 원인 3: 검색창 고정폭(220~260px)·칩 줄바꿈·광고 자리표시로 가로 넘침과 세로 낭비.
   ===================================================================== */

/* ---------- 공통(전 화면) ---------- */

/* 지역 모음 카드: app.js가 쓰는 클래스(region-card 등)에 스타일이 없어서 보강 */
.region-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.region-card.uncollected-region { border-style: dashed; box-shadow: none; opacity: .8; }
.region-card-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.region-card-title { font-size: 17px; font-weight: 900; color: var(--ink); }
.region-card-sub { font-size: 13px; color: var(--ink3); }
.region-card-footer { margin-top: auto; padding-top: 4px; }
.badge-active {
  font-size: 12px; font-weight: 800; color: var(--red); background: var(--red-soft);
  padding: 2px 9px; border-radius: 999px; white-space: nowrap;
}
.badge-uncollected {
  font-size: 12px; font-weight: 700; color: var(--ink3); background: var(--paper);
  padding: 2px 9px; border-radius: 999px; white-space: nowrap;
}
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: default; }

/* 도로번호 토글이 지도 확대/축소 버튼과 겹치던 문제 */
.map-shield-toggle { right: 52px; }

/* 시트 닫기 버튼(mobile.js가 생성) — 데스크톱에선 시트 자체가 안 보임 */
.m-sheet-close { display: none; }

/* ---------- 태블릿·폰 (900px 이하) ---------- */
@media (max-width: 900px) {
  html, body { overflow-x: clip; }
  .wrap { padding: 0 14px; }

  /* 헤더: 한 줄 압축 */
  .site-header .header-inner {
    flex-wrap: wrap;
    height: auto;
    min-height: 56px;
    padding: 6px 0;
    gap: 8px 10px;
  }
  .header-brand { min-width: 0; flex: 1 1 auto; }
  .header-brand .brand-link { gap: 8px; }
  .brand-icon { width: 34px; height: 34px; font-size: 18px; border-radius: 8px; flex-shrink: 0; }
  .brand-title { font-size: 17px; white-space: nowrap; }
  .brand-sub, .tag-draft { display: none; }
  .header-controls { gap: 6px; flex-shrink: 0; }
  .region-selector-btn { padding: 6px 10px; font-size: 12.5px; }
  .stat-badge { font-size: 12px; padding: 4px 9px; }
  .header-ad { order: 3; flex: 1 1 100%; max-width: 100%; height: 50px; }

  /* 실제 광고가 들어오기 전 '광고 슬롯 N' 자리표시는 폰에서 숨김 (광고가 들어오면 자동으로 다시 보임) */
  .ad-slot:has(.ad-placeholder) { display: none; }

  /* 메뉴 + 검색: 메뉴는 가로 스크롤, 검색은 아래 줄 전체 폭 */
  .gnb-inner {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 6px 0 8px;
  }
  .gnb-links {
    gap: 18px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .gnb-links::-webkit-scrollbar { display: none; }
  .gnb-link { padding: 6px 0; flex-shrink: 0; }
  .gnb-search-wrap { width: 100%; }
  .gnb-search-wrap input,
  .gnb-search-wrap input:focus {
    width: 100%;
    font-size: 16px;            /* 16px 미만이면 아이폰이 입력 시 화면을 확대함 */
    padding: 9px 14px;
  }
  .search-dropdown { left: 0; right: 0; width: auto; top: 46px; max-height: 60vh; max-height: 60svh; }

  /* 필터 칩: 여러 줄로 쌓이지 않게 한 줄 가로 스크롤 */
  .filter-section { padding: 8px 0; }
  .filter-inner { gap: 6px; }
  .filter-row { gap: 8px; min-width: 0; }
  .filter-title { font-size: 12px; min-width: 30px; flex-shrink: 0; }
  .chip-group {
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 1px 0;
  }
  .chip-group::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; padding: 7px 13px; }

  /* 지도 + 목록: 위아래 배치, 페이지 하나로 자연스럽게 스크롤 */
  .main-content { padding: 0 0 28px; min-height: 0; }
  .map-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: auto;
    min-height: 0;
    padding-top: 12px;
  }
  .map-layout .panel-map {
    order: -1;                  /* HTML상 목록이 먼저라서, 폰에서는 지도를 맨 위로 */
    height: 52vh;
    height: 52svh;
    min-height: 300px;
    max-height: 520px;
    border-radius: 12px;
    border: 1px solid var(--line);
    flex-shrink: 0;
  }
  .map-layout .panel-list {
    display: flex;
    height: auto;
    max-height: none;
    box-shadow: none;
  }
  .map-layout .panel-detail { display: none; }   /* 폰에서는 상세를 바텀시트로 표시 */

  .panel-header { padding: 12px 14px; }
  .panel-hint { display: none; }
  .card-scroll-area {
    flex: none;
    overflow: visible;
    padding: 10px;
    gap: 8px;
  }
  .place-card { width: 100%; padding: 10px; margin: 0 0 8px 0 !important; }
  .card-name { font-size: 15px; }
  .btn-load-more { margin: 4px 0 6px; }

  /* 마우스 올림용 미리보기 칩은 터치에서 탭할 때마다 남아 지도를 가림 */
  .map-brief-chip { display: none !important; }
  .map-btn-locate { bottom: 14px; right: 12px; width: 44px; height: 44px; }
  .map-shield-toggle { top: 10px; right: 50px; padding: 6px 10px; font-size: 11.5px; }

  /* ----- 바텀시트: 가게를 고르기 전엔 숨김, 고르면 절반 → 탭하면 전체 ----- */
  .mobile-sheet {
    height: 50vh;
    height: 50svh;
    transform: translateY(110%);
    visibility: hidden;
    transition: transform .28s cubic-bezier(.16, 1, .3, 1), height .28s cubic-bezier(.16, 1, .3, 1), visibility 0s linear .28s;
    z-index: 160;
  }
  .mobile-sheet[data-mstate="half"],
  .mobile-sheet[data-mstate="full"] {
    transform: none;
    visibility: visible;
    transition-delay: 0s;
  }
  .mobile-sheet[data-mstate="full"] { height: calc(100vh - 60px); height: calc(100svh - 60px); }

  .sheet-handle-bar { position: relative; padding: 10px 52px 8px; touch-action: none; user-select: none; }
  .sheet-summary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-sheet-close {
    display: flex; align-items: center; justify-content: center;
    position: absolute; right: 10px; top: 8px;
    width: 36px; height: 36px; border: none; border-radius: 50%;
    background: var(--paper); color: var(--ink2); font-size: 17px; cursor: pointer;
  }
  .sheet-content { padding: 4px 16px 16px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .sheet-content .detail-cover-wrap { margin-bottom: 10px; }
  .sheet-content .detail-header { margin-bottom: 10px; }
  .sheet-content .detail-title { font-size: 21px; }
  .sheet-content .fact-group { margin: 10px 0; }
  .sheet-content .action-buttons { flex-direction: row; margin: 10px 0; }
  .sheet-content .action-buttons .btn { flex: 1; font-size: 13.5px; padding: 11px 8px; }
  .sheet-content .rec-video-link { white-space: normal; }

  /* 하단 전화/길찾기 바: 가게 선택 전(빈 링크)엔 숨김, 선택 후 버튼을 가로로 나란히 */
  .mobile-action-bar:not([style*="grid"]) { display: none; }
  .mobile-action-bar {
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-btn { height: 48px; }

  /* 앱 설치 배너: 폭 맞춤, 시트가 열려 있으면 숨김 */
  .pwa-install-banner {
    left: 12px; right: 12px; max-width: none;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  body.m-sheet-open .pwa-install-banner { display: none !important; }

  /* 지역 선택 모달: 아래에서 올라오는 시트형 */
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal-card { border-radius: 16px 16px 0 0; max-height: 88vh; max-height: 88svh; overflow-y: auto; }
  .modal-body { padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }

  /* 유튜버 모음 / 지역 모음 / 소개 */
  .page-header { margin: 14px 0 16px; }
  .page-title { font-size: 22px; line-height: 1.3; }
  .page-desc { font-size: 13.5px; }
  .creator-card { padding: 16px; gap: 12px; }
  .regions-grid { grid-template-columns: 1fr; gap: 12px; }
  .about-card { padding: 22px 18px; }
  .about-title { font-size: 24px; line-height: 1.3; }
  .about-lead { font-size: 15px; }
  .about-list { font-size: 14px; }

  .site-footer { padding: 22px 0 calc(22px + env(safe-area-inset-bottom, 0px)); margin-top: 24px; }
}

/* ---------- 서버 렌더링 페이지 (/region/:지역, /place/:id) 폰 화면 ---------- */
@media (max-width: 640px) {
  .ssr-container,
  .ssr-region-container { margin: 0 auto; padding: 20px 16px; border-radius: 0; box-shadow: none; }
  .ssr-region-container h1 { font-size: 22px; line-height: 1.35; }
  .ssr-title { font-size: 22px; }
  .ssr-attribution,
  .ssr-region-container { overflow-wrap: anywhere; }   /* 긴 출처 URL이 가로 넘침을 만들던 문제 */
  .ssr-action-btns { gap: 8px; }
  .ssr-btn-yt, .ssr-btn-map { font-size: 13.5px; padding: 12px 8px; }

  /* 지역 목록 표 → 한 가게당 한 덩어리(상호·메뉴 / 구 / 주소) */
  .ssr-region-container .table-wrap { overflow-x: visible; margin-top: 12px; }
  .ssr-region-container table,
  .ssr-region-container tbody,
  .ssr-region-container tr,
  .ssr-region-container td { display: block; width: auto; }
  .ssr-region-container thead,
  .ssr-region-container tr:has(th) { display: none; }
  .ssr-region-container tr {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    column-gap: 8px;
    row-gap: 2px;
    align-items: baseline;
    padding: 12px 0 !important;
  }
  .ssr-region-container td { padding: 0 !important; }
  .ssr-region-container td:nth-child(1) { grid-row: 1 / span 3; text-align: left !important; font-size: 12px; }
  .ssr-region-container td:nth-child(2) { font-size: 15.5px; }
  .ssr-region-container td:nth-child(3) { font-size: 12px; white-space: nowrap; }
  .ssr-region-container td:nth-child(4) { grid-column: 2 / 4; font-size: 12.5px; font-weight: 600; }
  .ssr-region-container td:nth-child(5) { grid-column: 2 / 4; font-size: 12.5px !important; line-height: 1.45; }
}

/* ---------- 작은 폰 (480px 이하) ---------- */
@media (max-width: 480px) {
  .stat-badge { display: none; }          /* 헤더 한 줄 유지: 총계는 목록 머리에 이미 있음 */
  .brand-title { font-size: 16px; }
  .creator-card-avatar {
    width: 56px !important; height: 56px !important;
    min-width: 56px !important; min-height: 56px !important;
    max-width: 56px !important; max-height: 56px !important;
  }
  .creator-card-actions { flex-direction: column; }
}

/* =====================================================================
   맛지도 v20261109n — 전국 지역·테마·검색 + 모바일 2차 보정(인수인계 5-1)
   ===================================================================== */
/* 스탬프: MapLibre가 요소의 transform을 인라인으로 덮어써 회전이 풀리던 문제 → 모양은 ::before가 회전, 숫자는 똑바로 */
.map-stamp-marker,
.map-stamp-marker:hover,
.map-stamp-marker.is-selected { background-color: transparent; border: 0; box-shadow: none; border-radius: 0; }
.map-stamp-marker { position: absolute; top: 0; left: 0; width: 28px; height: 28px; }
.map-stamp-marker::before {
  content: ''; position: absolute; inset: 0; box-sizing: border-box;
  border-radius: 50% 50% 50% 4px; background-color: var(--pin); border: 2px solid #ffffff;
  box-shadow: 0 4px 10px rgba(60, 35, 10, 0.35); transform: rotate(-45deg);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s;
}
.map-stamp-marker:hover::before,
.map-stamp-marker.is-selected::before { background-color: var(--ink); transform: scale(1.22) rotate(-45deg); }
.map-stamp-marker:hover, .map-stamp-marker.is-selected { z-index: 20; }
.map-stamp-marker .marker-number { position: relative; z-index: 1; transform: none; }

/* 카드·상세의 테마·겹침 표시 */
.card-row-menu { flex-wrap: wrap; gap: 4px 6px; }
.card-theme-tag { font-size: 11.5px; color: #7c3aed; background: #f3e8ff; border-radius: 10px; padding: 1px 7px; white-space: nowrap; }
.card-overlap-tag { font-size: 11.5px; color: #1e40af; background: #dbeafe; border-radius: 10px; padding: 1px 7px; white-space: nowrap; font-weight: 600; }
.detail-themes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.detail-theme-tag { font-size: 12.5px; color: #7c3aed; background: #f3e8ff; border-radius: 12px; padding: 3px 10px; text-decoration: none; }
.detail-theme-tag:hover { background: #e9d5ff; }
.rec-count { font-size: 11.5px; color: var(--ink3); font-weight: 500; margin-left: 4px; }
.creator-filter-note { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; font-size: 12.5px; background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; border-radius: 14px; padding: 3px 6px 3px 10px; white-space: nowrap; }
.creator-filter-note button { border: 0; background: #fed7aa; color: #9a3412; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; font-size: 11px; line-height: 20px; padding: 0; }
.region-card-footer { display: flex; gap: 8px; flex-wrap: wrap; }
.region-pill-list .pill[disabled] { cursor: default; }
.search-dropdown { max-height: min(70vh, 520px); overflow-y: auto; }

@media (max-width: 900px) {
  /* 1차 보정의 padding:6px 0 이 .wrap 좌우 여백 14px을 지우던 문제 */
  .site-header .header-inner { padding: 6px 14px; }
  .gnb-inner { padding: 6px 14px 8px; }
  .creator-filter-note { margin: 6px 0 0; }
}

/* v20261109t — 유튜버별 지도 켜기/끄기 */
.yt-toggle-wrap { position: relative; }
.yt-toggle-btn.on { background: var(--ink, #1b1b1b); color: #fff; }
.yt-toggle-panel { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: min(420px, calc(100vw - 32px)); max-height: 60vh; display: flex; flex-direction: column; background: #fff; border: 1px solid rgba(0,0,0,.12); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.16); }
.yt-toggle-panel[hidden] { display: none; }
.yt-toggle-tools { display: flex; gap: 6px; padding: 10px; border-bottom: 1px solid rgba(0,0,0,.08); flex-wrap: wrap; }
.yt-toggle-tools input { flex: 1 1 140px; min-width: 0; padding: 7px 10px; border: 1px solid rgba(0,0,0,.15); border-radius: 8px; font-size: 14px; }
.yt-toggle-list { overflow-y: auto; padding: 4px 0; }
.yt-toggle-item { display: flex; align-items: center; gap: 8px; padding: 7px 12px; cursor: pointer; font-size: 14px; }
.yt-toggle-item:hover { background: rgba(0,0,0,.04); }
.yt-toggle-item img { border-radius: 50%; flex: none; background: #eee; }
.yt-toggle-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yt-toggle-meta { flex: none; color: #888; font-size: 12px; }
.yt-toggle-empty { padding: 12px; color: #888; font-size: 13px; }
/* v20261109t — 지역 드롭다운 2개 */
.region-select { appearance: none; -webkit-appearance: none; padding: 7px 30px 7px 12px; border: 1px solid rgba(0,0,0,.15); border-radius: 999px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23555'/%3E%3C/svg%3E") no-repeat right 12px center; font-size: 14px; font-weight: 600; color: inherit; cursor: pointer; max-width: 46vw; }
.region-select:focus-visible { outline: 2px solid #cf2417; outline-offset: 1px; }
#region-chip-group { gap: 8px; }

/* v20261109z — 모바일 세로 배치: 가게 목록(풀다운) → 지도 → 가게 정보. 바텀시트는 쓰지 않음 */
.list-selected, .list-caret { display: none; }
@media (max-width: 900px) {
  .map-layout { display: flex !important; flex-direction: column; gap: 10px; }
  .panel-list { display: block !important; order: 1 !important; position: static; height: auto; max-height: none; border-radius: 12px; overflow: hidden; }
  .panel-list .panel-header { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; padding: 12px 14px; }
  .panel-list .panel-hint { display: none; }
  .list-selected { display: inline; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; color: #cf2417; }
  .list-caret { display: inline-block; margin-left: auto; font-size: 14px; transition: transform .2s; }
  .panel-list.is-open .list-caret { transform: rotate(180deg); }
  .panel-list .card-scroll-area { display: none; }
  .panel-list.is-open .card-scroll-area { display: block; max-height: 55svh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .panel-map { order: 2 !important; height: 52svh !important; min-height: 320px !important; border-radius: 12px; scroll-margin-top: 8px; }
  .panel-detail { display: block !important; order: 3 !important; position: static; height: auto; max-height: none; border-radius: 12px; }
  .mobile-sheet { display: none !important; }
  .map-brief-chip { display: none !important; }
}
/* v20261109z3 — 유튜버 모음: 지역 필터 + 줄 카드 */
.creators-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.creators-search { flex: 1 1 180px; min-width: 0; max-width: 320px; padding: 7px 12px; border: 1px solid rgba(0,0,0,.15); border-radius: 999px; font-size: 14px; }
.creators-count { color: #777; font-size: 13px; }
.creators-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 8px; }
.creator-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface, #fff); border: 1px solid var(--line, rgba(0,0,0,.1)); border-radius: 12px; min-width: 0; }
.creator-row-avatar { border-radius: 50%; flex: none; background: #eee; object-fit: cover; }
.creator-row-info { flex: 1; min-width: 0; }
.creator-row-name { margin: 0; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creator-row-meta { margin: 2px 0 0; font-size: 12px; color: #777; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creator-row-count { flex: none; text-align: right; line-height: 1.1; }
.creator-row-count strong { font-size: 17px; color: #cf2417; }
.creator-row-count span { font-size: 12px; color: #777; margin-left: 1px; }
.creator-row-actions { flex: none; display: flex; gap: 4px; }
.creators-empty { color: #888; padding: 20px 0; }
@media (max-width: 640px) { .creators-list { grid-template-columns: 1fr; } .creator-row-actions .btn-line { display: none; } }
/* v20261109z4 — 유튜버 겹침 표시: ⭐(2명) ⭐⭐(3명) ⭐⭐⭐(4명) 👑(5명+) */
.marker-overlap { position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translateX(-50%); white-space: nowrap; pointer-events: none; line-height: 1; font-size: 12px; letter-spacing: -1px; color: #f5b301; text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 1px 2px rgba(0,0,0,.35); }
.marker-overlap.is-crown { font-size: 15px; letter-spacing: 0; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.card-overlap-tag .overlap-mark { color: #f5b301; letter-spacing: -1px; }
/* v20261109z5 — 별·왕관을 핀 크기(28px)에 맞춰 작게 */
.marker-overlap { font-size: 8px; bottom: calc(100% - 1px); letter-spacing: -0.5px; }
.marker-overlap.is-crown { font-size: 10px; }
.card-overlap-tag .overlap-mark { font-size: 0.8em; }
/* v20261109z6 — 모바일: 가게 목록 풀다운을 상단 헤더 바로 아래에 계속 붙여 둠(가게를 골라도 사라지지 않음) */
@media (max-width: 900px) {
  .panel-list { position: sticky !important; top: var(--hdr-h, 150px); z-index: 30; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
  .panel-map { scroll-margin-top: calc(var(--hdr-h, 150px) + 58px); }
}
.creator-pending { font-style: normal; font-size: 12px; color: #999; white-space: nowrap; }
/* v20261109z8 — 유튜버 이름표의 지도 켜기/끄기 스위치 */
.yt-switch { flex: none; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; user-select: none; }
.yt-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.yt-switch-track { position: relative; width: 34px; height: 20px; border-radius: 999px; background: #ccc; transition: background .15s; }
.yt-switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.yt-switch input:checked + .yt-switch-track { background: #cf2417; }
.yt-switch input:checked + .yt-switch-track::after { transform: translateX(14px); }
.yt-switch input:disabled + .yt-switch-track { opacity: .4; }
.yt-switch input:focus-visible + .yt-switch-track { outline: 2px solid #cf2417; outline-offset: 2px; }
.yt-switch-text { font-size: 11px; color: #777; }
/* v20261109zb — 스위치 안에 ON/OFF 표시 ('지도' 글자 제거) */
.yt-switch-track { width: 44px; height: 22px; }
.yt-switch-track::after { width: 18px; height: 18px; }
.yt-switch input:checked + .yt-switch-track::after { transform: translateX(22px); }
.yt-switch-track::before { content: 'OFF'; position: absolute; right: 5px; top: 50%; transform: translateY(-50%); font-size: 9px; font-weight: 700; color: #fff; letter-spacing: .2px; }
.yt-switch input:checked + .yt-switch-track::before { content: 'ON'; right: auto; left: 6px; }
.yt-switch-track { background: #8f8f8f; }

/* v20261109zd — 별·왕관을 크고 진하게(진한 금색 + 갈색 테두리) */
.marker-overlap { font-size: 13px; bottom: calc(100% - 2px); letter-spacing: -1px; color: #ffb000; text-shadow: -1px 0 #7a4a00, 1px 0 #7a4a00, 0 -1px #7a4a00, 0 1px #7a4a00, 0 2px 3px rgba(0,0,0,.45); }
.marker-overlap.is-crown { font-size: 17px; letter-spacing: 0; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.card-overlap-tag .overlap-mark { font-size: 1.05em; color: #f0a000; }

/* v20261109ze — 별 단계 칩 */
#star-chip-group .star-mark { color: #f0a000; letter-spacing: -1px; text-shadow: 0 0 1px #7a4a00; }
#star-chip-group .chip.on .star-mark { color: #ffc63a; }

/* v20261109zm — 추천 유튜버 사진·이름 → 그 유튜버 다녀간 곳 */
.rec-go { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.rec-go-avatar { flex: none; border-radius: 50%; line-height: 0; }
.rec-go-avatar:hover .rec-avatar, .rec-go-avatar:focus-visible .rec-avatar { box-shadow: 0 0 0 2px #cf2417; }
.rec-go-name { font-weight: inherit; }
.rec-go-name:hover, .rec-go-name:focus-visible { color: #cf2417; text-decoration: underline; }
.rec-go-arrow { color: #cf2417; font-weight: 700; }

/* v20261109zn — 동 드롭다운: 폰에서 시·도/구·군/동 세 칸이 한 줄에 */
@media (max-width: 640px) {
  #region-chip-group:has(#dong-select) .region-select { max-width: 27vw; padding: 7px 20px 7px 9px; font-size: 13px; background-position: right 7px center; text-overflow: ellipsis; }
}

/* 다중 선택 토글 (2026-11-10) */
.yt-multi { margin-left: auto; font-size: 13px; color: #333; }
.yt-multi-label { margin-left: 4px; white-space: nowrap; }
.yt-multi-hint { margin: -4px 0 12px; font-size: 13px; color: #cf2417; }
.yt-multi-hint:empty { display: none; }

.region-card-rep { margin: 4px 0 10px; font-size: 13px; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.region-card-rep b { color: #cf2417; font-weight: 700; }

#header-region-name { font-weight: 600; }
.hdr-sep { color: #bbb; margin: 0 2px; }
.creator-row-total { color: #888; font-size: 12px; margin-left: 1px; }
/* 2026-11-11 지역 카드 버튼 한 줄 고정 */
.region-card-footer { flex-wrap: nowrap; gap: 6px; }
.region-card-footer .btn { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 8px; padding-right: 8px; text-align: center; justify-content: center; font-size: 13px; }

/* 2026-11-11 로고: 핀+재생 마크 + vlogmap 워드마크 */
.brand-mark { background: #fff; border-color: var(--line); }
.brand-mark svg { display: block; filter: drop-shadow(0 1px 1px rgba(160, 30, 15, .25)); }
.brand-title { display: inline-flex; align-items: baseline; gap: 6px; }
.brand-word { font-family: 'Pretendard', 'Inter', 'Helvetica Neue', Arial, sans-serif; font-size: 19px; font-weight: 800; letter-spacing: -0.04em; color: var(--ink); line-height: 1; }
.brand-word b { font-weight: 800; color: var(--red); }
@media (max-width: 900px) { .brand-word { font-size: 16px; } .brand-mark svg { width: 22px; height: 22px; } }
