/* ═══ PARTNEX "Nexus" layer (v2) — light-first palette, tile catalog, product bottom sheet, receipt orders ═══ */
html[data-theme="light"] {
  --bg: #f5f6fa; --bg2: #ffffff; --card: #ffffff; --surface: #f0f2f7; --surface2: #e6e9f1;
  --primary: #5b45f0; --primary2: #3b82f6; --accent: #f59e0b; --cyber: #0ea5c6;
  --text: #0f1222; --muted: #646b80; --danger: #e5484d; --success: #12a150;
  --grad: linear-gradient(135deg, #6a52ff 0%, #4f6dff 100%);
  --header-bg: rgba(255,255,255,.86); --nav-bg: rgba(255,255,255,.94);
  --border: #e4e7ef; --card-border: #e8eaf1; --row-bg: #fff;
  --price-bg: rgba(91,69,240,.08); --price-color: #4b36d8; --welcome-bg: #eeebff;
  --shadow-card: 0 1px 2px rgba(16,18,34,.04), 0 4px 16px rgba(16,18,34,.05);
  --ring: 0 0 0 3px rgba(91,69,240,.22);
  color-scheme: light;
}
html[data-theme="dark"] { color-scheme: dark; }
:root {
  --nx-r: 18px; --nx-r-sm: 12px; --nx-ease: cubic-bezier(.22,1,.36,1);
  --nx-ok: #12a150; --nx-ok-bg: rgba(18,161,80,.1);
  --nx-low: #d97706; --nx-low-bg: rgba(245,158,11,.13);
  --nx-out: #e5484d; --nx-out-bg: rgba(229,72,77,.1);
  --nx-pre: #7c3aed; --nx-pre-bg: rgba(124,58,237,.1);
  --nx-info: #2563eb; --nx-info-bg: rgba(37,99,235,.09);
  --nx-lift: 0 10px 30px rgba(16,18,34,.10);
}
html[data-theme="dark"] {
  --nx-ok: #3ddc97; --nx-ok-bg: rgba(61,220,151,.12); --nx-low: #fbbf24; --nx-low-bg: rgba(251,191,36,.13);
  --nx-out: #ff7a7f; --nx-out-bg: rgba(255,107,112,.12); --nx-pre: #b69cff; --nx-pre-bg: rgba(139,109,255,.16);
  --nx-info: #7cb4ff; --nx-info-bg: rgba(96,165,250,.13); --nx-lift: 0 12px 32px rgba(0,0,0,.45);
}
/* typography rhythm */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.nx-h { font: 700 13px/1.2 var(--px-head); letter-spacing: -.01em; margin: 0 0 10px; color: var(--text); display: flex; align-items: baseline; gap: 6px; }
.nx-h em { font: 500 11px Inter, sans-serif; color: var(--muted); font-style: normal; }
.nx-cap { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.nx-kicker { display: inline-block; font: 700 10.5px/1 Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.nx-icobtn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--text);
  display: inline-grid; place-items: center; font-size: 18px; cursor: pointer; transition: transform .15s var(--nx-ease), background .2s; flex: none; }
.nx-icobtn:active { transform: scale(.92); }
.nx-icobtn.on { color: #e5484d; border-color: rgba(229,72,77,.35); background: rgba(229,72,77,.07); }
.nx-refresh.spinning i { animation: nxSpin .8s linear infinite; }
@keyframes nxSpin { to { transform: rotate(360deg); } }

/* ── category chips ── */
.nx-chips { display: flex !important; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 10px !important; margin: 0 -2px; scroll-snap-type: x proximity; background: transparent !important; }
.nx-chips::-webkit-scrollbar { display: none; }
.nx-chip { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 8px 0 12px; border-radius: 999px; scroll-snap-align: start;
  border: 1px solid var(--border); background: var(--card); color: var(--text); font: 600 13px Inter, sans-serif; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s var(--nx-ease); white-space: nowrap; }
.nx-chip i { font-size: 16px; color: var(--muted); transition: color .2s; }
.nx-chip em { font-style: normal; font-size: 11px; font-weight: 700; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--surface); color: var(--muted); }
.nx-chip:active { transform: scale(.95); }
.nx-chip.on { background: var(--text); color: var(--bg2); border-color: var(--text); }
.nx-chip.on i { color: var(--bg2); }
.nx-chip.on em { background: rgba(255,255,255,.18); color: var(--bg2); }
html[data-theme="dark"] .nx-chip.on em { background: rgba(0,0,0,.12); }
#cat-tabs.nx-chips.stuck { background: var(--header-bg) !important; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

/* ── sections + tile grid ── */
.nx-catalog { display: block !important; }
.nx-sect { margin: 6px 0 18px; animation: nxRise .45s var(--nx-ease) both; }
.nx-sect-head { display: flex; align-items: center; gap: 9px; margin: 0 2px 10px; }
.nx-sect-head h2 { margin: 0; font: 700 16px/1.2 var(--px-head); letter-spacing: -.02em; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-sect-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--price-bg); color: var(--primary); font-size: 16px; }
.nx-sect-head em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); }
.nx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .nx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .nx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.nx-tile { position: relative; display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 12px; border-radius: var(--nx-r);
  background: var(--card); border: 1px solid var(--card-border); box-shadow: var(--shadow-card); cursor: pointer; outline: none;
  transition: transform .2s var(--nx-ease), box-shadow .2s, border-color .2s; -webkit-tap-highlight-color: transparent; }
.nx-tile:hover { box-shadow: var(--nx-lift); }
.nx-tile:active { transform: scale(.975); }
.nx-tile:focus-visible { box-shadow: var(--ring); }
.nx-grid .nx-tile { animation: nxRise .4s var(--nx-ease) both; }
.nx-grid .nx-tile:nth-child(2) { animation-delay: .03s } .nx-grid .nx-tile:nth-child(3) { animation-delay: .06s } .nx-grid .nx-tile:nth-child(4) { animation-delay: .09s }
.nx-grid .nx-tile:nth-child(n+5) { animation-delay: .12s }
@keyframes nxRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.nx-tile.is-out { opacity: .6; }
.nx-tile-top { display: flex; align-items: flex-start; gap: 6px; }
.nx-mark { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; overflow: hidden;
  background: var(--b, var(--primary)); color: #fff; font: 800 18px/1 var(--px-head); letter-spacing: -.03em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 4px 12px color-mix(in srgb, var(--b, #5b45f0) 30%, transparent); }
.nx-mark.has-img { background: var(--surface); }
.nx-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nx-mark-xl { width: 64px; height: 64px; border-radius: 19px; font-size: 28px; }
.nx-off { font: 800 11px/1 Inter, sans-serif; padding: 5px 7px; border-radius: 8px; background: #ffe9e9; color: #d92d32; margin-top: 2px; }
html[data-theme="dark"] .nx-off { background: rgba(255,107,112,.16); color: #ff8b8f; }
.nx-hot { color: #f97316; font-size: 16px; margin-top: 4px; }
.nx-save { margin-left: auto; width: 30px; height: 30px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font-size: 17px; display: grid; place-items: center; cursor: pointer; transition: transform .2s var(--nx-ease), color .2s; }
.nx-save:active { transform: scale(.8); }
.nx-save.on { color: #e5484d; }
.nx-tile-name { margin: 2px 0 0; font: 700 14px/1.28 var(--px-head) !important; letter-spacing: -.015em; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; word-break: break-word; }
.nx-star { color: #f59e0b; font-size: 12px; margin-right: 3px; }
.nx-tile-sub { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 11.5px; color: var(--muted); min-height: 15px; }
.nx-tile-sub span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.nx-tile-sub span + span::before { content: "·"; margin-right: 8px; }
.nx-st { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px 0 8px; border-radius: 999px; font: 600 11px/1 Inter, sans-serif; white-space: nowrap; }
.nx-st i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.nx-st-ok { color: var(--nx-ok); background: var(--nx-ok-bg); }
.nx-st-ok i { box-shadow: 0 0 0 0 currentColor; animation: nxPing 2.4s infinite; }
.nx-st-low { color: var(--nx-low); background: var(--nx-low-bg); }
.nx-st-out { color: var(--nx-out); background: var(--nx-out-bg); }
.nx-st-pre { color: var(--nx-pre); background: var(--nx-pre-bg); }
.nx-st-info { color: var(--nx-info); background: var(--nx-info-bg); }
@keyframes nxPing { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent); } 70%,100% { box-shadow: 0 0 0 6px transparent; } }
.nx-tile-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 2px; }
.nx-price { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.nx-price small { font-size: 10.5px; color: var(--muted); font-weight: 500; }
.nx-price b { font: 800 16.5px/1.15 var(--px-head); letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nx-price s { font-size: 11px; color: var(--muted); }
.nx-add { width: 36px; height: 36px; flex: none; border: 0; border-radius: 12px; background: var(--primary); color: #fff; font-size: 16px; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--primary) 35%, transparent); transition: transform .15s var(--nx-ease), filter .2s; }
.nx-add:active { transform: scale(.88); }
.nx-tile.is-pre .nx-add { background: var(--nx-pre); box-shadow: none; }
.nx-add:disabled { background: var(--surface2); color: var(--muted); box-shadow: none; }
.nx-rs { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 7px; margin-top: 1px; }
.nx-rs i { color: var(--primary); font-size: 13px; }
.nx-rs.on { color: var(--nx-ok); } .nx-rs.on i { color: var(--nx-ok); }
.nx-pills .nx-rs { border: 0; padding: 0 9px; margin: 0; height: 26px; border-radius: 999px; background: var(--price-bg); color: var(--price-color); font-weight: 600; }
.nx-tile-cat .nx-tile-name { min-height: 0; }

/* empty states */
.nx-empty { text-align: center; padding: 34px 20px 28px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; animation: nxRise .4s var(--nx-ease) both; }
.nx-empty b { font: 700 16px var(--px-head); color: var(--text); margin-top: 6px; }
.nx-empty-art { position: relative; width: 84px; height: 84px; border-radius: 28px; display: grid; place-items: center; font-size: 40px; color: var(--primary);
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 70%), var(--surface); }
.nx-empty-art::after { content: ""; position: absolute; inset: -8px; border-radius: 34px; border: 1.5px dashed color-mix(in srgb, var(--primary) 25%, transparent); animation: nxSpin 24s linear infinite; }
.nx-empty-dot { position: absolute; right: 6px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); }
.nx-btn { margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border: 0; border-radius: 13px; background: var(--primary); color: #fff; font: 700 14px Inter, sans-serif; cursor: pointer; }
.nx-btn:active { transform: scale(.96); }

/* ── product bottom sheet ── */
.page.px-under { display: block !important; }
#page-product.nx-sheet-page { position: fixed; inset: 0; z-index: 1500; display: none; }
#page-product.nx-sheet-page.active { display: block; }
body.on-product { overflow: hidden; }
.nx-scrim { position: absolute; inset: 0; background: rgba(12,14,28,.42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: nxFade .25s ease both; }
.nx-sheet { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; width: 100%; max-width: 560px;
  max-height: calc(100dvh - 28px - var(--tg-safe-top, 0px)); display: flex; flex-direction: column;
  background: var(--bg); border-radius: 26px 26px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.18); overflow: hidden;
  animation: nxUp .38s var(--nx-ease) both; }
.nx-closing .nx-sheet { animation: nxDown .2s ease-in both; }
.nx-closing .nx-scrim { animation: nxFadeOut .2s ease-in both; }
@keyframes nxUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes nxDown { to { transform: translateY(100%); } }
@keyframes nxFade { from { opacity: 0; } }
@keyframes nxFadeOut { to { opacity: 0; } }
.nx-grab { display: flex; justify-content: center; padding: 8px 0 2px; flex: none; cursor: pointer; }
.nx-grab i { width: 40px; height: 5px; border-radius: 9px; background: var(--surface2); }
.nx-sheet-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 18px; -webkit-overflow-scrolling: touch; }
.nx-sh-head { display: flex; align-items: center; gap: 12px; padding: 8px 0 14px; }
.nx-sh-art { position: relative; flex: none; }
.nx-sh-art .nx-off { position: absolute; left: -6px; bottom: -6px; border: 2px solid var(--bg); }
.nx-sh-title { flex: 1; min-width: 0; }
.nx-sh-title h2 { margin: 4px 0 2px; font: 800 19px/1.22 var(--px-head); letter-spacing: -.025em; color: var(--text); word-break: break-word; }
.nx-sh-title p { margin: 0; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-sh-title p:empty { display: none; }
.nx-sh-acts { display: flex; flex-direction: column; gap: 6px; align-self: flex-start; }
.nx-pricebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--b, var(--primary)) 10%, var(--card)), var(--card)); border: 1px solid var(--card-border); }
.nx-pb-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nx-pb-main b { font: 800 24px/1.1 var(--px-head); letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.nx-was { font: 500 13px Inter, sans-serif; color: var(--muted); text-decoration: line-through; }
.nx-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.nx-badge { display: inline-flex; align-items: center; gap: 5px; font: 600 11px Inter, sans-serif; padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.nx-badge.green { color: var(--nx-ok); background: var(--nx-ok-bg); }
.nx-badge.blue { color: var(--nx-info); background: var(--nx-info-bg); }
.nx-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.nx-pills .nx-st { height: 26px; font-size: 11.5px; padding: 0 10px; }
.nx-pill { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--surface); color: var(--text); font: 600 11.5px Inter, sans-serif; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-pill i { color: var(--muted); }
.nx-block { margin-top: 12px; padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--card-border); }
.nx-opts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.nx-opts-col { grid-template-columns: 1fr; }
.nx-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 12px; border-radius: 13px; border: 1.5px solid var(--border); background: var(--bg2); color: var(--text);
  font: 700 13px/1.25 Inter, sans-serif; text-align: left; cursor: pointer; transition: border-color .2s, background .2s, transform .15s var(--nx-ease); min-width: 0; word-break: break-word; }
.nx-opt:active { transform: scale(.97); }
.nx-opt-price { font: 600 12px Inter, sans-serif; color: var(--muted); }
.nx-opt.selected { border-color: var(--primary); background: var(--price-bg); }
.nx-opt.selected .nx-opt-price { color: var(--primary); }
.nx-opt.out { opacity: .5; }
.nx-deliv { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 13px; border: 1.5px solid var(--border); background: var(--bg2); color: var(--text); text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.nx-deliv.selected { border-color: var(--primary); background: var(--price-bg); }
.nx-deliv-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--primary); font-size: 17px; flex: none; }
.nx-deliv-text { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.nx-deliv-text small { color: var(--muted); font-size: 11.5px; }
.nx-qty-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nx-qty-lbl .nx-h { margin-bottom: 3px; }
.nx-stepper { display: flex; align-items: center; height: 44px; border-radius: 14px; background: var(--surface); padding: 3px; flex: none; }
.nx-stepper button { width: 38px; height: 38px; border: 0; border-radius: 11px; background: var(--bg2); color: var(--text); font-size: 15px; display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 2px rgba(16,18,34,.08); transition: transform .12s; }
.nx-stepper button:active { transform: scale(.88); }
.nx-stepper input { width: 52px; height: 38px; border: 0; background: transparent; text-align: center; font: 800 16px var(--px-head); color: var(--text); outline: none; -moz-appearance: textfield; padding: 0; }
.nx-stepper input::-webkit-outer-spin-button, .nx-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.nx-qchips { display: flex; gap: 6px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.nx-qchips::-webkit-scrollbar { display: none; }
.nx-q { flex: 1 0 auto; min-width: 44px; height: 32px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg2); color: var(--text); font: 700 12.5px Inter, sans-serif; cursor: pointer; transition: all .18s var(--nx-ease); }
.nx-q.active { background: var(--text); color: var(--bg2); border-color: var(--text); }
.nx-q:active { transform: scale(.92); }
.nx-prenote { margin-top: 12px; padding: 11px 12px 11px 38px; border-radius: 12px; position: relative; font-size: 12.5px; line-height: 1.45; color: var(--text); background: var(--nx-pre-bg); border: 1px solid color-mix(in srgb, var(--nx-pre) 25%, transparent); animation: nxRise .3s var(--nx-ease) both; }
.nx-prenote::before { content: ""; position: absolute; left: 14px; top: 13px; width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid var(--nx-pre); border-right-color: transparent; animation: nxSpin 1.6s linear infinite; }
.nx-fmt-wrap { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }
.nx-fmt { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nx-fmt-opt { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--bg2); color: var(--text); cursor: pointer; text-align: left; transition: border-color .2s, background .2s; }
.nx-fmt-opt i { font-size: 22px; color: var(--muted); }
.nx-fmt-opt span { display: flex; flex-direction: column; font-size: 13px; }
.nx-fmt-opt small { font-size: 11px; color: var(--muted); }
.nx-fmt-opt.selected { border-color: var(--primary); background: var(--price-bg); }
.nx-fmt-opt.selected i { color: var(--primary); }
.nx-field { margin-bottom: 10px; }
.nx-field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.nx-field .req { color: var(--danger); }
.nx-field input, .nx-field textarea, .nx-field select { width: 100%; box-sizing: border-box; height: 44px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--bg2); color: var(--text); padding: 0 12px; font: 500 14px Inter, sans-serif; outline: none; }
.nx-field textarea { height: auto; min-height: 80px; padding: 10px 12px; }
.nx-field input:focus, .nx-field textarea:focus { border-color: var(--primary); box-shadow: var(--ring); }
.nx-field .hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.nx-receipt { padding: 6px 14px; }
.nx-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 13px; color: var(--muted); }
.nx-line b { color: var(--text); font-variant-numeric: tabular-nums; }
.nx-line + .nx-line { border-top: 1px solid var(--surface); }
.nx-line-save, .nx-line-save b { color: var(--nx-ok); }
.nx-line-save span { display: flex; gap: 5px; align-items: center; }
.nx-line-total { padding: 11px 0; }
.nx-line-total > span { display: flex; flex-direction: column; color: var(--text); font-weight: 700; font-size: 14px; }
.nx-line-total small { font-weight: 500; font-size: 11px; color: var(--muted); }
.nx-line-total b { font: 800 18px var(--px-head); letter-spacing: -.02em; }
.nx-line-wallet span:first-child { display: flex; gap: 6px; align-items: center; }
.nx-baltag { font-size: 10.5px; font-weight: 700; padding: 3px 7px; border-radius: 6px; margin-left: 4px; }
.nx-baltag.ok { color: var(--nx-ok); background: var(--nx-ok-bg); }
.nx-baltag.bad { color: var(--nx-out); background: var(--nx-out-bg); }
.nx-about { padding: 0; overflow: hidden; }
.nx-about summary { list-style: none; display: flex; align-items: center; gap: 9px; padding: 14px; cursor: pointer; font: 700 13px var(--px-head); color: var(--text); }
.nx-about summary::-webkit-details-marker { display: none; }
.nx-about summary > i:first-child { color: var(--primary); font-size: 17px; }
.nx-about summary span { flex: 1; }
.nx-caret { color: var(--muted); transition: transform .25s var(--nx-ease); }
.nx-about[open] .nx-caret { transform: rotate(180deg); }
#pd-info { padding: 0 14px 12px; animation: nxRise .3s var(--nx-ease) both; }
.nx-feats { display: grid; gap: 8px; margin-bottom: 10px; }
.nx-feat { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text); }
.nx-desc { font-size: 13px; line-height: 1.55; color: var(--text); white-space: pre-wrap; margin-bottom: 10px; }
.nx-specs { display: grid; gap: 0; }
.nx-spec { display: grid; grid-template-columns: 28px minmax(80px, auto) 1fr; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--surface); font-size: 12.5px; }
.nx-spec-k { color: var(--muted); }
.nx-spec-v { color: var(--text); font-weight: 600; text-align: right; word-break: break-word; }
.nx-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--surface); color: var(--primary); font-size: 14px; flex: none; }
.nx-ico i { font-size: 14px; }
.nx-featl { display: flex; gap: 8px; align-items: center; font-size: 13px; }
/* sticky CTA */
.nx-cta { flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + var(--tg-safe-bottom, env(safe-area-inset-bottom, 0px)));
  background: var(--bg2); border-top: 1px solid var(--border); }
.nx-cta-info { flex: 1; min-width: 0; }
.nx-cta-top { display: flex; gap: 6px; align-items: center; min-height: 14px; font-size: 11px; flex-wrap: wrap; }
.nx-cta-old { color: var(--muted); text-decoration: line-through; }
.nx-cta-old:empty { display: none; }
.nx-cta-save { color: var(--nx-ok); font-weight: 700; }
.nx-cta-ends { color: var(--nx-low); font-weight: 600; }
.nx-cta-total { font: 800 21px/1.15 var(--px-head); letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-buy { flex: none; min-width: 150px; max-width: 62%; height: 50px; padding: 0 20px; border: 0; border-radius: 15px; background: var(--grad); color: #fff; font: 700 15px Inter, sans-serif; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--primary) 32%, transparent); transition: transform .15s var(--nx-ease), filter .2s, background .2s; }
.nx-buy:active { transform: scale(.96); }
.nx-buy.is-pre { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.nx-buy.need-funds { background: var(--text); color: var(--bg2); box-shadow: none; }
.nx-buy:disabled { background: var(--surface2); color: var(--muted); box-shadow: none; }
.nx-buy.is-loading { pointer-events: none; filter: saturate(.8); }
.nx-buy.is-success { background: var(--nx-ok); }
.nx-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: nxSpin .7s linear infinite; display: inline-block; margin-right: 8px; vertical-align: -3px; }
@media (min-width: 900px) {
  .nx-sheet { bottom: 50%; transform: translateY(50%); border-radius: 26px; max-height: min(86vh, 820px); animation: nxPop .3s var(--nx-ease) both; }
  .nx-closing .nx-sheet { animation: nxFadeOut .18s ease-in both; }
  @keyframes nxPop { from { opacity: 0; transform: translateY(calc(50% + 16px)) scale(.98); } to { opacity: 1; transform: translateY(50%); } }
}

/* ── orders: receipts ── */
.nx-pg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 2px 2px 14px; }
.nx-pg-head h1 { margin: 4px 0 0; font: 800 24px/1.1 var(--px-head); letter-spacing: -.03em; color: var(--text); }
.nx-kpis { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-bottom: 12px; }
.nx-kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--card-border); min-width: 0; }
.nx-kpi i { font-size: 20px; color: var(--primary); margin-bottom: 4px; }
.nx-kpi b { font: 800 17px/1.1 var(--px-head); letter-spacing: -.02em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.nx-kpi small { font-size: 11px; color: var(--muted); }
.nx-kpi-warn i { color: var(--nx-low); }
.nx-search { display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--card-border); color: var(--muted); transition: box-shadow .2s, border-color .2s; }
.nx-search:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.nx-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--text); font: 500 14px Inter, sans-serif; height: 100%; }
.nx-fchips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 12px 0 6px; }
.nx-fchips::-webkit-scrollbar { display: none; }
.nx-fchip { flex: none; height: 32px; padding: 0 12px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font: 600 13px Inter, sans-serif; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; transition: background .2s, color .2s; }
.nx-fchip.active { background: var(--price-bg); color: var(--primary); }
.nx-fn:empty { display: none; }
.nx-fn { font-size: 10.5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 6px; background: var(--surface); color: var(--muted); display: grid; place-items: center; }
.nx-fchip.active .nx-fn { background: var(--primary); color: #fff; }
.nx-day { margin: 14px 4px 8px; font: 700 11px Inter, sans-serif; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.nx-rlist { border-radius: 18px; background: var(--card); border: 1px solid var(--card-border); overflow: hidden; box-shadow: var(--shadow-card); }
.nx-receipt-card + .nx-receipt-card { border-top: 1px solid var(--surface); }
.nx-receipt-card summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .2s; }
.nx-receipt-card summary::-webkit-details-marker { display: none; }
.nx-receipt-card summary:active { background: var(--surface); }
.nx-r-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; flex: none; background: var(--price-bg); color: var(--primary); }
.k-vpn .nx-r-ico { background: var(--nx-ok-bg); color: var(--nx-ok); }
.k-proxy .nx-r-ico { background: var(--nx-info-bg); color: var(--nx-info); }
.k-social .nx-r-ico { background: rgba(236,72,153,.1); color: #db2777; }
.nx-r-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nx-r-main b { font: 700 14px/1.25 var(--px-head); letter-spacing: -.01em; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-r-main small { font-size: 11.5px; color: var(--muted); }
.nx-r-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.nx-r-side b { font: 800 14px var(--px-head); color: var(--text); font-variant-numeric: tabular-nums; }
.nx-rst { font-style: normal; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; }
.nx-rst.delivered { color: var(--nx-ok); } .nx-rst.pending { color: var(--nx-low); } .nx-rst.refunded { color: var(--muted); }
.nx-r-body { padding: 0 14px 14px 66px; animation: nxRise .3s var(--nx-ease) both; }
.nx-r-meta { margin: 0 0 8px; display: grid; gap: 4px; }
.nx-r-meta div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.nx-r-meta dt { color: var(--muted); } .nx-r-meta dd { margin: 0; color: var(--text); font-weight: 600; text-align: right; word-break: break-word; }
.nx-track { display: flex; gap: 6px; margin: 6px 0 8px; }
.nx-track span { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.nx-track i { height: 4px; border-radius: 4px; background: var(--surface2); position: relative; overflow: hidden; }
.nx-track .done { color: var(--nx-ok); } .nx-track .done i { background: var(--nx-ok); }
.nx-track .now { color: var(--nx-low); } .nx-track .now i { background: var(--nx-low-bg); }
.nx-track .now i::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--nx-low); border-radius: 4px; animation: nxSlide 1.4s ease-in-out infinite; }
@keyframes nxSlide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.nx-rnote { display: flex; gap: 7px; margin: 6px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.nx-rnote i { flex: none; margin-top: 2px; color: var(--primary); }
.nx-vault { border-radius: 12px; background: var(--surface); overflow: hidden; }
.nx-vault-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px 0; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.nx-vault-pre { margin: 0; padding: 6px 10px 10px; max-height: 140px; overflow: auto; font: 500 12px/1.5 ui-monospace, 'JetBrains Mono', Menlo, monospace; color: var(--text); white-space: pre-wrap; word-break: break-all; }
.nx-ract { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nx-ract-end { justify-content: flex-end; }
.nx-rbtn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg2); color: var(--text); font: 600 12.5px Inter, sans-serif; cursor: pointer; text-decoration: none; transition: transform .12s; }
.nx-rbtn:active { transform: scale(.95); }
.nx-rbtn.solid { background: var(--primary); border-color: var(--primary); color: #fff; }
.nx-rbtn.ghost { border-color: transparent; background: transparent; color: var(--primary); }
.nx-empty-lg { padding-top: 44px; }

/* ── account: theme selector ── */
.nx-theme-row { flex-wrap: wrap; row-gap: 8px; }
.nx-seg3 { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface); gap: 2px; margin-left: auto; }
.nx-seg3 button { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 600 12px Inter, sans-serif; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.nx-seg3 button.on { background: var(--bg2); color: var(--text); box-shadow: 0 1px 3px rgba(16,18,34,.12); }
html[data-theme="dark"] .nx-seg3 button.on { background: var(--surface2); }

/* theme switch: smooth colour change */
html.nx-theme-anim, html.nx-theme-anim * { transition: background-color .3s ease, border-color .3s ease, color .2s ease !important; }

@media (prefers-reduced-motion: reduce) {
  .nx-sect, .nx-grid .nx-tile, .nx-sheet, .nx-scrim, .nx-empty, .nx-r-body, #pd-info, .nx-prenote { animation: none !important; }
  .nx-st-ok i, .nx-empty-art::after, .nx-track .now i::after { animation: none !important; }
}

.nx-heart .ph-fill { display: none; }
.on > .nx-heart .ph-fill, .on.nx-heart .ph-fill { display: inline; }
.on > .nx-heart .ph, .on.nx-heart .ph { display: none; }
.nx-save.on, .nx-icobtn.on { animation: nxPop2 .35s var(--nx-ease); }
@keyframes nxPop2 { 40% { transform: scale(1.25); } }
#page-product .nx-fmt-opt.selected { border-color: var(--primary) !important; background: var(--price-bg) !important; color: var(--text) !important; box-shadow: none !important; }
#page-product .nx-fmt-opt { box-shadow: none !important; }
.nx-add i, .nx-stepper button i { font-size: 18px; font-weight: 700; }
.nx-add i::before, .nx-stepper button i::before { -webkit-text-stroke: .6px currentColor; }

/* ── Guarantee Pay top-up ── */
.nx-gp { display: flex; flex-direction: column; gap: 12px; }
.nx-gp-head { display: flex; gap: 12px; align-items: center; }
.nx-gp-head b { display: block; font: 700 16px var(--px-head); color: var(--text); }
.nx-gp-head small { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; }
.nx-gp-badge { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; font-size: 22px; color: var(--nx-ok); background: var(--nx-ok-bg); }
.nx-gp-amt { display: flex; align-items: center; gap: 6px; height: 62px; padding: 0 16px; border-radius: 16px; background: var(--surface); border: 1.5px solid transparent; transition: border-color .2s, box-shadow .2s; }
.nx-gp-amt:focus-within { border-color: var(--primary); box-shadow: var(--ring); background: var(--bg2); }
.nx-gp-amt span { font: 800 26px var(--px-head); color: var(--muted); }
.nx-gp-amt input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: 800 28px var(--px-head); letter-spacing: -.02em; color: var(--text); -moz-appearance: textfield; }
.nx-gp-amt input::-webkit-outer-spin-button, .nx-gp-amt input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.nx-gp-limits { font-size: 11.5px; color: var(--muted); margin-top: -6px; padding-left: 4px; }
.nx-gp-quick { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
.nx-gp-quick .nx-q { height: 36px; }
.nx-gp-btn { height: 52px; border: 0; border-radius: 15px; background: var(--grad); color: #fff; font: 700 15px Inter, sans-serif; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--primary) 30%, transparent); transition: transform .15s var(--nx-ease), filter .2s; }
.nx-gp-btn:active { transform: scale(.97); }
.nx-gp-btn:disabled { background: var(--surface2); color: var(--muted); box-shadow: none; cursor: default; }
.nx-gp-btn.busy { filter: saturate(.8); }
.nx-gp-note { display: flex; gap: 8px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.nx-gp-note i { color: var(--primary); margin-top: 2px; flex: none; }
.nx-gp-open { border-radius: 14px; background: var(--surface); padding: 10px 12px; display: grid; gap: 8px; }
.nx-gp-open-h { display: flex; justify-content: space-between; align-items: center; font: 700 11px Inter, sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.nx-gp-open-h button { border: 0; background: var(--bg2); color: var(--primary); font: 600 12px Inter, sans-serif; height: 28px; padding: 0 10px; border-radius: 9px; display: inline-flex; gap: 5px; align-items: center; cursor: pointer; text-transform: none; letter-spacing: 0; }
.nx-gp-row { display: flex; gap: 10px; align-items: center; }
.nx-gp-row > i { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--nx-low-bg); color: var(--nx-low); font-size: 16px; flex: none; }
.nx-gp-row b { display: block; font: 700 14px var(--px-head); color: var(--text); }
.nx-gp-row small { font-size: 11.5px; color: var(--muted); }
