:root {
  --pink: #f3a3c6;
  --pink-strong: #8b345c;
  --pink-tint: rgb(243 163 198 / 20%);
  --pink-rgb: 243 163 198;
  --lime: #e0f26a;
  --lime-strong: #59640b;
  --lime-tint: rgb(224 242 106 / 24%);
  --lime-rgb: 224 242 106;
  --paper: #ffffff;

  --cream: var(--paper);
  --cream-strong: var(--lime);
  --coral: var(--pink);
  --coral-strong: var(--pink-strong);
  --coral-ink: #111111;
  --coral-tint: var(--pink-tint);
  --coral-rgb: var(--pink-rgb);
  --cobalt: var(--lime);
  --cobalt-strong: var(--lime-strong);
  --cobalt-tint: var(--lime-tint);
  --cobalt-rgb: var(--lime-rgb);

  --accent: var(--pink);
  --accent-strong: var(--pink-strong);
  --accent-tint: var(--pink-tint);
  --accent-rgb: var(--pink-rgb);

  --spark: var(--lime);
  --spark-strong: var(--lime-strong);
  --spark-tint: var(--lime-tint);
  --spark-rgb: var(--lime-rgb);

  --accent-glow: #f9d8e7;
  --rose-500: var(--accent);
  --rose-50: var(--accent-tint);
  --rose-100: var(--cream-strong);
  --rose-600: var(--accent);

  --bg: var(--paper);
  --warm-50: var(--bg);
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --editorial-frame: rgb(0 0 0 / 62%);
  --editorial-frame-soft: rgb(0 0 0 / 22%);

  /* 글자 */
  --ink: #111111;
  --muted: #646464;
  --muted-soft: rgb(17 17 17 / 62%);

  /* 구획 — 옅은 회색 선 */
  --line: rgb(0 0 0 / 14%);
  --hairline: rgb(0 0 0 / 14%);
  --hairline-soft: rgb(0 0 0 / 8%);
  --hairline-strong: rgb(0 0 0 / 24%);

  /* 그림자 — 종이가 살짝 뜬 정도로만 */
  --panel-shadow: 0 18px 50px rgb(68 50 35 / 10%);
  --control-shadow: 0 8px 24px rgb(68 50 35 / 8%);

  /* 모서리 */
  --radius: 16px;
  --radius-sm: 11px;     /* 작은 컨트롤 */
  --radius-pill: 999px;  /* 칩·버튼 */
  --subpage-radius: 20px;

  /* 모션 — 기존의 느긋한 톤을 그대로 유지합니다. */
  --ease-out: ease-out;
  --sheet-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sheet-duration: 560ms;

  --font-ui: SUIT, Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --font-display: var(--font-ui);
  --font-logo: "Noto Serif", Georgia, serif;
  --display-weight: 800;
  --display-weight-strong: 900;
  --label-tracking: 0.14em;

  --subpage-width-narrow: 760px;
  --subpage-width-default: 860px;
  --subpage-width-wide: 960px;
  /* 매거진·장소 상세처럼 그리드가 넓게 깔리는 페이지용. */
  --page-width-wide: 1120px;
  /* 페이지 좌우 여백. 페이지마다 22/28px 로 갈라져 있던 것을 하나로 모읍니다. */
  --page-gutter: 22px;

  /* 페이지 타이틀 3단 스케일. 같은 컴포넌트가 페이지마다 달라지지 않도록 여기서만 정합니다. */
  --title-hero: clamp(30px, 5.4vw, 50px);
  --title-subpage: clamp(32px, 4vw, 44px);
  --title-detail: clamp(28px, 6vw, 38px);

  --cafe: #ff2e7e;
  --walk: #00a982;
  --night: #3d6cff;
  --exhibit: #8b5cf6;
  --food: #ff4b3e;

  /* 모바일 하단 탭바. 지도 시트·요약 카드가 탭바에 가리지 않도록 높이를 변수로 노출합니다. */
  --bottom-nav-height: 58px;
  --bottom-nav-inset: env(safe-area-inset-bottom, 0px);
  --bottom-nav-total: calc(var(--bottom-nav-height) + var(--bottom-nav-inset));
}


* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  font-family: var(--font-ui);
  letter-spacing: var(--tracking-body);
  background: var(--warm-50);
}

html body:has(.subpage-header) {
  height: auto;
  min-height: 100%;
}

.subpage-header {
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--line);
}

.subpage-header__top {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  border-bottom: 1px solid var(--line);
}

.subpage-header__back,
.subpage-header__nav a,
.subpage-header__current {
  display: inline-flex;
  /* 두세 글자 링크라 폭이 21px 까지 좁아져 WCAG 24x24 를 못 맞췄습니다. */
  min-width: 44px;
  min-height: 44px;
  padding-inline: var(--space-2);
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1;
  text-decoration: none;
}

.subpage-header__back {
  gap: var(--space-2);
  flex: 0 0 auto;
  font-size: var(--text-sm);
  transition: color var(--duration-base) var(--ease-out);
}

.subpage-header__nav {
  min-width: 0;
}

.subpage-header__nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.subpage-header__nav li {
  display: inline-flex;
  align-items: center;
}

.subpage-header__nav li + li::before {
  margin: 0 var(--space-2);
  color: var(--line);
  content: "·";
}

.subpage-header__nav a {
  transition: color var(--duration-base) var(--ease-out);
}

.subpage-header__back:hover,
.subpage-header__nav a:hover {
  color: var(--rose-600);
}

.subpage-header__current {
  color: var(--accent);
  font-weight: var(--weight-display);
}

.subpage-header__back:focus-visible,
.subpage-header__nav a:focus-visible {
  border-radius: var(--radius-sm);
  outline: 2px solid rgb(var(--accent-rgb) / 42%);
  outline-offset: 3px;
}

.subpage-header__intro {
  padding: var(--space-9) 0 var(--space-8);
}

.subpage-header__eyebrow {
  margin: 0 0 var(--space-3);
  color: var(--accent);
  font-size: var(--text-2xs);
  font-weight: var(--weight-label);
  letter-spacing: 0.16em;
}

.subpage-header h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--title-subpage);
  font-weight: var(--display-weight-strong);
  letter-spacing: -0.042em;
  line-height: 1.16;
}

.subpage-header__lead {
  max-width: 640px;
  margin: var(--space-3) 0 0;
  color: var(--muted);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  text-wrap: pretty;
  word-break: keep-all;
}

button {
  color: inherit;
  font: inherit;
}

.map-page {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 520px;
  overflow: hidden;
}

.map-canvas {
  position: absolute;
  inset: 0;
  /* 네이버 지도 SDK가 컨테이너 position 을 inline relative 로 덮어써도 크기가 유지되게 명시 */
  width: 100%;
  height: 100%;
  background: var(--gray-100);
}

/* ── 네이버 줌 컨트롤 ────────────────────────────────────────────
   SDK 가 인라인 스타일로 그려서 클래스가 없습니다. 저작권 표기(.map_copyright)와
   로고를 건드리지 않도록, 이 컨트롤에만 있는 테두리 패턴으로 정확히 집어서
   우리 컨트롤 톤(흰 면·라운드·헤어라인·소프트 섀도우)으로 맞춥니다.
   인라인 스타일이라 !important 없이는 덮이지 않습니다. */
.map-canvas div[style*="border: 1px solid rgb(68, 68, 68)"] {
  overflow: hidden !important;
  border: 0 !important;
  border-radius: var(--radius-sm) !important;
  background: var(--surface) !important;
  box-shadow: var(--control-shadow), 0 0 0 1px rgb(0 0 0 / 8%) !important;
}

/* 가운데 슬라이더 트랙도 같은 면으로. */
.map-canvas div[style*="border: 1px solid rgb(68, 68, 68)"] > div[style*="background-color: rgb(255, 255, 255)"] {
  background-color: var(--surface) !important;
}

.map-canvas.is-unavailable {
  background:
    radial-gradient(circle at 22% 28%, rgb(var(--accent-rgb) / 7%), transparent 31%),
    radial-gradient(circle at 78% 72%, rgb(116 141 123 / 6%), transparent 34%),
    var(--warm-50);
}

.map-configuration {
  position: absolute;
  z-index: 1050;
  top: 50%;
  left: 50%;
  display: none;
  width: min(440px, calc(100% - 40px));
  padding: var(--space-7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  background: var(--surface);
  box-shadow: var(--panel-shadow);
  transform: translate(-50%, -50%);
}

.map-configuration.is-visible {
  display: block;
}

.map-configuration__icon {
  display: grid;
  width: 38px;
  height: 38px;
  margin: 0 auto 16px;
  place-items: center;
  border: 1px solid rgb(var(--accent-rgb) / 28%);
  border-radius: 50%;
  color: var(--muted);
  font-size: var(--text-2xl);
  background: var(--rose-50);
}

.map-configuration h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--display-weight);
  letter-spacing: var(--tracking-display);
}

.map-configuration p {
  margin: var(--space-3) 0 0;
  color: var(--muted);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  word-break: keep-all;
}

.map-configuration code {
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--rose-600);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  background: var(--rose-50);
}

.map-header {
  position: absolute;
  z-index: 1100;
  top: var(--space-6);
  left: var(--space-7);
  right: var(--space-7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.map-header__left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  pointer-events: auto;
}

.brand-lockup {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--control-shadow);
  pointer-events: auto;
}

.brand-name {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--display-weight-strong);
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.brand-tagline {
  margin: var(--space-1) 0 0;
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: 0.12em;
}

.places-panel-toggle {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  background: var(--surface);
  cursor: pointer;
  transition: color var(--duration-base) var(--ease-out), background var(--duration-base) var(--ease-out), transform var(--duration-slower) var(--ease-out);
  box-shadow: var(--control-shadow);
}

.places-panel-toggle:hover {
  color: var(--ink);
  background: var(--surface-solid);
  transform: translateY(-1px);
}

.places-panel-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.25;
}

.location-button {
  /* 모양은 .ds-btn.ds-btn--secondary 가 갖습니다. 여기에는 지도 위에서만
     필요한 것(부모의 pointer-events 를 되살리기, 등장/퇴장 트랜지션)만 남깁니다. */
  pointer-events: auto;
  transition: opacity var(--duration-slower) var(--ease-standard), transform var(--duration-slower) var(--ease-standard);
}

.location-button:hover {
  color: var(--rose-600);
  background: var(--surface-solid);
  box-shadow: none;
  transform: translateY(-1px);
}

.location-button:focus-visible,
.filter-chip:focus-visible,
.place-card__close:focus-visible,
.place-card__link:focus-visible,
.place-list-item__button:focus-visible,
.place-list-item__toggle:focus-visible,
.place-list-item__story-link:focus-visible,
.places-panel-toggle:focus-visible,
.places-surface__grabber:focus-visible {
  outline: 2px solid rgb(var(--accent-rgb) / 42%);
  outline-offset: 3px;
}

.location-button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.location-button.is-locating > span:first-child {
  animation: location-spin var(--duration-slower) linear infinite;
}

.places-surface {
  --sheet-translate: 0px;
  position: absolute;
  z-index: 1080;
  /* 지도 안 상단 컨트롤(스팟/코스 · 내 위치) 아래에서 시작합니다. */
  top: var(--space-11);
  bottom: var(--space-6);
  left: var(--space-6);
  display: flex;
  width: 364px;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--gray-0);
  box-shadow: var(--panel-shadow);
  opacity: 1;
  transform: translateX(0);
  transition: opacity var(--duration-slow) var(--ease-out), transform var(--sheet-duration) var(--sheet-ease);
}

.places-surface.is-collapsed {
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(-100% - 32px));
}

.places-surface__grabber {
  display: none;
}

.places-surface__heading {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-5) var(--space-5) var(--space-4);
}

.places-surface__eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--accent);
  font-size: var(--text-2xs);
  font-weight: var(--weight-strong);
  letter-spacing: 0.16em;
}

.places-surface__heading h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--display-weight);
  letter-spacing: var(--tracking-display);
  line-height: 1.25;
}

.places-surface__heading h2 span {
  margin-left: var(--space-1);
  color: #8c8580;
  font-family: var(--font-ui);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  vertical-align: 2px;
}

.places-surface__hint {
  max-width: 132px;
  margin: 0 0 var(--space-1);
  color: var(--muted);
  font-size: var(--text-2xs);
  line-height: 1.55;
  text-align: right;
  word-break: keep-all;
}

.places-surface .category-filter {
  position: static;
  display: flex;
  width: 100%;
  max-width: none;
  flex: 0 0 auto;
  gap: var(--space-1);
  padding: 0 var(--space-4) var(--space-4);
  overflow-x: auto;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  scrollbar-width: none;
}

.places-surface .category-filter::-webkit-scrollbar {
  display: none;
}

.places-surface__body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgb(0 0 0 / 11%) transparent;
  scrollbar-width: thin;
}

.places-list-view[hidden],
.place-card[hidden] {
  display: none;
}

.places-list {
  display: flex;
  flex-direction: column;
  padding: var(--space-1) var(--space-3) var(--space-3);
}

.places-list__empty {
  margin: 0;
  padding: var(--space-8) var(--space-7);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: var(--text-base);
  line-height: 1.8;
  text-align: center;
  word-break: keep-all;
}

.places-list-footer {
  margin: 0 var(--space-5);
  padding: var(--space-5) 0 var(--space-6);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--text-xs);
  text-align: right;
}

.places-list-footer a {
  color: inherit;
  text-underline-offset: 3px;
  transition: color var(--duration-base) var(--ease-out);
}

.places-list-footer a:hover {
  color: var(--rose-600);
}

.place-list-item {
  position: relative;
  border-bottom: 1px solid var(--hairline-soft);
  background: transparent;
  transition: background var(--duration-base) var(--ease-out), opacity var(--duration-slow) var(--ease-out);
}

.place-list-item[hidden] {
  display: none;
}

.place-list-item:hover,
.place-list-item.is-selected,
.place-list-item.is-map-linked {
  background: rgb(0 0 0 / 5%);
}

.place-list-item__summary {
  position: relative;
}

/* 가로형 — 좌측 작은 사진, 우측에 이름과 설명. 한 화면에 더 많은 장소가 보인다. */
.place-list-item__button {
  display: grid;
  width: 100%;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4) var(--space-3);
  border: 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.place-list-item__thumbnail {
  position: relative;
  display: grid;
  width: 96px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  place-items: center;
  border: 0;
  border-radius: var(--radius-3);
  color: color-mix(in srgb, var(--place-accent) 76%, var(--ink));
  font-family: var(--font-display);
  font-size: var(--text-xl);
  background: color-mix(in srgb, var(--place-accent) 14%, var(--surface-solid));
}

.place-list-item__thumbnail img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--duration-slower) var(--ease-out), transform var(--duration-slower) var(--sheet-ease);
}

.place-list-item__thumbnail.has-image img {
  opacity: 1;
}

.place-list-item:hover .place-list-item__thumbnail img {
  transform: scale(1.025);
}

.place-list-item__placeholder {
  position: relative;
}

.place-list-item__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
}

.place-list-item__category {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: var(--weight-strong);
  letter-spacing: 0.1em;
}

.place-list-item__category::before {
  width: 5px;
  height: 5px;
  content: "";
  border-radius: 50%;
  background: var(--place-accent);
}

.place-list-item__name {
  display: block;
  max-width: 100%;
  margin-top: var(--space-2);
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-label);
  letter-spacing: -0.015em;
  line-height: var(--leading-heading);
  text-overflow: ellipsis;
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--duration-base) var(--ease-out);
  white-space: nowrap;
}

.place-list-item:hover .place-list-item__name,
.place-list-item.is-selected .place-list-item__name,
.place-list-item.is-map-linked .place-list-item__name {
  text-decoration-color: color-mix(in srgb, var(--ink) 58%, transparent);
}

.place-list-item__subcategory {
  display: block;
  max-width: 100%;
  margin-top: var(--space-1);
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-2xs);
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-list-item__footer {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  /* 오른쪽 아래 상세 링크 자리를 비워 둡니다. */
  padding-right: var(--space-7);
  margin-top: var(--space-3);
}

.place-list-item__content-count {
  color: var(--muted);
  font-size: var(--text-2xs);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.place-list-item__toggle {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-5);
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--hairline-soft);
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface);
  box-shadow: var(--control-shadow);
  cursor: pointer;
  transition: color var(--duration-base) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}

.place-list-item__toggle:hover,
.place-list-item__toggle[aria-expanded="true"] {
  color: var(--ink);
}

.place-list-item__toggle > span,
.place-list-item__toggle > span::after {
  display: block;
  width: 12px;
  height: 1px;
  background: currentColor;
  content: "";
  transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}

.place-list-item__toggle > span::after {
  transform: rotate(90deg);
}

.place-list-item__toggle[aria-expanded="true"] > span::after {
  opacity: 0;
  transform: rotate(0deg);
}

.place-list-item__expansion {
  display: grid;
  overflow-anchor: none;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-rows var(--duration-slow) var(--ease-out), opacity var(--duration-base) var(--ease-out), visibility 0s linear var(--duration-slow);
}

.place-list-item.is-expanded .place-list-item__expansion {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition: grid-template-rows var(--duration-slow) var(--ease-out), opacity var(--duration-base) var(--ease-out), visibility 0s;
}

.place-list-item__expansion-inner {
  min-height: 0;
  overflow: hidden;
}

.place-list-item__expansion-content {
  margin: 0 var(--space-3);
  padding: var(--space-4) 0 var(--space-5);
  border-top: 1px solid var(--hairline-soft);
}

.place-list-item__expansion-subcategory {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: var(--weight-strong);
  letter-spacing: var(--label-tracking);
  line-height: 1.5;
  text-transform: uppercase;
}

.place-list-item__expansion-description {
  margin: var(--space-3) 0 0;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  line-height: 1.65;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-list-item__expansion-address {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  align-items: baseline;
  margin: var(--space-3) 0 0;
}

.place-list-item__expansion-address span {
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: var(--weight-strong);
  letter-spacing: var(--label-tracking);
}

.place-list-item__expansion-address strong {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: var(--weight-regular);
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-list-item__story-link {
  display: inline-flex;
  margin-top: var(--space-4);
  color: var(--ink);
  font-size: var(--text-2xs);
  font-weight: var(--weight-strong);
  letter-spacing: var(--label-tracking);
  line-height: 1.5;
  text-decoration: none;
  text-transform: uppercase;
  transition: color var(--duration-base) var(--ease-out);
}

.place-list-item__story-link::after {
  margin-left: var(--space-2);
  content: "→";
  font-weight: var(--weight-regular);
}

.place-list-item__story-link:hover {
  color: var(--muted);
}

.place-card__link svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.25;
}

.thrill-meter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: rgb(0 0 0 / 16%);
}

.thrill-meter svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.thrill-meter svg.is-filled {
  color: var(--ink);
}

.thrill-meter--compact {
  gap: var(--space-1);
}

.thrill-meter--compact svg {
  width: 10px;
  height: 10px;
}

.category-filter {
  position: absolute;
  z-index: 1100;
  top: var(--space-12);
  left: 50%;
  display: flex;
  max-width: calc(100% - 48px);
  gap: var(--space-1);
  padding: var(--space-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: none;
  transform: translateX(-50%);
}

.filter-chip {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--space-2);
  min-height: 36px;
  padding: 0 var(--space-3);
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
  transition: color var(--duration-base) var(--ease-out), background var(--duration-base) var(--ease-out), opacity var(--duration-slower) var(--ease-out), transform var(--duration-slower) var(--ease-out);
  box-shadow: var(--control-shadow);
}

.filter-chip:hover {
  color: var(--ink);
  background: rgb(0 0 0 / 4%);
}

.filter-chip.is-active {
  border-color: transparent;
  color: var(--coral-ink);
  background: var(--coral);
  box-shadow: var(--control-shadow);
}

.filter-chip__dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border: 1px solid rgb(255 255 255 / 72%);
  border-radius: 50%;
  background: var(--rose-500);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 11%);
  transition: transform var(--duration-slower) var(--ease-out);
}

.filter-chip__dot--all { background: #a39b94; }
.filter-chip__dot--cafe { background: var(--cafe); }
.filter-chip__dot--walk { background: var(--walk); }
.filter-chip__dot--night { background: var(--night); }
.filter-chip__dot--exhibit { background: var(--exhibit); }
.filter-chip__dot--food { background: var(--food); }

.filter-chip.is-active .filter-chip__dot {
  transform: scale(1.25);
}

.place-card {
  position: relative;
  width: 100%;
  padding: var(--space-4) var(--space-5) var(--space-6);
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--duration-slower) var(--ease-out), transform var(--duration-slower) var(--ease-out);
}

.place-card.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.place-card__close {
  position: absolute;
  z-index: 2;
  top: var(--space-6);
  right: var(--space-5);
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0 0 var(--space-1);
  place-items: center;
  border: 0;
  border-radius: 50%;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: var(--text-xl);
  line-height: 1;
  background: rgb(253 252 249 / 84%);
  cursor: pointer;
  transition: color var(--duration-base) var(--ease-out), background var(--duration-base) var(--ease-out), opacity var(--duration-slower) var(--ease-out), transform var(--duration-slower) var(--ease-out);
}

.place-card__close:hover {
  color: var(--ink);
  background: rgb(113 101 92 / 7%);
  transform: none;
}

.place-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--rose-50);
}

.place-card__media img,
.place-card__placeholder {
  width: 100%;
  height: 100%;
}

.place-card__media img {
  display: block;
  object-fit: cover;
}

.place-card__media img[hidden] {
  display: none;
}

.place-card__placeholder {
  display: grid;
  place-items: center;
  color: color-mix(in srgb, var(--place-accent) 76%, var(--ink));
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  background: color-mix(in srgb, var(--place-accent) 14%, var(--surface-solid));
}

.place-card__placeholder[hidden] {
  display: none;
}

.place-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.place-card__category {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 26px;
  padding: 0;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  background: transparent;
}

.place-card__category::before {
  width: 5px;
  height: 5px;
  content: "";
  border: 1px solid rgb(255 255 255 / 75%);
  border-radius: 50%;
  background: var(--category-color, var(--rose-500));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--category-color, var(--rose-500)) 22%, transparent);
}

.place-card__name {
  margin: var(--space-3) var(--space-8) 0 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--display-weight);
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-heading);
}

.place-card__subcategory {
  margin: var(--space-1) 0 var(--space-4);
  color: var(--muted);
  font-size: var(--text-2xs);
  letter-spacing: 0.06em;
}

.place-card__description {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.8;
  word-break: keep-all;
}

.place-card__address {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin: var(--space-5) 0 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--text-2xs);
  line-height: 1.65;
}

.place-card__address-label {
  flex: 0 0 auto;
  color: #8a8a85;
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-label);
  line-height: 2.15;
}

.place-card__link {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding: 0 var(--space-3) 0 var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  background: rgb(255 255 255 / 38%);
  transition: color var(--duration-base) var(--ease-out), background var(--duration-base) var(--ease-out), transform var(--duration-slower) var(--ease-out);
  box-shadow: var(--control-shadow);
}

.place-card__link:hover {
  color: var(--ink);
  background: var(--surface-solid);
  transform: translateY(-1px);
}

.map-status,
.map-toast {
  position: absolute;
  z-index: 1200;
  left: 50%;
  max-width: calc(100% - 36px);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  color: #fdfbf9;
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
  text-align: center;
  background: rgb(26 26 26 / 84%);
  box-shadow: var(--control-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity var(--duration-slower) var(--ease-out), transform var(--duration-slower) var(--ease-out);
}

.map-status {
  top: 170px;
}

.map-toast {
  bottom: var(--space-7);
}

.map-status.is-visible,
.map-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.seollein-marker-wrapper,
.user-marker-wrapper {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.seollein-marker-wrapper {
  width: 44px;
  height: 44px;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity var(--duration-slower) var(--ease-out), transform var(--duration-slower) var(--ease-out);
  will-change: opacity, transform;
}

.seollein-marker-wrapper.is-visible {
  opacity: 1;
  transform: scale(1);
}

.seollein-marker-stem {
  position: absolute;
  z-index: 0;
  top: var(--space-7);
  left: var(--space-5);
  width: 1px;
  height: 11px;
  background: color-mix(in srgb, var(--marker-color) 72%, #6f6f6f);
  opacity: 0.72;
  transform-origin: center bottom;
  transition: background var(--duration-base) var(--ease-out), opacity var(--duration-base) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}

.user-marker-wrapper {
  width: 30px;
  height: 30px;
}

.seollein-marker {
  position: relative;
  display: grid;
  width: 14px;
  height: 14px;
  margin: var(--space-4);
  z-index: 1;
  place-items: center;
  border: 2px solid rgb(255 255 255 / 98%);
  border-radius: 50%;
  background: var(--marker-color);
  box-shadow: none;
  outline: 0 solid transparent;
  outline-offset: 2px;
  transition: box-shadow var(--duration-base) var(--ease-out), outline-color var(--duration-base) var(--ease-out), transform var(--duration-slower) var(--ease-out), filter var(--duration-base) var(--ease-out);
}

.seollein-marker-wrapper:hover .seollein-marker {
  filter: saturate(1.08) brightness(1.02);
  transform: scale(1.18);
}

.seollein-marker-wrapper.is-list-linked .seollein-marker {
  filter: saturate(1.08) brightness(1.02);
  transform: scale(1.18);
}

.seollein-marker-wrapper:hover .seollein-marker-stem,
.seollein-marker-wrapper.is-list-linked .seollein-marker-stem,
.seollein-marker-wrapper.is-selected .seollein-marker-stem {
  background: var(--marker-color);
  opacity: 1;
  transform: scaleY(1.15);
}

.seollein-marker-wrapper.is-selected .seollein-marker {
  box-shadow: none;
  outline: 2px solid color-mix(in srgb, var(--marker-color) 56%, white);
  outline-offset: 3px;
  filter: saturate(1.1) brightness(1.02);
  transform: scale(1.3);
}

.seollein-marker-label {
  position: absolute;
  bottom: var(--space-7);
  left: 50%;
  min-width: max-content;
  padding: var(--space-2) var(--space-2) var(--space-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-label);
  line-height: 1.2;
  white-space: nowrap;
  background: rgb(253 252 249 / 96%);
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}

.seollein-marker-wrapper.is-list-linked .seollein-marker-label,
.seollein-marker-wrapper.is-selected .seollein-marker-label {
  opacity: 1;
  transform: translate(-50%, 0);
}

.map-page.has-place-link .seollein-marker-wrapper.is-selected:not(.is-list-linked) .seollein-marker-label {
  opacity: 0;
  transform: translate(-50%, 4px);
}

/* 클러스터 — 핀이 겹칠 때 개수로 묶어 보여준다. 개수 구간에 따라 크기가 세 단계다. */
.seollein-cluster {
  display: grid;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--gray-0);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: var(--display-weight);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  background: var(--ink);
  box-shadow: none;
  cursor: pointer;
  transition: transform var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}

.seollein-cluster:hover {
  box-shadow: none;
  transform: scale(1.06);
}

.seollein-cluster:focus-visible {
  outline: 2px solid rgb(var(--accent-rgb) / 42%);
  outline-offset: 3px;
}

.seollein-cluster--sm {
  width: 40px;
  height: 40px;
  font-size: var(--text-md);
}

.seollein-cluster--md {
  width: 48px;
  height: 48px;
  font-size: var(--text-base);
}

.seollein-cluster--lg {
  width: 58px;
  height: 58px;
  font-size: var(--text-lg);
}

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

  .seollein-cluster:hover {
    transform: none;
  }
}

.user-marker {
  position: relative;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: rgb(91 132 167 / 18%);
  animation: user-pulse 2s var(--ease-standard) infinite;
}

.user-marker > span {
  display: block;
  width: 15px;
  height: 15px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #5b84a7;
  box-shadow: none;
}

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

@keyframes user-pulse {
  0% { box-shadow: none; }
  70%, 100% { box-shadow: none; }
}

@media (max-width: 700px) {
  .map-page {
    min-height: 460px;
  }

  .map-header {
    top: max(12px, env(safe-area-inset-top));
    left: var(--space-3);
    right: var(--space-3);
  }

  .places-panel-toggle {
    display: none;
  }

  .places-surface {
    top: var(--space-12);
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 96px);
    border-width: 1px 0 0;
    border-radius: var(--subpage-radius) var(--subpage-radius) 0 0;
    opacity: 1;
    transform: translateY(var(--sheet-translate));
    transition: transform var(--sheet-duration) var(--sheet-ease);
    will-change: transform;
  }

  .places-surface.is-dragging {
    user-select: none;
    transition: none;
  }

  /* 손잡이 — 손가락이 넉넉히 닿도록 높이를 키우고 캡슐로. */
  .places-surface__grabber {
    display: grid;
    width: 100%;
    height: 40px;
    flex: 0 0 auto;
    padding: 0;
    place-items: center;
    border: 0;
    background: transparent;
    cursor: grab;
    touch-action: none;
  }

  .places-surface__grabber:active {
    cursor: grabbing;
  }

  .places-surface__grabber span {
    display: block;
    width: 44px;
    height: 5px;
    border-radius: var(--radius-full);
    background: rgb(43 39 35 / 20%);
    transition: width var(--duration-base) var(--sheet-ease), background var(--duration-base) var(--ease-out), transform var(--duration-base) var(--sheet-ease);
  }

  /* 잡고 있는 동안 살짝 굵어지고 진해집니다. */
  .places-surface__grabber:active span,
  .places-surface.is-dragging .places-surface__grabber span {
    width: 52px;
    background: rgb(43 39 35 / 42%);
    transform: scaleY(1.2);
  }

  .places-surface__grabber:focus-visible span {
    background: rgb(43 39 35 / 42%);
  }

  .places-surface__heading {
    padding: var(--space-1) var(--space-5) var(--space-3);
    transition: opacity var(--duration-base) var(--ease-out);
  }

  .places-surface__heading h2 {
    font-size: var(--text-xl);
  }

  .places-surface__hint {
    max-width: 124px;
    font-size: var(--text-2xs);
  }

  .places-surface .category-filter {
    padding: 0 var(--space-4) var(--space-3);
    transition: opacity var(--duration-base) var(--ease-out);
  }

  .places-surface__body {
    padding-bottom: env(safe-area-inset-bottom);
    -webkit-overflow-scrolling: touch;
    transition: opacity var(--duration-base) var(--ease-out);
  }

  .places-surface[data-sheet-state="collapsed"] .places-surface__heading,
  .places-surface[data-sheet-state="collapsed"] .category-filter,
  .places-surface[data-sheet-state="collapsed"] .places-surface__body {
    opacity: 0;
    pointer-events: none;
  }

  .places-surface.is-showing-detail .places-surface__heading,
  .places-surface.is-showing-detail .category-filter {
    display: none;
  }

  .brand-lockup {
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3) var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 50%;
  }

  .brand-name {
    font-size: var(--text-lg);
  }

  .brand-tagline {
    max-width: 145px;
    margin-top: var(--space-1);
    overflow: hidden;
    font-size: var(--text-2xs);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .location-button {
    min-width: 42px;
    min-height: 42px;
    justify-content: center;
    padding: 0;
    font-size: var(--text-lg);
  }

  .location-button > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .category-filter {
    top: calc(max(12px, env(safe-area-inset-top)) + 62px);
    left: 0;
    width: 100%;
    max-width: none;
    padding: 0 var(--space-3) var(--space-3);
    gap: var(--space-2);
    overflow-x: auto;
    border: 0;
    border-radius: 0;
    background: linear-gradient(to bottom, rgb(250 248 244 / 88%), transparent);
    box-shadow: none;
    scrollbar-width: none;
    transform: none;
  }

  .category-filter::-webkit-scrollbar {
    display: none;
  }

  .filter-chip {
    min-height: 36px;
    padding: 0 var(--space-3);
    border: 1px solid var(--line);
    background: var(--gray-0);
    box-shadow: none;
  }

  .map-configuration {
    width: calc(100% - 24px);
    padding: var(--space-6) var(--space-6);
    border-radius: var(--radius);
  }

  .map-configuration h2 {
    font-size: var(--text-xl);
  }

  .map-configuration p {
    font-size: var(--text-sm);
  }

  /* 모바일도 같은 가로형 — 썸네일만 조금 작게. */
  .place-list-item__button {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: var(--space-3);
    padding: var(--space-3) var(--space-2);
  }

  .place-list-item__thumbnail {
    width: 84px;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .place-card {
    padding: var(--space-3) var(--space-5) calc(var(--space-6) + env(safe-area-inset-bottom));
  }

  .place-card__close {
    top: var(--space-5);
    right: var(--space-5);
  }

  .place-card__name {
    margin-top: var(--space-3);
    font-size: var(--text-2xl);
  }

  .place-card__description {
    display: -webkit-box;
    overflow: hidden;
    font-size: var(--text-sm);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .place-card__address {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
  }

  .map-status {
    top: 145px;
  }

  .map-toast {
    top: 150px;
    bottom: auto;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.map-canvas img[src*="map.naver.net"],
.map-canvas img[src*="nrbe.pstatic.net"],
.map-canvas img[src*="map.pstatic.net/nrb/"],
.course-editor-live-map__canvas img[src*="map.naver.net"],
.course-editor-live-map__canvas img[src*="nrbe.pstatic.net"],
.course-editor-live-map__canvas img[src*="map.pstatic.net/nrb/"],
.course-share-map__canvas img[src*="map.naver.net"],
.course-share-map__canvas img[src*="nrbe.pstatic.net"],
.course-share-map__canvas img[src*="map.pstatic.net/nrb/"],
.courses-map-canvas img[src*="map.naver.net"],
.courses-map-canvas img[src*="nrbe.pstatic.net"],
.courses-map-canvas img[src*="map.pstatic.net/nrb/"] {
  filter: url("#map-tone") !important;
}

@media (max-width: 700px) {
  .map-canvas img[src*="map.naver.net"],
  .map-canvas img[src*="nrbe.pstatic.net"],
  .map-canvas img[src*="map.pstatic.net/nrb/"] {
    filter: none !important;
  }
}

.map-tone-filter {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.district-label {
  display: block;
  width: 88px;
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: var(--weight-strong);
  line-height: 24px;
  letter-spacing: var(--label-tracking);
  text-align: center;
  text-shadow: 0 1px 0 #fff, 0 0 3px #fff;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0.86;
}

.rail-station-overlay {
  position: relative;
  display: block;
  width: 176px;
  height: 26px;
  color: var(--muted);
  pointer-events: none;
}

.rail-station-overlay__dot {
  position: absolute;
  top: var(--space-3);
  left: var(--space-1);
  display: block;
  width: 6px;
  height: 6px;
  border: 1px solid rgb(253 252 249 / 92%);
  border-radius: 50%;
  background: var(--rail-station-fill);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 11%);
}

.rail-station-overlay__name {
  position: absolute;
  top: var(--space-1);
  left: var(--space-4);
  display: block;
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.015em;
  text-shadow:
    0 1px 0 #fff,
    1px 0 0 #fff,
    -1px 0 0 #fff;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-2px);
  transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}

.rail-station-overlay.is-named .rail-station-overlay__name {
  opacity: 0.9;
  transform: translateX(0);
}

.rail-station-overlay--transfer .rail-station-overlay__dot {
  top: var(--space-2);
  left: var(--space-1);
  width: 8px;
  height: 8px;
  border-width: 2px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 22%);
}

.rail-station-overlay--transfer .rail-station-overlay__name {
  color: #56534f;
  font-weight: var(--weight-strong);
}

/* ─── 광안리 3시간 코스 ─────────────────────────────── */

.map-header__actions {
  display: flex;
  gap: var(--space-2);
  pointer-events: auto;
}

.course-button.is-active {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}

.map-course-create-link {
  border-color: var(--ink);
  color: var(--gray-0);
  background: var(--ink);
}

.map-course-create-link:hover {
  border-color: #000;
  color: var(--gray-0);
  background: #000;
}

.course-stop {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

.course-stop__index {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: var(--gray-0);
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
  background: var(--spark);
  box-shadow: none;
}

.course-stop__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--gray-0);
  box-shadow: none;
}

.course-stop__name {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-body);
}

.course-stop__stay {
  color: var(--muted);
  font-size: var(--text-2xs);
  letter-spacing: 0.02em;
}

.course-walk {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  border: 1px solid rgb(var(--accent-rgb) / 26%);
  border-radius: var(--radius-pill);
  color: var(--rose-600);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
  background: rgb(252 250 247 / 92%);
}

.course-summary {
  position: absolute;
  z-index: 1150;
  bottom: var(--space-6);
  left: 50%;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  background: var(--surface);
  box-shadow: var(--panel-shadow);
  opacity: 0;
  transform: translate(-50%, 14px);
  transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
  pointer-events: none;
}

.course-summary.is-open {
  opacity: 1;
  transform: translate(-50%, 0);
}

.course-summary strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-strong);
  letter-spacing: -0.02em;
}

.course-summary span {
  color: var(--muted);
  font-size: var(--text-xs);
  letter-spacing: 0.01em;
}

.course-summary__figures {
  margin-top: var(--space-1);
  color: var(--rose-600) !important;
}

@media (width <= 700px) {
  .map-header__actions {
    flex-direction: column;
    align-items: flex-end;
  }

  .course-summary {
    width: calc(100% - 48px);
  }
}

.course-stop--flip {
  flex-direction: row-reverse;
  transform: translateX(calc(-100% + 26px));
}

.filter-chip__dot--popup { background: var(--exhibit); }

/* ─── 요즘 설렘 (트렌드 키워드 + 랭킹) ─────────────────── */

.trend-keywords {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-1) var(--space-6) var(--space-3);
}

.trend-keywords__label {
  flex: 0 0 auto;
  color: var(--rose-600);
  font-size: var(--text-2xs);
  font-weight: var(--weight-strong);
  letter-spacing: 0.12em;
}

.trend-keywords__chips {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
}

.trend-keywords__chips::-webkit-scrollbar {
  display: none;
}

.trend-keyword-chip {
  flex: 0 0 auto;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: var(--text-xs);
  background: transparent;
  cursor: pointer;
  transition: color var(--duration-base) var(--ease-out), background var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
  box-shadow: var(--control-shadow);
}

.trend-keyword-chip:hover {
  color: var(--rose-600);
}

.trend-keyword-chip.is-active {
  border-color: rgb(var(--accent-rgb) / 42%);
  color: var(--rose-600);
  background: var(--rose-50);
}

.place-list-item__rank {
  display: inline-block;
  width: fit-content;
  margin-bottom: var(--space-2);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-pill);
  color: var(--rose-600);
  font-size: var(--text-2xs);
  font-weight: var(--weight-label);
  letter-spacing: 0.08em;
  background: var(--rose-50);
}

/* ═══════════════════════════════════════════════════════════════════
   지도 셸 + 공용 상단 헤더
   브랜드명·전체 네비는 헤더가 가져갔고, 지도 안에는 스팟/코스 전환과
   목록 패널만 남습니다. 헤더 높이를 숫자로 박지 않고 flex 로 남은 높이를
   지도에 주기 때문에, map_controller 의 시트 스냅 계산(.map-page 높이 기준)이
   그대로 맞습니다.
   ═══════════════════════════════════════════════════════════════════ */

html body:has(.map-page) {
  display: flex;
  height: 100dvh;
  flex-direction: column;
  overflow: hidden;
}

html body:has(.map-page) .map-page {
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
}

/* 지도 위에서는 헤더가 스크롤될 일이 없어 흐름에 그대로 둡니다. */
body:has(.map-page) .mag-header {
  position: relative;
  z-index: 1600;
  flex: 0 0 auto;
}

/* 지도 안 스팟/코스 전환 */
/* 캡션이 한 줄을 차지하므로 아래 줄에서 컨트롤들이 나란히 놓이게 합니다. */
.map-header__left {
  flex-wrap: wrap;
}

.map-mode-nav {
  display: inline-flex;
  flex: 0 0 auto;
  white-space: nowrap;
  padding: var(--space-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--control-shadow);
  pointer-events: auto;
}

.map-mode-nav__item {
  display: inline-flex;
  min-height: 32px;
  white-space: nowrap;
  align-items: center;
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
  letter-spacing: var(--tracking-body);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-out), background var(--duration-base) var(--ease-out);
}

.map-mode-nav__item:hover {
  color: var(--ink);
}

.map-mode-nav__item.is-active {
  color: var(--accent);
  background: var(--accent-tint);
}

/* ─── 지도 ⇄ 매거진 모드 토글 (헤더 공용) ──────────────── */

.mode-toggle {
  display: inline-flex;
  padding: var(--space-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
}

.mode-toggle__item {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
  letter-spacing: var(--tracking-body);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--duration-base) var(--ease-out), background var(--duration-base) var(--ease-out);
}

.mode-toggle__item:hover {
  color: var(--ink);
}

.mode-toggle__item.is-active {
  color: var(--accent);
  background: var(--accent-tint);
}

/* 모드 설명 — 지도 안에서만 보이는 짧은 캡션 */
.map-mode-caption {
  order: -1;
  width: 100%;
  margin: 0 0 var(--space-2) var(--space-1);
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: var(--tracking-body);
  text-shadow: 0 1px 0 #fff, 0 0 6px #fff;
  pointer-events: none;
}

/* 좁은 화면에서는 지도 면적이 아까워 캡션을 접습니다.
   (map_controller 가 참조하는 타깃이라 요소 자체는 남깁니다.) */
@media (max-width: 700px) {
  .map-mode-caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

/* ─── 브랜드 카드 내 서브 네비게이션 ─────────────────── */

.brand-nav {
  display: flex;
  gap: 0;
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
}

.brand-nav a {
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: var(--weight-strong);
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-out);
}

.brand-nav a + a::before {
  margin: 0 var(--space-2);
  color: var(--line);
  content: "·";
}

.brand-nav a:hover {
  color: var(--accent);
}

.brand-nav a.is-active {
  color: var(--accent);
}

.map-header__actions [hidden] {
  display: none;
}

.map-mode-stack {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
}

.map-mode-pane {
  position: absolute;
  inset: 0;
  display: flex;
  min-height: 0;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity var(--duration-fast) var(--ease-out), visibility 0s linear var(--duration-fast);
}

.map-mode-pane.is-active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}

.map-mode-pane--courses .courses-index-surface__body {
  min-height: 0;
  flex: 1 1 auto;
}

.map-course-list-summary {
  position: absolute;
  z-index: 1060;
  top: var(--space-12);
  left: 412px;
  display: grid;
  width: min(310px, calc(100% - 440px));
  gap: var(--space-1);
  padding: var(--space-4) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--sheet-ease);
}

.map-course-list-summary.is-open {
  opacity: 1;
  transform: translateY(0);
}

.map-course-list-summary[hidden] {
  display: none;
}

.map-course-list-summary p {
  margin: 0;
  color: var(--rose-600);
  font-size: var(--text-2xs);
  font-weight: var(--weight-strong);
  letter-spacing: 0.15em;
}

.map-course-list-summary strong {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-display);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-course-list-summary > span {
  color: var(--muted);
  font-size: var(--text-2xs);
}

.map-course-list-summary a {
  justify-self: end;
  margin-top: var(--space-1);
  color: var(--rose-600);
  font-size: var(--text-2xs);
  font-weight: var(--weight-strong);
  text-decoration: none;
}

.map-course-list-summary a[hidden] {
  display: none;
}

.map-course-list-summary a:focus-visible {
  outline: 2px solid rgb(var(--accent-rgb) / 46%);
  outline-offset: 3px;
}

.map-course-list-status {
  position: absolute;
  z-index: 1090;
  right: var(--space-6);
  bottom: var(--space-6);
  max-width: min(320px, calc(100% - 48px));
  margin: 0;
  padding: var(--space-3) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: var(--text-2xs);
  background: var(--surface);
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition: opacity var(--duration-fast) var(--ease-out), transform var(--duration-base) var(--ease-out);
}

.map-course-list-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.map-intro {
  position: absolute;
  z-index: 1040;
  top: 31%;
  left: 50%;
  margin: 0;
  color: rgb(26 26 26 / 82%);
  font-family: var(--font-display);
  font-size: clamp(22px, 2.3vw, 32px);
  font-weight: var(--display-weight);
  letter-spacing: -0.035em;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 1px 12px rgb(255 255 255 / 92%);
  transform: translate(-50%, 9px);
  white-space: nowrap;
}

.map-intro.is-visible {
  animation: map-intro-fade-up 3.1s var(--ease-out) both;
}

.map-intro[hidden] {
  display: none;
}

@keyframes map-intro-fade-up {
  0% { opacity: 0; transform: translate(-50%, 9px); }
  18%, 68% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -3px); }
}

@media (max-width: 700px) {
  .subpage-header {
    margin-bottom: var(--space-7);
  }

  .subpage-header__top {
    display: grid;
    min-height: 0;
    gap: var(--space-1);
    padding: var(--space-2) 0 var(--space-3);
  }

  .subpage-header__nav ul {
    justify-content: flex-start;
  }

  .subpage-header__nav li + li::before {
    margin: 0 var(--space-2);
  }

  .subpage-header__intro {
    padding: var(--space-8) 0 var(--space-7);
  }

  .brand-lockup {
    max-width: calc(100vw - 84px);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
  }

  .brand-name {
    font-size: var(--text-lg);
  }

  .brand-tagline {
    display: none;
  }

  .brand-nav {
    margin-top: var(--space-1);
    padding-top: var(--space-1);
    white-space: nowrap;
  }

  .brand-nav a {
    font-size: var(--text-2xs);
  }

  .brand-nav a + a::before {
    margin: 0 var(--space-1);
  }
}

/* ─── 모바일 하단 탭바 ───────────────────────────────── */

/*
 * 모바일에서 코스·트렌드·캘린더·사전·기록·쿠폰이 브랜드 카드 안 작은 글씨로만
 * 존재해 잘 보이지 않아서, 화면 아래 고정 탭바로 꺼냈습니다.
 * 데스크톱은 기존 브랜드 카드 / 서브페이지 헤더 네비를 그대로 씁니다.
 */
.bottom-nav {
  position: fixed;
  z-index: 2000;
  right: 0;
  bottom: 0;
  left: 0;
  padding-bottom: var(--bottom-nav-inset);
  border-top: 1px solid var(--hairline-soft);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--surface);
  box-shadow: 0 -10px 34px rgb(60 50 42 / 8%);
}

.bottom-nav__tabs {
  display: grid;
  height: var(--bottom-nav-height);
  grid-template-columns: repeat(5, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.bottom-nav__tab {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  gap: var(--space-1);
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: var(--text-2xs);
  letter-spacing: 0.02em;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out);
}

.bottom-nav__tab.is-active {
  color: var(--accent);
}

/* 현재 탭 표시는 색 + 탭 위 짧은 선까지만. */
.bottom-nav__tab.is-active::before {
  position: absolute;
  top: 0;
  width: 16px;
  height: 2px;
  border-radius: 0;
  background: var(--accent);
  content: "";
}

/* 시트가 열려 있는 동안에는 '더보기' 탭도 눌린 상태로 보이게 합니다. */
.bottom-nav.is-open .bottom-nav__tab[aria-expanded="true"] {
  color: var(--ink);
}

.bottom-nav__tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}

.bottom-nav__icon svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav__icon--dots svg circle {
  fill: currentcolor;
  stroke: none;
}

.bottom-nav__label {
  line-height: 1;
}

/* ─── 더보기 시트 ─────────────────────────────────── */

.bottom-nav__backdrop {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 16%);
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.bottom-nav.is-open .bottom-nav__backdrop {
  opacity: 1;
}

.bottom-nav__sheet {
  position: absolute;
  right: var(--space-3);
  bottom: 100%;
  left: var(--space-3);
  margin-bottom: var(--space-2);
  padding: var(--space-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-solid);
  box-shadow: var(--panel-shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--duration-fast) var(--ease-out), transform var(--duration-base) var(--sheet-ease);
}

.bottom-nav.is-open .bottom-nav__sheet {
  opacity: 1;
  transform: translateY(0);
}

.bottom-nav__sheet[hidden],
.bottom-nav__backdrop[hidden] {
  display: none;
}

.bottom-nav__sheet-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bottom-nav__sheet-link {
  display: grid;
  gap: var(--space-1) var(--space-3);
  grid-template-columns: 1fr auto;
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-out);
}

.bottom-nav__sheet-link:active {
  background: var(--accent-tint);
}

.bottom-nav__sheet-label {
  color: var(--ink);
  font-size: var(--text-md);
  letter-spacing: 0.01em;
}

.bottom-nav__sheet-description {
  grid-column: 1;
  color: var(--muted);
  font-size: var(--text-2xs);
  letter-spacing: 0.01em;
}

.bottom-nav__sheet-arrow {
  display: flex;
  grid-row: 1 / 3;
  grid-column: 2;
  align-items: center;
  color: var(--accent);
}

.bottom-nav__sheet-arrow svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 데스크톱은 지금 방식 그대로 — 탭바를 띄우지 않습니다. */
@media (width > 700px) {
  .bottom-nav {
    display: none;
  }
}

@media (width <= 700px) {
  .map-course-list-summary {
    top: var(--space-11);
    right: var(--space-3);
    left: var(--space-3);
    width: auto;
    padding: var(--space-3) var(--space-4);
  }

  .map-course-list-summary strong {
    font-size: var(--text-base);
  }

  .map-course-list-status {
    right: var(--space-3);
    bottom: var(--space-10);
    left: var(--space-3);
    max-width: none;
  }

  .places-surface[data-sheet-state="collapsed"] .map-mode-pane {
    opacity: 0;
    pointer-events: none;
  }

  .map-intro {
    top: 27%;
    font-size: var(--text-xl);
  }
}

@media (width <= 700px) {
  body.has-bottom-nav {
    padding-bottom: var(--bottom-nav-total);
  }

  /*
   * 지도는 탭바 위쪽만 차지하게 합니다. .map-page 가 짧아지면 그 안에 절대 배치된
   * 시트·줌 컨트롤·코스 요약이 함께 올라오고, map_controller 의 스냅 위치도
   * .map-page 높이에서 다시 계산되므로 JS 를 건드리지 않아도 3단 스냅이 그대로 맞습니다.
   */
  body.has-bottom-nav .map-page {
    height: calc(100dvh - var(--bottom-nav-total));
  }

  /* 안전 영역은 탭바가 이미 덮으므로 시트 목록에서 한 번 더 띄우지 않습니다. */
  body.has-bottom-nav .places-surface__body {
    padding-bottom: 0;
  }

  /* 하단 탭바와 같은 링크라 브랜드 카드 안 텍스트 네비는 감춥니다. (데스크톱은 유지) */
  body.has-bottom-nav .brand-nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-mode-pane,
  .map-course-list-summary,
  .map-course-list-status {
    transition: none;
  }

  .map-intro {
    display: none;
    animation: none;
  }

  .bottom-nav__backdrop,
  .bottom-nav__sheet,
  .bottom-nav__tab {
    transition: none;
  }

  .bottom-nav__sheet {
    transform: none;
  }
}

.subpage-header {
  position: relative;
  isolation: isolate;
}

.subpage-header::before {
  position: absolute;
  z-index: -1;
  inset: 0 50%;
  width: 100vw;
  content: "";
  background: var(--cream);
  transform: translateX(-50%);
}

.subpage-header__eyebrow,
.subpage-header__current {
  color: var(--cobalt);
}

.subpage-header__back:hover,
.subpage-header__nav a:hover,
.places-list-footer a:hover {
  color: var(--coral);
}

.bottom-nav__tab.is-active,
.bottom-nav__sheet-arrow {
  color: var(--cobalt);
}

.subpage-header {
  border-top: 1px solid var(--editorial-frame);
  border-bottom-color: var(--editorial-frame);
}

.subpage-header__top {
  border-bottom-color: var(--editorial-frame);
}

.subpage-header::before {
  background: var(--paper);
}

.subpage-header__eyebrow,
.subpage-header__current,
.bottom-nav__tab.is-active,
.bottom-nav__sheet-arrow {
  color: var(--pink-strong);
}
