/* Industrial Studio: graphite instruments, warm signal accents, unobstructed working planes. */
:root {
  --steel: #283d47;
  --steel-deep: #182a32;
  --steel-line: #c7d0d5;
  --signal: #dc9b35;
  --canvas: #fafcfc;
  --ink: #223942;
}
.studio-shell {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
}
.studio-shell .topbar {
  background: var(--steel-deep);
  border-bottom: 1px solid #3a4d55;
  color: #e7eef0;
}
.studio-shell .topbar button,
.studio-shell .topbar input {
  color: #e7eef0;
}
.studio-shell .topbar button:hover {
  background: #334951;
}
.studio-shell .topbar .primary {
  background: #167c65;
}
.studio-shell .topbar #project-name {
  background: transparent;
}
.studio-shell .topbar #save-state {
  color: #a4b6be;
}
.studio-shell .brand-mark {
  background: #d49c45;
  color: #142c35;
}
.studio-shell .workspace-tabs {
  background: #edf1f2;
  border-bottom: 1px solid #bdc9cf;
}
.studio-shell .workspace-tabs button.active {
  background: #dce8e9;
  border-color: #a5bbbf;
  color: #163c43;
  font-weight: 650;
}
.studio-shell .sidebar {
  background: #f0f3f4;
}
.studio-shell .library-tabs {
  background: #e0e7e9;
}
.studio-shell .plant-library-item {
  min-height: 62px;
  padding: 6px 8px;
  gap: 8px;
}
.studio-shell .plant-library-item .component-icon {
  width: 30px;
  min-width: 30px;
}
.studio-shell .plant-library-item small {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.3;
  color: #61747d;
  margin-top: 3px;
}
.studio-shell .plant-library-item > span:nth-child(2) {
  font-size: 11px;
  line-height: 1.3;
  min-width: 0;
}
.studio-shell .drag-grip {
  display: none;
}
.studio-shell .component-group {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: #587079;
}
.studio-shell .canvas-toolbar,
.studio-shell .plant-toolbar {
  background: #f6f8f8;
  border-bottom: 1px solid #bccbd0;
  gap: 5px;
}
.studio-shell button {
  border-radius: 4px;
}
.studio-shell .ladder-tools {
  overflow: visible;
}
.studio-shell .canvas-toolbar strong {
  display: none;
}
.studio-shell .ladder-sheet {
  padding: 0;
  background: #fafcfc;
  position: relative;
}
.studio-shell .sheet-heading {
  height: 25px;
  min-height: 25px;
  background: #edf2f3;
  border-bottom: 1px solid #d4dfe2;
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 5px 10px;
  white-space: nowrap;
  overflow: hidden;
  font-size: 10px;
}
.studio-shell #rungs-container.continuous-board {
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background-color: var(--canvas);
  background-image: radial-gradient(#c8d6da 0.8px, transparent 0.8px);
  background-size: 20px 20px;
  touch-action: none;
  outline: none;
  min-height: 800px;
  overflow: visible;
}
.continuous-board .graph-node {
  cursor: move;
}
.continuous-board .graph-rail {
  stroke: #607b86;
}
.continuous-board .ladder-cell {
  color: #243f49;
}
.continuous-board .cell-address {
  font-size: 10px;
  color: #355c69;
}
.continuous-board .cell-tag {
  font-size: 10px;
  color: #25424e;
}
.continuous-board .port {
  border-color: #547d89;
}
.continuous-board .rail-port {
  opacity: 0.45;
}
.continuous-board .rail-port:hover {
  opacity: 1;
  background: #dfad52;
}
.continuous-board .graph-node:hover .port {
  background: #d3e8ed;
}
.continuous-board .wire {
  stroke: #365765;
  stroke-width: 1.8;
}
.continuous-board .wire.live {
  stroke: #158568;
}
.continuous-board .wire.selected-wire {
  stroke: #c28623;
  stroke-width: 3;
}
.multi-selected > .ladder-cell,
.scene-object.multi-selected {
  outline: 1.5px solid #bd842b !important;
  outline-offset: 4px;
  background: #dca24712 !important;
}
.selection-marquee {
  position: absolute;
  border: 1px solid #b98129;
  background: #dca24722;
  z-index: 1000;
  pointer-events: none;
}
.studio-shell .graph-node .ladder-cell.selected {
  background: transparent;
  border-color: transparent;
}
.studio-shell .plant-viewport {
  background: #dce4e7;
}
.studio-shell #plant-stage {
  background-color: #f9fbfb;
  background-image: radial-gradient(#c2d1d7 0.8px, transparent 0.8px);
  box-shadow: 0 0 0 1px #c9d5d9;
}
.studio-shell .object-caption {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  color: #254957;
  font-size: 12px;
}
.studio-shell .object-signal {
  color: #5b7886;
  font-size: 10px;
}
.studio-shell .scene-status {
  background: #edf2f3;
  color: #4a6571;
}
/* Compact, structured component sheets: operation first, geometry last. */
dialog#properties-dialog {
  width: min(620px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid #aebfc6;
  border-radius: 10px;
  box-shadow: 0 24px 90px #0c263750;
}
#properties-dialog::backdrop {
  background: #172f3b66;
  backdrop-filter: blur(3px);
}
#properties-dialog > .dialog-heading {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 12px 18px;
  background: #243c46;
  color: #edf5f6;
  margin: 0;
  border-bottom: 1px solid #48616c;
}
#properties-dialog > .dialog-heading h2 {
  font-size: 14px;
  letter-spacing: 0.01em;
  color: inherit;
}
#properties-dialog > .dialog-heading button {
  color: #fff;
  background: transparent;
}
#properties-host {
  padding: 18px 22px;
}
#properties-host h2 {
  font-size: 21px;
  line-height: 1.2;
  margin: 3px 0;
  color: #233e48;
}
.component-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}
.component-preview {
  width: 50px;
  height: 50px;
  background: #e8eff1;
  border: 1px solid #ccdadf;
  border-radius: 8px;
  padding: 8px;
}
.component-preview svg,
.component-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.component-heading .eyebrow {
  font-size: 9px;
  letter-spacing: 0.13em;
  color: #69808a;
}
.component-description {
  font-size: 12px;
  line-height: 1.6;
  color: #536f7a;
  margin: 12px 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #dce5e8;
}
#scene-props,
#element-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#scene-props label,
#element-form label {
  font-size: 12px;
  font-weight: 550;
  color: #3c5762;
  margin: 0;
}
#scene-props input,
#scene-props select,
#element-form input,
#element-form select {
  font-size: 12px;
  min-height: 35px;
  border: 1px solid #bbcdd4;
  background: #fff;
  border-radius: 5px;
  width: 100%;
  margin-top: 5px;
}
.property-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 6px 0 0;
  color: #406673;
  border-left: 3px solid #c38a30;
  padding-left: 8px;
}
.signal-list {
  border: 1px solid #d4e0e4;
  border-radius: 7px;
  overflow: hidden;
}
.signal-field {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: #f3f7f8;
  border-bottom: 1px solid #dbe5e8;
}
.signal-field:last-child {
  border-bottom: 0;
}
.signal-field small {
  display: block;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 400;
  color: #6e858f;
  margin-top: 3px;
}
.signal-field select {
  margin: 0 !important;
}
.appearance-options {
  border-top: 1px solid #d5e0e4;
  border-bottom: 1px solid #d5e0e4;
  padding: 0;
  margin: 6px 0;
}
.appearance-options summary {
  padding: 12px 0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #5a7380;
}
.appearance-options[open] {
  padding-bottom: 12px;
}
.property-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.check-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
}
.check-label input {
  width: 15px !important;
  min-height: 15px !important;
  height: 15px;
  margin: 0 !important;
  accent-color: #28786e;
}
.property-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  bottom: -18px;
  background: #fff;
  padding: 12px 0 8px;
  border-top: 1px solid #dae4e7;
  z-index: 3;
}
.property-actions button {
  min-height: 36px;
  padding: 6px 16px;
}
.secondary-actions {
  margin-top: 15px;
  padding-top: 8px;
  border-top: 1px solid #e3eaed;
}
.secondary-actions button {
  font-size: 11px;
  border: 0;
  color: #657b84;
}
.secondary-actions .danger {
  color: #af4c42;
}
/* Process artwork, flat side elevation; motion always follows simulation state. */
.studio-shell .tank-vessel {
  inset: 6% 9% 7%;
  border: 3px solid #567783;
  border-top: 7px solid #78909a;
  border-radius: 9px 9px 13px 13px;
  background: #e8f2f580;
  box-shadow:
    inset 6px 0 #fff8,
    inset -6px 0 #afc5ce66;
  overflow: visible;
}
.studio-shell .tank-liquid {
  left: 3px;
  right: 3px;
  bottom: 3px;
  background: #429bc4c9;
  border-top: 2px solid #d5f4ff;
  max-height: 99%;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}
.tank-liquid:after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0 22px,
    #b5e4f43b 23px 24px
  );
}
.studio-shell .liquid-surface {
  height: 8px;
  top: -4px;
  background: repeating-linear-gradient(
    90deg,
    #e2f9ff 0 14px,
    #62b6d6 15px 28px
  );
  opacity: 0.85;
}
.has-flow .liquid-surface,
.is-draining .liquid-surface {
  animation: water-wave 1.5s linear infinite;
}
.studio-shell .tank-reading {
  background: #203e4ce8;
  color: #e7f8ff;
  border: 1px solid #678893;
  border-radius: 4px;
  font:
    12px ui-monospace,
    monospace;
  box-shadow: none;
  padding: 5px 8px;
}
.studio-shell .tank-scale {
  color: #456674;
  font-size: 10px;
}
.studio-shell .level-probe {
  background: #d8e5e9;
  border: 1px solid #79959f;
  padding: 3px;
  color: #264b5b;
}
.tank-overflow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}
.is-spilling .tank-overflow {
  opacity: 1;
}
.tank-overflow i {
  position: absolute;
  right: 1%;
  top: 7%;
  width: 8%;
  height: 97%;
  border-radius: 50% 0 20% 30%;
  background: repeating-linear-gradient(
    0deg,
    #4eaddb99 0 10px,
    #c3eeff 11px 15px
  );
  animation: water-fall 0.5s linear infinite;
}
.tank-overflow:after {
  content: "";
  position: absolute;
  bottom: -9%;
  right: -20%;
  width: 68%;
  height: 9%;
  border-radius: 50%;
  background: #65b6d866;
  border: 1px solid #52a9ce;
}
.spill-reading {
  position: absolute;
  bottom: -20%;
  right: 0;
  font: 11px monospace;
  color: #a6572d;
  white-space: nowrap;
}
.tank-drain {
  position: absolute;
  bottom: -4%;
  left: 46%;
  width: 10%;
  height: 12%;
  border: 2px solid #577989;
  background: #afc5cf;
}
.is-draining .tank-drain {
  background: repeating-linear-gradient(0deg, #52afda 0 5px, #cff2ff 6px 10px);
  animation: water-fall 0.5s linear infinite;
}
.studio-shell .belt-frame {
  border: 2px solid #506c79;
  background: #c5d5dc;
  border-radius: 20px;
}
.studio-shell .belt-surface {
  background: #455e6a;
  border: 2px solid #304c59;
}
.studio-shell .belt-treads {
  background: repeating-linear-gradient(
    90deg,
    #708995 0 14px,
    #405b69 15px 18px,
    #9db0b9 19px 20px
  );
}
.studio-shell .belt-roller {
  border: 3px solid #557380;
  background: #dce6e9;
  box-shadow: inset 0 0 0 5px #a9bcc5;
}
.studio-shell .belt-leg {
  background: #7693a0;
  border: 1px solid #496775;
}
.studio-shell .cargo-box {
  background: var(--component-color);
  border: 2px solid #634e3677;
  border-radius: 2px;
  box-shadow:
    inset 0 -5px #00000010,
    inset 4px 0 #ffffff15;
}
.studio-shell .cargo-tape {
  background: #e9d6a79c;
}
.studio-shell .cargo-mark {
  color: #263c46b3;
  font-size: 14px;
}
.studio-shell .motor-running-indicator {
  height: 5px;
  width: 26px;
  background: #7b929d;
  border-radius: 1px;
  border: 1px solid #314d59;
}
.is-active .motor-running-indicator {
  background: #66ce9c;
  animation: status-pulse 1.2s linear infinite;
}
.studio-shell .pump-motion {
  border: 2px dashed #c6edf5;
  inset: 32% 37%;
  background: transparent;
}
.is-active .pump-motion {
  animation: spin 1s linear infinite;
}
.signal-mast {
  position: absolute;
  inset: 0;
}
.signal-housing {
  position: absolute;
  left: 20%;
  right: 20%;
  top: 0;
  height: 72%;
  background: #243c47;
  border: 3px solid #15303d;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  padding: 5px;
  gap: 5px;
}
.signal-light {
  flex: 1;
  display: block;
  border-radius: 50%;
  border: 2px solid #172f3b;
  background: #62727a;
  opacity: 0.3;
}
.signal-light.red {
  background: #ee655c;
}
.signal-light.amber {
  background: #efb542;
}
.signal-light.green {
  background: #56c595;
}
.light-red .signal-light.red,
.light-amber .signal-light.amber,
.light-green .signal-light.green {
  opacity: 1;
  border-color: #d0e4e94d;
  box-shadow: inset 0 0 0 2px #ffffff20;
}
.tower .signal-housing {
  padding: 0;
  gap: 2px;
  border-width: 2px;
  border-radius: 6px;
}
.tower .signal-light {
  border-radius: 3px;
  border: 0;
}
.tower-buzzer {
  height: 15%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  padding: 1px 4px;
}
.tower-buzzer span {
  height: 2px;
  background: #8ea2ab;
}
.mast-pole {
  position: absolute;
  left: 46%;
  width: 8%;
  top: 72%;
  height: 25%;
  background: #7c939e;
  border: 1px solid #3f606f;
}
.mast-foot {
  position: absolute;
  bottom: 0;
  left: 22%;
  width: 56%;
  height: 5%;
  background: #4b6978;
}
.sounding .tower-buzzer {
  background: #dc9b35;
}
.sound-waves {
  opacity: 0.15;
}
.sounding .sound-waves {
  opacity: 1;
  animation: status-pulse 0.5s linear infinite;
}
.storage-rack,
.pallet-lift,
.diverter-body,
.robot-base {
  position: absolute;
  inset: 0;
}
.rack-post {
  position: absolute;
  width: 6%;
  height: 100%;
  top: 0;
  background: repeating-linear-gradient(
    0deg,
    #41657b 0 13px,
    #c1d1d9 14px 16px
  );
  border: 2px solid #2d4c61;
}
.rack-post.left {
  left: 0;
}
.rack-post.right {
  right: 0;
}
.rack-shelf {
  position: absolute;
  left: 0;
  right: 0;
  height: 5%;
  background: #dc933d;
  border: 2px solid #a46b29;
}
.rack-count {
  position: absolute;
  top: -25px;
  right: 0;
  background: #284552;
  color: #e0eef4;
  font: 12px monospace;
  padding: 3px 7px;
  border-radius: 3px;
}
.lift-guide {
  position: absolute;
  top: 0;
  height: 100%;
  width: 6%;
  background: repeating-linear-gradient(
    0deg,
    #74919f 0 12px,
    #b9cbd2 13px 16px
  );
  border: 2px solid #4b6a7a;
}
.lift-guide.left {
  left: 3%;
}
.lift-guide.right {
  right: 3%;
}
.pallet-platform {
  position: absolute;
  left: 0;
  right: 0;
  height: 18px;
  bottom: calc(24px + var(--travel-position, 0) * (100% - 40px) - 18px);
  background: repeating-linear-gradient(
    135deg,
    #deac52 0 12px,
    #364b59 13px 24px
  );
  border: 2px solid #344e5c;
}
.lift-motor {
  position: absolute;
  bottom: 0;
  left: 40%;
  width: 20%;
  height: 18px;
  background: #3d697e;
  color: white;
  text-align: center;
  font-size: 12px;
}
.diverter-flap {
  position: absolute;
  left: 43%;
  top: 48%;
  width: 48%;
  height: 7%;
  background: #d9a348;
  border: 2px solid #9f702e;
  transform-origin: 0 50%;
  transform: rotate(-32deg);
  transition: transform 0.2s;
}
.is-active .diverter-flap {
  transform: rotate(32deg);
}
.route-a,
.route-b {
  position: absolute;
  right: 0;
  font: 12px monospace;
  color: #456170;
}
.route-a {
  top: 0;
}
.route-b {
  bottom: 0;
}
.robot-link {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 65%;
  height: 14%;
  background: #d89e41;
  border: 3px solid #9b6e2c;
  border-radius: 12px;
  transform-origin: 0 50%;
  transform: translateY(-50%) rotate(var(--arm-angle, 0deg));
}
.robot-joint {
  position: absolute;
  left: -9px;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #60808e;
  border: 3px solid #314f5e;
  transform: translateY(-50%);
}
.robot-gripper {
  position: absolute;
  right: -15px;
  top: -10px;
  width: 20px;
  height: calc(100% + 20px);
  border: 5px solid #496878;
  border-right: 0;
}
.gripping .robot-gripper {
  top: -2px;
  height: calc(100% + 4px);
}
.color-head {
  position: absolute;
  left: 29%;
  top: 0;
  width: 42%;
  height: 35%;
  border: 2px solid #1d3c49;
  border-radius: 5px;
  background: #345563;
  color: #e9f6f7;
  text-align: center;
  padding: 3px;
  font: 10px monospace;
}
.color-head i {
  display: block;
  width: 50%;
  height: 8px;
  margin: 3px auto;
}
.color-field .sensor-beam {
  background: var(--detect-color);
  opacity: 0.2;
}
.is-active .color-head {
  border-color: #e3b34f;
}
.studio-shell .cylinder-body {
  background: #b9ccd5;
  border: 2px solid #4f7181;
}
.studio-shell .cylinder-rod {
  background: #d6e3e8;
  border: 1px solid #698796;
}
.studio-shell .cylinder-end {
  background: #dc9b35;
  border: 2px solid #9a6d2f;
}
.studio-shell .elevator-shaft {
  background: #e6edf0;
  border: 3px solid #597987;
}
.studio-shell .lift-car {
  background: #d2e0e6;
  border: 3px solid #456b7d;
}
.studio-shell .lift-door {
  background: #b7ccd6;
  border: 1px solid #7696a5;
}
.studio-shell .garage-curtain {
  background: repeating-linear-gradient(
    0deg,
    #b7cad3 0 13px,
    #7896a6 14px 16px
  );
}
@keyframes water-wave {
  to {
    background-position: 28px 0;
  }
}
@keyframes water-fall {
  to {
    background-position: 0 30px;
  }
}
@keyframes status-pulse {
  50% {
    opacity: 0.45;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 700px) {
  .signal-field {
    grid-template-columns: 1fr;
  }
  #properties-host {
    padding: 14px;
  }
  #properties-dialog {
    max-height: calc(100dvh - 12px);
  }
  .studio-shell .sheet-heading > span:last-child {
    display: none;
  }
  .studio-shell .ladder-tools {
    overflow-x: auto;
  }
  .studio-shell .canvas-toolbar {
    overflow: auto;
  }
  .studio-shell .plant-library-item {
    min-height: 64px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scene-object * {
    animation-duration: 0s !important;
    transition: none !important;
  }
}

.studio-shell .topbar .brand,
.studio-shell .topbar .brand strong {
  color: #e4eef1;
}
.studio-shell .topbar .edition,
.studio-shell .topbar #run-state {
  color: #a5bcc6;
}
.studio-shell .topbar #connect-board {
  border-color: #4e6975;
}
.studio-shell .scene-object .belt-frame {
  height: 45%;
  top: 0;
  bottom: auto;
  background: #d0dce2;
  overflow: visible;
}
.studio-shell .scene-object .belt-surface {
  top: 5%;
  bottom: 5%;
  height: 90%;
}
.studio-shell .scene-object .belt-leg {
  top: 90%;
  height: 85%;
}
.studio-shell .scene-object .belt-roller {
  top: 7%;
  height: 86%;
  aspect-ratio: 1;
  width: auto;
}
.studio-shell .scene-object .belt-axis {
  display: none;
}
.ladder-preview svg {
  fill: none;
  stroke: #325362;
  stroke-width: 2;
}
.ladder-preview text {
  fill: #325362;
  stroke: none;
  font: 12px monospace;
  text-anchor: middle;
}
#inspector-content #scene-props,
#inspector-content #element-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#inspector-content #scene-props .signal-field {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
}
#inspector-content #scene-props .property-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#inspector-content #element-form > .primary {
  min-height: 36px;
  margin-top: 2px;
}
#inspector-content #element-mapping {
  min-height: 32px;
  margin-top: 8px;
}
@media (max-width: 650px) {
  #inspector-content #scene-props .signal-field {
    grid-template-columns: 1fr;
  }
}
.material-route {
  fill: none;
  stroke: #ac8349;
  stroke-width: 2;
  stroke-dasharray: 7 6;
  opacity: 0.6;
  pointer-events: none;
}
#plant-stage[data-mode="operate"] .material-route {
  opacity: 0.25;
}
#plant-stage[data-mode="operate"] [data-kind="cargo"] {
  transition:
    left 0.08s linear,
    top 0.08s linear;
}
@media (pointer: coarse) {
  #properties-dialog button,
  #properties-dialog input,
  #properties-dialog select {
    min-height: 44px !important;
  }
  .studio-shell .port:before {
    content: "";
    position: absolute;
    inset: -8px;
  }
  .studio-shell .canvas-toolbar,
  .studio-shell .plant-toolbar {
    min-height: 38px;
  }
}
.has-spill .tank-overflow {
  opacity: 1;
}
.has-spill:not(.is-spilling) .tank-overflow i {
  display: none;
}
#plant-stage:not(.simulation-running) .scene-object * {
  animation-play-state: paused !important;
}
/* Connection workbench: ordered evidence, explicit recovery, compact controls. */
#hardware-dialog {
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
  overflow: auto;
  color: #253d49;
}
#hardware-dialog .dialog-heading {
  margin: 0 0 12px;
  align-items: center;
}
#hardware-dialog h2 {
  font-size: 24px;
  margin: 0;
}
.hardware-intro,
.hardware-execution {
  font-size: 13px;
  line-height: 1.5;
  color: #536a77;
  margin: 12px 0;
}
.hardware-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid #cdd8df;
  border-radius: 6px;
  overflow: hidden;
  margin: 16px 0;
}
.hardware-progress span {
  padding: 12px 8px;
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  background: #f2f5f7;
}
.hardware-progress b {
  border: 1px solid #849ba7;
  border-radius: 50%;
  height: 22px;
  min-width: 22px;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.hardware-progress .current {
  background: #fff4df;
  color: #795013;
}
.hardware-progress .complete {
  background: #e5f4ee;
  color: #14604a;
}
.hardware-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding-bottom: 14px;
}
#hardware-dialog .connection-methods {
  gap: 10px;
}
#hardware-dialog .radio-option {
  padding: 12px;
  font-size: 14px;
}
#hardware-dialog .connection-notice {
  margin: 14px 0;
  padding: 14px;
  border-left: 3px solid #9eabb3;
  font-size: 14px;
}
#hardware-status[data-state="error"] {
  background: #fff1ed;
  border-color: #bf4b35;
  color: #843b2c;
}
#hardware-status[data-state="success"] {
  background: #e5f4ee;
  border-color: #167c62;
  color: #145a49;
}
#hardware-remedy {
  background: #fff8ee;
  border: 1px solid #e3ca9b;
  padding: 14px;
  border-radius: 5px;
  font-size: 13px;
  line-height: 1.55;
}
#hardware-remedy p {
  margin: 6px 0 10px;
}
#hardware-remedy code {
  white-space: normal;
  overflow-wrap: anywhere;
}
#hardware-feedback {
  padding: 12px;
  background: #eff5f7;
  font-size: 12px;
  display: grid;
  gap: 8px;
}
#hardware-feedback[hidden],
#hardware-remedy[hidden] {
  display: none;
}
.pin-feedback {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pin-feedback span {
  padding: 5px 8px;
  background: white;
  border: 1px solid #cedde4;
  border-radius: 3px;
}
#hardware-dialog .dialog-actions {
  position: sticky;
  bottom: -24px;
  background: white;
  padding: 16px 0;
  margin: 16px 0 0;
  border-top: 1px solid #d9e3e8;
}
#offline-status {
  font-size: 11px;
  white-space: nowrap;
  color: #567080;
  margin-left: auto;
  padding: 0 8px;
}
#app-install,
#app-update {
  font-size: 12px;
  white-space: nowrap;
}
.continuous-board .rail-strip {
  top: 0;
  width: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  z-index: 3;
  cursor: crosshair;
  opacity: 1;
}
.continuous-board .rail-strip:hover,
.continuous-board .rail-strip.armed,
.continuous-board .rail-strip.snap-target {
  background: #d695392b;
  outline: 1px solid #d69539;
}
.continuous-board .rail-handle {
  position: absolute;
  top: 0;
  width: 30px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  font-size: 11px;
  z-index: 4;
  background: #314e60;
  color: white;
  border: 0;
  border-radius: 0 0 3px 3px;
  cursor: ew-resize;
  touch-action: none;
}
.is-simulating .continuous-board .port,
.is-simulating .rail-handle,
.is-simulating .object-resize {
  pointer-events: none;
  opacity: 0;
}
.is-simulating .graph-node .ladder-cell {
  cursor: pointer;
}
.is-simulating .graph-node .ladder-cell:active {
  background: #dff3e9;
}
.is-simulating .multi-selected {
  outline: 0 !important;
  box-shadow: none !important;
}
.image-mode {
  padding: 12px;
  border: 1px solid #cddde4;
  border-radius: 5px;
  margin: 14px 0;
}
.image-mode label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}
.image-mode input {
  width: auto !important;
}
#image-behavior {
  padding: 12px;
  background: #f2f6f8;
  display: grid;
  gap: 12px;
}
#image-behavior[hidden] {
  display: none;
}
.scene-object[data-kind="image"] .scene-graphic {
  transform-origin: center;
  position: relative;
}
.scene-object.image-lit .scene-graphic {
  filter: drop-shadow(0 0 10px var(--component-color));
}
.scene-object.image-lit .scene-graphic:after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--component-color);
  mix-blend-mode: color;
  opacity: 0.65;
  pointer-events: none;
}
.scene-object.drop-compatible {
  outline: 2px dashed #21866b;
  background: #dff2e740;
}
.ladder-tools {
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  #hardware-dialog {
    padding: 16px;
  }
  #hardware-dialog .dialog-actions {
    bottom: -16px;
  }
  .hardware-progress span {
    flex-direction: column;
    text-align: center;
    gap: 5px;
    padding: 8px 4px;
  }
  .hardware-profile {
    flex-wrap: wrap;
  }
  #offline-status {
    max-width: 140px;
    white-space: normal;
    font-size: 10px;
  }
  #hardware-dialog button,
  #hardware-dialog select {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scene-object[data-kind="image"] .scene-graphic {
    transform: none !important;
  }
}
.studio-shell .sheet-heading {
  gap: 16px;
  min-width: 0;
  overflow: hidden;
}
.studio-shell .sheet-heading #sheet-count {
  flex-shrink: 0;
  white-space: nowrap;
}
.studio-shell .sheet-heading span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
