/* ═══════════════════════════════════════════
   Sandbox browser overlay
   All sizing uses vw/vh/clamp() so the layout
   scales proportionally on any screen size.
   ═══════════════════════════════════════════ */

#sandbox-browser {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 15000;
  background: #050a18;
  padding: 2.2vh 1.6vw 2.6vh;
  box-sizing: border-box;
  color: #e9edf8;
  pointer-events: all;
}

#sandbox-browser.visible {
  display: flex;
  flex-direction: column;
}

#sandbox-browser-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1vw;
  flex-shrink: 0;
}

#sandbox-browser-title {
  font-size: clamp(1rem, 2vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.03em;
}

#sandbox-browser-subtitle {
  margin-top: 0.5vh;
  color: rgba(233, 237, 248, 0.78);
  font-size: clamp(0.7rem, 1vw, 1.8rem);
  flex-shrink: 0;
}

#sandbox-exit-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(232, 72, 85, 0.22);
  color: #fff;
  font-size: clamp(0.7rem, 1vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 0.5vw;
  padding: 0.6vh 1.1vw;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

#sandbox-exit-btn:hover {
  background: rgba(232, 72, 85, 0.35);
  transform: translateY(-1px);
}

#sandbox-columns {
  margin-top: 1vh;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(4, auto);
  gap: clamp(0.4rem, 0.6vw, 1.2rem);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.2vh 0.2vw 0.5vh;
  flex: 1;
  min-height: 0; /* allow flex child to shrink and scroll */
}

.sandbox-column {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: clamp(0.3rem, 0.5vw, 1rem);
  padding: 1vh 0.8vw;
}

.sandbox-location-title {
  margin: 0 0 0.6vh;
  color: #ffd86f;
  font-size: clamp(0.65rem, 0.9vw, 1.6rem);
  font-weight: 700;
  line-height: 1.3;
}

.sandbox-item-list {
  display: flex;
  flex-direction: column;
  gap: clamp(0.2rem, 0.35vh, 0.6rem);
}

.sandbox-item {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fbff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: clamp(0.25rem, 0.35vw, 0.7rem);
  padding: 0.5vh 0.6vw;
  font-size: clamp(0.6rem, 0.8vw, 1.4rem);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.sandbox-item:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.38);
}

.sandbox-item[data-kind="ending"] {
  background: rgba(255, 205, 86, 0.2);
  border-color: rgba(255, 230, 153, 0.45);
  color: #fff7db;
}

.sandbox-item[data-kind="ending"]:hover {
  background: rgba(255, 205, 86, 0.32);
}

.sandbox-loading,
.sandbox-empty {
  color: rgba(233, 237, 248, 0.78);
  padding: 1vh 1vw;
  font-size: clamp(0.7rem, 1vw, 1.8rem);
}
