:root {
  --bg: #070b16;
  --surface: #0d1323;
  --surface-2: #131a2e;
  --line: #1f2840;
  --text: #e6eaf3;
  --muted: #8a93ab;
  --faint: #59627a;
  --land: #172038;
  --land-line: #222d4a;
  --korea: #2a3a63;
  --out: #2dd4bf;
  --in: #f5a524;
  --co: #a78bfa;
  --term: #f87171;
  --accent: #2dd4bf;
  --glow: 1;
  --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef1f6;
  --surface: #ffffff;
  --surface-2: #f4f6fa;
  --line: #dfe4ec;
  --text: #141a2a;
  --muted: #5d6680;
  --faint: #98a0b5;
  --land: #dde3ee;
  --land-line: #ffffff;
  --korea: #b8c6e3;
  --out: #0d9488;
  --in: #d97706;
  --co: #7c3aed;
  --term: #dc2626;
  --accent: #0d9488;
  --glow: 0;
  --shadow: 0 12px 32px rgba(20, 30, 60, .14);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2 { margin: 0; }

#app {
  display: grid;
  grid-template-columns: 260px 1fr 340px;
  grid-template-rows: 64px 1fr 116px;
  grid-template-areas:
    "top top top"
    "filters map list"
    "filters tl list";
  height: 100vh;
  height: 100dvh;
}

/* ---------- 상단 ---------- */
.top {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.brand h1 { font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.brand .sub { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.kpis { display: flex; gap: 26px; margin-left: auto; }
.kpi { display: flex; flex-direction: column; align-items: flex-end; }
.kpi b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi span { color: var(--muted); font-size: 11.5px; }
.kpi .ratio { color: var(--in); }
.top-actions { display: flex; gap: 8px; }

.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 9px;
  font-size: 16px;
  transition: border-color .15s, background .15s;
}
.icon-btn:hover { border-color: var(--faint); }

/* ---------- 패널 공통 ---------- */
.panel { background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
}
.panel-head h2 { font-size: 13px; font-weight: 700; }
.muted { color: var(--muted); font-weight: 500; }
.link-btn { background: none; border: 0; color: var(--muted); font-size: 12px; padding: 0; }
.link-btn:hover { color: var(--text); }

/* ---------- 필터 ---------- */
.filters { grid-area: filters; border-right: 1px solid var(--line); overflow-y: auto; }
.f-group { padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.f-group:first-of-type { border-top: 0; }
.f-label { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; display: block; font-weight: 600; }
.f-label.row { display: flex; align-items: center; justify-content: space-between; }
#search {
  width: 100%; height: 34px; padding: 0 11px;
  border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: inherit;
  outline: none;
}
#search:focus { border-color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 12.5px;
  transition: opacity .15s, border-color .15s;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip .n { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chip.off { opacity: .38; }
.chip:hover { border-color: var(--faint); }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.seg button { border: 0; background: none; padding: 3px 9px; font-size: 11.5px; border-radius: 6px; color: var(--muted); }
.seg button.on { background: var(--bg); color: var(--text); }
:root[data-theme="light"] .seg button.on { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.range-wrap { position: relative; }
.hist { width: 100%; height: 44px; display: block; }
.hist rect { fill: var(--faint); opacity: .35; transition: opacity .15s, fill .15s; }
.hist rect.in { fill: var(--accent); opacity: .75; }
.dual { position: relative; height: 18px; margin-top: -4px; }
.dual input {
  position: absolute; inset: 0; width: 100%; margin: 0;
  -webkit-appearance: none; appearance: none; background: none; pointer-events: none;
}
.dual input::-webkit-slider-runnable-track { height: 2px; background: var(--line); }
.dual input::-moz-range-track { height: 2px; background: var(--line); }
.dual input::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto;
  width: 14px; height: 14px; margin-top: -6px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--accent); cursor: grab;
}
.dual input::-moz-range-thumb {
  pointer-events: auto; width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--accent); cursor: grab;
}
.range-text { display: flex; justify-content: space-between; font-size: 12px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.check { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--accent); }
.foot-note { margin: auto 0 0; padding: 14px 16px; color: var(--faint); font-size: 11.5px; line-height: 1.5; border-top: 1px solid var(--line); }

/* ---------- 지도 ---------- */
.map-wrap { grid-area: map; position: relative; overflow: hidden; background: var(--bg); }
#map { width: 100%; height: 100%; display: block; cursor: grab; }
#map:active { cursor: grabbing; }
.sphere { fill: var(--bg); }
.graticule { fill: none; stroke: var(--land-line); stroke-width: .5; opacity: .35; }
.land { fill: var(--land); stroke: var(--land-line); stroke-width: .5; }
.land.kr { fill: var(--korea); }
.land.far { opacity: .55; }
.land.prov { stroke: var(--bg); stroke-width: .8; vector-effect: non-scaling-stroke; }
[hidden] { display: none !important; }

.mode-tabs {
  position: absolute; left: 50%; top: 14px; z-index: 5; transform: translateX(-50%);
  display: inline-flex; padding: 3px; gap: 2px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 11px;
}
.mode-tabs button {
  border: 0; background: none; color: var(--muted);
  padding: 7px 13px; border-radius: 8px; font-size: 13px; font-weight: 650;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.mode-tabs button .n { font-weight: 500; font-size: 11.5px; margin-left: 3px; opacity: .75; font-variant-numeric: tabular-nums; }
.mode-tabs button:hover { color: var(--text); }
.mode-tabs button.on { background: var(--accent); color: var(--bg); }
.mode-tabs button.on .n { opacity: .85; }

.arc {
  fill: none;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  transition: opacity .25s, stroke-width .2s;
  pointer-events: none;
}
.arc.term { stroke-dasharray: 4 4; }
.arc-hit { fill: none; stroke: transparent; stroke-width: 14; vector-effect: non-scaling-stroke; pointer-events: stroke; cursor: pointer; }
.arcs.dim .arc { opacity: .08 !important; }
.arcs.dim .arc.hl { opacity: 1 !important; }
.arc.hl { filter: url(#glow); }
.flow {
  fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; pointer-events: none;
  stroke-width: 3.5;
  animation: flow 1.4s linear infinite;
}
@keyframes flow { to { stroke-dashoffset: 0; } }

.node { cursor: pointer; vector-effect: non-scaling-stroke; transition: opacity .25s; }
.node circle { stroke: var(--bg); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.node .q { font-size: 9px; font-weight: 800; fill: var(--bg); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.nodes.dim .node { opacity: .2; }
.nodes.dim .node.hl { opacity: 1; }
.hub-ring { fill: none; stroke: var(--accent); stroke-width: 1.2; vector-effect: non-scaling-stroke; opacity: .7; }
.hub-pulse { fill: none; stroke: var(--accent); vector-effect: non-scaling-stroke; animation: pulse 2.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { from { opacity: .55; transform: scale(1); } to { opacity: 0; transform: scale(3.2); } }
.label.pin { fill: var(--text); font-weight: 700; }
.label { font-size: 10.5px; fill: var(--muted); pointer-events: none; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; font-weight: 600; }

.legend {
  position: absolute; left: 14px; bottom: 12px;
  display: flex; gap: 14px; flex-wrap: wrap;
  padding: 8px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted);
}
.legend i { display: inline-block; width: 18px; height: 0; border-top: 2.5px solid; vertical-align: middle; margin-right: 6px; border-radius: 2px; }
.legend i.dash { border-top-style: dashed; }
.offmap {
  position: absolute; right: 14px; bottom: 12px;
  padding: 8px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line); font-size: 11.5px; color: var(--muted);
  cursor: help;
}
.zoom-ctl { position: absolute; right: 14px; top: 14px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- 목록 ---------- */
.list { grid-area: list; border-left: 1px solid var(--line); }
.deal-list { list-style: none; margin: 0; padding: 0 8px 12px; overflow-y: auto; flex: 1; }
.deal {
  display: grid; grid-template-columns: 3px 1fr auto; gap: 0 11px;
  padding: 10px 10px 10px 8px; border-radius: 10px; cursor: pointer;
  transition: background .12s;
}
.deal:hover, .deal.hl { background: var(--surface-2); }
.deal.pinned { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.deal .bar { grid-row: span 2; border-radius: 2px; }
.deal .who { font-weight: 650; font-size: 13px; line-height: 1.35; min-width: 0; }
.deal .who .arrow { color: var(--faint); margin: 0 4px; font-weight: 400; }
.deal .amt { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; white-space: nowrap; }
.deal .meta { color: var(--muted); font-size: 11.5px; grid-column: 2; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal .up { color: var(--muted); font-size: 11px; text-align: right; grid-column: 3; white-space: nowrap; }
.empty { color: var(--muted); padding: 30px 12px; text-align: center; line-height: 1.6; }

/* ---------- 타임라인 ---------- */
.timeline { grid-area: tl; border-top: 1px solid var(--line); background: var(--surface); position: relative; }
#tl { width: 100%; height: 100%; display: block; }
#tl .bar { transition: opacity .15s; }
#tl .axis text { fill: var(--muted); font-size: 10.5px; font-family: inherit; }
#tl .axis path, #tl .axis line { stroke: var(--line); }
#tl .selection { fill: var(--accent); fill-opacity: .08; stroke: var(--accent); stroke-opacity: .6; }
#tl .handle { fill: var(--accent); fill-opacity: .9; rx: 2; }
#tl .tl-hint { fill: var(--faint); font-size: 10.5px; }

/* ---------- 툴팁 ---------- */
.tip {
  position: fixed; z-index: 30; pointer-events: none;
  width: 300px; padding: 13px 14px 12px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0; transform: translateY(4px) scale(.98);
  transition: opacity .14s, transform .14s;
}
.tip.show { opacity: 1; transform: none; }
.tip .t-type { font-size: 11px; font-weight: 700; letter-spacing: .02em; display: flex; justify-content: space-between; }
.tip .t-type .d { color: var(--muted); font-weight: 500; }
.tip .t-who { font-size: 15px; font-weight: 750; margin: 6px 0 2px; line-height: 1.35; letter-spacing: -.01em; }
.tip .t-who small { color: var(--muted); font-weight: 500; font-size: 12px; }
.tip .t-asset { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.tip .t-more { color: var(--faint); font-size: 11px; margin-top: 9px; }
.money { margin-top: 11px; }
.money .track { height: 7px; border-radius: 4px; background: var(--line); overflow: hidden; display: flex; }
.money .track i { display: block; height: 100%; background: var(--in); min-width: 3px; border-radius: 4px; }
.money .nums { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.money .nums b { font-size: 13.5px; }
.money .nums span { color: var(--muted); font-size: 11px; display: block; }
.money .na { color: var(--muted); font-size: 12px; }
.multi .row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.multi .row:first-of-type { border-top: 0; }

/* ---------- 상세 패널 ---------- */
.detail {
  position: fixed; z-index: 20;
  left: 12px; top: 76px; width: 360px; max-height: calc(100vh - 210px);
  overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px 18px 18px;
  animation: slidein .22s ease-out;
}
@keyframes slidein { from { opacity: 0; transform: translateX(-12px); } }
.detail .close { position: absolute; right: 10px; top: 10px; border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; padding: 4px 8px; }
.detail h3 { margin: 8px 0 4px; font-size: 17px; line-height: 1.35; letter-spacing: -.01em; padding-right: 20px; }
.detail dl { display: grid; grid-template-columns: 74px 1fr; gap: 7px 10px; margin: 14px 0 0; font-size: 12.5px; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; line-height: 1.5; }
.detail .summary { margin: 12px 0 0; font-size: 13px; line-height: 1.6; color: var(--text); }
.detail .src { display: inline-flex; margin-top: 16px; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: 12.5px; font-weight: 600; }
.detail .src:hover { border-color: var(--accent); }
.hist-line { list-style: none; margin: 14px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.hist-line li { position: relative; font-size: 12px; padding: 3px 0; color: var(--muted); }
.hist-line li::before { content: ""; position: absolute; left: -19px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.hist-line li.cur { color: var(--text); font-weight: 600; }
.hist-line li.cur::before { background: var(--accent); }

.mobile-switch { display: none; }

@media (prefers-reduced-motion: reduce) {
  .flow, .hub-pulse { animation: none; }
  .tip, .arc, .detail { transition: none; animation: none; }
}

/* ---------- 좁은 화면 ---------- */
@media (max-width: 1180px) {
  #app { grid-template-columns: 230px 1fr 300px; }
  .detail { width: 330px; }
  .kpi:nth-child(n+4) { display: none; }
}
@media (max-width: 900px) {
  body { overflow: hidden; }
  #app {
    grid-template-columns: 1fr;
    grid-template-rows: 56px 1fr 92px 52px;
    grid-template-areas: "top" "map" "tl" "nav";
  }
  .top { gap: 12px; padding: 0 16px; }
  .brand .sub { display: none; }
  .kpis { gap: 14px; }
  .kpi b { font-size: 15px; }
  .kpi:nth-child(n+3) { display: none; }
  .filters, .list {
    grid-area: map; z-index: 10; border: 0;
    display: none;
  }
  #app[data-view="filters"] .filters, #app[data-view="list"] .list { display: flex; }
  .legend { left: 8px; right: 8px; bottom: 8px; gap: 10px; font-size: 11px; }
  .offmap { display: none; }
  .zoom-ctl { right: 8px; top: 8px; }
  .mode-tabs { top: 8px; }
  .mode-tabs button { padding: 6px 10px; font-size: 12.5px; }
  .mobile-switch {
    grid-area: nav; display: flex; border-top: 1px solid var(--line); background: var(--surface);
  }
  .mobile-switch button { flex: 1; border: 0; background: none; color: var(--muted); font-weight: 600; }
  .mobile-switch button.on { color: var(--accent); }
  .detail {
    left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 46vh;
    border-radius: 16px 16px 0 0; animation-name: sheet;
  }
  @keyframes sheet { from { transform: translateY(30px); opacity: 0; } }
  .tip { display: none; }
}

/* ---------- 2차: 차트 색 (지도 곡선보다 한 단계 깊은 색, 팔레트 검증 통과) ---------- */
:root {
  --c-out: #14a090; --c-in: #d97706; --c-co: #8b5cf6; --c-term: #ef4444;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
}
:root[data-theme="light"] {
  --c-out: #0d9488; --c-in: #d97706; --c-co: #7c3aed; --c-term: #dc2626;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948;
}

/* 타임라인 재생 */
.tl-ctl { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; z-index: 2; }
.tl-ctl .play {
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--accent); color: var(--bg); display: grid; place-items: center;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform .15s;
}
.tl-ctl .play:hover { transform: scale(1.06); }
.tl-ctl .play .i-pause { display: none; }
.tl-ctl .play.on .i-pause { display: block; }
.tl-ctl .play.on .i-play { display: none; }
.tl-ctl .mini { border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); border-radius: 6px; font-size: 11px; padding: 2px 7px; font-weight: 650; }
.tl-ctl .mini:hover { color: var(--text); }
.tl-ctl[hidden] { display: none !important; }
#tl .playhead { stroke: var(--text); stroke-width: 1.5; }
#tl .playhead-dot { fill: var(--text); }
#tl .play-date { fill: var(--text); font-size: 11px; font-weight: 700; }
.timeline.playing #tl .tl-hint { display: none; }

/* 추정 표시 */
.est { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 4px; font-size: 10.5px; font-weight: 650; color: var(--muted); border: 1px solid var(--line); vertical-align: 1px; }
.detail .note { margin: 12px 0 0; font-size: 11.5px; color: var(--faint); line-height: 1.5; }
.detail .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.detail .acts .src { margin-top: 0; }
.detail .acts button.src { background: none; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; }

/* 알림 */
.toast {
  position: fixed; left: 50%; bottom: 140px; z-index: 50; transform: translate(-50%, 10px);
  padding: 9px 16px; border-radius: 10px; background: var(--text); color: var(--bg);
  font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 통계 ---------- */
.map-wrap.is-stats #map, .map-wrap.is-stats .legend, .map-wrap.is-stats .zoom-ctl, .map-wrap.is-stats .offmap { visibility: hidden; }
.stats {
  position: absolute; inset: 0; overflow-y: auto; background: var(--bg);
  padding: 68px 22px 28px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-content: start;
  animation: fadein .3s ease-out;
}
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 14px; min-width: 0; }
.card.wide { grid-column: 1 / -1; }
.card h3 { margin: 0; font-size: 14px; font-weight: 750; letter-spacing: -.01em; }
.card .sub { margin: 3px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.card .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card svg { display: block; width: 100%; overflow: visible; }
.card .axis text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.card .axis path, .card .axis line { stroke: var(--line); }
.card .grid line { stroke: var(--line); stroke-dasharray: 2 3; }
.card .grid path { display: none; }
.card .val { fill: var(--text); font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.card .val.muted { fill: var(--muted); font-weight: 500; }
.card .name { fill: var(--text); font-size: 12px; }
.card .hit { fill: transparent; cursor: pointer; }
.card .mark { transition: opacity .15s; }
.card svg.hovering .mark { opacity: .35; }
.card svg.hovering .mark.on { opacity: 1; }
.lgd { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 8px; font-size: 11.5px; color: var(--muted); }
.lgd i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.hero { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 4px; }
.hero b { font-size: 34px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero span { color: var(--muted); font-size: 12.5px; }
.term-list { list-style: none; margin: 10px 0 0; padding: 0; max-height: 210px; overflow-y: auto; }
.term-list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 4px; border-top: 1px solid var(--line); font-size: 12.5px; cursor: pointer; border-radius: 6px; }
.term-list li:hover { background: var(--surface-2); }
.term-list li span:last-child { color: var(--muted); white-space: nowrap; }
.stats .empty-card { color: var(--muted); font-size: 13px; padding: 30px 0; text-align: center; }

@media (max-width: 1180px) { .stats { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .stats { padding: 58px 12px 20px; }
  .tl-ctl { left: 8px; }
  .toast { bottom: 160px; }
}

/* 새 계약 */
.node .new-ring { fill: none; stroke: var(--text); stroke-width: 1.6; vector-effect: non-scaling-stroke;
  transform-box: fill-box; transform-origin: center; animation: pulse 1.8s ease-out infinite; pointer-events: none; }
.new-badge { display: inline-block; margin-right: 6px; padding: 0 5px; border-radius: 4px; font-size: 9.5px; font-weight: 800;
  letter-spacing: .04em; color: var(--bg); background: var(--accent); vertical-align: 1px; }
.node .hit-area { fill: transparent; stroke: none; }
