/* parts.html: 3D section viewer + part panel */
.nav a.is-current { color: var(--text); }
.viewer { padding: 120px 0 80px; background:
  radial-gradient(1000px 500px at 80% 0%, rgba(139, 123, 255, .22), transparent 60%),
  linear-gradient(180deg, #14123a 0%, var(--bg) 420px); }
.viewer__intro { margin-bottom: 36px; }
.viewer__intro h1 { font-size: clamp(2rem, 4vw, 3.1rem); margin-bottom: 14px; }
.viewer__grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }

.stage {
  position: relative; height: min(72vh, 720px); min-height: 420px;
  border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(120% 90% at 50% 30%, #262b4d 0%, #12152b 60%, #0d0f1f 100%);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
#scene { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#scene.is-hover { cursor: pointer; }
.stage__loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px;
  color: var(--muted); font-weight: 600; transition: opacity .4s;
}
.stage__loading.is-done { opacity: 0; pointer-events: none; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--a1); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stage__tip {
  position: absolute; pointer-events: none; transform: translate(-50%, calc(-100% - 14px));
  padding: 6px 12px; border-radius: 10px; white-space: nowrap;
  background: rgba(11, 13, 23, .85); border: 1px solid rgba(255,255,255,.14); font-size: .85rem; font-weight: 600;
}
.stage__hint { position: absolute; left: 16px; bottom: 12px; margin: 0; font-size: .78rem; color: var(--muted); pointer-events: none; }
.stage__back { position: absolute; right: 16px; top: 16px; background: rgba(11, 13, 23, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

.panel {
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  padding: 26px 24px; max-height: min(72vh, 720px); min-height: 420px; overflow: auto;
}
.panel__pick { color: var(--muted); margin: 0 0 6px; }
.panel__part h2 { font-size: 1.5rem; margin-bottom: 16px; }
.facts { margin: 0 0 8px; }
.facts > div { padding: 12px 0; border-top: 1px solid var(--line); }
.facts > div:first-child { border-top: 0; padding-top: 0; }
.facts dt { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--a2); margin-bottom: 4px; }
.facts dd { margin: 0; color: var(--text); font-size: .95rem; line-height: 1.55; }
.panel__list-title { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 22px 0 12px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); cursor: pointer;
  font: 600 .82rem/1 inherit; padding: 9px 12px; border-radius: 999px; transition: background .2s, border-color .2s;
}
.chips button:hover { border-color: rgba(139, 123, 255, .5); }
.chips button[aria-pressed="true"] { background: var(--grad); border-color: transparent; color: #fff; }
.chips i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 0; }

@media (max-width: 1020px) {
  .viewer__grid { grid-template-columns: 1fr; }
  .stage { height: 62vh; min-height: 360px; }
  .panel { max-height: none; min-height: 0; }
}
@media (max-width: 820px) {
  .viewer { padding-top: 100px; }
  .stage { height: 56vh; }
  .stage__hint { display: none; }
}
