/* NJ669 (3D-детали): только то, что нельзя выразить классами Tailwind.
   Вёрстка страниц — Tailwind (app.css), как в /graph3d. Здесь — общий GLB-просмотрщик
   nj667-stl.js: он сам создаёт сетку, подписи и спиннер и ждёт их стилей на странице. */
#nj667-stl { position: relative; flex: 1 1 auto; min-height: clamp(240px, 44vh, 460px); max-height: clamp(280px, 62vh, 680px); overflow: hidden; touch-action: none; border-radius: 0.75rem; background: #f3f4f6; }
#nj667-stl canvas { display: block; width: 100%; height: 100%; }
html.dark #nj667-stl { background: #111827; }
#nj667-stl:fullscreen { width: 100vw; height: 100vh; max-height: none; min-height: 0; background: #fff; }
html.dark #nj667-stl:fullscreen { background: #111827; }
#nj667-stl .nj667-stl-note { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12px; text-align: center; font-size: 12px; color: #4b5563; }
html.dark #nj667-stl .nj667-stl-note { color: #9ca3af; }
#nj667-stl .nj667-stl-ticks { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
#nj667-stl .nj667-stl-tick { position: absolute; transform: translate(-50%, -50%); font-size: 11px; color: #4b5563; white-space: nowrap; }
html.dark #nj667-stl .nj667-stl-tick { color: #9ca3af; }
#nj667-stl .nj667-stl-tools { position: absolute; left: 8px; top: 8px; z-index: 5; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.5rem; border-radius: 0.375rem; border: 1px solid #e5e7eb; background: rgba(255, 255, 255, 0.9); }
html.dark #nj667-stl .nj667-stl-tools { background: rgba(17, 24, 39, 0.9); border-color: #374151; color: #e5e7eb; }
#nj667-stl-full { position: absolute; right: 8px; top: 8px; z-index: 5; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 0.5rem; border: 1px solid #d1d5db; background: rgba(255, 255, 255, 0.9); color: #374151; cursor: pointer; }
#nj667-stl-full:hover { background: #fff; }
html.dark #nj667-stl-full { background: rgba(17, 24, 39, 0.85); border-color: #374151; color: #e5e7eb; }
.nj667-spin-ring { display: inline-block; width: 12px; height: 12px; border-radius: 9999px; border: 2px solid #2563eb; border-right-color: transparent; animation: nj669-spin 0.8s linear infinite; }
.nj667-busy { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 11px; color: #4b5563; }
html.dark .nj667-busy { color: #9ca3af; }
.nj667-busy-clock { font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; font-weight: 600; color: #111827; }
html.dark .nj667-busy-clock { color: #f9fafb; }
@keyframes nj669-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .nj667-spin-ring { animation-duration: 2.4s; } }
@media print { #nj667-stl { display: none; } }

/* Страница детали: вкладки левой колонки и вьювер, растянутый на высоту экрана (xl). */
.nj669-tab:focus-visible { outline: 2px solid #3b82f6; outline-offset: 1px; }
@media (min-width: 1280px) {
	.nj669-fill #nj667-stl { flex: 1 1 0; min-height: 0; max-height: none; }
}
