/**
 * 고민별 탐색기
 * 색·폰트는 자식 테마의 theme.json 프리셋을 그대로 쓴다.
 * 테마 색을 바꾸면 여기도 따라 바뀌도록 하드코딩하지 않는다.
 */

.smn,
.smf {
  --smn-line: var(--wp--preset--color--line, #dedcd6);
  --smn-accent: var(--wp--preset--color--accent, #2f6b61);
  --smn-muted: var(--wp--preset--color--muted, #4a5454);
  --smn-soft: var(--wp--preset--color--soft, #e4efea);
  /* 탐색기 · 얼굴 지도는 홈 H2 surface(웜그레이) 띠 위에 놓이므로 탭 · 표식 바탕은 흰색(paper) */
  --smn-surface: var(--wp--preset--color--paper, #ffffff);
  --smn-ink: var(--wp--preset--color--ink, #18232b);
  margin-top: 28px;
}

/* ── 탭 ── */

.smn-tabs {
  display: flex;
  flex-wrap: wrap; /* 좁은 화면에서 탭을 줄바꿈해 가로 스크롤을 없앤다 */
  gap: 10px;
  padding-bottom: 14px;
}

.smn-chip {
  white-space: nowrap;
  border: 1px solid var(--smn-line);
  background: var(--smn-surface);
  color: var(--smn-ink);
  padding: 11px 18px;
  border-radius: 2px;
  font: inherit;
  font-size: 15px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.smn-chip[aria-selected="true"] {
  border-color: var(--smn-accent);
  background: var(--smn-soft);
  color: var(--smn-accent);
  font-weight: 600;
}

.smn-chip:focus-visible,
.smn-sym-btn:focus-visible {
  outline: 3px solid var(--smn-accent);
  outline-offset: 4px;
}

.smn-pending,
.smn-path {
  font-size: 13.5px;
  color: var(--smn-muted);
  margin: 6px 0 0;
}

.smn-path {
  padding: 14px 0 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.smn-path b {
  color: var(--smn-ink);
  font-weight: 600;
}

.smn-path span {
  color: var(--smn-accent);
}

/* ── 증상 아코디언 ── */

.smn-panel {
  border-top: 1px solid var(--smn-ink);
}

.smn-panel[hidden] {
  display: none;
}

.smn-sym {
  border-bottom: 1px solid var(--smn-line);
}

.smn-sym-h {
  margin: 0;
  font-size: inherit;
}

.smn-sym-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 26px;
  gap: 16px;
  align-items: center;
  padding: 22px 0;
  min-height: 56px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}

.smn-sym-title {
  display: block;
  font-family: var(--wp--preset--font-family--serif-ko, Georgia, serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.03em;
  line-height: 1.45;
}

.smn-sym-hint {
  display: block;
  font-size: 13px;
  color: var(--smn-muted);
  margin-top: 4px;
}

.smn-mark {
  font-family: var(--wp--preset--font-family--serif-en, Georgia, serif);
  font-size: 24px;
  color: var(--smn-accent);
  justify-self: end;
  line-height: 1;
}

.smn-sym-body {
  padding: 0 0 28px;
}

.smn-sym-body[hidden] {
  display: none;
}

.smn-mech {
  background: var(--smn-soft);
  border-left: 2px solid var(--smn-accent);
  padding: 18px 22px;
  margin: 0 0 24px;
  font-size: 15.5px;
}

/* ── 시술 / 홈케어 2열 ── */

.smn-routes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
}

.smn-route-head {
  font-size: 13px;
  color: var(--smn-accent);
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--smn-line);
  margin: 0 0 6px;
}

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

.smn-list li {
  border-bottom: 1px solid var(--smn-line);
  margin: 0;
}

.smn-list a,
.smn-list .smn-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: baseline;
  padding: 14px 0;
  min-height: 48px;
  text-decoration: none;
  color: inherit;
}

.smn-list a:hover .smn-name {
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* 아직 없는 페이지. 링크가 아니라는 것이 마우스를 올리기 전에도 보여야 한다. */
.smn-row--soon .smn-name {
  color: var(--smn-muted);
}

.smn-name {
  font-size: 16.5px;
}

/* 한글 상태 라벨에 영문 이탤릭을 쓰면 한글이 억지로 기울어 읽기 어렵다(2026-10-04) */
.smn-status {
  font-size: 13px;
  color: var(--smn-muted);
  white-space: nowrap;
}

.smn-note {
  font-size: 13.5px;
  color: var(--smn-muted);
  margin-top: 14px;
}

/* ── 모바일 ── */

@media (max-width: 900px) {
  .smn-routes {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

/* 애니메이션을 줄이도록 설정한 사용자를 존중한다 */
@media (prefers-reduced-motion: reduce) {
  .smn *,
  .smf * {
    transition: none !important;
  }
}

/* ──────────────────────────────────────────────
   얼굴 지도 [skinmodu_facemap]
   왼쪽 열: 주사 시술, 가운데: face.jpg + 안내선 SVG, 오른쪽 열: 레이저 · 에너지 시술.
   색 토큰은 위 .smn과 함께 정의한다.
   ────────────────────────────────────────────── */

.smf-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px) minmax(0, 1fr);
}

.smf-face {
  position: relative;
}

/* 종이 바탕은 이미지에 얼굴 지도가 놓이는 띠 색(홈 H2 = surface #f3f1ee, 2026-10-22)으로 구워 두었다.
   그 띠 색이나 surface 토큰을 바꾸면 face.jpg도 다시 뽑고 SKINMODU_CORE_VERSION을 올린다.
   머리카락이 잘리는 좌우 가장자리만 흐린다. 턱이 아래 가장자리에 가까우므로 아래는 흐리지 않는다. */
.smf-img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}

/* 번호 배지 — 얼굴 위 점, 모바일 목록 번호, 열 제목 기호가 함께 쓴다.
   주사는 채운 원, 레이저 · 에너지는 빈 원이라 색만으로 구분하지 않는다. */
.smf-mark {
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--smn-accent);
  background: var(--smn-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 19px;
  text-align: center;
  text-decoration: none;
}

.smf-mark--laser {
  border-color: var(--smn-ink);
  background: var(--smn-surface);
  color: var(--smn-ink);
}

.smf-key {
  width: 12px;
  height: 12px;
  border-width: 2px;
}

.smf-dot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  margin: -11px 0 0 -11px;
  transition: transform 0.15s;
}

.smf-dot--soon {
  opacity: 0.4;
}

/* 22px 점을 손가락으로 누를 수 있게 보이지 않는 영역을 44px로 넓힌다 */
.smf-dot::before {
  content: "";
  position: absolute;
  inset: -11px;
}

/* 번호 위 툴팁 — 좁은 화면에서만 쓴다(아래 미디어 쿼리) */
.smf-tip {
  display: none;
}

.smf-n {
  display: none;
}

.smf-col {
  position: relative;
}

.smf-col-h {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--smn-accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

.smf-col--inject .smf-col-h { justify-content: flex-end; padding-right: 14px; }
.smf-col--laser  .smf-col-h { padding-left: 14px; color: var(--smn-ink); }

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

/* 라벨은 같은 --y를 받아 안내선이 들어오는 높이에 놓인다 */
.smf-item {
  position: absolute;
  top: var(--y);
  transform: translateY(-50%);
  margin: 0;
  line-height: 1.3;
}

.smf-col--inject .smf-item { right: 0; padding-right: 14px; text-align: right; }
.smf-col--laser  .smf-item { left: 0;  padding-left: 14px; }

.smf-part {
  display: block;
  font-size: 12.5px;
  color: var(--smn-muted);
  letter-spacing: 0.02em;
}

.smf-name {
  display: block;
  font-family: var(--wp--preset--font-family--serif-ko, Georgia, serif);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* 누르는 영역을 44px로 키우되 줄 간격은 그대로 둔다 */
.smf-name a {
  display: inline-block;
  padding: 11px 0; /* 글자 높이 22px + 22 = 44px */
  margin: -11px 0;
  min-width: 44px;
  color: inherit;
  text-decoration: none;
}

.smf-name a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.smf-sep {
  color: var(--smn-muted);
  font-weight: 400;
}

/* 안내선: 옆 가장자리에서 라벨 높이로 들어와 점 앞에서 꺾인다. 얼굴과 같은 viewBox라 좌표를 그대로 쓴다. */
.smf-face .smf-leads {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.smf-leads line,
.smf-leads path {
  fill: none;
  stroke: var(--smn-muted);
  stroke-width: 1;
  opacity: 0.55;
  vector-effect: non-scaling-stroke;
}

.smf-leads .smf-mid {
  stroke: var(--smn-ink);
  stroke-dasharray: 3 7;
  opacity: 0.35;
}

.smf-leads path:not([data-smf]) {
  opacity: 0.25;
}

/* 짝이 되는 라벨 · 점 · 안내선 강조 (JS가 is-on을 붙인다) */
.smf-leads path.is-on { opacity: 1; stroke: var(--smn-accent); stroke-width: 2; }
.smf-leads path[data-smf^="laser"].is-on { stroke: var(--smn-ink); }
.smf-dot.is-on { transform: scale(1.25); }
.smf-item.is-on .smf-name a { text-decoration: underline; text-underline-offset: 5px; }

.smf-note {
  font-size: 13.5px;
  color: var(--smn-muted);
  margin: 18px 0 0;
}

/* 좁은 화면: 얼굴 먼저, 그 아래 번호 목록 두 개.
   옆 라벨이 잘리지 않으려면 좌우 열이 240px은 되어야 해서 1000px 미만에서 쌓는다. */
@media (max-width: 999px) {
  .smf-stage {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .smf-face { order: -1; max-width: 400px; margin: 0 auto; width: 100%; }
  .smf-col--inject .smf-col-h,
  .smf-col--laser .smf-col-h {
    justify-content: flex-start;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--smn-line);
  }
  .smf-col--inject .smf-item,
  .smf-col--laser .smf-item {
    position: static;
    transform: none;
    display: grid;
    grid-template-columns: 26px 1fr;
    column-gap: 10px;
    padding: 12px 0;
    text-align: left;
    border-bottom: 1px solid var(--smn-line);
    min-height: 48px;
  }
  .smf-n { display: block; grid-row: 1 / span 2; align-self: center; }
  .smf-name { white-space: normal; }
  .smf-face .smf-leads path { display: none; } /* 경계 점선은 남기고 안내선만 숨긴다 */

  .smf-tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 7px 12px 8px;
    border-radius: 4px;
    background: var(--smn-ink);
    color: #fff;
    white-space: nowrap;
    line-height: 1.35;
    text-align: center;
    pointer-events: none;
    box-shadow: 0 12px 36px rgba(44, 38, 29, 0.18);
  }
  .smf-tip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: var(--smn-ink);
  }
  .smf-tip-part { font-size: 11.5px; font-weight: 500; opacity: 0.75; }
  .smf-tip-name {
    font-family: var(--wp--preset--font-family--serif-ko, Georgia, serif);
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: -0.02em;
  }

  /* 탭하면 JS가 is-tip을 붙인다. 준비 중인 점은 흐리게 두지만 툴팁이 뜨는 동안은 선명하게. */
  .smf-dot.is-tip { z-index: 3; opacity: 1; transform: none; }
  .smf-dot.is-tip .smf-tip { display: flex; }
}

/* 마우스가 있는 좁은 화면은 올리기만 해도 뜬다. 터치 기기에 :hover를 주면 iOS가 첫 탭을 삼키므로 분리한다. */
@media (max-width: 999px) and (hover: hover) {
  .smf-dot:hover { z-index: 3; opacity: 1; transform: none; }
  .smf-dot:hover .smf-tip { display: flex; }
}

/* 패널 머리 "○○ 글 모음 →" */
.smn-concern-link {
  margin: 0 0 8px;
}

.smn-concern-link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  color: var(--smn-accent);
}
