/* IOT PRO v2 컴포넌트 — 알약 버튼 · 세그먼트 · 카드 · 모달 · 토스트 · 드롭존 · 드롭다운 · 배지 ·
   레이아웃. 그림자·흐림 효과 없음, 글자는 11px 이상, 굵기는 400/600 두 가지. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: var(--fw-reg) 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
b, strong { font-weight: var(--fw-semi); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--btn); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── 버튼: 알약. 주 버튼 = 네이비 채움, 보조 = 네이비 선 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid var(--btn); background: transparent; color: var(--btn); font-size: 13px; font-weight: var(--fw-semi); white-space: nowrap; }
.btn:hover { background: var(--btn-ghost); }
.btn.solid { background: var(--btn); color: var(--on-btn); }
.btn.solid:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn.round { width: 36px; padding: 0; }
.btn.plain { border-color: var(--line); color: var(--ink); background: var(--panel); }
.btn.plain:hover { background: var(--fill-hover); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.link { background: none; border: 0; padding: 0; color: var(--link); font-size: 13px; font-weight: var(--fw-reg); }
.link::after { content: ' ›'; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── 세그먼트(탭): 회색 트랙 안에서 선택된 칸이 흰 알약 */
.seg { display: flex; gap: 2px; padding: 3px; background: var(--fill); border-radius: var(--r-pill); min-width: 0; }
.seg button { flex: 1; min-height: 32px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--r-pill); background: transparent; color: var(--sub); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg button:hover { color: var(--ink); }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: var(--panel); border-color: var(--line); color: var(--ink); font-weight: var(--fw-semi); }
.seg.on-gray { background: var(--bg); }
:root[data-theme="dark"] .seg button[aria-selected="true"], :root[data-theme="dark"] .seg button[aria-pressed="true"] { background: var(--fill-hover); border-color: transparent; }

/* ── 칩·배지: 알약 */
.chip { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: var(--r-pill); border: 0; background: var(--fill); color: var(--sub); font-size: 12px; }
.chip:hover { background: var(--fill-hover); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--btn); color: var(--on-btn); }
.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: var(--fw-semi); background: var(--fill); color: var(--sub); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good-ink); }
.badge.ok { background: var(--ok-soft); color: var(--ok-ink); }
.badge.warn { background: var(--warn-soft); color: var(--warn-ink); }
.badge.risk { background: var(--risk-soft); color: var(--risk-ink); }
.badge.bad { background: var(--bad-soft); color: var(--bad-ink); }
.badge.sample { background: var(--fill); color: var(--faint); font-weight: var(--fw-reg); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--faint); }
.dot.good { background: var(--good); } .dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); }
.dot.risk { background: var(--risk); } .dot.bad { background: var(--bad); } .dot.none { background: var(--line); }

/* ── 입력 */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .lbl { font-size: 12px; color: var(--faint); }
.input { width: 100%; min-height: 40px; padding: 0 14px; border: 0; border-radius: var(--r-sm); background: var(--fill); color: var(--ink); font-size: 14px; }
.input::placeholder { color: var(--faint); }
.input:focus { outline: 2px solid var(--btn); outline-offset: 0; }
.search { position: relative; }
.search .i { position: absolute; left: 12px; top: 50%; margin-top: -9px; color: var(--faint); pointer-events: none; }
.search .input { padding-left: 38px; }

/* ── 레이아웃 */
.app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 600px; padding: 12px; gap: 12px; }
.topbar { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 4px; flex: none; }
.topbar .site { display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: auto; font-weight: var(--fw-semi); }
.topbar .brand { display: flex; align-items: center; flex: none; font-size: 14px; letter-spacing: 1.5px; color: var(--ink); user-select: none; }
.topbar .brand .bn { font-weight: 800; white-space: nowrap; }
.topbar .brand .pro { color: var(--btn); }
:root[data-theme="dark"] .topbar .brand .pro { color: var(--link); }
.topbar .brand .by { font-size: 11px; font-weight: 400; letter-spacing: .4px; color: var(--faint); padding-left: 9px; margin-left: 9px; border-left: 1px solid var(--line); white-space: nowrap; }
.topbar .brand + .nm { padding-left: 12px; margin-left: 2px; border-left: 1px solid var(--line); font-weight: var(--fw-semi); }
@media (max-width: 1100px) { .topbar .brand .by { display: none; } }
.topbar .site span.nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .acts { display: flex; align-items: center; gap: 8px; flex: none; }
.main { flex: 1; min-height: 0; display: grid; gap: var(--gap);
  grid-template-columns: clamp(240px, 22vw, 300px) minmax(560px, 1fr) clamp(260px, 24vw, 340px);
  grid-template-areas: "left stage right"; }
.panel { grid-area: left; background: var(--panel); border-radius: var(--r-md); display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.panel.right { grid-area: right; }
.panel .head { padding: 14px 14px 0; flex: none; }
.panel .body { flex: 1; min-height: 0; overflow-y: auto; padding: var(--pad); }
.panel .body.tight { padding: 14px 8px; }
.stage { grid-area: stage; position: relative; min-width: 0; min-height: 0; background: var(--panel); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.stage .bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; flex: none; }
.stage .bar .seg { flex: 0 0 auto; }
.stage .bar .seg button { flex: none; padding: 0 14px; }
.stage .bar .spacer { flex: 1; }
.stage .wrap { position: relative; flex: 1; min-height: 0; background: var(--canvas); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.stage canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.stage .wrap.pan { cursor: grab; } .stage .wrap.panning { cursor: grabbing; } .stage .wrap.place { cursor: copy; }
.stage .legend { flex: none; padding: 12px 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.legend .barx { display: flex; gap: 3px; height: 10px; }
.legend .barx i { flex: 1; border-radius: var(--r-pill); }
.legend .ticks, .legend .names { display: flex; font-size: 11px; color: var(--faint); }
.legend .ticks span, .legend .names span { flex: 1; text-align: center; }
.legend .ticks span { color: var(--faint); }
.legend .names span { color: var(--sub); }
.legend .note { font-size: 12px; color: var(--faint); margin-top: 4px; }
.ctrls, .chipnote { z-index: 2; }
.ctrls { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 8px; align-items: center; }
.ctrls .grp { display: flex; align-items: center; background: var(--panel); border-radius: var(--r-pill); border: 1px solid var(--line); padding: 2px; }
.ctrls .grp button { width: 34px; height: 34px; border: 0; background: transparent; border-radius: 50%; display: grid; place-items: center; color: var(--ink); }
.ctrls .grp button:hover { background: var(--fill-hover); }
.ctrls .grp button[disabled] { opacity: .35; pointer-events: none; }
.ctrls .zoomv { min-width: 46px; text-align: center; font-size: 12px; color: var(--sub); }
.chipnote { position: absolute; left: 14px; top: 12px; display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px 8px 6px 14px; font-size: 13px; max-width: calc(100% - 28px); }
.chipnote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 빈 화면 */
.empty { position: absolute; inset: 0; z-index: 3; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; text-align: center; gap: 0; }
.empty h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 44px); line-height: 1.15; letter-spacing: -.022em; font-weight: var(--fw-semi); color: var(--ink); }
.empty h1 em { font-style: normal; color: var(--faint); }
.empty p.sub { margin: 0 0 28px; color: var(--sub); font-size: 15px; }
.drop { width: min(560px, 100%); padding: 40px 24px; border: 1.5px dashed var(--btn); border-radius: var(--r-card); background: var(--panel); display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink); }
.drop:hover, .drop.over { background: var(--btn-ghost); }
.drop .i { width: 30px; height: 30px; color: var(--btn); margin-bottom: 6px; }
.drop b { font-size: 15px; } .drop small { font-size: 12px; color: var(--faint); }
.empty .alt { margin-top: 18px; font-size: 13px; color: var(--faint); }

/* ── 카드(수치) */
.cards { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { background: var(--fill); border-radius: var(--r-md); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card .lbl { font-size: 12px; color: var(--faint); }
.card .num { font-size: 36px; line-height: 1.1; font-weight: var(--fw-semi); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card .num small { font-size: 14px; font-weight: var(--fw-reg); color: var(--faint); margin-left: 4px; letter-spacing: 0; }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.card .desc { font-size: 12px; color: var(--sub); min-height: 18px; overflow-wrap: anywhere; }
.secthead { font-size: 12px; color: var(--faint); margin: 20px 0 8px; }
.kv { display: flex; justify-content: space-between; gap: 12px; min-height: 36px; align-items: center; font-size: 13px; color: var(--sub); }
.kv b { color: var(--ink); }

/* ── 목록(기기 라이브러리·기기 목록) */
.grp-head { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 12px; border: 0; background: transparent; border-radius: var(--r-sm); color: var(--ink); font-weight: var(--fw-semi); font-size: 13px; text-align: left; }
.grp-head:hover { background: var(--fill); }
.grp-head .n { margin-left: auto; color: var(--faint); font-weight: var(--fw-reg); font-size: 12px; }
.grp-head .i { width: 16px; height: 16px; transition: transform .12s; }
.grp-head[aria-expanded="true"] .i { transform: rotate(90deg); }
.item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: var(--row); padding: 6px 12px; border: 0; background: transparent; border-radius: var(--r-sm); text-align: left; }
.item:hover { background: var(--fill); }
.item[aria-pressed="true"], .item.sel { background: var(--btn-ghost); outline: 1.5px solid var(--btn); outline-offset: -1.5px; }
.item .ab { width: 30px; height: 30px; flex: none; display: block; }
.item .t { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.item .t b { font-size: 13px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .t small { font-size: 11px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .v { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--sub); }
.item .v .badge { min-height: 20px; padding: 0 8px; font-size: 11px; }
.dev-detail { margin: 2px 4px 10px; padding: 14px; background: var(--fill); border-radius: var(--r-md); display: flex; flex-direction: column; gap: 12px; }
.dev-detail .input { background: var(--panel); }
.dev-detail .acts { display: flex; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 8px; }
.nothing { padding: 28px 8px; text-align: center; color: var(--faint); font-size: 13px; }

/* ── 시공 판단 문장 */
.says { display: flex; flex-direction: column; gap: 14px; }
.say { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.6; }
.say .dot { margin-top: 8px; }
.say > div { min-width: 0; overflow-wrap: anywhere; }

/* ── 도면 탭 */
.stack { display: flex; flex-direction: column; gap: 18px; }

/* ── 드롭다운 */
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 220px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px; }
.menu button { display: flex; align-items: center; width: 100%; min-height: 40px; padding: 0 14px; border: 0; border-radius: var(--r-sm); background: transparent; font-size: 13px; text-align: left; }
.menu button:hover { background: var(--fill); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }

/* ── 모달 · 토스트 */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .4); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--panel); border-radius: var(--r-card); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.modal h2 { margin: 0; font-size: 20px; font-weight: var(--fw-semi); letter-spacing: -.01em; }
.modal .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.modal ul { margin: 0; padding-left: 18px; color: var(--sub); font-size: 14px; line-height: 1.8; }
.modal kbd { font: inherit; font-size: 12px; background: var(--fill); border-radius: 6px; padding: 1px 7px; color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--panel); border-radius: var(--r-pill); padding: 11px 20px; font-size: 13px; max-width: calc(100vw - 32px); }

/* 빈 화면에서는 아직 쓸 수 없는 것을 옅게 */
.app.is-empty .panel.right .body, .app.is-empty .lib-area { opacity: .45; pointer-events: none; }
.app.is-empty .stage .bar, .app.is-empty .ctrls, .app.is-empty .legend { visibility: hidden; }

/* ── 폭이 모자라면: 우 패널이 도면 아래로(가운데 도면 ≥ 560px 를 지키기 위해 3열은 1140px 이상에서만) */
@media (max-width: 1139px) {
  .main { grid-template-columns: clamp(240px, 26vw, 300px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(200px, 30%);
    grid-template-areas: "left stage" "left right"; }
}
/* 세로로 쌓기 — 모바일 포함. 페이지가 스크롤된다 */
@media (max-width: 899px) {
  html, body { height: auto; }
  .app { height: auto; min-height: 100vh; }
  .main { display: flex; flex-direction: column; }
  .stage { order: 1; height: min(66vh, 560px); min-height: 400px; flex: none; }
  .panel.right { order: 2; }
  .panel:not(.right) { order: 3; }
  .panel .body { overflow: visible; }
  .lib-scroll { max-height: 440px; overflow-y: auto; }
  .stage .bar { padding: 10px; }
  .toast { bottom: 16px; }
}
@media (max-width: 520px) {
  .app { padding: 8px; gap: 8px; }
  .topbar .site .nm { display: none; }
  .topbar .btn { padding: 0 14px; }
  .modal { padding: 22px; }
  .stage .bar .seg button { padding: 0 10px; font-size: 12px; }
}

/* ── 아파트 이름 검색(시작 화면) — 흰 면 + 1px 헤어라인, 그림자·흐림 없음 */
.aptfind { position: relative; width: min(560px, 100%); text-align: left; }
.aptfind .search .input { min-height: 48px; border-radius: var(--r-pill); padding-left: 44px; font-size: 15px; background: var(--panel); border: 1px solid var(--line); }
.aptfind .search .i { left: 16px; }
.aptbox { position: absolute; top: 100%; left: 0; right: 0; z-index: 5; margin-top: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px; max-height: min(46vh, 420px); overflow-y: auto; }
.apt-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 0; width: 100%; min-height: var(--row); padding: 8px 14px; border: 0; background: transparent; border-radius: var(--r-sm); text-align: left; font-size: 14px; }
.apt-row:hover, .apt-row[aria-expanded="true"] { background: var(--fill); }
.apt-row small { font-size: 12px; color: var(--faint); margin-left: 8px; }
.apt-types { padding: 2px 4px 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.apt-t { display: flex; align-items: center; gap: 8px; }
.apt-tb { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 40px; padding: 4px 12px; border: 0; background: transparent; border-radius: var(--r-sm); text-align: left; font-size: 13px; color: var(--ink); }
.apt-tb:hover { background: var(--btn-ghost); }
.apt-tb[disabled] { opacity: .45; pointer-events: none; }
.apt-tb .t { margin-right: 4px; }
.apt-tb .badge { min-height: 20px; padding: 0 8px; font-size: 11px; font-weight: var(--fw-reg); }
.apt-pv { min-height: 30px; padding: 0 12px; font-size: 12px; flex: none; }
.apt-msg { padding: 14px; font-size: 13px; color: var(--faint); text-align: center; overflow-wrap: anywhere; }
.apt-msg.err { color: var(--bad-ink); }
.apt-wait { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px 18px 20px; }
.apt-line { font-size: 13px; color: var(--sub); text-align: center; }
.apt-bar { width: min(320px, 100%); height: 4px; border-radius: var(--r-pill); background: var(--fill-hover); overflow: hidden; }
.apt-bar i { display: block; height: 100%; width: 0; border-radius: var(--r-pill); background: var(--btn); transition: width .25s ease; }
.apt-preview { position: fixed; z-index: 40; display: none; aspect-ratio: 923 / 676; background: var(--fill); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; pointer-events: none; }
.apt-preview img { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--plan); -webkit-user-drag: none; user-select: none; }
.empty .or { margin: 16px 0; font-size: 12px; color: var(--faint); }
/* 긴 목록이 늘어나도 위가 잘리지 않게: 가운데 정렬 대신 위·아래 자동 여백 */
/* 세로 가운데: 위·아래에 같은 몫의 빈 칸(스페이서)을 둔다. 내용이 넘치면 스페이서가 0 으로 줄어 위가 잘리지 않는다.
   (옛 방식은 첫·끝 자식에 margin:auto 를 걸었는데, 끝 자식이 화면에 없는 숨김 요소면 아래 몫이 거기로 새서 내용이 아래로 쏠렸다.) */
.empty { justify-content: flex-start; }
.empty::before, .empty::after { content: ''; flex: 1 1 0; min-height: 0; }

/* ── 축척 추정 안내줄(도면 위) */
.scalenote { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 14px 10px; padding: 8px 8px 8px 16px; background: var(--warn-soft); color: var(--warn-ink); border-radius: var(--r-pill); font-size: 13px; }
.scalenote .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.scalenote .btn { min-height: 30px; padding: 0 14px; font-size: 12px; }
@media (max-width: 520px) { .scalenote { border-radius: var(--r-md); margin: 0 10px 8px; } .scalenote .t { flex-basis: 100%; } }
.empty.searching > h1, .empty.searching > p.sub, .empty.searching > .or, .empty.searching > .drop, .empty.searching > .alt { display: none; }
.empty.searching > .aptfind { margin: 0 auto; }

/* ── 보정 도구 줄(도면 위): 안내 글은 남는 폭을 쓰고, 도구 줄은 좁으면 옆으로 민다 */
.stage .bar .lbl { flex: 1 1 180px; min-width: 0; }
.stage .bar .btn { min-height: 32px; padding: 0 14px; font-size: 12px; }

/* ── 좁은 화면(≤899px): 줌·되돌리기를 도면 «위» 오른쪽으로 — 도면 아래쪽을 가리지 않는다. 안내 칩은 그 아래 줄 */
@media (max-width: 899px) {
  .ctrls { top: 10px; bottom: auto; right: 10px; }
  .chipnote { top: 56px; left: 10px; right: 10px; max-width: none; }
}
/* ── 2단(900~1139px): 도면이 너무 작아지지 않게 도면 칸에 최소 높이를 주고, 넘치는 만큼은 페이지가 스크롤된다(오른쪽 패널은 도면 아래) */
@media (min-width: 900px) and (max-width: 1139px) {
  html, body { height: auto; }
  .app { height: auto; min-height: 100vh; min-height: 100dvh; }
  .main { grid-template-rows: minmax(max(560px, 72vh), auto) auto; }
  .panel:not(.right) { position: sticky; top: 12px; align-self: start; height: calc(100vh - 76px); height: calc(100dvh - 76px); }
}
/* 보정 중에는 도구 줄 두 개만큼 도면 칸을 키운다 */
@media (max-width: 899px) { .stage[data-editing] { height: min(92vh, 780px); } }
@media (min-width: 900px) and (max-width: 1139px) { .stage[data-editing] { min-height: 700px; } }

/* ── 스토어 연결·견적 — 기존 .item · .card · .kv · .dot · .badge 를 그대로 쓰고, 모자란 것만 더한다 */
.dot.on { background: var(--btn); }
.item .t small.shop { display: flex; align-items: center; gap: 6px; }
.item .t small.shop .dot { width: 8px; height: 8px; }
.shopmark { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
a.item, .quote a.item { color: inherit; text-decoration: none; }
.quote .item .v b { font-size: 13px; color: var(--ink); }
.quote .item .t b { white-space: normal; }
.quote .kv small { text-align: right; }
.topbar .site .qt { white-space: nowrap; font-variant-numeric: tabular-nums; }
.panel.right .seg button { flex: 1 1 auto; padding: 0 8px; font-size: 12px; }  /* 탭이 4개 — 글자 폭만큼 나눠 «신호 분석» 이 잘리지 않게 */

/* ── 견적서 인쇄: 화면에서는 숨기고, 인쇄할 때는 이것만 보인다 */
#quote-sheet { display: none; }
@media print {
  .app, .toast, .scrim, .apt-preview { display: none !important; }
  html, body { height: auto; overflow: visible; background: var(--panel); }
  #quote-sheet { display: block; color: var(--ink); font-size: 12px; line-height: 1.6; padding: 0; }
  #quote-sheet h1 { margin: 0 0 4px; font-size: 22px; font-weight: var(--fw-semi); }
  #quote-sheet h2 { margin: 20px 0 6px; font-size: 14px; font-weight: var(--fw-semi); }
  #quote-sheet p { margin: 2px 0; color: var(--sub); }
  #quote-sheet table { width: 100%; border-collapse: collapse; margin-top: 12px; font-variant-numeric: tabular-nums; }
  #quote-sheet th, #quote-sheet td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
  #quote-sheet th { font-weight: var(--fw-semi); color: var(--sub); }
  #quote-sheet tfoot td { font-weight: var(--fw-semi); border-bottom: 0; border-top: 1px solid var(--ink); }
  #quote-sheet tr { break-inside: avoid; }
}
