/* ==========================================================================
   v17 (지도) — v16 위에 얹는다. 짝이 되는 스크립트는 js/lp-korea-map-v17.js
     · 국토 외곽선을 유리판처럼: 번짐 → 그라디언트 본선 → 밝은 능선
   마지막 페이지(패널 3) 규칙은 css/lp-korea-map-v17.css 에 따로 있다.

   색감 방향: 두꺼운 유리판의 모서리. 빛이 닿는 북서쪽은 차가운 흰빛,
   가운데는 맑은 청록, 그늘진 남동쪽은 옅은 보랏빛으로 넘어간다(분산).
   본선의 그라디언트는 js 가 defs 에 넣는 #v17CoastStroke 가 담당한다.

   성능 원칙: filter 를 새로 쓰지 않는다. 번짐은 넓고 옅은 획을 겹쳐 만든다
   (v12 주석 참고 — 사영된 1.8MB SVG 에 필터를 걸면 매 프레임 다시 칠해진다).
   ========================================================================== */

/* ── v18 — 국토 외곽선을 쓰지 않는다 ───────────────────────────────────
   클라이언트 요청으로 v18 에서는 이 형광 테두리가 아예 나타나지 않게 한다.
   1차 차단은 index.html 의 LP_V15_CONFIG.outline = false 다 (외곽선 자체를 만들지 않으므로
   그것을 복제하는 발광선·능선도 생기지 않는다). 아래는 그래도 생겼을 때를 위한 2차 차단.
   지도 윤곽은 시·도 경로(korea-mosaic-path)가 그대로 그리므로 지도가 사라지지는 않는다.
   되돌리려면 LP_V15_CONFIG.outline 을 true 로 두고 이 블록을 지우면 된다.

   !important 는 쓰지 않는다. 이 세 클래스에 display 를 거는 규칙은
   v15.css·이 파일의 소멸 구간뿐이고 모두 none 이라 방향이 같으며,
   js 가 인라인 display 를 쓰는 곳도 없다(scene06 의 캔버스 하나뿐). */
html[data-map-v18] .korea-outline-path,
html[data-map-v18] .korea-outline-glow,
html[data-map-v18] .korea-outline-edge {
  display: none;
}

/* ── 1) 번짐 — 본선 아래 세 겹 ─────────────────────────────────────────
   형광빛은 번짐이 생명이라 알파를 올리고 색을 민트 쪽으로 옮겼다.
   (v18 에서는 위 블록이 이 레이어들을 통째로 감춘다 — v17 폴더에서만 실제로 보인다) */
html[data-map-fx="v15"] .korea-outline-glow,
html[data-map-fx="v15"] .korea-outline-edge {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
html[data-map-fx="v15"] .korea-outline-glow.is-g1 {
  stroke: rgba(72, 255, 224, 0.11);
  stroke-width: 14;
}
html[data-map-fx="v15"] .korea-outline-glow.is-g2 {
  stroke: rgba(104, 255, 232, 0.17);
  stroke-width: 8;
}
html[data-map-fx="v15"] .korea-outline-glow.is-g3 {
  stroke: rgba(158, 255, 240, 0.28);
  stroke-width: 4.2;
}

/* ── 2) 본선 — 형광 그라디언트 획 ──────────────────────────────────────
   v15 는 회색 단색 한 겹이었다. #v17CoastStroke 로 바꿔 형광 튜브처럼 보이게 한다. */
html[data-map-fx="v15"] .korea-outline-path {
  stroke: url(#v17CoastStroke);
  stroke-width: 2.9;
}

/* ── 3) 능선 — 본선 위에 가늘고 흰 한 줄 ──────────────────────────────
   형광등의 심지. 이 흰 줄이 있어야 번짐이 '빛'으로 읽힌다 */
html[data-map-fx="v15"] .korea-outline-edge {
  stroke: rgba(242, 255, 253, 0.95);
  stroke-width: 1;
}

/* 제주는 지도에서 빠져 있다 */
html[data-map-fx="v15"] .korea-outline-glow.is-jeju,
html[data-map-fx="v15"] .korea-outline-edge.is-jeju { display: none; }

/* ── 소멸 구간 ─────────────────────────────────────────────────────────
   v15 가 외곽선을 다루는 방식을 그대로 따른다. 굵은 획을 페이드 내내 다시 그리면
   폭죽 구간 래스터가 늘어나므로 먼저 얇게, 그다음 뺀다 */
html[data-map-fx="v15"] .korea-outline-glow,
html[data-map-fx="v15"] .korea-outline-edge {
  transition: opacity 0.16s linear;
}
html[data-map-fx="v15"] .korea-story-map-wrap.is-scene-05 .korea-outline-glow.is-g1 { stroke-width: 5; }
html[data-map-fx="v15"] .korea-story-map-wrap.is-scene-05 .korea-outline-glow.is-g2 { stroke-width: 3; }
html[data-map-fx="v15"] .korea-story-map-wrap.is-scene-05 .korea-outline-glow.is-g3 { stroke-width: 2; }
html[data-map-fx="v15"] .korea-story-map-wrap.is-scene-05 .korea-outline-edge { stroke-width: 0.75; }
html[data-map-fx="v15"] .korea-story-map-wrap.is-map-dissolving .korea-outline-glow,
html[data-map-fx="v15"] .korea-story-map-wrap.is-map-dissolving .korea-outline-edge { opacity: 0; }
html[data-map-fx="v15"] .korea-story-map-wrap.is-scene-06 .korea-outline-glow,
html[data-map-fx="v15"] .korea-story-map-wrap.is-scene-06 .korea-outline-edge,
html[data-map-fx="v15"] .korea-story-map-wrap.is-map-gone .korea-outline-glow,
html[data-map-fx="v15"] .korea-story-map-wrap.is-map-gone .korea-outline-edge { display: none; }

/* 폰·태블릿에서는 지도가 작아 굵은 번짐이 윤곽을 먹는다 — 한 단계 좁힌다 */
@media (max-width: 1024px) {
  html[data-map-fx="v15"] .korea-outline-glow.is-g1 { stroke-width: 7.5; }
  html[data-map-fx="v15"] .korea-outline-glow.is-g2 { stroke-width: 4.6; }
  html[data-map-fx="v15"] .korea-outline-glow.is-g3 { stroke-width: 2.8; }
  html[data-map-fx="v15"] .korea-outline-path { stroke-width: 2.2; }
  html[data-map-fx="v15"] .korea-outline-edge { stroke-width: 0.8; }
}
