/* 선탐 관제: 수로 탐사로봇 관제 시연 (culvert). 인상: 랜턴 하나로 비춘 지하 관로 */

.cv {
  --bg: #16130F;
  --surface: #221E18;
  --surface-2: #2A251E;
  --text: #F2ECE0;
  --muted: #A39B8B;
  --line: #3A342A;
  --line-2: #4A4336;
  --primary: #8FE3F5;
  --primary-soft: rgba(143, 227, 245, .12);
  --accent: #E8DCC0;
  --ok: #63D08A;
  --warn: #FFB84D;
  --danger: #FF6257;
  --hold: #B9AFA0;
  --num: "Sometype Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --r: 2px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #16130F; }
.cv {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.cv button, .cv select, .cv input { font: inherit; color: inherit; }
.cv a { color: var(--primary); }
.cv-num { font-family: var(--num); font-variant-numeric: tabular-nums; font-style: normal; letter-spacing: -0.01em; }
.cv-muted { color: var(--muted); font-size: 12px; }
.cv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cv-h { margin: 0; font-size: 13px; font-weight: 700; color: var(--text); }
.cv-sub { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.cv-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: var(--r); font-size: 11px; color: var(--muted); white-space: nowrap; }
.cv-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r); font-size: 12px; white-space: nowrap; }
.cv-chip--src { border: 1px dashed var(--primary); color: var(--primary); }

/* ---------- 안내 띠·머리말 ---------- */
.cv-band { height: 28px; line-height: 28px; text-align: center; padding: 0 12px; font-size: 12px; color: var(--muted); background: #1D1914; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.cv-head { display: flex; align-items: center; gap: 14px; padding: 8px 20px; border-bottom: 1px solid var(--line); background: var(--bg); }
.cv-head__brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cv-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); text-decoration: none; }
.cv-brand__name { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.cv-site { font-size: 13px; color: var(--muted); white-space: nowrap; }
.cv-nav { display: flex; gap: 2px; margin-left: 8px; }
.cv-nav__item { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; color: var(--muted) !important; text-decoration: none; font-size: 14px; font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.cv-nav__item:hover { color: var(--text) !important; }
.cv-nav__item.is-on { color: var(--primary) !important; border-bottom-color: var(--primary); }
.cv-head__actions { display: flex; gap: 6px; margin-left: auto; }

.cv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--primary); border-radius: var(--r); background: transparent; color: var(--primary) !important; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.cv-btn:hover { background: var(--primary-soft); }
.cv-btn--ghost { border-color: var(--line-2); color: var(--text) !important; }
.cv-btn--ghost:hover { background: var(--surface-2); }
.cv-btn--sm { height: 28px; padding: 0 9px; font-size: 12px; }
.cv-btn:disabled { opacity: .4; cursor: not-allowed; }
.cv-x { border: 1px solid var(--line-2); background: transparent; border-radius: var(--r); height: 28px; padding: 0 10px; font-size: 12px; color: var(--muted); cursor: pointer; }

.cv-main { padding: 10px 20px 16px; }

/* ---------- 카드 ---------- */
.cv-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; min-width: 0; }
.cv-card__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; min-height: 22px; }

/* ---------- 경고 띠와 상황 재현 ---------- */
.cv-top { display: flex; gap: 10px; align-items: stretch; margin-bottom: 8px; }
.cv-alert { flex: 1; min-width: 0; }
.cv-alert__band { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 40px; height: 100%; padding: 6px 12px; border: 1px solid var(--line-2); border-left: 4px solid var(--ok); border-radius: var(--r); background: var(--surface); }
.cv-alert__band b { font-size: 15px; }
.cv-alert__band span { color: var(--muted); font-size: 13px; }
.cv-alert__band .cv-btn { margin-left: auto; }
.cv-alert__band--over { border-color: var(--danger); border-left-width: 4px; background: rgba(255, 98, 87, .12); }
.cv-alert__band--over b { color: #FF8A80; }
.cv-alert__band--over span { color: var(--text); }
.cv-alert__band--warn { border-color: rgba(255, 184, 77, .6); border-left-color: var(--warn); background: rgba(255, 184, 77, .08); }
.cv-alert__band--warn b { color: var(--warn); }
.cv-alert__band--link { border-color: var(--warn); border-left-color: var(--warn); background: rgba(255, 184, 77, .1); }
.cv-alert__band--link b { color: var(--warn); }
.cv-replay { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px dashed var(--line-2); border-radius: var(--r); }
.cv-replay__tag { font-size: 11px; color: var(--muted); white-space: nowrap; }
.cv-replay__btn { height: 30px; padding: 0 9px; border: 1px dashed var(--muted); border-radius: var(--r); background: transparent; font-size: 12px; color: var(--text); cursor: pointer; white-space: nowrap; }
.cv-replay__btn:hover { background: var(--surface-2); }
.cv-replay__btn.is-on { border-style: solid; border-color: var(--warn); color: var(--warn); }

/* ---------- 종단면도 ---------- */
.cv-prof { margin-bottom: 10px; padding-bottom: 4px; }
.cv-prof .cv-card__head { margin-bottom: 2px; }
.cv-prof__meta { font-size: 12px; color: var(--muted); }
.cv-prof__meta b { color: var(--accent); font-size: 14px; }
.cv-segpick { display: none; gap: 4px; margin-left: auto; }
.cv-segbtn { height: 30px; min-width: 40px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: var(--r); background: transparent; font-family: var(--num); font-size: 12px; cursor: pointer; }
.cv-segbtn.is-here { border-color: var(--primary); color: var(--primary); }
.cv-prof__scroll { overflow-x: auto; overflow-y: hidden; }
.cv-prof__svg { display: block; width: 100%; height: auto; cursor: pointer; }
.cv-legend { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 0 auto; padding: 0; list-style: none; font-size: 11px; color: var(--muted); }
.cv-legend__note { padding-left: 4px; border-left: 1px solid var(--line-2); }
.cv-legend li { display: inline-flex; align-items: center; gap: 5px; }
.cv-lg { display: inline-block; width: 18px; height: 8px; border: 1px solid var(--accent); }
.cv-lg--done { background: rgba(232, 220, 192, .3); }
.cv-lg--doing { border-color: var(--primary); background: repeating-linear-gradient(135deg, var(--primary) 0 1.5px, transparent 1.5px 5px); }
.cv-lg--plan { border-color: var(--muted); }
.cv-lg--tick { width: 2px; height: 10px; border: 0; background: var(--ok); }
.cv-lg--defect { width: 0; height: 0; border: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 9px solid var(--warn); }
.cv-lg--hazard { border: 2px solid var(--danger); }

.pf-ground { stroke: var(--accent); stroke-width: 1.6; }
.pf-soil { stroke: var(--line-2); stroke-width: 1; }
.pf-pipe { stroke-width: 1.2; }
.pf-pipe--done { fill: rgba(232, 220, 192, .28); stroke: var(--accent); }
.pf-pipe--doing { stroke: var(--primary); }
.pf-pipe--plan { fill: none; stroke: var(--muted); stroke-dasharray: 4 3; }
.pf-hazard { fill: none; stroke: var(--danger); stroke-width: 2.6; }
.pf-hzlabel rect { fill: var(--bg); stroke: var(--danger); stroke-width: 1.4; }
.pf-hzlabel text { fill: #FF8A80; font-size: 11.5px; font-weight: 700; }
.pf-seg { fill: var(--text); font-size: 11.5px; font-weight: 600; }
.pf-num { font-family: var(--num); }
.pf-segst { font-size: 10.5px; fill: var(--muted); }
.pf-segst--doing { fill: var(--primary); }
.pf-segst--done { fill: var(--accent); }
.pf-mh rect { fill: var(--bg); stroke: var(--accent); stroke-width: 1.2; }
.pf-mh line { stroke: var(--accent); stroke-width: 2.4; }
.pf-mhname { fill: var(--accent); font-size: 11px; }
.pf-tick { stroke-width: 2.4; stroke: var(--muted); }
.pf-tick--ok { stroke: var(--ok); }
.pf-tick--warn { stroke: var(--warn); }
.pf-tick--over { stroke: var(--danger); }
.pf-defect { fill: var(--warn); stroke: var(--bg); stroke-width: 1; }
.pf-hit { fill: transparent; stroke: none; }
.pf-hit:hover { fill: rgba(143, 227, 245, .05); }
.pf-hit.is-sel { fill: rgba(143, 227, 245, .08); stroke: var(--primary); stroke-dasharray: 3 3; stroke-width: 1; }
.pf-robot { transition: transform .25s linear; pointer-events: none; }
.is-still .pf-robot, .is-still .pf-robot__tag { transition: none; }
.pf-robot__body { fill: var(--primary); stroke: var(--bg); stroke-width: 1.5; }
.pf-robot__eye { fill: var(--bg); }
.pf-robot__beam { fill: rgba(255, 236, 190, .22); }
.pf-robot.is-back .pf-robot__beam { transform: scaleX(-1); }
.pf-robot__tag rect { fill: var(--bg); stroke: var(--primary); stroke-width: 1; }
.pf-robot__tag text { fill: var(--primary); font-size: 11px; }

.cv-pop { position: absolute; top: 38px; right: 12px; z-index: 5; width: 300px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--primary); border-radius: var(--r); }
.cv-pop__head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cv-pop__head b { font-size: 18px; color: var(--primary); }
.cv-pop__head span { color: var(--muted); font-size: 12px; }
.cv-pop__head .cv-x { margin-left: auto; }

.cv-kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: 13px; }
.cv-kv dt { color: var(--muted); }
.cv-kv dd { margin: 0; min-width: 0; }

/* 판정 글자 */
.cv-j { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: var(--r); font-size: 12px; font-weight: 700; border: 1px solid currentColor; white-space: nowrap; }
.cv-j--ok { color: var(--ok); }
.cv-j--warn { color: var(--warn); }
.cv-j--over { color: var(--danger); background: rgba(255, 98, 87, .12); }
.cv-j--hold { color: var(--hold); border-style: dashed; }
.cv-j--none { color: var(--muted); border-style: dotted; }

/* ---------- 세 칸 ---------- */
.cv-grid { display: grid; grid-template-columns: minmax(260px, .86fr) minmax(450px, 1.5fr) minmax(330px, 1.05fr); gap: 10px; margin-bottom: 10px; align-items: start; }

/* 영상 */
.cv-video__cam { margin-left: auto; display: inline-flex; gap: 4px; }
.cv-mini { height: 26px; padding: 0 7px; border: 1px solid var(--line-2); border-radius: var(--r); background: transparent; font-size: 11px; cursor: pointer; }
.cv-mini:disabled { opacity: .4; cursor: not-allowed; }
.cv-video__frame svg { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r); }
.cv-osd text { fill: #F2ECE0; font-family: var(--num); }
.cv-video__list { margin-top: 8px; }
.cv-video__list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; }
.cv-video__list li { display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); }
.cv-video__list time { color: var(--muted); }

/* 가스 */
.cv-gas__top { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: start; }
.cv-gas__right { min-width: 0; }
.cv-gas__right .cv-card__head { margin-bottom: 4px; }
.cv-xsec svg { display: block; width: 170px; height: 170px; }
.cv-xsec svg.is-stale, .is-stale { opacity: .5; }
.cv-xsec__cap { margin: 4px 0 0; font-size: 11px; color: var(--muted); text-align: center; }
.xs-band--ok { fill: rgba(99, 208, 138, .16); }
.xs-band--warn { fill: rgba(255, 184, 77, .3); }
.xs-band--over { fill: rgba(255, 98, 87, .62); }
.xs-band--hold { fill: rgba(185, 175, 160, .14); }
.xs-band { transition: fill .6s ease; }
.is-still .xs-band { transition: none; }
.xs-sep { stroke: var(--bg); stroke-width: 1.5; stroke-dasharray: 3 3; }
.xs-wall { fill: none; stroke: var(--accent); stroke-width: 3; }
.xs-lab { fill: var(--text); font-size: 11px; font-weight: 700; }
.xs-val { fill: var(--text); font-family: var(--num); font-size: 22px; font-weight: 600; }
.xs-unit { font-size: 11px; font-weight: 400; }
.xs-val--none { font-family: var(--font); font-size: 15px; font-weight: 700; }

.cv-gt { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.cv-gt th { font-weight: 600; color: var(--muted); padding: 3px 2px; text-align: center; font-size: 12px; }
.cv-gt thead th small { display: block; font-size: 10px; font-weight: 400; }
.cv-gt thead th.is-on { color: var(--primary); }
.cv-gt tbody th { text-align: left; width: 38px; }
.cv-gt td { text-align: center; padding: 4px 2px; border-top: 1px solid var(--line); }
.cv-gt td b { display: block; font-size: 15px; font-weight: 600; }
.cv-gt td small { display: block; font-size: 10px; color: var(--muted); }
.cv-gt td.is-on { background: rgba(143, 227, 245, .05); }
.cv-gt__c--warn b, .cv-gt__c--warn small { color: var(--warn); }
.cv-gt__c--over { background: rgba(255, 98, 87, .14) !important; }
.cv-gt__c--over b, .cv-gt__c--over small { color: #FF8A80; }
.cv-gt__c--hold b, .cv-gt__c--hold small { color: var(--hold); }

.cv-tabs { display: flex; align-items: center; gap: 4px; margin: 8px 0 2px; flex-wrap: wrap; }
.cv-tab { position: relative; height: 30px; min-width: 52px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r); background: transparent; font-weight: 600; cursor: pointer; }
.cv-tab.is-on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.cv-tab[data-j="warn"]::after, .cv-tab[data-j="over"]::after, .cv-tab[data-j="hold"]::after { content: ""; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.cv-tab[data-j="over"]::after { background: var(--danger); }
.cv-tab[data-j="hold"]::after { background: var(--hold); }
.cv-tabs__note { margin-left: auto; font-size: 11px; color: var(--muted); }
.cv-graph { min-height: 150px; }
.cv-graph svg { display: block; max-width: 100%; }
.gr-grid { stroke: var(--line); stroke-width: 1; }
.gr-ax { fill: var(--muted); font-size: 10px; font-family: var(--num); }
.gr-lim { stroke-width: 1.4; }
.gr-lim--over { stroke: var(--danger); stroke-dasharray: 6 3; }
.gr-lim--warn { stroke: var(--warn); stroke-dasharray: 2 3; }
.gr-limtx { font-size: 10px; font-weight: 700; }
.gr-limtx--over { fill: #FF8A80; }
.gr-limtx--warn { fill: var(--warn); }
.gr-line { fill: none; stroke-width: 2; stroke-linejoin: round; }
.gr-line--dash { stroke-dasharray: 4 3; }
.gr-end { font-size: 11px; font-weight: 700; }
.gr-hit { fill: var(--danger); stroke: var(--bg); stroke-width: 1.5; }
.gr-hittx { fill: #FF8A80; font-size: 10.5px; font-weight: 700; }
.gr-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 2px; }
.gr-legend i { display: inline-block; width: 14px; height: 3px; margin-right: 5px; vertical-align: middle; }
.gr-legend i.is-dash { background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 7px); }
.cv-sensor { margin: 6px 0 0; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cv-sensor b { color: var(--text); }
.cv-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.cv-dot--ok { background: var(--ok); }
.cv-dot--warn { background: var(--warn); }
.cv-dot--hold { background: var(--hold); }
.cv-dot--off { background: transparent; border: 1.5px solid var(--muted); }

/* 상태·제어 */
.cv-robots { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 12.5px; }
.cv-robot { display: flex; align-items: center; gap: 7px; }
.cv-robot span:last-child { color: var(--muted); }
.cv-robot.is-off b { color: var(--muted); }
.cv-state__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0 6px; border-top: 1px solid var(--line); }
.cv-state__big { display: flex; flex-direction: column; min-width: 0; }
.cv-state__label { font-size: 22px; line-height: 1.1; color: var(--primary); }
.cv-state__big span { font-size: 12px; color: var(--muted); }
.cv-states { display: flex; gap: 2px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.cv-states li { font-size: 10.5px; padding: 1px 4px; border: 1px solid var(--line); color: var(--muted); border-radius: var(--r); }
.cv-states li.is-on { border-color: var(--primary); color: var(--primary); }
.cv-cells { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 0; padding: 6px 0 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cv-cells > div { min-width: 0; }
.cv-cells dt { font-size: 11px; color: var(--muted); }
.cv-cells dd { margin: 0; font-size: 14px; line-height: 1.35; }
.cv-cells dd small { color: var(--muted); font-size: 11px; }
.cv-big { font-size: 22px; font-weight: 600; line-height: 1.1; }
.cv-bar { display: inline-block; width: 60px; height: 6px; margin-left: 8px; border: 1px solid var(--line-2); vertical-align: middle; }
.cv-bar i { display: block; height: 100%; background: var(--ok); }
.cv-link { min-width: 0; }
.cv-link dd { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; }
.cv-sig { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 12px; }
.cv-sig i { width: 3px; background: var(--ok); }
.cv-sig i:nth-child(1) { height: 5px; } .cv-sig i:nth-child(2) { height: 8px; } .cv-sig i:nth-child(3) { height: 12px; }
.cv-sig.is-bad i { background: var(--danger); opacity: .35; }
.cv-sig.is-bad i:first-child { opacity: 1; }
.cv-sig.is-idle i { background: var(--muted); }
.cv-role { display: flex; align-items: center; gap: 8px; margin: 6px 0 6px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.cv-role select { height: 30px; padding: 0 8px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); color: var(--text); }
.cv-ctrls { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.cv-cbtn { height: 34px; padding: 0 2px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface-2); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.cv-cbtn:hover { border-color: var(--primary); color: var(--primary); }
.cv-cbtn:disabled { opacity: .35; cursor: not-allowed; border-color: var(--line); color: var(--muted); }
.cv-cbtn--stop { grid-column: 1 / -1; border: 2px solid var(--danger); background: transparent; color: #FF8A80; font-size: 13px; }
.cv-cbtn--stop:hover { border-color: var(--danger); color: #FFB2AC; background: rgba(255, 98, 87, .1); }
.cv-lock { margin: 6px 0 0; padding: 5px 8px; border: 1px dashed var(--warn); color: var(--warn); font-size: 12px; border-radius: var(--r); }
.cv-fine { margin: 5px 0 0; font-size: 11px; color: var(--muted); }
.cv-cmdline { padding: 6px 0 2px; }
.cv-cmdline .cv-sub { margin-bottom: 2px; }
.cv-cmd__name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.cv-cmd__name span { color: var(--muted); font-size: 12px; }
.cv-cmd .cv-btn { margin-top: 6px; }
.cv-steps { display: flex; flex-wrap: wrap; gap: 2px; margin: 5px 0 0; padding: 0; list-style: none; font-size: 12px; }
.cv-steps li { color: var(--muted); opacity: .55; }
.cv-steps li + li::before { content: "→"; margin: 0 4px; color: var(--muted); }
.cv-steps li.is-on { color: var(--text); opacity: 1; }
.cv-steps li.is-live { color: var(--primary); }
.cv-steps li.is-bad { color: #FF8A80; font-weight: 700; }
.cv-steps li .cv-num { margin-left: 2px; color: var(--accent); }
.cv-steps--sm { margin: 0; font-size: 11.5px; }

/* 이력 */
.cv-log { margin-bottom: 10px; }
.cv-loglist { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.cv-logrow { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.cv-logrow time { color: var(--muted); font-size: 12px; min-width: 62px; }
.cv-logrow__text { min-width: 0; }
.cv-logrow .cv-btn { margin-left: auto; }
.cv-kind { display: inline-flex; align-items: center; justify-content: center; min-width: 58px; height: 20px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: var(--r); font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.cv-kind--over { color: var(--danger); border-color: var(--danger); background: rgba(255, 98, 87, .12); }
.cv-kind--warn { color: var(--warn); border-color: var(--warn); }
.cv-kind--cmd { color: var(--primary); border-color: rgba(143, 227, 245, .5); }
.cv-kind--note { color: var(--accent); }
.cv-kind--link { color: var(--warn); border-style: dashed; }
.cv-kind--hold { color: var(--hold); border-style: dashed; }
.cv-kind--ai { color: var(--warn); }
.cv-kind--ok { color: var(--ok); }
.cv-note { padding: 8px 10px; margin-bottom: 6px; border: 1px solid var(--primary); border-radius: var(--r); background: var(--bg); }
.cv-note__row { display: flex; gap: 6px; flex-wrap: wrap; }
.cv-input { flex: 1; min-width: 160px; height: 34px; padding: 0 10px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); color: var(--text); }
.cv-input:focus, .cv select:focus, .cv button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

.cv-home { position: relative; }
.cv-leader { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.cv-leader path { fill: none; stroke: var(--primary); stroke-width: 1.2; stroke-dasharray: 3 3; opacity: .85; }
.cv-leader circle { fill: var(--primary); }

/* ---------- 공고 대응표·대화상자 ---------- */
.cv-fab { position: fixed; right: 16px; bottom: 16px; z-index: 20; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border: 1px solid var(--accent); border-radius: var(--r); background: var(--bg); color: var(--accent); font-size: 13px; font-weight: 700; cursor: pointer; }
.cv-fab:hover { background: var(--surface-2); }
.cv-dialog { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--text); }
.cv-dialog--wide { width: min(980px, calc(100vw - 24px)); }
.cv-dialog::backdrop { background: rgba(8, 6, 4, .7); }
.cv-dialog__body { padding: 16px 18px 18px; }
.cv-dialog__head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.cv-dialog__head .cv-x { margin-left: auto; }
.cv-eyebrow { margin: 0; font-size: 12px; color: var(--muted); }
.cv-dialog__title { margin: 2px 0 0; font-size: 18px; }
.cv-dialog__lead { margin: 12px 0; font-size: 14px; }
.cv-dialog__foot { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.cv-map { margin: 0; padding: 0; list-style: none; counter-reset: m; }
.cv-map li { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.cv-map__show { color: var(--primary); text-decoration: none; }
.cv-map__show--none { color: var(--muted); }
.cv-flow { display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; }
.cv-flow__box { flex: 1 1 150px; display: flex; flex-direction: column; gap: 3px; padding: 10px; border: 1px solid var(--line-2); border-radius: var(--r); font-size: 12px; color: var(--muted); }
.cv-flow__box b { color: var(--text); font-size: 14px; }
.cv-flow__box--key { border-color: var(--primary); }
.cv-flow__box--key b { color: var(--primary); }
.cv-flow__alt { color: var(--primary); }
.cv-flow__arrow { align-self: center; color: var(--accent); font-size: 18px; }
.cv-msgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.cv-msg { border: 1px solid var(--line); border-radius: var(--r); padding: 8px; min-width: 0; }
.cv-msg__head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cv-msg__head code { font-family: var(--num); font-size: 11px; color: var(--primary); }
.cv-msg__head .cv-tag { margin-left: auto; }
.cv-msg__body { margin: 6px 0 0; font-family: var(--num); font-size: 11px; color: var(--accent); white-space: pre-wrap; word-break: break-all; }
.cv-toast { position: fixed; left: 50%; bottom: 72px; transform: translateX(-50%); z-index: 30; max-width: calc(100vw - 32px); padding: 10px 14px; border: 1px solid var(--primary); border-radius: var(--r); background: var(--bg); font-size: 13px; }

.demo-notice { padding: 8px 20px 76px; font-size: 11px; color: var(--muted); }

/* ---------- 중간 폭 ---------- */
@media (max-width: 1240px) {
  .cv-site { display: none; }
}
@media (max-width: 1099px) {
  .cv-head { flex-wrap: wrap; }
  .cv-head__actions { margin-left: 0; flex-wrap: wrap; }
  .cv-grid { grid-template-columns: 1fr 1fr; }
  .cv-gas { grid-column: 1 / -1; order: -1; }
}

/* ---------- 좁은 화면 ---------- */
@media (max-width: 760px) {
  .cv-band__long { display: none; }
  .cv-head { padding: 8px 12px; gap: 8px; }
  .cv-head__brand { width: 100%; justify-content: space-between; }
  .cv-nav { margin: 0; width: 100%; overflow-x: auto; }
  .cv-nav__item { flex: 1; justify-content: center; padding: 0 6px; }
  .cv-head__actions { width: 100%; }
  .cv-head__actions .cv-btn { flex: 1 1 auto; padding: 0 8px; height: 36px; font-size: 12px; }
  .cv-hide-sm { display: none !important; }
  .cv-main { padding: 10px 12px 14px; }
  .cv-top { flex-direction: column; }
  .cv-replay { flex-wrap: wrap; }
  .cv-replay__tag { width: 100%; }
  .cv-replay__btn { flex: 1; height: 36px; }
  .cv-segpick { display: flex; width: 100%; margin-left: 0; overflow-x: auto; }
  .cv-segbtn { flex: 1; height: 36px; }
  .cv-prof__svg { width: 1080px; max-width: none; }
  .cv-grid { grid-template-columns: 1fr; }
  .cv-gas { order: 1; }
  .cv-ctrl { order: 2; }
  .cv-video { order: 3; }
  .cv-gas__top { grid-template-columns: 1fr; justify-items: center; }
  .cv-gtable { width: 100%; }
  .cv-ctrls { grid-template-columns: repeat(3, 1fr); }
  .cv-cbtn { height: 44px; }
  .cv-pop { position: static; width: auto; margin-top: 8px; }
  .cv-map li { grid-template-columns: 1fr; gap: 2px; }
  .cv-logrow .cv-btn { margin-left: 0; }
  .cv-states { margin-left: 0; }
  .cv-legend { margin-left: 0; }
  .cv-legend__note { border-left: 0; padding-left: 0; }
  .cv-fab { right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .pf-robot, .xs-band { transition: none; }
}

/* ---------- 관로 구조 편집 ---------- */
.cv-net__bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cv-net__title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cv-net__h { margin: 0; font-size: 18px; font-weight: 800; }
.cv-net__sum { font-size: 12px; color: var(--muted); }
.cv-net__sum b { color: var(--accent); font-weight: 600; }
.cv-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.cv-tools .cv-btn { height: 32px; padding: 0 10px; font-size: 12.5px; }
.cv-tools__sep { width: 1px; background: var(--line-2); margin: 4px 2px; }
.cv-tools .cv-btn.is-on { border-color: var(--primary); color: var(--primary) !important; }
.cv-file { position: relative; overflow: hidden; }
.cv-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cv-net__grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(360px, 1fr); gap: 10px; align-items: start; }
.cv-net__tables, .cv-net__side { display: grid; gap: 10px; min-width: 0; }
.cv-tablewrap { overflow-x: auto; }
.cv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cv-table th, .cv-table td { padding: 6px 8px; text-align: left; border-top: 1px solid var(--line); vertical-align: middle; }
.cv-table thead th { border-top: 0; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.cv-table thead th small { display: block; font-size: 10px; font-weight: 400; }
.cv-table .r { text-align: right; }
.cv-table tfoot th, .cv-table tfoot td { color: var(--muted); font-size: 12px; }
.cv-table--pick tbody tr { cursor: pointer; }
.cv-table--pick tbody tr:hover { background: rgba(143, 227, 245, .04); }
.cv-table--pick tbody tr.is-sel { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.cv-table--mh { max-width: 520px; }
.cv-st { font-size: 12px; font-weight: 600; }
.cv-st--done { color: var(--accent); }
.cv-st--doing { color: var(--primary); }
.cv-st--plan { color: var(--muted); }
.cv-edit .cv-card__head { margin-bottom: 6px; }
.cv-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.cv-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.cv-form .cv-input { width: 100%; min-width: 0; font-size: 14px; }
.cv-form select.cv-input { appearance: auto; }
.cv-check { flex-direction: row !important; align-items: center; gap: 8px !important; grid-column: 1 / -1; color: var(--text) !important; font-size: 13px !important; }
.cv-check input { width: 18px; height: 18px; accent-color: var(--danger); }
.cv-err { margin: 6px 0 0; color: #FF8A80; font-size: 12px; }
.cv-errs { margin: 0; padding-left: 18px; color: #FF8A80; font-size: 12.5px; }
.cv-small { margin: 0; font-size: 12px; }
.cv-edit__lists { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.cv-edit__lists .cv-sub { margin-bottom: 2px; }
.cv-edit__acts { display: flex; gap: 6px; margin-top: 8px; }
.cv-table--struct { font-size: 12px; }
.cv-table--struct th, .cv-table--struct td { padding: 4px 6px; }
.cv-table--struct tbody th { font-weight: 600; white-space: nowrap; }

/* ---------- 검토·보고서 ---------- */
.cv-verdict { margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.cv-verdict__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cv-verdict__head .cv-h { font-size: 15px; }
.cv-verdict__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.cv-vd { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 8px; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: var(--r); }
.cv-vd b { font-size: 18px; }
.cv-vd .cv-j { justify-self: start; }
.cv-vd small { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
.cv-vd--over { border-color: var(--danger); background: rgba(255, 98, 87, .08); }
.cv-vd--warn { border-color: var(--warn); }
.cv-vd--none { border-style: dashed; }
.cv-verdict__note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.cv-rev__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(400px, 1fr); gap: 10px; align-items: start; }
.cv-rev__left, .cv-rev__right { display: grid; gap: 10px; min-width: 0; }
.cv-hist__dl { margin-left: auto; }
.cv-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.cv-filters label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.cv-filters .cv-input { height: 30px; min-width: 0; flex: none; padding: 0 6px; }
.cv-hist__wrap { max-height: 272px; overflow-y: auto; border-top: 1px solid var(--line); }
.cv-table--hist { font-size: 12.5px; }
.cv-table--hist th, .cv-table--hist td { padding: 4px 6px; white-space: nowrap; }
.cv-table--hist thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.cv-table--hist th.is-on, .cv-table--hist td.is-on { background: rgba(143, 227, 245, .06); }
.cv-c--warn { color: var(--warn); }
.cv-c--over { color: #FF8A80; font-weight: 700; }
.cv-c--hold { color: var(--hold); }
.cv-limits__reset { margin-left: auto; }
.cv-table--lim th, .cv-table--lim td { padding: 5px 6px; }
.cv-table--lim tbody th { white-space: nowrap; }
.cv-table--lim tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.cv-limrow { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.cv-lim { width: 62px; height: 28px; padding: 0 4px; text-align: right; font-size: 13px; flex: none; min-width: 0; }
.cv-src { font-size: 11.5px; color: var(--muted); }
.cv-src span { display: block; }
.cv-tag--chg { border-color: var(--warn); color: var(--warn); }
.cv-lookup__body { display: grid; grid-template-columns: 200px 1fr; gap: 10px; align-items: start; }
.cv-lookup__frame svg { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r); }
.cv-lookup__where { margin: 0 0 6px; font-size: 13px; }
.cv-posbar { position: relative; height: 26px; margin: 0 6px 6px; border-top: 2px solid var(--accent); }
.cv-posbar span { position: absolute; top: 4px; transform: translateX(-50%); font-family: var(--num); font-size: 9.5px; color: var(--muted); }
.cv-posbar i { position: absolute; top: -6px; width: 10px; height: 10px; margin-left: -5px; background: var(--primary); border: 2px solid var(--bg); }
.cv-vals { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 0; padding: 0; list-style: none; }
.cv-vals li { display: flex; flex-direction: column; padding: 4px 6px; border: 1px solid var(--line); border-radius: var(--r); font-size: 11px; color: var(--muted); min-width: 0; }
.cv-vals b { font-size: 15px; color: var(--text); }
.cv-vals li.cv-c--over { border-color: var(--danger); }
.cv-vals li.cv-c--over b, .cv-vals li.cv-c--over small { color: #FF8A80; }
.cv-vals li.cv-c--warn b { color: var(--warn); }
.cv-flowline { display: flex; margin: 0 0 8px; padding: 0; list-style: none; }
.cv-flowline li { flex: 1; padding: 5px 8px; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 700; color: var(--muted); text-align: center; }
.cv-flowline li + li { border-left: 0; }
.cv-flowline li.is-done { color: var(--primary); background: var(--primary-soft); border-color: rgba(143, 227, 245, .5); }
.cv-flowline li.is-done::before { content: "✓ "; }
.cv-flowline li.is-next { color: var(--text); border-style: dashed; }
.cv-report__acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cv-report__acts .cv-btn--ghost { margin-left: auto; }
.cv-report__log { margin: 6px 0 8px; padding: 0; list-style: none; font-size: 11.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 12px; }
.cv-paperwrap { max-height: 520px; overflow-y: auto; padding: 10px; background: #0F0D0A; border: 1px solid var(--line); }
.cv-paper { max-width: 640px; margin: 0 auto; padding: 18px 20px; background: #FFFFFF; color: #1A1814; font-size: 11px; line-height: 1.45; }
.pp-note { margin: 0 0 6px; padding: 3px 6px; border: 1px dashed #8A8274; font-size: 10px; color: #5E574B; }
.pp-title { margin: 4px 0 8px; font-size: 15px; text-align: center; letter-spacing: -0.01em; }
.cv-paper h4 { margin: 10px 0 4px; font-size: 11.5px; padding-bottom: 2px; border-bottom: 1.5px solid #1A1814; }
.pp-meta, .pp-t, .pp-sign { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.pp-meta th, .pp-meta td, .pp-t th, .pp-t td, .pp-sign th, .pp-sign td { border: 1px solid #9C9486; padding: 2px 5px; text-align: left; }
.pp-meta th, .pp-t thead th, .pp-sign th { background: #F1ECE2; font-weight: 700; }
.pp-t .r { text-align: right; }
.pp-j--over { color: #B3261E; border-bottom: 1.5px solid #B3261E; }
.pp-j--warn { color: #8A5A00; }
.pp-ul { margin: 0; padding-left: 16px; }
.pp-p { margin: 8px 0 0; }
.pp-sign { margin-top: 10px; text-align: center; }
.pp-sign th, .pp-sign td { text-align: center; }
.pp-sign td small { color: #5E574B; }

@media (max-width: 1099px) {
  .cv-net__grid, .cv-rev__grid { grid-template-columns: 1fr; }
  .cv-net__side { order: -1; }
  .cv-tools { margin-left: 0; }
}
@media (max-width: 760px) {
  .cv-tools .cv-btn { flex: 1 1 auto; height: 38px; }
  .cv-tools__sep { display: none; }
  .cv-form { grid-template-columns: 1fr; }
  .cv-edit__lists { grid-template-columns: 1fr; }
  .cv-table--pick thead, .cv-table--hist thead, .cv-table--lim thead { display: none; }
  .cv-table--pick, .cv-table--pick tbody, .cv-table--pick tr, .cv-table--pick th, .cv-table--pick td,
  .cv-table--lim, .cv-table--lim tbody, .cv-table--lim tr, .cv-table--lim th, .cv-table--lim td { display: block; }
  .cv-table--pick tfoot { display: none; }
  .cv-table--pick tr, .cv-table--lim tr { padding: 8px 10px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: var(--r); }
  .cv-table--pick th, .cv-table--pick td, .cv-table--lim th, .cv-table--lim td { border: 0; padding: 2px 0; text-align: left !important; white-space: normal; }
  .cv-table--pick td[data-label]::before, .cv-table--lim td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 86px; color: var(--muted); font-size: 11px; font-family: var(--font); }
  .cv-table--pick tbody th { font-size: 16px; color: var(--primary); }
  .cv-table--hist tr { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px 6px; }
  .cv-table--hist td:nth-child(-n+4), .cv-table--hist td:last-child { grid-column: span 5; }
  .cv-table--hist td:nth-child(-n+4) { display: inline; }
  .cv-table--hist td { white-space: normal; min-width: 0; }
  .cv-table--hist td.cv-num[data-label]::before { display: block; min-width: 0; }
  .cv-table--hist td:nth-child(-n+4)::before, .cv-table--hist td:last-child::before { display: inline-block !important; min-width: 86px !important; }
  .cv-hist__wrap { max-height: 420px; }
  .cv-lookup__body { grid-template-columns: 1fr; }
  .cv-vals { grid-template-columns: repeat(3, 1fr); }
  .cv-limrow { gap: 3px; }
  .cv-paper { padding: 12px; }
  .pp-t { font-size: 9.5px; }
}

/* ---------- 인쇄: 보고서만 흰 종이에 ---------- */
@media print {
  .cv { background: #fff; color: #000; }
  .cv-band, .cv-head, .cv-verdict, .cv-rev__left, .cv-lookup, .cv-report .cv-card__head, .cv-flowline, .cv-report__acts, .cv-report__log, .cv-fab, .cv-toast, .demo-notice, dialog { display: none !important; }
  .cv-main, .cv-rev__grid, .cv-rev__right, .cv-report, .cv-paperwrap { display: block; padding: 0; margin: 0; border: 0; background: #fff; max-height: none; overflow: visible; }
  .cv-paper { max-width: none; padding: 0; }
}
.cv-net__hint { margin-left: auto; }
