/* T195 «نگین» (Owner 2026-11-06, «n رو هم منتشر کن»; design claude-fixes/99-n-redesign-figma, plan claude-fixes/100-t195-n-build/PLAN.md).
   A CSS-only re-skin of the floating N and of every state of the N sheet («دستیار خصوصی NEXA»). No markup, string, hook or behaviour changes:
   n-smart-chat.js, app.js and every shell sheet stay byte-identical. The N is an ink gem with a ring of the four world colours (the ring is
   n-negin-ring.svg; on the gold learning world the gold-only twin n-negin-ring-gold.svg and only var(--lg-*) colours). The sheet is a flat
   notebook page in paper or night (it follows the app theme and paints the same on every world). Icons are one line set drawn by masks from
   n-negin-icons.svg (no emoji, no visible text added). Motion only without Reduced Motion (the media query and html.motion-reduced).
   Scope: the FAB rules start at html[data-theme] #app .f-shell .nexa-guide.astra-assistive:is(#assistant-trigger,.nexa-guide); every sheet rule
   starts at html[data-theme] :is(#assistant-dialog,.n-smart-layer). Never left/top/right/bottom, z-index, visibility or display on the FAB
   (app.js, floating-n-position.js and the keyboard/hide rules own them). */

/* ---------- the floating N: the gem (every docked world) ---------- */
html[data-theme] #app .f-shell .nexa-guide.astra-assistive:is(#assistant-trigger,.nexa-guide){width:56px;height:56px;min-width:56px;min-height:56px;padding:5.67px;opacity:1;
  -webkit-backdrop-filter:none;backdrop-filter:none;border:0!important;border-radius:50%;
  background:url("/app/n-negin-ring.svg") center/100% 100% no-repeat border-box,content-box #16141D!important;
  box-shadow:0 12px 24px -8px rgba(10,8,16,.55),0 2px 6px rgba(10,8,16,.25)!important;color:#F4F1EA;transition:none;
  --nm-s1:#F4F1EA;--nm-s2:#F4F1EA;--nm-s3:#F4F1EA;--nm-d1:#F4F1EA;--nm-d2:#F4F1EA;--nm-d3:#F4F1EA;--nm-dot:#F4F1EA}
html[data-theme] #app .f-shell .nexa-guide.astra-assistive:is(#assistant-trigger,.nexa-guide) .n-mark{width:26px;height:26px}
/* the 12% white inner rim of the ink disc */
html[data-theme] #app .f-shell .nexa-guide.astra-assistive:is(#assistant-trigger,.nexa-guide)::after{content:"";position:absolute;inset:5.67px;box-sizing:border-box;border:1.2px solid rgba(255,255,255,.12);border-radius:50%;pointer-events:none}
html[data-theme] #app .f-shell .nexa-guide.astra-assistive:is(#assistant-trigger,.nexa-guide):focus-visible{outline:3px solid #16141D;outline-offset:3px}
html[data-theme="dark"] #app .f-shell .nexa-guide.astra-assistive:is(#assistant-trigger,.nexa-guide):focus-visible{outline-color:#F4F1EA}
/* the gold learning world: the gold-only ring, the night-gold disc, the gold N with the cream dot (only var(--lg-*) colours) */
html[data-theme][data-approved-world="learning"] #app .f-shell .nexa-guide.astra-assistive:is(#assistant-trigger,.nexa-guide){
  background:url("/app/n-negin-ring-gold.svg") center/100% 100% no-repeat border-box,content-box #120D07!important;
  box-shadow:0 12px 24px -8px rgba(10,8,16,.55),0 0 16px var(--lg-dim)!important;color:var(--lg-gold);
  --nm-s1:var(--lg-gold);--nm-s2:var(--lg-gold);--nm-s3:var(--lg-gold);--nm-d1:var(--lg-gold);--nm-d2:var(--lg-gold);--nm-d3:var(--lg-gold);--nm-dot:var(--lg-cream)}
html[data-theme][data-approved-world="learning"] #app .f-shell .nexa-guide.astra-assistive:is(#assistant-trigger,.nexa-guide)::after{border-color:var(--lg-dim)}
html[data-theme][data-approved-world="learning"] #app .f-shell .nexa-guide.astra-assistive:is(#assistant-trigger,.nexa-guide):focus-visible{outline-color:var(--lg-gold)}

/* ---------- the sheet: tokens (paper, then night) ---------- */
html[data-theme] :is(#assistant-dialog,.n-smart-layer){--ng-icons:url("/app/n-negin-icons.svg");--ng-gem:#16141D;
  --ng-bg:#FAF8F4;--ng-sf:#FFFFFF;--ng-wl:#F1EEE8;--ng-ln:#E3DFD6;--ng-tx:#16141D;--ng-t2:#3B3844;--ng-mu:#5F5A68;--ng-pr:#16141D;--ng-on:#F4F1EA;
  --ng-sand:#F5EDDC;--ng-sand-t:#5E4410;--ng-care:#E8F1F6;--ng-care-t:#1C4A61;--ng-er:#B42318;--ng-er-s:#FCEBE9;--ng-er-line:rgba(180,35,24,.22);--ng-halo:rgba(22,20,29,.08);
  --ng-edge:#8A8494;--ng-tile:#EEF5E4;--ng-pist:#9BCB5F;--ng-gold:#F2C14E;--ng-tq:#1FA2A0;--ng-vio:#8B74F0;
  --n-paper:var(--ng-bg);--n-surface:var(--ng-sf);--n-surface2:var(--ng-wl);--n-line:var(--ng-ln);--n-ink:var(--ng-tx);--n-ink2:var(--ng-t2);--n-muted:var(--ng-mu);
  --n-on-ink:var(--ng-on);--n-primary:var(--ng-pr);--n-on-primary:var(--ng-on);--n-focus:var(--ng-tx);--n-gold:var(--ng-ln);--n-gold-l:var(--ng-wl);--n-gold-d:var(--ng-t2);
  --n-danger:var(--ng-er);--n-danger-l:var(--ng-er-s);--n-scrim:rgba(14,12,20,.5);--n-shadow-card:none;
  --nt-plain-bg:var(--ng-sf);--nt-plain-fg:var(--ng-tx);--nt-plain-edge:var(--ng-ln);--nt-plain-lip:transparent;
  --nt-gold-bg:var(--ng-pr);--nt-gold-fg:var(--ng-on);--nt-gold-edge:var(--ng-pr);--nt-gold-lip:transparent;
  --nt-blue-bg:transparent;--nt-blue-fg:var(--ng-t2);--nt-blue-edge:var(--ng-ln);--nt-blue-lip:transparent;
  background:var(--n-scrim)}
html[data-theme="dark"] :is(#assistant-dialog,.n-smart-layer){--ng-bg:#14121B;--ng-sf:#1D1A26;--ng-wl:#272333;--ng-ln:#363142;--ng-tx:#F4F1EA;--ng-t2:#DAD5CD;--ng-mu:#ABA5B7;--ng-pr:#F4F1EA;--ng-on:#16141D;
  --ng-sand:#3A311C;--ng-sand-t:#F1D592;--ng-care:#163040;--ng-care-t:#A6D4EC;--ng-er:#FF9A90;--ng-er-s:#3B1C1F;--ng-er-line:rgba(255,154,144,.3);--ng-halo:rgba(244,241,234,.12);--ng-edge:#77718A;--ng-gem:#3A3548}

/* ---------- structure: the sheet, the grab, the header row and the tools row ---------- */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-panel{height:calc(100dvh - 20px - env(safe-area-inset-top,0px));padding-block-start:8px;background:var(--ng-bg);color:var(--ng-tx);
  border-radius:28px 28px 0 0;box-shadow:0 -18px 48px -18px rgba(0,0,0,.55);border:0}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-panel::before{content:"";flex:none;align-self:center;width:44px;height:5px;border-radius:3px;background:var(--ng-ln)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:8px;padding:8px 16px 10px;border-block-end:1px solid var(--ng-ln)}
/* the header gem (40): the ring, the ink disc and the ivory N */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-head::before{content:"";flex:none;box-sizing:border-box;width:40px;height:40px;padding:4.04px;margin-inline-end:4px;border-radius:50%;
  background:url("/app/n-negin-mark.svg") center/auto 44% no-repeat border-box,url("/app/n-negin-ring.svg") center/100% 100% no-repeat border-box,content-box var(--ng-gem)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-head>div:first-child{flex:1 1 calc(100% - 52px);min-width:0}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-head h2{margin:0;font-size:19px;font-weight:800;line-height:1.4;color:var(--ng-tx)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-head h2+p{margin:0;font-size:12.5px;font-weight:700;line-height:1.6;color:var(--ng-mu)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-head-tools{display:contents}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-close{flex:none;margin-inline-start:auto;width:44px;min-width:44px;height:44px;padding:0;border:0;border-radius:50%;background:var(--ng-wl);color:var(--ng-tx);box-shadow:none;font-size:24px;line-height:1}
/* the tools «گفتگوی تازه» and «پاک کردن گفت‌وگو»: flat outline pills with a line icon; the confirm step turns red */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) :is([data-smart-new],[data-smart-clear]){--nt-ic:"";--nt-bg:var(--ng-sf);--nt-fg:var(--ng-t2);--nt-edge:var(--ng-ln);--nt-lip:transparent;
  position:relative;display:inline-flex;align-items:center;gap:6px;min-height:44px;font-size:13.5px}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) [data-smart-clear][data-confirm="true"]{--nt-bg:var(--ng-er-s);--nt-fg:var(--ng-er);--nt-edge:var(--ng-er)}

/* ---------- the log, the question bubble, the flat answer ---------- */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-log{padding:14px 16px 10px;gap:12px;border-block-end:1px solid var(--ng-ln)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-turn{gap:12px}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-msg--user{max-width:84%;padding:10px 14px;border-radius:20px;border-end-start-radius:6px;background:var(--ng-pr);color:var(--ng-on);font-size:15px;font-weight:500;line-height:1.75}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-msg--answer{align-self:stretch;max-width:none;display:flex;flex-direction:column;gap:10px;padding:2px 2px 6px;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--ng-tx);font-size:15px;line-height:1.85}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-msg--answer.is-ai{border-inline-start:0}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-label{display:flex;align-items:center;gap:8px;margin:0!important;font-size:12.5px!important;font-weight:800;line-height:1.6;color:var(--ng-t2)}
/* the answer label gem (20, ringless) */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-label::before{content:"";flex:none;width:20px;height:20px;border-radius:50%;background:url("/app/n-negin-mark.svg") center/auto 44% no-repeat,var(--ng-gem)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-msg--answer .n-smart-nb-head{margin:6px 0 0;font-size:16px;font-weight:800;line-height:1.6;color:var(--ng-tx)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-msg--answer .n-smart-nb-head:first-child{margin-block-start:0}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) :is(.n-smart-nb-list,.n-smart-steps){margin:0;padding-inline-start:20px;gap:4px;line-height:1.85}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) ol:is(.n-smart-nb-list,.n-smart-steps){list-style:persian}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) :is(.n-smart-intro,.n-smart-quote){opacity:1}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-say{margin:0;padding:10px 12px;border:0;border-radius:14px;background:var(--ng-wl);color:var(--ng-tx);opacity:1;font-size:14.5px;line-height:1.8}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-quote-source{margin:0;opacity:1;font-size:12px;font-weight:700;line-height:1.6;color:var(--ng-mu)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-frame{font-size:13.5px;color:var(--ng-t2)}
/* an approved card on the answer sits in a well; inside «متن اصلی» it stays plain */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-msg--answer>.n-smart-card{gap:6px;padding:12px;border-radius:16px;background:var(--ng-wl)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-msg--answer>.n-smart-card+.n-smart-card{margin-block-start:0;padding-block-start:12px;border-top:0}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-card .n-smart-steps{font-size:14.5px;line-height:1.8}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-card-head{font-size:13px;font-weight:800;color:var(--ng-t2)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-card .n-smart-say{padding:0;background:transparent;font-size:13.5px}
/* «متن اصلی آموزش» / «متن اصلی» and «بیشتر»: a 44px disclosure row with the book icon and a chevron */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-original{padding:0;border:1px solid var(--ng-ln);border-radius:16px;overflow:hidden}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) :is(.n-smart-original,.n-smart-more)>summary{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 12px;list-style:none;font-size:14px;font-weight:800;line-height:1.5;color:var(--ng-tx);cursor:pointer}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-more>summary{padding:0}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) :is(.n-smart-original,.n-smart-more)>summary::-webkit-details-marker{display:none}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-original[open]>summary{border-block-end:1px solid var(--ng-ln)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-original>:not(summary){margin:10px 12px;font-size:13.5px;line-height:1.8}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-original .n-smart-card+.n-smart-card,html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-passage{padding-block-start:10px;border-top:1px dashed var(--ng-ln)}
/* the line under an answer: what the server removed, the phone key, the quota */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) :is(.n-smart-privacy-note,.n-smart-device-failed,.n-smart-quota){display:flex;align-items:flex-start;gap:8px;margin:0!important;font-size:12.5px;font-weight:700;line-height:1.7;color:var(--ng-mu)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-device-failed{color:var(--ng-sand-t)}
/* the ten-cell free-question meter (drawn from data-smart-free, the number already printed next to it) */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-free{--ng-free:0;display:flex;align-items:center;gap:10px;margin:0!important;font-size:12.5px;font-weight:800;line-height:1.6;color:var(--ng-t2)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-free::before{content:"";flex:none;width:147px;height:8px;
  background:repeating-linear-gradient(270deg,var(--ng-pr) 0 12px,transparent 12px 15px) right center/calc(var(--ng-free) * 15px) 100% no-repeat,repeating-linear-gradient(270deg,var(--ng-ln) 0 12px,transparent 12px 15px) right center/100% 100% no-repeat}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-free[data-smart-free="1"]{--ng-free:1}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-free[data-smart-free="2"]{--ng-free:2}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-free[data-smart-free="3"]{--ng-free:3}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-free[data-smart-free="4"]{--ng-free:4}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-free[data-smart-free="5"]{--ng-free:5}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-free[data-smart-free="6"]{--ng-free:6}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-free[data-smart-free="7"]{--ng-free:7}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-free[data-smart-free="8"]{--ng-free:8}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-free[data-smart-free="9"]{--ng-free:9}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-free[data-smart-free="10"]{--ng-free:10}
/* the next-action pills: ink outline; a world dot names the world a pill opens, any other route gets the arrow */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-actions{gap:8px;margin:0}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-chip-action{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;border:1.5px solid var(--ng-pr);border-radius:999px;background:var(--ng-sf);color:var(--ng-tx);box-shadow:none;font-size:13.5px;font-weight:800;line-height:1.5;text-align:start}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) :is(.n-smart-chip-action,.n-smart-chip--objection,[data-smart-objections-open],[data-assistant-quick-practice])::before{content:"";flex:none;width:9px;height:9px;border-radius:50%;background:var(--ng-pist)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-chip-action[data-route="/learning"]::before{background:var(--ng-gold)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-chip-action[data-route="/explore"]::before{background:var(--ng-tq)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-chip-action[data-route="/home"]::before{background:var(--ng-vio)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-chip-action:not([data-route="/dialogue-lab"],[data-route="/learning"],[data-route="/explore"],[data-route="/home"])::before{width:15px;height:15px;border-radius:0;background:currentColor;
  -webkit-mask:var(--ng-icons) 30.769% 0/1400% 100% no-repeat;mask:var(--ng-icons) 30.769% 0/1400% 100% no-repeat}

/* ---------- empty state: welcome, «۱۰ اعتراض رایج نتورک», helper, suggestion chips ---------- */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-empty{margin:0;gap:12px;text-align:start;color:var(--ng-tx);font-size:15px}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-welcome{align-items:center;gap:12px;margin:0;padding:12px 14px;border:1px solid var(--ng-ln);border-radius:20px;background:var(--ng-sf)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-welcome p{font-size:15px;font-weight:600;line-height:1.75;color:var(--ng-tx)}
/* the avatar letter becomes the N gem (28, ringless); its «N» stays in the DOM, aria-hidden, drawn by the mark */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-welcome__n{width:28px;height:28px;border-radius:50%;box-shadow:none;color:transparent;font-size:0;background:url("/app/n-negin-mark.svg") center/auto 44% no-repeat,var(--ng-gem)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-empty>p{font-size:13.5px;line-height:1.8;color:var(--ng-mu)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-objections{gap:0;margin:0;border:1px solid var(--ng-ln);border-radius:20px;background:var(--ng-sf);overflow:hidden}
/* T196: in a conversation the same section is the first item of the scrolling log; it never shrinks there (with overflow:hidden the flex log could squash it) */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-log>.n-smart-objections{flex:none}
/* T196 audit P3-2: the «۱۰ اعتراض رایج» shortcut row above the composer in a conversation (the chip keeps its «نگین» look) */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-shortcut:not([hidden]){display:flex;flex:none;justify-content:flex-start;margin:10px 16px 0}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-objections-head{display:grid;grid-template-columns:40px minmax(0,1fr) 20px;grid-template-rows:auto auto;align-items:center;column-gap:12px;row-gap:0;
  width:100%;min-height:64px;padding:10px 14px;border:0;border-radius:0;background:transparent;color:var(--ng-tx);box-shadow:none;text-align:start}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-objections-head[aria-expanded="true"]{border:0;background:transparent;color:var(--ng-tx)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-objections-head::before{content:"";grid-column:1;grid-row:1/3;box-sizing:border-box;width:40px;height:40px;padding:10px;border-radius:13px;
  background:var(--ng-icons) -160px 0/280px 20px no-repeat content-box,var(--ng-tile) border-box}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-objections-head>span{grid-column:2;grid-row:1;font-size:15px;font-weight:800;line-height:1.5}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-objections-head>small{grid-column:2;grid-row:2;font-size:12.5px;font-weight:600;line-height:1.5;color:var(--ng-mu)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-objections-head[aria-expanded="true"]>small{color:var(--ng-mu)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-objections-head::after{content:"";grid-column:3;grid-row:1/3;width:20px;height:20px;background:currentColor;
  -webkit-mask:var(--ng-icons) 38.462% 0/1400% 100% no-repeat;mask:var(--ng-icons) 38.462% 0/1400% 100% no-repeat}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-objections-head[aria-expanded="true"]::after{transform:rotate(180deg)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-objections-body{gap:10px;padding:0 12px 14px}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-objections-body>p{padding:0 2px;font-size:13.5px;line-height:1.8;color:var(--ng-t2)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-objections-body .n-smart-chips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-chips{justify-content:flex-start;gap:8px}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-chip{display:inline-flex;align-items:center;gap:7px;min-height:44px;margin:0;padding:6px 14px;border:1px solid transparent;border-radius:999px;background:var(--ng-wl);color:var(--ng-tx);box-shadow:none;font-size:14px;font-weight:600;line-height:1.6;text-align:start}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) [data-smart-objections-open].n-smart-chip{border-color:var(--ng-ln);background:var(--ng-sf);font-weight:800}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-objections-body .n-smart-chip--objection{justify-content:flex-start;width:100%;min-height:52px;padding:6px 10px;border:0;border-radius:14px;background:var(--ng-wl);box-shadow:none;font-size:13.5px;font-weight:700;line-height:1.5;text-align:start;white-space:normal}

/* ---------- the composer strip: the field, «بفرست», the quick practice row, the privacy line ---------- */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-composer{align-items:center;min-height:56px;margin:10px 16px 0;padding:6px;border:1.5px solid var(--ng-edge);border-radius:22px;background:var(--ng-sf)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-composer:focus-within{border-color:var(--ng-pr);box-shadow:0 0 0 3px var(--ng-halo)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-composer textarea{color:var(--ng-tx)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-composer textarea::placeholder{color:var(--ng-mu);opacity:1}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-send.n-smart-send--word{min-width:92px;min-height:44px;height:44px;padding:0 14px;border:0;border-radius:16px;background:var(--ng-pr);color:var(--ng-on);box-shadow:none;font-size:15px;font-weight:800}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-send.n-smart-send--word:disabled{background:var(--ng-wl);color:var(--ng-mu);opacity:1}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-quick{margin:8px 16px 0}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) [data-assistant-quick-practice]{--nt-ic:"";--nt-bg:transparent;--nt-fg:var(--ng-t2);--nt-edge:var(--ng-ln);--nt-lip:transparent;
  display:flex;align-items:center;gap:8px;width:100%;max-width:none;min-height:44px;font-size:14px}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) [data-assistant-quick-practice]::after{content:"";flex:none;width:16px;height:16px;margin-inline-start:auto;background:currentColor;
  -webkit-mask:var(--ng-icons) 30.769% 0/1400% 100% no-repeat;mask:var(--ng-icons) 30.769% 0/1400% 100% no-repeat}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-foot{display:flex;align-items:flex-start;gap:8px;margin:8px 16px max(10px,env(safe-area-inset-bottom));padding:8px 12px;border-radius:14px;background:var(--ng-wl);color:var(--ng-mu);font-size:12px;line-height:1.75;text-align:start}

/* ---------- the line icons (one mask per pseudo-element; the sprite order is plus, trash, refresh, check, arrow, chev, book, shield, users, info, key, alert, device, coin) ---------- */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) :is([data-smart-new],[data-smart-clear],[data-smart-retry],[data-smart-consent-accept],[data-smart-coach-ok])::before,
html[data-theme] :is(#assistant-dialog,.n-smart-layer) :is(.n-smart-original,.n-smart-more)>summary::after,
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-original>summary::before,
html[data-theme] :is(#assistant-dialog,.n-smart-layer) :is(.n-smart-privacy-note,.n-smart-device-failed,.n-smart-quota,.n-smart-foot,.n-smart-cleared,.n-smart-error:not(:empty),.n-smart-msg--error>p,.n-smart-consent>h3)::before,
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-notice::before,
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-suggest-item::after{content:"";flex:none;width:16px;height:16px;margin:0;background:currentColor;font-size:0;
  -webkit-mask:var(--ng-icons) var(--ng-ix,0%) 0/1400% 100% no-repeat;mask:var(--ng-icons) var(--ng-ix,0%) 0/1400% 100% no-repeat}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) [data-smart-clear]::before{--ng-ix:7.692%}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) [data-smart-retry]::before{--ng-ix:15.385%;width:17px;height:17px}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) :is([data-smart-consent-accept],[data-smart-coach-ok])::before{--ng-ix:23.077%;width:18px;height:18px}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) :is(.n-smart-original,.n-smart-more)>summary::after{--ng-ix:38.462%;width:17px;height:17px;margin-inline-start:auto}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-more>summary::after{margin-inline-start:0}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) :is(.n-smart-original,.n-smart-more)[open]>summary::after{transform:rotate(180deg)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-original>summary::before{--ng-ix:46.154%;width:17px;height:17px}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) :is(.n-smart-privacy-note,.n-smart-foot,.n-smart-consent>h3)::before{--ng-ix:53.846%;margin-block-start:3px}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-consent>h3::before{width:18px;height:18px;margin:0}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-device-failed::before,html[data-theme] :is(#assistant-dialog,.n-smart-layer) [data-smart-device-used]::before{--ng-ix:92.308%;margin-block-start:3px}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-quota::before{--ng-ix:100%;margin-block-start:3px}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-cleared::before{--ng-ix:23.077%}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) :is(.n-smart-error:not(:empty),.n-smart-msg--error>p)::before{--ng-ix:84.615%;margin-block-start:4px;color:var(--ng-er)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-suggest-item::after{--ng-ix:30.769%;width:15px;height:15px}

/* ---------- notices: sand = something to do, well = information, device = the phone key; the AI notice and the pool consent read as a plain gate ---------- */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-notice{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:start;column-gap:10px;row-gap:8px;margin:0;padding:12px;border:0;border-radius:16px;
  background:var(--ng-wl);color:var(--ng-t2);font-size:13.5px;font-weight:600;line-height:1.75}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-notice>*{grid-column:2;margin:0}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-notice::before{--ng-ix:69.231%;grid-column:1;grid-row:1;width:18px;height:18px;margin-block-start:2px}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-notice:is([data-notice="KEY_REQUIRED"],[data-notice="AI_MODEL_REQUIRED"],[data-notice="AI_KEY_PROBLEM"],[data-notice="FREE_EXHAUSTED"],[data-notice="POOL_CAP_REACHED"]){background:var(--ng-sand);color:var(--ng-sand-t)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-notice:is([data-notice="KEY_REQUIRED"],[data-notice="AI_MODEL_REQUIRED"],[data-notice="FREE_EXHAUSTED"],[data-notice="POOL_CAP_REACHED"])::before{--ng-ix:76.923%}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-notice[data-notice="AI_KEY_PROBLEM"]::before{--ng-ix:84.615%}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-notice:is([data-notice="DEVICE_KEY_FAILED"],[data-notice="AI_REGION_BLOCKED"])::before{--ng-ix:92.308%}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-notice:is([data-notice="COACH_NOTICE"],[data-notice="POOL_CONSENT_REQUIRED"]){display:flex;flex-direction:column;gap:10px;padding:0;background:transparent;color:var(--ng-tx);font-size:15px;line-height:1.85}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-notice:is([data-notice="COACH_NOTICE"],[data-notice="POOL_CONSENT_REQUIRED"])::before{content:none}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-chip-action--notice.n-smart-chip-action{justify-self:start;border-color:currentColor;background:transparent;color:inherit}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-error{display:flex;align-items:flex-start;gap:6px;margin:0;font-size:12.5px;font-weight:700;line-height:1.7;color:var(--ng-er)}
/* the pool consent card (notice v3): a well with the shield, five points and the 48px pair */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-consent{display:flex;flex-direction:column;gap:10px;margin:0;padding:14px;border:0;border-radius:16px;background:var(--ng-wl);color:var(--ng-tx)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-consent>h3{display:flex;align-items:center;gap:8px;margin:0;font-size:15px;font-weight:800;line-height:1.6}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-consent ul{display:flex;flex-direction:column;gap:7px;margin:0;padding-inline-start:18px;font-size:13px;line-height:1.85;color:var(--ng-t2)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-row{display:grid;grid-template-columns:1.4fr 1fr;gap:8px;margin:0}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-notice[data-notice="COACH_NOTICE"] .n-smart-row{grid-template-columns:1fr}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-row .n-smart-btn{display:flex;align-items:center;gap:8px;min-height:48px;font-size:14px}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-row .n-smart-btn--gold{--nt-ic:"";--nt-bg:var(--ng-pr);--nt-fg:var(--ng-on);--nt-edge:var(--ng-pr);--nt-lip:transparent}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-row .n-smart-btn:not(.n-smart-btn--gold){--nt-bg:var(--ng-sf);--nt-fg:var(--ng-tx);--nt-edge:var(--ng-ln);--nt-lip:transparent}

/* ---------- the error bubble with «تلاش دوباره», the typing line, similar questions, saved turns, «پاک شد» ---------- */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-msg--error{align-self:stretch;max-width:none;display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:12px 14px;border:1px solid var(--ng-er-line);border-radius:18px;background:var(--ng-er-s);box-shadow:none;color:var(--ng-tx)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-msg--error>p{display:flex;align-items:flex-start;gap:8px;font-size:14px;font-weight:600;line-height:1.75}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) [data-smart-retry]{--nt-ic:"";--nt-bg:var(--ng-sf);--nt-fg:var(--ng-tx);--nt-edge:var(--ng-ln);--nt-lip:transparent;display:inline-flex;align-items:center;gap:6px;min-height:44px;margin:0;font-size:13.5px}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-msg--error .n-raise{margin-block-start:0}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-typing{position:relative;align-self:flex-start;display:grid;grid-template-columns:30px auto;align-items:center;column-gap:12px;row-gap:6px;padding:10px 14px;border:1px solid var(--ng-ln);border-radius:20px;background:var(--ng-sf);color:var(--ng-tx);font-size:14px;font-weight:700}
/* the thinking gem (30): the disc and the N, with the ring on its own layer so only the ring turns */
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-typing::before{content:"";grid-column:1;grid-row:1/3;box-sizing:border-box;width:30px;height:30px;padding:3.03px;border-radius:50%;background:url("/app/n-negin-mark.svg") center/auto 44% no-repeat border-box,content-box var(--ng-gem)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-typing::after{content:"";position:absolute;inset-inline-start:14px;top:calc(50% - 15px);width:30px;height:30px;background:url("/app/n-negin-ring.svg") center/100% 100% no-repeat;pointer-events:none}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-typing [data-smart-stage]{grid-column:2;grid-row:1}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-dots{grid-column:2;grid-row:2;gap:4px}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-dots i{width:14px;height:5px;border-radius:3px;background:var(--ng-ln);animation:none}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-dots i:first-child{background:var(--ng-pr)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-suggest{gap:6px;margin:0;padding:4px 0 0;border:0;border-block-start:1px solid var(--ng-ln);border-radius:0;background:transparent}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-suggest-head{display:flex;align-items:center;min-height:28px;font-size:12.5px;font-weight:800;color:var(--ng-mu)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-suggest-item{display:flex;align-items:center;gap:8px;min-height:44px;padding:8px 12px;border:0;border-radius:14px;background:var(--ng-wl);color:var(--ng-tx);font-size:13.5px;font-weight:700;line-height:1.6}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-suggest-item::after{margin-inline-start:auto}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-suggest-item:focus-visible{outline:3px solid var(--ng-tx);outline-offset:2px}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-restored{gap:10px;padding-block-end:12px;margin:0;border-block-end:1px dashed var(--ng-ln)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-restored-head{font-size:12.5px;font-weight:800;color:var(--ng-mu)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-cleared{display:flex;align-items:center;gap:8px;min-height:44px;margin:0;padding:0 14px;border-radius:14px;background:var(--ng-wl);color:var(--ng-tx);font-size:13.5px;font-weight:800}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) :focus-visible{outline-color:var(--ng-tx)}
html[data-theme] :is(#assistant-dialog,.n-smart-layer) :is(.n-smart-original,.n-smart-more)>summary:focus-visible{outline:3px solid var(--ng-tx);outline-offset:-3px}

/* ---------- the raised N buttons become flat: radius, weight and no press offset (the T138 base lives in the t138 layer) ---------- */
@layer t138{
  html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-btn.n-raise{border-radius:999px!important;font-weight:700!important;line-height:1.4!important;transform:none!important;box-shadow:none!important}
  html[data-theme] :is(#assistant-dialog,.n-smart-layer) [data-smart-retry].n-raise{font-weight:800!important}
  html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-row .n-smart-btn.n-raise{border-radius:16px!important;min-height:48px!important;padding-inline:10px!important;font-weight:800!important}
  html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-row .n-smart-btn.n-raise:not(.n-smart-btn--gold){border-width:1.5px!important;font-weight:700!important}
  html[data-theme] :is(#assistant-dialog,.n-smart-layer) [data-assistant-quick-practice].n-raise{border-radius:14px!important;justify-content:flex-start!important;text-align:start!important;font-weight:700!important;transform:none!important;box-shadow:none!important}
}

/* ---------- the keyboard layout and the wide card ---------- */
html.nexa-kb-open[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-panel{border-radius:28px;padding-block-start:8px}
@media (min-width:720px){
  html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-panel{height:min(760px,calc(100dvh - 48px));border:1px solid var(--ng-ln);border-radius:20px}
  html[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-panel::before{content:none}
}

/* ---------- motion (never with Reduced Motion) ---------- */
@media (prefers-reduced-motion:no-preference){
  html:not(.motion-reduced)[data-theme] #app .f-shell .nexa-guide.astra-assistive:is(#assistant-trigger,.nexa-guide){transition:transform 180ms cubic-bezier(.2,.8,.2,1)}
  html:not(.motion-reduced)[data-theme] #app .f-shell .nexa-guide.astra-assistive:is(#assistant-trigger,.nexa-guide):active{transform:scale(.94);transition-duration:90ms}
  html:not(.motion-reduced)[data-theme] :is(#assistant-dialog,.n-smart-layer){animation:ng-scrim 200ms ease-out both}
  html:not(.motion-reduced)[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-panel{animation:ng-rise 320ms cubic-bezier(.2,.8,.2,1)}
  html:not(.motion-reduced)[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-typing::after{animation:ng-turn 1.4s linear infinite}
  html:not(.motion-reduced)[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-dots i:nth-child(2){animation:ng-pulse 1.4s ease-in-out infinite}
  html:not(.motion-reduced)[data-theme] :is(#assistant-dialog,.n-smart-layer) :is(.n-smart-original,.n-smart-more)>summary::after,
  html:not(.motion-reduced)[data-theme] :is(#assistant-dialog,.n-smart-layer) .n-smart-objections-head::after{transition:transform 240ms cubic-bezier(.2,.8,.2,1)}
  html:not(.motion-reduced)[data-theme] :is(#assistant-dialog,.n-smart-layer) [data-smart-clear][data-confirm="true"]::after{content:"";position:absolute;inset-inline:14px;bottom:6px;height:2px;border-radius:1px;background:currentColor;transform-origin:center;animation:ng-shrink 5s linear both}
  @keyframes ng-scrim{from{background-color:rgba(14,12,20,0)}to{background-color:rgba(14,12,20,.5)}}
  @keyframes ng-rise{from{transform:translateY(28px)}to{transform:none}}
  @keyframes ng-turn{to{transform:rotate(360deg)}}
  @keyframes ng-pulse{0%,100%{opacity:.35}50%{opacity:1}}
  @keyframes ng-shrink{from{transform:scaleX(1)}to{transform:scaleX(0)}}
}
@media (prefers-reduced-motion:reduce){
  html[data-theme] :is(#assistant-dialog,.n-smart-layer),html[data-theme] :is(#assistant-dialog,.n-smart-layer) *,html[data-theme] :is(#assistant-dialog,.n-smart-layer) *::before,html[data-theme] :is(#assistant-dialog,.n-smart-layer) *::after{animation:none!important;transition:none!important}
}
