:root {
  --bg: #f7f7f7;
  --ink: #020101;
  --muted: #4f5976;
  --line: #d3d3d3;
  --panel: #ffffff;
  --accent: #f8b323;
  --accent-dark: #142247;
  --roof: #f8f8f8;
  --roof-line: #292929;
  --zone: rgba(248, 179, 35, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 42%, #eeeeee 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1760px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 18px 0;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.topbar p,
h1,
h2 {
  margin: 0;
}

.topbar p {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 760;
  text-transform: uppercase;
}

h1 {
  margin-top: 5px;
  font-size: clamp(1.55rem, 2.2vw, 2.35rem);
  line-height: 1.04;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(247, 247, 247, 0.92);
  backdrop-filter: blur(8px);
}

.auth-gate[hidden] {
  display: none;
}

.auth-card {
  width: min(430px, 100%);
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(20, 34, 71, 0.16);
  padding: 24px;
}

.auth-card p {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-card h2 {
  margin-bottom: 18px;
  font-size: 1.45rem;
}

.auth-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 760;
}

.auth-card input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 10px 12px;
  color: var(--ink);
}

.auth-card button {
  width: 100%;
  margin-top: 14px;
}

.auth-message {
  min-height: 22px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.account-shell {
  width: min(980px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.account-header {
  margin-bottom: 20px;
}

.account-header p {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.account-email {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 650;
}

.account-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.account-project-list {
  display: grid;
  gap: 12px;
}

.account-project,
.account-empty {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(20, 34, 71, 0.08);
  padding: 18px;
}

.account-project-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.account-project h2 {
  margin: 0;
  font-size: 1.1rem;
}

.account-project p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.account-open,
.account-versions a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--accent-dark);
  padding: 8px 12px;
  font-weight: 780;
  text-decoration: none;
}

.account-project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.account-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--accent);
  color: var(--ink);
  padding: 8px 12px;
  font-weight: 780;
  cursor: pointer;
}

.account-versions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.account-versions a {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--accent-dark);
  font-size: 0.86rem;
}

.account-empty {
  color: var(--muted);
  font-weight: 700;
}

.offer-request-icon {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 34px;
  border-radius: 0;
  background: #fff7df;
  border: 1px solid #243934;
  box-shadow: inset 0 0 0 2px #f8b323;
}

.offer-request-icon::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  width: 15px;
  height: 19px;
  border: 2px solid #243934;
  border-radius: 2px;
  background: #ffffff;
}

.offer-request-icon::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 13px;
  width: 13px;
  height: 7px;
  border-left: 3px solid #f8b323;
  border-bottom: 3px solid #f8b323;
  transform: rotate(-45deg);
}

h2 {
  font-size: 1rem;
  margin-bottom: 14px;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 3px;
  background: var(--accent);
  color: #020101;
  padding: 10px 14px;
  font-weight: 760;
  cursor: pointer;
}

button:hover {
  background: #ffbc7d;
}

button:disabled {
  cursor: default;
  opacity: 0.45;
}

.mobile-view-switch {
  display: none;
}

.workbench {
  position: relative;
  display: grid;
  grid-template-columns: var(--left-column-width, 420px) 10px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

@media (max-width: 980px) and (orientation: landscape) {
  .shell {
    width: calc(100vw - 24px) !important;
    max-width: none !important;
  }
}

.panel,
.canvas-panel {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(20, 34, 71, 0.08);
}

.panel {
  padding: 18px;
}

.left-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.planning-stack {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.column-resizer {
  align-self: stretch;
  min-height: calc(100vh - 128px);
  border-radius: 3px;
  background: linear-gradient(90deg, transparent 0, transparent 3px, var(--line) 3px, var(--line) 7px, transparent 7px);
  cursor: col-resize;
  touch-action: none;
}

.column-resizer:hover,
.column-resizer.active {
  background: linear-gradient(90deg, transparent 0, transparent 3px, var(--accent) 3px, var(--accent) 7px, transparent 7px);
}

.floating-area {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 128px);
  min-width: 0;
  overflow: auto;
}

@media (min-width: 768px) and (orientation: landscape) {
  .floating-area {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

.fixed-planner {
  position: relative;
  width: 100%;
  min-height: 650px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(20, 34, 71, 0.08);
  padding: 10px;
}

.floating-window {
  position: absolute;
  display: grid;
  gap: 10px;
  min-width: 360px;
  min-height: 260px;
  max-width: 100%;
  max-height: 100%;
  resize: both;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(20, 34, 71, 0.08);
  padding: 10px;
}

.window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  cursor: move;
  user-select: none;
}

.window-header h2 {
  margin: 0;
}

.window-header span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 760;
  text-transform: uppercase;
}

.window-close {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #ffffff;
  color: var(--accent-dark);
  padding: 0;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  position: relative;
  z-index: 2;
  touch-action: manipulation;
}

.window-close:hover {
  background: #fff5da;
}

.static-header {
  cursor: default;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.input-action-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
}

.input-action-row button {
  min-height: 36px;
  padding: 8px 12px;
}

.project-action-row {
  gap: 6px;
}

.project-action-row .panel-tool {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}

.project-action-row .icon-tool > .tool-sprite {
  width: 26px;
  height: 26px;
  background-size: 174px 174px;
}

.project-action-row .icon-tool > .tool-sprite.new-icon {
  background-position: -9px -13px;
}

.project-action-row .icon-tool > .tool-sprite.folder-icon {
  background-position: -48px -17px;
}

.project-action-row .icon-tool > .tool-sprite.save-icon {
  background-position: -90px -16px;
}

.project-action-row .icon-tool > .tool-sprite.map-icon {
  background-position: -130px -16px;
}

.project-action-row .offer-request-icon {
  width: 26px;
  height: 26px;
}

.project-action-row .offer-request-icon::before {
  left: 6px;
  top: 4px;
  width: 12px;
  height: 15px;
  border-width: 2px;
}

.project-action-row .offer-request-icon::after {
  left: 9px;
  top: 10px;
  width: 11px;
  height: 6px;
}

.inline-overview {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fffdf7;
  padding: 10px;
}

.inline-overview-list {
  display: grid;
  gap: 8px;
}

.inline-project {
  display: grid;
  gap: 6px;
  border-bottom: 1px solid rgba(20, 34, 71, 0.12);
  padding-bottom: 8px;
}

.inline-project:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.inline-project button {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  text-align: left;
}

.inline-project-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 6px;
  align-items: center;
}

.inline-project-open {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--accent-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-project-versions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inline-project-share {
  justify-self: end;
  width: 34px !important;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--accent);
  color: var(--ink);
  padding: 0;
  text-align: center;
}

.share-icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.share-icon-button::before {
  content: "";
  width: 18px;
  height: 16px;
  background:
    radial-gradient(circle at 3px 8px, currentColor 0 2px, transparent 2.5px),
    radial-gradient(circle at 15px 3px, currentColor 0 2px, transparent 2.5px),
    radial-gradient(circle at 15px 13px, currentColor 0 2px, transparent 2.5px),
    linear-gradient(25deg, transparent 0 45%, currentColor 46% 54%, transparent 55%),
    linear-gradient(-25deg, transparent 0 45%, currentColor 46% 54%, transparent 55%);
}

.inline-project-versions button {
  width: auto;
  min-height: 30px;
  border: 1px solid var(--line);
  background: #ffffff !important;
  color: var(--accent-dark) !important;
  font-size: 0.8rem;
}

.input-page[hidden] {
  display: none;
}

.input-pager {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.input-page-dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  min-height: 10px;
  padding: 0;
  border: 1px solid var(--accent-dark);
  border-radius: 50%;
  background: #ffffff;
}

.input-page-dot.active {
  background: var(--accent);
}

label {
  display: grid;
  gap: 5px;
  min-height: 62px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

label:has(input[type="text"]),
label:has(input[type="email"]),
label:has(select) {
  grid-column: span 2;
}

.input-section {
  grid-column: span 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(20, 34, 71, 0.12);
  border-radius: 3px;
  background: rgba(248, 250, 249, 0.72);
}

.input-section h3 {
  grid-column: span 2;
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.82rem;
  line-height: 1.2;
}

.input-section label:has(select) {
  grid-column: auto;
}

.secondary-action {
  grid-column: span 2;
  min-height: 38px;
  border: 1px solid var(--accent);
  background: #fff8e4;
  color: var(--accent-dark);
  padding: 8px 10px;
  font-size: 0.78rem;
}

.secondary-action:hover {
  background: #ffe8ab;
}

.input-hint {
  grid-column: span 2;
  min-height: 1.2em;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.email-notice {
  color: #8a4b00;
}

input.email-attention {
  border-color: #e38b19;
  background: #fff4df;
  box-shadow: 0 0 0 2px rgba(227, 139, 25, 0.18);
}

input[readonly] {
  color: var(--muted);
  background: #f3f5f4;
  cursor: default;
}

.check {
  grid-template-columns: 22px 1fr;
  align-items: center;
  min-height: 48px;
}

.check input {
  min-height: 22px;
  width: 22px;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}

input[readonly],
.readonly-email {
  background: #f4f4f4;
  color: var(--muted);
  cursor: default;
}

.palette {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(20, 34, 71, 0.08);
  padding: 12px;
}

.tool-palette {
  display: grid;
  grid-template-columns: auto minmax(190px, 260px) 1fr;
  align-items: center;
  gap: 10px;
}

.tool-palette h2 {
  margin: 0 6px 0 0;
}

.tool-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.mode-tool-group {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 5px;
}

.mode-tool-group[hidden],
.panel-tool[hidden] {
  display: none !important;
}

.mode-tool-group:has(> .panel-tool.active) {
  border-color: rgba(248, 179, 35, 0.95);
  background: rgba(255, 243, 207, 0.38);
  box-shadow: 0 0 0 2px rgba(248, 179, 35, 0.18);
}

.panel-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-height: 38px;
  background: #ffffff;
  color: var(--accent-dark);
  border: 1px solid var(--line);
  padding: 0;
  font-size: 0;
  text-align: center;
}

.help-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: var(--accent-dark);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.panel-tool:hover {
  background: #fff5da;
}

.zoom-tools {
  display: grid;
  grid-template-columns: 32px 48px 32px;
  gap: 4px;
  min-height: 38px;
}

.zoom-tools button {
  min-width: 0;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--accent-dark);
  padding: 0;
  font-size: 0.78rem;
  font-weight: 850;
}

.zoom-tools button:hover {
  background: #fff5da;
}

.roof-zone-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(34px, 1fr));
  gap: 4px;
  width: 116px;
}

.roof-zone-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.roof-zone-key.dz1 {
  color: rgba(142, 34, 28, 0.95);
  background: rgba(196, 61, 48, 0.2);
}

.roof-zone-key.dz2 {
  color: rgba(139, 86, 10, 0.95);
  background: rgba(248, 179, 35, 0.18);
}

.roof-zone-key.dz3 {
  color: rgba(38, 87, 145, 0.95);
  background: rgba(53, 136, 201, 0.13);
}

.roof-zone-key.dz4 {
  color: rgba(10, 91, 78, 0.95);
  background: rgba(11, 118, 101, 0.12);
}

.cleanup-icon {
  position: relative;
  display: inline-block;
  width: 17px;
  height: 18px;
  border: 2px solid var(--accent-dark);
  border-top: 0;
  border-radius: 0 0 3px 3px;
}

.cleanup-icon::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -6px;
  width: 21px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent-dark);
}

.cleanup-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 7px;
  height: 10px;
  border-left: 2px solid var(--accent-dark);
  border-right: 2px solid var(--accent-dark);
}

.panel-icon {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 34px;
  border: 2px solid #263a34;
  border-radius: 4px;
  background:
    repeating-linear-gradient(0deg, transparent 0 7px, rgba(122, 181, 205, 0.30) 7px 8px),
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(122, 181, 205, 0.34) 10px 11px),
    linear-gradient(90deg, rgb(13, 33, 47) 0%, rgb(16, 42, 59) 70%, rgb(34, 76, 98) 100%);
}

.planner-toolbar {
  justify-content: flex-start;
  padding: 0 2px 2px;
}

.tool-gap {
  width: 14px;
  height: 1px;
}

.wind-shadow-directions {
  display: inline-grid;
  grid-template-columns: repeat(4, 28px);
  gap: 4px;
  align-items: center;
  min-height: 38px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.86);
}

.wind-shadow-directions[hidden] {
  display: none;
}

.sun-shadow-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.86);
}

.sun-shadow-tools[hidden] {
  display: none;
}

.sun-shadow-tools label {
  display: grid;
  grid-template-columns: 44px 150px;
  align-items: center;
  gap: 8px;
  min-height: 0;
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.sun-shadow-tools input {
  min-height: 28px;
  padding: 0;
}

.wind-ballast-tools {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.86);
}

.wind-ballast-tools[hidden] {
  display: none;
}

.wind-shadow-directions button {
  min-width: 0;
  min-height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.wind-shadow-directions button.active {
  border-color: var(--accent);
  background: #fff3cf;
  box-shadow: inset 0 0 0 2px rgba(248, 179, 35, 0.22);
}

.roof-canvas-panel {
  position: relative;
}

.canvas-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
  display: grid;
  justify-items: stretch;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(20, 34, 71, 0.14);
}

.canvas-controls .panel-tool {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  min-height: 38px;
}

.roof-edit-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.roof-edit-tools[hidden] {
  display: none !important;
}

.roof-tool-dialog[hidden] {
  display: none !important;
}

.roof-tool-dialog {
  position: absolute;
  z-index: 35;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  gap: 9px;
  width: min(260px, 82vw);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 34px rgba(20, 34, 71, 0.18);
}

.roof-tool-dialog label {
  min-height: 0;
}

.roof-tool-dialog .menu-check {
  align-items: center;
}

.compact-tool {
  width: 38px;
  min-width: 38px;
}

.plus-icon {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
}

.plus-icon::before,
.plus-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent-dark);
  transform: translate(-50%, -50%);
}

.plus-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.floating-window.hidden {
  display: none;
}

.results-panel[hidden] {
  display: none !important;
}

.panel-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  border-left: 2px solid #263a34;
}

.panel-icon.single {
  width: 18px;
  height: 26px;
  background:
    repeating-linear-gradient(0deg, transparent 0 6px, rgba(122, 181, 205, 0.34) 6px 7px),
    linear-gradient(90deg, rgb(13, 33, 47) 0%, rgb(34, 76, 98) 100%);
}

.panel-icon.single::after {
  content: none;
}

.obstacle-icon {
  display: inline-block;
  width: 25px;
  height: 18px;
  border: 2px solid #5b6260;
  border-radius: 4px;
  background: #b8bfbd;
}

.roof-plus-icon {
  position: relative;
  display: inline-block;
  width: 25px;
  height: 20px;
  border: 2px solid #292929;
  border-radius: 3px;
  background: #ffffff;
}

.roof-plus-icon::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-left: 2px solid #292929;
  border-bottom: 2px solid #292929;
  background: var(--panel);
  transform: rotate(45deg);
}

.slope-icon {
  position: relative;
  display: inline-block;
  width: 25px;
  height: 25px;
}

.slope-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 3px;
  width: 18px;
  height: 18px;
  clip-path: polygon(0 100%, 0 0, 100% 100%);
  background: #ffffff;
  border-left: 2px solid #292929;
  border-bottom: 2px solid #292929;
}

.slope-icon::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  width: 17px;
  height: 2px;
  background: #f8b323;
  transform: rotate(45deg);
  transform-origin: left center;
}

.new-icon {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 24px;
  border: 2px solid var(--accent-dark);
  border-radius: 3px;
  background: #ffffff;
}

.new-icon::before,
.new-icon::after {
  content: "";
  position: absolute;
}

.new-icon::before {
  right: -2px;
  top: -2px;
  width: 8px;
  height: 8px;
  border-left: 2px solid var(--accent-dark);
  border-bottom: 2px solid var(--accent-dark);
  background: #f2f4f3;
}

.new-icon::after {
  left: 4px;
  right: 4px;
  top: 11px;
  height: 2px;
  background: var(--accent-dark);
}

.icon-tool {
  justify-content: center;
  padding: 7px;
}

.planner-toolbar .icon-tool {
  width: 82px;
  height: 102px;
  min-height: 102px;
  padding: 0;
  border: 0;
  background: transparent;
}

.planner-toolbar .icon-tool:hover {
  background: transparent;
}

.planner-toolbar .undo-icon,
.planner-toolbar .cleanup-icon {
  transform: scale(1.65);
  transform-origin: center;
}

.planner-toolbar .zoom-tools {
  align-self: center;
  flex: 0 0 auto;
}

.undo-icon {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 22px;
}

.undo-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 14px;
  height: 11px;
  border: 2px solid var(--accent-dark);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 10px 0 0;
}

.undo-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 3px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 9px solid var(--accent-dark);
}

.folder-icon {
  position: relative;
  display: inline-block;
  width: 25px;
  height: 18px;
  border: 2px solid var(--accent-dark);
  border-radius: 3px;
  background: #ffffff;
}

.folder-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  top: -7px;
  width: 10px;
  height: 7px;
  border: 2px solid var(--accent-dark);
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: #ffffff;
}

.folder-icon::after {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  top: 6px;
  height: 11px;
  border: 2px solid var(--accent-dark);
  border-radius: 3px;
  background: #fff5da;
  transform: skewX(-12deg);
}

.save-icon {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 24px;
  border: 2px solid var(--accent-dark);
  border-radius: 3px;
  background: #ffffff;
}

.save-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 3px;
  height: 6px;
  border: 2px solid var(--accent-dark);
  background: #f2f4f3;
}

.save-icon::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 3px;
  height: 7px;
  border: 2px solid var(--accent-dark);
  background: #fff5da;
}

.results-icon {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 22px;
  border: 2px solid var(--accent-dark);
  border-radius: 3px;
  background: #ffffff;
}

.results-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 5px;
  height: 2px;
  background: var(--accent-dark);
  box-shadow: 0 5px 0 var(--accent-dark), 0 10px 0 var(--accent-dark);
}

.results-icon::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 5px 0 var(--accent), 0 10px 0 var(--accent);
}

.report-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 23px;
  border: 2px solid var(--accent-dark);
  border-radius: 3px;
  background: #ffffff;
  color: var(--accent-dark);
  font-size: 0;
}

.report-icon::before {
  content: "</>";
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

.report-icon::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 4px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 -5px 0 var(--accent);
}

.debug-json-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 26px;
  border: 2px solid var(--accent-dark);
  border-radius: 3px;
  background: #ffffff;
  color: var(--accent-dark);
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
}

.debug-json-icon::before {
  content: "{}";
}

.debug-json-icon::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  width: 9px;
  height: 9px;
  background: linear-gradient(135deg, #ffffff 0 45%, var(--accent-dark) 46% 100%);
  border-left: 2px solid var(--accent-dark);
  border-bottom: 2px solid var(--accent-dark);
}

.map-icon {
  position: relative;
  display: inline-block;
  width: 25px;
  height: 25px;
  border: 2px solid #292929;
  background:
    linear-gradient(90deg, transparent 48%, #d3d3d3 48% 54%, transparent 54%),
    linear-gradient(0deg, transparent 48%, #d3d3d3 48% 54%, transparent 54%),
    #ffffff;
}

.map-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 8px 0 -2px var(--accent-dark);
}

.panel-tool.active {
  border-color: var(--accent-dark);
  background: var(--accent);
  color: var(--ink);
  box-shadow: inset 0 0 0 2px rgba(2, 1, 1, 0.12), 0 4px 10px rgba(248, 179, 35, 0.24);
}

.values-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid var(--accent-dark);
  border-radius: 50%;
  font-size: 0;
}

.values-icon::before {
  content: "123";
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0;
}

.wind-shadow-icon {
  position: relative;
  display: inline-block;
  width: 25px;
  height: 22px;
  border-left: 3px solid var(--accent-dark);
  border-bottom: 3px solid var(--accent-dark);
}

.wind-shadow-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 15px;
  height: 12px;
  background:
    repeating-linear-gradient(90deg, rgba(20, 32, 28, 0.65) 0 2px, transparent 2px 5px),
    linear-gradient(90deg, rgba(29, 111, 216, 0.30), rgba(248, 179, 35, 0.22));
  transform: skewX(-18deg);
}

.wind-shadow-icon::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -1px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--accent-dark);
}

.sun-shadow-icon {
  position: relative;
  display: inline-block;
  width: 25px;
  height: 22px;
  border-left: 3px solid var(--accent-dark);
  border-bottom: 3px solid var(--accent-dark);
}

.sun-shadow-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(248, 179, 35, 0.22);
}

.sun-shadow-icon::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 9px;
  width: 15px;
  height: 10px;
  background:
    repeating-linear-gradient(90deg, rgba(20, 32, 28, 0.52) 0 2px, transparent 2px 5px),
    linear-gradient(90deg, rgba(248, 179, 35, 0.26), rgba(20, 34, 71, 0.22));
  transform: skewX(-20deg);
}

.load-icon {
  display: inline-block;
  width: 23px;
  height: 23px;
  border: 2px solid var(--accent-dark);
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent 31%, rgba(20, 32, 28, 0.55) 32% 35%, transparent 36% 64%, rgba(20, 32, 28, 0.55) 65% 68%, transparent 69%),
    linear-gradient(0deg, transparent 31%, rgba(20, 32, 28, 0.55) 32% 35%, transparent 36% 64%, rgba(20, 32, 28, 0.55) 65% 68%, transparent 69%),
    linear-gradient(135deg, rgba(22, 154, 109, 0.26), rgba(248, 179, 35, 0.45));
}

.auto-ballast-icon {
  display: inline-block;
  width: 38px;
  height: 38px;
  background-image: url("assets/Auto%20Ballast.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.planner-toolbar .auto-ballast-icon {
  width: 82px;
  height: 102px;
}

.attika-icon {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(30, 45, 42, 0.16);
}

.planner-toolbar .attika-icon {
  width: 82px;
  height: 102px;
  box-shadow: none;
}

.auto-ballast-progress {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(140px, 260px) auto;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(20, 32, 28, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(20, 32, 28, 0.10);
}

.auto-ballast-progress[hidden] {
  display: none;
}

.auto-ballast-progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(20, 32, 28, 0.14);
}

.auto-ballast-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #f8b323);
  transition: width 0.16s ease;
}

.auto-ballast-progress button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(20, 32, 28, 0.24);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.auto-ballast-progress button:hover {
  border-color: var(--accent-dark);
}

.id-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 22px;
  border: 2px solid var(--accent-dark);
  border-radius: 4px;
  font-size: 0;
}

.id-icon::before {
  content: "#";
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.icon-tool > .tool-sprite {
  display: inline-block;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-image: url("assets/PanelOnRoof_user.png");
  background-repeat: no-repeat;
  background-size: 226px 226px;
  box-shadow: none;
}

.planner-toolbar .icon-tool > .tool-sprite {
  width: 82px;
  height: 102px;
  background-size: 410px 410px;
}

.planner-toolbar .offer-request-icon {
  width: 82px;
  height: 102px;
  border: 0;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(20, 34, 71, 0.18);
  pointer-events: none;
}

.planner-toolbar .offer-request-icon::before {
  left: 24px;
  top: 14px;
  width: 34px;
  height: 43px;
  border-width: 3px;
  border-radius: 4px;
}

.planner-toolbar .offer-request-icon::after {
  left: 30px;
  top: 30px;
  width: 31px;
  height: 17px;
  border-left-width: 6px;
  border-bottom-width: 6px;
}

.planner-toolbar .offer-request-tool {
  position: relative;
}

.planner-toolbar .offer-request-tool::after {
  content: "Angebot";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 11px;
  color: #020101;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.icon-tool > .tool-sprite::before,
.icon-tool > .tool-sprite::after {
  content: none !important;
}

.icon-tool > .tool-sprite.new-icon {
  background-position: -12px -17px;
}

.planner-toolbar .icon-tool > .tool-sprite.new-icon {
  background-position: -11px -26px;
}

.icon-tool > .tool-sprite.folder-icon {
  background-position: -62px -22px;
}

.planner-toolbar .icon-tool > .tool-sprite.folder-icon {
  background-position: -107px -26px;
}

.icon-tool > .tool-sprite.save-icon {
  background-position: -117px -20px;
}

.planner-toolbar .icon-tool > .tool-sprite.save-icon {
  background-position: -203px -26px;
}

.icon-tool > .tool-sprite.map-icon {
  background-position: -170px -20px;
}

.planner-toolbar .icon-tool > .tool-sprite.map-icon {
  background-position: -299px -26px;
}

.icon-tool > .tool-sprite.roof-plus-icon,
.icon-tool > .tool-sprite.slope-icon {
  background-position: -9px -87px;
}

.planner-toolbar .icon-tool > .tool-sprite.roof-plus-icon,
.planner-toolbar .icon-tool > .tool-sprite.slope-icon {
  background-position: -11px -153px;
}

.planner-toolbar .icon-tool > .tool-sprite.slope-icon {
  background-position: -299px -281px;
}

.icon-tool > .tool-sprite.panel-icon {
  background-position: -63px -87px;
}

.planner-toolbar .icon-tool > .tool-sprite.panel-icon {
  background-position: -107px -153px;
}

.icon-tool > .tool-sprite.wind-shadow-icon {
  background-position: -167px -89px;
}

.planner-toolbar .icon-tool > .tool-sprite.wind-shadow-icon {
  background-position: -299px -153px;
}

.icon-tool > .tool-sprite.sun-shadow-icon,
.planner-toolbar .icon-tool > .tool-sprite.sun-shadow-icon {
  position: relative;
  border-left: 3px solid var(--accent-dark);
  border-bottom: 3px solid var(--accent-dark);
  background-image: none;
  background-position: center;
}

.icon-tool > .tool-sprite.sun-shadow-icon::before,
.planner-toolbar .icon-tool > .tool-sprite.sun-shadow-icon::before {
  content: "" !important;
  position: absolute;
  left: 16%;
  top: 12%;
  width: 30%;
  height: 30%;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(248, 179, 35, 0.22);
}

.icon-tool > .tool-sprite.sun-shadow-icon::after,
.planner-toolbar .icon-tool > .tool-sprite.sun-shadow-icon::after {
  content: "" !important;
  position: absolute;
  left: 35%;
  top: 47%;
  width: 52%;
  height: 22%;
  background:
    repeating-linear-gradient(90deg, rgba(20, 32, 28, 0.52) 0 3px, transparent 3px 7px),
    linear-gradient(90deg, rgba(248, 179, 35, 0.26), rgba(20, 34, 71, 0.22));
  transform: skewX(-20deg);
}

.icon-tool > .tool-sprite.values-icon {
  background-position: -114px -89px;
}

.planner-toolbar .icon-tool > .tool-sprite.values-icon {
  background-position: -203px -153px;
}

.icon-tool > .tool-sprite.load-icon {
  background-position: -6px -159px;
}

.planner-toolbar .icon-tool > .tool-sprite.load-icon {
  background-position: -11px -281px;
}

.icon-tool > .tool-sprite.id-icon {
  background-position: -115px -163px;
}

.planner-toolbar .icon-tool > .tool-sprite.id-icon {
  background-position: -203px -281px;
}

.icon-tool > .tool-sprite.values-icon[style] {
  font-size: 0;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 720;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.legend-bar {
  display: inline-block;
  width: 54px;
  height: 8px;
  border-radius: 2px;
  border: 1px solid currentColor;
}

.legend-bar.panel-fix-102 {
  width: 76px;
  background: #f08a3c;
  color: #7a3c0d;
}

.legend-bar.panel-fix-101 {
  background: #f4c542;
  color: #6d5309;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(11, 118, 101, 0.18);
  border-color: var(--accent);
}

.canvas-panel {
  padding: 14px;
  overflow: auto;
  min-width: 0;
}

.iso-panel {
  min-width: 0;
}

.fixed-iso-panel {
  display: grid;
  gap: 10px;
  padding: 10px;
  overflow: hidden;
}

.fixed-iso-panel .window-header {
  min-height: 24px;
}

.floating-window > .canvas-panel,
.fixed-planner > .canvas-panel,
.floating-window.palette {
  box-shadow: none;
}

.results-panel {
  align-content: start;
  min-height: 220px;
  z-index: 5;
}

.result-pages {
  min-height: 0;
  overflow: auto;
}

.result-page {
  display: none;
}

.result-page.active {
  display: grid;
}

.result-list {
  gap: 8px;
  margin: 0;
}

.result-pagination {
  display: flex;
  justify-content: center;
  gap: 9px;
  padding: 4px 0 2px;
}

.result-dot {
  width: 11px;
  height: 11px;
  min-height: 0;
  border-radius: 50%;
  border: 1px solid var(--accent-dark);
  background: #ffffff;
  padding: 0;
}

.result-dot.active {
  background: var(--accent);
  border-color: var(--accent);
}

.result-list div {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  align-items: baseline;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.result-list dt {
  color: var(--muted);
  font-weight: 720;
}

.result-list dd {
  margin: 0;
  color: var(--accent-dark);
  font-size: 1.35rem;
  font-weight: 860;
  text-align: right;
}

.result-list .result-chart-row {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 8px;
}

.result-list .result-chart-row dt,
.result-list .result-chart-row dd {
  text-align: left;
}

.monthly-energy-chart {
  display: grid;
  grid-template-columns: repeat(12, minmax(22px, 1fr));
  align-items: end;
  gap: 5px;
  min-height: 128px;
  padding: 8px 4px 0;
  font-size: 0.72rem;
}

.monthly-energy-bar {
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  min-width: 0;
  height: 120px;
  color: var(--muted);
  font-weight: 760;
  text-align: center;
}

.monthly-energy-bar-fill {
  display: block;
  width: 100%;
  min-height: 5px;
  border: 1px solid rgba(20, 34, 71, 0.18);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, rgba(248, 179, 35, 0.95), rgba(29, 111, 216, 0.55));
}

.monthly-energy-value,
.monthly-energy-month {
  min-height: 14px;
  font-size: 0.66rem;
  line-height: 1.1;
  white-space: nowrap;
}

.monthly-energy-value {
  color: var(--accent-dark);
}

canvas {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
  border-radius: 6px;
  background: #ffffff;
  touch-action: none;
  cursor: crosshair;
}

.context-menu {
  position: fixed;
  z-index: 20;
  min-width: 260px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(20, 34, 71, 0.18);
  padding: 8px;
}

.panel-menu-preview {
  display: grid;
  place-items: center;
  min-height: 184px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(11, 118, 101, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(11, 118, 101, 0.05) 1px, transparent 1px),
    #f9fbfa;
  background-size: 18px 18px;
  overflow: hidden;
}

.panel-menu-preview svg {
  display: block;
  width: 252px;
  height: 176px;
}

.preview-hit {
  cursor: pointer;
}

.preview-hit:hover,
.preview-hit:focus {
  outline: none;
}

.preview-hit:hover .preview-target,
.preview-hit:focus .preview-target {
  stroke: var(--accent);
  stroke-width: 3;
}

.preview-label {
  font: 800 9px Inter, Segoe UI, sans-serif;
  fill: #14201c;
  pointer-events: none;
}

.panel-menu-status {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink);
}

.panel-menu-status:empty {
  display: none;
}

.panel-menu-status-icon {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-image: url("assets/PanelOnRoof_Status.png");
  background-repeat: no-repeat;
  background-size: 162px 162px;
}

.panel-menu-status-icon.ok {
  background-position: -15px -62px;
}

.panel-menu-status-icon.ballast {
  background-position: -62px -62px;
}

.panel-menu-status-icon.fail {
  background-position: -109px -62px;
}

.panel-menu-status-icon.pending {
  background-image: none;
  background-color: #2687d8;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.85);
}

.panel-menu-status strong {
  display: block;
  color: var(--accent-dark);
  font-size: 0.9rem;
  line-height: 1.2;
}

.panel-menu-status small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.panel-ballast-popover {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fffdf6;
  box-shadow: inset 0 0 0 1px rgba(248, 179, 35, 0.22);
}

.panel-ballast-popover[hidden] {
  display: none;
}

.panel-ballast-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--accent-dark);
}

.panel-ballast-head strong {
  font-size: 0.88rem;
}

.mini-close {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #ffffff;
  color: var(--accent-dark);
  font-weight: 900;
  touch-action: manipulation;
}

.panel-ballast-value {
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 860;
}

.panel-ballast-popover input[type="range"] {
  width: 100%;
  min-height: 34px;
  accent-color: var(--accent);
}

.context-menu fieldset {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 8px 0 0;
  padding: 8px 0 0;
}

.context-menu fieldset:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.context-menu legend {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
  padding: 0 4px;
  text-transform: uppercase;
}

.menu-check {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.9rem;
}

.menu-check:hover {
  background: #fff5da;
}

.menu-check input {
  width: 18px;
  min-height: 18px;
}

.menu-field.compact {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: center;
  gap: 8px;
  margin: 7px 8px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 680;
}

.menu-field.compact input {
  width: 100%;
  min-height: 30px;
  padding: 4px 7px;
}

.menu-button {
  display: block;
  width: 100%;
  min-height: 36px;
  margin-top: 6px;
  background: #ffffff;
  color: var(--accent-dark);
  border: 1px solid var(--line);
  text-align: left;
}

.menu-button:hover {
  background: #fff5da;
}

.menu-field {
  display: grid;
  gap: 7px;
  min-height: 0;
  padding: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
}

.menu-field input {
  min-height: 42px;
}

.map-dialog {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(2, 1, 1, 0.42);
  padding: 24px;
}

.map-dialog[hidden] {
  display: none;
}

.map-card {
  width: min(1240px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto auto minmax(320px, 1fr) auto;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(2, 1, 1, 0.22);
  padding: 14px;
}

.map-header,
.map-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-header {
  justify-content: space-between;
}

.map-header h2 {
  margin: 0;
}

.map-close {
  min-width: 42px;
  padding: 8px 12px;
}

.map-controls {
  flex-wrap: wrap;
}

.map-controls input[type="search"] {
  width: min(420px, 100%);
}

.map-photo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: #f7f8f7;
}

.map-photo-controls[hidden] {
  display: none;
}

.map-photo-controls label {
  display: grid;
  grid-template-columns: auto minmax(86px, 150px);
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.map-photo-controls input[type="number"] {
  width: 96px;
  min-height: 32px;
  padding: 5px 7px;
}

.roof-background-tools {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 8px 18px rgba(20, 34, 71, 0.12);
}

.roof-background-tools[hidden] {
  display: none;
}

.roof-background-tools label {
  display: grid;
  grid-template-columns: auto 130px;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 780;
}

.background-opacity-icon {
  position: relative;
  width: 24px;
  height: 18px;
  border: 2px solid currentColor;
  background:
    linear-gradient(45deg, rgba(20, 34, 71, 0.22) 25%, transparent 25% 50%, rgba(20, 34, 71, 0.22) 50% 75%, transparent 75%) 0 0 / 8px 8px,
    rgba(248, 179, 35, 0.38);
}

.background-opacity-icon::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid currentColor;
  opacity: 0.7;
}

.map-rotate {
  min-height: 0;
  grid-template-columns: auto 34px 260px 34px;
  display: grid;
  align-items: center;
  gap: 8px;
}

.map-rotate button {
  position: relative;
  z-index: 1;
  min-width: 0;
  width: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 1rem;
  font-weight: 900;
  touch-action: manipulation;
}

.map-stage {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f7f7f7;
}

.map-rotator,
#mapCanvas,
#mapOverlay {
  position: absolute;
  inset: 0;
}

.map-rotator {
  transform-origin: center;
  z-index: 1;
}

#mapCanvas {
  width: 100%;
  height: 100%;
}

#mapPhotoOverlay {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  max-width: none;
  transform-origin: center center;
  pointer-events: none;
  user-select: none;
}

#mapPhotoOverlay[hidden] {
  display: none;
}

#mapOverlay {
  z-index: 5;
  width: 100%;
  height: 100%;
  pointer-events: none;
  touch-action: auto;
  cursor: default;
  background: transparent;
}

#mapOverlay.selecting {
  pointer-events: auto;
  touch-action: none;
  cursor: crosshair;
}

#mapOverlay.photo-editing {
  pointer-events: auto;
  touch-action: none;
  cursor: move;
}

#mapOverlay.photo-measuring {
  pointer-events: auto;
  touch-action: none;
  cursor: crosshair;
}

/* Map Selection Handles als separate DOM-Elemente */
#mapSelectionHandles {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

.map-selection-handle {
  appearance: none;
  position: absolute;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  transform: translate(-50%, -50%);
  background: transparent;
  border: 0;
  border-radius: 0;
  pointer-events: auto;
  cursor: crosshair;
  touch-action: none;
  padding: 0;
  line-height: 0;
  box-shadow: none;
}

.map-selection-handle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border: 2px solid var(--accent);
}

.map-selection-handle:hover::after {
  background: var(--accent);
}

.map-selection-handle[data-handle="n"] {
  transform: translate(-50%, -100%);
}

.map-selection-handle[data-handle="s"] {
  transform: translate(-50%, 0);
}

.map-selection-handle[data-handle="e"] {
  transform: translate(0, -50%);
}

.map-selection-handle[data-handle="w"] {
  transform: translate(-100%, -50%);
}

.map-selection-handle[data-handle="ne"] {
  transform: translate(0, -100%);
}

.map-selection-handle[data-handle="nw"] {
  transform: translate(-100%, -100%);
}

.map-selection-handle[data-handle="se"] {
  transform: translate(0, 0);
}

.map-selection-handle[data-handle="sw"] {
  transform: translate(-100%, 0);
}

@media (pointer: coarse) and (max-width: 759px) {
  .map-selection-handle {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
  }

  .map-selection-handle::after {
    width: 9px;
    height: 9px;
    border-width: 2px;
  }
}

@media (hover: none) and (min-width: 760px), (min-width: 760px) and (max-width: 1180px) {
  .map-selection-handle {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
  }

  .map-selection-handle::after {
    width: 7px;
    height: 7px;
    border-width: 1.5px;
  }
}

#mapOverlay.selecting + #mapSelectionHandles .map-selection-handle {
  display: block !important;
}

.map-controls button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-dark);
}

.map-readout {
  margin: 0;
  color: var(--muted);
  font-weight: 720;
}

#isoCanvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: auto;
  cursor: default;
}

@media (max-width: 980px), (pointer: coarse), (orientation: landscape) and (max-width: 1400px) and (max-height: 900px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .workbench {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .column-resizer {
    display: none;
  }

  .topbar {
    align-items: start;
    flex-direction: column;
  }

  .mobile-view-switch {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 0 0 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 18px rgba(20, 34, 71, 0.08);
  }

  .mobile-view-switch button {
    min-height: 42px;
    border-color: transparent;
    background: #f4f5f3;
  }

  .mobile-view-switch button.active {
    border-color: rgba(248, 179, 35, 0.95);
    background: #f8b323;
  }

  .iso-panel {
    grid-column: auto;
  }

  body.mobile-input-mode .floating-area {
    display: none !important;
  }

  body.mobile-plan-mode .left-stack,
  body.mobile-plan-mode .results-panel {
    display: none !important;
  }

  .floating-area {
    order: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .left-stack {
    order: 2;
  }

  .results-panel {
    order: 3;
  }

  .floating-area {
    min-height: 0;
  }

  .tool-palette {
    grid-template-columns: 1fr;
  }

  .legend {
    justify-content: flex-start;
  }
}

@media (max-width: 760px), (pointer: coarse), (orientation: landscape) and (max-width: 1400px) and (max-height: 900px) {
  body {
    background: #f7f7f7;
    overscroll-behavior: none;
  }

  body.roof-edit-active .floating-area {
    min-height: 0;
  }

  .shell {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 8px !important;
  }

  .topbar {
    gap: 8px;
    margin-bottom: 8px;
  }

  .topbar p {
    font-size: 0.72rem;
  }

  h1 {
    font-size: 1.25rem;
    line-height: 1.12;
  }

  .fixed-planner,
  .panel,
  .canvas-panel {
    border-radius: 3px;
    box-shadow: 0 6px 18px rgba(20, 34, 71, 0.08);
  }

  .fixed-planner {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: calc(100svh - 72px);
    padding: 8px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .planner-toolbar {
    position: sticky;
    top: 0;
    z-index: 7;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    padding: 6px 0;
  }

  .tool-buttons {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }

  .canvas-controls {
    display: none;
  }

  .tool-buttons > .tool-gap,
  .tool-buttons > .mode-tool-group[aria-label="Windschatten Gruppe"],
  .tool-buttons > .mode-tool-group[aria-label="Schatten Gruppe"],
  #togglePanelIds {
    display: none !important;
  }

  .roof-edit-tools {
    flex: 0 0 auto;
  }

  body.roof-edit-active .tool-buttons {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  body.roof-edit-active .roof-mode-group {
    flex: 0 0 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
  }

  body.roof-edit-active .roof-edit-tools {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
  }

  body.roof-edit-active .tool-buttons > :not(.roof-mode-group) {
    display: none !important;
  }

  body.roof-edit-active .roof-mode-group .panel-tool {
    width: 76px;
    height: 92px;
    min-height: 92px;
  }

  .wind-ballast-tools {
    flex: 0 0 auto;
    min-height: 44px;
  }

  .panel-tool {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .planner-toolbar .panel-tool {
    width: 82px;
    height: 102px;
    min-height: 102px;
  }

  .tool-gap {
    flex: 0 0 8px;
    width: 8px;
  }

  .wind-shadow-directions {
    flex: 0 0 auto;
    grid-template-columns: repeat(4, 34px);
    min-height: 44px;
  }

  .wind-shadow-directions button {
    min-height: 34px;
    font-size: 1rem;
  }

  .sun-shadow-tools {
    flex: 0 0 auto;
  }

  .auto-ballast-progress {
    grid-template-columns: 1fr auto;
  }

  .auto-ballast-progress-track {
    grid-column: 1 / -1;
    order: 3;
  }

  .roof-canvas-panel {
    padding: 6px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    flex: 1 1 auto;
  }

  #roofCanvas {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    object-fit: contain;
    touch-action: none;
  }

  .canvas-controls {
    top: 62px;
    right: 10px;
    flex-direction: column;
    align-items: stretch;
    padding: 4px;
  }

  .zoom-tools {
    display: none;
  }

  .left-stack {
    gap: 10px;
  }

  .panel {
    padding: 12px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  label {
    min-height: 58px;
    font-size: 0.72rem;
  }

  input,
  select {
    min-height: 42px;
    padding: 8px;
    font-size: 16px;
  }

  .fixed-iso-panel {
    max-height: 38vh;
    overflow: hidden;
  }

  #isoCanvas {
    max-height: 32vh;
    object-fit: contain;
  }

  .results-panel {
    position: fixed !important;
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    top: auto !important;
    width: auto !important;
    min-width: 0;
    max-height: 46vh;
    min-height: 0;
    z-index: 25;
    resize: none;
    overflow: auto;
    padding: 10px;
  }

  .results-panel .window-header {
    cursor: default;
    min-height: 28px;
  }

  .window-close {
    width: 44px;
    height: 44px;
    min-height: 44px;
    font-size: 1.15rem;
  }

  .result-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-list div {
    min-width: 0;
  }

  .context-menu {
    left: 8px !important;
    right: 8px;
    top: auto !important;
    bottom: 8px;
    max-height: 72vh;
    min-width: 0;
    overflow: auto;
    z-index: 35;
  }

  .panel-menu-preview svg {
    width: min(252px, calc(100vw - 38px));
  }

  .panel-ballast-popover input[type="range"] {
    min-height: 44px;
  }

  .map-dialog {
    padding: 8px;
    /* Mobile: full width, centered */
    width: 100%;
    max-width: 100vw;
  }

  .map-card {
    width: 100%;
    max-height: 96vh;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
  }

  .map-stage {
    min-height: 58vh;
    height: auto;
    flex: 1;
  }

  .map-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-controls input[type="search"],
  .map-rotate,
  .map-readout {
    grid-column: span 2;
  }

  .map-rotate {
    grid-template-columns: auto 38px minmax(0, 1fr) 38px;
  }
}

/* Für sehr kleine Bildschirme (<760px): map-dialog nicht links positionieren */
@media (max-width: 759px) {
  .map-dialog {
    padding: 4px;
  }

  .map-card {
    width: 100%;
    max-width: 100vw;
    min-height: 85vh;
  }

  .map-stage {
    min-height: 65vh;
  }
}

@media (max-width: 430px) {
  .grid {
    grid-template-columns: 1fr;
  }

  label:has(input[type="text"]),
  label:has(input[type="email"]),
  label:has(select) {
    grid-column: span 1;
  }

  .result-list {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.08rem;
  }
}

/* Main-window ribbon: 23.10.2026 menu and icon specification. */
.workspace-ribbon-enabled .legacy-planner-tools { display:none !important; }
.workspace-ribbon-enabled .planner-toolbar { display:flex; flex-direction:column; align-items:stretch; gap:8px; min-width:0; }
.workspace-controls { min-width:0; width:100%; color:#29384d; }
.workspace-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; min-height:42px; margin-bottom:8px; }
.workspace-heading > span { font-size:11px; font-weight:800; letter-spacing:.15em; color:#596779; }
.workspace-utilities { display:flex; align-items:center; gap:5px; }
.workspace-ribbon { display:flex; align-items:flex-end; gap:5px; width:100%; overflow-x:auto; overscroll-behavior-inline:contain; padding:3px 3px 10px; scrollbar-width:thin; box-sizing:border-box; }
.workspace-group,.workspace-group-items { display:flex; flex:0 0 auto; align-items:flex-end; gap:5px; }
.workspace-group[hidden],.workspace-group-items[hidden],.workspace-editor[hidden],.workspace-notice[hidden],.workspace-card[hidden] { display:none !important; }
.workspace-card { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; flex:0 0 100px; width:100px; min-width:100px; max-width:100px; box-sizing:border-box; margin:0; padding:10px 6px; border:1px solid #c6c9ce; border-radius:10px; background:#d9d9d9; box-shadow:none; color:#263444; font:500 12px/1.25 Inter,'Segoe UI',sans-serif; text-align:center; cursor:pointer; transition:border-color .15s,box-shadow .15s,background .15s; }
.workspace-card-a { height:140px; }
.workspace-card-b { height:120px; }
.workspace-card img { display:block; flex:0 0 auto; width:76px; height:76px; object-fit:contain; }
.workspace-card > span { display:flex; align-items:center; justify-content:center; min-height:30px; max-width:100%; overflow-wrap:anywhere; }
.workspace-card-b img { width:66px; height:66px; }
.workspace-card:hover { border-color:#1976b9; background:#e4e8eb; }
.workspace-card:focus-visible,.workspace-slider-card:focus-within { outline:3px solid #1976b9; outline-offset:2px; }
.workspace-card[aria-pressed="true"] { border-color:#1976b9; box-shadow:inset 0 -4px #1976b9; background:#d9d9d9; }
.workspace-card-a[aria-pressed="true"]::before { content:''; position:absolute; top:8px; right:8px; width:7px; height:7px; background:#1976b9; border-radius:50%; }
.workspace-card:disabled { opacity:.45; cursor:default; }
.workspace-utility { width:38px; min-width:38px; max-width:38px; height:38px; flex-basis:38px; padding:4px; border-radius:7px; background:#f1f3f5; }
.workspace-utility img { width:28px; height:28px; }
.workspace-utility > span { display:none; }
.workspace-utilities .zoom-tools { margin:0; }
.workspace-project-name { display:flex; flex-direction:column; justify-content:center; gap:10px; width:180px; height:120px; box-sizing:border-box; padding:12px; font-size:12px; }
.workspace-project-name input { width:100%; box-sizing:border-box; }
.workspace-editor { position:relative; padding:16px; margin:4px 0 10px; border:1px solid #cbd5df; border-radius:10px; background:#f6f8fa; }
.workspace-editor-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.workspace-editor-heading h2 { margin:0; font-size:16px; color:#29384d; }
.workspace-editor-heading > button { width:30px; height:30px; padding:0; color:#29384d; font-size:22px; border:1px solid #cbd5df; border-radius:6px; background:#fff; }
.workspace-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px; }
.workspace-field { display:flex; flex-direction:column; gap:6px; color:#36465a; font-size:12px; font-weight:600; }
.workspace-field input,.workspace-field select,.workspace-project-name input { min-width:0; width:100%; padding:9px; border:1px solid #bbc6d1; border-radius:6px; background:#fff; color:#29384d; font:inherit; box-sizing:border-box; }
.workspace-check { display:flex; align-items:center; gap:8px; padding:14px 0; font-size:13px; }
.workspace-check input { width:auto; }
.workspace-action { margin-top:14px; padding:10px 16px; border:1px solid #1976b9; border-radius:7px; background:#1976b9; color:#fff; font-weight:600; }
.workspace-editor-content > p,.workspace-notice { font-size:13px; line-height:1.5; }
.workspace-notice { margin:4px 0 8px; padding:10px 14px; background:#edf4fa; border-left:3px solid #1976b9; }
.workspace-editor .roof-tool-dialog,.workspace-editor .roof-background-tools { position:static; width:auto; max-width:none; box-shadow:none; }
.workspace-slider-card { display:grid; grid-template-columns:40px 1fr auto; align-items:center; gap:8px; flex:0 0 240px; width:240px; height:120px; box-sizing:border-box; padding:14px; border:1px solid #c6c9ce; border-radius:10px; background:#d9d9d9; color:#29384d; font-size:12px; }
.workspace-slider-card img { width:40px; height:40px; }
.workspace-slider-card input { grid-column:1 / -1; width:100%; accent-color:#1976b9; }
.workspace-slider-card output { font-weight:700; }
.workspace-iso-preview { width:100%; height:auto; background:#fff; }
.workspace-ribbon-enabled .workspace-results { position:relative !important; inset:auto !important; transform:none !important; width:100% !important; min-width:0 !important; max-width:100%; height:auto !important; min-height:0; max-height:640px; resize:none; box-sizing:border-box; margin-top:14px; }
.workspace-ribbon-enabled .workspace-results .result-list { grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); }
.workspace-ribbon-enabled .workspace-results .result-page:not(.active) { display:none; }
@media (max-width:980px) {
 body.workspace-ribbon-enabled.mobile-plan-mode .workspace-results:not([hidden]):not(.hidden) { display:grid !important; }
 .workspace-ribbon-enabled .workspace-results .result-list { grid-template-columns:1fr; }
 .workspace-heading { flex-wrap:wrap; }
 .workspace-utilities { flex-wrap:wrap; }
 .workspace-editor { padding:12px; }
 .workspace-fields { grid-template-columns:repeat(auto-fit,minmax(135px,1fr)); }
}
.workspace-card,.workspace-card > span { text-transform:none; letter-spacing:normal; word-break:normal; overflow-wrap:normal; white-space:normal; font-weight:500; }
.workspace-utilities > [hidden] { display:none !important; }

/* Shared two-column project dialog and field layout chooser. */
dialog.workspace-editor { position:fixed; inset:0; width:min(820px,calc(100vw - 24px)); max-height:calc(100dvh - 32px); box-sizing:border-box; margin:auto; padding:20px; overflow:auto; color:#29384d; box-shadow:0 22px 80px #14224740; }
dialog.workspace-editor::backdrop { background:#14224755; }
dialog.workspace-editor .workspace-editor-heading { position:sticky; top:-20px; z-index:2; margin:-20px -20px 16px; padding:14px 20px; background:#f6f8fa; border-bottom:1px solid #d2dbe4; }
.workspace-two-columns { grid-template-columns:repeat(2,minmax(0,1fr)); }
.workspace-data-section { scroll-margin-top:70px; padding:4px 0 18px; }
.workspace-data-section h3 { margin:12px 0; font-size:16px; color:#1976b9; }
.workspace-checkbox-field { flex-direction:row; align-items:center; justify-content:space-between; min-height:45px; }
.workspace-checkbox-field input[type=checkbox] { width:20px; height:20px; accent-color:#1976b9; }
.workspace-editor .workspace-results { margin:0; border:0; max-height:none; }
.workspace-editor .workspace-results > .window-header { display:none; }
.solar-field-popup { position:fixed; z-index:120; width:340px; max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); overflow:auto; padding:16px; box-sizing:border-box; background:#fff; border:1px solid #a9bdcf; border-radius:10px; box-shadow:0 12px 40px #14224733; color:#29384d; }
.solar-field-popup[hidden] { display:none; }
.solar-field-popup h3 { margin:0 0 8px; font-size:16px; }
.solar-field-popup p { font-size:12px; line-height:1.5; }
.solar-field-layouts { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.solar-field-popup button { padding:10px; border:1px solid #a9bdcf; border-radius:6px; background:#edf4fa; color:#29384d; font-size:12px; text-transform:none; }
.solar-field-popup > button { margin:10px 6px 0 0; }
.obstacle-size-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
@media(max-width:540px) { dialog.workspace-editor { padding:14px; } dialog.workspace-editor .workspace-editor-heading { top:-14px; margin:-14px -14px 12px; padding:12px 14px; } .workspace-two-columns { gap:10px; } }
.workspace-checkbox-field > span { flex:1; min-width:0; }
.workspace-checkbox-field input[type=checkbox] { flex:0 0 20px; }

/* Field-relative layout previews: six real module footprints per button. */
.solar-field-layouts > button { display:flex; flex-direction:column; align-items:center; justify-content:space-between; gap:7px; min-width:0; padding:8px; }
.solar-layout-preview { display:block; width:100%; max-width:144px; height:96px; }
.solar-field-layouts > button > span { min-height:30px; display:flex; align-items:center; justify-content:center; font-weight:600; line-height:1.3; }
.solar-field-popup .solar-field-mounting { display:block; width:100%; margin:10px 0 0; background:#dcebf7; border-color:#1976b9; font-weight:700; }
.solar-field-popup .solar-field-mounting[aria-checked="true"] { background:#1976b9; color:#fff; }
.solar-field-popup .solar-field-mounting-hint { min-height:36px; margin:7px 0 10px; color:#53667a; }
.solar-field-popup .solar-field-legend { color:#53667a; margin:10px 0; }

/* One workspace on desktop and mobile; original form controls feed the dialogs. */
body.workspace-ribbon-enabled .workbench { display:grid; grid-template-columns:minmax(0,1fr); }
body.workspace-ribbon-enabled .left-stack,
body.workspace-ribbon-enabled .column-resizer,
body.workspace-ribbon-enabled .mobile-view-switch { display:none !important; }
body.workspace-ribbon-enabled .floating-area { display:block !important; width:100%; min-width:0; }
.workspace-heading { align-items:flex-start; }
.workspace-utilities { justify-content:flex-end; flex-wrap:wrap; margin-left:auto; }
.workspace-live-results { display:flex; align-items:center; justify-content:center; width:38px; min-width:38px; max-width:38px; height:38px; flex:0 0 38px; box-sizing:border-box; padding:3px; border:1px solid #c6c9ce; border-radius:7px; background:#f1f3f5; color:#263444; font:500 12px Inter,'Segoe UI',sans-serif; cursor:pointer; }
.workspace-switch-track { display:block; position:relative; width:30px; height:18px; border-radius:12px; background:#8793a0; }
.workspace-switch-track::after { content:''; position:absolute; top:3px; left:3px; width:12px; height:12px; border-radius:50%; background:#fff; }
.workspace-live-results[aria-checked="true"] .workspace-switch-track { background:#1976b9; }
.workspace-live-results[aria-checked="true"] .workspace-switch-track::after { left:15px; }
.workspace-live-results:focus-visible { outline:3px solid #1976b9; outline-offset:2px; }
.workspace-iso-tools { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-bottom:10px; font-size:12px; }
.workspace-iso-tools p { flex:1 1 200px; margin:0; }
.workspace-iso-tools .workspace-action { margin:0; }
.workspace-iso-zoom { font-weight:700; }
.workspace-editor #isoCanvas { display:block; width:100%; max-width:100%; height:auto; border:1px solid #d2dbe4; touch-action:pan-y; }
@media(max-width:540px) { .workspace-heading > span { display:none; } .workspace-utilities { width:100%; } }

.workspace-utilities .zoom-tools { display:flex !important; }

#panelTiltControls[hidden] { display:none !important; }
#panelTiltControls select, #panelTiltControls input { width:100%; box-sizing:border-box; }
#panelTiltControls small, .panel-mounting-status { display:block; font-size:11px; line-height:1.4; color:#526170; }
.panel-mounting-status { margin:6px 0; padding:7px; background:#edf3f7; border-radius:4px; }
.panel-mounting-incompatible { padding:12px; font-size:12px; color:#526170; }

#panelMenu { z-index:1100; max-width:calc(100vw - 20px); max-height:calc(100dvh - 20px); overflow:auto; box-sizing:border-box; }

.workspace-power-card { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:7px; flex:0 0 210px; width:210px; height:120px; box-sizing:border-box; padding:12px 14px; border:1px solid #c6c9ce; border-radius:10px; background:#d9d9d9; color:#29384d; }
.workspace-power-card > span { font-size:12px; font-weight:600; }
.workspace-power-card output { font-size:27px; font-weight:700; line-height:1.1; font-variant-numeric:tabular-nums; }
.workspace-power-status { font-size:11px; line-height:1.3; max-width:100%; overflow-wrap:anywhere; }

.workspace-power-status { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

.workspace-power-card { gap:4px; flex-basis:230px; width:230px; }
.workspace-power-max, .workspace-power-mean { display:flex; align-items:baseline; justify-content:space-between; gap:8px; width:100%; }
.workspace-power-max > span, .workspace-power-mean > span { font-size:12px; }
.workspace-power-max output { font-size:24px; }
.workspace-power-mean output { font-size:14px; font-weight:500; }

.workspace-config-variants { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; border:0; padding:8px 0 16px; margin:0; min-width:0; }
.workspace-config-variants legend { font-size:14px; font-weight:700; margin-bottom:8px; }
.workspace-config-choice { display:grid; grid-template-columns:18px minmax(0,1fr); gap:7px; padding:12px; border:2px solid #c6c9ce; border-radius:10px; cursor:pointer; background:#f7f8f9; }
.workspace-config-choice:has(input:checked) { border-color:#1976b9; background:#eaf4fb; }
.workspace-config-choice input { margin:2px 0 0; }
.workspace-config-choice strong { font-size:13px; }
.workspace-config-diagram, .workspace-config-choice small { grid-column:1/-1; min-width:0; }
.workspace-config-choice small, .workspace-config-hint { font-size:12px; line-height:1.45; color:#46546b; }
.workspace-config-diagram svg { display:block; width:100%; height:85px; }
@media (max-width:600px) { .workspace-config-variants { grid-template-columns:1fr; } }

.workspace-auto-config .workspace-check { padding:6px 0; margin:0; }
.workspace-auto-config input[type=checkbox], .workspace-config-choice input[type=radio] { width:18px; height:18px; min-height:0; padding:0; flex:0 0 18px; align-self:start; }

/* 25.10.2026: stable primary menus and independent tool windows. */
.workspace-yield-tools { display:flex; align-items:flex-end; gap:5px; flex:0 0 auto; flex-wrap:nowrap; }
.workspace-yield-tools[hidden],.workspace-popup[hidden] { display:none!important; }
.workspace-utilities { flex-wrap:wrap; justify-content:flex-end; }
.workspace-utilities .workspace-group { flex:0 0 auto; }
.workspace-popup { position:fixed; z-index:1001; max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); overflow:auto; resize:both; border:1px solid #b7c1cc; border-radius:10px; box-sizing:border-box; background:#f7f9fb; color:#29384d; box-shadow:0 12px 38px #14224740; }
.workspace-popup-header { position:sticky; top:0; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:7px 10px; background:#e7edf3; cursor:move; touch-action:none; font-size:13px; font-weight:700; }
.workspace-popup-header > span { flex:1; min-height:22px; }
.workspace-popup-header button { min-width:30px; min-height:30px; width:auto; padding:3px 8px; margin:0; border:1px solid #b7c1cc; border-radius:5px; background:white; color:#29384d; font:600 13px sans-serif; cursor:pointer; }
.workspace-popup-body { padding:10px; }
.workspace-iso-popup .workspace-popup-body { padding:0; }
.workspace-iso-popup #isoCanvas { display:block; width:100%; height:auto; touch-action:none; }
.workspace-result-tabs { display:flex; gap:6px; margin-bottom:8px; }
.workspace-result-tabs button { flex:1; padding:7px; font-size:12px; border:1px solid #b7c1cc; background:white; border-radius:5px; color:#29384d; }
.workspace-result-tabs button[aria-pressed=true] { background:#d8eafa; border-color:#1976b9; }
.workspace-popup dl { margin:0; font-size:12px; }
.workspace-popup dl > div { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:6px 0; border-bottom:1px solid #dce2e8; }
.workspace-popup dt { font-weight:500; }
.workspace-popup dd { margin:0; text-align:right; font-weight:700; white-space:nowrap; }
.workspace-ribbon-enabled .floating-area > .workspace-results { display:none!important; }
.panel-clamping-warning { display:block; color:#ad6500; font-weight:600; margin:4px 0; }
.workspace-field[data-advanced][hidden] { display:none!important; }

/* Exclusive menus and a viewport-sticky toolbar, including mobile. */
.workspace-ribbon-enabled .topbar > div:first-child { display:flex; align-items:center; gap:12px; }
.workspace-ribbon-enabled .topbar p, .workspace-ribbon-enabled .topbar h1 { font-size:.82rem!important; font-weight:760; line-height:1.2; margin:0; }
.workspace-ribbon-enabled .topbar { align-items:center; margin-bottom:8px; }
.workspace-ribbon-enabled .shell { padding-top:10px; }
body.workspace-ribbon-enabled .floating-area, body.workspace-ribbon-enabled .fixed-planner { overflow:visible!important; }
body.workspace-ribbon-enabled .fixed-planner { height:auto!important; }
body.workspace-ribbon-enabled .planner-toolbar { position:sticky; top:0; z-index:40; background:#fff; box-shadow:0 5px 12px #14224712; }
@supports (overflow:clip) { html:has(body.workspace-ribbon-enabled), body.workspace-ribbon-enabled { overflow-x:clip; } }

/* A single touch drag selects modules when explicitly armed; normal touch pans. */
.workspace-touch-select { display:none; }
#roofCanvas.selection-window-mode { cursor:crosshair; }
@media (any-pointer:coarse), (max-width:800px) {
  .workspace-touch-select { display:flex; }
}

.workspace-energy-status { margin:10px 0; padding:9px 10px; border-left:3px solid #1976b9; background:#edf4fa; color:#29384d; font-size:12px; line-height:1.45; overflow-wrap:anywhere; }
