/* =========================================================================
   0. CERO ROTACIONES Y CERO SOMBRAS DIFUMINADAS EN #view-game
   ========================================================================= */
#view-game .desk-obj,
#view-game .desk-item,
#view-game .obj-paper,
#view-game .obj-note,
#view-game .obj-phone,
#view-game .paper-ribbon {
  transform: none !important;
}

#view-game .company-tabs {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
#view-game .company-tabs button,
#view-game .company-tabs .company-tab {
  font-family: 'Silkscreen', monospace;
  font-size: 11px;
  padding: 4px 10px;
  background: #1c2842;
  color: #cbd5e1;
  border: 3px solid #0b0f1c;
  box-shadow: inset 3px 3px 0 #4a5d82, inset -3px -3px 0 #151d2e;
  text-shadow: 2px 2px 0 #090e1c;
}
#view-game .company-tabs button.active,
#view-game .company-tabs .company-tab.active {
  background: #f5c842;
  color: #0b0f1c;
  box-shadow: inset 3px 3px 0 #fff08a, inset -3px -3px 0 #c9971a;
  text-shadow: none;
}

#view-game .keycap-console {
  height: 64px;
  padding: 6px;
  background: #131d33;
  border: 3px solid #0b0f1c;
  flex-shrink: 0;
  display: block;
}

#view-game .keycap-actions.two-big-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  height: 100%;
}

/* Con CORTO desbloqueado: tres botones en la misma fila */
#view-game .keycap-actions.two-big-btns.has-short {
  grid-template-columns: 1fr 1fr 0.7fr;
}

#view-game #btn-short {
  height: 100%;
  min-width: 0;
}

#view-game #btn-buy,
#view-game #btn-sell {
  height: 100%;
  font-family: 'Silkscreen', monospace;
  font-size: 16px;
  color: #ffffff;
  text-shadow: 2px 2px 0 #090e1c;
  border: 3px solid #0b0f1c;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.05s;
}

#view-game #btn-buy {
  background: #28b85b;
  box-shadow: inset 0 4px 0 #6ee787, inset 0 -6px 0 #156e35;
}
#view-game #btn-buy:active:not(:disabled) {
  transform: translateY(4px);
}

#view-game #btn-sell {
  background: #d93848;
  box-shadow: inset 0 4px 0 #ff7a85, inset 0 -6px 0 #851b26;
}
#view-game #btn-sell:active:not(:disabled) {
  transform: translateY(4px);
}
#view-game #btn-buy:disabled,
#view-game #btn-sell:disabled {
  opacity: 0.65;
  filter: saturate(0.75);
}

/* =========================================================================
   4. PANEL DERECHO (42%) — ESCRITORIO PIXEL ART COHESIVO
   ========================================================================= */
#view-game .desk-top-rail {
  height: 22%;
  min-height: 118px;
  background: #141e33;
  border: 3px solid #0b0f1c;
  box-shadow: inset 2px 2px 0 #2b3854;
  padding: 4px;
  flex-shrink: 0;
}

/* Objeto de empleado a punto de caducar */
#view-game .desk-obj.item-expiring {
  animation: itemExpiring 0.6s steps(2, end) infinite;
}

@keyframes itemExpiring {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

#view-game .laptop-choice {
  display: flex;
  gap: 4px;
  justify-content: center;
}

/* Medidor de Calor CNMV a la izquierda de la ventanilla (oculto antes de su Tier) */
#view-game .desk-top-rail {
  display: flex;
  gap: 5px;
}

#view-game .desk-top-rail > .desk-booth {
  flex: 1 1 0;
  min-width: 0;
}

#view-game .desk-heat-meter {
  flex: 0 0 92px;
  align-items: center;
  gap: 6px;
  color: #fde68a;
  font-size: 8px;
  font-weight: 700;
  text-align: center;
}

#view-game .heat-head {
  display: flex;
  align-items: center;
  gap: 4px;
}

#view-game .heat-val {
  font-size: 15px;
}

#view-game .heat-track {
  width: 100%;
  height: 10px;
  background: #050812;
  border: 2px solid #0b0f1c;
}

#view-game .desk-heat-meter.fx-cnmv-immune {
  box-shadow: inset 0 0 0 2px #60a5fa, 0 0 10px #60a5fa;
}

/* Encima de la trituradora: abajo a la izquierda esta Don Croak */
#view-game .desk-panic-box {
  left: auto;
  right: 10px;
  bottom: 146px;
  width: 96px;
  height: 76px;
}

#view-game .panic-head {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 8px;
  color: #e2e8f0;
}

#view-game .panic-well {
  position: relative;
  flex: 1;
  perspective: 200px;
}

#view-game .panic-smash-btn {
  width: 100%;
  height: 100%;
  background: #1e3a8a;
  border: 2px solid #0b0f1c;
  color: #bae6fd;
  font-size: 20px;
  cursor: pointer;
}

#view-game .panic-smash-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

#view-game .panic-glass-cover {
  font-size: 8px;
  font-weight: 700;
  color: #0b0f1c;
}

#view-game .desk-booth,
#view-game .booth-window-frame {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border: 2px solid #0b0f1c;
  background: #0e172a;
}

#view-game #desk-booth-canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

#view-game #booth-speech {
  position: absolute;
  top: 8px;
  left: 8px;
  right: auto;
  max-width: 145px;
  transform: none;
  background: #fdf8e6;
  color: #0b0f1c;
  border: 3px solid #0b0f1c;
  padding: 4px 8px;
  font-family: 'Silkscreen', monospace;
  font-size: 10px;
  line-height: 1.15;
  text-align: left;
  text-shadow: none;
  z-index: 6;
  box-shadow: 3px 3px 0 rgba(9, 14, 24, 0.7);
}
#view-game #booth-speech::after {
  content: none !important;
  display: none !important;
}

/* Tapete pixel-art sobre escritorio de madera (renderizado en #desk-backdrop-canvas) */
#view-game .desk-felt-mat {
  flex: 1;
  min-height: 0;
  position: relative;
  background-color: #1c5c43;
  border: 3px solid #0b0f1c;
  overflow: hidden;
}

#view-game #desk-backdrop-canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 0;
}

#view-game .desk-objects-layer {
  z-index: 3;
}

#view-game .desk-lamp-cone,
#view-game .desk-coffee-stain {
  display: none !important;
}

/* Móvil del Operador (114x176, biseles 3px y teclas cuadradas 3DS) */
#view-game .desk-obj.obj-phone {
  width: 114px !important;
  height: 176px !important;
  background: #2e3c54;
  border: 3px solid #0b0f1c;
  box-shadow: inset 3px 3px 0 #4a5d7d, inset -3px -3px 0 #182236, 6px 6px 0 rgba(9, 14, 24, 0.75);
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#view-game .obj-phone .phone-screen {
  flex: 1;
  background: #0e1a24;
  border: 3px solid #0b0f1c;
  padding: 3px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#view-game .obj-phone .phone-off-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  padding: 4px 2px;
}

#view-game .phone-lock-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Silkscreen', monospace;
  font-size: 8px;
  color: #64748b;
}

#view-game .phone-sig-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 8px;
}
#view-game .phone-sig-bars i {
  display: block;
  width: 2px;
  background: #28b85b;
}
#view-game .phone-sig-bars i:nth-child(1) { height: 3px; }
#view-game .phone-sig-bars i:nth-child(2) { height: 5px; }
#view-game .phone-sig-bars i:nth-child(3) { height: 8px; }

#view-game .phone-lock-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

#view-game .phone-standby-sub {
  font-family: 'Silkscreen', monospace;
  font-size: 8px;
  color: #64748b;
  text-align: center;
}

#view-game .phone-standby-title {
  font-family: 'Silkscreen', monospace;
  font-size: 10px;
  color: #4fd1ff;
  text-align: center;
  text-shadow: 2px 2px 0 #090e1c;
}

#view-game .phone-pin-display {
  background: #081018;
  border: 3px solid #263554;
  color: #6ee787;
  font-family: 'Silkscreen', monospace;
  font-size: 11px;
  text-align: center;
  padding: 2px 0;
  text-shadow: 2px 2px 0 #090e1c;
}
#view-game .phone-pin-display.err {
  color: #ff7a85;
}

#view-game .phone-pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

#view-game .phone-pin-pad button {
  background: #2b3c57;
  border: 2px solid #0b0f1c;
  box-shadow: inset 0 2px 0 #566e94, 0 2px 0 #0b0f1c;
  color: #ffffff;
  font-family: 'Silkscreen', monospace;
  font-size: 9px;
  line-height: 1.15;
  text-align: center;
  padding: 1px 0;
}

/* Periódico sin rotación y sin cinta tapando el título */
#view-game .desk-obj.obj-paper {
  border: 3px solid #0b0f1c;
  box-shadow: inset 3px 3px 0 #faf4e4, inset -3px -3px 0 #c7bea6, 6px 6px 0 rgba(9, 14, 24, 0.75);
  background: #efe8d5;
}
#view-game .obj-paper .obj-paper-folded {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
}
#view-game .obj-paper .paper-masthead {
  font-family: 'Silkscreen', monospace;
  font-size: 10px;
  color: #0b0f1c;
  text-align: center;
  border-bottom: 3px solid #0b0f1c;
  width: 100%;
  padding-bottom: 2px;
}
#view-game .obj-paper .paper-ribbon {
  position: static !important;
  display: inline-block;
  background: #d93848;
  color: #ffffff;
  border: 2px solid #0b0f1c;
  font-family: 'Silkscreen', monospace;
  font-size: 9px;
  padding: 1px 6px;
}

/* Post-it de Clave (106x106, contraste directo #141008 sobre #f5cc3b) */
#view-game .desk-obj.obj-note {
  width: 106px !important;
  height: 106px !important;
  background: #f5cc3b;
  border: 3px solid #0b0f1c;
  box-shadow: inset 0 3px 0 #fff08a, inset 0 -3px 0 #c9971a, 6px 6px 0 rgba(9, 14, 24, 0.75);
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Café, Soborno, Sobre, Expediente, Contrato, Portátil y Folio — Pixel Art 32-bit */
#view-game .desk-obj.obj-coffee {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
#view-game .obj-coffee .coffee-steam {
  display: flex;
  gap: 6px;
  height: 9px;
}
#view-game .obj-coffee .coffee-steam span {
  width: 3px;
  height: 6px;
  background: #e6dfd3;
  display: block;
}
#view-game .obj-coffee .coffee-lbl {
  background: #0b0f1c;
  color: #fde047;
  font-family: 'Silkscreen', monospace;
  font-size: 9px;
  padding: 1px 6px;
  border: 2px solid #f5c842;
}
#view-game .desk-obj.obj-bribe {
  background: #156e35;
  border: 3px solid #0b0f1c;
  box-shadow: inset 3px 3px 0 #6ee787, inset -3px -3px 0 #0d4521, 6px 6px 0 rgba(9, 14, 24, 0.75);
  padding: 6px;
  color: #ffffff;
  font-family: 'Silkscreen', monospace;
}
#view-game .desk-obj.obj-envelope {
  background: #e8cfa0;
  border: 3px solid #0b0f1c;
  box-shadow: inset 3px 3px 0 #faebc9, inset -3px -3px 0 #b89860, 6px 6px 0 rgba(9, 14, 24, 0.75);
}
#view-game .desk-obj.obj-evidence {
  background: #d9a74a;
  border: 3px solid #0b0f1c;
  box-shadow: inset 3px 3px 0 #f7cf7c, inset -3px -3px 0 #9c6e1e, 6px 6px 0 rgba(9, 14, 24, 0.75);
}
#view-game .desk-obj.obj-contract {
  background: #faf0d4;
  border: 3px solid #0b0f1c;
  box-shadow: inset 3px 3px 0 #ffffff, inset -3px -3px 0 #cfc096, 6px 6px 0 rgba(9, 14, 24, 0.75);
}
#view-game .desk-obj.obj-folio {
  background: #efe8d5;
  border: 3px solid #0b0f1c;
  box-shadow: inset 3px 3px 0 #ffffff, inset -3px -3px 0 #bdb49b, 6px 6px 0 rgba(9, 14, 24, 0.75);
}
#view-game .desk-obj.obj-laptop_bull,
#view-game .desk-obj.obj-laptop_bear {
  background: #2b3854;
  border: 3px solid #0b0f1c;
  box-shadow: inset 3px 3px 0 #4f628a, inset -3px -3px 0 #192236, 6px 6px 0 rgba(9, 14, 24, 0.75);
}
#view-game .obj-note .note-pin {
  width: 6px;
  height: 6px;
  background: #d93848;
  border: 2px solid #0b0f1c;
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
}
#view-game .obj-note .note-title {
  font-family: 'Silkscreen', monospace;
  font-size: 11px;
  color: #141008;
  text-shadow: none;
  margin-top: 6px;
}
#view-game .obj-note .note-txt,
#view-game .obj-note .note-pin-code {
  background: transparent !important;
  border: none !important;
  font-family: 'Silkscreen', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #141008 !important;
  text-shadow: none !important;
  text-align: center;
}

/* Monitor CRT de Don Croak (48x48 -> 144x144 exacto 3x) */
#view-game #host-game-dock {
  position: absolute;
  left: 6px;
  bottom: 6px;
  width: clamp(138px, 47%, 174px);
  z-index: 6;
}

#view-game #host-game-dock .host-game-portrait {
  width: 100%;
  background: #2b384f;
  border: 3px solid #0b0f1c;
  box-shadow: inset 3px 3px 0 #4a5d7d, inset -3px -3px 0 #151d2e, 6px 6px 0 rgba(9, 14, 24, 0.7);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#view-game #host-game-canvas {
  width: 100%;
  max-width: 144px;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  display: block;
  background: #121b30;
  border: 3px solid #0b0f1c;
  image-rendering: pixelated;
}

#view-game #host-game-dock .host-game-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #141e33;
  border: 3px solid #0b0f1c;
  padding: 3px 6px;
  font-family: 'Silkscreen', monospace;
  font-size: 11px;
  color: #e8c55a;
  text-shadow: 2px 2px 0 #090e1c;
}
#view-game #host-game-dock .host-game-tag::after {
  content: '';
  width: 9px;
  height: 9px;
  background: #28b85b;
  border: 2px solid #0b0f1c;
}

#view-game #host-game-bubble {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  width: 210px;
  background: #fdf8e6;
  color: #0b0f1c;
  border: 3px solid #0b0f1c;
  padding: 6px 8px;
  font-family: 'Silkscreen', monospace;
  font-size: 10px;
  line-height: 1.25;
  box-shadow: 6px 6px 0 rgba(9, 14, 24, 0.7);
  z-index: 9;
}

/* Trituradora Industrial (ranuras gruesas de 6px) */
#view-game #desk-shredder {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: clamp(114px, 42%, 148px);
  height: clamp(114px, 34%, 142px);
  background: #3a465c;
  border: 3px solid #0b0f1c;
  box-shadow: inset 3px 3px 0 #637391, inset -3px -3px 0 #1e2636, 6px 6px 0 rgba(9, 14, 24, 0.7);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#view-game .shredder-slot {
  position: relative;
  height: 16px;
  background: #0b0f1c;
  border: 3px solid #151d2e;
}

#view-game .shredder-paper {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 20px;
  background: #efe8d5;
  border: 3px solid #0b0f1c;
  background-image: repeating-linear-gradient(180deg, transparent 0px, transparent 4px, #7c93bd 4px, #7c93bd 7px);
}

#view-game .shredder-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 2px;
}

#view-game .shredder-warn {
  position: absolute;
  top: 2px;
  left: 4px;
  display: flex;
}

#view-game .shredder-led {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 9px;
  height: 9px;
  background: #28b85b;
  border: 2px solid #0b0f1c;
}

#view-game .shredder-title {
  font-family: 'Silkscreen', monospace;
  font-size: 10px;
  color: #ffffff;
  text-shadow: 2px 2px 0 #090e1c;
  margin-top: 16px;
}

#view-game .shredder-window {
  width: 100%;
  flex: 1;
  background: #0b0f1c;
  border: 3px solid #0b0f1c;
  background-image: repeating-linear-gradient(90deg, #0b0f1c 0px, #0b0f1c 6px, #e6dfc8 6px, #e6dfc8 12px);
}

/* =========================================================================
   5. RESPONSIVE MÓVIL (< 680px)
   ========================================================================= */
@media (max-width: 680px) {
  #view-game.active {
    overflow-y: auto;
    height: auto;
    min-height: 100%;
  }
  #view-game .dual-screen-layout {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    overflow: visible !important;
  }
  #view-game .screen-left,
  #view-game .screen-right.desk-workspace {
    flex: none !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  #view-game .left-hud {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  #view-game #btn-back-menu { grid-column: span 2; }
  #view-game #hud-portfolio-box { grid-column: span 5; }
  #view-game .pnl-box { grid-column: span 5; }
  #view-game .hud-pos-box { grid-column: span 5; }
  #view-game #hud-timer-box { grid-column: span 4; }
  #view-game .hud-audio-mini { grid-column: span 3; }

  #view-game .chart-terminal-wrap {
    flex: none !important;
    height: auto !important;
    overflow: visible !important;
  }
  #view-game #crt-screen-wrap {
    flex: none !important;
    height: 230px !important;
  }
  #view-game .desk-felt-mat {
    min-height: 360px;
  }
}
