/* ============================================================
   Dual-Lens Module — 모든 스타일은 #dl-mount 스코프
   Living Knowledge Map + Dual-Lens 듀얼 탭
   ============================================================ */

#dl-mount {
  --dl-ink: #0f172a;
  --dl-ink2: #334155;
  --dl-muted: #475569;
  --dl-paper: #ffffff;
  --dl-soft: #f1f5f9;
  --dl-line: #cbd5e1;
  --dl-gold: #b8892e;
  --dl-defense: #1d4ed8;
  --dl-tech: #7c3aed;
  --dl-energy: #ea580c;
  --dl-finance: #0891b2;
  --dl-bio: #16a34a;
  --dl-consumer: #db2777;
  display: block;
  margin: 14px 0;
  font-family: 'Pretendard', 'Apple SD Gothic Neo', system-ui, sans-serif;
  color: var(--dl-ink);
}

/* ───── 탭 헤더 ───── */
#dl-mount .dl-tabs {
  display: flex;
  gap: 6px;
  background: var(--dl-soft);
  padding: 4px;
  border-radius:12px;
  margin-bottom: 12px;
  border: 1px solid var(--dl-line);
}
#dl-mount .dl-tab-btn {
  flex: 1;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius:8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--dl-muted);
  font-family: inherit;
  transition: all 0.2s;
}
#dl-mount .dl-tab-btn.active {
  background: white;
  color: var(--dl-ink);
  box-shadow: 0 2px 6px rgba(15,23,42,0.10);
}

/* ───── 공통 카드 셸 ───── */
#dl-mount .dl-shell {
  background: white;
  border: 1px solid var(--dl-line);
  border-radius:16px;
  overflow: hidden;
}

/* ───── 컨트롤 바 ───── */
#dl-mount .dl-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px 12px;
  border-bottom: 1px solid var(--dl-line);
  background: #ffffff;
}
#dl-mount .dl-controls label { font-size: 12px; color: var(--dl-ink2); font-weight: 700; }
#dl-mount .dl-controls select, #dl-mount .dl-controls button {
  padding: 7px 12px;
  border: 1px solid var(--dl-line);
  border-radius:999px;
  background: white;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  color: var(--dl-ink);
}
#dl-mount .dl-controls select:hover, #dl-mount .dl-controls button:hover { border-color: var(--dl-ink); }
#dl-mount .dl-pf-toggle {
  background: #fff7e0 !important;
  border-color: #ffd87a !important;
  color: var(--dl-ink) !important;
}
#dl-mount .dl-similarity {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--dl-ink2);
  position: relative;
  cursor: help;
}
#dl-mount .dl-similarity .dl-num { color: #DC2626; font-size: 18px; font-weight: 800; }
#dl-mount .dl-sim-tip {
  position: absolute; top: 110%; right: 0;
  background: var(--dl-ink); color: white;
  padding: 10px 12px; border-radius:12px;
  font-size: 11px; font-weight: 500; line-height: 1.6;
  width: 220px; opacity: 0; pointer-events: none;
  transition: opacity 0.2s; z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
#dl-mount .dl-similarity:hover .dl-sim-tip { opacity: 1; }
#dl-mount .dl-sim-tip .dl-row { display: flex; justify-content: space-between; }
#dl-mount .dl-sim-tip .dl-row span:last-child { color: var(--dl-gold); font-weight: 700; }

#dl-mount .dl-switch {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--dl-ink2); font-weight: 700; cursor: pointer;
  user-select: none;
}
#dl-mount .dl-switch input { display: none; }
#dl-mount .dl-switch .dl-track {
  width: 28px; height: 16px; background: #ddd;
  border-radius:999px; position: relative;
  transition: background 0.2s;
}
#dl-mount .dl-switch .dl-track::after {
  content: ''; position: absolute;
  width: 12px; height: 12px; background: white;
  border-radius: 50%; top: 2px; left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
#dl-mount .dl-switch input:checked + .dl-track { background: var(--dl-ink); }
#dl-mount .dl-switch input:checked + .dl-track::after { transform: translateX(12px); }

/* ───── AI 추천 배너 ───── */
#dl-mount .dl-suggest {
  background: linear-gradient(90deg, #fff7e0 0%, #fff 100%);
  border-bottom: 1px solid var(--dl-line);
  padding: 12px 12px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  color: var(--dl-ink);
  line-height: 1.55;
  flex-wrap: wrap;
}
#dl-mount .dl-ai-tag {
  background: var(--dl-ink); color: white;
  padding: 3px 8px; border-radius:999px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.5px;
}
#dl-mount .dl-suggest .dl-summary { flex: 1; line-height: 1.4; min-width: 0; }
#dl-mount .dl-suggest button {
  padding: 5px 10px; border: 1px solid var(--dl-ink);
  background: white; border-radius:999px;
  font-size: 11px; font-weight: 700; cursor: pointer;
  font-family: inherit;
}

/* ───── 포트폴리오 패널 ───── */
#dl-mount .dl-pf {
  background: white;
  border-bottom: 1px solid var(--dl-line);
  overflow: hidden;
  transition: max-height 0.3s ease;
  max-height: 0;
}
#dl-mount .dl-pf.dl-open { max-height: 800px; overflow-y: auto; }
#dl-mount .dl-pf-inner { padding: 14px 12px; }
#dl-mount .dl-pf-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  flex-wrap: wrap;
}
#dl-mount .dl-pf-head h3 { font-size: 14px; font-weight: 800; color: var(--dl-ink); }
#dl-mount .dl-pf-total { margin-left: auto; font-size: 12px; color: var(--dl-ink2); font-weight: 700; }
#dl-mount .dl-pf-total b { color: var(--dl-ink); font-size: 15px; }

#dl-mount .dl-preset-row {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px;
}
#dl-mount .dl-preset-btn {
  padding: 5px 10px;
  background: var(--dl-soft); border: 1px solid var(--dl-line);
  border-radius:999px;
  font-size: 11px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  color: var(--dl-ink);
}
#dl-mount .dl-preset-btn:hover { background: var(--dl-ink); color: white; border-color: var(--dl-ink); }

#dl-mount .dl-holdings {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  table-layout: fixed;
}
#dl-mount .dl-holdings th {
  text-align: left; padding: 7px 6px;
  font-size: 11px; color: var(--dl-ink2); font-weight: 800;
  border-bottom: 1px solid var(--dl-line);
  letter-spacing: .3px;
}
#dl-mount .dl-holdings td {
  padding: 6px 6px;
  border-bottom: 1px solid #f5f5f8;
  overflow: hidden;
  text-overflow: ellipsis;
}
#dl-mount .dl-holdings input,
#dl-mount .dl-holdings select {
  border: 1px solid transparent;
  background: transparent;
  padding: 3px 4px; border-radius:4px;
  font-size: 11.5px; font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  color: var(--dl-ink);
}
#dl-mount .dl-holdings input:focus,
#dl-mount .dl-holdings select:focus {
  border-color: var(--dl-ink); background: white; outline: none;
}
#dl-mount .dl-holdings .dl-num { text-align: right; }
#dl-mount .dl-del-btn {
  border: none; background: transparent;
  color: #c44;
  cursor: pointer; font-size: 13px;
}
#dl-mount .dl-add-row {
  margin-top: 8px;
  padding: 6px 12px;
  background: white; border: 1px dashed #aaa;
  border-radius:8px;
  font-size: 11px; cursor: pointer; font-family: inherit;
  width: 100%;
  color: var(--dl-ink);
}

#dl-mount .dl-mix-bar {
  display: flex; gap: 3px;
  height: 7px; border-radius:4px;
  overflow: hidden;
  margin-top: 10px;
}
#dl-mount .dl-mix-legend {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 6px; font-size: 10px;
}
#dl-mount .dl-mix-legend .dl-swatch { width: 9px; height: 9px; border-radius:4px; display: inline-block; margin-right: 3px; vertical-align: middle; }

#dl-mount .dl-api-note {
  margin-top: 10px; padding: 10px 12px;
  background: #eff6ff; border-left: 3px solid #0891b2;
  border-radius:8px;
  font-size: 12px; color: var(--dl-ink2);
  line-height: 1.55;
  font-weight: 500;
}

/* ───── 한 줄 헤더 요약 ───── */
#dl-mount .dl-headline-summary {
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--dl-line);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--dl-ink);
  font-weight: 500;
}
#dl-mount .dl-headline-summary b { color: var(--dl-ink); font-weight: 800; }

/* ============================================================
   DUAL-LENS 모드 — 분할 화면
   ============================================================ */
#dl-mount .dl-stage { display: block; }

#dl-mount .dl-lens {
  position: relative;
  overflow: hidden;
  padding: 16px 12px;
  min-height: 200px;
}
#dl-mount .dl-lens-bottom { border-top: 1px solid var(--dl-line); }

#dl-mount .dl-weather {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
}
#dl-mount .dl-weather::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--dl-bg);
  opacity: 0.55;
}
#dl-mount .dl-particles {
  position: absolute; inset: 0;
  overflow: hidden;
}
#dl-mount .dl-particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.35;
  animation: dl-drift var(--dl-dur, 12s) ease-in-out infinite;
}
@keyframes dl-drift {
  0%,100% { transform: translate(0,0); }
  50%     { transform: translate(30px,-15px); }
}
@keyframes dl-storm {
  0%,100% { transform: translateX(0); opacity: 0.4; }
  50%     { transform: translateX(-20px); opacity: 0.7; }
}
#dl-mount .dl-lightning {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.9) 0%, transparent 40%);
  opacity: 0;
  animation: dl-flash 6s ease-in-out infinite;
}
@keyframes dl-flash {
  0%, 90%, 100% { opacity: 0; }
  92%, 94%      { opacity: 0.8; }
}

#dl-mount .dl-lens-grid {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
}
@media (min-width: 640px) {
  #dl-mount .dl-lens-grid { grid-template-columns: 1.3fr 1fr; }
}

#dl-mount .dl-era-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255,255,255,0.95);
  border: 1px solid var(--dl-line);
  border-radius:999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  color: var(--dl-ink);
}
#dl-mount .dl-lens h4 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--dl-ink);
}
#dl-mount .dl-mood {
  font-size: 12px; color: var(--dl-ink2);
  margin-bottom: 10px; font-weight: 600;
}
#dl-mount .dl-news {
  background: #ffffff;
  border: 1px solid var(--dl-line);
  border-radius:12px;
  padding: 12px 14px;
  box-shadow: 0 2px 12px rgba(15,23,42,0.08);
  font-size: 13px;
  line-height: 1.6;
  color: var(--dl-ink);
}
#dl-mount .dl-news .dl-src { font-size: 10.5px; color: var(--dl-ink2); font-weight: 800; letter-spacing: 0.6px; margin-bottom: 5px; text-transform: uppercase; }
#dl-mount .dl-news .dl-headline { font-weight: 800; margin-bottom: 6px; color: var(--dl-ink); }
#dl-mount .dl-keyword {
  display: inline-block;
  padding: 1px 5px;
  border-radius:4px;
  font-weight: 800;
  animation: dl-pulse-bg 2s ease-in-out infinite;
}
@keyframes dl-pulse-bg {
  0%,100% { opacity: 1; }
  50%     { opacity: 0.75; }
}
#dl-mount .dl-news .dl-stats {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 8px; font-size: 11px;
}
#dl-mount .dl-stat-pill { padding: 3px 9px; background: var(--dl-soft); border-radius:999px; color: var(--dl-ink); font-weight: 700; border: 1px solid var(--dl-line); }

#dl-mount .dl-character {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
#dl-mount .dl-avatar {
  font-size: 56px;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.15));
  /* 29차 후반 — 브랜드 아이콘 SVG 가 들어온다. font-size 는 폴백 이모지용으로 남긴다.
     애니메이션(dl-bounce/shiver/float)은 이 요소에 걸려 있어 그대로 유지된다. */
  line-height: 0;
}
#dl-mount .dl-avatar svg { display: block; }
#dl-mount .dl-character.dl-dancing .dl-avatar { animation: dl-bounce 1.4s ease-in-out infinite; }
#dl-mount .dl-character.dl-bracing .dl-avatar { animation: dl-shiver 0.4s ease-in-out infinite; }
#dl-mount .dl-character.dl-steady .dl-avatar  { animation: dl-float 3s ease-in-out infinite; }
@keyframes dl-bounce { 0%,100%{transform:translateY(0) rotate(-3deg);} 50%{transform:translateY(-12px) rotate(3deg);} }
@keyframes dl-shiver { 0%,100%{transform:translateX(-2px);} 50%{transform:translateX(2px);} }
@keyframes dl-float  { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-6px);} }
#dl-mount .dl-character .dl-label {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  background: white;
  padding: 3px 10px;
  border-radius:999px;
  border: 2px solid var(--dl-sectorColor, #555);
  color: var(--dl-sectorColor, #555);
}
#dl-mount .dl-character .dl-caption {
  margin-top: 6px; font-size: 11.5px; color: var(--dl-ink2); font-weight: 600;
}

/* 중앙 타임라인 */
#dl-mount .dl-timeline {
  position: relative;
  background: linear-gradient(180deg, #fafaff, #ffffff, #fafaff);
  border-top: 1px solid var(--dl-line);
  border-bottom: 1px solid var(--dl-line);
  height: 50px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#dl-mount .dl-timeline svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
#dl-mount .dl-tl-badge {
  position: relative; z-index: 2;
  display: flex; gap: 8px; align-items: center;
  padding: 7px 16px;
  background: white;
  border: 2px solid var(--dl-ink);
  border-radius:999px;
  font-weight: 800;
  font-size: 12px;
  color: var(--dl-ink);
  box-shadow: 0 4px 14px rgba(15,23,42,0.14);
}
#dl-mount .dl-tl-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #e63946;
  animation: dl-heart 1s ease-in-out infinite;
}
@keyframes dl-heart {
  0%,100% { transform: scale(1); opacity: 1; }
  50%     { transform: scale(1.4); opacity: 0.6; }
}
#dl-mount .dl-wire {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 3px currentColor);
}
#dl-mount .dl-wire.dl-violent { animation: dl-vibe-strong 0.15s linear infinite; stroke-width: 3; }
#dl-mount .dl-wire.dl-intense { animation: dl-vibe-mid 0.3s linear infinite; }
#dl-mount .dl-wire.dl-steady  { animation: dl-vibe-soft 1s ease-in-out infinite; }
@keyframes dl-vibe-strong {
  0%,100% { transform: translateY(0); }
  25%     { transform: translateY(-2px); }
  75%     { transform: translateY(2px); }
}
@keyframes dl-vibe-mid {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-1px); }
}
@keyframes dl-vibe-soft {
  0%,100% { opacity: 0.6; }
  50%     { opacity: 1; }
}

/* 브리핑 패널 */
#dl-mount .dl-briefing {
  padding: 14px 12px;
  border-top: 1px solid var(--dl-line);
  background: var(--dl-soft);
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 720px) {
  #dl-mount .dl-briefing { grid-template-columns: 2fr 1fr 1fr; }
}
#dl-mount .dl-panel {
  background: white;
  border-radius:12px;
  padding: 12px 14px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}
#dl-mount .dl-panel h5 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--dl-ink2);
  margin-bottom: 10px;
}
#dl-mount .dl-line {
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 6px;
  padding-left: 12px;
  position: relative;
  color: var(--dl-ink);
}
#dl-mount .dl-line::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--dl-sectorColor, #555);
}
#dl-mount .dl-line strong { color: var(--dl-sectorColor, var(--dl-ink)); }

#dl-mount .dl-edge-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px;
  margin-bottom: 6px;
}
#dl-mount .dl-edge-icon {
  width: 26px; height: 3px; border-radius:4px;
}
#dl-mount .dl-edge-name { flex: 1; font-weight: 600; }
#dl-mount .dl-edge-pct { font-weight: 800; font-size: 10px; }

#dl-mount .dl-quest {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d4a 100%);
  color: white;
}
#dl-mount .dl-quest h5 { color: rgba(255,255,255,0.72); }
#dl-mount .dl-quest .dl-rank { font-size: 14px; font-weight: 800; margin-bottom: 2px; color: #fff; }
#dl-mount .dl-quest .dl-tier { font-size: 11px; color: rgba(255,255,255,0.78); margin-bottom: 10px; font-weight: 600; }
#dl-mount .dl-quest .dl-mission {
  background: rgba(255,255,255,0.12);
  border-radius:12px;
  padding: 11px;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 8px;
  color: #fff;
}
#dl-mount .dl-quest .dl-reward {
  display: inline-block;
  background: var(--dl-gold);
  color: #fff;
  padding: 6px 12px;
  border-radius:999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .3px;
}

/* ============================================================
   KNOWLEDGE MAP 모드 — 별자리 노드 풀뷰
   ============================================================ */
#dl-mount .dl-km {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #fafaff 100%);
  min-height: 480px;
  padding: 16px 12px;
}
/* ⚠ 반드시 직계 자식(>)만 잡을 것 (29차 후반).
   자손 선택자로 두면 .dl-km 안에 있는 **다른 SVG까지** 100%×460px 로 부풀린다 —
   정보칩(.dl-km-info-title)의 20px 팀 아이콘이 실제로 182×460px 로 떠서 화면을 덮었다.
   지도 본체는 .dl-km 의 직계 svg 하나뿐이고, 팀 상징은 그 아래 깊이에 있다. */
#dl-mount .dl-km > svg {
  width: 100%;
  height: 460px;
  display: block;
}
/* 정보칩의 팀 상징 — 아이콘이 제 크기(속성값)를 지키게 두고 글자와 세로 중앙을 맞춘다 */
#dl-mount .dl-km-info-title { display: flex; align-items: center; gap: 5px; }
#dl-mount .dl-km-info-title svg { flex: none; display: block; }
#dl-mount .dl-km-edge {
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px currentColor);
  cursor: pointer;
}
#dl-mount .dl-km-edge.dl-violent { animation: dl-vibe-strong 0.18s linear infinite; stroke-width: 2.6; }
#dl-mount .dl-km-edge.dl-intense { animation: dl-vibe-mid 0.35s linear infinite; }
#dl-mount .dl-km-edge.dl-steady  { animation: dl-vibe-soft 1.2s ease-in-out infinite; }
#dl-mount .dl-km-edge.dl-gold    {
  stroke: var(--dl-gold) !important;
  stroke-dasharray: 4 6;
  animation: dl-gold-flow 2s linear infinite, dl-vibe-mid 0.35s linear infinite;
}
@keyframes dl-gold-flow {
  to { stroke-dashoffset: -20; }
}

#dl-mount .dl-km-node {
  cursor: pointer;
}
#dl-mount .dl-km-core {
  transition: stroke-width 0.2s, filter 0.2s;
}
#dl-mount .dl-km-glow {
  transition: opacity 0.25s;
}
#dl-mount .dl-km-node:hover .dl-km-core {
  stroke-width: 4;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,0.28));
}
#dl-mount .dl-km-node:hover .dl-km-glow {
  opacity: 0.5;
}
#dl-mount .dl-km-node.dl-active .dl-km-glow {
  animation: dl-node-pulse 1.4s ease-in-out infinite;
}
@keyframes dl-node-pulse {
  0%,100% { r: 38; opacity: 0.35; }
  50%     { r: 52; opacity: 0.18; }
}
#dl-mount .dl-km-glow {
  opacity: 0.25;
  animation: dl-node-pulse-soft 3s ease-in-out infinite;
}
@keyframes dl-node-pulse-soft {
  0%,100% { r: 32; opacity: 0.2; }
  50%     { r: 40; opacity: 0.1; }
}
#dl-mount .dl-km-core {
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.18));
}
#dl-mount .dl-km-emoji {
  font-size: 22px;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  user-select: none;
}
#dl-mount .dl-km-label {
  font-size: 12px;
  font-weight: 800;
  text-anchor: middle;
  fill: var(--dl-ink);
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(255,255,255,0.85);
  stroke-width: 3px;
}
#dl-mount .dl-km-pct {
  font-size: 11px;
  font-weight: 800;
  text-anchor: middle;
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(255,255,255,0.85);
  stroke-width: 3px;
}

#dl-mount .dl-km-info {
  position: absolute;
  top: 14px; right: 14px;
  background: white;
  border: 1px solid var(--dl-line);
  border-radius:12px;
  padding: 11px 13px;
  font-size: 12px;
  max-width: 210px;
  box-shadow: 0 6px 20px rgba(15,23,42,0.10);
}
#dl-mount .dl-km-info .dl-km-info-title {
  font-weight: 800;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--dl-ink);
}
#dl-mount .dl-km-info .dl-km-info-line { color: var(--dl-ink2); line-height: 1.55; font-weight: 500; }

#dl-mount .dl-km-legend {
  position: absolute;
  bottom: 12px; left: 12px;
  display: flex; gap: 8px; flex-wrap: wrap;
  font-size: 11px;
  color: var(--dl-ink2);
  font-weight: 600;
}
#dl-mount .dl-km-legend-item {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.9);
  padding: 3px 8px;
  border-radius:999px;
  border: 1px solid var(--dl-line);
}
#dl-mount .dl-km-legend-line {
  width: 16px; height: 2px; border-radius:4px;
}

/* ============================================================
   사이드 패널 — 노드 탭 시 슬라이드 인
   ============================================================ */
#dl-mount .dl-shell { position: relative; }
#dl-mount .dl-sp-backdrop {
  position: absolute; inset: 0;
  background: rgba(15,23,42,0.42);
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#dl-mount .dl-sp-backdrop.dl-open {
  opacity: 1;
  pointer-events: auto;
}
#dl-mount .dl-side-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 92%;
  max-width: 420px;
  background: white;
  z-index: 40;
  transform: translateX(105%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -6px 0 28px rgba(0,0,0,0.18);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
#dl-mount .dl-side-panel.dl-open {
  transform: translateX(0);
}
#dl-mount .dl-sp-head {
  position: sticky; top: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: white;
  border-bottom: 1px solid var(--dl-line);
  z-index: 1;
}
#dl-mount .dl-sp-emoji {
  font-size: 32px;
  flex: none;
  /* 29차 후반 — 안에 이모지 한 글자가 아니라 브랜드 아이콘 SVG 가 들어온다.
     font-size 는 MacroIcon 미로드 시 폴백 이모지용으로 남겨둔다. */
  display: flex; align-items: center;
}
#dl-mount .dl-sp-emoji svg { display: block; }
#dl-mount .dl-sp-title-wrap { flex: 1; min-width: 0; }
#dl-mount .dl-sp-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--dl-ink);
  margin-bottom: 2px;
}
#dl-mount .dl-sp-driver {
  font-size: 11px;
  color: #888;
}
#dl-mount .dl-sp-driver b { color: var(--dl-ink); }
#dl-mount .dl-sp-close {
  flex: none;
  width: 32px; height: 32px;
  border: 1px solid var(--dl-line);
  background: white;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  color: #888;
  font-family: inherit;
}
#dl-mount .dl-sp-close:hover { background: var(--dl-soft); color: var(--dl-ink); }

#dl-mount .dl-sp-body {
  padding: 14px 16px;
  flex: 1;
}
#dl-mount .dl-sp-section {
  margin-bottom: 16px;
}
#dl-mount .dl-sp-section h5 {
  font-size: 10px;
  font-weight: 800;
  color: #888;
  letter-spacing: 0.7px;
  margin-bottom: 8px;
}
#dl-mount .dl-sp-perks {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 6px;
}
#dl-mount .dl-sp-perks li {
  font-size: 12.5px;
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}
#dl-mount .dl-sp-perks li::before {
  content: '';
  position: absolute; left: 0; top: 7px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--dl-sp-color, #555);
}

#dl-mount .dl-sp-era-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
#dl-mount .dl-sp-era-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 10px;
  background: var(--dl-soft);
  border-radius:8px;
  font-size: 12px;
}
#dl-mount .dl-sp-era-row .dl-sp-era-name { font-weight: 600; color: #555; }
#dl-mount .dl-sp-era-row .dl-sp-era-mode { font-size: 13px; }

#dl-mount .dl-sp-pf-summary {
  background: linear-gradient(135deg, var(--dl-sp-color, #555) 0%, color-mix(in srgb, var(--dl-sp-color, #555) 70%, white) 100%);
  color: white;
  padding: 12px 14px;
  border-radius:12px;
  margin-bottom: 8px;
}
#dl-mount .dl-sp-pf-summary .dl-sp-pct {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}
#dl-mount .dl-sp-pf-summary .dl-sp-pct-label {
  font-size: 11px;
  opacity: 0.85;
  margin-top: 2px;
}
#dl-mount .dl-sp-holdings-list {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px;
}
#dl-mount .dl-sp-holdings-list .dl-sp-holding {
  display: flex; justify-content: space-between;
  padding: 6px 10px;
  background: white;
  border: 1px solid var(--dl-line);
  border-radius:8px;
}
#dl-mount .dl-sp-holdings-list .dl-sp-holding .dl-sp-name { font-weight: 600; }
#dl-mount .dl-sp-holdings-list .dl-sp-holding .dl-sp-val { color: #888; font-size: 11px; }
#dl-mount .dl-sp-empty {
  padding: 10px 12px;
  background: var(--dl-soft);
  border-radius:8px;
  font-size: 11.5px;
  color: #888;
  text-align: center;
}

#dl-mount .dl-sp-edges {
  display: grid; gap: 6px;
}
#dl-mount .dl-sp-edge-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px;
}
#dl-mount .dl-sp-edge-bar {
  width: 32px; height: 4px; border-radius:4px;
}
#dl-mount .dl-sp-edge-name { flex: 1; font-weight: 600; }
#dl-mount .dl-sp-edge-pct { font-weight: 800; font-size: 11px; }

#dl-mount .dl-sp-actions {
  position: sticky; bottom: 0;
  padding: 12px 16px;
  background: white;
  border-top: 1px solid var(--dl-line);
  display: grid;
  gap: 8px;
}
#dl-mount .dl-sp-action {
  padding: 10px 14px;
  border: none;
  border-radius:12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
#dl-mount .dl-sp-action.primary {
  background: var(--dl-sp-color, var(--dl-ink));
  color: white;
}
#dl-mount .dl-sp-action.secondary {
  background: white;
  color: var(--dl-ink);
  border: 1px solid var(--dl-line);
}

/* ============================================================
   TUTORIAL — 스포트라이트 오버레이
   ============================================================ */
.dl-tut-overlay {
  position: fixed; inset: 0;
  z-index: 10000;
  pointer-events: auto;
  font-family: 'Pretendard', 'Apple SD Gothic Neo', system-ui, sans-serif;
}
.dl-tut-spotlight {
  position: absolute;
  border-radius:12px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.62),
              0 0 0 4px rgba(255,179,0,0.55);
  pointer-events: none;
  transition: all 0.3s ease;
}
.dl-tut-tip {
  position: absolute;
  background: white;
  padding: 16px 18px;
  border-radius:16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.28);
  width: 300px;
  pointer-events: auto;
  transition: all 0.25s ease;
}
.dl-tut-tip h4 {
  font-size: 11px;
  margin: 0 0 6px;
  color: #888;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.dl-tut-tip p {
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0 0 14px;
  color: #1a1a2e;
}
.dl-tut-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.dl-tut-progress {
  font-size: 11px;
  color: #999;
  margin-right: auto;
  font-weight: 600;
}
.dl-tut-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius:999px;
  background: white;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  color: #1a1a2e;
}
.dl-tut-btn.primary {
  background: #1a1a2e;
  color: white;
  border-color: #1a1a2e;
}
.dl-tut-btn.skip {
  color: #999;
  border-color: transparent;
  padding: 6px 8px;
}
.dl-tut-btn[hidden] { display: none; }

/* 튜토리얼 다시보기 메뉴 */
#dl-mount .dl-tabs .dl-tut-replay {
  flex: none;
  width: 36px;
  padding: 8px 0;
  font-size: 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #888;
  border-radius:8px;
}
#dl-mount .dl-tabs .dl-tut-replay:hover {
  background: white;
  color: #1a1a2e;
}
#dl-mount .dl-tut-menu {
  position: absolute;
  background: white;
  border: 1px solid #e6e6ef;
  border-radius:12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 6px;
  z-index: 50;
  min-width: 180px;
}
#dl-mount .dl-tut-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius:8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: #1a1a2e;
}
#dl-mount .dl-tut-menu button:hover { background: #f5f5f8; }
#dl-mount .dl-tut-menu .dl-tut-menu-title {
  font-size: 10px;
  color: #999;
  padding: 6px 12px 4px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* ───── Reduced motion ───── */
#dl-mount.dl-reduce-motion .dl-particle,
#dl-mount.dl-reduce-motion .dl-lightning,
#dl-mount.dl-reduce-motion .dl-wire,
#dl-mount.dl-reduce-motion .dl-km-edge,
#dl-mount.dl-reduce-motion .dl-avatar,
#dl-mount.dl-reduce-motion .dl-keyword,
#dl-mount.dl-reduce-motion .dl-tl-dot,
#dl-mount.dl-reduce-motion .dl-edge-icon,
#dl-mount.dl-reduce-motion .dl-km-glow {
  animation: none !important;
}

/* ═══════════ 요약 비교 카드 (오늘 ↔ 거울 시대) ═══════════
   두 시대를 같은 형식으로 나란히 놓아 한 눈에 대조하기 위한 카드.
   짙은 남색 면 위에서만 쓰는 색이라 테마 토큰 대신 고정색을 쓴다
   (라이트·다크 어느 쪽에서도 카드 배경이 동일하므로 대비가 변하지 않는다). */
#dl-mount .dl-cmp {
  background: linear-gradient(160deg, #1E3A8A 0%, #312E81 100%);
  border-radius:16px;
  padding: 20px 18px;
  margin-bottom: 18px;
  box-shadow: 0 10px 30px rgba(30, 58, 138, .28);
}
#dl-mount .dl-cmp-hd {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 1.6px;
  color: #C4B5FD;
}
#dl-mount .dl-cmp-title {
  font-family: var(--font-hd);
  font-weight: 700;
  font-size: 19px;
  margin-top: 4px;
  color: #fff;
}
#dl-mount .dl-cmp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}
#dl-mount .dl-cmp-cell {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius:12px;
  padding: 13px;
  min-width: 0;
}
#dl-mount .dl-cmp-past {
  background: linear-gradient(160deg, rgba(226, 124, 31, .20), rgba(255, 255, 255, .04));
  border-color: rgba(226, 124, 31, .45);
}
#dl-mount .dl-cmp-k {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: .6px;
  color: #C4B5FD;
  margin-bottom: 7px;
  word-break: keep-all;
}
#dl-mount .dl-cmp-past .dl-cmp-k { color: #FDD9A6; }
#dl-mount .dl-cmp-v {
  font-family: var(--font-hd);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 5px;
  word-break: keep-all;
}
#dl-mount .dl-cmp-past .dl-cmp-v { color: #F7B955; }
#dl-mount .dl-cmp-s {
  font-size: 11px;
  line-height: 1.55;
  color: #DCE3EE;
  word-break: keep-all;
}
#dl-mount .dl-cmp-past .dl-cmp-s { color: #FDD9A6; }
#dl-mount .dl-cmp-score {
  background: rgba(255, 255, 255, .09);
  border-radius:16px;
  padding: 13px;
}
#dl-mount .dl-cmp-q {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .8px;
  color: #D6CCFE;
  margin-bottom: 8px;
}
#dl-mount .dl-cmp-pick {
  background: var(--acc, #E27C1F);
  color: #3B2A00;
  padding: 9px 12px;
  border-radius:8px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 3px 0 #B4600E;
  word-break: keep-all;
}
#dl-mount .dl-cmp-note {
  margin-top: 11px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #D6CCFE;
  word-break: keep-all;
}
/* 2열 대조가 이 카드의 목적이므로 웬만한 폭에서는 2열을 지킨다.
   아주 좁은 화면에서만 세로로 쌓는다. */
@media (max-width: 340px) {
  #dl-mount .dl-cmp-grid { grid-template-columns: 1fr; gap: 10px; }
}
