/* Stadium Lab — experimental 3D stadium (God Mode preview). Reuses
   .stadium-pip / .stadium-meter / .stadium-tag from stadium.css. */

.stadium-lab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
}
.stadium-lab-head h3 { margin: 0 0 4px; }

.stadium-lab-tag {
  font-size: var(--fs-sm);
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 1px 8px;
  margin-left: 6px;
  vertical-align: middle;
}

.stadium-lab-levels {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s3);
  flex-wrap: wrap;
}
.seg { display: inline-flex; gap: 4px; }
.seg button {
  min-width: 30px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.seg button:hover:not(.on) { border-color: var(--gold); }
.seg button.on { background: var(--gold); color: #1a1300; border-color: var(--gold); font-weight: 700; }

.stadium-3d-stepper {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s4);
}
.stadium-3d-stepper .btn {
  width: auto;
  min-width: 46px;
  font-size: 18px;
  line-height: 1;
  padding: 8px 0;
}
.stadium-3d-level {
  flex: 1;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.stadium-lab-stats { display: flex; gap: var(--s5); }
.stadium-lab-stats .metric { display: flex; flex-direction: column; align-items: flex-end; }
.stadium-lab-stats .metric .n { font-size: var(--fs-title); font-weight: 700; color: var(--text); }
.stadium-lab-stats .metric .l { font-size: var(--fs-sm); color: var(--text-2); }

.stadium-lab-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--s4);
  align-items: start;
  margin-top: var(--s4);
}

.stadium-3d-view {
  position: relative;
  width: 100%;
  height: clamp(360px, 60vh, 640px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: radial-gradient(120% 120% at 50% 0%, #16202e 0%, #0b0e14 70%);
  cursor: grab;
  touch-action: none;
}
.stadium-3d-view:active { cursor: grabbing; }
.stadium-3d-view canvas { display: block; width: 100%; height: 100%; }

.lab-select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 4px 8px;
  font-size: var(--fs-sm);
  max-width: 220px;
}

.stadium-3d-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 5;
  background: rgba(8, 10, 14, 0.66);
  color: var(--text);
  font-size: var(--fs-body);
  backdrop-filter: blur(2px);
}
.stadium-3d-loading::before {
  content: '';
  width: 18px; height: 18px;
  border: 2px solid var(--text-2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: lab-spin 0.8s linear infinite;
}
@keyframes lab-spin { to { transform: rotate(360deg); } }

.stadium-3d-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s5);
  text-align: center;
  color: var(--text-2);
}

.stadium-3d-panel {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: var(--s4);
  min-height: 160px;
  position: sticky;
  top: var(--s4);
}
.stadium-3d-empty { color: var(--text-2); font-size: var(--fs-sm); }

.stadium-3d-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s3);
}
.stadium-3d-panel-name { font-size: var(--fs-h3); font-weight: 700; }

.stadium-3d-panel .stadium-meter { margin: var(--s2) 0 var(--s3); }

.stadium-3d-panel-impact { margin-bottom: var(--s4); }
.stadium-3d-panel-impact .stadium-impact-row {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  font-size: var(--fs-sm);
  padding: 3px 0;
}
.stadium-3d-panel-impact .stadium-impact-key { color: var(--text-2); }

.stadium-3d-panel .btn { width: 100%; }

.stadium-lab-note { margin-top: var(--s4); font-size: var(--fs-sm); }

@media (max-width: 860px) {
  .stadium-lab-grid { grid-template-columns: 1fr; }
  .stadium-3d-panel { position: static; }
}
