/* 串联和并联电路特有样式（通用样式见 ../shared/base.css） */

#circuit { position: absolute; inset: 0; touch-action: pan-y; }
[hidden] { display: none !important; }

#panel h2 .h2s { font-size: 11px; color: var(--muted); font-weight: normal; margin-left: 6px; letter-spacing: 0; }

/* 读数 */
.readout .big { font-size: 18px; }
.st.closed { color: #7ee081; }
.st.open { color: var(--muted); }
.st.short { color: #ff6b6b; }
.st.nobat { color: var(--muted); }
#rScene { font-size: 12px; color: var(--muted); font-weight: normal; }
#rRel { color: var(--accent); font-size: 13px; margin: 6px 0 0; }
#rLaw { font-size: 12px; margin: 6px 0 0; padding: 6px 8px; background: rgba(255,201,74,.08); border-radius: 6px; line-height: 1.6; font-variant-numeric: tabular-nums; }
#rLaw b { color: var(--accent); }
#rNotes { margin: 6px 0 0; padding-left: 18px; font-size: 12px; color: #ff9b8a; }

.lamps { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.lamps th, .lamps td { padding: 3px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.lamps th { color: var(--muted); font-weight: 600; }
.lamps td:nth-child(3), .lamps td:nth-child(4), .lamps th:nth-child(3), .lamps th:nth-child(4) { text-align: right; white-space: nowrap; }
.lamps small { color: var(--muted); }
.lamps tr.on td:first-child { color: var(--accent); }

/* 电表 */
.meters { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.meters li { padding: 5px 8px; background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 6px; font-size: 12px; }
.meters li.amm { --c: #4fc3f7; }
.meters li.volt { --c: #7ee081; }
.meters li.warn { border-color: #ff6b6b; border-left-color: #ff6b6b; }
.meters b { color: var(--c); margin-right: 8px; }
.meters .v { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; margin-right: 8px; }
.meters small { color: var(--muted); }
.meters p { margin: 2px 0 0; color: var(--muted); }
.meters li.warn p { color: #ff9b8a; }

/* 场景 */
.scenes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.scenes button, .actions button { font: inherit; font-size: 13px; color: var(--text); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 0; cursor: pointer; }
.scenes button:hover, .actions button:hover { border-color: var(--accent); }
.scenes button.on { background: rgba(255,201,74,.14); border-color: var(--accent); color: var(--accent); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
#sceneNote { color: var(--text); opacity: .85; }
.opt { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 12px; color: var(--muted); }
.opt > span:first-child { width: 64px; flex: none; }

/* 工具栏（画布上） */
#tools { position: absolute; left: 50%; bottom: 52px; transform: translateX(-50%); z-index: 3; display: flex; gap: 4px;
  padding: 4px; background: rgba(17,23,35,.92); border: 1px solid var(--line); border-radius: 12px; max-width: calc(100% - 16px);
  overflow-x: auto; scrollbar-width: none; }
#tools::-webkit-scrollbar { display: none; }
#tools button { flex: none; font: inherit; font-size: 12px; color: var(--muted); background: transparent; border: 1px solid transparent;
  border-radius: 8px; padding: 3px 7px 2px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.2; }
#tools button svg { width: 26px; height: 18px; }
#tools button:hover { color: var(--text); }
#tools button.on { color: #111; background: var(--accent); border-color: var(--accent); }
#toolNote { position: absolute; left: 50%; bottom: 110px; transform: translateX(-50%); z-index: 3; font-size: 12px; color: var(--muted);
  white-space: nowrap; pointer-events: none; text-shadow: 0 1px 3px #05070d; }

.cmp { width: 100%; border-collapse: collapse; font-size: 12px; }
.cmp th, .cmp td { padding: 4px 6px; border: 1px solid var(--line); vertical-align: top; text-align: left; }
.cmp th { color: var(--muted); font-weight: 600; background: var(--panel-2); }
.cmp td:first-child { color: var(--muted); white-space: nowrap; }

@media (max-width: 760px) {
  #tools { bottom: 50px; }
  #tools button { padding: 3px 5px 2px; font-size: 11px; }
  #toolNote { bottom: 104px; white-space: normal; text-align: center; width: calc(100% - 24px); }
}
