/* ============================================================
   system-brand.css — CHAART OS Design System
   brand.html 전용 — Brand History Timeline, Relation Map
   분리: 2026-03-26 (Élio Brandt)
   ============================================================ */

/* ══════════════════════════════════
   Brand History Timeline
══════════════════════════════════ */
.bh-timeline {
  position: relative;
  padding-left: 56px;
}
.bh-timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--alpha-6),
    var(--red-brand) 15%,
    var(--red-brand) 85%,
    var(--alpha-6)
  );
}

/* Era Block */
.bh-era {
  position: relative;
  margin-bottom: 64px;
}
.bh-era:last-child {
  margin-bottom: 0;
}

/* Era Dot */
.bh-era::before {
  content: "";
  position: absolute;
  left: -44px;
  top: 6px;
  width: 14px;
  height: 14px;
  background: var(--bg);
  border: 3px solid var(--red-brand);
  z-index: 1;
}

/* Active Era (current) — pulsing dot */
.bh-era--active::before {
  background: var(--red-brand);
  box-shadow: 0 0 0 4px rgba(150,30,35,0.15); /* NOTE: box-shadow 내부, 토큰 매핑 불가 */
  animation: bh-pulse 2s ease-in-out infinite;
}
@keyframes bh-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(150,30,35,0.15); } /* NOTE: box-shadow 내부, 토큰 매핑 불가 */
  50% { box-shadow: 0 0 0 8px rgba(150,30,35,0.08); } /* NOTE: box-shadow 내부, 토큰 매핑 불가 */
}

/* Era Header */
.bh-era-year {
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--red-brand);
  margin-bottom: 6px;
}
.bh-era-title {
  font-family: var(--serif);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.35;
  margin-bottom: 16px;
}
.bh-era-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 640px;
}

/* Branch Node */
.bh-branch {
  position: relative;
  padding: 16px 20px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color var(--dur-normal) var(--ease),
              background var(--dur-normal) var(--ease),
              border-radius var(--dur-normal) var(--ease);
}
.bh-branch:hover {
  border-color: var(--border-strong);
  background: var(--warm-bg);
  border-radius: var(--radius-hover);
}

/* Branch connection line */
.bh-branch::before {
  content: "";
  position: absolute;
  left: -37px;
  top: 50%;
  width: 28px;
  height: 1px;
  background: var(--alpha-12);
}

/* Branch inner dot */
.bh-branch::after {
  content: "";
  position: absolute;
  left: -13px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--alpha-16);
  transition: background var(--dur-normal) var(--ease);
}
.bh-branch:hover::after {
  background: var(--red-brand);
}

.bh-branch-label {
  font-family: var(--mono);
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.bh-branch-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.4;
}
.bh-branch-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Branch Tags */
.bh-branch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.bh-tag {
  font-family: var(--mono);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: var(--ls-wide);
  padding: 3px 8px;
  background: var(--alpha-4);
  color: var(--text-caption);
  border: 1px solid var(--alpha-6);
  transition: all var(--dur-normal) var(--ease);
}
.bh-tag--red {
  background: var(--red-brand-subtle);
  color: var(--red-brand);
  border-color: var(--red-brand-muted);
}

/* Person Badge */
.bh-person {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: var(--text-11);
  font-weight: 500;
  color: var(--text-caption);
  margin-bottom: 12px;
}
.bh-person-dot {
  width: 8px;
  height: 8px;
  background: var(--red-brand);
}
.bh-person--secondary .bh-person-dot {
  background: var(--charcoal);
}

/* Flow Arrow between branches */
.bh-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 4px 20px;
  font-family: var(--mono);
  font-size: var(--text-2xs);
  color: var(--text-muted);
  letter-spacing: var(--ls-wide);
}
.bh-flow::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--alpha-12);
}
.bh-flow-arrow {
  color: var(--red-brand);
  font-weight: 700;
}

/* Milestone marker */
.bh-milestone {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: var(--red-brand-ghost);
  border-left: 3px solid var(--red-brand);
}
.bh-milestone-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red-brand);
  flex-shrink: 0;
}
.bh-milestone-text {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--charcoal);
  line-height: 1.5;
}

/* Current status badge */
.bh-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: var(--text-11);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}
.bh-status--active {
  background: var(--red-brand-subtle);
  color: var(--red-brand);
  border: 1px solid var(--red-brand-muted);
}
.bh-status--complete {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid var(--color-success-border);
}
.bh-status-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-round);
  background: currentColor;
}
.bh-status--active .bh-status-dot {
  animation: bh-pulse-dot 1.5s ease-in-out infinite;
}
@keyframes bh-pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Dark section overrides */
.b44-section--dark .bh-timeline::before {
  background: linear-gradient(
    to bottom,
    var(--border-on-dark),
    var(--red-brand-visible) 15%,
    var(--red-brand-visible) 85%,
    var(--border-on-dark)
  );
}
.b44-section--dark .bh-era::before {
  background: var(--charcoal);
  border-color: var(--red-brand-strong);
}
.b44-section--dark .bh-era--active::before {
  background: var(--red-brand);
}
.b44-section--dark .bh-era-title {
  color: #F0F0F0;
}
.b44-section--dark .bh-era-desc {
  color: rgba(255,255,255,0.55); /* NOTE: 0.55 — 토큰 없음 */
}
.b44-section--dark .bh-branch {
  border-color: var(--border-on-dark);
  background: rgba(255,255,255,0.03); /* NOTE: 0.03 — 토큰 없음 */
}
.b44-section--dark .bh-branch:hover {
  border-color: rgba(255,255,255,0.14); /* NOTE: 0.14 — 토큰 없음 */
  background: var(--border-on-dark);
}
.b44-section--dark .bh-branch-title {
  color: #F0F0F0;
}
.b44-section--dark .bh-branch-desc {
  color: rgba(255,255,255,0.55); /* NOTE: 0.55 — 토큰 없음 */
}
.b44-section--dark .bh-milestone {
  background: var(--red-brand-muted);
  border-left-color: var(--red-brand-visible);
}
.b44-section--dark .bh-milestone-text {
  color: #F0F0F0;
}

/* Responsive */
@media (max-width: 768px) {
  .bh-timeline {
    padding-left: 40px;
  }
  .bh-timeline::before {
    left: 12px;
  }
  .bh-era::before {
    left: -36px;
    width: 12px;
    height: 12px;
  }
  .bh-branch::before {
    left: -29px;
    width: 20px;
  }
  .bh-branch::after {
    left: -13px;
  }
  .bh-era-title {
    font-size: var(--text-md);
  }
  .bh-branch {
    padding: 12px 14px;
  }
  .bh-progress-track {
    margin-bottom: 32px;
  }
}

/* ── Timeline Progress Bar ── */
.bh-progress-track {
  position: relative;
  height: 4px;
  background: var(--border-on-dark);
  margin-bottom: 48px;
  overflow: hidden;
}
.bh-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--red-brand), var(--red-brand-half));
  transition: width 60ms linear;
}
.bh-progress-years {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: var(--text-2xs);
  color: var(--text-on-dark-faint);
  letter-spacing: var(--ls-wide);
}

/* ── Stagger Reveal for Eras ── */
.bh-stagger {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--dur-long) var(--ease),
              transform var(--dur-long) var(--ease);
}
.bh-stagger.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Child stagger (branches, milestones, flows inside eras) ── */
.bh-stagger .bh-branch,
.bh-stagger .bh-milestone,
.bh-stagger .bh-flow,
.bh-stagger .bh-person {
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity var(--dur-slow) var(--ease),
              transform var(--dur-slow) var(--ease),
              border-color var(--dur-normal) var(--ease),
              background var(--dur-normal) var(--ease),
              border-radius var(--dur-normal) var(--ease);
}
.bh-child-visible {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

/* ── Branch hover glow effect ── */
.bh-branch {
  --branch-glow: 0;
}
.b44-section--dark .bh-branch::after {
  box-shadow: 0 0 calc(var(--branch-glow) * 8px) rgba(150,30,35,calc(var(--branch-glow) * 0.6)); /* NOTE: box-shadow calc 내부, 토큰 매핑 불가 */
  transition: background var(--dur-normal) var(--ease),
              box-shadow var(--dur-normal) var(--ease);
}

/* ── Era dot entrance animation ── */
.bh-stagger::before {
  transform: scale(0);
  transition: transform var(--dur-slow) var(--ease-out-expo);
}
.bh-stagger.is-visible::before {
  transform: scale(1);
}

/* ── Year text counter flash ── */
@keyframes bh-year-flash {
  0% { color: rgba(150,30,35,1); } /* NOTE: 완전 불투명, var(--red-brand) 와 동일하나 keyframe 시작값 */
  100% { color: var(--red-brand); }
}

/* ── Active era glow line ── */
.bh-era--active.is-visible::before {
  animation: bh-pulse 2s ease-in-out infinite, bh-dot-enter var(--dur-slow) var(--ease-out-expo);
}
@keyframes bh-dot-enter {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

/* prefers-reduced-motion override */
@media (prefers-reduced-motion: reduce) {
  .bh-stagger {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .bh-stagger .bh-branch,
  .bh-stagger .bh-milestone,
  .bh-stagger .bh-flow,
  .bh-stagger .bh-person {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .bh-stagger::before {
    transform: scale(1);
    transition: none;
  }
  .bh-progress-fill {
    transition: none;
  }
}

/* ═══════════════════════════════════════════════════════
   Relation Map — 인터랙티브 관계 맵 (rm-*)
   Brand History 섹션: 노드 간 연결선, 호버 팝업, 클릭 하이라이트
   ═══════════════════════════════════════════════════════ */

/* ── Map Container ── */
.rm-map {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 44px;
  padding: 56px 0 72px;
  margin-left: 120px;
}

/* ── SVG Overlay ── */
.rm-svg {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 3;
  overflow: visible;
}

/* ── Connection Lines (기본 숨김 → 클릭 시 draw-in 표시) ── */
.rm-line {
  fill: none;
  stroke: rgba(150,30,35,0.3); /* NOTE: SVG stroke 0.3 — 토큰 없음 */
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.rm-line--active {
  stroke: var(--red-brand-visible);
  stroke-width: 2;
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(150,30,35,0.15)); /* NOTE: drop-shadow 내부값, 토큰 매핑 불가 */
}
.rm-line--dimmed {
  opacity: 0;
}

/* ── Flow Particle (single dot) ── */
.rm-flow-dot {
  fill: var(--red-brand);
  opacity: 0;
  r: 3;
  filter: drop-shadow(0 0 6px rgba(150,30,35,0.5)); /* NOTE: drop-shadow 내부값, 0.5 토큰 없음 */
  transition: opacity 0.5s ease;
}
.rm-flow-dot.is-active {
  opacity: 0.85;
}

/* ── Row Layout ── */
.rm-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  position: relative;
  z-index: 2;
}
.rm-row--double {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.rm-row--triple {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

/* ── Node Base ── */
.rm-node {
  position: relative;
  padding: 28px 32px;
  background: rgba(255,255,255,0.03); /* NOTE: 0.03 토큰 없음 */
  border: 1px solid rgba(255,255,255,0.07); /* NOTE: 0.07 토큰 없음 */
  border-radius: 0;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  transform: translateY(24px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.rm-node.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.rm-node:hover {
  border-color: rgba(150,30,35,0.35); /* NOTE: 0.35 — 토큰 없음 */
  background: var(--border-on-dark);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2), /* NOTE: box-shadow 내부, shadow 토큰 복합값과 불일치 */
              0 0 0 1px rgba(150,30,35,0.1); /* NOTE: 0.1 — red-brand-muted(0.08~0.12) 근사이나 box-shadow 내부 */
  transform: translateY(-2px);
}

/* ── Node State: Click Active ── */
.rm-node.rm-active {
  border-color: var(--red-brand-visible);
  background: var(--red-brand-muted);
  box-shadow: 0 0 0 1px rgba(150,30,35,0.3), /* NOTE: box-shadow 내부, 0.3 토큰 없음 */
              0 12px 40px var(--alpha-25), /* NOTE: box-shadow 내부, 0.25 토큰 없음 */
              0 0 48px rgba(150,30,35,0.08); /* NOTE: box-shadow 내부, 토큰 매핑 불가 */
  z-index: 10;
  transform: translateY(-3px);
}
.rm-node.rm-connected {
  border-color: rgba(150,30,35,0.35); /* NOTE: 0.35 — 토큰 없음 */
  background: rgba(150,30,35,0.05); /* NOTE: 0.05 — 토큰 없음 */
  box-shadow: 0 0 0 1px rgba(150,30,35,0.15); /* NOTE: box-shadow 내부, 토큰 매핑 불가 */
}
.rm-node.rm-dimmed {
  opacity: 0.2;
  filter: grayscale(0.4) blur(0.5px);
  transform: scale(0.99);
}

/* ── Node Variants ── */
.rm-node--origin {
  border-color: rgba(150,30,35,0.25); /* NOTE: 0.25 — 토큰 없음 */
  background: var(--red-brand-ghost);
  text-align: center;
  align-items: center;
}
.rm-node--keyword {
  text-align: center;
  align-items: center;
  padding: 28px 24px;
}
.rm-node--problem {
  border-color: rgba(255,200,0,0.15); /* NOTE: 비브랜드 색상(yellow) */
  background: rgba(255,200,0,0.03); /* NOTE: 비브랜드 색상(yellow) */
  text-align: center;
  align-items: center;
}
.rm-node--pivot {
  border-color: rgba(100,200,255,0.15); /* NOTE: 비브랜드 색상(blue) */
  background: rgba(100,200,255,0.03); /* NOTE: 비브랜드 색상(blue) */
}
.rm-node--milestone {
  border-color: rgba(150,30,35,0.25); /* NOTE: 0.25 — 토큰 없음 */
  background: var(--red-brand-ghost);
  text-align: center;
  align-items: center;
}
.rm-node--concept {
  border-style: dashed;
}
.rm-node--person {
  border-color: rgba(150,30,35,0.25); /* NOTE: 0.25 — 토큰 없음 */
  background: var(--red-brand-ghost);
}
.rm-node--philosophy {
  border-color: rgba(255,255,255,0.1); /* NOTE: 0.1 토큰 없음 */
  background: var(--alpha-4);
  text-align: center;
  align-items: center;
}
.rm-node--doc {
  border-left: 3px solid rgba(150,30,35,0.3); /* NOTE: 0.3 — 토큰 없음 */
}
.rm-node--current {
  border: 1px solid var(--red-brand-half);
  background: rgba(150,30,35,0.05); /* NOTE: 0.05 — 토큰 없음 */
  text-align: center;
  align-items: center;
  padding: 40px 36px;
  box-shadow: 0 0 64px rgba(150,30,35,0.06); /* NOTE: box-shadow 내부, shadow-glow(0.10)와 불일치 */
}
.rm-node--current .rm-node-title {
  font-size: var(--text-xl, 20px);
  font-weight: 700;
  letter-spacing: var(--ls-tight);
  color: rgba(255,255,255,0.96); /* NOTE: 0.96 토큰 없음 */
}

/* ── New Category Node Variants ── */
.rm-node--ancestor {
  border-color: rgba(180,140,80,0.25); /* NOTE: 비브랜드 색상(amber) */
  background: rgba(180,140,80,0.04); /* NOTE: 비브랜드 색상(amber) */
  text-align: center;
  align-items: center;
  border-style: double;
  border-width: 3px;
}
.rm-node--release {
  border-color: rgba(80,180,120,0.15); /* NOTE: 비브랜드 색상(green) */
  background: rgba(80,180,120,0.03); /* NOTE: 비브랜드 색상(green) */
  border-left: 2px solid rgba(80,180,120,0.4); /* NOTE: 비브랜드 색상(green) */
}
.rm-node--marketing {
  border-color: rgba(220,120,200,0.12); /* NOTE: 비브랜드 색상(pink) */
  background: rgba(220,120,200,0.03); /* NOTE: 비브랜드 색상(pink) */
  border-left: 2px solid rgba(220,120,200,0.3); /* NOTE: 비브랜드 색상(pink) */
}
.rm-node--investment {
  border-color: rgba(80,160,220,0.15); /* NOTE: 비브랜드 색상(blue) */
  background: rgba(80,160,220,0.03); /* NOTE: 비브랜드 색상(blue) */
  border-left: 2px solid rgba(80,160,220,0.4); /* NOTE: 비브랜드 색상(blue) */
}
.rm-node--hiring {
  border-color: rgba(100,220,200,0.12); /* NOTE: 비브랜드 색상(teal) */
  background: rgba(100,220,200,0.03); /* NOTE: 비브랜드 색상(teal) */
}
.rm-node--research {
  border-color: rgba(200,180,100,0.12); /* NOTE: 비브랜드 색상(gold) */
  background: rgba(200,180,100,0.03); /* NOTE: 비브랜드 색상(gold) */
  border-style: dashed;
}

/* ── Node Inner Elements — Typography Hierarchy ── */
.rm-node-date {
  font-family: var(--mono);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--red-brand-visible);
  margin-bottom: 2px;
}
.rm-node-title {
  font-size: var(--text-base, 16px);
  font-weight: 600;
  color: rgba(255,255,255,0.92); /* NOTE: 0.92 토큰 없음 */
  line-height: 1.35;
  letter-spacing: var(--ls-normal);
}
.rm-node-sub {
  font-size: var(--text-13);
  font-weight: 400;
  color: rgba(255,255,255,0.4); /* NOTE: 0.4 토큰 없음 */
  line-height: 1.6;
  letter-spacing: var(--ls-normal);
}
.rm-node-desc {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.28); /* NOTE: 0.28 토큰 없음 */
  line-height: 1.7;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--alpha-4);
  letter-spacing: var(--ls-normal);
}
.rm-node-person {
  font-family: var(--mono);
  font-size: var(--text-2xs);
  color: rgba(255,255,255,0.3); /* NOTE: 0.3 토큰 없음 */
  letter-spacing: var(--ls-wide);
  margin-top: 4px;
}
.rm-node-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 auto 10px;
  color: rgba(150,30,35,0.55); /* NOTE: 0.55 — 토큰 없음 */
  opacity: 0.75;
  transition: opacity 0.4s ease, color 0.4s ease, transform 0.4s ease;
}
.rm-node:hover .rm-node-icon {
  opacity: 1;
  color: var(--red-brand-strong);
  transform: translateY(-1px);
}
.rm-node-icon svg {
  width: 18px;
  height: 18px;
}

/* ── Popup (Hover 시 노션 데이터) ── */
.rm-popup {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 420px;
  max-width: 90vw;
  padding: 32px;
  background: rgba(18,18,18,0.95); /* NOTE: 비브랜드 dark, 토큰 없음 */
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--border-on-dark);
  border-radius: 0;
  box-shadow: 0 24px 80px var(--alpha-50), /* NOTE: box-shadow 내부, 0.5 토큰 없음 */
              0 0 0 1px rgba(255,255,255,0.04), /* NOTE: box-shadow 내부 */
              0 0 1px var(--alpha-50); /* NOTE: box-shadow 내부 */
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.rm-popup--wide {
  width: 540px;
}
.rm-node:hover .rm-popup {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.rm-popup::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--border-on-dark);
}

/* Popup Inner — refined typography */
.rm-popup-date {
  font-family: var(--mono);
  font-size: var(--text-2xs);
  color: var(--red-brand-visible);
  letter-spacing: var(--ls-medium);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.rm-popup-title {
  font-size: var(--text-lg, 18px);
  font-weight: 600;
  color: rgba(255,255,255,0.95); /* NOTE: 0.95 토큰 없음 */
  margin-bottom: 18px;
  line-height: 1.4;
  letter-spacing: var(--ls-normal);
}
.rm-popup-body {
  font-size: var(--text-13);
  color: var(--text-on-dark-muted);
  line-height: 1.85;
  margin-bottom: 12px;
  letter-spacing: var(--ls-normal);
}
.rm-popup-meta {
  font-family: var(--mono);
  font-size: var(--text-11);
  color: rgba(150,30,35,0.5); /* NOTE: 0.5 — 토큰 없음 */
  line-height: 1.65;
  margin-bottom: 10px;
}
.rm-popup-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.rm-popup-tag {
  font-family: var(--mono);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: var(--ls-wide);
  padding: 3px 8px;
  background: var(--alpha-4);
  color: rgba(255,255,255,0.38); /* NOTE: 0.38 토큰 없음 */
  border: 1px solid rgba(255,255,255,0.06); /* NOTE: 0.06 토큰 없음 */
  border-radius: 0;
}
.rm-popup-tag--red {
  background: var(--red-brand-muted);
  color: var(--red-brand-strong);
  border-color: var(--red-brand-dim);
}
.rm-popup-tag--active {
  background: var(--red-brand-muted);
  color: var(--red-brand);
  border: 1px solid var(--red-brand-dim);
  animation: bh-pulse-dot 2s ease-in-out infinite;
}
.rm-popup-tag--done {
  background: rgba(34,197,94,0.08); /* NOTE: 비브랜드 green 계열, 토큰 없음 */
  color: rgba(34,197,94,0.8); /* NOTE: 비브랜드 green 계열, 토큰 없음 */
  border: 1px solid rgba(34,197,94,0.2); /* NOTE: 비브랜드 green 계열, 토큰 없음 */
}

/* Popup Table (Notion-style) */
.rm-popup-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}
.rm-popup-table td {
  font-size: var(--text-13);
  padding: 7px 12px;
  border-bottom: 1px solid var(--alpha-4);
  vertical-align: top;
  line-height: 1.6;
}
.rm-popup-table td:first-child {
  font-family: var(--mono);
  font-size: var(--text-11);
  color: var(--red-brand-visible);
  white-space: nowrap;
  width: 60px;
  letter-spacing: var(--ls-wide);
}
.rm-popup-table td:last-child {
  color: rgba(255,255,255,0.55); /* NOTE: 0.55 토큰 없음 */
}

/* Popup Grid (CHAART OS 노드용) */
.rm-popup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 12px;
}
.rm-popup-grid > div {
  padding: 12px 14px;
  background: rgba(255,255,255,0.025); /* NOTE: 0.025 토큰 없음 */
  border: 1px solid rgba(255,255,255,0.05); /* NOTE: 0.05 토큰 없음 */
  font-size: var(--text-xs);
  color: var(--text-on-dark-muted);
  line-height: 1.65;
}
.rm-popup-grid > div strong {
  display: block;
  color: rgba(255,255,255,0.88); /* NOTE: 0.88 토큰 없음 */
  font-size: var(--text-13);
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: var(--ls-normal);
}

/* ── Legend ── */
.rm-legend {
  margin-top: 64px;
  padding: 20px 24px;
  background: rgba(255,255,255,0.015); /* NOTE: 0.015 토큰 없음 */
  border: 1px solid var(--alpha-4);
  border-radius: 0;
}
.rm-legend-title {
  font-family: var(--mono);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: rgba(255,255,255,0.25); /* NOTE: 0.25 토큰 없음 */
  margin-bottom: 14px;
}
.rm-legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
}
.rm-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.35); /* NOTE: 0.35 토큰 없음 */
  letter-spacing: var(--ls-normal);
}
.rm-legend-dot {
  width: 10px;
  height: 10px;
  border: 1px solid var(--border-on-dark);
  border-radius: 0;
}
.rm-legend-dot--origin {
  background: rgba(150,30,35,0.3); /* NOTE: 0.3 — 토큰 없음 */
  border-color: rgba(150,30,35,0.5); /* NOTE: 0.5 — 토큰 없음 */
}
.rm-legend-dot--keyword {
  background: rgba(255,255,255,0.06); /* NOTE: 0.06 토큰 없음 */
  border-color: rgba(255,255,255,0.15); /* NOTE: 0.15 토큰 없음 */
}
.rm-legend-dot--pivot {
  background: rgba(100,200,255,0.1); /* NOTE: 비브랜드 색상(blue) */
  border-color: rgba(100,200,255,0.3); /* NOTE: 비브랜드 색상(blue) */
}
.rm-legend-dot--person {
  background: var(--red-brand-dim);
  border-color: var(--red-brand-half);
}
.rm-legend-dot--philosophy {
  background: var(--border-on-dark);
  border-color: rgba(255,255,255,0.2); /* NOTE: 0.2 토큰 없음 */
}
.rm-legend-dot--current {
  background: var(--red-brand-muted);
  border: 2px solid var(--red-brand);
}
.rm-legend-dot--ancestor {
  background: rgba(180,140,80,0.2); /* NOTE: 비브랜드 색상(amber) */
  border-color: rgba(180,140,80,0.4); /* NOTE: 비브랜드 색상(amber) */
  border-style: double;
  border-width: 2px;
}
.rm-legend-dot--release {
  background: rgba(80,180,120,0.12); /* NOTE: 비브랜드 색상(green) */
  border-color: rgba(80,180,120,0.35); /* NOTE: 비브랜드 색상(green) */
}
.rm-legend-dot--marketing {
  background: rgba(220,120,200,0.12); /* NOTE: 비브랜드 색상(pink) */
  border-color: rgba(220,120,200,0.3); /* NOTE: 비브랜드 색상(pink) */
}
.rm-legend-dot--investment {
  background: rgba(80,160,220,0.12); /* NOTE: 비브랜드 색상(blue) */
  border-color: rgba(80,160,220,0.35); /* NOTE: 비브랜드 색상(blue) */
}
.rm-legend-dot--research {
  background: rgba(200,180,100,0.12); /* NOTE: 비브랜드 색상(gold) */
  border-color: rgba(200,180,100,0.3); /* NOTE: 비브랜드 색상(gold) */
  border-style: dashed;
}
.rm-legend-line {
  width: 20px;
  height: 2px;
  background: var(--red-brand-half);
}

/* ── Row Year Labels ── */
.rm-row::before {
  content: attr(data-era);
  position: absolute;
  left: -110px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: var(--text-11);
  font-weight: 500;
  letter-spacing: var(--ls-ultra);
  text-transform: uppercase;
  color: rgba(255,255,255,0.2); /* NOTE: 0.2 토큰 없음 */
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  writing-mode: horizontal-tb;
  padding: 4px 0;
}
.rm-row.is-in-view::before {
  opacity: 1;
}

/* ── Row Separator Line ── */
.rm-row + .rm-row::after {
  content: '';
  position: absolute;
  top: -22px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent); /* NOTE: 0.05 토큰 없음 */
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .rm-row--double,
  .rm-row--triple {
    grid-template-columns: 1fr;
  }
  .rm-popup {
    width: 320px;
    padding: 20px;
  }
  .rm-popup--wide {
    width: 340px;
  }
  .rm-popup-grid {
    grid-template-columns: 1fr;
  }
  .rm-node {
    padding: 18px 20px;
  }
  .rm-node-title {
    font-size: var(--text-base);
  }
  .rm-node-desc {
    font-size: var(--text-13);
  }
  .rm-legend-items {
    gap: 12px;
  }
  .rm-row::before {
    display: none;
  }
  .rm-map {
    margin-left: 0;
  }
}

