.room-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 15px 0;
}
.room-toolbar > div {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.room-toolbar strong {
  font-size: 17px;
}
.room-toolbar span {
  font-size: 13px;
  color: #76928a;
}
.room-toolbar .btn {
  font-size: 12px;
  padding: 8px 10px;
}
.room-toolbar .pressed {
  background: #dfefe6;
  border-color: #93b6a4;
}
.room-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 20px;
  align-items: start;
}
.room-panel {
  min-width: 0;
  background: #f9fbfa;
  border-top: 4px solid #78a98b;
}
.room-dimensions,
.room-key {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 18px;
  font-size: 12px;
  color: #729088;
}
.room-stage {
  position: relative;
}
.room-scroll {
  overflow: auto;
  max-height: 720px;
  min-height: 320px;
  cursor: grab;
}
.room-scroll.panning {
  cursor: grabbing;
  user-select: none;
}
.room-scroll > svg {
  display: block;
  aspect-ratio: auto;
  height: auto;
  touch-action: none;
  overflow: visible;
}
.room-camera {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  flex-wrap: wrap;
  max-width: calc(100% - 24px);
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: #f9fbfaee;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 2px 8px #193f3926;
}
.room-camera button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}
.room-camera .room-fit {
  width: auto;
  padding: 0 8px;
  font-size: 11px;
}
.room-camera button:hover,
.room-camera button:focus-visible {
  background: #dfefe6;
  outline: 2px solid #287159;
  outline-offset: 1px;
}
.room-camera span {
  min-width: 42px;
  text-align: center;
  color: #496b61;
  font-size: 11px;
  font-weight: 700;
}
.room-key {
  border-top: 1px solid #dde7e1;
}
.room-key i {
  display: inline-block;
  width: 20px;
  border-top: 2px dashed #649584;
  vertical-align: middle;
  margin-right: 5px;
}
.room-inspector {
  position: sticky;
  top: 15px;
  max-height: calc(100vh - 30px);
  overflow-y: auto;
  border-top: 4px solid #d4a65b;
  background: #fffbf4;
}
.room-inspector h3 {
  overflow-wrap: anywhere;
}
.room-inspector input[type='color'] {
  padding: 4px;
  cursor: pointer;
}
.room-inspector .inspector-body > label {
  margin-top: 15px;
}
.room-inspector-section {
  border-top: 1px solid var(--line);
}
.room-inspector-section:first-child {
  border-top: 0;
}
.room-inspector-section summary {
  padding: 13px 18px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  cursor: pointer;
}
.room-inspector-section summary:hover,
.room-inspector-section summary:focus-visible {
  background: #f6eddc;
}
.room-inspector-section summary:focus-visible {
  outline: 2px solid #287159;
  outline-offset: -2px;
}
.room-inspector-section-body {
  padding: 4px 18px 18px;
}
.room-type {
  font-size: 11px;
  letter-spacing: 1px;
  color: #8b9a90;
  display: block;
  margin-bottom: 8px;
}
.room-object {
  cursor: grab;
  touch-action: none;
  outline: none;
}
.room-object:active {
  cursor: grabbing;
}
.room-object:focus-visible .selection-ring {
  stroke: #db9950;
  stroke-width: 4;
}
.colour-swatches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 20px;
}
.colour-swatches button {
  width: 27px;
  height: 27px;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #cad8d0;
}
.prop-page {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 20px;
}
.prop-library {
  padding: 14px;
  border-top: 4px solid #7f9eb3;
  background: #f7fafc;
}
.prop-library .btn {
  width: 100%;
  margin-top: 10px;
}
.prop-tile {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  width: 100%;
  padding: 12px;
  border-radius: 7px;
  border: 1px solid transparent;
  margin-bottom: 8px;
}
.prop-tile.active {
  border-color: #76a28c;
  background: #ecf5ef;
}
.prop-tile svg {
  width: 55px;
  height: 55px;
  flex-shrink: 0;
}
.prop-tile strong {
  display: block;
  font-size: 14px;
}
.prop-tile small {
  display: block;
  font-size: 12px;
  color: #7b9287;
  margin-top: 5px;
}
.prop-editor {
  padding: 24px;
  min-width: 0;
  border-top: 4px solid #78a98b;
  background: #fbfdfb;
}
.prop-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 24px;
}
.prop-canvas {
  border: 1px solid #d6e1d9;
  border-radius: 8px;
  background-color: #fafcfb;
  background-image: radial-gradient(#d2ddd5 0.8px, transparent 0.8px);
  background-size: 16px 16px;
  aspect-ratio: 1;
  max-height: 580px;
  position: relative;
}
.prop-canvas svg {
  width: 100%;
  height: 100%;
  display: block;
}
.prop-canvas.marking {
  cursor: crosshair;
}
.prop-form > label {
  margin: 13px 0;
}
.prop-form .two {
  margin: 13px 0;
}
.prop-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.prop-help {
  font-size: 13px;
  line-height: 1.7;
  color: #6c8779;
}
.prop-stat {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #729580;
  margin: 12px 0;
}
.props-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.props-header h2 {
  font-size: 20px;
}
.prop-reference {
  padding: 12px;
  background: #f1f5f1;
  font-size: 12px;
  color: #7b8f80;
  overflow-wrap: anywhere;
  border-radius: 5px;
}
.prop-empty {
  padding: 35px;
  text-align: center;
  color: #719284;
}
.room-note {
  font-size: 13px;
  background: #edf4f0;
  color: #577d6e;
  border: 1px solid #d4e3d9;
  border-radius: 6px;
  padding: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.room-object-label {
  font-size: calc(13px * var(--room-unit, 1));
  font-weight: 700;
  fill: #284f47;
  paint-order: stroke;
  stroke: #f9fbfa;
  stroke-width: calc(2px * var(--room-unit, 1));
}
.room-object-detail {
  font-size: calc(12px * var(--room-unit, 1));
  font-weight: 600;
  fill: #597a70;
  paint-order: stroke;
  stroke: #f9fbfa;
  stroke-width: calc(2px * var(--room-unit, 1));
}
.room-unconnected circle {
  fill: var(--orange);
  stroke: white;
  stroke-width: 2;
}
.room-unconnected text {
  fill: #2c2417;
  font-size: 16px;
  font-weight: 800;
}
.room-port-label {
  font-size: var(--room-label-size, 12px);
  font-weight: 700;
  fill: #193f39;
  paint-order: stroke;
  stroke: none;
  stroke-width: calc(1px * var(--room-unit, 1));
  pointer-events: none;
}
.room-external-node.port-traced .room-port-symbol,
.room-external-node.wire-target .room-port-symbol {
  stroke: #193f39;
  stroke-width: 2;
}
.room-external-node.wire-invalid .room-port-symbol {
  stroke: #bd4038;
  stroke-width: 2;
}
.physical-route.port-traced :is(.route-line, .route-interface-line) {
  stroke-width: 3;
}
.room-boundary,
.room-box-shell,
.room-port-symbol,
.selection-ring {
  vector-effect: non-scaling-stroke;
}
.room-boundary {
  stroke-width: 2;
}
.room-box-shell {
  stroke-width: 2;
}
.selection-ring {
  stroke-width: 2;
  stroke-dasharray: 4 3;
}
.room-port-symbol {
  stroke-width: 2;
}
.room-external-node[data-label-visible='false'] .room-port-symbol {
  visibility: hidden;
  pointer-events: none;
}
.room-external-node[data-label-visible='false'] .room-port-label {
  display: none;
}
.room-port-hit {
  fill: transparent;
  stroke: transparent;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
  pointer-events: stroke;
}
.room-equipment-symbol {
  fill: none;
  stroke: #ffffff;
  pointer-events: none;
}
.room-equipment-symbol :is(rect, path, circle) {
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.room-box-equipment,
.room-box-internals {
  display: none;
}
.room-object[data-room-detail='detail'] .room-box-internals,
.room-object[data-room-detail='equipment'] .room-box-equipment[data-fits='true'] {
  display: block;
}
.room-object[data-room-detail='detail'] .room-equipment-symbol {
  display: none;
}
.room-port-group {
  display: none;
  cursor: crosshair;
}
.room-port-group[data-visible='true'] {
  display: block;
}
.room-port-group rect {
  fill: #193f39;
  stroke: #ffffff;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.room-port-group text {
  fill: #ffffff;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}
.room-port-group:focus-visible {
  outline: none;
}
.room-port-group:focus-visible rect,
.room-port-group:hover rect {
  stroke: #f1bd64;
  stroke-width: 3;
}
.room-box-name {
  font-size: var(--room-label-size, 14px);
  fill: #193f39;
  stroke: #f9fbfa;
  stroke-width: calc(4px * var(--room-unit, 1));
  stroke-linejoin: round;
  paint-order: stroke;
}
.room-box-configuration {
  font-size: calc(12px * var(--room-unit, 1));
  font-weight: 700;
}
.room-component-label {
  font-size: var(--room-label-size, 14px);
  font-weight: 700;
  paint-order: stroke;
  fill: #193f39;
  stroke: #f9fbfa;
  stroke-width: calc(3px * var(--room-unit, 1));
}
.room-component-subname {
  fill: var(--label-colour, #ffffff);
  font-size: min(10px, calc(10px * var(--room-unit, 1)));
}
.room-component-icon {
  font-size: min(22px, calc(22px * var(--room-unit, 1)));
  fill: #193f39;
  stroke: none;
  pointer-events: none;
}
.room-component-card :is(.room-component-label, .room-component-icon) {
  fill: var(--room-component-ink);
}
.room-component-card .room-component-label {
  stroke: var(--room-component-fill);
}
.room-component-card rect {
  vector-effect: non-scaling-stroke;
}
.room-component-card,
[data-room-button] {
  pointer-events: all;
}
.room-component-card:is(:hover, :focus-visible) {
  outline: none;
}
.room-component-card:is(:hover, :focus-visible) rect {
  stroke: var(--room-component-ink);
  stroke-width: 3;
}
.room-label-details {
  padding: 10px;
  background: #f9fbfa;
  color: #193f39;
  border: 1px solid var(--line);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.room-object[data-room-detail='detail'] .room-box-name {
  font-size: var(--room-label-size, 14px);
}
.room-object[data-room-detail='detail'] .room-box-configuration {
  display: none;
}
.room-object[data-room-detail='detail'] .room-component-label {
  font-size: var(--room-label-size, 14px);
}
.room-object[data-room-detail='detail'] .room-component-subname {
  font-size: min(10px, calc(10px * var(--room-unit, 1)));
}
.room-object[data-room-detail='detail'] .room-component-icon {
  font-size: min(22px, calc(22px * var(--room-unit, 1)));
}
.room-overview-label {
  display: block;
}
.room-overview-label path {
  fill: none;
  stroke: #688a80;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.room-overview-label text {
  font-size: calc(15px * var(--room-unit, 1));
  font-weight: 700;
  fill: #284f47;
  paint-order: stroke;
  stroke: #f9fbfa;
  stroke-width: calc(2px * var(--room-unit, 1));
}
.room-object[data-room-title-inside='true'] .room-overview-label {
  display: none;
}
.room-caption text {
  stroke-width: 2px;
}
.room-object[data-room-captions='false']
  :is(
    .room-caption,
    .room-object-label,
    .room-overview-label,
    .room-name-leader,
    .room-port-caption,
    .room-port-leader
  ) {
  display: none;
}
.room-name-leader,
.room-port-leader {
  fill: none;
  stroke: #597a70;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
#room-wire-preview {
  fill: none;
  stroke: #d9982d;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 9 6;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}
.room-object.wire-target .selection-ring {
  stroke: #d9982d;
  stroke-width: 3;
  filter: drop-shadow(0 0 6px #f1bd64);
}
@media (max-width: 1250px) {
  .room-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .room-inspector {
    position: static;
    max-height: 720px;
  }
  .room-inspector .inspector-body {
    display: block;
  }
  .prop-page {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .prop-edit-grid {
    grid-template-columns: 1fr;
  }
  .prop-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .prop-form > label {
    margin: 0;
  }
  .prop-form .two {
    margin: 0;
  }
  .prop-form .prop-help {
    grid-column: 1/-1;
  }
  .room-toolbar {
    flex-wrap: wrap;
  }
}
@media (max-width: 700px) {
  .prop-page {
    grid-template-columns: 1fr;
  }
  .prop-library {
    display: flex;
    overflow: auto;
    gap: 8px;
    align-items: center;
  }
  .prop-tile {
    width: 180px;
    flex-shrink: 0;
    margin: 0;
  }
  .prop-library > .btn {
    width: 100px;
    flex-shrink: 0;
    margin: 0;
  }
  .prop-editor {
    padding: 18px;
  }
  .props-header {
    align-items: start;
  }
  .props-header h2 {
    font-size: 18px;
  }
  .room-key {
    flex-direction: column;
  }
  .room-toolbar > div {
    gap: 5px;
  }
  .room-toolbar .btn {
    font-size: 12px;
  }
  .room-toolbar > div:first-child {
    width: 100%;
  }
  .prop-form {
    grid-template-columns: 1fr;
  }
  .room-inspector .two {
    grid-template-columns: 1fr 1fr;
  }
  .segmented button {
    padding: 8px 11px;
    font-size: 13px;
  }
}

.room-link {
  stroke-width: 2;
  stroke: #3d91bd;
  opacity: 0.72;
  stroke-dasharray: 6 4;
  vector-effect: non-scaling-stroke;
}
.room-link.power {
  stroke: #dc8f3d;
  stroke-width: 3;
  stroke-dasharray: none;
}
.room-link.inject {
  stroke: #b96247;
  stroke-width: 3;
  stroke-dasharray: 9 5;
}
.room-key .room-power-key {
  border-color: #dc8f3d;
  border-top-style: solid;
}
.room-key .room-inject-key {
  border-color: #b96247;
}

.route-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.route-filter button {
  border: 1px solid #b9cfc1;
  background: #f7faf8;
  color: #557266;
  border-radius: 5px;
  padding: 7px 10px;
  font-size: 12px;
}
.route-filter button.active {
  background: #dcefe4;
  color: #205a40;
}
.physical-route :is(.route-line, .route-interface-line) {
  fill: none;
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-linecap: round;
  pointer-events: stroke;
  vector-effect: non-scaling-stroke;
}
.physical-route.inject :is(.route-line, .route-interface-line) {
  stroke-dasharray: 8 5;
}
.physical-route .route-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 15;
  pointer-events: stroke;
  cursor: crosshair;
  vector-effect: non-scaling-stroke;
}
.physical-route.selected :is(.route-line, .route-interface-line) {
  stroke-width: 3;
}
.route-cable-label {
  transform: translateY(calc(-8px * var(--room-unit, 1)));
  fill: var(--ink);
  font-size: calc(12px * var(--room-unit, 1));
  font-weight: 700;
  text-anchor: middle;
  transform: translateY(calc(-10px * var(--room-unit, 1)));
  stroke: white;
  stroke-width: calc(4px * var(--room-unit, 1));
  stroke-linejoin: round;
  paint-order: stroke;
  pointer-events: none;
}
.physical-route .route-cable-label {
  display: none;
}
.physical-route:is(:hover, :focus-visible, .selected) .route-cable-label {
  display: block;
}
.route-handle {
  fill: #fff;
  stroke: #287159;
  stroke-width: 1.5;
  cursor: grab;
  pointer-events: none;
  touch-action: none;
  vector-effect: non-scaling-stroke;
}
.route-handle:active {
  cursor: grabbing;
}
.route-handle.endpoint {
  stroke: #287159;
}
.route-marker.open .endpoint {
  stroke: #a86b25;
  stroke-dasharray: 2 2;
}
.route-marker.selected .endpoint {
  fill: #ffdd8e;
}
.route-marker-hit {
  r: calc(10px * var(--room-unit, 1));
  fill: transparent;
  stroke: none;
  pointer-events: all;
  cursor: grab;
  touch-action: none;
}
.route-marker:focus-visible {
  outline: none;
}
.route-marker:focus-visible .route-handle {
  stroke: var(--ink);
  stroke-width: 2.5;
}
.route-handle.active {
  fill: #ffdd8e;
}
.route-alert {
  font-size: 22px;
  font-weight: 700;
  fill: #b94e35;
  stroke: white;
  stroke-width: 4;
  paint-order: stroke;
}
.route-metrics {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  padding: 12px;
  background: #f3f7f4;
  border-radius: 6px;
  font-size: 13px;
}
.route-metrics span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.route-inspector label {
  display: block;
  margin: 14px 0;
}
.route-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.route-result {
  padding: 10px;
  margin: 12px 0;
  border-radius: 5px;
  background: #edf3ee;
  color: #42715a;
  font-size: 13px;
}
.route-result.short {
  background: #fff0e6;
  color: #a84d32;
  font-weight: 700;
}
.route-result.spare {
  background: #e8f6ed;
  color: #2b7051;
}
.catalog-tools {
  display: flex;
  gap: 9px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.catalog-tools input,
.catalog-tools select {
  min-width: 155px;
  max-width: 320px;
  padding: 8px;
  border: 1px solid #c8d9cf;
  border-radius: 5px;
  background: #fff;
}
.catalog-tools input {
  flex: 1;
}
.field-picker {
  max-height: 45vh;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 5px;
}
.field-picker label {
  border: 1px solid #dce7df;
  border-radius: 5px;
  padding: 7px;
  margin: 0;
}
.field-picker small,
.palette-item small {
  display: block;
  color: #71887b;
  font-size: 10px;
}
[data-catalog-item][hidden] {
  display: none !important;
}
.route-issues {
  font-size: 12px;
  color: #a44f36;
  padding-left: 20px;
}
.room-external-node {
  cursor: crosshair;
  pointer-events: all;
  transition:
    transform 120ms ease,
    filter 120ms ease;
}
.room-external-node:is(:hover, :focus-visible) {
  filter: drop-shadow(0 0 3px #f9fbfa) drop-shadow(0 0 2px #173c32);
  outline: none;
}
.room-port-dot {
  r: calc(3px * var(--room-unit, 1));
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.room-port-tip {
  r: calc(3px * var(--room-unit, 1));
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  pointer-events: all;
  cursor: crosshair;
}
.room-external-node[data-grouped='true'] .room-port-dot,
.room-port-tip[data-grouped='true'] {
  r: calc(1.5px * var(--room-unit, 1));
}
.room-external-node[data-grouped='true']:focus-visible .room-port-dot {
  r: calc(4px * var(--room-unit, 1));
}
.room-external-node[data-dense='true'] .room-port-symbol,
.room-external-node[data-dense='true'] .room-port-label {
  display: none;
}
.room-object-label,
.room-object-detail,
.room-overview-label,
.room-box-equipment,
.room-box-internals {
  pointer-events: none;
}
.room-button-symbol :is(rect, ellipse) {
  vector-effect: non-scaling-stroke;
}
.room-port-picker {
  position: absolute;
  z-index: 5;
  right: 12px;
  top: 64px;
  width: min(360px, calc(100% - 24px));
  max-height: calc(100% - 80px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 6px 20px #12382425;
}
.room-port-picker > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.room-port-picker p {
  font-size: 13px;
  margin: 12px 0;
}
.room-port-picker > button {
  width: 100%;
  text-align: left;
  padding: 10px;
  margin-top: 6px;
  border: 2px solid var(--port-color);
  background: #193f39;
  color: #fff;
  border-radius: 5px;
}
.room-port-picker small {
  display: block;
  color: #d7ebe4;
}
.room-port-picker button:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}
.route-handle {
  r: calc(4px * var(--room-unit, 1));
}
.route-handle.endpoint {
  r: calc(3px * var(--room-unit, 1));
}
.route-alert {
  font-size: calc(14px * var(--room-unit, 1));
  stroke-width: calc(2px * var(--room-unit, 1));
}
.room-unconnected circle {
  r: calc(10px * var(--room-unit, 1));
  vector-effect: non-scaling-stroke;
}
.room-unconnected text {
  font-size: calc(14px * var(--room-unit, 1));
}
.physical-route.has-issues :is(.route-line, .route-interface-line) {
  stroke-dasharray: 9 4;
}
.physical-route.unknown :is(.route-line, .route-interface-line) {
  opacity: 0.65;
}
.physical-route.has-issues .route-alert {
  pointer-events: all;
}
