/* KW PRO · 122630 통합 웹 터미널 공통 스타일시트 (kw.css) */
:root {
  color-scheme: dark;
  --bg-main: #131722;
  --bg-panel: #1e222d;
  --bg-sub: #181c27;
  --bg-hover: #2a2e39;
  --border: #2a2e39;
  --border-light: #363a45;
  --text-main: #d1d4dc;
  --text-sub: #868993;
  --text-muted: #5d606b;
  --accent: #2962ff;
  --accent-hover: #1e53e5;
  --up: #f23645;
  --up-bg: rgba(242, 54, 69, 0.14);
  --dn: #2962ff;
  --dn-bg: rgba(41, 98, 255, 0.14);
  --ok: #089981;
  --ok-bg: rgba(8, 153, 129, 0.15);
  --warn: #f59e0b;
  --warn-bg: rgba(245, 158, 11, 0.15);
  --font-sans: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: thin;
  scrollbar-color: rgba(71, 85, 105, 0.72) #0f141f;
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(71, 85, 105, 0.72) #0f141f;
}

::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 7px;
  height: 7px;
  background: #0f141f;
}

::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
  background: #0f141f;
}

::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.72);
  border-radius: 4px;
  border: 1px solid #0f141f;
}

::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.95);
}

::-webkit-scrollbar-button,
*::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner,
::-webkit-resizer,
*::-webkit-resizer {
  background: #0f141f;
}

html,
body {
  color-scheme: dark;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.4;
  word-break: keep-all;
  overflow-x: hidden;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.mono-fix {
  display: inline-block;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: pre;
  text-align: right;
}

/* [TODO-94] 표준 공용 고정폭 숫자 슬롯 유틸리티 (0px 좌우떨림 · 고정 폰트 · 초과값 오버플로 정책) */
.num-price,
.num-pct,
.num-krw,
.num-cnt,
.num-time {
  display: inline-block;
  box-sizing: border-box;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
.num-price {
  width: 10ch;
  min-width: 10ch;
  max-width: min(10ch, 100%);
}
.num-pct {
  width: 8.5ch;
  min-width: 8.5ch;
  max-width: min(8.5ch, 100%);
}
.num-krw {
  width: 12ch;
  min-width: 12ch;
  max-width: min(12ch, 100%);
}
.num-cnt {
  width: 5ch;
  min-width: 5ch;
  max-width: min(5ch, 100%);
}
.num-time {
  width: 8.5ch;
  min-width: 8.5ch;
  max-width: min(8.5ch, 100%);
}

/* 모바일·협폭 안전 가로 스크롤 래퍼 (내부 표·배지 min-width 컬럼 뭉개짐 방지) */
.kw-scroll-x-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

/* 자동매매 KPI 고정 트랙 2열 행 (인접 숫자 좌우 흔들림 원천 차단) */
.at-kpi-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.at-kpi-row > :first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.up { color: var(--up) !important; }
.dn { color: var(--dn) !important; }
.ok { color: var(--ok) !important; }
.warn { color: var(--warn) !important; }
.muted { color: var(--text-sub) !important; }

/* 상단 고정 네비게이션 바 (아래 컨트롤 스트립·패널과 좌우 여백 및 정렬 100% 일치) */
.topbar-shell {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-main);
  max-width: 1920px;
  margin: 0 auto;
  padding: 8px 8px 0 8px;
}

.topbar {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  min-height: 42px;
  gap: 10px;
}

.top-nav-toggle-btn {
  height: 24px;
  padding: 0 8px;
  border-radius: 3px;
  border: 1px solid rgba(56, 189, 248, 0.52);
  background: rgba(15, 23, 42, 0.92);
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex-shrink: 0;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.top-nav-toggle-btn:hover {
  border-color: rgba(125, 211, 252, 0.85);
  background: rgba(30, 41, 59, 0.95);
}

.topbar-shell.nav-collapsed .nav-tabs {
  display: none !important;
}
.topbar-shell.nav-collapsed .topbar {
  min-height: 35px;
  padding: 4px 8px;
  flex-wrap: nowrap !important;
  gap: 6px;
}
.topbar-shell.nav-collapsed .top-nav-toggle-btn {
  border-color: rgba(52, 211, 153, 0.65);
  color: #a7f3d0;
  background: rgba(6, 78, 59, 0.28);
}
@media (max-width: 768px) {
  .topbar-shell.nav-collapsed {
    padding: 3px 4px 0 4px;
  }
  .topbar-shell.nav-collapsed .brand-group {
    flex: 1 1 auto;
    min-width: 0;
    gap: 5px;
  }
  .topbar-shell.nav-collapsed .top-status {
    flex-wrap: nowrap !important;
    flex-shrink: 0;
    gap: 4px;
  }
  .topbar-shell.nav-collapsed .top-price {
    font-size: 13px;
  }
}
@media (max-width: 480px) {
  .topbar-shell.nav-collapsed .symbol-title {
    display: none;
  }
  .top-nav-toggle-btn {
    height: 23px;
    padding: 0 7px;
    font-size: 10.5px;
  }
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
}

.symbol-badge {
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.3px;
}

.symbol-title {
  font-weight: 700;
  font-size: 13.5px;
  color: #fff;
}

.top-price {
  display: inline-block;
  width: 10ch;
  min-width: 10ch;
  max-width: min(10ch, 100%);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-weight: 800;
  font-size: 14px;
  color: var(--up);
  margin-left: 2px;
}

.nav-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  height: 100%;
  gap: 5px;
  margin-right: auto;
  margin-left: 4px;
}

.nav-tab {
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 11px;
  border-radius: 3px;
  border: 1px solid rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
}

.nav-tab:hover {
  background: rgba(245, 158, 11, 0.30);
  border-color: #fbbf24;
  color: #fff;
}

.nav-tab.active {
  background: rgba(245, 158, 11, 0.38);
  border-color: #fbbf24;
  color: #fff;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.25);
}

.top-status {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border-light);
  background: var(--bg-sub);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-pill.live {
  border-color: rgba(8, 153, 129, 0.5);
  background: var(--ok-bg);
  color: #34d399;
}
.status-pill.live .status-dot {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.status-pill.dry {
  border-color: rgba(245, 158, 11, 0.5);
  background: var(--warn-bg);
  color: #fbbf24;
}
.status-pill.dry .status-dot {
  background: #f59e0b;
}

/* 풍선 도움말 (Tooltip) */
[data-tip] {
  position: relative;
  cursor: help;
}

[data-tip]:has(.tip-q) {
  cursor: inherit;
}

.tip-q {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #2a2e39;
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 800;
  margin-left: 4px;
  vertical-align: middle;
  cursor: help;
  user-select: none;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.tip-q:hover,
.tip-q:active {
  background: rgba(56, 189, 248, 0.24);
  border-color: rgba(56, 189, 248, 0.68);
  color: #7dd3fc;
}

@media (hover: none) {
  .tip-q::before {
    content: "";
    position: absolute;
    inset: -7px;
  }
}

#floatingTooltip {
  position: fixed;
  z-index: 9999;
  max-width: min(390px, 92vw);
  background: rgba(11, 14, 22, 0.97);
  color: #e2e8f0;
  border: 1px solid rgba(56, 189, 248, 0.55);
  border-radius: 5px;
  padding: 7px 10px;
  font-size: 11.5px;
  line-height: 1.48;
  white-space: pre-line;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.72);
  pointer-events: none;
  display: none;
}

#floatingTooltip.tip-wide {
  max-width: min(620px, 95vw);
  max-height: min(84vh, 700px);
  overflow-y: auto;
  padding: 9px 12px;
  font-size: 11.4px;
  line-height: 1.52;
}

@media (hover: none) {
  #floatingTooltip.tip-wide {
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* 탭 컨테이너 */
.tab-pane {
  display: none;
  padding: 8px;
  max-width: 1920px;
  margin: 0 auto;
}
.tab-pane.active {
  display: block;
}

/* 공통 패널 및 그리드 (1px 크리스프 테두리) */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  margin-bottom: 8px;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: var(--bg-sub);
  border-bottom: 1px solid var(--border);
  gap: 8px;
  flex-wrap: wrap;
}

.panel-title {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.panel-body {
  padding: 8px 10px;
}

/* 버튼 및 폼 컨트롤 */
.btn-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.btn, .btn.primary, .btn.danger, .btn.success, .btn.warn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border-radius: 3px;
  border: 1px solid rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
}

.btn:hover, .btn.primary:hover, .btn.danger:hover, .btn.success:hover, .btn.warn-btn:hover {
  background: rgba(245, 158, 11, 0.30);
  border-color: #fbbf24;
  color: #fff;
}

.btn.active {
  background: rgba(245, 158, 11, 0.38);
  border-color: #fbbf24;
  color: #fff;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.25);
}

.btn:active, .nav-tab:active {
  transform: scale(0.95);
  background: rgba(245, 158, 11, 0.55) !important;
  border-color: #fff !important;
  color: #fff !important;
}

.btn:disabled, .btn.busy {
  opacity: 0.65;
  cursor: wait;
  background: rgba(245, 158, 11, 0.35) !important;
  border-color: #fbbf24 !important;
  color: #fff !important;
}

#cmdToast {
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  max-width: 92vw;
  background: rgba(245, 158, 11, 0.95);
  color: #0b0e14;
  font-size: 12.5px;
  font-weight: 800;
  padding: 7px 16px;
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  display: none;
  pointer-events: none;
  white-space: normal;
  text-align: center;
  line-height: 1.35;
}

.btn-sm {
  height: 24px;
  padding: 0 7px;
  font-size: 11px;
}

select.ctrl, input.ctrl, textarea.ctrl {
  height: 28px;
  padding: 0 7px;
  border-radius: 3px;
  border: 1px solid #334155;
  background: #131b2b;
  color: #e2e8f0;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  outline: none;
  color-scheme: dark;
  transition: border-color 0.15s ease, background 0.15s ease;
}

select.ctrl:focus, input.ctrl:focus, textarea.ctrl:focus {
  border-color: #60a5fa;
  background: #172236;
  color: #ffffff;
}

input.ctrl::placeholder, textarea.ctrl::placeholder {
  color: #64748b;
  font-weight: 400;
}

input.ctrl-num {
  width: 54px;
  text-align: center;
  font-family: var(--font-mono);
}

/* KPI 카드 그리드 */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.kpi-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.kpi-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 8px 10px;
  min-width: 0;
}

.kpi-label {
  font-size: 11px;
  color: var(--text-sub);
  font-weight: 600;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-sub {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  color: var(--text-sub);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 고밀도 데이터 테이블 */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.pro-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  white-space: nowrap;
}

table.pro-table th {
  background: var(--bg-sub);
  color: var(--text-sub);
  font-weight: 700;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  position: sticky;
  top: 0;
  z-index: 2;
}

table.pro-table td {
  padding: 5px 8px;
  border-bottom: 1px solid rgba(42, 46, 57, 0.6);
  text-align: right;
  font-family: var(--font-mono);
}

table.pro-table th.left, table.pro-table td.left { text-align: left; font-family: var(--font-sans); }
table.pro-table th.center, table.pro-table td.center { text-align: center; }

table.pro-table tbody tr:hover {
  background: rgba(41, 98, 255, 0.08);
  cursor: pointer;
}

table.pro-table tbody tr.selected-row {
  background: rgba(41, 98, 255, 0.18);
}

/* 터미널 로그 박스 */
.terminal-box {
  background: #0b0e14;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: #cbd5e1;
  max-height: 340px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* 3.자동매매 실시간 콘솔 로그 전용 높이 확장 및 PC/모바일 반응형 가독성 */
#atLogBox {
  min-height: 360px;
  height: clamp(520px, 64vh, 780px);
  max-height: none;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.52;
  resize: vertical;
  word-break: keep-all;
  overflow-wrap: anywhere;
  overscroll-behavior: contain;
}

@media (max-width: 768px) {
  #atLogBox {
    min-height: 320px;
    height: clamp(440px, 60vh, 660px);
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.48;
  }
}

@media (max-width: 480px) {
  #atLogBox {
    min-height: 300px;
    height: clamp(400px, 58vh, 580px);
    padding: 8px;
    font-size: 10.5px;
    line-height: 1.45;
  }
}

/* 차트 3분할 레이아웃 */
.chart-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.chart-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.chart-head {
  display: grid;
  grid-template-columns: minmax(118px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  height: 29px;
  padding: 0 8px;
  background: var(--bg-sub);
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
  overflow: hidden;
}
.chart-head > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chart-replay-dock {
  position: sticky;
  top: 0;
  z-index: 26;
  background: rgba(11, 16, 28, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(56, 189, 248, 0.34);
  border-radius: 4px;
  padding: 5px 9px;
  margin-bottom: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.dock-pos-badge {
  display: inline-grid;
  grid-template-columns: 98px 142px 146px 110px;
  column-gap: 4px;
  align-items: center;
  width: 508px;
  min-width: 508px;
  max-width: 508px;
  height: 24px;
  padding: 0 6px;
  border-radius: 3px;
  background: rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(71, 85, 105, 0.42);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-size: 10.5px;
  font-weight: 600;
  white-space: pre;
  overflow: hidden;
  box-sizing: border-box;
}
.dock-pos-badge.is-idle {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  text-align: right;
  white-space: pre;
}
@media (max-width: 960px) {
  .dock-pos-badge {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
    grid-template-columns: auto 1fr;
    row-gap: 2px;
  }
}
.tick-stream-wrap {
  max-width: 100%;
  overflow-y: hidden !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}
table.pro-table.tick-stream-fixed-table {
  table-layout: fixed !important;
  width: 100%;
  min-width: 650px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
table.pro-table.tick-stream-fixed-table td {
  white-space: pre;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
table.pro-table.tick-stream-fixed-table th,
table.pro-table.tick-stream-fixed-table td {
  height: 22px;
  line-height: 22px;
  padding: 0 6px;
  white-space: pre;
  overflow: hidden;
  text-overflow: clip;
  vertical-align: middle;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.tick-dir-grid {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  white-space: pre;
}
.tick-dir-grid > .td-sym {
  text-align: center;
}
.tick-dir-grid > .td-num {
  text-align: right;
}
.tick-hold-grid {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 62px;
  column-gap: 3px;
  align-items: center;
  width: 100%;
  white-space: pre;
}
.tick-hold-grid > .th-tag {
  text-align: left;
  overflow: hidden;
}
.tick-hold-grid > .th-pct {
  text-align: right;
}
.tick-hold-grid > .th-won {
  text-align: right;
}
.reg-hud-metrics-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-top: 5px;
  min-height: 20px;
  align-items: center;
  font-size: 11px;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
}
.reg-hud-metrics-grid > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 1280px) {
  .reg-hud-metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 235px;
  background: var(--bg-main);
}

canvas.candle-cv {
  width: 100%;
  height: 100%;
  display: block;
}

/* 컨트롤 바 (콤팩트 플렉스) */
.ctrl-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  margin-bottom: 8px;
}

.ctrl-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.ctrl-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  white-space: nowrap;
}

/* 날짜 칩 */
.date-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid var(--border-light);
  background: var(--bg-main);
  color: var(--text-sub);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  user-select: none;
}
.date-chip.checked {
  border-color: rgba(245, 158, 11, 0.65);
  background: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
  font-weight: 700;
}

/* 진행률 바 */
.prog-track {
  width: 100%;
  height: 8px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.prog-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.25s ease;
}

/* 2단 분할 레이아웃 */
.split-2 {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
}

/* 2.차트검증 (v10 전체 기능 통합 스타일) */
.chart-grid-3.layout-stack {
  grid-template-columns: 1fr;
}
.chart-canvas-wrap {
  height: 330px;
}
.chart-grid-3.layout-stack .chart-canvas-wrap {
  height: 280px;
}
.chart-box .chart-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  height: 25px;
  min-height: 25px;
  padding: 0 7px;
  background: rgba(15, 23, 42, 0.24);
  border-bottom: 1px solid rgba(51, 65, 85, 0.42);
  font-size: 10.5px;
  font-weight: 500;
}
.chart-head-title {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  font-weight: 600;
  white-space: nowrap;
}
.hdr-bar-info {
  display: inline-block;
  width: 16.5ch;
  min-width: 16.5ch;
  margin-left: 3px;
  white-space: pre;
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.hdr-bar-sc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  font-size: 10px;
  font-weight: 500;
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.hdr-bar-sc b {
  font-weight: 600;
}
.hdr-sc-badge {
  display: inline-block;
  width: 104px;
  min-width: 104px;
  max-width: 104px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-bar-status {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  margin-left: auto;
  width: 162px;
  min-width: 162px;
  max-width: 162px;
  height: 19px;
  font-size: 9.8px;
  padding: 0 5px;
  border-radius: 3px;
  background: rgba(245, 158, 11, 0.08);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.26);
  font-weight: 500;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.ohlc-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  height: 23px;
  min-height: 23px;
  gap: 8px;
  padding: 0 7px;
  background: rgba(15, 23, 42, 0.18);
  border-bottom: 1px solid rgba(51, 65, 85, 0.38);
  font-size: 10px;
  font-weight: 500;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  color: #94a3b8;
  white-space: pre;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.ohlc-strip::-webkit-scrollbar {
  display: none;
}
.ohlc-cell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  gap: 2px;
  background: transparent;
  padding: 0;
  border: none;
  white-space: pre;
}
.ohlc-strip b {
  color: var(--text-main);
  font-weight: 600;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: pre;
}
.chart-bar-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  display: none;
  width: 212px;
  min-width: 192px;
  max-width: min(220px, 88vw);
  background: rgba(8, 13, 24, 0.38);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(125, 211, 252, 0.36);
  border-radius: 6px;
  padding: 4px 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
  font-size: 9.4px;
  color: #f8fafc;
  text-shadow: 0 1px 2px rgba(2, 6, 14, 0.98), 0 0 4px rgba(2, 6, 14, 0.88);
  line-height: 1.24;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.chart-bar-tooltip.is-ribbon-mode {
  background: rgba(8, 13, 24, 0.44);
  font-size: 9.5px;
  border-color: rgba(56, 189, 248, 0.52);
}
.chart-bar-tooltip .tt-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding-bottom: 2px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.26);
  font-weight: 800;
  font-size: 9.8px;
  color: #7dd3fc;
  white-space: nowrap;
}
.chart-bar-tooltip .tt-grid {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  column-gap: 5px;
  row-gap: 1px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.chart-bar-tooltip .tt-lbl {
  color: #cbd5e1;
  font-family: var(--font-sans);
  font-weight: 600;
  white-space: nowrap;
}
.chart-bar-tooltip .tt-val {
  text-align: right;
  font-weight: 700;
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chart-bar-tooltip .tt-val.tt-wrap {
  text-align: left;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.28;
}
.chart-bar-tooltip .tt-foot {
  margin-top: 3px;
  padding-top: 2px;
  border-top: 1px dashed rgba(148, 163, 184, 0.26);
  color: #fde68a;
  font-weight: 700;
  font-size: 8.6px;
  text-align: center;
}
.opt-daily-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 5px 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  margin-bottom: 8px;
}
.day-ret-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #162032;
  border: 1px solid #334155;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.day-ret-pill:hover {
  border-color: #60a5fa;
  background: #1e293b;
}
.day-ret-pill.active-test-day {
  border: 1.5px solid #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}
/* 실시간 적응형 vs 기존 고정 3자 비교 보드 스타일 */
.compare-live-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 8px;
}
.compare-live-box {
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  background: rgba(15, 23, 42, 0.65);
}
.compare-live-box.adaptive-box {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.07);
}
.compare-live-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 12px;
}
.compare-live-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11.5px;
}
.compare-3way-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.compare-4way-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 1360px) {
  .compare-4way-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.gs-ctrl-box {
  background: linear-gradient(180deg, rgba(6, 78, 59, 0.24) 0%, rgba(15, 23, 42, 0.88) 100%);
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 4px;
  padding: 7px 10px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.compare-card {
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  background: rgba(15, 23, 42, 0.65);
  cursor: pointer;
  transition: all 0.14s ease;
  min-width: 0;
}
.compare-card:hover {
  border-color: #60a5fa;
  background: rgba(30, 41, 59, 0.85);
}
.compare-card.active {
  border: 1.5px solid #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.18);
}
.compare-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.compare-card-title {
  font-size: 12px;
  font-weight: 800;
  color: #f8fafc;
}
.compare-card-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.compare-card-ret {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}
.rounds-board {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.rounds-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.rounds-title {
  font-size: 12px;
  font-weight: 800;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.round-cnt-badge {
  background: rgba(59, 130, 246, 0.22);
  border: 1px solid rgba(59, 130, 246, 0.55);
  color: #93c5fd;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
}
.eod-rule-badge {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.sl-rule-badge {
  background: rgba(244, 63, 94, 0.18);
  border: 1px solid rgba(244, 63, 94, 0.55);
  color: #fda4af;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
}
.round-focus-badge {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.6);
  color: #6ee7b7;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
}
.rounds-strip {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 3px;
}
.round-card {
  width: 266px;
  min-width: 266px;
  max-width: 266px;
  min-height: 62px;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(71, 85, 105, 0.45);
  border-radius: 4px;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-size: 10.5px;
  font-weight: 500;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.round-card.active-hold {
  border-color: rgba(16, 185, 129, 0.75);
  background: rgba(16, 185, 129, 0.10);
  box-shadow: inset 0 0 0 0.5px rgba(16, 185, 129, 0.55);
}
.round-card.latest-done {
  border-color: rgba(56, 189, 248, 0.65);
  background: rgba(56, 189, 248, 0.08);
  box-shadow: none;
}
.round-live-row1 {
  display: grid;
  grid-template-columns: 46px 1fr 86px;
  column-gap: 4px;
  align-items: center;
  font-weight: 600;
  white-space: pre;
}
.round-live-row2 {
  display: grid;
  grid-template-columns: 88px 88px 1fr;
  column-gap: 4px;
  align-items: center;
  color: #cbd5e1;
  font-size: 9.8px;
  margin-top: 1px;
  white-space: pre;
}
.round-card.eod-closed {
  border-color: rgba(245, 158, 11, 0.52);
}
.round-card.sl-closed {
  border-color: rgba(244, 63, 94, 0.58);
  background: rgba(136, 19, 55, 0.10);
}
.round-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.42);
  padding-bottom: 2px;
}
.round-no {
  font-weight: 600;
  font-size: 11px;
  color: #f1f5f9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.round-side-lbl {
  display: inline-block;
  width: 68px;
  min-width: 68px;
  white-space: nowrap;
}
.round-line {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  cursor: pointer;
  padding: 1px 2px;
  border-radius: 3px;
}
.round-line:hover {
  background: rgba(59, 130, 246, 0.18);
}
tr.active-hold-row {
  background: rgba(16, 185, 129, 0.18) !important;
  outline: 1px solid rgba(16, 185, 129, 0.65);
}
tr.latest-done-row {
  background: rgba(56, 189, 248, 0.13) !important;
  outline: 1px solid rgba(56, 189, 248, 0.5);
}
.sig-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 700;
  text-align: center;
  min-width: 52px;
}
.sig-pill.buy {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.45);
}
.sig-pill.sell {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.45);
}
.sig-pill.stoploss {
  background: rgba(244, 63, 94, 0.24);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.65);
}
.sig-pill.eod {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.45);
}
.sig-pill.wait {
  background: rgba(100, 116, 139, 0.16);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}
.legend-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-sub);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.legend-box {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

/* 스마트폰·태블릿 반응형 최적화 (<= 960px & <= 640px) */
@media (max-width: 960px) {
  .kpi-grid, .kpi-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .chart-grid-3 {
    grid-template-columns: 1fr;
  }
  .split-2 {
    grid-template-columns: 1fr;
  }
  .compare-live-grid {
    grid-template-columns: 1fr;
  }
  .compare-3way-grid, .compare-4way-grid {
    grid-template-columns: 1fr;
  }
  .panel-title {
    white-space: normal;
    word-break: keep-all;
    line-height: 1.35;
  }
  .topbar {
    height: auto;
    flex-wrap: wrap;
    padding: 6px 8px;
  }
  .nav-tabs {
    order: 3;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 4px;
    gap: 4px;
  }
  .nav-tab {
    flex: 1;
    min-width: 0;
    justify-content: center;
    padding: 6px 2px;
    font-size: 11.5px;
  }
}

@media (max-width: 640px) {
  .topbar-shell {
    padding: 6px 6px 0 6px;
  }
  .tab-pane {
    padding: 6px;
  }
  .ctrl-strip {
    padding: 6px 8px;
    gap: 6px;
  }
  .ctrl-group {
    width: 100%;
    min-width: 0 !important;
    justify-content: flex-start !important;
  }
  .btn-row {
    width: 100%;
    gap: 5px;
  }
  .btn, .btn.primary, .btn.danger, .btn.success, .btn.warn-btn, .btn.ok-btn {
    max-width: 100%;
    height: auto;
    min-height: 28px;
    padding: 5px 8px;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
  }
  .btn-sm {
    min-height: 26px;
    padding: 4px 7px;
    font-size: 11px;
  }
  #pane_trade > .ctrl-strip .btn-row .btn,
  .compare-card .btn-row .btn {
    flex: 1 1 calc(50% - 4px);
  }
  #selRankedCase {
    max-width: 100% !important;
    width: 100%;
  }
  .kpi-card {
    padding: 7px 8px;
  }
  .kpi-val {
    font-size: 13.5px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.25;
  }
  .kpi-sub {
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
  }
  .ohlc-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .chart-canvas-wrap {
    height: 250px;
  }
  .compare-live-metrics {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  #lblReplayTime {
    width: min(19.5ch, 100%) !important;
    min-width: min(19.5ch, 100%) !important;
    max-width: min(19.5ch, 100%) !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }
}

/* 5.대화기록 탭 (AI 대화 100% 원문 시간순 뷰어) */
.chat-layout {
  display: grid;
  grid-template-columns: 295px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}
.chat-sidebar-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  position: sticky;
  top: 52px;
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}
.chat-side-scroll {
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-nav-item {
  padding: 7px 9px;
  border-radius: 4px;
  border: 1px solid rgba(51, 65, 85, 0.55);
  background: rgba(15, 23, 42, 0.65);
  cursor: pointer;
  transition: all 0.12s ease;
}
.chat-nav-item:hover {
  border-color: #60a5fa;
  background: rgba(30, 41, 59, 0.85);
}
.chat-nav-item.active {
  border-color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.18);
}
.chat-msg-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-msg-card {
  border-radius: 5px;
  border: 1px solid var(--border-light);
  background: #141924;
  overflow: hidden;
}
.chat-msg-card.role-user {
  border-left: 3px solid #f59e0b;
  background: rgba(30, 27, 20, 0.78);
}
.chat-msg-card.role-assistant {
  border-left: 3px solid #38bdf8;
  background: rgba(15, 23, 38, 0.82);
}
.chat-msg-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(9, 13, 22, 0.65);
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  font-size: 11.5px;
}
.chat-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 3px;
  font-weight: 800;
  font-size: 11px;
}
.chat-role-badge.user {
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(245, 158, 11, 0.55);
  color: #fcd34d;
}
.chat-role-badge.assistant {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #7dd3fc;
}
.chat-raw-pre {
  margin: 0;
  padding: 10px 12px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.62;
  color: #e2e8f0;
}
.chat-md-body {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.65;
  color: #e2e8f0;
  word-break: break-word;
  overflow-x: auto;
}
.chat-md-body h1, .chat-md-body h2, .chat-md-body h3, .chat-md-body h4 {
  color: #f8fafc;
  margin: 10px 0 6px;
  line-height: 1.35;
}
.chat-md-body h1 { font-size: 16px; border-bottom: 1px solid #334155; padding-bottom: 4px; }
.chat-md-body h2 { font-size: 14.5px; border-bottom: 1px solid rgba(51,65,85,0.6); padding-bottom: 3px; }
.chat-md-body h3 { font-size: 13.5px; color: #93c5fd; }
.chat-md-body p { margin: 5px 0; }
.chat-md-body ul, .chat-md-body ol { margin: 4px 0 6px 20px; }
.chat-md-body li { margin: 2px 0; }
.chat-md-body code.inline-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(71, 85, 105, 0.65);
  color: #fde68a;
  padding: 1px 5px;
  border-radius: 3px;
}
.chat-md-body pre.code-block {
  margin: 7px 0;
  padding: 9px 11px;
  background: #090d16;
  border: 1px solid #2a3446;
  border-radius: 4px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: #cbd5e1;
  white-space: pre;
}
.chat-md-body blockquote {
  margin: 6px 0;
  padding: 6px 10px;
  border-left: 3px solid #38bdf8;
  background: rgba(15, 23, 42, 0.75);
  color: #cbd5e1;
}
.chat-md-body table.md-tbl {
  width: 100%;
  border-collapse: collapse;
  margin: 7px 0;
  font-size: 11.5px;
}
.chat-md-body table.md-tbl th,
.chat-md-body table.md-tbl td {
  border: 1px solid #334155;
  padding: 5px 8px;
  text-align: left;
}
.chat-md-body table.md-tbl th {
  background: #162032;
  color: #93c5fd;
  font-weight: 700;
}
mark.chat-hl {
  background: #f59e0b;
  color: #090d16;
  font-weight: 800;
  padding: 0 2px;
  border-radius: 2px;
}
@media (max-width: 960px) {
  .chat-layout {
    grid-template-columns: 1fr;
  }
  .chat-sidebar-box {
    position: static;
    max-height: 260px;
  }
}

/* ===== 오늘 할 일(Daily Ops) & AI 스케줄러 큐 전용 스타일 ===== */
.ops-st-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}
@keyframes opsPulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.82); }
}
.ops-st-DONE { background: rgba(16,185,129,0.18); border: 1px solid rgba(16,185,129,0.5); color: #34d399; }
.ops-st-RUNNING {
  background: rgba(56,189,248,0.22);
  border: 1px solid rgba(56,189,248,0.75);
  color: #38bdf8;
  box-shadow: 0 0 8px rgba(56,189,248,0.22);
  gap: 4px;
}
.ops-st-RUNNING::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  animation: opsPulseDot 1.1s ease-in-out infinite;
}
.ops-st-PENDING { background: rgba(148,163,184,0.14); border: 1px solid rgba(148,163,184,0.35); color: #cbd5e1; }
.ops-st-FAILED { background: rgba(242,54,69,0.20); border: 1px solid rgba(242,54,69,0.55); color: #f87171; }
.ops-st-SKIPPED, .ops-st-CANCELLED { background: rgba(100,116,139,0.18); border: 1px solid rgba(100,116,139,0.4); color: #94a3b8; }
tr.ops-row-running td { background: rgba(56,189,248,0.06); }

.ops-cat-pill {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid rgba(148,163,184,0.3);
  background: rgba(30,41,59,0.6);
  color: #e2e8f0;
}
.ops-cat-장전준비 { border-color: rgba(45,212,191,0.45); background: rgba(45,212,191,0.14); color: #5eead4; }
.ops-cat-데이터수집 { border-color: rgba(56,189,248,0.45); background: rgba(56,189,248,0.14); color: #7dd3fc; }
.ops-cat-자동매매, .ops-cat-전략·실전엔진 { border-color: rgba(16,185,129,0.45); background: rgba(16,185,129,0.14); color: #6ee7b7; }
.ops-cat-매매일지, .ops-cat-장후지속점검 { border-color: rgba(245,158,11,0.45); background: rgba(245,158,11,0.14); color: #fcd34d; }
.ops-cat-AI분석레포트, .ops-cat-AI할일, .ops-cat-전략검증 { border-color: rgba(168,85,247,0.45); background: rgba(168,85,247,0.14); color: #d8b4fe; }
.ops-cat-대화·복기관리, .ops-cat-웹UI·모듈화, .ops-cat-코드점검 { border-color: rgba(96,165,250,0.45); background: rgba(96,165,250,0.14); color: #93c5fd; }

.ops-auto-btn {
  height: 23px !important;
  padding: 0 8px !important;
  font-size: 10.5px !important;
}
.ops-auto-btn.on {
  background: rgba(16,185,129,0.22) !important;
  border-color: rgba(16,185,129,0.65) !important;
  color: #6ee7b7 !important;
}
.ops-auto-btn.off {
  background: rgba(100,116,139,0.18) !important;
  border-color: rgba(100,116,139,0.45) !important;
  color: #94a3b8 !important;
}

.ops-todo-form {
  display: grid;
  grid-template-columns: 110px 180px 125px 1fr auto;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.ops-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(5, 8, 15, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.ops-modal-box {
  width: min(1460px, 98vw);
  max-height: 90vh;
  background: #0f172a;
  border: 1px solid #475569;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}
.ops-exec-pill {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.3;
  white-space: normal;
  word-break: keep-all;
}
.ops-exec-py {
  background: rgba(56, 189, 248, 0.13);
  border: 1px solid rgba(56, 189, 248, 0.38);
  color: #bae6fd;
}
.ops-exec-ai {
  background: rgba(168, 85, 247, 0.20);
  border: 1px solid rgba(168, 85, 247, 0.58);
  color: #f3e8ff;
}
.dual-ai-cmp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}
.dual-ai-card {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 5px;
  padding: 8px 10px;
}
.dual-ai-card.gemini-card {
  border-left: 3px solid #38bdf8;
}
.dual-ai-card.claude-card {
  border-left: 3px solid #f59e0b;
}
.det-ai-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}
.det-ai-BOTH { background: rgba(16, 185, 129, 0.22); border: 1px solid rgba(16, 185, 129, 0.6); color: #6ee7b7; }
.det-ai-GEMINI_ONLY { background: rgba(56, 189, 248, 0.20); border: 1px solid rgba(56, 189, 248, 0.55); color: #7dd3fc; }
.det-ai-CLAUDE_ONLY { background: rgba(245, 158, 11, 0.20); border: 1px solid rgba(245, 158, 11, 0.55); color: #fcd34d; }
.det-ai-QUANT { background: rgba(148, 163, 184, 0.16); border: 1px solid rgba(148, 163, 184, 0.4); color: #cbd5e1; }
.dual-opinion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 4px;
}
.dual-opinion-box {
  padding: 4px 7px;
  border-radius: 3px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(100, 116, 139, 0.35);
  font-size: 10.8px;
  line-height: 1.38;
}
@media (max-width: 960px) {
  .dual-ai-cmp-grid, .dual-opinion-grid {
    grid-template-columns: 1fr;
  }
}
.todo-disc-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  margin-right: 4px;
}
.todo-adopt-ACCEPTED { background: rgba(16,185,129,0.22); border: 1px solid rgba(16,185,129,0.65); color: #6ee7b7; }
.todo-adopt-TEST_BOTH { background: rgba(56,189,248,0.22); border: 1px solid rgba(56,189,248,0.65); color: #7dd3fc; }
.todo-adopt-PENDING { background: rgba(245,158,11,0.20); border: 1px solid rgba(245,158,11,0.55); color: #fcd34d; }
.todo-adopt-REJECTED { background: rgba(242,54,69,0.18); border: 1px solid rgba(242,54,69,0.5); color: #fca5a5; }
.todo-adopt-NOTE_ONLY { background: rgba(148,163,184,0.16); border: 1px solid rgba(148,163,184,0.4); color: #cbd5e1; }
.todo-disc-card {
  background: rgba(11, 17, 30, 0.92);
  border: 1px solid #334155;
  border-radius: 5px;
  padding: 9px 11px;
  margin-bottom: 8px;
}
.todo-disc-card.author-GEMINI { border-left: 3px solid #38bdf8; }
.todo-disc-card.author-CLAUDE { border-left: 3px solid #f59e0b; }
.todo-disc-card.author-USER { border-left: 3px solid #10b981; }
.todo-disc-card.stance-TEST_VERDICT { border-left: 3px solid #a855f7; background: rgba(30, 20, 50, 0.45); }
.todo-adj-box {
  margin-top: 7px;
  padding: 7px 9px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.09);
  border: 1px dashed rgba(16, 185, 129, 0.45);
  font-size: 11.5px;
  line-height: 1.48;
  color: #d1fae5;
}
.regime-monitor-box {
  background: #0b111e;
  border: 1px solid rgba(56, 189, 248, 0.42);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.regime-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
}
.regime-pill-BULL { background: rgba(16,185,129,0.22); border: 1px solid rgba(16,185,129,0.7); color: #34d399; }
.regime-pill-VOL  { background: rgba(245,158,11,0.22); border: 1px solid rgba(245,158,11,0.7); color: #fbbf24; }
.regime-pill-BOX  { background: rgba(56,189,248,0.18); border: 1px solid rgba(56,189,248,0.55); color: #7dd3fc; }
.regime-pill-BEAR { background: rgba(244,63,94,0.22); border: 1px solid rgba(244,63,94,0.7); color: #fda4af; }
.regime-pill-WAIT { background: rgba(148,163,184,0.16); border: 1px solid rgba(148,163,184,0.45); color: #cbd5e1; }
.regime-heat-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8px, 1fr));
  gap: 2px;
  margin-top: 6px;
  align-items: stretch;
}
.regime-heat-cell {
  height: 16px;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  transition: transform 0.1s ease, opacity 0.1s ease;
}
.regime-heat-cell:hover {
  transform: scaleY(1.28);
  z-index: 3;
  outline: 1px solid #ffffff;
}
.regime-heat-cell.is-cur {
  outline: 2px solid #ffffff;
  z-index: 2;
  transform: scaleY(1.18);
}
.regime-heat-cell.is-future {
  opacity: 0.24;
}
.regime-flip-dot {
  position: absolute;
  top: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fef08a;
  box-shadow: 0 0 3px #000;
}
.ai-grade-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
}
.ai-grade-S, .ai-grade-A { background: rgba(16,185,129,0.22); border: 1px solid rgba(16,185,129,0.65); color: #34d399; }
.ai-grade-B { background: rgba(56,189,248,0.20); border: 1px solid rgba(56,189,248,0.55); color: #7dd3fc; }
.ai-grade-C { background: rgba(245,158,11,0.22); border: 1px solid rgba(245,158,11,0.6); color: #fcd34d; }
.ai-grade-D { background: rgba(242,54,69,0.22); border: 1px solid rgba(242,54,69,0.6); color: #f87171; }

.sev-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}
.sev-HIGH { background: rgba(242,54,69,0.22); border: 1px solid rgba(242,54,69,0.6); color: #f87171; }
.sev-MEDIUM { background: rgba(245,158,11,0.20); border: 1px solid rgba(245,158,11,0.55); color: #fcd34d; }
.sev-LOW { background: rgba(56,189,248,0.16); border: 1px solid rgba(56,189,248,0.45); color: #7dd3fc; }
.sev-INFO { background: rgba(148,163,184,0.16); border: 1px solid rgba(148,163,184,0.4); color: #cbd5e1; }

.rel-link-pill {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10.5px;
  font-family: var(--font-mono);
  background: rgba(30,41,59,0.85);
  border: 1px solid rgba(99,102,241,0.45);
  color: #c7d2fe;
  margin: 1px 0;
}

@media (max-width: 640px) {
  .ops-todo-form {
    grid-template-columns: 1fr 1fr;
  }
  .ops-todo-form .span-full {
    grid-column: 1 / -1;
  }
}

/* 6.무기전시관 승인 연구소 전용 스타일 */
.lab-pipeline-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #cbd5e1;
}
.lab-step-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  font-family: var(--font-mono);
  font-size: 11px;
  color: #e2e8f0;
}
.lab-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}
.lab-st-CHAMPION { background: rgba(56,189,248,0.18); border: 1px solid #38bdf8; color: #7dd3fc; }
.lab-st-DEPLOYED { background: rgba(16,185,129,0.24); border: 1px solid #10b981; color: #6ee7b7; }
.lab-st-STAGED { background: rgba(16,185,129,0.22); border: 1px solid #34d399; color: #a7f3d0; }
.lab-st-AI_APPROVED { background: rgba(34,197,94,0.18); border: 1px solid #22c55e; color: #86efac; }
.lab-st-QUANT_PASSED, .lab-st-AI_HOLD { background: rgba(245,158,11,0.20); border: 1px solid #f59e0b; color: #fcd34d; }
.lab-st-PLANNED { background: rgba(99,102,241,0.18); border: 1px solid rgba(129,140,248,0.62); color: #c7d2fe; }
.lab-st-AUTO_REJECTED, .lab-st-AI_REJECTED, .lab-st-USER_REJECTED { background: rgba(242,54,69,0.16); border: 1px solid rgba(242,54,69,0.55); color: #fca5a5; }
.lab-st-ROLLED_BACK, .lab-st-SUPERSEDED, .lab-st-PROPOSED { background: rgba(148,163,184,0.18); border: 1px solid rgba(148,163,184,0.5); color: #cbd5e1; }
.lab-exp-row { cursor: pointer; transition: background 0.12s ease; }
.lab-exp-row:hover { background: rgba(56, 189, 248, 0.08) !important; }
.lab-exp-row.selected { background: rgba(16, 185, 129, 0.14) !important; outline: 1px solid rgba(52, 211, 153, 0.55); }
.lab-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}
.lab-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lab-field label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 700;
}
.lab-ev-item {
  padding: 8px 10px;
  border-left: 3px solid #38bdf8;
  background: rgba(15, 23, 42, 0.65);
  border-radius: 0 6px 6px 0;
  margin-bottom: 6px;
}
.lab-ev-APPROVE, .lab-ev-DEPLOY { border-left-color: #10b981; }
.lab-ev-REJECT { border-left-color: #ef4444; }
.lab-ev-AI { border-left-color: #f59e0b; }
.lab-ev-REVISE { border-left-color: #a855f7; }
.lab-heat-best { background: rgba(16, 185, 129, 0.24) !important; border: 1px solid rgba(52, 211, 153, 0.65); }
.lab-heat-good { background: rgba(16, 185, 129, 0.11); }
.lab-heat-bad { background: rgba(242, 54, 69, 0.10); }

/* 4G 장세척추·무기슬롯 차트검증 전용 배지 & 구 3G 진단 서랍 */
.regime-pill-SUPER { background: rgba(192, 38, 211, 0.24); border: 1px solid rgba(232, 121, 249, 0.78); color: #f0abfc; }
.regime-pill-CHOP  { background: rgba(100, 116, 139, 0.22); border: 1px solid rgba(148, 163, 184, 0.55); color: #cbd5e1; }
.spine-rule-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(52, 211, 153, 0.35);
  font-family: var(--font-mono);
  font-size: 11px;
  color: #cbd5e1;
}
.legacy-3g-drawer {
  margin-top: 8px;
  border: 1px dashed rgba(71, 85, 105, 0.75);
  border-radius: 4px;
  background: rgba(11, 15, 25, 0.85);
}
.legacy-3g-drawer > summary {
  padding: 7px 10px;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.legacy-3g-drawer > summary:hover {
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.5);
}
.legacy-3g-drawer[open] > summary {
  border-bottom: 1px solid rgba(51, 65, 85, 0.65);
  color: #38bdf8;
}

/* =========================================================================
   6.무기전시관 (3D 홀로그램 · 수치출처 명세 · 일자별 연대기 · 3자 대화 역사관)
   ========================================================================= */
.armory-3d-split {
  display: grid;
  grid-template-columns: minmax(0, 1.68fr) minmax(335px, 1fr);
  gap: 10px;
  align-items: stretch;
}
.armory-stage-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.armory-canvas-box {
  position: relative;
  width: 100%;
  height: 545px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.34);
  background: #040812;
  box-shadow: inset 0 0 42px rgba(14, 165, 233, 0.09);
}
#armory3dCanvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
#armory3dCanvas:active {
  cursor: grabbing;
}
.armory-hud-tl {
  position: absolute;
  top: 7px;
  left: 8px;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(6, 12, 24, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.16);
  font-size: 10px;
  line-height: 1.32;
  white-space: pre;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.96), 0 0 6px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}
.armory-hud-tr {
  position: absolute;
  top: 7px;
  right: 8px;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(6, 12, 24, 0.14);
  border: 1px solid rgba(71, 85, 105, 0.22);
  font-size: 10px;
  line-height: 1.32;
  color: #cbd5e1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.96), 0 0 6px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}
.armory-canvas-box.hud-hidden .armory-hud-tl,
.armory-canvas-box.hud-hidden .armory-hud-tr {
  display: none !important;
}
.armory-overview-pill {
  position: absolute;
  bottom: 8px;
  right: 9px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(8, 15, 32, 0.26);
  border: 1px solid rgba(167, 139, 250, 0.55);
  color: #e9d5ff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
  z-index: 4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.96);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.18);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.armory-overview-pill:hover {
  background: rgba(15, 23, 42, 0.56);
  border-color: #38bdf8;
  color: #f8fafc;
  transform: translateY(-1px);
}
.armory-sim-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
}
.arm-cam-btn.active,
.arm-reg-btn.active,
.arm-dayf-btn.active,
.arm-hist-btn.active {
  background: rgba(56, 189, 248, 0.24) !important;
  border-color: #38bdf8 !important;
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.45);
}
.armory-slot-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}
.arm-slot-chip {
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 6px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(71, 85, 105, 0.65);
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.arm-slot-chip:hover {
  border-color: var(--slot-c, #38bdf8);
  color: #fff;
}
.arm-slot-chip.active {
  background: rgba(30, 41, 59, 0.95);
  border-color: var(--slot-c, #38bdf8);
  color: #fff;
  box-shadow: inset 0 0 0 1px var(--slot-c, #38bdf8);
}

.armory-inspector-col {
  background: rgba(11, 17, 30, 0.92);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 580px;
  overflow-y: auto;
}
.arm-insp-head {
  padding-left: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
}
.arm-status-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 800;
}
.arm-badge-live {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.65);
  color: #6ee7b7;
}
.arm-badge-cand {
  background: rgba(139, 92, 246, 0.20);
  border: 1px solid rgba(167, 139, 250, 0.70);
  color: #ddd6fe;
}
.arm-badge-ret {
  background: rgba(100, 116, 139, 0.22);
  border: 1px solid rgba(148, 163, 184, 0.55);
  color: #cbd5e1;
}
.arm-badge-dev {
  background: rgba(245, 158, 11, 0.20);
  border: 1px solid rgba(251, 191, 36, 0.68);
  color: #fde68a;
}
.arm-insp-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.arm-m-cell {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(51, 65, 85, 0.65);
  border-radius: 4px;
  padding: 5px 7px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 10.5px;
}
.arm-m-cell strong {
  font-size: 12.5px;
  color: #f8fafc;
}
.arm-m-sub {
  font-size: 9.8px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.arm-insp-compact-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.arm-insp-crow {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(51, 65, 85, 0.52);
}
.arm-insp-clbl {
  font-size: 10.8px;
  font-weight: 800;
  color: #94a3b8;
  padding-top: 1px;
}
.arm-insp-cval {
  font-size: 11.8px;
  line-height: 1.46;
  color: #e2e8f0;
  min-width: 0;
}
.arm-insp-code-inline {
  font-size: 11.3px;
  line-height: 1.44;
  color: #f1f5f9;
}
.arm-conn-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 4px;
  border-top: 1px solid rgba(51, 65, 85, 0.55);
  flex-wrap: wrap;
}
.arm-conn-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.arm-conn-pill {
  height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--peer-c, #38bdf8);
  color: #e2e8f0;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.arm-conn-pill:hover {
  background: rgba(30, 41, 59, 0.96);
  color: #ffffff;
}

/* 단일 압축 서브탭 바 (표창·승률 / 수치명세 / 일자별 / 변천사) */
.arm-subtab-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: rgba(9, 14, 26, 0.94);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.arm-subtab-bar::-webkit-scrollbar {
  display: none;
}
.arm-subtab-btn {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 13px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(71, 85, 105, 0.58);
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 11.8px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.arm-subtab-btn:hover {
  color: #f1f5f9;
  border-color: rgba(148, 163, 184, 0.75);
}
.arm-subtab-btn.active {
  background: rgba(56, 189, 248, 0.20);
  border-color: #38bdf8;
  color: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.35);
}
.arm-subtab-pane {
  display: none;
  padding: 10px;
}
.arm-subtab-pane.active {
  display: block;
}
.arm-subpane-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.arm-vault-bar {
  padding: 7px 10px;
  margin-bottom: 8px;
  border-radius: 5px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.34);
  font-size: 11.2px;
  color: #fde68a;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.armory-rel-diagram {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(12, 19, 34, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.armory-rel-title {
  font-size: 12px;
  font-weight: 800;
  color: #7dd3fc;
  margin-bottom: 8px;
}
.armory-baton-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 6px;
  align-items: stretch;
}
.armory-baton-step {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.14s;
}
.armory-baton-step:hover {
  background: rgba(30, 41, 59, 0.92);
}
.armory-baton-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fbbf24;
  font-weight: 800;
  font-size: 14px;
  padding: 0 2px;
  text-align: center;
}
.armory-baton-arrow span {
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
}
.armory-defense-banner {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.11);
  border: 1px solid rgba(248, 113, 113, 0.42);
  color: #fecaca;
  font-size: 11.5px;
  cursor: pointer;
}

.armory-fixed-table {
  width: 100%;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}
.armory-fixed-table td {
  vertical-align: middle;
  word-break: keep-all;
}
.arm-prov-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
}
.arm-prov-stat {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.65);
  color: #6ee7b7;
}
.arm-prov-phys {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.52);
  color: #7dd3fc;
}
.arm-prov-safe {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.65);
  color: #fca5a5;
}

.arm-reg-bar {
  display: flex;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: #1e293b;
}
.arm-reg-bar > span {
  display: block;
  height: 100%;
}
.arm-wchip {
  display: inline-block;
  padding: 1px 6px;
  margin: 1px 2px 1px 0;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
}
.arm-wchip-w3 { background: rgba(245, 158, 11, 0.18); border: 1px solid rgba(251, 191, 36, 0.55); color: #fde68a; }
.arm-wchip-w1 { background: rgba(239, 68, 68, 0.17); border: 1px solid rgba(248, 113, 113, 0.55); color: #fecaca; }
.arm-wchip-w2 { background: rgba(6, 182, 212, 0.18); border: 1px solid rgba(34, 211, 238, 0.55); color: #a5f3fc; }
.arm-wchip-w4 { background: rgba(139, 92, 246, 0.20); border: 1px solid rgba(167, 139, 250, 0.65); color: #ddd6fe; }
.arm-wchip-w5 { background: rgba(244, 63, 94, 0.20); border: 1px solid rgba(251, 113, 133, 0.68); color: #fecdd3; }
.arm-wchip-w6 { background: rgba(217, 70, 239, 0.20); border: 1px solid rgba(232, 121, 249, 0.68); color: #f5d0fe; }
.arm-wchip-w7 { background: rgba(245, 158, 11, 0.18); border: 1px solid rgba(251, 191, 36, 0.62); color: #fde68a; }
.arm-wchip-w0 { background: rgba(100, 116, 139, 0.18); border: 1px solid rgba(148, 163, 184, 0.45); color: #cbd5e1; }

/* ===== 무기별 1·2·3위 표창대 & 시간대/오전오후/대세장 승률 관리실 ===== */
.arm-scope-btn.active {
  background: rgba(251, 191, 36, 0.20) !important;
  border-color: rgba(251, 191, 36, 0.72) !important;
  color: #fde68a !important;
}
.arm-podium-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.arm-podium-panel {
  background: rgba(11, 17, 30, 0.92);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 6px;
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.arm-podium-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(71, 85, 105, 0.5);
  font-size: 12px;
}
.arm-podium-top3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  align-items: stretch;
}
.arm-medal-plaque {
  border-radius: 5px;
  padding: 8px 9px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(100, 116, 139, 0.45);
  font-variant-numeric: tabular-nums;
  transition: background 0.14s, box-shadow 0.14s;
}
.arm-medal-plaque:hover {
  background: rgba(30, 41, 59, 0.96);
}
.arm-medal-GOLD {
  border-top: 3px solid #fbbf24;
  border-color: rgba(251, 191, 36, 0.65);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.13) 0%, rgba(15, 23, 42, 0.94) 52%);
  box-shadow: inset 0 0 18px rgba(251, 191, 36, 0.08);
}
.arm-medal-SILVER {
  border-top: 3px solid #e2e8f0;
  border-color: rgba(203, 213, 225, 0.58);
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.11) 0%, rgba(15, 23, 42, 0.94) 52%);
}
.arm-medal-BRONZE {
  border-top: 3px solid #d97706;
  border-color: rgba(217, 119, 6, 0.58);
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.12) 0%, rgba(15, 23, 42, 0.94) 52%);
}
.arm-medal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}
.arm-medal-tag {
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 3px;
}
.arm-medal-GOLD .arm-medal-tag   { background: rgba(251,191,36,0.22); color: #fde68a; border: 1px solid rgba(251,191,36,0.6); }
.arm-medal-SILVER .arm-medal-tag { background: rgba(226,232,240,0.18); color: #f8fafc; border: 1px solid rgba(203,213,225,0.55); }
.arm-medal-BRONZE .arm-medal-tag { background: rgba(217,119,6,0.22); color: #fed7aa; border: 1px solid rgba(217,119,6,0.6); }
.arm-medal-AEGIS {
  border-top: 3px solid #fb7185;
  border-color: rgba(251, 113, 133, 0.58);
  background: linear-gradient(180deg, rgba(244, 63, 94, 0.13) 0%, rgba(15, 23, 42, 0.94) 52%);
}
.arm-medal-AEGIS .arm-medal-tag { background: rgba(244,63,94,0.22); color: #fecdd3; border: 1px solid rgba(251,113,133,0.62); }
.arm-medal-SUPREME {
  border-top: 3px solid #10b981;
  border-color: rgba(52, 211, 153, 0.58);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.13) 0%, rgba(15, 23, 42, 0.94) 52%);
}
.arm-medal-SUPREME .arm-medal-tag { background: rgba(16,185,129,0.22); color: #a7f3d0; border: 1px solid rgba(52,211,153,0.62); }
.arm-medal-RUNNER {
  border-top: 3px solid #e879f9;
  border-color: rgba(232, 121, 249, 0.58);
  background: linear-gradient(180deg, rgba(217, 70, 239, 0.13) 0%, rgba(15, 23, 42, 0.94) 52%);
}
.arm-medal-RUNNER .arm-medal-tag { background: rgba(217,70,239,0.22); color: #f5d0fe; border: 1px solid rgba(232,121,249,0.62); }
.arm-medal-wname {
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
}
.arm-medal-kpi {
  font-size: 13.5px;
  font-weight: 800;
}
.arm-medal-sub {
  font-size: 10.8px;
  line-height: 1.42;
  color: #cbd5e1;
}
.arm-podium-foot {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.arm-podium-subrow {
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(71, 85, 105, 0.48);
  font-size: 11px;
  line-height: 1.42;
  color: #cbd5e1;
  cursor: pointer;
}
.arm-podium-subrow:hover {
  background: rgba(30, 41, 59, 0.88);
}
.arm-subsec-box {
  background: rgba(11, 17, 30, 0.90);
  border: 1px solid rgba(71, 85, 105, 0.55);
  border-radius: 6px;
  padding: 9px 10px;
}
.arm-subsec-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}
.arm-stat-matrix th,
.arm-stat-matrix td {
  padding: 6px 7px !important;
  font-variant-numeric: tabular-nums;
}
.arm-wr-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  line-height: 1.28;
}
.arm-wr-main {
  font-size: 11.8px;
  font-weight: 800;
  white-space: pre;
}
.arm-wr-sub {
  font-size: 10.3px;
  color: #94a3b8;
  white-space: pre;
}
.arm-cell-strong {
  background: rgba(16, 185, 129, 0.08);
}
.arm-cell-weak {
  background: rgba(59, 130, 246, 0.07);
}
.arm-macro-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.arm-macro-card {
  border-radius: 5px;
  padding: 7px 10px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(71, 85, 105, 0.55);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 1120px) {
  .arm-podium-dual-grid,
  .arm-podium-top3,
  .arm-macro-summary-grid {
    grid-template-columns: 1fr;
  }
}

.armory-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.arm-hist-card {
  background: rgba(12, 18, 32, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 6px;
  padding: 12px 14px;
}
.arm-hist-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.arm-era-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(192, 132, 252, 0.55);
  color: #e9d5ff;
  font-size: 11px;
  font-weight: 800;
}
.arm-now-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
  font-size: 11px;
  font-weight: 700;
}
.arm-hist-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #f8fafc;
  margin: 8px 0 9px 0;
}
.arm-tri-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.arm-voice-box {
  border-radius: 5px;
  padding: 9px 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(71, 85, 105, 0.5);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.arm-voice-user { border-top: 3px solid #fbbf24; }
.arm-voice-agy  { border-top: 3px solid #38bdf8; }
.arm-voice-peer { border-top: 3px solid #34d399; }
.arm-voice-hdr {
  font-size: 11px;
  font-weight: 800;
  color: #cbd5e1;
}
.arm-voice-user .arm-voice-hdr { color: #fde68a; }
.arm-voice-agy .arm-voice-hdr  { color: #7dd3fc; }
.arm-voice-peer .arm-voice-hdr { color: #6ee7b7; }
.arm-voice-body {
  font-size: 12px;
  line-height: 1.56;
  color: #e2e8f0;
}
.arm-hist-proof {
  margin-top: 9px;
  padding: 6px 10px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.09);
  border: 1px solid rgba(52, 211, 153, 0.32);
  font-size: 11.5px;
  color: #e2e8f0;
}

/* ===== 6.무기전시관 — 무기별 변경이력 (기준선 동결 vs 개발완료 이후 변경분 분리) ===== */
.arm-cl-phase-btn.active {
  background: rgba(192, 132, 252, 0.22) !important;
  border-color: rgba(232, 121, 249, 0.72) !important;
  color: #fdf4ff !important;
  font-weight: 800;
}
.arm-cl-weapon-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}
.arm-cl-wcard {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-top: 2px solid var(--w-c, #38bdf8);
  border-radius: 5px;
  padding: 6px 7px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
  font-variant-numeric: tabular-nums;
}
.arm-cl-wcard:hover {
  background: rgba(30, 41, 59, 0.92);
  border-color: var(--w-c, #38bdf8);
}
.arm-cl-wcard.active {
  background: rgba(30, 41, 59, 0.96);
  border-color: var(--w-c, #38bdf8);
  box-shadow: 0 0 0 1px var(--w-c, #38bdf8);
}
.arm-cl-wcard-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #f8fafc;
}
.arm-cl-wcard-sub {
  margin-top: 3px;
  font-size: 10.2px;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.arm-cl-sec-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 5px;
  margin-bottom: 8px;
  font-size: 11.8px;
  font-weight: 800;
}
.arm-cl-sec-head.is-changelog {
  background: rgba(168, 85, 247, 0.13);
  border: 1px solid rgba(232, 121, 249, 0.45);
  color: #f5d0fe;
}
.arm-cl-sec-head.is-baseline {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #bae6fd;
}
.arm-cl-empty-box {
  padding: 13px 14px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px dashed rgba(232, 121, 249, 0.42);
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.55;
  margin-bottom: 12px;
}
.arm-cl-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 10px 0;
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 800;
}
.arm-cl-divider::before,
.arm-cl-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(56,189,248,0.12), rgba(56,189,248,0.5), rgba(56,189,248,0.12));
}
.arm-cl-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.arm-cl-card {
  background: rgba(12, 18, 32, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-left: 3px solid var(--cl-c, #38bdf8);
  border-radius: 6px;
  padding: 10px 12px;
  font-variant-numeric: tabular-nums;
}
.arm-cl-card.is-rejected {
  border-color: rgba(248, 113, 113, 0.35);
  border-left-color: #64748b;
  opacity: 0.92;
}
.arm-cl-diff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 7px;
}
.arm-cl-diff-box {
  border-radius: 4px;
  padding: 7px 9px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(71, 85, 105, 0.52);
  font-size: 11.4px;
  line-height: 1.48;
  color: #e2e8f0;
  word-break: break-word;
}
.arm-cl-diff-box.is-before {
  border-top: 2px solid #94a3b8;
}
.arm-cl-diff-box.is-after {
  border-top: 2px solid #34d399;
}
.arm-cl-metrics-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(51, 65, 85, 0.7);
  font-size: 11.2px;
  font-variant-numeric: tabular-nums;
}
.arm-cl-mcell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.arm-cl-mcell .lbl {
  font-size: 10px;
  color: #94a3b8;
}
.arm-cl-mcell .val {
  font-weight: 800;
  white-space: pre;
}

@media (max-width: 1120px) {
  .armory-3d-split {
    grid-template-columns: 1fr;
  }
  .armory-baton-grid {
    grid-template-columns: 1fr;
  }
  .armory-baton-arrow {
    display: none;
  }
  .arm-tri-grid {
    grid-template-columns: 1fr;
  }
  .armory-slot-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .arm-cl-weapon-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .arm-cl-metrics-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ===== 스마트폰(Mobile <= 768px / <= 480px) 반응형 공통 레이아웃 ===== */
@media (max-width: 768px) {
  .topbar-shell {
    padding: 4px 4px 0 4px;
  }
  .topbar {
    flex-wrap: wrap;
    padding: 6px 8px;
    gap: 6px;
  }
  .brand-group {
    max-width: 100%;
    flex: 1 1 auto;
  }
  .top-status {
    flex-wrap: wrap;
    gap: 4px;
  }
  .nav-tabs {
    display: flex;
    order: 3;
    width: 100%;
    margin-left: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    gap: 4px;
  }
  .topbar-shell.nav-collapsed .nav-tabs {
    display: none !important;
    max-height: 0 !important;
    overflow: hidden !important;
  }
  .nav-tabs::-webkit-scrollbar {
    display: none;
  }
  .nav-tab {
    flex: 0 0 auto;
    height: 30px;
    padding: 0 10px;
    font-size: 11.5px;
  }
  .tab-pane {
    padding: 5px;
  }
  .panel-head {
    padding: 6px 8px;
  }
  .panel-title {
    white-space: normal;
    line-height: 1.35;
  }
  .panel-body {
    padding: 7px 8px;
  }
  .kpi-grid,
  .kpi-grid-4,
  .compare-4way-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  .split-2,
  .chart-grid-3 {
    grid-template-columns: 1fr !important;
  }
  .control-bar,
  .ctrl-group {
    flex-wrap: wrap !important;
    gap: 5px !important;
  }
  input.ctrl,
  select.ctrl {
    max-width: 100%;
  }
  .armory-canvas-box {
    height: 370px;
  }
  .armory-overview-pill {
    font-size: 9.8px;
    padding: 3px 8px;
    bottom: 6px;
    right: 6px;
  }
  .armory-hud-tr {
    display: none;
  }
  .armory-slot-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .arm-cl-weapon-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .arm-cl-diff-grid {
    grid-template-columns: 1fr;
  }
  .arm-cl-metrics-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .armory-inspector-col {
    max-height: none;
    overflow-y: visible;
  }
  .arm-insp-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .arm-subtab-pane {
    padding: 8px;
  }
  .ops-modal-box {
    width: 96vw !important;
    max-width: 96vw !important;
    max-height: 90vh !important;
  }
}

@media (max-width: 480px) {
  .kpi-grid,
  .kpi-grid-4,
  .compare-4way-grid {
    grid-template-columns: 1fr !important;
  }
  .symbol-title {
    font-size: 12px;
  }
  .armory-canvas-box {
    height: 330px;
  }
  .armory-hud-tl {
    font-size: 9.2px;
    padding: 2px 5px;
  }
  .armory-slot-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  .arm-cl-weapon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  .arm-cl-metrics-bar {
    grid-template-columns: 1fr;
  }
  .arm-slot-chip {
    font-size: 10.5px;
    padding: 0 4px;
    height: 29px;
  }
  .arm-insp-crow {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .arm-subtab-btn {
    padding: 0 10px;
    font-size: 11px;
  }
}

/* =========================================================================
   2.차트검증 — 고밀도 무기·미래봉인·찰나(1틱) 검증 전용 레이아웃 (PC & 모바일 반응형)
   ========================================================================= */
.cv-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px 8px;
  margin-bottom: 5px;
  background: rgba(15, 23, 42, 0.30);
  border: 1px solid rgba(71, 85, 105, 0.42);
  border-radius: 4px;
}

.cv-top-bar .ctrl,
.cv-top-bar .btn-sm {
  height: 24px;
  box-sizing: border-box;
  font-size: 10.5px;
  font-weight: 500;
}

.cv-top-left,
.cv-top-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}

.cv-mode-btns {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.cv-mode-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 24px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: rgba(15, 23, 42, 0.28);
  color: #cbd5e1;
  white-space: nowrap;
  box-sizing: border-box;
}

.cv-mode-tag.is-future {
  border-color: rgba(245, 158, 11, 0.65);
  background: rgba(245, 158, 11, 0.16);
  color: #fde68a;
}

.cv-mode-tag.is-oos {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
}

.cv-mode-tag.is-init {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(51, 65, 85, 0.4);
  color: #cbd5e1;
}

.cv-future-strip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  gap: 4px;
  flex-wrap: wrap;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  background: rgba(15, 23, 42, 0.26);
  box-sizing: border-box;
}

.cv-fut-lbl {
  font-size: 10.5px;
  font-weight: 600;
  color: #fbbf24;
  white-space: nowrap;
  margin-right: 1px;
}

.cv-fut-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 5px;
  border-radius: 3px;
  border: 1px solid rgba(71, 85, 105, 0.52);
  background: rgba(15, 23, 42, 0.36);
  color: #e2e8f0;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.cv-fut-pill:hover {
  border-color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
}

.cv-fut-pill.active {
  border-color: #fbbf24;
  background: rgba(245, 158, 11, 0.24);
  color: #fff;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.24);
}

.cv-fut-dno {
  color: #fbbf24;
  font-weight: 800;
  font-size: 10px;
}

.cv-fut-sum {
  font-size: 11px;
  font-weight: 800;
  padding: 0 5px;
  white-space: nowrap;
}

.cv-fut-run-btn {
  height: 22px !important;
  padding: 0 7px !important;
  font-size: 10.5px !important;
  border-color: rgba(52, 211, 153, 0.55) !important;
  background: rgba(16, 185, 129, 0.18) !important;
  color: #6ee7b7 !important;
}

.cv-fut-run-btn:hover {
  background: rgba(16, 185, 129, 0.34) !important;
  color: #fff !important;
}

/* 접이식 상세 설정 & 전체일자 서랍 */
.cv-settings-drawer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 7px 10px;
  margin-bottom: 6px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(11, 15, 25, 0.96) 100%);
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 4px;
}

.cv-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.cv-settings-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px dashed rgba(51, 65, 85, 0.6);
}

.cv-chk-lbl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
  cursor: pointer;
  white-space: nowrap;
}

.cv-chk-lbl input[type="checkbox"] {
  accent-color: #10b981;
  cursor: pointer;
}

#txtCvLiveAutoSync {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: pre;
}

.cv-w6-top-toggle {
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid rgba(232, 121, 249, 0.55);
  background: rgba(88, 28, 135, 0.24);
  color: #f5d0fe;
  font-size: 11px;
  font-weight: 800;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.cv-w6-top-toggle:hover {
  background: rgba(134, 25, 143, 0.36);
  border-color: #e879f9;
}

.cv-w6-top-toggle input[type="checkbox"] {
  accent-color: #e879f9;
}

/* 당일 핵심 요약 + 차수별 카드 통합 보드 */
.cv-day-board {
  background: rgba(15, 23, 42, 0.24);
  border: 1px solid rgba(71, 85, 105, 0.40);
  border-radius: 4px;
  padding: 5px 8px;
  margin-bottom: 5px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cv-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 6px;
}

.cv-kpi-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 46px;
  min-height: 46px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(71, 85, 105, 0.42);
  background: rgba(15, 23, 42, 0.26);
  min-width: 0;
  box-sizing: border-box;
  transition: border-color 0.14s ease, background 0.14s ease;
}

#cmpCard_game_solver,
#cmpCard_live_real {
  cursor: pointer;
}

#cmpCard_game_solver:hover,
#cmpCard_live_real:hover {
  border-color: rgba(96, 165, 250, 0.65);
  background: rgba(30, 41, 59, 0.42);
}

.cv-kpi-cell.active {
  border-color: rgba(52, 211, 153, 0.58);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: none;
}

.cv-kpi-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-bottom: 2px;
  line-height: 1.2;
}

.cv-kpi-title {
  font-size: 10.5px;
  font-weight: 600;
  color: #cbd5e1;
  white-space: nowrap;
}

.cv-kpi-tag {
  font-size: 10px;
  font-weight: 500;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#cmpSolverPeriodCum {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.25;
}

.cv-kpi-main {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 7px;
  min-width: 0;
  line-height: 1.25;
}

.cv-kpi-ret {
  font-size: 12.8px;
  font-weight: 600;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cv-kpi-sub {
  font-size: 10.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 차수 카드 슬림화 + 찰나(-3s) 미니 버튼 */
.cv-day-board .round-card {
  width: 266px;
  min-width: 266px;
  max-width: 266px;
  min-height: 62px;
  padding: 4px 8px;
  gap: 2px;
}

.round-line-right {
  display: inline-flex;
  align-items: center;
  flex: 1;
  justify-content: space-between;
  gap: 4px;
}

.cv-mini-chalna {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 5px;
  margin-left: 2px;
  border-radius: 3px;
  border: 1px solid rgba(56, 189, 248, 0.5);
  background: rgba(14, 165, 233, 0.16);
  color: #7dd3fc;
  font-family: var(--font-mono);
  font-size: 9.8px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.cv-mini-chalna:hover {
  border-color: #38bdf8;
  background: rgba(14, 165, 233, 0.36);
  color: #fff;
}

/* 리플레이 독 + 장세척추 통합 바 */
.cv-dock-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.cv-dock-controls,
.cv-dock-telemetry {
  gap: 4px;
}

.cv-dock-sep {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: rgba(71, 85, 105, 0.7);
  margin: 0 2px;
}

.btn.cv-evt-btn {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
}

.btn.cv-evt-btn:hover {
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.32);
  color: #fff;
}

.btn.cv-chalna-btn {
  border-color: rgba(56, 189, 248, 0.68);
  background: rgba(14, 165, 233, 0.22);
  color: #bae6fd;
}

.btn.cv-chalna-btn:hover {
  border-color: #38bdf8;
  background: rgba(14, 165, 233, 0.42);
  color: #fff;
}

.btn.cv-tick-btn {
  padding: 0 6px;
  font-family: var(--font-mono);
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
}

.btn.cv-tick-btn:hover {
  border-color: #93c5fd;
  background: rgba(59, 130, 246, 0.28);
  color: #fff;
}

.cv-help-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 7px;
  border-radius: 3px;
  border: 1px solid rgba(71, 85, 105, 0.65);
  background: rgba(15, 23, 42, 0.85);
  color: #94a3b8;
  font-size: 10.8px;
  font-weight: 700;
  white-space: nowrap;
  cursor: help;
}

.cv-dock-row2 {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(51, 65, 85, 0.55);
}

.cv-scrub-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cv-spine-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.cv-spine-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
}

.cv-spine-right {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.cv-spine-diag {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 580px;
}

.cv-dock-row2 .regime-heat-track {
  height: 10px;
  margin-top: 1px;
}

/* 하단 실매매(.ms) vs 시뮬 정밀 대조 접이식 서랍 */
details.cv-drawer {
  background: var(--bg-panel);
  border: 1px solid rgba(56, 189, 248, 0.38);
  border-radius: 4px;
  margin-bottom: 8px;
  overflow: hidden;
}

summary.cv-drawer-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 10px;
  background: rgba(15, 23, 42, 0.9);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

summary.cv-drawer-summary::-webkit-details-marker {
  display: none;
}

summary.cv-drawer-summary:hover {
  background: rgba(30, 41, 59, 0.92);
}

.cv-drawer-body {
  padding: 8px 10px;
  border-top: 1px solid var(--border);
}

@media (max-width: 1280px) {
  .cv-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cv-spine-diag {
    max-width: 340px;
  }
}

@media (max-width: 768px) {
  .cv-top-bar {
    padding: 6px 8px;
  }
  .cv-top-left,
  .cv-top-right {
    width: 100%;
  }
  #selChartDate,
  #selGsPreset {
    flex: 1 1 180px;
    min-width: 0 !important;
  }
  .cv-future-strip {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 3px 6px;
  }
  .cv-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cv-dock-sep {
    display: none;
  }
  .cv-spine-diag {
    max-width: 100%;
    white-space: normal;
  }
  #lblReplayTime {
    width: min(19.5ch, 100%) !important;
    min-width: min(19.5ch, 100%) !important;
    max-width: min(19.5ch, 100%) !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #dockTickProgress {
    width: min(17.5ch, 100%) !important;
    min-width: min(17.5ch, 100%) !important;
    max-width: min(17.5ch, 100%) !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 480px) {
  .cv-kpi-strip {
    grid-template-columns: 1fr;
  }
  .cv-day-board .round-card {
    width: 244px;
    min-width: 244px;
    max-width: 244px;
  }
}

/* =====================================================================
   8개 화면 통합 고밀도·압축 UI 컴포넌트 (설명풍선 + 필요시 열람 서랍)
   ===================================================================== */
.kpi-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}

.cv-inline-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border-radius: 3px;
  border: 1px solid rgba(71, 85, 105, 0.65);
  background: rgba(15, 23, 42, 0.85);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.cv-inline-pill.is-gold {
  border-color: rgba(245, 158, 11, 0.52);
  background: rgba(120, 53, 15, 0.2);
  color: #fde68a;
}

.cv-inline-pill.is-mint {
  border-color: rgba(52, 211, 153, 0.48);
  background: rgba(6, 78, 59, 0.22);
  color: #6ee7b7;
}

.dock-cum-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 132px;
  min-width: 132px;
  height: 24px;
  text-align: center;
  white-space: pre;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  font-weight: 600;
  padding: 0 6px;
  border-radius: 3px;
  border: 1px solid rgba(71, 85, 105, 0.45);
  background: rgba(15, 23, 42, 0.28);
  color: #cbd5e1;
  box-sizing: border-box;
}

.cv-drawer-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}

details.cv-drawer[open] > summary.cv-drawer-summary .cv-drawer-hint {
  color: #7dd3fc;
}

.chat-layout.side-collapsed {
  grid-template-columns: 1fr;
}

.chat-layout.side-collapsed > aside.chat-sidebar-box {
  display: none !important;
}

@media (max-width: 768px) {
  .kpi-grid-3 {
    grid-template-columns: 1fr;
  }
  .cv-inline-pill {
    white-space: normal;
    height: auto;
    padding: 3px 7px;
  }
  .dock-cum-badge {
    width: auto;
    min-width: 118px;
  }
}

/* =========================================================================
   2.차트검증 — [● 운영기 | ▲ 개발기] 무기 테스트벤치 (최소 변경 인앱 비교)
   ========================================================================= */
.cv-env-switch {
  display: inline-flex;
  align-items: center;
  height: 24px;
  gap: 2px;
  padding: 1px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.34);
  border: 1px solid rgba(71, 85, 105, 0.46);
  box-sizing: border-box;
}

.cv-env-btn {
  height: 20px !important;
  padding: 0 7px !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  border-radius: 3px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #94a3b8 !important;
  white-space: nowrap;
}

.cv-env-btn.active {
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: rgba(52, 211, 153, 0.58) !important;
  color: #6ee7b7 !important;
}

.cv-env-btn.dev.active {
  background: rgba(245, 158, 11, 0.18) !important;
  border-color: rgba(251, 191, 36, 0.65) !important;
  color: #fde68a !important;
}

.cv-dev-bench {
  margin: 0 0 5px;
  padding: 5px 9px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.30);
  border: 1px solid rgba(245, 158, 11, 0.38);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cv-dev-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.cv-dev-slots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cv-dev-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.42);
  white-space: nowrap;
  box-sizing: border-box;
}

.cv-dev-chk {
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #e2e8f0;
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}

.cv-dev-chk.new-wpn {
  border-color: rgba(168, 85, 247, 0.48);
  color: #e9d5ff;
}

.cv-dev-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.cv-dev-diff-box {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  background: rgba(9, 13, 22, 0.32);
  border: 1px solid rgba(245, 158, 11, 0.36);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: pre;
  font-size: 10.5px;
  font-weight: 600;
  color: #f8fafc;
  box-sizing: border-box;
}

.cv-dev-row2 {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 11px;
}

.cv-dev-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(100, 116, 139, 0.45);
  color: #cbd5e1;
}

.cv-dev-chip:hover {
  filter: brightness(1.15);
}

.cv-dev-chip.saved-loss {
  border-color: rgba(52, 211, 153, 0.65);
  background: rgba(6, 78, 59, 0.32);
  color: #a7f3d0;
}

.cv-dev-chip.missed-win {
  border-color: rgba(251, 191, 36, 0.65);
  background: rgba(120, 53, 15, 0.34);
  color: #fde68a;
}

.cv-dev-chip.added-dev {
  border-color: rgba(192, 132, 252, 0.68);
  background: rgba(88, 28, 135, 0.32);
  color: #e9d5ff;
}

.cv-dev-batch-box {
  margin-top: 2px;
  padding: 6px 8px;
  border-radius: 5px;
  background: rgba(9, 13, 22, 0.88);
  border: 1px solid rgba(71, 85, 105, 0.5);
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 768px) {
  .cv-dev-bench {
    padding: 6px 7px;
  }
  .cv-dev-diff-box {
    white-space: normal;
    width: 100%;
  }
  .cv-dev-slots {
    gap: 5px;
  }
}

@media (max-width: 480px) {
  .cv-env-btn {
    padding: 3px 7px !important;
    font-size: 10.5px !important;
  }
  .cv-dev-chk {
    font-size: 10.5px;
    padding: 2px 5px;
  }
}

/* =========================================================================
   [6.무기전시관] 무기개발 SOP 4단계 파이프라인 & 4관문 성적표 & 승인/거절 원장
   ========================================================================= */
.lab-sop-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
  margin-bottom: 8px;
}

.lab-sop-step {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(9, 14, 25, 0.94));
  border: 1px solid rgba(71, 85, 105, 0.52);
  border-radius: 7px;
  padding: 7px 9px;
  cursor: pointer;
  transition: border-color 0.14s ease, transform 0.12s ease, background 0.14s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}

.lab-sop-step:hover {
  border-color: rgba(52, 211, 153, 0.72);
  background: rgba(15, 29, 48, 0.95);
}

.lab-sop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  flex-wrap: wrap;
}

.lab-sop-num {
  font-size: 10px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.03em;
}

.lab-sop-title {
  font-size: 11.8px;
  font-weight: 800;
  color: #f8fafc;
  flex: 1;
}

.lab-sop-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  white-space: pre;
}

.lab-sop-badge.is-dev {
  background: rgba(139, 92, 246, 0.22);
  border: 1px solid rgba(196, 181, 253, 0.55);
  color: #ddd6fe;
}

.lab-sop-badge.is-pass {
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(52, 211, 153, 0.58);
  color: #6ee7b7;
}

.lab-sop-badge.is-mix {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fde68a;
}

.lab-sop-badge.is-live {
  background: rgba(14, 165, 233, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.58);
  color: #bae6fd;
}

.lab-sop-desc {
  font-size: 10.8px;
  color: #cbd5e1;
  line-height: 1.38;
}

.lab-sop-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #64748b;
  padding: 0 1px;
}

.lab-gate-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.lab-gate-card {
  background: rgba(12, 19, 34, 0.88);
  border: 1px solid rgba(71, 85, 105, 0.48);
  border-radius: 6px;
  padding: 7px 9px;
  font-variant-numeric: tabular-nums;
}

.lab-gate-card.is-pass {
  border-left: 3px solid #10b981;
}

.lab-gate-card.is-fail {
  border-left: 3px solid #ef4444;
}

.lab-gate-card.is-seal {
  border-left: 3px solid #f59e0b;
}

.lab-gate-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  font-size: 10.2px;
  font-weight: 800;
  color: #94a3b8;
  margin-bottom: 3px;
}

.lab-gate-main {
  font-size: 11.8px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 2px;
}

.lab-gate-sub {
  font-size: 10.4px;
  color: #94a3b8;
}

.lab-cl-card {
  background: rgba(12, 18, 31, 0.92);
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-left: 3px solid #34d399;
  border-radius: 7px;
  padding: 9px 11px;
}

.lab-cl-card.is-rejected {
  border-left-color: #f87171;
  background: rgba(24, 14, 22, 0.88);
}

.lab-cl-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

@media (max-width: 1024px) {
  .lab-sop-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lab-sop-arrow {
    display: none;
  }
  .lab-gate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .lab-sop-board {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .lab-gate-grid {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .lab-cl-card {
    padding: 8px 9px;
  }
}

/* ========================================================================= */
/* 4G 전 화면 공통 라이프사이클 · 거버넌스 연결 스트립 & 빠른 검색 칩 (모바일 반응형) */
/* ========================================================================= */
.kw-flow-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  margin-bottom: 8px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(12, 20, 36, 0.92) 100%);
  border: 1px solid rgba(56, 189, 248, 0.28);
  font-size: 11.3px;
  line-height: 1.4;
}

.kw-flow-steps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.kw-flow-step {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(100, 116, 139, 0.42);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
  font-variant-numeric: tabular-nums;
}

.kw-flow-step:hover {
  background: rgba(30, 58, 95, 0.78);
  border-color: rgba(56, 189, 248, 0.72);
}

.kw-flow-step.is-active {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(52, 211, 153, 0.65);
  color: #a7f3d0;
}

.kw-flow-step.is-gold {
  background: rgba(245, 158, 11, 0.13);
  border-color: rgba(251, 191, 36, 0.55);
  color: #fde68a;
}

.kw-flow-step.is-purple {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(192, 132, 252, 0.55);
  color: #e9d5ff;
}

.kw-flow-arrow {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  user-select: none;
}

.kw-chip-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.kw-qchip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(100, 116, 139, 0.48);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}

.kw-qchip:hover,
.kw-qchip.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.72);
  color: #f8fafc;
}

@media (max-width: 768px) {
  .kw-flow-strip {
    padding: 6px 8px;
    gap: 5px;
  }
  .kw-flow-steps {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }
  .kw-flow-step {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

/* ===== 탄약·매매횟수 결정변수 5대 축 통계 & 4관문 3자 공정경쟁 판정 보드 (Tab 7 & Tab 8 공용) ===== */
.qvs-board {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.qvs-verdict-banner {
  padding: 9px 11px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(100, 116, 139, 0.48);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qvs-verdict-banner.qvs-badge-dep {
  border-left: 4px solid #10b981;
  border-color: rgba(52, 211, 153, 0.58);
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.14) 0%, rgba(15, 23, 42, 0.94) 55%);
}

.qvs-verdict-banner.qvs-badge-stg {
  border-left: 4px solid #f59e0b;
  border-color: rgba(251, 191, 36, 0.62);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.14) 0%, rgba(15, 23, 42, 0.94) 55%);
}

.qvs-verdict-banner.qvs-badge-rej {
  border-left: 4px solid #f43f5e;
  border-color: rgba(248, 113, 113, 0.52);
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.12) 0%, rgba(15, 23, 42, 0.94) 55%);
}

.qvs-verdict-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.qvs-verdict-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
}

.qvs-badge-dep .qvs-verdict-pill {
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(52, 211, 153, 0.7);
  color: #6ee7b7;
}

.qvs-badge-stg .qvs-verdict-pill {
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.7);
  color: #fde68a;
}

.qvs-badge-rej .qvs-verdict-pill {
  background: rgba(239, 68, 68, 0.20);
  border: 1px solid rgba(248, 113, 113, 0.68);
  color: #fca5a5;
}

.qvs-verdict-reason {
  font-size: 11.8px;
  line-height: 1.5;
  color: #e2e8f0;
}

.qvs-formula-line {
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(9, 14, 26, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #bae6fd;
  word-break: break-word;
}

.qvs-parity-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 11.3px;
  font-variant-numeric: tabular-nums;
}

.qvs-parity-bar.is-pass {
  background: rgba(16, 185, 129, 0.11);
  border: 1px solid rgba(52, 211, 153, 0.48);
  color: #a7f3d0;
}

.qvs-parity-bar.is-warn {
  background: rgba(245, 158, 11, 0.13);
  border: 1px solid rgba(251, 191, 36, 0.58);
  color: #fde68a;
}

.qvs-sec {
  background: rgba(11, 17, 30, 0.92);
  border: 1px solid rgba(71, 85, 105, 0.52);
  border-radius: 6px;
  padding: 8px 9px;
}

.qvs-sec-title {
  font-size: 11.6px;
  font-weight: 800;
  color: #7dd3fc;
  margin-bottom: 6px;
}

.qvs-dual-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 8px;
}

.qvs-dual-grid.is-stack {
  grid-template-columns: 1fr;
}

.qvs-table {
  width: 100%;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.qvs-table th,
.qvs-table td {
  padding: 5px 7px !important;
  font-size: 11.2px;
  font-variant-numeric: tabular-nums;
  white-space: pre;
}

.qvs-win-row td {
  background: rgba(16, 185, 129, 0.10) !important;
}

.qvs-worst-row td {
  background: rgba(244, 63, 94, 0.09) !important;
}

.qvs-eod-divider {
  height: 1px;
  margin: 10px 0;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.45), rgba(56, 189, 248, 0.28), transparent);
}

.qvs-wpn-mini-item {
  display: inline-block;
  margin-right: 6px;
  font-variant-numeric: tabular-nums;
  white-space: pre;
}

.arm-gov-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.arm-gov-grid.is-stack {
  grid-template-columns: 1fr;
}

.arm-gov-card {
  background: rgba(11, 18, 32, 0.92);
  border: 1px solid rgba(71, 85, 105, 0.52);
  border-top: 2px solid var(--gov-c, #34d399);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.arm-gov-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.arm-gov-sched {
  font-size: 10.3px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.38);
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
  white-space: pre;
}

.arm-gov-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.arm-gov-tag {
  font-size: 10.4px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(100, 116, 139, 0.45);
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
  white-space: pre;
}

.arm-gov-list {
  margin: 0;
  padding-left: 15px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.4px;
  line-height: 1.48;
  color: #e2e8f0;
}

.arm-gov-livebar {
  margin-top: 2px;
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px dashed rgba(56, 189, 248, 0.42);
  font-size: 10.8px;
  color: #bae6fd;
  font-variant-numeric: tabular-nums;
  white-space: pre-wrap;
}

.qvs-wpn-cap-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 7px;
  font-variant-numeric: tabular-nums;
}

.qvs-wpn-cap-chip {
  background: rgba(15, 23, 42, 0.90);
  border: 1px solid rgba(100, 116, 139, 0.42);
  border-top: 2px solid var(--wpn-c, #38bdf8);
  border-radius: 5px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.qvs-wpn-cap-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 11px;
}

.qvs-wpn-cap-tag {
  font-size: 10.3px;
  font-weight: 800;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.45);
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.qvs-wpn-cap-sub {
  font-size: 10.2px;
  color: #cbd5e1;
  line-height: 1.38;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1120px) {
  .qvs-dual-grid {
    grid-template-columns: 1fr;
  }
  .arm-gov-grid {
    grid-template-columns: 1fr;
  }
  .qvs-wpn-cap-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .qvs-verdict-banner {
    padding: 8px 9px;
  }
  .qvs-parity-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .qvs-sec {
    padding: 7px 8px;
  }
  .qvs-wpn-cap-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .qvs-wpn-cap-strip {
    grid-template-columns: 1fr;
  }
  .qvs-table th,
  .qvs-table td {
    padding: 4px 5px !important;
    font-size: 10.6px;
  }
}

/* =========================================================================
   AI 할일 #17: 5.대화기록 2단 원문불변 아카이브 (Q&A 세트 · 스토리 연대기 · 원스탑 모달)
   ========================================================================= */
.chat-top-mode-bar {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px;
  border-radius: 5px;
  background: rgba(9, 14, 26, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.36);
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
}
.chat-top-mode-bar::-webkit-scrollbar {
  display: none;
}
.chat-mode-btn {
  flex: 0 0 auto;
  height: 25px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.chat-mode-btn:hover {
  color: #f1f5f9;
  background: rgba(30, 41, 59, 0.72);
}
.chat-mode-btn.active {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.72);
  color: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.25);
}
.kw-qchip.is-story-chip {
  border-color: rgba(244, 114, 182, 0.55);
  color: #fbcfe8;
  background: rgba(131, 24, 67, 0.22);
}
.kw-qchip.is-story-chip:hover,
.kw-qchip.is-story-chip.active {
  border-color: #f472b6;
  background: rgba(244, 114, 182, 0.28);
  color: #ffffff;
}

.chat-side-subtabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.chat-side-tab {
  height: 24px;
  padding: 0 6px;
  border-radius: 4px;
  border: 1px solid rgba(71, 85, 105, 0.58);
  background: rgba(15, 23, 42, 0.78);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.chat-side-tab:hover {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.7);
}
.chat-side-tab.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(251, 191, 36, 0.75);
  color: #fde68a;
}

.chat-mini-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(100, 116, 139, 0.45);
  color: #cbd5e1;
}
.chat-mini-tag.is-core {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(52, 211, 153, 0.55);
  color: #6ee7b7;
}
.chat-mini-tag.is-muted {
  background: rgba(71, 85, 105, 0.22);
  border-color: rgba(100, 116, 139, 0.45);
  color: #94a3b8;
}
.chat-mini-tag.is-story {
  background: rgba(244, 114, 182, 0.16);
  border-color: rgba(244, 114, 182, 0.62);
  color: #fbcfe8;
}
.chat-role-badge.progress {
  background: rgba(100, 116, 139, 0.26);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #cbd5e1;
}

/* 내 질문 목차(Question TOC) 상단 접이식 네비 */
.chat-qtoc-drawer {
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(12, 18, 32, 0.92);
}
.chat-qtoc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.chat-qtoc-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(71, 85, 105, 0.52);
  color: #e2e8f0;
  font-size: 11.5px;
  text-align: left;
  cursor: pointer;
  min-width: 0;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.chat-qtoc-item:hover {
  border-color: #fbbf24;
  background: rgba(30, 41, 59, 0.95);
}
.chat-qtoc-txt {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 다중 선택 원스탑 등록 액션 바 */
.chat-sel-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 7px 11px;
  margin-bottom: 8px;
  border-radius: 5px;
  background: rgba(6, 78, 59, 0.34);
  border: 1px solid rgba(52, 211, 153, 0.68);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

/* Q&A 맥락 세트 카드 (내 질문 -> AI 답변 정순 보장) */
@keyframes kwChatJumpPulse {
  0% { box-shadow: 0 0 0 2px #fbbf24, 0 0 22px rgba(251, 191, 36, 0.55); }
  100% { box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.25); }
}
.chat-qa-set-card {
  border-radius: 6px;
  border: 1px solid rgba(71, 85, 105, 0.65);
  background: #111827;
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.chat-qa-set-card.is-selected {
  border-color: #34d399;
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.45);
}
.chat-qa-set-card.is-jump-highlight {
  border-color: #fbbf24;
  animation: kwChatJumpPulse 2.2s ease-out;
}
.chat-qa-set-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(9, 13, 23, 0.88);
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
  font-size: 11.3px;
}
.chat-qa-chk-lbl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.chat-qa-subhdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(15, 23, 42, 0.55);
  border-bottom: 1px dashed rgba(51, 65, 85, 0.52);
  font-size: 11px;
}
.chat-qa-user-box {
  border-left: 3px solid #f59e0b;
  background: rgba(30, 26, 18, 0.72);
  border-bottom: 1px solid rgba(51, 65, 85, 0.58);
}
.chat-qa-asst-box {
  border-left: 3px solid #38bdf8;
  background: rgba(13, 21, 36, 0.86);
  border-bottom: 1px solid rgba(51, 65, 85, 0.42);
}
.chat-qa-asst-box:last-child {
  border-bottom: none;
}
.chat-qa-asst-box.is-interim {
  border-left-color: #64748b;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0.92;
}

/* 잡음/진행 멘트 1줄 접기 요약 바 */
.chat-noise-fold-bar,
.chat-interim-fold-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 11px;
  border-radius: 5px;
  border: 1px dashed rgba(100, 116, 139, 0.62);
  background: rgba(15, 23, 42, 0.62);
  color: #94a3b8;
  font-size: 11.4px;
  cursor: pointer;
  user-select: none;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.chat-interim-fold-bar {
  border-radius: 0;
  border-left: 3px solid #64748b;
  border-right: none;
  border-top: none;
}
.chat-noise-fold-bar:hover,
.chat-interim-fold-bar:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: #38bdf8;
  color: #e2e8f0;
}

/* 마크다운 표 가로 스크롤 래퍼 (수치 고정폭 · 깨짐 방지) */
.chat-tbl-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 6px 0;
}
.chat-tbl-scroll > table.md-tbl {
  margin: 0;
  min-width: 420px;
  font-variant-numeric: tabular-nums;
}

/* 주제별 스토리 연대기 (EP.1 ~ EP.N) */
.story-master-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.story-master-card {
  padding: 11px 13px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(22, 32, 52, 0.96), rgba(13, 20, 35, 0.96));
  border: 1px solid rgba(244, 114, 182, 0.45);
}
.story-guard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}
.story-guard-box {
  padding: 8px 10px;
  border-radius: 5px;
  background: rgba(11, 17, 30, 0.88);
  border: 1px solid rgba(71, 85, 105, 0.55);
  font-size: 12px;
  line-height: 1.54;
  color: #e2e8f0;
  min-width: 0;
}
.story-guard-box.is-summary {
  border-top: 2px solid #38bdf8;
}
.story-guard-box.is-guard {
  border-top: 2px solid #34d399;
}
.story-guard-box.is-rejected {
  border-top: 2px solid #f87171;
}
.story-guard-hdr {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
  color: #cbd5e1;
}
.story-guard-box.is-summary .story-guard-hdr { color: #7dd3fc; }
.story-guard-box.is-guard .story-guard-hdr { color: #6ee7b7; }
.story-guard-box.is-rejected .story-guard-hdr { color: #fca5a5; }

.story-ep-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.story-ep-card {
  border-radius: 6px;
  border: 1px solid rgba(71, 85, 105, 0.68);
  background: #101726;
  overflow: hidden;
}
.story-ep-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 7px;
  padding: 8px 11px;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(51, 65, 85, 0.65);
}
.story-ep-decision {
  padding: 8px 11px;
  font-size: 12.2px;
  line-height: 1.56;
  color: #fef3c7;
  background: rgba(30, 41, 59, 0.55);
  border-left: 3px solid #fbbf24;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

/* 전 탭 공용 스토리 연대기 모달 & 원스탑 저장 모달 */
.kw-story-modal-box {
  width: min(1140px, 96vw);
  max-height: 90vh;
}
.kw-onestop-modal-box {
  width: min(760px, 96vw);
  max-height: 90vh;
}

@media (max-width: 960px) {
  .story-guard-grid {
    grid-template-columns: 1fr;
  }
  .chat-qtoc-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .chat-top-mode-bar {
    width: 100%;
  }
  .chat-mode-btn {
    flex: 1 0 auto;
    text-align: center;
    padding: 0 8px;
    font-size: 11px;
  }
  .chat-qa-set-hdr,
  .story-ep-hdr {
    padding: 6px 8px;
  }
  .chat-md-body,
  .chat-raw-pre {
    padding: 8px 9px;
    font-size: 12.3px;
  }
  .kw-story-modal-box,
  .kw-onestop-modal-box {
    width: 96vw !important;
    max-width: 96vw !important;
    max-height: 91vh !important;
  }
}

@media (max-width: 480px) {
  .chat-sel-action-bar {
    padding: 6px 8px;
  }
  .story-master-card {
    padding: 8px 9px;
  }
  .story-guard-box {
    padding: 7px 8px;
    font-size: 11.5px;
  }
  .chat-noise-fold-bar,
  .chat-interim-fold-bar {
    padding: 5px 8px;
    font-size: 10.8px;
  }
}

/* =========================================================================
   공용 쉬운 상세 해설 (일상 비유 풀이) & 핵심 용어 사전 — 4.매매일지 / 1.오늘할일 공유
   ========================================================================= */
.plain-digest-drawer {
  border: 1px solid rgba(52, 211, 153, 0.48);
  background: linear-gradient(180deg, rgba(13, 25, 38, 0.94), rgba(10, 16, 28, 0.96));
}
.plain-digest-summary {
  background: rgba(16, 185, 129, 0.09);
}
.plain-digest-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(52, 211, 153, 0.68);
  color: #6ee7b7;
  white-space: nowrap;
}
.plain-digest-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plain-dual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.plain-ai-card {
  border-radius: 6px;
  padding: 9px 11px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(71, 85, 105, 0.62);
  min-width: 0;
}
.plain-ai-card.is-gemini {
  border-top: 2px solid #38bdf8;
}
.plain-ai-card.is-claude {
  border-top: 2px solid #f59e0b;
}
.plain-ai-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 5px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.58);
  font-size: 11.5px;
}
.plain-md-box {
  font-size: 12.2px;
  line-height: 1.62;
  color: #e2e8f0;
  word-break: keep-all;
}
.plain-md-h3 {
  font-size: 12.8px;
  font-weight: 800;
  color: #a7f3d0;
  margin: 0 0 7px 0;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(52, 211, 153, 0.28);
}
.plain-md-ul {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.plain-md-ul > li {
  line-height: 1.6;
}
.plain-md-subul {
  list-style: none;
  margin: 5px 0 2px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.plain-md-subli {
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(9, 13, 22, 0.48);
  border-left: 2px solid rgba(148, 163, 184, 0.45);
  font-size: 11.8px;
  line-height: 1.58;
}
.plain-sent-line {
  display: block;
}
.plain-sent-line + .plain-sent-line {
  margin-top: 4px;
}
.plain-lead-key {
  color: #fde68a;
  font-weight: 800;
}
.ai-num-up {
  color: #fda4af;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.ai-num-dn {
  color: #93c5fd;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.ai-paren-note {
  color: #94a3b8;
  font-size: 0.94em;
}
.ai-exec-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ai-exec-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(9, 13, 22, 0.44);
  border-left: 2px solid rgba(148, 163, 184, 0.42);
}
.ai-exec-row.is-mkt { border-left-color: rgba(56, 189, 248, 0.68); }
.ai-exec-row.is-edge { border-left-color: rgba(251, 191, 36, 0.68); }
.ai-exec-row.is-par { border-left-color: rgba(45, 212, 191, 0.68); }
.ai-exec-row.is-risk { border-left-color: rgba(244, 114, 182, 0.65); }
.ai-exec-row.is-data { border-left-color: rgba(52, 211, 153, 0.65); }
.ai-exec-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 19px;
  padding: 0 5px;
  margin-top: 1px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(100, 116, 139, 0.48);
  color: #cbd5e1;
}
.ai-exec-tag.is-mkt { color: #7dd3fc; border-color: rgba(56, 189, 248, 0.45); background: rgba(14, 116, 144, 0.2); }
.ai-exec-tag.is-edge { color: #fde68a; border-color: rgba(251, 191, 36, 0.45); background: rgba(120, 53, 15, 0.22); }
.ai-exec-tag.is-par { color: #5eead4; border-color: rgba(45, 212, 191, 0.45); background: rgba(15, 118, 110, 0.2); }
.ai-exec-tag.is-risk { color: #fbcfe8; border-color: rgba(244, 114, 182, 0.45); background: rgba(131, 24, 67, 0.2); }
.ai-exec-tag.is-data { color: #6ee7b7; border-color: rgba(52, 211, 153, 0.45); background: rgba(6, 78, 59, 0.22); }
.ai-exec-sents {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ai-exec-sent {
  font-size: 12px;
  line-height: 1.58;
  color: #e2e8f0;
  word-break: keep-all;
}
@media (max-width: 540px) {
  .ai-exec-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .ai-exec-tag {
    justify-self: start;
  }
}
.plain-md-step {
  padding: 5px 8px;
  margin-bottom: 4px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.78);
  border-left: 2px solid #34d399;
  font-size: 12px;
  line-height: 1.56;
  color: #f1f5f9;
}
.plain-md-p {
  margin: 4px 0;
  line-height: 1.6;
}
.plain-inline-code {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.3px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(100, 116, 139, 0.55);
  color: #fde68a;
}

.plain-issues-sec {
  padding: 9px 10px;
  border-radius: 6px;
  background: rgba(12, 18, 32, 0.88);
  border: 1px solid rgba(251, 191, 36, 0.34);
}
.plain-sec-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}
.plain-issues-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.plain-issue-card {
  padding: 7px 9px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(71, 85, 105, 0.58);
}
.plain-issue-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.plain-st-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
}
.plain-st-pill.is-resolved {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.6);
  color: #6ee7b7;
}
.plain-st-pill.is-rejected {
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.52);
  color: #cbd5e1;
}
.plain-st-pill.is-open {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.62);
  color: #fde68a;
}

/* 1.데이터/운영 #tbodyDerivedIssues 내부에도 그대로 끼워 넣을 수 있는 공용 블록 */
.plain-issue-banner {
  margin-top: 5px;
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(6, 78, 59, 0.22);
  border: 1px solid rgba(52, 211, 153, 0.42);
}
.plain-issue-analogy-line {
  font-size: 11.8px;
  font-weight: 700;
  color: #d1fae5;
  line-height: 1.48;
}
.plain-tag-chip {
  display: inline-block;
  padding: 1px 6px;
  margin-right: 4px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.26);
  border: 1px solid rgba(52, 211, 153, 0.65);
  color: #6ee7b7;
}
.plain-issue-details {
  margin-top: 5px;
}
.plain-issue-details > summary {
  list-style: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: #7dd3fc;
  user-select: none;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(56, 189, 248, 0.24);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.plain-issue-details > summary::-webkit-details-marker {
  display: none;
}
.plain-issue-details > summary::before {
  content: "▼";
  font-size: 9.5px;
  color: #38bdf8;
}
.plain-issue-details[open] > summary::before {
  content: "▲";
}
.plain-issue-details > summary:hover {
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.5);
}
.plain-issue-md-body {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed rgba(71, 85, 105, 0.55);
}
.plain-issue-resnote {
  margin-top: 5px;
  padding: 4px 7px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.11);
  border-left: 2px solid #34d399;
  font-size: 10.8px;
  color: #a7f3d0;
  line-height: 1.45;
}

/* 쉬운 용어 비유 사전 — 1줄 슬림 검색바 & 필요 시 펼침 서랍 */
.plain-glossary-wrap {
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(11, 17, 30, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.28);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.plain-glossary-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.plain-glossary-title {
  font-size: 11px;
  font-weight: 800;
  color: #93c5fd;
  white-space: nowrap;
  flex-shrink: 0;
}
.plain-glossary-search {
  flex: 1 1 180px;
  min-width: 130px;
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(71, 85, 105, 0.72);
  color: #e2e8f0;
  font-size: 11px;
  outline: none;
}
.plain-glossary-search:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
}
.plain-glossary-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.plain-glossary-toggle-btn,
.plain-glossary-jump-btn {
  height: 24px;
  padding: 0 8px;
  font-size: 10.5px;
  white-space: nowrap;
}
.plain-glossary-jump-btn {
  border-color: rgba(251, 191, 36, 0.45);
  color: #fde68a;
}
.plain-glossary-drawer-body {
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px dashed rgba(71, 85, 105, 0.55);
}
.plain-term-strip-scroll {
  max-height: 210px;
  overflow-y: auto;
  padding-right: 2px;
}
.plain-term-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.plain-term-pill {
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(96, 165, 250, 0.45);
  color: #dbeafe;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.plain-term-pill:hover,
.plain-term-pill.active {
  background: rgba(56, 189, 248, 0.24);
  border-color: #38bdf8;
  color: #ffffff;
}
.plain-term-q {
  display: inline-block;
  margin-left: 2px;
  color: #fbbf24;
  font-family: var(--font-mono);
  font-weight: 800;
}
.plain-term-focus-box {
  padding: 8px 10px;
  border-radius: 5px;
  background: rgba(20, 32, 54, 0.94);
  border: 1px solid rgba(251, 191, 36, 0.55);
}
.plain-gloss-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.plain-gloss-card {
  padding: 7px 9px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(71, 85, 105, 0.55);
}
.plain-gloss-hdr {
  font-size: 11.8px;
  font-weight: 800;
  color: #93c5fd;
  margin-bottom: 3px;
}
.plain-gloss-analogy {
  font-size: 11.4px;
  font-weight: 700;
  color: #fde68a;
  margin-bottom: 3px;
  line-height: 1.44;
}
.plain-gloss-desc {
  font-size: 11.2px;
  color: #cbd5e1;
  line-height: 1.48;
}

@media (max-width: 960px) {
  .plain-dual-grid {
    grid-template-columns: 1fr;
  }
  .plain-gloss-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .plain-ai-card,
  .plain-issues-sec,
  .plain-glossary-wrap {
    padding: 8px;
  }
  .plain-md-box {
    font-size: 12px;
  }
  .plain-term-strip {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .plain-term-strip.plain-term-strip-scroll {
    flex-wrap: wrap;
    overflow-x: hidden;
  }
  .plain-glossary-bar {
    gap: 5px;
  }
  .plain-glossary-search {
    flex: 1 1 100%;
    order: 3;
  }
}

@media (max-width: 480px) {
  .plain-issue-card {
    padding: 6px 7px;
  }
  .plain-md-step {
    padding: 4px 6px;
    font-size: 11.4px;
  }
  .plain-term-pill {
    height: 23px;
    padding: 0 7px;
    font-size: 10.5px;
  }
}

/* ========================================================================== */
/* [백테스트 쉬운해설 박스 — 1.오늘할일 & 6.무기전시관 연동]                     */
/* ========================================================================== */
.exp-plain-box {
  margin-bottom: 9px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(15, 28, 46, 0.94) 0%, rgba(15, 23, 42, 0.90) 100%);
  border: 1px solid rgba(56, 189, 248, 0.48);
  overflow: hidden;
}
.exp-plain-box.is-pass {
  border-color: rgba(52, 211, 153, 0.52);
}
.exp-plain-box.is-rej {
  border-color: rgba(248, 113, 113, 0.48);
}
.exp-plain-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(30, 41, 59, 0.72);
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.exp-plain-head::-webkit-details-marker {
  display: none;
}
.exp-plain-title {
  font-size: 12px;
  font-weight: 800;
  color: #fde68a;
}
.exp-plain-box.is-pass .exp-plain-title {
  color: #6ee7b7;
}
.exp-plain-box.is-rej .exp-plain-title {
  color: #fca5a5;
}
.exp-plain-body {
  padding: 8px 11px;
  font-size: 12px;
  line-height: 1.56;
  color: #e2e8f0;
  border-top: 1px solid rgba(71, 85, 105, 0.42);
}
.exp-plain-mini {
  margin: 4px 0;
  border-radius: 4px;
  background: rgba(30, 41, 59, 0.74);
  border: 1px dashed rgba(125, 211, 252, 0.42);
}
.exp-plain-mini > summary {
  padding: 3px 6px;
  font-size: 10.4px;
  font-weight: 800;
  color: #bae6fd;
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.exp-plain-mini > summary::-webkit-details-marker {
  display: none;
}
.exp-plain-mini-body {
  padding: 5px 7px;
  font-size: 10.8px;
  line-height: 1.46;
  color: #e2e8f0;
  border-top: 1px solid rgba(71, 85, 105, 0.4);
}
.exp-plain-inline {
  margin-top: 3px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(30, 41, 59, 0.62);
  border-left: 2px solid #38bdf8;
  font-size: 11px;
  line-height: 1.4;
  color: #cbd5e1;
}
.exp-plain-inline.is-pass {
  border-left-color: #34d399;
}
.exp-plain-inline.is-rej {
  border-left-color: #f87171;
}
@media (max-width: 768px) {
  .exp-plain-head {
    padding: 6px 8px;
    flex-wrap: wrap;
  }
  .exp-plain-body {
    padding: 7px 8px;
    font-size: 11.6px;
  }
}
@media (max-width: 480px) {
  .exp-plain-title {
    font-size: 11.3px;
  }
  .exp-plain-body {
    padding: 6px 7px;
    font-size: 11.3px;
  }
  .exp-plain-inline {
    font-size: 10.5px;
  }
}

/* ===== 전 화면 공통 원클릭 표준 참조코드(REF_CODE) 복사 배지 ===== */
.kw-ref-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 5.5px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 9.8px;
  font-weight: 800;
  line-height: 1;
  white-space: pre;
  letter-spacing: 0.01em;
  color: #bae6fd;
  background: rgba(14, 116, 144, 0.24);
  border: 1px solid rgba(56, 189, 248, 0.52);
  cursor: pointer;
  vertical-align: middle;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.kw-ref-badge:hover {
  background: rgba(14, 165, 233, 0.34);
  border-color: #7dd3fc;
  color: #f8fafc;
}
.kw-ref-badge:active,
.kw-ref-badge.is-copied {
  background: rgba(16, 185, 129, 0.28);
  border-color: #34d399;
  color: #a7f3d0;
}
@media (max-width: 768px) {
  .kw-ref-badge {
    min-height: 21px;
    padding: 0 6.5px;
    font-size: 9.8px;
  }
}
@media (max-width: 480px) {
  .kw-ref-badge {
    min-height: 22px;
    padding: 0 6px;
    font-size: 9.5px;
  }
}

/* ===== [TODO-35 · TODO-36] 실전 슬리피지·마찰진단 (1·5탭) & 반자동 Shadow 전진관찰·무매매방어 (7탭) ===== */
.kw-slip-grid,
.kw-shadow-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.kw-slip-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.kw-slip-card,
.kw-shadow-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(9, 13, 22, 0.90) 100%);
  border: 1px solid rgba(71, 85, 105, 0.55);
  border-radius: 5px;
  padding: 7px 9px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kw-slip-num {
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  white-space: pre;
}
.kw-grad-bar-track {
  width: 100%;
  height: 7px;
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(71, 85, 105, 0.55);
  border-radius: 999px;
  overflow: hidden;
}
.kw-grad-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8 0%, #34d399 100%);
  border-radius: 999px;
  transition: width 0.25s ease;
}
.kw-shadow-guide-box {
  padding: 7px 10px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.38);
  border-left: 3px solid #38bdf8;
  font-size: 11.5px;
  line-height: 1.5;
  color: #e2e8f0;
}
.kw-shadow-cand-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(100, 116, 139, 0.52);
  background: rgba(15, 23, 42, 0.85);
  color: #cbd5e1;
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  cursor: pointer;
}
.kw-shadow-cand-tab.is-active {
  border-color: rgba(52, 211, 153, 0.78);
  background: rgba(16, 185, 129, 0.16);
  color: #ecfdf5;
  font-weight: 800;
}
@media (max-width: 768px) {
  .kw-slip-grid,
  .kw-shadow-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .kw-slip-two-col {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
@media (max-width: 480px) {
  .kw-slip-grid,
  .kw-shadow-kpi-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .kw-slip-card,
  .kw-shadow-card {
    padding: 6px 8px;
  }
  .kw-shadow-guide-box {
    font-size: 11px;
    padding: 6px 8px;
  }
}

/* ==========================================================================
   7.시스템지도 (tab9_sysmap) — 중심코어 ➔ 동심원 궤도 확장형 3D 홀로그램 생태계 맵
   ========================================================================== */
.sysmap-root-panel {
  border-color: rgba(56, 189, 248, 0.42);
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
}
.sysmap-root-panel.sysmap-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9500;
  margin: 0;
  border-radius: 0;
  background: #040812;
  height: 100dvh;
}
.sysmap-top-head {
  background: rgba(15, 23, 42, 0.96);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 7px 10px;
}
.sysmap-title-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.sysmap-live-summary-pill {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
}
.sysmap-toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.sysmap-search-box {
  display: flex;
  align-items: center;
  gap: 4px;
}
.sysmap-search-input {
  width: 225px;
  height: 25px;
  font-size: 11px;
  padding: 0 8px;
}
.sysmap-clear-btn {
  height: 25px;
  padding: 0 7px;
  font-size: 10.5px;
}
.sysmap-level-group {
  display: inline-flex;
  border: 1px solid rgba(100, 116, 139, 0.45);
  border-radius: 4px;
  overflow: hidden;
}
.sysmap-lvl-btn {
  border: none;
  border-right: 1px solid rgba(100, 116, 139, 0.35);
  border-radius: 0;
  height: 25px;
  padding: 0 8px;
  font-size: 10.8px;
  background: rgba(15, 23, 42, 0.85);
  color: #94a3b8;
}
.sysmap-lvl-btn:last-child {
  border-right: none;
}
.sysmap-lvl-btn.active {
  background: rgba(56, 189, 248, 0.22);
  color: #7dd3fc;
  font-weight: 800;
}

.sysmap-filter-strip {
  padding: 6px 10px;
  background: rgba(11, 16, 28, 0.94);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sysmap-flow-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}
.sysmap-flow-chip {
  flex: 0 0 auto;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(100, 116, 139, 0.42);
  background: rgba(15, 23, 42, 0.88);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.sysmap-flow-chip:hover {
  border-color: rgba(56, 189, 248, 0.65);
  color: #f8fafc;
}
.sysmap-flow-chip.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #7dd3fc;
  font-weight: 800;
}

.sysmap-timeline-ribbon {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
.sysmap-tl-prefix {
  flex: 0 0 auto;
  color: #94a3b8;
  font-weight: 800;
  margin-right: 2px;
}
.sysmap-tl-sep {
  flex: 0 0 auto;
  color: #475569;
  font-size: 10px;
}
.sysmap-tl-pill {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(71, 85, 105, 0.55);
  background: rgba(15, 23, 42, 0.85);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 10.3px;
  cursor: pointer;
  white-space: nowrap;
}
.sysmap-tl-pill.st-done {
  border-color: rgba(52, 211, 153, 0.42);
  color: #6ee7b7;
}
.sysmap-tl-pill.st-run {
  border-color: rgba(251, 191, 36, 0.65);
  color: #fde68a;
}
.sysmap-tl-pill.st-fail {
  border-color: rgba(248, 113, 113, 0.65);
  color: #fca5a5;
}
.sysmap-tl-pill.st-skip {
  border-color: rgba(100, 116, 139, 0.45);
  color: #94a3b8;
  opacity: 0.78;
}
.sysmap-tl-pill.active {
  background: rgba(56, 189, 248, 0.26);
  border-color: #38bdf8;
  color: #f8fafc;
  font-weight: 800;
}

/* 메인 3D 캔버스 100% 전면 무대 + 우측 초투명 플로팅 상세 해설창 */
.sysmap-workspace {
  position: relative;
  display: block;
  min-height: 620px;
  height: calc(100vh - 235px);
  max-height: 880px;
  background: #040812;
  overflow: hidden;
}
.sysmap-workspace.insp-collapsed .sysmap-inspector {
  display: none;
}
.sysmap-root-panel.sysmap-fullscreen .sysmap-workspace {
  height: auto;
  max-height: none;
  flex: 1;
}

.sysmap-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #040812;
  touch-action: none;
  user-select: none;
}
.sysmap-3d-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}
.sysmap-viewport.is-grabbing .sysmap-3d-canvas {
  cursor: grabbing;
}

/* 초투명 소형 HUD · 상태 안내 · 광자 범례 (검은 배경 제거) */
.sysmap-mini-status {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 24;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(6, 11, 20, 0.22);
  border: 1px solid rgba(100, 116, 139, 0.28);
  font-size: 10.5px;
  color: #e2e8f0;
  text-shadow: 0 1px 3px rgba(2, 6, 14, 0.95);
  pointer-events: none;
}
.sysmap-hud-bar {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 28;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px 5px;
  border-radius: 6px;
  background: rgba(6, 11, 20, 0.26);
  border: 1px solid rgba(100, 116, 139, 0.30);
  backdrop-filter: blur(2px);
}
.sysmap-hud-btn {
  height: 24px;
  min-width: 26px;
  padding: 0 7px;
  border-radius: 4px;
  border: 1px solid rgba(100, 116, 139, 0.34);
  background: rgba(15, 23, 42, 0.32);
  color: #e2e8f0;
  text-shadow: 0 1px 2px rgba(2, 6, 14, 0.9);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.sysmap-hud-btn:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.20);
  color: #7dd3fc;
}
.sysmap-hud-btn.active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.24);
  color: #7dd3fc;
}
.sysmap-fs-btn {
  border-color: rgba(52, 211, 153, 0.5);
  color: #6ee7b7;
}
.sysmap-zoom-readout {
  min-width: 44px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: #7dd3fc;
  text-shadow: 0 1px 3px rgba(2, 6, 14, 0.95);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.sysmap-legend-box {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 24;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding: 4px 9px;
  border-radius: 5px;
  background: rgba(6, 11, 20, 0.20);
  border: 1px solid rgba(71, 85, 105, 0.28);
  font-size: 10.4px;
  color: #e2e8f0;
  text-shadow: 0 1px 3px rgba(2, 6, 14, 0.95);
  pointer-events: none;
}
.sysmap-leg-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sysmap-leg-item i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.sysmap-leg-hint {
  color: #cbd5e1;
  border-left: 1px solid rgba(100, 116, 139, 0.35);
  padding-left: 8px;
}

/* 우측(PC) / 하단 시트(스마트폰) 초투명 홀로그램 오버레이 인스펙터 */
.sysmap-inspector {
  position: absolute;
  top: 42px;
  right: 10px;
  bottom: 10px;
  width: 332px;
  z-index: 26;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.30);
  background: rgba(6, 12, 24, 0.22);
  backdrop-filter: blur(2.5px);
  -webkit-backdrop-filter: blur(2.5px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  text-shadow: 0 1px 3px rgba(2, 6, 14, 0.95);
}
.sysmap-insp-head {
  padding: 6px 10px;
  background: rgba(10, 18, 34, 0.24);
  border-bottom: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.sysmap-insp-head .btn {
  background: rgba(15, 23, 42, 0.30);
  border-color: rgba(100, 116, 139, 0.40);
}
.sysmap-insp-body {
  padding: 9px 10px;
  overflow-y: auto;
  flex: 1;
  font-size: 11.5px;
  scrollbar-width: thin;
}
.sysmap-insp-section {
  padding-bottom: 9px;
  margin-bottom: 9px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.24);
}
.sysmap-insp-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-bottom: 6px;
}
.sysmap-insp-zone-tag {
  font-size: 10.2px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #38bdf8;
  background: rgba(10, 18, 34, 0.22);
}
.sysmap-insp-metric {
  font-size: 10.4px;
  color: #6ee7b7;
  font-variant-numeric: tabular-nums;
}
.sysmap-insp-analogy {
  padding: 6px 9px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.18);
  border-left: 3px solid rgba(251, 191, 36, 0.85);
  color: #f8fafc;
  font-size: 11.4px;
  line-height: 1.48;
}
.sysmap-insp-io-box {
  font-size: 10.6px;
  color: #cbd5e1;
  line-height: 1.45;
  margin-top: 5px;
  padding: 4px 7px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(100, 116, 139, 0.24);
}
.sysmap-insp-sec-title {
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 5px;
}
.sysmap-conn-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sysmap-conn-btn {
  text-align: left;
  padding: 5px 7px;
  border-radius: 4px;
  border: 1px solid rgba(100, 116, 139, 0.34);
  background: rgba(15, 23, 42, 0.18);
  color: #f1f5f9;
  text-shadow: 0 1px 3px rgba(2, 6, 14, 0.95);
  font-size: 11px;
  line-height: 1.38;
  cursor: pointer;
}
.sysmap-conn-btn:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.20);
}
.sysmap-insp-list {
  margin: 0;
  padding-left: 16px;
  font-size: 10.6px;
  color: #e2e8f0;
  line-height: 1.5;
}

/* 스마트폰 · 태블릿 반응형 (<= 960px, <= 768px, <= 480px) */
@media (max-width: 960px) {
  .sysmap-workspace,
  .sysmap-workspace.insp-collapsed {
    height: min(68dvh, 560px);
    min-height: 360px;
    max-height: none;
  }
  .sysmap-root-panel.sysmap-fullscreen .sysmap-workspace {
    height: 100%;
    flex: 1;
  }
  .sysmap-inspector {
    display: none;
    top: auto;
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-height: 48%;
    z-index: 32;
    background: rgba(6, 12, 24, 0.34);
    backdrop-filter: blur(3.5px);
    -webkit-backdrop-filter: blur(3.5px);
    border: 1px solid rgba(56, 189, 248, 0.42);
  }
  .sysmap-inspector.mobile-open {
    display: flex;
  }
}

@media (max-width: 768px) {
  .sysmap-search-input {
    width: 165px;
  }
  .sysmap-mini-status {
    display: none !important;
  }
  .sysmap-leg-hint {
    display: none;
  }
  .sysmap-hud-bar {
    top: 6px;
    left: 6px;
    right: 6px;
    justify-content: flex-end;
    gap: 2px;
    padding: 3px 4px;
  }
  .sysmap-hud-btn {
    height: 25px;
    padding: 0 5px;
    font-size: 10.2px;
  }
  .sysmap-zoom-readout {
    min-width: 38px;
    font-size: 10.3px;
  }
}

@media (max-width: 480px) {
  .sysmap-toolbar-right {
    width: 100%;
    justify-content: space-between;
  }
  .sysmap-search-box {
    flex: 1;
  }
  .sysmap-search-input {
    width: 100%;
  }
  .sysmap-workspace,
  .sysmap-workspace.insp-collapsed {
    height: 58dvh;
    min-height: 335px;
  }
  .sysmap-legend-box {
    left: 6px;
    right: 6px;
    bottom: 6px;
    gap: 6px;
    font-size: 9.7px;
    padding: 3px 6px;
  }
}

/* =========================================================================
   무기별 전 생애주기 개발 계보 흐름도 (Weapon Development Lineage Pipeline)
   ========================================================================= */
.wpn-lineage-panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(9, 14, 26, 0.96) 100%);
  border: 1px solid rgba(168, 85, 247, 0.42);
  border-radius: 7px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.wpn-lin-rail {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px 2px;
}
.wpn-lin-step {
  flex: 1 0 215px;
  max-width: 310px;
  background: rgba(30, 41, 59, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.wpn-lin-step.is-deployed {
  border-color: rgba(52, 211, 153, 0.65);
  background: rgba(6, 78, 59, 0.24);
}
.wpn-lin-step.is-cand {
  border-color: rgba(56, 189, 248, 0.65);
  background: rgba(12, 74, 110, 0.24);
}
.wpn-lin-step.is-planned {
  border-style: dashed;
  border-color: rgba(167, 139, 250, 0.6);
  background: rgba(46, 16, 101, 0.18);
}
.wpn-lin-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-weight: 800;
  font-size: 13px;
  flex: 0 0 16px;
}
.wpn-lin-rej-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 6px;
  margin-top: 6px;
}
.wpn-lin-rej-card {
  background: rgba(69, 10, 10, 0.22);
  border: 1px solid rgba(248, 113, 113, 0.42);
  border-left: 3px solid #f87171;
  border-radius: 5px;
  padding: 6px 9px;
  font-size: 11.2px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.wpn-lin-overview-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(51, 65, 85, 0.85);
  margin-bottom: 5px;
  cursor: pointer;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.wpn-lin-overview-row:hover {
  border-color: rgba(192, 132, 252, 0.65);
  background: rgba(30, 41, 59, 0.85);
}
@media (max-width: 680px) {
  .wpn-lin-overview-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

/* =========================================================================
   6.무기전시관 스마트폰(Mobile <= 768px / <= 480px) 우측 경계 초과·잘림 완전 차단
   ========================================================================= */
#pane_armory,
#pane_armory .panel,
#pane_armory .panel-head,
#pane_armory .panel-body,
#pane_armory .control-bar,
#pane_armory .ctrl-group,
#pane_armory .btn-row,
#pane_armory .kpi-grid,
#pane_armory .kpi-grid-4,
#pane_armory .kpi-card,
#pane_armory .cv-drawer,
#pane_armory .cv-drawer-summary,
#pane_armory .cv-drawer-summary > *,
#pane_armory .cv-drawer-body,
#pane_armory .armory-3d-split,
#pane_armory .armory-3d-split > *,
#pane_armory .armory-stage-col,
#pane_armory .armory-canvas-box,
#pane_armory .armory-sim-bar,
#pane_armory .armory-slot-strip,
#pane_armory .arm-slot-chip,
#pane_armory .armory-inspector-col,
#pane_armory .arm-insp-head,
#pane_armory .arm-insp-metrics,
#pane_armory .arm-m-cell,
#pane_armory .arm-insp-compact-list,
#pane_armory .arm-insp-crow,
#pane_armory .arm-insp-cval,
#pane_armory .arm-subtab-pane,
#pane_armory .arm-subpane-toolbar,
#pane_armory .arm-podium-dual-grid,
#pane_armory .arm-podium-panel,
#pane_armory .arm-podium-top3,
#pane_armory .arm-medal-plaque,
#pane_armory .arm-podium-subrow,
#pane_armory .arm-subsec-box,
#pane_armory .arm-macro-summary-grid,
#pane_armory .arm-macro-card,
#pane_armory .arm-cl-weapon-grid,
#pane_armory .arm-cl-wcard,
#pane_armory .arm-cl-list,
#pane_armory .arm-cl-card,
#pane_armory .arm-cl-diff-grid,
#pane_armory .arm-cl-diff-box,
#pane_armory .arm-cl-metrics-bar,
#pane_armory .arm-cl-mcell,
#pane_armory .armory-history-list,
#pane_armory .arm-hist-card,
#pane_armory .arm-hist-head,
#pane_armory .arm-hist-head > *,
#pane_armory .arm-tri-grid,
#pane_armory .arm-voice-box,
#pane_armory .arm-gov-grid,
#pane_armory .arm-gov-card,
#pane_armory .wpn-lineage-panel,
#pane_armory .qvs-board,
#pane_armory .qvs-dual-grid,
#pane_armory .qvs-sec,
#pane_armory .table-wrap {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#pane_armory .arm-podium-dual-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#pane_armory .arm-cl-wcard {
  overflow: hidden;
}

#pane_armory select,
#pane_armory select.ctrl {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 1120px) {
  #pane_armory .armory-3d-split,
  #pane_armory .arm-podium-dual-grid,
  #pane_armory .arm-podium-top3,
  #pane_armory .arm-macro-summary-grid,
  #pane_armory .arm-tri-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  #pane_armory {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  #pane_armory .cv-inline-pill,
  #pane_armory .kpi-title,
  #pane_armory .kpi-val,
  #pane_armory .kpi-sub,
  #pane_armory .arm-m-sub,
  #pane_armory .arm-cl-mcell .val,
  #pane_armory .arm-cl-wcard-sub,
  #pane_armory .arm-gov-sched,
  #pane_armory .arm-gov-tag,
  #pane_armory .arm-gov-livebar,
  #pane_armory .arm-medal-kpi,
  #pane_armory .arm-medal-sub,
  #pane_armory .arm-podium-subrow,
  #pane_armory .arm-hist-title,
  #pane_armory .arm-hist-proof,
  #pane_armory .arm-insp-code-inline,
  #pane_armory .qvs-verdict-pill,
  #pane_armory .qvs-parity-bar {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #pane_armory .arm-cl-wcard-top {
    flex-wrap: wrap;
    gap: 2px;
  }

  #pane_armory .arm-gov-grid,
  #pane_armory .arm-cl-diff-grid,
  #pane_armory .qvs-dual-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #pane_armory .arm-cl-metrics-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #pane_armory .arm-cl-metrics-bar .arm-cl-mcell:first-child {
    grid-column: 1 / -1;
  }

  #pane_armory .armory-canvas-box {
    width: 100%;
    max-width: 100%;
    height: 335px;
  }

  #pane_armory .armory-hud-tl {
    left: 6px;
    right: 6px;
    max-width: calc(100% - 12px);
    overflow: hidden;
    white-space: nowrap;
    font-size: 9.4px;
    padding: 3px 6px;
  }
  #pane_armory .armory-hud-tl .armory-hud-row {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }

  #pane_armory .armory-sim-bar {
    padding: 5px 6px;
    gap: 4px;
  }
  #pane_armory .armory-sim-bar .btn-sm {
    height: 24px;
    padding: 0 6px;
    font-size: 10.5px;
  }

  /* 스마트폰에서 개발 계보 흐름도는 가로 잘림 대신 세로 카드 체인으로 자동 전환 */
  #pane_armory .wpn-lin-rail {
    flex-direction: column;
    overflow-x: visible;
    gap: 4px;
  }
  #pane_armory .wpn-lin-step {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  #pane_armory .wpn-lin-arrow {
    flex: 0 0 auto;
    height: 14px;
    transform: rotate(90deg);
  }

  #pane_armory .arm-subpane-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  #pane_armory .arm-subpane-toolbar .btn-row {
    width: 100%;
  }
  #pane_armory .arm-subpane-toolbar select {
    flex: 1 1 140px;
    width: 100%;
  }
}

@media (max-width: 480px) {
  #pane_armory .armory-canvas-box {
    height: 300px;
  }
  #pane_armory .arm-insp-metrics {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 5px;
  }
  #pane_armory .arm-insp-crow {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }
  #pane_armory .arm-cl-weapon-grid,
  #pane_armory .armory-slot-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  #pane_armory .arm-cl-metrics-bar {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* =========================================================================
   [전 화면 스마트폰 우측 경계 넘침 · 캔버스 잘림 원천 차단 가드 (Tabs 1~7, 9)]
   ========================================================================= */
#pane_db,
#pane_opt,
#pane_chart,
#pane_trade,
#pane_journal,
#pane_chat,
#pane_lab,
#pane_sysmap {
  max-width: 100%;
  overflow-x: clip;
  box-sizing: border-box;
}

#pane_db .panel,
#pane_opt .panel,
#pane_chart .panel,
#pane_trade .panel,
#pane_journal .panel,
#pane_chat .panel,
#pane_lab .panel,
#pane_sysmap .panel,
#pane_db .kpi-card,
#pane_opt .kpi-card,
#pane_chart .kpi-card,
#pane_trade .kpi-card,
#pane_journal .kpi-card,
#pane_chat .kpi-card,
#pane_lab .kpi-card,
#pane_sysmap .kpi-card,
#pane_db .kw-drawer,
#pane_opt .kw-drawer,
#pane_chart .kw-drawer,
#pane_trade .kw-drawer,
#pane_journal .kw-drawer,
#pane_chat .kw-drawer,
#pane_lab .kw-drawer,
#pane_sysmap .kw-drawer,
#pane_sysmap .sysmap-viewport,
#pane_chart .chart-box {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#pane_chart .chart-box canvas,
#pane_sysmap .sysmap-viewport canvas {
  display: block;
  max-width: 100%;
}

@media (max-width: 768px) {
  #pane_db .panel-head,
  #pane_opt .panel-head,
  #pane_chart .panel-head,
  #pane_trade .panel-head,
  #pane_journal .panel-head,
  #pane_chat .panel-head,
  #pane_lab .panel-head,
  #pane_sysmap .panel-head,
  #pane_db .kw-drawer > summary,
  #pane_opt .kw-drawer > summary,
  #pane_chart .kw-drawer > summary,
  #pane_trade .kw-drawer > summary,
  #pane_journal .kw-drawer > summary,
  #pane_chat .kw-drawer > summary,
  #pane_lab .kw-drawer > summary,
  #pane_sysmap .kw-drawer > summary,
  #pane_db .kw-flow-strip,
  #pane_opt .kw-flow-strip,
  #pane_chart .kw-flow-strip,
  #pane_trade .kw-flow-strip,
  #pane_journal .kw-flow-strip,
  #pane_chat .kw-flow-strip,
  #pane_lab .kw-flow-strip,
  #pane_sysmap .kw-flow-strip,
  #pane_db .ctrl-strip,
  #pane_opt .ctrl-strip,
  #pane_chart .ctrl-strip,
  #pane_trade .ctrl-strip,
  #pane_journal .ctrl-strip,
  #pane_chat .ctrl-strip,
  #pane_lab .ctrl-strip,
  #pane_sysmap .ctrl-strip {
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
    gap: 5px;
    box-sizing: border-box;
  }

  #pane_db .panel-title,
  #pane_opt .panel-title,
  #pane_chart .panel-title,
  #pane_trade .panel-title,
  #pane_journal .panel-title,
  #pane_chat .panel-title,
  #pane_lab .panel-title,
  #pane_sysmap .panel-title,
  #pane_db .cv-inline-pill,
  #pane_opt .cv-inline-pill,
  #pane_chart .cv-inline-pill,
  #pane_trade .cv-inline-pill,
  #pane_journal .cv-inline-pill,
  #pane_chat .cv-inline-pill,
  #pane_lab .cv-inline-pill,
  #pane_sysmap .cv-inline-pill,
  #pane_db .kw-flow-step,
  #pane_opt .kw-flow-step,
  #pane_chart .kw-flow-step,
  #pane_trade .kw-flow-step,
  #pane_journal .kw-flow-step,
  #pane_chat .kw-flow-step,
  #pane_lab .kw-flow-step,
  #pane_sysmap .kw-flow-step,
  #pane_db .kpi-label,
  #pane_opt .kpi-label,
  #pane_chart .kpi-label,
  #pane_trade .kpi-label,
  #pane_journal .kpi-label,
  #pane_chat .kpi-label,
  #pane_lab .kpi-label,
  #pane_sysmap .kpi-label,
  #pane_db .kpi-sub,
  #pane_opt .kpi-sub,
  #pane_chart .kpi-sub,
  #pane_trade .kpi-sub,
  #pane_journal .kpi-sub,
  #pane_chat .kpi-sub,
  #pane_lab .kpi-sub,
  #pane_sysmap .kpi-sub {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
    max-width: 100%;
  }

  #pane_db select,
  #pane_opt select,
  #pane_chart select,
  #pane_trade select,
  #pane_journal select,
  #pane_chat select,
  #pane_lab select,
  #pane_sysmap select,
  #pane_db input[type="text"],
  #pane_opt input[type="text"],
  #pane_chart input[type="text"],
  #pane_trade input[type="text"],
  #pane_journal input[type="text"],
  #pane_chat input[type="text"],
  #pane_lab input[type="text"],
  #pane_sysmap input[type="text"] {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }

  /* 1.오늘할일·3.자동매매·4.매매일지 반응형 그리드 */
  #pane_db .ops-exec-grid,
  #pane_trade .kpi-grid-4,
  #pane_journal .kpi-grid-4,
  #pane_opt .kpi-grid-4,
  #pane_lab .kpi-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px;
  }

  #pane_db .split-grid,
  #pane_opt .split-grid,
  #pane_trade .split-grid,
  #pane_journal .split-grid,
  #pane_lab .split-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  /* 6.무기전시관 카드 및 SOP 스텝 보호 */
  #pane_opt .opt-card,
  #pane_lab .lab-card,
  #pane_lab .lab-sop-step,
  #pane_lab .lab-gate-card {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* 2.차트검증 상단 스트립 · OHLC · 봉 툴팁 경계 보호 */
  #pane_chart .chart-head,
  #pane_chart .ohlc-strip,
  #pane_chart .live-bar-status,
  #pane_chart .cv-dev-strip {
    flex-wrap: wrap !important;
    min-width: 0;
    max-width: 100%;
    white-space: normal !important;
    overflow-wrap: anywhere;
    gap: 4px 6px;
  }

  #chartBarTooltip {
    max-width: calc(100vw - 16px) !important;
    box-sizing: border-box;
    overflow-wrap: anywhere;
  }

  /* 5.대화기록 세션 선택창 · 카드 · 검색바 보호 */
  #pane_chat #selChatQuickSession {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  #pane_chat .chat-msg-card,
  #pane_chat .chat-msg-body,
  #pane_chat .chat-session-item {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-sizing: border-box;
  }
  #pane_chat .chat-msg-body pre {
    max-width: 100%;
    overflow-x: auto;
  }

  /* 7.시스템지도 3D 뷰포트 · HUD · 인스펙터 우측 넘침 방지 */
  #pane_sysmap .sysmap-hud-bar,
  #pane_sysmap .sysmap-legend-row,
  #pane_sysmap .sysmap-toolbar {
    flex-wrap: wrap !important;
    min-width: 0;
    max-width: 100%;
    gap: 4px 6px;
  }
  #pane_sysmap .sysmap-viewport {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
  }
  #pane_sysmap .sysmap-insp-box,
  #pane_sysmap .sysmap-tbl-card {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere;
    box-sizing: border-box;
  }

  /* 공통 문서 열람 모달 모바일 화면 안쪽 고정 */
  .ops-modal-box {
    width: calc(100vw - 14px) !important;
    max-width: calc(100vw - 14px) !important;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  #pane_db .ops-exec-grid,
  #pane_trade .kpi-grid-4,
  #pane_journal .kpi-grid-4,
  #pane_opt .kpi-grid-4,
  #pane_lab .kpi-grid-4,
  #pane_armory #labRoot .kpi-grid-4 {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 5px;
  }

  #pane_sysmap .sysmap-viewport {
    height: 310px;
  }
}

/* =========================================================================
   SPINE v3.0 단독두뇌 · SHADOW_LEAGUE 리그전 전광판 · 7탭 통합 UI 전용 스타일
   ========================================================================= */
.sl-board-panel {
  border: 1px solid rgba(56, 189, 248, 0.48);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(9, 13, 22, 0.94) 100%);
  margin-bottom: 10px;
}

.sl-traffic-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 상승(빨강)/하락(파랑)과 혼동되지 않도록 테두리+바탕+고유톤 구분 */
.sl-traffic-badge.is-green {
  border: 1.5px solid #34d399;
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}

.sl-traffic-badge.is-yellow {
  border: 1.5px solid #fbbf24;
  background: rgba(245, 158, 11, 0.20);
  color: #fde68a;
}

.sl-traffic-badge.is-red {
  border: 1.5px solid #e879f9;
  background: rgba(168, 85, 247, 0.22);
  color: #f5d0fe;
}

.sl-traffic-badge.is-wait {
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(30, 41, 59, 0.65);
  color: #cbd5e1;
}

.sl-headline-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 7px 10px;
  border-radius: 5px;
  border: 1px solid rgba(71, 85, 105, 0.65);
  background: rgba(15, 23, 42, 0.78);
  margin-bottom: 8px;
}

.sl-col-sealed {
  border-left: 2px dashed rgba(251, 191, 36, 0.55) !important;
  background: rgba(245, 158, 11, 0.07) !important;
}

.sl-role-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
}

.sl-role-pill.is-primary {
  border: 1px solid rgba(52, 211, 153, 0.72);
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}

.sl-role-pill.is-shadow {
  border: 1px solid rgba(56, 189, 248, 0.55);
  background: rgba(14, 165, 233, 0.14);
  color: #7dd3fc;
}

.sl-role-pill.is-disabled {
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(51, 65, 85, 0.45);
  color: #94a3b8;
}

.v3-arch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.v3-arch-card {
  padding: 8px 10px;
  border-radius: 5px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.78);
  min-width: 0;
}

.v3-live-hud-panel {
  border: 1px solid rgba(56, 189, 248, 0.52);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(9, 13, 22, 0.93) 100%);
  margin-bottom: 8px;
}

.v3-live-hud-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 8px;
  align-items: stretch;
}

.v3-live-metrics-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.v3-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(71, 85, 105, 0.7);
  background: rgba(15, 23, 42, 0.85);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: pre;
}

.arm-merged-lab-root {
  padding-top: 10px;
  border-top: 2px dashed rgba(168, 85, 247, 0.38);
}

/* SPINE v3.0 차트 장세 띠 알약 스타일 */
.regime-pill-V3_ALLOW {
  background: rgba(16, 185, 129, 0.24);
  border: 1px solid rgba(52, 211, 153, 0.78);
  color: #6ee7b7;
}

.regime-pill-V3_VETO {
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.75);
  color: #fde68a;
}

.regime-pill-V3_BLOCK {
  background: rgba(168, 85, 247, 0.22);
  border: 1px solid rgba(232, 121, 249, 0.72);
  color: #f5d0fe;
}

@media (max-width: 900px) {
  .v3-arch-grid,
  .v3-live-hud-grid {
    grid-template-columns: 1fr !important;
  }
  #pane_armory #labRoot select,
  #pane_armory #labRoot input[type="text"] {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }
  #pane_armory #labRoot .lab-card,
  #pane_armory #labRoot .lab-sop-step,
  #pane_armory #labRoot .lab-gate-card {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
}

/* [TODO-89] Dual-AI 2단 표준 규격 (10초 의사결정 카드 + 무손실 기술 정밀 차트 서랍) */
.kw-twotier-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}
.kw-10s-card,
.kw-10s-card.is-emerald {
  padding: 8px 10px;
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(6, 78, 59, 0.24) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(52, 211, 153, 0.45);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}
.kw-10s-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  margin-bottom: 5px;
}
.kw-10s-title {
  color: #6ee7b7;
  font-weight: 800;
}
.kw-10s-hdr-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}
.kw-10s-toggle-hint {
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
}
.kw-10s-card.is-sky {
  background: linear-gradient(180deg, rgba(12, 74, 110, 0.28) 0%, rgba(15, 23, 42, 0.92) 100%);
  border-color: rgba(56, 189, 248, 0.48);
}
.kw-10s-card.is-sky > .kw-10s-hdr .kw-10s-title { color: #7dd3fc; }
.kw-10s-card.is-sky > .kw-10s-hdr .kw-10s-pill {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.48);
  color: #7dd3fc;
}
.kw-10s-card.is-purple {
  background: linear-gradient(180deg, rgba(88, 28, 135, 0.25) 0%, rgba(15, 23, 42, 0.92) 100%);
  border-color: rgba(168, 85, 247, 0.48);
}
.kw-10s-card.is-purple > .kw-10s-hdr .kw-10s-title { color: #d8b4fe; }
.kw-10s-card.is-purple > .kw-10s-hdr .kw-10s-pill {
  background: rgba(168, 85, 247, 0.17);
  border-color: rgba(192, 132, 252, 0.48);
  color: #d8b4fe;
}
.kw-10s-card.is-amber {
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.24) 0%, rgba(15, 23, 42, 0.92) 100%);
  border-color: rgba(251, 191, 36, 0.46);
}
.kw-10s-card.is-amber > .kw-10s-hdr .kw-10s-title { color: #fde68a; }
.kw-10s-card.is-amber > .kw-10s-hdr .kw-10s-pill {
  background: rgba(245, 158, 11, 0.17);
  border-color: rgba(251, 191, 36, 0.48);
  color: #fde68a;
}
.kw-10s-card.is-slate {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.46) 0%, rgba(15, 23, 42, 0.92) 100%);
  border-color: rgba(148, 163, 184, 0.42);
}
.kw-10s-card.is-slate > .kw-10s-hdr .kw-10s-title { color: #e2e8f0; }
.kw-10s-card.is-slate > .kw-10s-hdr .kw-10s-pill {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.45);
  color: #cbd5e1;
}
details.kw-10s-card > summary.kw-10s-hdr {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
details.kw-10s-card > summary.kw-10s-hdr::-webkit-details-marker {
  display: none;
}
details.kw-10s-card:not([open]) > summary.kw-10s-hdr {
  margin-bottom: 0;
}
details.kw-10s-card[open] > summary.kw-10s-hdr .kw-10s-toggle-hint {
  color: #7dd3fc;
}
.kw-10s-pill {
  font-size: 9.8px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #6ee7b7;
}
.kw-10s-pill.is-legacy {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.42);
  color: #cbd5e1;
}
.kw-10s-author-pill {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  max-width: 100%;
  font-size: 9.8px;
  font-weight: 700;
  line-height: 1.35;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.52);
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}
.kw-10s-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kw-10s-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
  font-size: 11.7px;
  line-height: 1.48;
}
.kw-10s-k {
  font-size: 10.6px;
  font-weight: 800;
  color: #94a3b8;
  white-space: nowrap;
}
.kw-10s-v {
  min-width: 0;
  overflow-wrap: anywhere;
}
.kw-10s-sent {
  line-height: 1.5;
  margin-bottom: 2px;
}
.kw-10s-sent:last-child {
  margin-bottom: 0;
}
.kw-10s-structured {
  margin-bottom: 6px;
}
.kw-10s-structured + .kw-10s-rows {
  padding-top: 6px;
  border-top: 1px dashed rgba(52, 211, 153, 0.25);
}

/* [TODO-100] 1.오늘할일 AI 할일 큐 제목·목적·컨텍스트 3초 스캔 가독성 레이아웃 */
.todo-main-cell {
  white-space: normal !important;
  padding: 9px 11px !important;
  line-height: 1.48;
  overflow-wrap: anywhere;
  min-width: 300px;
}
.todo-title-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.todo-topic-tag {
  display: inline-block;
  font-size: 10.2px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.42);
  color: #7dd3fc;
  line-height: 1.35;
}
.todo-title-text {
  font-size: 12.5px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
}
.todo-title-wrap:hover .todo-title-text {
  color: #93c5fd;
  text-decoration: underline;
}
.todo-summary-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.62);
  border-left: 2px solid rgba(52, 211, 153, 0.55);
}
.todo-summary-box.is-done {
  border-left-color: rgba(16, 185, 129, 0.72);
  background: rgba(6, 78, 59, 0.16);
}
.todo-summary-box.is-run {
  border-left-color: rgba(56, 189, 248, 0.78);
  background: rgba(12, 74, 110, 0.18);
}
.todo-summary-box.is-fail {
  border-left-color: rgba(248, 113, 113, 0.8);
  background: rgba(127, 29, 29, 0.18);
}
.todo-summary-box.is-muted {
  border-left-color: rgba(148, 163, 184, 0.45);
}
.todo-goal-tag {
  align-self: flex-start;
  font-size: 9.8px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 3px;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.35);
}
.todo-goal-tag.is-run {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
}
.todo-goal-tag.is-fail {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(248, 113, 113, 0.42);
}
.todo-summary-body {
  font-size: 11.4px;
  line-height: 1.54;
  color: #cbd5e1;
}
.todo-body-sent {
  margin-bottom: 2px;
}
.todo-body-sent:last-child {
  margin-bottom: 0;
}
.todo-ctx-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.kw-10s-split-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.52;
  margin-bottom: 3px;
}
.kw-10s-split-item:last-child {
  margin-bottom: 0;
}
.kw-10s-split-tag {
  flex: 0 0 auto;
  font-size: 9.8px;
  font-weight: 800;
  padding: 0 5px;
  border-radius: 3px;
  margin-top: 2px;
}
.kw-10s-split-tag.is-gain {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.42);
}
.kw-10s-split-tag.is-risk {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.45);
}
.kw-10s-enum {
  display: inline-block;
  margin-right: 5px;
  font-weight: 800;
  color: #7dd3fc;
}
.kw-10s-body {
  padding-top: 5px;
  border-top: 1px dashed rgba(148, 163, 184, 0.22);
  min-width: 0;
  max-width: 100%;
}
.kw-10s-body.is-scroll-md {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 2px;
}
.kw-10s-body.is-scroll-lg {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 2px;
}
.kw-10s-subhdr {
  font-size: 10.8px;
  font-weight: 800;
  color: #93c5fd;
  padding: 4px 0 2px;
  margin-top: 4px;
  border-top: 1px dashed rgba(148, 163, 184, 0.25);
}
.kw-10s-subhdr:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.kw-10s-subhdr.is-append {
  color: #fde68a;
  margin-top: 7px;
  padding: 5px 7px 3px;
  border-top: 1px dashed rgba(251, 191, 36, 0.45);
  background: rgba(245, 158, 11, 0.09);
  border-radius: 3px;
}
.kw-10s-divider {
  border-top: 1px dashed rgba(148, 163, 184, 0.28);
  margin: 4px 0;
}
.kw-10s-item-title {
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 2px;
}
.kw-10s-item-meta {
  font-size: 10.4px;
  margin-bottom: 3px;
}
.kw-10s-v.is-strong {
  color: #f8fafc;
  font-weight: 700;
}
.kw-10s-sent.is-sub {
  padding-left: 10px;
  border-left: 2px solid rgba(148, 163, 184, 0.28);
  margin-top: 2px;
  color: #cbd5e1;
}
.kw-10s-sent.is-sub2 {
  padding-left: 18px;
  border-left: 2px solid rgba(148, 163, 184, 0.2);
  margin-top: 2px;
  color: #94a3b8;
  font-size: 11.2px;
}
.kw-10s-prog-chip {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 11px;
  color: #e2e8f0;
  padding: 1px 6px;
}
.kw-10s-code {
  margin: 3px 0;
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(71, 85, 105, 0.45);
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.kw-10s-tbl-wrap {
  margin: 4px 0;
  overflow-x: auto;
  max-width: 100%;
}
.kw-10s-origin-turn {
  margin-bottom: 7px;
  padding: 7px 9px;
  border-radius: 4px;
  background: rgba(9, 13, 22, 0.84);
  border: 1px solid rgba(71, 85, 105, 0.38);
  border-left: 3px solid #38bdf8;
}
.kw-10s-origin-turn.is-ai {
  border-left-color: #34d399;
}
.kw-tech-drawer {
  border: 1px solid rgba(71, 85, 105, 0.55);
  border-radius: 4px;
  background: rgba(9, 13, 22, 0.72);
  min-width: 0;
  max-width: 100%;
}
.kw-tech-summary {
  cursor: pointer;
  padding: 5px 9px;
  font-size: 10.8px;
  font-weight: 700;
  color: #93c5fd;
  background: rgba(15, 23, 42, 0.85);
  border-radius: 4px;
  user-select: none;
}
.kw-tech-body {
  padding: 8px 10px;
  border-top: 1px dashed rgba(71, 85, 105, 0.45);
  font-size: 11.8px;
  line-height: 1.54;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
@media (max-width: 640px) {
  .kw-10s-row {
    grid-template-columns: 1fr;
    gap: 1px;
  }
}

/* [TODO-108] SHADOW_LEAGUE 1+2군 통합 리더보드 · 스마트폰 반응형 카드 · 미니 전광판 & 바텀시트 모달 */
.lsb-mini-strip { width: 100%; max-width: 100%; overflow-x: hidden; box-sizing: border-box; margin-bottom: 6px; }
.lsb-mini-strip.is-compact-trade { margin-bottom: 5px; }
.lsb-mini-inner {
  display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 8px;
  border-radius: 5px; border: 1px solid rgba(56, 189, 248, 0.46);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(12, 20, 34, 0.94) 100%);
  cursor: pointer; min-width: 0; max-width: 100%; box-sizing: border-box;
}
.lsb-mini-inner:hover { border-color: rgba(125, 211, 252, 0.85); }
.lsb-mini-meta { font-size: 10.8px; color: #94a3b8; white-space: nowrap; flex-shrink: 0; }
.lsb-mini-rail {
  display: flex; align-items: center; gap: 5px; flex: 1 1 auto; min-width: 0;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.lsb-mini-rail::-webkit-scrollbar { display: none; }
.lsb-mini-chip {
  scroll-snap-align: start; flex: 0 0 auto; padding: 2px 7px; border-radius: 4px;
  border: 1px solid rgba(71, 85, 105, 0.65); background: rgba(30, 41, 59, 0.78);
  color: #e2e8f0; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.lsb-mini-chip.is-pri { border-color: rgba(52, 211, 153, 0.62); background: rgba(6, 78, 59, 0.28); }
.lsb-mini-chip.is-t2 { border-color: rgba(192, 132, 252, 0.55); color: #e9d5ff; }
.lsb-mini-open-btn {
  flex-shrink: 0; padding: 3px 8px; border-radius: 4px; border: 1px solid rgba(56, 189, 248, 0.58);
  background: rgba(14, 165, 233, 0.16); color: #7dd3fc; font-size: 10.8px; font-weight: 800; white-space: nowrap;
}
.lsb-root, .lsb-cards-list, .lsb-player-card {
  width: 100%; max-width: 100%; overflow-x: hidden; box-sizing: border-box; font-variant-numeric: tabular-nums;
}
.lsb-empty-box, .lsb-tier2-empty {
  padding: 9px 11px; border-radius: 5px; border: 1px dashed rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.68); color: #cbd5e1; font-size: 11.4px; line-height: 1.5;
}
.lsb-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }
.lsb-filter-chips, .lsb-viewmode-group { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.lsb-chip-btn, .lsb-vmode-btn {
  min-height: 34px; padding: 0 10px; border-radius: 999px; border: 1px solid rgba(100, 116, 139, 0.55);
  background: rgba(15, 23, 42, 0.86); color: #cbd5e1; font-size: 11px; font-weight: 700; cursor: pointer;
}
.lsb-vmode-btn { border-radius: 4px; padding: 0 8px; }
.lsb-chip-btn.active, .lsb-vmode-btn.active { border-color: rgba(56, 189, 248, 0.9); background: rgba(14, 165, 233, 0.24); color: #f0f9ff; font-weight: 800; }
.lsb-sec-hdr { font-size: 11px; font-weight: 800; color: #93c5fd; padding: 4px 2px; margin: 4px 0; }
.lsb-sec-hdr.is-tier2 { color: #d8b4fe; margin-top: 8px; }
.lsb-role-badge { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px; border-radius: 4px; font-size: 10.2px; font-weight: 800; }
.lsb-role-badge.is-primary { border: 1px solid rgba(52, 211, 153, 0.78); background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.lsb-role-badge.is-runnerup { border: 1px solid rgba(251, 191, 36, 0.75); background: rgba(245, 158, 11, 0.18); color: #fde68a; }
.lsb-role-badge.is-bench { border: 1px dashed rgba(56, 189, 248, 0.65); background: rgba(14, 165, 233, 0.14); color: #7dd3fc; }
.lsb-role-badge.is-tier2 { border: 1px solid rgba(192, 132, 252, 0.68); background: rgba(168, 85, 247, 0.18); color: #e9d5ff; }
.lsb-role-badge.is-locked, .lsb-role-badge.is-retired { border: 1px dashed rgba(148, 163, 184, 0.5); background: rgba(51, 65, 85, 0.45); color: #94a3b8; }
.lsb-gauge-track { width: 100%; min-width: 64px; height: 5px; border-radius: 999px; background: rgba(30, 41, 59, 0.92); overflow: hidden; margin-top: 3px; }
.lsb-gauge-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #38bdf8, #818cf8); }
.lsb-gauge-fill.is-pri { background: linear-gradient(90deg, #10b981, #34d399); }
.lsb-gauge-fill.is-t2 { background: linear-gradient(90deg, #a855f7, #e879f9); }
.lsb-view-switch.mode-auto .lsb-cards-list, .lsb-view-switch.mode-table .lsb-cards-list { display: none; }
.lsb-view-switch.mode-card .lsb-desktop-table-wrap { display: none; }
.lsb-view-switch.mode-card .lsb-cards-list { display: flex; flex-direction: column; gap: 7px; }
.lsb-player-card { padding: 8px 10px; border-radius: 6px; border: 1px solid rgba(71, 85, 105, 0.68); background: rgba(15, 23, 42, 0.86); }
.lsb-player-card.is-primary-card { border-color: rgba(52, 211, 153, 0.68); background: linear-gradient(180deg, rgba(6, 78, 59, 0.24) 0%, rgba(15, 23, 42, 0.9) 100%); }
.lsb-player-card.is-tier2-card { border-color: rgba(192, 132, 252, 0.52); }
.lsb-player-card.is-muted-card { opacity: 0.78; }
.lsb-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.lsb-card-ident { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 0; flex: 1 1 180px; }
.lsb-rank-pill { padding: 1px 6px; border-radius: 4px; background: rgba(251, 191, 36, 0.16); border: 1px solid rgba(251, 191, 36, 0.6); color: #fde68a; font-size: 11px; font-weight: 800; }
.lsb-rank-pill.is-pri { background: rgba(16, 185, 129, 0.22); border-color: #34d399; color: #a7f3d0; }
.lsb-rank-pill.is-tier2 { background: rgba(168, 85, 247, 0.2); border-color: #c084fc; color: #f3e8ff; }
.lsb-preset-tag { color: #f8fafc; font-size: 12px; overflow-wrap: anywhere; }
.lsb-exp-tag { font-size: 10px; color: #94a3b8; }
.lsb-card-scorebox { text-align: right; min-width: 112px; max-width: 100%; }
.lsb-score-num { font-size: 14px; font-weight: 800; color: #fde68a; }
.lsb-score-delta { font-size: 10.2px; white-space: normal; overflow-wrap: anywhere; }
.lsb-card-subname { font-size: 11px; color: #cbd5e1; margin: 4px 0 6px; overflow-wrap: anywhere; word-break: break-word; }
.lsb-card-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-bottom: 6px; }
.lsb-mcell { padding: 4px 5px; border-radius: 4px; background: rgba(9, 13, 22, 0.78); border: 1px solid rgba(51, 65, 85, 0.65); min-width: 0; text-align: center; }
.lsb-mlbl { display: block; font-size: 9.8px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lsb-mval { display: block; font-size: 11.2px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsb-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; min-height: 36px; padding-top: 5px; border-top: 1px dashed rgba(71, 85, 105, 0.5); }
.lsb-gate-pill { font-size: 10.5px; color: #93c5fd; overflow-wrap: anywhere; }
.lsb-card-actions { display: inline-flex; gap: 5px; align-items: center; }
.lsb-touch-btn { min-height: 34px; padding: 0 9px; border-radius: 4px; border: 1px solid rgba(100, 116, 139, 0.6); background: rgba(30, 41, 59, 0.88); color: #e2e8f0; font-size: 11px; font-weight: 700; cursor: pointer; }
.lsb-touch-btn.is-chart { border-color: rgba(56, 189, 248, 0.68); color: #7dd3fc; }
.lsb-card-drawer { margin-top: 6px; padding: 6px 8px; border-radius: 4px; background: rgba(9, 13, 22, 0.86); border: 1px dashed rgba(251, 191, 36, 0.45); font-size: 10.8px; }
.lsb-ro-banner { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-bottom: 5px; font-size: 10.2px; }
.lsb-ro-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; }
.lsb-dm-mobile { display: none; }
.lsb-dm-mcard { padding: 6px 8px; border-bottom: 1px solid rgba(51, 65, 85, 0.55); cursor: pointer; }
.lsb-dm-mhead { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; font-size: 11px; }
.lsb-dm-mgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 8px; font-size: 10.6px; }
.lsb-modal-backdrop { position: fixed; inset: 0; z-index: 9500; background: rgba(2, 6, 23, 0.78); display: none; align-items: center; justify-content: center; padding: 12px; }
.lsb-modal-sheet { width: min(1080px, 100%); max-height: 88vh; background: #131926; border: 1px solid rgba(56, 189, 248, 0.55); border-radius: 8px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 18px 42px rgba(0, 0, 0, 0.75); }
.lsb-modal-grabber { display: none; width: 42px; height: 4px; border-radius: 999px; background: rgba(148, 163, 184, 0.45); margin: 6px auto 2px; }
.lsb-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 8px 11px; background: #0f172a; border-bottom: 1px solid rgba(71, 85, 105, 0.6); }
.lsb-modal-title { font-size: 12px; font-weight: 800; color: #7dd3fc; }
.lsb-modal-body { padding: 9px 10px; overflow-y: auto; overflow-x: hidden; flex: 1 1 auto; }
@media (max-width: 768px) {
  .lsb-view-switch.mode-auto .lsb-desktop-table-wrap { display: none; }
  .lsb-view-switch.mode-auto .lsb-cards-list { display: flex; flex-direction: column; gap: 7px; }
  .lsb-dm-desktop, .lsb-mini-meta { display: none; }
  .lsb-dm-mobile { display: block; max-height: 280px; overflow-y: auto; }
  .lsb-ro-grid { grid-template-columns: minmax(0, 1fr); }
  .lsb-modal-backdrop { align-items: flex-end; padding: 0; }
  .lsb-modal-sheet { width: 100%; max-width: 100vw; max-height: 88vh; border-radius: 12px 12px 0 0; border-bottom: none; }
  .lsb-modal-grabber { display: block; }
}

/* [TODO-104] 할일 원장 전건 검색·다축 정렬·컴팩트 뷰 & 상단 파이프라인 플로우맵 단일화면 리더 */
.todo-query-bar { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.todo-search-group { display: flex; align-items: center; gap: 5px; flex: 1 1 320px; min-width: 0; max-width: 100%; }
.todo-deep-chk { display: inline-flex; align-items: center; gap: 4px; font-size: 10.6px; color: #93c5fd; white-space: nowrap; cursor: pointer; flex-shrink: 0; }
.todo-sort-density-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.todo-density-switch { display: inline-flex; border: 1px solid rgba(100, 116, 139, 0.58); border-radius: 4px; overflow: hidden; background: rgba(15, 23, 42, 0.9); }
.todo-density-btn { height: 24px; padding: 0 8px; border: none; background: transparent; color: #94a3b8; font-family: var(--font-mono); font-size: 10.6px; font-weight: 700; cursor: pointer; }
.todo-density-btn.active { background: rgba(168, 85, 247, 0.28); color: #f3e8ff; font-weight: 800; }
.todo-subfilter-bar { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 5px; min-width: 0; max-width: 100%; }
.todo-fchip { height: 23px; padding: 0 8px; border-radius: 999px; border: 1px solid rgba(100, 116, 139, 0.55); background: rgba(15, 23, 42, 0.85); color: #cbd5e1; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.todo-fchip:hover { border-color: rgba(125, 211, 252, 0.78); color: #f8fafc; }
.todo-fchip.active { border-color: rgba(52, 211, 153, 0.85); background: rgba(16, 185, 129, 0.22); color: #a7f3d0; font-weight: 800; }
.todo-fchip.is-amber.active { border-color: rgba(251, 191, 36, 0.9); background: rgba(245, 158, 11, 0.24); color: #fef3c7; }
.todo-date-range-grp { display: inline-flex; align-items: center; gap: 3px; flex-wrap: wrap; min-width: 0; }
.todo-sortable-th:hover { color: #f8fafc !important; background: rgba(30, 41, 59, 0.95) !important; }
.todo-sort-ind { color: #fcd34d; font-size: 10px; margin-left: 2px; }
mark.todo-kw-hl { background: rgba(250, 204, 21, 0.28); color: #fef08a; padding: 0 2px; border-radius: 2px; font-weight: 800; }
.todo-match-pill { display: inline-flex; align-items: center; padding: 0 5px; border-radius: 3px; background: rgba(250, 204, 21, 0.16); border: 1px solid rgba(250, 204, 21, 0.55); color: #fde047; font-size: 9.8px; font-weight: 800; }
.todo-flow-mini-strip { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.todo-flow-mini-arrow { color: #64748b; font-size: 10px; user-select: none; }
.todo-flow-mini-chip { height: 20px; padding: 0 6px; border-radius: 3px; border: 1px solid rgba(100, 116, 139, 0.52); background: rgba(15, 23, 42, 0.88); color: #cbd5e1; font-size: 10px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.todo-flow-mini-chip:hover { border-color: #7dd3fc; color: #fff; }
.todo-flow-mini-chip.is-origin { border-color: rgba(168, 85, 247, 0.55); color: #e9d5ff; background: rgba(88, 28, 135, 0.2); }
.todo-flow-mini-chip.is-emerald { border-color: rgba(52, 211, 153, 0.68); color: #6ee7b7; background: rgba(6, 78, 59, 0.26); }
.todo-flow-mini-chip.is-amber { border-color: rgba(251, 191, 36, 0.72); color: #fde68a; background: rgba(120, 53, 15, 0.26); }
.todo-flow-mini-chip.is-sky { border-color: rgba(56, 189, 248, 0.72); color: #7dd3fc; background: rgba(12, 74, 110, 0.28); }
.todo-flow-mini-chip.is-fail { border-color: rgba(248, 113, 113, 0.72); color: #fca5a5; background: rgba(127, 29, 29, 0.26); }
.todo-flow-mini-chip.is-muted { opacity: 0.74; color: #94a3b8; }
tr.todo-row-compact td { padding-top: 3px !important; padding-bottom: 3px !important; }
tr.todo-row-compact .todo-main-cell { padding: 4px 8px !important; }
tr.todo-row-compact .todo-flow-mini-strip { margin-top: 0; margin-left: 6px; }
.todo-pagination-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding: 5px 10px; border-top: 1px solid var(--border); background: rgba(9, 13, 22, 0.88); }
.todo-dossier-shell { display: flex; flex-direction: column; gap: 7px; min-width: 0; max-width: 100%; }
.todo-flow-stepper-bar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 6px; background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(9, 14, 25, 0.96) 100%); border: 1px solid rgba(71, 85, 105, 0.72); position: sticky; top: 0; z-index: 6; min-width: 0; max-width: 100%; }
.todo-flow-nav-btn { height: 52px; padding: 0 8px; border-radius: 5px; border: 1px solid rgba(100, 116, 139, 0.58); background: rgba(30, 41, 59, 0.86); color: #cbd5e1; font-size: 11px; font-weight: 800; cursor: pointer; flex-shrink: 0; }
.todo-flow-nav-btn:hover:not(:disabled) { border-color: #7dd3fc; color: #fff; }
.todo-flow-nav-btn:disabled { opacity: 0.38; cursor: default; }
.todo-flow-rail { display: flex; align-items: center; gap: 5px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; padding: 2px 1px; }
.todo-flow-arrow { color: #64748b; font-size: 12px; font-weight: 800; flex-shrink: 0; user-select: none; }
.todo-flow-node { flex: 0 0 auto; min-width: 148px; max-width: 215px; padding: 5px 8px; border-radius: 5px; border: 1px solid rgba(71, 85, 105, 0.72); background: rgba(15, 23, 42, 0.88); display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer; }
.todo-flow-node:hover { border-color: rgba(125, 211, 252, 0.85); }
.todo-flow-node.tone-purple { border-left: 3px solid #a855f7; }
.todo-flow-node.tone-emerald { border-left: 3px solid #10b981; }
.todo-flow-node.tone-amber { border-left: 3px solid #f59e0b; }
.todo-flow-node.tone-sky { border-left: 3px solid #38bdf8; }
.todo-flow-node.tone-red { border-left: 3px solid #ef4444; }
.todo-flow-node.tone-muted { border-left: 3px dashed #64748b; opacity: 0.78; }
.todo-flow-node.is-selected { border-color: #38bdf8; background: linear-gradient(180deg, rgba(14, 116, 144, 0.34) 0%, rgba(15, 23, 42, 0.96) 100%); box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.65); opacity: 1; }
.todo-flow-n-top { font-size: 10.8px; font-weight: 800; color: #f8fafc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-flow-n-mdl { font-size: 10px; color: #93c5fd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-flow-n-bot { font-size: 9.8px; color: #cbd5e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.todo-viewmode-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; padding: 5px 8px; border-radius: 5px; background: rgba(15, 23, 42, 0.86); border: 1px solid rgba(51, 65, 85, 0.78); }
.todo-vmode-btn { height: 24px; padding: 0 9px; border-radius: 4px; border: 1px solid rgba(100, 116, 139, 0.55); background: rgba(9, 13, 22, 0.85); color: #cbd5e1; font-size: 10.8px; font-weight: 700; cursor: pointer; }
.todo-vmode-btn.active { border-color: rgba(56, 189, 248, 0.9); background: rgba(14, 165, 233, 0.24); color: #f0f9ff; font-weight: 800; }
details.todo-composer-drawer { border: 1px solid rgba(71, 85, 105, 0.68); border-radius: 5px; background: #0b111e; overflow: hidden; }
details.todo-composer-drawer > summary.todo-composer-summary { list-style: none; cursor: pointer; user-select: none; padding: 6px 10px; font-size: 11.2px; font-weight: 800; color: #fcd34d; background: rgba(30, 41, 59, 0.72); display: flex; align-items: center; justify-content: space-between; gap: 6px; }
details.todo-composer-drawer > summary.todo-composer-summary::-webkit-details-marker { display: none; }
.todo-composer-body { padding: 9px 10px; border-top: 1px solid rgba(51, 65, 85, 0.7); }
.todo-stage-workspace { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 8px; align-items: start; min-width: 0; max-width: 100%; }
.todo-stage-workspace.is-full-single { grid-template-columns: minmax(0, 1fr); }
.todo-mini-tree { border: 1px solid rgba(51, 65, 85, 0.75); border-radius: 5px; background: rgba(11, 17, 30, 0.9); padding: 6px; display: flex; flex-direction: column; gap: 3px; max-height: 60vh; overflow-y: auto; }
.todo-tree-item { padding: 5px 6px; border-radius: 4px; border: 1px solid transparent; background: transparent; color: #cbd5e1; font-size: 10.6px; text-align: left; cursor: pointer; line-height: 1.35; }
.todo-tree-item:hover { background: rgba(30, 41, 59, 0.75); }
.todo-tree-item.is-selected { border-color: rgba(56, 189, 248, 0.78); background: rgba(14, 165, 233, 0.18); color: #f8fafc; font-weight: 800; }
.todo-stage-reader-pane { border: 1px solid rgba(51, 65, 85, 0.78); border-radius: 5px; background: rgba(11, 17, 30, 0.92); padding: 9px 11px; max-height: 62vh; overflow-y: auto; min-width: 0; max-width: 100%; }
@media (max-width: 768px) {
  .todo-stage-workspace { grid-template-columns: minmax(0, 1fr); }
  .todo-mini-tree { display: none; }
  .todo-flow-nav-btn { height: 46px; padding: 0 6px; font-size: 10px; }
  .todo-flow-node { min-width: 132px; max-width: 180px; padding: 4px 7px; }
  .todo-stage-reader-pane { max-height: 64vh; padding: 8px; }
  .todo-search-group { flex: 1 1 100%; }
}

/* [TODO-143] 1.오늘할일 월간 달력 대시보드 & 선택일 즉시 필터 (어수선함 제로 프로 터미널 디자인) */
.tcal-panel { border-color: rgba(168, 85, 247, 0.45); margin-bottom: 8px; background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(11, 16, 28, 0.96) 100%); }
.tcal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 6px 10px; background: rgba(15, 23, 42, 0.96); }
.tcal-nav-grp, .tcal-head-right, .tcal-month-ctrl, .tcal-summary-wrap { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.tcal-ym-label { font-size: 13px; font-weight: 800; color: #f8fafc; min-width: 9ch; text-align: center; font-variant-numeric: tabular-nums; }
.tcal-nav-btn, .tcal-act-btn { height: 24px; padding: 0 8px; border-radius: 4px; border: 1px solid rgba(100, 116, 139, 0.58); background: rgba(30, 41, 59, 0.85); color: #cbd5e1; font-size: 11px; font-weight: 700; cursor: pointer; transition: all 0.12s ease; white-space: nowrap; }
.tcal-nav-btn:hover, .tcal-act-btn:hover { border-color: #7dd3fc; color: #fff; background: rgba(56, 189, 248, 0.18); }
.tcal-act-btn.is-clear.active { border-color: rgba(168, 85, 247, 0.88); background: rgba(168, 85, 247, 0.24); color: #f3e8ff; font-weight: 800; }
.tcal-kpi-strip { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 10.8px; font-variant-numeric: tabular-nums; }
.tcal-kpi-chip { padding: 2px 7px; border-radius: 4px; border: 1px solid rgba(71, 85, 105, 0.58); background: rgba(15, 23, 42, 0.88); color: #cbd5e1; white-space: nowrap; }
.tcal-kpi-chip b { color: #f8fafc; }
.tcal-kpi-chip.is-pend { border-color: rgba(251, 191, 36, 0.58); color: #fde68a; }
.tcal-kpi-chip.is-pend b { color: #fcd34d; }
.tcal-kpi-chip.is-run { border-color: rgba(56, 189, 248, 0.65); color: #bae6fd; }
.tcal-kpi-chip.is-done { border-color: rgba(52, 211, 153, 0.55); color: #a7f3d0; }
.tcal-kpi-chip.is-done b { color: #6ee7b7; }
.tcal-kpi-chip.is-reg { border-color: rgba(56, 189, 248, 0.42); color: #93c5fd; }
.tcal-kpi-chip.is-tok { border-color: rgba(251, 191, 36, 0.42); color: #fde68a; }
.tcal-body { padding: 6px 8px 8px; }
.tcal-dow-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 4px; text-align: center; font-size: 10.5px; font-weight: 800; color: #94a3b8; }
.tcal-dow-row .is-sun { color: #fca5a5; }
.tcal-dow-row .is-sat { color: #93c5fd; }
.tcal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.tcal-cell { position: relative; min-height: 54px; padding: 5px 6px 7px; border-radius: 5px; border: 1px solid rgba(51, 65, 85, 0.68); background: rgba(15, 23, 42, 0.82); color: #e2e8f0; display: flex; flex-direction: column; justify-content: space-between; gap: 4px; text-align: left; cursor: pointer; transition: border-color 0.12s ease, background 0.12s ease; min-width: 0; overflow: hidden; }
.tcal-cell:hover { border-color: rgba(125, 211, 252, 0.82); background: rgba(30, 41, 59, 0.88); }
.tcal-cell.is-closed { background: rgba(9, 13, 22, 0.62); border-color: rgba(30, 41, 59, 0.8); }
.tcal-cell.is-closed .tcal-day-num { color: #64748b; }
.tcal-cell.is-adj { opacity: 0.36; }
.tcal-cell.is-today { border-color: rgba(56, 189, 248, 0.88); box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.38); }
.tcal-cell.is-selected { border-color: #c084fc; background: linear-gradient(180deg, rgba(88, 28, 135, 0.36) 0%, rgba(15, 23, 42, 0.95) 100%); box-shadow: 0 0 0 1px rgba(192, 132, 252, 0.75); opacity: 1; }
.tcal-c-top { display: flex; align-items: center; justify-content: space-between; gap: 3px; min-width: 0; width: 100%; }
.tcal-day-grp, .tcal-meta-grp { display: inline-flex; align-items: center; gap: 3px; min-width: 0; }
.tcal-day-num { font-size: 11.5px; font-weight: 800; color: #f1f5f9; font-variant-numeric: tabular-nums; }
.tcal-today-tag { font-size: 9px; font-weight: 800; padding: 0 4px; border-radius: 3px; background: rgba(14, 165, 233, 0.24); color: #7dd3fc; }
.tcal-hol-tag { font-size: 9px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48px; }
.tcal-ret { font-size: 9.8px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tcal-tdot { font-size: 8.5px; line-height: 1; }
.tcal-tdot.is-ok { color: #34d399; }
.tcal-tdot.is-warn { color: #fbbf24; }
.tcal-tdot.is-err { color: #f87171; }
.tcal-c-bot { display: flex; flex-direction: column; gap: 3px; min-height: 16px; width: 100%; }
.tcal-c-pills { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; font-size: 9.8px; font-variant-numeric: tabular-nums; }
.tcal-pill { padding: 0 5px; border-radius: 999px; font-weight: 800; line-height: 1.45; white-space: nowrap; }
.tcal-pill.is-pend { background: rgba(245, 158, 11, 0.22); border: 1px solid rgba(251, 191, 36, 0.65); color: #fde68a; }
.tcal-pill.is-run { background: rgba(14, 165, 233, 0.24); border: 1px solid rgba(56, 189, 248, 0.72); color: #7dd3fc; }
.tcal-pill.is-done { background: rgba(16, 185, 129, 0.2); border: 1px solid rgba(52, 211, 153, 0.58); color: #6ee7b7; }
.tcal-pill.is-fail { background: rgba(239, 68, 68, 0.22); border: 1px solid rgba(248, 113, 113, 0.72); color: #fca5a5; }
.tcal-c-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(245, 158, 11, 0.28); }
.tcal-c-prog-fill { height: 100%; background: #10b981; transition: width 0.2s ease; }
.tcal-sel-strip { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 6px 10px; border-top: 1px solid rgba(192, 132, 252, 0.45); background: linear-gradient(90deg, rgba(59, 7, 100, 0.28) 0%, rgba(15, 23, 42, 0.94) 100%); font-size: 11px; font-variant-numeric: tabular-nums; }
.tcal-sel-left, .tcal-sel-right, .tcal-basis-wrap { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.tcal-sel-date { font-weight: 800; color: #e9d5ff; }
.tcal-sel-stats { color: #cbd5e1; }
.tcal-basis-wrap { color: #94a3b8; font-size: 10.5px; }
.tcal-basis-btn, .tcal-clear-chip { height: 22px; padding: 0 7px; border-radius: 4px; border: 1px solid rgba(100, 116, 139, 0.58); background: rgba(15, 23, 42, 0.88); color: #cbd5e1; font-size: 10.3px; font-weight: 700; cursor: pointer; }
.tcal-basis-btn.active { border-color: rgba(56, 189, 248, 0.88); background: rgba(14, 165, 233, 0.22); color: #e0f2fe; font-weight: 800; }
.tcal-clear-chip { border-color: rgba(248, 113, 113, 0.58); color: #fca5a5; }
.tcal-clear-chip:hover { background: rgba(239, 68, 68, 0.2); color: #fff; }
@media (max-width: 768px) {
  .tcal-body { padding: 5px 4px 6px; }
  .tcal-grid, .tcal-dow-row { gap: 2px; }
  .tcal-cell { min-height: 48px; padding: 4px 3px 6px; border-radius: 4px; }
  .tcal-day-num { font-size: 10.5px; }
  .tcal-today-tag, .tcal-hol-tag { display: none; }
  .tcal-ret { font-size: 8.8px; }
  .tcal-c-pills { gap: 2px; font-size: 9px; }
  .tcal-pill { padding: 0 3px; }
}
