/* Smile Studio — page-only styling. Loaded only on /smile-studio/. */

.studio-hero {
  background: radial-gradient(1100px 560px at 80% -10%, rgba(34, 196, 163, 0.16), transparent 60%),
    radial-gradient(900px 520px at -5% 20%, rgba(37, 117, 235, 0.16), transparent 60%),
    linear-gradient(180deg, #f5fbff, #ffffff);
  padding-block: clamp(40px, 6vw, 72px);
}

.studio-exp {
  padding-block: clamp(48px, 7vw, 88px);
}
.studio-exp:nth-child(even) {
  background: var(--bg-soft);
}
.studio-head {
  max-width: 720px;
  margin: 0 auto clamp(28px, 4vw, 44px);
  text-align: center;
}
.studio-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 14px;
}

/* canvas stage — brand-tinted gradient behind a transparent WebGL canvas */
.stage {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(160deg, #eaf5ff 0%, #e5faf4 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  min-height: 340px;
}
.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}
.stage-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.76rem;
  padding: 6px 14px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.stage.ready .stage-hint {
  opacity: 1;
}
.stage-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-size: 0.9rem;
  gap: 10px;
}
.stage.ready .stage-loading {
  display: none;
}
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid var(--blue-200);
  border-top-color: var(--blue-600);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Experience A — explorer layout */
.explorer-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  align-items: stretch;
}
.explorer-grid .stage {
  min-height: 440px;
}
.tooth-info {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
}
.tooth-info h3 {
  font-size: 1.15rem;
}
.tooth-info .muted {
  color: var(--ink-3);
  font-size: 0.85rem;
}
.tooth-info .role-badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--mint-50);
  color: var(--mint-700);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  margin: 10px 0;
}
.tooth-info ul {
  padding-left: 1.1rem;
  margin: 8px 0 14px;
  font-size: 0.9rem;
}
.tooth-info .treat-links {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.tooth-info .treat-links a {
  display: inline-block;
  font-size: 0.86rem;
  font-weight: 600;
  margin: 4px 10px 4px 0;
}
.tooth-select-label {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-3);
  margin-top: 14px;
}

/* Experience B — braces slider */
.braces-slider-track {
  position: relative;
  margin: 22px auto 0;
  max-width: 460px;
  height: 46px;
}
.braces-range {
  width: 100%;
  height: 46px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.braces-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-200), var(--mint-500));
}
.braces-range::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-200), var(--mint-500));
}
.braces-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 34px;
  height: 34px;
  margin-top: -13px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--blue-600);
  box-shadow: var(--shadow-1);
}
.braces-range::-moz-range-thumb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--blue-600);
  box-shadow: var(--shadow-1);
}
.braces-labels {
  display: flex;
  justify-content: space-between;
  max-width: 460px;
  margin: 6px auto 0;
  font-size: 0.82rem;
  font-weight: 700;
}
.braces-labels .before {
  color: var(--ink-3);
}
.braces-labels .after {
  color: var(--mint-700);
}

/* Fallbacks (shown when body.no-3d) */
.fallback {
  display: none;
}
body.no-3d .stage {
  display: none;
}
body.no-3d .fallback {
  display: block;
}
body.no-3d .stage-hint,
body.no-3d .tooth-select-label {
  display: none;
}
.fallback-poster {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 26px;
  box-shadow: var(--shadow-1);
}

/* model attribution */
.studio-credit {
  margin-top: 22px;
  text-align: center;
  font-size: 0.76rem;
  color: var(--ink-3);
}
.studio-credit a {
  color: var(--ink-3);
  text-decoration: underline;
}
.studio-credit a:hover {
  color: var(--blue-700);
}

@media (max-width: 880px) {
  .explorer-grid {
    grid-template-columns: 1fr;
  }
  .explorer-grid .stage {
    min-height: 360px;
  }
}
