/* 交变电流与变压器特有样式（通用样式见 ../shared/base.css） */

#view3d { position: absolute; left: 0; top: 0; touch-action: none; }
[hidden] { display: none !important; }

.ok { color: #7ee081; }
.bad { color: #ff7a59; }

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

/* 读数 */
.readout .big { font-size: 18px; }
.kind { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; color: var(--accent); margin-left: 8px; }
.kind:empty { display: none; }
.readout .tip { font-size: 12px; color: #cfd6e0; line-height: 1.6; margin-top: 4px; min-height: 18px; }
.readout dt { white-space: nowrap; }
.readout dd { font-variant-numeric: tabular-nums; }
#rName.ok { color: #7ee081; }
#rName.bad { color: #ff7a59; }

/* 控件 */
.presets { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 4px 0 8px; }
.presets.three { grid-template-columns: repeat(3, 1fr); }
.presets button { font: inherit; font-size: 12.5px; color: var(--text); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 2px; cursor: pointer; }
.presets button:hover { border-color: var(--accent); }
.presets button.on { border-color: var(--accent); background: rgba(255,201,74,.14); }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; font-size: 12px; padding: 5px 0; }
#panel .slider { grid-template-columns: 58px 1fr 62px; margin-top: 8px; }
#panel .slider output { font-size: 12px; text-align: right; }
.readout dd small { color: var(--muted); font-size: 11px; }
.presets.three button { font-size: 12.5px; }
#panel .slider > span, #panel .row > span { color: var(--muted); font-size: 12px; }
#panel .row { grid-template-columns: 40px 1fr; margin: 8px 0; }
.checks { margin-top: 4px; }
.btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

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

/* 画面上的图例、端视图、标注 */
#legend { position: absolute; left: 12px; top: 12px; z-index: 3; display: flex; flex-direction: column; gap: 3px;
  padding: 6px 10px; border-radius: 10px; background: rgba(17,23,35,.75); border: 1px solid var(--line);
  font-size: 12px; color: var(--text); pointer-events: none; }
#legend:empty { display: none; }
#legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
#legend i.ln { height: 0; border-top: 2px solid; border-radius: 0; vertical-align: 3px; }
#legend i.dot { width: 6px; height: 6px; margin: 0 8px 0 2px; border-radius: 50%; background: #ffc94a; vertical-align: 1px; }
#endView { position: absolute; right: 12px; top: 12px; z-index: 3; border-radius: 10px; border: 1px solid var(--line); }
#endView.big { left: 50%; right: auto; transform: translateX(-50%); }
#graph { position: absolute; left: 12px; bottom: 44px; z-index: 3; border-radius: 10px; border: 1px solid var(--line); }
.lab.bvec { font: italic 700 15px serif; color: #4fc3f7; text-shadow: 0 0 3px #05070d, 0 0 3px #05070d; }
.lab.vlab { font: italic 700 13px serif; color: #7ee081; text-shadow: 0 0 3px #05070d, 0 0 3px #05070d; }
.lab.sym { font: 700 18px var(--mono); color: #0b1222; }
.lab.uval { font: 600 12.5px var(--mono); color: #ffc94a; padding: 1px 6px; border-radius: 6px; background: rgba(17,23,35,.8); }
.lab { font-size: 12px; color: #fff; white-space: nowrap; pointer-events: none; }
.lab.pole { font: 700 15px system-ui, sans-serif; padding: 0 6px; border-radius: 6px; }
.lab.pole.n { background: rgba(224,87,79,.85); }
.lab.pole.s { background: rgba(74,120,216,.85); }
.lab.pt { font: 600 13px var(--mono); text-shadow: 0 0 3px #05070d, 0 0 3px #05070d; }
.lab.part { font-size: 11.5px; color: #cfd6e0; padding: 0 6px; border-radius: 6px; background: rgba(17,23,35,.7); }

/* 画面下方的快捷按钮 */
#actBar { position: absolute; left: 50%; bottom: 240px; transform: translateX(-50%); z-index: 3; display: flex; gap: 8px; }
#actBar button { padding: 7px 14px; font-size: 13px; background: rgba(17,23,35,.9); }
#actBar button.on { border-color: #ffc94a; color: #ffc94a; }

/* 练习 */
#quizBar { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 4; width: min(600px, calc(100% - 24px));
  padding: 10px 12px; border-radius: 12px; background: rgba(17,23,35,.92); border: 1px solid var(--line); }
#quizQ { margin: 0 0 6px; font-size: 14px; font-weight: 600; line-height: 1.5; }
#quizMsg { margin: 0 0 6px; font-size: 13px; line-height: 1.6; }
#quizMsg:empty { display: none; }
#quizMsg b { margin-right: 4px; }
.answer { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.answer.one { grid-template-columns: 1fr; }
.answer.one button { text-align: left; padding: 6px 10px; }
.answer button { padding: 7px 4px; font-size: 13px; }
.answer button:disabled { opacity: .55; cursor: default; }
.answer button.on { opacity: 1; border-color: #7ee081; color: #7ee081; }
.answer button.no { opacity: 1; border-color: #ff7a59; color: #ff7a59; }
#quizBar .btns { justify-content: flex-end; margin-top: 8px; }

@media (max-width: 760px) {
  #quizBar { bottom: 40px; }
  #legend { display: none; }
  #endView { right: auto; }
  #actBar button { padding: 6px 10px; font-size: 12.5px; }
  .lab.part { font-size: 10.5px; }
}
