/* =========================================================================
   REDISENO DOBLE MANO: 58% TERMINAL BURSATIL / 42% MESA FISICA INTERACTIVA
   ========================================================================= */
#view-game.active {
  padding: 6px;
  overflow: hidden;
  height: 100%;
  box-sizing: border-box;
}

#view-game .dual-screen-layout {
  display: grid;
  grid-template-columns: 58fr 42fr;
  gap: 8px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* --- LADO IZQUIERDO (58%) · TERMINAL BURSATIL --- */
#view-game .screen-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

#view-game .left-hud {
  display: grid;
  grid-template-columns: auto minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 0.95fr) auto auto;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  background: #0d1629;
  border: 3px solid var(--ink);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  overflow: hidden;
}

#view-game .hud-menu-btn {
  padding: 6px 7px;
  font-size: 10.5px;
  white-space: nowrap;
}

#view-game .hud-stat-box {
  padding: 3px 5px;
  min-width: 0;
  overflow: hidden;
  background: #13203b;
  border: 2px solid #24375f;
}

#view-game .hud-stat-lbl {
  font-size: 8.5px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  white-space: nowrap;
}

#view-game .hud-stat-val-row,
#view-game .hud-pnl-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
}

#view-game .hud-stat-val,
#view-game .hud-pnl-val {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--cream);
}

#view-game .hud-pnl-val {
  color: #8cf57a;
}

#view-game .hud-pnl-val.neg,
#view-game .hud-pnl-pct.neg {
  color: #ff6b78;
}

#view-game .hud-pnl-pct {
  font-size: 10px;
  color: #8cf57a;
  font-weight: 700;
}

#view-game .hud-sub-cash,
#view-game .hud-pos-val {
  font-size: 10px;
  color: var(--cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#view-game .hud-timer-box {
  padding: 3px 7px;
  min-width: 76px;
  flex-shrink: 0;
  background: #142240;
  border: 2px solid #ffd447;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

#view-game .hud-timer-top {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  font-weight: 700;
  color: #ffd447;
  line-height: 1;
}

#view-game .hud-audio-mini {
  display: grid;
  grid-template-columns: repeat(2, 22px);
  gap: 3px;
  flex-shrink: 0;
}

/* Grafica principal (~66% altura izquierda) */
.chart-terminal-wrap {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chart-top-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
  background: #111c36;
  border: 2px solid #263a66;
  flex-shrink: 0;
}

.chart-ticker-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: nowrap;
}

.chart-ticker-badge .crt-ticker {
  font-size: 13px;
  color: var(--gold-hi);
  white-space: nowrap;
}

.chart-ticker-badge .crt-price {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.chart-ticker-badge .crt-minmax {
  font-size: 11px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.chart-status-pills {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

#view-game .crt-screen-wrap {
  flex: 1 1 0;
  min-height: 0;
  position: relative;
  display: flex;
}

#view-game #chart-canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.chart-carlos-overlay {
  position: absolute;
  top: 6px;
  left: 8px;
  right: 8px;
  z-index: 6;
  margin: 0;
  background: rgba(11, 18, 34, 0.86);
  border: 2px solid #ffd447;
  padding: 3px 8px;
}

.chart-frost-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(44, 232, 245, 0.16);
  border: 3px solid #2ce8f5;
  box-shadow: inset 0 0 24px rgba(44, 232, 245, 0.45);
  pointer-events: none;
}

.chart-frost-overlay span {
  padding: 5px 12px;
  background: rgba(11, 24, 42, 0.92);
  border: 2px solid #2ce8f5;
  color: #e0fbff;
  font-size: 13px;
  font-weight: 700;
}

/* Barra de Mandos por Teclado (~44px) */
.keycap-console {
  height: 46px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: #0c1426;
  border: 3px solid var(--ink);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.06);
}

.keycap-btn {
  padding: 5px 7px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}

.keycap-actions {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.keycap-action-btn {
  padding: 5px 6px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}

.keycap-btn kbd,
.keycap-action-btn kbd {
  font-family: var(--font-pixel);
  font-size: 10px;
  padding: 1px 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.keycap-btn.key-pressed,
.keycap-action-btn.key-pressed,
.keycap-btn:active,
.keycap-action-btn:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--ink);
}

.op-cooldown-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 38px;
  flex-shrink: 0;
}

.op-cd-lbl {
  font-size: 9px;
  color: var(--ink-muted);
}

.op-cd-track {
  width: 100%;
  height: 7px;
  background: #1a243d;
  border: 1px solid #354770;
  overflow: hidden;
}

.op-cd-fill {
  height: 100%;
  width: 0%;
  background: var(--gold-hi);
}

/* Tira de Analistas Reorganizada (3 tarjetas acopladas, ~72px) */
#view-game .analysts-floor.analysts-deck-3 {
  height: 74px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  background: #0c1426;
  border: 3px solid var(--ink);
}

