:root{font:16px 'Segoe UI',system-ui,sans-serif;color:#263238;background:#F5F7F6;--petroleum:#123C49;--copper:#C98254;--muted:#62727b}
*{box-sizing:border-box}body{padding:0 18px 28px;max-width:1600px}h1{display:flex;align-items:center;gap:8px;font-size:23px;margin:0 -18px 8px;padding:18px 22px;color:white;background:#123C49;letter-spacing:-.4px}h1 img{width:38px;height:38px;margin-right:4px!important}h1 .brand-variant{font-size:17px;font-weight:400;letter-spacing:0}h2{font-size:21px;color:#123C49;margin-top:8px}h3{font-size:18px;color:#123C49}body>p:first-of-type{color:#62727b;font-size:14px;margin:10px 0}#status{background:#e9eff0;color:#123C49;border-left:3px solid #C98254;border-radius:8px;font-size:14px;line-height:1.5;padding:10px 14px}
section{background:#fff;border:1px solid #e0e5e6;border-radius:14px;padding:18px;margin:16px 0;box-shadow:0 2px 10px #123C4905}button,input,select,textarea{min-height:46px;border-radius:8px;font-size:15px}input,select,textarea{border:1px solid #ccd5d8;background:#fff;color:#263238}button{background:#123C49;color:#fff;cursor:pointer}button:hover{filter:brightness(1.1)}button:disabled{background:#dbe1e2;color:#6d787c;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #C98254;outline-offset:2px}button.secondary{background:#263238}#save,#makeLine,#applyRange,#acceptSplit,#transfer{background:#C98254;color:#172c34;font-weight:650}#deleteService,#removeLine{background:#fff!important;color:#91483c;border:1px solid #d8b9b4}#new,#openProject{width:auto;min-width:145px;margin-right:8px}
.tabs{top:0;background:#F5F7F6;padding:8px 0;gap:8px;z-index:4}.tabs button{background:#e8eded;color:#52616a;border-radius:8px}.tabs button[aria-selected="true"]{background:#123C49;color:#fff;border-bottom:3px solid #C98254}
svg#preview{height:clamp(320px,50vh,600px);background:#F5F7F6;border:1px solid #e0e5e6;border-radius:12px}#metrics.area-summary{background:#f4ebe4;color:#123C49;border-radius:8px;padding:12px;margin:8px 0 16px;font-size:15px;font-weight:600;min-height:44px;white-space:pre-wrap}.drawing-controls{margin-bottom:8px}.drawing-controls button{background:#fff;color:#123C49;border:1px solid #ccd5d8}.two-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px}dialog{background:#F5F7F6;border:1px solid #d2dbde;max-width:620px}dialog::backdrop{background:#123C4950}details{padding:14px 0}summary{cursor:pointer;color:#123C49;font-weight:600}.import-box{background:#f7f9f8;border:1px dashed #aabdc3}small{font-size:13px;line-height:1.5;color:#62727b}#neighbors{font-size:14px;color:#123C49;overflow-wrap:anywhere}#points{max-height:280px;overflow:auto}.drawing-grid{display:block}.drawing-sidebar{min-width:0}#sample{white-space:pre;overflow:auto}#chosen{overflow-wrap:anywhere}.drawing-sidebar section{margin:12px 0}svg text{font-family:'Segoe UI',system-ui,sans-serif}
@media(min-width:900px) and (orientation:landscape){body{padding:0 24px 24px}h1{margin:0 -24px 8px;padding:16px 28px}.drawing-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(285px,340px);gap:18px;align-items:start}.drawing-view{position:sticky;top:68px;min-width:0}svg#preview{height:calc(100dvh - 270px);min-height:320px;max-height:850px}.drawing-sidebar{max-height:calc(100dvh - 130px);overflow:auto;padding-right:5px}.drawing-sidebar input,.drawing-sidebar select,.drawing-sidebar button{min-height:44px}section[data-panel="service"]{max-width:900px;margin-left:auto;margin-right:auto}section[data-panel="files"]{max-width:800px;margin-left:auto;margin-right:auto}}
@media(max-width:380px){body{padding-left:10px;padding-right:10px}h1{margin-left:-10px;margin-right:-10px;padding:14px;font-size:20px}section{padding:12px}button{font-size:14px}.tabs{gap:4px}.two-columns{gap:6px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

@media(min-width:900px) and (orientation:landscape){body>p:first-of-type{display:none}h1{padding:12px 28px;margin-bottom:6px}#status{margin:8px 0;padding:8px 12px}.drawing-view{top:65px}svg#preview{height:calc(100dvh - 300px);min-height:300px}.drawing-sidebar{max-height:calc(100dvh - 225px)}}

@media(min-width:900px) and (orientation:landscape){svg#preview{height:calc(100dvh - 440px);min-height:180px}.drawing-sidebar{max-height:calc(100dvh - 270px)}}

.generation-dialog{max-width:1200px;width:96vw;padding:18px}.generation-dialog[aria-busy="true"] #generationStatus:before{content:"◌ ";display:inline-block;animation:working 1.2s linear infinite}#generationStatus{padding:10px;background:#e9eff0;color:#123C49;border-left:3px solid #C98254}#openGeneration,#generateLocal,#exportDelivery{background:#C98254;color:#172c34;font-weight:650}#generatedView svg{display:block;min-width:600px}.generation-dialog #generatedView{max-height:65vh;overflow:auto}#draftHint{line-height:1.5}details>summary{cursor:pointer;padding:8px 0;color:#123C49;font-weight:600}@keyframes working{to{transform:rotate(360deg)}}
