/* NÜXGROW · หน้า /devices (NÜX Device) แบบโชว์รูม v0.2.0 (16 ต.ค. 2569) · คู่กับ /qp/devices.js · ต่อจาก bento.css + app.css
   เวทีสินค้า: อุปกรณ์ 6 อย่างบนแท่นใต้สปอตไลต์ · ตัวที่เลือกใหญ่กลางเวที + ชื่อ + หน้าที่ · ไล่เอง/กดเลือก
   ตัวเครื่อง = สัญลักษณ์ CSS ล้วน (ภาพประกอบ ไม่ใช่แบบจริง) · ข้อความจาก lib/device-family.js · ลดการเคลื่อนไหว = นิ่ง */

.nd { --svc: var(--sim-spec-600, var(--qp-data-3)); }
.nd .bx__hd { min-height: 44px; }
.nd .bx__t { font-size: 13px; color: var(--qp-ink); }
.nd-hero .bx__bd { justify-content: center; gap: 16px; padding: 26px 24px; }
.nd-hero .bx__title { font-size: clamp(30px, 2.8vw, 42px); line-height: 1.15; }
.nd-hero .bx__lead { font-size: 16px; }

/* ── เวทีสินค้า ── */
.nd-stage { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); min-height: 480px; overflow: hidden;
  background: radial-gradient(70% 70% at 32% 0%, color-mix(in srgb, var(--svc) 22%, transparent), transparent 64%), radial-gradient(60% 24% at 32% 100%, color-mix(in srgb, var(--svc) 16%, transparent), transparent 72%), var(--qp-bg); }
.nd-badge { position: absolute; top: 14px; left: 16px; z-index: 4; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 14px; color: var(--qp-ink-2);
  border: 1px solid color-mix(in srgb, var(--qp-src-sim) 55%, transparent); background: color-mix(in srgb, var(--qp-bg) 60%, transparent); }
.nd-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--qp-src-sim); }
.nd-tog { position: absolute; top: 10px; right: 12px; z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--v-glass-line, var(--qp-line)); background: color-mix(in srgb, var(--qp-bg) 60%, transparent); color: var(--qp-ink); cursor: pointer; }
.nd-tog:focus-visible, .nd-p:focus-visible { outline: 2px solid var(--qp-green); outline-offset: 3px; }
.nd-main { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 18px; padding: 70px 24px 26px; }
.nd-main::before { content: ""; position: absolute; left: 50%; top: 0; width: 70%; height: 82%; transform: translateX(-50%); z-index: -1; pointer-events: none;   /* สปอตไลต์ */
  background: linear-gradient(180deg, color-mix(in srgb, var(--svc) 4%, transparent), color-mix(in srgb, var(--svc) 22%, transparent)); clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); }
.nd-big { position: relative; height: 210px; display: flex; align-items: flex-end; justify-content: center; }
.nd-big .nd-ico { font-size: 34px; filter: drop-shadow(0 0 30px color-mix(in srgb, var(--svc) 55%, transparent)); animation: ndFloat 5s ease-in-out infinite; }
.nd-big.is-swap .nd-ico { animation: ndIn .6s var(--qp-ease) backwards, ndFloat 5s ease-in-out .6s infinite; }
@keyframes ndFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes ndIn { from { opacity: 0; scale: .8; translate: 0 18px; } }
.nd-plinth { width: min(320px, 80%); height: 34px; margin-top: -8px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--svc) 60%, transparent), color-mix(in srgb, var(--svc) 10%, transparent) 70%, transparent); }
.nd-cap { position: relative; text-align: center; min-height: 118px; }
.nd-cap__m { display: block; font-family: var(--qp-font-mono); font-size: clamp(34px, 3.2vw, 48px); font-weight: 500; line-height: 1.05; color: var(--qp-ink); letter-spacing: .02em; }
.nd-cap__n { display: block; margin-top: 4px; font-size: 18px; font-weight: 600; color: var(--svc); }
.nd-cap__d { display: block; max-width: 46ch; margin: 6px auto 0; font-size: 15px; line-height: 1.55; color: var(--qp-ink-2); }
.nd-cap.is-swap > * { animation: ndIn .5s var(--qp-ease) backwards; }
.nd-cap.is-swap > :nth-child(2) { animation-delay: 60ms; } .nd-cap.is-swap > :nth-child(3) { animation-delay: 120ms; }
.nd-side { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 66px 22px 22px; border-left: 1px solid color-mix(in srgb, var(--svc) 18%, var(--qp-line)); }
.nd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.nd-p { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; width: 100%; min-height: 128px; padding: 14px 6px 10px; border-radius: 14px; border: 1px solid var(--qp-line);
  background: color-mix(in srgb, var(--qp-surface) 60%, transparent); color: var(--qp-ink-2); font: inherit; cursor: pointer; transition: border-color .4s, background .4s, box-shadow .4s, color .4s; }
.nd-p .nd-ico { font-size: 10px; transition: transform .5s var(--qp-ease), filter .5s; filter: saturate(.5) brightness(.85); }
.nd-p b { font-family: var(--qp-font-mono); font-size: 14px; font-weight: 500; letter-spacing: .06em; }
.nd-p.is-on { color: var(--qp-ink); border-color: color-mix(in srgb, var(--svc) 70%, var(--qp-line)); background: color-mix(in srgb, var(--svc) 12%, var(--qp-surface)); box-shadow: 0 0 26px -8px var(--svc); }
.nd-p.is-on .nd-ico { transform: translateY(-4px); filter: drop-shadow(0 0 10px color-mix(in srgb, var(--svc) 70%, transparent)); }
.nd-spec { display: flex; align-items: baseline; gap: 10px 20px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--svc) 22%, var(--qp-line)); }
.nd-spec b { font-family: var(--qp-font-mono); font-size: clamp(40px, 3.2vw, 52px); font-weight: 500; line-height: 1; color: var(--svc); }
.nd-spec span { font-size: 14px; color: var(--qp-ink-2); }
.nd-note { margin: 0; font-size: 14px; line-height: 1.55; color: var(--qp-muted); }

/* ── สัญลักษณ์อุปกรณ์ (ภาพประกอบ ไม่ใช่แบบจริง) · หน่วย em → ใช้ได้ทั้งตัวใหญ่กลางเวทีและตัวเล็ก ── */
.nd-ico { position: relative; display: block; --b: color-mix(in srgb, var(--svc) 55%, var(--qp-line-strong)); border: .15em solid var(--b); border-radius: 1em;
  background: linear-gradient(160deg, color-mix(in srgb, var(--qp-ink) 10%, var(--qp-surface)), var(--qp-surface-2)); }
.nd-ico::after { content: ""; position: absolute; width: .6em; height: .6em; border-radius: 50%; background: var(--svc); box-shadow: 0 0 .8em var(--svc); }
.nd-ico--core { width: 4.6em; height: 7.4em; }
.nd-ico--core::after { left: .8em; top: 1em; box-shadow: 0 0 .8em var(--svc), 0 1.2em 0 var(--svc), 0 2.4em 0 color-mix(in srgb, var(--svc) 40%, transparent); }
.nd-ico--core::before { content: ""; position: absolute; left: .8em; right: .8em; bottom: 1em; height: 1.4em; border-radius: .3em; background: repeating-linear-gradient(90deg, var(--b) 0 .2em, transparent .2em .6em); opacity: .7; }
.nd-ico--hub { width: 7.2em; height: 4.6em; }
.nd-ico--hub::after { left: 1em; top: 1em; }
.nd-ico--hub::before { content: ""; position: absolute; left: 1em; right: 1em; bottom: 1em; height: .4em; border-radius: .2em; background: linear-gradient(90deg, var(--svc), transparent); opacity: .8; }
.nd-ico--pod { width: 5em; height: 5em; border-radius: 1.2em; }
.nd-ico--pod::after { right: .9em; top: .9em; }
.nd-ico--pod::before { content: ""; position: absolute; left: .9em; bottom: .9em; width: 2.2em; height: 1em; background: radial-gradient(circle at .5em .5em, var(--b) .3em, transparent .35em), radial-gradient(circle at 1.7em .5em, var(--b) .3em, transparent .35em); }
.nd-ico--sense { width: 3.2em; height: 6em; border-radius: 1.6em; }
.nd-ico--sense::after { left: 50%; top: .9em; margin-left: -.3em; }
.nd-ico--sense::before { content: ""; position: absolute; left: .7em; right: .7em; top: 2.4em; bottom: .9em; border-radius: .4em; background: repeating-linear-gradient(180deg, var(--b) 0 .2em, transparent .2em .6em); opacity: .7; }
.nd-ico--view { width: 7.8em; height: 5em; border-radius: .8em; }
.nd-ico--view::before { content: ""; position: absolute; inset: .6em; border-radius: .4em; background: linear-gradient(135deg, color-mix(in srgb, var(--svc) 35%, transparent), transparent 70%); }
.nd-ico--view::after { right: .9em; bottom: .9em; }
.nd-ico--bus { width: 5.8em; height: 5.8em; border-radius: 50%; border-width: .5em; background: none; }
.nd-ico--bus::after { left: 50%; top: -.6em; margin-left: -.3em; }

/* ── ทำงานกับแอป + สิ่งที่ได้ในแอป (แถวเดียวกัน สูงเท่ากัน) ── */
.nd-app .bx__sim { flex: 1 1 auto; display: flex; align-items: stretch; padding: 12px; background: radial-gradient(70% 60% at 50% 0%, color-mix(in srgb, var(--qp-green) 10%, transparent), transparent 70%); }
.nd-app .bx__sim > [data-sim] { width: 100%; }
.nd-feat .bx-feat { flex: 1 1 auto; display: grid; grid-auto-rows: 1fr; }
.nd-feat .bx-feat > li { align-content: center; }

/* ── จอแคบ ── */
@media (max-width: 1000px) { .nd-stage { grid-template-columns: minmax(0, 1fr); } .nd-side { border-left: 0; border-top: 1px solid var(--qp-line); padding-top: 18px; } }
@media (max-width: 700px) {
  .nd-main { padding: 64px 12px 18px; }
  .nd-big { height: 160px; }
  .nd-big .nd-ico { font-size: 24px; }
  .nd-cap { min-height: 140px; }
  .nd-side { padding: 16px 12px; }
  .nd-p { min-height: 108px; }
  .nd-p .nd-ico { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) { .nd *, .nd *::before, .nd *::after { animation: none !important; transition: none !important; } }
.nd-stage.is-paused * { animation-play-state: paused !important; }

/* ปรับ: สปอตไลต์จางที่ปลาย (ไม่มีขอบล่างแข็ง) · แถบเลขใต้ตัวจำลองแอป */
.nd-main::before { height: 92%; background: linear-gradient(180deg, color-mix(in srgb, var(--svc) 4%, transparent), color-mix(in srgb, var(--svc) 20%, transparent) 55%, transparent); }
.nd-app { --svc: var(--qp-green); }
.nd-app .bx__sim { flex-direction: column; gap: 10px; }
.nd-app .nd-spec { padding: 10px 4px 2px; }
.nd-app .nd-spec b { font-size: clamp(32px, 2.6vw, 40px); }
.nd-app .nd-spec > div { display: inline-flex; align-items: baseline; gap: 8px; }

/* ── จอแรกแบบ /we-grow · v0.2.0 (29 ต.ค. 69): หัว + สถานะ (5 ช่อง) คู่เวทีสินค้า (7 ช่อง) ── */
.nd-hero .nd-st { border-top: 1px solid var(--qp-line); }
.nd-hero .nd-st > .bx__hd { min-height: 36px; border-bottom: 1px solid var(--qp-line); }
.nd-hero .nd-st .bx-rows > li { padding-top: 8px; padding-bottom: 8px; }
.nd-fam .nd-stage { flex: 1 1 auto; min-height: 440px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.nd-fam .nd-main { padding: 60px 16px 20px; }
.nd-fam .nd-big { height: 180px; }
.nd-fam .nd-side { padding: 56px 16px 16px; gap: 12px; }
.nd-fam .nd-grid { gap: 8px; }
@media (max-width: 1100px) { .nd-fam .nd-stage { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
@media (max-width: 1000px) { .nd-fam .nd-stage { grid-template-columns: minmax(0, 1fr); } }
.nd-nw { white-space: nowrap; }   /* หัวไทย: "ห้องปลูก" ห้ามแยกบรรทัด */
