:root {
  --ink: #161916; --muted: #6d726e; --line: #dfe2df; --line-dark: #c9ceca;
  --green: #355f50; --green-soft: #eef3f0; --paper: #fff; --canvas: #f8f9f8;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { overflow: hidden; }
body { color: var(--ink); background: var(--paper); font: 14px/1.45 var(--sans); overflow: hidden; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden-block, .hidden-control { display: none !important; }
.app { height: 100%; min-height: 0; overflow: hidden; display: grid; grid-template-rows: 78px minmax(0, 1fr); }

.top { display: flex; align-items: center; min-width: 0; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.98); }
.site-back-link { min-height: 44px; display: flex; align-items: center; gap: 9px; padding: 0 22px 0 4px; border-right: 1px solid var(--line); color: var(--green); text-decoration: none; white-space: nowrap; }
.site-back-link > span { font-size: 20px; line-height: 1; transition: transform .15s ease; }
.site-back-link b { font-size: 13px; font-weight: 600; }
.site-back-link:hover { color: #294b3f; }
.site-back-link:hover > span { transform: translateX(-3px); }
.product-name { height: 52px; display: flex; align-items: center; gap: 9px; padding: 0 24px; font-size: 16px; white-space: nowrap; }
.demo-badge { padding: 3px 6px; color: var(--green); background: var(--green-soft); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.top-fields { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; padding: 0 20px; }
.top-field { display: flex; flex-direction: column; gap: 4px; color: #171b18; font-size: 12px; font-weight: 600; }
.top-field input, .top-field select { height: 40px; border: 1px solid var(--line-dark); border-radius: 2px; background: #fff; padding: 0 12px; color: #252925; outline: none; font-size: 13px; }
.top-field input:focus, .top-field select:focus { border-color: var(--green); }
.object-field { flex: 1; max-width: 270px; min-width: 170px; }
.compact { width: 76px; } .purpose { width: 142px; } .build-field { width: 116px; }
.actions { position: relative; align-self: stretch; display: flex; align-items: center; gap: 6px; padding-left: 14px; border-left: 1px solid var(--line); white-space: nowrap; }
.actions button { border: 0; background: none; color: var(--ink); text-transform: uppercase; font-weight: 600; letter-spacing: .06em; height: 44px; padding: 0 14px; font-size: 12px; }
.actions .link-action span { font-size: 22px; vertical-align: -2px; margin-right: 7px; }
#btnCsv { border: 1px solid var(--green); color: #263d35; padding: 0 20px; margin-left: 0; }
#btnCsv span { font-size: 20px; margin-right: 8px; }
.new-project-btn { color: #fff !important; background: var(--green) !important; border: 1px solid var(--green) !important; padding-inline: 17px !important; }
.new-project-btn:hover { background: #294b3f !important; }
.new-project-btn span { margin-right: 6px; font-size: 18px; vertical-align: -1px; }
.new-project-btn .new-project-label { margin-right: 0; font-size: inherit; vertical-align: 0; }
.mobile-meta-toggle, .mobile-nav { display: none; }
.header-more { position: relative; }
.header-more > summary { width: 42px; height: 42px; display: grid; place-items: center; list-style: none; border: 1px solid transparent; color: var(--ink); font-size: 16px; letter-spacing: .08em; cursor: pointer; }
.header-more > summary::-webkit-details-marker { display: none; }
.header-more[open] > summary, .header-more > summary:hover { border-color: var(--line-dark); background: #f8faf9; }
.header-more > div { position: absolute; z-index: 30; right: 0; top: 48px; width: 230px; padding: 6px; background: #fff; border: 1px solid var(--line-dark); box-shadow: 0 12px 30px rgba(31,45,38,.14); }
.header-more > div button { width: 100%; height: 40px; padding: 0 10px; text-align: left; text-transform: none; letter-spacing: 0; font-weight: 500; }
.header-more > div button:hover { color: var(--green); background: var(--green-soft); }

.main { display: grid; grid-template-columns: 340px minmax(440px, 1fr) 430px; min-height: 0; transition: grid-template-columns .24s ease; }
.controls-panel, .bill-panel { min-height: 0; background: #fff; }
.controls-panel { border-right: 1px solid var(--line); padding: 0 18px 18px; overflow-y: scroll; overflow-x: hidden; scrollbar-gutter: stable; overscroll-behavior: contain; }
.control-section { padding: 20px 0 18px; border-bottom: 1px solid var(--line); }
.control-section:first-child { padding-top: 18px; }
h2, h3 { margin: 0; text-transform: uppercase; }
.control-section h2, .bill-title h2 { font-size: 13px; letter-spacing: .11em; font-weight: 700; }
.control-section h2 { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.control-section h3 { margin-bottom: 13px; font-size: 13px; letter-spacing: .09em; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 14px; }
.align-end { align-items: end; }
.field { display: flex; flex-direction: column; gap: 7px; color: #353a36; font-size: 12px; }
.field input, .field select { width: 100%; height: 42px; padding: 0 12px; color: var(--ink); background: #fff; border: 1px solid var(--line-dark); border-radius: 2px; outline: 0; font-size: 13px; }
.field input:focus, .field select:focus { border-color: var(--green); }
.detail-section > .field, .section-disclosure-content > .field { margin-bottom: 13px; }
.section-intro { margin: 0 0 16px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.subsection-title { margin-top: 18px !important; }
.opening-presets { display: grid; gap: 12px; }
.control-disclosure { margin-top: 15px; border: 1px solid var(--line); background: #fbfcfb; }
.control-disclosure > summary, .section-disclosure > summary { position: relative; min-height: 52px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 9px 40px 9px 12px; list-style: none; cursor: pointer; }
.control-disclosure > summary::-webkit-details-marker, .section-disclosure > summary::-webkit-details-marker, .layer-disclosure > summary::-webkit-details-marker { display: none; }
.control-disclosure > summary::after, .section-disclosure > summary::after, .layer-disclosure > summary::after { content: "+"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--green); font-size: 18px; font-weight: 400; }
.control-disclosure[open] > summary::after, .section-disclosure[open] > summary::after, .layer-disclosure[open] > summary::after { content: "−"; }
.control-disclosure summary span, .section-disclosure summary span { color: #2d3530; font-size: 12px; font-weight: 600; }
.control-disclosure summary small, .section-disclosure summary small { color: var(--muted); font-size: 10px; }
.disclosure-content { padding: 12px 11px 14px; border-top: 1px solid var(--line); }
.compact-disclosure { margin-top: 10px; }
.section-disclosure > summary { min-height: 44px; padding: 0 38px 10px 0; }
.section-disclosure > summary::after { right: 2px; }
.section-disclosure-content { padding-top: 5px; }
.section-disclosure-content .grid2 { margin-bottom: 0; }
.section-disclosure-content #cokolioBox { margin-top: 13px; }
.control-group-section { padding: 8px 0; }
.control-group-section:first-child { padding-top: 14px; }
.control-group > summary { min-height: 62px; padding: 10px 42px 10px 13px; border: 1px solid transparent; }
.control-group > summary:hover { border-color: var(--line-dark); background: #fbfdfc; }
.control-group > summary::after { right: 13px; }
.control-group > summary span { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.control-group > summary small { margin-top: 3px; overflow: hidden; color: #5f6862; font-size: 11px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.control-group[open] > summary { border-color: var(--line-dark); background: var(--green-soft); }
.control-group > .section-disclosure-content { padding: 16px 2px 8px; }
.control-group .section-intro { margin-top: -2px; }
summary:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #6e9486; outline-offset: 2px; }
.env-list { display: flex; flex-direction: column; gap: 7px; }
.env-btn { position: relative; width: 100%; min-height: 56px; padding: 11px 44px 11px 13px; text-align: left; color: var(--ink); background: #fff; border: 1px solid var(--line-dark); border-radius: 1px; font-size: 13px; }
.env-btn strong { font-weight: 500; } .env-btn small { display: block; color: var(--muted); margin-top: 2px; }
.env-btn.active { border-color: var(--green); background: #fbfdfc; }
.env-btn.active::after { content: "✓"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: #fff; }
.auto-toggle { display: flex; flex-direction: column; gap: 7px; color: #353a36; font-size: 12px; }
.auto-toggle span { height: 42px; display: flex; align-items: center; gap: 8px; }
.auto-toggle input { position: absolute; opacity: 0; }
.auto-toggle i { width: 21px; height: 21px; display: inline-grid; place-items: center; border-radius: 2px; background: var(--green); }
.auto-toggle i::after { content: "✓"; color: #fff; font-style: normal; font-size: 12px; }
.auto-toggle input:not(:checked) + i { background: #fff; border: 1px solid var(--line-dark); }
.auto-toggle input:not(:checked) + i::after { content: ""; }
.panel-bottom { padding-top: 20px; }
.recalc { min-height: 44px; padding: 8px 0; color: var(--green); background: transparent; border: 0; border-bottom: 1px solid var(--green); text-transform: uppercase; font-weight: 600; letter-spacing: .08em; font-size: 12px; }
.recalc span { margin-left: 10px; font-size: 18px; }
.issues { margin-top: 10px; display: grid; gap: 6px; } .issue { padding: 8px; background: #faf8ed; font-size: 11px; }

.stage { min-width: 0; min-height: 0; background: var(--canvas); }
.viewport { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--canvas); }
.view { position: absolute; inset: 0; } .view.hidden { visibility: hidden; pointer-events: none; } .view canvas { display: block; width: 100%; height: 100%; }
.view-chrome-row { position: absolute; z-index: 6; left: 24px; top: 24px; }
.view-chrome { display: flex; border: 1px solid var(--line-dark); background: #fff; }
.view-chrome button { width: 56px; height: 40px; border: 0; border-right: 1px solid var(--line-dark); background: #fff; color: var(--ink); font-weight: 600; font-size: 13px; }
.view-chrome button:last-child { border-right: 0; } .view-chrome button.on { color: #fff; background: var(--green); }
.view-tools { position: absolute; z-index: 6; right: 14px; top: 24px; width: 72px; display: flex; flex-direction: column; background: rgba(255,255,255,.96); border: 1px solid var(--line); }
.view-tools button { height: 68px; display: grid; place-items: center; align-content: center; gap: 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); }
.view-tools button:last-child { border-bottom: 0; } .view-tools button b { font-size: 25px; line-height: 1; font-weight: 400; } .view-tools button span { font-size: 11px; }
.view-tools button:hover, .view-tools button.on { color: var(--green); background: #f8faf9; }
.model-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 22px; color: var(--ink); background: #fff; border: 1px solid #aeb9b3; box-shadow: 0 24px 70px rgba(27,39,33,.24); overflow: auto; }
.model-dialog::backdrop { background: rgba(24,34,29,.46); backdrop-filter: blur(2px); }
.model-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; text-transform: uppercase; font-size: 11px; letter-spacing: .09em; font-weight: 700; }
.model-panel-head > div { display: flex; align-items: center; gap: 10px; }
.model-panel-head b { padding: 4px 6px; color: var(--green); background: var(--green-soft); font-size: 9px; }
.model-dialog-close { width: 38px; height: 38px; border: 1px solid var(--line-dark); background: #fff; color: var(--ink); font-size: 22px; line-height: 1; }
.model-dialog-close:hover { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.model-dialog-layers { margin-bottom: 14px; }
.model-dialog-section-head { min-height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border: 1px solid var(--line); border-bottom: 0; background: #f8faf9; color: #35413b; font-size: 11px; font-weight: 600; }
.model-dialog-section-head small { color: var(--muted); font-size: 9px; font-weight: 400; }
.layer-disclosure { margin-bottom: 7px; }
.layer-disclosure > summary { position: relative; min-height: 38px; display: flex; align-items: center; gap: 6px; padding: 6px 32px 6px 10px; list-style: none; border: 1px solid var(--line); background: #f8faf9; color: #35413b; font-size: 11px; font-weight: 600; cursor: pointer; }
.layer-disclosure > summary span { margin-left: auto; color: var(--muted); font-size: 9px; font-weight: 400; }
.layer-disclosure > summary::after { right: 9px; font-size: 15px; }
.layer-disclosure[open] > summary { margin-bottom: 5px; }
.model-layers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.model-layers button { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 36px; padding: 6px; border: 1px solid var(--line); background: #fff; color: var(--muted); text-align: left; font-size: 10px; }
.model-layers button.on { color: var(--ink); border-color: #9aaba4; background: #f8faf9; }
.model-layers button::after { content: "OFF"; margin-left: auto; color: #9a615a; font-size: 7px; font-weight: 700; letter-spacing: .05em; }
.model-layers button.on::after { content: "ON"; color: var(--green); }
.model-layers .layer-all { font-weight: 700; }
.model-layers i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #ccc; }
.model-layers .eps-dot { background: #ebe9df; border: 1px solid #d2cdbf; }.model-layers .plinth-dot { background: #82918e; }.model-layers .profile-dot { background: #979e9a; }.model-layers .dowel-dot { background: #31564a; }.model-layers .edge-dot { background: #68706c; }.model-layers .opening-dot { background: #496b7c; }.model-layers .shell-dot { background: #d7dade; }.model-layers .foundation-dot { background: #777570; }.model-layers .roof-dot { background: #707981; }
.model-layers button:not(.on) i { opacity: .25; }
.model-metrics { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); }
.model-metrics div { padding: 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.model-metrics div:last-child { border-right: 0; }.model-metrics div { border-bottom: 0; }
.model-metrics b, .model-metrics span { display: block; }.model-metrics b { font-size: 16px; }.model-metrics span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.model-dialog p { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.model-dialog p strong { color: var(--ink); font-weight: 600; }
.bill-open { display: none; position: absolute; z-index: 7; right: 96px; top: 24px; min-width: 142px; height: 42px; padding: 0 12px; align-items: center; justify-content: space-between; gap: 12px; color: var(--green); background: rgba(255,255,255,.97); border: 1px solid var(--green); box-shadow: 0 5px 16px rgba(37,50,43,.1); }
.bill-open span { text-transform: uppercase; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.bill-open b { color: var(--ink); font-size: 12px; font-weight: 600; }
.opening-size-grid .opening-preset { grid-column: 1 / -1; }
.control-note { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.view-caption { position: absolute; z-index: 6; bottom: 26px; left: 0; right: 0; margin: 0; display: flex; align-items: center; justify-content: center; gap: 13px; color: #4e544f; font-size: 12px; pointer-events: none; }
.mouse-icon { width: 17px; height: 25px; border: 1.5px solid #4e544f; border-radius: 9px; position: relative; } .mouse-icon::after { content: ""; position: absolute; top: 4px; left: 7px; height: 6px; border-left: 1px solid #4e544f; }
.dim-label { padding: 3px 8px; border: 1px solid var(--line-dark); border-radius: 3px; background: rgba(255,255,255,.94); color: var(--ink); font: 600 11px var(--sans); white-space: nowrap; }
.cad-dock { position: absolute; z-index: 7; left: 24px; right: 24px; top: 70px; display: grid; gap: 6px; pointer-events: none; }
.cad-row { display: flex; align-items: stretch; gap: 6px; min-width: 0; }
.cad-tools, .cad-props, .cad-walls { pointer-events: auto; display: flex; align-items: center; gap: 4px; padding: 5px; background: rgba(255,255,255,.97); border: 1px solid var(--line-dark); box-shadow: 0 4px 14px rgba(37,50,43,.06); }
.cad-tools { min-width: 0; flex: 1; }
.cad-tools button, .cad-walls button { min-height: 30px; border: 0; padding: 6px 8px; background: transparent; color: #313733; white-space: nowrap; }
.cad-tools button:hover, .cad-walls button:hover { background: var(--green-soft); color: var(--green); }
.cad-tools button.on, .cad-walls button.on { background: var(--green); color: #fff; }
.cad-walls { flex: none; }
.cad-walls span { padding: 0 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.cad-walls button { width: 30px; padding-inline: 0; font-weight: 700; }
.cad-props { justify-content: flex-start; min-height: 42px; font-size: 11px; }
.cad-props strong { color: var(--green); padding: 0 7px; white-space: nowrap; }
.cad-props > span { min-width: 145px; color: var(--muted); }
.cad-props label { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.cad-props input { width: 54px; height: 27px; border: 1px solid var(--line-dark); padding: 0 5px; }

.bill-panel { display: flex; flex-direction: column; border-left: 1px solid var(--line); padding: 0 24px 18px; overflow: hidden; }
.bill-title { height: 51px; display: flex; align-items: center; justify-content: space-between; flex: none; }
.bill-title h2 { color: #394c45; }
.bill-title button { width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); font-size: 23px; line-height: 1; }
.bill-title button:hover { color: var(--green); background: var(--green-soft); }
.bill-title-actions { display: flex; align-items: center; gap: 3px; }
.bill-title .prices-button { width: auto; padding: 0 8px; color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); flex: none; border: 1px solid var(--line-dark); margin-bottom: 11px; }
.kpi { min-width: 0; height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid var(--line-dark); }
.kpi:last-child { border-right: 0; } .kpi b { font-size: 17px; font-weight: 600; white-space: nowrap; } .kpi span { font-size: 11px; color: #414641; }
.bill-scroll { min-height: 0; flex: 1; overflow-y: scroll; overflow-x: hidden; scrollbar-gutter: stable; overscroll-behavior: contain; }
.controls-panel, .bill-scroll { scrollbar-width: thin; scrollbar-color: #858d88 #eef0ee; }
.controls-panel::-webkit-scrollbar, .bill-scroll::-webkit-scrollbar { width: 11px; }
.controls-panel::-webkit-scrollbar-track, .bill-scroll::-webkit-scrollbar-track { background: #eef0ee; }
.controls-panel::-webkit-scrollbar-thumb, .bill-scroll::-webkit-scrollbar-thumb { background: #858d88; border: 2px solid #eef0ee; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11.5px; }
th, td { height: 29px; padding: 5px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; }
th { font-size: 11px; font-weight: 600; color: var(--ink); } .name, th:first-child { text-align: left; width: 42%; } .qty, th:nth-child(2) { width: 14%; } th:nth-child(3) { width: 10%; } .unit-price, th:nth-child(4) { width: 16%; } .eur, th:last-child { width: 18%; } .dot { display: none; }
.total-bar { flex: none; height: 54px; display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding: 0 18px; border: 1px solid var(--green); text-transform: uppercase; font-size: 11px; letter-spacing: .04em; }
.total-bar b { font-size: 21px; font-weight: 500; letter-spacing: 0; }
.bill-actions { flex: none; display: flex; justify-content: space-between; padding: 18px 8px 0; }
.bill-actions button { border: 0; background: transparent; color: var(--green); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; } .bill-actions button > span { color: var(--ink); margin: 0 13px 0 8px; }
.demo-notice { flex: none; margin: 12px 0 0; padding: 10px 12px; color: #56605a; background: #f5f7f6; border-left: 3px solid #9aaba4; font-size: 11px; line-height: 1.45; }
.demo-notice b { color: #34423b; }
.banner { position: fixed; z-index: 50; inset: 0 auto auto 0; width: 100%; padding: 8px 16px; background: #fff8d7; }
.noscript-notice { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 30px; color: #fff; background: #26332e; text-align: center; font: 600 16px/1.5 "Segoe UI", sans-serif; }

body.bill-collapsed .main { grid-template-columns: 340px minmax(440px, 1fr) 0; }
body.bill-collapsed .bill-panel { visibility: hidden; opacity: 0; padding-inline: 0; border-left: 0; pointer-events: none; }
body.bill-collapsed .bill-open { display: flex; }

.project-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; color: var(--ink); background: #fff; border: 1px solid #b9c2bd; box-shadow: 0 24px 70px rgba(27,39,33,.22); overflow: auto; }
.project-dialog::backdrop { background: rgba(24,34,29,.48); backdrop-filter: blur(2px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 26px 28px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 4px 0 6px; font-size: 25px; line-height: 1.15; letter-spacing: -.02em; text-transform: none; }
.dialog-head p { max-width: 540px; margin: 0; color: var(--muted); font-size: 13px; }
.dialog-eyebrow { color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.dialog-close { flex: none; width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted); background: #fff; border: 1px solid var(--line); font-size: 25px; line-height: 1; }
.dialog-close:hover { color: var(--green); background: var(--green-soft); }
.project-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 22px 28px; }
.project-preset { position: relative; min-height: 118px; display: grid; grid-template-columns: 58px 1fr 22px; align-items: center; gap: 13px; padding: 16px; color: var(--ink); background: #fff; border: 1px solid var(--line-dark); text-align: left; }
.project-preset:hover { border-color: #8ba095; background: #fbfdfc; }
.project-preset.selected { border: 2px solid var(--green); padding: 15px; background: #f8fbf9; }
.project-preset > span:nth-child(2) { min-width: 0; }
.project-preset b, .project-preset small, .project-preset em { display: block; }
.project-preset b { margin-bottom: 5px; font-size: 14px; }
.project-preset small { color: #3f4742; font-size: 12px; }
.project-preset em { margin-top: 5px; color: var(--muted); font-size: 11px; font-style: normal; }
.project-preset > i { width: 21px; height: 21px; display: none; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-size: 12px; font-style: normal; }
.project-preset.selected > i { display: grid; }
.preset-icon { position: relative; width: 54px; height: 48px; display: block; border: 2px solid #708078; border-top: 0; background: linear-gradient(90deg,#e5e8e6 48%,#f2f3f2 48%); }
.preset-icon::before { content: ""; position: absolute; left: 3px; right: 3px; top: -14px; height: 27px; background: #56645e; clip-path: polygon(50% 0,100% 50%,100% 60%,50% 10%,0 60%,0 50%); }
.preset-icon::after { content: ""; position: absolute; width: 11px; height: 17px; left: 7px; bottom: 0; background: #496b7c; box-shadow: 26px -8px 0 #496b7c; }
.preset-icon.tall { height: 57px; }
.preset-flat::before { top: -5px; height: 7px; clip-path: none; }
.dialog-note { margin: 0 28px; padding: 13px 15px; color: #4b554f; background: var(--green-soft); font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 20px 28px 26px; }
.dialog-actions button { min-width: 112px; min-height: 44px; padding: 0 18px; color: var(--ink); background: #fff; border: 1px solid var(--line-dark); font-weight: 600; }
.dialog-actions .primary { min-width: 170px; color: #fff; background: var(--green); border-color: var(--green); }
.dialog-actions .primary:hover { background: #294b3f; }
.dialog-actions .primary span { margin-left: 10px; font-size: 17px; }
.price-dialog { width: min(840px, calc(100vw - 32px)); }
.price-settings { padding: 22px 28px 0; }
.price-global-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.price-help { margin: 10px 0 16px; color: var(--muted); font-size: 11px; }
.price-table-wrap { max-height: 360px; overflow: auto; border: 1px solid var(--line-dark); }
.price-table { font-size: 12px; }
.price-table th { position: sticky; z-index: 1; top: 0; height: 38px; padding: 8px 10px; background: #f5f7f6; text-align: left; }
.price-table th:first-child { width: 12%; }.price-table th:nth-child(2) { width: 41%; }.price-table th:nth-child(3) { width: 9%; }.price-table th:nth-child(4), .price-table th:nth-child(5) { width: 19%; }
.price-table td { height: 46px; padding: 6px 10px; text-align: left; }
.price-table td:nth-child(1), .price-table td:nth-child(3), .price-table td:nth-child(4) { white-space: nowrap; }
.price-table input { width: 100%; min-width: 92px; height: 34px; padding: 0 8px; border: 1px solid var(--line-dark); background: #fff; }
.price-table input:focus { border-color: var(--green); outline: 2px solid #b8ccc4; outline-offset: 1px; }
.price-table .position-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; cursor: pointer; font-weight: 700; color: var(--green); }
.price-table .position-toggle input { width: 18px; min-width: 18px; height: 18px; padding: 0; accent-color: var(--green); }
.price-table .price-position-row.excluded { background: #f3f4f3; color: var(--muted); }
.price-table .price-position-row.excluded .position-toggle { color: var(--muted); }
.price-table .price-position-row.excluded .position-toggle span { font-size: 0; }
.price-table .price-position-row.excluded .position-toggle span::after { content: "Ne"; font-size: 12px; }
.price-dialog-actions { justify-content: space-between; }
.price-dialog-actions #btnResetPrices { margin-right: auto; }

@media (min-width: 981px) {
  body { position: fixed; inset: 0; width: 100%; height: 100%; overflow: clip; }
}

@media (max-width: 1600px) and (min-width: 981px) {
  .product-name { display: none; }
  .site-back-link { padding-right: 14px; }
  .top-fields { padding-inline: 14px; }
}

@media (max-width: 1280px) {
  .app { grid-template-rows: auto minmax(0,1fr); } .top { min-height: 88px; flex-wrap: wrap; padding: 8px 16px; } .top-fields { order: initial; width: auto; padding: 0 12px; } .actions { margin-left: auto; } .actions .link-action { display: none; } .main, body.bill-collapsed .main { grid-template-columns: 300px minmax(400px,1fr); } .bill-panel { position: fixed; z-index: 25; top: 0; right: 0; bottom: 0; width: 390px; visibility: visible; opacity: 1; pointer-events: auto; box-shadow: -14px 0 34px rgba(28,40,34,.13); transition: opacity .2s ease, transform .2s ease; } body.bill-collapsed .bill-panel { visibility: hidden; opacity: 0; transform: translateX(24px); pointer-events: none; } .bill-open { display: none; } body.bill-collapsed .bill-open { display: flex; }
}
@media (max-width: 980px) {
  html { overflow-y: auto; overflow-x: hidden; } body { height: auto; overflow: visible; } .app { height: auto; overflow: visible; display: block; } .top { position: sticky; top: 0; z-index: 20; } .product-name { display: none; } .main, body.bill-collapsed .main { display: grid; grid-template-columns: 290px 1fr; } .controls-panel { overflow: visible; } .stage { height: 620px; } .bill-panel, body.bill-collapsed .bill-panel { position: static; width: auto; transform: none; box-shadow: none; visibility: visible; opacity: 1; pointer-events: auto; grid-column: 1 / -1; height: 700px; padding: 0 24px 18px; border-left: 1px solid var(--line); border-top: 1px solid var(--line); } .bill-open, body.bill-collapsed .bill-open { display: none; } .bill-title button { display: none; } .top-fields { overflow-x: auto; } .object-field { min-width: 220px; }
}
@media (max-width: 840px) {
  html { scroll-padding-top: 10px; }
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .top { position: relative; min-height: 68px; padding: 8px 12px; }
  .site-back-link { min-height: 42px; padding: 0 12px 0 0; }
  .actions { margin-left: auto; padding-left: 8px; border: 0; }
  .actions #btnCsv { display: none; }
  .actions button { height: 42px; padding-inline: 10px; }
  .mobile-meta-toggle { display: inline-flex !important; align-items: center; gap: 6px; color: var(--green) !important; border: 1px solid var(--line-dark) !important; }
  .mobile-meta-toggle[aria-expanded="true"] { background: var(--green-soft) !important; border-color: var(--green) !important; }
  .top-fields { display: none; order: 3; flex: 1 0 100%; width: 100%; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; padding: 12px 0 4px; overflow: visible; }
  body.mobile-meta-open .top-fields { display: grid; }
  .object-field { grid-column: 1 / -1; max-width: none; min-width: 0; }
  .top-field { width: auto; min-width: 0; }
  .top-field input, .top-field select { width: 100%; }
  .field input, .field select, .top-field input, .top-field select, .cad-props input, .price-table input { min-height: 46px; font-size: 16px; }
  .control-group > summary { min-height: 66px; }
  .env-btn { min-height: 62px; }
  .recalc { min-height: 48px; }
  .main, body.bill-collapsed .main { display: flex; flex-direction: column; }
  .stage { order: 1; height: clamp(400px, 68vw, 520px); scroll-margin-top: 8px; }
  .controls-panel { order: 2; width: 100%; padding: 8px 18px 24px; border-top: 1px solid var(--line); border-right: 0; scroll-margin-top: 8px; }
  .bill-panel, body.bill-collapsed .bill-panel { order: 3; width: 100%; height: min(760px, 88svh); padding-inline: 18px; border-left: 0; scroll-margin-top: 8px; }
  .view-chrome-row { left: 12px; top: 12px; }
  .view-chrome button { width: 52px; height: 38px; }
  .view-tools { left: 8px; right: 8px; top: auto; bottom: 10px; width: auto; flex-direction: row; }
  .view-tools button { flex: 1; min-width: 0; height: 56px; border-right: 1px solid var(--line); border-bottom: 0; }
  .view-tools button:last-child { border-right: 0; }
  .view-tools button b { font-size: 21px; }
  .view-tools button span { font-size: 9px; }
  .view-caption { display: none; }
  .view canvas { touch-action: none; }
  .cad-dock { left: 8px; right: 8px; top: 60px; gap: 5px; }
  .cad-row { display: grid; grid-template-columns: 1fr; gap: 5px; }
  .cad-tools, .cad-walls, .cad-props { overflow-x: auto; scrollbar-width: thin; }
  .cad-walls { justify-content: center; }
  .cad-props { min-height: 40px; }
  .cad-tools button, .cad-walls button { min-height: 40px; }
  .cad-props > span { min-width: 128px; }
  .bill-title .prices-button { display: block; min-height: 44px; }
  .mobile-nav { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; height: calc(58px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(3,1fr); padding-bottom: env(safe-area-inset-bottom); background: rgba(255,255,255,.98); border-top: 1px solid var(--line-dark); box-shadow: 0 -5px 18px rgba(30,42,36,.1); }
  .mobile-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; border-right: 1px solid var(--line); color: #3f4b45; background: transparent; font-size: 10px; font-weight: 600; }
  .mobile-nav button:last-child { border-right: 0; }
  .mobile-nav button:active { color: var(--green); background: var(--green-soft); }
  .mobile-nav span { color: var(--green); font-size: 18px; line-height: 1; }
}
@media (max-width: 680px) {
  .site-back-link { order: 0; }
  .site-back-link b { font-size: 12px; }
  .actions { order: 1; width: auto; }
  .actions .link-action, #btnCsv { display: none; }
  .new-project-btn { padding-inline: 11px !important; }
  .new-project-btn .new-project-label { font-size: 0; }
  .new-project-btn .new-project-label::after { content: "Naujas"; font-size: 11px; }
  .top-fields { order: 2; }
  .controls-panel { max-height: none; overflow: visible; padding-inline: 16px; }
  .stage { height: clamp(400px, 68vw, 520px); }
  .bill-panel, body.bill-collapsed .bill-panel { height: min(740px, 90svh); padding-inline: 14px; }
  .model-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); padding: 14px; }
  .model-dialog .model-layers { grid-template-columns: repeat(2, 1fr); }
  .model-dialog .model-metrics { grid-template-columns: repeat(2, 1fr); }
  .model-dialog .model-metrics div:nth-child(2n) { border-right: 0; }
  .model-dialog .model-metrics div:last-child { grid-column: 1 / -1; }
  .model-metrics span { font-size: 8px; }
  .project-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); }
  .dialog-head { padding: 20px 18px 16px; }
  .dialog-head h2 { font-size: 22px; }
  .project-presets { grid-template-columns: 1fr; padding: 16px 18px; }
  .project-preset { min-height: 104px; }
  .dialog-note { margin-inline: 18px; }
  .dialog-actions { padding: 16px 18px 20px; }
  .dialog-actions button { flex: 1; min-width: 0; }
  .bill-scroll table th:nth-child(4), .bill-scroll table td:nth-child(4) { display: none; }
  .bill-scroll table .name, .bill-scroll table th:first-child { width: 46%; }
  .bill-scroll table .qty, .bill-scroll table th:nth-child(2) { width: 18%; }
  .bill-scroll table th:nth-child(3) { width: 12%; }
  .bill-scroll table .eur, .bill-scroll table th:last-child { width: 24%; }
}
@media (max-width: 420px) {
  .top { padding-inline: 9px; }
  .back-full { display: none; }
  .site-back-link { padding-right: 9px; }
  .actions { gap: 3px; padding-left: 4px; }
  .actions button { padding-inline: 8px; font-size: 10px; }
  .header-more > summary { width: 38px; }
  .mobile-meta-toggle { font-size: 0 !important; width: 42px; justify-content: center; }
  .mobile-meta-toggle span { font-size: 15px; }
  .stage { height: 360px; }
  .view-tools button span { display: block; font-size: 8px; }
  .view-tools button { height: 52px; }
  .grid2 { gap: 11px 10px; }
  .kpi b { font-size: 15px; }
  .kpi span { font-size: 9px; }
  .bill-actions { padding-inline: 0; }
  .bill-actions button > span { margin-inline: 5px; font-size: 10px; }
}
@media (max-width: 840px) and (orientation: landscape) {
  .stage { height: clamp(340px, calc(100svh - 68px), 440px); }
}
@media (max-width: 560px) {
  .price-global-grid { grid-template-columns: 1fr; }
  .price-settings { padding-inline: 18px; }
  .price-table-wrap { overflow-x: auto; }
  .price-table { min-width: 610px; }
  .price-dialog-actions { flex-wrap: wrap; }
  .price-dialog-actions #btnResetPrices { flex-basis: 100%; margin-right: 0; }
}
@media print { .top, .controls-panel, .stage, .bill-actions, .mobile-nav { display: none !important; } .main { display: block; } .bill-panel { border: 0; height: auto; } .bill-scroll { overflow: visible; } .demo-notice { margin-top: 16px; border: 1px solid #aaa; } }
