/* Isolated Grade 9 3D Interactive Enhancement Layer (non-intrusive!) */
.g9-3d-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #e2e8f0;
  font-size: 12px;
  position: relative;
  z-index: 25;
}

.g9-3d-tabs {
  display: inline-flex;
  gap: 4px;
  background: rgba(2, 6, 23, 0.78);
  padding: 3px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.g9-3d-tab {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.g9-3d-tab.is-active {
  background: #22d3ee;
  color: #020617;
}

.g9-3d-viewport {
  position: relative;
  width: 100%;
  height: 360px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: #060b16;
  margin-bottom: 12px;
  touch-action: none;
}

.g9-3d-viewport.hidden {
  display: none !important;
  pointer-events: none !important;
}

.g9-3d-hud {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
  z-index: 10;
}

.g9-3d-chip {
  pointer-events: auto;
  background: rgba(2, 6, 23, 0.84);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  padding: 4px 8px;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
}

.g9-3d-btn {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 7px;
  padding: 4px 9px;
  color: #e2e8f0;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.g9-3d-btn:hover {
  border-color: #22d3ee;
  color: #22d3ee;
}

.g9-3d-tip {
  position: absolute;
  bottom: 10px;
  left: 10px;
  max-width: 340px;
  background: rgba(2, 6, 23, 0.92);
  border: 1px solid #22d3ee;
  border-radius: 10px;
  padding: 8px 11px;
  color: #f1f5f9;
  font-size: 11px;
  z-index: 12;
}

.g9-3d-tip.hidden {
  display: none !important;
}
