:root {
  color-scheme: light;
  --navy: #28373f;
  --navy-dark: #1e2a31;
  --ink: #334149;
  --muted: #7b898b;
  --line: #e2e7e7;
  --line-dark: #cbd5d4;
  --panel: #ffffff;
  --canvas: #fafbf9;
  --accent: #26735b;
  --accent-hover: #1b624b;
  --accent-light: #edf5ef;
  --accent-line: #b9d7c5;
  --danger: #b7524c;
  --radius: 6px;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, input, select { outline-offset: 3px; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #4b9978; }
button { color: inherit; }
button svg { width: 17px; height: 17px; flex-shrink: 0; }
button:disabled { cursor: not-allowed; opacity: .42; }
button:disabled:hover { background: inherit; }
svg { display: block; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; line-height: 0; }
[data-icon] > svg { width: 17px; height: 17px; }
input[type="checkbox"] { accent-color: var(--accent); }
input[type="file"].hidden, .hidden { display: none !important; }
.muted { color: var(--muted); }

.app-shell { display: flex; flex-direction: column; height: 100dvh; min-height: 520px; overflow: hidden; }
.topbar { display: flex; align-items: center; gap: 22px; flex-shrink: 0; min-height: 54px; padding: 0 16px; color: #fff; background: #242b34; border-bottom: 1px solid #171e27; }
.brand { display: flex; gap: 9px; align-items: center; min-width: 170px; user-select: none; color: #fff; text-decoration: none; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #ffffff0b; color: #a6c8aa; }
.brand-mark svg { width: 23px; height: 23px; }
.brand-title { display: block; font-size: 15px; line-height: 1.1; font-weight: 650; letter-spacing: .4px; }
.brand-subtitle { display: block; color: #a3adb9; font-size: 9px; letter-spacing: .75px; margin-top: 4px; text-transform: uppercase; }
.project-heading { display: flex; flex: 1; align-items: baseline; gap: 12px; min-width: 0; }
#project-name { min-width: 90px; width: 205px; max-width: 100%; padding: 4px 0; color: #edf1f6; font-size: 12px; border: 0; border-bottom: 1px solid transparent; background: transparent; text-overflow: ellipsis; }
#project-name:hover, #project-name:focus { border-bottom-color: #ffffff50; }
.save-state { color: #abc0c5; font-size: 11px; white-space: nowrap; }
.save-state::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #91bfa2; margin-right: 6px; vertical-align: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.topbar-actions button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 30px; padding: 5px 9px; white-space: nowrap; color: #d5dce6; background: transparent; border: 1px solid #ffffff24; border-radius: 5px; font-size: 11px; }
.topbar-actions button svg { width: 15px; height: 15px; }
.header-project-actions { display: flex; align-items: center; gap: 4px; padding-right: 8px; margin-right: 2px; border-right: 1px solid #ffffff21; }
.topbar-actions .local-badge { padding: 0 6px; }
.topbar-actions button:hover { color: #fff; background: #ffffff0e; border-color: #ffffff48; }
.topbar-actions button.primary { background: #dceafc; color: #294a74; border-color: #dceafc; }
.topbar-actions button.primary:hover { background: #c7ddfa; }
.workspace-tabs { display: flex; align-items: center; flex-shrink: 0; min-width: 0; gap: 2px; }
.workspace-tab { display: flex; justify-content: center; align-items: center; gap: 5px; min-width: 0; min-height: 31px; padding: 6px 5px; border: 1px solid transparent; border-radius: 5px; color: #7b8592; background: transparent; font-size: 11px; }
.workspace-tab svg { width: 13px; height: 13px; }
.workspace-tab:hover { color: #36475d; background: #f3f5f8; }
.workspace-tab.active { color: #3569ac; border-color: #dbe6f7; background: #edf3fc; font-weight: 600; }
.local-badge { display: inline-flex; align-items: center; gap: 5px; color: #909ba9; font-size: 9px; white-space: nowrap; }
.local-badge::before { content: ""; width: 5px; height: 5px; background: #8da58b; border-radius: 50%; }
.icon-button { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; background: transparent; border: 1px solid transparent; border-radius: 4px; color: #63746a; }
.icon-button:hover { background: #eef3ec; color: #294a36; border-color: #dfe7db; }
.icon-button.active, .icon-button[aria-pressed="true"] { color: var(--accent); background: #e8f1e7; border-color: #cbdac6; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 30px; border-radius: 4px; background: transparent; border: 1px solid transparent; padding: 5px 8px; color: #5d7062; font-size: 12px; }
.text-button:hover { background: #edf3e9; }
.toggle { display: inline-flex; align-items: center; gap: 6px; color: #6c7d6f; font-size: 11px; user-select: none; white-space: nowrap; }
.toggle input { width: 13px; height: 13px; margin: 0; }
.toggle [data-icon] > svg { width: 13px; height: 13px; }
.primary { display: inline-flex; justify-content: center; align-items: center; gap: 7px; border: 1px solid var(--accent); color: #fff; background: var(--accent); border-radius: 5px; min-height: 32px; padding: 7px 12px; }
.primary:hover { background: var(--accent-hover); }
.subtle { border: 1px solid var(--line); border-radius: 5px; background: #fff; min-height: 30px; padding: 6px 10px; }
.subtle:hover { background: #f4f7f2; border-color: #ccd8ca; }
.danger { color: var(--danger); border: 1px solid #ecd9d4; background: #fff; border-radius: 5px; min-height: 30px; padding: 5px 10px; }
.danger:hover { background: #fff3f0; }
.badge { display: inline-block; border: 1px solid #dae5d8; border-radius: 4px; color: #769267; font-size: 10px; padding: 2px 6px; }

.editor-layout { flex: 1; min-height: 0; min-width: 0; display: grid; grid-template-columns: 56px 184px minmax(0, 1fr) 264px; }
.command-rail { display: flex; flex-direction: column; align-items: center; gap: 9px; min-width: 0; min-height: 0; padding: 12px 6px 10px; overflow-y: auto; overflow-x: hidden; background: #1b2028; border-right: 1px solid #151a21; scrollbar-width: none; }
.command-rail::-webkit-scrollbar { display: none; }
.rail-group, .command-rail .command-group { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; width: 100%; padding: 3px 0; border-radius: 9px; background: #242b35; }
.command-rail .rail-button { display: inline-grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; min-height: 36px; margin: 0; padding: 0; border: 1px solid transparent; border-radius: 7px; color: #aeb9c8; background: transparent; }
.command-rail .rail-button [data-icon] > svg, .command-rail .rail-button svg { width: 18px; height: 18px; }
.command-rail .rail-button:hover { color: #e7edf5; background: #343e4c; border-color: transparent; }
.command-rail .rail-button.active, .command-rail .rail-button[aria-pressed="true"], .command-rail .rail-button[aria-expanded="true"] { color: #91bbff; background: #32435c; border-color: #4c6b91; }
.command-rail .rail-button:focus-visible { outline: 2px solid #78adff; outline-offset: 2px; }
.command-rail .rail-button:disabled { opacity: .3; }
.command-rail .rail-button:disabled:hover { color: #aeb9c8; background: transparent; }
.rail-separator, .command-rail .command-separator { display: block; flex-shrink: 0; width: 24px; height: 1px; margin: 0; background: #37404c; }
.rail-bottom { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; margin-top: auto; padding-top: 8px; }
.rail-caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tools-panel { display: flex; flex-direction: column; min-width: 0; overflow-y: auto; background: #fff; border-right: 1px solid #dfe4eb; padding: 13px 9px 12px; scrollbar-width: thin; scrollbar-color: #dce0e6 transparent; }
.tools-panel h2 { margin: 0 7px; color: #414b59; font-size: 12px; font-weight: 650; }
.design-panel .workspace-tabs, .design-panel .design-mode-tabs { display: flex; flex-shrink: 0; align-items: stretch; gap: 2px; margin: 10px -2px 6px; padding: 3px; border: 1px solid #e7eaf0; border-radius: 7px; background: #f7f8fa; }
.design-panel .workspace-tab { flex: 1 1 0; min-height: 29px; padding: 5px 3px; font-size: 10px; gap: 4px; letter-spacing: -.1px; }
.design-panel .workspace-tab.active { background: #fff; color: #356cac; border-color: #e0e5ec; box-shadow: 0 1px 3px #172c4810; }
.panel-caption { margin: 5px 7px 9px; font-size: 10px; color: #969eaa; line-height: 1.5; }
.design-panel #tool-caption { min-height: 15px; font-size: 10px; }
.tool-list { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 3px; }
.tool-list > * { min-width: 0; }
.tool { display: flex; align-items: center; width: 100%; min-height: 34px; padding: 6px 7px; gap: 7px; border: 1px solid transparent; border-radius: 5px; background: transparent; text-align: left; color: #647080; }
.tool:hover { background: #f4f6f9; color: #364a64; }
.tool.active, .tool[aria-expanded="true"] { background: #edf3fc; border-color: #dce7f6; color: #3769a6; }
.tool-icon { width: 20px; height: 20px; display: grid; place-items: center; flex-shrink: 0; color: #8b96a6; }
.tool-icon svg { width: 18px; height: 18px; }
.tool.active .tool-icon, .tool[aria-expanded="true"] .tool-icon { color: #4d81c2; }
.tool-label { min-width: 0; font-size: 12px; line-height: 1.35; flex: 1; }
.tool-sublabel { display: block; margin-top: 2px; color: #9aa4af; font-size: 9px; line-height: 1.3; font-weight: 400; }
.tool-chevron { flex-shrink: 0; margin-left: auto; color: #aeb7c3; font-size: 18px; font-weight: 300; line-height: 1; }
.tool[aria-expanded="true"] .tool-chevron { color: #5b86bd; }
.tool.active .tool-label { font-weight: 600; }
.plant-library-button { border-color: transparent; background: transparent; }
.plant-library-button:hover, .plant-library-button[aria-expanded="true"] { border-color: #dce7f6; background: #edf3fc; color: #3769a6; }
.plant-library-button .tool-label { white-space: normal; }
.plant-library-button .badge { flex-shrink: 0; padding: 1px 4px; font-size: 9px; line-height: 1.4; background: #fff; }
.shortcut { margin-left: auto; color: #aab2bc; font-size: 9px; font-family: inherit; font-variant-numeric: tabular-nums; }
.section-label { margin: 17px 7px 6px; color: #a0a8b3; font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .65px; line-height: 1.4; }
.design-panel .tool-list > .section-label:first-child { margin-top: 9px; }
.tools-panel hr { margin: 14px 8px; border: 0; border-top: 1px solid var(--line); }
.tools-panel .subtle { width: 100%; margin-top: 8px; font-size: 11px; }
.tool-note, .tools-note { margin: 20px 8px 0; color: #9aa592; font-size: 10px; line-height: 1.6; }
.irrigation-catalog-field { margin: 0 9px 9px; }
.pipe-type-field { margin: 0 7px 5px; }
.pipe-type-field > span { font-size: 10px; }
.pipe-summary { margin: 3px 8px 8px; color: #82988e; font-size: 10px; line-height: 1.6; }
.pipe-summary > div { display: flex; justify-content: space-between; gap: 8px; }
.pipe-summary strong { color: #527d84; font-weight: 500; }
.pipe-summary p { margin: 0; }
.pipe-object { cursor: move; }
.pipe-hit { fill: none; stroke: transparent; stroke-width: 14; vector-effect: non-scaling-stroke; pointer-events: stroke; }
.pipe-line { fill: none; stroke: var(--pipe-color); stroke-width: var(--pipe-width); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.pipe-object.selected .pipe-line { stroke-width: calc(var(--pipe-width) + 1px); }
.pipe-role-mainline .pipe-line { stroke-width: calc(var(--pipe-width) + 1px); }
.pipe-role-lateral .pipe-line { stroke-dasharray: 7 3; }
.pipe-role-unassigned .pipe-line { stroke-dasharray: 3 3; }
.pipe-role-ambiguous .pipe-line { stroke-dasharray: 9 3; }
.pipe-role-conflict .pipe-line { stroke-dasharray: 2 3; }
.pipe-legend { position: absolute; top: 12px; right: 14px; display: flex; flex-wrap: wrap; gap: 6px 13px; width: max-content; max-width: min(340px, calc(100% - 28px)); padding: 9px 11px; border: 1px solid #dfe6df; border-radius: 6px; background: #fafbf9ed; font-size: 10px; color: #60776a; pointer-events: none; }
.pipe-legend-item { display: inline-flex; gap: 5px; align-items: center; }
.pipe-legend-item i { width: 22px; border-top: 3px solid #d6453d; }
.pipe-legend-item.is-lateral i { border-top: 2px dashed #3a8758; }
.pipe-legend-item.is-unassigned i { border-top: 2px dashed #87929e; }
.pipe-legend-item.is-warning i { border-top: 2px dashed #b67d21; }
.pipe-network-notice { width: 100%; color: #a56b25; }
.pipe-role-card, .box-supply-card { margin: 12px 0; padding: 9px; border: 1px solid #dbe4dd; border-radius: 5px; background: #f5f8f3; font-size: 11px; line-height: 1.5; }
.pipe-role-card p, .box-supply-card p { margin: 6px 0; }
.pipe-role-badge { color: var(--role-color); }
.pipe-role-badge::before { content: ''; display: inline-block; width: 18px; margin-right: 6px; border-top: 3px solid var(--role-color); vertical-align: middle; }
.pipe-role-issues { padding-left: 16px; margin: 6px 0; color: #a56b25; }
.box-supply-card.is-warning { border-color: #e1c69d; background: #fff8eb; }
.box-supply-card.is-warning > strong { color: #a56b25; }
.box-supply-card.is-connected > strong { color: #3b8057; }
.valve-box.supply-warning rect { fill: #fff1d9; stroke: #bb842c; }
.valve-box .box-feed-warning { font-size: var(--label-size); fill: #b36b1c; font-weight: 700; }
.pipe-junction.hydrant-object circle { fill: #fff; stroke: #236fa5; stroke-width: 2; vector-effect: non-scaling-stroke; }
.hydrant-object path { fill: none; stroke: #236fa5; stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.pipe-junction.hydrant-object.selected circle { stroke-width: 3; fill: #dceef7; }
.hydrant-object text { fill: #236fa5; paint-order: stroke; stroke: #fafbf9; stroke-width: 3px; vector-effect: non-scaling-stroke; pointer-events: none; }
.pipe-label { fill: var(--pipe-color); font-size: var(--label-size, .52px); text-anchor: middle; paint-order: stroke; stroke: #fafbf9; stroke-width: 3px; vector-effect: non-scaling-stroke; pointer-events: none; }
.pipe-vertex { fill: #fff; stroke: var(--pipe-color); stroke-width: 1.8; vector-effect: non-scaling-stroke; cursor: move; }
.pipe-vertex:hover { fill: #dceff3; }
.pipe-vertex.is-attached { fill: #76b886; stroke: #316f48; }
.connection-card { margin: 12px 0 6px; padding: 9px; background: #f2f7f1; border: 1px solid #dce8d9; border-radius: 5px; color: #638165; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.connection-card strong { display: block; color: #4c7657; font-size: 11px; }
.connection-card .text-button { padding: 5px 0; font-size: 10px; }
.point-connection { color: #66876c; font-size: 10px; line-height: 1.4; }
.point-connection .text-button { padding: 4px 0; color: #758c77; font-size: 10px; }
.drip-emitter-line { stroke-dasharray: 1 5; stroke-linecap: round; }
.drip-preview { stroke: #9b6c47; }
.valve-box { cursor: move; }
.valve-box rect { fill: #e4efdf; stroke: #4b8058; stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.valve-box.selected rect { fill: #d1e7ca; stroke-width: 2.8; }
.valve-box path { fill: none; stroke: #4b8058; stroke-width: 1.2; vector-effect: non-scaling-stroke; pointer-events: none; }
.valve-box text { fill: #4b8058; paint-order: stroke; stroke: #fafbf9; stroke-width: 3px; vector-effect: non-scaling-stroke; pointer-events: none; }
.connection-node { fill: #62a273; stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; }
.pipe-junction { cursor: move; }
.pipe-junction circle { fill: #f4fbf5; stroke: #528c77; stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.pipe-junction.selected circle { fill: #82ba9f; stroke-width: 2.8; }
.pipe-preview { fill: none; stroke: #387fad; stroke-width: 2.5; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; pointer-events: none; }
.pipe-cursor { fill: #fff8; stroke: #387fad; stroke-width: 1.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.pipe-points { margin-top: 14px; color: #72918a; font-size: 11px; }
.pipe-points summary { cursor: pointer; }
.pipe-point-row { display: flex; align-items: end; gap: 5px; margin-top: 7px; }
.pipe-point-row > span { width: 12px; padding-bottom: 8px; color: #93a08f; font-size: 10px; }
.pipe-point-row .field { flex: 1; min-width: 0; }
.pipe-point-row .field input { padding: 5px; }
.pipe-remove-point { min-width: 20px; padding: 6px 3px; }
#irrigation-tools .section-label { margin-top: 12px; margin-bottom: 6px; }
#irrigation-tools .tool { min-height: 32px; }
.sprinkler-catalog-heading { display: flex; align-items: center; gap: 6px; }
.sprinkler-catalog-controls { display: grid; gap: 8px; }
.sprinkler-catalog-controls .field { gap: 3px; font-size: 10px; }
.sprinkler-result-count { margin: 8px 0 4px; color: #85947c; font-size: 10px; line-height: 1.4; }
.sprinkler-catalog { display: grid; gap: 4px; max-height: 280px; overflow-y: auto; overscroll-behavior: contain; padding-right: 3px; scrollbar-width: thin; scrollbar-color: #cbded8 transparent; }
.sprinkler-catalog-item { display: grid; gap: 3px; width: 100%; min-width: 0; padding: 8px; border: 1px solid #e0e8de; border-radius: 4px; background: #fcfdfb; color: #456b66; text-align: left; line-height: 1.35; }
.sprinkler-catalog-item:hover { background: #f1f7f4; border-color: #b4d1c7; }
.sprinkler-catalog-item.selected { background: #e9f4ef; border-color: #7fae9c; box-shadow: inset 2px 0 #528b77; }
.sprinkler-catalog-name { font-size: 11px; font-weight: 600; overflow-wrap: anywhere; }
.sprinkler-catalog-family { color: #85998a; font-size: 9px; }
.sprinkler-catalog-size { color: #6d8b82; font-size: 10px; }
.sprinkler-catalog-empty { color: #85947c; font-size: 10px; line-height: 1.5; }
.sprinkler-catalog-group { display: grid; gap: 4px; min-width: 0; }
.sprinkler-catalog-group + .sprinkler-catalog-group { margin-top: 8px; }
.sprinkler-catalog-group h3 { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin: 0; padding: 6px 3px; color: #55796b; font-size: 11px; font-weight: 600; }
.sprinkler-catalog-group h3 span { color: #91a491; font-size: 9px; font-weight: 400; }
.equipment-selected-label { display: block; color: #879a92; font-size: 9px; }
.sprinkler-catalog-meta { margin-top: 10px; color: #82967d; font-size: 10px; line-height: 1.5; }
.sprinkler-catalog-meta summary { cursor: pointer; }
.sprinkler-catalog-meta p { margin: 6px 0; }
#selection-properties:has(.sprinkler-flow-card) .object-heading { margin-bottom: 8px; }
#selection-properties:has(.sprinkler-flow-card) .property-group { margin-top: 10px; }
#selection-properties:has(.sprinkler-flow-card) .field input,
#selection-properties:has(.sprinkler-flow-card) .field select { height: 28px; }
.sprinkler-point-label { fill: #397eaa; font-size: var(--label-size, .52px); text-anchor: middle; pointer-events: none; }
.sprinkler-flow-reference { margin: 6px 0 0; color: #88988a; font-size: 10px; }
.equipment-note { margin: 2px 9px 12px; padding: 9px; border: 1px solid #e0e9e8; border-radius: 5px; background: #f6fafa; color: #7d9697; font-size: 10px; line-height: 1.6; }
.equipment-note strong { color: #547f89; font-weight: 600; }
.equipment-note a, .field-note a { color: #4f8192; text-decoration: underline; text-underline-offset: 2px; }
.irrigation-water-note { margin: 0 9px; }
.irrigation-disclaimer { margin: 15px 9px 0; padding: 9px; border-left: 2px solid #d4b77b; border-radius: 0 4px 4px 0; background: #fbf8ef; color: #9b895f; font-size: 10px; line-height: 1.55; }
.tool-bottom { display: flex; gap: 7px; align-items: flex-start; padding: 18px 6px 0; margin-top: auto; color: #a1aab5; font-size: 9px; line-height: 1.6; }
.tool-bottom [data-icon] { margin-top: 2px; }
.tool-bottom [data-icon] > svg { width: 14px; height: 14px; }
.tool-bottom p { margin: 0; }
.canvas-panel { min-width: 0; min-height: 0; position: relative; display: flex; flex-direction: column; background: var(--canvas); }
.canvas-topline { display: flex; justify-content: space-between; align-items: center; gap: 15px; height: 33px; padding: 0 16px; border-bottom: 1px solid #e4e8ed; background: #fff; flex-shrink: 0; }
.breadcrumb { color: #7e8d7b; font-size: 10px; display: flex; align-items: center; gap: 8px; }
.breadcrumb strong { color: #596b56; font-weight: 500; }
.breadcrumb [data-icon] > svg { width: 12px; height: 12px; }
.canvas-note { color: #9ea795; font-size: 10px; white-space: nowrap; }
.canvas-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--canvas); }
.design-drawer, .floating-panel { position: absolute; z-index: 7; top: 12px; left: 12px; display: flex; flex-direction: column; width: min(320px, calc(100% - 24px)); max-height: calc(100% - 24px); min-height: 0; overflow: hidden; border: 1px solid #d8dfe8; border-radius: 9px; background: #fff; box-shadow: 0 8px 28px #1c30451c, 0 2px 6px #1c30450b; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 8px; min-height: 47px; padding: 11px 14px; border-bottom: 1px solid #e9edf2; background: #fff; }
.drawer-header h2 { display: flex; align-items: center; gap: 7px; margin: 0; color: #445367; font-size: 12px; font-weight: 650; }
.drawer-header .icon-button { flex-shrink: 0; width: 25px; height: 25px; margin: -2px -4px -2px 0; color: #8a96a5; font-size: 21px; font-weight: 300; line-height: 1; }
.drawer-header .icon-button:hover { color: #405471; background: #f1f4f8; border-color: transparent; }
.drawer-body { min-height: 0; padding: 13px 14px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d0d9e2 transparent; }
.drawer-body > .field + .field, .drawer-body > .field + .tool, .drawer-body > .tool + .field { margin-top: 10px; }
.drawer-body .pipe-type-field { margin: 0 0 11px; }
.drawer-body .pipe-summary { margin: 10px 1px 0; }
.drawer-body .tools-note { margin: 10px 1px 0; }
.design-drawer .field { color: #8290a0; }
.design-drawer .field input, .design-drawer .field select, .utility-popover .field input, .utility-popover .field select { color: #4d6278; border-color: #dfe5ed; background: #fcfdff; }
#sprinkler-library { height: min(690px, calc(100% - 24px)); }
#sprinkler-library .drawer-body { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
#sprinkler-library .sprinkler-catalog-controls, #sprinkler-library .sprinkler-result-count, #sprinkler-library .equipment-note { flex-shrink: 0; }
#sprinkler-library .sprinkler-catalog-heading { flex-shrink: 0; margin: 0 0 10px; }
#sprinkler-library .drawer-body > .tool { flex-shrink: 0; margin-top: 7px; }
#sprinkler-library .sprinkler-catalog-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px; }
#sprinkler-library .sprinkler-catalog-controls > .field:first-child { grid-column: 1 / -1; }
#sprinkler-library .sprinkler-catalog { flex: 1; align-content: start; min-height: 80px; max-height: none; margin-top: 3px; padding: 1px 4px 3px 0; }
#sprinkler-library .sprinkler-catalog-item { padding: 9px 10px; border-color: #e3e8ef; border-radius: 5px; color: #4e6b82; background: #fff; }
#sprinkler-library .sprinkler-catalog-item:hover { background: #f5f8fc; border-color: #c1d2e7; }
#sprinkler-library .sprinkler-catalog-item.selected { background: #eef4fc; border-color: #adc7e7; box-shadow: inset 2px 0 #6191ca; }
#sprinkler-library .sprinkler-catalog-group h3 { color: #607990; }
#sprinkler-library .equipment-note { max-height: 85px; margin: 11px 0 0; padding: 8px; overflow-y: auto; font-size: 9px; line-height: 1.45; border-color: #e2e8ed; background: #f7f9fb; color: #8a98a5; }
.utility-popover { width: min(260px, calc(100% - 24px)); }
.utility-popover .toggle { display: flex; align-items: center; gap: 8px; margin: 0; padding: 7px 0; font-size: 11px; color: #6e7e91; white-space: normal; }
.utility-popover .toggle .muted { margin-left: auto; font-size: 10px; }
.utility-popover .toggle input { flex-shrink: 0; }
.utility-popover .tool { min-height: 34px; }
.utility-popover .tool-label { font-size: 11px; }
#view-settings-panel .drawer-body > .text-button { justify-content: flex-start; width: 100%; margin-top: 3px; padding-left: 0; color: #718196; font-size: 11px; }
.plant-library { position: absolute; left: 14px; top: 14px; z-index: 6; display: flex; flex-direction: column; width: min(340px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 14px; overflow: hidden; border: 1px solid #d7e3d0; border-radius: 8px; background: #fffffff5; box-shadow: 0 8px 26px #2d4a251c; }
.plant-library-header { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.plant-library-header h2 { margin: 0; font-size: 13px; font-weight: 650; color: #42633c; }
.plant-library-header .icon-button { width: 25px; height: 25px; font-size: 21px; font-weight: 300; line-height: 1; }
.plant-library-caption { flex-shrink: 0; margin: 0 0 12px; color: #8a9982; font-size: 11px; line-height: 1.5; }
#plant-search { flex-shrink: 0; width: 100%; height: 33px; min-width: 0; margin-bottom: 10px; padding: 6px 10px; border: 1px solid #dce5d6; border-radius: 5px; background: #fbfdf9; color: #526b48; font-size: 11px; }
#plant-search::placeholder { color: #a1ad99; }
#plant-search:focus { border-color: #9ebd91; background: #fff; }
.plant-category-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); flex-shrink: 0; gap: 3px; padding: 0 0 11px; }
.plant-category-tabs button { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 34px; padding: 5px 4px; border: 1px solid transparent; border-bottom: 2px solid #e1e9db; border-radius: 4px 4px 0 0; color: #84947b; background: #f7faf4; font-size: 10px; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
.plant-category-tabs button:hover { color: #56784a; border-color: #c9d9bf; }
.plant-category-tabs button.active, .plant-category-tabs button[aria-pressed="true"], .plant-category-tabs [role="tab"][aria-selected="true"] { color: #316c3d; border-color: #e1edda; border-bottom-color: #397a4c; background: #eaf3e4; font-weight: 600; }
.plant-category-tabs button:focus-visible { outline-offset: -2px; }
.plant-category-tabs .badge { flex-shrink: 0; padding: 1px 3px; border: 0; background: #ffffffb3; font-size: 8px; }
.catalog-result-count { flex-shrink: 0; margin: 0 0 8px; color: #8c9b82; font-size: 10px; line-height: 1.4; }
.plant-catalog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 7px; min-height: 0; padding: 1px 3px 1px 1px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d4dfcd transparent; }
.plant-card { display: flex; align-items: center; flex-direction: column; justify-content: flex-start; gap: 5px; min-width: 0; min-height: 93px; padding: 9px 5px 8px; border: 1px solid #e0e8d9; border-radius: 5px; background: #fff; color: #5d7851; text-align: center; }
.plant-card:hover { background: #f5f9f0; border-color: #bad1ad; }
.plant-card.selected, .plant-card[aria-pressed="true"] { border-color: #91b780; background: #edf5e8; box-shadow: inset 0 0 0 1px #c2d9b8; }
.plant-card svg.plant-thumbnail { display: block; flex-shrink: 0; width: 40px; height: 40px; overflow: visible; }
.plant-card-name { max-width: 100%; font-size: 11px; font-weight: 500; line-height: 1.3; overflow-wrap: break-word; }
.plant-card-mode { color: #9aa88f; font-size: 9px; line-height: 1.3; }
.catalog-placement-badge { display: inline-block; margin-top: auto; padding: 2px 5px; border-radius: 3px; background: #f0f5ec; color: #8a9c7c; font-size: 9px; line-height: 1.3; }
.plant-catalog .plant-empty, .plant-catalog .panel-empty, .plant-catalog .plant-search-empty { grid-column: 1 / -1; margin: 8px 0; color: #98a68c; font-size: 11px; line-height: 1.5; }
.plant-library-note { flex-shrink: 0; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #e8eee2; color: #9aa58f; font-size: 10px; line-height: 1.5; }
#editor-canvas { width: 100%; height: 100%; outline: none; touch-action: none; user-select: none; }
#editor-canvas[data-tool="hand"], #editor-canvas[data-tool="pan"] { cursor: grab; }
#editor-canvas.is-panning { cursor: grabbing; }
#editor-canvas.is-drawing { cursor: crosshair; }
.canvas-overlay { position: absolute; left: 16px; bottom: 58px; pointer-events: none; max-width: calc(100% - 32px); }
.canvas-overlay button { pointer-events: auto; margin-top: 8px; font-size: 11px; }
.canvas-overlay #cancel-drawing { min-height: 32px; padding: 6px 11px; border: 1px solid #d4dfcf; border-radius: 5px; color: #687e5e; background: #fff; margin-left: 4px; }
.canvas-hint { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; color: #87907b; background: #ffffffed; border: 1px solid #e4e9de; border-radius: 5px; font-size: 10px; box-shadow: 0 2px 7px #334b2410; line-height: 1.4; }
.canvas-hint kbd { padding: 1px 3px; border: 1px solid #dce3d3; border-radius: 3px; color: #6b775f; font-family: inherit; font-size: 9px; }
.zoom-controls { position: absolute; display: flex; align-items: center; right: 18px; bottom: 18px; height: 33px; background: #fff; box-shadow: 0 2px 8px #334b2412; border: 1px solid #dfe6d7; border-radius: 5px; overflow: hidden; }
.zoom-controls button { display: grid; place-items: center; border: 0; background: #fff; width: 31px; height: 31px; color: #708064; }
.zoom-controls button:hover { background: #eef4e8; }
.zoom-controls button svg { width: 15px; height: 15px; }
.zoom-controls output { padding: 0 8px; min-width: 51px; text-align: center; font-size: 10px; color: #6f7d62; font-variant-numeric: tabular-nums; }
.scale-indicator { position: absolute; left: 18px; bottom: 18px; color: #929e8a; font-size: 9px; line-height: 1.5; pointer-events: none; }
.scale-indicator::after { content: none; }
#scale-bar { display: block; min-width: 1px; height: 5px; border: 1px solid #a7b59a; border-top: 0; }

.properties-panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; border-left: 1px solid var(--line); background: #fff; scrollbar-width: thin; scrollbar-color: #dce4d9 transparent; }
.properties-panel > .panel-section:first-child { flex: 0 0 auto; min-height: 0; max-height: min(65%, calc(100% - 255px)); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #dce4d9 transparent; }
.properties-panel:has(#groups-panel[open]) > .panel-section:first-child { max-height: min(55%, calc(100% - 330px)); }
.panel-section { padding: 18px 17px; border-bottom: 1px solid var(--line); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 16px; font-size: 12px; font-weight: 600; }
.panel-heading h2 { margin: 0; font-size: 12px; font-weight: 600; }
.panel-heading [data-icon] { color: #a0af96; }
.panel-heading [data-icon] > svg { width: 14px; height: 14px; }
.panel-heading small { font-size: 10px; color: #a4ae9c; font-weight: 400; }
.object-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; }
.object-heading h3 { margin: 0; font-size: 12px; font-weight: 600; }
.type-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 500; padding: 4px 7px; border-radius: 3px; color: #658859; background: #eef5e9; }
.type-chip svg { width: 13px; height: 13px; }
.swatch { display: block; flex-shrink: 0; width: 10px; height: 10px; border-radius: 3px; }
.property-group { display: grid; gap: 12px; margin-top: 14px; }
.plant-property-section { display: grid; gap: 10px; margin: 14px 0; padding: 12px 0; border-top: 1px solid #edf1e8; border-bottom: 1px solid #edf1e8; }
.plant-property-heading { margin: 0; color: #78936b; font-size: 11px; font-weight: 600; }
.plant-size-note { margin: 0; color: #9ba98e; font-size: 10px; line-height: 1.5; }
.greenhouse-note { margin: 0; padding: 7px 8px; border-left: 2px solid #b5ced1; border-radius: 0 4px 4px 0; background: #f4f9f9; color: #819b9b; font-size: 10px; line-height: 1.5; }
.plant-type-select { width: 100%; min-width: 0; }
.plant-stat { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 7px; color: #8da07e; font-size: 10px; line-height: 1.5; }
.plant-stat strong { color: #648457; font-weight: 500; }
.field { display: grid; gap: 5px; color: #83917c; font-size: 11px; }
.field label { font-size: 11px; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; height: 32px; border: 1px solid #dfe6d8; background: #fcfdfb; color: #4e6247; border-radius: 4px; padding: 6px 9px; font-size: 11px; }
.field input:focus, .field select:focus, .field textarea:focus { background: #fff; border-color: #98b991; }
.field textarea { height: auto; min-height: 88px; resize: vertical; line-height: 1.45; }
.field input[type="color"] { width: 32px; padding: 4px; }
.field input[type="checkbox"] { width: 13px; height: 13px; min-height: auto; }
.field input[readonly] { color: #9aa591; background: #f6f8f3; }
.field-row { display: flex; align-items: center; gap: 8px; }
.field-row > .field { flex: 1; min-width: 0; }
.field-row > input, .field-row > select { flex: 1; min-width: 0; }
.field-row span { color: #9ca78f; font-size: 10px; white-space: nowrap; }
.field-note { color: #8f9d83; font-size: 11px; line-height: 1.5; margin: 8px 0 0; }
.property-check { display: flex; align-items: flex-start; gap: 7px; font-size: 11px; line-height: 1.45; color: #7b8c70; }
.property-check input { flex-shrink: 0; width: 13px; height: 13px; margin: 2px 0 0; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 13px 0; margin-top: 5px; border-top: 1px solid #edf1e8; border-bottom: 1px solid #edf1e8; }
.metric { display: flex; flex-direction: column; gap: 4px; }
.metric + .metric { padding-left: 13px; border-left: 1px solid #edf1e8; }
.metric-value { font-size: 16px; color: #4c6941; font-weight: 550; font-variant-numeric: tabular-nums; }
.metric-value small { font-size: 10px; color: #9ba78f; font-weight: 400; margin-left: 2px; }
.metric-label { font-size: 10px; color: #93a083; }
.properties-panel .toggle { font-size: 10px; line-height: 1.4; align-items: flex-start; }
.properties-panel .toggle input { margin-top: 1px; }
.properties-panel .danger { font-size: 10px; width: 100%; margin-top: 15px; display: flex; justify-content: center; align-items: center; gap: 7px; }
.properties-panel .danger svg { width: 14px; height: 14px; }
.object-actions { margin-top: 14px; gap: 7px; }
.object-actions button, .properties-panel .object-actions .danger { display: inline-flex; align-items: center; justify-content: center; flex: 1; min-width: 0; width: auto; margin-top: 0; padding: 6px 5px; font-size: 10px; gap: 5px; }
.object-actions button svg { width: 13px; height: 13px; }
.empty-selection { padding: 10px 0 15px; color: #9ca890; font-size: 11px; line-height: 1.65; }
.empty-selection svg { color: #b4bfa9; width: 25px; height: 25px; margin-bottom: 13px; }
.empty-selection p { margin: 5px 0 0; }
.layer-tabs { display: flex; gap: 14px; border-bottom: 1px solid #e9eee3; margin: -3px 0 8px; }
.layer-tab { border: 0; padding: 5px 0 9px; background: transparent; font-size: 10px; color: #9aa78c; border-bottom: 1px solid transparent; }
.layer-tab.active { color: #55784a; border-bottom-color: #6a965b; }
.layers-section { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 180px; overflow: hidden; }
.layers-section:has(#groups-panel[open]) { min-height: 255px; }
.layers-section .panel-heading { flex-shrink: 0; }
.layers-section > .text-button { flex-shrink: 0; justify-content: flex-start; margin-top: 9px; padding-left: 3px; font-size: 11px; }
.object-list { display: grid; align-content: start; gap: 3px; overflow-y: auto; overflow-x: hidden; min-height: 54px; flex: 1; scrollbar-width: thin; scrollbar-color: #dce4d9 transparent; }
.object-item { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 6px; border: 1px solid transparent; border-radius: 4px; background: transparent; text-align: left; }
.object-item:hover { background: #f8faf5; }
.object-item.selected { background: #edf4e9; border-color: #dbe8d2; }
.object-dot { display: block; flex-shrink: 0; width: 7px; height: 7px; border-radius: 2px; }
.object-meta { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; color: #9ca78f; font-size: 10px; }
.object-title { color: #667b5a; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.object-eye { margin-left: auto; color: #b0bba4; }
.object-eye svg { width: 13px; height: 13px; }
.panel-empty { color: #a1ab95; font-size: 11px; padding: 9px 0; }
.project-summary { display: flex; align-items: flex-start; gap: 7px; flex-shrink: 0; margin-top: auto; padding: 13px 17px 14px; color: #759166; background: #f7faf3; border-top: 1px solid #e5ecdf; font-size: 10px; line-height: 1.7; }
.project-summary .status-dot { margin-top: 6px; flex-shrink: 0; }
.project-summary small { color: #a0ac92; font-size: 9px; }

.statusbar { height: 27px; padding: 0 16px; display: flex; align-items: center; gap: 21px; flex-shrink: 0; background: #fff; border-top: 1px solid var(--line); color: #8d9c83; font-size: 9px; letter-spacing: .1px; }
.status-section { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.status-section:last-child { margin-left: auto; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: #a4bc8e; }
.status-warning { color: #ac9b6e; }
.statusbar output { font-variant-numeric: tabular-nums; }
.toast { position: fixed; left: 50%; bottom: 48px; z-index: 15; transform: translateX(-50%); padding: 11px 18px; background: #234a37; color: #f4f8ef; border-radius: 6px; font-size: 12px; box-shadow: 0 4px 22px #19302025; max-width: min(90vw, 500px); line-height: 1.5; }
.toast.error { background: #8e5348; }

dialog { width: min(460px, calc(100vw - 40px)); padding: 0; border: 1px solid #dae4d6; border-radius: 9px; color: var(--ink); box-shadow: 0 20px 80px #17332f30; }
dialog::backdrop { background: #17332f48; backdrop-filter: blur(2px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; font-size: 15px; font-weight: 600; }
.dialog-body { padding: 20px 22px; font-size: 12px; color: #77886f; line-height: 1.7; }
.dialog-body p:first-child { margin-top: 0; }
.dialog-body p:last-child { margin-bottom: 0; }
.dialog-body ul { padding-left: 18px; margin: 10px 0; }
.dialog-body kbd { border: 1px solid #dfe7d7; padding: 1px 4px; border-radius: 3px; font-family: inherit; font-size: 11px; color: #5f7c52; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 22px; background: #fafcf7; border-top: 1px solid var(--line); }
.wide-dialog { width: min(1000px, calc(100vw - 40px)); max-height: calc(100vh - 40px); }
.workflow-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.drawing-options { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; }
.plan-preview { padding: 10px; border: 1px solid var(--line); background: white; border-radius: 5px; }
.plan-preview > svg { display: block; width: 100%; height: auto; max-height: 48vh; }
.equipment-table-wrap { overflow-x: auto; max-height: 48vh; }
.equipment-table { border-collapse: collapse; width: 100%; font-size: 11px; text-align: left; }
.equipment-table th, .equipment-table td { padding: 8px; border-bottom: 1px solid #dfe7dd; vertical-align: top; }
.equipment-table th { color: #456d5b; position: sticky; top: 0; background: #f1f7ef; }
.equipment-table td:last-child { min-width: 180px; color: #83917d; font-size: 10px; }
.equipment-table td:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; }
.zone-editor-layout { display: grid; grid-template-columns: minmax(0,2fr) minmax(190px,1fr); gap: 22px; }
.zone-member-list { max-height: 25vh; overflow: auto; margin: 8px 0 14px; padding: 8px; border: 1px solid var(--line); border-radius: 5px; }
.zone-member { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; }
.zone-member-meta { display: grid; gap: 3px; }
.zone-member-meta small { color: #81927d; }
.zone-summary-card { padding: 12px; border: 1px solid var(--line); background: #f5f9f2; border-radius: 5px; }
.zone-warning-list { padding-left: 16px; color: #99804b; }
@media (max-width:700px) { .zone-editor-layout { grid-template-columns: 1fr; } }
#print-document { display: none; }
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body > * { display: none !important; }
  body > #print-document { display: block !important; color: #111; font-size: 10pt; background: white; }
  #print-document h1 { margin: 0 0 4mm; font-size: 16pt; }
  #print-document h2 { font-size: 12pt; }
  #print-document > svg { display: block; width: 100%; height: 145mm; }
  #print-document .equipment-table-wrap { max-height: none; overflow: visible; }
  #print-document .equipment-table tr { break-inside: avoid; }
  #print-document .equipment-table th { position: static; }
  #print-document .equipment-table td:last-child { min-width: 0; }
}

.grid-line { stroke: #e7eddf; stroke-width: .55; vector-effect: non-scaling-stroke; }
.grid-line-major { stroke: #dbe4d1; stroke-width: .75; vector-effect: non-scaling-stroke; }
.shape { stroke-width: 1.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill-opacity .12s; }
.shape:hover { filter: brightness(.98); }
.shape.type-lawn { fill: #d5e7c7; fill-opacity: .8; stroke: #9bbc81; }
.shape.type-building { fill: #e5e4dd; stroke: #aaa99a; }
.shape.type-path { fill: #eee6d8; stroke: #ccbea6; }
.shape.type-bed { fill: #e6dfc7; fill-opacity: .8; stroke: #b8ac7c; }
.shape.type-tree { fill: #c3d9ae; fill-opacity: .9; stroke: #91b77b; }
.shape.type-greenhouse { fill: #dfeef0; fill-opacity: .75; stroke: #8cadb0; }
.shape.type-exclusion { fill: url(#exclusion-pattern); stroke: #ce9d8c; stroke-dasharray: 5 3; }
.shape.selected { stroke: #468851; stroke-width: 1.8; }
.shape-label { fill: #688354; font-size: var(--label-size, .52px); font-family: "Segoe UI", sans-serif; font-weight: 500; text-anchor: middle; dominant-baseline: middle; pointer-events: none; user-select: none; }
.type-building + .shape-label { fill: #999787; }
.type-path + .shape-label { fill: #a69a7f; }
.area-label { fill: #91a37f; font-size: calc(var(--label-size, .52px) * .79); font-weight: 400; }
.vertex-handle { fill: #fff; stroke: #428350; stroke-width: 1.5; vector-effect: non-scaling-stroke; cursor: move; }
.vertex-handle:hover { fill: #deeed7; }
.selection-marquee,.selection-bounds,.selection-item-outline { pointer-events: none; vector-effect: non-scaling-stroke; fill: none; stroke: #468851; stroke-width: 1; }
.selection-marquee { fill: #79a96a18; stroke-dasharray: 5 3; }
.selection-bounds { stroke-width: 1.5; stroke-dasharray: 7 4; }
.selection-bounds.invalid { stroke: #b45d4a; }
.selection-item-outline { stroke-opacity: .65; }
.selection-counts { display: grid; gap: 5px; font-size: 11px; margin: 10px 0; }
.selection-counts>div { display: flex; justify-content: space-between; gap: 10px; }
.selection-rotation { margin-top: 10px; }
.selection-members { font-size: 11px; line-height: 1.6; margin: 12px 0; }
.selection-members ul { margin: 8px 0; padding-left: 16px; }
.groups-panel { flex: 0 0 auto; font-size: 11px; margin-bottom: 6px; }
.groups-panel>summary { cursor: pointer; padding: 5px 0; color: #62785a; }
.project-groups { max-height: 72px; overflow: auto; }
.group-row { display: flex; gap: 2px; align-items: center; }
.group-select { display: flex; gap: 6px; justify-content: space-between; align-items: center; flex: 1; min-width: 0; border: 1px solid transparent; background: transparent; font-size: 11px; text-align: left; padding: 6px; border-radius: 4px; }
.group-select>span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-select small { color: #8b9783; }
.group-select.selected { background: #edf4e9; border-color: #dbe8d2; }
.group-action { border: 0; background: transparent; padding: 4px; width: 24px; min-height: 28px; color: #7d8c73; }
.selection-group-name { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.drawing-preview { fill: #a7d5a13b; stroke: #5a9a5a; stroke-width: 1.5; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.drawing-point { fill: #fff; stroke: #5a9a5a; stroke-width: 1.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.water-source { fill: #b7d9d8; stroke: #679ea0; stroke-width: 1.5; vector-effect: non-scaling-stroke; cursor: pointer; }
.water-source > path, .water-source > text { stroke: none; }
.water-source > text { fill: #568ba3; }
.sprinkler-object { cursor: move; }
.sprinkler-coverage { vector-effect: non-scaling-stroke; stroke-width: .9; }
.sprinkler-object.selected .sprinkler-coverage, .sprinkler-area.selected .sprinkler-coverage { stroke-opacity: .95; stroke-width: 1.6; }
.sprinkler-area { cursor: move; }
.sprinkler-direction { fill: none; stroke: #276888; stroke-width: 1.2; vector-effect: non-scaling-stroke; pointer-events: none; }
.sprinkler-body { fill: var(--head-fill, #fff); stroke: var(--head-stroke, #276888); stroke-width: 1.5; vector-effect: non-scaling-stroke; pointer-events: all; }
.sprinkler-core { fill: var(--head-core, #397eaa); stroke: var(--head-fill, #fff); stroke-width: .7; vector-effect: non-scaling-stroke; pointer-events: none; }
.sprinkler-object.selected .sprinkler-body { stroke-width: 2.5; }
.sprinkler-object { outline: none; }
.sprinkler-object:focus-visible .sprinkler-body { stroke-width: 3; }
.sprinkler-placement-settings { flex-shrink: 0; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(80px, .8fr); align-items: center; gap: 8px; margin-top: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface, #f5f8f6); }
.sprinkler-placement-settings .toggle { white-space: normal; font-size: 11px; color: var(--ink); }
.sprinkler-placement-settings .field-note { grid-column: 1 / -1; margin: 0; font-size: 10px; }
.sprinkler-placement-settings .field input { height: 30px; }
#sprinkler-library .drawer-body { overflow-y: auto; }
#sprinkler-library .equipment-note { max-height: 60px; }
@media (max-height: 800px) { .sprinkler-placement-settings .field-note { display: none; } }
.sprinkler-radius-preview { fill: #b7524c09; stroke: #b7524c; stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; pointer-events: none; }
.sprinkler-tooltip { position: absolute; z-index: 9; max-width: min(300px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto; padding: 11px 13px; border: 1px solid var(--line-dark); border-radius: 9px; color: var(--ink); background: #fffffff5; box-shadow: 0 5px 20px #20392e1a; white-space: pre-line; font-size: 11px; line-height: 1.6; pointer-events: none; }
.sprinkler-angle-handle, .sprinkler-arc-handle { stroke: #276888; stroke-width: 1.5; vector-effect: non-scaling-stroke; cursor: crosshair; }
.sprinkler-angle-handle { fill: #397eaa; }
.sprinkler-arc-handle { fill: #fff; }
.sprinkler-angle-handle:hover, .sprinkler-arc-handle:hover { stroke: #16445f; stroke-width: 2.5; }
.sprinkler-radius-handle { fill: #4d9774; stroke: #fff; stroke-width: 1.8; vector-effect: non-scaling-stroke; cursor: crosshair; }
.sprinkler-radius-handle:hover { fill: #246f4a; stroke-width: 2.5; }
.sprinkler-angle-controls { margin: 12px 0 8px; align-items: flex-start; }
.sprinkler-model-controls { margin-top: 10px; align-items: flex-start; }
.sprinkler-model-controls .field > span { white-space: normal; }
.sprinkler-angle-controls .field > span { white-space: normal; }
.sprinkler-control-note { margin-bottom: 12px; }
.sprinkler-position { margin-top: 12px; }
.sprinkler-flow-card { margin-top: 10px; padding: 9px 10px; border: 1px solid #d9e8e7; border-radius: 5px; background: #f4f9f8; color: #507c7a; }
.sprinkler-flow-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 10px; }
.sprinkler-flow-badge { padding: 2px 5px; border-radius: 3px; background: #e1eee9; color: #5a8d72; font-size: 9px; }
.sprinkler-flow-badge.estimated { background: #f3ead5; color: #9b8250; }
.sprinkler-flow-values { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; margin-top: 7px; font-variant-numeric: tabular-nums; }
.sprinkler-flow-values strong { color: #3b7477; font-size: 17px; font-weight: 600; }
.sprinkler-flow-values small { font-size: 10px; font-weight: 400; }
.sprinkler-flow-values > span { color: #7f9691; font-size: 10px; white-space: nowrap; }
.sprinkler-flow-details { margin-top: 7px; color: #8c9b8f; font-size: 10px; line-height: 1.5; }
.sprinkler-flow-details summary { cursor: pointer; }
.sprinkler-flow-details p { margin: 6px 0; }
.sprinkler-flow-details a { color: #4f8192; text-underline-offset: 2px; }
.tree-symbol { fill: #bad3a6; stroke: #91b77b; stroke-width: 1; vector-effect: non-scaling-stroke; cursor: pointer; }
.tree-symbol .tree-inner { fill: #a7c590; stroke: #8cb273; }
.dimension-label { fill: #93a181; font-size: var(--dimension-size, .38px); text-anchor: middle; pointer-events: none; }
.dimension-line { stroke: #adb99a; stroke-width: .8; vector-effect: non-scaling-stroke; pointer-events: none; }

@media (max-width: 1280px) {
  .topbar { gap: 16px; padding: 0 14px; }
  .brand { min-width: 151px; }
  #project-name { width: 180px; }
  .save-state, .topbar-actions .local-badge, .canvas-note { display: none; }
  .topbar-actions button { padding: 5px 8px; }
}
@media (max-width: 1050px) {
  .editor-layout { grid-template-columns: 54px 164px minmax(0, 1fr) 236px; }
  .tools-panel { padding: 12px 7px; }
  .tool { gap: 6px; padding: 6px; }
  .tool-label { font-size: 11px; }
  .tool-sublabel { font-size: 9px; }
  .section-label { margin: 14px 6px 5px; font-size: 8px; }
  .topbar { gap: 13px; padding: 0 12px; }
  .brand { min-width: 132px; }
  .brand-title { font-size: 14px; }
  .brand-subtitle { font-size: 8px; }
  #project-name { width: 150px; font-size: 11px; }
  .project-heading { gap: 0; }
  .topbar-actions { gap: 4px; }
  .topbar-actions button { gap: 5px; font-size: 10px; padding: 5px 7px; }
  .header-project-actions { padding-right: 5px; gap: 3px; }
  .design-panel .workspace-tab { gap: 3px; font-size: 9px; }
  .design-panel .workspace-tab svg { width: 12px; height: 12px; }
  .statusbar { gap: 13px; padding: 0 10px; }
  .panel-section { padding: 15px 13px; }
}
@media (max-width: 820px) {
  .editor-layout { grid-template-columns: 52px 150px minmax(0, 1fr) 220px; }
  .command-rail { padding: 10px 5px; gap: 8px; }
  .command-rail .rail-button { width: 34px; height: 34px; min-height: 34px; }
  .tools-panel { padding: 12px 6px; }
  .tools-panel h2 { font-size: 11px; }
  .design-panel .workspace-tabs, .design-panel .design-mode-tabs { margin-left: -2px; margin-right: -2px; padding: 2px; }
  .design-panel .workspace-tab { font-size: 9px; gap: 2px; padding-left: 2px; padding-right: 2px; }
  .design-panel .workspace-tab svg { width: 11px; height: 11px; }
  .tool { min-height: 33px; padding: 5px; gap: 5px; }
  .tool-icon { width: 18px; }
  .tool-icon svg { width: 17px; height: 17px; }
  .shortcut { font-size: 8px; }
  .tool-bottom { padding: 15px 4px 0; font-size: 8px; gap: 5px; }
  .topbar { gap: 11px; }
  .brand { min-width: 32px; }
  .brand-title, .brand-subtitle { display: none; }
  #project-name { width: 190px; }
  .topbar-actions button .button-label { display: none; }
  .topbar-actions button { width: 31px; min-width: 31px; padding: 5px; }
  .header-project-actions { padding-right: 7px; margin-right: 3px; }
  .statusbar .status-section:nth-child(3) { display: none; }
  .canvas-overlay { left: 11px; max-width: calc(100% - 22px); }
  .canvas-hint { font-size: 9px; padding: 6px 8px; }
  .zoom-controls { right: 11px; bottom: 16px; }
  .scale-indicator { left: 12px; }
  .canvas-topline { padding: 0 12px; }
  .breadcrumb { gap: 5px; font-size: 9px; }
  .plant-library { left: 12px; top: 12px; width: min(340px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 11px; }
}
.header-project-actions .mobile-properties-toggle { display: none; }
@media (max-width: 700px) {
  .editor-layout { grid-template-columns: 48px 148px minmax(0, 1fr); }
  .editor-layout { position: relative; }
  .properties-panel { display: none; }
  .header-project-actions .mobile-properties-toggle { display: inline-flex; }
  .editor-layout.properties-open .properties-panel { display: flex; position: absolute; z-index: 45; top: 0; right: 0; bottom: 0; width: min(264px, calc(100% - 48px)); box-shadow: -8px 0 28px #14202b24; }
  .command-rail { padding-left: 4px; padding-right: 4px; }
  .command-rail .rail-button { width: 32px; height: 34px; }
  .topbar { gap: 8px; padding: 0 9px; }
  #project-name { width: 160px; }
  .statusbar { gap: 10px; font-size: 8px; }
  .statusbar .status-section:nth-child(2) { display: none; }
  .pipe-legend { max-width: calc(100% - 22px); right: 11px; font-size: 9px; gap: 5px 9px; }
}
@media (max-width: 420px) {
  .brand { min-width: 28px; }
  .brand-mark { width: 28px; height: 28px; }
  #project-name { min-width: 50px; width: 90px; }
  .topbar-actions { gap: 3px; }
  .topbar-actions button { width: 28px; min-width: 28px; }
  .header-project-actions { gap: 2px; padding-right: 4px; margin-right: 0; }
  .canvas-hint { max-width: 100%; overflow-wrap: anywhere; }
  .zoom-controls output { min-width: 39px; padding: 0 4px; }
  .zoom-controls button { width: 26px; }
  .statusbar .status-section:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
