.bench-top select { padding: 3px 6px; max-width: 200px; font-size: 11px; border-color: transparent; }
.bench-top button { min-height: 24px; padding: 0 6px; }
.bench-top > div { min-width: 0; }
.component-symbol .terminal { stroke: none; fill: transparent; }
.component-symbol .terminal-hit { fill: transparent; stroke: none; }
.component-symbol .terminal-core { stroke: var(--blue); stroke-width: 1.5; }
.component-symbol .terminal:hover .terminal-core,
.component-symbol .terminal.target .terminal-core { fill: var(--yellow); stroke: var(--blue); stroke-width: 3; }
.wire-number { font-size: 9px; fill: var(--ink); paint-order: stroke; stroke: white; stroke-width: 4px; pointer-events: none; }
.marquee { fill: #1268f412; stroke: var(--blue); stroke-dasharray: 5 3; pointer-events: none; }
.selection-summary { background: var(--soft); border: 1px solid var(--line); padding: 8px; font-size: 11px; }
.equipment-help { line-height: 1.6; font-size: 10px; margin-top: 15px; color: var(--muted); }
.device-actions { display: grid; gap: 5px; margin-top: 10px; }
.device-actions button { border: 1px solid var(--line); background: var(--soft); white-space: normal; font-size: 11px; }
.device-state { display: block; margin: 8px 0; font: 11px Consolas,monospace; }
#simulation-controls { flex-wrap: wrap; max-width: calc(100% - 24px); padding: 5px; gap: 6px; }
#simulation-controls button { font-size: 10px; min-height: 28px; padding: 4px 7px; }
#simulation-time { padding: 4px 6px; font: 11px Consolas,monospace; border-left: 1px solid var(--line); }
.export-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.export-actions button { background: var(--soft); border-color: var(--line); }
#export-message { font-size: 12px; }
.library .component-card .thumbnail { width: 48px; height: 48px; }
.library .component-card .thumbnail svg { width: 48px; height: 48px; }
.library .component-card { min-height: 61px; }
.component-symbol .terminal[data-potential="line"] .terminal-core { fill: var(--yellow); }
.component-symbol .terminal[data-potential="neutral"] .terminal-core { fill: var(--blue); }
.component-symbol .terminal[data-potential="earth"] .terminal-core { fill: #49a75c; }
.editor-layout.ladder-open { grid-template-columns: 180px 350px minmax(320px,1fr) 210px; }
#ladder-panel { background: white; border-right: 1px solid var(--line); overflow: auto; min-height: 0; }
#ladder-panel[hidden] { display: none; }
#ladder-plc { margin: 10px; width: calc(100% - 20px); }
#ladder-editor { padding: 0 10px 20px; }
#ladder-editor h3 { font-size: 12px; margin: 8px 0; }
#ladder-editor button { min-height: 25px; font-size: 10px; padding: 3px 6px; border: 1px solid var(--line); }
.ladder-scan { display: block; font: 10px Consolas,monospace; margin: 8px 0; }
.ladder-io { display: flex; gap: 4px; flex-wrap: wrap; margin: 10px 0; }
.ladder-io span { border: 1px solid var(--line); padding: 4px; font: 10px Consolas,monospace; }
.ladder-io [data-active=true],.ladder-contact[data-active=true] { background: var(--yellow); }
.ladder-rung { border: 1px solid var(--line); border-left: 3px solid var(--ink); padding: 6px; margin: 10px 0; overflow: auto; }
.ladder-rung[data-active=true] { border-left-color: var(--yellow); }
.ladder-rung-heading { display: flex; justify-content: space-between; font: 11px Consolas,monospace; }
.ladder-branches { border-inline: 2px solid var(--ink); margin: 6px 0; }
.ladder-branch { display: flex; align-items: center; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); }
.ladder-contact { display: grid; grid-template-columns: 1fr 20px; min-width: 66px; border: 1px solid var(--ink); padding: 3px; gap: 2px; }
.ladder-contact select { grid-column: 1; }
.ladder-contact button { grid-column: 2; grid-row: 2 / 4; padding: 0!important; }
.ladder-glyph { font: 15px Consolas,monospace; grid-column: 1 / -1; white-space: nowrap; }
#ladder-editor select { padding: 3px; height: 25px; font: 10px Consolas,monospace; }
.ladder-output { display: flex; align-items: center; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.ladder-output input { width: 70px; min-height: 25px; padding: 3px; font-size: 10px; }
.ladder-output small,.ladder-value { font: 10px Consolas,monospace; }
@media (max-width:1200px) { .editor-layout.ladder-open { grid-template-columns: 170px 310px minmax(300px,1fr); } .ladder-open .inspector { display:none; } }
@media (max-width:800px) { .editor-layout.ladder-open { grid-template-columns: 280px minmax(320px,1fr); } .ladder-open .library { display:none; } }
@media (max-width:1100px) {
  .toolbar { flex-wrap: wrap; }
  .app-header { gap: 8px; }
}
@media (max-width:800px) {
  #simulation-controls { left: 4px; max-width: calc(100% - 8px); }
  #simulation-state { max-width: 130px; }
  .bench-top select { max-width: 140px; }
}
.local-project-row { display:block; width:100%; text-align:left; margin:6px 0; border:1px solid var(--line); background:var(--soft); }
.diagnostic { border:1px solid var(--line); border-left:4px solid var(--blue); border-radius:6px; padding:10px; margin:10px 0; }
.diagnostic.safety { border-left-color:#c39700; }
.diagnostic.critical { border-left-color:#cc2633; }
.diagnostic p { margin:6px 0; }
.diagnostic small { color:var(--muted); }
#local-project-list { max-height:45vh; overflow:auto; margin-bottom:12px; }
#diagnostics-host { max-height:60vh; overflow:auto; }
@media(max-width:800px) { .toolbar { gap:3px; } .toolbar button { min-height:36px; } .inspector .property input,.inspector select,.device-actions button { min-height:40px; } .project-actions #local-projects { display:inline-flex; font-size:11px; } }
@media(max-width:520px) {
  .app-header { display:grid; grid-template-columns:auto minmax(0,1fr) 40px; height:auto; padding:6px 10px; gap:4px 8px; }
  .project-heading { min-width:0; }
  #document-state { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .app-header>.simulate { grid-column:3; grid-row:1; width:40px; height:40px; }
  .project-actions { grid-column:1 / -1; grid-row:2; justify-content:space-between; }
  .project-actions button { min-height:36px; font-size:10px; gap:4px; }
  .project-actions button span:last-child { display:inline; }
}

#account-dialog label { display:grid; gap:4px; margin:12px 0; }
#account-dialog input { min-height:40px; }
#cloud-project-list,#guest-project-list { max-height:28vh; overflow:auto; }
#cloud-revision-list { max-height:28vh; overflow:auto; }
#terminal-options { max-height:45vh; overflow:auto; }
#terminal-picker button { min-height:44px; }
#account-message { color:var(--ink); }
#cancel-operation { position:absolute; top:8px; right:8px; z-index:5; min-height:44px; padding:8px 14px; background:var(--white,#fff); border:1px solid var(--line); box-shadow:0 2px 6px #12233f12; }
@media(max-width:520px) { .project-actions { flex-wrap:wrap; } }
