* { box-sizing: border-box; }
html { overflow: hidden; }
html, body { margin: 0; background: #fff; color: #263730; font: 15px/1.7 "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif; }
.compat-card { padding: 20px 24px; border: 1px solid #cbded8; border-radius: 6px; }
.controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.field-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.field-choice button { padding: 6px 14px; min-height: 38px; border: 1px solid #b9d5e5; border-radius: 4px; color: #006398; background: #fff; font: inherit; cursor: pointer; }
.field-choice button.is-active { background: #287db5; border-color: #287db5; color: #fff; }
.field-choice button.is-active mjx-container { color: #fff; }
.field-choice button:focus-visible { outline: 2px solid #006398; outline-offset: 3px; }
.amp { display: flex; align-items: center; gap: 10px; }
.amp input { width: 160px; }
.diagram { margin: 14px 0 6px; }
.diagram svg { display: block; width: 100%; height: auto; max-height: 360px; }
.cell { stroke: #0f766e; stroke-width: 1.5; }
.row-0 { fill: #dff3ee; } .row-1 { fill: #e8f1fb; } .row-2 { fill: #f3ecfa; } .row-3 { fill: #fbf1e2; }
.gap { stroke: #d61f45; stroke-width: 3; stroke-linecap: round; }
.ref { fill: none; stroke: #b9c4c0; stroke-width: 1; stroke-dasharray: 4 4; }
.clamp { stroke: #6b7d89; stroke-width: 2; }
.readout p { margin: 2px 0; }
.ok { color: #1f7a68; font-weight: 600; }
.bad { color: #b3261e; font-weight: 600; }
.hint { margin: 8px 0 0; color: #5f6f78; font-size: 14px; }
@media (max-width: 520px) { .compat-card { padding: 14px; } .amp input { width: 120px; } }
.ref { stroke: #8a9893; }
