/* Fuentes del sistema con fallbacks — sin petición de red */
@font-face {
  font-family: 'Rajdhani';
  src: local('Rajdhani'), local('Arial Narrow'), local('Impact');
  font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: local('Space Mono'), local('Courier New'), local('monospace');
  font-display: swap;
}
@font-face {
  font-family: 'Exo 2';
  src: local('Exo 2'), local('Segoe UI'), local('Helvetica Neue'), local('Arial');
  font-display: swap;
}

/* ══════════════════════════════════════════════════════
   VGAMER — Estilos originales
══════════════════════════════════════════════════════ */
.laser-cursor {
  position: fixed; width: 30px; height: 30px;
  border: 3px solid #39ff14; border-radius: 50%;
  pointer-events: none; z-index: 9999;
  box-shadow: 0 0 18px #39ff14, 0 0 35px #39ff14;
  transition: transform 0.12s ease; mix-blend-mode: difference;
}
.laser-cursor.selecting {
  background: #ff00ff; border-color: #ff00ff;
  box-shadow: 0 0 45px #ff00ff, 0 0 90px #ff00ff;
  transform: scale(1.65);
}
.word {
  cursor: none; transition: transform 0.25s ease, color 0.2s, background 0.2s;
  padding: 4px 8px; border-radius: 8px; display: inline-block;
  color: #d4d4d8;
}
.word:hover {
  background: rgba(57,255,20,0.3);
  color: #39ff14; text-shadow: 0 0 22px #39ff14;
  transform: scale(1.1);
}
.word.harvested { color: rgba(57,255,20,0.35); background: rgba(57,255,20,0.06); text-decoration: line-through; }

/* flask-shell definido en bloque .aj-sidebar arriba */
.flask-shell {
  background: linear-gradient(to bottom, rgba(255,255,255,.08), rgba(255,255,255,.02));
  border: 2px solid rgba(57,255,20,.4);
  box-shadow: 0 0 60px rgba(57,255,20,.25);
}
.flask-shell::before {
  content: ""; position: absolute; top: 0; left: -40%; width: 80px; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,.18), transparent);
  transform: skewX(-12deg); animation: glassMove 7s linear infinite;
}
@keyframes glassMove { from { left: -40% } to { left: 140% } }
.liquid {
  position: absolute; bottom: 0; left: 0; width: 100%; height: 38%;
  background: linear-gradient(to top, rgba(57,255,20,.65), rgba(57,255,20,.18));
  filter: blur(0.8px); animation: liquidPulse 5s ease-in-out infinite;
}
@keyframes liquidPulse { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }
.bubble {
  position: absolute; bottom: -40px; border-radius: 999px;
  background: rgba(255,255,255,.25); backdrop-filter: blur(4px);
  animation: rise linear infinite;
}
@keyframes rise {
  from { transform: translateY(0) scale(1); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-720px) scale(1.6); opacity: 0; }
}
.energy-core {
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(57,255,20,.18), transparent 60%);
  animation: pulseCore 4s ease-in-out infinite;
}
@keyframes pulseCore { 0%,100% { opacity: .45; transform: scale(1) } 50% { opacity: .8; transform: scale(1.1) } }
.flask-title {
  position: absolute; top: 35px; width: 100%; text-align: center;
  color: #39ff14; font-size: 32px; font-weight: bold; text-shadow: 0 0 15px #39ff14;
}
.flask-subtitle { position: absolute; top: 78px; width: 100%; text-align: center; color: #a1a1aa; font-size: 13px; }
.gems {
  position: absolute; inset: 130px 20px 100px 20px;
  overflow-y: auto; padding-right: 8px;
  line-height: 1.8; word-break: break-word;
}
.gem { display: inline; color: rgba(182,240,0,0.9); font-size: 1rem; }
.gem::after { content: ' '; }

/* Cajones compartidos */
/* Overlay — dimming via filter en el contenedor, sin capa suelta */
#drawer-overlay {
  position: fixed; inset: 0; background: transparent;
  pointer-events: none; z-index: 998;
}
#drawer-overlay.active { pointer-events: all; }

/* Cuando hay drawer abierto, el fondo se oscurece con filter, no con capa */
#vgamer.drawer-open > *:not(.drawer-shell):not(#drawer-overlay):not(#laser):not(.mag-tab) {
  filter: brightness(0.38);
  transition: filter 0.32s ease;
}
#vgamer > *:not(.drawer-shell):not(#drawer-overlay):not(#laser):not(.mag-tab) {
  transition: filter 0.32s ease;
}

.drawer-shell {
  position: fixed; top: 0; height: 100vh; width: 400px;
  background: rgba(10,10,10,0.97);
  z-index: 1000;
  transition: transform 0.38s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; overflow: hidden;isolation: isolate;
  pointer-events: all !important;
}
#audio-drawer { right: 0; transform: translateX(100%); border-left: 1.5px solid rgba(57,255,20,0.3); box-shadow: -10px 0 60px rgba(57,255,20,0.12); }
#audio-drawer.open { transform: translateX(0); }
#tools-drawer { left: 0; transform: translateX(-100%); border-right: 1.5px solid rgba(255,160,0,0.3); box-shadow: 10px 0 60px rgba(255,160,0,0.1); }
#tools-drawer.open { transform: translateX(0); }
#wellness-drawer { left: 0; transform: translateX(-100%); border-right: 1.5px solid rgba(0,220,255,0.3); box-shadow: 10px 0 60px rgba(0,220,255,0.1); }
#wellness-drawer.open { transform: translateX(0); }

.drawer-header { padding: 24px 24px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.drawer-header h2 { font-size: 18px; font-weight: bold; margin: 0; }
.dh-green h2 { color: #39ff14; text-shadow: 0 0 10px rgba(57,255,20,0.5); }
.dh-amber h2 { color: #ffa500; text-shadow: 0 0 10px rgba(255,165,0,0.5); }
.dh-cyan h2 { color: #00dcff; text-shadow: 0 0 10px rgba(0,220,255,0.5); }
.dh-lime h2 { color: #b6f000; text-shadow: 0 0 10px rgba(182,240,0,0.5); }
.drawer-close { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.15); background: transparent; color: #a1a1aa; display: flex; align-items: center; justify-content: center; cursor: none; transition: all 0.2s; font-size: 14px; }
.drawer-close:hover { border-color: #ff4444; color: #ff4444; }
.drawer-tabs { display: flex; padding: 12px 24px 0; gap: 8px; flex-shrink: 0; }
.dtab { padding: 8px 16px; border-radius: 20px; font-size: 11px; font-weight: 600; cursor: none; border: 1.5px solid rgba(255,255,255,0.1); background: transparent; color: #a1a1aa; transition: all 0.2s; letter-spacing: 0.05em; }
.dtab-green.active { border-color: #39ff14; color: #39ff14; background: rgba(57,255,20,0.1); }
.dtab-amber.active { border-color: #ffa500; color: #ffa500; background: rgba(255,165,0,0.1); }
.dtab-cyan.active { border-color: #00dcff; color: #00dcff; background: rgba(0,220,255,0.1); }
.dtab-lime.active { border-color: #b6f000; color: #b6f000; background: rgba(182,240,0,0.1); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.dpanel { display: none; flex-direction: column; gap: 14px; }
.dpanel.active { display: flex; }
.dsection-label { font-size: 10px; font-weight: 600; color: #52525b; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 2px; }

/* Lengüetas */
.mag-tab {
  position: fixed;
  z-index: 1001; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  width: 28px; padding: 18px 0;
  background: #0e0e0e;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: none; transition: all 0.3s cubic-bezier(.4,0,.2,1);
  isolation: isolate;
}
.mag-tab i { font-size: 14px; transition: transform 0.3s ease; }
.mag-tab svg.aj-icon { width: 18px; height: 18px; transition: transform 0.3s ease; display: block; margin: 0 auto; }
.mag-tab:hover svg.aj-icon { transform: scale(1.15); }
.mag-tab .tab-icon { font-size: 16px; line-height: 1; display: block; text-align: center; transition: transform 0.3s ease; }
.mag-tab:hover .tab-icon { transform: scale(1.2); }
.mag-tab .tab-label { writing-mode: vertical-rl; text-orientation: mixed; font-size: 9px; color: #a1a1aa; letter-spacing: 0.12em; text-transform: uppercase; user-select: none; }
#tab-audio { right: 0; top: calc(50% - 84px); transform: none; border: 1px solid rgba(57,255,20,0.35); border-right: none; border-radius: 14px 0 0 14px; box-shadow: -4px 0 20px rgba(57,255,20,0.15); }
#tab-audio i { color: #39ff14; }
#tab-audio:hover, #tab-audio.peek { width: 36px; box-shadow: -6px 0 30px rgba(57,255,20,0.3); border-color: rgba(57,255,20,0.7); }
#tab-tools { left: 0; top: calc(50% - 84px); transform: none; border: 1px solid rgba(255,160,0,0.35); border-left: none; border-radius: 0 14px 14px 0; box-shadow: 4px 0 20px rgba(255,160,0,0.15); }
#tab-tools i { color: #ffa500; }
#tab-tools:hover, #tab-tools.peek { width: 36px; box-shadow: 6px 0 30px rgba(255,160,0,0.3); border-color: rgba(255,160,0,0.7); }
#tab-wellness { left: 0; top: calc(50% + 20px); transform: none; border: 1px solid rgba(0,220,255,0.35); border-left: none; border-radius: 0 14px 14px 0; box-shadow: 4px 0 20px rgba(0,220,255,0.15); }
#tab-wellness i { color: #00dcff; }
#tab-wellness:hover, #tab-wellness.peek { width: 36px; box-shadow: 6px 0 30px rgba(0,220,255,0.3); border-color: rgba(0,220,255,0.7); }
#tab-wellness.alert-pulse { animation: wellnessPulse 1.8s ease-in-out infinite; }
@keyframes wellnessPulse { 0%,100% { box-shadow: 4px 0 20px rgba(0,220,255,0.15); } 50% { box-shadow: 4px 0 35px rgba(0,220,255,0.6); } }

/* Lengüeta accesibilidad — izquierda, tercera posición */
#tab-a11y {
  left: 0; top: calc(50% + 124px); transform: none;
  border: 1px solid rgba(255,220,0,0.35); border-left: none;
  border-radius: 0 14px 14px 0;
  box-shadow: 4px 0 20px rgba(255,220,0,0.12);
}
#tab-a11y i { color: #ffd700; }
#tab-a11y:hover { width: 36px; box-shadow: 6px 0 30px rgba(255,220,0,0.3); border-color: rgba(255,220,0,0.8); }
#tab-a11y.on { background: rgba(255,220,0,0.12); border-color: rgba(255,220,0,0.6); }

/* Zen tab — derecha, mismo gap que audio↔mediapipe en la derecha */
#tab-zen {
  right: 0; top: calc(50% - 188px); transform: none;
  border: 1px solid rgba(182,240,0,0.35); border-right: none;
  border-radius: 14px 0 0 14px; box-shadow: -4px 0 20px rgba(182,240,0,0.15);
}
#tab-zen i { color: #b6f000; }
#tab-zen:hover { width: 36px; box-shadow: -6px 0 30px rgba(182,240,0,0.3); border-color: rgba(182,240,0,0.7); }

/* Componentes compartidos */
.vol-slider { width: 100%; -webkit-appearance: none; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.12); outline: none; cursor: none; }
.vol-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #39ff14; cursor: none; box-shadow: 0 0 8px rgba(57,255,20,0.6); }
.ambient-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.amb-btn { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 4px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); cursor: none; transition: all 0.2s; font-size: 10px; color: #71717a; }
.amb-btn:hover { border-color: rgba(57,255,20,0.4); color: #39ff14; background: rgba(57,255,20,0.07); }
.amb-btn.active { border-color: #39ff14; color: #39ff14; background: rgba(57,255,20,0.15); box-shadow: 0 0 14px rgba(57,255,20,0.2); }
.audio-master-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); }
.audio-toggle-btn { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; cursor: none; transition: all 0.2s; color: white; font-size: 16px; flex-shrink: 0; }
.audio-toggle-btn.playing { border-color: #39ff14; color: #39ff14; background: rgba(57,255,20,0.15); box-shadow: 0 0 18px rgba(57,255,20,0.35); }
.vol-wrap { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.vol-label { font-size: 11px; color: #71717a; display: flex; justify-content: space-between; }
.row-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); }
.row-toggle-info p { margin: 0; font-size: 13px; color: #d4d4d8; }
.row-toggle-info span { font-size: 11px; color: #71717a; }
.toggle-switch { width: 44px; height: 24px; border-radius: 999px; background: rgba(255,255,255,0.15); position: relative; cursor: none; border: none; transition: background 0.2s; flex-shrink: 0; }
.toggle-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: white; transition: transform 0.2s; }
.toggle-switch.on { background: #39ff14; }
.toggle-switch.on::after { transform: translateX(20px); }
.audio-status { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 0.5px solid rgba(255,255,255,0.07); font-size: 11px; color: #71717a; }
.dot-live { width: 6px; height: 6px; border-radius: 50%; background: #39ff14; display: none; flex-shrink: 0; animation: blinkDot 1.2s ease-in-out infinite; }
.dot-yt { width: 6px; height: 6px; border-radius: 50%; background: #50c8b4; display: none; flex-shrink: 0; animation: blinkDot 1.2s ease-in-out infinite; }
.dot-amber { width: 6px; height: 6px; border-radius: 50%; background: #ffa500; display: none; flex-shrink: 0; animation: blinkDot 1.2s ease-in-out infinite; }
@keyframes blinkDot { 0%,100% { opacity: 1 } 50% { opacity: 0.15 } }
.yt-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.yt-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; border-radius: 16px; border: 1.5px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); cursor: none; transition: all 0.2s; font-size: 22px; color: #a1a1aa; }
.yt-btn span { font-size: 11px; color: #71717a; }
.yt-btn:hover { border-color: rgba(80,200,180,0.5); color: white; background: rgba(80,200,180,0.08); }
.yt-btn.playing { border-color: #50c8b4; color: white; background: rgba(80,200,180,0.15); box-shadow: 0 0 16px rgba(80,200,180,0.2); }
.tool-btn { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.03); cursor: none; transition: all 0.2s; text-align: left; width: 100%; color: white; }
.tool-btn:hover { border-color: rgba(255,160,0,0.4); background: rgba(255,160,0,0.07); }
.tool-btn:active { transform: scale(0.98); }
.tool-btn .tb-icon { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.tool-btn .tb-info p { margin: 0; font-size: 13px; color: #d4d4d8; }
.tool-btn .tb-info span { font-size: 11px; color: #71717a; }
.tb-green .tb-icon { background: rgba(57,255,20,0.12); }
.tb-amber .tb-icon { background: rgba(255,165,0,0.12); }
.tb-cyan .tb-icon { background: rgba(0,220,255,0.12); }
.tb-pink .tb-icon { background: rgba(255,80,180,0.12); }
.emergency-btn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; border-radius: 18px; width: 100%; background: rgba(255,40,40,0.15); border: 2px solid rgba(255,60,60,0.5); cursor: none; transition: all 0.2s; font-size: 16px; font-weight: bold; color: #ff6060; animation: emergencePulse 3s ease-in-out infinite; }
.emergency-btn:hover { background: rgba(255,40,40,0.3); border-color: #ff4040; box-shadow: 0 0 30px rgba(255,40,40,0.3); animation: none; }
@keyframes emergencePulse { 0%,100% { box-shadow: 0 0 10px rgba(255,40,40,0.2) } 50% { box-shadow: 0 0 25px rgba(255,40,40,0.4) } }
.file-drop { border: 2px dashed rgba(255,160,0,0.3); border-radius: 16px; padding: 20px; text-align: center; cursor: none; transition: all 0.2s; color: #71717a; font-size: 13px; }
.file-drop:hover { border-color: rgba(255,160,0,0.7); color: #ffa500; background: rgba(255,160,0,0.05); }
.file-drop.dragover { border-color: #ffa500; background: rgba(255,160,0,0.1); }
.lang-select { width: 100%; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: white; font-size: 13px; cursor: none; outline: none; }
.lang-select option { background: #1a1a1a; }
.config-input { width: 100%; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: white; font-size: 13px; outline: none; transition: border-color 0.2s; }
.config-input:focus { border-color: rgba(255,160,0,0.5); }
.config-input::placeholder { color: #52525b; }
.mic-btn.listening { border-color: #ff4080 !important; color: #ff4080 !important; background: rgba(255,64,128,0.15) !important; animation: micPulse 1s ease-in-out infinite; }
@keyframes micPulse { 0%,100% { box-shadow: 0 0 10px rgba(255,64,128,0.3) } 50% { box-shadow: 0 0 25px rgba(255,64,128,0.6) } }
body.a11y-mode { font-size: 120% !important; }
body.a11y-mode .word { padding: 8px 14px !important; font-size: 1.15em !important; }
body.a11y-mode .gem { padding: 20px 24px !important; font-size: 1.1em !important; }
body.a11y-mode * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }

/* ══ ZONA SUPERIOR — barra compacta ══ */
#input-bar {
  display: flex; align-items: stretch; gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(57,255,20,0.18);
  border-radius: 20px;
  margin-bottom: 14px;
}
#paste-area {
  flex: 1; background: transparent; border: none; outline: none;
  color: #d4d4d8; font-size: 0.95rem; font-family: 'Exo 2', sans-serif;
  resize: none; min-height: 52px; max-height: 140px;
  line-height: 1.5; padding: 6px 4px;
}
#paste-area::placeholder { color: #3f3f46; font-style: italic; }

/* Botones barra superior */
.bar-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 8px 12px; border-radius: 14px; border: 1px solid transparent;
  background: transparent; cursor: none; transition: all 0.2s; flex-shrink: 0;
  font-size: 10px; color: #71717a; letter-spacing: 0.06em;
}
.bar-btn:hover { background: rgba(255,255,255,0.06); }
.bar-btn svg, .bar-btn i { font-size: 18px; }

/* Mic latiendo */
#btn-mic-vgamer {
  border-color: rgba(255,64,128,0.3);
  color: #ff4080;
}
#btn-mic-vgamer i { color: #ff4080; font-size: 20px; }
#btn-mic-vgamer:hover { background: rgba(255,64,128,0.1); border-color: rgba(255,64,128,0.7); }
#btn-mic-vgamer.listening {
  border-color: #ff4080;
  background: rgba(255,64,128,0.15);
  animation: micTabPulse 1s ease-in-out infinite;
}
#btn-mic-vgamer.listening i { animation: micBeat 0.8s ease-in-out infinite; }
@keyframes micBeat {
  0%,100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.3); opacity: 0.7; filter: drop-shadow(0 0 8px #ff4080); }
}
@keyframes micTabPulse {
  0%,100% { box-shadow: 0 0 8px rgba(255,64,128,0.2); }
  50%      { box-shadow: 0 0 22px rgba(255,64,128,0.6); }
}

/* Btn cargar */
#btn-cargar-vgamer {
  border-color: rgba(57,255,20,0.3); color: #39ff14;
  min-width: 56px;
}
#btn-cargar-vgamer i { color: #39ff14; font-size: 18px; }
#btn-cargar-vgamer:hover { background: rgba(57,255,20,0.1); border-color: #39ff14; }

/* Btn guardar dictado */
#btn-save-dictado {
  border-color: rgba(0,220,255,0.25); color: #00dcff;
  display: none;
}
#btn-save-dictado.visible { display: flex; }
#btn-save-dictado i { color: #00dcff; font-size: 16px; }

/* Speech2 textarea feedback */
#speech2-feedback {
  font-size: 11px; color: #52525b; padding: 2px 6px;
  font-style: italic; min-height: 16px; transition: color 0.2s;
}
#speech2-feedback.active { color: #ff4080; }

/* ══ PANEL GEMINI CENTRAL ══ */
#gemini-central {
  display: none;
  position: relative;
  background: rgba(10,10,18,0.97);
  border: 1px solid rgba(57,255,20,0.25);
  border-radius: 20px;
  padding: 20px 24px;
  margin-top: 14px;
  animation: geminiSlideIn 0.3s cubic-bezier(.4,0,.2,1);
}
#gemini-central.visible { display: block; }
@keyframes geminiSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.gemini-central-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.gemini-central-title {
  font-family: 'Rajdhani', sans-serif; font-size: 13px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase; color: #52525b;
  display: flex; align-items: center; gap: 8px;
}
.gemini-central-title span { color: #39ff14; }
#gemini-central-output {
  font-size: 1rem; line-height: 1.75; color: #d4d4d8;
  font-family: 'Exo 2', sans-serif; font-weight: 300;
  min-height: 60px; white-space: pre-wrap;
}
#gemini-central-output .thinking {
  display: flex; align-items: center; gap: 6px; color: #52525b; font-style: italic; font-size: 0.9rem;
}
#gemini-central-output .thinking span {
  width: 6px; height: 6px; border-radius: 50%; background: #39ff14;
  animation: thinkDot 1.2s ease-in-out infinite;
}
#gemini-central-output .thinking span:nth-child(2) { animation-delay: 0.2s; }
#gemini-central-output .thinking span:nth-child(3) { animation-delay: 0.4s; }
@keyframes thinkDot { 0%,100%{opacity:0.2;transform:scale(1)} 50%{opacity:1;transform:scale(1.4)} }

.gemini-central-actions {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px;
  padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.06);
}
.gca-btn {
  padding: 7px 16px; border-radius: 20px; font-size: 11px; font-weight: 600;
  cursor: none; transition: all 0.2s; letter-spacing: 0.08em;
  border: 1px solid rgba(57,255,20,0.3); background: rgba(57,255,20,0.06); color: #39ff14;
}
.gca-btn:hover { background: rgba(57,255,20,0.15); border-color: #39ff14; }
.gca-btn.tts { border-color: rgba(130,80,255,0.4); background: rgba(130,80,255,0.08); color: #a080ff; }
.gca-btn.tts:hover { background: rgba(130,80,255,0.2); border-color: #a080ff; }
.gca-btn.tts.speaking { background: rgba(130,80,255,0.25); border-color: #a080ff; animation: micTabPulse 1s ease-in-out infinite; }
.gca-btn.close-gemini { border-color: rgba(255,255,255,0.1); background: transparent; color: #52525b; margin-left: auto; }
.gca-btn.close-gemini:hover { border-color: rgba(255,80,80,0.4); color: #ff6060; }
.speak-btn { transition: all 0.2s ease; }
.speak-btn.speaking { background: #7c3aed !important; box-shadow: 0 0 20px rgba(124,58,237,0.5); }
.tools-status { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 0.5px solid rgba(255,255,255,0.07); font-size: 11px; color: #71717a; min-height: 32px; }
.wellness-input { width: 100%; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: white; font-size: 13px; outline: none; transition: border-color 0.2s; }
.wellness-input:focus { border-color: rgba(0,220,255,0.5); }
.wellness-input::placeholder { color: #52525b; }
textarea.wellness-input { resize: vertical; min-height: 70px; font-family: inherit; }
select.wellness-input option { background: #1a1a2e; color: white; }
.timer-ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 0 8px; }
.timer-ring { position: relative; width: 110px; height: 110px; }
.timer-ring svg { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,0.07); stroke-width: 6; }
.ring-prog { fill: none; stroke: #00dcff; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 314; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear, stroke 0.5s ease; }
.ring-prog.warn { stroke: #ffa500; }
.ring-prog.alert { stroke: #ff4444; }
.timer-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.timer-minutes { font-size: 22px; font-weight: bold; color: white; line-height: 1; }
.timer-sub { font-size: 9px; color: #71717a; text-transform: uppercase; letter-spacing: 0.1em; }
.timer-controls { display: flex; gap: 8px; }
.timer-btn { padding: 7px 18px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: none; transition: all 0.2s; border: 1.5px solid rgba(0,220,255,0.4); background: rgba(0,220,255,0.08); color: #00dcff; }
.timer-btn:hover { background: rgba(0,220,255,0.2); border-color: #00dcff; }
.timer-btn.danger { border-color: rgba(255,80,80,0.4); background: rgba(255,80,80,0.08); color: #ff6060; }
.timer-btn.danger:hover { background: rgba(255,80,80,0.2); border-color: #ff4444; }
.pill-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pill-info p { margin: 0; font-size: 13px; color: #d4d4d8; }
.pill-info span { font-size: 11px; color: #71717a; }
.pill-del { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255,80,80,0.3); background: transparent; color: #ff6060; font-size: 12px; cursor: none; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.pill-del:hover { background: rgba(255,80,80,0.15); }
#wellness-popup { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0); transition: background 0.5s ease; }
#wellness-popup.show { display: flex; background: rgba(0,0,0,0.75); }
.wellness-card { background: rgba(10,10,20,0.97); border: 1.5px solid rgba(0,220,255,0.4); border-radius: 28px; padding: 36px 32px; max-width: 340px; width: 90%; text-align: center; box-shadow: 0 0 60px rgba(0,220,255,0.2); animation: popIn 0.4s cubic-bezier(.4,0,.2,1); }
@keyframes popIn { from { transform: scale(0.88); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.wellness-emoji { font-size: 52px; margin-bottom: 12px; }
.wellness-title { font-size: 20px; font-weight: bold; color: #00dcff; margin-bottom: 8px; text-shadow: 0 0 12px rgba(0,220,255,0.4); }
.wellness-msg { font-size: 14px; color: #a1a1aa; line-height: 1.65; margin-bottom: 20px; }
.wellness-dismiss { padding: 11px 28px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: none; background: rgba(0,220,255,0.15); border: 1.5px solid rgba(0,220,255,0.5); color: #00dcff; transition: all 0.2s; }
.wellness-dismiss:hover { background: rgba(0,220,255,0.3); border-color: #00dcff; }

/* ══ NAVBAR PIXEL ══ */
#main-nav {
  position: fixed; top: 0; left: 0; right: 0; height: 64px;
  background: rgba(0,0,0,0.96);
  border-bottom: 1px solid rgba(57,255,20,0.2);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  z-index: 1100; display: flex; align-items: center;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
#nav-logo {
  image-rendering: pixelated; image-rendering: crisp-edges;
  width: 40px; height: 40px; border-radius: 8px;
  filter: drop-shadow(0 0 6px rgba(57,255,20,0.4));
  transition: filter 0.3s;
}
#nav-logo:hover { filter: drop-shadow(0 0 14px rgba(57,255,20,0.9)); }
.nav-title {
  font-family: 'Space Mono','Courier New',monospace;
  font-size: 1.35rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em;
}
.nav-aim { color: #4ade80; }
.nav-and { color: #e4e4e7; font-size: 1.1rem; }
.nav-joy { color: #fb923c; }
.nav-tagline {
  font-family: 'Space Mono',monospace; font-size: 9px; color: #52525b;
  letter-spacing: 0.12em; text-transform: uppercase; line-height: 1;
  border-left: 1px solid rgba(255,255,255,0.08); padding-left: 10px; margin-left: 4px;
}
@media (max-width: 560px) { .nav-tagline { display: none; } }
.nav-form-badge {
  font-family: 'Space Mono',monospace; font-size: 9px;
  color: #00dcff; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid rgba(0,220,255,0.3); border-radius: 6px;
  padding: 5px 10px; background: rgba(0,220,255,0.06);
  transition: all 0.2s;
}
.nav-form-badge:hover { background: rgba(0,220,255,0.15); border-color: #00dcff; }
@media (max-width: 600px) { .nav-form-badge { display: none; } }
.nav-controls { display: flex; align-items: center; gap: 16px; }

/* ══ SELECTOR DE IDIOMA ══ */
.lang-selector {
  display: flex; gap: 2px; align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 3px; flex-shrink: 0;
}
.lang-btn {
  padding: 4px 9px; border-radius: 7px; border: none;
  background: transparent; color: #52525b;
  font-family: 'Space Mono', monospace; font-size: 10px;
  font-weight: 700; letter-spacing: 0.08em; cursor: none;
  transition: all 0.15s;
}
.lang-btn:hover { color: #a1a1aa; background: rgba(255,255,255,0.06); }
.lang-btn.active { background: rgba(57,255,20,0.12); color: #39ff14; border: 1px solid rgba(57,255,20,0.3); }
@media (max-width: 480px) { .lang-selector { display: none; } }
.tremor-toggle { display: flex; align-items: center; gap: 8px; cursor: none; }
.tremor-toggle input { display: none; }
.tremor-track {
  width: 36px; height: 20px; border-radius: 10px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(57,255,20,0.2);
  position: relative; transition: all 0.2s; display: block; cursor: none;
}
.tremor-thumb {
  position: absolute; top: 3px; left: 3px; width: 12px; height: 12px;
  border-radius: 50%; background: #52525b; transition: all 0.2s;
}
.tremor-toggle input:checked ~ .tremor-track { background: rgba(57,255,20,0.2); border-color: #39ff14; }
.tremor-toggle input:checked ~ .tremor-track .tremor-thumb { left: 19px; background: #39ff14; box-shadow: 0 0 8px rgba(57,255,20,0.6); }
.tremor-label { font-size: 11px; color: #71717a; letter-spacing: 0.06em; white-space: nowrap; }
@media (max-width: 480px) { .tremor-label { display: none; } }

/* ══ EFECTO NES/PIXEL — botones qa-btn ══ */
.qa-btn {
  border-radius: 0 !important; border: none !important;
  font-family: 'Space Mono','Courier New',monospace !important;
  font-size: 11px !important;
  box-shadow: -2px 0 0 0 currentColor, 2px 0 0 0 currentColor,
              0 -2px 0 0 currentColor, 0  2px 0 0 currentColor;
  transition: box-shadow 0.08s, transform 0.08s, background 0.15s;
}
.qa-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: -2px 0 0 0 currentColor, 2px 0 0 0 currentColor,
              0 -2px 0 0 currentColor, 0  2px 0 0 currentColor,
              3px 3px 0 rgba(0,0,0,0.6);
}
.qa-btn:active { transform: translate(1px,1px); box-shadow: none; }

/* ══ ZEN BG pixel art ══ */
#zen-bg-pixel {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-repeat: no-repeat; background-position: center;
  background-size: min(55vh, 55vw); opacity: 0.045;
  filter: grayscale(15%); image-rendering: pixelated;
}


/* ══ MODO DISLEXIA ══ */
@font-face {
  font-family: 'OpenDyslexic';
  src: url('https://cdn.jsdelivr.net/npm/open-dyslexic@1.0.3/fonts/OpenDyslexic-Regular.otf') format('opentype');
  font-display: swap;
}
body.dyslexia-mode .word,
body.dyslexia-mode #selectable-content,
body.dyslexia-mode #gemini-central-output,
body.dyslexia-mode .gem,
body.dyslexia-mode textarea,
body.dyslexia-mode .zen-text-block {
  font-family: 'OpenDyslexic', serif !important;
  letter-spacing: 0.12em !important;
  word-spacing: 0.18em !important;
  line-height: 2.4 !important;
}

/* ══ PARPADEO URGENCIA WhatsApp ══ */
@keyframes konamiFadeIn { from{opacity:0} to{opacity:1} }
@keyframes urgencyPulse {
  0%,100% { box-shadow: 0 0 8px rgba(37,211,102,0.3); transform: scale(1); }
  50%      { box-shadow: 0 0 28px rgba(37,211,102,0.9); transform: scale(1.06); }
}
.emergency-btn.urgency { animation: urgencyPulse 1.4s ease-in-out infinite; border-color: #25d366 !important; }
/* Switch Access highlight */
.word.switch-focus { outline: 2px solid #8250ff; border-radius: 4px; box-shadow: 0 0 12px rgba(130,80,255,0.6); background: rgba(130,80,255,0.15); }
.aj-main-wrap  { display:flex; height:100vh; padding-top:64px; overflow:hidden; }
.aj-main-col   { flex:1; padding:24px; overflow:auto; }
.aj-sidebar {
  width: 440px;
  padding: 20px 0 20px 20px;
  display: flex; flex-direction: column; gap: 12px;
  flex-shrink: 0;
  border-left: 1px solid rgba(57,255,20,0.12);
  background: rgba(8,8,12,0.6);
  align-items: flex-end;
  height: 100%;
  overflow: hidden;
}
.flask-shell {
  position: relative;
  width: 100%; max-width: 440px;
  height: min(640px, calc(100vh - 180px));
  border-radius: 45px 0 0 45px;
  overflow: hidden; backdrop-filter: blur(14px);
  flex-shrink: 1;
}
.aj-nav-inner  { max-width:1280px; margin:0 auto; padding:0 24px; display:flex; justify-content:space-between; align-items:center; height:100%; }
.aj-chrome-wrap{ display:flex; flex-direction:column; align-items:center; gap:12px; margin-bottom:24px; }
.aj-logo-text  { font-size:1.875rem; font-weight:700; }
.aj-ext-label  { font-size:0.875rem; font-weight:600; color:#e4e4e7; }
.aj-badge      { color:#000; font-weight:700; }
.aj-lime       { color:#39ff14; }
.aj-pink       { color:#f472b6; }
.aj-red        { color:#f87171; }
.aj-white      { color:#fff; }
.aj-bold       { font-weight:700; }
.aj-tracked    { letter-spacing:0.1em; }
.aj-bg-zinc    { background:#09090b; }
.aj-bg-black   { background:rgba(0,0,0,0.95); }

/* SVG íconos inline — tamaño heredado del contexto */
.aj-icon { width:1em; height:1em; fill:currentColor; display:inline-block; vertical-align:-0.125em; flex-shrink:0; }
.aj-icon.aj-icon-lg { width:1.25em; height:1.25em; }
.aj-icon.aj-icon-xl { width:1.5em; height:1.5em; }

@media (max-width:900px) {
  .aj-sidebar { width:100% !important; max-height:240px; border-left:none; border-top:1px solid rgba(57,255,20,0.12); align-items:center; padding:12px; }
  .flask-shell { border-radius: 45px !important; max-width:360px; }
}
@media (max-width:600px) { .aj-main-col { padding:12px; } .aj-sidebar { padding:12px; } }
.qa-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 20px; font-size: 12px; font-weight: 600;
  cursor: none; transition: all 0.2s; border: 1.5px solid transparent;
  letter-spacing: 0.06em; white-space: nowrap;
}
.qa-purple { background: rgba(124,58,237,0.15); border-color: rgba(124,58,237,0.4); color: #a78bfa; }
.qa-purple:hover { background: rgba(124,58,237,0.3); border-color: #7c3aed; box-shadow: 0 0 16px rgba(124,58,237,0.35); }
.qa-purple.speaking { background: rgba(124,58,237,0.3); border-color: #7c3aed; animation: micTabPulse 1s ease-in-out infinite; }
.qa-red    { background: rgba(220,38,38,0.1);  border-color: rgba(220,38,38,0.35); color: #f87171; }
.qa-red:hover    { background: rgba(220,38,38,0.22); border-color: #dc2626; }
.qa-cyan   { background: rgba(0,220,255,0.08); border-color: rgba(0,220,255,0.3);  color: #00dcff; }
.qa-cyan:hover   { background: rgba(0,220,255,0.18); border-color: #00dcff; }
.qa-green  { background: rgba(57,255,20,0.08); border-color: rgba(57,255,20,0.35); color: #39ff14; }
.qa-green:hover  { background: rgba(57,255,20,0.18); border-color: #39ff14; box-shadow: 0 0 14px rgba(57,255,20,0.25); }

/* ══ DRAWERS RESPONSIVE ══ */
@media (max-width: 768px) {
  .drawer-shell { width: min(92vw, 340px) !important; }
  #tab-zen, #tab-a11y { display: none; }
  .mag-tab { width: 24px; padding: 14px 0; }
  .mag-tab .tab-label { display: none; }
}
@media (max-width: 900px) {
  .flex.h-screen.pt-16 { flex-direction: column !important; }
  .w-\[390px\] { width: 100% !important; max-height: 240px; border-left: none !important; border-top: 1px solid rgba(57,255,20,0.12); }
  .flask-shell { transform: scale(0.7); margin: -20px auto -10px; }
  #flask-content { max-height: 70px; overflow-y: auto; }
}
@media (max-width: 600px) {
  #input-bar { flex-wrap: wrap; gap: 6px; }
  #paste-area { min-height: 70px; order: 0; flex-basis: 100%; }
  .bar-btn { flex: 1; flex-direction: row; padding: 10px; font-size: 11px; }
  #welcome-text h1 { font-size: 1.3rem !important; }
  #quick-actions .qa-btn { font-size: 11px; padding: 8px 12px; }
}

/* ══ AVISO GIRAR A HORIZONTAL — solo móviles en vertical ══ */
#rotate-overlay { display: none; }
@media (max-width: 900px) and (orientation: portrait) {
  #rotate-overlay {
    display: flex; position: fixed; inset: 0; z-index: 99999;
    background: #09090b; color: #e4e4e7;
    flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 32px; gap: 18px;
    font-family: 'Exo 2','Segoe UI',sans-serif;
  }
  #rotate-overlay svg { animation: rotateHint 1.6s ease-in-out infinite; }
  #rotate-overlay h2 { font-family: 'Space Mono',monospace; font-size: 1.1rem; color: #39ff14; }
  #rotate-overlay p { font-size: 0.9rem; color: #a1a1aa; max-width: 280px; }
}
@keyframes rotateHint {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-90deg); }
}

/* ══════════════════════════════════════════════════════
   TRANSICIÓN STAR TREK entre Vgamer y Vzen
══════════════════════════════════════════════════════ */
#vgamer, #vzen {
  position: fixed; inset: 0;
  transition: opacity 1.4s ease, filter 1.4s ease, transform 1.2s cubic-bezier(0.4,0,0.2,1);
  will-change: opacity, filter, transform;
}
#vgamer { z-index: 1; opacity: 1; filter: none; transform: scaleX(1); }
#vzen   { z-index: 2; opacity: 0; pointer-events: none; filter: brightness(4) blur(8px); transform: scaleX(0.01); }

/* Estado activo Zen */
body.zen-active #vgamer { opacity: 0; pointer-events: none; filter: brightness(4) blur(8px); transform: scaleX(0.01); }
body.zen-active #vzen   { opacity: 1; pointer-events: all; filter: none; transform: scaleX(1); }

/* ══════════════════════════════════════════════════════
   VZEN — Estilos propios de Franz
══════════════════════════════════════════════════════ */
#vzen {
  background: #0f1117;
  color: #e8eaf0;
  font-family: 'Exo 2', sans-serif;
  overflow: hidden;
}
#vzen :root { --lime: #b6f000; }
#vzen-app { display: flex; height: 100vh; overflow: hidden; }
#vzen-main { flex: 1; overflow-y: auto; padding: 0; position: relative; }
#vzen-main::-webkit-scrollbar { width: 4px; }
#vzen-main::-webkit-scrollbar-track { background: #0f1117; }
#vzen-main::-webkit-scrollbar-thumb { background: #7aa800; border-radius: 2px; }

/* Laser ZZ */
#zen-laser-cursor { position: fixed; width: 28px; height: 28px; pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); transition: width 0.15s, height 0.15s; }
#zen-laser-cursor .core { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, #ffffff 0%, #b6f000 40%, transparent 70%); animation: pulse-laser 1.4s ease-in-out infinite; }
#zen-laser-cursor .ring { position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid #b6f000; opacity: 0.5; animation: ring-expand 1.4s ease-in-out infinite; }
#zen-laser-cursor .beam-h { position: absolute; height: 1px; width: 60px; top: 50%; left: 50%; transform: translate(-50%,-50%); background: linear-gradient(to right, transparent, #b6f000, transparent); opacity: 0.35; }
#zen-laser-cursor .beam-v { position: absolute; width: 1px; height: 60px; top: 50%; left: 50%; transform: translate(-50%,-50%); background: linear-gradient(to bottom, transparent, #b6f000, transparent); opacity: 0.35; }
@keyframes pulse-laser { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:0.7; transform:scale(0.88); } }
@keyframes ring-expand { 0%,100% { transform:scale(1); opacity:0.5; } 50% { transform:scale(1.3); opacity:0.1; } }
body.zen-snapping #zen-laser-cursor { width: 44px; height: 44px; }
body.zen-snapping #zen-laser-cursor .core { background: radial-gradient(circle, #ffffff 0%, #ff6b1a 35%, #b6f000 60%, transparent 80%); }

/* Header ZZ */
#zen-header { position: sticky; top: 0; z-index: 100; background: linear-gradient(to bottom, #0a0c10 0%, rgba(10,12,16,0.92) 100%); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(182,240,0,0.18); padding: 14px 40px; display: flex; align-items: center; gap: 20px; }
.zen-logo { display: flex; align-items: center; gap: 0; font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 1.5rem; letter-spacing: 0.04em; text-transform: uppercase; }
.zen-logo .aim { color: #b6f000; }
.zen-logo .and { color: #7a8090; font-weight: 300; }
.zen-logo .joy { color: #ff6b1a; }
.zen-badge { font-family: 'Space Mono', monospace; font-size: 0.58rem; color: #7a8090; letter-spacing: 0.1em; background: rgba(182,240,0,0.06); border: 1px solid rgba(182,240,0,0.18); border-radius: 20px; padding: 3px 10px; }
.zen-tagline { font-family: 'Space Mono', monospace; font-size: 0.62rem; color: #7a8090; letter-spacing: 0.06em; margin-left: auto; font-style: italic; }

/* Content ZZ */
#zen-content-area { padding: 50px 60px 80px; max-width: 860px; }
.zen-article-label { font-family: 'Space Mono', monospace; font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: #b6f000; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.zen-article-label::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to right, rgba(182,240,0,0.18), transparent); max-width: 120px; }
.zen-article-title { font-family: 'Rajdhani', sans-serif; font-size: 2.6rem; font-weight: 700; line-height: 1.1; margin-bottom: 30px; color: #e8eaf0; }
.zen-article-title em { color: #b6f000; font-style: normal; }
.zen-content-block { font-size: 1.02rem; line-height: 1.8; color: #c8cad4; margin-bottom: 28px; font-weight: 300; }
.zen-section-divider { border: none; border-top: 1px solid rgba(182,240,0,0.18); margin: 40px 0; }
h2.zen-sub { font-family: 'Rajdhani', sans-serif; font-size: 1.4rem; font-weight: 600; color: #e8eaf0; margin-bottom: 14px; padding-left: 14px; border-left: 3px solid #b6f000; }

/* Zen harvestable — word by word */
.zen-word {
  display: inline;
  border-radius: 3px;
  padding: 1px 3px;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  cursor: none;
  position: relative;
}
.zen-word.magnetic { background: rgba(182,240,0,0.12); color: #b6f000; box-shadow: 0 0 0 2px rgba(182,240,0,0.25), 0 0 18px rgba(182,240,0,0.08); }
.zen-word.harvested { background: rgba(255,107,26,0.15); color: #ff6b1a; }
.zen-word.zen-harvesting { background: rgba(57,255,20,0.22); color: #39ff14; box-shadow: 0 0 14px rgba(57,255,20,0.35); transition: all 0.15s; }

/* Canvas area ZZ */
#zen-canvas-wrap { margin: 0 0 28px 0; }
.zen-canvas-label { font-family: 'Space Mono', monospace; font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: #7a8090; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.zen-canvas-label::after { content: ''; flex:1; height:1px; background: linear-gradient(to right, rgba(182,240,0,0.18), transparent); max-width: 80px; }
#zen-paste-area { width: 100%; background: rgba(182,240,0,0.03); border: 1px solid rgba(182,240,0,0.15); border-radius: 8px; padding: 14px 16px; color: #c8cad4; font-family: 'Space Mono', monospace; font-size: 0.82rem; line-height: 1.6; resize: vertical; min-height: 90px; outline: none; transition: border-color 0.2s; }
#zen-paste-area:focus { border-color: rgba(182,240,0,0.4); }
#zen-paste-area::placeholder { color: #3a3f4a; }
.zen-canvas-btns { display: flex; gap: 8px; margin-top: 8px; }
.zen-btn-load { padding: 8px 20px; border-radius: 6px; border: 1px solid rgba(182,240,0,0.4); background: rgba(182,240,0,0.08); color: #b6f000; font-family: 'Rajdhani', sans-serif; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; cursor: none; transition: all 0.2s; }
.zen-btn-load:hover { background: rgba(182,240,0,0.15); border-color: #b6f000; }
.zen-btn-clear { padding: 8px 14px; border-radius: 6px; border: 1px solid rgba(255,107,26,0.3); background: transparent; color: #7a8090; font-family: 'Rajdhani', sans-serif; font-size: 0.8rem; font-weight: 600; cursor: none; transition: all 0.2s; }
.zen-btn-clear:hover { border-color: #ff6b1a; color: #ff6b1a; }

/* Herbs Pizarras */
.zen-pizarras-label { font-family: 'Space Mono', monospace; font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: #7a8090; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.zen-pizarras-label::after { content: ''; flex:1; height:1px; background: linear-gradient(to right, rgba(182,240,0,0.18), transparent); max-width: 60px; }
.zen-pizarras-grid { display: flex; gap: 8px; margin-bottom: 12px; }
.zen-pizarra-btn { padding: 7px 16px; border-radius: 6px; border: 1px solid rgba(182,240,0,0.2); background: rgba(182,240,0,0.04); color: #7aa800; font-family: 'Space Mono', monospace; font-size: 0.68rem; cursor: none; transition: all 0.2s; }
.zen-pizarra-btn:hover { border-color: #b6f000; color: #b6f000; background: rgba(182,240,0,0.1); }
.zen-pizarra-btn.active { border-color: #b6f000; color: #b6f000; background: rgba(182,240,0,0.15); }

/* Sidebar ZZ */
#zen-sidebar { width: 380px; background: #0a0c10; border-left: 1px solid rgba(182,240,0,0.18); display: flex; flex-direction: column; position: relative; overflow: hidden; }
#zen-sidebar::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 260px; background: radial-gradient(ellipse at 50% 100%, rgba(182,240,0,0.06) 0%, transparent 70%); pointer-events: none; }
.zen-sidebar-header { padding: 18px 22px 14px; border-bottom: 1px solid rgba(182,240,0,0.18); display: flex; align-items: center; gap: 10px; }
.zen-matraz-icon { width: 28px; height: 28px; flex-shrink: 0; }
.zen-sidebar-title { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase; color: #b6f000; }
.zen-gem-count { margin-left: auto; background: rgba(182,240,0,0.06); border: 1px solid rgba(182,240,0,0.18); border-radius: 20px; padding: 2px 10px; font-family: 'Space Mono', monospace; font-size: 0.7rem; color: #b6f000; }
#zen-gems-container { flex: 1; overflow-y: auto; padding: 16px; }
#zen-gems-container::-webkit-scrollbar { width: 3px; }
#zen-gems-container::-webkit-scrollbar-thumb { background: #7aa800; border-radius: 2px; }
.zen-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 120px; gap: 10px; opacity: 0.4; }
.zen-empty-state p { font-family: 'Space Mono', monospace; font-size: 0.7rem; text-align: center; color: #7a8090; line-height: 1.6; }

/* Gems en flujo continuo */
#zen-gems-flow { line-height: 2; word-break: break-word; padding: 4px 0; }
.zen-gem-word { display: inline; font-family: 'Space Mono', monospace; font-size: 0.82rem; color: #b6f000; cursor: none; }
.zen-gem-word::after { content: ' '; }
.zen-gem-word:hover { color: #ff6b1a; }

/* AI Panel ZZ */
.zen-ai-panel { border-top: 1px solid rgba(182,240,0,0.18); padding: 16px; background: #0f1117; }
.zen-ai-panel-title { font-family: 'Rajdhani', sans-serif; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #7a8090; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.zen-ai-badge { background: linear-gradient(135deg, #4285f4, #0f9d58); border-radius: 4px; padding: 1px 6px; font-size: 0.6rem; color: white; font-family: 'Space Mono', monospace; }
.zen-ai-output { background: #161923; border: 1px solid rgba(182,240,0,0.18); border-radius: 6px; padding: 12px; font-size: 0.8rem; line-height: 1.6; color: #7a8090; min-height: 60px; font-family: 'Exo 2', sans-serif; font-weight: 300; margin-bottom: 10px; }
.zen-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px; border-radius: 6px; border: none; font-family: 'Rajdhani', sans-serif; font-weight: 600; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; cursor: none; transition: all 0.2s; margin-bottom: 8px; }
.zen-btn-transmute { background: linear-gradient(135deg, #b6f000 0%, #85b800 100%); color: #0a0c10; }
.zen-btn-transmute:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(182,240,0,0.25); }
.zen-btn-transmute:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.zen-btn-export { background: transparent; border: 1px solid rgba(182,240,0,0.18); color: #7a8090; }
.zen-btn-export:hover { border-color: #ff6b1a; color: #ff6b1a; }
.zen-btn-export:disabled { opacity: 0.3; cursor: not-allowed; }

/* Toast ZZ */
#zen-toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px); background: #1e2433; border: 1px solid rgba(182,240,0,0.18); border-radius: 30px; padding: 10px 22px; font-family: 'Space Mono', monospace; font-size: 0.72rem; color: #b6f000; opacity: 0; transition: opacity 0.3s, transform 0.3s; pointer-events: none; z-index: 9999; }
#zen-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Scan lines */
#vzen::after { content: ''; position: fixed; inset: 0; background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px); pointer-events: none; z-index: 9980; }

/* Flying gem ZZ */
.zen-flying-gem { position: fixed; z-index: 9990; pointer-events: none; display: flex; align-items: center; gap: 6px; background: #161923; border: 1px solid #b6f000; border-radius: 20px; padding: 5px 12px; font-size: 0.75rem; font-family: 'Space Mono', monospace; color: #b6f000; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 0 20px rgba(182,240,0,0.3); animation: fly-to-sidebar 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; }
@keyframes fly-to-sidebar { 0% { opacity:1; transform:scale(1); } 60% { opacity:1; transform:scale(0.9) translateX(40px); } 100% { opacity:0; transform:scale(0.4) translateX(200px) translateY(-20px); } }
.zen-click-ripple { position: fixed; z-index: 9988; pointer-events: none; border-radius: 50%; border: 2px solid #ff6b1a; animation: ripple-out 0.5s ease-out forwards; }
@keyframes ripple-out { 0% { width:0; height:0; opacity:1; transform:translate(-50%,-50%); } 100% { width:80px; height:80px; opacity:0; transform:translate(-50%,-50%); } }

/* Botón Ver Lab / Volver a Vgamer dentro del cajón ZZ */
.zen-back-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; border-radius: 8px; border: 1px solid rgba(182,240,0,0.3); background: rgba(182,240,0,0.06); color: #b6f000; font-family: 'Rajdhani', sans-serif; font-weight: 600; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; cursor: none; transition: all 0.2s; }
.zen-back-btn:hover { background: rgba(182,240,0,0.15); border-color: #b6f000; }

/* Lengüeta Ver Lab — encima del audio, derecha */
#zen-tab-verlab {
  right: 0; top: calc(50% - 160px);
  border: 1px solid rgba(255,107,26,0.45); border-right: none;
  border-radius: 14px 0 0 14px;
  box-shadow: -4px 0 20px rgba(255,107,26,0.2);
  background: rgba(255,107,26,0.08);
}
#zen-tab-verlab i { color: #ff6b1a; }
#zen-tab-verlab:hover { width: 36px; border-color: rgba(255,107,26,0.9); box-shadow: -6px 0 30px rgba(255,107,26,0.35); }

/* Cajón ZZ derecho (Audio del zen) */
#zen-audio-drawer { right: 0; transform: translateX(100%); border-left: 1.5px solid rgba(182,240,0,0.3); box-shadow: -10px 0 60px rgba(182,240,0,0.1); }
#zen-audio-drawer.open { transform: translateX(0); }
#zen-tools-drawer { left: 0; transform: translateX(-100%); border-right: 1.5px solid rgba(255,160,0,0.3); }
#zen-tools-drawer.open { transform: translateX(0); }
#zen-wellness-drawer { left: 0; top: 0; transform: translateX(-100%); border-right: 1.5px solid rgba(0,220,255,0.3); }
#zen-wellness-drawer.open { transform: translateX(0); }

/* Tabs ZZ */
#zen-tab-audio { right:0; top:calc(50% - 84px); background:#0a0c10; border:1px solid rgba(182,240,0,0.35); border-right:none; border-radius:14px 0 0 14px; box-shadow:-4px 0 20px rgba(182,240,0,0.15); }
#zen-tab-audio i { color:#b6f000; }
#zen-tab-audio:hover { width:36px; border-color:rgba(182,240,0,0.7); }
#zen-tab-tools { left:0; top:calc(50% - 84px); background:#0a0c10; border:1px solid rgba(255,160,0,0.35); border-left:none; border-radius:0 14px 14px 0; }
#zen-tab-tools i { color:#ffa500; }
#zen-tab-tools:hover { width:36px; border-color:rgba(255,160,0,0.7); }
#zen-tab-wellness { left:0; top:calc(50% + 20px); background:#0a0c10; border:1px solid rgba(0,220,255,0.35); border-left:none; border-radius:0 14px 14px 0; }
#zen-tab-wellness i { color:#00dcff; }
#zen-tab-wellness:hover { width:36px; border-color:rgba(0,220,255,0.7); }
#zen-tab-verlab { right:0; top:calc(50% + 20px); background:#0a0c10; }

/* Overlay ZZ — mismo enfoque sin capa */
#zen-drawer-overlay { position: fixed; inset: 0; background: transparent; pointer-events: none; z-index: 998; }
#zen-drawer-overlay.active { pointer-events: all; }
#vzen.drawer-open > *:not(.drawer-shell):not(#zen-drawer-overlay):not(#zen-laser-cursor):not(.mag-tab) {
  filter: brightness(0.35);
  transition: filter 0.32s ease;
}
#vzen > *:not(.drawer-shell):not(#zen-drawer-overlay):not(#zen-laser-cursor):not(.mag-tab) {
  transition: filter 0.32s ease;
}

/* ══════════════════════════════════════════════════════
   MEDIAPIPE — Cajón y controles
══════════════════════════════════════════════════════ */
/* Lengüeta Switch/Gestos — derecha, debajo del Audio */
#tab-mediapipe {
  right: 0; top: calc(50% + 16px); transform: none;
  border: 1px solid rgba(130,80,255,0.45); border-right: none;
  border-radius: 14px 0 0 14px;
  box-shadow: -4px 0 20px rgba(130,80,255,0.2);
  background: #0e0e0e;
}
#tab-mediapipe i { color: #8250ff; }
#tab-mediapipe:hover { width: 36px; border-color: rgba(130,80,255,0.9); box-shadow: -6px 0 30px rgba(130,80,255,0.35); }
#tab-mediapipe.open { background: rgba(130,80,255,0.15); border-color: rgba(130,80,255,0.7); }

/* Cajón MediaPipe */
#mediapipe-drawer {
  right: 0; transform: translateX(100%);
  border-left: 1.5px solid rgba(130,80,255,0.35);
  box-shadow: -10px 0 60px rgba(130,80,255,0.12);
}
#mediapipe-drawer.open { transform: translateX(0); }

/* Cámara y canvas */
#mp-video { width: 100%; border-radius: 12px; background: #000; display: block; transform: scaleX(-1); }
#mp-canvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border-radius: 12px; pointer-events: none; transform: scaleX(-1);
}
.mp-cam-wrap { position: relative; width: 100%; border-radius: 12px; overflow: hidden; background: #0a0010; border: 1.5px solid rgba(130,80,255,0.3); }

/* Gesto indicator */
#mp-gesture {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 14px;
  background: rgba(130,80,255,0.06); border: 1px solid rgba(130,80,255,0.18);
  font-family: 'Space Mono', monospace; font-size: 11px; color: #a080ff;
  min-height: 44px; transition: all 0.2s;
}
#mp-gesture.fist { background: rgba(57,255,20,0.1); border-color: #39ff14; color: #39ff14; }
#mp-gesture.open-hand { background: rgba(255,80,80,0.1); border-color: #ff5050; color: #ff5050; }
#mp-gesture-emoji { font-size: 22px; }
#mp-gesture-text { flex: 1; }

/* Dot estado */
#dot-mp { width:6px; height:6px; border-radius:50%; background:#8250ff; display:none; flex-shrink:0; animation: blinkDot 1.2s ease-in-out infinite; }

/* Stats contador */
.mp-stats { display: flex; gap: 8px; }
.mp-stat { flex: 1; text-align: center; padding: 8px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); }
.mp-stat-val { font-size: 20px; font-weight: bold; color: #8250ff; font-family: 'Space Mono', monospace; }
.mp-stat-lbl { font-size: 9px; color: #52525b; text-transform: uppercase; letter-spacing: 0.1em; }

/* Indicador flotante de gesto (en pantalla principal) */
#mp-hud {
  position: fixed; bottom: 24px; right: 24px; z-index: 9995;
  display: none; align-items: center; gap: 8px;
  background: rgba(20,10,40,0.92); border: 1px solid rgba(130,80,255,0.4);
  border-radius: 30px; padding: 8px 16px;
  font-family: 'Space Mono', monospace; font-size: 11px; color: #a080ff;
  backdrop-filter: blur(8px); pointer-events: none;
  transition: all 0.2s;
}
#mp-hud.active { display: flex; }
#mp-hud.fist { border-color: #39ff14; color: #39ff14; background: rgba(10,30,10,0.92); }
#mp-hud.open-hand { border-color: #ff5050; color: #ff5050; background: rgba(40,10,10,0.92); }
#mp-hud.pointing { border-color: #ffa500; color: #ffa500; background: rgba(40,30,0,0.92); }
#mp-hud-emoji { font-size: 18px; }

/* Punto de mano en la pantalla */
#mp-hand-dot {
  position: fixed; width: 24px; height: 24px;
  border-radius: 50%; pointer-events: none; z-index: 9994;
  border: 2px solid #8250ff;
  box-shadow: 0 0 12px rgba(130,80,255,0.6);
  display: none; transform: translate(-50%, -50%);
  transition: left 0.05s linear, top 0.05s linear;
}
#mp-hand-dot.fist { border-color: #39ff14; box-shadow: 0 0 20px rgba(57,255,20,0.7); background: rgba(57,255,20,0.2); }
#mp-hand-dot.open-hand { border-color: #ff5050; box-shadow: 0 0 20px rgba(255,80,80,0.7); }
#mp-hand-dot.pointing { border-color: #ffa500; box-shadow: 0 0 20px rgba(255,165,0,0.7); background: rgba(255,165,0,0.15); }
