/* 장소·탐색·동네·행사 화면 스타일. 공통 클래스(app.css)를 먼저 재사용한다. */

/* ───────── 공통 장소 썸네일 (CONTRACT §1: places.css 담당) ───────── */
.place-art {
  display: grid; place-items: center;
  width: 72px; height: 80px; flex: none;
  border-radius: 15px;
  background: #efedff; color: var(--primary);
  overflow: hidden;
}
.place-art .icon { width: 29px; height: 29px; stroke-width: 1.7; }
.place-art.mint { background: #e7f8f2; color: #269878; }
.place-art.peach { background: #fff0e5; color: #d47b43; }
.place-art.blue { background: #ebf3ff; color: #4c7ccf; }
.place-art.lg { width: 100%; height: 180px; border-radius: 20px; }
.place-art.lg .icon { width: 44px; height: 44px; }
.place-art img { width: 100%; height: 100%; object-fit: cover; }

/* ───────── 탐색 화면 ───────── */
.explore-hero { padding-top: 18px; }
.explore-hero h1 { margin-bottom: 4px; }
.explore-tools { display: flex; gap: 8px; margin: 14px 0 12px; flex-wrap: wrap; }
.chip-tool {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 999px;
  background: white; color: var(--ink-soft);
  font-size: 12px; font-weight: 720; text-decoration: none;
}
.chip-tool .icon { color: var(--muted); }
.filter-count { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--primary); color: white; font-size: 10px; }
.food-filter-row { margin-top: 2px; margin-bottom: 8px; }

/* 테마 추천 */
.theme-feature { margin-top: 8px; }
.theme-feature .theme-desc { margin: 0 0 14px; color: rgba(255,255,255,.82); font-size: 13px; line-height: 1.6; }
.theme-actions { gap: 10px; flex-wrap: wrap; }
.theme-feature .feature-link { font-size: 12px; min-height: 40px; padding: 0; border: 0; background: transparent; color: #fff; cursor: pointer; }
.theme-feature .feature-link.ghost { color: rgba(255,255,255,.75); }

.list-note { display: flex; align-items: center; gap: 6px; margin: 2px 0 12px; color: var(--muted); font-size: 12px; }
.list-note .icon { flex: none; }
.more-btn { width: 100%; margin-top: 16px; }

/* ───────── discover-card / place-card (디자인 템플릿 기반) ───────── */
.discover-list { display: grid; gap: 13px; }
.discover-card {
  position: relative;
  display: flex; align-items: flex-start; gap: 15px;
  min-height: 112px; padding: 15px;
  border: 1px solid var(--line); border-radius: 20px; background: white;
}
.discover-card .discover-info { min-width: 0; flex: 1; }
.discover-info .kind { display: block; color: var(--primary); font-size: 10px; font-weight: 750; margin-bottom: 6px; letter-spacing: .1px; }
.discover-info h3 { margin: 0 0 6px; font-size: 14.5px; letter-spacing: -.5px; line-height: 1.35; }
.discover-info p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.5; }

/* 카드 본문 링크 + 저장 버튼 분리 */
.place-card { align-items: stretch; }
.place-card-body { display: flex; gap: 15px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.place-card-side { flex: none; }
.place-card-foot { position: absolute; right: 14px; bottom: 12px; }
.place-badge-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 6px; }
.place-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 740; }
.place-badge.primary { background: var(--primary-soft); color: var(--primary); }
.place-badge.ok { background: #e7f8f2; color: #1f8f6b; }
.place-badge.warn { background: #fff2e2; color: #c47a28; }
.place-badge.dark { background: #1c2033; color: white; }
.place-badge.muted-badge { background: #f1f2f6; color: #8a90a0; }
.place-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 7px !important; color: var(--muted-light); font-size: 11px; }
.place-meta-dot { position: relative; }
.place-reason { display: flex; align-items: center; gap: 5px; margin-top: 7px !important; color: var(--primary); font-size: 11px !important; font-weight: 600; }
.place-reason .icon { flex: none; }
.place-add-btn { white-space: nowrap; }

.save-button {
  display: grid; place-items: center; align-self: flex-start;
  width: 32px; height: 32px; border: 0; border-radius: 10px;
  color: #b4b6c2; background: transparent;
}
.save-button .icon { width: 19px; height: 19px; }
.save-button.saved { color: var(--primary); }
.save-button.saved .icon { fill: #ebe9ff; }
.icon-button.saved { color: var(--primary); }
.icon-button.saved .icon { fill: #ebe9ff; }

.district-card, .event-card { align-items: center; }
.district-card, .event-card { text-decoration: none; color: inherit; }

/* ───────── 장소 상세 ───────── */
.place-title-head { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-hero { margin: 4px 0 16px; }
.place-name { margin: 2px 0 8px; font-size: 24px; letter-spacing: -1px; line-height: 1.3; font-weight: 850; }
.place-rating-line { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.place-summary { margin: 4px 0 16px; font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.district-desc, .owner-story { font-size: 14px; line-height: 1.8; color: var(--ink-soft); }

.section { margin-top: 26px; }
.reason-card { margin: 4px 0 16px; padding: 14px 16px; }
.reason-toggle { display: flex; align-items: center; gap: 7px; width: 100%; border: 0; background: transparent; color: var(--primary); font-size: 13px; font-weight: 740; }
.reason-list { margin: 10px 0 0; padding-left: 18px; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }

.menu-detail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.menu-detail-list li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.menu-name { font-size: 14px; font-weight: 640; }
.menu-price { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }

.today-hours { margin-bottom: 12px; }
.hours-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hours-table th { width: 56px; text-align: left; padding: 7px 0; color: var(--muted); font-weight: 600; }
.hours-table td { padding: 7px 0; color: var(--ink-soft); }
.hours-table tr.today th, .hours-table tr.today td { color: var(--primary); font-weight: 740; }
.hours-table tr.closed td { color: #c05656; }
.hours-table tr.unknown td { color: var(--muted-light); }

.place-address { font-size: 14px; line-height: 1.6; margin: 0 0 12px; }
.place-mini-map { width: 100%; height: 160px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-soft); }

.post-card { margin-bottom: 10px; }
.post-card strong { display: block; font-size: 14px; margin-bottom: 4px; }
.post-card p { margin: 0 0 6px; font-size: 13px; color: var(--ink-soft); line-height: 1.6; }

.rating-dist { display: grid; gap: 6px; margin-bottom: 14px; }
.dist-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.dist-bar { flex: 1; height: 8px; border-radius: 6px; background: #f0f1f5; overflow: hidden; }
.dist-bar i { display: block; height: 100%; background: var(--primary-mid); }
.mini-review { padding: 12px 0; border-top: 1px solid var(--line); }
.mini-review-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 6px; }
.mini-review .stars { color: #f0a800; font-size: 13px; letter-spacing: 1px; }
.mini-review p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--ink-soft); }

.local-currency { margin-top: 18px; }
.source-section { margin-top: 24px; }
.source-section .text-action { display: inline-flex; align-items: center; gap: 4px; margin-right: 14px; }

.place-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.place-actions .primary-button { flex: 1 1 100%; }
.place-actions .secondary-button { flex: 1; justify-content: center; }
.place-links { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.place-links .ghost-button, .place-links .primary-button, .place-links .secondary-button { justify-content: center; }
.place-links .tiny { color: var(--muted-light); }

/* 행사·동네 */
.event-kv, .kv { margin-top: 8px; }
.session-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.8; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 18px; }
.theme-chip { padding: 6px 12px; border-radius: 999px; background: var(--surface-soft); color: var(--ink-soft); font-size: 12px; font-weight: 640; }
.district-actions { gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.district-actions .secondary-button, .district-actions .primary-button { flex: 1; justify-content: center; }

/* 추가 모드 배너 */
.add-banner { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }

/* 추가 흐름 미리보기 */
.add-preview { margin-top: 14px; }
.add-preview strong { display: block; margin-bottom: 8px; font-size: 14px; }
.issue-list { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.7; }
.issue-list.danger-list { color: #c05656; }
.issue-list.warn-list { color: #b87820; }

/* 작은 화면 가로 넘침 방지 */
@media (max-width: 380px) {
  .place-card-body { gap: 12px; }
  .place-art { width: 64px; height: 72px; }
}

/* ───────── '이 근처에서' 가로 스크롤 ───────── */
.nearby-section { margin: 6px 0 4px; }
.nearby-scroll {
  display: flex; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 2px 0 10px; margin: 0 -26px; padding-left: 26px; padding-right: 26px;
  -webkit-overflow-scrolling: touch;
}
.nearby-scroll::-webkit-scrollbar { height: 0; }
.nearby-scroll .place-card {
  flex: 0 0 82%; max-width: 320px; scroll-snap-align: start;
}

/* ───────── 온라인 언급량 출처 ───────── */
.place-mention {
  display: flex; align-items: center; gap: 5px;
  margin-top: 6px !important; color: var(--muted-light);
  font-size: 10.5px !important; font-weight: 600;
}
.place-mention .icon { flex: none; }

/* 많이 알려진 곳 배지(dark)와 덜 알려진(primary) 구분은 badge 클래스로 처리 */

/* 비활성 필터 안내 */
.check-row.is-disabled label { color: var(--muted-light); }
.check-row.is-disabled .hint { margin: 4px 0 0 24px; color: var(--muted-light); }

/* ───────── PC(넓은 화면) 2~3열 그리드 ───────── */
@media (min-width: 900px) {
  .discover-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}
@media (min-width: 1180px) {
  .discover-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .nearby-scroll .place-card { flex-basis: 320px; }
}
