html[data-theme=dark]{--bg:#0F141B;--card:#171E27;--ink:#E6EBF2;--mut:#A3AEBD;--line:#2C3644;--blue:#6EA2FF;--blue-l:#1B2C4A;
 --ok:#5FD08F;--ok-b:#163325;--warn:#F2C25B;--warn-b:#332811;--hold:#FF8A80;--hold-b:#3A1C1A;--work:#C6A3F5;--work-b:#2A1F3D;--na:#B4BDC9;--na-b:#262E39;color-scheme:dark}
html[data-theme=dark]{--navy:#DCE6F5;--blue-d:#9CC0FF}
html[data-theme=dark] .top{background:#121A24!important;color:var(--ink)!important;border-bottom-color:var(--line)!important}
html[data-theme=dark] .top a,html[data-theme=dark] .top .toplink{color:#DCE6F5!important}
html[data-theme=dark] .demo{background:#1B2C4A!important;color:#C9DAFF!important;border-color:#2D4572!important}
html[data-theme=dark] body{background:var(--bg);color:var(--ink)}
html[data-theme=dark] .btn,html[data-theme=dark] .kpi,html[data-theme=dark] label.mode,html[data-theme=dark] .mbox,
html[data-theme=dark] .bar select,html[data-theme=dark] .tabs a,html[data-theme=dark] details.scope,html[data-theme=dark] .bar input,
html[data-theme=dark] .pin,html[data-theme=dark] textarea{background:var(--card)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme=dark] .btn.p{background:#2F6FE0!important;border-color:#2F6FE0!important;color:#fff!important}
html[data-theme=dark] .btn:hover{background:#202936!important}
html[data-theme=dark] th{background:#1D2530;color:#C9D2DE}
html[data-theme=dark] td{border-bottom-color:#232C38}
html[data-theme=dark] tr:hover td{background:#1B232E}
html[data-theme=dark] tr.sel td{background:#3A3216}
html[data-theme=dark] .drop{background:#141B24;border-color:#3B4D6B}
html[data-theme=dark] .note{background:var(--warn-b);border-color:#5C4A1F;color:#F3DDA6}
html[data-theme=dark] .info{background:var(--blue-l);border-color:#2D4572;color:#C9DAFF}
html[data-theme=dark] .err-box{background:var(--hold-b);border-color:#6B2A26;color:#FFC9C3}
html[data-theme=dark] code{background:#202936;color:#DCE4EF}
html[data-theme=dark] .wm{color:rgba(110,162,255,.04)}
/* 도면 영역: PNG 미리보기는 색 반전 없이 원본 그대로. 배경 설정은 도면 '주변'에만 적용 */
/* 설정 위젯 */
#thmw{display:flex;gap:8px;align-items:center;margin-left:12px;font-size:12.5px;color:var(--ink);white-space:nowrap}
#thmw select{font-size:12.5px;padding:4px 6px;border-radius:6px;border:1px solid var(--line);background:var(--card);color:var(--ink)}
@media(max-width:768px){#thmw{gap:4px;font-size:11.5px}#thmw .lb{display:none}}
html[data-theme=dark] .tbl{background:var(--card)!important;border-color:var(--line)!important}
html[data-theme=dark] details.scope [style*="8A5A00"]{color:var(--warn)!important}
/* 사업자 정보 바닥글: 내용 무변경, 다크 모드 글자색만 보정(심사 관련 항목 — 별도 검토 대상) */
html[data-theme=dark] #coreon-biz{color:#B4BDC9!important;border-top-color:var(--line)!important}
html[data-theme=dark] #coreon-biz>div:first-child{color:#E6EBF2!important}
html[data-theme=dark] .step{background:var(--card)!important;border-color:var(--line)!important}
html[data-theme=dark] .step b{color:var(--ink)}
html[data-theme=dark] .demo:empty{display:none}
#thmw.inwrap{margin:0 0 12px;justify-content:flex-end;color:var(--mut)}
html[data-theme=dark] .card,html[data-theme=dark] .ctx,html[data-theme=dark] .pk-btn{background:var(--card)!important;border-color:var(--line)!important;color:var(--ink)}
html[data-theme=dark] .step.on .n{background:#2F6FE0!important}
html[data-theme=dark] .err{background:var(--hold-b)!important;color:#FFC9C3!important;border-color:#6B2A26!important}
html[data-theme=dark] .err a{color:#FFD9D4!important}
html[data-theme=dark] input:not([type=checkbox]):not([type=radio]):not([type=file]),html[data-theme=dark] select{background:var(--card);color:var(--ink);border-color:var(--line)}
html[data-theme=dark]{--err:#FF8A80}
/* 도면 물량산출(/qto) 화면 보정 */
html[data-theme=dark] .panel,html[data-theme=dark] .tb,html[data-theme=dark] .modal>.box,html[data-theme=dark] .sheet,html[data-theme=dark] .it{background:var(--card)!important;color:var(--ink);border-color:var(--line)!important}
html[data-theme=dark] .it.on{border-color:#FF8A80!important;box-shadow:0 0 0 2px #3A1C1A}
html[data-theme=dark] .btn.on{background:#2F6FE0!important;border-color:#2F6FE0!important;color:#fff!important}
html[data-theme=dark] .modetabs .btn.p{background:#2F6FE0!important;color:#fff!important}
html[data-theme=dark] a{color:#8DB6FF}
html[data-theme=dark] .top .toplink{color:#DCE6F5!important}
html[data-theme=dark] .msg.e,html[data-theme=dark] .msg.err{background:var(--hold-b);color:#FFC9C3}
/* 도면 작업 배경: 프로그램 테마와 별도. 원본 이미지·좌표·수량은 바꾸지 않고 화면 표시만 바꾼다 */
html[data-canvas=white] .vp{background:#FFFFFF!important}
html[data-canvas=gray] .vp{background:#E9EDF2!important}
html[data-canvas=black] .vp{background:#0E1116!important}
html[data-canvas=black] .vp .stage img{filter:invert(1) hue-rotate(180deg)}
html[data-canvas=black] .vp #ov{filter:brightness(1.45) saturate(1.2)}
#cvw{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--mut);white-space:nowrap;margin-left:6px}
#cvw select{font-size:12px;padding:3px 4px;border-radius:6px;border:1px solid var(--line);background:var(--card);color:var(--ink)}
/* 좁은 화면: 헤더 겹침 방지 */
@media(max-width:768px){.top{gap:8px!important;padding:0 10px!important}.pname small{display:none}}
/* 헤더 위젯 글자색: 라이트 남색 헤더 위 흰색, 흰 헤더(실행원가·간편 견적 등) 위 남색 */
#thmw .lb{background:#fff;color:#16345C;padding:2px 6px;border-radius:6px}#thmw select{background:#fff;color:#17202B;border-color:#C9D2DE}
html[data-theme=dark] #thmw .lb,html[data-theme=dark] #thmw select{background:#171E27;color:#DCE6F5;border-color:#2C3644}
/* 간편 견적·무료 미리보기·내 문서(모바일 우선 화면) 다크 */
html[data-theme=dark] body{background:#0F141B!important;color:#E6EBF2!important}
html[data-theme=dark] body>div.top{background:#121A24!important;border-bottom-color:#2C3644!important}
html[data-theme=dark] body>div.top b,html[data-theme=dark] body>div.top a{color:#DCE6F5!important}
html[data-theme=dark] h1,html[data-theme=dark] h2,html[data-theme=dark] .tot,html[data-theme=dark] .kpi b,html[data-theme=dark] .bar .sum b,html[data-theme=dark] details summary{color:#DCE6F5!important}
html[data-theme=dark] label,html[data-theme=dark] .mut,html[data-theme=dark] .item .hd,html[data-theme=dark] .bar .sum,html[data-theme=dark] .sub,html[data-theme=dark] p.mut,html[data-theme=dark] div.mut{color:#A3AEBD!important}
html[data-theme=dark] .chip,html[data-theme=dark] .item,html[data-theme=dark] .bar,html[data-theme=dark] .sheet .box,html[data-theme=dark] .kpi div,html[data-theme=dark] .lock,html[data-theme=dark] .big,html[data-theme=dark] .rail,html[data-theme=dark] .kpi{background:#171E27!important;color:#E6EBF2!important;border-color:#2C3644!important}
html[data-theme=dark] .chip.on{background:#2F6FE0!important;color:#fff!important;border-color:#2F6FE0!important}
html[data-theme=dark] .btn.sub{background:#1B2C4A!important;color:#C9DAFF!important}
html[data-theme=dark] .btn.ghost{background:#171E27!important;color:#DCE6F5!important;border-color:#2C3644!important}
html[data-theme=dark] .badge{background:#262E39;color:#C9D2DE}
html[data-theme=dark] .b-ok,html[data-theme=dark] .t-ok{background:#163325!important;color:#5FD08F!important}
html[data-theme=dark] .b-hold,html[data-theme=dark] .t-hold{background:#3A1C1A!important;color:#FF8A80!important}
html[data-theme=dark] .b-warn,html[data-theme=dark] .t-warn{background:#332811!important;color:#F2C25B!important}
html[data-theme=dark] .b-ref,html[data-theme=dark] .b-work,html[data-theme=dark] .t-work{background:#2A1F3D!important;color:#C6A3F5!important}
html[data-theme=dark] .b-na,html[data-theme=dark] .t-na{background:#262E39!important;color:#B4BDC9!important}
html[data-theme=dark] .t-blue{background:#1B2C4A!important;color:#9CC0FF!important}
html[data-theme=dark] .err{color:#FF8A80!important}
/* 실행원가·원장 화면 */
html[data-theme=dark] .tab{background:#171E27!important;color:#DCE6F5!important;border-color:#2C3644!important}
html[data-theme=dark] .tab[aria-selected=true]{background:#2F6FE0!important;border-color:#2F6FE0!important;color:#fff!important}
html[data-theme=dark] .ctx select,html[data-theme=dark] .ctx input{background:#171E27!important;color:#E6EBF2!important;border-color:#2C3644!important}
html[data-theme=dark] .kpi.main{background:#171E27!important}
html[data-theme=dark] .f label{color:#C9D2DE!important}
html[data-theme=dark] tr.click:hover td{background:#1B232E}
html[data-theme=dark] .rail button{color:#E6EBF2}
html[data-theme=dark] .rail button:not(:disabled):hover,html[data-theme=dark] .btn:hover{background:#202936!important}
/* 체험 화면 안내 띠 */
html[data-theme=dark] .banner{background:#332811!important;color:#F3DDA6!important;border-bottom-color:#5C4A1F!important}
html[data-theme=dark] .banner b{color:#FFE8B0!important}
html[data-theme=dark] [style*="color:#0F1E33"],html[data-theme=dark] [style*="color:#16345C"]{color:#E6EBF2!important}
html[data-theme=dark] .empty,html[data-theme=dark] .emptybox p{color:#A3AEBD!important}
html[data-theme=dark] table.cards tr,html[data-theme=dark] .sticky,html[data-theme=dark] .pk-panel,html[data-theme=dark] .pk-f button,html[data-theme=dark] .pk-item,html[data-theme=dark] .types label,html[data-theme=dark] .f input,html[data-theme=dark] .f select,html[data-theme=dark] .f textarea,html[data-theme=dark] .ctx{background:#171E27!important;color:#E6EBF2!important;border-color:#2C3644!important}
html[data-theme=dark] .pk-item:hover,html[data-theme=dark] .pk-item[aria-current=true]{background:#1B2C4A!important}
