/* NÜX Factory · ภาพ 3 มิติ · กล่องฝังในหน้า v1.2.2 (โชว์รูม Model NF · กล่องเดียวกับ 1.1.0) · ตัวไทย ≥ 14 px (--qp-* ของหน้า) */
.nx3d { position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: 82vh; border-radius: var(--qp-r-card); overflow: hidden; border: 1px solid var(--qp-line); background: var(--qp-surface-2); isolation: isolate; }
.nx3d--portrait { aspect-ratio: 4 / 5; max-height: none; }   /* กล่องคอลัมน์ข้าง (เช่น บท Model) */
.nx3d__poster, .nx3d__poster img { position: absolute; inset: 0; width: 100%; height: 100%; }
.nx3d__poster img { object-fit: cover; display: block; }
.nx3d__poster--dark { display: none; }
[data-qp-theme="dark"] .nx3d__poster--dark { display: block; }
[data-qp-theme="dark"] .nx3d__poster--light { display: none; }
.nx3d__cap { position: absolute; left: 16px; top: 16px; margin: 0; display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--qp-r-pill); background: color-mix(in srgb, var(--qp-surface) 82%, transparent); font-size: 14px; line-height: 1.6; color: var(--qp-ink-2); }
.nx3d__cap::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--qp-src-sim); }
.nx3d__m { font: 600 14px/1.6 var(--qp-font-mono); color: var(--qp-ink); white-space: nowrap; }
.nx3d__m::after { content: " ·"; font-weight: 400; color: var(--qp-ink-2); }
.nx3d__note { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); max-width: calc(100% - 32px); margin: 0; padding: 1px 10px; border-radius: 10px; background: color-mix(in srgb, var(--qp-surface) 70%, transparent); font-size: 14px; line-height: 1.5; color: var(--qp-ink-2); width: max-content; text-align: center; text-wrap: balance; }
.nx3d__go { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.nx3d__go[hidden] { display: none; }
.nx3d__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .6s var(--qp-ease); color-scheme: normal; }
.nx3d.is-ready .nx3d__frame { opacity: 1; }
.nx3d.is-loading::after { content: ""; position: absolute; right: 16px; top: 16px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--qp-line-strong); border-top-color: var(--qp-green); animation: nx3d-spin 1s linear infinite; }
@keyframes nx3d-spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .nx3d { aspect-ratio: 4 / 5; }
  .nx3d.is-3d { aspect-ratio: auto; height: min(84svh, 680px); max-height: none; }
}
@media (prefers-reduced-motion: reduce) { .nx3d__frame { transition: none; } .nx3d.is-loading::after { animation: none; } }
/* 1.2.2: ข้อความของหน้า (ป้ายชื่อชุด · บรรทัดเงื่อนไข · ป้ายสถานะ) อยู่เหนือฉากเสมอ · ฉาก z-index 0 */
.nx3d__frame { z-index: 0; }
.nx3d__cap, .nx3d__note, .nx3d__test { z-index: 2; }
.nx3d__test { position: absolute; left: 12px; top: 12px; margin: 0; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 24px); padding: 3px 12px; border-radius: var(--qp-r-pill); border: 1px solid color-mix(in srgb, var(--qp-gold) 55%, var(--qp-line)); background: color-mix(in srgb, var(--qp-surface) 88%, transparent); font-size: 14px; font-weight: 600; line-height: 1.6; color: var(--qp-ink); pointer-events: none; }
.nx3d__test::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--qp-gold); }
.nx3d__test[hidden] { display: none; }
.nx3d__cap ~ .nx3d__test { top: 52px; }   /* หน้าที่มีป้ายชื่อชุดมุมบนซ้าย = ป้ายสถานะอยู่ใต้ */
