/* LeafMe · 갈색 고딕 판타지. 지도/인증/데이터 동작과 분리된 웹 표현 계층. */
/* 제목 글꼴 LeafMe Serif: NAVER 마루 부리를 두 파일로 나눈 OFL 수정본(T3-4).
   출처·라이선스·수정 내용: /fonts/leafme-serif/SOURCE.txt, OFL.txt. 재생성: scripts/ui/build-font-subsets.py
   - rare(드문 한글 8,822자)를 먼저, common(그 밖의 모든 글자)을 나중에 선언한다. 브라우저는 나중 선언을 먼저 쓰므로
     흔한 글자만 있는 화면은 common만 받고, 드문 글자가 있을 때만 rare를 받는다(Chrome에서 확인). */
@font-face {
  font-family: "LeafMe Serif";
  src: url("/fonts/leafme-serif/LeafMeSerif-Regular-rare.woff2") format("woff2");
  unicode-range: U+AC00-D7A3;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "LeafMe Serif";
  src: url("/fonts/leafme-serif/LeafMeSerif-Regular-common.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "LeafMe Serif";
  src: url("/fonts/leafme-serif/LeafMeSerif-SemiBold-rare.woff2") format("woff2");
  unicode-range: U+AC00-D7A3;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "LeafMe Serif";
  src: url("/fonts/leafme-serif/LeafMeSerif-SemiBold-common.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
:root {
  color-scheme: light;
  --lm-serif: "LeafMe Serif", "Noto Serif KR", serif;
  --gnb-height: 68px;
  --left-panel-width: 380px;
  --left-panel-peek-width: 30px;
}

html, body {
  color: var(--color-text);
  background: var(--color-surface-alt) url("/images/parchment-pattern.svg");
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body { line-height: 1.6; }
button, input, select, textarea { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
input, select { accent-color: var(--color-link); }
::selection { color: #fff8e8; background: #89603d; }
:focus-visible { outline: 3px solid #9a713e; outline-offset: 4px; }
button:disabled { cursor: not-allowed; }
img { max-width: 100%; }
.lm-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .13em; }

.gnb {
  height: var(--gnb-height);
  padding: 0 36px;
  color: var(--color-on-dark);
  background: linear-gradient(180deg, #403127, var(--color-surface-dark));
  border-bottom: 1px solid var(--color-accent);
  box-shadow: 0 4px 0 #49372a, 0 5px 0 var(--color-accent), 0 8px 22px #30251e20;
}
.gnb::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 10px;
  right: 10px;
  border: 1px solid #b4925d35;
  pointer-events: none;
}
.gnb-left { gap: clamp(24px, 4vw, 70px); }
.brand { gap: 11px; }
.brand-logo {
  width: 32px;
  height: 39px;
  border-radius: 0;
  font-size: 0;
  background: url("/images/leafme-crest.svg") center / contain no-repeat;
}
.brand-name {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--lm-serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .04em;
}
.brand-name::after {
  content: "L E A F M E";
  color: var(--color-border-strong);
  font: 9px Georgia, serif;
  letter-spacing: .16em;
}
.gnb-nav { gap: 4px; margin-left: 0; }
.gnb-link {
  position: relative;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 12px 17px;
  background: none;
  color: var(--color-on-dark-muted);
  font-size: 13px;
  font-weight: 500;
}
.gnb-link:hover { background: #c3a16a12; color: #fff4d8; }
.gnb-link.active {
  background: linear-gradient(180deg, #b9945330, #b9945310);
  border-color: #bda07260;
  color: #f5dfaf;
}
.gnb-link.active::after {
  content: "◆";
  position: absolute;
  bottom: -8px;
  left: calc(50% - 3px);
  color: #c2a16a;
  background: var(--color-surface-dark);
  font-size: 7px;
  line-height: 12px;
}
.gnb-login, .gnb-login.active {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 19px;
  color: var(--color-on-dark);
  border: 1px solid var(--color-accent);
  background: #6e50302e;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
}
.gnb-login:hover { color: #fff7e9; background: #92704140; }

/* 발견의 지도: 지도는 실제 정보를 그대로, 주변 UI는 지도책처럼. */
#app { border-top: 5px solid transparent; background: var(--color-surface-alt); }
.panel.left {
  background: var(--color-surface) url("/images/parchment-pattern.svg");
  border-right: 1px solid var(--color-accent);
  box-shadow: 5px 0 0 #bda57a40, 8px 0 28px #30251e20;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-strong) var(--color-surface-alt);
}
.map-story-intro {
  position: relative;
  height: 76px;
  overflow: hidden;
  background: #634b31;
  border-bottom: 3px double var(--color-accent);
}
.map-story-intro::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid #e5c78c80;
  pointer-events: none;
}
.map-story-intro > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 5%; }
.map-story-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 16px;
  color: #fff4da;
  background: linear-gradient(90deg, #30211699, #30211638 55%, #30211608);
  text-shadow: 0 1px 3px #21160ea6;
}
.map-story-title {
  margin-bottom: 3px;
  color: #ffe2a6;
  font: 600 17px/1.35 var(--lm-serif);
  letter-spacing: .02em;
}
.map-story-copy .lm-eyebrow { color: #fff0d4; font: 400 15px/1.4 var(--lm-serif); letter-spacing: 0; }
.brand-name, .map-story-copy, .panel-header h1, .detail-title-wrap, .region-picker-head h3,
.gate-intro-brand { font-synthesis: none; }
.panel-header {
  padding: 10px 14px;
  background: #fbf6ebf7;
  border-bottom: 1px solid var(--color-border);
}
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel-heading .search-scope-switch { flex-shrink: 0; min-height: 28px; }
.panel-header h1 { font-family: var(--lm-serif); font-size: 18px; font-weight: 600; line-height: 1.5; }
.panel-header p { margin-top: 3px; color: var(--color-text-muted); font-size: 11px; line-height: 1.5; }
.list-filters { margin-top: 7px; grid-template-columns: 1fr 1fr; gap: 7px 5px; }
.search-input, .type-filter-list, .map-shortcuts { grid-column: 1 / -1; }
.search-input {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text);
  background: var(--color-surface);
  font-size: 12px;
  box-shadow: inset 0 2px 5px #6f512609;
}
.search-input::placeholder { color: var(--color-text-subtle); }
.search-input:focus { border-color: var(--c-brown-550); box-shadow: 0 0 0 3px #aa82501c; }
.search-scope-switch { gap: 5px; min-height: 20px; }
.search-scope-label { font-size: 10px; font-weight: 500; color: var(--color-text-subtle); }
.search-scope-label.is-active { color: var(--color-link); font-weight: 700; }
.search-scope-track { height: 20px; width: 36px; border-color: #c2ac89; background: var(--color-surface-sunken); }
.search-scope-thumb { width: 14px; height: 14px; background: var(--color-surface); box-shadow: 0 1px 3px #5c442240; }
.search-scope-input:checked + .search-scope-track { border-color: #937043; background: #b29363; }
.search-scope-input:checked + .search-scope-track .search-scope-thumb { transform: translateX(16px); }
.search-scope-input:focus-visible + .search-scope-track { outline-color: #9a713e; }
.type-filter-list { gap: 6px; }
.type-filter-item { position: relative; gap: 0; }
.type-filter-item > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.type-filter-item .type-tag {
  padding: 5px 9px;
  min-height: 30px;
  background: var(--color-surface-alt);
  color: #66533c;
  border: 1px solid var(--color-border-soft);
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  gap: 4px;
}
.type-filter-item input:checked + .type-tag { background: var(--color-surface-sunken); border-color: var(--color-accent); color: var(--color-text-strong); }
.type-filter-item input:focus-visible + .type-tag { outline: 2px solid var(--c-brown-550); outline-offset: 2px; }
.type-filter-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--color-border-strong);
  border-radius: 3px;
  background: var(--color-surface-alt);
  color: #66533c;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}
.type-filter-all::before { content: ""; width: 11px; height: 11px; border: 1px solid currentColor; border-radius: 2px; }
.type-filter-all[aria-pressed="true"] { color: #fff7e5; border-color: var(--color-link); background: #80613c; }
.type-filter-all[aria-pressed="true"]::before { content: "✓"; display: grid; place-items: center; font-size: 10px; line-height: 1; }
.type-filter-all[aria-pressed="mixed"]::before { background: linear-gradient(currentColor, currentColor) center / 7px 2px no-repeat; }
.type-filter-all:hover { box-shadow: inset 0 0 0 1px var(--color-border-strong); }
.type-filter-all:focus-visible { outline: 2px solid var(--c-brown-550); outline-offset: 2px; }
.filter-type-icon { width: 17px; height: 17px; }
.place-list { padding: 8px 14px 30px; counter-reset: place; }
.place-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 8px;
  border-bottom: 1px solid var(--color-border-soft);
  background: transparent;
}
/* 항목 안의 버튼이 클릭·키보드 대상(T4-6 접근성). 모양은 이전 항목 레이아웃과 같다. */
.place-item-button {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.place-item-button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; border-radius: 2px; }
.place-item-copy, .place-title, .place-meta { display: block; }
.place-item:hover { background: var(--color-surface-alt); }
.place-item.active { background: var(--color-surface-sunken); box-shadow: inset 3px 0 #926c38; }
.place-list-icon { width: 40px; height: 44px; padding: 8px; border: 1px solid var(--color-border); background: var(--color-surface-alt); border-radius: 16px 16px 3px 3px; flex-shrink: 0; }
.place-title { font-size: 15px; line-height: 1.5; color: #43301f; }
.place-meta { color: var(--color-text-subtle); margin-top: 5px; font-size: 11px; }
.empty { margin: 20px 0; padding: 24px 12px; color: var(--color-text-muted); line-height: 1.8; font-size: 13px; }
.panel-slide-toggle, .detail-panel-toggle {
  border: 1px solid var(--color-accent);
  background: var(--color-surface-sunken);
  border-radius: 3px;
  box-shadow: 2px 3px 9px #39251425, inset 0 0 0 3px var(--color-surface-alt);
}
.panel-slide-toggle:hover, .detail-panel-toggle:hover { background: var(--color-surface-alt); }
#app.panel-collapsed .panel-slide-toggle, #app.detail-collapsed .detail-panel-toggle { animation: none; }
.panel-slide-toggle-icon, .detail-panel-toggle-icon { filter: sepia(1) saturate(.6); }
.map-page #app {
  position: fixed;
  inset: var(--gnb-height) 0 0;
  height: auto;
  min-height: 0;
  margin-top: 0;
  overflow: clip;
}
.detail-overlay { background: var(--color-surface-alt); border-color: var(--color-border-strong); }
.detail-head { padding: 20px; background: #f9f2e5f5; border-bottom: 3px double var(--color-border-strong); }
.detail-title-wrap { font-family: var(--lm-serif); font-size: 23px; }
.place-type-title-icon { border-color: var(--color-border); background-color: var(--color-surface-alt); border-radius: 10px 10px 3px 3px; }
.detail-body { margin: 16px 20px; padding: 17px; border: 1px solid var(--color-border); border-radius: 4px; background: var(--color-surface); }
.detail-address { margin: 14px 20px 0; color: var(--color-text-muted); }
.detail-close { color: var(--color-link); background: var(--color-surface-alt); border: 1px solid var(--color-border); border-radius: 3px; }
.detail-close:hover { background: var(--color-surface-sunken); }
.detail-close-x { border: 0; background: transparent; }
.detail-title-favorite-btn, .detail-title-favorite-heart, .detail-title-favorite-count { color: var(--color-danger); }
.stat-chip { padding: 6px 9px; color: var(--color-link); border-color: var(--color-border); border-radius: 3px; background: var(--color-surface-alt); }
.stat-chip strong { color: var(--color-accent-deep); }
.type-tag { color: var(--color-link); background: var(--color-surface-alt); border-color: var(--color-border); border-radius: 3px; }
.place-description { background: var(--color-surface); border-color: var(--color-border-soft); border-radius: 3px; padding: 16px; }
.place-description-paragraph { color: #64513b; line-height: 1.9; }
.detail-primary-btn, .region-move-btn {
  border: 1px solid #644528;
  border-radius: 3px;
  color: #fff2d7;
  background: linear-gradient(180deg, #896340, #6c4a2f);
  box-shadow: inset 0 0 0 2px #e0bc7925;
}
.detail-primary-btn:hover, .region-move-btn:hover:not(:disabled) { background: #644528; }
.roadview-status, .region-picker-status { color: var(--color-text-muted); }
.roadview-stage { margin: 0 20px; border: 1px solid var(--color-border-strong); border-radius: 4px; overflow: hidden; }
.roadview-fallback { background: #e5d3af; }
.roadview-fallback img { object-fit: cover; image-rendering: auto; }
.roadview-illustration-label { position: absolute; bottom: 10px; left: 10px; right: 10px; padding: 5px 8px; color: #fff4db; background: #3f2d1dc9; font-size: 10px; text-align: center; }
.region-picker-toggle { background: #493424; color: var(--color-on-dark); border: 1px solid var(--color-accent); border-radius: 4px; box-shadow: 0 5px 18px #35291f30, inset 0 0 0 3px #b18c5525; }
.region-picker-toggle:hover { background: #644a30; }
.region-picker-toggle-icon { background-image: url("/images/place-types/default.svg"); filter: brightness(1.9); }
.region-picker-panel { background: var(--color-surface); border-color: var(--color-accent); border-radius: 5px; padding: 20px; box-shadow: 0 18px 44px #392b2040, inset 0 0 0 4px var(--color-border-soft); }
.region-picker-head h3 { font-family: var(--lm-serif); font-size: 21px; }
.region-picker-path { color: var(--color-link); }
.region-picker-column label { color: var(--color-text-muted); }
.region-picker-column select { border-color: var(--color-border); border-radius: 3px; background: var(--color-surface); color: var(--color-text-strong); }

/* 장소 상세 공유 아이콘(제목 옆, 2026-11-10)과 내 위치 버튼 (2026-11-07 UX 개편 B-9) */
.detail-title-share-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.detail-title-share-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.detail-title-share-btn:hover { background: var(--color-surface-alt); color: var(--color-text-strong); }
.detail-title-share-btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.detail-share-feedback { margin-top: 2px; }
.map-my-location {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-text-strong);
  box-shadow: 0 2px 8px #30251e33;
  cursor: pointer;
}
.map-my-location[hidden] { display: none; }
.map-my-location svg { width: 22px; height: 22px; }
.map-my-location:disabled { opacity: .6; }

/* 넓게 본 지도의 시·도별 장소 수(B-5)와 가까이 본 지도의 장소 이름표(B-6) */
.map-region-count {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 64px;
  padding: 6px 10px 7px;
  border: 1px solid #8f6b3c;
  border-radius: 10px;
  background: #fffaf0;
  color: #3e2d1f;
  font: inherit;
  line-height: 1.2;
  box-shadow: 0 3px 10px #30251e40;
  cursor: pointer;
}
.map-region-count:hover, .map-region-count:focus-visible { background: #f6e7c8; }
.map-region-count-name { font-size: 13px; font-weight: 700; }
.map-region-count-value { font-size: 12px; font-weight: 700; color: #8a5a22; }
.region-item-badge {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  background: var(--color-surface-alt);
  color: var(--color-text-strong);
  font-size: 12px;
  font-weight: 700;
}
.map-place-label {
  max-width: 140px;
  margin-top: 2px;
  padding: 2px 6px;
  overflow: hidden;
  border: 1px solid #d8c29a;
  border-radius: 4px;
  background: #fffaf0e6;
  color: #3e2d1f;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
}

/* 입장 무료 조건과 나들이 바로가기(B-7, C-11): 한 줄, 넘치면 가로 스크롤 */
.map-shortcuts {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: thin;
}
.map-shortcut {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 4px 11px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.map-shortcut:hover { border-color: var(--color-border-strong); }
.map-shortcut[aria-pressed="true"] {
  border-color: var(--color-surface-dark);
  background: var(--color-surface-dark);
  color: var(--color-on-dark);
}
/* 데스크톱은 마우스 가로 스크롤이 불편하므로 줄바꿈한다. 모바일(900px 이하)은 한 줄 가로 스크롤 */
@media (min-width: 901px) {
  .map-shortcuts { flex-wrap: wrap; overflow: visible; }
}
.map-shortcut-free[aria-pressed="false"]::before { content: "+ "; }
.map-shortcut-free[aria-pressed="true"]::before { content: "✓ "; }

@media (min-width: 1400px) {
  :root { --left-panel-width: 400px; }
}
@media (max-width: 1000px) {
  .gnb { padding: 0 20px; }
  .gnb-left { gap: 20px; }
  .gnb-link { padding: 10px 12px; }
}
@media (max-width: 900px) {
  /* 모바일 상단 메뉴: 압축 2줄(T4-6 A안, 2026-11-04 채택). 높이 110→84px, 메뉴 글씨 11→13px */
  :root { --gnb-height: 84px; --mobile-sheet-peek-height: 120px; }
  .gnb { height: var(--gnb-height); align-items: flex-start; padding: 7px 14px 0; }
  .gnb::after { inset: 4px 5px; }
  .gnb-left { display: block; }
  .brand-logo { width: 22px; height: 27px; }
  .brand-name { font-size: 16px; gap: 4px; }
  .brand-name::after { display: none; }
  .gnb-right { margin-top: 0; }
  .gnb-login { padding: 3px 11px; min-height: 28px; font-size: 12px; }
  .gnb-nav { position: absolute; bottom: 6px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 2px; }
  .gnb-link { padding: 7px 8px; font-size: 13px; white-space: nowrap; }
  .gnb-link.active::after { bottom: -5px; }
  #app { min-height: 0; }
  .panel.left { border-top: 3px double var(--color-border-strong); border-radius: 12px 12px 0 0; }
  .map-story-intro { display: none; }
  .panel-header { padding: 10px 12px 8px; }
  .panel-header h1 { font-size: 17px; }
  .panel-header p { margin-top: 3px; }
  .list-filters { gap: 6px; margin-top: 6px; }
  .search-scope-label { font-size: 10px; }
  .search-input { min-height: 36px; }
  .type-filter-list { flex-wrap: nowrap; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: thin; }
  .type-filter-item { flex: 0 0 auto; }
  .place-list { padding: 0 12px 20px; }
  .place-item { padding: 14px 5px; }
  .panel-slide-toggle, .detail-panel-toggle { border-radius: 5px; }
  .detail-overlay, .detail-head { border-radius: 10px 10px 0 0; }
  .detail-head { padding: 16px; }
  .detail-body { margin: 12px; padding: 12px; }
  .detail-title-wrap { font-size: 20px; }
  .region-picker-toggle { border-radius: 4px; }
  .region-picker-panel { padding: 14px; }
  .region-picker-column select { height: min(30dvh, 200px); }
}
@media (max-width: 900px) and (max-height: 650px) {
  .panel-header { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 화면 상태 표시(T3-5, public/shared/status.js) */
.lm-state { display: grid; justify-items: center; gap: 8px; padding: 28px 16px; border: 1px dashed var(--color-border); border-radius: 10px; background: var(--color-surface); text-align: center; color: var(--color-text); }
.lm-state--error { border-style: solid; border-color: var(--color-border-strong); background: var(--color-surface-alt); }
.lm-state-title { margin: 0; font-weight: 700; color: var(--color-text-strong); }
.lm-state-message { margin: 0; max-width: 46ch; font-size: 13px; line-height: 1.6; color: var(--color-text-muted); }
.lm-state-retry { margin-top: 4px; padding: 8px 18px; border: 1px solid var(--color-surface-dark); border-radius: 6px; background: var(--color-surface-dark); color: var(--color-on-dark); font: inherit; font-size: 14px; cursor: pointer; }
.lm-state-retry:hover { background: var(--color-text-strong); }
.lm-state-retry:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.lm-state-spinner { width: 22px; height: 22px; border: 3px solid var(--color-border-soft); border-top-color: var(--color-accent); border-radius: 50%; animation: lm-spin 0.9s linear infinite; }
@keyframes lm-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lm-state-spinner { animation: none; border-top-color: var(--color-border-strong); } }

/* 장소 상세: 방문 정보 (T5-5, 2026-11-10 개편) */
/* 방문 정보·장소 설명·예상 스탯은 같은 카드 모양(2026-11-12). 바깥 상자 없이 카드끼리 간격만 둔다. */
.place-facts,
.place-description-card,
.detail-body .visit-stats {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--color-border-soft);
  border-radius: 14px;
  background: var(--color-surface);
  box-shadow: 0 1px 2px #30251e14, 0 6px 18px #30251e0d;
}
.pf-title { margin: 0 0 12px; font-family: var(--lm-serif); font-size: 17px; color: var(--color-text-strong); }
.place-facts ul { list-style: none; margin: 0; padding: 0; }
.pf-icon { flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--color-accent); }
.pf-text { display: grid; gap: 2px; min-width: 0; }
.pf-label { font-size: 12px; font-weight: 700; color: var(--color-text-muted); letter-spacing: .01em; }
.pf-value { font-size: 14px; line-height: 1.55; color: var(--color-text-strong); white-space: pre-line; overflow-wrap: anywhere; }
.pf-value--check { color: var(--color-text-muted); font-style: italic; }
.pf-link { color: var(--color-link); text-decoration: none; font-weight: 700; }
.pf-link:hover { text-decoration: underline; }
.pf-tag { justify-self: start; margin-top: 2px; padding: 1px 7px; border-radius: 999px; background: var(--color-surface-alt); color: var(--color-text-muted); font-size: 11px; font-weight: 600; }
.pf-key { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pf-tile--wide { grid-column: 1 / -1; }
.pf-tile {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 10px;
  background: var(--color-surface-alt);
}
.pf-tile .pf-icon { width: 22px; height: 22px; margin-top: 1px; }
.pf-list { margin-top: 6px !important; }
.pf-key + .pf-list { margin-top: 10px !important; }
.pf-row { display: flex; gap: 12px; align-items: flex-start; padding: 11px 2px; border-bottom: 1px solid var(--color-border-soft); }
.pf-row:last-child { border-bottom: none; }
.pf-note { margin: 10px 0 0; font-size: 12px; color: var(--color-text-muted); line-height: 1.6; }

/* 유형 색(2026-11-12 개선): 아이콘 자체를 유형 색으로 칠하고(app.js loadTypeIcons), 바탕은 같은 계열의 옅은 색.
   진한 단색 채움 대신 테마의 따뜻한 바탕과 어울리게 한다. --type-color=핀 색(color_fg), --tag-bg/--tag-border=옅은·중간 톤. */
.type-filter-item .type-tag { gap: 6px; padding: 5px 10px 5px 7px; }
.type-filter-item .type-tag .filter-type-icon { width: 18px; height: 18px; }
/* 꺼진 유형: 테마의 중립 바탕, 아이콘은 흐리게(색은 남겨 무엇인지 알 수 있게) */
.type-filter-item input:not(:checked) + .type-tag { background: var(--color-surface-alt); border-color: var(--color-border-soft); color: #8a7860; }
.type-filter-item input:not(:checked) + .type-tag .filter-type-icon { filter: saturate(0.25); opacity: 0.6; }
/* 켜진 유형: 같은 색 계열의 옅은 바탕 + 유형 색 테두리·글자, 아이콘은 제 색 */
.type-filter-item input:checked + .type-tag {
  background: var(--tag-bg);
  border-color: var(--tag-border);
  box-shadow: inset 0 0 0 1px var(--type-color);
  color: var(--type-color);
  font-weight: 700;
}
/* 목록 아이콘: 옅은 같은 색 바탕의 핀 모양 칸에 유형 색 아이콘 */
.place-list-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 44px;
  flex-shrink: 0;
  background: var(--tag-bg, var(--color-surface-alt));
  border: 1.5px solid var(--type-color, var(--color-border));
  border-radius: 16px 16px 4px 4px;
}
.place-list-pin .place-list-icon { width: 24px; height: 24px; padding: 0; margin: 0; border: 0; background: none; border-radius: 0; }

/* 장소 상세 카드 묶음(2026-11-12): 바깥 테두리 상자를 없애고 세 카드를 같은 간격으로 쌓는다. */
.detail-body { display: grid; gap: 14px; padding: 0; border: 0; background: transparent; }
.place-description-card .place-description { margin: 0; padding: 0; border: 0; background: transparent; }
.detail-body .visit-stats .stat-summary-row { margin-top: 0; }
.detail-body .visit-stats .stat-chip { border-radius: 999px; }

/* 장소 공유 시트(2026-11-12): 공유 아이콘 아래에 카카오톡·인스타그램·밴드·스레드·X·링크 복사 */
.detail-head { position: relative; }
.detail-share-sheet {
  position: absolute;
  top: calc(100% - 6px);
  right: 16px;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  width: min(300px, calc(100vw - 48px));
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface);
  box-shadow: 0 10px 28px #30251e2e;
}
.detail-share-sheet[hidden] { display: none; }
.share-option {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--color-text-strong);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.share-option:hover { background: var(--color-surface-alt); }
.share-option:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.share-badge {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  color: var(--c-white);
}
.share-badge svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.share-badge--kakao { background: #fee500; color: #3c1e1e; }
.share-badge--instagram { background: linear-gradient(45deg, #f09433, #dc2743 55%, #bc1888); }
.share-badge--band { background: #06c755; }
.share-badge--threads { background: #101010; }
.share-badge--x { background: #101010; }
.share-badge--copy { background: var(--color-surface-alt); color: var(--color-text-strong); border: 1px solid var(--color-border); }

/* 방문한 적 있어요(2026-11-12): 주소 줄 지도 아이콘 옆 버튼과 아이 고르기 */
.detail-self-visit-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px 0 7px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-link);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.detail-self-visit-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .45; }
.detail-self-visit-btn:hover { background: var(--color-surface-alt); }
.detail-self-visit-btn.is-on { background: var(--color-accent-deep); border-color: var(--color-accent-deep); color: var(--color-on-dark); }
.detail-self-visit-btn.is-on svg { opacity: 1; }
.detail-self-visit-btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.detail-self-visit-feedback { margin: 6px 20px 0; }
.self-visit-chooser {
  margin: 10px 20px 0;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
}
.self-visit-chooser[hidden] { display: none; }
.self-visit-chooser-title { margin: 0 0 8px; font-weight: 700; color: var(--color-text-strong); font-size: 14px; }
.self-visit-children { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.self-visit-child { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--color-text-strong); }
.self-visit-chooser-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.self-visit-cancel, .self-visit-confirm { height: 32px; padding: 0 14px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.self-visit-cancel { border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text-muted); }
.self-visit-confirm { border: 1px solid var(--color-accent-deep); background: var(--color-accent-deep); color: var(--color-on-dark); }
