/* Utilidades locales para el marcado y las plantillas originales. */
.-mt-6{margin-top:-1.5rem}
.-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}
.-translate-x-1\/2{--aq-tx:-50%;transform:translate(var(--aq-tx,0),var(--aq-ty,0))}
.-translate-y-1\/2{--aq-ty:-50%;transform:translate(var(--aq-tx,0),var(--aq-ty,0))}
.absolute{position:absolute}
.backdrop-blur-sm{backdrop-filter:blur(4px)}
.bg-amber-500{background-color:#f59e0b}
.bg-amber-600{background-color:#d97706}
.bg-amber-900\/20{background-color:rgba(120,53,15,0.2)}
.bg-black\/20{background-color:rgba(0,0,0,0.2)}
.bg-black\/30{background-color:rgba(0,0,0,0.3)}
.bg-black\/60{background-color:rgba(0,0,0,0.6)}
.bg-green-500{background-color:#22c55e}
.bg-green-600{background-color:#16a34a}
.bg-indigo-600{background-color:#4f46e5}
.bg-indigo-900\/20{background-color:rgba(49,46,129,0.2)}
.bg-indigo-950\/40{background-color:rgba(30,27,75,0.4)}
.bg-orange-600{background-color:#ea580c}
.bg-purple-500{background-color:#a855f7}
.bg-purple-600{background-color:#9333ea}
.bg-rose-600{background-color:#e11d48}
.bg-rose-900\/20{background-color:rgba(136,19,55,0.2)}
.bg-slate-700{background-color:#334155}
.bg-slate-700\/50{background-color:rgba(51,65,85,0.5)}
.bg-slate-800{background-color:#1e293b}
.bg-slate-800\/40{background-color:rgba(30,41,59,0.4)}
.bg-slate-800\/50{background-color:rgba(30,41,59,0.5)}
.bg-slate-800\/80{background-color:rgba(30,41,59,0.8)}
.bg-slate-900{background-color:#0f172a}
.bg-slate-900\/50{background-color:rgba(15,23,42,0.5)}
.bg-slate-900\/70{background-color:rgba(15,23,42,0.7)}
.bg-teal-600{background-color:#0d9488}
.bg-yellow-500{background-color:#eab308}
.block{display:block}
.border{border-width:1px;border-style:solid}
.border-2{border-width:2px;border-style:solid}
.border-amber-500\/30{border-color:rgba(245,158,11,0.3)}
.border-b{border-bottom:1px solid}
.border-indigo-500{border-color:#6366f1}
.border-indigo-500\/30{border-color:rgba(99,102,241,0.3)}
.border-l{border-left:1px solid}
.border-rose-500\/20{border-color:rgba(244,63,94,0.2)}
.border-rose-500\/30{border-color:rgba(244,63,94,0.3)}
.border-rose-900\/50{border-color:rgba(136,19,55,0.5)}
.border-slate-600{border-color:#475569}
.border-slate-700{border-color:#334155}
.border-slate-800{border-color:#1e293b}
.border-t{border-top:1px solid}
.border-t-0{border-top:0}
.border-transparent{border-color:transparent}
.col-span-2{grid-column:span 2 / span 2}
.disabled\:bg-indigo-900:disabled{background-color:#312e81}
.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}
.duration-300{transition-duration:.3s}
.fixed{position:fixed}
.flex{display:flex}
.flex-1{flex:1 1 0%}
.flex-col{flex-direction:column}
.flex-grow{flex-grow:1}
.flex-none{flex:none}
.flex-row{flex-direction:row}
.flex-shrink-0{flex-shrink:0}
.flex-wrap{flex-wrap:wrap}
.focus\:outline-none:focus{outline:none}
.font-bold{font-weight:700}
.font-medium{font-weight:500}
.font-mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-variant-numeric:tabular-nums}
.font-semibold{font-weight:600}
.gap-2{gap:0.5rem}
.gap-3{gap:0.75rem}
.gap-4{gap:1.0rem}
.gap-6{gap:1.5rem}
.gap-x-4{column-gap:1.0rem}
.gap-y-2{row-gap:0.5rem}
.grid{display:grid}
.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}
.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.h-10{height:2.5rem}
.h-4{height:1.0rem}
.h-8{height:2.0rem}
.h-\[50vh\]{height:50vh}
.h-full{height:100%}
.hidden{display:none!important}
.hover\:bg-amber-700:hover{background-color:#b45309}
.hover\:bg-green-700:hover{background-color:#15803d}
.hover\:bg-indigo-500:hover{background-color:#6366f1}
.hover\:bg-orange-700:hover{background-color:#c2410c}
.hover\:bg-purple-700:hover{background-color:#7e22ce}
.hover\:bg-rose-700:hover{background-color:#be123c}
.hover\:bg-slate-700\/70:hover{background-color:rgba(51,65,85,0.7)}
.hover\:bg-teal-700:hover{background-color:#0f766e}
.hover\:bg-yellow-600:hover{background-color:#ca8a04}
.hover\:border-emerald-500\/30:hover{border-color:rgba(16,185,129,0.3)}
.hover\:text-emerald-400:hover{color:#34d399}
.hover\:text-white:hover{color:#fff}
.inline-block{display:inline-block}
.inset-0{inset:0}
.italic{font-style:italic}
.items-center{align-items:center}
.items-start{align-items:flex-start}
.justify-between{justify-content:space-between}
.justify-center{justify-content:center}
.leading-none{line-height:1}
.left-1\/2{left:50%}
.left-2{left:0.5rem}
.list-disc{list-style-type:disc}
.list-inside{list-style-position:inside}
.max-h-\[80vh\]{max-height:80vh}
.max-h-\[90vh\]{max-height:90vh}
.max-w-4xl{max-width:896px}
.max-w-5xl{max-width:1024px}
.max-w-none{max-width:none}
.max-w-screen-xl{max-width:1280px}
.mb-1{margin-bottom:0.25rem}
.mb-2{margin-bottom:0.5rem}
.mb-3{margin-bottom:0.75rem}
.mb-4{margin-bottom:1.0rem}
.mb-6{margin-bottom:1.5rem}
@media(min-width:900px){.md\:border-l{border-left:1px solid}}
@media(min-width:900px){.md\:border-t-0{border-top:0}}
@media(min-width:900px){.md\:flex-grow{flex-grow:1}}
@media(min-width:900px){.md\:flex-row{flex-direction:row}}
@media(min-width:900px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:900px){.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:900px){.md\:overflow-y-auto{overflow-y:auto}}
@media(min-width:900px){.md\:sticky{position:sticky}}
@media(min-width:900px){.md\:text-base{font-size:.92rem;line-height:1.45}}
@media(min-width:900px){.md\:text-sm{font-size:.82rem;line-height:1.45}}
@media(min-width:900px){.md\:top-0{top:0}}
@media(min-width:900px){.md\:w-\[30\%\]{width:30%}}
@media(min-width:900px){.md\:w-\[70\%\]{width:70%}}
.mt-1{margin-top:0.25rem}
.mt-2{margin-top:0.5rem}
.mt-3{margin-top:0.75rem}
.mt-4{margin-top:1.0rem}
.mx-auto{margin-left:auto;margin-right:auto}
.my-2{margin-top:0.5rem;margin-bottom:0.5rem}
.my-4{margin-top:1.0rem;margin-bottom:1.0rem}
.opacity-0{opacity:0}
.outline-none{outline:none}
.overflow-hidden{overflow:hidden}
.overflow-x-auto{overflow-x:auto}
.overflow-y-auto{overflow-y:auto}
.p-1{padding:0.25rem}
.p-2{padding:0.5rem}
.p-3{padding:0.75rem}
.p-4{padding:1.0rem}
.p-5{padding:1.25rem}
.p-6{padding:1.5rem}
.pb-0{padding-bottom:0.0rem}
.pb-1{padding-bottom:0.25rem}
.pb-2{padding-bottom:0.5rem}
.pb-3{padding-bottom:0.75rem}
.pb-4{padding-bottom:1.0rem}
.pl-2{padding-left:0.5rem}
.placeholder-slate-400::placeholder{color:#94a3b8}
.pr-2{padding-right:0.5rem}
.pt-2{padding-top:0.5rem}
.pt-4{padding-top:1.0rem}
.px-2{padding-left:0.5rem;padding-right:0.5rem}
.px-3{padding-left:0.75rem;padding-right:0.75rem}
.px-4{padding-left:1.0rem;padding-right:1.0rem}
.px-6{padding-left:1.5rem;padding-right:1.5rem}
.py-1{padding-top:0.25rem;padding-bottom:0.25rem}
.py-1\.5{padding-top:0.375rem;padding-bottom:0.375rem}
.py-2{padding-top:0.5rem;padding-bottom:0.5rem}
.py-4{padding-top:1.0rem;padding-bottom:1.0rem}
.relative{position:relative}
.right-2{right:0.5rem}
.right-4{right:1.0rem}
.rounded{border-radius:4px}
.rounded-full{border-radius:999px}
.rounded-lg{border-radius:11px}
.rounded-md{border-radius:7px}
.rounded-t-md{border-radius:7px 7px 0 0}
.rounded-xl{border-radius:14px}
.shadow-2xl{box-shadow:0 12px 30px #0004}
.shadow-lg{box-shadow:0 6px 16px #0003}
.shadow-sm{box-shadow:0 1px 3px #0002}
@media(min-width:640px){.sm\:flex-row{flex-direction:row}}
@media(min-width:640px){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:640px){.sm\:text-sm{font-size:.82rem;line-height:1.45}}
.space-y-1 > * + *{margin-top:0.25rem}
.space-y-2 > * + *{margin-top:0.5rem}
.space-y-3 > * + *{margin-top:0.75rem}
.space-y-4 > * + *{margin-top:1.0rem}
.sticky{position:sticky}
.text-3xl{font-size:1.8rem;line-height:1.45}
.text-\[10px\]{font-size:10px}
.text-amber-300{color:#fcd34d}
.text-amber-400{color:#fbbf24}
.text-amber-500{color:#f59e0b}
.text-base{font-size:.92rem;line-height:1.45}
.text-blue-400{color:#60a5fa}
.text-center{text-align:center}
.text-gray-300{color:#d1d5db}
.text-gray-400{color:#9ca3af}
.text-green-400{color:#4ade80}
.text-green-500{color:#22c55e}
.text-indigo-200{color:#c7d2fe}
.text-indigo-300{color:#a5b4fc}
.text-indigo-400{color:#818cf8}
.text-justify{text-align:justify}
.text-left{text-align:left}
.text-lg{font-size:1.08rem;line-height:1.45}
.text-orange-400{color:#fb923c}
.text-purple-300{color:#d8b4fe}
.text-red-400{color:#f87171}
.text-right{text-align:right}
.text-rose-200{color:#fecdd3}
.text-rose-300{color:#fda4af}
.text-rose-400{color:#fb7185}
.text-sky-300{color:#7dd3fc}
.text-sky-400{color:#38bdf8}
.text-slate-300{color:#cbd5e1}
.text-slate-400{color:#94a3b8}
.text-slate-500{color:#64748b}
.text-slate-600{color:#475569}
.text-sm{font-size:.82rem;line-height:1.45}
.text-white{color:#fff}
.text-xl{font-size:1.2rem;line-height:1.45}
.text-xs{font-size:.72rem;line-height:1.45}
.top-0{top:0}
.top-1\/2{top:50%}
.top-2{top:0.5rem}
.top-4{top:1.0rem}
.tracking-wider{letter-spacing:.05em}
.tracking-widest{letter-spacing:.1em}
.transition{transition:background-color .16s,color .16s}
.transition-colors{transition:background-color .16s,color .16s}
.transition-opacity{transition:opacity .2s}
.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.uppercase{text-transform:uppercase}
.w-1\/3{width:33.3333%}
.w-10{width:2.5rem}
.w-8{width:2.0rem}
.w-full{width:100%}
.whitespace-nowrap{white-space:nowrap}
.z-10{z-index:10}
.z-20{z-index:20}
.z-40{z-index:40}
.z-50{z-index:50}

body {
 font-family: 'Inter', sans-serif;
 background-color: #020617; /* Slate 950 */
 -webkit-font-smoothing: antialiased;
 -moz-osx-font-smoothing: grayscale;
}
/* Modern Scrollbar - Estilo Flotante y Limpio */
::-webkit-scrollbar { 
    width: 6px; /* Más fina (era 8px) */
    height: 6px;
}
::-webkit-scrollbar-track { 
    background: transparent; /* Fondo transparente: clave para que no se vea "caja" */
}
::-webkit-scrollbar-thumb { 
    background: #334155; /* Gris oscuro por defecto */
    border-radius: 10px; 
}
::-webkit-scrollbar-thumb:hover { 
    background: #4f46e5; /* Indigo al pasar el ratón */
}
/* Para Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}
 
.control-panel {
 background-color: rgba(15, 23, 42, 0.8); /* Slate 900 con transparencia */
 backdrop-filter: blur(8px);
}

.checkbox-label { position: relative; cursor: pointer; user-select: none; padding-left: 30px; display: inline-flex; align-items: center; min-height: 24px; transition: color 0.3s; }
.checkbox-label input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkmark { position: absolute; top: 2px; left: 0; height: 20px; width: 20px; background-color: #334155; border: 1px solid #475569; border-radius: 4px; transition: background-color 0.2s; }
.checkbox-label:hover input ~ .checkmark { background-color: #475569; }
.checkbox-label input:checked ~ .checkmark { background-color: #4f46e5; border-color: #4f46e5; }
.checkmark:after { content: ""; position: absolute; display: none; left: 6px; top: 2px; width: 5px; height: 10px; border: solid white; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.checkbox-label input:checked ~ .checkmark:after { display: block; }
 
input[type="range"] {
 -webkit-appearance: none; appearance: none;
 width: 100%; height: 8px;
 background: #334155; border-radius: 5px; outline: none;
}
input[type="range"]::-webkit-slider-thumb {
 -webkit-appearance: none; appearance: none;
 width: 20px; height: 20px;
 background: #a5b4fc; cursor: pointer; border-radius: 50%;
 border: 2px solid #4f46e5;
}
input[type="range"]:disabled::-webkit-slider-thumb {
 background: #475569;
 cursor: not-allowed;
}
.disabled-group {
 opacity: 0.5;
 pointer-events: none;
}
.hidden-group {
 transition: opacity 0.3s, max-height 0.3s, padding 0.3s, margin 0.3s;
 overflow: hidden;
 opacity: 0;
 max-height: 0;
 padding-top: 0;
 padding-bottom: 0;
 margin-top: 0;
 margin-bottom: 0;
}
.tab-button { transition: background-color 0.2s, color 0.2s; }
.tab-button.active { background-color: #4f46e5; color: #e2e8f0; }
 
.popup-box { transition: opacity 0.3s, transform 0.3s; }
.popup-box.scale-95 { transform: translate(-50%, -50%) scale(0.95); }

.slider-control button {
 background-color: #475569;
 width: 32px;
 height: 32px;
 font-size: 1.25rem;
 line-height: 1.75rem;
 border-radius: 0.25rem;
}
.slider-control button:hover {
 background-color: #64748b;
}
#data-table table {
 width: 100%;
 border-collapse: collapse;
 font-size: 0.8rem;
}
#data-table th, #data-table td {
 padding: 8px 4px;
 text-align: center;
 border: 1px solid #334155;
}
#data-table th {
 background-color: #1e293b;
 color: #94a3b8;
}
#data-table tr > td:first-child {
 font-weight: bold;
 text-align: left;
 background-color: #1e293b;
 padding-left: 8px;
}
#data-table tbody tr:nth-child(even) {
 background-color: #0f172a;
}
.graph-container {
 height: 250px; /* Default height for desktop */
}
@media (max-width: 768px) {
 .graph-container {
 height: 320px; /* Taller height for mobile */
 }
}
.energy-bar-container {
 background-color: #334155;
}
.energy-bar {
 transition: width 0.1s linear;
 text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}
.formula-wrapper {
 overflow-x: auto;
 background-color: rgba(0,0,0,0.2);
 padding: 0.5rem;
 border-radius: 5px;
 margin-top: 0.5rem;
 margin-bottom: 0.5rem;
}
 
/* Instrumentos compactos, accesibles y con estados coherentes. */
button,input,select{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled,input:disabled,select:disabled{cursor:not-allowed;opacity:.5}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #93c5fd;outline-offset:3px}
button{border:0}button:hover{filter:brightness(1.08)}input[type=checkbox]{accent-color:#6366f1}
#control-panel-container{padding:12px;line-height:1.4;font-size:13px}
#control-panel-container h3{font-size:12px;letter-spacing:.025em}
#control-panel-container .space-y-4>*+*{margin-top:10px}
#control-panel-container .p-3{padding:10px}
#control-panel-container .mb-4{margin-bottom:10px}
#control-panel-container .mt-4{margin-top:10px}
#control-panel-container .space-y-3>*+*{margin-top:9px}
#control-panel-container button{min-height:30px}
.mode-tab{font-size:12px!important;padding:7px 3px;min-width:0}
#control-panel-container .grid.gap-3{gap:6px}
.slider-control{display:flex;gap:5px;margin-top:5px;min-width:0}
.slider-control input[type=range]{flex:1;min-width:20px;width:0;height:5px}
.slider-control button{width:25px;min-width:25px;height:27px;min-height:27px!important;font-size:20px;line-height:1}
input[type=range]{height:5px;touch-action:pan-y}
input[type=range]::-webkit-slider-thumb{width:16px;height:16px}
input[type=range]::-moz-range-thumb{width:14px;height:14px;border:1px solid #6366f1;border-radius:50%;background:#a5b4fc}
.aq-number-input,#rho-input,#aq-target-x{width:65px;min-width:0;background:#0f172a;border:1px solid #475569;border-radius:5px;padding:4px 5px;color:#f1f5f9;font-size:12px;font-variant-numeric:tabular-nums}
#rho-input{width:80px;margin:0 4px}#aq-target-x{margin:5px 0;width:100%}
.checkbox-label{font-size:11px!important;line-height:1.35;min-height:27px;padding-left:24px}
.checkmark{height:17px;width:17px;top:5px}.checkmark:after{left:5px;top:2px;width:4px;height:8px;border-width:0 2px 2px 0}
#viz-container>.grid{column-gap:8px;row-gap:2px}
.hidden-group{display:none!important}.hidden,[hidden]{display:none!important}
#aq-audio-controls{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 2px}
#aq-audio-controls button,#aq-chart-dialog button,.aq-chart-heading button{background:#334155;color:#e2e8f0;border:1px solid #475569;border-radius:6px;padding:6px 10px;font-size:12px}
#aq-target-controls{padding:10px;background:#1e293b80;border:1px solid #334155;border-radius:9px}
.aq-control-note{font-size:10px;color:#94a3b8;line-height:1.5;margin:4px 0}
#user-profile-container{display:flex;justify-content:space-between;gap:8px;padding:8px;border-bottom:1px solid #334155}#user-profile-container small{color:#818cf8}
#info-hud{padding:9px 8px;gap:7px;box-shadow:none;font-variant-numeric:tabular-nums}
#info-hud span:first-child{font-size:10px;font-weight:600}#info-hud span:last-child{font-size:13px}
#aq-live-instruments{display:flex;gap:10px;align-items:center;justify-content:space-between;min-width:0;padding:0 3px;font-size:11px}
#aq-hud-velocity{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;color:#94a3b8}#aq-hud-velocity output{color:#e2e8f0;font-family:ui-monospace,monospace}
#aq-hud-state{border:1px solid #334155;border-radius:20px;padding:4px 9px;color:#a5b4fc;white-space:nowrap;font-size:10px}
#energy-container{padding:10px}#energy-container>.space-y-2{display:grid;grid-template-columns:1fr 1.6fr;gap:6px 10px;align-items:center}#energy-container .space-y-2>*+*{margin-top:0}
#data-table-container{min-width:0}#data-table{max-width:100%}#data-table th,#data-table td{padding:5px 6px;white-space:nowrap;font-size:11px}
#data-table th:first-child,#data-table td:first-child{position:sticky;left:0;background:#1e293b;z-index:1}
.popup-box{width:calc(100% - 24px);padding:18px;max-height:90dvh;box-shadow:0 25px 90px #0008}
#guidePopupBox>div:first-of-type{margin:-18px -18px 14px;padding:10px 44px 0 12px;overflow-x:auto}
.guide-tab-button{padding:9px 8px;font-size:11px;white-space:nowrap}
#guidePopupCloseBtn{top:12px;right:12px}
#guide-popup-content,#teacher-panel-content{line-height:1.65;overflow-wrap:anywhere}
#guide-popup-content h3,#guide-popup-content h4{color:#7dd3fc}#guide-popup-content p{margin:8px 0}#guide-popup-content ul,#teacher-panel-content ul{padding-left:18px}
#graphsPopupBox h2{font-size:16px;padding-right:12px}#graphsPopupBox>.grid{gap:12px;min-height:0}
.aq-chart-card{background:#0f172a;border:1px solid #334155;border-radius:10px;padding:10px;min-width:0}
.aq-chart-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-shrink:0;margin-bottom:8px}
.aq-chart-heading h3{font-size:12px;color:#cbd5e1;margin:0}.aq-chart-heading h2{font-size:16px;margin:0}
.aq-chart-heading button{white-space:nowrap;font-size:10px;padding:5px 7px}
.graph-container{height:245px;position:relative;width:100%}
#aq-chart-dialog{padding:20px;width:min(1200px,calc(100vw - 24px));max-width:none;height:min(780px,90dvh);max-height:94dvh;background:#0f172a;color:#e2e8f0;border:1px solid #475569;border-radius:14px;box-shadow:0 25px 90px #0009;overflow:hidden}
#aq-chart-dialog[open]{display:flex;flex-direction:column}#aq-chart-dialog::backdrop{background:#020617cc;backdrop-filter:blur(5px)}
.aq-expanded-chart{flex:1;min-height:0;position:relative}.aq-watermark{font-size:10px;color:#64748b;text-align:center;margin:12px 0 0}
.aq-runtime-hidden{display:none!important}.aq-white-label{display:none!important}
.aq-ghost-mode{opacity:.38!important;outline:2px dashed #f87171!important;outline-offset:2px}
.aq-builder-focus{outline:3px solid #60a5fa!important;outline-offset:3px;box-shadow:0 0 0 5px #60a5fa40!important}
#aq-canvas-visibility{position:absolute;bottom:7px;right:7px;display:flex;flex-direction:column;align-items:flex-end;gap:3px;pointer-events:none;max-width:80%}
#aq-canvas-visibility span{font-size:10px;padding:3px 6px;background:#020617ee;border-radius:4px;color:#fecaca;opacity:1!important;outline:none!important;border:1px dashed #f87171}
@media(max-width:899px){#control-panel-container{position:static;max-height:none;border:1px solid #1e293b;border-radius:12px}#control-panel-container>.flex:first-of-type{position:sticky;top:0;z-index:5}#control-panel-container .flex-grow{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#control-panel-container .flex-grow>*{margin:0}#data-table-container,#viz-container,#aq-audio-controls{grid-column:1/-1}}
@media(max-width:540px){#control-panel-container .flex-grow{display:flex;flex-direction:column;gap:10px}#info-hud{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}#info-hud span:last-child{font-size:10px}#info-hud span:first-child{font-size:9px}#aq-hud-velocity{gap:3px 7px;font-size:10px}#aq-live-instruments{gap:4px}.popup-box{padding:12px}#graphsPopupBox>.grid{display:flex;flex-direction:column;overflow-y:auto}#graphsPopupBox{max-height:92dvh}#aq-chart-dialog{padding:12px;height:82dvh}.aq-chart-heading{align-items:flex-start}.aq-chart-heading h2{font-size:13px}.aq-chart-heading>div{display:flex;gap:6px}#guidePopupBox>div:first-of-type{margin:-12px -12px 12px;padding-right:40px}#energy-container>.space-y-2{grid-template-columns:1fr 1fr}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

button{background-color:transparent;color:inherit}#aq-zoom-controls svg{width:17px;height:17px;display:block;margin:auto}#aq-target-controls label{display:block}#rho-input{margin-left:4px}#aq-lab-heading h1{margin-top:3px}

/* Tabla apaisada: un lanzamiento por fila, scroll local horizontal. */
#data-table{overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
#data-table .aq-launch-table{width:max-content;min-width:100%;table-layout:auto;font-size:11px;border-collapse:separate;border-spacing:0}
#data-table .aq-launch-table th,#data-table .aq-launch-table td{padding:8px 10px;min-width:90px;white-space:nowrap;text-align:center;border:0;border-bottom:1px solid #26354c}
#data-table .aq-launch-table thead th{position:sticky;top:0;background:#1e293b;color:#a5b4fc;font-size:10px;z-index:2}
#data-table .aq-launch-table tr>th:first-child{position:sticky;left:0;min-width:65px;background:#1e293b;color:#e2e8f0;z-index:3}
#data-table .aq-launch-table tbody tr:nth-child(even){background:#101a2d}
#user-profile-container{padding:4px 0 10px;gap:5px}
#user-profile-container .aq-profile-link{display:flex;align-items:center;gap:8px;min-width:0;color:#e2e8f0}
#user-profile-container .aq-profile-link img{height:34px;width:34px;flex-shrink:0;object-fit:cover;border-radius:50%;border:1px solid #475569}
#user-profile-container .aq-profile-details{display:flex;flex-direction:column;min-width:0;line-height:1.25}
#user-profile-container .aq-profile-details strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#user-profile-container .aq-profile-details small{font-size:9px}
/* Ecuaciones: conservar todos los desarrollos, reducir tamaños y espacios. */
#teacher-panel{padding:12px!important;margin-top:8px!important}
#teacher-panel>h3{font-size:15px;line-height:1.3;margin:8px 0!important}
#teacher-panel-content{font-size:12px;line-height:1.48;max-width:100%}
#teacher-panel-content h3,#teacher-panel-content h4{font-size:14px!important;line-height:1.35;margin:6px 0}
#teacher-panel-content h5{font-size:12px!important}
#teacher-panel-content p{margin:5px 0}
#teacher-panel-content .p-4{padding:9px}
#teacher-panel-content .space-y-4>*+*{margin-top:9px}
#teacher-panel-content .gap-4{gap:9px}
#teacher-panel-content mjx-container[display="true"]{font-size:86%!important;max-width:100%;overflow-x:auto;overflow-y:hidden;padding:4px 0;margin:6px 0!important}
#teacher-panel-content .text-lg{font-size:13px}
#instant-calculator{font-size:12px}#instant-calculator input{min-width:0}

/* Perfil: accesos compactos junto al avatar. */
#user-profile-container{align-items:center}
#user-profile-container .aq-profile-link{flex:1;min-width:0}
#user-profile-container .aq-profile-actions{display:flex;gap:5px;flex-shrink:0}
#user-profile-container .aq-profile-actions a{width:30px;height:30px;display:grid;place-items:center;border-radius:7px;border:1px solid #334155;background:#17223a;color:#b7c7dd}
#user-profile-container .aq-profile-actions a:hover{color:white;border-color:#64748b}
#user-profile-container .aq-profile-actions svg{width:16px;height:16px}
/* Historial experimental: cabecera compacta y descarga secundaria. */
#data-table-container{padding:9px!important;gap:7px!important}
#data-table-container>div:first-child{gap:7px;align-items:center}
#data-table-container h3{font-size:11px!important;line-height:1.3;flex:1}
#download-csv-btn{flex-shrink:0;font-size:10px!important;font-weight:600!important;padding:6px 8px!important;border-radius:6px!important;background:#146c72!important;white-space:nowrap;line-height:1.15}
#data-table .aq-launch-table th,#data-table .aq-launch-table td{padding:6px 8px;min-width:78px;font-size:10px}

/* HUD unificado: lectura de velocidad dentro de la quinta celda.
   Conserva los IDs de vₓ, vᵧ y |v| para la ocultación independiente del Builder. */
#info-hud{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) minmax(270px,1.3fr);align-items:center;gap:5px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
#info-hud > div{min-width:0}
#info-hud .aq-hud-velocity-cell{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:255px}
#info-hud .aq-velocity-heading{font-size:10px;font-weight:700;color:#a5b4fc;line-height:1.2}
#info-hud .aq-velocity-values{display:flex;align-items:center;justify-content:center;flex-wrap:nowrap;gap:5px 9px;width:100%}
#info-hud #aq-hud-velocity .aq-velocity-reading{display:inline-flex;align-items:baseline;gap:3px;white-space:nowrap;font-size:10px;color:#94a3b8;flex-shrink:0}
#info-hud #aq-hud-velocity .aq-velocity-reading > span{font-size:10px;color:#94a3b8}
#info-hud #aq-hud-velocity output{font-size:11px;color:#f1f5f9;font-weight:600;font-variant-numeric:tabular-nums}
#aq-live-instruments{justify-content:flex-end;min-height:17px;padding-right:4px}
@media(max-width:1050px){#info-hud{grid-template-columns:repeat(4,minmax(100px,1fr)) minmax(255px,1.3fr)}#info-hud > div{min-width:100px}}
@media(max-width:540px){#info-hud{grid-template-columns:repeat(4,108px) 246px;gap:5px;padding:7px 6px}#info-hud > div{min-width:0}#info-hud .aq-hud-velocity-cell{min-width:246px}#info-hud .aq-velocity-values{gap:5px}#info-hud #aq-hud-velocity output{font-size:10px}}
