.sandbox-acciones-superior {
  position: absolute;
  top: 3.5rem;
  right: 1.5rem;
  display: flex;
  gap: 0.75rem;
  z-index: 2;
}

.sandbox-layout {
  display: grid;
  grid-template-columns: 46.88vw 34vw;
  gap: 1.5rem;
  width: min(1800px, 93.75vw);
  height: 78vh;
}

@media (max-width: 1400px) {
  .sandbox-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 60dvh 36dvh;
    width: 96vw;
    height: auto;
    max-height: none;
  }

  .pantalla[data-pantalla="sandbox"] {
    overflow-y: auto;
    justify-content: flex-start;
    padding: 1.5rem 0;
  }

  .pantalla[data-pantalla="sandbox"] .boton-volver {
    position: static;
    align-self: flex-start;
    margin: 0 0 1rem 2vw;
  }
}

.sandbox-editor-columna, .sandbox-visualizador-columna {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.sandbox-archivo-actual {
  font-family: var(--fuente-mono);
  font-size: 0.8rem;
  color: var(--hueso-tenue);
  margin-bottom: 0.5rem;
}

.sandbox-editor { flex: 1; min-height: 0; }

.sandbox-tab {
  padding: 0.5rem 1.2rem;
  border-radius: 8px 8px 0 0;
  border: 1px solid var(--negro-borde);
  border-bottom: none;
  background: transparent;
  color: var(--hueso-tenue);
  cursor: pointer;
  font-family: var(--fuente-cuerpo);
}

.sandbox-tab.activa {
  background: var(--negro-panel);
  color: var(--hueso);
  border-color: var(--carmesi);
}

.sandbox-vista {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 0.75rem;
}

.sandbox-vista.activa { display: flex; }

#sandbox-consola {
  flex: 1;
  margin: 0;
  padding: 1rem;
  background: #100d0c;
  border-radius: var(--radio-borde);
  overflow: auto;
  font-family: var(--fuente-mono);
  font-size: 0.9rem;
  color: var(--hueso);
  white-space: pre-wrap;
}

#sandbox-canvas {
  background: white;
  border-radius: var(--radio-borde);
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}
