body { margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Apple SD Gothic Neo, "Noto Sans KR", sans-serif; }
html, body { height: 100%; overflow: hidden; }
/* Places 템플릿에서 테마의 좌우 여백 제거 */
.page-template-page-places .site,
.page-template-page-places .site-content,
.page-template-page-places .content-area,
.page-template-page-places .site-main,
.page-template-page-places .inside-article,
.page-template-page-places .entry-content,
.page-template-page-places .grid-container,
.page-template-page-places .inside-article .grid-container,
.page-template-page-places .site-content .grid-container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
/* 모바일 브라우저에서 100vh 과대 계산을 피하기 위해 동적 뷰포트 단위 사용 */
#app {
  display: grid;
  grid-template-rows: 1fr;
  height: calc(100vh - var(--app-offset, 0px));   /* 대체값 */
  height: calc(100svh - var(--app-offset, 0px));  /* 모바일에서 더 정확한 작은 뷰포트 높이 */
  height: calc(100dvh - var(--app-offset, 0px));  /* 최신 모바일에서 가장 정확한 동적 높이 */
  width: 100vw;
}
/* 오른쪽 상단 지도 액션 */
.map-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6; /* 지도 위, 호버 창 아래 */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: auto;
}
.map-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.map-fab {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.14);
  background: #111;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0,0,0,.12);
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.map-fab.map-fab-secondary {
  background: #fff;
  color: #111;
  border-color: #ddd;
}
.map-fab:active { transform: translateY(1px); }

.map-search-panel {
  display: none;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
  width: min(240px, 90vw);
  justify-content: flex-start;
  pointer-events: auto;
}
.map-search-panel.is-open { display: grid; }
.map-search-hint {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}
.map-search-example {
  font-size: 12px;
  color: #999;
  line-height: 1.4;
}
.map-search-input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 14px;
  width: 220px;
  box-sizing: border-box;
}
.map-search-input:focus {
  outline: none;
  border-color: #111;
}
.map-search-btn {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}
.map-search-btn:hover { background: #000; }

.muted { color:#666; font-size:13px; }

/* AdvancedMarkerElement용 내 위치 점 */
.my-loc-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #fbbc04;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px rgba(251, 188, 4, 0.25);
}

/* 인포윈도우 닫기 버튼 숨김(호버 전용 사용자 경험) */
.gm-ui-hover-effect { display:none !important; }
/* 마커 호버 미리보기(장소명, 점수, 포스트 수) */
.hover-card {
  padding: 6px 8px;
  min-width: 180px;
  max-width: 240px;
  font-size: 12px;
  color: #222;
}
.hover-thumb {
  width: 100%;
  height: 90px;
  margin-bottom: 6px;
  border-radius: 8px;
  overflow: hidden;
  background: #eef2f7;
}
.hover-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hover-title {
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1.25;
}
.hover-title .hover-type {
  font-style: italic;
  font-weight: 600;
  color: #64748b;
  margin-left: 6px;
}
.hover-address {
  font-size: 12px;
  color: #666;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hover-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #555;
}
.hover-stars {
  letter-spacing: 1px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  color: #222;
  white-space: nowrap;
}
.hover-count { white-space: nowrap; font-weight: 800; }
/* 호버 미리보기 점수 색상(0~100) */
.hover-point { font-weight: 900; }
.hover-point.is-special { color: #7c3aed; } /* 100 (특별) */
.hover-point.is-blue    { color: #1a73e8; } /* 90~99 */
.hover-point.is-green   { color: #188038; } /* 70~89 */
.hover-point.is-yellow  { color: #f29900; } /* 40~69 */
.hover-point.is-red     { color: #d93025; } /* 0~39 */
/* 호버 미리보기 추가 정보(재방문, 포스트 수) */
.hover-sub {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.hover-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #444;
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}

.hover-chip-parking {
  white-space: normal;
  line-height: 1.2;
  flex: 0 0 auto;
}

.hover-chip.is-no {
  background: #f5f5f5;
  color: #777;
  font-weight: 700;
}
/* 레이아웃: 지도 + 좌측 오버레이 사이드바 */
.layout { position: relative; height:100%; width: 100%; }
#map { position:absolute; inset:0; width: 100%; height: 100%; } /* 지도는 항상 전체 크기 유지 */

.sidebar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 360px;
  min-width: 340px;
  max-width: 520px;

  border-right: 1px solid #eee;
  background: #fff;
  overflow: auto;

  transform: translateX(-110%);
  transition: transform 180ms ease;
  z-index: 5;

  /* 가벼운 구분감 */
  box-shadow: 10px 0 30px rgba(0,0,0,.12);
}
.layout.sidebar-open .sidebar { transform: translateX(0); }

.sidebar-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-bottom:1px solid #eee;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.sidebar-handle {
  display: none;
  width: 52px;
  height: 6px;
  border-radius: 999px;
  background: #ddd;
  margin: 2px auto 10px;
  cursor: ns-resize;
  touch-action: none;
  flex: 0 0 100%;
}
.sidebar-title { font-weight: 800; font-size: 14px; }
.sidebar-title .sidebar-type {
  font-style: italic;
  font-weight: 600;
  color: #64748b;
  margin-left: 6px;
}

.sidebar-close {
  border: 1px solid #ddd;
  background: #111;
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}
.sidebar-close:hover { background:#000; }

/* 사이드바 리사이즈 핸들(오른쪽 가장자리 드래그) */
.sidebar-resizer {
  position: absolute;
  top: 0;
  right: -6px;           /* 잡기 쉽게 지도 위로 살짝 겹침 */
  width: 12px;
  height: 100%;
  cursor: ew-resize;
  z-index: 10;
  background: transparent;
  touch-action: none;     /* 터치 드래그 중 스크롤 방지 */
}
.sidebar-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 5px;
  width: 2px;
  height: 100%;
  background: rgba(0,0,0,.08);
}
body.is-resizing,
body.is-resizing * {
  user-select: none !important;
  cursor: ew-resize !important;
}

.sidebar-body { padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); }
.sidebar-body h2 { margin: 0 0 10px 0; font-size: 18px; }


/* 리스트/상세 모드 */
.sidebar-mode { display: block; }
.sidebar[data-mode="list"] .sidebar-mode-detail { display: none; }
.sidebar[data-mode="detail"] .sidebar-mode-list { display: none; }
.sidebar[data-mode="list"] .sidebar-mode-list { display: block; }
.sidebar[data-mode="detail"] .sidebar-mode-detail { display: block; }

.sidebar-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.list-thumb {
  width: 100%;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  background: #eef2f7;
}
.list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.list-address {
  font-size: 12px;
  color: #666;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-item {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
}
.list-item:hover {
  border-color: #86d17a;
  background: #f2fbf1;
  box-shadow: 0 6px 16px rgba(134,209,122,.25);
}
.list-title {
  font-weight: 900;
  font-size: 14px;
  color: #111;
}
.list-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.list-type {
  font-size: 12px;
  font-weight: 800;
  color: #047857;
  background: #ecfdf3;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}
.list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.list-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #f3f4f6;
  color: #444;
}
.list-chip.is-no {
  background: #f5f5f5;
  color: #777;
  font-weight: 700;
}
.list-footer {
  text-align: center;
  padding: 8px 0 2px;
}

.sidebar-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #ddd;
  background: #f8f8f8;
  color: #111;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  margin-bottom: 10px;
}

/* ===== 장소 사이드바 카드(마커 상세) ===== */
.place-card {
  display: flex;
  flex-direction: column;
  gap: 14px;

  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;

  padding: 14px;
  margin-bottom: 16px;

  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

/* 마지막 카드 아래 여백 제거 */
.place-card:last-child { margin-bottom: 0; }

.place-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #f2f2f2;
}

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

.place-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.place-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
}

.place-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: #777;
  font-weight: 700;
  flex-wrap: wrap;
}
.place-address {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.place-parking {
  font-size: 13px;
  color: #333;
  font-weight: 800;
}
.place-short-review {
  font-size: 13px;
  color: #444;
  line-height: 1.45;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f7f7f7;
  border: 1px solid #eee;
}
.place-short-review-label {
  font-size: 12px;
  font-weight: 800;
  color: #666;
  margin-bottom: 4px;
}

.place-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.place-tags .tag {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #555;
  font-weight: 700;
}

.place-excerpt {
  font-size: 14px;
  line-height: 1.5;
  color: #444;
  margin: 0;
}

.place-ratings {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fafafa;
  border: 1px solid #eee;
}

.rating-row {
  display: grid;
  grid-template-columns: 96px 1fr 40px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.rating-label { color: #555; font-weight: 800; }
.rating-stars {
  letter-spacing: 1px;
  display: inline-flex;
  gap: 2px;
}
.rating-stars .star {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1;
}
.rating-stars .star.is-filled {
  color: #f59e0b;
}
.rating-score { text-align: right; color: #666; font-weight: 800; }
/* 감점 별(빨간색) */
.rating-stars.is-penalty {
  color: #d93025;
}
.rating-stars.is-penalty .star.is-filled {
  color: #d93025;
}

/* 감점 사유 박스 */
.rating-reason {
  grid-column: 1 / -1; /* 한 줄 전체 사용 */
  background: #fff5f5;
  border: 1px solid rgba(217,48,37,.25);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: #444;
}
.rating-reason .label {
  font-weight: 900;
  margin-bottom: 4px;
  color: #d93025;
}
.rating-bool {
  grid-column: 2 / span 2; /* 별/점수 칸을 통합해서 텍스트 표시 */
  font-weight: 800;
  color: #222;
  line-height: 1.2;
}
.rating-bool.is-no {
  color: #777;
  font-weight: 700;
}
.place-link {
  align-self: stretch;
  display: block;
  text-align: center;

  padding: 12px 14px;
  border-radius: 12px;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;

  box-sizing: border-box; /* 핵심 */
}
/* 카드 하단 총점 */
/* 카드 하단 점수(100점 만점) - 한 줄 */
.place-total {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed #e5e7eb;

  display: flex;
  align-items: center;
  justify-content: flex-end; /* 오른쪽 정렬 */
  gap: 8px;

  font-size: 14px;
}

.place-total .label {
  font-weight: 800;
  color: #666;
}

.place-total .score {
  font-size: 20px;
  font-weight: 950;
  color: #111;
  letter-spacing: -0.3px;
}
/* 총점 구간별 색상 */
.place-total .score.is-special { color: #7c3aed; } /* 100+ (특별) */
.place-total .score.is-blue    { color: #1a73e8; } /* 90~99 */
.place-total .score.is-green   { color: #188038; } /* 70~89 */
.place-total .score.is-yellow  { color: #f29900; } /* 40~69 (가독성 위해 진한 노랑/오렌지) */
.place-total .score.is-red     { color: #d93025; } /* 0~39 (기준 미달) */

.place-total .unit {
  font-weight: 800;
  color: #777;
}

.place-link:hover {
  background: #000;
}

/* 모바일: 좌측 사이드바를 하단 시트로 전환 */
@media (max-width: 860px) {
  .sidebar {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;

    width: 100%;
    height: 50vh;
    padding-bottom: env(safe-area-inset-bottom);
    max-width: none;
    min-width: 0;

    border-right: none;
    border-top: 1px solid #eee;

    transform: translateY(110%);
    transition: transform 200ms ease;

    /* 위쪽 그림자 */
    box-shadow: 0 -10px 30px rgba(0,0,0,.12);
  }

  .layout.sidebar-open .sidebar { transform: translateY(0); }

  /* 모바일에서는 너비 드래그가 의미 없어 핸들 숨김 */
  .sidebar-resizer { display: none; }
  .sidebar-handle { display: block; }
  .sidebar-header { cursor: ns-resize; }
}
