/* ═══ หน้าแรก — ส่วนใหม่ (อัปเดตล่าสุด · เว็บข้อมูลผู้เล่น · AI · หลังบ้านในไลน์ · CPBotPay) ═══
   คลาสขึ้นต้น nx- / hm- / py- ทั้งหมด (app.css ใหญ่ ชื่อชนกันง่าย) · ใช้โทเคนสีจาก app.css
   ════════════════════════════════════════════════════════════════════════════════════ */

/* ── ป้าย "ใหม่" บน hero ─────────────────────────────────────────────── */
.nx-newpill {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin: 0 0 16px; padding: 6px 14px 6px 8px;
  border-radius: 99px; font-size: .82rem; color: var(--muted); background: rgba(245, 158, 11, .1);
  border: 1px solid rgba(139, 92, 246, .35); box-shadow: 0 0 22px rgba(139, 92, 246, .12); transition: .25s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nx-newpill:hover { border-color: var(--cyan); color: var(--text); transform: translateY(-1px); }
.nx-newpill b { background: var(--grad); color: #04210f; padding: 1px 9px; border-radius: 99px; font-size: .72rem; }
.nx-newpill em { font-style: normal; color: var(--cyan); font-weight: 700; font-family: var(--mono); }
.nx-newpill i { font-style: normal; color: var(--cyan); transition: transform .25s; }
.nx-newpill:hover i { transform: translateX(3px); }
.nx-newpill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); flex: none; animation: live 1.6s infinite; }

/* ── อัปเดตล่าสุด ───────────────────────────────────────────────────── */
.nx-upd { display: grid; grid-template-columns: 330px 1fr; gap: 22px; align-items: start; }
.nx-radar { padding: 22px; border-radius: var(--radius); position: sticky; top: 96px; }
.nx-radar-ring { position: relative; width: 170px; height: 170px; margin: 0 auto 14px; }
.nx-radar-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.nx-radar-ring .trk { fill: none; stroke: rgba(139, 92, 246, .12); stroke-width: 10; }
.nx-radar-ring .val { fill: none; stroke: url(#nxr); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 415; stroke-dashoffset: 415; transition: stroke-dashoffset 1.2s var(--ease); filter: drop-shadow(0 0 6px rgba(139, 92, 246, .6)); }
.nx-radar-ring .dash { fill: none; stroke: rgba(191, 165, 250, .3); stroke-width: 1; stroke-dasharray: 2 7; }
.nx-radar-ring .sweep { stroke: rgba(191, 165, 250, .55); stroke-width: 2; transform-origin: 80px 80px; animation: ico-spin 4s linear infinite; filter: drop-shadow(0 0 4px #8b5cf6); }
.nx-radar-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.nx-radar-txt b { font-family: var(--mono); font-size: 2.6rem; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nx-radar-txt small { color: var(--muted); font-size: .78rem; margin-top: 4px; }
.nx-radar h4 { display: flex; justify-content: space-between; align-items: baseline; font-size: .9rem; margin: 6px 0 10px; }
.nx-radar h4 small { color: var(--dim); font-weight: 500; font-size: .72rem; }
.nx-tagbars { display: grid; gap: 7px; }
.nx-tagbars .tb { display: grid; grid-template-columns: 82px 1fr 22px; gap: 8px; align-items: center; font-size: .78rem; color: var(--muted); }
.nx-tagbars .tb i { height: 7px; border-radius: 9px; background: rgba(139, 92, 246, .1); overflow: hidden; position: relative; }
.nx-tagbars .tb i::after { content: ""; position: absolute; inset: 0; width: var(--w, 0%); border-radius: 9px; background: linear-gradient(90deg, #f59e0b, #bfa5fa); box-shadow: 0 0 10px rgba(139, 92, 246, .55); transition: width 1s var(--spring); }
.nx-tagbars .tb b { font-family: var(--mono); color: var(--text); text-align: right; font-size: .78rem; }
.nx-radar-note { margin: 14px 0 0; font-size: .74rem; color: var(--dim); display: flex; align-items: center; gap: 6px; }

.nx-timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; display: grid; gap: 14px; }
.nx-timeline::before { content: ""; position: absolute; left: 25px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(180deg, var(--cyan), rgba(139, 92, 246, .05)); }
.nx-item { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; position: relative; }
.nx-ico {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; z-index: 1;
  background: linear-gradient(145deg, #0f2e1b, #20180a); border: 1px solid rgba(139, 92, 246, .4); box-shadow: 0 0 18px rgba(139, 92, 246, .18);
}
.nx-item:first-child .nx-ico { animation: ico-pulse 2.4s ease-in-out infinite; }
.nx-card { padding: 14px 16px; border-radius: 16px; transition: border-color .3s, transform .3s; }
.nx-card:hover { border-color: rgba(139, 92, 246, .45); transform: translateX(4px); }
.nx-card h3 { font-size: 1.02rem; margin: 6px 0 4px; }
.nx-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.nx-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nx-meta time { font-family: var(--mono); font-size: .74rem; color: var(--cyan); margin-right: 4px; }
.nx-fresh { animation: live 2s infinite; }
.nx-item.is-new .nx-card { animation: nx-arrive 1.6s var(--ease); border-color: var(--cyan); }
.nx-item.is-new .nx-ico { animation: nx-pop .7s var(--spring); }
@keyframes nx-arrive { 0% { opacity: 0; transform: translateY(-14px) scale(.98); box-shadow: 0 0 0 0 rgba(139, 92, 246, .7); } 40% { opacity: 1; transform: none; } 100% { box-shadow: 0 0 0 18px rgba(139, 92, 246, 0); } }
@keyframes nx-pop { 0% { transform: scale(0) rotate(-30deg); } 100% { transform: none; } }

/* ── เว็บข้อมูลผู้เล่น + สัตว์คู่หู ─────────────────────────────────────── */
.nx-hub { display: grid; grid-template-columns: 1fr 1.1fr; gap: 34px; align-items: center; }
.nx-points { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 14px; }
.nx-points li { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; }
.nx-points b { display: block; font-size: 1rem; }
.nx-points small { color: var(--muted); font-size: .86rem; }
.nx-pi {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; position: relative;
  background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
}
.nx-pi::after { content: ""; position: absolute; inset: -4px; border-radius: 17px; border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); animation: ring-out 2.6s ease-out infinite; }
.nx-points li:nth-child(2) .nx-pi::after { animation-delay: .5s; } .nx-points li:nth-child(3) .nx-pi::after { animation-delay: 1s; }
.nx-points li:nth-child(4) .nx-pi::after { animation-delay: 1.5s; } .nx-points li:nth-child(5) .nx-pi::after { animation-delay: 2s; }

.nx-hubmock { padding: 18px; border-radius: 26px; position: relative; overflow: hidden; }
.hm-top { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; }
.hm-av { width: 54px; height: 54px; border-radius: 50%; padding: 3px; background: conic-gradient(from var(--a, 0deg), #f59e0b, #bfa5fa, #eef2f5, #8b5cf6, #f59e0b); animation: spin-a 5s linear infinite; }
.hm-av span { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; background: #452c03; font-weight: 700; font-size: 1.2rem; }
.hm-who b { display: block; font-size: .98rem; }
.hm-live { font-size: .72rem; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; }
.hm-cr { text-align: right; }
.hm-cr small { color: var(--muted); font-size: .72rem; display: block; }
.hm-cr b { font-family: var(--mono); font-size: 1.35rem; color: #fff; display: inline-block; }
.hm-cr b.flash { animation: bump .7s var(--spring); color: var(--accent); }
.hm-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.hm-strip span { flex: 1 1 160px; padding: 8px 12px; border-radius: 12px; background: rgba(245, 158, 11, .1); border: 1px dashed rgba(139, 92, 246, .35); font-size: .8rem; color: var(--muted); }
.hm-strip b { color: var(--text); }
.hm-strip em { font-style: normal; font-family: var(--mono); color: var(--amber); margin-left: 4px; }
.hm-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.hm-box { padding: 12px; border-radius: 16px; background: rgba(23, 18, 10, .55); border: 1px solid var(--border); position: relative; min-height: 112px; }
.hm-box > small { display: block; color: var(--muted); font-size: .72rem; margin-bottom: 6px; }
.hm-ring { width: 74px; height: 74px; transform: rotate(-90deg); display: block; margin: 2px auto 0; }
.hm-ring .trk { fill: none; stroke: rgba(139, 92, 246, .12); stroke-width: 8; }
.hm-ring .val { fill: none; stroke: #8b5cf6; stroke-width: 8; stroke-linecap: round; stroke-dasharray: 201; stroke-dashoffset: 201; transition: stroke-dashoffset 1.2s var(--ease); filter: drop-shadow(0 0 5px rgba(139, 92, 246, .7)); }
.hm-ring-n { position: absolute; left: 0; right: 0; top: 58px; text-align: center; font-family: var(--mono); font-size: .95rem; }
.hm-bars { display: flex; align-items: flex-end; gap: 5px; height: 76px; }
.hm-bars span { flex: 1; display: flex; gap: 2px; align-items: flex-end; height: 100%; }
.hm-bars i { flex: 1; border-radius: 4px 4px 1px 1px; height: var(--h, 5%); transition: height .9s var(--spring); }
.hm-bars i.d { background: linear-gradient(180deg, #bfa5fa, #f59e0b); box-shadow: 0 0 8px rgba(139, 92, 246, .45); }
.hm-bars i.w { background: linear-gradient(180deg, #fb7185, rgba(244, 114, 182, .35)); }
.hm-mis { grid-column: 1; }
.hm-m { font-size: .74rem; color: var(--muted); margin: 5px 0; }
.hm-m i { display: block; height: 6px; border-radius: 9px; background: rgba(139, 92, 246, .12); margin-top: 3px; overflow: hidden; }
.hm-m em { display: block; height: 100%; width: 0; border-radius: 9px; background: linear-gradient(90deg, #f59e0b, #bfa5fa); transition: width 1.4s var(--ease); }
.hm-pets { grid-column: 2; }
.hm-pet { display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: center; margin: 4px 0; }
.hm-pet-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 1.2rem; background: rgba(245, 158, 11, .15); animation: ico-hop 2.4s ease-in-out infinite; }
.hm-pet.two .hm-pet-ic { animation-delay: 1.2s; background: rgba(230, 235, 234, .1); }
.hm-pet b { display: block; font-size: .78rem; }
.hm-pet em { font-style: normal; font-size: .72rem; color: var(--accent); }
.hm-roll { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; font-size: .74rem; color: var(--muted); }
.hm-dice { font-family: var(--mono); padding: 2px 8px; border-radius: 8px; background: rgba(23, 18, 10, .8); border: 1px solid var(--border); min-width: 62px; text-align: center; }
.hm-dice.rolling { color: var(--amber); }
.hm-res { margin-left: auto; font-weight: 700; }
.hm-res.ok { color: var(--accent); animation: bump .6s var(--spring); }
.hm-res.miss { color: var(--dim); }
.hm-tabs { display: flex; justify-content: space-between; gap: 4px; margin-top: 14px; padding: 6px; border-radius: 14px; background: rgba(23, 18, 10, .6); border: 1px solid var(--border); font-size: .72rem; color: var(--dim); }
.hm-tabs span { flex: 1; text-align: center; padding: 5px 0; border-radius: 10px; }
.hm-tabs span.on { background: rgba(245, 158, 11, .25); color: #fff; }

/* ── AI 5 ตัว ─────────────────────────────────────────────────────────── */
.nx-ai { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.nx-aicard { grid-column: span 2; padding: 18px; border-radius: var(--radius); display: flex; flex-direction: column; gap: 8px; transition: transform .35s var(--ease), border-color .35s; }
.nx-aicard:nth-child(4), .nx-aicard:nth-child(5) { grid-column: span 3; }
.nx-aicard:hover { transform: translateY(-4px); border-color: rgba(139, 92, 246, .45); }
.nx-aicard .chip { align-self: flex-start; }
.nx-aicard h3 { font-size: 1.05rem; margin: 2px 0 0; }
.nx-aicard p { margin: 0; color: var(--muted); font-size: .88rem; }
.nx-viz { height: 118px; border-radius: 14px; background: radial-gradient(ellipse at 50% 120%, rgba(245, 158, 11, .25), rgba(23, 18, 10, .6) 70%); border: 1px solid var(--border); position: relative; overflow: hidden; display: grid; place-items: center; margin-bottom: 4px; }
.nx-viz::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(191, 165, 250, .04) 0 1px, transparent 1px 4px); pointer-events: none; }
.nx-net { width: 92%; height: 92%; }
.nx-net line { stroke: rgba(191, 165, 250, .45); stroke-width: 1.6; stroke-dasharray: 5 5; animation: nx-flow 1.6s linear infinite; }
.nx-net line.hot { stroke: #fb7185; stroke-width: 2.2; filter: drop-shadow(0 0 4px #fb7185); }
.nx-net circle { fill: #452c03; stroke: #8b5cf6; stroke-width: 2; }
.nx-net circle.bad { stroke: #fb7185; fill: rgba(251, 113, 133, .2); animation: nx-alert 1.4s ease-in-out infinite; transform-origin: 95px 55px; }
@keyframes nx-flow { to { stroke-dashoffset: -20; } }
@keyframes nx-alert { 50% { transform: scale(1.25); filter: drop-shadow(0 0 8px #fb7185); } }
.nx-churn { align-content: center; justify-items: center; gap: 0; }
.nx-churn svg { width: 150px; height: 82px; }
.nx-churn .trk { fill: none; stroke: rgba(139, 92, 246, .14); stroke-width: 10; stroke-linecap: round; }
.nx-churn .val { fill: none; stroke: url(#nxr); stroke: #fbbf24; stroke-width: 10; stroke-linecap: round; stroke-dasharray: 158; stroke-dashoffset: 158; transition: stroke-dashoffset 1.4s var(--ease); filter: drop-shadow(0 0 6px rgba(251, 191, 36, .6)); }
.nx-churn b { position: absolute; top: 46px; font-family: var(--mono); font-size: 1.5rem; }
.nx-churn small { position: absolute; bottom: 8px; color: var(--muted); font-size: .7rem; }
.nx-spark { position: absolute; left: 0; right: 0; top: 10px; width: 100%; height: 48px; }
.nx-spark path { fill: none; stroke: #8b5cf6; stroke-width: 2.4; stroke-dasharray: 320; stroke-dashoffset: 320; animation: nx-draw 3.2s var(--ease) infinite; filter: drop-shadow(0 0 5px rgba(139, 92, 246, .8)); }
@keyframes nx-draw { 60%, 100% { stroke-dashoffset: 0; } }
.nx-type { position: absolute; left: 12px; right: 12px; bottom: 10px; margin: 0; font-size: .76rem; color: var(--text); min-height: 2.6em; }
.nx-type::after, .nx-dm-field::after { content: "▍"; color: var(--cyan); animation: ico-flick 1s steps(1) infinite; }
.nx-qa { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 10px; place-items: stretch; }
.nx-qa .q, .nx-qa .a { max-width: 88%; padding: 6px 10px; border-radius: 12px; font-size: .74rem; animation: feed-in .4s var(--ease); }
.nx-qa .q { align-self: flex-end; background: #f59e0b; color: #fff; border-bottom-right-radius: 4px; }
.nx-qa .a { align-self: flex-start; background: rgba(230, 235, 234, .1); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.nx-road { display: grid; grid-template-columns: repeat(12, 14px); grid-auto-rows: 14px; gap: 4px; }
.nx-road i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid; animation: nx-pop .4s var(--spring); }
.nx-road i.t { border-color: #f97316; background: rgba(249, 115, 22, .25); }
.nx-road i.d { border-color: #8b5cf6; background: rgba(139, 92, 246, .25); }
.nx-road i.e { border-color: #eef2f5; background: rgba(230, 235, 234, .2); }

/* ── หลังบ้านในไลน์ + Telegram ─────────────────────────────────────────── */
.nx-con { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 26px; justify-content: center; align-items: start; }
.nx-dm { border-radius: 28px; overflow: hidden; background: #8cabd9; border: 2px solid #243d2f; box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 40px rgba(245, 158, 11, .15); display: flex; flex-direction: column; height: 520px; }
.nx-dm header { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; background: #2b3a55; color: #fff; }
.nx-dm header small { display: block; opacity: .75; font-size: .72rem; }
.nx-dm-av { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: #20180a; box-shadow: 0 0 0 2px #06c755; }
.nx-dm-av img { width: 100%; height: 100%; object-fit: cover; }
.nx-dm-list { flex: 1; overflow: hidden; padding: 12px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.nx-dm .m { max-width: 86%; padding: 8px 12px; border-radius: 16px; font-size: .82rem; line-height: 1.45; animation: msg-in .35s var(--ease); color: #111; }
.nx-dm .m.me { align-self: flex-end; background: #06c755; color: #fff; border-bottom-right-radius: 4px; }
.nx-dm .m.bot { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; padding: 0; overflow: hidden; min-width: 230px; }
.nx-dm .card-h { background: linear-gradient(135deg, #452c03, #f59e0b); color: #fff; padding: 8px 12px; font-weight: 700; font-size: .82rem; }
.nx-dm .card-b { padding: 8px 12px; display: grid; gap: 3px; }
.nx-dm .card-b div { display: flex; justify-content: space-between; gap: 12px; font-size: .78rem; }
.nx-dm .card-b div b { font-family: var(--mono); }
.nx-dm .card-b .up { color: #196f3d; } .nx-dm .card-b .dn { color: #c0392b; }
.nx-dm .card-btn { margin: 4px 12px 10px; text-align: center; padding: 6px; border-radius: 9px; background: #f59e0b; color: #fff; font-weight: 700; font-size: .76rem; }
.nx-dm footer { display: flex; gap: 8px; align-items: center; padding: 10px 12px; background: #fff; color: #f59e0b; }
.nx-dm-field { flex: 1; min-height: 34px; padding: 7px 12px; border-radius: 99px; background: #f1f2f5; color: #111; font-size: .84rem; }
.nx-con-side { display: grid; gap: 16px; }
.nx-tg { padding: 14px; border-radius: var(--radius); }
.nx-tg-head { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 10px; }
.nx-tg-head .ico { color: var(--tg); font-size: 1.3rem; }
.nx-tg-head .chip { margin-left: auto; }
.nx-tg-list { display: grid; gap: 8px; min-height: 196px; align-content: start; }
.nx-tg-list .n { padding: 9px 12px; border-radius: 12px; background: rgba(42, 171, 238, .08); border: 1px solid rgba(42, 171, 238, .3); font-size: .8rem; animation: nx-arrive 1.2s var(--ease); }
.nx-tg-list .n b { display: block; font-size: .84rem; }
.nx-tg-list .n span { color: var(--muted); }
.nx-con-pts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nx-con-pts li { padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: .88rem; }
.nx-con-pts b { color: var(--text); display: block; margin-bottom: 2px; }

/* ── CPBotPay ─────────────────────────────────────────────────────────── */
.nx-payflow { display: flex; align-items: center; justify-content: center; gap: 0; margin: 0 auto 34px; max-width: 1040px; }
.py-step { display: grid; justify-items: center; text-align: center; gap: 2px; min-width: 120px; }
.py-step span { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; background: linear-gradient(145deg, #0f2e1b, #20180a); border: 1px solid rgba(139, 92, 246, .45); box-shadow: 0 0 20px rgba(139, 92, 246, .15); animation: ico-hop 3s ease-in-out infinite; }
.py-step:nth-child(3) span { animation-delay: .4s; } .py-step:nth-child(5) span { animation-delay: .8s; } .py-step:nth-child(7) span { animation-delay: 1.2s; } .py-step:nth-child(9) span { animation-delay: 1.6s; }
.py-step b { font-size: .88rem; margin-top: 6px; }
.py-step small { color: var(--muted); font-size: .74rem; }
.py-line { flex: 1; height: 2px; min-width: 20px; margin-bottom: 44px; background: linear-gradient(90deg, rgba(139, 92, 246, .15), var(--cyan), rgba(139, 92, 246, .15)); background-size: 200% 100%; animation: nx-line 2s linear infinite; }
@keyframes nx-line { to { background-position: -200% 0; } }
.nx-subh { text-align: center; font-size: 1.1rem; color: var(--cyan); margin: 10px 0 18px; font-family: var(--mono); letter-spacing: .04em; }
.nx-plans { margin-bottom: 14px; }
.nx-plans .price ul { margin-top: 12px; }
.nx-askrate { text-align: center; color: var(--muted); margin: 6px 0 36px; }
.nx-askrate a { color: var(--cyan); font-weight: 600; }

/* ── จอแคบ ────────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .nx-upd, .nx-hub, .nx-con { grid-template-columns: 1fr; }
  .nx-radar { position: relative; top: 0; }
  .nx-ai { grid-template-columns: repeat(2, 1fr); }
  .nx-aicard, .nx-aicard:nth-child(4), .nx-aicard:nth-child(5) { grid-column: span 1; }
  .nx-aicard:nth-child(5) { grid-column: span 2; }
}
@media (max-width: 760px) {
  .nx-payflow { flex-direction: column; gap: 6px; }
  .py-line { width: 2px; height: 18px; min-width: 0; flex: none; margin: 0; background: linear-gradient(180deg, rgba(139, 92, 246, .15), var(--cyan)); }
}
@media (max-width: 600px) {
  .nx-ai { grid-template-columns: 1fr; }
  .nx-aicard, .nx-aicard:nth-child(5) { grid-column: span 1; }
  .hm-grid { grid-template-columns: 1fr; }
  .hm-mis, .hm-pets { grid-column: 1; }
  .hm-cr b { font-size: 1.1rem; }
  .nx-dm { height: 470px; }
}
@media (prefers-reduced-motion: reduce) {
  .nx-radar-ring .sweep, .nx-net line, .nx-net circle.bad, .nx-spark path, .py-step span, .py-line, .hm-av, .hm-pet-ic, .nx-pi::after { animation: none; }
  .nx-spark path { stroke-dashoffset: 0; }
}

/* ป้าย "ใหม่" ห้ามตัดบรรทัด → ไอเท็มกริดต้อง min-width: 0 ไม่งั้นดันคอลัมน์ hero ให้กว้างเกินจอมือถือ */
.hero-copy, .hero-grid > * { min-width: 0; }
/* คอลัมน์ hero ไม่ถูกดันกว้างแล้ว → หัวข้อขนาดเดิม (3.9rem) ตัด "ห้อง" ลงบรรทัด 3 · ลดเพดานให้อยู่ 2 บรรทัด */
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }

/* AI 8 การ์ด: แถว 3 · 3 · 2 (สองใบล่างกว้าง) */
.nx-aicard:nth-child(4), .nx-aicard:nth-child(5) { grid-column: span 2; }
.nx-aicard:nth-child(7), .nx-aicard:nth-child(8) { grid-column: span 3; }
.nx-nlu { grid-auto-flow: column; gap: 10px; padding: 0 12px; font-size: .8rem; }
.nx-nlu .nlu-in { padding: 6px 10px; border-radius: 12px; background: #fff; color: #111; min-width: 90px; min-height: 1.6em; }
.nx-nlu .nlu-in::after { content: "▍"; color: #f59e0b; animation: ico-flick 1s steps(1) infinite; }
.nx-nlu .nlu-arrow { font-style: normal; color: var(--cyan); animation: ico-hop 1.6s ease-in-out infinite; }
.nx-nlu .nlu-out { font-family: ui-monospace, Consolas, monospace; padding: 6px 10px; border-radius: 10px; background: rgba(245, 158, 11, .25); border: 1px solid var(--cyan); color: #bfa5fa; min-width: 70px; text-align: center; }
.nx-nlu .nlu-out.pop { animation: nx-pop .45s var(--spring); }
.nx-guard { display: flex; flex-direction: column; justify-content: flex-end; gap: 5px; padding: 10px; place-items: stretch; }
.nx-guard .gm { align-self: flex-start; max-width: 90%; padding: 4px 10px; border-radius: 10px; font-size: .72rem; background: rgba(230, 235, 234, .12); border: 1px solid var(--border); animation: feed-in .35s var(--ease); }
.nx-guard .gm.bad { background: rgba(251, 113, 133, .14); border-color: rgba(251, 113, 133, .6); color: #ffc2cc; }
.nx-guard .gm.alert { align-self: flex-end; background: rgba(245, 158, 11, .3); border-color: var(--cyan); color: #eafff0; }
.nx-copilot { grid-template-columns: 90px 1fr; gap: 12px; padding: 0 14px; }
.cp-bars { display: flex; align-items: flex-end; gap: 4px; height: 70px; }
.cp-bars i { flex: 1; height: var(--h); border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg, #fbbf24, rgba(251, 191, 36, .2)); transform-origin: bottom; animation: nx-grow 2.4s var(--ease) infinite alternate; }
.cp-bars i:nth-child(2) { animation-delay: .2s; } .cp-bars i:nth-child(3) { animation-delay: .4s; } .cp-bars i:nth-child(4) { animation-delay: .6s; } .cp-bars i:nth-child(5) { animation-delay: .8s; }
@keyframes nx-grow { from { transform: scaleY(.55); } to { transform: scaleY(1); } }
.cp-draft { font-size: .76rem; padding: 8px 10px; border-radius: 10px; background: rgba(23, 18, 10, .7); border: 1px dashed rgba(251, 191, 36, .5); color: #ffe08a; }
.nx-paint { grid-template-columns: 1fr auto; gap: 12px; padding: 0 16px; }
.pt-card { position: relative; height: 84px; border-radius: 12px; overflow: hidden; background: linear-gradient(120deg, #452c03, #f59e0b, #bfa5fa, #452c03); background-size: 300% 300%; animation: nx-paintflow 5s ease-in-out infinite; border: 1px solid rgba(191, 165, 250, .5); }
@keyframes nx-paintflow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.pt-av { position: absolute; left: 10px; top: 14px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .85); box-shadow: 0 0 0 3px #bfa5fa; }
.pt-l { position: absolute; left: 60px; right: 14px; top: 20px; height: 8px; border-radius: 9px; background: rgba(255, 255, 255, .75); }
.pt-l.s { top: 36px; right: 50px; opacity: .6; }
.pt-shine { position: absolute; top: 0; bottom: 0; width: 40%; left: -50%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); animation: shine 3s ease-in-out infinite; }
.pt-opts { display: grid; gap: 6px; }
.pt-opts i { width: 30px; height: 22px; border-radius: 6px; border: 1px solid var(--border-hi); background: linear-gradient(135deg, #f59e0b, #452c03); animation: ico-pulse 2.4s ease-in-out infinite; }
.pt-opts i:nth-child(2) { background: linear-gradient(135deg, #bfa5fa, #f59e0b); animation-delay: .4s; }
.pt-opts i:nth-child(3) { background: linear-gradient(135deg, #eef2f5, #8b5cf6); animation-delay: .8s; }
@media (max-width: 1000px) { .nx-ai .nx-aicard:nth-child(n) { grid-column: span 1; } }
@media (prefers-reduced-motion: reduce) { .cp-bars i, .pt-card, .pt-shine, .pt-opts i, .nx-nlu .nlu-arrow { animation: none; } }

/* ── ตัวอย่างศูนย์รวมโมดูล ── */
.nx-mx { padding: 24px; border-radius: var(--radius); display: grid; gap: 18px; }
.nx-mx-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; text-align: center; }
.nx-mx-kpis b { display: block; font-family: var(--mono); font-size: 2.2rem; line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nx-mx-kpis span { font-size: .8rem; color: var(--muted); }
.nx-mx-cats { display: grid; grid-template-columns: repeat(9, 1fr); gap: 8px; }
.nx-mx-cat { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border-radius: 14px; border: 1px solid var(--border); background: rgba(23, 18, 10, .5); text-align: center; transition: .25s; }
.nx-mx-cat:hover { border-color: var(--cyan); transform: translateY(-3px); box-shadow: 0 0 18px rgba(139, 92, 246, .2); }
.nx-mx-cat .ic { font-size: 1.4rem; animation: ico-hop 3s ease-in-out infinite; }
.nx-mx-cat:nth-child(2n) .ic { animation-delay: .5s; } .nx-mx-cat:nth-child(3n) .ic { animation-delay: 1s; }
.nx-mx-cat b { font-family: var(--mono); font-size: 1.15rem; }
.nx-mx-cat small { font-size: .7rem; color: var(--muted); line-height: 1.3; }
.nx-mx-go { justify-self: center; }
@media (max-width: 1000px) { .nx-mx-cats { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 600px) { .nx-mx-cats { grid-template-columns: repeat(3, 1fr); } .nx-mx-kpis { grid-template-columns: repeat(2, 1fr); } }
/* .nx-viz จัดกึ่งกลางด้วย place-items → กล่องที่ไม่มีเนื้อหา (แท่ง/การ์ดตัวอย่าง) ถูกบีบกว้าง 0 */
.nx-copilot, .nx-paint { place-items: center stretch; }
.cp-bars { width: 90px; }
.pt-card { width: 100%; }

/* แชตหลังบ้านจำลอง: กล่องสูงคงที่ → flexbox บีบการ์ดจนปุ่มล่างขาด · ห้ามหด ให้ข้อความเก่าล้นขึ้นด้านบนแทน */
.nx-dm .m { flex-shrink: 0; }
