html, body { height: 100%; margin: 0; padding: 0; background-color: #020617; color: #E2E8F0; overflow: hidden; }
        .lab-panel { background: rgba(30, 41, 59, 0.95); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); border-radius: 0.5rem; }
        input[type=range] { -webkit-appearance: none; background: transparent; height: 6px; border-radius: 3px; background: #475569; cursor: pointer; }
        input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%; background: #3B82F6; border: 2px solid #fff; box-shadow: 0 0 10px rgba(59, 130, 246, 0.5); margin-top: -5px; transition: transform 0.1s; }
        .toggle-checkbox { right: auto; left: 0; transition: all 0.3s ease; border-color: #cbd5e1; }
        .toggle-checkbox:checked { left: 1.25rem; border-color: #3B82F6; background-color: #3B82F6; }
        .toggle-label { width: 2.5rem; height: 1.25rem; background-color: #94a3b8; transition: background-color 0.3s ease; }
        .toggle-checkbox:checked + .toggle-label { background-color: #93C5FD; }
        .custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
        .custom-scrollbar::-webkit-scrollbar-track { background: #0f172a; }
        .custom-scrollbar::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
        .activity-drawer { position: fixed; z-index: 50; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; box-shadow: 0 -5px 25px rgba(0,0,0,0.2); background-color: #ffffff; color: #1e293b; visibility: hidden; }
        .drawer-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 49; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
        .drawer-overlay.is-visible { opacity: 1; pointer-events: auto; }
        @media (max-width: 767px) { .activity-drawer { left: 0; width: 100%; height: 85vh; bottom: 0; transform: translateY(100%); border-radius: 1rem 1rem 0 0; } .activity-drawer.is-open { transform: translateY(0); visibility: visible; } }
        @media (min-width: 768px) { .activity-drawer { top: 0; right: -100%; width: 500px; height: 100%; border-left: 1px solid #cbd5e1; border-radius: 0; position: fixed; } .activity-drawer.is-open { right: 0; visibility: visible; } .activity-drawer.is-expanded { width: 65%; } }
        .activity-header { padding: 1rem; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; background: #f8fafc; }
        .drawer-content { flex-grow: 1; overflow-y: auto; padding: 1.5rem; }
        .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 100; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; backdrop-filter: blur(4px); }
        .modal-overlay.is-visible { opacity: 1; pointer-events: auto; }
        .modal-content { background: #1e293b; border: 1px solid #334155; border-radius: 0.75rem; width: 90%; max-width: 600px; max-height: 90vh; overflow-y: auto; transform: scale(0.95); transition: transform 0.3s; }
        .modal-overlay.is-visible .modal-content { transform: scale(1); }
        .math-block { background: #f8fafc; padding: 1rem; border-radius: 0.5rem; border: 1px solid #e2e8f0; margin-bottom: 1rem; }
        .formula-box { font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; color: #334155; background: #ffffff; padding: 0.5rem; border-radius: 0.25rem; border: 1px dashed #cbd5e1; margin-top: 0.5rem; text-align: center; }
        .history-table-wrapper { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 6px; border: 1px solid #334155; margin-bottom: 10px; max-height: 200px; }
        .history-table { width: 100%; border-collapse: collapse; font-size: 0.7rem; white-space: nowrap; }
        .history-table th { background: #0f172a; color: #94a3b8; font-weight: 600; text-transform: uppercase; padding: 8px 12px; border-bottom: 2px solid #334155; text-align: center; position: sticky; top: 0; z-index: 10; }
        .history-table td { padding: 6px 12px; border-bottom: 1px solid #1e293b; text-align: center; color: #e2e8f0; font-family: 'JetBrains Mono', monospace; }
        .history-table tr:last-child td { border-bottom: none; }
        .history-table tr:nth-child(even) { background: rgba(30, 41, 59, 0.5); }
        .dual-cell { display: flex; flex-direction: column; gap: 2px; }
        .val-b1 { color: #60a5fa; } .val-b2 { color: #fb923c; }

/* V2 — Interruptores táctiles accesibles. IDs y semántica nativa conservados. */
.aq-display-section { padding: 12px; border: 1px solid #334155; border-radius: 14px; background: rgba(30,41,59,.45); }
.aq-display-heading { color: #e2e8f0; font-weight: 800; font-size: 12px; margin-bottom: 10px; }
.aq-display-heading span { color: #94a3b8; font-weight: 500; font-size: 10px; margin-left: 5px; }
.aq-display-toggles { display: grid; grid-template-columns: 1fr; gap: 6px; }
.aq-visual-toggle { position: relative; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px; background: rgba(15,23,42,.65); border: 1px solid #334155; border-radius: 10px; color: #e2e8f0; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.aq-visual-toggle:has(input:checked) { border-color: rgba(59,130,246,.55); background: rgba(30,58,100,.36); }
.aq-visual-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.aq-visual-copy strong { font-size: 12px; font-weight: 700; }
.aq-visual-copy small { font-size: 10px; color: #94a3b8; margin-top: 2px; }
.aq-visual-toggle input { position: absolute; width: 44px; height: 44px; right: 7px; opacity: 0; cursor: pointer; z-index: 2; }
.aq-switch-track { position: relative; width: 42px; height: 25px; flex: 0 0 42px; border-radius: 20px; background: #475569; border: 1px solid #64748b; transition: background .15s; }
.aq-switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: white; box-shadow: 0 1px 3px #0005; transition: transform .15s; }
.aq-visual-toggle input:checked + .aq-switch-track { background: #2563eb; border-color: #60a5fa; }
.aq-visual-toggle input:checked + .aq-switch-track::after { transform: translateX(17px); }
.aq-visual-toggle input:focus-visible + .aq-switch-track { outline: 3px solid #93c5fd; outline-offset: 3px; }
#slider-height, #slider-drag { min-height: 34px; touch-action: pan-x; }
#slider-height::-webkit-slider-thumb, #slider-drag::-webkit-slider-thumb { width: 24px; height: 24px; margin-top: -9px; }
#btn-h-minus, #btn-h-plus { min-width: 44px; min-height: 44px; touch-action: manipulation; }
#simCanvas { touch-action: pan-y; }
@media (max-width: 767px) {
  .aq-display-section { padding: 10px; }
  .aq-display-toggles { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .aq-visual-toggle { min-height: 60px; gap: 5px; padding: 7px; }
  .aq-visual-copy strong { font-size: 11px; }
  .aq-visual-copy small { font-size: 9px; }
  .aq-switch-track { width: 35px; height: 23px; flex-basis: 35px; }
  .aq-switch-track::after { width: 15px; height: 15px; }
  .aq-visual-toggle input:checked + .aq-switch-track::after { transform: translateX(12px); }
  #energy-panel { left: 8px !important; bottom: 8px !important; transform: scale(.67); transform-origin: bottom left; max-width: 50vw; }
  #charts-container canvas { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
 .aq-switch-track, .aq-switch-track::after { transition: none; }
}

/* Tiro vertical: velocidad inicial táctil y consistente con los controles de Caída Libre */
.aq-v0-detail input[type=range]{display:block;width:100%;height:7px;margin:12px 0 8px;accent-color:#3b82f6;cursor:pointer;}
.aq-v0-detail input[type=number]{width:100%;background:#0a182c;border:1px solid #395174;color:#f8fafc;border-radius:10px;padding:8px 12px;}


/* Tiro Vertical · control de lanzamiento único (el campo oculto mantiene el contrato Builder). */
.aq-v0-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;font-weight:700;font-size:12px;color:#e7f0ff}
.aq-v0-heading i{color:#60a5fa;margin-right:7px}
.aq-v0-heading output{font:700 14px 'JetBrains Mono',monospace;color:#fff;white-space:nowrap}
.aq-v0-single{padding:12px 1px 2px}
.aq-v0-single input[type=range]{display:block;width:100%;height:9px;accent-color:#3b82f6;cursor:pointer;touch-action:pan-x}

/* AulaQuest: tarjetas individuales para comparación vertical */
.aq-ball-card{padding:15px;border:1px solid #334966;border-radius:16px;background:#142640;display:flex;flex-direction:column;gap:12px;min-width:0}
.aq-ball-card--1{border-left:3px solid #3b82f6}
.aq-ball-card--2{border-left:3px solid #fb923c}
.aq-setting-block{min-width:0;padding-top:10px;border-top:1px solid #314863}
.aq-setting-block input[type=range],.aq-v0-single input[type=range]{display:block;width:100%;height:10px;accent-color:#3b82f6;cursor:pointer;min-width:0}
.aq-ball-card--2 .aq-setting-block input[type=range],.aq-ball-card--2 .aq-v0-single input[type=range]{accent-color:#fb923c}
.aq-ball-card .aq-v0-heading{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:6px;font-size:12px;line-height:1.5}
.aq-ball-card .aq-v0-heading output{font:700 14px 'JetBrains Mono',monospace;white-space:nowrap;color:#f8fafc}
.aq-ball-card select{width:100%;min-width:0}
.aq-ball-card .aq-delay-card{margin-top:6px}

/* AulaQuest · Slider moderno sobrio: azul primera bola, naranja segunda. */
#aq-v0-range-1, #aq-v0-range-2, #aq-h-range-1, #aq-h-range-2, #slider-drag {
  --aq-range-progress:0%; --aq-range-color:#3b82f6;
  appearance:none; -webkit-appearance:none; display:block; width:100%;
  height:12px; border-radius:999px; border:1px solid #344b6d;
  background:linear-gradient(to right,var(--aq-range-color) 0%,var(--aq-range-color) var(--aq-range-progress),#101b30 var(--aq-range-progress),#101b30 100%);
  box-shadow:inset 0 2px 4px rgba(0,0,0,.35); cursor:pointer;
  outline:none; margin:15px 0 13px; touch-action:pan-x;
}
#aq-v0-range-2, #aq-h-range-2 {--aq-range-color:#fb923c}
#aq-v0-range-1::-webkit-slider-thumb, #aq-v0-range-2::-webkit-slider-thumb,
#aq-h-range-1::-webkit-slider-thumb, #aq-h-range-2::-webkit-slider-thumb,
#slider-drag::-webkit-slider-thumb {
  -webkit-appearance:none; width:23px; height:23px; margin-top:0;
  border-radius:50%; border:3px solid #e7f0ff; background:var(--aq-range-color);
  box-shadow:0 0 0 4px #172941,0 3px 10px #0008;
  transition:box-shadow .15s,transform .15s;
}
#aq-v0-range-1::-moz-range-thumb, #aq-v0-range-2::-moz-range-thumb,
#aq-h-range-1::-moz-range-thumb, #aq-h-range-2::-moz-range-thumb,
#slider-drag::-moz-range-thumb {
  width:17px;height:17px;border-radius:50%;border:3px solid #e7f0ff;
  background:var(--aq-range-color);box-shadow:0 0 0 4px #172941,0 3px 10px #0008;
}
#aq-v0-range-1:focus-visible, #aq-v0-range-2:focus-visible,
#aq-h-range-1:focus-visible, #aq-h-range-2:focus-visible,
#slider-drag:focus-visible {outline:2px solid #93c5fd;outline-offset:6px}
#select-obj1,#select-obj2,#select-planet,#select-ball-delay {
  color:#f1f5ff; background-color:#10213a; border:1px solid #375477;
  border-radius:12px; min-height:46px; padding:10px 34px 10px 12px;
  font-weight:650; font-size:13px; cursor:pointer;
  transition:border-color .15s,box-shadow .15s;
}
#select-obj1:hover,#select-obj2:hover,#select-planet:hover,#select-ball-delay:hover {border-color:#77a9df}
#select-obj1:focus-visible,#select-obj2:focus-visible,#select-planet:focus-visible,#select-ball-delay:focus-visible {
  outline:none; box-shadow:0 0 0 3px #3b82f655; border-color:#60a5fa;
}
#select-obj2 {border-color:#8f6345}
@media(prefers-reduced-motion:reduce){
 #aq-v0-range-1::-webkit-slider-thumb,#aq-v0-range-2::-webkit-slider-thumb,
 #aq-h-range-1::-webkit-slider-thumb,#aq-h-range-2::-webkit-slider-thumb {transition:none}
}

/* Encuentro: integrado en la segunda tarjeta, sin alterar el panel. */
.aq-encounter-card { margin-top:14px; border:1px solid rgba(251,146,60,.4); background:#18253a; border-radius:12px; padding:12px; color:#e2e8f0; }
.aq-encounter-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:12px; font-weight:700; cursor:pointer; }
.aq-encounter-heading i {color:#fb923c; margin-right:6px;}
.aq-encounter-heading input {width:19px;height:19px;accent-color:#fb923c; flex:none;}
.aq-encounter-hint {font-size:11px;line-height:1.65;color:#fed7aa;margin-top:10px;margin-bottom:0;}
.aq-encounter-result {position:absolute;left:50%;top:18px;transform:translateX(-50%);z-index:30;padding:12px 18px;border-radius:12px;background:rgba(15,23,42,.95);border:1px solid #fb923c;color:#fff;font-size:14px;font-weight:700;box-shadow:0 12px 24px #0005;white-space:nowrap;}
.aq-encounter-result[hidden], .aq-encounter-card[hidden], .aq-encounter-hint[hidden] {display:none!important;}

/* HUD compacto V2: sin columnas fantasma ni tarjetas internas. */
.aq-top-hud{
 position:absolute;z-index:24;top:9px;left:10px;right:auto;
 width:max-content;max-width:calc(100% - 20px);min-width:0;
 display:flex;flex-direction:column;gap:4px;box-sizing:border-box;
 padding:7px 10px 8px;border:1px solid rgba(154,185,226,.34);
 border-radius:12px;background:rgba(10,27,50,.93);
 box-shadow:0 4px 14px rgba(0,0,0,.14);backdrop-filter:blur(9px);
 color:#f8fafc;font-family:Inter,system-ui,sans-serif;
}
.aq-top-hud .aq-hud-readouts{display:flex;flex-wrap:wrap;align-items:center;gap:0;min-width:0;width:max-content;max-width:100%}
.aq-top-hud .aq-hud-cell{flex:0 0 auto;min-width:0;padding:1px 10px;border:0;border-right:1px solid rgba(145,169,200,.26);box-sizing:border-box}
.aq-top-hud .aq-hud-cell:first-child{padding-left:0}
.aq-top-hud .aq-hud-cell:last-child{border-right:0;padding-right:0}
/* JS oculta el instrumento interior; el contenedor tampoco debe reservar sitio. */
.aq-top-hud .aq-hud-cell:has(> .aq-hud-metric.hidden),
.aq-top-hud .aq-hud-cell.hidden,
.aq-top-hud .aq-hud-cell[style*="display: none"]{display:none!important}
.aq-top-hud .aq-hud-metric{display:flex!important;flex-direction:row;align-items:baseline;gap:6px;min-height:0!important;padding:0!important;margin:0!important;background:none!important;border:0!important;box-shadow:none!important;border-radius:0!important;white-space:nowrap}
.aq-top-hud .aq-hud-metric.hidden{display:none!important}
.aq-top-hud .aq-hud-label{font-size:10px;font-weight:750;line-height:1.3;letter-spacing:.015em;text-transform:uppercase;color:#94aeca;white-space:nowrap}
.aq-top-hud .aq-hud-one .aq-hud-label{color:#93c5fd}
.aq-top-hud .aq-hud-two .aq-hud-label{color:#fdba74}
.aq-top-hud .aq-hud-metric strong{font:700 13px/1.25 'JetBrains Mono',monospace!important;color:#fff;white-space:nowrap}
.aq-top-hud .aq-hud-maxima{position:static!important;display:flex!important;align-items:baseline;gap:7px;min-height:0!important;width:auto;max-width:100%;margin:0!important;padding:4px 0 0!important;background:none!important;border:0!important;border-top:1px solid rgba(145,169,200,.21)!important;box-shadow:none!important;border-radius:0!important;box-sizing:border-box}
.aq-top-hud .aq-hud-maxima.hidden{display:none!important}
.aq-top-hud .aq-hud-section-label{flex:0 0 auto;font:700 9px/1.25 Inter,system-ui,sans-serif;letter-spacing:.015em;color:#9db4d1;text-transform:uppercase;white-space:nowrap}
.aq-top-hud .aq-hud-maxima-values{display:flex;flex-wrap:wrap;gap:2px 10px;min-width:0;font:600 10px/1.3 Inter,system-ui,sans-serif}
.aq-top-hud #aq-apex-live{display:inline;color:#c7e2ff}
.aq-top-hud #aq-apex-live-2{color:#fdba74;margin:0!important}
.aq-top-hud .aq-encounter-result{position:static!important;transform:none!important;align-self:stretch;max-width:100%;white-space:normal;overflow-wrap:break-word;box-sizing:border-box;margin-top:1px;padding:4px 7px;border-radius:6px;background:rgba(251,146,60,.12);border:1px solid rgba(251,146,60,.42);box-shadow:none;font-size:10px;line-height:1.3;color:#fff}
.aq-top-hud .aq-encounter-result[hidden]{display:none!important}
@media(max-width:680px){
 .aq-top-hud{top:5px;left:5px;max-width:calc(100% - 10px);padding:5px 7px 6px;gap:3px;border-radius:9px}
 .aq-top-hud .aq-hud-readouts{max-width:100%;gap:2px 0}
 .aq-top-hud .aq-hud-cell{padding:1px 6px}
 .aq-top-hud .aq-hud-metric{gap:3px}
 .aq-top-hud .aq-hud-label{font-size:8px}
 .aq-top-hud .aq-hud-metric strong{font-size:10px!important}
 .aq-top-hud .aq-hud-maxima{display:block!important;padding-top:3px!important}
 .aq-top-hud .aq-hud-section-label{display:inline;font-size:8px;margin-right:5px}
 .aq-top-hud .aq-hud-maxima-values{display:inline;font-size:9px}
 .aq-top-hud .aq-hud-maxima-values span{display:inline-block;margin-right:8px}
 .aq-top-hud .aq-encounter-result{font-size:9px;padding:3px 6px}
}
@media(max-width:380px){
 .aq-top-hud .aq-hud-readouts{gap:2px 0}
 .aq-top-hud .aq-hud-cell{padding:1px 5px}
 .aq-top-hud .aq-hud-metric{gap:2px}
 .aq-top-hud .aq-hud-label{font-size:7px}
 .aq-top-hud .aq-hud-metric strong{font-size:9px!important}
}
/* Mismo patrón de estilo para rangos; el relleno se recalcula tras cambiar min/value. */
#aq-v0-range-1,#aq-v0-range-2,#aq-h-range-1,#aq-h-range-2{background:linear-gradient(to right,var(--aq-range-color) 0%,var(--aq-range-color) var(--aq-range-progress),#101b30 var(--aq-range-progress),#101b30 100%)!important;}

/* Experimentos avanzados: encuentro y retraso, disponibles para todos. */
.aq-advanced-experiments{margin-top:15px;padding:12px;border:1px solid #3c5877;background:#14243a;border-radius:14px;color:#e5eefb}
.aq-advanced-experiments[hidden]{display:none!important}
.aq-advanced-header{display:flex;justify-content:space-between;align-items:flex-start;gap:9px}
.aq-advanced-title{font-size:12px;font-weight:750;line-height:1.5;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.aq-advanced-lede{font-size:11px;line-height:1.55;color:#acc3db;margin:5px 0 0}
.aq-advanced-experiments .aq-encounter-card{margin-top:10px}
.aq-advanced-experiments .aq-delay-card{margin-top:10px}


/* ===== FASE 2 · compactación de panel, botones, tarjetas y HUD ===== */
#view-controls-panel .p-4.space-y-5.flex-grow{padding:14px;gap:14px}
#view-controls-panel .grid.grid-cols-2.gap-2{gap:10px}
#btn-run,#btn-reset,#btn-teacher-mode{min-height:44px;padding:10px 12px;border-radius:12px;font-size:12px;line-height:1.15;box-shadow:none}
#btn-run i,#btn-reset i,#btn-teacher-mode i{font-size:.95rem}
#aq-global-clock{margin-top:2px}
#view-controls-panel .bg-slate-800\/50.p-3.rounded.border.border-slate-700{padding:10px 12px;border-radius:12px}
.aq-ball-card{padding:12px;border-radius:14px;gap:10px;background:#13243d}
.aq-setting-block{padding-top:8px}
.aq-v0-heading{font-size:11px;gap:10px}
.aq-v0-heading output,.aq-ball-card .aq-v0-heading output{font-size:13px}
.aq-v0-single{padding:9px 0 0}
#select-obj1,#select-obj2,#select-planet,#select-ball-delay{min-height:42px;padding:9px 34px 9px 11px;font-size:12px;border-radius:11px}
#aq-v0-range-1, #aq-v0-range-2, #aq-h-range-1, #aq-h-range-2, #slider-drag {height:10px;margin:11px 0 9px}
#aq-v0-range-1::-webkit-slider-thumb, #aq-v0-range-2::-webkit-slider-thumb,
#aq-h-range-1::-webkit-slider-thumb, #aq-h-range-2::-webkit-slider-thumb,
#slider-drag::-webkit-slider-thumb {width:19px;height:19px;border-width:2px;box-shadow:0 0 0 3px #172941,0 2px 8px #0007}
#aq-v0-range-1::-moz-range-thumb, #aq-v0-range-2::-moz-range-thumb,
#aq-h-range-1::-moz-range-thumb, #aq-h-range-2::-moz-range-thumb,
#slider-drag::-moz-range-thumb {width:15px;height:15px;border-width:2px;box-shadow:0 0 0 3px #172941,0 2px 8px #0007}
.aq-advanced-experiments{margin-top:12px;padding:10px 11px;border-radius:12px}
.aq-encounter-card{margin-top:10px;padding:10px 11px;border-radius:11px}
.aq-encounter-heading{font-size:11px}
.aq-encounter-heading input{width:17px;height:17px}
.aq-encounter-hint,.aq-advanced-lede,.aq-delay-card p{font-size:10px;line-height:1.5}
.aq-delay-card label,.aq-fluid-details label,.aq-advanced-title,.aq-fluid-switch .aq-feature-copy strong{font-size:11px}
.aq-fluid-switch{padding:10px 11px;border-radius:12px}
.aq-fluid-details{margin-top:10px;padding:10px 11px;border-radius:12px}
.aq-feature-switch .aq-feature-copy small{font-size:10px}
.aq-top-hud{top:8px;left:8px;max-width:min(calc(100% - 16px), 660px);padding:6px 9px 7px;gap:3px;border-radius:11px;box-shadow:0 4px 12px rgba(0,0,0,.12)}
.aq-top-hud .aq-hud-cell{padding:1px 8px}
.aq-top-hud .aq-hud-label{font-size:9px}
.aq-top-hud .aq-hud-metric strong{font-size:12px!important}
.aq-top-hud .aq-hud-maxima{padding-top:3px!important}
.aq-top-hud .aq-hud-maxima-values{font-size:9px}
@media (max-width: 900px){
  #view-controls-panel .p-4.space-y-5.flex-grow{padding:12px;gap:12px}
  #btn-run,#btn-reset,#btn-teacher-mode{min-height:42px;padding:9px 10px;font-size:11px}
  .aq-ball-card{padding:11px;gap:9px}
}
@media (max-width: 680px){
  .aq-top-hud{top:4px;left:4px;max-width:calc(100% - 8px);padding:5px 7px 6px;border-radius:10px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;pointer-events:auto!important;touch-action:pan-x}
  .aq-top-hud::-webkit-scrollbar{height:4px}
  .aq-top-hud::-webkit-scrollbar-thumb{background:rgba(148,174,202,.45);border-radius:999px}
  .aq-top-hud .aq-hud-readouts{flex-wrap:nowrap;width:max-content;max-width:none;padding-bottom:1px}
  .aq-top-hud .aq-hud-maxima{display:flex!important;flex-wrap:nowrap;align-items:center;gap:6px;min-width:max-content}
  .aq-top-hud .aq-hud-maxima-values{display:flex;flex-wrap:nowrap;gap:0 8px;white-space:nowrap}
  .aq-top-hud .aq-encounter-result{min-width:max-content}
  #view-controls-panel .p-4.border-b.border-slate-700.bg-\[\#1e293b\].flex.flex-col.gap-3{padding:12px}
  #view-controls-panel .p-4.space-y-5.flex-grow{padding:11px;gap:11px}
  #btn-run,#btn-reset,#btn-teacher-mode{min-height:40px;padding:8px 10px;border-radius:11px;font-size:11px}
  #view-controls-panel .bg-slate-800\/50.p-3.rounded.border.border-slate-700{padding:9px 10px}
  .aq-ball-card{padding:10px;border-radius:13px;gap:8px}
  .aq-v0-heading{font-size:10px;gap:8px}
  .aq-v0-heading output,.aq-ball-card .aq-v0-heading output{font-size:12px}
  #select-obj1,#select-obj2,#select-planet,#select-ball-delay{min-height:40px;padding:8px 30px 8px 10px;font-size:12px}
  #aq-v0-range-1, #aq-v0-range-2, #aq-h-range-1, #aq-h-range-2, #slider-drag {height:9px;margin:9px 0 8px}
  #aq-v0-range-1::-webkit-slider-thumb, #aq-v0-range-2::-webkit-slider-thumb,
  #aq-h-range-1::-webkit-slider-thumb, #aq-h-range-2::-webkit-slider-thumb,
  #slider-drag::-webkit-slider-thumb {width:17px;height:17px;box-shadow:0 0 0 2px #172941,0 2px 7px #0007}
  #aq-v0-range-1::-moz-range-thumb, #aq-v0-range-2::-moz-range-thumb,
  #aq-h-range-1::-moz-range-thumb, #aq-h-range-2::-moz-range-thumb,
  #slider-drag::-moz-range-thumb {width:13px;height:13px;box-shadow:0 0 0 2px #172941,0 2px 7px #0007}
}
