/* WIZBASE TwinFoundry — 통합 백오피스 디자인 시스템 (산업 현장용 다크 테마) */
:root {
  --bg: #090d13; --bg2: #0e131a; --panel: #121923; --panel2: #172130; --panel3: #1c293a;
  --line: #223042; --line2: #2c3e55; --text: #e8eef5; --muted: #8b9aad; --dim: #5c6b7e;
  --accent: #38a3ff; --accent2: #2088e6; --accent-bg: rgba(56, 163, 255, .12);
  --ok: #2ecc71; --ok-bg: rgba(46, 204, 113, .13); --warn: #f5a623; --warn-bg: rgba(245, 166, 35, .14);
  --bad: #ff5a5f; --bad-bg: rgba(255, 90, 95, .14); --violet: #a394ff; --violet-bg: rgba(163, 148, 255, .14);
  --muted-bg: rgba(139, 154, 173, .14);
  --radius: 10px; --shadow: 0 10px 34px rgba(0, 0, 0, .42);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
button, a, .btn, .chip, .tab, .tw-mode, .listrow, .kcard, summary, label { touch-action: manipulation; }  /* 더블탭 확대 지연 제거 */
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
body { word-break: keep-all; overflow-wrap: break-word; }  /* 한글은 낱자가 아니라 낱말(띄어쓰기) 단위로 줄을 바꾼다 — 좁은 칸에서 글자가 세로로 쌓이지 않게 */
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
button { font: inherit; color: inherit; }
::selection { background: rgba(56, 163, 255, .35); }
* { scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; } .muted { color: var(--muted); } .dim { color: var(--dim); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.hidden { display: none !important; } .grow { flex: 1; } .nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ───────── 레이아웃 ───────── */
.shell { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; min-height: 100dvh; }
.sidebar { background: linear-gradient(180deg, #0c121a, #0a0f16); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 30; }
.brand { display: flex; gap: 11px; align-items: center; padding: 18px 18px 16px; border-bottom: 1px solid var(--line); }
.brand .logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #38a3ff, #6d5bff); display: grid; place-items: center; box-shadow: 0 0 22px rgba(56, 163, 255, .35); }
.brand b { display: block; font-size: 14px; letter-spacing: .08em; } .brand small { color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.nav { padding: 12px 10px; overflow: auto; flex: 1; }
.nav h6 { margin: 14px 10px 6px; font-size: 10.5px; letter-spacing: .12em; color: var(--dim); text-transform: uppercase; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; margin: 1px 0; border-radius: 8px; color: #b6c3d3; font-weight: 500; position: relative; transition: background .15s, color .15s; }
.nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--accent-bg); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav .count { margin-left: auto; font: 600 11px var(--mono); padding: 1px 7px; border-radius: 9px; background: var(--panel3); color: var(--muted); }
.nav .count.alert { background: var(--bad-bg); color: var(--bad); }
.side-foot { border-top: 1px solid var(--line); padding: 12px 14px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(46, 204, 113, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(46, 204, 113, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); } }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 7px 14px; background: rgba(9, 13, 19, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .crumbs { font-size: 13px; color: var(--muted); } .topbar .crumbs b { color: var(--text); font-weight: 600; }
.userbtn { display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 6px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: linear-gradient(135deg, #2c3e55, #3b516e); color: #fff; flex: none; }
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.menu { position: absolute; right: 28px; top: 54px; width: 250px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; z-index: 50; }
.menu .who { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; } .menu button { width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 8px; cursor: pointer; } .menu button:hover { background: var(--panel3); }
.page { padding: 10px 14px 24px; width: 100%; margin: 0; }      /* 좌우 폭 제한 없음 — 브라우저 폭을 다 쓴다 */
.page-h { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.page-h h1 { font-size: 19px; } .page-h p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.page-h .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hamburger { display: none; }

/* ───────── 그리드·카드 ───────── */
.grid { display: grid; gap: 16px; } .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(360px, 1fr); gap: 16px; align-items: start; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); } .card-h h3 { font-size: 13.5px; } .card-h .sub { color: var(--muted); font-size: 12px; } .card-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 16px; } .card-b.flush { padding: 0; }
.kpi { position: relative; padding: 16px 16px 14px; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--kc, var(--accent)); opacity: .9; }
.kpi .lbl { color: var(--muted); font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 7px; }
.kpi .val { font-size: 30px; font-weight: 700; margin: 6px 0 2px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .val small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 3px; } .kpi .sub { font-size: 12px; color: var(--muted); }
.kpi .ico { position: absolute; right: 14px; top: 16px; color: var(--kc, var(--accent)); opacity: .5; }

/* ───────── 배지 · 버튼 · 폼 ───────── */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--muted-bg); color: var(--muted); border: 1px solid transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; } .badge.nodot::before { display: none; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.bad { background: var(--bad-bg); color: var(--bad); } .badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.info { background: var(--accent-bg); color: var(--accent); } .badge.violet { background: var(--violet-bg); color: var(--violet); } .badge.lg { padding: 5px 14px; font-size: 14px; }
.tag { font: 600 10.5px var(--mono); padding: 1px 6px; border-radius: 5px; background: var(--panel3); color: var(--muted); letter-spacing: .04em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; font-weight: 550; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--panel3); border-color: #3a4f6a; } .btn:active { transform: translateY(1px); } .btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, #2f9bff, #1f7fd6); border-color: #2f8fe8; color: #fff; } .btn.primary:hover { background: linear-gradient(180deg, #4aa9ff, #2889e6); }
.btn.danger { background: var(--bad-bg); border-color: rgba(255, 90, 95, .4); color: #ff8a8e; } .btn.danger:hover { background: rgba(255, 90, 95, .24); }
.btn.ok { background: var(--ok-bg); border-color: rgba(46, 204, 113, .4); color: #62e29b; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); } .btn.ghost:hover { background: var(--panel2); color: var(--text); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; } .btn.icon { padding: 7px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; } .field > label { font-size: 12px; color: var(--muted); font-weight: 600; } .field .hint { font-size: 11.5px; color: var(--dim); }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line2); border-radius: 8px; padding: 9px 11px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56, 163, 255, .18); } textarea { resize: vertical; min-height: 80px; } select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); padding: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row > .field { flex: 1; min-width: 140px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; } .toolbar input, .toolbar select { width: auto; min-width: 150px; } .search { position: relative; } .search input { padding-left: 34px; min-width: 240px; } .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--dim); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; } .chip { padding: 5px 12px; border-radius: 20px; border: 1px solid var(--line2); background: var(--panel); cursor: pointer; font-size: 12.5px; font-weight: 550; color: var(--muted); user-select: none; } .chip:hover { color: var(--text); border-color: #3a4f6a; } .chip.on { background: var(--accent-bg); border-color: var(--accent); color: #fff; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; } .tab { padding: 10px 16px; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; border-top: 0; border-left: 0; border-right: 0; } .tab:hover { color: var(--text); } .tab.active { color: #fff; border-bottom-color: var(--accent); }

/* ───────── 표 ───────── */
.tbl-wrap { overflow: auto; border-radius: 0 0 var(--radius) var(--radius); } .tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { position: sticky; top: 0; background: var(--panel2); text-align: left; padding: 10px 14px; font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: .04em; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; } .tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: rgba(56, 163, 255, .06); } .tbl tr.sel td { background: var(--accent-bg); }
.tbl .id { font: 600 12px var(--mono); color: #b9c7d8; } .tbl .sub { font-size: 12px; color: var(--muted); }
.thumb { width: 42px; height: 42px; border-radius: 8px; background: #151d28; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; color: var(--dim); flex: none; } .thumb img { width: 100%; height: 100%; object-fit: contain; }
.cell-asset { display: flex; gap: 12px; align-items: center; min-width: 200px; }
.pager { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; } .pager .grow { flex: 1; }
.empty { padding: 56px 20px; text-align: center; color: var(--muted); } .empty svg { opacity: .45; margin-bottom: 10px; } .empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.skeleton { background: linear-gradient(90deg, var(--panel) 25%, var(--panel2) 37%, var(--panel) 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; } @keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ───────── 3D 뷰어 ───────── */
.viewer { position: relative; height: 540px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: radial-gradient(1200px 600px at 50% 0, #121b27, #080c11); }
.viewer canvas { display: block; width: 100%; height: 100%; outline: none; }
.viewer-tools { position: absolute; left: 12px; top: 12px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 140px); z-index: 2; }
.vchip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 7px; background: rgba(14, 20, 28, .78); border: 1px solid var(--line2); cursor: pointer; font-size: 12px; font-weight: 550; color: var(--muted); backdrop-filter: blur(6px); user-select: none; }
.vchip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--accent)); opacity: .35; } .vchip.on { color: var(--text); border-color: #3a4f6a; } .vchip.on i { opacity: 1; box-shadow: 0 0 8px var(--c, var(--accent)); } .vchip.off { opacity: .7; }
.viewer-btns { position: absolute; right: 12px; top: 12px; display: flex; gap: 6px; z-index: 2; }
.viewer-hint { position: absolute; right: 12px; bottom: 10px; font-size: 11px; color: var(--dim); z-index: 2; pointer-events: none; }
.viewer-legend { position: absolute; left: 12px; bottom: 10px; display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); z-index: 2; pointer-events: none; flex-wrap: wrap; } .viewer-legend span { display: inline-flex; align-items: center; gap: 6px; } .viewer-legend i { width: 14px; height: 2px; background: var(--c); display: inline-block; }
.viewer-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); z-index: 1; pointer-events: none; text-align: center; padding: 20px; }
.hud { position: absolute; left: 12px; top: 54px; z-index: 2; font: 11px var(--mono); color: var(--muted); pointer-events: none; }

/* ───────── 정보 패널 ───────── */
.kv { display: grid; grid-template-columns: 112px 1fr; gap: 9px 14px; font-size: 13px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-word; }
.meter { position: relative; height: 8px; border-radius: 5px; background: var(--panel3); overflow: hidden; } .meter > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--ok); } .meter.warn > i { background: var(--warn); } .meter.bad > i { background: var(--bad); }
.meter .tol { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #fff; opacity: .8; }
.gauge { margin-bottom: 14px; } .gauge .gh { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 6px; } .gauge .gh b { font-family: var(--mono); }
.notice { padding: 11px 14px; border-radius: 9px; font-size: 13px; background: var(--accent-bg); border: 1px solid rgba(56, 163, 255, .3); color: #b8dcff; } .notice.warn { background: var(--warn-bg); border-color: rgba(245, 166, 35, .35); color: #ffd699; } .notice.bad { background: var(--bad-bg); border-color: rgba(255, 90, 95, .35); color: #ffb3b5; } .notice.ok { background: var(--ok-bg); border-color: rgba(46, 204, 113, .35); color: #9bf0c2; }
.steps { display: flex; gap: 0; margin: 0 0 14px; } .step { flex: 1; position: relative; text-align: center; padding: 8px 4px 0; cursor: pointer; font-size: 12px; color: var(--muted); font-weight: 600; }
.step::before { content: attr(data-n); display: block; width: 26px; height: 26px; line-height: 24px; border-radius: 50%; margin: 0 auto 6px; border: 1.5px solid var(--line2); background: var(--panel); font: 700 12px var(--mono); position: relative; z-index: 1; }
.step::after { content: ""; position: absolute; top: 20px; left: calc(50% + 15px); right: calc(-50% + 15px); height: 2px; background: var(--line2); } .step:last-child::after { display: none; }
.step.done::before { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); } .step.done::after { background: var(--ok); opacity: .5; } .step.active::before { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 14px rgba(56, 163, 255, .55); } .step.active { color: #fff; }
.pipe { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 4px 0 14px; } .pipe .p { padding: 5px 10px; border-radius: 7px; font-size: 12px; font-weight: 600; background: var(--panel2); border: 1px solid var(--line2); color: var(--muted); } .pipe .p.done { color: var(--ok); border-color: rgba(46, 204, 113, .4); background: var(--ok-bg); } .pipe .p.cur { color: #fff; border-color: var(--accent); background: var(--accent-bg); box-shadow: 0 0 12px rgba(56, 163, 255, .3); } .pipe .arrow { color: var(--dim); }

/* ───────── 칸반 · 타임라인 · 드로어 ───────── */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.col { flex: 0 0 272px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); max-height: calc(100vh - 250px); max-height: calc(100dvh - 250px); display: flex; flex-direction: column; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border-bottom: 1px solid var(--line); font-weight: 650; font-size: 13px; } .col-h .n { margin-left: auto; font: 600 11.5px var(--mono); background: var(--panel3); padding: 1px 8px; border-radius: 9px; color: var(--muted); } .col-h .bar { width: 4px; height: 16px; border-radius: 2px; background: var(--c, var(--accent)); }
.col-b { padding: 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; min-height: 80px; }
.kcard { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; cursor: pointer; transition: border-color .15s, transform .12s, box-shadow .15s; border-left: 3px solid var(--sev, var(--line2)); } .kcard:hover { border-color: #3a4f6a; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.kcard .t { font-weight: 600; margin: 5px 0 8px; line-height: 1.35; } .kcard .m { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; } .kcard .m .grow { flex: 1; }
.kcard.overdue { box-shadow: inset 0 0 0 1px rgba(255, 90, 95, .45); } .due { font: 600 11.5px var(--mono); } .due.late { color: var(--bad); }
.timeline { position: relative; padding-left: 22px; } .timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.ev { position: relative; padding: 0 0 18px; } .ev::before { content: ""; position: absolute; left: -22px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--panel); border: 2px solid var(--c, var(--line2)); }
.ev .eh { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; } .ev .eh b { font-weight: 650; } .ev .et { color: var(--dim); font-size: 11.5px; font-family: var(--mono); } .ev .ec { margin-top: 5px; padding: 8px 11px; border-radius: 8px; background: var(--bg2); border: 1px solid var(--line); color: #c8d3e0; white-space: pre-wrap; font-size: 13px; }
.drawer-mask { position: fixed; inset: 0; background: rgba(2, 5, 9, .62); backdrop-filter: blur(2px); z-index: 60; animation: fade .15s; } .drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100vw); background: var(--panel); border-left: 1px solid var(--line2); box-shadow: var(--shadow); z-index: 61; display: flex; flex-direction: column; animation: slide .2s ease-out; }
.drawer-h { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); } .drawer-b { padding: 20px; overflow-y: auto; flex: 1; } .drawer-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--panel2); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } } @keyframes fade { from { opacity: 0; } }
.modal-mask { position: fixed; inset: 0; background: rgba(2, 5, 9, .7); backdrop-filter: blur(3px); z-index: 400; display: grid; place-items: center; padding: 20px; animation: fade .15s; } .modal { background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; box-shadow: var(--shadow); width: min(var(--w, 480px), 100%); max-height: 90vh; display: flex; flex-direction: column; } .modal-h { padding: 18px 22px 6px; font-size: 16px; font-weight: 650; } .modal-b { padding: 12px 22px; overflow-y: auto; } .modal-f { padding: 14px 22px 18px; display: flex; gap: 8px; justify-content: flex-end; }
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 450; } .toast { min-width: 260px; max-width: 420px; padding: 12px 16px; border-radius: 10px; background: var(--panel3); border: 1px solid var(--line2); box-shadow: var(--shadow); display: flex; gap: 10px; align-items: flex-start; animation: slide .2s; } .toast.ok { border-left: 3px solid var(--ok); } .toast.bad { border-left: 3px solid var(--bad); } .toast.warn { border-left: 3px solid var(--warn); }
.bulkbar { position: sticky; bottom: 14px; margin-top: 14px; display: flex; gap: 10px; align-items: center; padding: 11px 16px; background: var(--panel3); border: 1px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow); z-index: 10; }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.chartbox { position: relative; height: 250px; } .chartbox.sm { height: 210px; }
.perm { width: 100%; border-collapse: collapse; font-size: 12.5px; } .perm th, .perm td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: center; } .perm th:first-child, .perm td:first-child { text-align: left; } .perm th { color: var(--muted); font-weight: 600; } .yes { color: var(--ok); font-weight: 700; } .no { color: var(--dim); }
.listrow { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); cursor: pointer; } .listrow:hover { background: rgba(56, 163, 255, .06); } .listrow:last-child { border-bottom: 0; } .listrow .t { font-weight: 600; } .listrow .s { color: var(--muted); font-size: 12px; }

/* ───────── 로그인 ───────── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden; background: radial-gradient(900px 500px at 70% -10%, rgba(56, 163, 255, .16), transparent), radial-gradient(700px 500px at 0 110%, rgba(109, 91, 255, .13), transparent), var(--bg); }
.login::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; opacity: .22; mask-image: radial-gradient(circle at 50% 40%, #000, transparent 70%); }
.login-card { position: relative; width: min(420px, 100%); padding: 34px; background: rgba(18, 25, 35, .9); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow); backdrop-filter: blur(8px); }
.login-card .logo { width: 48px; height: 48px; border-radius: 13px; background: linear-gradient(135deg, #38a3ff, #6d5bff); display: grid; place-items: center; box-shadow: 0 0 30px rgba(56, 163, 255, .4); margin-bottom: 18px; }
.login-card h1 { font-size: 21px; letter-spacing: .02em; } .login-card p { color: var(--muted); margin: 6px 0 24px; }
.login-foot { margin-top: 22px; font-size: 12px; color: var(--dim); text-align: center; line-height: 1.7; }

/* ───────── 반응형 · 인쇄 ───────── */
.split.scans-split { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); }  /* 공간·스캔 결과: 왼쪽 공간 목록 + 오른쪽 결과 */
@media (max-width: 1280px) { .cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .split.scans-split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1000px) {
  .shell { grid-template-columns: 1fr; } .sidebar { position: fixed; left: 0; top: 0; width: 262px; transform: translateX(-100%); transition: transform .2s; } .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .hamburger { display: inline-flex; } .cols-4, .cols-3, .cols-2 { grid-template-columns: 1fr 1fr; } .page { padding: 18px 16px 50px; } .topbar { padding: 10px 16px; } .viewer { height: 420px; }
}
@media (max-width: 640px) { .cols-4, .cols-3, .cols-2, .cols-6 { grid-template-columns: 1fr; } .kv { grid-template-columns: 96px 1fr; } .menu { right: 12px; } }
/* ───────── 모바일 최적화 (폰 세로 기준) ───────── */
.side-mask { display: none; }
.tabs { overflow-x: auto; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; } .tab { white-space: nowrap; }
.listrow { min-width: 0; } .listrow .grow { min-width: 0; } .listrow .t, .listrow .s { overflow-wrap: anywhere; }
.topbar { padding-top: calc(7px + env(safe-area-inset-top)); }
@media (pointer: coarse) {  /* 터치 기기: 누르기 쉬운 크기, iOS 입력창 자동 확대(16px 미만) 방지 */
  .btn { min-height: 40px; } .btn.sm { min-height: 36px; } .btn.icon { min-width: 40px; } .chip { padding: 8px 14px; } .vchip { padding: 8px 12px; }
  input, select, textarea { font-size: 16px; } input[type=checkbox] { width: 20px; height: 20px; } .tab { padding: 12px 16px; } .nav a { padding: 12px 12px; }
}
@media (max-width: 1000px) {
  .side-mask { display: block; position: fixed; inset: 0; background: rgba(2, 5, 9, .6); z-index: 25; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .side-mask.open { opacity: 1; pointer-events: auto; }
  .sidebar { z-index: 40; height: 100dvh; padding-top: env(safe-area-inset-top); }
}
@media (max-width: 900px) {  /* 화면별로 인라인으로 정한 다단 격자(대시보드 패널 등)는 폰·좁은 태블릿에서 한 줄로 쌓는다 */
  .grid[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
}
.cols-3.keep3, .cols-3.keep3[style] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
@media (max-width: 700px) {
  body { font-size: 14px; } .page { word-break: keep-all; overflow-wrap: anywhere; }  /* 한글은 단어 중간에서 끊지 않는다 */
  .perm th { white-space: nowrap; font-size: 11px; padding: 7px 2px; } .perm td:first-child { word-break: keep-all; } .badge { max-width: 100%; }
  .page { padding: 14px 12px calc(40px + env(safe-area-inset-bottom)); } .topbar { padding: calc(8px + env(safe-area-inset-top)) 10px 8px; gap: 8px; }
  .topbar .crumbs { font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .topbar .crumbs .crumb-pre { display: none; }
  .userbtn { padding: 3px; } .userbtn .who-txt { display: none; } .menu { right: 10px; top: calc(50px + env(safe-area-inset-top)); width: min(280px, calc(100vw - 20px)); position: fixed; }
  .page-h { margin-bottom: 14px; gap: 8px; } .page-h h1 { font-size: 20px; } .page-h p { font-size: 13px; }
  .page-h .actions { margin-left: 0; width: 100%; } .page-h .actions .btn { flex: 1 1 auto; }
  .toolbar { gap: 8px; } .toolbar > * { flex: 1 1 calc(50% - 4px); min-width: 0; } .toolbar .search, .toolbar .chips { flex: 1 1 100%; } .toolbar input, .toolbar select { width: 100%; min-width: 0; } .search input { min-width: 0; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px 2px; } .chips::-webkit-scrollbar { display: none; } .chip { flex: none; }
  .cols-6, .cols-4, .cols-3, .cols-2 { gap: 10px; } .cols-6, .cols-4 { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 12px 12px 10px; } .kpi .val { font-size: 24px; } .kpi .ico { right: 10px; top: 12px; width: 18px; height: 18px; }
  .card-h { flex-wrap: wrap; padding: 11px 12px; } .card-b { padding: 12px; } .card-h .right { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .grid { gap: 12px; } .split { gap: 12px; } .chartbox { height: 210px; } .kv { grid-template-columns: 88px 1fr; font-size: 13px; }
  /* 표 → 카드 목록: JS(labelTables)가 칸마다 data-label을 붙인다 */
  .tbl-wrap { overflow: visible; } .tbl:not(.perm), .tbl:not(.perm) tbody { display: block; } .tbl:not(.perm) thead { display: none; }
  .tbl:not(.perm) tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 12px; border-bottom: 1px solid var(--line); position: relative; }
  .tbl:not(.perm) tr:last-child { border-bottom: 0; }
  .tbl:not(.perm) td { display: block; padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; } .tbl:not(.perm) td:empty { display: none; }
  .tbl:not(.perm) td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--dim); margin-bottom: 2px; letter-spacing: .02em; }
  .tbl:not(.perm) td.cb { position: absolute; right: 10px; top: 10px; z-index: 1; } .tbl:not(.perm) td.main, .tbl:not(.perm) td.full { grid-column: 1 / -1; }
  .tbl:not(.perm) td.main { padding-right: 34px; } .tbl:not(.perm) td.full:not(.main):not([data-label]) { display: flex; gap: 8px; flex-wrap: wrap; } .tbl:not(.perm) td.long { grid-column: 1 / -1; font-size: 12px; color: #c8d3e0; }
  .cell-asset { min-width: 0; } .tbl .num { text-align: left; }
  .pager { flex-wrap: wrap; padding: 10px 12px; }
  .perm { font-size: 11.5px; } .perm th, .perm td { padding: 7px 4px; }
  /* 칸반: 열 하나씩 넘겨 보기 */
  .board { scroll-snap-type: x mandatory; gap: 10px; margin: 0 -12px; padding: 0 12px 10px; } .col { flex: 0 0 84vw; scroll-snap-align: center; max-height: 72vh; }
  /* 3D 뷰어 */
  .viewer { height: min(58vh, 440px); min-height: 300px; } .viewer-tools { top: 54px; max-width: calc(100% - 24px); } .viewer-btns { left: 12px; right: 12px; justify-content: flex-end; }
  .viewer-hint, .hud { display: none; } .viewer-legend { font-size: 11px; gap: 8px; max-width: calc(100% - 24px); }
  /* 서랍·모달·토스트·일괄 작업 줄 */
  .drawer { width: 100vw; border-left: 0; } .drawer-h { padding: 12px 14px; } .drawer-b { padding: 14px; } .drawer-f { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .modal-mask { padding: 0; align-items: end; } .modal { width: 100%; border-radius: 16px 16px 0 0; max-height: 92dvh; }
  .toasts { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); } .toast { min-width: 0; max-width: none; }
  .bulkbar { flex-wrap: wrap; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 10px 12px; } .bulkbar .btn { flex: 1 1 auto; }
  .steps .step { font-size: 11px; } .login-card { padding: 24px 20px; }
}
/* 가로 모드 폰: 세로가 낮아 뷰어가 찌그러지지 않게 한다 */
@media (max-height: 520px) and (orientation: landscape) {
  .viewer, .tw-viewer { height: calc(100dvh - 90px); min-height: 220px; } .tw-side { max-height: 80dvh; } .modal { max-height: 96dvh; }
}
.drawer, .modal, .menu, .tw-popup { overscroll-behavior: contain; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; } }
@media print {
  :root { --bg: #fff; --bg2: #fff; --panel: #fff; --panel2: #f4f6f9; --panel3: #eceff3; --line: #d5dbe3; --line2: #c3ccd7; --text: #111; --muted: #4a5666; --dim: #6a7686; }
  .sidebar, .topbar, .btn, .viewer-tools, .viewer-btns, .toasts, .tabs, .bulkbar, .hamburger { display: none !important; } .shell { display: block; } .page { padding: 0; max-width: none; } .card, .viewer { break-inside: avoid; } .viewer { height: 380px; }
}

/* ═════════ 3D 디지털 트윈 (views/twin.js) — 이 블록 안에서만 .tw* 클래스를 쓴다 ═════════ */
.tw { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.tw-main { min-width: 0; }
.tw-bar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.tw-modes { display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; max-width: 100%; overflow-x: auto; }
.tw-mode { padding: 7px 14px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap; }
.tw-mode:hover { color: var(--text); } .tw-mode.active { background: var(--accent-bg); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(56, 163, 255, .4); }
.tw-floors { display: flex; gap: 6px; } .tw-floors .chip.on { background: var(--accent-bg); color: var(--accent); border-color: rgba(56, 163, 255, .5); }
.twin-root .page-h { margin-bottom: 10px; } .twin-root .page-h p { font-size: 12.5px; }
.tw-viewer { height: calc(100vh - 300px); min-height: 460px; touch-action: none; }
.tw-canvas { position: absolute; inset: 0; } .tw-canvas canvas { width: 100%; height: 100%; display: block; outline: none; }
.tw-notice { position: absolute; left: 0; right: 0; top: 0; z-index: 4; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 7px 12px; background: rgba(245, 166, 35, .2); border-bottom: 1px solid rgba(245, 166, 35, .55); color: #ffd28a; font-size: 12.5px; font-weight: 600; backdrop-filter: blur(4px); }
.tw-tools { position: absolute; right: 10px; top: 46px; z-index: 3; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: calc(100% - 20px); }
.tw-tools .btn { background: rgba(14, 20, 28, .82); backdrop-filter: blur(4px); } .tw-tools .btn.primary { background: linear-gradient(180deg, #2f9bff, #1f7fd6); }
.tw-fps { position: absolute; left: 10px; top: 46px; z-index: 3; font-size: 11px; color: var(--muted); background: rgba(14, 20, 28, .7); padding: 2px 8px; border-radius: 6px; pointer-events: none; } .tw-fps.low { color: var(--warn); }
.tw-measure { position: absolute; left: 10px; top: 76px; z-index: 3; padding: 3px 10px; border-radius: 6px; background: rgba(255, 225, 77, .16); color: #ffe14d; border: 1px solid rgba(255, 225, 77, .5); font-size: 13px; }
.tw-legend { position: absolute; left: 10px; bottom: 10px; z-index: 2; display: flex; gap: 6px 12px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; max-width: calc(100% - 20px); pointer-events: none; background: rgba(9, 13, 19, .6); padding: 5px 9px; border-radius: 8px; }
.tw-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; } .tw-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.tw-legend.static { position: static; background: none; padding: 0; pointer-events: auto; }
.tw-tip { position: absolute; z-index: 6; pointer-events: none; min-width: 170px; max-width: 240px; padding: 9px 11px; border-radius: 9px; background: rgba(12, 18, 26, .95); border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 12.5px; display: flex; flex-direction: column; gap: 5px; }
.tw-tip-r { display: flex; justify-content: space-between; gap: 10px; align-items: center; } .tw-tip-warn { color: var(--warn); font-weight: 600; font-size: 12px; }
.tw-popup { position: absolute; left: 10px; top: 80px; z-index: 5; width: 300px; max-width: calc(100% - 20px); max-height: calc(100% - 140px); overflow: auto; padding: 12px; border-radius: 12px; background: rgba(14, 20, 28, .96); border: 1px solid var(--line2); box-shadow: var(--shadow); }
.tw-popup-h { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; } .tw-dl { grid-template-columns: 68px 1fr; font-size: 12.5px; } .tw-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tw-entr { position: absolute; z-index: 5; left: 50%; top: 52px; transform: translateX(-50%); width: min(420px, calc(100% - 20px)); padding: 12px; border-radius: 12px; background: rgba(14, 20, 28, .95); border: 1px solid var(--line2); display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.tw-entr-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); } .tw-entr-row.sel { border-color: var(--accent); background: var(--accent-bg); }
.tw-near { position: absolute; z-index: 5; left: 50%; bottom: 56px; transform: translateX(-50%); }
.tw-joy { position: absolute; z-index: 4; left: 22px; bottom: 74px; width: 112px; height: 112px; border-radius: 50%; background: rgba(255, 255, 255, .07); border: 2px solid rgba(255, 255, 255, .25); touch-action: none; display: grid; place-items: center; }
.tw-joy i { width: 46px; height: 46px; border-radius: 50%; background: rgba(56, 163, 255, .6); border: 2px solid rgba(255, 255, 255, .6); }
.tw-lookhint { position: absolute; z-index: 2; right: 10px; bottom: 10px; font-size: 11px; color: var(--muted); background: rgba(9, 13, 19, .6); padding: 3px 8px; border-radius: 6px; max-width: 46%; text-align: right; pointer-events: none; }
.tw-side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overscroll-behavior: contain; max-height: calc(100vh - 150px); overflow: auto; position: sticky; top: 12px; }
.tw-sec { border-bottom: 1px solid var(--line); } .tw-sec:last-child { border-bottom: 0; }
.tw-sec > summary { padding: 11px 14px; font-weight: 650; font-size: 13.5px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; user-select: none; }
.tw-sec > summary::after { content: "+"; color: var(--muted); } .tw-sec[open] > summary::after { content: "−"; }
.tw-sec-b { padding: 2px 14px 14px; }
.tw-kv { display: flex; flex-direction: column; font-size: 12.5px; margin-bottom: 6px; }
.tw-floor-h { font-weight: 650; margin: 10px 0 4px; font-size: 13px; }
.tw-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 5px; cursor: pointer; background: var(--bg2); flex-wrap: wrap; }
.tw-row:hover { border-color: var(--line2); } .tw-row.sel { border-color: var(--accent); background: var(--accent-bg); } .tw-row.compact { padding: 6px 9px; }
.tw-row-t { display: flex; flex-direction: column; min-width: 0; flex: 1 1 120px; } .tw-row-t small { overflow: hidden; text-overflow: ellipsis; }
.tw-row-m { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; } .tw-row .badge { font-size: 11px; padding: 1px 7px; }
.tw-chk { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; cursor: pointer; flex-wrap: wrap; } .tw-chk.sm { font-size: 11.5px; padding: 0; } .tw-chk .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.tw-layer { padding: 2px 0 6px; } .tw-layer input[type=range], .tw-slide input[type=range] { padding: 0; height: 22px; accent-color: var(--accent); background: transparent; border: 0; }
.tw-slide { display: grid; grid-template-columns: 38px 1fr 60px; align-items: center; gap: 8px; font-size: 12px; }
.tw-hint { font-size: 11.5px; color: var(--dim); margin-top: 8px; }
.tw-edit { margin-top: 10px; padding: 10px; border: 1px dashed var(--line2); border-radius: 9px; display: flex; flex-direction: column; gap: 8px; } .tw-edit .field { margin-bottom: 6px; }
.tw-wl { max-height: 200px; overflow: auto; }
.tw-handle { display: none; }
.tw-only-m { display: none; }
@media (max-width: 1100px) { .tw { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (max-width: 900px) {
  .tw { grid-template-columns: 1fr; }
  .tw-viewer { height: calc(100dvh - 300px); min-height: 360px; }
  .tw-handle { display: inline-flex; position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); justify-content: center; background: var(--panel3); box-shadow: var(--shadow); }
  .tw-side { position: fixed; z-index: 39; left: 0; right: 0; bottom: 0; max-height: 62vh; border-radius: 16px 16px 0 0; transform: translateY(105%); transition: transform .22s ease; padding-bottom: calc(64px + env(safe-area-inset-bottom)); top: auto; box-shadow: 0 -10px 34px rgba(0, 0, 0, .5); }
  .tw-side.open { transform: none; }
  .tw-only-m { display: block; }
}
@media (max-width: 700px) {
  .twin-root { word-break: keep-all; }
  .tw-bar { gap: 6px; } .tw-mode { padding: 8px 10px; font-size: 13px; } .tw-modes { width: 100%; } .tw-mode { flex: 1 1 auto; }
  .twin-root .page-h p { display: none; } .twin-root .page-h .field { min-width: 0; } .twin-root .page-h .actions { margin-top: 0; }
  .tw-viewer { height: calc(100dvh - 330px); min-height: 340px; }
  .tw-tools { top: 40px; } .tw-tools .tw-lbl { display: none; } .tw-fps { top: 40px; font-size: 10.5px; } .tw-measure { top: 70px; }
  .tw-legend { display: none; } .tw-lookhint { display: none; }
  .tw-popup { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 48%; } .tw-entr { top: 40px; }
  .tw-notice { font-size: 11.5px; padding: 5px 10px; }
  .tw-floors .chip, .tw-tools .btn, .tw-mode { min-height: 36px; min-width: 36px; display: inline-flex; align-items: center; justify-content: center; } .tw-row { min-height: 40px; } .tw-handle { min-height: 44px; }
  .tw-layer input[type=range], .tw-slide input[type=range] { height: 32px; }
  .tw-near { bottom: 74px; }
  .tw-joy { bottom: 76px; left: 14px; }
  .tw-edit .row > .field { min-width: 100px; }
}

/* 로딩 표시 · 투어 · 사진 모드 */
.tw-load { position: absolute; left: 10px; top: 70px; z-index: 3; font-size: 11px; color: #bcd3ea; background: rgba(14, 20, 28, .78); border: 1px solid rgba(56, 163, 255, .35); padding: 2px 8px; border-radius: 6px; pointer-events: none; }
.tw-tourpill { position: absolute; left: 50%; top: 54px; transform: translateX(-50%); z-index: 3; font-size: 12.5px; font-weight: 600; color: #fff; background: rgba(14, 20, 28, .8); border: 1px solid rgba(56, 163, 255, .5); padding: 5px 14px; border-radius: 999px; pointer-events: none; white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.tw-measure { top: 100px; }
.tw-photobar { display: none; position: absolute; right: 12px; top: 46px; z-index: 7; gap: 6px; opacity: .55; transition: opacity .2s; } .tw-photobar:hover, .tw-photobar:focus-within { opacity: 1; }
.tw-photobar .btn { background: rgba(14, 20, 28, .82); backdrop-filter: blur(4px); }
.twin-root.tw-photo .tw-photobar { display: flex; }
.twin-root.tw-photo .page-h, .twin-root.tw-photo .tw-bar, .twin-root.tw-photo .tw-side, .twin-root.tw-photo .tw-handle, .twin-root.tw-photo .tw-tools,
.twin-root.tw-photo .tw-fps, .twin-root.tw-photo .tw-legend, .twin-root.tw-photo .tw-lookhint, .twin-root.tw-photo .tw-joy, .twin-root.tw-photo .tw-near,
.twin-root.tw-photo .tw-popup, .twin-root.tw-photo .tw-entr, .twin-root.tw-photo .tw-measure, .twin-root.tw-photo .tw-tip, .twin-root.tw-photo .tw-load,
.twin-root.tw-photo .tw-tourpill, .twin-root.tw-photo .notice { display: none !important; }
.twin-root.tw-photo .tw { display: block; }
.twin-root.tw-photo .tw-viewer { position: fixed; inset: 0; z-index: 60; height: auto; min-height: 0; border-radius: 0; border: 0; }
/* 출처 고지(.tw-notice)는 사진 모드에서도 숨기지 않는다 — 위 목록에 넣지 않았다 */
@media (max-width: 700px) { .tw-load { top: auto; bottom: 34px; font-size: 10.5px; } .tw-fps { top: auto; bottom: 10px; } .tw-measure { top: 92px; } .tw-photobar { top: 40px; } .tw-tourpill { top: auto; bottom: 70px; } }
/* 크게 보기(.tw-full): 뷰어를 화면 전체로. 도구 막대·레이어 패널은 그대로 쓴다 */
.twin-root.tw-full .tw-viewer { position: fixed; inset: 0; z-index: 60; height: 100dvh; min-height: 0; border-radius: 0; border: 0; }
.twin-root.tw-full .tw-tools { top: calc(10px + env(safe-area-inset-top)); right: calc(10px + env(safe-area-inset-right)); }
.twin-root.tw-full .tw-notice { top: auto; bottom: 0; border-bottom: 0; border-top: 1px solid rgba(245, 166, 35, .55); padding-bottom: calc(7px + env(safe-area-inset-bottom)); }
.twin-root.tw-full .tw-fps { top: calc(10px + env(safe-area-inset-top)); } .twin-root.tw-full .tw-measure { top: calc(44px + env(safe-area-inset-top)); }
.twin-root.tw-full .tw-handle { z-index: 70; } .twin-root.tw-full .tw-side { z-index: 69; }
.twin-root.tw-full .tw-popup { max-height: 52%; }
@media (max-width: 900px) { .twin-root.tw-full .tw-handle { bottom: calc(46px + env(safe-area-inset-bottom)); left: auto; right: 12px; width: auto; min-width: 150px; } }
@media (max-width: 900px) { .twin-root.tw-full .tw-handle.is-open { left: 12px; right: 12px; width: auto; } }
/* 폰: 3D 위쪽의 제목·알림·탭을 줄여 뷰어를 키운다 (제목은 상단바에 이미 있다) */
@media (max-width: 700px) {
  .twin-root .page-h { margin-bottom: 6px; } .twin-root .page-h h1 { display: none; }
  .twin-root .page-h .actions, .twin-root .page-h .actions .field { width: 100%; } .twin-root .page-h select { width: 100%; min-height: 40px; }
  .twin-root > .notice { margin-bottom: 6px !important; padding: 6px 10px; font-size: 12px; }
  .tw-bar { margin-bottom: 6px; } .tw-modes { padding: 2px; } .tw-mode { min-height: 40px; padding: 6px 8px; }
  .tw-floors { overflow-x: auto; scrollbar-width: none; max-width: 100%; } .tw-floors::-webkit-scrollbar { display: none; } .tw-floors .chip { flex: none; padding: 6px 14px; }
  .tw-viewer { height: calc(100dvh - 232px); min-height: 380px; }
  .tw-notice { font-size: 11px; padding: 4px 8px; gap: 4px; } .tw-notice .badge { font-size: 10.5px; padding: 0 6px; }
  .tw-tools { gap: 5px; } .tw-tools .btn { min-height: 40px; min-width: 40px; border-radius: 10px; background: rgba(14, 20, 28, .9); }
  .tw-fps { display: none; }  /* 폰에서는 FPS 표시 숨김 (필요하면 크게 보기에서도 숨김 유지) */
  .tw-handle { min-height: 46px; font-weight: 650; }
  .tw-side { max-height: 72dvh; } .tw-sec > summary { padding: 14px; font-size: 14px; } .tw-row { padding: 10px; }
  .tw-popup { max-height: 44%; font-size: 13px; }
}
/* ═════════ /3D 디지털 트윈 ═════════ */
/* 구조 3D 팝업(공간·스캔 결과): 데스크톱은 좌우, 폰은 3D를 위에 크게 · 이름 목록은 아래 */
.sv-row { display: flex; gap: 14px; align-items: flex-start; } .sv-view { flex: 1; min-width: 0; } .sv-panel { width: 270px; flex: none; }
@media (max-width: 700px) {
  .sv-row { flex-direction: column; gap: 10px; } .sv-view, .sv-panel { width: 100%; flex: none; }
  .sv-view .viewer { height: min(56dvh, 420px) !important; min-height: 300px; }
}


/* 구조 3D: 구조물 이름 목록 */
div.click:hover { background: rgba(56, 163, 255, .08); } div.click.sel { background: var(--accent-bg); outline: 1px solid var(--accent); }

/* ── BIM/CAD 파일 뷰어 (fileviewer.js) ── */
.fv { position: fixed; inset: 0; z-index: 330; background: var(--bg); display: flex; flex-direction: column; }
.fv-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; padding-top: max(8px, env(safe-area-inset-top)); }
.fv-body { flex: 1; display: flex; min-height: 0; }
.fv-view { flex: 1 1 0; position: relative; min-width: 0; min-height: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 30%, #162130, #0a0f16); }
.fv-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.fv-side { width: 270px; overflow: auto; border-left: 1px solid var(--line); background: var(--panel); padding: 12px; font-size: 13px; }
.fv-h { font-weight: 650; margin-bottom: 2px; }
.fv-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; cursor: pointer; }
.fv-row i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.fv-info { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.fv-set { margin: 8px 0 2px; font-size: 11.5px; color: var(--accent); font-weight: 600; }
.fv-kv { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 1px 0; }
@media (max-width: 700px) {
  .fv-body { flex-direction: column; }
  .fv-side { width: auto; flex: none; max-height: 34%; border-left: 0; border-top: 1px solid var(--line); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .fv-sub { display: none; }
}

/* ── 사물 CAD 편집기 (cadeditor.js) ── */
.cad { position: fixed; inset: 0; z-index: 310; background: var(--bg); display: flex; flex-direction: column; color: var(--text); }
.cad-loading { margin: auto; text-align: center; color: var(--muted); }
.cad-top select { width: auto; } .cad-top { display: flex; align-items: center; gap: 5px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; row-gap: 4px; }
.cad-title { font-size: 13.5px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cad-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: var(--muted-bg); color: var(--muted); white-space: nowrap; }
.cad-badge.ok { background: var(--ok-bg); color: var(--ok); } .cad-badge.std { background: var(--violet-bg); color: var(--violet); }
.cad-sep { width: 1px; height: 22px; background: var(--line2); margin: 0 3px; }
.cad-ic { display: inline-flex; flex: none; }
.cad-tool { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: #c3d0df; cursor: pointer; font-size: 12px; }
.cad-tool i { font-style: normal; } .cad-tool.sm { padding: 5px 7px; }
.cad-tool:hover:not(:disabled) { background: var(--panel3); } .cad-tool.on { background: var(--accent-bg); border-color: var(--accent); color: #fff; } .cad-tool:disabled { opacity: .35; cursor: default; }
.cad-sel { width: auto; flex: none; background: var(--panel2); color: var(--text); border: 1px solid var(--line2); border-radius: 7px; padding: 4px 6px; font-size: 12px; }
.cad-view-btn { background: none; border: 0; color: var(--muted); padding: 5px 7px; border-radius: 6px; cursor: pointer; font-size: 12px; } .cad-view-btn:hover { color: var(--text); background: var(--panel3); } .cad-view-btn.on { color: #fff; background: var(--panel3); }
.cad-menu { position: relative; } .cad-menu-pop { display: none; position: absolute; right: 0; top: 100%; min-width: 250px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; z-index: 20; }
.cad-menu:hover .cad-menu-pop, .cad-menu:focus-within .cad-menu-pop { display: block; } .cad-menu-pop button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 12.5px; } .cad-menu-pop button:hover { background: var(--panel3); }
.btn.dirty { box-shadow: 0 0 0 2px rgba(245, 166, 35, .55); }
.cad-body { flex: 1; display: flex; min-height: 0; }
.cad-view { flex: 1 1 0; position: relative; min-width: 0; overflow: hidden; background: #0c121a; }
.cad-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.cad-left { width: 230px; overflow: auto; border-right: 1px solid var(--line); background: var(--panel); padding: 8px 10px; font-size: 12.5px; }
.cad-right { width: 300px; overflow: auto; border-left: 1px solid var(--line); background: var(--panel); padding: 10px 12px 30px; font-size: 12.5px; }
.cad-sec { margin-bottom: 12px; } .cad-h { display: flex; align-items: center; gap: 6px; font-weight: 650; font-size: 12px; color: #aebdce; letter-spacing: .02em; margin: 4px 0 6px; } .cad-h .cad-mini { margin-left: auto; }
.cad-layer { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; } .cad-layer input[type=color] { width: 22px; height: 22px; padding: 0; border: 1px solid var(--line2); border-radius: 5px; background: none; flex: none; }
.cad-lname { flex: 1; min-width: 0; background: transparent; border: 1px solid transparent; color: var(--text); border-radius: 5px; padding: 2px 5px; font-size: 12px; } .cad-lname:focus, .cad-lname:hover { border-color: var(--line2); background: var(--panel2); }
.cad-mini { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line2); background: transparent; color: var(--dim); cursor: pointer; font-size: 11px; flex: none; }
.cad-mini.on { color: var(--accent); border-color: var(--accent); } .cad-mini:hover { color: var(--text); }
.cad-ents { max-height: 36vh; overflow: auto; } .cad-ent { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 6px; cursor: pointer; } .cad-ent:hover { background: var(--panel2); } .cad-ent.sel { background: var(--accent-bg); outline: 1px solid var(--accent); } .cad-ent.off { opacity: .45; }
.cad-ent i { width: 10px; height: 10px; border-radius: 3px; flex: none; } .cad-ent .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cad-ent .t { font-size: 11px; }
.cad-scan { display: flex; flex-direction: column; gap: 6px; } .cad-scan label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .cad-scan input[type=number] { background: var(--panel2); border: 1px solid var(--line2); color: var(--text); border-radius: 5px; padding: 2px 4px; }
.cad-f { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); } .cad-f.wide { margin-bottom: 7px; } .cad-f b { font-size: 13px; color: var(--text); font-weight: 600; padding: 4px 0; }
.cad-f input, .cad-f select { background: var(--panel2); border: 1px solid var(--line2); color: var(--text); border-radius: 6px; padding: 5px 7px; font: 12.5px var(--mono); width: 100%; min-width: 0; } .cad-f input:focus, .cad-f select:focus { outline: 1px solid var(--accent); }
.cad-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 7px; }
.cad-color { display: flex; align-items: center; gap: 8px; } .cad-color input { width: 34px; height: 26px; padding: 0; }
.cad-kv { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; font-size: 12px; } .cad-kv span { color: var(--muted); }
.cad-acts { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; } .cad-acts .btn { display: inline-flex; align-items: center; gap: 4px; }
.cad-dev { margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: var(--muted-bg); font-size: 12px; } .cad-dev.ok { background: var(--ok-bg); } .cad-dev.warn { background: var(--warn-bg); }
.cad-hint { position: absolute; left: 10px; top: 8px; right: 10px; pointer-events: none; font-size: 12px; color: #9fb3c8; text-shadow: 0 1px 2px #000; }
.cad-info { position: absolute; left: 10px; bottom: 34px; display: none; pointer-events: none; background: rgba(12, 18, 26, .86); border: 1px solid var(--line2); border-radius: 7px; padding: 4px 9px; font: 12px var(--mono); color: #ffd9a0; }
.cad-read { position: absolute; right: 10px; bottom: 8px; pointer-events: none; font-size: 12px; color: #9fb3c8; background: rgba(12, 18, 26, .7); padding: 2px 8px; border-radius: 6px; }
.cad-status { display: flex; gap: 18px; align-items: center; padding: 5px 12px; border-top: 1px solid var(--line); background: var(--panel); font-size: 12px; color: #aebdce; } .cad-status .warn { color: var(--warn); } .cad-status .ok { color: var(--ok); } .cad-status .grow { flex: 1; }
.cad-ask { display: grid; gap: 10px; } .cad-ask label { display: flex; align-items: center; justify-content: space-between; gap: 10px; } .cad-ask input { width: 130px; }
.cad-std { border-top: 1px solid var(--line); margin-top: 8px; } .cad-std-search { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin: 6px 0; } .cad-std-search input { background: var(--panel2); border: 1px solid var(--line2); color: var(--text); border-radius: 6px; padding: 5px 8px; min-width: 0; }
.cad-std-list { max-height: 320px; overflow: auto; } .cad-part { padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: var(--panel2); } .cad-part-t { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.cad-conf { font: 600 11px var(--mono); padding: 1px 7px; border-radius: 9px; background: var(--muted-bg); color: var(--muted); } .cad-conf.hi { background: var(--ok-bg); color: var(--ok); } .cad-conf.mid { background: var(--warn-bg); color: var(--warn); }
@media (max-width: 900px) and (min-width: 821px) { .cad-left { width: 200px; } .cad-right { width: 250px; } }

/* 역설계 뷰어 (reverse.js) */
.re-left { width: 290px; }
.re-head { display: flex; align-items: baseline; gap: 4px; margin: 2px 0; }
.re-item { display: flex; gap: 6px; align-items: flex-start; margin-bottom: 4px; }
.re-step { flex: none; width: 18px; text-align: right; color: var(--muted); font-size: 11px; padding-top: 9px; }
.re-row { display: flex; align-items: center; gap: 7px; padding: 6px 6px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.re-row:hover { background: var(--panel3); } .re-row.on { background: var(--accent-bg); border-color: var(--accent); }
.re-row.off { opacity: .45; } .re-row.off .re-name b { text-decoration: line-through; }
.re-name { flex: 1; min-width: 0; } .re-name b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .re-name .muted { font-size: 11px; }
.re-ic { flex: none; width: 24px; height: 24px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; background: #123048; color: #37d6ff; }
.re-ic.revolve { background: #2a2148; color: #b98cff; } .re-ic.cut { background: #3a1822; color: #ff7a93; }
.re-mini { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px 4px; border-radius: 5px; font-size: 12px; } .re-mini:hover { color: var(--text); background: var(--panel2); }
.re-params { margin: 2px 0 6px 31px; display: grid; gap: 5px; font-size: 12px; }
.re-params label { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.re-num { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 11px; }
.re-num input { width: 84px; padding: 3px 6px; font-size: 12px; text-align: right; }
.re-dev { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin-bottom: 8px; }
.re-kv { display: flex; flex-direction: column; padding: 5px 7px; background: var(--panel2); border-radius: 7px; } .re-kv .muted { font-size: 10.5px; }
.re-tbl { width: 100%; border-collapse: collapse; font-size: 11.5px; margin-bottom: 8px; } .re-tbl th, .re-tbl td { padding: 3px 5px; border-bottom: 1px solid var(--line); text-align: left; }
.re-tbl tr.on td { color: var(--accent); font-weight: 600; }
.re-how { padding-left: 18px; margin: 4px 0 6px; font-size: 12px; } .re-how li { margin-bottom: 3px; }

.re-tabs { display: flex; gap: 4px; margin: 0 0 6px; } .re-tabs button { flex: 1; background: var(--panel2); border: 1px solid var(--line2); color: var(--muted); border-radius: 8px; padding: 6px; cursor: pointer; font-size: 12.5px; }
.re-tabs button.on { color: #fff; border-color: var(--accent); background: var(--accent-bg); }
.re-seg { display: inline-flex; background: var(--panel2); border-radius: 8px; padding: 2px; }
.re-explode { width: 120px; } .re-ex-val { font-size: 11px; min-width: 32px; }
.re-swatch { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: none; cursor: pointer; flex: none; }
.re-subrow { display: flex; justify-content: space-between; align-items: center; padding: 2px 0 2px 6px; border-left: 2px solid var(--line2); }
.re-link { background: none; border: 0; color: var(--accent); cursor: pointer; font-size: 11.5px; }
.re-op { border: 1px solid var(--line2); border-radius: 9px; padding: 8px 9px; margin: 6px 0; display: grid; gap: 5px; } .re-op .muted { font-size: 11px; }
.re-op-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .re-op-row input { padding: 4px 6px; }
.re-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.re-right h4 { margin: 12px 0 6px; }

/* 자산 상세 작업 순서 버튼 (① 확인 → ② CAD 편집 → ③ 역설계 → ④ 이슈) */
.act-step { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.14); font-size: 11px; font-weight: 700; flex: none; }
.btn.primary .act-step { background: rgba(255,255,255,.28); }
.act-menu { position: relative; } .act-menu > summary { list-style: none; cursor: pointer; } .act-menu > summary::-webkit-details-marker { display: none; }
.act-pop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 40; min-width: 300px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; display: grid; gap: 4px; }
.act-row { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; padding: 6px 4px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .act-flow { display: grid !important; grid-template-columns: 1fr 1fr; } .act-flow > * { width: 100%; } .act-menu > summary { width: 100%; justify-content: center; } .act-pop { min-width: min(92vw, 340px); } }
.re-steps { display: flex; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--panel); overflow-x: auto; }
.re-stepi { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 20px; background: var(--panel2); font-size: 12px; white-space: nowrap; color: var(--muted); }
.re-stepi span { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--panel3); font-size: 11px; font-weight: 700; }
.re-stepi.done { color: var(--text); } .re-stepi.done span { background: var(--ok-bg); color: var(--ok); } .re-stepi small { color: var(--muted); font-size: 11px; }
.re-evi { border: 1px solid var(--line2); border-radius: 10px; padding: 8px; background: var(--panel2); }
.re-evi-h { display: flex; align-items: baseline; gap: 4px; margin-bottom: 6px; } .re-evi-h .muted { font-size: 11px; }
.re-evi-body { display: flex; gap: 8px; } .re-strip { width: 36px; height: 180px; flex: none; border-radius: 6px; background: #111; }
.re-evi-list { flex: 1; display: grid; gap: 3px; align-content: start; max-height: 180px; overflow: auto; }
.re-evi-row { display: flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 2px 4px; border-radius: 6px; } .re-evi-row.on { background: rgba(255,210,63,.12); }
.re-chip { font-size: 10px; padding: 1px 6px; border-radius: 8px; background: var(--panel3); } .re-chip.color { background: #2a2148; color: #c9a8ff; } .re-chip.seam { background: #3a2a10; color: #ffc46b; } .re-chip.groove { background: #123048; color: #7fd1ff; } .re-chip.manual { background: #2b2b2b; color: #ddd; }
.act-row.two { grid-template-columns: 1fr auto; }
.act-sec { font-size: 11px; color: var(--muted); padding: 6px 4px 0; text-transform: none; letter-spacing: .02em; }
.act-final { font-size: 12px; padding: 7px 9px; border-radius: 8px; background: var(--panel3); line-height: 1.45; } .act-final.ok { background: var(--ok-bg); color: var(--ok); } .act-final.warn { background: rgba(245,166,35,.12); color: #f5c06b; }
.act-flow .act-menu:last-of-type .act-pop { left: auto; right: 0; }
.act-badge { font-size: 10.5px; padding: 1px 7px; border-radius: 9px; background: var(--panel3); color: var(--muted); white-space: nowrap; }
.act-badge.ok { background: var(--ok-bg); color: var(--ok); } .act-badge.warn { background: rgba(245,166,35,.14); color: #f5c06b; }
.cad-merge { width: 26px; height: 22px; padding: 0; border: 1px solid var(--line2); border-radius: 5px; background: transparent; color: var(--dim); font-size: 11px; flex: none; cursor: pointer; }
.cad-dev.warn { border-color: rgba(245,166,35,.5); } .cad-dev.warn b { color: #f5c06b; }
.re-comp { border: 1px solid rgba(255,159,67,.45); background: rgba(255,159,67,.08); border-radius: 10px; padding: 8px 10px; display: grid; gap: 3px; font-size: 12px; margin-bottom: 8px; } .re-comp b { color: #ffb36b; } .re-comp .muted { font-size: 11px; }

/* 말로 하는 CAD 편집 (cadeditor.js) */
.ai-toggle.on { background: var(--accent-bg); border-color: var(--accent); color: #fff; }
.ai-panel { position: absolute; left: 12px; right: 12px; bottom: 12px; max-height: 40%; overflow: auto; z-index: 5; background: rgba(16,22,31,.96); border: 1px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow); padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; }
.ai-panel > * { flex: none; }
.ai-panel > .ai-hist { flex: 1 1 auto; min-height: 60px; max-height: none; }
.ai-head { display: flex; align-items: center; gap: 6px; } .ai-head .grow { flex: 1; }
.ai-steps { font-size: 11.5px; }
.ai-picks { display: flex; flex-wrap: wrap; gap: 5px; }
.ai-pick { display: inline-flex; align-items: center; gap: 4px; background: rgba(255,210,63,.12); border: 1px solid rgba(255,210,63,.5); border-radius: 14px; padding: 2px 4px 2px 3px; }
.ai-pick b { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; background: #ffd23f; color: #111; align-items: center; justify-content: center; font-size: 11px; }
.ai-ex { display: flex; flex-wrap: nowrap; gap: 4px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; } .ai-ex .ai-chip { flex: none; }
.ai-chip { background: var(--panel2); border: 1px solid var(--line2); color: var(--text); border-radius: 14px; padding: 3px 9px; font-size: 11.5px; cursor: pointer; } .ai-chip:hover { border-color: var(--accent); }
.ai-row { display: flex; gap: 6px; align-items: stretch; } .ai-input { flex: 1; resize: vertical; min-height: 38px; max-height: 90px; font-size: 13px; padding: 7px 9px; border-radius: 8px; }
.ai-btns { display: flex; flex-direction: column; gap: 4px; }
.ai-btn2 { display: flex; gap: 4px; } .ai-btn2 > .btn { flex: 1; padding-left: 6px; padding-right: 6px; }
.ai-imgs { display: flex; flex-direction: column; gap: 6px; }
.ai-img { display: flex; gap: 8px; align-items: flex-start; background: rgba(255,255,255,.03); border: 1px solid var(--line2); border-radius: 8px; padding: 6px; }
.ai-img-fr { position: relative; flex: none; width: 150px; line-height: 0; border-radius: 6px; overflow: hidden; background: #000; }
.ai-img-fr img { width: 100%; height: auto; display: block; opacity: .85; }
.ai-img-fr svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: rgba(255,80,80,.18); stroke: #ff5a5a; stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.ai-img-fr svg * { vector-effect: non-scaling-stroke; stroke-width: 1.4; }
.ai-img-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12px; overflow-wrap: anywhere; }
.ai-img-b { display: flex; gap: 4px; margin-top: 2px; }
.ai-img-name { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .ai-img-name b { font-size: 12.5px; }
.ai-img-std { color: #9fd3a8; font-size: 11.5px; } .warn-t { color: #f0c36d; }
.ai-img-alts { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; } .ai-img-alts .ai-chip { font-size: 11px; padding: 2px 7px; }
.spinner { display: inline-block; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.18); border-top-color: var(--accent, #5aa9e6); animation: ri-spin .8s linear infinite; vertical-align: middle; }
.ai-busy { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; background: rgba(90,169,230,.10); border: 1px solid rgba(90,169,230,.35); }
.ai-busy[hidden] { display: none; }
.ai-busy-t { flex: 1; min-width: 0; font-size: 12.5px; } .ai-busy-s { font-size: 11.5px; overflow-wrap: anywhere; }
.ai-busy-float { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 6; max-width: min(520px, calc(100% - 24px)); background: rgba(16,22,31,.94); box-shadow: var(--shadow); }
.ai-img-spin { position: absolute; left: calc(50% - 11px); top: calc(50% - 11px); width: 22px; height: 22px; }
.ai-img-busy { color: var(--accent, #5aa9e6); }
.cad-view.ai-working, .ai-working canvas { cursor: progress !important; }
.ai-panel.ai-drop { outline: 2px dashed var(--accent, #5aa9e6); outline-offset: -4px; }
.ai-hist { display: flex; flex-direction: column; gap: 5px; max-height: 120px; overflow: auto; }
.ai-item { border-left: 3px solid var(--line2); padding: 4px 8px; background: var(--panel2); border-radius: 6px; } .ai-item.ok { border-left-color: var(--ok); } .ai-item.bad { border-left-color: var(--bad); }
.ai-q { font-weight: 600; } .ai-a { font-size: 12px; margin-top: 2px; }
@media (max-width: 760px) { .ai-panel { left: 6px; right: 6px; bottom: 6px; max-height: 70%; } }
.sp-root { z-index: 320; }
.re-prop { position: absolute; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 6; width: min(640px, calc(100% - 24px)); background: rgba(16,22,31,.96); border: 1px solid #ffd23f; border-radius: 12px; padding: 10px 12px; display: grid; gap: 5px; font-size: 12.5px; box-shadow: var(--shadow); }
.re-prop-h { display: flex; align-items: center; gap: 8px; } .re-prop-h b { color: #ffd23f; font-size: 14px; }

/* 분할 크기 조절 (layout.js) */
.cad-left, .cad-right, .fv-side { flex: none; transition: width .15s ease, max-height .15s ease; }
body.is-resizing .cad-left, body.is-resizing .cad-right, body.is-resizing .fv-side { transition: none; }
body.is-resizing { cursor: col-resize; user-select: none; }
.panel-collapsed { width: 0 !important; min-width: 0 !important; padding: 0 !important; border: 0 !important; overflow: hidden !important; }
@media (max-width: 820px) { .panel-collapsed { width: auto !important; max-height: 0 !important; } }
.gutter { flex: none; width: 8px; position: relative; cursor: col-resize; background: transparent; z-index: 7; touch-action: none; }
.gutter::after { content: ''; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: var(--line); transition: background .15s; }
.gutter:hover::after, body.is-resizing .gutter::after { background: var(--accent); }
.gutter-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2; min-width: 18px; height: 40px; padding: 0; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel2); color: var(--muted); font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.gutter-btn:hover { color: #fff; border-color: var(--accent); background: var(--accent-bg); }
.gutter.collapsed .gutter-btn { color: var(--accent); }
/* 접힌 작업 프레임 — 가장자리에 이름이 보이는 세로 탭(누르면 열림) */
@media (min-width: 821px) {
  .gutter.collapsed .gutter-btn { height: auto; min-height: 44px; padding: 10px 4px; writing-mode: vertical-rl; font-size: 11.5px; white-space: nowrap; letter-spacing: .02em;
    background: var(--panel2); border-color: var(--accent); box-shadow: 0 0 0 1px rgba(56,214,255,.15); }
  .gutter.left.collapsed .gutter-btn { left: 0; transform: translateY(-50%); border-radius: 0 9px 9px 0; }
  .gutter.right.collapsed .gutter-btn { left: auto; right: 0; transform: translateY(-50%) rotate(180deg); border-radius: 0 9px 9px 0; }
}
.cmp-pane-btn.on { border-color: var(--accent); color: #fff; background: var(--accent-bg); }
.layout-focus { position: absolute; top: 10px; right: 10px; z-index: 6; background: rgba(16,22,31,.85); border: 1px solid var(--line2); color: var(--text); border-radius: 8px; padding: 5px 9px; font-size: 12px; cursor: pointer; }
.layout-focus:hover, .layout-focus.on { border-color: var(--accent); color: #fff; }
.fv-view .layout-focus { top: auto; bottom: 10px; }
.grid-split { position: relative; }
.grid-gutter { position: absolute; top: 0; bottom: 0; width: 10px; cursor: col-resize; z-index: 5; touch-action: none; }
.grid-gutter::after { content: ''; position: absolute; top: 0; bottom: 0; left: 4px; width: 2px; border-radius: 2px; background: transparent; transition: background .15s; }
.grid-split:hover .grid-gutter::after { background: var(--line2); } .grid-gutter:hover::after, body.is-resizing .grid-gutter::after { background: var(--accent); }
.bottom-grip { position: relative; height: 12px; margin: -6px -12px 0; cursor: row-resize; touch-action: none; display: flex; justify-content: center; align-items: center; }
.bottom-grip::before { content: ''; width: 44px; height: 4px; border-radius: 3px; background: var(--line2); }
.bottom-grip:hover::before { background: var(--accent); }
.bottom-grip .gutter-btn { left: auto; right: 0; top: 50%; transform: translateY(-50%); height: 20px; padding: 0 8px; width: auto; }
.panel-collapsed-bottom > :not(.bottom-grip):not(.ai-head) { display: none !important; }
.panel-collapsed-bottom { max-height: none !important; height: auto !important; }
@media (max-width: 820px) {
  .cad-body { flex-direction: column; } .cad-body .cad-view { flex: 1 1 auto; min-height: 45dvh; }
  .cad-left, .cad-right { width: auto !important; max-height: 30dvh; border-right: 0; border-left: 0; border-top: 1px solid var(--line); order: 3; }
  .cad-body .cad-left, .cad-body .cad-right { display: block; }
  .gutter { width: auto; height: 14px; cursor: row-resize; order: 2; } .gutter::after { left: 0; right: 0; top: 6px; bottom: auto; width: auto; height: 2px; }
  .gutter-btn { width: 44px; height: 18px; }
  /* 손잡이를 자기 패널 바로 위에: 3D → 왼쪽 손잡이 → 왼쪽 패널 → 오른쪽 손잡이 → 오른쪽 패널. 손잡이에는 패널 이름 */
  .cad-body > .gutter.left { order: 2; } .cad-body > .cad-left { order: 3; } .cad-body > .gutter.right { order: 4; } .cad-body > .cad-right { order: 5; }
  .cad-body > .gutter { height: 30px; background: var(--panel); border-top: 1px solid var(--line); } .cad-body > .gutter::after { display: none; }
  .cad-body > .gutter .gutter-btn { width: auto; min-width: 120px; height: 24px; padding: 0 12px; font-size: 12px; white-space: nowrap; }
  .layout-focus { top: 6px; right: 6px; padding: 4px 8px; } .layout-focus .lf-t { display: none; }
  .cad-hint { right: 52px; font-size: 11px; line-height: 1.4; }   /* ⛶ 단추와 겹치지 않게 */
  .cad-status { flex-wrap: wrap; gap: 2px 12px; padding: 5px 10px; } .cad-status > span { white-space: nowrap; } .cad-status .grow { display: none; }
  .kbd-only { display: none !important; }   /* 키보드 단축키 안내는 터치 화면에서 숨김 */
}

/* 설계 의도 보정 (reverse.js) */
.ri-card { border: 1px solid rgba(61,220,151,.45); background: rgba(61,220,151,.06); border-radius: 11px; padding: 9px 10px; display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.ri-head { display: flex; align-items: center; justify-content: space-between; } .ri-head b { color: #5fe3a8; font-size: 13px; }
.ri-desc { font-size: 11.5px; line-height: 1.5; }
.ri-busy { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.ri-busy .spin { width: 14px; height: 14px; border: 2px solid var(--line2); border-top-color: var(--accent); border-radius: 50%; animation: ri-spin .8s linear infinite; }
@keyframes ri-spin { to { transform: rotate(360deg); } }
.ri-sum { grid-template-columns: 1fr 1fr; }
.ri-kinds { display: flex; flex-wrap: wrap; gap: 5px; }
.ri-chip { border: 1px solid var(--line2); background: var(--panel2); color: var(--muted); border-radius: 14px; padding: 3px 9px; font-size: 11.5px; cursor: pointer; }
.ri-chip.on { border-color: rgba(61,220,151,.6); color: #5fe3a8; }
.ri-list { display: flex; flex-direction: column; gap: 3px; max-height: 46vh; overflow: auto; padding-right: 2px; }
.ri-group { font-size: 11px; color: var(--muted); font-weight: 700; margin: 6px 0 1px; letter-spacing: .02em; }
.ri-item { display: grid; grid-template-columns: 18px 1fr; gap: 6px; align-items: start; padding: 5px 6px; border-radius: 7px; cursor: pointer; border: 1px solid transparent; opacity: .62; }
.ri-item.on { opacity: 1; background: var(--panel2); } .ri-item:hover { border-color: var(--accent); }
.ri-item input { margin-top: 2px; }
.ri-label { font-size: 12px; line-height: 1.35; }
.ri-meta { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 2px; font-size: 10.5px; }
.ri-std { color: #7cc4ff; background: rgba(55,140,255,.12); border-radius: 5px; padding: 1px 5px; }
.ri-v { border-radius: 5px; padding: 1px 5px; } .ri-v.ok { color: var(--ok); background: var(--ok-bg); } .ri-v.warn { color: #ffb36b; background: rgba(255,159,67,.12); } .ri-v.bad { color: #ff7a8a; background: rgba(255,90,122,.12); }
.ri-conf { width: 36px; height: 4px; border-radius: 3px; background: var(--panel3); overflow: hidden; display: inline-block; } .ri-conf i { display: block; height: 100%; background: #5fe3a8; }
.ri-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* 편차 색 지도 범례 (reverse.js) */
.heat-legend { position: absolute; left: 10px; bottom: 10px; z-index: 6; width: 268px; background: rgba(12,18,26,.92); border: 1px solid var(--line2); border-radius: 11px; padding: 9px 10px; display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; box-shadow: var(--shadow); }
.hl-title { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; } .hl-title .muted { font-size: 10.5px; }
.hl-bar { height: 10px; border-radius: 5px; }
.hl-ticks { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-top: -3px; }
.hl-range { display: flex; gap: 3px; } .hl-range .cad-view-btn { padding: 2px 7px; font-size: 11px; }
.hl-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.hl-bands { display: grid; gap: 3px; }
.hl-band { display: grid; grid-template-columns: 52px 1fr 36px; gap: 6px; align-items: center; font-size: 11px; } .hl-band b { text-align: right; }
.hl-band i { height: 6px; background: var(--panel3); border-radius: 4px; overflow: hidden; display: block; } .hl-band em { display: block; height: 100%; background: #2ecc71; }
@media (max-width: 820px) { .heat-legend { width: auto; right: 10px; } }
.re-axis { margin-left: 6px; font-size: 10px; font-weight: 700; color: #b98cff; background: rgba(185,140,255,.14); border-radius: 5px; padding: 0 5px; vertical-align: 1px; }
.re-multi { border-color: rgba(185,140,255,.5); background: rgba(185,140,255,.07); } .re-multi b { color: #c9a6ff; }

/* ───────── 산업 샘플 라이브러리 (views/samples.js · samples3d.js) ───────── */
.smp-intro { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 4px 0 14px; }
.smp-intro > div { background: linear-gradient(135deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.smp-intro b { font-size: 20px; letter-spacing: -.01em; } .smp-intro small { color: var(--muted); font-size: 12px; }
.smp-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; } .smp-cats .chip small { margin-left: 6px; opacity: .7; }
.smp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.smp-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; outline: none; }
.smp-card:hover, .smp-card:focus-visible { transform: translateY(-2px); border-color: rgba(56, 163, 255, .55); box-shadow: 0 14px 34px rgba(0, 0, 0, .45); }
.smp-thumb-wrap { position: relative; aspect-ratio: 16 / 10; background: radial-gradient(120% 120% at 30% 20%, #1b2a3d 0%, #0c121a 70%); }
.smp-thumb { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--dim); }
.smp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.smp-thumb-ic { font-size: 54px; line-height: 1; color: #2f4a68; } .smp-thumb small { font-size: 11.5px; }
.smp-thumb-tags { position: absolute; left: 10px; top: 10px; right: 10px; display: flex; justify-content: space-between; gap: 6px; }
.smp-cat { background: rgba(12, 18, 26, .82); border: 1px solid var(--line2); color: #cfe3ff; border-radius: 12px; padding: 2px 10px; font-size: 11.5px; font-weight: 600; }
.grade { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; padding: 1px 8px; border-radius: 10px; font: 700 11.5px var(--mono); background: var(--muted-bg); color: var(--muted); }
.grade.gA { background: rgba(46, 204, 113, .18); color: #5ee39a; } .grade.gB { background: rgba(56, 163, 255, .18); color: #7cc4ff; }
.grade.gC { background: rgba(245, 166, 35, .18); color: #ffc46b; } .grade.gD, .grade.gE { background: rgba(255, 90, 95, .18); color: #ff9a9d; }
.smp-thumb-tags .grade { background: rgba(12, 18, 26, .82); border: 1px solid var(--line2); }
.smp-card-body { padding: 12px 14px 12px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.smp-card-title { font-size: 15px; } .smp-card-body p { margin: 0; font-size: 12.5px; line-height: 1.5; }
.smp-card-kpi { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); } .smp-card-kpi b { color: var(--text); }
.smp-hl { margin: 0; padding-left: 16px; font-size: 12px; color: #b9c7d6; display: grid; gap: 2px; }
.smp-card-foot { display: flex; gap: 5px; align-items: center; margin-top: auto; padding-top: 4px; }
.smp-fmt { font: 600 10.5px var(--mono); padding: 2px 6px; border-radius: 5px; background: var(--panel3); color: #9fb3c8; }
.smp-open { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-size: 12.5px; font-weight: 600; }
.smp-foot { font-size: 12px; margin-top: 16px; }

.smp .cad-top { gap: 6px; }
.smp-seg { display: inline-flex; background: var(--panel2); border: 1px solid var(--line2); border-radius: 9px; padding: 2px; gap: 1px; }
.smp-seg .cad-view-btn.on { background: var(--accent-bg); color: #fff; box-shadow: inset 0 0 0 1px rgba(56, 163, 255, .55); }
.smp-sec { display: inline-flex; align-items: center; gap: 5px; } .smp-sec-range { width: 120px; }
.smp-status { font-size: 12px; color: var(--muted); }
.smp-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--accent); margin: 0 auto 10px; animation: smpspin 0.9s linear infinite; }
@keyframes smpspin { to { transform: rotate(360deg); } }
.smp-left { width: 280px; display: flex; flex-direction: column; padding: 0; }
.smp-tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 2; }
.smp-tab { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 7px 4px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.smp-tab.on { color: #fff; border-bottom-color: var(--accent); }
.smp-left-body { padding: 8px; overflow: auto; flex: 1; min-height: 0; }
.smp-tree-tools { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.smp-node { display: flex; align-items: center; gap: 5px; padding: 3px 6px 3px 4px; border-radius: 6px; cursor: pointer; font-size: 12.5px; min-height: 26px; }
.smp-node:hover { background: var(--panel2); } .smp-node.sel { background: var(--accent-bg); outline: 1px solid rgba(56, 163, 255, .6); } .smp-node.off { opacity: .45; }
.smp-node.grp { font-weight: 650; color: #cddbea; } .smp-node.inst { font-size: 12px; color: #aebdce; }
.smp-node .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smp-node code { font-size: 10.5px; color: var(--violet); } .smp-node small { font-size: 11px; }
.smp-caret { width: 16px; flex: none; background: none; border: 0; color: var(--dim); cursor: pointer; padding: 0; font-size: 11px; } .smp-caret.sp { display: inline-block; }
.smp-sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.smp-qty { font: 600 11px var(--mono); color: #9fb3c8; }
.smp-flag { font-size: 10px; padding: 0 5px; border-radius: 6px; background: var(--warn-bg); color: var(--warn); flex: none; }
.smp-bom-head { font-size: 12px; margin: 2px 2px 6px; }
.smp-bom { display: flex; flex-direction: column; gap: 4px; }
.smp-bom-row { display: grid; grid-template-columns: 26px 1fr auto; gap: 7px; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; font-size: 12px; }
.smp-bom-row:hover { border-color: var(--line2); } .smp-bom-row.sel { border-color: var(--accent); background: var(--accent-bg); }
.smp-bom-row .no, .smp-step .no, .smp-mini-step .no, .smp-sc-in .no { font: 700 11px var(--mono); color: var(--accent); background: var(--accent-bg); border-radius: 6px; height: 22px; min-width: 22px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; }
.smp-bom-row .body { min-width: 0; } .smp-bom-row .body b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smp-bom-row .q { text-align: right; display: flex; flex-direction: column; } .smp-std { font-size: 11px; color: #8fb6dc; }
.smp-steps { display: flex; flex-direction: column; gap: 5px; }
.smp-step { display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; font-size: 12px; }
.smp-step:hover { border-color: var(--line2); } .smp-step.cur { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(56, 163, 255, .35); }
.smp-step.done { opacity: .72; } .smp-step.done .no { background: var(--ok-bg); color: var(--ok); } .smp-step.run .no { background: var(--warn-bg); color: var(--warn); }
.smp-step .body { display: flex; flex-direction: column; gap: 3px; min-width: 0; } .smp-tool { color: #ffd59a; font-size: 11.5px; }
.smp-step-foot { display: flex; gap: 6px; align-items: center; } .cad-badge.warn { background: var(--warn-bg); color: var(--warn); } .cad-badge.info { background: var(--accent-bg); color: var(--accent); }
.smp-right { width: 330px; }
.smp-ptitle { display: flex; align-items: center; gap: 8px; font-size: 14px; } .smp-ptitle i { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.smp-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.smp-mini-step { display: grid; grid-template-columns: 26px 1fr; gap: 3px 8px; padding: 8px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); cursor: pointer; } .smp-mini-step small { grid-column: 2; }
.smp-sum { font-size: 13px; line-height: 1.55; color: #d5e1ee; }
.smp-right .smp-hl { margin-top: 8px; }
.smp-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.smp-kpis > div { background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; display: flex; flex-direction: column; } .smp-kpis b { font-size: 15px; } .smp-kpis small { color: var(--muted); font-size: 11px; }
.smp-scanq .cad-h .grade { margin-left: auto; }
.smp-note { font-size: 11.5px; color: var(--muted); background: var(--muted-bg); border-radius: 8px; padding: 7px 9px; margin-top: 7px; line-height: 1.5; } .smp-note b { color: #cfdbea; }
.smp-chips { display: flex; flex-wrap: wrap; gap: 4px; } .smp-chip { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--panel3); color: #b9cbe0; }
.smp-dl { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); margin-bottom: 5px; color: var(--text); font-size: 12px; }
.smp-dl:hover { border-color: var(--accent); text-decoration: none; } .smp-dl .ext { font: 700 10.5px var(--mono); text-align: center; padding: 3px 0; border-radius: 5px; background: var(--accent-bg); color: var(--accent); }
.smp-legend { left: 10px; bottom: 10px; max-height: calc(100% - 60px); overflow: auto; }
.smp-ifc-row { display: grid; grid-template-columns: 12px 1fr auto 28px; gap: 6px; align-items: center; font-size: 11.5px; cursor: pointer; padding: 2px 3px; border-radius: 5px; }
.smp-ifc-row:hover { background: var(--panel3); } .smp-ifc-row i { width: 11px; height: 11px; border-radius: 3px; } .smp-ifc-row code { font-size: 10px; color: var(--muted); } .smp-ifc-row b { text-align: right; }
.smp-split { position: absolute; top: 0; bottom: 0; width: 0; z-index: 5; cursor: ew-resize; touch-action: none; }
.smp-split i { position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: rgba(90, 209, 255, .9); box-shadow: 0 0 12px rgba(90, 209, 255, .6); }
.smp-split::after { content: '⟷'; position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; background: #0c121a; border: 2px solid #5ad1ff; color: #5ad1ff; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.smp-split span { position: absolute; top: 10px; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: rgba(12, 18, 26, .85); border: 1px solid var(--line2); white-space: nowrap; }
.smp-split span:first-child { right: 10px; } .smp-split span:nth-child(3) { left: 10px; }
.smp-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 4; }
.smp-balloon { position: absolute; left: 0; top: 0; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: rgba(12, 18, 26, .9); border: 1.5px solid #ffc857; color: #ffd98a; font: 700 11px var(--mono); display: flex; align-items: center; justify-content: center; pointer-events: auto; cursor: pointer; }
.smp-tip { max-width: 260px; display: none; flex-direction: column; } .smp-tip b { display: block; color: #fff; } .smp-tip-dev { color: #8fe3ff; }
.smp-help { bottom: 8px; right: 10px; left: auto; max-width: 60%; text-align: right; }
.smp-timeline { border-top: 1px solid var(--line); background: var(--panel); padding: 7px 10px 8px; display: flex; flex-direction: column; gap: 6px; }
.smp-tl-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.smp-tl-btns { display: flex; gap: 3px; flex-wrap: wrap; } .smp-tl-btns .cad-tool { border: 1px solid var(--line2); }
.smp-tl-mid { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 3px; }
.smp-bar { display: flex; gap: 3px; height: 14px; }
.smp-seg-step { flex: 1; min-width: 8px; height: 100%; border-radius: 4px; border: 1px solid var(--line2); background: var(--panel3); padding: 0; cursor: pointer; position: relative; overflow: hidden; }
.smp-seg-step i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #f5a623, #ffc857); }
.smp-seg-step.done i { background: linear-gradient(90deg, #22a35a, #2ecc71); } .smp-seg-step.cur { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.smp-seg-step.weld { background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(245, 166, 35, .18) 4px 8px); }
.smp-tl-sub { font-size: 11px; }
.smp-tl-opts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.smp-exl { display: inline-flex; align-items: center; gap: 6px; color: #c3d0df; } .smp-ex { width: 130px; }
.smp-chk { display: inline-flex; align-items: center; gap: 4px; color: #c3d0df; cursor: pointer; }
.smp-stepcard .smp-sc-in { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; font-size: 12.5px; }
.smp-sc-in .body b { display: inline-flex; gap: 8px; align-items: center; } .smp-sc-in .muted { font-size: 12px; margin-top: 2px; }
@media (max-width: 1100px) { .smp-intro { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .smp-grid { grid-template-columns: 1fr; }
  .smp-left, .smp-right { width: auto; }
  .smp .cad-top { overflow-x: auto; flex-wrap: nowrap; }
  .smp-help { display: none; }
  .smp-tl-opts { width: 100%; } .smp-ex { flex: 1; } .smp-exl { flex: 1; }
  .smp-legend { width: auto; right: 10px; max-height: 45%; }
}

/* ───────── 3D 트윈 라이브러리 · 트윈 공간 구성 ───────── */
.lib-bar { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 4px; }
.lib-bar .smp-cats { flex: 1; align-items: center; }
.lib-seg { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.lib-search { width: 220px; max-width: 100%; }
.lib-kind { background: rgba(12, 18, 26, .82); border: 1px solid var(--line2); color: #b9c7d6; border-radius: 12px; padding: 2px 9px; font-size: 11px; font-weight: 600; margin-left: auto; margin-right: 6px; }
.lib-kind.kASSET { color: var(--ok); border-color: rgba(46, 204, 113, .45); } .lib-kind.kIMPORT { color: #7fdcff; border-color: rgba(56, 163, 255, .45); }
.lib-sum { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lib-kv { display: grid; grid-template-columns: 104px 1fr; gap: 3px 10px; font-size: 12.5px; padding: 3px 0; } .lib-kv b { font-weight: 600; word-break: break-word; }
.smp-right h4, .cmp-left h4 { margin: 14px 0 6px; font-size: 12px; color: var(--muted); text-transform: none; letter-spacing: .02em; }
.cmp-name { width: 220px; max-width: 40vw; background: var(--panel2); border: 1px solid var(--line2); border-radius: 7px; padding: 4px 8px; font-weight: 650; font-size: 13px; color: var(--text); }
.cmp-op { width: 70px; }
.cmp-search { width: 100%; margin-bottom: 8px; }
.cmp-hint { font-size: 12px; line-height: 1.5; margin: 2px 2px 8px; }
.cmp-pal { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel2); margin-bottom: 6px; align-items: start; }
.cmp-pal img, .cmp-pal-ic { width: 52px; height: 40px; border-radius: 6px; object-fit: cover; background: #0c121a; display: flex; align-items: center; justify-content: center; color: #2f4a68; font-size: 20px; }
.cmp-pal-b { min-width: 0; display: flex; flex-direction: column; gap: 2px; } .cmp-pal-b b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-pal-b small { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-pal-act { display: flex; gap: 4px; margin-top: 3px; } .cmp-pal-act .btn.sm { padding: 3px 8px; font-size: 11.5px; }
.cmp-form .field { margin-bottom: 8px; } .cmp-form .field label { font-size: 11.5px; }
.cmp-xyz { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; } .cmp-xyz input { min-width: 0; padding: 5px 6px; font: 12px var(--mono); }
.cmp-acts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; align-items: center; }
.cmp-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; margin-right: 10px; cursor: pointer; }
.cmp-kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.cmp-kpi > div { background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 8px; display: flex; flex-direction: column; } .cmp-kpi b { font-size: 18px; } .cmp-kpi small { color: var(--muted); font-size: 11px; }
.cmp-clash { padding: 6px 8px; border-radius: 8px; border: 1px solid rgba(255, 90, 95, .35); background: rgba(255, 90, 95, .08); margin-bottom: 4px; cursor: pointer; display: flex; flex-direction: column; font-size: 12px; }
.cmp-clash:hover { border-color: rgba(255, 90, 95, .7); }
.cmp .cad-view.placing canvas { cursor: crosshair; }
@media (max-width: 760px) { .cmp-name { width: 140px; } .lib-search { width: 100%; } .cmp-op { display: none; } }
.cmp .cad-top .cad-tool, .cmp .cad-top .cad-badge, .cmp .cad-top .smp-seg, .cmp .cad-top .cad-sel { white-space: nowrap; flex: none; }
.cmp .cad-top .smp-status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; }
@media (max-width: 760px) { .cmp .cad-top { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .cmp .cad-top::-webkit-scrollbar { display: none; } .cmp .cad-top .grow { display: none; } }

/* ───────── Windows 스타일 상단 메뉴 막대 (menubar.js) ───────── */
.menubar { display: flex; gap: 0; align-self: stretch; align-items: stretch; margin-left: 10px; font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Segoe UI", sans-serif; }
.menubar .mb-top { background: transparent; border: 0; border-radius: 0; padding: 0 11px; color: var(--text); font-size: 13px; cursor: default; white-space: nowrap; width: auto; }
.menubar .mb-top:hover, .menubar .mb-top.open, .menubar .mb-top:focus-visible { background: #2a3d66; outline: none; }
.mb-top u, .mb-item u { text-decoration: underline; text-underline-offset: 2px; }
.mb-panel { z-index: 1000; min-width: 240px; background: var(--panel); border: 1px solid var(--line2); border-radius: 0 0 6px 6px; padding: 3px; box-shadow: 0 10px 28px rgba(0, 0, 0, .55);
  max-height: calc(100vh - 60px); overflow-y: auto; font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Segoe UI", sans-serif; }
.mb-panel.mb-sub { border-radius: 6px; }
.mb-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 4px; padding: 2px 8px; line-height: 1.35; min-height: 0; color: var(--text); white-space: nowrap; font-size: 13px; cursor: default; }
.mb-item.sel, .mb-item:hover:not(:disabled) { background: #2a3d66; }
.mb-item:disabled { color: var(--muted); opacity: .55; }
.mb-chk { width: 14px; color: var(--accent); text-align: center; flex: none; } .mb-lab { flex: 1; } .mb-acc { color: var(--muted); font-size: 11px; margin-left: 18px; }
.mb-sep { height: 1px; background: var(--line2); margin: 2px 2px; }
.mb-head { font-size: 11px; color: var(--muted); padding: 2px 8px 1px 30px; }
.topbar .app-menubar { margin-top: -7px; margin-bottom: -7px; }
.cad-mbrow { display: flex; align-items: stretch; min-height: 30px; background: #0a1018; border-bottom: 1px solid var(--line); padding: 0 6px; flex: none; }
.cad-mbrow-t { display: flex; align-items: center; font-size: 12px; font-weight: 650; color: #9fb3c8; padding: 0 10px 0 4px; white-space: nowrap; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; }
.cad-mbrow .menubar { margin-left: 0; }
.mb-help .mb-help-tops { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 10px; font-size: 12.5px; }
.mb-help kbd, .mb-help-tbl kbd { font: 600 11px var(--mono); background: var(--panel3); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; }
.mb-help-tbl td { font-size: 12.5px; }
.shell.side-hidden .sidebar { display: none; }
@media (max-width: 900px) {
  .menubar { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .menubar::-webkit-scrollbar { display: none; }
  .menubar .mb-top { padding: 0 10px; min-height: 42px; flex: none; }
  .topbar .app-menubar { margin: -6px 0; }
  .topbar .crumbs { display: none; }
  .mb-panel { max-width: calc(100vw - 12px); min-width: 200px; }
  .mb-item { min-height: 38px; }
  .mb-acc { display: none; }
  .cad-mbrow-t { display: none; }
}

/* ───────── 공간 BIM 파이프라인 ───────── */
.sbp-flow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 4px 0 14px; }
.sbp-step { position: relative; display: flex; gap: 8px; background: linear-gradient(135deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px 10px 8px; }
.sbp-step b { display: block; font-size: 13px; } .sbp-step small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.4; margin-top: 2px; }
.sbp-step-n { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--accent-bg); color: var(--accent); font: 700 12px var(--mono); display: flex; align-items: center; justify-content: center; }
.sbp-step-c { position: absolute; right: 8px; top: 8px; font: 600 11px var(--mono); color: #9fb3c8; }
.sbp-step:not(:last-child)::after { content: '›'; position: absolute; right: -8px; top: 50%; transform: translateY(-50%); color: var(--dim); font-size: 16px; z-index: 1; }
.sbp-list { display: grid; gap: 12px; }
.sbp-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.sbp-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.sbp-dots { display: flex; gap: 4px; } .sbp-dot { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 600 11px var(--mono); background: var(--panel3); color: var(--dim); border: 1px solid var(--line2); }
.sbp-dot.on { background: var(--ok-bg); color: var(--ok); border-color: rgba(46, 204, 113, .5); } .sbp-dot.next { border-color: var(--warn); color: var(--warn); box-shadow: 0 0 0 2px rgba(245, 166, 35, .18); }
.sbp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; font-size: 12.5px; } .sbp-grid > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sbp-foot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
@media (max-width: 1100px) { .sbp-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); } .sbp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sbp-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sbp-step::after { display: none; } .sbp-grid { grid-template-columns: 1fr; } }

/* ───────── 공간 BIM 편집기 ───────── */
.sbm-center { display: flex; flex-direction: row; }
.sbm-plan { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.sbm-canvas { flex: 1; width: 100%; min-height: 0; display: block; outline: none; touch-action: none; }
.cad-view .sbm-plan .sbm-canvas { position: relative; inset: auto; flex: 1 1 0; height: 0; }   /* 평면 캔버스가 단면 막대(.sbm-secbar)를 덮지 않게 — 위 칸을 채우고 막대는 아래 */
.sbm-3d { position: relative; flex: 1 1 0; min-width: 0; }
.sbm-3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sbm-center[data-mode="plan"] .sbm-3d { display: none; } .sbm-center[data-mode="3d"] .sbm-plan { display: none; }
.sbm-secbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 5px 8px; border-top: 1px solid var(--line); background: var(--panel); font-size: 12px; }
.sbm-num { width: 58px; padding: 3px 5px; font: 12px var(--mono); }
.sbm-legend { display: inline-flex; gap: 8px; margin-left: auto; color: var(--muted); } .sbm-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 3px; }
.sbm-issue { padding: 6px 8px; border-radius: 8px; margin-bottom: 4px; font-size: 12px; cursor: pointer; border: 1px solid var(--line); background: var(--panel2); }
.sbm-issue.bad { border-color: rgba(255, 90, 95, .5); } .sbm-issue.warn { border-color: rgba(245, 166, 35, .5); } .sbm-issue.info { color: #aebdce; }
.sbm-hist { font-size: 12px; padding: 3px 4px; line-height: 1.45; } .sbm-hist.ok { color: var(--ok); }
.sbm-std { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; font-size: 11.5px; margin-top: 4px; }
.cmp-xyz.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cmp-layers .cad-tool.sm { padding: 4px 7px; }
@media (max-width: 900px) { .sbm-center { flex-direction: column; } .sbm-plan { border-right: 0; border-bottom: 1px solid var(--line); } }

/* ───────── 사이드바 없는 셸: 상단 막대 = 로고 · 메뉴 막대 · 경로 · 상태 칩 · 사용자 ───────── */
.shell.nosidebar { grid-template-columns: 1fr; }
.shell.nosidebar .topbar { gap: 10px; padding-left: 16px; padding-right: 16px; }
.top-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); flex: none; }
.top-brand:hover { text-decoration: none; }
.top-brand .logo { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, #38a3ff, #6d5bff); display: grid; place-items: center; box-shadow: 0 0 16px rgba(56, 163, 255, .35); }
.top-brand b { font-size: 12.5px; letter-spacing: .08em; } .top-brand .brand-p { font-size: 13.5px; font-weight: 650; letter-spacing: .01em; color: #9fd2ff; margin-left: -3px; }
.top-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 9px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line2); color: var(--muted); flex: none; white-space: nowrap; }
.top-chip:hover { text-decoration: none; color: var(--text); } .top-chip.alert { background: var(--bad-bg); color: var(--bad); border-color: rgba(255, 90, 95, .4); }
.top-chip.ok { color: var(--ok); }
.menubar .mb-top.cur { box-shadow: inset 0 -2px 0 var(--accent); color: #fff; }
.shell.nosidebar .crumbs { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 900px) {
  .shell.nosidebar .topbar { padding-left: 10px; padding-right: 10px; gap: 6px; }
  .top-brand b, .top-chip-t, .who-txt { display: none; }
  .shell.nosidebar .topbar > .grow { display: none; }
}
@media (max-width: 900px) { .menubar .mb-mk { display: none; } }
/* 모바일 편집기 머리 막대: 줄바꿈 대신 한 줄 가로 스크롤 — 버튼 글자가 세로로 쌓이거나 제목이 덮이지 않게 */
@media (max-width: 820px) {
  .cad .cad-top { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .cad .cad-top::-webkit-scrollbar { display: none; }
  .cad .cad-top > * { flex: none; white-space: nowrap; }
  .cad .cad-top .grow { display: none; }
  .cad .cad-top .cad-title { max-width: 52vw; }
  .cad .cad-top .smp-seg { display: inline-flex; flex-wrap: nowrap; }
  .cad .cad-top .cad-tool, .cad .cad-top .cad-view-btn { white-space: nowrap; }
  .cad .cad-top .cad-menu-pop { position: fixed; right: 8px; left: auto; top: auto; max-width: calc(100vw - 16px); }
}
@media (max-width: 900px) { .app-menubar, .editor-menubar { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); padding-right: 24px; } }

/* ───────── 트윈 공간 구성: 배관 부품 팔레트 · AI 배관 도우미 ───────── */
.cmp-pipe-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; } .cmp-pipe-opts .field { margin-bottom: 6px; } .cmp-pipe-opts .field label { font-size: 11.5px; }
.cmp-pipe-opts input, .cmp-pipe-opts select { padding: 5px 7px; font-size: 12.5px; }
.cmp-pipe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.cmp-pipe-btn { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); font-size: 12.5px; cursor: pointer; text-align: left; }
.cmp-pipe-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-bg); } .cmp-pipe-btn:disabled { opacity: .45; cursor: default; }
.cmp-pipe-btn .ic { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 6px; background: #0c121a; color: #9fd0ff; font: 700 14px var(--mono); }
.cmp .cad-view.picking canvas { cursor: crosshair; }
.cmp-ai { max-height: 46%; }
@media (max-width: 760px) { .cmp-ai { max-height: 62%; } }
@media (min-width: 761px) { .cmp-ai { left: auto; width: min(600px, calc(100% - 24px)); max-height: 52%; } .cmp-ai .ai-hist { max-height: 170px; } }
.lib-pipe-thumb { display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #16283b, #0c121a); }
.lib-pipe-ic { font: 700 54px var(--mono); color: #9fd0ff; text-shadow: 0 0 18px rgba(56, 163, 255, .35); }
.lib-kind.kPIPING { color: #ffc46b; border-color: rgba(255, 159, 28, .5); }
.lib-pipe-dlg { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; }
.lib-pipe-view { position: relative; height: 360px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.lib-pipe-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lib-pipe-opts { display: grid; gap: 4px; margin-bottom: 8px; }
@media (max-width: 760px) { .lib-pipe-dlg { grid-template-columns: 1fr; } .lib-pipe-view { height: 260px; } }
.cmp .cad-top .cad-badge.info { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 761px) { .cmp .cad-top .cmp-name { width: 190px; } }
/* 역설계 체결부 (조립 트리) */
.re-joints { border: 1px solid var(--line2); border-radius: 10px; padding: 8px 9px; background: var(--panel2); display: flex; flex-direction: column; gap: 4px; }
.re-joints-h { font-size: 12.5px; }
.re-joint { display: grid; grid-template-columns: 10px 1fr; column-gap: 7px; align-items: center; font-size: 12px; cursor: pointer; padding: 3px 4px; border-radius: 6px; }
.re-joint:hover { background: var(--panel3); } .re-joint i { width: 10px; height: 10px; border-radius: 50%; grid-row: span 2; }
.re-joint small { grid-column: 2; font-size: 11px; }
.re-jtag { font-size: 10.5px; color: #ffc46b; margin-top: 1px; }
/* 역설계 진행 막대 */
.re-job { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 8; width: min(460px, calc(100% - 32px)); background: rgba(14, 20, 29, .96); border: 1px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.re-job-h { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 650; } .re-job-h b { color: var(--accent); font-size: 15px; }
.re-job-bar { height: 10px; border-radius: 6px; background: var(--panel3); overflow: hidden; } .re-job-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #3ddc97); transition: width .5s ease; }
.re-job-msg { font-size: 12.5px; color: #c9d6e4; min-height: 18px; }
.re-job-f { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 11.5px; }
.re-start { top: auto; bottom: 28px; transform: translateX(-50%); } .re-start .re-job-f { align-items: center; }
.re-legacy { border: 1px solid rgba(255, 159, 28, .6); background: rgba(255, 159, 28, .1); border-radius: 10px; padding: 9px 10px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.re-legacy b { color: #ffc46b; font-size: 12.5px; }

/* AI 도우미: 편집기 전체 화면 맨 오른쪽 벽에 접어 두는 인덱스 탭 패널 (오른쪽 프레임 폭과 무관한 읽기 좋은 폭) */
.ai-panel.ai-dock { background: #111821; left: auto; right: 0; top: 96px; bottom: 10px; width: min(460px, calc(100vw - 48px)); max-height: none; border-radius: 12px 0 0 12px; border-right: 0;
  transform: translateX(calc(100% + 12px)); transition: transform .22s ease, visibility .22s; visibility: hidden; z-index: 40; padding: 12px 14px; gap: 9px; }
.ai-panel.ai-dock.open { transform: none; visibility: visible; }
.ai-panel.ai-dock > .ai-hist { max-height: none; }
.ai-dock .ai-head { flex-wrap: wrap; row-gap: 8px; }
.ai-dock .ai-head > b { white-space: nowrap; font-size: 14px; }
.ai-dock .ai-head > .cad-badge { white-space: nowrap; }
.ai-dock .ai-head > .btn { white-space: nowrap; }
.ai-dock .ai-steps { line-height: 1.55; }
.ai-dock .ai-ex { flex-wrap: wrap; overflow: visible; }
.has-ai-dock > .cad-body { padding-right: 18px; }      /* 탭 자리 — 오른쪽 프레임이 탭 밑으로 들어가지 않게 */
.ai-dock-tab { position: absolute; right: 0; top: 38%; transform: translateY(-50%); z-index: 41; width: 18px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 0; border: 0; border-radius: 7px 0 0 7px; background: #2a7ad6; color: #fff; cursor: pointer; box-shadow: -2px 0 8px rgba(0, 0, 0, .3); transition: right .22s ease, background .15s; }
.ai-dock-tab:hover { background: #3a8ae6; }
.ai-dock-tab .ai-dock-t { writing-mode: vertical-rl; font-size: 11px; font-weight: 650; letter-spacing: .03em; white-space: nowrap; line-height: 1; }
.ai-dock-tab .ai-dock-badge:not(:empty) { width: 15px; height: 15px; border-radius: 8px; background: #ffd23f; color: #111; font-size: 10px; display: grid; place-items: center; }
.ai-dock-tab.open { right: min(460px, calc(100vw - 48px)); background: #3a4655; }
@media (max-width: 760px) {
  .ai-panel.ai-dock { width: calc(100vw - 38px); bottom: 4px; }
  .ai-dock-tab.open { right: calc(100vw - 38px); }
}

/* ───────── 월드(시티뷰) 편집기 ───────── */
.wld .cad-view { background: #9fb7cc; }
.wld-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.wld-label { position: absolute; left: 0; top: 0; pointer-events: auto; white-space: nowrap; font-size: 12px; font-weight: 650; color: #fff; background: rgba(16, 24, 34, .82);
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 12px; padding: 2px 9px; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.wld-label.sel { background: #e8a90f; color: #111; border-color: #ffd23f; }
.wld-compass { position: absolute; right: 30px; bottom: 34px; width: 38px; height: 38px; border-radius: 50%; background: rgba(16, 24, 34, .78); border: 1px solid rgba(255, 255, 255, .25); z-index: 4; display: grid; place-items: center; }
.wld-compass i { position: absolute; top: 4px; left: 50%; width: 0; height: 0; margin-left: -5px; border: 5px solid transparent; border-bottom: 11px solid #ff5d5d; border-top: 0; }
.wld-compass b { font-size: 11px; color: #fff; margin-top: 10px; }
.wld-cursor { position: absolute; left: 10px; bottom: 8px; z-index: 4; font-size: 11.5px; color: #fff; background: rgba(16, 24, 34, .72); border-radius: 6px; padding: 3px 8px; pointer-events: none; }
.wld-cursor:empty { display: none; }
.wld-hint { opacity: 0; transition: opacity .2s; pointer-events: none; } .wld-hint.on { opacity: 1; }
.wld-tree { display: flex; flex-direction: column; gap: 2px; }
.wld-node { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 8px; cursor: pointer; font-size: 12.5px; min-width: 0; }
.wld-node:hover { background: var(--panel3); } .wld-node.on { background: rgba(56, 163, 255, .16); outline: 1px solid rgba(56, 163, 255, .45); }
.wld-node.bad b { color: #ff8b8b; }
.wld-node .grow { min-width: 0; display: flex; flex-direction: column; } .wld-node .grow > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wld-node small { font-size: 11px; }
.wld-world { border: 1px solid var(--line2); margin-bottom: 4px; }
.wld-l2 { margin-left: 26px; } .wld-l3 { margin-left: 46px; font-size: 12px; }
.wld-tw { width: 16px; flex: none; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; font-size: 11px; }
.wld-num { flex: none; min-width: 20px; height: 20px; border-radius: 10px; background: #2a7ad6; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.wld-ic { flex: none; width: 18px; text-align: center; }
.wld-legend { font-size: 11.5px; margin: 8px 2px; line-height: 1.5; }
.wld-empty { padding: 10px 4px; font-size: 12.5px; line-height: 1.5; }
.wld-sec { font-size: 12px; font-weight: 650; margin: 12px 0 6px; color: #c9d6e4; }
.wld-pick { display: flex; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 8px; border: 1px solid transparent; }
.wld-pick:hover { background: var(--panel3); } .wld-pick.on { border-color: var(--accent); }
.wld-pick .grow { min-width: 0; display: flex; flex-direction: column; } .wld-pick b, .wld-pick small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; } .wld-pick small { font-size: 11px; }
.wld-btns { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; align-items: center; }
.wld-xyz { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 6px; }
.wld-geo { white-space: pre; font-size: 12px; background: var(--panel3); border-radius: 8px; padding: 8px 10px; margin: 6px 0; line-height: 1.5; }
.wld-steps { margin: 4px 0 0 18px; padding: 0; font-size: 12px; line-height: 1.55; display: flex; flex-direction: column; gap: 4px; }
.wld-srs { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-msg { border-top: 1px solid var(--line2); padding: 6px 0; font-size: 12px; } .ai-msg b { color: var(--accent); }
@media (max-width: 760px) { .wld-srs { display: none; } .wld-compass { right: 26px; bottom: 30px; } }
.wld-right .kv th { white-space: nowrap; width: 1%; padding-right: 10px; vertical-align: top; }

/* ───────── 도움말 문서 보기 ───────── */
.doc-mask { position: fixed; inset: 0; z-index: 400; background: rgba(4, 8, 14, .62); display: grid; place-items: center; padding: 18px; }
.doc-win { width: min(1180px, 100%); height: min(92vh, 100%); background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.doc-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line2); } .doc-head .grow { flex: 1; } .doc-head b { font-size: 15px; }
.doc-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 260px 1fr; }
.doc-toc { overflow: auto; border-right: 1px solid var(--line2); padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.doc-toc a { color: #c9d6e4; text-decoration: none; padding: 3px 6px; border-radius: 6px; } .doc-toc a:hover { background: var(--panel3); }
.doc-toc a.l1 { font-weight: 700; color: var(--text); margin-top: 6px; } .doc-toc a.l2 { font-weight: 600; } .doc-toc a.l3 { padding-left: 18px; color: var(--muted); }
.doc-body { overflow: auto; padding: 18px 28px 40px; font-size: 14px; line-height: 1.7; color: var(--text); }
.doc-body h1 { font-size: 24px; margin: 6px 0 14px; } .doc-body h2 { font-size: 19px; margin: 28px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line2); }
.doc-body h3 { font-size: 16px; margin: 20px 0 8px; } .doc-body h4 { font-size: 14px; margin: 14px 0 6px; }
.doc-body p { margin: 8px 0; } .doc-body ul, .doc-body ol { margin: 6px 0 10px 22px; padding: 0; } .doc-body li.sub { margin-left: 18px; }
.doc-body code { background: var(--panel3); border-radius: 4px; padding: 1px 5px; font-size: 12.5px; }
.doc-body pre { background: #0b1118; border: 1px solid var(--line2); border-radius: 8px; padding: 10px 12px; overflow: auto; font-size: 12px; line-height: 1.45; }
.doc-body pre code { background: none; padding: 0; }
.doc-body blockquote { margin: 10px 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: rgba(56, 163, 255, .08); border-radius: 0 8px 8px 0; }
.doc-tbl { overflow-x: auto; margin: 10px 0; } .doc-body table { border-collapse: collapse; font-size: 13px; min-width: 60%; }
.doc-body th, .doc-body td { border: 1px solid var(--line2); padding: 6px 9px; text-align: left; vertical-align: top; } .doc-body th { background: var(--panel3); }
.doc-body hr { border: 0; border-top: 1px solid var(--line2); margin: 22px 0; }
@media (max-width: 760px) { .doc-mask { padding: 0; } .doc-win { height: 100%; border-radius: 0; } .doc-main { grid-template-columns: 1fr; } .doc-toc { display: none; } .doc-body { padding: 14px 16px 30px; } .doc-head { flex-wrap: wrap; } }
@media print { body > *:not(.doc-mask) { display: none !important; } .doc-mask { position: static; background: none; padding: 0; } .doc-win { height: auto; border: 0; box-shadow: none; } .doc-toc, .doc-head { display: none; } .doc-body { overflow: visible; color: #000; } }
.re-legacy.info { border-color: rgba(56, 163, 255, .55); background: rgba(56, 163, 255, .1); } .re-legacy.info b { color: #8fcaff; }
/* 터치에서 눌러 연 펼침 메뉴 */
.cad-menu.open .cad-menu-pop { display: block; }
/* 모바일 편집기: 닫기·저장·내보내기는 가로 스크롤 막대 맨 앞에 두어 늘 보이게 */
@media (max-width: 820px) {
  .cad .cad-top .mob-pin { order: -1; }
  .cad .cad-top { gap: 6px; }
  /* AI-assist 는 아래에서 올라오는 시트로 — 위쪽 3D 는 계속 보이고 눌러 번호를 찍을 수 있다 */
  .ai-panel.ai-dock { top: auto !important; left: 0; right: 0; bottom: 0; width: 100%; height: 50vh; border-radius: 14px 14px 0 0; border-right: 1px solid var(--line2); transform: translateY(105%); }
  .ai-panel.ai-dock.open { transform: none; }
  .ai-dock-tab.open { right: 0; }
}
/* AI 도우미 — 오류 뒤 다음 할 일 · 번호 찍기 안내 · 이음쇠 방향 버튼 */
.ai-item.ask { border-left-color: var(--accent); } .ai-item.wiz { border-left-color: #ffd23f; background: color-mix(in srgb, #ffd23f 8%, var(--panel2)); }
.ai-sug { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 5px; } .ai-sug .ai-chip { font-size: 12px; }
.ai-chip.act { border-color: var(--accent); } .ai-yes { font-size: 11px; }
.cmp-turn { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; } .cmp-turn .btn { min-width: 0; padding: 3px 7px; } .cmp-turn-lb { font-size: 11.5px; margin-left: 4px; }
/* AI-assist 대화형 — 추천 상자 · 답 · 거절 */
.ai-reco { border: 1px solid var(--line2); border-radius: 8px; padding: 6px 8px; background: color-mix(in srgb, var(--accent) 6%, var(--panel2)); display: flex; flex-direction: column; gap: 4px; }
.ai-reco-h { display: flex; align-items: center; gap: 4px; font-size: 12.5px; }
.ai-reco-s { font-size: 11.5px; }
.ai-reco-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.ai-reco-row .btn { text-align: left; white-space: normal; }
.ai-reco-row.warn .btn { border-color: var(--warn, #d9a400); }
.ai-reco-p { flex-basis: 100%; font-size: 11px; padding-left: 4px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ai-chip.best { border-color: var(--ok); } .ai-chip.no { opacity: .8; }
.ai-item.answer { border-left-color: var(--accent); } .ai-item.info { border-left-color: var(--line2); opacity: .9; }
.ai-ex.wrap { flex-wrap: wrap; overflow: visible; } .ai-prev { font-size: 11px; }
.linkish { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0 2px; font: inherit; font-size: 11.5px; }
.ai-ex[hidden] { display: none; }
/* 바이오리액터 설계기 */
.bio-left .cad-sec { padding-bottom: 6px; } .bio-row { display: grid; grid-template-columns: 96px 1fr; gap: 2px 8px; align-items: center; margin: 5px 0; }
.bio-row > label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; } .bio-hint { grid-column: 2; font-size: 11px; }
.bio-tier { font-size: 10px; border-radius: 8px; padding: 0 5px; width: max-content; border: 1px solid var(--line2); }
.bio-tier.ok { color: var(--ok); border-color: var(--ok); } .bio-tier.warn { color: #e0b341; border-color: #8a6d1d; } .bio-tier.info { color: var(--accent); border-color: var(--accent); }
.bio-num { display: flex; align-items: center; gap: 6px; min-width: 0; } .bio-num input { width: 84px; flex: none; } .bio-num small { font-size: 11px; white-space: nowrap; }
.bio-pair { display: flex; flex-wrap: wrap; gap: 6px; } .bio-pair select { max-width: 150px; }
.bio-slider { display: flex; align-items: center; gap: 6px; } .bio-slider input[type=range] { flex: 1; min-width: 90px; } .bio-slider b { min-width: 42px; text-align: right; font-size: 12px; }
.bio-stages { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.bio-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.bio-type { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); border-radius: 6px; cursor: pointer; font-size: 11px; }
.bio-type.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--panel2)); } .bio-type:disabled { opacity: .7; cursor: default; }
.bio-ic { width: 30px; height: 18px; display: block; background: currentColor; opacity: .75;
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.bio-ic.rushton { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 18'%3E%3Crect x='14' y='0' width='2' height='18'/%3E%3Crect x='3' y='8' width='24' height='2'/%3E%3Crect x='2' y='4' width='4' height='10'/%3E%3Crect x='24' y='4' width='4' height='10'/%3E%3C/svg%3E"); }
.bio-ic.pbt, .bio-ic.custom { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 18'%3E%3Crect x='14' y='0' width='2' height='18'/%3E%3Crect x='2' y='7.5' width='11' height='4'/%3E%3Crect x='17' y='7.5' width='11' height='4'/%3E%3Cpath d='M10.5 13.5 L18 6 L19.5 7.5 L12 15Z'/%3E%3C/svg%3E"); }
.bio-ic.marine { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 18'%3E%3Crect x='14' y='0' width='2' height='18'/%3E%3Cellipse cx='8' cy='10' rx='7' ry='3' transform='rotate(-15 8 10)'/%3E%3Cellipse cx='22' cy='10' rx='7' ry='3' transform='rotate(15 22 10)'/%3E%3C/svg%3E"); }
.bio-ic.hydrofoil { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 18'%3E%3Crect x='14' y='0' width='2' height='18'/%3E%3Cpath d='M1 11 Q7 6 13 8 L13 11 Q7 11 1 11Z M29 11 Q23 6 17 8 L17 11 Q23 11 29 11Z'/%3E%3C/svg%3E"); }
.bio-ic.elephant-ear { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 18'%3E%3Crect x='14' y='0' width='2' height='18'/%3E%3Cellipse cx='7' cy='10' rx='6' ry='5'/%3E%3Cellipse cx='23' cy='10' rx='6' ry='5'/%3E%3C/svg%3E"); }
.bio-np { display: flex; gap: 10px; align-items: center; font-size: 12px; margin: 4px 0; } .bio-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.bio-src { display: flex; flex-direction: column; gap: 4px; }
.bio-kpis { grid-template-columns: repeat(3, 1fr); } .bio-tbl { width: 100%; border-collapse: collapse; font-size: 11.5px; margin-top: 6px; }
.bio-tbl th, .bio-tbl td { border-bottom: 1px solid var(--line); padding: 3px 4px; text-align: left; } .bio-tbl tr.on td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.bio-warn { font-size: 12px; margin-top: 4px; padding: 4px 8px; } .bio-note { font-size: 11.5px; margin-top: 6px; }
.bio-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; } .bio-form .field { margin-bottom: 4px; }
.bio-chart-w { margin-top: 8px; } .bio-chart { width: 100%; height: auto; background: var(--panel2); border-radius: 6px; }
.bio-legend { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; } .bio-legend i { display: inline-block; width: 10px; height: 3px; margin-right: 4px; vertical-align: middle; }
.bio-run { display: flex; gap: 6px; align-items: center; font-size: 12px; padding: 2px 0; flex-wrap: wrap; } .bio-run small { width: 100%; padding-left: 22px; }
.bio-rev { display: grid; grid-template-columns: 36px 1fr; gap: 2px 6px; font-size: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.bio-rev.on b { color: var(--accent); } .bio-rev small, .bio-rev button { grid-column: 2; justify-self: start; }
.bio-explode { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); } .bio-explode input { width: 70px; }
.bio-status { font-size: 12px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bio-h2 { font-size: 15px; margin: 18px 0 8px; } .bio-h2row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .bio-h2row .bio-q { max-width: 260px; margin-left: auto; }
.bio-prod-h { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; }
@media (max-width: 820px) { .bio-row { grid-template-columns: 1fr; } .bio-form { grid-template-columns: 1fr; } .bio-h2row .bio-q { max-width: none; margin-left: 0; } }
.bio-rev-box { margin-top: 8px; padding: 6px 8px; border: 1px solid var(--line2); border-radius: 6px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.bio-plist { max-height: 300px; overflow: auto; margin-top: 6px; border: 1px solid var(--line); border-radius: 6px; }
.bio-pgroup { font-size: 11px; color: var(--muted); padding: 4px 8px; background: var(--panel2); position: sticky; top: 0; }
.bio-pitem { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--text); padding: 4px 8px; cursor: pointer; font-size: 12px; }
.bio-pitem span:first-child { flex: 1; } .bio-pitem.on { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.bio-chg { font-size: 12.5px; padding-left: 18px; margin: 6px 0; } .bio-chg li { margin: 2px 0; }
.bio-tbl-wrap { overflow-x: auto; max-width: 100%; } .bio-tbl-wrap .bio-tbl { min-width: 520px; }
/* 바이오리액터 내부 설계 — 단면도(끌어 배치) · 배치 점검 · 내부품 치수 */
.bio-sec-wrap { touch-action: none; user-select: none; background: var(--panel2); border-radius: 8px; padding: 4px; }
.bio-sec { width: 100%; height: clamp(320px, 52vh, 620px); display: block; }
.bio-sec .bio-h { cursor: grab; } .bio-sec .bio-h:active { cursor: grabbing; }
.bio-checks { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow: auto; }
.bio-chk { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: start; font-size: 12px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.bio-chk.on { border-color: var(--accent); } .bio-chk small { display: block; font-size: 11px; } .bio-chk .btn { white-space: nowrap; }
.bio-iblk { border-bottom: 1px solid var(--line); padding: 5px 0; display: flex; flex-direction: column; gap: 3px; } .bio-iblk.on { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.bio-iblk > b { font-size: 12.5px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.bio-irow { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

.bio-reg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.bio-send { margin-top: 8px; font-size: 12px; }
.bio-send summary { cursor: pointer; color: var(--muted, #888); }
.bio-send > div { padding: 2px 0 2px 12px; }
.bio-send b.ok { color: var(--ok, #2e9e5b); } .bio-send b.warn { color: var(--warn, #c98a12); }
.bio-json { max-height: 60vh; overflow: auto; font-size: 11px; white-space: pre-wrap; }
.bio-reg .cad-badge { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }

/* ── 바이오리액터 설계기 레이아웃 (2026-11-22 정리) ── */
.bio .cad-left.bio-left { width: 300px; padding: 0 0 24px; overflow: auto; }
.bio .cad-right.bio-right { width: 360px; padding: 0 12px 30px; }
.bio .cad-right.bio-right.bio-wide { width: 470px; }
.bio-panel-h { position: sticky; top: 0; z-index: 2; background: var(--panel); padding: 10px 12px 8px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.bio-panel-h b { font-size: 13px; } .bio-panel-h small { font-size: 11px; line-height: 1.35; }
.bio-grp { border-bottom: 1px solid var(--line); }
.bio-grp > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 8px; padding: 9px 12px; user-select: none; }
.bio-grp > summary::-webkit-details-marker { display: none; }
.bio-grp > summary::before { content: '›'; color: var(--muted); font-size: 15px; line-height: 1; width: 10px; transition: transform .12s; align-self: center; }
.bio-grp[open] > summary::before { transform: rotate(90deg); }
.bio-grp > summary:hover { background: var(--panel2); }
.bio-grp-t { font-weight: 650; font-size: 12.5px; color: #cfdae6; white-space: nowrap; }
.bio-grp-s { margin-left: auto; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bio-grp[open] > summary .bio-grp-s { opacity: .6; }
.bio-grp-b { padding: 2px 12px 12px 30px; }
.bio-row { grid-template-columns: 92px minmax(0, 1fr); margin: 6px 0; }
.bio-row > label { line-height: 1.3; }
.bio-hint { line-height: 1.35; }
.bio-types { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.bio-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bio-np { padding: 6px 8px; background: var(--panel2); border-radius: 6px; margin-top: 8px; }
.bio-sum { display: grid; gap: 6px; font-size: 12px; margin: 4px 0 10px; }
.bio-sum > div { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 6px; align-items: start; } .bio-sum > div > span { color: var(--muted); }
.bio-jump { width: 100%; }
.bio-foot { font-size: 11px; padding: 10px 12px 0; margin: 0; }
/* 오른쪽 탭: 설계 · 해석 · 기록 묶음 */
.bio-tabs { position: sticky; top: 0; z-index: 3; background: var(--panel); display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 10px 0 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.bio-tabg { display: flex; align-items: center; gap: 3px; }
.bio-tabg-l { font-size: 10.5px; color: var(--dim); margin-right: 2px; letter-spacing: .04em; }
.bio-tabg button { background: var(--panel2); border: 1px solid var(--line2); color: var(--muted); border-radius: 7px; padding: 5px 9px; cursor: pointer; font-size: 12px; white-space: nowrap; }
.bio-tabg button:hover { color: var(--text); } .bio-tabg button.on { color: #fff; border-color: var(--accent); background: var(--accent-bg); }
.bio-tabhead { display: flex; flex-direction: column; gap: 3px; margin: 2px 0 10px; }
.bio-tabhead > div { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .bio-tabhead b { font-size: 14px; margin-right: 2px; }
.bio-tabhead small { font-size: 11.5px; line-height: 1.4; }
.bio-sub { font-size: 11px; color: var(--muted); margin: 10px 0 2px; padding-bottom: 2px; border-bottom: 1px dashed var(--line2); letter-spacing: .03em; }
.bio-add { margin: 6px 0 2px; }
.bio-legend2 { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--muted); margin-top: 6px; }
.bio-legend2 i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.bio-irow { grid-template-columns: 84px minmax(0, 1fr); }
.bio-irow select { max-width: 170px; }
.bio-tl { font-size: 11px; color: var(--dim); margin-right: -2px; }
@media (max-width: 1280px) { .bio-tl { display: none; } }
@media (max-width: 820px) { .bio .cad-left.bio-left, .bio .cad-right.bio-right, .bio .cad-right.bio-right.bio-wide { width: auto; } .bio-grp-b { padding-left: 12px; } }
.bio-left .bio-stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 4px; } .bio-left .bio-stages .btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bio-row .cmp-chk { justify-self: start; display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; }
.bio-plist { max-height: 45vh; }
.smp-cat.cmp-draft { color: #ffd27a; border-color: rgba(255, 196, 80, .55); }
.bio-bend { display: flex; flex-direction: column; gap: 4px; } .bio-bend .bio-seg { display: flex; gap: 3px; } .bio-bend .bio-seg .btn { flex: 1; padding-inline: 4px; }
.bio-count { display: flex; gap: 3px; } .bio-count .btn { flex: 1; min-width: 0; padding-inline: 0; }
.bio-busy .bio-left button, .bio-busy .cad-left button { pointer-events: none; opacity: .6; } .bio-status .spinner { vertical-align: -2px; }
.cmp-ports { display: flex; flex-direction: column; gap: 4px; } .cmp-port { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.cmp-port select { width: auto; padding: 1px 4px; } .cmp-port-dot { width: 9px; height: 9px; border-radius: 50%; background: #2ec4ff; flex: none; } .cmp-port-dot.used { background: #5f6b78; }
.cmp-orient { display: flex; flex-direction: column; gap: 4px; } .cmp-orient-row { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.cmp-orient-row .btn { min-width: 0; padding: 3px 7px; } .cmp-orient-lb { font-size: 11.5px; min-width: 62px; color: var(--muted, #8b98a5); } .cmp-orient-lb small { font-size: 10.5px; }
.cmp-orient-row .cad-sel { width: auto; } .cmp-orient-row .muted.cmp-orient-lb { min-width: 0; margin-left: 6px; }

/* 서버 자원 표시 (상단 막대) */
.sl-chip { cursor: pointer; font: inherit; font-size: 12px; gap: 8px; }
.sl-chip .sl-m b { font-weight: 600; } .sl-chip b.ok { color: var(--ok); } .sl-chip b.warn { color: var(--warn); } .sl-chip b.bad { color: var(--bad); }
.sl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.sl-chip.ok .sl-dot { background: var(--ok); } .sl-chip.warn .sl-dot { background: var(--warn); }
.sl-chip.bad .sl-dot { background: var(--bad); animation: slblink 1s infinite; } .sl-chip.bad { border-color: rgba(255, 90, 95, .45); background: var(--bad-bg); }
.sl-chip.warn { border-color: rgba(245, 166, 35, .4); }
@keyframes slblink { 50% { opacity: .3; } }
.sl-pop { position: fixed; width: 340px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; z-index: 60; font-size: 12.5px; }
.sl-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sl-tag { font-size: 11px; padding: 1px 8px; border-radius: 10px; } .sl-tag.ok { color: var(--ok); background: var(--ok-bg); } .sl-tag.warn { color: var(--warn); background: var(--warn-bg); } .sl-tag.bad { color: var(--bad); background: var(--bad-bg); }
.sl-row { display: grid; grid-template-columns: 46px 1fr 40px; align-items: center; gap: 2px 8px; margin-bottom: 8px; }
.sl-row .sl-n { grid-column: 2 / 4; font-size: 11px; }
.sl-row b { text-align: right; } .sl-row b.ok { color: var(--ok); } .sl-row b.warn { color: var(--warn); } .sl-row b.bad { color: var(--bad); }
.sl-bar { height: 7px; border-radius: 4px; background: var(--panel3); overflow: hidden; }
.sl-bar i { display: block; height: 100%; border-radius: 4px; transition: width .4s; } .sl-bar i.ok { background: var(--ok); } .sl-bar i.warn { background: var(--warn); } .sl-bar i.bad { background: var(--bad); }
.sl-svc { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.sl-svc b.ok { color: var(--ok); } .sl-svc b.warn { color: var(--warn); } .sl-svc b.bad { color: var(--bad); }
.sl-top { border-top: 1px solid var(--line); padding-top: 4px; }
.sl-proc { display: grid; grid-template-columns: 1fr 52px 64px; gap: 6px; padding: 2px 0; font-variant-numeric: tabular-nums; }
.sl-proc span:not(.sl-pn) { text-align: right; } .sl-proc.mine .sl-pn { color: var(--accent); }
.sl-pn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .sl-pop { width: auto; left: 12px !important; right: 12px; } }

/* 오토 도킹 안내 (3D 위 상단 가운데) */
.cmp-dock-hud { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 6; max-width: min(720px, calc(100% - 32px)); background: rgba(14, 20, 30, .92); border: 1px solid rgba(61, 220, 151, .45); color: var(--text); border-radius: 10px; padding: 7px 14px; font-size: 12.5px; box-shadow: var(--shadow); pointer-events: none; }
.cmp-dock-hud b { color: #3ddc97; } .cmp-dock-hud kbd { font: 11px ui-monospace, monospace; padding: 0 5px; border: 1px solid var(--line2); border-radius: 4px; background: var(--panel3); }
.cmp-dock-acts { display: flex; flex-wrap: wrap; gap: 6px; }

/* 정유공장 시나리오 투어 (plant_tour.js) */
.tour { position: absolute; inset: 0; z-index: 8; pointer-events: none; font-size: 13px; }
.tour-catch { position: absolute; inset: 0; pointer-events: auto; cursor: pointer; }
.tour-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; box-shadow: inset 0 0 120px 30px rgba(255, 40, 50, .55); }
.tour.alarm .tour-flash { animation: tour-flash 1.1s ease-in-out infinite; }
@keyframes tour-flash { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
.tour-top { position: absolute; top: 12px; left: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: calc(100% - 260px); }
.tour-chip { display: inline-flex; gap: 10px; align-items: baseline; padding: 6px 12px; border-radius: 999px; background: rgba(10, 15, 22, .86); border: 1px solid var(--line2); box-shadow: var(--shadow); }
.tour-chip b { font-size: 13.5px; } .tour-step { color: var(--muted); font-size: 12px; }
.tour-mode { padding: 5px 10px; border-radius: 999px; background: var(--accent-bg); border: 1px solid rgba(56, 163, 255, .45); color: #bfe0ff; font-size: 12px; }
.tour-clock { padding: 5px 10px; border-radius: 999px; background: var(--bad-bg); border: 1px solid rgba(255, 90, 95, .55); color: #ffb3b5; font-size: 12.5px; font-weight: 600; }
.cad-view .tour canvas.tour-map { position: absolute; inset: 12px 12px auto auto; width: 220px; height: 140px; pointer-events: none; border-radius: 10px; border: 1px solid var(--line2); box-shadow: var(--shadow); }
.tour-cap { position: absolute; left: 12px; bottom: 92px; width: min(460px, calc(100% - 24px)); padding: 14px 16px 12px; border-radius: 12px; background: rgba(10, 15, 22, .88); border: 1px solid var(--line2); border-left: 3px solid var(--accent); box-shadow: var(--shadow); backdrop-filter: blur(6px); }
.tour.alarm .tour-cap { border-left-color: var(--bad); }
.tour-cap.in { animation: tour-in .55s ease-out; }
@keyframes tour-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tour-cap h3 { margin: 0 0 5px; font-size: 16px; } .tour-cap p { margin: 0; color: #c9d5e2; line-height: 1.55; }
.tour-check { list-style: none; margin: 9px 0 0; padding: 0; display: grid; gap: 4px; }
.tour-check li { opacity: 0; animation: tour-check .4s ease-out forwards; padding-left: 22px; position: relative; color: #d8e3ee; }
.tour-check li::before { content: "✓"; position: absolute; left: 2px; top: 0; color: var(--ok); font-weight: 700; }
@keyframes tour-check { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.tour-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.tour-legend:empty { display: none; }
.tour-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.tour-bar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(720px, calc(100% - 24px)); pointer-events: auto; padding: 8px 10px; border-radius: 12px; background: rgba(10, 15, 22, .9); border: 1px solid var(--line2); box-shadow: var(--shadow); }
.tour-segs { display: flex; gap: 3px; margin-bottom: 8px; }
.tour-seg { flex: 1 1 0; height: 6px; padding: 0; border: 0; border-radius: 3px; background: var(--panel3); cursor: pointer; overflow: hidden; }
.tour-seg i { display: block; height: 100%; width: 0; background: var(--accent); }
.tour.alarm .tour-seg i { background: var(--bad); }
.tour-ctl { display: flex; gap: 5px; align-items: center; justify-content: center; flex-wrap: wrap; }
.tour-btn { padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); cursor: pointer; font-size: 12.5px; white-space: nowrap; }
.tour-btn:hover { border-color: var(--accent); } .tour-btn.on { background: var(--accent-bg); border-color: var(--accent); }
.tour-btn.end { color: #ffb3b5; }
.tour.paused .tour-bar { border-color: rgba(245, 166, 35, .6); }
.tour-end { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: auto; padding: 20px 24px; border-radius: 14px; background: rgba(10, 15, 22, .94); border: 1px solid var(--line2); box-shadow: var(--shadow); text-align: center; max-width: calc(100% - 32px); }
.tour-end h3 { margin: 0 0 6px; } .tour-end p { margin: 0 0 14px; color: var(--muted); }
.tour-end-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.tour-pick { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; background: rgba(5, 8, 12, .55); padding: 16px; }
.tour-pick-card { width: min(760px, 100%); max-height: 100%; overflow: auto; border-radius: 14px; background: var(--panel); border: 1px solid var(--line2); box-shadow: var(--shadow); }
.tour-pick-head { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tour-pick-head b { font-size: 15px; } .tour-pick-head .muted { font-size: 12px; flex: 1; min-width: 200px; }
.tour-pick-list { display: grid; gap: 8px; padding: 12px; }
.tour-pick-item { display: flex; gap: 12px; text-align: left; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); cursor: pointer; }
.tour-pick-item:hover { border-color: var(--accent); background: var(--panel3); }
.tour-pick-item.alarm:hover { border-color: var(--bad); }
.tour-pick-item.last { border-color: rgba(56, 163, 255, .5); }
.tour-pick-ic { font-size: 28px; line-height: 1; flex: none; width: 40px; text-align: center; }
.tour-pick-item b { font-size: 14px; } .tour-pick-item p { margin: 3px 0 4px; color: #c3d0df; font-size: 12.5px; line-height: 1.5; } .tour-pick-item small { color: var(--muted); }
@media (max-width: 760px) {
  .cad-view .tour canvas.tour-map { width: 132px; height: 84px; } .tour-top { max-width: calc(100% - 156px); }
  .tour-cap { bottom: 118px; padding: 10px 12px; } .tour-cap h3 { font-size: 14px; } .tour-cap p { font-size: 12px; }
  .tour-btn { padding: 5px 8px; }
}
.cad-view:has(.tour) .layout-focus { display: none; }

/* 통합 운영 관제 (plantops.js) */
.ops { display: flex; flex-direction: column; gap: 10px; }
.ops.embedded { position: absolute; inset: 0; z-index: 12; overflow: auto; padding: 12px; background: rgba(7, 10, 15, .97); }
.ops-busy { display: flex; gap: 10px; align-items: center; padding: 30px; color: var(--muted); }
.ops-links { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.ops-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.ops-title b { font-size: 16px; } .ops-title .badge { margin-left: 6px; font-size: 10px; letter-spacing: .08em; }
.ops-status { font-weight: 700; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; }
.ops-status.ok { color: var(--ok); background: var(--ok-bg); } .ops-status.warn { color: var(--warn); background: var(--warn-bg); }
.ops-status.bad { color: #fff; background: var(--bad); animation: ops-blink 1s steps(2) infinite; }
@keyframes ops-blink { 50% { opacity: .55; } }
.ops.emergency .ops-head { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad), 0 0 24px rgba(255, 90, 95, .25); }
.ops-clock { font-size: 13px; } .ops-speed .cad-view-btn { min-width: 40px; }
.ops-kpis { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.ops-kpi { padding: 10px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--line2); min-width: 0; }
.ops-kpi.ok { border-top-color: var(--ok); } .ops-kpi.warn { border-top-color: var(--warn); } .ops-kpi.bad { border-top-color: var(--bad); background: linear-gradient(180deg, rgba(255, 90, 95, .08), var(--panel)); }
.ops-kpi .l { font-size: 11.5px; color: var(--muted); } .ops-kpi .v { font: 700 22px/1.25 var(--mono); white-space: nowrap; } .ops-kpi .v small { font: 500 11px var(--sans); color: var(--muted); }
.ops-kpi .s { font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ops-row { display: grid; gap: 10px; } .ops-row.r1 { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); } .ops-row.r2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.ops-row.r3 { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } .ops-row.r4 { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } .ops-row.r5 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr); }
.ops-card { padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.ops-ch { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; } .ops-ch b { font-size: 13.5px; } .ops-ch .muted { font-size: 11.5px; }
.ops-cv { position: relative; height: 230px; }
.ops-svg { width: 100%; height: auto; display: block; }
.ops-pipe-bg { fill: none; stroke: #0b1119; }
.ops-pipe { fill: none; stroke-linecap: round; opacity: .35; stroke-dasharray: 10 8; }
.ops-pipe.on { opacity: .95; animation: ops-flow linear infinite; }
@keyframes ops-flow { to { stroke-dashoffset: -36; } }
.ops-elabel { fill: #c9d5e2; font: 600 11px var(--mono); paint-order: stroke; stroke: #0b1119; stroke-width: 3px; }
.ops-node rect { fill: #142030; stroke: #2ecc71; stroke-width: 1.5; } .ops-node { cursor: pointer; }
.ops-node.startup rect { stroke: var(--warn); } .ops-node.esd rect { stroke: var(--bad); fill: #2a1418; }
.ops-node.alarm rect { animation: ops-node-al 1.2s ease-in-out infinite; } @keyframes ops-node-al { 50% { stroke: var(--bad); stroke-width: 3; } }
.ops-node.sel rect { stroke: var(--accent); stroke-width: 3; }
.ops-avail { fill: var(--warn); }
.ops-ntitle { fill: #fff; font: 700 12.5px var(--sans); } .ops-nmode { fill: #8fd9a8; font: 600 10.5px var(--sans); } .ops-node.esd .ops-nmode { fill: #ff9a9e; } .ops-node.startup .ops-nmode { fill: #ffc56b; }
.ops-nval { fill: #c9d5e2; font: 500 11px var(--mono); }
.ops-prod rect { fill: #121b27; stroke-width: 1.5; }
.ops-fire { fill: #ff6b6b; font: 700 13px var(--sans); }
.ops-desc { margin: 0 0 8px; color: #c3d0df; font-size: 12.5px; line-height: 1.5; }
.ops-timer { margin-bottom: 6px; } .ops-guide { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 12.5px; } .ops-guide li.done { color: var(--ok); }
.ops-scn-g { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.ops-scn-k { width: 34px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.ops-scn-b { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); cursor: pointer; font-size: 12px; text-align: left; }
.ops-scn-b:hover:not(:disabled) { border-color: var(--accent); } .ops-scn-b.k-비상 { border-color: rgba(255, 90, 95, .45); } .ops-scn-b.k-장애 { border-color: rgba(245, 166, 35, .45); }
.ops-alist { display: grid; gap: 3px; max-height: 300px; overflow: auto; }
.ops-al { display: grid; grid-template-columns: 30px 46px 64px 1fr auto; gap: 6px; align-items: center; padding: 5px 8px; border-radius: 6px; font-size: 12px; cursor: pointer; border-left: 3px solid; }
.ops-al.p1 { border-color: var(--bad); background: var(--bad-bg); } .ops-al.p2 { border-color: var(--warn); background: var(--warn-bg); }
.ops-al:not(.acked).p1 { animation: ops-al 1s steps(2) infinite; } @keyframes ops-al { 50% { background: rgba(255, 90, 95, .32); } }
.ops-al.acked { opacity: .7; } .ops-al .lv { font: 700 11px var(--mono); } .ops-al .t { color: var(--muted); font-size: 11px; } .ops-al .tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-empty { color: var(--ok); padding: 10px 4px; font-size: 12.5px; }
.ops-sps { display: grid; gap: 5px; }
.ops-sp { display: grid; grid-template-columns: minmax(130px, 1.2fr) minmax(80px, 1fr) 70px auto; gap: 6px; align-items: center; font-size: 12px; }
.ops-sp label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ops-num { width: 70px; padding: 3px 5px; }
.ops-sub { margin: 9px 0 5px; font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.ops-eqs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px; }
.ops-eq { display: flex; gap: 5px; align-items: center; padding: 4px 6px; border-radius: 6px; background: var(--panel2); font-size: 11.5px; border-left: 3px solid var(--line2); }
.ops-eq b { font-family: var(--mono); font-size: 11px; } .ops-eq span { flex: 1; color: var(--muted); }
.ops-eq.run { border-left-color: var(--ok); } .ops-eq.trip { border-left-color: var(--bad); background: var(--bad-bg); } .ops-eq.stby { border-left-color: var(--dim); }
.ops-btns { display: flex; flex-wrap: wrap; gap: 4px; }
.btn.xs { padding: 2px 8px; font-size: 11.5px; min-height: 0; }
.ops-qnow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; margin-bottom: 6px; }
.ops-q { padding: 5px 7px; border-radius: 7px; background: var(--panel2); display: grid; font-size: 11px; border-top: 2px solid var(--ok); } .ops-q.bad { border-top-color: var(--bad); background: var(--bad-bg); }
.ops-q b { font: 700 15px var(--mono); } .ops-q b small { font-size: 10px; color: var(--muted); }
.ops-tbl { width: 100%; border-collapse: collapse; font-size: 12px; } .ops-tbl td, .ops-tbl th { padding: 3px 6px; border-bottom: 1px solid var(--line); text-align: left; white-space: pre; } .ops-tbl .num { text-align: right; font-family: var(--mono); }
.ops-tks { display: flex; gap: 6px; flex-wrap: wrap; }
.ops-tk { display: grid; justify-items: center; gap: 2px; font-size: 10.5px; width: 52px; } .ops-tk b { font: 600 10px var(--mono); }
.ops-tk .bar { width: 26px; height: 76px; border-radius: 4px; background: var(--panel3); position: relative; overflow: hidden; border: 1px solid var(--line2); }
.ops-tk .bar i { position: absolute; left: 0; right: 0; bottom: 0; opacity: .85; }
.ops-ev { display: grid; gap: 2px; max-height: 210px; overflow: auto; font-size: 11.5px; } .ops-ev .ev { padding: 2px 0; border-bottom: 1px dashed var(--line); }
.ops-ev .ev.action { color: #bfe0ff; } .ops-ev .ev.event { color: #ffc56b; } .ops-ev .ev.guide { color: var(--ok); } .ops-ev .ev.scenario { color: #c3b8ff; }
@media (max-width: 1300px) { .ops-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ops-row.r1, .ops-row.r2, .ops-row.r3, .ops-row.r4, .ops-row.r5 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .ops-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ops-qnow { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ops-sp { grid-template-columns: 1fr 70px auto; } .ops-sp input[type=range] { display: none; } }
.ops-erp-g { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 12.5px; } .ops-erp-g .ok { color: var(--ok); } .ops-erp-g .bad { color: var(--bad); }
.ops-erp-tk { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; } .ops-erp-tk .chip { padding: 1px 7px; border-radius: 999px; background: var(--panel3); font: 11px var(--mono); } .ops-erp-tk .chip.bad { background: var(--bad-bg); color: var(--bad); }
@media (max-width: 760px) { .ops-erp-g { grid-template-columns: 1fr; } }
.tour-stats { padding: 5px 10px; border-radius: 999px; background: rgba(10, 15, 22, .86); border: 1px solid var(--line2); font-size: 12px; color: #d8e3ee; }

/* 조감 지도 (sitemap.js) */
.sitemap { width: 100%; height: auto; display: block; border-radius: 8px; }
.sitemap .sm-bg { fill: #0b1119; } .sitemap .sm-eq { stroke: #0b1119; stroke-width: .6; } .sitemap .sm-eq:hover { stroke: var(--accent); stroke-width: 1.5; }
.sitemap .sm-eq.road { fill: #222c38; stroke: none; } .sitemap .sm-dike { stroke: #3c4a5a; stroke-width: 1.2; }
.sitemap .sm-unit { fill: #8b9aad; font: 600 11px var(--sans); pointer-events: none; }
.sitemap .sm-alarm .sm-dot { fill: #f5a623; } .sitemap .sm-alarm.p1 .sm-dot, .sitemap .sm-alarm.fire .sm-dot { fill: #ff3b30; }
.sitemap .sm-alarm .sm-pulse { fill: none; stroke: #f5a623; stroke-width: 2.5; animation: sm-pulse 1.1s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.sitemap .sm-alarm.p1 .sm-pulse, .sitemap .sm-alarm.fire .sm-pulse { stroke: #ff3b30; }
@keyframes sm-pulse { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
.sitemap .sm-ic { font-size: 13px; } .sitemap .sm-lab { fill: #ffd2d3; font: 700 10.5px var(--sans); paint-order: stroke; stroke: #0b1119; stroke-width: 3px; }
.sitemap .sm-wo-t { font-size: 8px; } .sitemap .sm-focus { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 6 4; }
.sitemap.compact .sm-ic { font-size: 9px; }
.sm-legend { font-size: 11px; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }
.sm-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; } .sm-legend .l1 { background: #ff3b30; } .sm-legend .l2 { background: #f5a623; } .sm-legend .lw { background: #38a3ff; }
.ops-row.r0 { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.ops-kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 6px; }
.kb-col { background: var(--panel2); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 5px; min-height: 120px; }
.kb-h { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.kb-card { text-align: left; display: grid; gap: 1px; padding: 6px 7px; border-radius: 7px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); cursor: pointer; font-size: 11.5px; border-left: 3px solid var(--accent); }
.kb-card.pr-critical { border-left-color: var(--bad); } .kb-card.pr-high { border-left-color: var(--warn); } .kb-card:hover { border-color: var(--accent); }
.kb-card b { font-family: var(--mono); font-size: 12px; } .kb-card small { font-size: 10px; }
@media (max-width: 1300px) { .ops-row.r0 { grid-template-columns: minmax(0, 1fr); } }

/* 사고 현장 패널 (incident3d.js) */
.inc-panel { position: absolute; top: 10px; right: 10px; bottom: 10px; width: min(460px, calc(100% - 20px)); z-index: 11; display: flex; flex-direction: column; border-radius: 12px;
  background: rgba(10, 15, 22, .95); border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 12.5px; }
.inc-head { display: flex; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); align-items: flex-start; } .inc-head > div { flex: 1; min-width: 0; }
.inc-tag { font: 700 16px var(--sans); } .inc-tag small { font-weight: 500; color: var(--muted); font-size: 12px; }
.inc-alarm { margin-top: 4px; padding: 4px 8px; border-radius: 6px; background: var(--warn-bg); color: #ffd08a; } .inc-alarm.p1 { background: var(--bad-bg); color: #ffb3b5; }
.inc-flow { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; } .inc-flow span { font-size: 10.5px; padding: 1px 6px; border-radius: 999px; background: var(--panel3); color: var(--dim); }
.inc-flow span.past { color: var(--ok); } .inc-flow span.on { background: var(--accent); color: #fff; }
.inc-body { overflow: auto; padding: 4px 12px 12px; } .inc-busy { padding: 20px; color: var(--muted); }
.inc-sec { padding: 8px 0; border-bottom: 1px dashed var(--line); } .inc-sec h4 { margin: 0 0 5px; font-size: 12.5px; color: #bfe0ff; }
.inc-tbl { width: 100%; border-collapse: collapse; } .inc-tbl th { text-align: left; color: var(--muted); font-weight: 500; width: 92px; padding: 2px 6px 2px 0; vertical-align: top; } .inc-tbl td { padding: 2px 0; }
.inc-live { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 5px; color: var(--muted); } .inc-live b { color: var(--text); font-family: var(--mono); }
.inc-list { margin: 0; padding-left: 16px; display: grid; gap: 2px; } .inc-steps { margin: 0; padding-left: 20px; display: grid; gap: 3px; } .inc-steps li.done { color: var(--ok); }
.inc-check { display: grid; gap: 3px; } .inc-ci { display: grid; grid-template-columns: 1fr auto auto; gap: 4px; align-items: center; padding: 3px 6px; border-radius: 6px; background: var(--panel2); }
.inc-ci.ok { box-shadow: inset 3px 0 var(--ok); } .inc-ci.bad { box-shadow: inset 3px 0 var(--bad); background: var(--bad-bg); }
.inc-cta { padding: 12px 0; display: grid; gap: 6px; } .inc-cta .btn { justify-self: start; }
.inc-meta { display: flex; flex-wrap: wrap; gap: 4px; } .inc-meta .chip { padding: 2px 8px; border-radius: 999px; background: var(--panel3); font-size: 11.5px; } .inc-meta .chip.bad { background: var(--bad-bg); color: var(--bad); }
.inc-form { display: grid; gap: 6px; } .inc-form label { display: flex; gap: 6px; align-items: center; } .inc-form select, .inc-form input { flex: 1; }
.inc-link { word-break: break-all; } .inc-prog { margin-top: 4px; color: #d8e3ee; }
.inc-photos { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; } .inc-photos img { width: 76px; height: 57px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line2); }

/* 내 작업 (모바일) */
.mw { max-width: 720px; margin: 0 auto; display: grid; gap: 10px; }
.mw-h { font-size: 16px; } .mw-list { display: grid; gap: 8px; }
.mw-card { display: grid; gap: 3px; padding: 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line2); color: var(--text); border-left: 4px solid var(--accent); }
.mw-card:hover { text-decoration: none; border-color: var(--accent); } .mw-card.pr-critical, .mw-top.pr-critical { border-left-color: var(--bad); } .mw-card.pr-high, .mw-top.pr-high { border-left-color: var(--warn); }
.mw-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .mw-row > input:not([type=file]) { flex: 1; min-width: 140px; }
.mw-st { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--panel3); } .mw-st.st-dispatched { background: var(--bad); color: #fff; } .mw-st.st-in_progress { background: var(--warn-bg); color: var(--warn); }
.mw-st.st-reported, .mw-st.st-closed { background: var(--ok-bg); color: var(--ok); } .mw-pri { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.mw-back { font-size: 13px; } .mw-top { padding: 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line2); border-left: 4px solid var(--accent); display: grid; gap: 4px; }
.mw-tag { font-size: 20px; } .mw-title { font-size: 15px; font-weight: 600; } .mw-note { padding: 6px 8px; border-radius: 8px; background: var(--accent-bg); } .mw-alarm { padding: 6px 8px; border-radius: 8px; background: var(--bad-bg); color: #ffb3b5; }
.mw-big { padding: 14px; font-size: 16px; width: 100%; }
.mw-sec { padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 6px; } .mw-sec h4 { margin: 0; font-size: 14px; }
.mw-chk { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 8px; background: var(--panel2); font-size: 14px; line-height: 1.45; }
.mw-chk input { width: 22px; height: 22px; flex: none; margin-top: 1px; } .mw-chk.done { background: var(--ok-bg); } .mw-by { color: var(--ok); }
.mw-ul { margin: 0; padding-left: 18px; font-size: 14px; } .mw-meas { display: grid; grid-template-columns: 1fr 90px auto; gap: 6px; align-items: center; font-size: 13.5px; }
.mw-num { width: 90px; } .mw-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.mw-photos a { display: grid; gap: 2px; font-size: 11px; color: var(--muted); } .mw-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.mw-sec textarea, .mw-sec select { width: 100%; } .mw-ok { color: var(--ok); font-weight: 700; } .mw-parts { display: grid; gap: 4px; }
.top-chip.work { background: var(--accent-bg); color: #bfe0ff; } .top-chip.work.alert { background: var(--bad); color: #fff; animation: ops-blink 1s steps(2) infinite; }
.inc-code { color: #8fd9a8; }

/* 처음 온 사용자 안내 (투어 버튼 가이드) */
.guide { position: fixed; inset: 0; z-index: 5000; pointer-events: none; }
.guide-hole { position: fixed; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(3, 6, 10, .62); border: 2px solid var(--accent); }   /* 정지 그림자 — 애니메이션 없음(전체 화면 다시 그리기 방지) */
.guide-hole::after { content: ""; position: absolute; inset: -6px; border-radius: 14px; border: 3px solid #9fd2ff; will-change: opacity, transform; animation: guide-pulse 1.4s ease-in-out infinite; }
@keyframes guide-pulse { 0%, 100% { opacity: 0; transform: scale(.96); } 50% { opacity: 1; transform: scale(1.04); } }
.guide-bubble { position: fixed; width: 340px; max-width: calc(100vw - 24px); pointer-events: auto; padding: 14px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--accent); box-shadow: var(--shadow); }
.guide-bubble::before { content: ""; position: absolute; top: -8px; left: 40px; width: 14px; height: 14px; background: var(--panel); border-left: 1px solid var(--accent); border-top: 1px solid var(--accent); transform: rotate(45deg); }
.guide-bubble b { font-size: 15px; } .guide-bubble p { margin: 6px 0 10px; color: #c9d5e2; line-height: 1.55; font-size: 13px; }
.guide-step { font: 600 11px var(--mono); color: var(--muted); margin-bottom: 4px; } .guide-note { padding: 6px 8px; border-radius: 8px; background: var(--warn-bg); color: #ffd08a; font-size: 12px; margin-bottom: 10px; }
.guide-btns { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* 공간 불러오기 안내 — 다 뜰 때까지 편집기를 덮는다(첫 사용자가 이것저것 누르지 않게) */
.loadgate { position: fixed; inset: 0; z-index: 4900; display: grid; place-items: center; background: rgba(3, 6, 10, .45); }
.loadgate[hidden] { display: none; }
.lg-card { width: 420px; max-width: calc(100vw - 32px); padding: 18px 20px; border-radius: 14px; background: var(--panel); border: 1px solid var(--accent); box-shadow: var(--shadow); }
.lg-head { display: flex; gap: 12px; align-items: flex-start; } .lg-head b { font-size: 15px; } .lg-head .muted { margin-top: 4px; font-size: 12.5px; line-height: 1.5; }
.lg-bar { height: 6px; margin: 14px 0 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.lg-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }
.lg-meta { display: flex; justify-content: space-between; font-size: 12px; }
.lg-steps { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.lg-steps li.on { color: var(--text); font-weight: 600; } .lg-steps li.ok { color: var(--ok); }
.loadgate .btn { margin-top: 12px; } .loadgate .btn[hidden] { display: none; }

/* 편집기 오른쪽 위 로그인 계정(누르면 로그아웃) — 투어·편집 중에도 바로 나갈 수 있게 */
.cad-acct-wrap { position: relative; margin-left: auto; display: flex; align-items: center; }
.cad-acct { display: flex; align-items: center; gap: 2px; height: 24px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line); background: #111a26; color: #cfe0f2; font-size: 12px; cursor: pointer; white-space: nowrap; }
.cad-acct:hover { border-color: var(--accent); }
.cad-acct em { font-style: normal; margin-left: 6px; padding: 0 6px; border-radius: 8px; background: rgba(255, 196, 80, .18); color: #ffc450; font-size: 11px; }
.cad-acct-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5200; min-width: 200px; padding: 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.cad-acct-pop[hidden] { display: none; }
.cad-acct-pop .who { margin-bottom: 10px; font-size: 13px; } .cad-acct-pop .who .muted { font-size: 12px; margin-top: 2px; }
.cad-acct-pop .btn { width: 100%; justify-content: center; }

/* 공통 바닥글(서비스명·저작권) */
.appfoot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 20px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--dim); }
.appfoot b { color: var(--muted); font-weight: 650; }
.login-copy { margin-top: 10px; font-size: 11px; color: var(--dim); letter-spacing: .02em; }

/* 숨긴 편집기 도구 버튼(정유 전용 투어·관제실·운영 등) — .cad-tool 의 display 가 [hidden] 을 덮지 않게 */
.cad-tool[hidden] { display: none !important; }

/* ───────── 휴머노이드 공장·트레이닝 센터 허브 ───────── */
.cad-badge.bad { background: var(--bad-bg); color: var(--bad); }
.hm-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.hm-body { display: flex; flex-direction: column; gap: 14px; }
.hm-seed { display: flex; gap: 12px; align-items: center; background: var(--accent-bg); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; }
.hm-seed > div { flex: 1; }
.hm-bar { height: 8px; background: var(--panel3); border-radius: 5px; overflow: hidden; margin-top: 6px; }
.hm-bar.sm { height: 6px; margin-top: 2px; min-width: 70px; }
.hm-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent)); transition: width .4s; }
.hm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.hm-tile { background: linear-gradient(135deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hm-tile b { font-size: 22px; font-family: var(--mono); } .hm-tile.sm b { font-size: 18px; } .hm-tile small { color: var(--muted); font-size: 11.5px; } .hm-tile span { font-size: 12px; }
.hm-flow { display: flex; flex-wrap: wrap; gap: 6px; }
.hm-flow-step { flex: 1 1 140px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; position: relative; display: flex; flex-direction: column; gap: 3px; }
.hm-flow-step:hover { border-color: var(--accent); } .hm-flow-step span { color: var(--muted); font-size: 12px; } .hm-flow-step i { position: absolute; right: -9px; top: 40%; color: var(--accent); font-style: normal; z-index: 1; }
.hm-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; overflow-x: auto; }
.hm-card h3 { font-size: 14.5px; } .hm-card h4 { font-size: 13px; margin: 6px 0 4px; }
.hm-2col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.hm-row { display: flex; gap: 8px; align-items: center; } .hm-row.wrap { flex-wrap: wrap; }
.hm-tr td.ok { color: var(--ok); } .hm-tr td.warn { color: var(--warn); } .hm-tr td.bad { color: var(--bad); } .hm-ci { font-size: 10.5px; }
.hm-al, .hm-ev { list-style: none; margin: 0; padding: 0; font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; max-height: 260px; overflow: auto; }
.hm-ev li.bad, .hm-al li.bad { color: var(--bad); } .hm-ev li.ok { color: var(--ok); }
.hm-fit { display: flex; gap: 6px; flex-wrap: wrap; }
.hm-clock { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hm-seg { display: flex; gap: 4px; }
.hm-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.hm-cell { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; min-width: 0; }
.hm-cell.bott { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn) inset; }
.hm-cell-h { display: flex; justify-content: space-between; gap: 6px; } .hm-cell-h b { font-size: 12.5px; }
.hm-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.hm-chip { font: 11px var(--mono); padding: 1px 6px; border-radius: 8px; background: var(--panel3); color: var(--muted); border: 1px solid transparent; }
.hm-chip.on { background: var(--accent-bg); color: var(--accent); border-color: rgba(56, 163, 255, .35); cursor: pointer; }
.hm-spec3d { height: 340px; border-radius: 10px; overflow: hidden; background: #10151c; }
.hm-pre { max-height: 60vh; overflow: auto; font: 12px var(--mono); background: var(--bg2); padding: 10px; border-radius: 8px; }
.hm-picks { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow: auto; } .hm-pick { font-size: 12.5px; }
.hm-fleet { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.hm-rb { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; }
.hm-rb.prot { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad) inset; }
.hm-rb-h { display: flex; gap: 6px; align-items: center; } .hm-rb-h b { font: 600 14px var(--mono); }
.hm-rb-k { display: flex; gap: 12px; flex-wrap: wrap; font-family: var(--mono); }
.hm-sm { display: flex; flex-wrap: wrap; gap: 3px; }
.hm-sm-s { font-size: 10.5px; padding: 1px 6px; border-radius: 8px; background: var(--panel3); color: var(--dim); }
.hm-sm-s.on { background: var(--accent); color: #fff; } .hm-sm-s.prot.on { background: var(--bad); }
.hm-real { opacity: .75; }
.hm-replay-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 200; display: grid; place-items: center; }
.hm-replay { width: min(1280px, 96vw); height: min(820px, 92vh); background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow); }
.hm-replay-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.hm-replay-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 0; }
.hm-replay-3d { position: relative; min-height: 0; } .hm-replay-3d canvas { width: 100% !important; height: 100% !important; display: block; }
.hm-replay-info { border-left: 1px solid var(--line); padding: 10px 12px; overflow: auto; display: flex; flex-direction: column; gap: 12px; font-size: 12.5px; }
.hm-ri { display: flex; flex-direction: column; gap: 4px; } .hm-crit { display: flex; flex-wrap: wrap; gap: 3px; }
.hm-replay-ctl { display: flex; gap: 8px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); }
.hm-replay-bar { flex: 1; }
.hm-replay-label { padding: 4px 14px 8px; font-size: 11.5px; color: var(--warn); }
.hm-live { position: absolute; left: 12px; bottom: 12px; z-index: 20; background: rgba(12, 18, 26, .88); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; width: 320px; backdrop-filter: blur(4px); }
.hm-live[hidden] { display: none; }
.hm-live-h { display: flex; align-items: center; gap: 6px; } .hm-live-row { display: flex; gap: 6px; align-items: center; } .hm-live-row select { flex: 1; } .hm-live-st { font-size: 11px; color: var(--warn); }
@media (max-width: 900px) { .hm-2col { grid-template-columns: 1fr; } .hm-replay-body { grid-template-columns: 1fr; grid-template-rows: 1fr 160px; } .hm-replay-info { border-left: 0; border-top: 1px solid var(--line); } .hm-fleet { grid-template-columns: 1fr; } .hm-live { width: calc(100% - 24px); } }
.hm-seed[hidden] { display: none; }

/* ───────── 로봇 콘솔(로봇 중심 동적 대시보드) ───────── */
.rc { position: absolute; right: 10px; top: 10px; bottom: 10px; width: min(860px, 62%); z-index: 30; background: rgba(9, 13, 19, .94); border: 1px solid var(--line2); border-radius: 12px; padding: 10px 12px; overflow: auto; display: flex; flex-direction: column; gap: 8px; backdrop-filter: blur(4px); font-size: 12px; }
.rc-top { display: flex; align-items: center; gap: 8px; } .rc-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .rc-head b { font: 600 15px var(--mono); }
.rc-sm { display: flex; flex-wrap: wrap; gap: 3px; } .rc-s { font-size: 10.5px; padding: 1px 6px; border-radius: 8px; background: var(--panel3); color: var(--dim); } .rc-s.on { background: var(--accent); color: #fff; } .rc-s.prot.on { background: var(--bad); }
.rc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rc-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rc-card > b { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.rc-c1 { grid-row: span 2; } .rc-wide { grid-column: span 2; }
.rc-fpv { width: 100%; aspect-ratio: 4 / 3; border-radius: 6px; background: #000; } .rc-depth { width: 100%; image-rendering: pixelated; border-radius: 6px; } .rc-lidar { width: 100%; border-radius: 6px; }
.rc-card canvas { max-width: 100%; }
.rc-act { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; } .rc-ag { display: flex; flex-direction: column; gap: 2px; } .rc-ag > small { color: var(--muted); }
.rc-j { display: grid; grid-template-columns: 52px 1fr; gap: 1px 4px; font-size: 10px; align-items: center; } .rc-j > span:last-child { grid-column: 1 / -1; font-size: 9.5px; }
.rc-bar { display: block; height: 6px; background: var(--panel3); border-radius: 4px; overflow: hidden; } .rc-bar > i { display: block; height: 100%; }
.rc-us > div { display: grid; grid-template-columns: 22px 1fr 52px; gap: 4px; align-items: center; }
.rc-px { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; } .rc-pxd { font: 10px var(--mono); padding: 1px 5px; border-radius: 6px; background: var(--panel3); color: var(--dim); } .rc-pxd.on { background: var(--bad-bg); color: var(--bad); }
.rc-ev { list-style: none; margin: 0; padding: 0; max-height: 150px; overflow: auto; font-size: 11px; } .rc-ev li.warn { color: var(--warn); }
.rc-inj { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; } .rc-sp { display: inline-flex; gap: 3px; align-items: center; margin-left: 8px; color: var(--muted); }
.rc-data { font-size: 11.5px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 1100px) { .rc { width: calc(100% - 20px); } .rc-grid { grid-template-columns: 1fr 1fr; } .rc-act { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hm-fpvs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px; max-height: 360px; overflow: auto; } .hm-fpvs img { width: 100%; border-radius: 4px; }
.rc canvas { position: static !important; inset: auto !important; width: 100% !important; height: auto !important; max-height: none; }
/* 로봇 콘솔 — 오른쪽 도킹 · 작은 창(PiP) · QC */
.rc.dock { width: min(460px, 40%); }
.rc.dock .rc-grid { grid-template-columns: 1fr 1fr; }
.rc.dock .rc-wide, .rc.dock .rc-c1 { grid-column: 1 / -1; grid-row: auto; }
.rc.dock .rc-act { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rc-modes { display: flex; gap: 4px; flex-wrap: wrap; }
.rc-pip { position: absolute; left: 12px; bottom: 12px; z-index: 31; width: 360px; background: rgba(9, 13, 19, .92); border: 1px solid var(--line2); border-radius: 10px; padding: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.rc-pip-h { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); padding: 0 2px 3px; }
.rc-pip canvas { width: 100% !important; height: auto !important; position: static !important; border-radius: 6px; display: block; }
.rc-qc { display: flex; flex-direction: column; gap: 4px; } .rc-qcp { display: grid; grid-template-columns: 1fr 120px 44px; gap: 6px; align-items: center; }
.rc-qcs { display: flex; flex-wrap: wrap; gap: 3px; } .rc-qcs .cad-badge { font-size: 10px; }
.rc-qcl { display: flex; flex-wrap: wrap; gap: 8px; font-size: 10px; color: var(--muted); } .rc-qcl i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 3px; vertical-align: -1px; }
.rc-qct { font-size: 10.5px; } .rc-qct td, .rc-qct th { padding: 2px 4px !important; } .rc-qct tr.bad td { color: var(--bad); }
.rc-mis { display: flex; flex-direction: column; gap: 4px; } .rc-mis .cad-badge { margin: 2px; }
@media (max-width: 1100px) { .rc-pip { width: 240px; } .rc.dock { width: calc(100% - 20px); top: auto; height: 55%; } }
/* 조립 워크벤치 */
.wb-main { display: grid; grid-template-columns: minmax(0, 1fr) clamp(470px, 26vw, 720px); gap: 10px; min-height: 640px; }
.wb-left { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wb-3d { position: relative; height: calc(100vh - 160px); min-height: 480px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #0f141b; }
.wb-tools { position: absolute; left: 10px; top: 10px; z-index: 5; display: flex; flex-direction: column; gap: 5px; background: rgba(9,13,19,.82); border: 1px solid var(--line2); border-radius: 10px; padding: 6px 8px; font-size: 11.5px; }
.wb-row { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; } .wb-sl { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); } .wb-sl input { width: 110px; }
.wb-steplab { color: #ffd54a; font-size: 11px; }
.wb-info { font-size: 12px; padding: 6px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 34px; }
.wb-side { display: flex; flex-direction: column; min-width: 0; height: calc(100vh - 118px); min-height: 520px; }
.wb-sbody { overflow: auto; flex: 1; display: flex; flex-direction: column; gap: 8px; padding-right: 2px; }
.wb-sum .hm-tiles { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); margin-bottom: 8px; } .hm-tile.bad b { color: var(--bad); }
.wb-parts tr { cursor: pointer; } .wb-parts tr.on td, .wb-det tr.on td { background: rgba(56,163,255,.12); } .wb-grp td { background: var(--panel3); font-weight: 600; font-size: 11.5px; }
.wb-parts td, .wb-det td { padding: 3px 5px !important; font-size: 11.5px; }
.wb-dim { display: grid; grid-template-columns: 110px 1fr 120px 70px; gap: 6px; align-items: center; font-size: 12px; margin: 3px 0; }
.wb-bolts { display: flex; flex-wrap: wrap; gap: 3px; } .wb-bolts span { padding: 0 3px; border-radius: 4px; background: var(--panel3); font-size: 10.5px; } .wb-bolts span.ok { color: var(--ok); } .wb-bolts span.bad { color: var(--bad); background: var(--bad-bg); }
.wb-chart { width: 100%; border-radius: 6px; } .wb-res { font-size: 10.5px; color: var(--muted); }
.wb-3d .rc.dock { top: 8px; bottom: 8px; right: 8px; width: min(430px, 48%); }
@media (max-width: 1200px) { .wb-main { grid-template-columns: 1fr; } .wb-side { height: auto; } }
.cmp-libctx { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; padding: 4px 2px 6px; } .cmp-libctx .btn { margin-left: auto; }
.cmp-libsep { font-size: 11px; padding: 8px 2px 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.rc-card[hidden] { display: none !important; }
.build-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 9999; display: flex; gap: 8px; align-items: center; background: #13325a; color: #e8f1ff; border: 1px solid #2f6fd0; border-radius: 10px; padding: 8px 12px; font-size: 13px; box-shadow: 0 8px 28px rgba(0,0,0,.45); }
.cmp-libsec { position: sticky; top: 0; z-index: 2; background: var(--panel2, #121821); font-size: 12px; padding: 6px 4px 4px; margin-top: 4px; border-bottom: 1px solid var(--line); }
.cmp-used { font: 600 10.5px var(--mono); color: var(--ok); margin-left: 4px; }
/* 떠 있는 창(로봇 콘솔 · FPV 작은 창) — 끌어 옮기기 · 크기 조절 · 접기 */
.rc.dock, .rc-pip { resize: both; overflow: auto; min-width: 220px; min-height: 40px; }
.rc-pip { overflow: hidden; } .rc-pip { resize: both; }
.rc-drag { cursor: move; user-select: none; touch-action: none; } .rc-grip { color: var(--muted); font-size: 14px; margin-right: 2px; }
.rc.min, .rc-pip.min { height: auto !important; bottom: auto !important; resize: none; overflow: hidden; }
.rc.min > :not(.rc-top), .rc-pip.min > :not(.rc-pip-h) { display: none !important; }
.rc.min { width: auto !important; min-width: 0; }
/* 피지컬 AI 패널(모든 트윈 공간) */
.sr-panel { position: absolute; left: 12px; top: 64px; z-index: 28; width: 330px; background: rgba(9, 13, 19, .9); border: 1px solid var(--line2); border-radius: 10px; padding: 6px 8px; font-size: 12px; display: flex; flex-direction: column; gap: 5px; resize: both; overflow: auto; min-width: 220px; }
.sr-h { display: flex; align-items: center; gap: 6px; } .sr-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; } .sr-row .input { max-width: 190px; }
.sr-cmd { display: flex; gap: 4px; } .sr-cmd .input { flex: 1; } .sr-log { display: flex; flex-direction: column; gap: 2px; font-size: 11px; max-height: 110px; overflow: auto; }
.sr-panel.min > :not(.sr-h) { display: none !important; } .sr-panel.min { height: auto !important; width: auto !important; resize: none; }
.sr-row.on { background: rgba(56, 214, 255, .1); border-radius: 6px; } .sr-row { padding: 2px 3px; cursor: pointer; }
.sr-tgt { font-size: 11.5px; padding: 4px 2px; border-top: 1px solid var(--line); } .sr-act { display: flex; flex-wrap: wrap; gap: 3px; }
.sr-learn { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; } .sr-learn:empty { display: none; }
.sr-cmp { display: grid; grid-template-columns: 70px 1fr 40px 1fr 40px; gap: 3px 5px; align-items: center; font-size: 11px; }
.sr-curve { width: 100%; border-radius: 6px; }
/* 피지컬 AI 여정 */
.jr-top { display: grid; grid-template-columns: 360px 1fr; gap: 12px; margin-bottom: 12px; }
.jr-ring { display: flex; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.jr-ring-c { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; flex: none; } .jr-ring-c > div { width: 74px; height: 74px; border-radius: 50%; background: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center; } .jr-ring-c b { font: 700 22px var(--mono); }
.jr-guide { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; } .jr-guide .input { flex: 1; }
.jr-guide-out { font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.jr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.jr-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.jr-card.ok { border-color: rgba(46, 204, 113, .5); } .jr-card.next { border-color: #38a3ff; box-shadow: 0 0 0 2px rgba(56, 163, 255, .25); }
.jr-h { display: flex; align-items: center; gap: 6px; } .jr-n { width: 22px; height: 22px; border-radius: 50%; background: var(--panel3); display: grid; place-items: center; font: 600 12px var(--mono); } .jr-ic { font-size: 18px; }
.jr-d { font-size: 12px; } .jr-k { font-size: 11.5px; }
.jr-run { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.jr-rep td { vertical-align: top; font-size: 12px; } .jr-m { white-space: pre-wrap; font-size: 10.5px; max-width: 360px; } .jr-spark { letter-spacing: 1px; color: #38d6ff; }
@media (max-width: 1100px) { .jr-grid { grid-template-columns: 1fr; } .jr-top { grid-template-columns: 1fr; } }

/* 공개 투어 링크(/tour/<토큰>, public_tour.js) — 로그인 없이 3D + 🎬 투어만. 편집 패널·메뉴·관제 버튼은 숨긴다 */
body.public-tour { background: #090d13; overflow: hidden; }
.cmp.kiosk .cad-mbrow, .cmp.kiosk .cad-left, .cmp.kiosk .cad-right, .cmp.kiosk .layout-focus, .cmp.kiosk .ai-dock, .cmp.kiosk .ai-dock-tab { display: none !important; }
.cmp.kiosk.has-ai-dock > .cad-body { padding-right: 0; }
.cmp.kiosk .kiosk-top { gap: 10px; }
.kiosk-brand { display: inline-flex; align-items: baseline; gap: 10px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 4px; }
.kiosk-brand b { font-size: 13.5px; background: linear-gradient(90deg, #38a3ff, #8f7dff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kiosk-brand .muted { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.cmp.kiosk .kiosk-top .cad-tool { font-size: 13px; }
@media (max-width: 560px) { .kiosk-brand .muted { display: none; } }

/* ── 돌아가기(다른 화면에서 열기로 들어온 경우) ── */
.navback-chip { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 9000; display: flex; gap: 6px; align-items: center;
  background: var(--panel, #161c24); border: 1px solid rgba(56, 163, 255, .55); border-radius: 999px; padding: 5px 8px 5px 6px; box-shadow: 0 6px 22px rgba(0, 0, 0, .45); }
.crumb-back { margin-right: 10px; color: #38a3ff; font-weight: 600; white-space: nowrap; }

/* ── 피지컬 AI 여정 — 작업 진행 패널 ── */
.jw { margin-bottom: 12px; border-color: rgba(56, 163, 255, .45); }
.jw[hidden] { display: none; }
.jw-head h3 { margin: 0 8px 0 0; display: inline-flex; align-items: center; gap: 6px; }
.jw-pipe { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.jw-st { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px; color: var(--muted, #9aa6b2); }
.jw-st.ok { border-color: rgba(46, 204, 113, .6); color: #2ecc71; } .jw-st.bad { border-color: rgba(231, 76, 60, .6); color: #ff7b6b; }
.jw-st.now { border-color: #38a3ff; color: #fff; background: rgba(56, 163, 255, .16); box-shadow: 0 0 0 2px rgba(56, 163, 255, .2); }
.jw-st-n { font-weight: 700; min-width: 12px; text-align: center; }
.jw-now { padding: 8px 10px; border-radius: 8px; background: rgba(90, 169, 230, .08); margin-bottom: 8px; }
.jw-step { font-size: 14px; }
.jw-body { display: flex; gap: 12px; align-items: stretch; }
.jw-3d { flex: 1.3; min-width: 0; height: 300px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); position: relative; }
.jw-3d[hidden] { display: none; }
.jw-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.jw-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.jw-kv-r { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; border-bottom: 1px dashed var(--line); padding: 2px 0; }
.jw-ev { font-size: 11.5px; max-height: 150px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.jw-bar { position: relative; height: 18px; border-radius: 9px; background: var(--panel3, #222a33); overflow: hidden; }
.jw-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #2f80ed, #38a3ff); transition: width .4s; }
.jw-bar span { position: relative; font-size: 11.5px; padding-left: 8px; line-height: 18px; }
.jw-joints { display: flex; flex-wrap: wrap; gap: 4px; }
.jw-j { font-size: 11px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); }
.jw-j.ok { border-color: rgba(46, 204, 113, .6); color: #2ecc71; } .jw-j.bad { border-color: rgba(231, 76, 60, .6); color: #ff7b6b; } .jw-j.now { border-color: #38a3ff; color: #38a3ff; }
.jw-log { max-height: 220px; overflow: auto; font-size: 12.5px; display: flex; flex-direction: column; gap: 2px; }
.jw-k-ok { color: #2ecc71; } .jw-k-bad { color: #ff7b6b; } .jw-k-step { font-weight: 600; color: #cfe6ff; }
.jw-st .smp-spin, .jw-head .smp-spin { width: 12px; height: 12px; border-width: 2px; display: inline-block; margin: 0; }
.jw-tag { display: inline-block; width: 18px; text-align: center; }
@media (max-width: 900px) { .jw-body { flex-direction: column; } .jw-3d { height: 240px; } }

/* ── 미션 편집기 ── */
.mis-ed { display: flex; flex-direction: column; gap: 8px; min-width: min(560px, 90vw); }
.mis-steps { display: flex; flex-direction: column; gap: 4px; }
.mis-step { display: flex; gap: 6px; align-items: center; }
.mis-cond { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.mis-c { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12.5px; }
.mis-out .warn { color: #f5b041; }

/* ───────── 휴머노이드 부품 원장 — 워크벤치 구성 트리 · 라이브러리 카드·상세 ───────── */
.wb-tree .wb-asm td { background: var(--panel3); }
.wb-tree .wb-asm .hm-row { gap: 6px; align-items: center; } .wb-tree .wb-asm .hm-bar.sm { width: 70px; margin-top: 0; }
.wb-tree .wb-mod td { font-weight: 600; } .wb-tree .wb-mod.on td { background: rgba(56,163,255,.12); }
.wb-tree .wb-tw { display: inline-block; width: 12px; color: var(--muted); }
.wb-tree .wb-it td:first-child { padding-left: 22px !important; } .wb-tree .wb-it.d3 td:first-child { padding-left: 36px !important; }
.wb-tree .wb-it a { font-family: ui-monospace, monospace; font-size: 11.5px; } .wb-it-t { font-size: 11px; line-height: 1.3; max-width: 360px; }
.wb-opts { margin: 6px 0 0; padding-left: 4px; list-style: none; font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
.wb-mods td .cad-badge { margin: 1px 2px; } .wb-mods tr { cursor: pointer; }
.wb-info a.cad-badge { text-decoration: none; }
.wb-cfg { max-height: 420px; overflow: auto; }
.lib-kind.kHUMANOID { color: #c9a7ff; border-color: rgba(163, 148, 255, .5); }
.lib-sub { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 4px; }
.lib-sub .chip.sm { font-size: 11.5px; padding: 3px 9px; }
.smp-cats .chip.hp-chip { border-color: rgba(163, 148, 255, .35); }
.lib-hp-thumb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(160deg, #1b2230, #121821); }
.lib-hp-thumb small { color: #b9c7d6; font-size: 11.5px; }
.lib-hp-ic { font-size: 34px; color: #c9a7ff; line-height: 1; }
.lib-hp.internal .lib-hp-ic { color: #8b9aad; }
.lib-hp-thumb img { position: absolute; inset: 6px 6px 18px; width: calc(100% - 12px); height: calc(100% - 24px); object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.lib-hp-thumb.has-img .lib-hp-ic { display: none; }
.lib-hp-thumb.has-img small { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; }
.hp3-tabs { display: flex; gap: 6px; align-items: center; }
.hp3-hint { margin-left: auto; font-size: 11px; }
.hp3-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.hp3-tools:empty, .hp3-comp:empty, .hp3-ref:empty { display: none; }
.hp3-tools input[type=range] { width: 120px; }
.hp3-chk { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
.hp3-comp { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; }
.hp3-comp b { margin-right: 4px; }
.hp3-chip { border: 1px solid var(--line); background: #151c25; color: #c9d4df; border-radius: 10px; padding: 2px 8px; font-size: 11.5px; cursor: pointer; }
.hp3-chip.on { border-color: #ff8a1a; color: #ffb066; background: #2a1d10; }
.hp3-ref { font-size: 11.5px; margin: 0; line-height: 1.45; }
.hp3-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hp3-labels span { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 10.5px; color: #e6edf5; background: rgba(12,18,26,.78); border: 1px solid #2c3846; padding: 1px 6px; border-radius: 6px; margin: -9px 0 0 6px; }
.hp3-labels span.on { border-color: #ff8a1a; color: #ffb066; }
.lib-hp-pk { font-size: 10.5px; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-hp-stat { cursor: pointer; }
.hp-dlg { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 14px; max-height: 72vh; }
.hp-left { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; }
.hp-view { position: relative; height: 380px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #0c121a; flex: none; }
.hp-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hp-cap { position: absolute; left: 8px; bottom: 6px; font-size: 11px; color: #b9c7d6; background: rgba(12,18,26,.7); padding: 2px 8px; border-radius: 8px; }
.hp-noview { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 12.5px; padding: 16px; text-align: center; }
.hp-where { overflow: auto; min-height: 0; font-size: 12px; } .hp-where h4 { margin: 4px 0; }
.hp-side { overflow: auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding-right: 2px; }
.hp-head h3 { margin: 6px 0 2px; font-size: 15px; } .hp-head p { margin: 0; font-size: 12px; }
.hp-qty { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .hp-qty > div { background: var(--panel3); border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; }
.hp-sec h4 { margin: 6px 0 4px; font-size: 12.5px; color: #b9c7d6; }
.hp-links { display: flex; flex-wrap: wrap; gap: 4px; } .hp-links a { text-decoration: none; } .hp-links small { opacity: .75; }
.hp-ul { margin: 4px 0; padding-left: 16px; font-size: 12px; display: flex; flex-direction: column; gap: 2px; }
.hp-sec .tbl td { font-size: 11.5px; padding: 3px 5px; } .hp-sec td.hp-on { background: rgba(56,163,255,.12); } .hp-sec td .cad-badge { margin-left: 4px; font-size: 10px; }
@media (max-width: 860px) { .hp-dlg { grid-template-columns: 1fr; max-height: none; } .hp-view { height: 260px; } }
.wb-tree, .wb-mods { table-layout: fixed; width: 100%; }
.wb-tree td, .wb-mods td { white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.wb-tree .wb-asm td .hm-row { flex-wrap: wrap; }
.wb-mods .cad-badge { white-space: normal; display: inline-block; }
.wb-tree td, .wb-tree td.main, .wb-mods td, .wb-mods td.main, .wb-cfg td.main, .hp-sec td.main { display: table-cell; }
@media (max-width: 700px) { .wb-tree td, .wb-tree td.main, .wb-mods td, .wb-mods td.main, .wb-cfg td.main, .hp-sec td.main { display: block; } }

/* ── 3D 트윈 라이브러리 — 분류 트리 · 경로 · 도구 막대 · 목록 보기 ── */
.lib-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.lib-tile { text-align: left; font: inherit; color: var(--text); cursor: pointer; background: linear-gradient(135deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; display: flex; flex-direction: column; gap: 2px; min-width: 0; transition: border-color .15s; }
.lib-tile:hover { border-color: #3a4f6a; text-decoration: none; } .lib-tile.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px rgba(56, 163, 255, .35); }
.lib-tile-h { font-size: 12px; color: #cddbea; font-weight: 650; display: flex; gap: 6px; align-items: center; } .lib-tile-h i { font-style: normal; color: var(--accent); }
.lib-tile small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lib-tile-go b { color: var(--accent); }
.lib-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 16px; align-items: start; }
.lib-nav { position: sticky; top: 76px; max-height: calc(100vh - 92px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lib-nav-h { display: flex; align-items: center; gap: 4px; padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 13px; } .lib-nav-x { display: none; }
.lib-tree { overflow: auto; padding: 6px; flex: 1; min-height: 0; overscroll-behavior: contain; }
.lib-tn { display: flex; align-items: center; gap: 4px; padding: 3px 6px 3px 2px; border-radius: 6px; cursor: pointer; font-size: 12.5px; min-height: 27px; color: #c3d0de; outline: none; }
.lib-tn:hover { background: var(--panel2); } .lib-tn:focus-visible { box-shadow: inset 0 0 0 1px var(--accent); }
.lib-tn.sel { background: var(--accent-bg); color: #fff; box-shadow: inset 2px 0 0 var(--accent); } .lib-tn.off { opacity: .42; }
.lib-tn.d0, .lib-tn.d1 { font-weight: 650; color: #dbe6f2; } .lib-tn.d1 { margin-top: 3px; }
.lib-tn .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-tn small { font: 600 10.5px var(--mono); color: var(--muted); flex: none; } .lib-tn.sel small { color: #cfe3ff; }
.lib-tn-ic { width: 16px; text-align: center; flex: none; color: #7fb4e6; font-size: 12px; }
.lib-caret { width: 16px; flex: none; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; font-size: 12px; display: inline-block; } .lib-caret:hover { color: var(--text); }
.lib-tk { padding-left: 12px; margin-left: 9px; border-left: 1px solid var(--line); }
.lib-nav-mask { display: none; } .lib-nav-btn { display: none; }
.lib-main { min-width: 0; }
.lib-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.lib-q { flex: 1 1 280px; display: flex; gap: 6px; align-items: center; min-width: 0; } .lib-q .lib-search { flex: 1; width: auto; min-width: 0; }
.lib-sel { width: auto; max-width: 180px; } .lib-scope:empty { display: none; }
.lib-sub[hidden] { display: none; } .lib-sub { margin: 0 0 8px; font-size: 12px; } .lib-sub .lib-seg .chip small { margin-left: 5px; opacity: .7; }
.lib-crumb { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; padding: 8px 2px 10px; border-bottom: 1px solid var(--line); margin-bottom: 12px; scroll-margin-top: 80px; }
.lib-bc { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; min-width: 0; } .lib-bc i { font-style: normal; color: var(--dim); } .lib-bc a { color: var(--muted); } .lib-bc a:hover { color: var(--text); }
.lib-cnt { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; } .lib-cnt b { color: var(--text); font-size: 14px; }
.lib-x { background: none; border: 0; color: inherit; cursor: pointer; padding: 0 0 0 4px; font-size: 10px; }
.lib-gh { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 8px 2px 2px; border-bottom: 1px dashed var(--line2); font-size: 13px; }
.lib-gh small { font: 600 11px var(--mono); color: var(--muted); } .lib-gh-ic { color: #7fb4e6; width: 16px; text-align: center; }
.smp-grid .lib-gh:not(:first-child) { margin-top: 8px; }
.lib-path { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; font-size: 11.5px; } .lib-path i { font-style: normal; color: var(--dim); } .lib-path a { color: #8fb6dc; }
.lib-tbl td { padding: 7px 12px; } .lib-tbl .lib-gtr td { padding: 4px 12px; background: var(--panel2); }
.lib-rt { display: flex; gap: 10px; align-items: center; min-width: 0; } .lib-rt b { font-weight: 600; }
.lib-ric { width: 44px; height: 30px; flex: none; border-radius: 6px; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 40% 30%, #1b2a3d, #0c121a); color: #9fd0ff; font-size: 15px; }
.lib-ric img { width: 100%; height: 100%; object-fit: cover; }
.lib-r-sum { max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-r-act { white-space: nowrap; text-align: right; } .lib-r-act .btn { margin-right: 4px; } .lib-tbl .lib-kind { margin: 0; }
.lib-tbl .smp-fmt { margin-right: 3px; }
@media (max-width: 900px) {
  .lib-layout { grid-template-columns: minmax(0, 1fr); }
  .lib-nav { position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); max-height: none; border-radius: 0 12px 12px 0; z-index: 70; transform: translateX(-104%); transition: transform .18s ease; }
  .lib-nav.open { transform: none; box-shadow: 12px 0 40px rgba(0, 0, 0, .5); } .lib-nav-x { display: inline-flex; }
  .lib-nav-mask.open { display: block; position: fixed; inset: 0; z-index: 69; background: rgba(2, 5, 9, .55); }
  .lib-nav-btn { display: inline-flex; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lib-tn { min-height: 36px; }
}
@media (max-width: 640px) { .lib-q { flex-basis: 100%; order: -1; } .lib-sel { max-width: 44vw; } .lib-r-sum { display: none; } }

/* ── 허브 · ALPS 연계 ── */
.alps { display: flex; flex-direction: column; gap: 12px; }
.alps-hero h3 { margin: 0 0 8px; }
.alps-loop { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; }
.alps-step { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; min-width: 130px; padding-right: 22px; }
.alps-step.ok { border-color: rgba(46, 204, 113, .6); } .alps-step b { font-size: 13px; }
.alps-arrow { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--muted, #9aa6b2); }
.alps-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 4px 16px; margin: 8px 0; }
.alps-kv-r { display: flex; gap: 10px; font-size: 12.5px; border-bottom: 1px dashed var(--line); padding: 3px 0; } .alps-kv-r > span:first-child { min-width: 92px; }
.alps-tbl td { vertical-align: top; } .alps-tbl tr.sel { background: rgba(56, 163, 255, .08); }
.alps-feed { max-height: 260px; overflow: auto; font-size: 12.5px; display: flex; flex-direction: column; gap: 2px; }
.alps-sp { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.alps-sp-row { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; } .alps-sp-row h4 { margin: 0 0 4px; }
.alps-bars { margin-top: 6px; } .alps-bars-row { display: flex; align-items: flex-end; gap: 3px; height: 90px; padding-top: 4px; }
.alps-bar { flex: 1; min-width: 14px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.alps-bar i { width: 100%; background: linear-gradient(180deg, #38a3ff, #2f80ed); border-radius: 3px 3px 0 0; }
.alps-bar small { font-size: 9.5px; color: var(--muted, #9aa6b2); }
.alps-det { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.alps-sp .alps-kv, .alps-det .alps-kv { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
@media (max-width: 640px) {
  .lib-tiles { display: flex; overflow-x: auto; gap: 8px; scrollbar-width: none; margin: 4px -12px 12px; padding: 0 12px 2px; } .lib-tiles::-webkit-scrollbar { display: none; }
  .lib-tile { flex: 0 0 136px; padding: 8px 10px; } .lib-tile b { font-size: 17px; } .lib-tile > small { display: none; }
}
@media (min-width: 701px) { .lib-tbl td.main { display: table-cell; } }   /* 셸의 .main(flex) 과 겹치지 않게 */
.lib-tbl .lib-kind { white-space: nowrap; } .lib-gtr td { grid-column: 1 / -1; }

/* 양산 전 판정(DVT) — 워크벤치 탭 · 보고서 */
.dvt-verdict { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #141b24; }
.dvt-verdict b { font-size: 15px; }
.dvt-verdict small { color: #8b9aad; font-size: 11px; }
.dvt-verdict.ok { border-color: #2ecc71; background: #10241a; } .dvt-verdict.ok b { color: #5fe39a; }
.dvt-verdict.warn { border-color: #f0b429; background: #2a2210; } .dvt-verdict.warn b { color: #ffd36b; }
.dvt-verdict.bad { border-color: #ff4d4f; background: #2a1214; } .dvt-verdict.bad b { color: #ff8a8c; }
.dvt-tiles { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)) !important; }
.dvt-tog { font-size: 12px; gap: 10px; }
.dvt-checks details { border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; margin: 4px 0; background: #121820; }
.dvt-checks summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 3px 0; }
.dvt-row { display: grid; grid-template-columns: 74px 1fr; gap: 8px; align-items: start; padding: 5px 0; border-top: 1px solid #1d2530; font-size: 12px; }
.dvt-row .mono { color: #dfe7f0; }
.dvt-row.fail b { color: #ff8a8c; } .dvt-row.warn b { color: #ffd36b; }
.dvt-basis { font-size: 11px; }
.dvt-prog { display: flex; gap: 10px; align-items: center; margin-top: 8px; font-size: 12.5px; }
.dvt-pbar { height: 6px; border-radius: 3px; background: #1d2530; margin: 4px 0; overflow: hidden; }
.dvt-pbar i { display: block; height: 100%; background: #38d6ff; transition: width .4s; }
.dvt-report { display: flex; flex-direction: column; gap: 12px; max-height: 74vh; overflow: auto; padding-right: 4px; }
.dvt-sec { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #10161e; }
.dvt-sec h3 { margin: 0 0 8px; font-size: 14px; }
.dvt-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.dvt-tbl { font-size: 12px; }
.dvt-tbl td .bad, .dvt-tbl b.bad { color: #ff8a8c; }
.dvt-chart { width: 100%; height: auto; background: #0c121a; border-radius: 8px; margin-top: 8px; }
.dvt-bars { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.dvt-bar { display: grid; grid-template-columns: 170px 1fr 70px; gap: 8px; align-items: center; }
.dvt-bar .k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #c9d4df; }
.dvt-bar .b { height: 8px; background: #1d2530; border-radius: 4px; overflow: hidden; }
.dvt-bar .b i { display: block; height: 100%; background: #38d6ff; }
.dvt-bar small { grid-column: 1 / -1; }
@media (max-width: 900px) { .dvt-2col { grid-template-columns: 1fr; } }
@media print { body.dvt-print > *:not(.modal-mask) { display: none !important; } body.dvt-print .dvt-report { max-height: none; overflow: visible; } }

body.navback-hide .navback-chip { display: none; }
.wb-3d > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }   /* 3D 가 칸 전체를 채운다(넓은 화면에서 왼쪽 위 작은 그림 + 빈 여백 방지) */
.jw-3d > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* 워크벤치 — 머리말 한 줄 · 요약 칩 한 줄 · 3D 최대(여백 최소) */
.wb-head { margin-bottom: 6px; align-items: center; gap: 8px; flex-wrap: nowrap; }
.wb-head h1 { font-size: 15px; white-space: nowrap; } .wb-head h1 small { font-size: 11.5px; font-weight: 400; }
.wb-head .actions { gap: 5px; flex-wrap: nowrap; } .wb-head .actions .input { max-width: 360px; height: 28px; padding: 2px 26px 2px 8px; } .wb-head .actions .btn { padding: 3px 9px; }
.wb-sum .hm-tiles { display: flex !important; flex-wrap: nowrap; gap: 4px; overflow-x: auto; margin-bottom: 6px; scrollbar-width: thin; }
.wb-sum .hm-tile { flex: 1 0 auto; flex-direction: row; align-items: baseline; gap: 6px; padding: 3px 9px; border-radius: 7px; white-space: nowrap; }
.wb-sum .hm-tile b { font-size: 12.5px !important; } .wb-sum .hm-tile small { font-size: 10.5px; }
.wb-main { gap: 6px; } .wb-left { gap: 4px; }
.wb-info { min-height: 28px; padding: 4px 8px; }
.wb-tools { padding: 5px 7px !important; gap: 3px !important; } .wb-tools .btn.xs { padding: 2px 7px; font-size: 11.5px; } .wb-sl { font-size: 11.5px; } .wb-sl input { width: 90px; }

/* 라이프사이클 타임랩스 체험 */
.lc-root { position: absolute; inset: 0; z-index: 30; pointer-events: none; font-size: 13px; }
.lc-root > * { pointer-events: auto; }
.lc-start { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); width: min(520px, 90%); background: rgba(12,18,26,.94); border: 1px solid var(--line2); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.lc-hud { position: absolute; top: 10px; background: rgba(9,13,19,.78); border: 1px solid var(--line2); border-radius: 9px; padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; max-width: 46%; pointer-events: none; }
.lc-hud.tl { left: 10px; } .lc-hud.tr { right: 10px; text-align: right; }
.lc-hud b { font-size: 13.5px; } .lc-hud small { color: #9fb0c2; font-size: 11px; } .lc-hud b.rm { color: #7dffb0; }
.lc-cap { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); max-width: min(900px, 86%); background: rgba(9,13,19,.82); border-radius: 9px; padding: 7px 14px; text-align: center; pointer-events: none; }
.lc-cap div { font-size: 14.5px; font-weight: 600; } .lc-cap small { color: #b9c7d6; font-size: 11.5px; display: block; margin-top: 2px; }
.lc-bottom { position: absolute; left: 10px; right: 10px; bottom: 8px; display: flex; flex-direction: column; gap: 4px; background: rgba(9,13,19,.82); border: 1px solid var(--line2); border-radius: 10px; padding: 6px 8px; }
.lc-groups { display: flex; gap: 4px; flex-wrap: wrap; } .lc-grp { background: transparent; color: #dfe7f0; border: 1px solid; border-radius: 10px; font-size: 11px; padding: 1px 8px; cursor: pointer; }
.lc-bar { position: relative; display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #1d2530; }
.lc-seg { border: 0; border-right: 1px solid #0c121a; opacity: .45; cursor: pointer; padding: 0; } .lc-seg.on { opacity: 1; }
.lc-head { position: absolute; top: -2px; bottom: -2px; width: 3px; background: #fff; box-shadow: 0 0 6px #fff; }
.lc-ctl { display: flex; gap: 6px; align-items: center; } .lc-time { font-size: 12px; } .lc-sim { font-size: 11px; color: #9fb0c2; }
.lc-ov { position: absolute; left: 10px; top: 64px; display: flex; flex-direction: column; gap: 6px; max-width: 420px; pointer-events: auto; }
.lc-card { background: rgba(12,18,26,.9); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.lc-card.sm { max-width: 380px; } .lc-card b { font-size: 13px; }
.lc-part-img { width: 100%; max-height: 200px; object-fit: contain; background: radial-gradient(#1b2534, #0c121a); border-radius: 8px; }
.lc-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.lc-flow-i { background: #141c26; border: 1px solid #263242; border-radius: 6px; padding: 4px 6px; display: flex; flex-direction: column; font-size: 11px; opacity: 0; animation: lcIn .5s forwards; }
.lc-flow-i small { color: #7fd3ff; font-size: 10px; }
@keyframes lcIn { to { opacity: 1; } }
.lc-steps { margin: 0; padding-left: 18px; font-size: 11.5px; line-height: 1.5; } .lc-steps li { color: #7d8b9b; } .lc-steps li.done { color: #7dffb0; } .lc-steps li.on { color: #ffd54a; font-weight: 600; }
.lc-banner { border-radius: 8px; padding: 6px 10px; font-weight: 600; font-size: 13px; }
.lc-banner.ok { background: #10241a; border: 1px solid #2ecc71; color: #7dffb0; } .lc-banner.bad { background: #2a1214; border: 1px solid #ff4d4f; color: #ff9a9c; } .lc-banner.warn { background: #2a2210; border: 1px solid #f0b429; color: #ffd36b; }
.lc-chain { font-size: 11.5px; white-space: pre-wrap; color: #dfe7f0; }
.lc-curve { width: 100%; height: auto; }
.lc-obs { font-size: 11px; color: #cfe1f2; }
.lc-mini { position: absolute; right: 10px; top: 70px; width: 210px; background: rgba(12,18,26,.88); border: 1px solid var(--line2); border-radius: 9px; padding: 6px; }
.lc-mini svg { width: 100%; height: auto; display: block; } .lc-mini-h { font-size: 10.5px; color: #9fb0c2; margin-bottom: 3px; }
.lc-evid { position: absolute; right: 10px; top: 64px; bottom: 100px; width: min(460px, 46%); overflow: auto; background: rgba(12,18,26,.96); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; font-size: 12px; z-index: 2; }
.lc-evid h4 { margin: 10px 0 4px; font-size: 12.5px; } .lc-evid-h { display: flex; justify-content: space-between; align-items: center; }
.lc-ids { white-space: pre-wrap; font-size: 11px; color: #cfe1f2; } .lc-val { margin: 0; padding-left: 16px; } .lc-val li.ok { color: #7dffb0; } .lc-val li.bad { color: #ff9a9c; } .lc-val li.warn { color: #ffd36b; }
.lc-evid tr.on td { background: #1a2a1e; }
.lc-fade { position: absolute; inset: 0; background: #05080c; opacity: 0; pointer-events: none !important; z-index: 1; }
.lc-alert { position: absolute; inset: 0; pointer-events: none !important; box-shadow: inset 0 0 140px 30px rgba(255,40,30,.55); opacity: 0; }
.lc-banner.alarm { background: #3a0c0e; border: 1px solid #ff4d4f; color: #ffd0d0; font-size: 15px; animation: lcBlink 1s steps(2, start) infinite; }
@keyframes lcBlink { 50% { background: #6a1013; } }
.lc-mission { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); width: min(500px, 60%); background: rgba(10,16,24,.94); border: 1px solid #ff9f43; border-radius: 12px;
  padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 0 24px rgba(255,159,67,.35); animation: lcPop .45s cubic-bezier(.2,1.4,.4,1) both; pointer-events: none !important; }
.lc-mission h4 { margin: 0; font-size: 16px; color: #ffcf8f; letter-spacing: .02em; } .lc-mission .row { display: grid; grid-template-columns: 76px 1fr; gap: 8px; font-size: 12.5px; } .lc-mission .row small { color: #9fb0c2; }
@keyframes lcPop { from { opacity: 0; transform: translate(-50%, 12px) scale(.92); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
.lc-learn { position: absolute; right: 10px; top: 64px; width: 340px; max-height: calc(100% - 150px); overflow: hidden; background: rgba(10,15,22,.9); border: 1px solid var(--line2); border-radius: 10px;
  padding: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 11px; pointer-events: none !important; }
.lc-learn[hidden] { display: none; } .lc-learn > * { flex-shrink: 0; }
.lc-learn .hd { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12px; } .lc-learn .rec { color: #ff4d4f; animation: lcBlink 1s steps(2, start) infinite; }
.lc-learn canvas { display: block; width: 100%; border-radius: 6px; background: #0d1218; image-rendering: pixelated; }
.lc-learn .two { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .lc-learn .two canvas { height: 92px; }
.lc-learn .lab { color: #8fa3b8; font-size: 10px; margin-bottom: 2px; } .lc-learn .lc-kv { font-size: 10.5px; color: #cfe1f2; line-height: 1.45; white-space: pre-line; font-variant-numeric: tabular-nums; }
.lc-learn .act { display: grid; grid-template-columns: 66px 1fr 34px 36px 40px; gap: 2px 5px; align-items: center; font-family: ui-monospace, Menlo, monospace; font-size: 10px; color: #cfe1f2; }
.lc-learn .act i { display: block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #2ecc71, #ffd54a 60%, #ff4d4f); }
.lc-learn .ds { border-top: 1px solid #263242; padding-top: 5px; color: #b9c7d6; font-size: 10.5px; line-height: 1.45; } .lc-learn .ds b { color: #7dffb0; }
.lc-hz { max-width: 440px; gap: 4px; } .lc-hz > b { font-size: 13.5px; color: #ffd27a; }
.lc-hz-row { display: grid; grid-template-columns: 96px 1fr; gap: 8px; font-size: 11.5px; line-height: 1.4; opacity: 0; animation: lcIn .45s forwards; padding: 2px 0; border-top: 1px solid #1f2a36; }
.lc-hz-row small { color: #9fb0c2; font-size: 11px; } .lc-hz-row.ign small { color: #ff8a80; font-weight: 600; } .lc-hz-row.ex small { color: #ffd27a; } .lc-hz-row.risk span { color: #ffb3a8; }
.lc-hz-row.rec small { color: #7dffb0; font-weight: 600; } .lc-hz-sub { font-size: 11.5px; font-weight: 600; color: #7dffb0; margin-top: 4px; opacity: 0; animation: lcIn .45s forwards; }
.lc-endtitle { position: absolute; left: 50%; top: 13%; transform: translateX(-50%); text-align: center; pointer-events: none !important; opacity: 0; animation: lcIn 1.6s 6.5s forwards;
  text-shadow: 0 2px 12px rgba(0,0,0,.8); display: flex; flex-direction: column; gap: 6px; }
.lc-endtitle b { font-size: 26px; letter-spacing: .02em; color: #fff; } .lc-endtitle small { font-size: 13px; color: #d6e2ee; }
.lc-card.lc-late { opacity: 0; animation: lcIn 1s 10s forwards; }
.lc-live { position: absolute; right: 10px; top: 64px; width: min(560px, 38%); background: rgba(8,12,18,.94); border: 1px solid #ff4d4f; border-radius: 10px; overflow: hidden;
  box-shadow: 0 0 22px rgba(255,77,79,.28); pointer-events: none !important; display: flex; flex-direction: column; }
.lc-live[hidden] { display: none; } .lc-live > * { flex-shrink: 0; }
.lc-live-h { display: flex; align-items: center; gap: 8px; padding: 5px 9px; font-size: 12px; background: #2a0c0e; } .lc-live-h small { color: #ffc7c7; } .lc-live-h .rec { color: #ff4d4f; font-weight: 700; animation: lcBlink 1s steps(2, start) infinite; }
.lc-live-f { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 5px 9px; font-size: 11px; color: #b9c7d6; } .lc-live-f .ok { color: #7dffb0; font-weight: 600; }
.lc-tune { font-size: 11px; } .lc-tune td, .lc-tune th { padding: 2px 6px; white-space: nowrap; } .lc-tune tr.on td { background: #12301f; color: #7dffb0; font-weight: 600; }
.lc-ff { align-self: flex-start; background: rgba(20,32,48,.9); border: 1px solid #38d6ff; color: #9be7ff; border-radius: 8px; padding: 3px 9px; font-size: 12px; font-weight: 600; }

/* 피지컬 AI 여정 — 머리말 한 줄(제목 · 설명 | 대상 공간 · 로봇) */
.jr-head { flex-wrap: nowrap; align-items: center; margin-bottom: 8px; gap: 12px; }
.jr-head > div:first-child { min-width: 0; flex: 1 1 auto; }
.jr-head h1 { font-size: 17px; white-space: nowrap; }
.jr-head p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
.jr-head .actions { flex-wrap: nowrap; gap: 6px; flex: 0 0 auto; margin-left: 0; }
.jr-head .actions label { white-space: nowrap; font-size: 12px; }
.jr-head .actions select, .jr-head .actions .input { width: auto; max-width: 330px; min-width: 180px; height: 30px; padding: 2px 26px 2px 8px; }
@media (max-width: 1100px) { .jr-head { flex-wrap: wrap; } .jr-head p { white-space: normal; } }

/* 페이지 머리 한 줄 — 제목 · 설명(말줄임) · 버튼을 한 줄에(상단 여백 최소화). 좁은 화면에서만 줄바꿈 */
.page-h { flex-wrap: nowrap; align-items: center; margin-bottom: 8px; gap: 12px; }
.page-h > div:first-child { min-width: 0; flex: 1 1 auto; }
.page-h > div:first-child:has(> h1) { display: flex; align-items: baseline; gap: 12px; }
.page-h h1 { font-size: 17px; white-space: nowrap; flex: 0 0 auto; }
.page-h > div:first-child > p { margin: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.page-h .actions { flex-wrap: nowrap; flex: 0 0 auto; gap: 6px; }
.page-h .actions .btn { white-space: nowrap; height: 30px; padding: 0 10px; font-size: 12.5px; }
@media (max-width: 1200px) { .page-h { flex-wrap: wrap; } .page-h > div:first-child > p { white-space: normal; } .page-h .actions { flex-wrap: wrap; } }

/* ───────── 건설 PoC: 2D 도면 뷰어 (cx_viewer.js) ───────── */
.cxv { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cxv-tools { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.cxv-sep { width: 1px; height: 20px; background: var(--line2); margin: 0 4px; }
.cxv-symsel { height: 28px; }
.cxv-view { position: relative; overflow: hidden; background: #3a4554; border: 1px solid var(--line); border-radius: 8px; touch-action: none; cursor: grab; outline: none; user-select: none; -webkit-user-select: none; }
.cxv-view:active { cursor: grabbing; }
.cxv-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; box-shadow: 0 6px 24px rgba(0,0,0,.45); background: #fff; }
.cxv-img { position: absolute; left: 0; top: 0; display: block; pointer-events: none; }
.cxv-svg { position: absolute; left: 0; top: 0; overflow: visible; }
.cxv-svg text { font-family: Helvetica, Arial, var(--sans); }
.cxv-anchor { cursor: pointer; }
.cxv-anchor.sel circle, .cxv-anchor.sel rect, .cxv-anchor.sel polygon { filter: drop-shadow(0 0 3px #00a2ff) drop-shadow(0 0 2px #00a2ff); }
.cxv-anchor.focus { animation: cxv-pulse 1.2s ease-in-out 4; }
@keyframes cxv-pulse { 50% { opacity: .25; } }
.cxv-anchor.ghost { opacity: .7; pointer-events: none; }
.cxv-ov { cursor: move; } .cxv-ov.sel { filter: drop-shadow(0 0 3px #00a2ff); }
.cxv-hit { cursor: pointer; }
.cxv-hud { position: absolute; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: 6px; background: rgba(9,13,19,.78); color: #cfe3f7; font: 12px var(--mono); pointer-events: none; }
.cxv-tip { position: absolute; padding: 3px 8px; border-radius: 6px; background: rgba(9,13,19,.9); color: #fff; font-size: 12px; pointer-events: none; white-space: nowrap; }

/* ───────── 건설 PoC 화면 (views/cx.js) ───────── */
.cx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cx-pcard { color: var(--text); } .cx-pcard:hover { text-decoration: none; border-color: var(--accent); }
.cx-roles { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.cx-search { min-width: 220px; }
.cx-chk { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; cursor: pointer; } .cx-chk.warn { color: var(--warn); }
.cx-chks { display: flex; flex-wrap: wrap; gap: 2px 6px; }
.cx-pgrow { display: flex; gap: 6px; align-items: center; margin: 6px 0; flex-wrap: wrap; } .cx-pgrow input, .cx-pgrow select { min-width: 0; }
.cx-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-bottom: 12px; }
.cx-tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.cx-tile small { color: var(--muted); display: block; } .cx-tile b { font-size: 20px; display: block; margin: 2px 0; }
.cx-tile.ok { border-color: rgba(46,204,113,.5); } .cx-tile.ok b { color: var(--ok); } .cx-tile.bad { border-color: rgba(255,90,95,.5); } .cx-tile.bad b { color: var(--bad); }
.cx-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; } .cx-2col > .card { min-width: 0; }
.cx-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.cx-side { max-height: 74vh; overflow: auto; }
.cx-alist { padding: 6px 10px; }
.cx-arow { display: flex; align-items: center; gap: 6px; padding: 4px 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; } .cx-arow:last-child { border-bottom: 0; }
.cx-arow.sel { background: var(--accent-bg); } .cx-arow.me b { color: var(--warn); }
.cx-selp .field { margin-top: 6px; }
.cx-viewer-holder { position: relative; min-width: 0; }
.cx-pop { position: absolute; right: 12px; top: 44px; z-index: 5; background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; min-width: 200px; box-shadow: var(--shadow); }
.cx-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 16px; } .cx-kv small { color: var(--muted); display: block; font-size: 11.5px; }
.cx-gallery { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-ph { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 108px; color: var(--muted); } .cx-ph img { width: 108px; height: 80px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.cx-pdfic { width: 108px; height: 80px; display: grid; place-items: center; border-radius: 6px; background: var(--panel3); font-weight: 700; }
.cx-h3 { margin: 16px 0 8px; font-size: 15px; }
.cx-preview { display: flex; flex-direction: column; gap: 12px; }
.cx-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; } .cx-pair > div { min-width: 0; }
.cx-decide { border-color: rgba(46,204,113,.35); margin-top: 12px; }
.cx-decide-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; } .cx-decide-row textarea { flex: 1; min-width: 240px; }
.cx-events { max-height: 360px; overflow: auto; } .cx-ev { padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.cx-basisbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cx-bcell { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; min-width: 170px; }
.cx-bcell small { display: block; color: var(--muted); font-size: 11px; } .cx-bcell b { font-size: 16px; } .cx-bcell.stale { border-color: var(--warn); }
.cx-new { color: var(--warn); font-weight: 600; margin-top: 2px; } .sub.ok { color: var(--ok); }
.cx-alert ul { margin: 6px 0; padding-left: 18px; } .cx-confirm { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.cx-insp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-bottom: 1px solid var(--line); } .cx-insp input[type=number] { width: 130px; }
/* 현장(모바일) 입력 */
.cx-field { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.cx-field h2 { font-size: 20px; } .cx-field label { display: block; font-weight: 600; margin: 10px 0 4px; }
.cx-field input, .cx-field textarea, .cx-field select { width: 100%; font-size: 16px; }
.cx-flist { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.cx-fitem { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); text-align: left; cursor: pointer; }
.cx-fitem.sel { border-color: var(--accent); background: var(--accent-bg); } a.cx-fitem:hover { text-decoration: none; }
.cx-ftypes { display: flex; gap: 6px; } .cx-ftypes .btn { flex: 1; padding: 12px; }
.cx-big { width: 100%; padding: 14px; font-size: 16px; margin-top: 12px; }
.cx-fbtns { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; position: sticky; bottom: 8px; }
.cx-phrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.cx-thumb { position: relative; } .cx-thumb img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; }
@media (max-width: 900px) {
  .cx-2col, .cx-pair { grid-template-columns: 1fr; }
  .cx-split { grid-template-columns: 1fr; } .cx-side { max-height: 40vh; }
}

/* 건설 PoC v2.0 — 작업함·현황조사·작업 카드·협업 */
.cx-tile.warn { border-color: rgba(245,166,35,.5); } .cx-tile.warn b { color: var(--warn); }
a.cx-tile { color: inherit; text-decoration: none; } a.cx-tile:hover { border-color: var(--accent); }
.cx-inbox { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px; align-items: start; }
.cx-ilist { display: flex; flex-direction: column; gap: 6px; }
.cx-iitem { display: block; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); text-decoration: none; background: var(--panel2); }
.cx-iitem:hover { border-color: var(--accent); } .cx-iitem.over { border-color: rgba(255,90,95,.6); background: var(--bad-bg); } .cx-iitem.read { opacity: .6; }
.cx-qbar { border: 1px dashed var(--warn); background: var(--warn-bg); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.cx-qbar.hidden { display: none; } .cx-qfail { color: var(--bad); font-size: 13px; }
.cx-shots { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.cx-shots .cx-thumb { display: flex; flex-direction: column; gap: 2px; max-width: 120px; font-size: 11px; }
.cx-thumb.bad img { outline: 2px solid var(--bad); } .cx-thumb small.bad { color: var(--bad); } .cx-thumb small.warn { color: var(--warn); }
.cx-obrow { border-top: 1px solid var(--line); padding: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.cx-obrow .cx-chk { margin: 0; display: flex; align-items: center; gap: 6px; }
.cx-obsel { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; } .cx-obsel .hidden, .cx-obin.hidden { display: none; }
.cx-obin { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px; }
tr.cx-mis td { background: rgba(245,166,35,.07); } tr.cx-unc td { background: rgba(163,148,255,.07); } tr.cx-over td { background: var(--bad-bg); }
.cx-mini img { width: 42px; height: 32px; object-fit: cover; border-radius: 4px; margin-right: 3px; vertical-align: middle; }
.cx-wohead { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 8px; }
.cx-advice { display: flex; gap: 8px; flex-wrap: wrap; }
.cx-advice .btn.ok { border-color: var(--ok); color: var(--ok); }
.cx-sug { border-color: var(--accent); } .cx-sugrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.cx-sugline { display: flex; gap: 6px; align-items: center; justify-content: space-between; margin-top: 3px; }
.cx-spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line2); border-top-color: var(--accent); border-radius: 50%; animation: cxspin 0.8s linear infinite; vertical-align: -2px; }
@keyframes cxspin { to { transform: rotate(360deg); } }
.cx-worklog { white-space: pre-wrap; font-family: var(--mono); font-size: 12.5px; padding: 10px 14px; margin: 0; background: var(--panel2); border-radius: 0 0 var(--radius) var(--radius); }
.cx-notes { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow: auto; }
.cx-note { padding: 6px 8px; border-left: 3px solid var(--line2); background: var(--panel2); border-radius: 4px; }
.cx-note.return { border-left-color: var(--bad); } .cx-note.answer, .cx-note.decision { border-left-color: var(--ok); } .cx-note.system { border-left-color: var(--accent); opacity: .85; }
.cx-fix { outline: 2px solid var(--warn); outline-offset: 3px; border-radius: 6px; }
.btn.warn { border-color: var(--warn); color: var(--warn); }
@media (max-width: 700px) { .cx-obsel { grid-template-columns: 1fr; } .cx-inbox { grid-template-columns: 1fr; } }
.cx-field input[type=checkbox], .cx-field input[type=radio] { width: auto; flex: none; }
.cx-field label.cx-chk, .cx-field .cx-chk { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin: 6px 12px 6px 0; }
.cx-field .cx-obrow > .cx-chk { margin: 0; }
.card-h select.cx-filter { width: auto; min-width: 160px; flex: none; }

/* 건설 PoC — 길 안내 · 진행 안내 · 공정 막대 · 현장 상황판(3D+2D) · AI 도면 초안 */
.cx-nav { position: sticky; top: 0; z-index: 20; margin: -4px 0 12px; background: var(--bg, #0b1017); padding: 6px 0 8px; border-bottom: 1px solid var(--line); }
.cx-nav-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cx-nav .grow { flex: 1; }
.cx-crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; flex-wrap: wrap; }
.cx-crumbs .sep { color: var(--dim); } .cx-crumbs span:last-child { font-weight: 600; }
.cx-nav-proj, .cx-nav-act { width: auto; max-width: 280px; padding: 3px 8px; font-size: 12.5px; }
.cx-acting { margin-top: 6px; padding: 6px 10px; border-radius: 8px; background: rgba(163,148,255,.14); border: 1px solid rgba(163,148,255,.5); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.cx-acting select { width: auto; padding: 2px 6px; font-size: 12.5px; }
.cx-stepper { display: flex; gap: 4px; overflow-x: auto; padding: 4px 0 10px; margin-bottom: 8px; }
.cx-step { flex: 1 0 118px; min-width: 118px; display: flex; flex-direction: column; gap: 3px; padding: 8px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); text-decoration: none; font-size: 12px; position: relative; }
.cx-step b { font-size: 15px; color: var(--text); } .cx-step.done { border-color: rgba(46,204,113,.45); } .cx-step.done b::after { content: ' ✓'; color: var(--ok); }
.cx-step.active { border-color: rgba(245,166,35,.6); color: var(--text); } .cx-step.current { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-bg); color: var(--text); }
.cx-step.mine::before { content: '내 역할'; position: absolute; right: 6px; top: 6px; font-size: 10px; color: var(--accent); }
.cx-step i { position: absolute; right: 7px; bottom: 6px; font-style: normal; background: var(--warn); color: #000; border-radius: 9px; padding: 0 6px; font-size: 11px; font-weight: 700; }
.cx-gstep { scroll-margin-top: 70px; } .cx-gstep.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); } .cx-gstep.done { opacity: .85; }
.cx-what { margin: 0 0 6px; } .cx-who { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 10px; background: var(--panel2); color: var(--text); font-size: 12px; }
.cx-gitems { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.cx-gitem { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-left: 4px solid var(--line2); border-radius: 6px; background: var(--panel2); }
.cx-gitem .grow { flex: 1; min-width: 0; } .cx-gitem.bad { border-left-color: var(--bad); } .cx-gitem.warn { border-left-color: var(--warn); }
.cx-now { font-size: 14px; } .cx-hint { font-size: 13px; }
.cx-flow { display: flex; gap: 0; margin: 0 0 12px; overflow-x: auto; }
.cx-fstep { flex: 1 0 120px; display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-top: 3px solid var(--line2); color: var(--muted); font-size: 13px; }
.cx-fstep > b { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--panel2); font-size: 12px; }
.cx-fstep small { display: block; color: var(--dim); font-size: 11.5px; }
.cx-fstep.done { border-top-color: var(--ok); color: var(--text); } .cx-fstep.done > b { background: var(--ok); color: #fff; }
.cx-fstep.current { border-top-color: var(--accent); color: var(--text); background: var(--accent-bg); } .cx-fstep.current > b { background: var(--accent); color: #fff; }
.cx-board { margin: 0 0 12px; } .cx-board-mode { display: flex; gap: 6px; align-items: center; padding: 6px 12px 0; flex-wrap: wrap; }
.cx-board-b { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 12px; }
.cx-board-b.mode-3d { grid-template-columns: 1fr; } .cx-board-b.mode-3d .cx-board-2d { display: none; }
.cx-board-b.mode-2d { grid-template-columns: 1fr; } .cx-board-b.mode-2d .cx-board-3d { display: none; }
.cx-board-cap { font-size: 11.5px; color: var(--dim); margin-top: 3px; }
.cx3d { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #0e141c; }
.cx3d canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; }
.cx3d-tip { position: absolute; z-index: 3; pointer-events: none; background: rgba(8,12,18,.92); border: 1px solid var(--line2); border-radius: 6px; padding: 6px 9px; font-size: 12px; max-width: 320px; }
.cx3d-tip.hidden { display: none; }
.cx-legend { display: flex; flex-wrap: wrap; gap: 12px; padding: 0 12px 8px; font-size: 12px; color: var(--muted); }
.cx-lg i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.cx-board-info { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 5px; }
.cx-binfo-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.cx-bflag { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-left: 4px solid; border-radius: 6px; background: var(--panel2); color: var(--text); text-decoration: none; font-size: 13px; }
.cx-bflag:hover { border-color: var(--accent); } .cx-bflag .go { color: var(--accent); white-space: nowrap; }
.cxv-mark { pointer-events: none; } .cxv-mark.pulse { animation: cxv-pulse 1.2s ease-in-out infinite; }
.cx-iitem { display: flex; align-items: center; gap: 10px; } .cx-iitem-main { flex: 1; min-width: 0; } .cx-iitem > .btn { flex: none; }
.card.cx-mine { border-color: var(--accent); }
.cx-ai { border-color: rgba(163,148,255,.55); background: linear-gradient(180deg, rgba(163,148,255,.07), transparent 60%); }
.cx-ai-b { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 14px; }
.cx-aichecks, .cx-aidrw { display: flex; flex-direction: column; gap: 6px; }
.cx-aicheck { display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: 6px; background: var(--panel2); border-left: 4px solid var(--line2); }
.cx-aicheck.ok { border-left-color: var(--ok); } .cx-aicheck.bad { border-left-color: var(--bad); }
.cx-aicheck img { width: 64px; height: 44px; object-fit: cover; border-radius: 4px; }
.cx-aid { padding: 8px 10px; border-radius: 6px; background: var(--panel2); }
@media (max-width: 900px) { .cx-board-b { grid-template-columns: 1fr; } .cx-ai-b { grid-template-columns: 1fr; } .cx-step { flex-basis: 100px; min-width: 100px; } }
.cx-acting-global { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 5px 14px; background: rgba(163,148,255,.22); border-bottom: 1px solid rgba(163,148,255,.6); font-size: 13px; }
.cx-err .cx-phrow { margin-top: 8px; }

/* ── 건설 PoC v3 — 화면 틀(왼쪽 업무 메뉴 · 화면 안내 · AI 도우미) ── */
.cx-shell { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 16px; align-items: start; }
.cx-side-wrap { position: sticky; top: 52px; }
.cx-side { display: flex; flex-direction: column; gap: 10px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); max-height: calc(100vh - 70px); overflow-y: auto; }
.cx-side-gh { font-size: 11px; color: var(--dim); padding: 2px 8px; letter-spacing: .04em; }
.cx-side-i { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; color: var(--muted); text-decoration: none; font-size: 13px; }
.cx-side-i:hover { background: rgba(255,255,255,.05); color: var(--text); }
.cx-side-i.on { background: var(--accent-bg); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.cx-side-i .ic { width: 18px; text-align: center; }
.cx-side-sel { display: none; }
.cx-main { min-width: 0; }
.cx-intro { margin-bottom: 10px; }
.cx-intro:empty { display: none; }
.cx-intro-h { display: flex; align-items: center; gap: 8px; }
.cx-intro-t { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .03em; }
.cx-intro-b { margin-top: 5px; padding: 8px 12px; border-radius: 8px; background: rgba(56,163,255,.08); border: 1px solid rgba(56,163,255,.3); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.cx-intro-todo { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); }
.cx-intro-todo b { color: var(--text); }
@media (max-width: 900px) {
  .cx-shell { grid-template-columns: 1fr; gap: 8px; }
  .cx-side-wrap { position: static; }
  .cx-side { padding: 0; border: 0; background: none; }
  .cx-side-g { display: none; }
  .cx-side-sel { display: block; width: 100%; }
}
/* AI 도우미 — 다른 편집기와 같은 오른쪽 벽 AI-assist 탭(layout.dockRight). 화면 높이 전체의 폭 0 벽에 탭·패널이 붙는다 */
.cx-aiwall { position: fixed; top: 54px; right: 0; bottom: 0; width: 0; z-index: 45; }
.cx-aiwall .ai-panel.ai-dock { bottom: 10px; }
.cx-aiwall .ai-row input { flex: 1; min-width: 0; }
.cx-shell { padding-right: 14px; }      /* 탭 자리 — 오른쪽 벽 탭이 화면 글자를 가리지 않게 */
.cx-aid-tips { display: flex; flex-direction: column; gap: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--line2); max-height: 170px; overflow-y: auto; }
.cx-aid-tips:empty { display: none; }
.cx-aid-tip { font-size: 12.5px; padding: 4px 8px; border-radius: 6px; border-left: 3px solid var(--line); background: rgba(255,255,255,.03); color: var(--text); text-decoration: none; }
.cx-aid-tip.bad { border-left-color: #ff5a5f; } .cx-aid-tip.warn { border-left-color: #f5a623; } .cx-aid-tip.info { border-left-color: #38a3ff; }
.ai-panel > .cx-aid-log { flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.cx-aid-me { align-self: flex-end; background: var(--accent-bg); padding: 6px 10px; border-radius: 10px 10px 2px 10px; font-size: 13px; max-width: 85%; }
.cx-aid-bot { background: rgba(255,255,255,.04); padding: 8px 10px; border-radius: 10px 10px 10px 2px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.cx-aid-bot.wait { color: var(--muted); }
.cx-aid-text .li { padding-left: 6px; }
.cx-aid-cards { display: flex; flex-direction: column; gap: 4px; }
.cx-aid-card { display: block; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; text-decoration: none; color: var(--text); font-size: 12.5px; }
.cx-aid-card:hover { border-color: var(--accent); }
.cx-aid-card.bad { border-left: 3px solid #ff5a5f; } .cx-aid-card.warn { border-left: 3px solid #f5a623; }
.cx-aid-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.cx-aid-chips { display: flex; flex-wrap: wrap; gap: 4px; }
/* 영향 · RFI · 물량 */
.cx-ax .card-h .grow { flex: 1; }
.cx-ax-sec { padding: 8px 0 12px; border-bottom: 1px dashed var(--line); }
.cx-ax-sec:last-child { border-bottom: 0; }
.cx-ax-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cx-imp-sum { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.tbl tr.hot td { background: rgba(245,166,35,.07); }
.tbl tr.hold td { color: var(--muted); font-style: italic; }
.cx-qty-tot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.cx-claim { padding: 6px 0; border-bottom: 1px solid var(--line); }
.cx-cites { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.cx-cite { font-size: 11.5px; padding: 1px 7px; border-radius: 10px; border: 1px solid rgba(56,163,255,.5); color: #9cc4ff; cursor: pointer; text-decoration: none; }
.cx-doc-lines { margin-top: 8px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow-y: auto; }
.cx-doc-lines .hit { background: rgba(245,166,35,.2); border-left: 3px solid #f5a623; padding-left: 6px; }
.cx-3col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .cx-3col { grid-template-columns: 1fr; } }
.cx-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.cx-thumbs a { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); text-decoration: none; }
.cx-thumbs img { width: 110px; height: 74px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.cx-board-lv { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 4px 12px; }

/* ── 건설 PoC 작업대(workbench) — 아이콘 레일 메뉴 · 도구 막대 · 3D┆도면 · 오른쪽 정보 · 아래 목록 · 상태 막대 ── */
.cx-shell { transition: grid-template-columns .18s ease; }
.cx-side-fold { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; padding: 4px 8px 8px; cursor: pointer; }
.cx-side-fold:hover { color: var(--text); }
.cx-side-i .lb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-shell.rail { grid-template-columns: 52px minmax(0, 1fr); }
.cx-shell.rail .cx-side { padding: 6px 4px; gap: 4px; }
.cx-shell.rail .cx-side-gh { font-size: 0; height: 1px; padding: 0; margin: 4px 6px; background: var(--line); }
.cx-shell.rail .cx-side-i { justify-content: center; padding: 8px 0; }
.cx-shell.rail .cx-side-i .lb { display: none; }
.cx-shell.rail .cx-side-i .ic { width: auto; font-size: 16px; }
.cx-shell.rail .cx-side-fold { text-align: center; padding: 4px 0 8px; }
.cx-shell.rail .cx-side-i:hover::after { content: attr(data-tip); position: absolute; left: 50px; background: #1b2532; border: 1px solid var(--line2); padding: 4px 8px; border-radius: 6px; font-size: 12px; white-space: nowrap; z-index: 30; color: var(--text); box-shadow: var(--shadow); }
.cx-side-i { position: relative; }
.cx-shell.ws-focus { grid-template-columns: 0 minmax(0, 1fr); gap: 0; }
.cx-shell.ws-focus .cx-side-wrap { overflow: hidden; visibility: hidden; }
.cx-main.ws { display: flex; flex-direction: column; }
.cx-main.ws > .cx-inner { flex: 1; }

.cx-ws { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0c121a; min-height: 420px; }
.cx-ws-bar { display: flex; align-items: center; gap: 8px; padding: 5px 8px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; min-height: 38px; }
.cx-ws-bar .grow { flex: 1; }
.cx-ws-title { display: flex; align-items: baseline; gap: 6px; min-width: 0; max-width: 46%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
.cx-ws-title .sub { overflow: hidden; text-overflow: ellipsis; }
.cx-ws-sep { width: 1px; height: 20px; background: var(--line); }
.cx-seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 7px; overflow: hidden; background: var(--panel2); }
.cx-tb { background: none; border: 0; color: var(--muted); font-size: 12px; padding: 4px 9px; cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; line-height: 18px; }
.cx-seg .cx-tb + .cx-tb { border-left: 1px solid var(--line2); }
.cx-tb:hover { color: var(--text); background: var(--panel3); }
.cx-tb.on { color: #fff; background: var(--accent-bg); box-shadow: inset 0 -2px 0 var(--accent); }
a.cx-tb, .cx-ws-focus { border: 1px solid var(--line2); border-radius: 7px; background: var(--panel2); }
.cx-ws-focus.on { border-color: var(--accent); }
.cx-ws-body { flex: 1; display: flex; min-height: 0; }
.cx-ws-center { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.cx-ws-views { flex: 1 1 0; min-height: 0; display: flex; }
.cx-ws-p3, .cx-ws-p2 { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; flex-grow: 0; flex-shrink: 1; }
.cx-ws-p3 > .cx3d { flex: 1; border-radius: 0; min-height: 0; }
.cx-ws-p2 > .cxv { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cx-ws-p2 .cxv-view { flex: 1; height: auto !important; min-height: 0; }
.cx-ws-cap { position: absolute; left: 8px; bottom: 6px; font-size: 11px; color: #b9c6d6; background: rgba(10,14,22,.65); padding: 2px 7px; border-radius: 5px; pointer-events: none; max-width: calc(100% - 16px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cx-ws-wait { padding: 30px; color: var(--muted); }
.cx-ws-vgut { flex: none; width: 6px; cursor: col-resize; background: var(--line); touch-action: none; }
.cx-ws-vgut:hover, body.is-resizing .cx-ws-vgut { background: var(--accent); }
.cx-ws-bgrip { flex: none; height: 6px; cursor: row-resize; background: var(--line); touch-action: none; }
.cx-ws-bgrip:hover { background: var(--accent); }
.cx-ws-bgrip.collapsed { height: 0; }
.cx-ws-bottom { flex: none; display: flex; flex-direction: column; background: var(--panel); overflow: hidden; transition: height .15s ease; }
.cx-ws-bottom.collapsed { height: 0 !important; }
.cx-ws-tabs { display: flex; align-items: center; gap: 2px; padding: 0 8px; border-bottom: 1px solid var(--line); min-height: 32px; }
.cx-ws-tabs .grow { flex: 1; }
.cx-ws-tab { background: none; border: 0; color: var(--muted); padding: 7px 10px; font-size: 12px; cursor: pointer; border-bottom: 2px solid transparent; }
.cx-ws-tab.on { color: var(--text); border-bottom-color: var(--accent); }
.cx-ws-q { width: 180px; padding: 3px 8px; font-size: 12px; }
.cx-ws-tbl { flex: 1; overflow: auto; }
.tbl.compact td { padding: 4px 8px; font-size: 12px; }
.cx-ws-tbl tr { cursor: pointer; }
.cx-ws-tbl tr:hover td { background: rgba(255,255,255,.03); }
.cx-ws-tbl tr.sel td { background: var(--accent-bg); }
.cx-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.cx-ws-rgut { width: 8px; }
.cx-ws-right { flex: none; overflow: auto; background: var(--panel); padding: 10px 12px 24px; font-size: 12.5px; transition: width .15s ease; }
.cx-ws-right.collapsed { padding: 0; overflow: hidden; }
.cx-ins-h { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.cx-ins-h .grow { flex: 1; }
.cx-ins-dot { width: 12px; height: 12px; border-radius: 50%; }
.cx-ins-name { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.cx-ins-kv { display: grid; grid-template-columns: 70px 1fr; gap: 3px 8px; margin: 0 0 8px; }
.cx-ins-kv dt { color: var(--muted); } .cx-ins-kv dd { margin: 0; }
.cx-ins-sec { padding: 8px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.cx-ins-lab { font-size: 11px; color: var(--dim); letter-spacing: .03em; margin-top: 2px; }
.cx-ins-todo { color: var(--muted); }
.cx-ins-tone { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; background: none; border: 0; color: var(--text); padding: 4px 4px; border-radius: 6px; cursor: pointer; text-align: left; font-size: 12.5px; }
.cx-ins-tone:hover { background: var(--panel3); }
.cx-ins-tone i { width: 10px; height: 10px; border-radius: 50%; }
.cx-ins-acts { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.cx-ws-status { display: flex; align-items: center; gap: 14px; padding: 3px 10px; background: #0f1620; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; min-height: 24px; }
.cx-ws-status .grow { flex: 1; }
.cx-st-tone { display: inline-flex; align-items: center; gap: 3px; margin-right: 8px; }
.cx-st-tone i { width: 8px; height: 8px; border-radius: 50%; }
@media (max-width: 900px) {
  .cx-ws-body { flex-direction: column; }
  .cx-ws-right { width: auto !important; max-height: 40vh; } .cx-ws-right.collapsed { max-height: 0; }
  .cx-ws-rgut { display: none; }
  .cx-ws-views { flex-direction: column; } .cx-ws-vgut { display: none !important; }
  .cx-ws-p3, .cx-ws-p2 { flex-basis: auto !important; flex: 1 1 0; min-height: 240px; }
}

/* ── 하위 시스템(건설 PoC 현장 화면): 시스템 공통 상단 막대 자동 숨김 — 화면 맨 위에 마우스를 대면 내려옴 ── */
.top-peek-zone { display: none; }
body.sub-sys .topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; transform: translateY(-100%); transition: transform .18s ease, box-shadow .18s ease; }
body.sub-sys.top-peek .topbar { transform: none; box-shadow: 0 8px 28px rgba(0,0,0,.5); }
body.sub-sys .top-peek-zone { display: block; position: fixed; top: 0; left: 0; right: 0; height: 6px; z-index: 59; background: linear-gradient(90deg, transparent, rgba(56,163,255,.35), transparent); }
body.sub-sys.top-peek .top-peek-zone { display: none; }
body.sub-sys .cx-acting-global { display: none; }         /* 건설 경로 막대에 같은 시연 표시가 있다 */
body.sub-sys .page { padding-top: 0; }
body.sub-sys .cx-nav { margin: 0 0 6px; padding: 5px 0 5px; }
body.sub-sys .cx-acting { margin-top: 4px; padding: 3px 10px; }
body.sub-sys .cx-side-wrap { top: 44px; }
.cx-systop { font-size: 14px; padding: 2px 8px; }
body:not(.sub-sys) .cx-systop { display: none; }
@media (hover: none), (max-width: 820px) {       /* 터치 기기는 마우스로 꺼낼 수 없으니 그대로 둔다 */
  body.sub-sys .topbar { position: sticky; transform: none; }
  body.sub-sys .top-peek-zone, .cx-systop { display: none !important; }
}

/* ── 단지·세대 투어(1인칭) — 전체 화면 ── */
.cxt { position: fixed; inset: 0; z-index: 320; background: #0b1017; display: flex; flex-direction: column; color: var(--text); }
.cxt-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cxt-bar .grow { flex: 1; }
.cxt-sel { width: auto; padding: 3px 8px; font-size: 12.5px; }
.cxt-body { flex: 1; display: flex; min-height: 0; }
.cxt-list { width: 220px; flex: none; overflow: auto; background: var(--panel); border-right: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.cxt-gh { font-size: 11px; color: var(--dim); padding: 2px 4px; letter-spacing: .03em; }
.cxt-wp { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 6px 8px; border-radius: 6px; font-size: 12.5px; cursor: pointer; }
.cxt-wp:hover { background: var(--accent-bg); }
.cxt-mid { flex: 1; position: relative; min-width: 0; }
.cxt-stage { position: absolute; inset: 0; }
.cxt-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.cxt-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: rgba(10,14,22,.72); padding: 5px 12px; border-radius: 16px; font-size: 12px; color: #d6dee8; pointer-events: none; white-space: nowrap; }
.cxt-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(11,16,23,.9); font-size: 14px; }
.cxt-info { width: 300px; flex: none; overflow: auto; background: var(--panel); border-left: 1px solid var(--line); padding: 10px 12px; font-size: 12.5px; display: flex; flex-direction: column; gap: 8px; }
.cxt-here b { display: block; font-size: 15px; margin-top: 2px; }
.cxt-sec { border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.cxt-sec small, .cxt-here small { color: var(--dim); font-size: 11px; }
.cxt-chk { display: flex; gap: 6px; align-items: flex-start; cursor: pointer; }
@media (max-width: 900px) { .cxt-list, .cxt-info { display: none; } }

/* ── 공정 타임랩스 ── */
.cxl .cxt-mid { flex: 1; }
.cxl-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--panel); border-top: 1px solid var(--line); flex-wrap: wrap; }
.cxl-prog { flex: 1; min-width: 200px; }
.cxl-chips { display: flex; gap: 2px; }
.cxl-chip { background: var(--panel2); border: 1px solid var(--line2); color: var(--muted); font-size: 12px; padding: 3px 8px; border-radius: 6px; cursor: pointer; }
.cxl-chip.on { color: #fff; border-color: var(--accent); background: var(--accent-bg); }
.cxl-chap { position: absolute; left: 18px; top: 16px; font-size: 22px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.7); pointer-events: none; }
.cxl-hud { position: absolute; right: 18px; top: 14px; width: 300px; background: rgba(10,14,22,.72); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 8px 12px; color: #e8eef6; font-size: 12.5px; pointer-events: none; display: flex; flex-direction: column; gap: 5px; }
.cxl-hud b { font-size: 18px; }
.cxl-meter { height: 6px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; } .cxl-meter i { display: block; height: 100%; background: linear-gradient(90deg, #38a3ff, #2ecc71); }
.cxl-cap { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(980px, calc(100% - 40px)); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; pointer-events: none; }
.cxl-cap > div { background: rgba(10,14,22,.8); border-radius: 10px; padding: 10px 14px; color: #eef3f8; font-size: 14px; line-height: 1.45; display: flex; flex-direction: column; gap: 3px; }
.cxl-cap small { font-size: 11px; letter-spacing: .04em; }
.cxl-pain { border-left: 4px solid #ff5a5f; } .cxl-pain small { color: #ff8a8d; }
.cxl-ax { border-left: 4px solid #2ecc71; } .cxl-ax small { color: #7ee2a8; }
.cxl-cap > div:only-child { grid-column: 1 / -1; }
.cxl-card { position: absolute; right: 18px; top: 118px; width: 320px; background: rgba(10,14,22,.82); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 10px 12px; color: #e8eef6; font-size: 13px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.cxl-card small { color: #9cc4ff; font-size: 11.5px; } .cxl-card img { width: 100%; border-radius: 6px; background: #fff; }
.cxl-tags { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.cxl-tag { position: absolute; transform: translate(-50%, -100%); background: rgba(10,14,22,.86); color: #fff; padding: 5px 10px; border-radius: 8px; font-size: 12.5px; white-space: nowrap; border-left: 4px solid #9aa7b8; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.cxl-tag.bad { border-left-color: #ff5a5f; } .cxl-tag.warn { border-left-color: #f5a623; } .cxl-tag.violet { border-left-color: #a394ff; } .cxl-tag.ok { border-left-color: #2ecc71; }
.cxl-stamp { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) rotate(-6deg); border: 5px solid #2ecc71; color: #2ecc71; background: rgba(10,20,14,.55); font-size: 30px; font-weight: 800; padding: 10px 26px; border-radius: 12px; letter-spacing: .04em; pointer-events: none; }
.cxl-title { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.cxl-title-b { background: rgba(8,12,20,.66); padding: 22px 40px; border-radius: 16px; text-align: center; color: #fff; display: flex; flex-direction: column; gap: 6px; font-size: 17px; }
.cxl-title-b b { font-size: 34px; letter-spacing: .03em; }
@media (max-width: 900px) { .cxl-cap { grid-template-columns: 1fr; } .cxl-card { display: none; } }
.cxl-svg { position: absolute; inset: 0; pointer-events: none; }
.cxl-wx { position: absolute; left: 18px; top: 56px; background: rgba(20,40,70,.8); color: #d6e8ff; padding: 6px 12px; border-radius: 8px; font-size: 13px; pointer-events: none; border-left: 4px solid #38a3ff; }
.cxl-flow { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); display: flex; gap: 4px; pointer-events: none; }
.cxl-flow span { background: rgba(10,14,22,.78); color: #8b98a8; padding: 5px 11px; border-radius: 14px; font-size: 12.5px; border: 1px solid rgba(255,255,255,.12); white-space: nowrap; }
.cxl-flow span.on { color: #7ee2a8; border-color: rgba(46,204,113,.6); }
.cxl-flow span.on::before { content: '✓ '; }
.cxl-flow span.cur { color: #fff; border-color: #f5a623; background: rgba(60,40,10,.85); }
.cxl-proof { position: absolute; inset: 0; pointer-events: none; }
.cxl-proof-l, .cxl-proof-r { position: absolute; background: rgba(10,14,22,.84); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 12px 14px; color: #e8eef6; display: flex; flex-direction: column; gap: 8px; }
.cxl-proof-l { left: 18px; top: 60px; width: min(470px, 32%); }
.cxl-proof-r { right: 18px; top: 150px; width: min(400px, 28%); }
.cxl-proof-l small { color: #9cc4ff; } .cxl-proof-l img { width: 100%; border-radius: 6px; background: #fff; }
.cxl-proof-r > b { font-size: 18px; }
.cxl-checks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.cxl-checks li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; opacity: .35; transition: opacity .4s; }
.cxl-checks li.on { opacity: 1; }
.cxl-checks li i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #5b6878; }
.cxl-checks li.on i { background: #2ecc71; border-color: #2ecc71; }
.cxl-checks li.on i::after { content: '✓'; color: #0b1a10; font-weight: 900; font-style: normal; display: block; text-align: center; line-height: 19px; }
.cxl-checks li div { display: flex; flex-direction: column; } .cxl-checks li span { font-size: 12.5px; color: #b8c4d2; }
.cxl-fade { position: absolute; inset: 0; background: #05070a; opacity: 0; pointer-events: none; }
.cx-mepleg { position: absolute; left: 14px; bottom: 54px; background: rgba(10,14,22,.84); color: #e8eef6; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 9px 12px; font-size: 12.5px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; pointer-events: none; }
.cx-mepleg > b { grid-column: 1 / -1; font-size: 13px; margin-bottom: 3px; }
.cx-mepleg i { display: inline-block; width: 18px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.cx-mepleg div.dim { opacity: .3; }
.cx3d-mep { position: absolute; right: 10px; top: 10px; z-index: 3; }
.cxl .cx-mepleg { bottom: 118px; left: 18px; z-index: 4; }
.cx-mepleg div { transition: opacity .3s; }
/* 설비·전기 배관 화면 */
.cx-mep-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.cx-mep-chips { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.cx-mep-chip { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 14px; padding: 3px 9px; font-size: 12px; cursor: pointer; }
.cx-mep-chip.on { color: var(--text); border-color: var(--text); }
.cx-mep-chip i, .cx-mep-dh i, .cx-mep-sum .sw, .tbl .sw { display: inline-block; width: 16px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.cx-mep-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; }
.cx-mep-dwg { background: #fff; border-radius: 8px; overflow: auto; max-height: 74vh; border: 1px solid var(--line); }
.cx-mep-inner { position: relative; width: 100%; }
.cx-mep-inner img { display: block; width: 100%; user-select: none; }
.cx-mep-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cx-mep-svg .seg { fill: none; stroke-width: 2.2; vector-effect: non-scaling-stroke; cursor: pointer; }
.cx-mep-svg .seg.coil { stroke-width: 1.1; opacity: .85; }
.cx-mep-svg rect.seg, .cx-mep-svg circle.seg { stroke-width: 1.5; }
.cx-mep-svg circle.seg.dot { fill-opacity: .9; }
.cx-mep-svg .seg:hover { stroke-width: 4; }
.cx-mep-svg .seg.sel { stroke-width: 5; filter: drop-shadow(0 0 2px #000); }
.cx-mep-svg .seg.moved { stroke-width: 3.2; }
.cx-mep-svg .ghost { fill: none; stroke: #9aa3ad; stroke-width: 2; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.cx-mep-detail { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 13px; align-self: start; display: flex; flex-direction: column; gap: 8px; }
.cx-mep-dh { font-size: 15px; }
.cx-kv { width: 100%; border-collapse: collapse; } .cx-kv th { text-align: left; color: var(--muted); font-weight: 500; width: 90px; padding: 3px 6px 3px 0; vertical-align: top; } .cx-kv td { padding: 3px 0; }
.cx-mep-sec { border-top: 1px solid var(--line); padding-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.cx-mep-acts { display: flex; flex-direction: column; gap: 6px; }
.cx-mep-act { padding: 6px 8px; border-left: 3px solid var(--line); } .cx-mep-act.done { border-color: #2ecc71; } .cx-mep-act.started { border-color: #38a3ff; }
@media (max-width: 1100px) { .cx-mep-grid { grid-template-columns: 1fr; } }
.cx-mep-sum td, .cx-mep-sum th { padding: 5px 10px; }

/* ───────── 물류센터 트윈(#/logi) ───────── */
.lgx-path { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 2px 12px; font-size: 13px; } .lgx-path .sep { color: var(--dim); } .lgx-path .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.lgx-clock { font: 600 12px var(--mono); color: #9fe8d2; background: rgba(56, 224, 176, .1); border: 1px solid rgba(56, 224, 176, .3); padding: 2px 8px; border-radius: 6px; }
.lgx-shell { display: grid; grid-template-columns: 214px minmax(0, 1fr); gap: 16px; align-items: start; }
.lgx-side { position: sticky; top: 52px; display: flex; flex-direction: column; gap: 4px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.lgx-ctr { padding: 4px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; } .lgx-ctr b { display: block; } .lgx-ctr small { color: var(--muted); font-size: 11.5px; }
.lgx-nav { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; color: var(--text); } .lgx-nav:hover { background: var(--panel2); text-decoration: none; }
.lgx-nav.cur { background: var(--accent-bg); box-shadow: inset 3px 0 0 var(--accent); } .lgx-nav .ic { width: 18px; color: var(--accent); text-align: center; } .lgx-nav small { display: block; color: var(--muted); font-size: 11px; }
.lgx-sep { height: 1px; background: var(--line); margin: 6px 0; }
.lgx-flow { margin-top: 8px; padding: 8px 10px; font-size: 11.5px; color: var(--muted); border-top: 1px dashed var(--line); } .lgx-flow b { color: var(--text); font-size: 12px; display: block; margin-bottom: 4px; }
.lgx-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.lgx-hero { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; padding: 18px 20px; border-radius: 12px; background: linear-gradient(120deg, rgba(47, 124, 110, .25), rgba(56, 163, 255, .08)); border: 1px solid var(--line); margin-bottom: 16px; }
.lgx-hero p { max-width: 760px; margin: 6px 0 0; }
.lgx-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .lgx-head h2 { font-size: 19px; } .lgx-head .id { font: 700 13px var(--mono); color: #9fe8d2; }
.lgx-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.lgx-slider { width: 260px; accent-color: #38e0b0; } .lgx-at { font-size: 15px; min-width: 46px; }
.chip.on { background: var(--accent-bg); color: var(--accent); border-color: rgba(56, 163, 255, .45); }
.lgx-mode { font-size: 12px; font-weight: 650; padding: 3px 10px; border-radius: 20px; } .lgx-mode.live { color: #62e29b; background: var(--ok-bg); } .lgx-mode.replay { color: var(--warn); background: var(--warn-bg); } .lgx-mode.sim { color: var(--violet); background: var(--violet-bg); }
.lgx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; } .lgx-kpis .kpi .val { font-size: 24px; } .lgx-kpis .kpi .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lgx-split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(340px, 1fr); gap: 14px; align-items: start; }
.lgx-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.lgx-mapcard { overflow: hidden; } .lgx-planbox { padding: 6px; }
.lgx-plan { width: 100%; height: auto; max-height: 66vh; display: block; background: #0d141d; border-radius: 8px; }
.lgx-floor { fill: #10171f; } .lgx-zone { fill: rgba(80, 100, 120, .08); stroke: #2a3a4d; stroke-width: 120; } .lgx-zone.focus { fill: rgba(56, 224, 176, .05); stroke: #2f8f78; stroke-width: 180; }
.lgx-zone.gap { fill: rgba(255, 90, 95, .16); stroke: #ff5a5f; stroke-dasharray: 800 400; }
.lgx-zlbl { fill: #7f93a8; font: 600 900px var(--sans); } .lgx-albl { fill: #9fe8d2; font: 700 1100px var(--mono); } .lgx-stlbl { fill: #c9d4e0; font: 600 900px var(--mono); } .lgx-dklbl { fill: #7f93a8; font: 600 650px var(--mono); }
.lgx-rsv { fill: #2b3542; stroke: #3b4a5c; stroke-width: 60; }
.lgx-cell { stroke: #0c1219; stroke-width: 60; cursor: pointer; transition: fill .25s; } .lgx-cell:hover { stroke: #fff; stroke-width: 120; }
.lgx-cell.sel { stroke: #fff; stroke-width: 200; } .lgx-cell.locked { stroke: #f5a623; stroke-width: 160; stroke-dasharray: 260 160; } .lgx-cell.unmapped { stroke: #ff5a5f; stroke-width: 160; } .lgx-cell.dim { opacity: .28; }
.lgx-aline { stroke: #2c3e55; stroke-width: 120; stroke-dasharray: 600 500; } .lgx-aisle.blocked .lgx-aline { stroke: #ff5a5f; stroke-width: 900; stroke-dasharray: none; opacity: .55; }
.lgx-arrow { fill: none; stroke: #ffd36a; stroke-width: 260; stroke-linejoin: round; } .lgx-cross { stroke: #233243; stroke-width: 900; opacity: .5; }
.lgx-conv { fill: none; stroke: #6c7a8a; stroke-width: 700; stroke-linejoin: round; } .lgx-st { fill: #c9d1da; stroke: #8b98a6; stroke-width: 80; } .lgx-st.down { fill: #ff5a5f; }
.lgx-dock { fill: #3b6f9e; } .lgx-dock.outbound { fill: #6b4f8f; } .lgx-depot { fill: #38a3ff; stroke: #fff; stroke-width: 120; }
.lgx-move { stroke: #ffc24a; stroke-width: 220; opacity: .9; } .lgx-move.DONE { stroke: #2ecc71; } .lgx-ahp { fill: #ffc24a; }
.lgx-trail { fill: none; stroke: rgba(255, 224, 138, .35); stroke-width: 160; }
.lgx-picker circle { fill: #ffe08a; stroke: #1a1a1a; stroke-width: 150; } .lgx-picker text { font: 700 750px var(--mono); fill: #1a1a1a; }
.lgx-legend { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); } .lgx-legend i { width: 12px; height: 10px; border-radius: 2px; display: inline-block; }
.lgx-legend .lo { background: rgb(32, 110, 170); } .lgx-legend .hi { background: rgb(255, 90, 70); } .lgx-legend .gap { background: rgba(255, 90, 95, .4); border: 1px dashed #ff5a5f; }
.lgx-3d { height: 560px; position: relative; } .lgx-3d canvas { width: 100% !important; height: 100% !important; display: block; }
.lgx-waves { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px; }
.lgx-wave { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; color: var(--text); }
.lgx-wave b { font: 700 16px var(--mono); } .lgx-wave small { color: var(--ok); font-weight: 650; } .lgx-wave.late { border-color: rgba(255, 90, 95, .55); background: var(--bad-bg); } .lgx-wave.late small { color: var(--bad); }
.lgx-wave.open { border-style: dashed; } .lgx-wave.open small { color: var(--warn); }
.lgx-bars { width: 100%; height: auto; display: block; } .lgx-ax { fill: #6f8197; font: 9px var(--mono); } .lgx-ref { stroke: #f5a623; stroke-dasharray: 3 3; } .lgx-band { fill: rgba(46, 204, 113, .12); }
.lgx-detail:empty { display: none; }
.lgx-cols { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 18px; } .lgx-cols h4 { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }
.lgx-barrow { display: grid; grid-template-columns: 38px 1fr auto; gap: 8px; align-items: center; margin: 4px 0; font-size: 12px; } .lgx-barrow i { height: 10px; border-radius: 3px; background: linear-gradient(90deg, #ff8a5c, #ff5a5f); max-width: 100%; }
.lgx-ev { display: grid; grid-template-columns: auto 64px 1fr auto; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.lgx-next { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(56, 163, 255, .35); background: rgba(56, 163, 255, .07); } .lgx-next > b { color: var(--accent); }
.lgx-steps { margin: 4px 0 2px; }
.lgx-err ul { margin: 6px 0 0; padding-left: 18px; } .lgx-viol { margin: 6px 0 0; padding-left: 4px; list-style: none; } .lgx-viol li { margin: 5px 0; } .lgx-viol .fix { color: #ffd36a; font-size: 12.5px; margin-left: 4px; }
.lgx-pick { padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; min-height: 48px; }
.lgx-crit { margin-top: 12px; font-size: 12.5px; } .lgx-crit ul { margin: 6px 0; padding-left: 18px; color: #c8d3e0; }
.lgx-repro { white-space: pre-wrap; font-size: 11.5px; color: #b9c7d8; background: var(--bg2); border-radius: 8px; padding: 10px 12px; margin: 0 0 8px; }
.lgx-fcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; } .lgx-fcard.wait { opacity: .7; }
.lgx-ft { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; } .lgx-ft > div { display: flex; flex-direction: column; } .lgx-ft b { font-size: 18px; } .lgx-ft small { color: var(--muted); font-size: 11px; } .lgx-ft .arrow { font-size: 24px; color: var(--warn); }
.lgx-fcard input { font-family: var(--mono); }
.lgx-badv { color: var(--bad); font-weight: 700; }
@media (max-width: 1100px) { .lgx-shell { grid-template-columns: 1fr; } .lgx-side { position: static; } .lgx-split { grid-template-columns: 1fr; } .lgx-cols { grid-template-columns: 1fr; } .lgx-waves { grid-template-columns: repeat(2, 1fr); } }
.lgx-busy { display: flex; align-items: center; gap: 8px; } .lgx-busy .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(56, 163, 255, .3); border-top-color: var(--accent); animation: lgxspin .8s linear infinite; }
@keyframes lgxspin { to { transform: rotate(360deg); } }

/* ───────── 하자·민원 → 설계 환류 · 표준 설계 ───────── */
.cxd-flow { display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.cxd-flow > div { flex: 1; min-width: 110px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel); display: flex; flex-direction: column; gap: 2px; }
.cxd-flow .ic { font-size: 17px; } .cxd-flow b { font-size: 12.5px; } .cxd-flow small { color: var(--muted); font: 600 12px var(--mono); } .cxd-flow .arr { align-self: center; color: var(--dim); }
.cxd-bar { margin-bottom: 12px; }
.cxd-split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(340px, 1fr); gap: 14px; align-items: start; margin-bottom: 14px; }
.cxd-plan { padding: 8px; } .cxd-svg { width: 100%; height: auto; display: block; background: #0d141d; border-radius: 8px; }
.cxd-room { fill: rgba(120, 140, 160, .05); stroke: #3a4b60; stroke-width: 40; } .cxd-room.shaft { fill: rgba(120, 140, 160, .16); }
.cxd-rlbl { fill: #7f93a8; font: 600 300px var(--sans); } .cxd-ulbl { fill: #9fb3c8; font: 700 380px var(--sans); }
.cxd-line { fill: none; stroke-width: 34; opacity: .35; }
.cxd-pin { cursor: pointer; } .cxd-pin circle { fill: #f5a623; stroke: #10161f; stroke-width: 60; } .cxd-pin text { font: 700 230px var(--mono); fill: #10161f; }
.cxd-pin.design circle { fill: #ff5a5f; } .cxd-pin.done circle { opacity: .55; } .cxd-pin.sel circle { stroke: #fff; stroke-width: 90; }
.cxd-leg { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding: 8px 4px 2px; } .cxd-leg i.p { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #f5a623; margin-right: 5px; }
.cxd-leg i.p.design { background: #ff5a5f; } .cxd-leg i.p.done { opacity: .55; }
.cxd-detail { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; } .cxd-detail h3 { font-size: 15px; } .cxd-dh { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cxd-steps { margin: 4px 0; } .cxd-note { font-size: 13px; padding: 7px 10px; border-radius: 8px; background: var(--bg2); } .cxd-note small { display: block; color: var(--muted); font-size: 11px; }
.cxd-lesson { padding: 10px 12px; border-radius: 9px; border: 1px solid rgba(255, 90, 95, .4); background: var(--bad-bg); display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.cxd-lesson.ok { border-color: rgba(46, 204, 113, .45); background: var(--ok-bg); } .cxd-lesson small { color: var(--muted); font-size: 11px; }
.cxd-hist { font-size: 12px; color: var(--muted); } .cxd-hist div { padding: 2px 0; }
.cxd-lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; padding: 12px; }
.cxd-lcard { border: 1px solid var(--line2); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 5px; background: var(--panel2); }
.cxd-lcard.ok { box-shadow: inset 3px 0 0 var(--ok); } .cxd-lcard.pend { box-shadow: inset 3px 0 0 var(--warn); } .cxd-lt { font-weight: 650; } .cxd-lcard .sub { font-size: 12px; color: var(--muted); }
.cxd-chips { display: flex; gap: 4px; flex-wrap: wrap; } .cxd-pick { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow: auto; font-size: 13px; }
.cxs-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; } .cxs-head h2 { font-size: 19px; }
.cxs-2d { padding: 8px; } .cxs-svg { width: 100%; height: auto; max-height: 70vh; display: block; background: #0d141d; border-radius: 8px; }
.cxs-line { fill: none; stroke-width: 28; opacity: .8; } .cxs-line.coil { stroke-width: 14; opacity: .45; } .cxs-line.chg { stroke-width: 70; opacity: 1; filter: drop-shadow(0 0 60px #39ff9c); }
.cxs-ghost { fill: none; stroke: #ff4d4d; stroke-width: 46; stroke-dasharray: 160 110; opacity: .85; } .cxs-eq { fill: rgba(200, 210, 220, .25); stroke: #8b98a6; stroke-width: 20; }
.cxs-cloud { fill: none; stroke: #ffd36a; stroke-width: 55; stroke-dasharray: 60 50; } .cxs-ctag { fill: #ffd36a; font: 700 300px var(--mono); }
.cxs-3d { height: 520px; } .cxs-3d canvas { width: 100% !important; height: 100% !important; display: block; }
@media (max-width: 1100px) { .cxd-split { grid-template-columns: 1fr; } }
.cxl-mini { width: 100%; max-width: 250px; display: block; margin: 6px 0; background: #f4f6f8; border-radius: 6px; }

/* ───────── 물류센터 — 실물 3D 트윈 · 종합상황보드 · 개인 HMI ───────── */
.lgo-ov { position: fixed; inset: 0; z-index: 60; background: #0b1119; }
.lgo-stage { position: absolute; inset: 0; } .lgo-stage canvas { width: 100% !important; height: 100% !important; display: block; }
.lgo-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: #cfe0f2; font-size: 15px; background: rgba(8, 14, 22, .85); }
.lgo-loading .spin, .lgo-ov .spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(56, 163, 255, .3); border-top-color: #38a3ff; animation: lgxspin .8s linear infinite; }
.lgo-bar { position: absolute; left: 12px; right: 12px; top: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px; background: rgba(10, 18, 28, .82); border: 1px solid #22344a; backdrop-filter: blur(6px); }
.lgo-mode { font-size: 12px; font-weight: 650; color: #62e29b; }
.lgo-views { position: absolute; left: 12px; top: 70px; display: flex; flex-direction: column; gap: 3px; padding: 10px; border-radius: 10px; background: rgba(10, 18, 28, .78); border: 1px solid #22344a; max-height: calc(100vh - 90px); overflow: auto; }
.lgo-views b { font-size: 11.5px; color: #8fa6bd; } .lgo-views .btn { justify-content: flex-start; color: #dfeaf6; } .lgo-views label { font-size: 12px; color: #cfe0f2; }
.lgo-panel { position: absolute; right: 12px; top: 70px; width: 340px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 90px); overflow: auto; }
.lgo-card { padding: 10px 12px; border-radius: 10px; background: rgba(10, 18, 28, .84); border: 1px solid #22344a; color: #dfeaf6; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.lgo-al { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 4px 0; border-top: 1px dashed #22344a; cursor: pointer; } .lgo-al:hover { background: rgba(56, 163, 255, .08); }
.lgo-kpis { display: grid; grid-template-columns: 1fr 1fr; } .lgo-kpis div { display: flex; flex-direction: column; } .lgo-kpis small { color: #8fa6bd; } .lgo-kpis b { font-size: 20px; }
.lgo-cmds { gap: 4px; } .lgo-tc { gap: 6px; } .lgo-slider { width: 220px; accent-color: #38e0b0; } .lgo-time { font-size: 15px; min-width: 46px; }
.lgo-kgrid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; margin: 10px 0; } .lgo-k .val { font-size: 22px; } .lgo-k.bad { --kc: var(--bad); } .lgo-k.ok { --kc: var(--ok); } .lgo-k.info { --kc: var(--accent); }
.lgo-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); gap: 12px; margin-bottom: 12px; align-items: start; }
.lgo-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.lgo-map { width: 100%; height: auto; display: block; background: #0d141d; }
.lgo-bld { fill: #121b26; stroke: #3a4b60; stroke-width: 300; } .lgo-zone { fill: rgba(120, 150, 180, .06); stroke: #2c4560; stroke-width: 140; } .lgo-zl { fill: #6f86a0; font: 600 1200px var(--sans); }
.lgo-rack { fill: rgba(232, 112, 30, .18); stroke: #b8601e; stroke-width: 80; } .lgo-pod { fill: #6b5a1e; } .lgo-conv { fill: none; stroke: #8fa0b2; stroke-width: 500; stroke-linejoin: round; } .lgo-conv.srt { stroke: #3fae6a; stroke-width: 900; }
.lgo-truck { fill: #d7dde3; stroke: #1f5fae; stroke-width: 200; } .lgo-truck.approach { opacity: .5; stroke-dasharray: 600 400; }
.lgo-eq { cursor: pointer; } .lgo-eq circle { stroke: #0b1119; stroke-width: 200; } .lgo-eq.sel circle:first-child { stroke: #fff; stroke-width: 400; }
.lgo-ring { fill: none; stroke: #ff3b30; stroke-width: 250; animation: lgoPulse 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes lgoPulse { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.lgo-selbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border-top: 1px solid var(--line); }
.lgo-alist { max-height: 520px; overflow: auto; } .lgo-arow { padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; display: flex; flex-direction: column; gap: 3px; opacity: .65; } .lgo-arow.on { opacity: 1; background: rgba(255, 90, 95, .06); }
.lgo-gantt { width: 100%; height: auto; } .lgo-gt { fill: #8fa6bd; font: 11px var(--mono); } .lgo-gb { fill: #3a4d63; } .lgo-gb.docked { fill: #38a3ff; } .lgo-gb.approach { fill: #f5a623; } .lgo-gb.departed { fill: #2c3a4a; } .lgo-now { stroke: #ff5a5f; stroke-width: 2; }
.lgo-groups { display: flex; flex-direction: column; gap: 10px; } .lgo-dots { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0; }
.lgo-dot { font: 600 11px var(--mono); padding: 2px 6px; border-radius: 5px; background: var(--panel3); cursor: pointer; border-left: 4px solid #8b9aad; }
.lgo-dot.RUN { border-color: #2ecc71; } .lgo-dot.ALARM, .lgo-dot.STOP { border-color: #ff3b30; background: var(--bad-bg); } .lgo-dot.WARN { border-color: #f5a623; } .lgo-dot.CHARGE, .lgo-dot.OCCUPIED { border-color: #38a3ff; }
.lgo-hmis { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; } .lgo-hmic { padding: 14px; display: flex; flex-direction: column; gap: 6px; color: var(--text); } .lgo-hmic:hover { border-color: var(--accent); text-decoration: none; } .lgo-hmic.ro { opacity: .7; }
.lgo-mimc { margin-bottom: 12px; } .lgo-mimic { width: 100%; height: auto; display: block; background: #0a1420; }
.lgo-mt { fill: #dfeaf6; font: 700 15px var(--mono); } .lgo-ms { fill: #9fb3c8; font: 600 13px var(--mono); } .lgo-ml { fill: none; stroke: #5b7a99; stroke-width: 8; stroke-linejoin: round; } .lgo-ml.srt { stroke: #3fae6a; stroke-width: 14; }
.lgo-mn.al rect { animation: lgoPulse 1s infinite; } .lgo-rackm { fill: rgba(232, 112, 30, .12); stroke: #b8601e; stroke-width: 2; }
.lgo-xr { display: grid; grid-template-columns: 420px 1fr; gap: 12px; align-items: start; } .lgo-xcv { border-radius: 8px; width: 100%; }
@media (max-width: 1300px) { .lgo-kgrid { grid-template-columns: repeat(4, 1fr); } .lgo-grid, .lgo-grid3 { grid-template-columns: 1fr; } .lgo-xr { grid-template-columns: 1fr; } }
/* 물류 PoC — 시스템 메뉴를 숨긴 화면(sub-sys): 위 여백을 줄여 본 화면을 크게 */
body.sub-sys .lgx-path { padding: 4px 2px 6px; min-height: 30px; }
body.sub-sys .lgx-side { top: 6px; max-height: calc(100vh - 12px); overflow-y: auto; }
body.sub-sys .lgx-main { gap: 10px; }
body.sub-sys .lgx-hero { padding: 12px 16px; margin-bottom: 10px; }
body.sub-sys .lgx-kpis .kpi { padding: 10px 14px 8px; } body.sub-sys .lgx-kpis .kpi .val { font-size: 21px; margin: 2px 0 0; }
body.sub-sys .lgx-bar { padding: 5px 10px; }
body.sub-sys .lgo-kgrid { margin: 4px 0 8px; } body.sub-sys .lgo-k { padding: 10px 14px 8px; } body.sub-sys .lgo-k .val { font-size: 20px; margin: 2px 0 0; }
/* 물류 작업 흐름 카드 */
.lgo-fl { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; font-size: 12.5px; margin: 5px 0; }
.lgo-fl > span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lgo-fl > b { white-space: nowrap; font-weight: 600; } .lgo-fl > .lgo-pb { grid-column: 1 / -1; order: 9; }
.lgo-pb { height: 6px; background: rgba(255,255,255,.08); border-radius: 4px; overflow: hidden; } .lgo-pb i { display: block; height: 100%; background: #38a3ff; }
.lgo-acts { max-height: 120px; overflow: auto; font-size: 12px; margin-top: 4px; } .lgo-acts.wide { max-height: none; columns: 2; }
/* 바이오리액터 3시스템 통합 투어(타임랩스) — btr- */
.btr-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #070d16; margin: 8px 0 10px; }
.btr-screen { position: relative; height: clamp(420px, calc(100vh - 330px), 760px); }
.btr-stage { position: absolute; inset: 0; overflow: hidden; display: flex; align-items: stretch; }
.btr-stage > * { flex: 1; }
.btr-cap { background: #0b1626; border-top: 1px solid #22364d; padding: 10px 16px; min-height: 92px; }
.btr-cap-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .btr-cap-h b { font-size: 17px; }
.btr-n { font: 12px var(--mono, monospace); color: var(--dim); } .btr-sys { color: #06101c; font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 99px; }
.btr-note { margin: 6px 0 4px; font-size: 14px; } .btr-ev { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.btr-chip { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); }
.btr-chip.ok { color: #2ecc71; border-color: #1e6b41; } .btr-chip.bad { color: #ff6b6b; border-color: #7a2a2a; } .btr-chip.warn { color: #f5a623; border-color: #7a5a1a; } .btr-chip.dim { color: var(--dim); } .btr-chip.mono { font-family: var(--mono, monospace); }
.btr-ctl { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); background: #0b1422; } .btr-seek { flex: 1; }
.btr-rail { display: grid; grid-template-columns: repeat(13, 1fr); gap: 3px; padding: 6px; background: #0b1422; }
.btr-ch { border: 1px solid var(--line); border-top: 3px solid; background: #0f1b2b; color: var(--fg); font-size: 11px; padding: 4px 3px; border-radius: 4px; text-align: left; cursor: pointer; min-height: 44px; line-height: 1.25; }
.btr-ch small { display: block; color: var(--dim); } .btr-ch.on { background: #16304d; outline: 1px solid #38a3ff; } .btr-ch.ok::after { content: ' ●'; color: #2ecc71; } .btr-ch.bad::after { content: ' ●'; color: #ff5a5f; } .btr-ch.warn::after { content: ' ●'; color: #f5a623; }
.btr-shot { position: relative; overflow: hidden; background: #05090f; } .btr-shot img { width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 40%; transition: transform .2s linear; }
.btr-src { position: absolute; right: 8px; top: 8px; font-size: 11px; background: rgba(0,0,0,.6); padding: 2px 8px; border-radius: 6px; }
.btr-split { display: grid; grid-template-columns: 1.25fr 1fr; }
.btr-pan { padding: 20px 26px 22px; overflow: auto; display: flex; flex-direction: column; gap: 12px; } .btr-pan.two { display: grid; grid-template-columns: 1fr 1fr; align-content: start; }
.btr-thumb { max-height: 46%; max-width: 46%; object-fit: contain; align-self: center; background: radial-gradient(#1b2a3c, transparent 70%); border-radius: 10px; }
.btr-spec td:first-child { color: var(--dim); white-space: nowrap; } .btr-list { margin: 0; padding-left: 18px; font-size: 13px; } .btr-list.wide { grid-column: 1 / -1; }
.btr-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .btr-chart b { font-size: 13px; } .btr-svg { width: 100%; } .btr-ax { fill: #7f93a8; font-size: 11px; }
.btr-leg { display: flex; gap: 10px; font-size: 12px; } .btr-leg i { display: inline-block; width: 12px; height: 3px; margin-right: 4px; vertical-align: middle; }
.btr-est { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; } .btr-est > div { background: #0f1b2b; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.btr-est small { display: block; color: var(--dim); font-size: 11.5px; } .btr-est b { font-size: 20px; } .btr-est em { font-style: normal; font-size: 12px; } .btr-est em.up { color: #2ecc71; } .btr-est em.down { color: #ff6b6b; }
.btr-gate { align-items: center; justify-content: center; text-align: center; } .btr-big { font-size: 54px; font-weight: 800; letter-spacing: -1px; }
.btr-gbar { position: relative; width: min(560px, 90%); height: 14px; background: #13233a; border-radius: 8px; } .btr-gbar i { display: block; height: 100%; border-radius: 8px; transition: width .3s; }
.btr-gbar b { position: absolute; top: -18px; font-size: 11px; color: var(--dim); border-left: 2px solid #f5a623; padding-left: 4px; height: 32px; }
.btr-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--dim); }
.btr-demo { font-size: 12px; margin: 4px 0 8px; } .btr-work .btr-act { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .btr-work .btr-act input { font-size: 12px; }
.btr-3d { position: relative; min-height: 300px; flex: 1 1 300px; border-radius: 10px; background: radial-gradient(ellipse at 50% 40%, #1d2d42, #070d16 75%); }
.btr-3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; } .btr-3d-lab { position: absolute; left: 0; right: 0; top: 8px; display: flex; justify-content: space-around; font-size: 13px; font-weight: 700; pointer-events: none; }
.btr-full { grid-column: 1 / -1; display: flex; min-height: 320px; }
.btr-title { font-size: 26px; font-weight: 800; } .btr-intro { gap: 16px; }
.btr-flow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; width: min(1100px, 96%); }
.btr-step { border: 1px solid; border-left-width: 4px; border-radius: 8px; padding: 8px 10px; text-align: left; font-weight: 700; font-size: 14px; background: #0f1b2b; transition: opacity .3s; } .btr-step small { display: block; font-weight: 500; color: var(--dim); font-size: 11px; }
.btr-legend { display: flex; gap: 18px; font-size: 13px; } .btr-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.btr-sum td { padding: 9px 12px; font-size: 15px; } .btr-sum td:first-child { color: var(--dim); white-space: nowrap; width: 170px; }
.btr-gates { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; } .btr-g { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #0f1b2b; display: flex; flex-direction: column; gap: 2px; }
.btr-g b { font-size: 18px; } .btr-g.on { border-color: #f5a623; background: rgba(245, 166, 35, .12); } .btr-ebom { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.btr-charts.one { grid-template-columns: minmax(0, 560px); justify-content: center; width: 100%; }
.btr-cmp { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: center; } .btr-cmp-r { display: flex; flex-direction: column; gap: 12px; } .btr-cmp-r .btr-big { font-size: 46px; }
.btr-cmp-r .btr-est { grid-template-columns: 1fr 1fr; }
/* 바이오리액터 통합 투어 — 모바일(폭 760 px 이하): 한 줄 흐름 · 그림 위 · 설명 아래 · 장 띠 가로 스크롤 · 조작 아래 고정 */
@media (max-width: 760px) {
  .btr-kiosk.page, body.public-tour #app { padding: 0 0 92px; }
  .btr-kiosk .lgx-head { padding: 10px 12px 6px; gap: 6px; flex-wrap: wrap; }
  .btr-kiosk .lgx-head h2, .btr-head h2 { font-size: 17px; margin: 0; }
  .btr-kiosk .lgx-head .muted { font-size: 12px; width: 100%; order: 3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .btr-kiosk .lgx-head .btr-chip { font-size: 10.5px; padding: 1px 6px; }
  .btr-kiosk .lgx-head .grow { display: none; }
  .btr-wrap { border-radius: 0; border-left: 0; border-right: 0; margin: 4px 0; display: flex; flex-direction: column; }
  .btr-screen { height: auto; min-height: 0; order: 2; }
  .btr-stage { position: relative; inset: auto; display: block; }
  .btr-stage > * { min-height: 0; }
  .btr-cap { order: 1; min-height: 0; padding: 8px 12px; }
  .btr-cap-h b { font-size: 15px; } .btr-note { font-size: 13px; margin: 4px 0 2px; } .btr-ev { gap: 4px; } .btr-ev .btr-chip { font-size: 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .btr-split { display: flex; flex-direction: column; }
  .btr-shot { aspect-ratio: 16 / 9; width: 100%; } .btr-shot img { transform: none !important; cursor: zoom-in; }
  .btr-shot::after { content: '눌러서 크게 보기'; position: absolute; right: 8px; bottom: 8px; font-size: 11px; background: rgba(0,0,0,.65); padding: 2px 8px; border-radius: 6px; color: #dfe9f5; }
  .btr-src { left: 8px; right: 8px; top: 6px; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .btr-pan { padding: 12px; gap: 10px; overflow: visible; }
  .btr-pan.two, .btr-cmp, .btr-charts, .btr-charts.one { display: flex; flex-direction: column; gap: 10px; }
  .btr-full, .btr-3d { min-height: 240px; height: 240px; flex: none; }
  .btr-title { font-size: 19px; line-height: 1.3; } .btr-big { font-size: 34px; } .btr-cmp-r .btr-big { font-size: 30px; }
  .btr-gate { align-items: stretch; text-align: left; }
  .btr-flow { grid-template-columns: 1fr 1fr; width: 100%; gap: 6px; } .btr-step { font-size: 13px; padding: 6px 8px; }
  .btr-legend { flex-direction: column; gap: 4px; font-size: 12px; }
  .btr-est { grid-template-columns: 1fr 1fr; gap: 6px; } .btr-est b { font-size: 16px; } .btr-est > div { padding: 6px 8px; }
  .btr-gates { grid-template-columns: repeat(3, 1fr); gap: 6px; } .btr-g { padding: 6px; } .btr-g b { font-size: 15px; } .btr-g small { font-size: 10.5px; }
  .btr-gbar { width: 100%; }
  .btr-spec td { padding: 4px 6px; font-size: 12.5px; } .btr-list { font-size: 12.5px; padding-left: 16px; }
  .btr-sum, .btr-sum tbody, .btr-sum tr, .btr-sum td { display: block; width: auto !important; } .btr-sum tr { padding: 6px 0; border-bottom: 1px solid var(--line); } .btr-sum td { padding: 2px 4px; font-size: 13.5px; }
  .btr-rail { order: 3; display: flex !important; overflow-x: auto; gap: 6px; padding: 6px 8px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
  .btr-ch { flex: 0 0 auto; min-height: 0; max-width: 132px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; scroll-snap-align: center; padding: 5px 8px; }
  .btr-ctl { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); gap: 6px; flex-wrap: wrap; box-shadow: 0 -6px 18px rgba(0,0,0,.45); }
  .btr-ctl .btr-seek { order: -1; flex: 1 0 100%; }
  .btr-ctl .btn { flex: 1; min-height: 40px; font-size: 14px; } .btr-ctl select { flex: 0 0 64px; }
  .btr-demo { padding: 0 12px; font-size: 11px; }
  .btr-svg { max-height: 200px; }
}
.btr-lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(2,6,12,.94); overflow: auto; -webkit-overflow-scrolling: touch; }
.btr-lightbox img { display: block; width: 200%; max-width: none; height: auto; }
.btr-lightbox .btr-lb-close { position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 10px; z-index: 201; font-size: 15px; padding: 8px 14px; border-radius: 20px; background: #16304d; color: #fff; border: 1px solid #38a3ff; }
.btr-lightbox .btr-lb-cap { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(6,14,24,.9); font-size: 12.5px; color: #dfe9f5; }
@media (min-width: 761px) { .btr-lightbox img { width: auto; max-width: 96vw; margin: 4vh auto; } }
/* 바이오리액터 디지털 트윈 연구 투어(btw-*) — views/bio_twin.js */
.btw-intro { gap: 14px; } .btw-lead { font-size: 16px; color: #cfe0f2; max-width: 900px; }
.btw-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; width: 100%; max-width: 1100px; }
.btw-tile { background: #0f1b2b; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; text-align: left; }
.btw-tile small { display: block; color: var(--dim); font-size: 11.5px; } .btw-tile b { font-size: 22px; display: block; } .btw-tile em { font-style: normal; font-size: 12px; color: #9fb3c8; }
.btw-tile.ok b { color: #2ecc71; } .btw-tile.bad b { color: #ff6b6b; } .btw-tile.warn b { color: #f5a623; }
.btw-wide { grid-template-columns: 1fr 1.25fr; }
.btw-lineup { gap: 10px; } .btw-ser > b { font-size: 15px; } .btw-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; margin-top: 4px; }
.btw-card { border: 1px solid; border-left-width: 4px; border-radius: 7px; padding: 6px 8px; background: #0f1b2b; display: flex; flex-direction: column; transition: opacity .3s; }
.btw-card b { font-size: 16px; } .btw-card small { font-size: 11px; line-height: 1.3; }
.btw-bars { display: flex; flex-direction: column; gap: 3px; position: relative; font-size: 12px; } .btw-bars > b { font-size: 13px; margin-bottom: 4px; }
.btw-bar { display: grid; align-items: center; gap: 6px; padding: 1px 4px; border-radius: 4px; } .btw-bar.hi { background: rgba(56,163,255,.18); outline: 1px solid #38a3ff; } .btw-bar.dim { opacity: .45; }
.btw-bl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #cfe0f2; } .btw-bv { text-align: right; font-variant-numeric: tabular-nums; color: #dfe9f5; font-size: 11.5px; white-space: nowrap; }
.btw-bt { position: relative; height: 13px; background: #13233a; border-radius: 3px; } .btw-bt i { display: block; height: 100%; border-radius: 3px; transition: width .3s; }
.btw-bt em { position: absolute; right: 4px; top: -1px; font-style: normal; font-size: 10.5px; color: #06101c; font-weight: 700; }
.btw-bars.tight .btw-bar { padding: 0 4px; } .btw-thr { position: absolute; top: 22px; bottom: 0; border-left: 2px dashed #ff5a5f; pointer-events: none; z-index: 1; } .btw-thr small { position: absolute; top: -16px; left: 3px; color: #ff8a8a; font-size: 10.5px; }
.btw-callout { background: rgba(255,211,77,.1); border: 1px solid #7a6420; color: #ffd34d; border-radius: 8px; padding: 8px 12px; font-weight: 700; font-size: 14px; }
.btw-big2 { font-size: 46px; font-weight: 800; color: #38a3ff; } .btw-files { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12.5px; margin-top: 6px; }
.btw-morph { min-height: 340px; } .btw-now { display: flex; flex-direction: column; gap: 4px; font-size: 13px; } .btw-now b { font-size: 16px; }
.btw-eff td { font-size: 13px; } .btw-eff td.up { color: #2ecc71; font-weight: 700; } .btw-eff td.down { color: #ff6b6b; font-weight: 700; } .btw-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.btw-wf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; width: min(640px, 100%); height: 230px; align-items: end; }
.btw-wfc { display: flex; flex-direction: column; align-items: center; height: 100%; gap: 2px; } .btw-wfc b { font-size: 13px; } .btw-wfc small { font-size: 11px; color: #9fb3c8; text-align: center; line-height: 1.2; min-height: 26px; }
.btw-wfb { position: relative; flex: 1; width: 70%; } .btw-wfb i { position: absolute; left: 0; right: 0; border-radius: 3px; }
.btw-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .btw-col { display: flex; flex-direction: column; gap: 8px; border-radius: 12px; padding: 12px; }
.btw-col h4 { margin: 0; font-size: 16px; } .btw-col.bad { background: rgba(255,90,95,.07); border: 1px solid #5a2a2e; } .btw-col.ok { background: rgba(46,204,113,.07); border: 1px solid #1e5b3a; }
.btw-col.bad .btw-tile b { color: #ff8a8a; } .btw-col.ok .btw-tile b { color: #2ecc71; } .btw-risk { columns: 2; column-gap: 24px; } .btw-risk li { break-inside: avoid; margin-bottom: 4px; }
.btw-pairs { display: flex; flex-direction: column; gap: 4px; font-size: 12px; } .btw-pair { display: grid; grid-template-columns: 120px 1fr 56px; gap: 6px; align-items: center; transition: opacity .3s; }
.btw-pb { position: relative; height: 15px; } .btw-pb i { position: absolute; left: 0; border-radius: 3px; } .btw-pb i.b1 { top: 0; height: 9px; } .btw-pb i.b0 { bottom: 0; height: 5px; background: #5d6f84; }
.btw-pair.nf .btw-bv { color: #f5a623; }
.btw-idea { background: #0f1b2b; border: 1px solid var(--line); border-left: 4px solid #38a3ff; border-radius: 8px; padding: 8px 12px; font-size: 13px; } .btw-idea b { font-size: 14px; }
.btw-erpflow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.btw-ef { position: relative; border: 1px solid var(--line); border-radius: 9px; padding: 12px 10px; background: #0f1b2b; display: flex; flex-direction: column; gap: 4px; transition: opacity .3s; }
.btw-ef b { font-size: 15px; } .btw-ef small { font-size: 12px; color: #9fb3c8; } .btw-ef.on { border-color: #f5a623; background: rgba(245,166,35,.1); }
.btw-ef:not(:last-child)::after { content: '→'; position: absolute; right: -14px; top: 50%; transform: translateY(-50%); color: #f5a623; font-weight: 800; z-index: 1; }
.btw-svgw { width: 100%; }
.btw-ebom { max-width: 980px; } .btw-ebom td, .btw-ebom th { font-size: 12.5px; padding: 4px 8px; } .btw-ebom tr.new td:first-child { color: #f5a623; }
@media (max-width: 760px) {
  .btw-tiles { grid-template-columns: 1fr 1fr; } .btw-tile b { font-size: 17px; } .btw-lead { font-size: 14px; }
  .btw-cards { grid-template-columns: repeat(3, 1fr); } .btw-morph { min-height: 240px; height: 240px; flex: none; }
  .btw-vs { grid-template-columns: 1fr; } .btw-risk { columns: 1; } .btw-erpflow { grid-template-columns: 1fr 1fr; } .btw-ef::after { display: none; }
  .btw-wf { height: 190px; } .btw-big2 { font-size: 32px; } .btw-pair { grid-template-columns: 92px 1fr 48px; }
}

/* ───────── Hanwha Twin(OEM) — 브랜드 로고·포털 ───────── */
.top-brand .hw-logo { height: 22px; width: auto; display: block; }
.top-brand .hw-name { font-size: 13.5px; font-weight: 700; letter-spacing: .01em; color: #fff; }
.top-brand .hw-name small { display: block; font-size: 10px; font-weight: 500; color: var(--muted); letter-spacing: .04em; }
.login-card .hw-logo { height: 34px; width: auto; margin-bottom: 14px; }
.hw-portal { display: flex; flex-direction: column; gap: 16px; }
.hw-hero { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: 14px; border: 1px solid var(--line); background: radial-gradient(ellipse at 0% 0%, rgba(243, 115, 33, .16), transparent 60%), var(--panel); }
.hw-hero img { height: 40px; } .hw-hero h1 { font-size: 22px; } .hw-hero .muted { font-size: 13px; }
.hw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.hw-card { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.hw-card h3 { font-size: 16px; } .hw-card .k { font: 600 11px var(--mono); color: var(--accent); letter-spacing: .06em; }
.hw-card .row { display: flex; gap: 6px; flex-wrap: wrap; }
.hw-mod { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.hw-mod b.k { font: 700 13px var(--mono); color: var(--accent); }
.hw-st { font-size: 11.5px; padding: 2px 8px; border-radius: 99px; border: 1px solid; } .hw-st.ok { color: var(--ok); border-color: #1e6b41; } .hw-st.part { color: var(--warn); border-color: #7a5a1a; } .hw-st.plan { color: var(--muted); border-color: var(--line2); }
.hw-foot-note { font-size: 12px; color: var(--muted); }

/* 한화판 — 대표 색을 CSS 변수(--accent)로: 주요 버튼 · 활성 메뉴 */
.btn.primary { background: linear-gradient(180deg, var(--accent), var(--accent2)); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); background: linear-gradient(180deg, var(--accent), var(--accent2)); }
.tw-tools .btn.primary { background: linear-gradient(180deg, var(--accent), var(--accent2)); }
.app-menubar .mb-top.cur { box-shadow: inset 0 -2px 0 var(--accent); }
.page .card-b.row select { width: auto; min-width: 160px; }
/* 고객사 로고 — 메뉴바 오른쪽 */
.topbar .top-logo { height: 22px; width: auto; flex: none; margin-left: 14px; opacity: .95; }
@media (max-width: 1100px) { .topbar .top-logo { display: none; } }
/* 1.5 거버넌스 — 변경안·검토·발행 패널 · 시연 모드 띠 */
.flow-panel { position: absolute; top: 10px; right: 10px; width: 420px; max-height: calc(100% - 20px); overflow: auto; z-index: 30; display: flex; flex-direction: column; gap: 10px;
  padding: 14px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(12, 17, 24, .96); box-shadow: 0 12px 40px rgba(0, 0, 0, .45); font-size: 13px; }
.flow-panel h4 { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); }
.flow-panel .input { width: 100%; box-sizing: border-box; margin-bottom: 6px; }
.flow-head { display: flex; align-items: center; gap: 8px; } .flow-head .grow { flex: 1; }
.flow-kv { display: grid; grid-template-columns: 120px 1fr; gap: 4px 10px; font-size: 12.5px; } .flow-kv span { color: var(--muted); } .flow-kv b.warn { color: #f5a623; }
.flow-sec { border-top: 1px solid var(--line); padding-top: 10px; }
.flow-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; } .flow-list.tall { max-height: 46vh; }
.flow-row { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; padding: 7px 9px; border-radius: 8px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); cursor: default; }
.flow-row.op-added { border-left: 3px solid #2ecc71; cursor: pointer; } .flow-row.op-modified { border-left: 3px solid #f39c12; cursor: pointer; } .flow-row.op-removed { border-left: 3px solid #e74c3c; cursor: pointer; }
.flow-legend { display: flex; gap: 12px; font-size: 12px; align-items: center; } .flow-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.flow-demo { display: flex; align-items: center; gap: 8px; padding: 7px 14px; font-size: 13px; background: rgba(243, 115, 33, .14); border-bottom: 1px solid rgba(243, 115, 33, .45); }
.flow-demo b { color: var(--accent, #F37321); } .flow-demo.copy { background: rgba(56, 163, 255, .12); border-bottom-color: rgba(56, 163, 255, .45); } .flow-demo.copy b { color: #38a3ff; }
.cad .cad-view { position: relative; }
/* 1.2 태그 입력 상태 */
.ops-feed { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--muted); cursor: pointer; }
.ops-feed.ok { color: #2ecc71; border-color: rgba(46, 204, 113, .5); } .ops-feed.warn { color: #f5a623; border-color: rgba(245, 166, 35, .55); } .ops-feed.bad { color: #ff5a5f; border-color: rgba(255, 90, 95, .6); background: rgba(255, 90, 95, .08); }
.ops-feedcard { margin-bottom: 10px; } .ops-feed-sum { display: flex; gap: 8px; align-items: center; margin: 6px 0; font-size: 12px; }
.ops-feed-tbl { max-height: 260px; overflow: auto; } .ops-feed-tbl table { width: 100%; font-size: 12px; border-collapse: collapse; } .ops-feed-tbl td, .ops-feed-tbl th { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.ops-feed-tbl tr { cursor: pointer; } .ops-feed-tbl tr.fs-stale td { color: #f5a623; } .ops-feed-tbl tr.fs-missing td, .ops-feed-tbl tr.fs-bad td { color: #ff8a8d; }
/* 1.4 시뮬레이션 Workspace · 3D 재생 */
.sim-grid { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(420px, 1.4fr); gap: 14px; margin-top: 12px; }
@media (max-width: 1100px) { .sim-grid { grid-template-columns: 1fr; } }
.sim-card .card-h { display: flex; align-items: center; gap: 8px; } .sim-card .card-h .grow { flex: 1; } .sim-wide { margin-top: 14px; }
.sim-model { padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 8px; cursor: pointer; } .sim-model.on { border-color: var(--accent, #F37321); background: rgba(243, 115, 33, .07); }
.sim-warn { color: #f5a623; font-size: 11.5px; margin-top: 3px; }
.sim-params { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 8px 0; }
.sim-param { display: flex; flex-direction: column; gap: 3px; font-size: 12px; } .sim-param .input { width: 100%; box-sizing: border-box; }
.sim-row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; } .sim-new { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 10px; } .sim-new > .input { width: 100%; box-sizing: border-box; }
.sim-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow: auto; }
.sim-scn { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; }
.sim-runs td { vertical-align: top; font-size: 12.5px; } .sim-runs td .btn { margin: 0 4px 4px 0; }
.sim-prog { height: 4px; background: var(--line); border-radius: 2px; margin-top: 4px; width: 90px; } .sim-prog i { display: block; height: 100%; background: #38a3ff; border-radius: 2px; }
.sim-cmp { margin-top: 14px; } .sim-st { margin-top: 12px; } .sim-st-row { display: grid; grid-template-columns: 160px 1fr 1fr; gap: 10px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.sim-bar { display: inline-flex; align-items: center; gap: 6px; width: 60%; } .sim-bar i { display: block; height: 8px; border-radius: 4px; background: #38a3ff; } .sim-bar i.b { background: var(--accent, #F37321); } .sim-bar span { font-size: 11px; }
.rp-hud { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 25; padding: 10px 14px; border-radius: 12px; background: rgba(10, 14, 20, .92); border: 1px solid var(--line2); display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.rp-head, .rp-bar, .rp-kpi, .rp-legend { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .rp-head .grow { flex: 1; }
.rp-bar input[type=range] { flex: 1; min-width: 200px; } .rp-kpi span { display: inline-flex; gap: 5px; align-items: baseline; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, .04); }
.rp-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; } .rp-stats { color: #cfe3f5; }
/* AI 보완 후보 */
.ai-conf { display: inline-block; width: 70px; height: 6px; border-radius: 3px; background: var(--line); margin-right: 6px; vertical-align: middle; } .ai-conf i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #f5a623, #2ecc71); }
.ai-tbl td { vertical-align: top; font-size: 12.5px; } .ai-basis { max-width: 420px; color: #b9c6d4; font-size: 12px; }
.hw-demo-on { margin: 6px 0; padding: 5px 10px; border-radius: 8px; font-size: 12.5px; background: rgba(243, 115, 33, .13); border: 1px solid rgba(243, 115, 33, .4); }
.demo-prot { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
