/* 波的干涉和衍射特有样式（通用样式见 ../shared/base.css） */

#view { position: absolute; inset: 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; }

/* 读数 */
.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: var(--accent); margin-top: 4px; min-height: 18px; }
.readout dd { font-variant-numeric: tabular-nums; }
.readout dt { white-space: nowrap; }

.presets { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin: 4px 0 8px; }
.presets.four-col { grid-template-columns: repeat(4, 1fr); }
.presets 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; }
.presets.small-text button { font-size: 12px; padding: 5px 0; }
.presets button:hover { border-color: var(--accent); }
.presets button.on { border-color: var(--accent); background: rgba(255,201,74,.14); }

#panel .slider { grid-template-columns: 70px 1fr 64px; }
#panel .row { grid-template-columns: 70px 1fr; margin: 8px 0; }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; font-size: 12px; padding: 5px 0; }
.checks { margin-top: 8px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.key { list-style: none; padding: 0; margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.key li { margin: 3px 0; }
.key i { display: inline-block; width: 14px; height: 8px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }

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

/* 练习 */
#quizBar { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 3; width: min(560px, 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; }
#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 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; }
}

.checks.one { grid-template-columns: 1fr; }
.checks .wide { grid-column: 1 / -1; }
.key i.dash { background: repeating-linear-gradient(90deg, #8ca0be 0 4px, transparent 4px 7px); }
.answer.one { grid-template-columns: 1fr; }
#rName.gold { color: #ffc94a; }
#rName.violet { color: #c9a7ff; }
#panel .row > span:first-child { white-space: nowrap; }
