/* AULAQUEST V2 — INSTRUMENTOS CIENTÍFICOS | capa visual independiente */
#wrap-timer-single, #wrap-timer-dual-1, #wrap-timer-dual-2,
#hud-p1-panel, #hud-p2-panel { isolation:isolate; }
#timer-single, #timer-dual-1, #timer-dual-2,
#hud-p1-panel, #hud-p2-panel {
  background:rgba(9,22,42,.89)!important;
  border:1px solid rgba(170,203,240,.34)!important;
  border-left:3px solid #60a5fa!important;
  border-radius:12px!important;
  box-shadow:0 8px 26px rgba(1,8,24,.26), inset 0 1px rgba(255,255,255,.06)!important;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
#timer-dual-2, #hud-p2-panel { border-left-color:#fb923c!important; }
#hud-time, #hud-time-1, #hud-time-2,
#hud-v1, #hud-v2 { font-variant-numeric:tabular-nums; letter-spacing:-.025em; }
#hud-time {font-size:clamp(19px,2.1vw,29px)!important;line-height:1.2;}
#hud-v1, #hud-v2 {font-size:clamp(12px,1.2vw,17px)!important;}
#simCanvas {touch-action:pan-y;}
@media(max-width:767px){
  #wrap-timer-single, #wrap-timer-dual-1, #wrap-timer-dual-2,
  #hud-p1-panel, #hud-p2-panel {max-width:44vw;}
  #timer-single, #timer-dual-1, #timer-dual-2,
  #hud-p1-panel, #hud-p2-panel {border-radius:10px!important; padding:6px 9px!important;}
  #hud-time {font-size:19px!important;}
  #hud-time-1, #hud-time-2 {font-size:15px!important;}
}
@media (prefers-reduced-transparency:reduce) {
 #timer-single,#timer-dual-1,#timer-dual-2,#hud-p1-panel,#hud-p2-panel {backdrop-filter:none;background:#0e2038!important;}
}

/* =====================================================
   AULAQUEST V2 — PANEL DE CONTROL MODERNO (solo estilos)
   IDs originales preservados para Builder / AQ_Config.
===================================================== */
#view-controls-panel { background:#0b1426!important; scrollbar-gutter:stable; }
#view-controls-panel select {
  width:100%; min-height:46px; padding:10px 38px 10px 14px!important;
  border:1px solid #3a506b!important; border-radius:12px!important;
  background-color:#101f36!important; color:#f1f7ff!important;
  font-size:13px!important; font-weight:600; line-height:1.35;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
  transition:border-color .16s, box-shadow .16s;
}
#view-controls-panel select:hover {border-color:#749ed1!important;}
#view-controls-panel select:focus-visible,
#view-controls-panel button:focus-visible,
#view-controls-panel input:focus-visible {outline:2px solid #93c5fd;outline-offset:3px;}
#view-controls-panel #btn-run, #view-controls-panel #btn-reset,
#view-controls-panel #btn-teacher-mode {
  min-height:45px; border-radius:12px!important; font-size:13px!important;
  font-weight:700;box-shadow:0 3px 12px rgba(0,0,0,.14);
  transition:filter .14s, transform .14s;
}
#view-controls-panel #btn-run:active, #view-controls-panel #btn-reset:active,
#view-controls-panel #btn-teacher-mode:active {transform:scale(.985);}
#view-controls-panel #btn-h-minus, #view-controls-panel #btn-h-plus {
  width:46px!important;height:46px!important;min-width:46px;
  border-radius:11px!important;background:#203854!important;
  border:1px solid #3a587a!important;font-size:16px;
}
#view-controls-panel input[type=range] {
  min-height:30px; height:30px; touch-action:pan-x;
  accent-color:#60a5fa; cursor:pointer;
}
#view-controls-panel input[type=range]::-webkit-slider-thumb {
  -webkit-appearance:none; width:23px!important; height:23px!important;
  margin-top:0!important; border:3px solid #e3f1ff!important;
  border-radius:50%; background:#3b82f6!important;
  box-shadow:0 0 0 5px rgba(59,130,246,.13)!important;
}
#view-controls-panel input[type=range]::-moz-range-thumb {
  width:19px;height:19px;border:3px solid #e3f1ff;border-radius:50%;
  background:#3b82f6;
}
#view-controls-panel #check-dual, #view-controls-panel #check-linear-mode {cursor:pointer;}
@media (pointer:coarse) {
 #view-controls-panel select, #view-controls-panel button {min-height:44px;}
 #view-controls-panel input[type=range] {min-height:42px;height:42px;}
}
@media (max-width:767px) {
 #view-controls-panel {width:100%;min-width:0;}
 #view-controls-panel select {font-size:16px!important;} /* evita zoom al enfocar en iOS */
 #view-controls-panel #btn-run, #view-controls-panel #btn-reset {min-width:0;}
}


/* ============================================================
   AULAQUEST V2 — ACABADO PANEL LATERAL 3.0
   Sólo CSS: no altera IDs, valores ni eventos del Builder.
   ============================================================ */
#view-controls-panel {
  background:linear-gradient(180deg,#111e33 0%,#0b1527 100%)!important;
  border-left:1px solid rgba(148,181,220,.15)!important;
}
#view-controls-panel > div:first-child {
  background:#1a2a40!important;
  border-color:rgba(148,181,220,.16)!important;
}
#view-controls-panel .p-4.space-y-5 { gap:0; }
#view-controls-panel select {
  -webkit-appearance:none!important;
  appearance:none!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2399B9E7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important;
  background-position:right 14px center!important;
  background-repeat:no-repeat!important;
  background-size:18px!important;
  min-height:49px!important;
  background-color:#14233b!important;
  border:1px solid #354967!important;
  border-radius:12px!important;
  padding-inline:15px 42px!important;
}
#view-controls-panel select:focus,
#view-controls-panel select:hover {border-color:#6d9dea!important;}
#view-controls-panel #btn-run {background:#2d68e8!important;border:1px solid #4d8bff!important;}
#view-controls-panel #btn-reset {background:#344965!important;border:1px solid #506785!important;}
#view-controls-panel #btn-teacher-mode {background:#079a77!important;border:1px solid #28ba98!important;}
#view-controls-panel #btn-run,
#view-controls-panel #btn-reset,
#view-controls-panel #btn-teacher-mode {
  min-height:48px!important;border-radius:12px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 5px 16px rgba(0,0,0,.12)!important;
}
#view-controls-panel #btn-h-minus,
#view-controls-panel #btn-h-plus {
  background:#253a56!important; border:1px solid #445f80!important;
  border-radius:11px!important; min-height:48px!important;
}
#view-controls-panel #slider-height,
#view-controls-panel #slider-drag {
  background:#344862!important;
  border-radius:12px!important;
  min-height:39px!important;
  height:39px!important;
  padding:0 8px!important;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.17);
}
#view-controls-panel input[type=range]::-webkit-slider-thumb {
  height:24px!important;width:24px!important;
  border:3px solid white!important;border-radius:50%!important;
  background:#3b82f6!important;
  margin-top:0!important;
  box-shadow:0 0 0 4px rgba(81,153,255,.17)!important;
}
#view-controls-panel input[type=range]::-moz-range-thumb {
  height:20px!important;width:20px!important;
  border:3px solid white!important;border-radius:50%!important;
  background:#3b82f6!important;
}
#view-controls-panel label {line-height:1.35;}
#view-controls-panel label:has(> input[type=checkbox]) {min-height:32px;}
@media(max-width:767px){
  #view-controls-panel select{min-height:50px!important;font-size:16px!important;}
  #view-controls-panel #btn-run,#view-controls-panel #btn-reset,
  #view-controls-panel #btn-teacher-mode {min-height:48px!important;}
  #view-controls-panel #slider-height,#view-controls-panel #slider-drag {
    height:44px!important;min-height:44px!important;
  }
}
@media(prefers-reduced-motion:reduce){
  #view-controls-panel * {scroll-behavior:auto!important;}
}

/* =========================================================
 AULAQUEST V2 / PULIDO UI 4.0 — sliders compactos y cabecera
 Mantiene nodos, IDs, White Label, AQ_Hideable y eventos.
 ========================================================= */
#view-controls-panel > div:first-child {
  background:linear-gradient(150deg,#203751,#14243c 78%)!important;
  border-bottom:1px solid rgba(143,185,244,.18)!important;
  padding:18px!important;
}
#view-controls-panel .main-sim-title {
  font-size:16px!important;font-weight:800!important;letter-spacing:-.025em;
  line-height:1.25!important;color:#f8fbff!important;
}
#view-controls-panel .main-sim-title > i {
  display:inline-grid;place-items:center;color:#86b6ff!important;
  font-size:16px!important;
  width:32px;height:32px;border-radius:10px;
  background:rgba(57,116,229,.16);border:1px solid rgba(135,178,248,.16);
}
#view-controls-panel #btn-audio-desktop,#view-controls-panel #btn-show-help {
  width:38px;height:38px;display:inline-flex;align-items:center;justify-content:center;
  border:1px solid transparent;border-radius:10px;
  transition:background .16s,border-color .16s;
}
#view-controls-panel #btn-audio-desktop:hover,#view-controls-panel #btn-show-help:hover {
  background:rgba(124,167,220,.11);border-color:rgba(124,167,220,.20);
}
/* Área grande para dedo, pista estrecha a la vista */
#view-controls-panel #slider-height,#view-controls-panel #slider-drag {
  -webkit-appearance:none!important;appearance:none!important;
  display:block;width:100%!important;height:38px!important;min-height:38px!important;
  padding:0 5px!important;border:0!important;border-radius:0!important;
  box-shadow:none!important;background:transparent!important;
  accent-color:#60a5fa;touch-action:pan-x;cursor:pointer;
}
#view-controls-panel #slider-height::-webkit-slider-runnable-track,
#view-controls-panel #slider-drag::-webkit-slider-runnable-track {
  height:6px!important;border-radius:10px;background:#3d5877!important;
  border:1px solid rgba(156,194,239,.15);
}
#view-controls-panel #slider-height::-moz-range-track,
#view-controls-panel #slider-drag::-moz-range-track {
  height:6px!important;border-radius:10px;background:#3d5877!important;
  border:1px solid rgba(156,194,239,.15);
}
#view-controls-panel #slider-height::-webkit-slider-thumb,
#view-controls-panel #slider-drag::-webkit-slider-thumb {
  -webkit-appearance:none!important;appearance:none!important;
  margin-top:-7px!important;width:20px!important;height:20px!important;
  border:3px solid #e9f4ff!important;border-radius:50%!important;
  background:#347ded!important;box-shadow:0 2px 9px rgba(0,0,0,.34)!important;
}
#view-controls-panel #slider-height::-moz-range-thumb,
#view-controls-panel #slider-drag::-moz-range-thumb {
  width:17px!important;height:17px!important;border:3px solid #e9f4ff!important;
  border-radius:50%!important;background:#347ded!important;
  box-shadow:0 2px 9px rgba(0,0,0,.34)!important;
}
#view-controls-panel #slider-height:focus-visible,#view-controls-panel #slider-drag:focus-visible {
  outline:2px solid #93c5fd!important;outline-offset:2px;
}
#view-controls-panel #btn-h-minus,#view-controls-panel #btn-h-plus {
  height:38px!important;min-height:38px!important;width:38px!important;min-width:38px!important;
  border-radius:10px!important;
}
#view-controls-panel #slider-height { flex:1 1 0%;min-width:55px; }
#view-controls-panel #drag-controls-panel {border-radius:14px!important;}
@media(pointer:coarse){
  #view-controls-panel #slider-height,#view-controls-panel #slider-drag {
    height:44px!important;min-height:44px!important;
  }
  #view-controls-panel #btn-h-minus,#view-controls-panel #btn-h-plus {
    height:44px!important;min-height:44px!important;width:44px!important;min-width:44px!important;
  }
}
@media(max-width:767px){
  #view-controls-panel > div:first-child{padding:14px!important;}
  #view-controls-panel .main-sim-title{font-size:15px!important;}
  #view-controls-panel #slider-height,#view-controls-panel #slider-drag {
    height:44px!important;min-height:44px!important;
  }
}

/* ================================================
  AULAQUEST V2 · CONTROL DE FLUIDO Y SALIDA DIFERIDA
================================================ */
#aq-fluid-options[hidden], #aq-delay-panel[hidden] { display:none !important; }
.aq-feature-switch { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 15px; border:1px solid #304661; border-radius:14px; background:#15263e; color:#e8f2ff; cursor:pointer; min-height:60px; }
.aq-feature-copy { display:flex; flex-direction:column; gap:4px; }
.aq-feature-copy strong { font-size:12px; font-weight:750; }
.aq-feature-copy strong i { color:#60a5fa; margin-right:6px; }
.aq-feature-copy small { color:#9fb7d4; font-size:11px; }
.aq-feature-switch input { position:absolute; opacity:0; width:1px; height:1px; }
.aq-feature-track { flex:0 0 45px; width:45px; height:26px; border-radius:100px; background:#465875; position:relative; transition:background .2s; }
.aq-feature-track:after { content:''; position:absolute; left:4px; top:4px; width:18px; height:18px; border-radius:50%; background:#fff; transition:transform .2s; }
.aq-feature-switch input:checked + .aq-feature-track { background:#2563eb; }
.aq-feature-switch input:checked + .aq-feature-track:after { transform:translateX(19px); }
.aq-feature-switch:focus-within { outline:2px solid #93c5fd; outline-offset:2px; }
#aq-fluid-options { margin-top:9px; }
.aq-delay-card { margin-top:10px; padding:15px; border:1px solid #304661; border-radius:15px; background:#15263e; color:#e8f2ff; }
.aq-delay-title { display:flex; align-items:center; gap:8px; font-size:12px; margin-bottom:10px; }
.aq-delay-title i { color:#fdba74; }
.aq-delay-card > label { display:block; font-size:11px; color:#abc3dd; margin-bottom:6px; }
.aq-delay-card select { width:100%; min-height:43px; padding:9px 12px; border:1px solid #3b5373; border-radius:10px; background:#0b172b; color:#f0f7ff; font-size:13px; }
.aq-delay-card p { font-size:11px; color:#9fb7d4; line-height:1.5; margin-top:9px; }
@media (max-width:767px) { .aq-delay-card select { min-height:48px; } }

.aq-global-clock { margin-top:4px; font-size:10px; font-weight:650; color:#cee3ff; text-align:center; padding:3px 5px; background:rgba(9,24,44,.82); border:1px solid rgba(96,165,250,.35); border-radius:6px; font-variant-numeric:tabular-nums; }

/* =============================================
   AULAQUEST — RESULTADOS Y FOOTER V2
   ============================================= */
.aq-experiment-clock {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border:1px solid #334b69;border-radius:12px;background:#17283f;color:#b6cbe8;font-size:12px;}
.aq-experiment-clock.hidden {display:none!important;}
.aq-experiment-clock strong {font-family:'JetBrains Mono',monospace;font-size:13px;color:#f2f7ff;font-variant-numeric:tabular-nums;}
.aq-lab-footer {padding:18px 17px 16px;border-top:1px solid #33455f;background:linear-gradient(180deg,#132238,#0c1728);color:#dbeafe;text-align:left;}
.aq-lab-footer__intro strong {font-size:13px;color:#f4f8ff;letter-spacing:-.1px;}
.aq-lab-footer__intro p {font-size:11px;line-height:1.55;color:#9fb6d4;margin:5px 0 14px;}
.aq-lab-footer__link {display:flex;align-items:center;justify-content:center;gap:9px;min-height:46px;padding:11px 12px;border-radius:12px;background:#1c3656;border:1px solid #3b6798;color:#dcecff;font-size:12px;font-weight:700;text-decoration:none;transition:background .15s,border-color .15s;}
.aq-lab-footer__link:hover {background:#23466e;border-color:#77b4fa;color:#fff;}
.aq-lab-footer__link i:last-child {font-size:10px;opacity:.7;}
.aq-lab-footer__brand {margin-top:18px;padding-top:14px;border-top:1px solid #2c3b53;display:flex;flex-direction:column;align-items:center;gap:5px;}
.aq-lab-footer__brand a {display:flex;align-items:center;gap:8px;color:#b7c8df;text-decoration:none;font-size:11px;font-weight:700;}
.aq-lab-footer__brand img {width:26px;height:26px;object-fit:contain;}
.aq-lab-footer__brand small {font-size:10px;color:#7c96b5;}
@media(max-width:767px) {.aq-lab-footer {padding:16px 14px}.aq-lab-footer__link {min-height:48px}}

/* AULAQUEST V2 · selección independiente de gráficas */
.aq-chart-selectors{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:4px 2px 10px}
.aq-chart-selectors[hidden]{display:none!important}
.aq-chart-selectors label{display:flex;align-items:center;justify-content:center;gap:6px;min-height:38px;padding:7px 6px;border:1px solid #334b6a;border-radius:11px;background:#14243a;color:#d6e6f9;font-size:11px;font-weight:600;cursor:pointer}
.aq-chart-selectors input{width:15px;height:15px;accent-color:#3b82f6}
@media(max-width:450px){.aq-chart-selectors{gap:4px}.aq-chart-selectors label{font-size:10px;padding:6px 3px}}

/* AulaQuest V2 — condición inicial vertical descendente */
.aq-initial-velocity{padding:14px;border:1px solid #334765;border-radius:15px;background:#14253f;color:#e7f0ff;margin:12px 0}
.aq-velocity-heading{font-size:13px;font-weight:750;margin-bottom:12px;display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}
.aq-velocity-heading small{font-size:11px;font-weight:400;color:#a2b8d4}
.aq-velocity-line{display:flex;align-items:center;gap:8px;margin-top:9px;font-size:12px;font-weight:650}
.aq-velocity-line input{margin-left:auto;width:90px;min-height:42px;border:1px solid #496588;border-radius:9px;padding:7px 10px;background:#0b1930;color:white;font-variant-numeric:tabular-nums;outline-offset:3px}
.aq-velocity-line span{font-size:11px;color:#b2c8e5}
.aq-initial-velocity p{color:#9eb6d7;font-size:11px;line-height:1.5;margin:12px 0 0}
.aq-initial-velocity [hidden]{display:none!important}



/* ====================================================
   AULAQUEST V2 — REFINAMIENTOS DE INTERFAZ
   ==================================================== */

/* AulaQuest V2 — controles compactos de velocidad y registros */
.aq-v0-inline{margin-top:10px;background:#142640;border:1px solid #334963;border-radius:12px;padding:10px 12px;color:#dceafe}
.aq-v0-toggle-row{display:flex;align-items:center;gap:9px;min-height:32px;cursor:pointer;font-size:12px;font-weight:650}
.aq-v0-toggle-row>span:first-child{margin-right:auto}.aq-v0-toggle-row i{color:#8fb9ed;margin-right:6px}
.aq-v0-toggle-row input{position:absolute;opacity:0;width:1px;height:1px}
.aq-v0-switch{width:38px;height:22px;border-radius:18px;background:#40516b;position:relative;transition:background .18s;flex:none}
.aq-v0-switch::after{content:"";position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:white;transition:transform .18s}
.aq-v0-toggle-row input:checked+.aq-v0-switch{background:#2563eb}
.aq-v0-toggle-row input:checked+.aq-v0-switch::after{transform:translateX(16px)}
.aq-v0-toggle-row:focus-within{outline:2px solid #93c5fd;outline-offset:3px;border-radius:5px}
.aq-v0-detail{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:9px;padding-top:10px;border-top:1px solid #2f4562;font-size:11px;color:#b5c9e6}
.aq-v0-detail[hidden]{display:none!important}
.aq-v0-detail input{width:91px;min-height:40px;border:1px solid #4b698c;background:#0b1b33;color:white;border-radius:9px;padding:6px 10px;text-align:center;font-size:14px;font-variant-numeric:tabular-nums}
#history-table .aq-history-context td{padding:8px 10px 4px;background:#17283f;border-top:2px solid #456185;white-space:normal}
.aq-history-context-line{display:flex;gap:6px;flex-wrap:wrap;font-size:10px}
.aq-history-context-line span{border-radius:5px;padding:3px 7px;color:#bed7f5;background:#213b59;white-space:nowrap}
#history-table td{font-variant-numeric:tabular-nums}
@media(max-width:640px){.aq-v0-inline{padding:9px 11px}.aq-v0-toggle-row{min-height:36px}#history-table th,#history-table td{white-space:nowrap}}


/* ==============================================================
   AulaQuest | Caída Libre · Fase HUD y espacio de laboratorio
   Sólo presentación: sin cambiar nombres/IDs ni estados del Builder.
   ============================================================== */
/* Proporciones de área útil: el panel no debe estrecharse en tablet. */
#view-simulation {min-height:0;height:100vh;height:100dvh;}
#view-simulation > div:has(> #simCanvas) {min-width:0;min-height:0;overflow:hidden;}
#view-controls-panel {min-width:0;min-height:0;overflow-x:hidden;overscroll-behavior:contain;}
@media (min-width:768px) and (max-width:1199px) {
 #view-simulation > div:has(> #simCanvas) {width:64%!important;flex:0 0 64%;}
 #view-controls-panel {width:36%!important;flex:0 0 36%;}
}
@media (min-width:1200px) {
 #view-simulation > div:has(> #simCanvas) {width:72%!important;flex:0 0 72%;}
 #view-controls-panel {width:28%!important;flex:0 0 28%;}
}
/* Ficha HUD integrada, menos superficie tapando la trayectoria. */
#view-simulation > div:has(> #simCanvas) > div:has(#wrap-timer-single) {
 top:8px;left:8px;width:max-content;max-width:calc(100% - 16px);
 gap:4px!important;
}
#view-simulation > div:has(> #simCanvas) > div:has(#wrap-timer-single) > div {gap:4px!important;margin-top:0!important;}
#timer-single,#timer-dual-1,#timer-dual-2,#hud-p1-panel,#hud-p2-panel {
 padding:5px 9px!important;border-radius:9px!important;
 box-shadow:0 3px 12px rgba(0,0,0,.16)!important;
}
#hud-time {font-size:19px!important;}
#hud-time-1,#hud-time-2 {font-size:15px!important;}
#hud-v1,#hud-v2 {font-size:12px!important;margin-top:0!important;}
/* Sidebar: compacta espacio, nunca la interacción táctil esencial. */
#view-controls-panel > div:first-child {padding:11px!important;gap:8px!important;}
#view-controls-panel > .p-4.space-y-5.flex-grow {padding:11px!important;}
#view-controls-panel .space-y-5 > * + * {margin-top:12px!important;}
#view-controls-panel .space-y-3 > * + * {margin-top:8px!important;}
#view-controls-panel select {min-height:40px!important;padding:7px 32px 7px 10px!important;border-radius:9px!important;font-size:12px!important;background-position:right 9px center!important;}
#view-controls-panel #btn-run,#view-controls-panel #btn-reset,#view-controls-panel #btn-teacher-mode {min-height:40px!important;padding:8px 9px!important;border-radius:9px!important;font-size:12px!important;box-shadow:none!important;}
#view-controls-panel #btn-h-minus,#view-controls-panel #btn-h-plus {width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;}
#view-controls-panel #slider-height,#view-controls-panel #slider-drag {height:28px!important;min-height:28px!important;padding:0 5px!important;}
#view-controls-panel input[type=range]::-webkit-slider-thumb {width:20px!important;height:20px!important;border-width:2px!important;box-shadow:0 0 0 3px rgba(81,153,255,.13)!important;}
#view-controls-panel input[type=range]::-moz-range-thumb {width:16px!important;height:16px!important;border-width:2px!important;}
.aq-display-section {padding:9px!important;border-radius:11px;}
.aq-visual-toggle {min-height:43px!important;padding:6px 9px!important;border-radius:9px!important;}
@media (max-width:767px) {
 #view-simulation {display:flex;flex-direction:column;}
 #view-simulation > div:has(> #simCanvas) {
  width:100%!important;height:57vh!important;height:57dvh!important;
  flex:0 0 57vh!important;flex-basis:57dvh!important;
 }
 #view-controls-panel {width:100%!important;flex:1 1 0;max-height:none;}
 #view-simulation > div:has(> #simCanvas) > div:has(#wrap-timer-single) {
  top:5px;left:5px;max-width:calc(100% - 10px);gap:3px!important;
 }
 #view-simulation > div:has(> #simCanvas) > div:has(#wrap-timer-single) > div {
  flex-wrap:nowrap!important;gap:3px!important;
 }
 #timer-single,#timer-dual-1,#timer-dual-2,#hud-p1-panel,#hud-p2-panel {padding:4px 6px!important;border-radius:8px!important;border-left-width:2px!important;}
 #hud-time {font-size:14px!important;}
 #hud-time-1,#hud-time-2 {font-size:12px!important;}
 #hud-v1,#hud-v2 {font-size:11px!important;}
 #view-controls-panel select {font-size:16px!important;min-height:40px!important;}
 #view-controls-panel #btn-run,#view-controls-panel #btn-reset,#view-controls-panel #btn-teacher-mode {min-height:40px!important;}
 #view-controls-panel #slider-height,#view-controls-panel #slider-drag {min-height:34px!important;height:34px!important;}
 #view-controls-panel #btn-h-minus,#view-controls-panel #btn-h-plus {min-height:40px!important;}
 .aq-display-toggles {gap:5px;}
 .aq-visual-toggle {min-height:49px!important;padding:6px!important;}
}
@media (max-width:767px) and (max-height:650px) {
 #view-simulation > div:has(> #simCanvas) {height:54vh!important;height:54dvh!important;flex-basis:54dvh!important;}
}

/* AulaQuest · Fase 3: controles de gráficas y ampliación */
/* FASE 4 · Modal de gráficas y exportación */
.aq-chart-expand{position:absolute;z-index:4;top:7px;right:8px;display:grid;place-items:center;width:31px;height:31px;border:1px solid #475569;border-radius:8px;background:#182b45;color:#e2e8f0;cursor:pointer;box-shadow:0 2px 8px #0006}
.aq-chart-expand:hover{background:#264369;color:white}
.aq-graph-modal[hidden]{display:none!important}
.aq-graph-modal{position:fixed;inset:0;z-index:999998;display:grid;place-items:center;padding:18px}
.aq-graph-modal-backdrop{position:absolute;inset:0;background:rgba(2,6,23,.88);backdrop-filter:blur(5px)}
.aq-graph-modal-panel{position:relative;display:flex;flex-direction:column;gap:10px;width:min(1100px,100%);height:min(780px,92dvh);padding:16px;border:1px solid #365273;border-radius:16px;background:#0f1c30;box-shadow:0 22px 70px #0009;color:#f8fafc}
.aq-graph-modal-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.aq-graph-modal-head h2{font-size:16px;font-weight:750}
.aq-graph-modal-actions{display:flex;gap:8px}.aq-graph-modal-actions button{border:1px solid #415a77;border-radius:9px;padding:9px 12px;background:#213856;color:#e2e8f0;cursor:pointer;font-size:12px;font-weight:700}
.aq-graph-modal-plot{flex:1;min-height:0;position:relative}.aq-graph-modal-plot canvas{width:100%!important;height:100%!important}
.aq-graph-modal-credit{text-align:right;font-size:10px;color:#94a3b8}
body.aq-graph-modal-open{overflow:hidden}
@media(max-width:600px){.aq-graph-modal{padding:7px}.aq-graph-modal-panel{height:93dvh;padding:10px;border-radius:12px}.aq-graph-modal-head h2{font-size:13px}}


.aq-chart-selectors[hidden]{display:none!important}
.aq-chart-selectors{grid-column:1 / -1!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-width:0;width:100%;padding:6px 0 10px}
.aq-chart-selectors label{min-width:0;padding:7px 4px;min-height:38px}
.aq-chart-symbol{display:none}
@media(max-width:767px){
  #view-controls-panel #aq-chart-selectors{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  #view-controls-panel #aq-chart-selectors[hidden]{display:none!important}
  #view-controls-panel #aq-chart-selectors label{font-size:11px;gap:5px;padding:7px 4px;white-space:nowrap;min-width:0}
  #view-controls-panel #aq-chart-selectors input{flex:0 0 15px}
}
@media(max-width:370px){#view-controls-panel .aq-chart-name{display:none}#view-controls-panel .aq-chart-symbol{display:inline;font-weight:700;font-size:12px}}

/* Fase 4 · Enlace de personalización; mismo patrón que Tiro Vertical. */
.aq-lab-footer__customize{margin-top:9px;background:#2563eb;border-color:#3b82f6;color:#fff}
.aq-lab-footer__customize:hover,.aq-lab-footer__customize:focus-visible{background:#1d4ed8;border-color:#93c5fd;color:#fff}
.aq-lab-footer__customize:focus-visible{outline:2px solid #bfdbfe;outline-offset:3px}
