/* Laboratorio de física (se carga después de styles.css) */
:root {
  --c1: #2563eb; --c2: #dc2626; --c3: #16a34a; --c4: #d97706; --c5: #7c3aed;
  --sky: #eef3fb; --ground: #c9d1e1; --body: #f59e0b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --c1: #60a5fa; --c2: #f87171; --c3: #4ade80; --c4: #fbbf24; --c5: #a78bfa;
    --sky: #131a2e; --ground: #39425f; --body: #f59e0b;
  }
}
.fx-params { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 28px; }
.fx-param { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fx-param .row { display: flex; align-items: center; gap: 10px; }
.fx-param input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); height: 28px; margin: 0; }
.fx-param input[type=text] { width: 92px; flex: none; padding: 6px 9px; font-variant-numeric: tabular-nums; text-align: right; }
.fx-param .unit { color: var(--muted); font-size: .9rem; min-width: 38px; }
input[type=text].bad { outline: 2px solid #dc2626; outline-offset: -1px; }
.fx-presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fx-presets .label { margin-right: 4px; }
.fx-presets .btn { padding: 6px 12px; font-size: .88rem; }

.fx-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 900px) { .fx-grid { grid-template-columns: minmax(0, 1fr); } }
.fx-canvas { display: block; width: 100%; background: var(--sky); border: 1px solid var(--border); border-radius: 12px; }
.fx-chart { background: var(--panel); border: 0; border-radius: 0; }
.fx-player { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-top: 12px; }
.fx-player .fx-scrub { flex: 1 1 180px; min-width: 0; accent-color: var(--accent); }
.fx-play { min-width: 128px; }
.fx-time { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; min-width: 92px; font-weight: 600; }
.fx-speed button { padding: 4px 10px; font-size: .85rem; }
.fx-live { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px 14px; margin-top: 12px; }
.fx-live div { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; min-width: 0; }
.fx-live span { display: block; color: var(--muted); font-size: .8rem; font-weight: 600; }
.fx-live b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; font-size: .98rem; white-space: nowrap; }
.fx-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .88rem; margin: 10px 0 0; color: var(--muted); }
.fx-legend i { display: inline-block; width: 16px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.fx-legend .dash { background: none !important; border-top: 3px dashed var(--muted); height: 0; }
.fx-note { font-size: .9rem; color: var(--muted); margin: 10px 0 0; }
.fx-sub { font-size: .85rem; }
.fx-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 10px; }
.fx-head .panel-title { margin: 0; }
.fx-formula { font-family: Georgia, "Times New Roman", serif; font-size: 1.06rem; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; margin: 6px 0 10px; overflow-x: auto; }
.fx-formula b { color: var(--accent); }
.content .fx-formula { margin: 8px 0 14px; }
.fx-dt { display: flex; align-items: center; gap: 8px; }
.fx-dt input { width: 80px !important; padding: 6px 9px !important; text-align: right; }
.fx-table td, .fx-table th { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; font-weight: 400 !important; text-align: right !important; }
.fx-table thead th { position: sticky; top: 0; background: var(--panel); font-family: system-ui, sans-serif !important; font-weight: 600 !important; color: var(--muted); }
.fx-phases { list-style: none; padding: 0 !important; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 6px; }
.fx-phases li { border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: 8px; padding: 6px 12px; }
.fx-ok { color: #16a34a; font-weight: 700; }
.fx-no { color: #dc2626; font-weight: 700; }
@media (prefers-color-scheme: dark) { .fx-ok { color: #4ade80; } .fx-no { color: #f87171; } }
.fx-related { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 10px; }
.fx-related a { display: block; text-decoration: none; color: var(--text); background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.fx-related a:hover { border-color: var(--accent); }
.fx-related small { display: block; color: var(--muted); }
@media (max-width: 520px) {
  .panel { padding: 14px; }
  .fx-param input[type=text] { width: 80px; }
}
.fx-tablewrap { max-height: 420px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.fx-tablewrap .chart { width: 100%; }
.fx-tablewrap .chart th, .fx-tablewrap .chart td { border-width: 0 0 1px 0; }
.fx-param .label, .fx-label-plain { text-transform: none; letter-spacing: 0; font-size: .88rem; }
