@import url("/tokens.css?v=2026110605");

/* === 기본 스타일 · 공통 버튼과 아이콘 === */

:root {
  --map-header-height: 44px;
  --map-sidebar-width: 342px;
  color-scheme: dark;
  font-family: var(--font-system);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  font-synthesis: none;
}

/* Reset map content only; the shared GNB keeps the site typography. */
:where(.map-page) :where(*):not(:where(.header, .header *)) {
  margin: revert;
  padding: revert;
  letter-spacing: normal;
}

* {
  box-sizing: border-box;
}

/* The translated mobile sidebar must not make the viewport itself scroll. */
html { overflow: clip; }

/* Contain the translated drawer even during focus and history scroll restoration. */
body {
  position: fixed;
  inset: 0;
  margin: 0;
  overflow: clip;
  background: var(--bg-canvas);
  min-height: 0;
  font-family: var(--font-system);
  touch-action: auto;
}

.map-page > .header {
  position: fixed;
  inset: 0 0 auto;
  height: var(--map-header-height);
  line-height: normal;
}

.map-back.icon-button { display: none; }
.map-back .icon { transform: rotate(180deg); }

@media (max-width: 959px) {
  :root { --map-header-height: 0px; }
  .map-page > .header { display: none; }
  .map-back.icon-button { display: grid; flex: 0 0 40px; width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--bg-surface); }
  .map-page .topbar { gap: 8px; }
  .map-page .search-results { width: min(340px, calc(100vw - 78px)); }
}

button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  color: inherit;
}

button {
  border: 0;
}

button:disabled {
  cursor: default;
  opacity: 0.4;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 3px;
}

button,
a,
input {
  touch-action: manipulation;
}

[hidden] {
  display: none !important;
}

.svg-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-fill {
  fill: currentColor;
  stroke: none;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-raised);
}

.text-button {
  background: transparent;
  font-size: var(--text-2xl);
}

.quiet-note {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: var(--lh-loose);
}

.eyebrow {
  font-size: var(--text-2xs);
  letter-spacing: 1.9px;
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
}

/* === 지도 배경 === */

#map {
  position: fixed;
  inset: var(--map-header-height) 0 0;
}

.map-vignette {
  pointer-events: none;
  position: fixed;
  inset: var(--map-header-height) 0 0;
  box-shadow: inset 0 0 120px color-mix(in srgb, var(--bg-sunken) 9%, transparent);
}

/* === 검색창 === */

.topbar {
  position: absolute;
  top: calc(var(--map-header-height) + 22px);
  left: 26px;
  width: max-content;
  height: 54px;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  z-index: 5;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--bg-surface);
  height: 49px;
  border: 0;
  border-radius: var(--radius-md);
  padding: 0 var(--space-4);
  width: var(--map-sidebar-width);
  box-shadow: 0 6px 30px color-mix(in srgb, var(--bg-sunken) 15%, transparent);
}

.search-wrap > .icon {
  fill: currentColor;
  stroke: none;
  flex-shrink: 0;
}

.search-wrap input {
  background: transparent;
  border: 0;
  outline: 0;
  width: 100%;
  min-width: 0;
  font-size: var(--text-base);
  color: var(--text-primary);
}

.search-wrap input::placeholder {
  color: var(--text-secondary);
}

.search-results {
  position: absolute;
  top: 58px;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 30px color-mix(in srgb, var(--bg-sunken) 15%, transparent);
  overflow: auto;
  max-height: 390px;
  padding: var(--space-2);
}

.search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: transparent;
}

.search-result:hover {
  background: var(--bg-hover);
}

.search-result small {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.search-result b {
  font-weight: var(--font-semibold);
}

/* === 왼쪽 패널 · 산 목록 === */

.sidebar {
  position: absolute;
  top: calc(var(--map-header-height) + 98px);
  left: 26px;
  width: var(--map-sidebar-width);
  bottom: 32px;
  max-height: calc(100dvh - var(--map-header-height) - 130px);
  overflow: auto;
  background: var(--bg-surface);
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 30px color-mix(in srgb, var(--bg-sunken) 15%, transparent);
  z-index: 3;
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
}

.mountain-list {
  padding: 11px;
}

.mountain-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px 36px 26px;
  gap: var(--space-2);
  padding: 13px 10px;
  text-align: left;
  background: transparent;
  align-items: center;
  border-radius: var(--radius-sm);
}

.mountain-row:hover {
  background: var(--bg-hover);
}

.mountain-row .row-name {
  display: block;
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
}

.mountain-row small {
  display: block;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  margin-top: var(--space-1);
}

.sidebar > .quiet-note,
#explore-panel > .quiet-note {
  margin: 18px 22px 22px;
}

/* === 오른쪽 지도 조작 버튼 === */

.map-actions {
  position: absolute;
  right: 26px;
  top: calc(50% + var(--map-header-height) / 2);
  transform: translateY(-50%);
  display: flex;
  gap: 3px;
  flex-direction: column;
  align-items: flex-end;
  z-index: 4;
}




.foliage-toggle[aria-pressed="false"] img {
  filter: grayscale(1);
  opacity: .5;
}

.foliage-peak { display: flex; align-items: center; gap: 3px; margin: 0 0 8px; }
.foliage-peak time { color: var(--accent-danger-bright); font-size: var(--text-base); font-weight: var(--font-semibold); }



/* === 하단 타임라인 · 날짜와 시간 선택 === */

.timeline {
  position: absolute;
  left: calc(var(--map-sidebar-width) + 58px);
  right: 87px;
  bottom: 32px;
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 0;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: 0 6px 30px color-mix(in srgb, var(--bg-sunken) 15%, transparent);
  z-index: 4;
}

.date-tabs {
  display: flex;
  margin: 0 0 5px;
  padding-bottom: 6px;
  overflow: auto;
  scrollbar-width: none;
}

.date-tabs button {
  flex: 1;
  height: 34px;
  background: transparent;
  border-radius: 7px;
  padding: 6px 7px;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  min-width: 64px;
}

.date-tabs button strong {
  font-size: inherit;
  font-weight: var(--font-semibold);
  margin-right: 3px;
  color: var(--text-primary);
}

.date-tabs button.active {
  background: var(--bg-hover);
}

.date-tabs button.active strong {
  color: var(--text-primary);
}

.hour-track {
  --hour-height: 34px;
  --hour-inset: 0px;
  position: relative;
  flex: 1;
  min-width: 0;
  height: var(--hour-height);
  border-radius: 999px;
  background: var(--bg-hover);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.hour-selection {
  position: absolute;
  inset: 0 auto 0 0;
  width: 12.5%;
  border-radius: 999px;
  background: var(--text-primary);
  transform: translateX(calc(var(--hour-position, 0) * 100%));
  transition: transform 180ms ease-out;
  pointer-events: none;
}

.hour-track.is-dragging .hour-selection {
  transition: none;
}

.hour-track.is-dragging,
.hour-track.is-dragging * {
  cursor: grabbing;
}

@media (prefers-reduced-motion: reduce) {
  .hour-selection {
    transition: none;
  }
}

.hour-track input {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
  border-radius: inherit;
  margin: 0;
  pointer-events: none;
}

.hour-track input::-webkit-slider-thumb {
  appearance: none;
  width: calc(100% / var(--slot-count, 8));
  height: calc(var(--hour-height) - var(--hour-inset) * 2);
  background: transparent;
  border-radius: 7px;
  border: 0;
}

.hour-track input::-moz-range-thumb {
  width: calc(100% / var(--slot-count, 8));
  height: calc(var(--hour-height) - var(--hour-inset) * 2);
  background: transparent;
  border: 0;
  border-radius: 7px;
}

.hour-labels {
  position: absolute;
  inset: var(--hour-inset);
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  place-items: center;
  pointer-events: none;
  color: var(--text-secondary);
  font-size: var(--text-xs);
}

.hour-rail {
  position: absolute;
  inset: var(--hour-inset);
  border-radius: inherit;
}

.hour-rail input {
  position: absolute;
  left: calc(var(--start-index, 0) * 12.5%);
  width: calc(var(--slot-count, 8) * 12.5%);
}

.hour-rail input:disabled {
  cursor: default;
}

.hour-labels button {
  position: relative;
  z-index: 0;
  pointer-events: auto;
  width: 100%;
  padding: 0;
  background: transparent;
  font-size: inherit;
  line-height: 16px;
  color: inherit;
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
}

.hour-labels button:disabled {
  opacity: 1;
  color: var(--text-quaternary);
  cursor: not-allowed;
}

.hour-labels button:disabled::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 50% 0 auto;
  height: calc(var(--hour-height) - var(--hour-inset) * 2);
  transform: translateY(-50%);
  background: repeating-linear-gradient(135deg, transparent 0 5px, var(--border-subtle) 5px 6px) var(--bg-sunken);
  pointer-events: none;
}

.hour-labels button:first-child:disabled::before,
.hour-labels button:not(:disabled) + button:disabled::before {
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.hour-labels button:last-child:disabled::before,
.hour-labels button:disabled:has(+ button:not(:disabled))::before {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.hour-labels button.pending {
  color: var(--text-primary);
  text-decoration: underline dotted;
  text-underline-offset: 1px;
}

.hour-labels button.active {
  color: var(--bg-canvas);
  cursor: grab;
}

@media (hover: hover) {
  .hour-labels button:not(:disabled):not(.active):hover {
    color: var(--text-primary);
  }
}

/* === 산 상세 · 제목과 날씨 === */

.detail-hero {
  padding: var(--space-4);
  background: transparent;
}

.detail-top {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.detail-back {
  width: var(--space-6);
  height: var(--space-6);
  flex: none;
  margin-left: calc(var(--space-1) * -1);
  background: transparent;
  color: var(--text-secondary);
}

.detail-back .icon {
  transform: rotate(180deg);
}

#detail-panel .icon {
  fill: currentColor;
  stroke: none;
  flex-shrink: 0;
}

.detail-hero h1 {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.5px;
  margin: 0;
  word-break: keep-all;
}

.detail-meta {
  padding-left: calc(var(--space-6) + var(--space-1));
  font-size: var(--text-xs);
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
}

.detail-weather-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
}

.detail-weather {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.detail-weather strong {
  display: inline-flex;
  align-items: flex-start;
  font-size: calc(var(--text-xl) * 2);
  line-height: 1;
  font-weight: var(--font-regular);
  letter-spacing: -2px;
}

.detail-weather strong small {
  font-size: var(--text-2xl);
  line-height: 1;
  letter-spacing: 0;
  margin-left: 2px;
}

.detail-weather-info {
  min-width: 0;
  margin: 0;
}

.detail-weather-context {
  display: grid;
  gap: 5px;
  text-align: left;
}

.detail-weather-context small {
  display: block;
  font-size: var(--text-2xs);
  line-height: var(--lh-normal);
  color: var(--text-tertiary);
}

.weather-basis {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.weather-basis-option,
.course-button .course-type-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 2px 3px;
  border-radius: calc(var(--radius-sm) - var(--space-1));
  color: var(--text-quaternary);
  font-size: var(--text-2xs);
  font-weight: var(--font-semibold);
  line-height: var(--lh-tight);
  white-space: nowrap;
  cursor: default;
  border: 1px solid var(--text-quaternary);
}

.weather-basis-option.active,
.course-button .course-type-tag {
  color: var(--text-secondary);
  border: 1px solid var(--text-secondary);
}

.course-button .course-type-tag { border-color: var(--text-quaternary) !important; }

.weather-basis-option.active::before {
  visibility: visible;
}

.detail-weather-description {
  margin: 0;
  font-size: var(--text-2xs);
  color: var(--text-tertiary);
}

.weather-stats span {
  display: block;
  font-size: var(--text-2xs);
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.weather-stats strong {
  font-size: var(--text-md);
  font-variant-numeric: tabular-nums;
  font-weight: var(--font-semibold);
}

/* === 산 상세 · 추천 점수와 기온, 코스 === */

.detail-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: 0 var(--space-4) var(--space-5);
}

.detail-conditions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.detail-section {
  min-width: 0;
  padding: 0;
  border: 0;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-1);
}

.section-label h2 {
  font-size: var(--text-base);
  margin: 0;
  font-weight: var(--font-semibold);
}

.section-label > span {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.score-line {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.score-value {
  font-size: calc(var(--text-lg) * 2);
  flex-shrink: 0;
  line-height: var(--lh-tight);
  letter-spacing: -1px;
  font-weight: var(--font-semibold);
  color: var(--accent-success-bright);
}

.score-value small {
  font-size: var(--text-xs);
  font-weight: var(--font-regular);
  color: var(--text-tertiary);
  letter-spacing: 0;
}

.score-line p {
  font-size: var(--text-xs);
  line-height: var(--lh-loose);
  color: var(--text-secondary);
  margin: 0;
}

.score-meter {
  height: 4px;
  background: var(--bg-canvas);
  border-radius: var(--radius-full);
  margin-top: var(--space-2);
  overflow: hidden;
}

.score-meter > span {
  display: block;
  height: 100%;
  background: var(--accent-success-bright);
}

.sun-row {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-3);
  gap: var(--space-2);
}

.sun-row > div {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.sun-row .icon {
  width: 16px;
  height: 16px;
}

.sun-row b {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.hourly-chart {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-items: stretch;
}

.chart-hour {
  min-width: 0;
  background: transparent;
  border-radius: var(--radius-sm);
  display: grid;
  grid-template-rows: var(--space-3) var(--space-5) var(--space-4) minmax(0, 1fr);
  gap: var(--space-1);
  align-items: center;
  justify-items: center;
  padding: var(--space-2) 0;
  line-height: var(--lh-tight);
  color: var(--text-secondary);
  font-size: var(--text-2xs);
}

.chart-hour.active {
  background: color-mix(in srgb, var(--text-primary) 12%, transparent);
  color: var(--text-primary);
}

.chart-hour b {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
}

.chart-hour .weather-icon {
  width: 16px;
  height: 16px;
}

.chart-bar {
  align-self: end;
  width: 10px;
  min-height: 3px;
  border-radius: calc(var(--radius-sm) / 2);
  background: var(--accent-info-bright);
}

.course-button {
  background: var(--bg-raised);
  border: 0;
  border-radius: var(--radius-sm);
  width: 100%;
  text-align: left;
  padding: var(--space-3);
  margin-bottom: var(--space-1);
}

.course-button .course-info { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.course-button .course-tags { display: inline-flex; flex: none; align-items: center; gap: 2px; }
.course-button .course-info .course-type-tag { margin-right: 0; }
.course-button .course-meta { display: inline-block; }
.course-button .course-metrics { display: inline; }
.course-button .course-metrics:not(:empty)::before { content: " · "; white-space: pre; }
.course-button .course-difficulty { display: inline; white-space: nowrap; color: var(--text-tertiary); font-weight: var(--font-medium); }
.course-button .course-difficulty[data-grade="easy"] { color: var(--accent-info-bright); }
.course-button .course-difficulty[data-grade="moderate"] { color: var(--accent-success-bright); }
.course-button .course-difficulty[data-grade="hard"] { color: var(--accent-warning-bright); }
.course-button .course-difficulty[data-grade="severe"] { color: var(--accent-danger-bright); }

.course-button:last-child {
  margin-bottom: 0;
}

.course-button.active {
  background: color-mix(in srgb, var(--accent-info-bright) 14%, transparent);
}

.course-button strong {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  display: block;
}

.course-button .course-name { display: block; margin-bottom: var(--space-2); font: inherit; color: inherit; }
/* 별칭은 제목 굵기 그대로, 경로는 같은 줄에서 한 단계 연하게 */
.course-button .course-name .course-nickname,
#route-sheet-title .course-nickname { font-weight: inherit; }
.course-button .course-name .course-route,
#route-sheet-title .course-route { display: inline; font: inherit; font-weight: var(--font-regular); color: var(--text-secondary); }
/* 코스 한줄 설명: 제목과 태그 줄 사이, 웹에서만 그린다(앱 모드는 data 속성만) */
.course-button .course-summary { margin: calc(-1 * var(--space-1)) 0 var(--space-2); color: var(--text-secondary); }

.course-button span {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
}

.trail-course-choices .course-button small {
  display: block;
  margin-top: var(--space-2);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: var(--lh-normal);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.detail-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: var(--space-3);
  width: 100%;
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  margin: 0;
}

.detail-button.secondary {
  justify-content: space-between;
  background: transparent;
  color: var(--text-secondary);
  padding: var(--space-2) 0;
}

.detail-source {
  font-size: var(--text-2xs);
  color: var(--text-secondary);
  line-height: var(--lh-loose);
  margin: 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.source-disclosure { font-size: var(--text-xs); color: var(--text-tertiary); line-height: var(--lh-loose); }
.source-disclosure a { color: inherit; }
.source-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; cursor: pointer; list-style: none; }
.source-disclosure > summary::-webkit-details-marker { display: none; }
.source-disclosure > summary::after { content: ""; width: 6px; height: 6px; margin-right: 3px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }
.source-disclosure[open] > summary::after { transform: rotate(225deg); }
.source-disclosure > summary:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 3px; }
.source-disclosure-content { padding-top: 8px; }

.detail-source dl,
.detail-source dd { margin: 0; }

.detail-source .source-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.detail-source dt { color: var(--text-tertiary); }
.detail-source dd { overflow-wrap: anywhere; display: flex; gap: 4px; }
.detail-source dd > span { display: block; color: var(--text-tertiary); }
.detail-source a { text-decoration: underline; text-underline-offset: 1px; }

.status-chip {
  display: inline-block;
  padding: 5px var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  color: var(--text-secondary);
  font-size: var(--text-xs);
}

.status-chip.warning {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--text-primary) 12%, transparent);
}

.poi-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.poi-counts > span {
  font-size: var(--text-xs);
  border: 0;
  padding: var(--space-2);
  min-width: 0;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: var(--bg-raised);
}

/* 상세 패널의 섹션 위계와 보조 정보 */
.detail-score {
  padding: var(--space-3);
  background: var(--bg-raised);
  border-radius: var(--radius-sm);
}

.detail-control .control-section {
  padding: 0;
  gap: 3px;
  flex-direction: column;
}

.detail-control .control-section .control-date {
  font-size: var(--text-2xs);
}

.score-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  margin-top: var(--space-2);
  font-size: var(--text-2xs);
  color: var(--text-tertiary);
  line-height: var(--lh-normal);
}

.score-meta:empty {
  display: none;
}

#detail-panel .quiet-note {
  margin: var(--space-1) 0 0;
  font-size: var(--text-xs);
  line-height: var(--lh-normal);
}

.detail-courses .section-label {
}

.poi-counts .poi-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poi-counts b {
  margin-left: auto;
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.detail-links {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: var(--space-2);
}

.score-meter.segmented {
  position: relative;
  height: auto;
  background: none;
  border-radius: 0;
  overflow: visible;
}

.score-meter.segmented::before {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--bg-canvas);
}

.score-filled {
  position: relative;
  display: flex;
  height: 6px;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.score-labels {
  /* Keep labels at the exact cumulative starts, even when narrow segments overlap. */
  position: relative;
  height: 1.5em;
  font-size: var(--text-2xs);
  line-height: 1.5;
  margin-bottom: 6px;
}

.score-segment {
  flex: 0 1 0;
  min-width: 0;
}

.score-segment-label {
  position: absolute;
  left: 0;
  color: var(--text-secondary);
  text-align: left;
  white-space: nowrap;
}

.score-segment-label:nth-child(2) { left: var(--score-start-1); }
.score-segment-label:nth-child(3) { left: var(--score-start-2); }
.score-segment-label:nth-child(4) { left: var(--score-start-3); }

.score-segment-fill {
  display: block;
  height: 6px;
  background: var(--score-color);
}

.score-segment.has-separator .score-segment-fill { box-shadow: inset 2px 0 var(--bg-canvas); }
.score-meter.empty .score-segment-fill { visibility: hidden; }

.detail-temperature .weather-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--space-4);
  margin: var(--space-4) 0 0;
  font-size: var(--text-xs);
}

.weather-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-2) 0;
  border-bottom: .5px solid var(--border-subtle);
  font-weight: var(--font-regular);
}

.weather-stat:nth-of-type(1), .weather-stat:nth-of-type(2) {
  border-top: .5px solid var(--border-subtle);
}

.weather-stat dt { flex-shrink: 0; color: var(--text-secondary); }
.weather-stat dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.chart-hour.past { opacity: .5; cursor: default; }
.chart-hour:disabled { cursor: default; }

.dust-observations { margin-top: var(--space-2); }
.dust-observations p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1);
  margin: 0;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.dust-observations p > span:last-child { font-size: var(--text-2xs); }
#camera-status:empty { display: none; }
/* 웹 지도 CCTV를 틀 수 없을 때: 두 줄 안내 아래 [다시 시도]. 앱 WebView는 이 버튼을 만들지 않는다. */
#camera-status:has(#camera-retry) { align-content: center; gap: 10px; }
#camera-retry {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 28px;
  cursor: pointer;
  pointer-events: auto;
}
#camera-retry:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }
#camera-source a { color: var(--text-primary); text-decoration: underline; }

.detail-dust, .detail-foliage, .detail-warnings, .phenomenon-section, .detail-control {
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  border: .5px solid var(--border-subtle);
}

/* === 지도 팝업 · 출처와 축척 === */

.maplibregl-popup-content {
  background: var(--bg-surface);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 12px;
  box-shadow: 0 6px 30px color-mix(in srgb, var(--bg-sunken) 15%, transparent);
  font-family: inherit;
  min-width: 170px;
  color: var(--text-primary);
}

.maplibregl-popup-content strong {
  font-size: var(--text-base);
}

.maplibregl-popup-content p {
  font-size: var(--text-2xs);
  line-height: var(--lh-loose);
  color: var(--text-secondary);
  margin: 3px 0 0;
}

.maplibregl-popup-close-button {
  font-size: var(--text-xl);
  padding: 3px var(--space-2);
  color: var(--text-secondary);
}

.maplibregl-ctrl-attrib {
  font-size: var(--text-2xs) !important;
  background: transparent !important;
}

.maplibregl-ctrl-top-right {
  top: calc(4px + env(safe-area-inset-top, 0px));
  right: calc(4px + env(safe-area-inset-right, 0px));
  max-width: calc(100% - 366px);
}

.maplibregl-ctrl-top-right .maplibregl-ctrl-attrib {
  max-width: 100%;
  margin: 0;
  line-height: var(--lh-normal);
  padding: 0;
  text-align: right;
}

.maplibregl-ctrl-attrib a {
  white-space: nowrap;
}

.maplibregl-ctrl-scale {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  color: var(--text-secondary) !important;
  font-size: var(--text-xs) !important;
  line-height: var(--lh-normal);
  white-space: nowrap;
  text-shadow: 0 1px 4px var(--bg-sunken);
}

/* === 초기 로딩 · 안내 메시지와 CCTV === */

.is-loading > :not(#map-loading):not(noscript):not(.header):not(.topbar):not(.modal-overlay),
.is-loading .search-wrap {
  visibility: hidden;
}

.is-loading .topbar { z-index: 21; }

.map-loading {
  position: fixed;
  inset: var(--map-header-height) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: var(--bg-canvas);
  z-index: 20;
}

.map-loading strong {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
}

.map-loading > span {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-2);
}

#map-loading-status {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  line-height: var(--lh-normal);
  color: var(--text-secondary);
  text-align: center;
}

.loading-indicator {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border-default);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-check {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: var(--text-primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.loading-check path {
  stroke-width: 2.5;
  stroke-dasharray: 1;
  animation: loading-check 0.22s ease-out both;
}

@keyframes loading-check {
  from {
    stroke-dashoffset: 1;
  }

  to {
    stroke-dashoffset: 0;
  }
}

.toast {
  border: 0;
  opacity: 1;
  animation: none;
  position: absolute;
  bottom: 245px;
  left: 50%;
  transform: translateX(-30%);
  background: color-mix(in srgb, var(--bg-raised) 96%, transparent);
  color: var(--text-primary);
  font-size: var(--text-sm);
  padding: 13px 20px;
  max-width: min(440px, 90vw);
  border-radius: var(--radius-md);
  z-index: 12;
  box-shadow: 0 6px 30px color-mix(in srgb, var(--bg-sunken) 15%, transparent);
  line-height: var(--lh-loose);
}

.mobile-detail-toggle,
.mobile-detail-close {
  display: none;
}

dialog {
  border: 0;
  background: var(--bg-surface);
  color: var(--text-primary);
  border-radius: var(--radius-lg);
  width: min(680px, calc(100vw - 30px));
  padding: var(--space-5);
  box-shadow: 0 20px 90px color-mix(in srgb, var(--bg-sunken) 40%, transparent);
}

dialog::backdrop {
  background: color-mix(in srgb, var(--bg-sunken) 70%, transparent);
  backdrop-filter: blur(5px);
}

.camera-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 17px;
}

.camera-heading h2 {
  margin: 0;
  font-size: var(--text-xl);
  letter-spacing: -0.7px;
}

.camera-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-sunken);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

#camera-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.camera-footer {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: 13px;
}

#camera-options {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

#camera-source {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex: 0 1 auto;
  min-width: 0;
  max-width: 45%;
  margin: 0;
  white-space: nowrap;
}

#camera-source a {
  overflow: hidden;
  text-overflow: ellipsis;
}

#camera-options button {
  flex-shrink: 0;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  padding: 7px var(--space-3);
  font-size: var(--text-xs);
  background: var(--bg-raised);
}

#camera-options button.active {
  background: var(--text-primary);
  color: var(--bg-surface);
}

#camera-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: var(--space-4);
  text-align: center;
  pointer-events: none;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: var(--lh-loose);
}

.no-script {
  position: fixed;
  inset: 40%;
  background: var(--bg-surface);
  padding: 20px;
  z-index: 20;
}

/* === 화면 크기별 배치 · 큰 화면, 태블릿, 모바일 === */

@media (min-width: 1600px) {
  :root { --map-sidebar-width: 380px; }

  .sidebar {
    width: var(--map-sidebar-width);
  }

  .search-wrap {
    width: var(--map-sidebar-width);
  }

  .timeline {
    left: calc(var(--map-sidebar-width) + 58px);
  }
}

@media (max-width: 1100px) {
  :root { --map-sidebar-width: 305px; }

  .topbar {
    gap: 20px;
  }

  .search-wrap {
    width: var(--map-sidebar-width);
  }

  .date-tabs button {
    min-width: 60px;
  }
}

@media (max-width: 760px) {
  .topbar {
    top: 12px;
    left: 15px;
    height: 43px;
    gap: 13px;
  }

  .search-wrap {
    height: 40px;
    border-radius: var(--radius-md);
    padding: 0 10px;
    gap: 7px;
    flex: none;
    width: 156px;
  }

  .search-wrap > .icon {
    width: 15px;
    height: 15px;
  }

  .map-actions {
    right: 15px;
    gap: 4px;
  }

  .rotation-buttons,
  .zoom-buttons {
    display: none;
  }




  .timeline {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    padding: 10px 10px;
  }

  .date-tabs {
  }

  .date-tabs button {
    padding: 6px var(--space-1);
    min-width: 55px;
  }

  .date-tabs button strong {
    font-size: inherit;
  }

  .hour-labels {
    font-size: var(--text-xs);
  }

  .sidebar {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: auto;
    max-height: 62dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    z-index: 7;
    transform: translateY(105%);
    transition: transform 0.28s;
    box-shadow: 0 -10px 40px color-mix(in srgb, var(--bg-sunken) 20%, transparent);
    padding-bottom: env(safe-area-inset-bottom, 10px);
  }

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

  .mountain-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 6px;
  }

  .mountain-row {
    padding: 10px 7px;
  }

  .mountain-row .row-name {
    font-size: var(--text-sm);
  }

  .mountain-row small {
    font-size: var(--text-2xs);
  }

  .mobile-detail-toggle {
    display: flex;
    position: absolute;
    right: 0;
    bottom: calc(100% + var(--space-2));
    align-items: center;
    gap: 5px;
    background: var(--bg-surface);
    padding: 10px 12px;
    box-shadow: 0 6px 30px color-mix(in srgb, var(--bg-sunken) 15%, transparent);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    z-index: 8;
  }

  body.panel-open .mobile-detail-toggle {
    display: none;
  }

  body.panel-open .mobile-detail-close {
    display: grid;
    position: sticky;
    top: 12px;
    width: 40px;
    height: 40px;
    margin: 12px 12px -52px auto;
    background: var(--bg-surface);
    color: var(--text-secondary);
    z-index: 1;
  }

  .detail-back {
    display: none;
  }

  .detail-top {
    padding-right: 40px;
  }

  .detail-meta {
    padding-left: 0;
  }

  .detail-hero {
    padding: var(--space-5) var(--space-5) var(--space-3) var(--space-5);
  }

  .detail-hero h1 {
    font-size: var(--text-xl);
  }

  .detail-weather strong {
    font-size: calc(var(--text-xl) * 2);
  }

  .detail-body {
    padding: 0 var(--space-5) var(--space-5) var(--space-5);
  }

  .toast {
    bottom: 315px;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100vw - 35px);
    font-size: var(--text-xs);
  }

  .maplibregl-ctrl-top-right {
    max-width: calc(100% - 231px - env(safe-area-inset-right, 0px));
  }

  .maplibregl-ctrl-attrib {
    font-size: var(--text-2xs) !important;
  }

  .search-results {
    left: 0;
    width: min(340px, calc(100vw - 30px));
    right: auto;
    top: 50px;
    max-height: calc(100dvh - 95px);
  }

  .camera-heading h2 {
    font-size: var(--text-xl);
  }

  dialog {
    padding: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}

/* === 특보 · 미세먼지 · 장소 아이콘 === */

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-heading h2 {
  margin: 0;
  font-size: var(--text-md);
}

.panel-heading .icon-button {
  width: 27px;
  height: 27px;
}

.panel-heading .icon {
  width: 16px;
  height: 16px;
}

.detail-alerts small {
  display: block;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: var(--lh-loose);
}

.alert-tag {
  display: inline-block;
  align-self: flex-start;
  padding: var(--space-1) 7px;
  border-radius: calc(var(--radius-sm) / 2);
  background: color-mix(in srgb, var(--text-primary) 12%, transparent);
  color: var(--text-primary);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
}

.alert-tag.level-2 {
  background: color-mix(in srgb, var(--accent-danger) 15%, transparent);
  color: var(--accent-danger-bright);
}

.alert-tag.level-3 {
  background: color-mix(in srgb, var(--accent-danger) 60%, var(--bg-sunken));
  color: var(--text-primary);
}

.alert-notice {
  font-size: var(--text-xs);
  line-height: var(--lh-loose);
  padding: 9px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--text-primary) 12%, transparent);
  color: var(--text-primary);
}

.detail-condition {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: var(--text-sm);
}

.detail-condition .condition-icon {
  font-size: 20px;
  font-style: normal;
  font-weight: var(--font-regular);
  line-height: 1;
}

.condition-icon.ph-fill { font-family: "Phosphor-Fill"; }
.condition-icon.ph-bold { font-family: "Phosphor-Bold"; }
.dust-detail .ph-smiley::before { content: "\e436"; }
.dust-detail .ph-smiley-meh::before { content: "\e43a"; }
.dust-detail .ph-smiley-sad::before { content: "\e43e"; }
.dust-detail .ph-smiley-melting::before { content: "\ee56"; }
.detail-condition b { font-size: var(--text-base); font-weight: var(--font-semibold); }
.dust-observations b { font-weight: var(--font-semibold); }
.phenomenon-detail { color: var(--accent-info-bright); }
.phenomenon-detail.possible { color: color-mix(in srgb, var(--accent-info-bright) 75%, var(--text-primary)); }
.phenomenon-detail .ph-waves::before { content: "\e6de"; }
.phenomenon-detail .ph-snowflake::before { content: "\e5aa"; }

.detail-link-icon {
  font-family: "Phosphor-Bold";
  font-size: 16px;
  font-style: normal;
  font-weight: var(--font-regular);
  line-height: 1;
}
.detail-link-icon.ph-arrow-up-right::before { content: "\e092"; }

.detail-alerts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px 0;
}

.detail-alerts > b {
  font-size: var(--text-xs);
}

.poi-key {
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
  width: 14px;
  height: 14px;
  color: inherit;
  font-size: var(--text-base);
  font-weight: normal;
  font-style: normal;
  flex-shrink: 0;
}

.poi-counts > span {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.poi-counts .poi-key {
  width: 14px;
  height: 14px;
  font-size: var(--text-sm);
}

.maplibregl-popup-content > strong {
  display: block;
  padding-right: var(--space-2);
}

@media (max-width: 760px) {
  .mountain-list {
    grid-template-columns: 1fr;
  }
}

.morning-button {
  background: transparent;
  color: var(--text-primary);
  border: 0;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  padding: 6px 9px;
}

/* === 날씨 효과 미리보기 === */

.weather-demo {
  position: absolute;
  top: 183px;
  left: calc(var(--map-sidebar-width) + 58px);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  max-width: calc(100vw - 440px);
  padding: 9px var(--space-3);
  background: var(--bg-raised);
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 30px color-mix(in srgb, var(--bg-sunken) 15%, transparent);
  z-index: 4;
}

.weather-demo strong {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-primary);
}

.weather-demo small {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-2xs);
  color: var(--text-secondary);
}

.weather-demo select {
  min-width: 0;
  max-width: 145px;
  padding: 6px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  color: var(--text-primary);
  font: inherit;
  font-size: var(--text-xs);
}

.weather-demo select:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

@media (min-width: 1700px) {
  .weather-demo {
    left: calc(var(--map-sidebar-width) + 58px);
  }
}

@media (max-width: 760px) {
  .weather-demo {
    top: 153px;
    left: 15px;
    max-width: calc(100vw - 90px);
    gap: 9px;
    padding: 7px 9px;
  }

  .weather-demo strong,
  .weather-demo select {
    font-size: var(--text-xs);
  }

  .weather-demo small {
    font-size: var(--text-2xs);
  }

  .weather-demo select {
    max-width: 126px;
  }
}

/* === 특보 미리보기와 팝업 === */

.alert-demo-stop {
  position: absolute;
  right: 82px;
  top: 98px;
  z-index: 4;
  font-size: var(--text-xs);
  padding: var(--space-2) 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-secondary);
  box-shadow: 0 6px 30px color-mix(in srgb, var(--bg-sunken) 15%, transparent);
  white-space: nowrap;
}

.alert-popup .maplibregl-popup-content {
  padding: 17px 19px;
}

.alert-popup-body {
  max-height: min(360px, calc(100dvh - 220px));
  overflow: auto;
}

.alert-popup-body > strong {
  display: block;
  padding-right: var(--space-3);
  font-size: var(--text-md);
}

.alert-popup-body .alert-popup-scope {
  margin: 6px 0 var(--space-3);
  color: var(--text-primary);
  font-size: var(--text-xs);
  line-height: var(--lh-loose);
}

.alert-popup-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-default);
}

.alert-popup-item small {
  font-size: var(--text-xs);
  line-height: var(--lh-loose);
  color: var(--text-secondary);
}

.alert-popup-item em {
  font-size: var(--text-2xs);
  line-height: var(--lh-normal);
  font-style: normal;
  color: var(--text-primary);
}

.alert-popup-body .alert-popup-source {
  font-size: var(--text-2xs);
  color: var(--text-secondary);
  margin: var(--space-3) 0 0;
  line-height: var(--lh-loose);
}

.alert-popup .maplibregl-popup-close-button {
  font-size: var(--text-xl);
  padding: var(--space-1) var(--space-2);
}

.alert-popup .alert-notice {
  font-size: var(--text-xs);
}

/* === 지도 팝업 색상 보정 === */
.brand small {
  color: var(--text-secondary);
}

.maplibregl-ctrl-attrib {
  color: var(--text-secondary) !important;
}

.maplibregl-ctrl-attrib a {
  color: inherit;
}

.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-right .maplibregl-popup-tip {
  border-bottom-color: var(--bg-surface);
}

.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip {
  border-top-color: var(--bg-surface);
}

.maplibregl-popup-anchor-left .maplibregl-popup-tip {
  border-right-color: var(--bg-surface);
}

.maplibregl-popup-anchor-right .maplibregl-popup-tip {
  border-left-color: var(--bg-surface);
}

/* === 산 목록과 상세 패널 · 날씨 아이콘과 점수 배치 === */
.row-main {
  width: 100%;
  min-width: 0;
}

.row-score {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
}

.row-name-line {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
}

.row-name-line .row-name {
  min-width: 0;
}

.row-alerts {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 2px;
}
.row-alerts:has(.row-alert-tag) { gap: 3px; }

.row-alert {
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: var(--font-regular);
  line-height: 1;
}

.row-alert.ph-fill {
  font-family: "Phosphor-Fill";
}
.row-alert.ph-bold {
  font-family: "Phosphor-Bold";
}
.row-alert.lvl-1,
.detail-condition.lvl-1 {
  color: var(--accent-warning-bright);
}
.row-alert.lvl-2,
.detail-condition.lvl-2 {
  color: var(--accent-danger-bright);
}
.row-alert.lvl-3,
.detail-condition.lvl-3 {
  color: var(--accent-critical-bright);
}

/* 브라우저 목록 특보: 홈 산행 추천과 같은 글자 태그(앱 WebView는 아이콘이라 이 클래스를 만들지 않는다) */
.row-alert-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 5px;
  border-radius: 4px;
  color: var(--accent-warning-bright);
  background: color-mix(in srgb, currentColor 13%, transparent);
  font-size: 11px;
  font-weight: var(--font-semibold);
  line-height: 1;
  white-space: nowrap;
}
.row-alert-tag.lvl-2 { color: var(--accent-danger-bright); }
.row-alert-tag.lvl-3 { color: var(--accent-critical-bright); }

.row-alert.ph-wind::before {
  content: "\e5d2";
}

.row-alert.ph-umbrella-simple::before {
  content: "\e686";
}

.row-alert.ph-thermometer-cold::before {
  content: "\e5c8";
}

.row-alert.ph-drop-slash::before {
  content: "\e954";
}

.row-alert.ph-snowflake::before {
  content: "\e5aa";
}

.row-alert.ph-fire::before {
  content: "\e242";
}

.row-alert.ph-dots-nine::before {
  content: "\e1fc";
}

.row-alert.ph-cloud-fog::before {
  content: "\e53c";
}

.row-alert.ph-tornado::before {
  content: "\e88c";
}

.row-alert.ph-warning::before {
  content: "\e4e0";
}

/* 산 목록: 산 정보 | 하늘 상태 | 기온 | 추천 점수 */
.row-main .row-name,
.row-main > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-temp {
  text-align: center;
  white-space: nowrap;
  font-size: var(--text-base);
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  font-weight: var(--font-regular);
}

.row-weather {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
}

.row-weather .ph-fill {
  font-family: "Phosphor-Fill";
  font-size: var(--text-md);
  font-style: normal;
  font-weight: var(--font-regular);
  line-height: 1;
  color: var(--text-secondary);
}

.row-weather .ph-sun::before {
  content: "\e472";
}

.row-weather .ph-cloud::before {
  content: "\e1aa";
}

.row-weather .ph-sun-dim::before {
  content: "\e474";
}

.row-weather .ph-umbrella-simple::before {
  content: "\e686";
}

.row-weather .ph-snowflake::before {
  content: "\e5aa";
}

.row-weather .ph-question::before {
  content: "\e3e8";
}

.row-weather .ph-moon::before {
  content: "\e330";
}

.weather-icon {
  object-fit: contain;
  flex: none;
  width: 20px;
  height: 20px;
}

.row-main > small {
  margin-top: 0;
}

.mountain-row {
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.detail-weather > .weather-icon {
  width: 44px;
  height: 44px;
  margin-left: -2px;
}

.detail-weather > small {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: var(--lh-loose);
  margin-left: auto;
}

.poi-counts .poi-key {
  padding: 0;
  border-radius: 0;
  background: transparent;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.phenomenon-slots {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* === 축척 · 현위치 표시 === */

#map-scale {
  width: 42px;
  display: flex;
  justify-content: center;
  margin: 0 0 2px;
  min-height: 14px;
}

#map-scale .maplibregl-ctrl-scale {
  width: auto !important;
  float: none;
  margin: 0;
  text-align: center;
}

.user-location {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-primary);
  box-shadow: 0 1px 5px color-mix(in srgb, var(--bg-sunken) 53%, transparent);
  pointer-events: none;
}

.user-location::before,
.user-location::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1px solid color-mix(in srgb, var(--text-primary) 40%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--text-primary) 9%, transparent);
  opacity: 0;
  animation: location-pulse 2.4s cubic-bezier(0.16, 0.5, 0.4, 1) infinite;
  pointer-events: none;
}

.user-location::after {
  animation-delay: 1.2s;
}

/* 브라우저 현위치 점: 앱과 같은 파란 점 + 흰 테. 앱 WebView(html.san-ios)는 건드리지 않는다. */
html:not(.san-ios) .user-location {
  --location-color: #0a84ff;
  /* 크기는 map.js가 줌에 맞춰 산 마커 지름(7~14px)으로 넣는다. 아래 값은 그 전 기본값. */
  width: 11px;
  height: 11px;
  background: var(--location-color);
  box-shadow: 0 0 0 1px #fff, 0 1px 4px rgba(0, 0, 0, .35);
}

html:not(.san-ios) .user-location::before,
html:not(.san-ios) .user-location::after {
  border-color: color-mix(in srgb, var(--location-color) 45%, transparent);
  background: color-mix(in srgb, var(--location-color) 14%, transparent);
}

@keyframes location-pulse {
  0% {
    transform: scale(0.5);
    opacity: 0.65;
  }

  75%,
  100% {
    transform: scale(2.8);
    opacity: 0;
  }
}

/* === 장소 상세 팝업 === */

.place-map-popup .place-popup {
  max-height: var(--place-popup-body-height);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.place-popup > strong {
  display: block;
  padding-right: var(--space-3);
}

.place-popup dl {
  margin: 3px 0 0;
  display: grid;
  gap: 3px;
}

.place-popup dl > div {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: var(--space-2);
  font-size: var(--text-xs);
  line-height: var(--lh-normal);
}

.place-popup dt {
  color: var(--text-secondary);
}

.place-popup dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.place-popup > p { font-size: var(--text-xs); line-height: 1.6; overflow-wrap: anywhere; }
.place-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-size: var(--text-xs); }
.place-actions a { padding: 5px 8px; border: 1px solid var(--border-default); border-radius: 6px; }

/* === 사진 목록 · 등록 · 확대 보기 === */

.map-photos .section-label {
  align-items: center;
}

.map-photo-marker {
  width: 44px;
  height: 48px;
  padding: 0 2px 8px;
  background: transparent;
  border-radius: 9px;
}

.map-photo-marker::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 12px;
  height: 9px;
  background: #fff;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: translateX(-50%);
}

.photo-marker-frame {
  position: relative;
  display: block;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 8px;
  background: var(--bg-raised);
  box-shadow: 0 2px 8px #0008;
}

.photo-marker-frame img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.map-photo-marker:hover .photo-marker-frame,
.map-photo-marker:focus-visible .photo-marker-frame {
  box-shadow: 0 0 0 3px #ffffff40, 0 2px 10px #0008;
}

.photo-marker-count {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 10px;
  background: var(--bg-surface);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
}

.photo-marker-gallery > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
  max-height: 240px;
  overflow-y: auto;
}

.photo-marker-popup .maplibregl-popup-content {
  width: 250px;
  padding: 16px;
}

.photo-add,
.photo-retry {
  background: var(--bg-raised);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  padding: var(--space-2) 10px;
}

.photo-add {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px;
  color: var(--text-secondary);
}

.photo-add > .ph-plus {
  font-family: "Phosphor-Bold";
  font-size: calc(var(--text-2xl) * .8);
  font-style: normal;
  line-height: 1;
  font-weight: var(--font-regular);
}

.photo-add > .ph-plus::before { content: "\e3d4"; }

.photo-add:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.photo-retry {
  margin-top: 9px;
  line-height: var(--lh-normal);
}

.map-photo-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.map-photo-thumb {
  position: relative;
  padding: 0;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-raised);
}

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

.map-photo-thumb span {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, color-mix(in srgb, var(--bg-sunken) 60%, transparent));
  font-size: var(--text-2xs);
  color: var(--text-primary);
  text-align: right;
  padding: var(--space-3) var(--space-1) var(--space-1);
}

/* Photo dialogs share the mountain cards' markup, styles and interactions. */
.map-page .photo-report-sheet,
.map-page .talk-image-modal {
  line-height: normal;
}

.map-page :is(.photo-report-sheet, .talk-image-modal) .ph-bold {
  font-family: "Phosphor-Bold";
  font-style: normal;
  font-weight: var(--font-regular);
  line-height: 1;
}

.map-page :is(.photo-report-sheet, .talk-image-modal) .ph-x::before { content: "\e4f6"; }
.map-page .photo-report-sheet .ph-image-square::before { content: "\e2cc"; }
.map-page .photo-report-sheet .ph-trash::before { content: "\e4a6"; }

.map-page:has(.photo-report-sheet:not([hidden]), .talk-image-modal:not([hidden])) #toast {
  z-index: 1300;
}

@media (max-width: 760px) {
  #map-scale {
    width: 37px;
  }

  .map-photo-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* === 등산로와 코스 · 하단 시트 === */

.route-sheet {
  position: absolute;
  left: calc(var(--map-sidebar-width) + 58px);
  right: 87px;
  bottom: 32px;
  max-width: 560px;
  max-height: min(320px, 44dvh);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 30px color-mix(in srgb, var(--bg-sunken) 15%, transparent);
  z-index: 8;
  animation: route-sheet-in 0.22s ease-out;
}

.route-sheet-header {
  flex-shrink: 0;
  padding: 10px 20px 0;
}

.route-sheet-header { padding: 16px; }

.route-sheet.course-detail .route-sheet-content { padding-top: 20px; }
.course-detail .route-metrics { display: grid; gap: 12px; }
.course-detail .route-metrics > dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 0; }
.course-detail .route-metrics > dl > div { display: flex; flex-direction: column; gap: 0px; min-width: 0; }
.course-detail .route-metrics dt { font-size: var(--text-xs); color: var(--text-secondary); }
.course-detail .route-metrics dd { margin: 0; font-size: var(--text-sm); font-weight: var(--font-semibold); }

.route-sheet-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.route-sheet-heading h2 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  letter-spacing: -0.4px;
  line-height: var(--lh-normal);
  margin: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.route-sheet-heading h2 { flex: 1; min-width: 0; }
.route-sheet-close { position: relative; display: grid; place-items: center; flex: none; width: 24px; height: 24px; padding: 0; border-radius: 6px; background: transparent; color: var(--text-secondary); }
.route-sheet-close::before { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 24px; height: 24px; border-radius: 6px; background: var(--bg-raised); pointer-events: none; }
.route-sheet-close .icon { position: relative; display: block; }
.route-sheet-close:hover { background: transparent; color: var(--text-primary); }
.route-sheet-close:hover::before { background: var(--bg-hover); }

.route-sheet-content {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 16px 16px;
  scrollbar-width: thin;
}

.route-details {
  display: grid;
  gap: 20px;
}

.route-details h3 {
  margin: 0 0 3px 0;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
}

.route-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) 28px;
  margin: 0;
}

.route-intro, .route-description p { margin: 0; color: var(--text-secondary); line-height: 1.7; }
.route-description p { color: var(--text-primary); }
.route-description[aria-label="코스의 매력"] { padding-top: 16px; border-top: 1px solid var(--border-subtle); }
.route-description[aria-label="산행 특징"] { padding-bottom: 16px; border-bottom: 1px solid var(--border-subtle); }
.route-disclaimer { margin: var(--space-3) 0 0; color: var(--text-tertiary); }
.route-gpx { display: inline-flex; align-self: flex-start; justify-self: start;  color: var(--text-tertiary); text-decoration: none; font-weight: var(--font-semibold); font-size: var(--text-xs); text-decoration: underline;text-underline-offset: 3px;  }
.route-gpx:hover { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 3px; }
.route-elevation { min-width: 0;}
.route-elevation-stats { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 6px 0 8px; }
.route-elevation-stats dt { color: var(--text-secondary); font-size: var(--text-xs); }
.route-elevation-stats dd { margin: 2px 0 0; font-size: var(--text-sm); font-weight: var(--font-semibold); }
.route-elevation-chart { display: block; width: 100%; height: auto; overflow: visible; }
.route-elevation-chart text { fill: var(--text-secondary); font-size: 16px; }
.elevation-grid { fill: none; stroke: var(--border-subtle); }
.elevation-area { fill: var(--text-tertiary); opacity: .08; }
.route-elevation-chart .elevation-line { fill: none; stroke: var(--technical-grade-color, #67717d); stroke-linecap: round; stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.route-difficulty-legend { display: grid; gap: 5px; list-style: none; margin: 12px 0 8px; padding: 0; font-size: var(--text-xs); color: var(--text-secondary); }
.route-difficulty-legend li { display: flex; align-items: baseline; gap: 6px; }
.route-difficulty-legend i { flex: 0 0 8px; height: 8px; border-radius: 2px; }
.difficulty-strolling,.difficulty-hiking { --technical-grade-color: #61bca1; fill: #61bca1; background: #61bca1; }
.difficulty-mountain_hiking { --technical-grade-color: #e0b764; fill: #e0b764; background: #e0b764; }
.difficulty-demanding_mountain_hiking { --technical-grade-color: #e28b65; fill: #e28b65; background: #e28b65; }
.difficulty-alpine_hiking,.difficulty-demanding_alpine_hiking,.difficulty-difficult_alpine_hiking { --technical-grade-color: #ce739c; fill: #ce739c; background: #ce739c; }
.difficulty-unknown { --technical-grade-color: #67717d; fill: #67717d; background: #67717d; }

.route-summary > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 52px;
}

.route-summary dt {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.route-summary dd {
  margin: 0;
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
}

.route-waypoints {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 2px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--text-xs);
}

.route-waypoints li {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  overflow-wrap: anywhere;
}

.route-waypoints li + li::before {
  content: "→";
  color: var(--text-tertiary);
}

.route-waypoints button {
  border: 0;
  background: none;
  padding: 2px 8px;
  font: inherit;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 100px;
  background: var(--bg-raised);
}
.route-place-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.route-place-buttons button {
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  font: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
}
.route-places h3 { font-size: var(--text-sm); }

.route-notice-text {
  font-size: var(--text-xs);
  line-height: var(--lh-loose);
  color: var(--text-secondary);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.route-sources {
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-xs);
  line-height: var(--lh-loose);
  color: var(--text-secondary);
}

/* Course credits stay quiet at the end of the detail page. */
.course-detail .route-sources { padding-top: 0; border-top: 0; color: var(--text-tertiary); }
.course-detail .route-sources a { color: inherit; }

.route-sources dl {
  display: grid;
  gap: var(--space-1);
  margin: 0;
}

.route-source {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: var(--space-2);
}

.route-source dt { color: var(--text-tertiary); }
.route-source dd { margin: 0; overflow-wrap: anywhere; }
.route-sources a {
  text-decoration: underline;
  text-underline-offset: 1px;
}

@keyframes route-sheet-in {
  from {
    transform: translateY(24px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (min-width: 1700px) {
  .route-sheet {
    left: calc(var(--map-sidebar-width) + 58px);
  }
}

@media (max-width: 760px) {
  .route-sheet {
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
    max-height: 40dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .route-sheet-header {
    padding: 10px 22px 0;
  }

  .route-sheet-heading h2 {
    font-size: var(--text-lg);
  }


  .route-sheet-content {
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  body.route-sheet-open .mobile-detail-toggle {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .route-sheet {
    animation: none;
  }
}

/* === 지도 회전 버튼 · 낮은 화면 높이 대응 === */


@media (max-width: 760px) and (max-height: 620px) {
  .map-actions {
    max-height: calc(100dvh - 225px);
    overflow-y: auto;
    scrollbar-width: none;
  }

  .map-actions > * {
    flex-shrink: 0;
  }
}

.course-button .course-type-tag { vertical-align: middle; margin-right: var(--space-2); cursor: inherit; }

.route-sheet-heading .course-type-tag {
  display: inline-block;
  vertical-align: middle;
  margin-right: var(--space-2);
  padding: 1px 5px;
  border: 1px solid var(--text-secondary);
  border-radius: 4px;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  white-space: nowrap;
}


/* Mountain heading and category tabs remain visible while each panel scrolls. */
.sidebar.has-detail { overflow: hidden; }
.sidebar.has-detail #detail-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.mountain-detail-heading { flex-shrink: 0; padding: 16px 16px 10px; }
.mountain-detail-heading h1 { margin: 0; font-size: var(--text-xl); line-height: var(--lh-tight); }
.mountain-detail-heading .detail-meta { margin-bottom: 0; }
.mountain-detail-tabs { display: flex; flex-shrink: 0; padding: 0 16px; border-bottom: 1px solid var(--border-subtle); }
.mountain-detail-tabs button {
  flex: 1; padding: 8px 0; border: 0; border-bottom: 1px solid transparent;
  background: none; color: var(--text-secondary); font: inherit; font-size: var(--text-base); cursor: pointer;
}
.mountain-detail-tabs button[aria-selected="true"] { color: var(--text-primary); border-bottom-color: var(--text-primary); font-weight: var(--font-semibold); }
.mountain-tab-panel { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
#mountain-tabpanel-courses > .detail-courses, #mountain-tabpanel-photos > .map-photos { margin: 0; padding: 16px; }
#mountain-tabpanel-photos .map-photo-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
#mountain-tabpanel-photos .map-photo-thumb { width: 100%; }
#mountain-tabpanel-photos .map-photo-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#mountain-tabpanel-photos .photo-add { min-height: 112px; }
/* 이야기 탭: 읽는 글이라 본문을 다른 탭보다 크게, 줄 간격은 넉넉하게. 상자 대신 가는 선으로 장을 나눈다. */
#mountain-tabpanel-story > .detail-story { margin: 0; padding: 16px 16px 40px; }
.detail-story { color: var(--text-primary); word-break: keep-all; overflow-wrap: break-word; }
.detail-story .story-photo { margin: 0 0 20px; }
.detail-story .story-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; background: var(--bg-hover); }
.detail-story .story-photo figcaption { display: grid; gap: 2px; margin-top: 8px; font-size: var(--text-xs); line-height: var(--lh-normal); }
.detail-story .story-photo-caption { color: var(--text-secondary); }
.detail-story .story-photo-credit { color: var(--text-tertiary); overflow-wrap: anywhere; }
.detail-story .story-photo-credit a { color: inherit; text-decoration: underline; text-underline-offset: 1px; }
.detail-story .story-intro { margin: 0 0 22px; font-size: 17px; line-height: 1.7; letter-spacing: -0.01em; }
.detail-story .story-chapter { margin: 0; padding: 18px 0 2px; border-top: 1px solid var(--border-subtle); }
.detail-story .story-chapter h2 { margin: 0 0 10px; font-size: var(--text-md); font-weight: var(--font-semibold); line-height: var(--lh-tight); }
.detail-story .story-chapter p { margin: 0 0 12px; font-size: var(--text-md); line-height: 1.75; color: var(--text-secondary); }
.detail-story .story-name { margin: 14px 0 18px; padding: 16px 16px 6px; border: 0; border-radius: 10px; background: var(--bg-hover); }
.detail-story .story-name h2 { font-size: var(--text-base); color: var(--text-tertiary); }
.detail-story .story-name + .story-chapter { border-top: 0; padding-top: 4px; }
.detail-story .story-sources { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border-subtle); }
.detail-story .story-sources .source-disclosure-content a { display: block; padding: 3px 0; text-decoration: underline; text-underline-offset: 1px; overflow-wrap: anywhere; }
.story-retry { background: var(--bg-raised); border-radius: var(--radius-sm); font-size: var(--text-xs); line-height: var(--lh-normal); padding: var(--space-2) 10px; }
/* Course selection replaces content inside the same sidebar/bottom sheet. */
body.course-detail-open #mountain-tabpanel-courses > .detail-courses { display: none; }
body.course-detail-open .route-sheet {
  position: static; display: block; width: 100%; height: auto; max-width: none; max-height: none;
  margin: 0; border-radius: 0; box-shadow: none; animation: none;
}
body.course-detail-open .route-sheet.course-detail .route-sheet-header { padding: 16px 16px 0; }
body.course-detail-open .route-sheet-content { overflow: visible; }
body.course-detail-open .mobile-detail-close { display: none; }
@media (max-width: 760px) {
  .sidebar.has-detail { height: 62dvh; padding-bottom: env(safe-area-inset-bottom,0px); }
  .mountain-detail-heading { padding-top: 20px; padding-right: 60px; }
}


.course-filters { display: grid; gap: 6px; margin-bottom: 16px; }
.course-filter-group { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 8px; align-items: center; }
.course-filter-label { font-size: var(--text-xs); color: var(--text-secondary); }
.course-filter-options { display: flex; flex-wrap: wrap; gap: 3px; }
.course-filter-options button { padding: 3px 5px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--text-secondary); font-size: var(--text-xs); white-space: nowrap; }
.course-filter-options button[aria-pressed="true"] { color: var(--text-primary); border-color: var(--border-default); background: var(--bg-hover); font-weight: var(--font-semibold); }
.course-filter-options button:disabled { opacity: .28; }
.course-filter-toolbar { display: flex; align-items: center; min-height: 20px; }
.course-filter-reset { padding: 3px 0; color: var(--text-secondary); background: transparent; font-size: var(--text-xs); }
.course-filter-reset:hover { color: var(--text-primary); }
@media (hover: hover) { .course-filters button:not(:disabled):hover { color: var(--text-primary); background: var(--bg-hover); } }

/* Five-grade rollout: the public four-grade palette is unchanged until opt-in. */
[data-course-difficulty="2"] .course-difficulty[data-grade="hard"] { color: var(--accent-warning-bright); }
[data-course-difficulty="2"] .course-difficulty[data-grade="severe"] { color: var(--accent-danger-bright); }
[data-course-difficulty="2"] .course-difficulty[data-grade="aspiring"] { color: var(--accent-critical-bright); }

/* === 국내/세계 전환 ===
   앱 WebView(html.san-ios)에는 적용하지 않는다: 앱 화면 불변. */
html:not(.san-ios) .map-page .topbar { gap: 8px; --scope-switch-width: 112px; }
html:not(.san-ios) .map-page .scope-switch { height: 49px; box-shadow: 0 6px 30px color-mix(in srgb, var(--bg-sunken) 15%, transparent); }
html:not(.san-ios) .map-page .scope-switch + .search-wrap { width: calc(var(--map-sidebar-width) - var(--scope-switch-width) - 8px); }

@media (max-width: 760px) {
  html:not(.san-ios) .map-page .topbar { --scope-switch-width: 96px; }
  html:not(.san-ios) .map-page .scope-switch { height: 40px; }
  html:not(.san-ios) .map-page .scope-switch + .search-wrap { width: 136px; }
}

/* === 목록: 날씨 아이콘·기온을 각자 고정 칸에 맞춰 세로 정렬 (앱 제외) === */
html:not(.san-ios) .mountain-row { grid-template-columns: minmax(0, 1fr) 40px 40px 28px; }
html:not(.san-ios) .mountain-row .row-weather { justify-content: center; }
html:not(.san-ios) .mountain-row .row-temp { text-align: right; }
html:not(.san-ios) .mountain-row .row-score { text-align: right; }

/* === 등산지도 개편 (브라우저 전용, 시안 정돈안 v2) ===
   html.san-ios(앱 WebView)에는 하나도 적용하지 않는다: 앱 화면 불변.
   넓은 화면: 왼쪽 400px 고정 패널(국내·세계 → 검색 → 목록), 오른쪽 조작 버튼은 묶음, 타임라인은 선택만 채움. */
@media (min-width: 960px) {
  html:not(.san-ios) .map-page { --map-dock-width: 400px; --map-dock-top: calc(var(--map-header-height) + 124px); }
  html:not(.san-ios) .map-page .topbar {
    top: var(--map-header-height);
    left: 0;
    width: var(--map-dock-width);
    height: auto;
    box-sizing: border-box;
    padding: 16px 20px 8px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    background: var(--bg-canvas);
    box-shadow: inset -1px 0 0 var(--border-default);
  }
  html:not(.san-ios) .map-page .scope-switch {
    width: 100%;
    height: 40px;
    padding: 2px;
    border-radius: 10px;
    background: var(--bg-raised);
    box-shadow: none;
  }
  html:not(.san-ios) .map-page .scope-switch a { border-radius: 8px; font-size: 15px; }
  html:not(.san-ios) .map-page .scope-switch a[aria-current="page"] { background: var(--seg-on); }
  html:not(.san-ios) .map-page .scope-switch + .search-wrap,
  html:not(.san-ios) .map-page .search-wrap {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--bg-raised);
    box-shadow: none;
  }
  html:not(.san-ios) .map-page .search-wrap input { font-size: 16px; }
  html:not(.san-ios) .map-page .sidebar {
    top: var(--map-dock-top);
    left: 0;
    bottom: 0;
    width: var(--map-dock-width);
    max-height: none;
    border-radius: 0;
    background: var(--bg-canvas);
    box-shadow: inset -1px 0 0 var(--border-default);
  }
  html:not(.san-ios) .map-page .mountain-list { padding: 0 20px 20px; }
  html:not(.san-ios) .map-page .mountain-row {
    min-height: 56px;
    padding: 8px 0;
    border-radius: 0;
    box-shadow: inset 0 -1px 0 var(--border-default);
  }
  html:not(.san-ios) .map-page .mountain-row:hover { background: none; }
  html:not(.san-ios) .map-page .mountain-row:hover .row-name { text-decoration: underline; text-underline-offset: 3px; }
  html:not(.san-ios) .map-page .mountain-row .row-name { font-size: 15px; font-weight: var(--font-bold); }
  html:not(.san-ios) .map-page .mountain-row small { margin-top: 2px; color: var(--text-tertiary); font-size: 13px; }
  html:not(.san-ios) .map-page .mountain-row .row-temp { font-size: 15px; }
  html:not(.san-ios) .map-page .mountain-row .row-score { font-size: 17px; font-weight: var(--font-bold); }
  html:not(.san-ios) .map-page .timeline,
  html:not(.san-ios) .map-page .route-sheet { left: calc(var(--map-dock-width) + 32px); right: 96px; max-width: 620px; }
}

/* 타임라인: 고른 날짜·시간만 채운 칩 */
html:not(.san-ios) .map-page .timeline { border-radius: 14px; }
html:not(.san-ios) .map-page .date-tabs button { height: 44px; border-radius: 10px; font-size: 13px; font-weight: var(--font-regular); }
html:not(.san-ios) .map-page .date-tabs button strong { font-weight: var(--font-bold); }
html:not(.san-ios) .map-page .date-tabs button.active { background: var(--text-primary); color: var(--bg-canvas); }
html:not(.san-ios) .map-page .date-tabs button.active strong { color: var(--bg-canvas); }

/* 오른쪽 조작 버튼: 44px 사각, 관련 버튼끼리 붙여 한 덩어리 */
@media (min-width: 761px) {
  html:not(.san-ios) .map-page .map-actions { --map-control-size: 44px; --map-group-button-height: 44px; --map-control-icon-size: 20px; gap: 8px; }
  html:not(.san-ios) .map-page .map-actions .action-button,
  html:not(.san-ios) .map-page .map-actions :is(.zoom-buttons, .rotation-buttons) { border-radius: 10px; box-shadow: 0 2px 10px color-mix(in srgb, var(--bg-sunken) 25%, transparent); }
  html:not(.san-ios) .map-page .map-actions .action-button,
  html:not(.san-ios) .map-page .map-actions :is(.zoom-buttons, .rotation-buttons) button { background: var(--bg-surface); }
  html:not(.san-ios) .map-page .map-actions :is(.zoom-buttons, .rotation-buttons) button + button { box-shadow: inset 0 1px 0 var(--border-default); }
  /* 내 위치 + 전국 보기, 날씨 + 단풍 + 장소 */
  html:not(.san-ios) .map-page #locate { margin-bottom: -8px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  html:not(.san-ios) .map-page #reset-view { border-top-left-radius: 0; border-top-right-radius: 0; }
  html:not(.san-ios) .map-page #city-weather-toggle { margin-bottom: -8px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  html:not(.san-ios) .map-page #foliage-toggle { margin-bottom: -8px; border-radius: 0; }
  html:not(.san-ios) .map-page #layers-toggle { border-top-left-radius: 0; border-top-right-radius: 0; }
  /* 묶음 버튼의 바깥 선·그림자는 뒤판(::after, z-index -1)에 그려 확대/축소 묶음처럼 한 덩어리로 보이게 한다.
     버튼마다 그림자를 주면 아래 칸 그림자가 위 칸에 번져 경계가 두꺼워지고, id 선택자가 공통 바깥 선을 덮어 단풍·장소는 선이 빠졌었다. */
  html:not(.san-ios) .map-page :is(#locate, #reset-view, #city-weather-toggle, #foliage-toggle, #layers-toggle) { position: relative; box-shadow: none; }
  html:not(.san-ios) .map-page :is(#reset-view, #foliage-toggle, #layers-toggle) { box-shadow: inset 0 1px 0 var(--border-default); }
  html:not(.san-ios) .map-page :is(#locate, #reset-view, #city-weather-toggle, #foliage-toggle, #layers-toggle)::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; box-shadow: 0 0 0 1px var(--border-default), 0 2px 10px var(--shadow-color); pointer-events: none; }
}

/* 브라우저 전용: 다른 메뉴와 같은 머리줄·하단 탭. 앱(.san-ios)은 머리줄·탭을 숨기므로 그대로. */
@media (min-width: 960px) {
  html:not(.san-ios) { --map-header-height: 60px; }
}
@media (max-width: 959px) {
  html:not(.san-ios) body.map-page { bottom: calc(58px + env(safe-area-inset-bottom, 0px)); overflow: visible; }
  /* 하단 탭(v3 높이 58px) 바로 위까지만 지도. 다른 메뉴와 같은 자리에 탭이 오게 한다. */
  html:not(.san-ios) body.map-page > .mobile-app-nav { position: absolute; top: 100%; bottom: auto; }
  html:not(.san-ios) .map-page #map-back { display: none; }
  /* iOS 홈 화면 웹앱: 하단 탭이 홈 인디케이터 몫(--pwa-bottom, styles.css)까지 차지한다. */
  html.san-pwa-indicator:not(.san-ios) body.map-page { bottom: calc(58px + var(--pwa-bottom)); }
}
@media (max-width: 760px) {
  html:not(.san-ios) .map-page .topbar { right: 15px; width: auto; }
  html:not(.san-ios) .map-page .search-wrap { flex: 1 1 auto; width: auto; min-width: 0; }
  html:not(.san-ios) .map-page .search-results { right: 0; width: auto; }
  html:not(.san-ios) .map-page .maplibregl-ctrl-top-right { top: 62px; max-width: calc(100% - 30px); }
}

/* ===== 리디자인 v3 "산중 일지" — 브라우저 지도 전용 =====
   앱 WebView(html.san-ios)에는 하나도 적용하지 않는다: 앱 화면 불변. 지도 색은 base-style.js의 종이 테마가 맡는다. */
html:not(.san-ios) body.map-page {
  --font-app: "IBM Plex Sans KR", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Apple SD Gothic Neo", sans-serif;
  --font-serif: "Gowun Batang", "IBM Plex Sans KR", -apple-system, "Apple SD Gothic Neo", serif;
  --font-bold: 600;
  font-family: var(--font-app);
  font-variant-numeric: tabular-nums;
}
html:not(.san-ios):not([lang="ko"]):not([lang="en"]) body.map-page { --font-app: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "PingFang SC", sans-serif; --font-serif: var(--font-app); }
/* 화면 테마(더보기): 기기 설정이면 media, 고르면 html[data-theme](브라우저만, 앱 WebView는 data-theme이 없다). :where()라 우선순위는 그대로. */
@media (prefers-color-scheme: light) {
  html:not(.san-ios):where(:not([data-theme="dark"])) body.map-page {
    color-scheme: light;
    --bg-canvas: #f4f3ef; --bg-surface: #fcfbf8; --bg-raised: #ecebe5; --bg-hover: #e6e4dd; --bg-sunken: #e4e2da;
    --bg-primary: var(--bg-canvas); --bg-secondary: var(--bg-surface); --bg-tertiary: var(--bg-raised);
    --text-primary: #1b1f1d; --text-secondary: #4a504c; --text-tertiary: #6a706b; --text-quaternary: #a3a7a2;
    --accent-brand: #2f5a80; --accent-brand-bright: #2f5a80; --accent-info: #2f5a80; --accent-info-bright: #2f5a80;
    --accent-success: #3f7a57; --accent-success-bright: #3f7a57; --accent-warning: #7e4510; --accent-warning-bright: #7e4510;
    --accent-danger: #a9473c; --accent-danger-bright: #a9473c; --accent-critical-bright: #a9332a; --accent-event: #9a5426;
    --border-subtle: #e6e4dd; --border-default: #dedcd5; --border-strong: #b9b6ad;
    --fill-subtle: rgba(27,31,29,.05); --fill-medium: rgba(27,31,29,.08); --fill-sunken: rgba(27,31,29,.06); --fill-strong: rgba(27,31,29,.25);
    --ring: rgba(27,31,29,.12); --skeleton-shine: rgba(255,255,255,.7); --spinner-head: rgba(27,31,29,.55);
    --shadow-color: rgba(27,31,29,.10); --shadow-color-strong: rgba(27,31,29,.16); --scrim: rgba(27,31,29,.38); --scrim-strong: rgba(27,31,29,.5);
    --text-on-media: #fff; --map-land: #f1efe8; --status-warning-bg: #f1e5d2; --seg-on: #1b1f1d; --seg-shadow: none;
    --chart-line: rgba(27,31,29,.42); --chart-fill-top: rgba(27,31,29,.3); --chart-fill-bottom: rgba(27,31,29,.08);
    background: #d9dfe0;
  }
}
html:not(.san-ios):where([data-theme="light"]) body.map-page {
  color-scheme: light;
  --bg-canvas: #f4f3ef; --bg-surface: #fcfbf8; --bg-raised: #ecebe5; --bg-hover: #e6e4dd; --bg-sunken: #e4e2da;
  --bg-primary: var(--bg-canvas); --bg-secondary: var(--bg-surface); --bg-tertiary: var(--bg-raised);
  --text-primary: #1b1f1d; --text-secondary: #4a504c; --text-tertiary: #6a706b; --text-quaternary: #a3a7a2;
  --accent-brand: #2f5a80; --accent-brand-bright: #2f5a80; --accent-info: #2f5a80; --accent-info-bright: #2f5a80;
  --accent-success: #3f7a57; --accent-success-bright: #3f7a57; --accent-warning: #7e4510; --accent-warning-bright: #7e4510;
  --accent-danger: #a9473c; --accent-danger-bright: #a9473c; --accent-critical-bright: #a9332a; --accent-event: #9a5426;
  --border-subtle: #e6e4dd; --border-default: #dedcd5; --border-strong: #b9b6ad;
  --fill-subtle: rgba(27,31,29,.05); --fill-medium: rgba(27,31,29,.08); --fill-sunken: rgba(27,31,29,.06); --fill-strong: rgba(27,31,29,.25);
  --ring: rgba(27,31,29,.12); --skeleton-shine: rgba(255,255,255,.7); --spinner-head: rgba(27,31,29,.55);
  --shadow-color: rgba(27,31,29,.10); --shadow-color-strong: rgba(27,31,29,.16); --scrim: rgba(27,31,29,.38); --scrim-strong: rgba(27,31,29,.5);
  --text-on-media: #fff; --map-land: #f1efe8; --status-warning-bg: #f1e5d2; --seg-on: #1b1f1d; --seg-shadow: none;
  --chart-line: rgba(27,31,29,.42); --chart-fill-top: rgba(27,31,29,.3); --chart-fill-bottom: rgba(27,31,29,.08);
  background: #d9dfe0;
}
@media (prefers-color-scheme: dark) {
  html:not(.san-ios):where(:not([data-theme="light"])) body.map-page {
    --bg-canvas: #151816; --bg-surface: #1e2220; --bg-raised: #232725; --bg-hover: #2a2e2b; --bg-sunken: #0e100f;
    --bg-primary: var(--bg-canvas); --bg-secondary: var(--bg-surface); --bg-tertiary: var(--bg-raised);
    --text-primary: #eceae3; --text-secondary: #b9bbb4; --text-tertiary: #8e938d; --text-quaternary: #565c58;
    --border-subtle: #262a28; --border-default: #2c312e; --border-strong: #4a504c;
    --seg-on: #eceae3;
  }
}
html:not(.san-ios):where([data-theme="dark"]) body.map-page {
  --bg-canvas: #151816; --bg-surface: #1e2220; --bg-raised: #232725; --bg-hover: #2a2e2b; --bg-sunken: #0e100f;
  --bg-primary: var(--bg-canvas); --bg-secondary: var(--bg-surface); --bg-tertiary: var(--bg-raised);
  --text-primary: #eceae3; --text-secondary: #b9bbb4; --text-tertiary: #8e938d; --text-quaternary: #565c58;
  --border-subtle: #262a28; --border-default: #2c312e; --border-strong: #4a504c;
  --seg-on: #eceae3;
}
/* 떠 있는 면: 종이 위 흰 면 + 가는 선 + 옅은 그림자 */
html:not(.san-ios) .map-page :is(.search-wrap, .scope-switch, .timeline) { border: 1px solid var(--border-default); box-shadow: 0 2px 10px var(--shadow-color); }
html:not(.san-ios) .map-page .scope-switch { background: var(--bg-surface); }
html:not(.san-ios) .map-page .scope-switch a { color: var(--text-secondary); }
html:not(.san-ios) .map-page .scope-switch a[aria-current="page"] { background: var(--text-primary); color: var(--bg-canvas); font-weight: 600; }
html:not(.san-ios) .map-page .search-wrap input { font-family: inherit; }
html:not(.san-ios) .map-page .map-actions .action-button,
html:not(.san-ios) .map-page .map-actions :is(.zoom-buttons, .rotation-buttons) button { background: var(--bg-surface); color: var(--text-primary); }
html:not(.san-ios) .map-page .map-actions .action-button,
html:not(.san-ios) .map-page .map-actions :is(.zoom-buttons, .rotation-buttons) { box-shadow: 0 0 0 1px var(--border-default), 0 2px 10px var(--shadow-color); }
html:not(.san-ios) .map-page .map-actions .action-button { font-family: var(--font-app); font-weight: 600; }
html:not(.san-ios) .map-page .hour-track { background: var(--bg-raised); }
html:not(.san-ios) .map-page .date-tabs button.active { background: var(--text-primary); color: var(--bg-canvas); }
html:not(.san-ios) .map-page .mountain-row .row-weather img { display: block; width: 22px; height: 22px; }
html:not(.san-ios) .map-page .mountain-row .row-name,
html:not(.san-ios) .map-page :is(.detail-title, .detail-header h2, #detail-title) { font-family: var(--font-serif); font-weight: 700; }
html:not(.san-ios) .map-page .mountain-row .row-score { font-family: var(--font-serif); font-weight: 700; }

/* 첫 로딩(브라우저 전용): 국내/세계만 떠 있고 왼쪽 열이 비어 '나오다 만' 화면이 되지 않게
   검색창·하단 탭은 미리 보이고(누를 수는 없음), 넓은 화면은 왼쪽 열에 목록 모양 뼈대를 깐다. 스피너는 지도 영역만 덮는다.
   앱 WebView(html.san-ios)는 자체 덮개를 쓰므로 그대로. */
html:not(.san-ios) body.map-page.is-loading .search-wrap { visibility: visible; pointer-events: none; }
@media (min-width: 960px) {
  /* is-loading이 빠진 뒤 완료 표시가 사라지는 동안에도 같은 자리(지도 영역 가운데)에 둔다 */
  html:not(.san-ios) body.map-page .map-loading { left: var(--map-dock-width); }
  html:not(.san-ios) body.map-page.is-loading::before,
  html:not(.san-ios) body.map-page.is-loading::after { content: ''; position: fixed; z-index: 19; top: var(--map-dock-top); bottom: 0; pointer-events: none; }
  html:not(.san-ios) body.map-page.is-loading::before { left: 0; width: var(--map-dock-width); background: var(--bg-canvas); box-shadow: inset -1px 0 0 var(--border-default); }
  /* 목록 한 줄(60px)과 같은 자리: 이름·지역 줄, 날씨 동그라미, 기온, 점수, 줄 구분선. 세 줄마다 이름 길이를 바꿔 반복 */
  html:not(.san-ios) body.map-page.is-loading::after {
    left: 20px; width: 360px; background: var(--bg-hover);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='180'%3E%3Cg%3E%3Crect x='0' y='12' width='60' height='14' rx='4'/%3E%3Crect x='0' y='37' width='108' height='11' rx='4'/%3E%3Ccircle cx='256' cy='30' r='10'/%3E%3Crect x='300' y='23' width='24' height='14' rx='4'/%3E%3Crect x='332' y='21' width='28' height='18' rx='4'/%3E%3Crect x='0' y='59' width='360' height='1' fill-opacity='.5'/%3E%3C/g%3E%3Cg transform='translate(0 60)'%3E%3Crect x='0' y='12' width='44' height='14' rx='4'/%3E%3Crect x='0' y='37' width='92' height='11' rx='4'/%3E%3Ccircle cx='256' cy='30' r='10'/%3E%3Crect x='300' y='23' width='24' height='14' rx='4'/%3E%3Crect x='332' y='21' width='28' height='18' rx='4'/%3E%3Crect x='0' y='59' width='360' height='1' fill-opacity='.5'/%3E%3C/g%3E%3Cg transform='translate(0 120)'%3E%3Crect x='0' y='12' width='72' height='14' rx='4'/%3E%3Crect x='0' y='37' width='116' height='11' rx='4'/%3E%3Ccircle cx='256' cy='30' r='10'/%3E%3Crect x='300' y='23' width='24' height='14' rx='4'/%3E%3Crect x='332' y='21' width='28' height='18' rx='4'/%3E%3Crect x='0' y='59' width='360' height='1' fill-opacity='.5'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 360px 180px repeat-y;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='180'%3E%3Cg%3E%3Crect x='0' y='12' width='60' height='14' rx='4'/%3E%3Crect x='0' y='37' width='108' height='11' rx='4'/%3E%3Ccircle cx='256' cy='30' r='10'/%3E%3Crect x='300' y='23' width='24' height='14' rx='4'/%3E%3Crect x='332' y='21' width='28' height='18' rx='4'/%3E%3Crect x='0' y='59' width='360' height='1' fill-opacity='.5'/%3E%3C/g%3E%3Cg transform='translate(0 60)'%3E%3Crect x='0' y='12' width='44' height='14' rx='4'/%3E%3Crect x='0' y='37' width='92' height='11' rx='4'/%3E%3Ccircle cx='256' cy='30' r='10'/%3E%3Crect x='300' y='23' width='24' height='14' rx='4'/%3E%3Crect x='332' y='21' width='28' height='18' rx='4'/%3E%3Crect x='0' y='59' width='360' height='1' fill-opacity='.5'/%3E%3C/g%3E%3Cg transform='translate(0 120)'%3E%3Crect x='0' y='12' width='72' height='14' rx='4'/%3E%3Crect x='0' y='37' width='116' height='11' rx='4'/%3E%3Ccircle cx='256' cy='30' r='10'/%3E%3Crect x='300' y='23' width='24' height='14' rx='4'/%3E%3Crect x='332' y='21' width='28' height='18' rx='4'/%3E%3Crect x='0' y='59' width='360' height='1' fill-opacity='.5'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 360px 180px repeat-y;
    animation: map-skeleton-pulse 1.8s ease-in-out infinite;
  }
}
@keyframes map-skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) {
  html:not(.san-ios) body.map-page.is-loading::after { animation: none; }
}
@media (max-width: 959px) {
  /* 하단 탭은 원래 숨김 규칙(:not(#map-loading) 포함)보다 구체적이어야 보인다 */
  html:not(.san-ios) body.map-page.is-loading > nav.mobile-app-nav:not(#map-loading) { visibility: visible; }
  html:not(.san-ios) body.map-page .map-loading { bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
  html.san-pwa-indicator:not(.san-ios) body.map-page .map-loading { bottom: calc(58px + var(--pwa-bottom)); }
}

/* ===== 리디자인 v3: 브라우저 지도 산 상세(국내) =====
   본문 산 상세(/m/)와 같은 톤: 산 이름·현재 기온·점수·구역 제목은 고운바탕, 상자 대신 가는 선,
   보조 글자는 12px 아래로 내리지 않는다. 버튼은 본문 '지도 자세히 보기'처럼 테두리만. 앱(.san-ios)은 그대로. */
html:not(.san-ios) .map-page .mountain-detail-heading h1 { font-family: var(--font-serif); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
html:not(.san-ios) .map-page .mountain-detail-heading .detail-meta { font-size: 13px; color: var(--text-tertiary); }
html:not(.san-ios) .map-page .mountain-detail-tabs { border-bottom-color: var(--border-default); }
html:not(.san-ios) .map-page .mountain-detail-tabs button { padding: 10px 0 9px; border-bottom-width: 2px; font-size: 15px; }
html:not(.san-ios) .map-page .detail-weather strong { font-family: var(--font-serif); font-size: 40px; font-weight: 700; letter-spacing: -0.02em; }
html:not(.san-ios) .map-page .detail-weather strong small { font-size: 26px; }
html:not(.san-ios) .map-page .weather-basis-option { font-size: 11px; }
html:not(.san-ios) .map-page :is(.detail-weather-context small, .detail-weather-description) { font-size: 12px; color: var(--text-tertiary); }
html:not(.san-ios) .map-page .detail-body .section-label h2 { font-family: var(--font-serif); font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
html:not(.san-ios) .map-page .detail-body .section-label > span { font-size: 12px; }
html:not(.san-ios) .map-page .detail-score,
html:not(.san-ios) .map-page .detail-conditions .detail-section { padding: 16px 0 0; border: 0; border-top: 1px solid var(--border-default); border-radius: 0; background: none; }
html:not(.san-ios) .map-page .detail-conditions { gap: 20px; }
html:not(.san-ios) .map-page .score-value { font-family: var(--font-serif); font-size: 40px; font-weight: 700; letter-spacing: -0.02em; }
html:not(.san-ios) .map-page .score-value small { font-family: var(--font-app); font-size: 13px; font-weight: 400; letter-spacing: 0; }
html:not(.san-ios) .map-page .score-segment-label { font-size: 11px; }
html:not(.san-ios) .map-page :is(.score-meta, .quiet-note, .detail-alerts small, .detail-alerts > b) { font-size: 12px; }
html:not(.san-ios) .map-page .chart-hour { font-size: 11px; }
html:not(.san-ios) .map-page .chart-hour b { font-size: 13px; }
html:not(.san-ios) .map-page .weather-stats { font-size: 13px; }
html:not(.san-ios) .map-page .weather-stat dt { color: var(--text-tertiary); }
html:not(.san-ios) .map-page .weather-stat dd { color: var(--text-primary); font-weight: 600; }
html:not(.san-ios) .map-page .detail-condition b,
html:not(.san-ios) .map-page .foliage-peak time { font-size: 15px; }
html:not(.san-ios) .map-page .detail-button:not(.secondary) { height: 40px; padding: 0 14px; border: 1px solid var(--text-primary); border-radius: 8px; background: none; font-size: 14px; font-weight: 600; }
html:not(.san-ios) .map-page .detail-source :is(summary, .source-disclosure-content) { font-size: 12px; }
html:not(.san-ios) .map-page .detail-story .story-chapter h2 { font-family: var(--font-serif); font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
html:not(.san-ios) .map-page .detail-story .story-name h2 { font-size: 14px; }
html:not(.san-ios) .map-page .detail-story .story-sources :is(summary, .source-disclosure-content) { font-size: 12px; }
@media (min-width: 960px) {
  /* 좌우 여백은 목록과 같은 20px */
  html:not(.san-ios) .map-page .mountain-detail-heading { padding: 18px 20px 12px; }
  html:not(.san-ios) .map-page .mountain-detail-tabs { padding: 0 20px; }
  html:not(.san-ios) .map-page .detail-hero { padding-left: 20px; padding-right: 20px; }
  html:not(.san-ios) .map-page .detail-body { padding-left: 20px; padding-right: 20px; }
  html:not(.san-ios) .map-page :is(#mountain-tabpanel-courses > .detail-courses, #mountain-tabpanel-photos > .map-photos) { padding: 16px 20px; }
  html:not(.san-ios) .map-page #mountain-tabpanel-story > .detail-story { padding: 16px 20px 40px; }
}
/* 작은 표지(산악예보·단기예보, 순환·대표): 테두리 상자 대신 산행 추천 특보 태그와 같은 옅은 바탕 */
html:not(.san-ios) .map-page :is(.weather-basis-option, .course-button .course-type-tag) { height: 18px; padding: 0 5px; border: 0 !important; border-radius: 4px; background: color-mix(in srgb, currentColor 10%, transparent); font-size: 11px; font-weight: 600; }
html:not(.san-ios) .map-page .weather-basis-option.active { color: var(--text-primary); }
html:not(.san-ios) .map-page .weather-basis-option:not(.active) { color: var(--text-tertiary); background: none; }
/* 코스 목록: 회색 상자 대신 가는 선 목록(본문 '대표 등산 코스'처럼). 고른 코스만 옅은 산청 바탕 */
html:not(.san-ios) .map-page .course-filter-label { font-size: 12px; }
html:not(.san-ios) .map-page .course-filter-options button { padding: 4px 7px; font-size: 13px; }
html:not(.san-ios) .map-page .course-filter-group { grid-template-columns: 40px minmax(0, 1fr); }
html:not(.san-ios) .map-page .course-button { position: relative; width: calc(100% + 24px); margin: 0 -12px; padding: 14px 12px; border-radius: 8px; background: none; }
html:not(.san-ios) .map-page .course-button::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 1px; background: var(--border-default); }
html:not(.san-ios) .map-page .course-button:hover { background: var(--bg-hover); }
html:not(.san-ios) .map-page .course-button.active { background: color-mix(in srgb, var(--accent-info-bright) 12%, transparent); }
html:not(.san-ios) .map-page .course-button:is(:hover, .active)::after { visibility: hidden; }
html:not(.san-ios) .map-page .course-button strong { font-size: 15px; }
html:not(.san-ios) .map-page .course-button span { font-size: 13px; }
html:not(.san-ios) .map-page .course-button .course-route { font-size: inherit; }
/* 사진 추가: 본문 산 상세 '산사진' 버튼처럼 점선 테두리 */
html:not(.san-ios) .map-page .photo-add { border: 1px dashed var(--border-strong); border-radius: 8px; background: none; color: var(--text-secondary); font-size: 13px; }
html:not(.san-ios) .map-page .photo-add:hover { background: var(--bg-hover); }
/* 코스 상세: 사이드바와 같은 종이 바탕, 제목은 고운바탕, 수치는 본문 산 상세 지표처럼 */
html:not(.san-ios) body.map-page.course-detail-open .route-sheet { background: var(--bg-canvas); }
html:not(.san-ios) .map-page #route-sheet-title { font-family: var(--font-serif); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }
html:not(.san-ios) .map-page .route-waypoints { font-size: 12px; }
html:not(.san-ios) .map-page .route-waypoints button { padding: 3px 8px; border-radius: 4px; }
html:not(.san-ios) .map-page :is(.route-summary, .route-elevation-stats) dt { color: var(--text-tertiary); font-size: 12px; }
html:not(.san-ios) .map-page :is(.route-summary, .route-elevation-stats) dd { color: var(--text-primary); font-size: 15px; font-weight: 600; }
html:not(.san-ios) .map-page .route-description h3 { font-family: var(--font-serif); color: var(--text-primary); font-size: 16px; font-weight: 700; }
html:not(.san-ios) .map-page .route-description p { font-size: 14px; line-height: 1.75; }
html:not(.san-ios) .map-page .route-gpx { font-size: 13px; }
html:not(.san-ios) .map-page .route-sources :is(summary, .source-disclosure-content) { font-size: 12px; }
/* 코스 상세: 제목 아래 코스 형태와 설명, 고도 그래프 위 경유 장소 이름(앱 코스 화면과 같은 구성) */
html:not(.san-ios) .map-page .route-type { display: flex; align-items: center; gap: 12px; }
html:not(.san-ios) .map-page .route-type > i { flex: 0 0 32px; color: var(--text-secondary); font-size: 24px; text-align: center; }
html:not(.san-ios) .map-page .route-type strong { display: block; color: var(--text-primary); font-size: 15px; font-weight: 600; line-height: 1.4; }
html:not(.san-ios) .map-page .route-type p { margin: 2px 0 0; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
html:not(.san-ios) .map-page .route-elevation-figure { min-width: 0; }
html:not(.san-ios) .map-page .route-elevation-plot { position: relative; }
html:not(.san-ios) .map-page .route-elevation-chart.is-placed text { fill: var(--text-tertiary); font-size: 12px; font-variant-numeric: tabular-nums; }
html:not(.san-ios) .map-page .route-elevation-chart.is-placed .elevation-grid { stroke: var(--border-default); }
html:not(.san-ios) .map-page .route-elevation-chart.is-placed .elevation-grid.is-dashed { stroke-dasharray: 3 4; }
html:not(.san-ios) .map-page .route-elevation-chart.is-placed .elevation-line { stroke-width: 2.5; }
html:not(.san-ios) .map-page .elevation-place-connector { fill: none; stroke: var(--text-tertiary); stroke-width: .8; }
html:not(.san-ios) .map-page .elevation-place-dot { fill: var(--text-primary); }
html:not(.san-ios) .map-page .route-elevation-places { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; pointer-events: none; }
html:not(.san-ios) .map-page .route-elevation-places li { position: absolute; display: flex; align-items: center; justify-content: center; height: 18px; }
html:not(.san-ios) .map-page .route-elevation-places :is(button, span) { pointer-events: auto; margin: 0; padding: 0; border: 0; background: none; color: var(--text-primary); font: inherit; font-size: 12px; font-weight: 400; line-height: 18px; white-space: nowrap; text-shadow: 0 0 2px var(--bg-canvas), 0 0 2px var(--bg-canvas), 0 0 4px var(--bg-canvas); }
html:not(.san-ios) .map-page .route-elevation-places button { cursor: pointer; }
html:not(.san-ios) .map-page .route-elevation-places button:hover { text-decoration: underline; text-underline-offset: 2px; }
html:not(.san-ios) .map-page .route-elevation-unlocated { margin: 6px 0 0; color: var(--text-tertiary); font-size: 12px; line-height: 1.5; }
@media (min-width: 960px) {
  html:not(.san-ios) body.map-page.course-detail-open .route-sheet.course-detail .route-sheet-header { padding: 18px 20px 0; }
  /* 붙박이 사이드바의 오른쪽 선은 inset 그림자라, 폭을 다 채운 코스 상세의 불투명 바탕이 덮었다. 사이드바와 같은 바탕이므로 비운다. */
  html:not(.san-ios) body.map-page.course-detail-open .route-sheet { background: none; }
  html:not(.san-ios) .map-page .route-sheet-content { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 959px) {
  /* 모바일 시트: 본문도 제목·탭과 같은 16px 선(원래 본문만 24px) */
  html:not(.san-ios) .map-page .detail-hero { padding-left: 16px; padding-right: 16px; }
  html:not(.san-ios) .map-page .detail-body { padding-left: 16px; padding-right: 16px; }
}

/* 지도 팝업(도시 날씨·장소·특보·사진)과 토스트를 사이트 말풍선·토스트와 같게: 짙은 바탕(라이트는 먹, 다크는 종이)에
   바탕색 글자, 10px 모서리, 선 없음, 같은 꼬리. styles.css의 .onboarding-callout·.toast(v3)와 한 벌. 앱 WebView(.san-ios)는 그대로. */
html:not(.san-ios) .map-page {
  --popup-fg: var(--bg-canvas);
  --popup-muted: color-mix(in srgb, var(--bg-canvas) 68%, transparent);
  --popup-line: color-mix(in srgb, var(--bg-canvas) 18%, transparent);
  --popup-fill: color-mix(in srgb, var(--bg-canvas) 13%, transparent);
}
html:not(.san-ios) .map-page .maplibregl-popup-content {
  min-width: 0;
  padding: 10px 14px 11px;
  border: 0;
  border-radius: 10px;
  background: var(--text-primary);
  color: var(--popup-fg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
  font-family: var(--font-app);
  font-size: 13px;
  line-height: 1.45;
}
html:not(.san-ios) .map-page :is(.maplibregl-popup-content > strong, .place-popup > strong, .alert-popup-body > strong, .photo-marker-gallery > strong) {
  display: block;
  padding-right: 22px;
  font-family: var(--font-app);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--popup-fg);
}
html:not(.san-ios) .map-page .maplibregl-popup-content p { margin: 3px 0 0; font-size: 12px; line-height: 1.5; color: var(--popup-muted); }
html:not(.san-ios) .map-page .maplibregl-popup-close-button {
  top: 5px; right: 5px; width: 26px; height: 26px; padding: 0; border-radius: 7px;
  font-size: 18px; line-height: 1; color: var(--popup-muted);
}
html:not(.san-ios) .map-page .maplibregl-popup-close-button:hover { background: var(--popup-fill); color: var(--popup-fg); }
html:not(.san-ios) .map-page .maplibregl-popup-tip {
  position: relative; z-index: 1; width: 10px; height: 10px;
  border: 0 !important; background: var(--text-primary); transform: rotate(45deg);
}
html:not(.san-ios) .map-page :is(.maplibregl-popup-anchor-bottom, .maplibregl-popup-anchor-bottom-left, .maplibregl-popup-anchor-bottom-right) .maplibregl-popup-tip { margin-top: -6px; }
html:not(.san-ios) .map-page :is(.maplibregl-popup-anchor-top, .maplibregl-popup-anchor-top-left, .maplibregl-popup-anchor-top-right) .maplibregl-popup-tip { margin-bottom: -6px; }
html:not(.san-ios) .map-page .maplibregl-popup-anchor-left .maplibregl-popup-tip { margin-right: -6px; }
html:not(.san-ios) .map-page .maplibregl-popup-anchor-right .maplibregl-popup-tip { margin-left: -6px; }
html:not(.san-ios) .map-page :is(.maplibregl-popup-anchor-top-left, .maplibregl-popup-anchor-bottom-left) .maplibregl-popup-tip { margin-left: 12px; }
html:not(.san-ios) .map-page :is(.maplibregl-popup-anchor-top-right, .maplibregl-popup-anchor-bottom-right) .maplibregl-popup-tip { margin-right: 12px; }
/* 장소 */
html:not(.san-ios) .map-page .place-popup dl { margin-top: 6px; gap: 3px; }
html:not(.san-ios) .map-page .place-popup dl > div { font-size: 12px; line-height: 1.5; }
html:not(.san-ios) .map-page .place-popup dt { color: var(--popup-muted); }
html:not(.san-ios) .map-page .place-popup dd { color: var(--popup-fg); }
html:not(.san-ios) .map-page .place-popup > p { color: var(--popup-muted); }
html:not(.san-ios) .map-page .place-popup a { color: var(--popup-fg); }
html:not(.san-ios) .map-page .place-actions { margin-top: 8px; }
html:not(.san-ios) .map-page .place-actions a { padding: 5px 10px; border: 1px solid var(--popup-line); border-radius: 7px; color: var(--popup-fg); font-weight: 500; }
html:not(.san-ios) .map-page .place-actions a:hover { background: var(--popup-fill); }
/* 특보 */
html:not(.san-ios) .map-page .alert-popup .maplibregl-popup-content { padding: 13px 16px 14px; }
html:not(.san-ios) .map-page .alert-popup-body .alert-popup-scope { margin: 3px 0 8px; font-size: 12px; color: var(--popup-muted); }
html:not(.san-ios) .map-page .alert-popup-item { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--popup-line); }
html:not(.san-ios) .map-page .alert-popup-item small { font-size: 12px; color: var(--popup-muted); }
html:not(.san-ios) .map-page .alert-popup-item em { color: var(--popup-fg); }
html:not(.san-ios) .map-page .alert-popup-body .alert-popup-source { margin-top: 10px; font-size: 11px; color: var(--popup-muted); }
html:not(.san-ios) .map-page .alert-popup .alert-tag { background: var(--popup-fill); color: var(--popup-fg); }
html:not(.san-ios) .map-page .alert-popup .alert-tag.level-2 { background: color-mix(in srgb, var(--accent-danger-bright) 38%, transparent); color: var(--popup-fg); }
html:not(.san-ios) .map-page .alert-popup .alert-tag.level-3 { background: var(--accent-danger-bright); color: #fff; }
html:not(.san-ios) .map-page .alert-popup .alert-notice { background: var(--popup-fill); color: var(--popup-fg); }
/* 토스트: 사이트와 같은 짙은 바탕 */
html:not(.san-ios) .map-page .toast { padding: 12px 14px; border-radius: 10px; background: var(--text-primary); color: var(--bg-canvas); box-shadow: 0 4px 16px rgba(0, 0, 0, .18); font-size: 14px; line-height: 1.4; }

/* 코스 난이도 색(브라우저): 지도 코스선(map.js applySiteStyle)과 목록 글자가 같은 색상. 다섯 단계가 한눈에 갈리게
   파랑·초록·주황·빨강·보라로 벌린다. 라이트 글자는 대비를 위해 같은 색상의 진한 값(-text). 앱은 그대로. */
html:not(.san-ios) body.map-page {
  --course-easy: #1f74c4; --course-moderate: #2a9150; --course-hard: #e47f0c; --course-severe: #d3261f; --course-aspiring: #7e3bc9;
  --course-easy-text: #1d68b0; --course-moderate-text: #237d43; --course-hard-text: #b5600a; --course-severe-text: #c0221b; --course-aspiring-text: #7434b8;
}
@media (prefers-color-scheme: dark) {
  html:not(.san-ios):where(:not([data-theme="light"])) body.map-page {
    --course-easy: #5aa9ee; --course-moderate: #5cc27e; --course-hard: #f2a23c; --course-severe: #f0605a; --course-aspiring: #b58cf2;
    --course-easy-text: #5aa9ee; --course-moderate-text: #5cc27e; --course-hard-text: #f2a23c; --course-severe-text: #f0605a; --course-aspiring-text: #b58cf2;
  }
}
html:not(.san-ios):where([data-theme="dark"]) body.map-page {
  --course-easy: #5aa9ee; --course-moderate: #5cc27e; --course-hard: #f2a23c; --course-severe: #f0605a; --course-aspiring: #b58cf2;
  --course-easy-text: #5aa9ee; --course-moderate-text: #5cc27e; --course-hard-text: #f2a23c; --course-severe-text: #f0605a; --course-aspiring-text: #b58cf2;
}
html:not(.san-ios) .map-page .course-difficulty[data-grade="easy"] { color: var(--course-easy-text); }
html:not(.san-ios) .map-page .course-difficulty[data-grade="moderate"] { color: var(--course-moderate-text); }
html:not(.san-ios) .map-page .course-difficulty[data-grade="hard"] { color: var(--course-hard-text); }
html:not(.san-ios) .map-page .course-difficulty[data-grade="severe"] { color: var(--course-severe-text); }
html:not(.san-ios) .map-page .course-difficulty[data-grade="aspiring"] { color: var(--course-aspiring-text); }

/* 전국 보기(처음 위치로) 아이콘: 웹은 세계 지도와 같은 '되돌리기'(Phosphor arrow-counter-clockwise), 앱 WebView는 기존 나침반 그대로. */
#reset-view .icon-reset { display: none; }
html:not(.san-ios) .map-page #reset-view .icon-compass { display: none; }
html:not(.san-ios) .map-page #reset-view .icon-reset { display: inline; }
/* 사진 탭 썸네일 날짜: 사진 위 글자라 라이트·다크 구분 없이 흰 글자 + 어두운 그라데이션(라이트에서 먹 글자가 사진에 묻히던 것). 앱 WebView 제외. */
html:not(.san-ios) .map-page .map-photo-thumb span { color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
/* 산을 고르면 검색창 앞 같은 줄에 '← 산 목록'(세계 지도와 같은 자리·모양). 검색창과 같은 상자로 늘 보이고, 검색창은 그만큼 짧아진다.
   버튼은 map.js가 웹에서만 만들므로 앱 WebView에는 없다. 상세 제목 옆 ← 아이콘은 같은 일을 하므로 웹에서는 숨긴다. */
html:not(.san-ios) .map-page .map-detail-back { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 10px; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--bg-surface); box-shadow: 0 2px 10px var(--shadow-color); color: var(--text-primary); font-family: var(--font-app); font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; }
html:not(.san-ios) .map-page .map-detail-back[hidden] { display: none; }
html:not(.san-ios) .map-page .map-detail-back:hover { background: var(--bg-hover); }
html:not(.san-ios) .map-page .map-detail-back .icon { width: 17px; height: 17px; fill: currentColor; stroke: none; transform: rotate(180deg); }
html:not(.san-ios) .map-page .topbar.has-detail-back .search-wrap { flex: 1 1 0; width: auto; min-width: 0; }
html:not(.san-ios) .map-page .detail-back { display: none; }
html:not(.san-ios) .map-page .detail-meta { padding-left: 0; }
@media (min-width: 761px) and (max-width: 959px) {
  html:not(.san-ios) .map-page .topbar.has-detail-back { width: var(--map-sidebar-width); }
  /* 떠 있는 좁은 패널(305px)에서는 글자까지 넣으면 검색창이 90px로 줄어 화살표만 둔다(이름은 aria-label·title) */
  html:not(.san-ios) .map-page .map-detail-back { justify-content: center; width: 49px; height: 49px; padding: 0; }
  html:not(.san-ios) .map-page .map-detail-back span { display: none; }
}
@media (min-width: 960px) {
  /* 넓은 화면 왼쪽 패널: 국내·세계는 한 줄을 다 쓰고, 그 아래 줄에 '← 산 목록' + 검색창 */
  html:not(.san-ios) .map-page .topbar.has-detail-back { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 8px; }
  html:not(.san-ios) .map-page .topbar.has-detail-back .scope-switch { flex: 0 0 100%; }
  html:not(.san-ios) .map-page .map-detail-back { height: 48px; padding: 0 14px 0 12px; border-radius: 10px; background: var(--bg-raised); box-shadow: none; gap: 8px; }
  html:not(.san-ios) .map-page .map-detail-back .icon { width: 18px; height: 18px; }
  /* 왼쪽 패널 안 검색창은 세계 지도처럼 그림자 없이 테두리만 */
  html:not(.san-ios) .map-page .search-wrap { box-shadow: none; }
}
@media (max-width: 760px) {
  /* 좁은 화면은 검색창이 짧아지므로 결과 목록은 위 줄 전체 폭으로 */
  html:not(.san-ios) .map-page .topbar.has-detail-back { gap: 8px; }
  html:not(.san-ios) .map-page .topbar.has-detail-back .search-wrap { position: static; }
  html:not(.san-ios) .map-page .topbar.has-detail-back .search-results { left: 0; right: 0; width: auto; top: 50px; }
}

/* 공원 종류 칩(전체·국립공원·도립·군립공원): 세계 지도 사이드바 범위 칩과 같은 모양. map.js가 브라우저에서만 만든다(앱 WebView에는 없음).
   761px 이상은 목록 패널 맨 위(검색창 바로 아래, 목록과 함께 스크롤), 모바일은 목록 시트가 없어 지도 위 검색창 아래 떠 있는 줄. */
html:not(.san-ios) .map-page .park-filter { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 21px 4px; }
html:not(.san-ios) .map-page .park-filter button { padding: 6px 10px; border: 1px solid var(--border-default); border-radius: 8px; background: var(--bg-surface); color: var(--text-secondary); font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1.4; cursor: pointer; }
html:not(.san-ios) .map-page .park-filter button.active { background: var(--text-primary); border-color: var(--text-primary); color: var(--bg-canvas); }
html:not(.san-ios) .map-page .park-filter button:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }
@media (hover: hover) { html:not(.san-ios) .map-page .park-filter button:not(.active):hover { background: var(--bg-hover); color: var(--text-primary); } }
html:not(.san-ios) .map-page .park-filter-floating { display: none; }
@media (min-width: 960px) {
  html:not(.san-ios) .map-page .park-filter { padding: 4px 20px 6px; }
}
@media (max-width: 760px) {
  html:not(.san-ios) .map-page #explore-panel > .park-filter { display: none; }
  html:not(.san-ios) .map-page .park-filter-floating { position: absolute; top: 62px; left: 15px; right: 15px; z-index: 4; display: flex; padding: 0; pointer-events: none; }
  html:not(.san-ios) .map-page .park-filter-floating button { pointer-events: auto; box-shadow: 0 2px 10px var(--shadow-color, #0000001a); }
  /* 산을 고르면 '← 산 목록'이 생기고 칩은 숨긴다(목록을 거르는 칩이라 상세에서는 쓸 일이 없다) */
  html:not(.san-ios) .map-page .topbar.has-detail-back + .park-filter-floating { display: none; }
  /* 지도 출처 글자는 칩 줄 아래로 */
  html:not(.san-ios) .map-page .maplibregl-ctrl-top-right { top: 100px; }
}

/* 코스 필터 초기화: 스타일 줄 오른쪽 끝에 아이콘+글자. map.js가 브라우저에서만 그린다(앱 WebView에는 필터가 없음). */
html:not(.san-ios) .map-page .course-filter-group-style { grid-template-columns: 40px minmax(0, 1fr) auto; }
html:not(.san-ios) .map-page .course-filter-reset { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border: 0; border-radius: 5px; background: none; color: var(--text-secondary); font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; }
html:not(.san-ios) .map-page .course-filter-reset i { font-size: 14px; }
html:not(.san-ios) .map-page .course-filter-reset:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 1px; }
/* 사진 탭 썸네일: 올린 사람 닉네임 + 날짜, 왼쪽 정렬(photos.js가 웹에서만 이 구조로 그린다) */
html:not(.san-ios) .map-page .map-photo-thumb .map-photo-caption { display: flex; flex-direction: column; gap: 1px; padding: 18px 8px 6px; text-align: left; line-height: 1.25; }
html:not(.san-ios) .map-page .map-photo-caption b { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
html:not(.san-ios) .map-page .map-photo-caption small { font-size: 11px; opacity: .85; }
