/* 티음 — 강의 찾기 전용 스타일 */
/* 강의 상세 모달(.ld-*)과 강의 요청 모달(.rq-*)은 공용 승격되어 tium.css로 이동했다. */

/* ---------- 필터 레일 (카테고리 2-depth · 거리) ---------- */
/* 카테고리 2차 그룹 — 1차 칩 아래에 구분선으로 계층을 표현 */
.filter-block .f-sub {
  margin-top: 2px; padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
}

/* 거리 필터 컨테이너 — [내 위치로 찾기]+힌트 또는 거리 칩+캡션을 세로로 담는다 */
.dist-field { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.dist-hint, .dist-cap { font-size: 12px; line-height: 1.45; color: var(--ink-3); }

/* ---------- 갤러리/리스트/지도 뷰 토글 ----------
   아이콘 + 라벨 3분할 세그. 선택 상태는 잉크 배경 + 흰 라벨이고, 예전 오렌지 점(::before)
   시그니처는 선택된 버튼의 아이콘 색(var(--dot))이 이어받는다. */
.view-seg {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--well); border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px var(--line);
}
.view-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: var(--r-pill);
  background: transparent; color: var(--ink-2);
  font-size: 13.5px; font-weight: 650; letter-spacing: -0.01em;
  transition: background var(--std) var(--ease-out), color var(--std) var(--ease-out),
              transform var(--std) var(--ease-out);
}
.view-btn .ico { flex: none; color: var(--ink-3); transition: color var(--std) var(--ease-out); }
.view-btn:hover { color: var(--ink); }
.view-btn:hover .ico { color: var(--ink-2); }
.view-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.view-btn[aria-pressed="true"] .ico { color: var(--dot); }
.view-btn:active { transform: scale(.97); }

/* ---------- 리스트 뷰 (#r-grid.lecture-list) ----------
   표(table)형: 컨테이너가 하나의 시트 카드, 각 행은 그 안의 정렬된 4열 그리드다.
   모든 행이 같은 grid-template-columns를 쓰므로 열이 자연히 맞아 표처럼 읽힌다.
   갤러리 카드(.lecture-card, tium.css)와는 선택자가 겹치지 않는다. */
.lecture-list {
  background: var(--sheet); border-radius: var(--r-l); overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
}
/* 강사 열 176px — 아바타(32px) + 이름을 한 줄에 담는 폭.
   상하 패딩은 10px — 아바타가 행 높이를 결정하므로(32 + 20 = 52px) 팽창을 막는다. */
.lecture-row {
  display: grid; grid-template-columns: 112px minmax(0, 1fr) 176px 200px;
  align-items: center; gap: 14px; width: 100%;
  padding: 10px 18px; text-align: left; cursor: pointer;
  background: transparent;
  transition: background var(--std) var(--ease-out);
}
/* 행 사이 구분선 — 첫 행 위에는 긋지 않는다(시트 링과 겹침) */
.lecture-row + .lecture-row { border-top: 1px solid var(--line); }
/* 표는 들리지 않고 면으로 반응한다 — lift/transform 없음 */
.lecture-row:hover { background: var(--well); }
.lecture-row:active { background: var(--line); }

/* .lr-main(배지+강의명) · .lr-sub(강사+소속)는 데스크톱에서 투명 래퍼다 —
   display:contents 로 자식 4개가 그대로 행 그리드의 열을 차지한다.
   모바일에서만 실제 박스가 되어 2행 스택을 만든다. */
.lecture-row .lr-main,
.lecture-row .lr-sub { display: contents; }

.lecture-row .badge-cat { justify-self: start; }   /* 그리드 스트레치 방지 — 배지는 글자 폭만큼 */
.lecture-row .lr-title {
  font-size: 14.5px; font-weight: 600; line-height: 1.4; letter-spacing: -0.015em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 강사 셀 = 아바타 + 이름. 잘림(ellipsis)은 이름에만 걸어 아바타가 찌그러지지 않게 한다. */
.lecture-row .lr-teacher {
  display: inline-flex; align-items: center; gap: 7px; min-width: 0;
  font-size: 13.5px; font-weight: 500;
}
.lecture-row .lr-tname { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lecture-row .lr-org { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 모바일 — 세그는 풀폭(터치 타깃 확보), 표는 2행 스택(①배지+강의명 ②강사 · 소속) */
@media (max-width: 640px) {
  .result-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .view-seg { display: flex; width: 100%; }
  .view-btn { flex: 1; padding: 0 10px; }

  .lecture-row { grid-template-columns: 1fr; gap: 0; row-gap: 4px; padding: 12px 14px; }
  .lecture-row .lr-main { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
  .lecture-row .lr-main .badge-cat { flex: none; }
  .lecture-row .lr-title {
    white-space: normal;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  }
  /* 아바타가 섞이므로 baseline 대신 center 정렬 — 소속 텍스트가 아바타 중앙에 맞는다. */
  .lecture-row .lr-sub { display: flex; align-items: center; gap: 5px; min-width: 0; }
  .lecture-row .lr-sub .lr-teacher { flex: none; font-size: 13px; font-weight: 500; color: var(--ink-3); }
  .lecture-row .lr-sub .lr-org { font-size: 13px; }
  .lecture-row .lr-sub .lr-org::before { content: "·"; margin-right: 5px; color: var(--ink-4); }
}

/* ---------- 지도 패널 ---------- */
.map-panel {
  background: var(--sheet); border-radius: var(--r-l); overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.map-cap {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--ink-3);
}
.map-cap .map-mine {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 11px 0 9px; border-radius: var(--r-pill);
  background: var(--dot-wash); color: var(--dot-ink);
  font-size: 12px; font-weight: 650;
}
.map-cap .map-count strong { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.map-canvas { width: 100%; height: 600px; background: var(--well); }

/* 폴백 안내(키 없음·로드 실패) */
.map-fallback {
  min-height: 440px; padding: 64px 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 6px;
}
.map-fb-mark { line-height: 0; margin-bottom: 12px; color: var(--ink-3); }
.map-fb-title { font-size: 17px; font-weight: 700; color: var(--ink-2); }
.map-fb-desc { font-size: 14px; color: var(--ink-3); max-width: 320px; }

/* InfoWindow 콘텐츠(구글 버블 내부에 주입) — 흰 배경 위에 티음 토큰(폰트·색·배지)을 따른다 */
.miw { min-width: 176px; max-width: 264px; padding: 2px; font-family: inherit; }
.miw-card { display: flex; flex-direction: column; }

/* 복수 강의 핀 — 장소 헤더 + 강의별 미니 행 */
.miw-place {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 8px;
}
.miw-place-n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill);
  background: var(--dot); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
}
.miw-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.miw-list li { display: flex; flex-direction: column; gap: 1px; }
.miw-lec { font-size: 13.5px; font-weight: 650; color: var(--dot-ink); text-decoration: none; }
.miw-lec:hover { text-decoration: underline; }
.miw-by { font-size: 11.5px; color: var(--ink-3); }

/* 단일 강의 핀 — 요약 카드 */
.miw-badge { align-self: flex-start; margin-bottom: 7px; }
.miw-title { font-size: 14.5px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.miw-who { margin-top: 5px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.miw-who .miw-org { display: block; margin-top: 1px; font-weight: 500; color: var(--ink-3); }
.miw-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.miw-tags:not(:empty) { margin-top: 9px; }
.miw-tag {
  font-size: 11px; font-weight: 600; color: var(--ink-3);
  background: var(--well); border-radius: var(--r-pill); padding: 2px 8px;
}
.miw-tag.num { color: var(--dot-ink); background: var(--dot-wash); font-variant-numeric: tabular-nums; }
.miw-more { margin-top: 11px; width: 100%; justify-content: center; }

@media (max-width: 768px) {
  .map-canvas { height: 70vh; }
  .map-fallback { min-height: 60vh; }
}

/* 티음 커스텀 마커 — 이음 점 시그니처 (AdvancedMarker content, lectures.html tiumPinEl) */
.tium-pin { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.tium-pin .tp-dot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: var(--r-pill);
  background: var(--dot); color: #fff;
  font-size: 12.5px; font-weight: 750; letter-spacing: -0.01em; line-height: 1;
  box-shadow: 0 0 0 2px #fff, 0 3px 10px rgba(28, 29, 43, 0.30);
  position: relative; z-index: 1;
  transition: transform var(--std) var(--ease-out), box-shadow var(--std) var(--ease-out);
  transform-origin: 50% 130%;   /* 꼬리 끝(좌표점) 기준으로 커지게 */
}
.tium-pin .tp-tail {
  width: 10px; height: 10px; margin-top: -6px;
  background: var(--dot); border-radius: 2px;
  transform: rotate(45deg);
}
.tium-pin:hover .tp-dot { transform: scale(1.12); box-shadow: 0 0 0 2px #fff, 0 5px 14px rgba(28, 29, 43, 0.36); }

/* ---------- 파트너 기관 로고 스트립 ----------
   결과 목록 바로 위 대역 — 아래 경계선으로 결과 헤더와 갈라놓는다. 마퀴 루프·호버 정지·
   reduced-motion 정적 폴백은 motion.js/motion.css의 data-marquee 프리미티브가 담당한다
   (여기서 애니메이션 금지). */
.partner-strip { margin-bottom: 22px; }   /* 하단 경계는 로고 밴드의 border-bottom이 맡는다 */
.pstrip-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.pstrip-cap { font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }

/* 로고 밴드 — 하나의 흰 박스(위·아래 border만, 좌우 개방) 안을 로고들이 지나간다.
   로고는 배지·칩 스타일 없이 이미지만. 마퀴가 좌우 border 없는 박스 가장자리에서
   자연스럽게 드나들도록 padding-inline은 두지 않는다(overflow는 .tium-marquee가 담당). */
.pstrip-row {
  background: var(--sheet);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: 16px;
}
.pstrip-row .tium-marquee-track { gap: 48px; align-items: center; }
.pstrip-logo { flex: 0 0 auto; display: inline-flex; align-items: center; }
/* max-width: Anthropic처럼 종횡비 9:1급 워드마크가 대열을 독점하지 않게 상한 — contain으로 비율 유지 축소 */
.pstrip-logo img { height: 24px; width: auto; max-width: 160px; object-fit: contain; display: block; }
a.pstrip-logo { transition: opacity var(--std) var(--ease-out); }
a.pstrip-logo:hover { opacity: .7; }

/* 파트너 0곳 — 마퀴·캡션 대신 이 한 줄만 남는다(오렌지 점 시그니처로 절제된 안내) */
.pstrip-empty {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--ink-3);
}
.pstrip-empty::before {
  content: ""; flex: none;
  width: 6px; height: 6px; border-radius: 50%; background: var(--dot);
}

@media (max-width: 640px) {
  .partner-strip { margin-bottom: 18px; }
  .pstrip-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}
