/* ═══ P1 — Fonts (Pretendard body + GmarketSans display) + Icons (Phosphor Bold) ═══ */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");
@import url("https://unpkg.com/@phosphor-icons/web@2.1.1/src/bold/style.css");

@font-face {
  font-family: "GmarketSans";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.4/GmarketSansBold.woff") format("woff");
}

:root {
  /* ─── Color tokens ─── */
  --bg: #0b1220;
  --fg: #e5e7eb;
  --muted: #9ca3af;
  --accent: #60a5fa;
  --surface: rgba(17, 24, 39, 0.92);
  --surface-hi: rgba(30, 41, 59, 0.95);
  --border: rgba(148, 163, 184, 0.2);
  --chip-bg: rgba(30, 41, 59, 0.9);
  --chip-active: #2563eb;

  /* ─── 부산 시그니처 팔레트 / Busan signature palette ─── */
  --busan-sunset: #f4a261;   /* 해운대 일몰 orange */
  --busan-night: #1d3557;    /* 광안대교 야경 네이비 */
  --busan-pastel: #f1caa4;   /* 감천문화마을 파스텔 */
  --busan-sea: #06b6d4;      /* 부산 바다 시안 */
  --busan-magenta: #e76f51;  /* 해운대 선셋 마젠타 (hero gradient용) */

  /* ─── Typography tokens ─── */
  /* 이모지 fallback: Pretendard/GmarketSans 는 컬러 이모지 글리프가 없어
     Windows Chrome 등에서 필터/탭/배지 이모지가 □ 박스로 깨짐.
     OS 별 컬러 이모지 폰트를 스택 끝에 넣어 fallback 되게 함. */
  --font-body: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
               "Apple SD Gothic Neo", "Noto Sans KR", "Helvetica Neue", Arial,
               "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  --font-display: "GmarketSans", "Pretendard Variable", Pretendard, -apple-system,
                  "Apple SD Gothic Neo", "Noto Sans KR",
                  "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  --fs-display: 28px;
  --fs-h1: 20px;
  --fs-h2: 16px;
  --fs-body: 15px;
  --fs-meta: 12px;
  --fs-small: 11px;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* ─── Shadow tiers ─── */
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow: var(--shadow-lg); /* backwards compat */

  /* ─── Radius tokens ─── */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;
}

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

html, body {
  width: 100%; height: 100%;
  background: var(--bg); color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

/* Display 유틸리티 — Hero/타이틀 등 큰 텍스트에 GmarketSans Bold */
.display {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
}

/* Use dynamic viewport (iOS Safari 주소창 대응) */
#map {
  position: fixed; inset: 0;
  width: 100vw; height: 100dvh;
  background: #1e293b;
  /* 핀치 줌 / 팬 손가락 제스처 허용 — Kakao Maps 가 자체 처리 */
  touch-action: pan-x pan-y pinch-zoom;
}

/* Top chip bar */
#topbar {
  position: fixed; top: 0; left: 0; right: 0;
  padding: env(safe-area-inset-top, 0) 12px 8px;
  padding-top: max(env(safe-area-inset-top, 0), 12px);
  z-index: 10;
  pointer-events: none;
}
.chip-row {
  display: flex; gap: 6px; overflow-x: auto;
  pointer-events: auto;
  padding: 4px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }

/* 빈 카테고리 필터(데이터 0) 비활성 — 헛클릭 방지 */
.filter.is-empty { opacity: 0.4; cursor: not-allowed; }
.filter.is-empty input { pointer-events: none; }

/* ─── Phase 2: 선택 날짜 헤드라인 배지 ─── */
.date-badge {
  pointer-events: auto;
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  margin: 0 4px;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(29,53,87,0.92), rgba(17,24,39,0.92));
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--fg);
  font-size: var(--fs-meta);
  line-height: 1.3;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.date-badge .db-date { font-weight: var(--fw-bold); color: var(--busan-pastel); }
.date-badge .db-weather { color: var(--fg); }
.date-badge .db-stats { color: var(--busan-sunset); font-weight: var(--fw-semibold); }
.date-badge .db-sep { color: var(--muted); opacity: 0.5; }

/* ─── Phase 2: "이 날의 부산" 하이라이트 시트 ─── */
.highlight-hero {
  padding: 18px 18px 16px;
  margin: -1px -1px 8px;
  background: linear-gradient(135deg, var(--busan-sunset), var(--busan-magenta));
  color: #fff;
  border-top-left-radius: var(--r-md);
  border-top-right-radius: var(--r-md);
}
.highlight-hero .hh-date {
  font-family: var(--font-display);
  font-size: 22px; font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.highlight-hero .hh-sub {
  font-size: var(--fs-meta);
  opacity: 0.92;
}

.highlight-section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.highlight-section:last-child { border-bottom: 0; }
.highlight-section .hs-title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-semibold);
  margin-bottom: 8px;
  color: var(--fg);
}
.highlight-section .hs-note {
  color: var(--muted);
  font-size: var(--fs-meta);
  padding: 6px 0;
}

.festival-row {
  display: block; width: 100%;
  padding: 10px 12px; margin: 2px 0;
  background: var(--surface-hi);
  border: 1px solid var(--border);
  border-left: 3px solid var(--busan-sunset);
  border-radius: var(--r-sm);
  color: var(--fg); text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s, transform 0.1s;
}
.festival-row:hover { background: rgba(244,162,97,0.15); transform: translateX(2px); }
.festival-row.is-upcoming { border-left-color: var(--muted); opacity: 0.88; }
.festival-row .fr-title {
  display: block;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-body);
  margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.festival-row .fr-meta {
  display: block;
  font-size: var(--fs-meta);
  color: var(--muted);
}

.sm-list {
  list-style: none; padding: 0; margin: 0 0 6px;
}
.sm-list li {
  padding: 3px 0;
  font-size: var(--fs-body);
  color: var(--fg);
}
.sm-list .sm-sub {
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--busan-sea);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 0 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.sm-list .sm-where {
  color: var(--muted); font-size: var(--fs-meta);
  margin-left: 6px;
}

/* 마커 클릭 시 순간 펄스 (Kakao Circle overlay 를 animate via stroke) */
@keyframes marker-pulse {
  0%   { opacity: 1;   transform: scale(0.6); }
  100% { opacity: 0;   transform: scale(1.6); }
}

/* ─── Hero Top 3 카드 ─── */
.hl-hero-section { padding-bottom: 18px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.hero-card {
  display: flex;
  gap: 12px;
  padding: 0;
  background: var(--surface-hi);
  border: 1px solid var(--border);
  border-left: 4px solid var(--muted);
  border-radius: var(--r-md);
  overflow: hidden;
  color: var(--fg);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.15s;
}
.hero-card.is-active { border-left-color: var(--busan-sunset); }
.hero-card:not(.is-active) { border-left-color: var(--busan-sea); }
.hero-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.hc-media {
  position: relative;
  flex: 0 0 112px;
  aspect-ratio: 1 / 1;
  background: var(--surface-lo);
}
.hc-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.hc-img-placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 32px;
  background: linear-gradient(135deg, rgba(244,162,97,0.18), rgba(219,39,119,0.14));
}
.hc-dbadge {
  position: absolute; left: 6px; bottom: 6px;
  padding: 3px 8px;
  background: rgba(0,0,0,0.72);
  color: #fff;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  border-radius: 10px;
  letter-spacing: 0.02em;
  line-height: 1;
  backdrop-filter: blur(6px);
}
.hero-card.is-active .hc-dbadge { background: rgba(220,38,38,0.92); }
.hc-body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px 10px 2px;
  display: flex; flex-direction: column;
  gap: 4px;
}
.hc-tags {
  display: flex; gap: 4px;
  flex-wrap: wrap;
}
.hc-tag {
  padding: 1px 7px;
  background: rgba(30,144,144,0.18);
  color: var(--busan-sea);
  font-size: 10px;
  font-weight: var(--fw-semibold);
  border-radius: 10px;
  letter-spacing: 0.04em;
}
.hc-title {
  font-size: 15px;
  font-weight: var(--fw-bold);
  line-height: 1.3;
  margin: 2px 0;
  /* 2-line clamp */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hc-meta {
  font-size: var(--fs-meta);
  color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Desktop 2-col grid */
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero-grid .hero-card:first-child { grid-column: 1 / -1; }
}

/* ─── Tail chip list ─── */
.chip-list, .chip-extra {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: transparent;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: var(--r-sm);
  color: var(--fg);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.12s, border-color 0.12s;
}
.chip.is-active { border-left-color: var(--busan-sunset); }
.chip:not(.is-active) { border-left-color: rgba(30,144,144,0.4); }
.chip:hover { background: rgba(255,255,255,0.04); }
.chip-d {
  flex: 0 0 auto;
  min-width: 56px;
  padding: 2px 6px;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  border-radius: 8px;
  text-align: center;
  line-height: 1.4;
}
.chip.is-active .chip-d {
  background: rgba(244,162,97,0.18);
  color: var(--busan-sunset);
}
.chip-title {
  flex: 1 1 auto;
  font-size: var(--fs-body);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chip-more {
  margin-top: 8px;
  padding: 8px 12px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: var(--fs-meta);
  font-family: var(--font-body);
  cursor: pointer;
  width: 100%;
  transition: background 0.15s, color 0.15s;
}
.chip-more:hover { background: rgba(255,255,255,0.04); color: var(--fg); }

/* ─── 읽을거리 Top 3 규모 태그 ─── */
.blog-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 4px 0 6px;
}
.blog-card-tag {
  padding: 2px 8px;
  background: rgba(30,144,144,0.18);
  color: var(--busan-sea);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  border-radius: 10px;
  letter-spacing: 0.04em;
}
.blog-card-featured .blog-card-tag {
  background: rgba(244,162,97,0.22);
  color: var(--busan-sunset);
}

/* ─── 전시/공연 venue 그룹 상세 ─── */
.venue-section {
  margin-top: 14px;
}
.venue-section-title {
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--fg);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.venue-event {
  padding: 8px 10px;
  margin-bottom: 4px;
  background: var(--surface-hi);
  border-radius: var(--r-sm);
  border-left: 2px solid rgba(30,144,144,0.35);
}
.venue-event-title {
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--fg);
  margin-bottom: 3px;
  line-height: 1.3;
}
.venue-event-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
}
.venue-event-d {
  padding: 1px 6px;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  border-radius: 8px;
  font-weight: var(--fw-semibold);
  line-height: 1.5;
}
.venue-event-d.is-active {
  background: rgba(220,38,38,0.22);
  color: #fca5a5;
}
.venue-event-meta a {
  color: var(--busan-sea);
  text-decoration: none;
}
.venue-event-meta a:hover {
  text-decoration: underline;
}

/* ─── 시트 하단 크레딧 ─── */
.sheet-credit {
  padding: 12px 16px 24px;
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  opacity: 0.6;
  letter-spacing: 0.08em;
  font-family: var(--font-body);
  text-transform: lowercase;
}

/* ─── PWA 앱 설치 버튼 (v3.9) ─── */
.install-btn {
  display: flex; align-items: center; gap: 10px;
  width: calc(100% - 24px);
  margin: 12px 12px 4px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--busan-sea) 0%, #0891b2 100%);
  color: #fff;
  border: 0; border-radius: 12px;
  cursor: pointer;
  font: 600 14px/1.2 var(--font-display);
  text-align: left;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.install-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.35);
}
.install-btn i {
  font-size: 20px;
  flex-shrink: 0;
}
.install-btn .install-label { flex: 1; font-weight: 700; }
.install-btn .install-sub {
  font-size: 11px; font-weight: 400;
  opacity: 0.85;
  letter-spacing: 0;
}
@media (min-width: 720px) {
  .install-btn .install-sub { display: inline; margin-left: auto; }
}

/* 인앱 브라우저 (카톡 등) hint — install 버튼 대신 노출 */
.install-hint {
  margin: 12px 12px 4px;
  padding: 10px 14px;
  font: 500 12px/1.4 var(--font-body);
  color: var(--muted);
  text-align: center;
  background: rgba(6, 182, 212, 0.06);
  border: 1px dashed rgba(6, 182, 212, 0.3);
  border-radius: 10px;
}
.install-hint strong { color: var(--busan-sea); font-weight: 700; }

/* iOS Safari 가이드 모달 */
.ios-install-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.iim-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  cursor: pointer;
}
.iim-card {
  position: relative;
  background: var(--surface-hi);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px 20px;
  max-width: 360px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  font-family: var(--font-body);
}
.iim-card h3 {
  margin: 0 0 16px;
  font: 700 18px/1.3 var(--font-display);
  color: var(--busan-sea);
}
.iim-card ol {
  margin: 0 0 18px; padding-left: 22px;
  font-size: 14px; line-height: 1.7; color: var(--fg);
}
.iim-card ol strong { color: var(--busan-sea); font-weight: 700; }
.iim-card .iim-hint {
  font-size: 12px; color: var(--muted);
  margin: 0 0 18px;
  padding: 10px 12px;
  background: rgba(6, 182, 212, 0.08);
  border-left: 3px solid var(--busan-sea);
  border-radius: 6px;
}
.iim-close {
  width: 100%;
  padding: 12px;
  background: var(--busan-sea);
  color: #fff;
  border: 0; border-radius: 10px;
  font: 600 14px/1.2 var(--font-display);
  cursor: pointer;
}
.iim-close:hover { background: #0891b2; }

/* ─── P0 데이터 freshness (v3.8) ─── */
.sheet-footer { border-top: 1px solid rgba(255,255,255,0.06); margin-top: 8px; }
.freshness {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 16px;
  background: transparent; border: 0; cursor: pointer;
  font: 500 12px/1.2 Pretendard, sans-serif;
  color: var(--muted); text-align: left;
}
.freshness:hover { background: rgba(255,255,255,0.03); color: var(--fg); }
.freshness-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #6b7280; flex-shrink: 0;
}
.freshness-dot.is-fresh { background: #22c55e; }
.freshness-dot.is-stale-warn { background: #f59e0b; }
.freshness-dot.is-stale-error { background: #ef4444; animation: freshness-pulse 1.5s ease-in-out infinite; }
@keyframes freshness-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.freshness-text { flex: 1; }
.freshness-caret { font-size: 10px; opacity: 0.6; }
.freshness-detail {
  padding: 0 16px 12px;
  font: 400 11px/1.4 Pretendard, sans-serif;
  color: var(--muted);
}
.freshness-table {
  width: 100%; border-collapse: collapse;
}
.freshness-table th, .freshness-table td {
  padding: 4px 6px; text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.freshness-table th { color: #94a3b8; font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.freshness-table td.num, .freshness-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.freshness-table tr.fresh-warn td { color: #f59e0b; }
.freshness-table tr.fresh-stale td { color: #ef4444; }

/* ─── Phase 2.5: 향토음식 row 배지 ─── */
.festival-row.foodie-row { border-left-color: #db2777; }
.festival-row.foodie-row:hover { background: rgba(219,39,119,0.12); }
.fr-badge {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 4px;
  background: rgba(219,39,119,0.18);
  color: #f9a8d4;
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
}
.chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip-bg);
  color: var(--fg);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.15s;
}
.chip.active { background: var(--chip-active); border-color: var(--chip-active); }
.chip:hover { background: var(--surface-hi); }
.chip.active:hover { background: var(--chip-active); }

/* Bottom sheet */
#sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--surface);
  border-top-left-radius: var(--r-lg); border-top-right-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  z-index: 20;
  transition: transform 0.25s ease-out;
  max-height: 85dvh;
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
#sheet.sheet-peek    { transform: translateY(calc(100% - 160px)); }
#sheet.sheet-half    { transform: translateY(50%); }
#sheet.sheet-full    { transform: translateY(0); }

/* 드래그 핸들 — 시각은 작게 유지하되 탭 영역 크게 확보 (::after 로 히트존 확장) */
.sheet-handle {
  width: 44px; height: 5px;
  background: var(--muted); opacity: 0.5;
  border-radius: 3px;
  margin: 14px auto 6px;
  cursor: grab;
  position: relative;
  /* 손가락 탭 영역: 상하 14px, 좌우 40px 투명 확장 */
  touch-action: none;
}
.sheet-handle::after {
  content: "";
  position: absolute;
  top: -14px; bottom: -14px;
  left: -40px; right: -40px;
}
.sheet-header {
  padding: 6px 16px 10px;  /* 핸들과 탭 사이 공간 증가 */
  border-bottom: 1px solid var(--border);
}
.tab-row {
  display: flex; gap: 8px;
  padding: 6px 0 8px;  /* 탭 상하 여백 증가 — 핸들·필터와 안 부딪히게 */
}
.tab {
  flex: 0 0 auto;
  padding: 6px 12px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
}
.tab.active {
  background: var(--chip-active);
  color: white;
  border-color: var(--chip-active);
}
body.view-read .filter-row { display: none; }
.filter-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 6px 0;
}
.filter {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.filter input { accent-color: var(--accent); }

.status-row { color: var(--muted); font-size: 11px; padding: 4px 0 0; }

/* ═══ Phosphor 아이콘 — 인라인 정렬 + 사이즈 톤 통일 ═══ */
.tab i[class^="ph-"],
.filter i[class^="ph-"] {
  font-size: 15px;
  vertical-align: -2px;
  margin-right: 2px;
}
.fab i[class^="ph-"] { font-size: 22px; vertical-align: -3px; }
.card-title i[class^="ph-"] { font-size: 17px; vertical-align: -2px; margin-right: 4px; color: var(--busan-sunset); }
.card-meta i[class^="ph-"],
.info-row i[class^="ph-"] { font-size: 13px; vertical-align: -2px; margin-right: 3px; color: var(--muted); }
a i[class^="ph-"] { vertical-align: -2px; margin-right: 4px; }

/* ═══ 별표(favorite) 필터칩 — 골드 강조 ═══ */
.filter-favorite {
  background: linear-gradient(135deg, rgba(250,204,21,0.18), rgba(250,204,21,0.08));
  border-color: rgba(250,204,21,0.45);
}
.filter-favorite i[class^="ph-"] { color: #facc15; }
.filter-favorite:has(input:checked) {
  background: linear-gradient(135deg, rgba(250,204,21,0.35), rgba(250,204,21,0.18));
  border-color: #facc15;
}

/* ═══ 별표 상세 카드 — 골드 킥커 + 노트 강조 ═══ */
.favorite-detail .favorite-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  color: #facc15;
  background: rgba(250,204,21,0.14);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.favorite-detail .favorite-note {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(250,204,21,0.08);
  border-left: 3px solid #facc15;
  border-radius: var(--r-sm);
  font-size: var(--fs-meta);
  color: var(--fg);
  line-height: 1.55;
}

/* ═══ 블로그 상세 카드 — 출처/발췌/원문 버튼 스타일 ═══ */
.blog-detail .blog-kicker {
  display: inline-block;
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ec4899;
  background: rgba(236, 72, 153, 0.12);
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.blog-detail .blog-meta {
  display: flex; flex-wrap: wrap; gap: 4px 10px;
  color: var(--muted); font-size: var(--fs-meta);
}
.blog-detail .blog-excerpt {
  line-height: 1.62;
  color: var(--fg);
  margin-top: 10px;
}
.blog-detail .blog-note {
  font-size: var(--fs-small);
  color: var(--muted);
  opacity: 0.75;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.sheet-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 12px 16px;
  -webkit-overflow-scrolling: touch;
}

.card-list { display: flex; flex-direction: column; gap: 10px; }
.card {
  padding: 10px 12px;
  background: var(--surface-hi);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  overflow: hidden; /* card-image의 bleed radius 클립 */
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}
.card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.card-title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  line-height: 1.35;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.card-meta  { color: var(--muted); font-size: var(--fs-meta); line-height: 1.45; }

/* ═══ P0 — 카드 이미지 렌더링 ═══ */
/* POI 상세 카드: 상단 full-bleed 4:3 히어로 이미지 */
.card-image {
  display: block;
  width: calc(100% + 24px);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(96,165,250,0.08), rgba(148,163,184,0.05));
  margin: -10px -12px 10px;
  border-radius: 10px 10px 0 0;
  color: transparent; /* alt 텍스트 숨김 */
}

/* 코스 카드: 좌측 96×72 썸네일 + 우측 본문 그리드 */
.course-card.with-thumb {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px;
}
.course-thumb {
  width: 96px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.08);
  display: block;
  color: transparent;
}
.course-card.with-thumb .course-body { min-width: 0; }

/* ═══ P3 — 블로그 에디토리얼 (Culture Trip 스타일) ═══ */
.blog-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 16px;
  background: var(--surface-hi);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--busan-sunset);
  cursor: pointer;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, border-left-color 0.2s;
}
.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-left-color: var(--busan-magenta);
}
.blog-card-category {
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--busan-sunset);
}
.blog-card-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: var(--fw-bold);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0;
}
.blog-card-lead {
  font-size: 13px;
  line-height: 1.7;
  color: #d1d5db;
  margin: 0;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
  font-size: var(--fs-small);
  color: var(--muted);
}
.blog-card-readmore {
  color: var(--accent);
  text-decoration: none;
  font-weight: var(--fw-medium);
  font-size: var(--fs-meta);
  white-space: nowrap;
}
.blog-card-readmore:hover { text-decoration: underline; }

/* Featured hero 카드 (첫 번째 블로그) */
.blog-card-featured {
  padding: 26px 24px 22px;
  border-left: none;
  border: 1px solid rgba(244, 162, 97, 0.3);
  background:
    linear-gradient(135deg, rgba(244, 162, 97, 0.1), rgba(29, 53, 87, 0.25)),
    var(--surface-hi);
}
.blog-card-featured .blog-card-title { font-size: 26px; line-height: 1.22; }
.blog-card-featured .blog-card-lead  { font-size: 14px; line-height: 1.65; color: #e5e7eb; }
.blog-card-featured:hover { border-left: none; border-color: rgba(244, 162, 97, 0.5); }

/* ═══ P3 — 월간 내러티브 Hero (Faroe 스타일) ═══ */
/* 홈(지도) 뷰 peek/half 상태에서 카드 리스트 최상단에 고정 — 이번 달 부산 이야기 */
.narrative-hero {
  position: relative;
  padding: 24px 22px 22px;
  margin-bottom: 12px;
  border-radius: var(--r-lg);
  background:
    linear-gradient(135deg, rgba(244, 162, 97, 0.22) 0%, rgba(29, 53, 87, 0.55) 55%, rgba(231, 111, 81, 0.28) 100%),
    #141a28;
  border: 1px solid rgba(244, 162, 97, 0.3);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease-out, box-shadow 0.2s, border-color 0.2s;
}
.narrative-hero::before {
  content: "";
  position: absolute;
  top: -40%; right: -20%;
  width: 65%; height: 180%;
  background: radial-gradient(ellipse, rgba(244, 162, 97, 0.22) 0%, transparent 70%);
  pointer-events: none;
}
.narrative-hero::after {
  content: "";
  position: absolute;
  bottom: -30%; left: -10%;
  width: 50%; height: 140%;
  background: radial-gradient(ellipse, rgba(231, 111, 81, 0.18) 0%, transparent 70%);
  pointer-events: none;
}
.narrative-hero:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(244, 162, 97, 0.55);
}
.narrative-hero:focus-visible {
  outline: 2px solid var(--busan-sunset);
  outline-offset: 2px;
}
.narrative-hero-label {
  position: relative;
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--busan-sunset);
  margin-bottom: 10px;
}
.narrative-hero-title {
  position: relative;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: var(--fw-bold);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin: 0 0 10px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.narrative-hero-lead {
  position: relative;
  font-size: 13px;
  line-height: 1.65;
  color: #e5e7eb;
  margin: 0 0 14px;
}
.narrative-hero-cta {
  position: relative;
  display: inline-block;
  font-size: var(--fs-meta);
  font-weight: var(--fw-medium);
  color: var(--busan-sunset);
}

@media (min-width: 900px) {
  .narrative-hero-title { font-size: 24px; }
  .narrative-hero { padding: 28px 26px 24px; }
}

/* Tag chips in detail card */
.tag-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag-chip {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(96, 165, 250, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 10px;
  font-size: 10px;
  color: #93c5fd;
  white-space: nowrap;
}
.rating-stars { color: #fbbf24; font-size: var(--fs-meta); }
.ext-rating-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.ext-rating {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 10px;
  font-size: var(--fs-meta); font-weight: var(--fw-medium);
  background: rgba(31, 197, 84, 0.12); color: #6ee7a3;
  border: 1px solid rgba(31, 197, 84, 0.3);
}
.ext-rating b { font-weight: 800; opacity: 0.9; margin-right: 2px; }
.ext-naver { background: rgba(31, 197, 84, 0.12); color: #6ee7a3; border-color: rgba(31, 197, 84, 0.3); }
.ext-google { background: rgba(66, 133, 244, 0.12); color: #93c5fd; border-color: rgba(66, 133, 244, 0.3); }
.info-row { margin-top: 6px; color: var(--muted); font-size: var(--fs-small); line-height: 1.45; }
.info-row strong { color: var(--fg); font-weight: var(--fw-medium); margin-right: 4px; }
.card-excerpt { margin-top: 8px; font-size: var(--fs-meta); line-height: 1.5; color: #d1d5db; }

/* Course card */
.course-card { cursor: pointer; position: relative; }
.course-card.active { border-color: var(--chip-active); background: rgba(37, 99, 235, 0.15); }
.course-badge {
  display: inline-block;
  padding: 1px 7px;
  background: var(--chip-active);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  color: white;
  margin-right: 6px;
}

/* FAB: 내 위치 */
.fab {
  position: fixed;
  right: max(env(safe-area-inset-right, 0), 16px);
  bottom: calc(max(env(safe-area-inset-bottom, 0), 16px) + 170px);
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-hi);
  color: var(--fg);
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 15;
  backdrop-filter: blur(8px);
}
.fab:active { transform: scale(0.92); }

/* ═══ P1 — 반응형 레이아웃 (데스크톱 ≥ 900px) ═══ */
/* 모바일 기본: 풀스크린 맵 + 하단 드래그 시트 */
/* 데스크톱: 풀스크린 맵 + 우측 420px 고정 사이드 패널 */
@media (min-width: 900px) {
  #sheet {
    left: auto;
    right: 0;
    top: 0;
    bottom: 0;
    width: 420px;
    max-height: 100dvh;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.45);
  }
  /* peek/half/full 스냅은 데스크톱에서 의미 없음 — transform 고정 */
  #sheet.sheet-peek,
  #sheet.sheet-half,
  #sheet.sheet-full { transform: none; }
  .sheet-handle { display: none; }
  .sheet-header { padding-top: 12px; }

  /* 상단 칩바·FAB: 사이드 패널 공간 비우기 */
  #topbar { right: 420px; }
  .fab { right: 436px; bottom: 24px; }

  /* 읽을거리(블로그) 뷰에서 2컬럼 매거진 그리드 — 에디토리얼 매거진 룩 */
  body.view-blog .card-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  /* featured 카드는 2컬럼 가로 전체 차지 (hero) */
  body.view-blog .card-list .blog-card-featured {
    grid-column: 1 / -1;
  }
  /* 코스 뷰는 단일 컬럼 유지 (좌썸네일 가로카드 포맷) */

  /* 데스크톱에선 카드 패딩·타이포 살짝 강화 */
  .card { padding: 12px 14px; }
  .card-title { font-size: 17px; }

  /* POI 상세 카드 이미지: 데스크톱에선 좀 더 와이드하게 (16:10) */
  .card-image { aspect-ratio: 16 / 10; }
}

/* 대화면 랩탑 (≥ 1280px): 사이드 패널 조금 더 넓게 */
@media (min-width: 1280px) {
  #sheet { width: 480px; }
  #topbar { right: 480px; }
  .fab { right: 496px; }
}

/* ───────── Phase E — 헤더 슬림화: 카테고리 필터 collapse 토글 ───────── */
.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 4px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font: 500 12px/1 Pretendard, sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}
.filter-toggle:hover { background: rgba(255, 255, 255, 0.1); }
.filter-toggle .ft-caret { font-size: 10px; opacity: 0.7; }
.filter-toggle[aria-expanded="true"] {
  background: rgba(244, 162, 97, 0.15);
  border-color: rgba(244, 162, 97, 0.4);
  color: #f4a261;
}

/* ───────── Phase D — AI Pick 카드 ───────── */
.ai-pick {
  position: relative;
  margin: 10px 0 14px;
  padding: 16px 18px 14px;
  background: linear-gradient(135deg, #1d3557 0%, #2a4a6e 50%, #3d2a4e 100%);
  border: 1px solid rgba(244, 162, 97, 0.35);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(29, 53, 87, 0.4);
  overflow: hidden;
}
.ai-pick::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(244, 162, 97, 0.18) 0%, transparent 60%);
  pointer-events: none;
}
.ai-pick-label {
  font: 700 11px/1 GmarketSans, Pretendard, sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #f4a261;
  margin-bottom: 8px;
  position: relative;
}
.ai-pick-summary {
  margin: 0 0 10px;
  font: 500 14px/1.55 Pretendard, sans-serif;
  color: #f8fafc;
  position: relative;
}
.ai-pick-list {
  margin: 8px 0 12px;
  padding-left: 18px;
  font: 400 13px/1.55 Pretendard, sans-serif;
  color: #e2e8f0;
  position: relative;
}
.ai-pick-list li { margin-bottom: 4px; }
.ai-pick-list strong { color: #fff; font-weight: 600; }

.ai-courses {
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 10px;
  position: relative;
}
.ai-course {
  margin-bottom: 6px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}
.ai-course summary {
  font: 600 12px/1.4 Pretendard, sans-serif;
  color: #fbbf24;
  cursor: pointer;
  list-style: none;
}
.ai-course summary::-webkit-details-marker { display: none; }
.ai-course summary::before {
  content: "▸ ";
  display: inline-block;
  margin-right: 4px;
  transition: transform 0.15s;
}
.ai-course[open] summary::before { transform: rotate(90deg); }
.ai-course[open] summary { color: #f4a261; }
.ai-stops {
  margin: 8px 0 0;
  padding-left: 22px;
  font: 400 12px/1.6 Pretendard, sans-serif;
  color: #cbd5e1;
}
.ai-course-note {
  margin: 6px 0 0;
  padding-left: 4px;
  font: 400 11px/1.5 Pretendard, sans-serif;
  color: #94a3b8;
  font-style: italic;
}

/* ───────── Phase C — 사전 예약 (D-30 마일스톤) ───────── */
.reservation-section {
  border-left: 3px solid #f4a261;
  padding-left: 10px;
}
.chip-reservation {
  border-color: rgba(244, 162, 97, 0.4) !important;
}
.chip-d-d-7  { background: #ef4444 !important; color: #fff !important; }
.chip-d-d-14 { background: #f97316 !important; color: #fff !important; }
.chip-d-d-30 { background: #a855f7 !important; color: #fff !important; }

/* ───────── Phase B — 부산푸디 대표메뉴 강조 ───────── */
.foody-menu {
  color: #f4a261 !important;
  font-weight: 500;
}

/* ───────── 갈맷길 배지 (15077606 enrich) ───────── */
.galmaet-badge {
  color: #16a34a !important;
  font-weight: 600;
  background: rgba(22, 163, 74, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 2px;
}

/* ───────── 코스 탭 chip filter + 섹션 헤더 ───────── */
.course-filter-row, .blog-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 8px 8px;
  position: sticky;
  top: 0;
  background: rgba(15, 17, 23, 0.95);
  z-index: 5;
}
.course-filter-chip, .blog-filter-chip {
  background: rgba(255, 255, 255, 0.06);
  color: #d1d5db;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.course-filter-chip:hover, .blog-filter-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}
.course-filter-chip.active, .blog-filter-chip.active {
  background: #fbbf24;
  color: #111827;
  border-color: #fbbf24;
  font-weight: 600;
}
.course-section-header {
  font-size: 13px;
  font-weight: 600;
  color: #fbbf24;
  padding: 16px 12px 6px;
  letter-spacing: 0.3px;
}
.walking-badge {
  background: #16a34a !important;
  color: #fff !important;
}

/* ───────── 임박 알림 박스 (Phase 4) — D-30 카드 위에 위치, 부드러운 amber 톤 ───────── */
.urgent-alert {
  background: rgba(217, 119, 6, 0.12);
  color: #fde68a;
  padding: 12px 14px;
  margin: 12px 8px 4px;
  border-radius: 10px;
  border-left: 3px solid #d97706;
}
.urgent-alert .urg-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fbbf24;
  letter-spacing: 0.2px;
}
.urgent-alert .urg-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.urgent-alert .urg-list li {
  padding: 5px 0;
  border-bottom: 1px solid rgba(217, 119, 6, 0.15);
  font-size: 13px;
  color: #e5e7eb;
}
.urgent-alert .urg-list li:last-child { border-bottom: none; }
.urgent-alert .urg-list li strong {
  color: #fbbf24;
  margin-right: 6px;
  font-weight: 600;
}
.urgent-alert .urg-cat { margin-right: 4px; }
.urgent-alert .urg-kind {
  font-size: 11px;
  color: rgba(229, 231, 235, 0.6);
  margin-left: 4px;
}
.urgent-alert .urg-opens strong { color: #fde68a; }
.urgent-alert .urg-more {
  font-size: 11px;
  color: rgba(229, 231, 235, 0.55);
  margin-top: 6px;
  font-style: italic;
}

/* ───────── 사전 예약 카드 그룹화 (details/summary) ───────── */
.reservation-group {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 4px 0;
}
.reservation-group summary {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fbbf24;
  cursor: pointer;
  list-style: none;
}
.reservation-group summary::-webkit-details-marker { display: none; }
.reservation-group summary::before {
  content: "▸ ";
  color: #94a3b8;
  margin-right: 4px;
  transition: transform 0.15s;
}
.reservation-group[open] summary::before {
  content: "▾ ";
}
.reservation-group .chip-list {
  padding: 0 8px 8px;
}

/* ───────── 매거진 카드 이미지 ───────── */
.blog-card-image {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  background: #1f2937;
}
.blog-card-with-image .blog-card-body {
  padding: 14px 16px 16px;
}
.blog-card-featured.blog-card-with-image .blog-card-image {
  height: 240px;
}

/* ───────── 매거진 카드 inline expand (향토음식 등 url 없는 매거진) ───────── */
.blog-card-expandable {
  cursor: pointer;
  transition: background 0.15s;
}
.blog-card-expandable:hover {
  background: rgba(255, 255, 255, 0.02);
}
.blog-card-fulltext {
  white-space: pre-wrap;
  line-height: 1.7;
  color: #d1d5db;
  font-size: 14px;
  margin: 8px 0 4px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border-left: 3px solid #f4a261;
}
.blog-card-expand-btn {
  background: rgba(244, 162, 97, 0.12);
  color: #f4a261;
  border: 1px solid rgba(244, 162, 97, 0.3);
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
}
.blog-card-expand-btn:hover {
  background: rgba(244, 162, 97, 0.2);
}

/* ───────── 향토음식 유래 링크 (Phase 6) ───────── */
.foodie-story-link {
  background: rgba(244, 162, 97, 0.08);
  border-left: 3px solid #f4a261;
  padding: 8px 12px;
  margin-top: 6px;
  border-radius: 4px;
}
.foodie-story-link a {
  color: #f4a261;
  text-decoration: none;
  font-weight: 500;
}
.foodie-story-link a:hover {
  color: #fbbf24;
  text-decoration: underline;
}
.foodie-story-link strong {
  color: #fde68a;
}

/* ═══ 4탭 분리 (today / map / course / read) — 핵심 정보 vs 지도 분리 ═══ */
/* view-today: AI Pick + 오늘의 부산 등 카드를 풀화면. 지도/필터/FAB 숨김 */
body.view-today #map { display: none; }
body.view-today .sheet-handle { display: none; }
body.view-today #fab-locate { display: none; }
body.view-today .filter-toggle,
body.view-today #filter-row { display: none !important; }

/* 모바일 — sheet 를 화면 풀로 */
body.view-today #sheet {
  top: 92px;
  left: 0;
  right: 0;
  bottom: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  transform: none !important;
  max-height: none;
}

/* 데스크톱 ≥ 900px — sunset 일러스트 백드롭 + 사이드 패널 콘텐츠 */
@media (min-width: 900px) {
  body.view-today #map {
    display: block;
    background: linear-gradient(135deg, #F4A261 0%, #E76F51 50%, #1D3557 100%);
    pointer-events: none;
  }
  body.view-today #sheet {
    top: 0;
    bottom: 0;
    right: 0;
    width: 420px;
  }
}

/* map 뷰의 hint 카드 (지도 탭에서 마커 클릭 안내) */
.map-hint {
  text-align: center;
  padding: 24px 16px !important;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04) !important;
}
.map-hint .card-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

/* view-course / view-read 에선 카테고리 필터 숨김 (의미 없음) */
body.view-read .filter-toggle,
body.view-read #filter-row,
body.view-course .filter-toggle,
body.view-course #filter-row { display: none !important; }

/* ───────── 🆕 신규 추가 섹션 (Phase v3.5) ───────── */
.new-section {
  border-left: 3px solid #06b6d4;
  padding-left: 10px;
}
.new-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.new-extra { display: contents; }
.new-extra[hidden] { display: none; }
.new-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(6, 182, 212, 0.06);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}
.new-card:hover {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.45);
  transform: translateY(-1px);
}
.new-badge {
  font: 700 10px/1 GmarketSans, Pretendard, sans-serif;
  letter-spacing: 0.5px;
  color: #06b6d4;
  padding: 2px 6px;
  background: rgba(6, 182, 212, 0.15);
  border-radius: 4px;
  text-transform: uppercase;
}
.new-badge.is-naver {
  color: #84cc16;
  background: rgba(132, 204, 22, 0.18);
}
.new-title {
  font: 600 13px/1.3 Pretendard, sans-serif;
  color: #f8fafc;
  word-break: break-word;
}
.new-meta {
  font: 400 11px/1.3 Pretendard, sans-serif;
  color: #94a3b8;
}
.new-more {
  margin-top: 8px;
}

/* ───────── 🔥/🎭 인기 큐레이션 카드 (v3.7) ───────── */
.popular-section {
  border-left: 3px solid #ef4444;
  padding-left: 10px;
}
.popular-section.popular-events { border-left-color: #a855f7; }
.popular-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.popular-card {
  display: grid;
  grid-template-columns: 56px 28px 1fr;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  background: rgba(239, 68, 68, 0.04);
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  width: 100%;
}
.popular-events .popular-card {
  background: rgba(168, 85, 247, 0.05);
  border-color: rgba(168, 85, 247, 0.2);
}
.popular-card:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}
.popular-events .popular-card:hover {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.45);
}
.popular-thumb {
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: #1e293b;
}
.popular-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.popular-rank {
  font: 800 20px/1 GmarketSans, Pretendard, sans-serif;
  color: #ef4444;
  text-align: center;
}
.popular-events .popular-rank { color: #a855f7; }
.popular-body { min-width: 0; overflow: hidden; }
.popular-title {
  font: 600 13px/1.3 Pretendard, sans-serif;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.popular-meta {
  font: 400 11px/1.3 Pretendard, sans-serif;
  color: #94a3b8;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ───────── 마커 클릭 detail 에서 카드 리스트 복귀 버튼 ───────── */
.detail-back {
  display: inline-flex;
  align-items: center;
  margin: 0 0 10px;
  padding: 8px 14px;
  background: rgba(244, 162, 97, 0.12);
  color: #f4a261;
  border: 1px solid rgba(244, 162, 97, 0.4);
  border-radius: 999px;
  font: 600 13px/1 Pretendard, sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}
.detail-back:hover {
  background: rgba(244, 162, 97, 0.22);
  transform: translateX(-2px);
}

/* ───────── 코스 카드 → visitbusan deep-link 버튼 ───────── */
.course-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 14px;
  background: #0ea5e9;
  color: #fff !important;
  border-radius: 8px;
  font: 600 12px/1 Pretendard, sans-serif;
  text-decoration: none;
  transition: background 0.15s;
}
.course-link:hover { background: #0284c7; }

/* ═══ Step 2 Wave 2 — 자체 발행 콘텐츠 (read 탭 카드 + /content/{slug} detail) ═══
   Busan-travel 자체 발행 글은 외부 블로그 인용과 시각적으로 구분되어야 함.
   에디토리얼 .blog-card 가 sunset(주황) 강조라면, 자체 발행은 sea(시안) 강조로 차별화. */

.content-section {
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  color: var(--busan-sea);
  text-transform: uppercase;
  margin: 4px 0 2px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* 발행 카드 — 기존 .card 베이스 + sea 톤 left-border 강조 */
.content-card {
  border-left: 3px solid var(--busan-sea);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, border-left-color 0.2s;
}
.content-card:hover {
  border-left-color: var(--busan-sunset);
}

/* AI 보조 작성 배지 — 카드 메타 옆 inline */
.ai-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  background: rgba(96, 165, 250, 0.14);
  color: var(--accent);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  border-radius: var(--r-pill);
  letter-spacing: 0.02em;
  vertical-align: 1px;
}

/* ───────── Detail view ───────── */
.content-detail {
  padding: 4px 4px 24px;
  max-width: 100%;
}

.ai-disclosure-panel {
  margin: 0 0 16px;
  padding: 10px 14px;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: var(--r-sm);
  color: var(--fg);
  font-size: var(--fs-meta);
  line-height: 1.5;
}
.ai-disclosure-panel strong {
  color: var(--accent);
  font-weight: var(--fw-semibold);
}
.ai-disclosure-panel a {
  color: var(--busan-sea);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: var(--fw-bold);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 4px 0 8px;
}

.content-meta {
  color: var(--muted);
  font-size: var(--fs-meta);
  line-height: 1.5;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.content-tag {
  display: inline-block;
  padding: 2px 9px;
  background: rgba(6, 182, 212, 0.14);
  color: var(--busan-sea);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  border-radius: var(--r-pill);
  letter-spacing: 0.03em;
}

/* Markdown 본문 typography — h2/h3/p/ul/ol/blockquote/img 기본 톤 정리 */
.content-body {
  font-size: 15px;
  line-height: 1.75;
  color: var(--fg);
}
.content-body > * + * { margin-top: 14px; }
.content-body h1,
.content-body h2,
.content-body h3 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  color: var(--fg);
}
.content-body h1 { font-size: 22px; line-height: 1.3; margin-top: 28px; }
.content-body h2 { font-size: 19px; line-height: 1.35; margin-top: 24px; }
.content-body h3 { font-size: 16px; line-height: 1.4; margin-top: 20px; color: var(--busan-sea); }
.content-body p { font-size: 15px; line-height: 1.75; }
.content-body strong { color: var(--fg); font-weight: var(--fw-semibold); }
.content-body em { color: var(--muted); }
.content-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.content-body a:hover { color: var(--busan-sunset); }
.content-body ul,
.content-body ol { padding-left: 22px; }
.content-body li { margin-top: 4px; line-height: 1.7; }
.content-body blockquote {
  border-left: 3px solid var(--busan-sunset);
  padding: 6px 0 6px 14px;
  color: var(--muted);
  font-style: italic;
  background: rgba(244, 162, 97, 0.06);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.content-body img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-sm);
  margin: 10px 0;
  background: rgba(148, 163, 184, 0.06);
}
.content-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  padding: 1px 6px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 4px;
}
.content-body pre {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
}
.content-body pre code { background: transparent; padding: 0; }
.content-body hr {
  border: 0;
  border-top: 1px dashed var(--border);
  margin: 22px 0;
}
