/* X9 — x9-work styles (design reference port). Loaded after ui/x9.css.
   The Work screen, its chrome and its notice, copied from the reference prototype. Reference canvas pixels are written as
   calc(N * var(--u)) (the 864-px canvas scaled to the phone), real phone pixels stay px where the reference uses them. */

/* ---- background: the two lime beams behind the header (reference .beam) */
.x9-bg .x9-beam { position: absolute; top: calc(-40 * var(--u)); width: calc(3 * var(--u)); height: calc(150 * var(--u)); pointer-events: none;
    background: linear-gradient(#cfff57, #b7ff1b, transparent); box-shadow: 0 0 calc(10 * var(--u)) calc(3 * var(--u)) #a8ff3655; filter: blur(calc(.4 * var(--u))); opacity: .82; }
.x9-bg .x9-beam.a { left: calc(50% - 432 * var(--u) + 247 * var(--u)); transform: rotate(-30deg); }
.x9-bg .x9-beam.b { right: calc(50% - 432 * var(--u) + 272 * var(--u)); transform: rotate(29deg); }
html.x9-studio-on .x9-bg .x9-beam { display: none; }

/* ---- chrome: hides while the Work page scrolls down (reference body.chrome-hidden, 240 ms) and the home indicator */
.x9ui .x9-top, .x9ui .x9-bottom { transition: transform 240ms cubic-bezier(.22, .8, .25, 1), opacity 180ms; will-change: transform; }
body.x9-chrome-hidden .x9-top { transform: translate(-50%, -105%); opacity: 0; pointer-events: none; }
body.x9-chrome-hidden .x9-bottom { transform: translate(-50%, 105%); opacity: 0; pointer-events: none; }
.x9ui .x9-top .x9-icon, .x9ui .x9-bottom .x9-icon { stroke-width: 2.35; }
.x9ui .x9-home { display: block; z-index: 2; }
@media (prefers-reduced-motion: reduce) { .x9ui .x9-top, .x9ui .x9-bottom { transition: none; } }

/* every outline glyph of the design carries the material's stroke (reference svg.x9-metal-icon { stroke-width: 2.35 }) */
.x9w .x9-icon { stroke-width: 2.35; }

/* ---- glass: the cards blur what passes behind them (reference backdrop-filter: blur(9px)) */
.x9ui .x9w-next, .x9ui .x9w-add, .x9ui .x9w-url, .x9ui .x9w-card { -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); }

/* ---- news line glass (reference .banner.glass + ::before) */
.x9ui .x9w-banner { background: transparent; border-color: transparent; box-shadow: none; isolation: isolate; }
.x9ui .x9w-banner::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; background: #234a42d4;
    -webkit-backdrop-filter: blur(18px) saturate(.72); backdrop-filter: blur(18px) saturate(.72); }

/* ---- next action card: the description may take a second line (reference .next p) */
.x9w-next p { white-space: normal; overflow: visible; text-overflow: clip; }
/* the photo stack is drawn on the reference canvas (286×192, slides 200×180, step 16) and scaled with the page */
.x9w-stack-box { position: absolute; left: 0; top: calc(2 * var(--u)); width: calc(286 * var(--u)); height: calc(192 * var(--u)); }
.x9w-stack-box > .x9w-stack { position: absolute; left: 0; top: 0; width: 286px; height: 192px; transform: scale(var(--x9w-scale, .4514)); transform-origin: 0 0; }
.x9w .x9w-stack-box > .x9w-stack.x9-deck.is-compact { --deck-w: 200px; --deck-h: 180px; --deck-step: 16px; perspective: 1000px; }   /* canvas px: the box itself is scaled */
.x9w .x9w-stack-box > .x9w-stack.x9-deck.is-compact .x9-deck-slide { left: calc(50% - var(--deck-step)); padding: 7px; border-radius: 11px; }
.x9w .x9w-stack-box > .x9w-stack.x9-deck.is-compact .x9-deck-photo { border-radius: 7px; }
.x9w .x9w-stack-box > .x9w-stack.x9-deck.is-compact .x9-deck-photo img { object-fit: contain; }
.x9w-stack-box .x9w-stack:focus-visible { outline-width: 4px; }

/* ---- add box */
.x9w-add p { left: calc(205 * var(--u)); text-wrap: pretty; }
.x9w-url:focus-within { border-color: #c4f270; box-shadow: inset 0 1px 3px #ddfbef70, 0 0 0 1px #c4f24555, 0 0 12px #c4f24518; }
.x9w-fetch .x9-icon { color: #122b1e; }

/* ---- chips: coloured 3D artworks, the favourite chip, the red attention chip (reference .chips .chip / .filter-art) */
.x9w-chip .filter-art { width: calc(52 * var(--u)); height: calc(52 * var(--u)); flex: none; overflow: visible; filter: drop-shadow(0 calc(3 * var(--u)) calc(2 * var(--u)) #001b1ba8); transition: transform .18s; }
.x9w-chip.on .filter-art { transform: translateY(calc(-2 * var(--u))); }
.x9w-chip-label { display: inline-flex; align-items: center; gap: calc(8 * var(--u)); direction: rtl; }
.x9w-chip b { font: 700 calc(28.8 * var(--u)) / 1 var(--x9-font); font-variant-numeric: tabular-nums; }
.x9w-chips-scroll .x9w-chip[data-chip="new"] { width: calc(196 * var(--u)); min-width: calc(196 * var(--u)); }
.x9w-chips-scroll .x9w-chip[data-chip="ready"] { width: calc(193 * var(--u)); min-width: calc(193 * var(--u)); }
.x9w-chips-scroll .x9w-chip[data-chip="sent"] { width: calc(212 * var(--u)); min-width: calc(212 * var(--u)); }
.x9w-chips-scroll .x9w-chip[data-chip="attention"] { width: calc(267 * var(--u)); min-width: calc(267 * var(--u)); padding: 0 calc(9 * var(--u)); gap: calc(8 * var(--u));
    color: #f4c0ac; background: linear-gradient(145deg, #674b43ed, #3a302eee); border-color: #bc837778; }
.x9w-chips-scroll .x9w-chip[data-chip="fav"] { width: calc(235 * var(--u)); min-width: calc(235 * var(--u)); }
.x9w-chips-scroll .x9w-chip.on { background: var(--x9w-chip-on-bg); border-color: var(--x9w-chip-on-edge); color: var(--x9w-chip-on-ink); box-shadow: var(--x9w-chip-on-shadow); }
.x9w-chips-scroll { scroll-snap-type: x proximity; overscroll-behavior-x: contain; -webkit-mask-image: linear-gradient(to right, transparent, #000 calc(24 * var(--u))); mask-image: linear-gradient(to right, transparent, #000 calc(24 * var(--u))); }
.x9w-chips-scroll .x9w-chip { scroll-snap-align: start; }
.x9w-chips-scroll:focus-visible { outline: 2px solid #b8e687; outline-offset: 4px; border-radius: calc(20 * var(--u)); }
@media (prefers-reduced-motion: reduce) { .x9w-chip .filter-art { transition: none; } }

/* ---- product card (reference .product …) */
.x9w-name { font-size: calc(33.23 * var(--u)); cursor: pointer; }
.x9w-name:focus-visible { outline: 2px solid var(--x9-lime); outline-offset: 2px; border-radius: 4px; }
.x9w-card { cursor: pointer; }
.x9w-price { font-family: var(--x9-font); font-variant-numeric: tabular-nums; }
.x9w-time { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #c3d0d0; }
.x9w-sep { color: #a5b9b1; flex: none; }
.x9w-status i { width: calc(11 * var(--u)); height: calc(11 * var(--u)); min-width: 0; min-height: 0; }
.x9w-more { left: calc(44 * var(--u)); top: 0; width: var(--x9-tap); height: var(--x9-tap); min-width: 0; min-height: 0; color: #f1f6ff; border-radius: calc(14 * var(--u)); }
.x9w-more .x9-icon { width: calc(32 * var(--u)); height: calc(40 * var(--u)); min-width: 0; }
.x9w-photo { background: linear-gradient(150deg, #b8babc, #969a9b); cursor: zoom-in; }
.x9w-photo:focus-visible { outline: 3px solid var(--x9-lime); outline-offset: -4px; }
.x9w-photo-img img { object-fit: contain; }
.x9w-photo-count { height: auto; min-height: 0; padding: calc(3 * var(--u)) calc(9 * var(--u)); line-height: calc(31 * var(--u)); font-family: var(--x9-font); pointer-events: none;
    -webkit-backdrop-filter: blur(calc(7 * var(--u))); backdrop-filter: blur(calc(7 * var(--u))); }
.x9w-photo-count .x9-icon { width: calc(28 * var(--u)); height: calc(28 * var(--u)); min-width: 0; }
/* the action: a 44-px target, the drawn button inside it 15 canvas px from top and bottom (reference .product-action::before) */
.x9w-action { top: auto; bottom: 0; left: calc(9 * var(--u)); width: calc(166 * var(--u)); height: var(--x9-tap); min-height: 0; padding: 0 calc(3 * var(--u)); isolation: isolate;
    border: 0 !important; border-radius: 0; background: none !important; box-shadow: none !important; color: var(--x9-lime);
    font-size: calc(28.8 * var(--u)); line-height: calc(36 * var(--u)); font-weight: 750; }
.x9w-action::before { content: ''; position: absolute; inset: calc(15 * var(--u)) 0; z-index: -1; border: max(1px, calc(2 * var(--u))) solid var(--x9-lime); border-radius: calc(16 * var(--u)); background: transparent; box-sizing: border-box; }
.x9w-action > span { position: relative; white-space: nowrap; }
.x9w-action.is-solid { color: #10210a; }
.x9w-action.is-solid::before { background: linear-gradient(130deg, #c6ff38, #adf324); box-shadow: 0 0 calc(12 * var(--u)) #b8ff2220; }
.x9w-action.is-quiet { color: #d6e6df; }
.x9w-action.is-quiet::before { border-color: #8ca8a64d; background: #68877820; }
.x9w-action:focus-visible { outline: none; }
.x9w-action:focus-visible::before { outline: 2px solid var(--x9-lime); outline-offset: 2px; }

/* the "no products here" line (reference .products .empty) */
.x9w-empty { height: calc(110 * var(--u)); box-sizing: border-box; padding: calc(35 * var(--u)); margin: 0; font-size: calc(26.58 * var(--u)); color: #bcc8d0; }
.x9w-more-sentinel { height: 1px; margin-top: -1px; }

/* ---- the AI assistant row at the end of the list (reference .assistant / .orb / .assistant-copy) */
.x9w-assistant { position: relative; z-index: 2; display: flex; align-items: center; direction: ltr; text-align: right; width: calc(600 * var(--u)); height: calc(109 * var(--u));
    margin: calc(20.6 * var(--u)) auto 0 calc(-12 * var(--u)); padding: 0; color: var(--x9-ink); background: none; border: 0; }
.x9w-orb { position: absolute; left: calc(-25 * var(--u)); top: calc(-29 * var(--u)); width: calc(160 * var(--u)); height: calc(160 * var(--u)); margin: 0; object-fit: contain; filter: brightness(.8) saturate(.65); pointer-events: none; }
.x9w-assistant-copy { display: block; margin-left: calc(128 * var(--u)); text-align: left; transform: translateY(calc(3 * var(--u)));
    font-size: calc(26.58 * var(--u)); font-weight: 650; line-height: calc(34 * var(--u)); }
.x9w-assistant-copy small { display: block; font-size: calc(26.58 * var(--u)); font-weight: 550; line-height: calc(29 * var(--u)); color: #c1c9d4; }
.x9w-assistant::after { content: ''; position: absolute; left: 0; top: 50%; width: 100%; height: max(100%, var(--x9-tap)); transform: translateY(-50%); }
.x9w.is-selecting .x9w-assistant { visibility: hidden; }

/* ---- the work notice (reference .x9-work-toast): bottom, above the bar, check + words + optional link */
.x9ui .xa-toast.x9-work-toast { position: fixed; top: auto; bottom: calc(99px + env(safe-area-inset-bottom, 0px)); left: 14px; right: 14px; width: auto; max-width: 402px; margin: auto;
    transform: none; opacity: 1; transition: none; z-index: 100200; box-sizing: border-box; min-height: 48px; padding: 7px 12px;
    display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 14px; box-shadow: none;
    background: #2d5646f2; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #edf4ea; font: 400 14px / 1.7 var(--x9-font); text-align: center; pointer-events: auto; }
.x9ui .xa-toast.x9-work-toast.is-passive { pointer-events: none; }
.x9ui .x9-work-toast > span { min-width: 0; }
.x9ui .x9-work-toast button { min-width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 0; background: none; color: #94ddea; font: 14px var(--x9-font); cursor: pointer; }
.x9ui .x9-work-toast .x9-toast-close { min-width: 32px; color: #c5d7cc; font-size: 18px; }
.x9ui .x9-work-toast > .x9-icon { width: 18px; height: 18px; fill: none; stroke: var(--x9-lime); stroke-width: 1.8; flex: none; }
.x9ui .x9-work-toast.err > .x9-icon { stroke: var(--x9-red); }
body.x9-entry-open .x9-work-toast { z-index: 100240; }
.x9w-list { gap: calc(18 * var(--u)); }

/* ---- the product menu and «لوحة سلة» windows (reference product-menu / salla): rows as wide as their words, a small «تم» */
.x9n-window[data-kind="product-menu"] button.x9-work-list-item { width: auto; max-width: 100%; min-height: var(--x9-tap); }
.x9n-window[data-kind="product-menu"] .x9n-foot > button, .x9n-window[data-kind="salla"] .x9n-foot > button { flex: none; width: auto; min-width: var(--x9-tap); background: #45675650; }
.x9n-window[data-kind="salla"] .x9-work-empty { padding: 28px 0; color: #d4e5d8; font-size: 14px; line-height: 1.7; }
.x9n-window[data-kind="salla"] .x9-work-empty > svg.x9-icon { display: block; width: 62px; height: 62px; margin: 0 auto 12px; color: #8ddfe9; stroke-width: 1.8; }
.x9n-window[data-kind="salla"] .x9-work-empty h3 { margin: 8px 0; font-size: 20px; font-weight: 700; line-height: 34px; color: #d4e5d8; }
.x9n-window[data-kind="salla"] .x9-work-empty p { margin: 8px 0 14px; font-size: 14px; line-height: 23.8px; color: #d4e5d8; }
.x9n-window[data-kind="product-menu"] .x9-work-danger > svg { color: #ff938b; }
/* «كل شي تمام» (no button): the title and line sit lower, like the reference .next[data-guide="all-good"] (h1 43→64, p 92→123) */
.x9w-next[data-guide="fine"] h1 { top: calc(65 * var(--k)); }
.x9w-next[data-guide="fine"] p { top: calc(124 * var(--k)); }

/* ======================================================================================================================
   Owner decisions 2026-10-10 (AGENTS.md «قرارات المالك المعتمدة…» 3, 4, 5, 6, 7, 9) — these win over the design reference.
   ====================================================================================================================== */

/* ---- background (6): black base (tokens in app.css), the green and cyan trails always on screen, drifting slowly with a soft glow.
   One fixed, viewport-sized layer moved by transform / opacity only (cheap on mid-range phones); the per-trail SVG animations
   repainted the whole drawing every frame and are switched off. Paused while the tab is hidden (html.x9-hidden), still under
   reduced motion. The entrance hides this layer while it shows its own copy — once the entrance is gone nothing keeps it hidden. */
html.x9ui body > .x9-bg { position: fixed; inset: 0; height: 100vh; height: 100lvh; background: #000; }
/* owner 2026-10-11: a class (ui/entry.js) instead of body:has(> .x9-entry) — :has() on <body> made every change on the page restyle all of it */
html.x9ui:not(.x9-entry-on) body > .x9-bg { visibility: visible !important; }
html.x9ui body > .x9-bg > svg[viewBox] { height: 100%; transform-origin: 50% 50%; animation: x9-trails-drift 14s ease-in-out infinite alternate; will-change: transform, opacity; }
html.x9ui body > .x9-bg .x9-line { animation: none !important; will-change: auto; }
@keyframes x9-trails-drift {
    0% { transform: translateX(-50%) translate3d(-18px, 12px, 0) rotate(-1.2deg) scale(1.03); opacity: .85; }
    33% { transform: translateX(-50%) translate3d(10px, -14px, 0) rotate(.6deg) scale(1.06); opacity: 1; }
    66% { transform: translateX(-50%) translate3d(-8px, -6px, 0) rotate(-.4deg) scale(1.04); opacity: .92; }
    100% { transform: translateX(-50%) translate3d(18px, 10px, 0) rotate(1.2deg) scale(1.03); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { html.x9ui body > .x9-bg > svg[viewBox] { animation: none; transform: translateX(-50%); } }
body.x9-motion-reduced > .x9-bg > svg[viewBox] { animation: none; transform: translateX(-50%); }

/* ---- header greeting (3): «مرحباً 👋» on one line */
.x9ui .x9-greeting { top: calc(53 * var(--u)); font-size: calc(36 * var(--u)); line-height: calc(46 * var(--u)); font-weight: 650; }
.x9ui .x9-greeting::after { top: calc(15 * var(--u)); }

/* ---- the central ticker: held while touched, messages as buttons, the still (reduced motion) mode */
.xa-ticker.is-held .xa-ticker-track, .xa-ticker:focus-within .xa-ticker-track { animation-play-state: paused; }
.xa-ticker button.it { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.xa-ticker .xa-ticker-more { font-weight: 600; opacity: .95; white-space: nowrap; }
.xa-ticker.is-still { -webkit-mask-image: none; mask-image: none; }
.xa-ticker-still { position: relative; width: 100%; height: 100%; min-height: 44px; direction: rtl; }
.xa-ticker-still > .it { position: absolute; inset: 0; justify-content: flex-start; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s .35s; }
.xa-ticker-still > .it.on { opacity: 1; visibility: visible; transition: opacity .35s ease; }
.xa-ticker-still > .dot { display: none; }

/* ---- news line (4, 9): the banner's glass, the megaphone at the start, one moving line, «التفاصيل», no × */
.x9w-news { overflow: hidden; }
.x9w-news .x9w-news-line { position: absolute; left: calc(10 * var(--u)); right: calc(74 * var(--u)); top: 0; bottom: 0; display: flex; align-items: center; min-width: 0; }
.x9w-news .xa-ticker { flex: 1; min-width: 0; height: 100%; margin: 0; border: 0; border-radius: 0; background: none; display: flex; align-items: center; }
.x9w-news .xa-ticker .it { padding: 0 calc(20 * var(--u)); font-size: calc(30 * var(--u)); font-weight: 650; line-height: 1.3; color: var(--x9w-cyan, #5cecee); }
.x9w-news .xa-ticker .xa-ticker-more { font-size: calc(26 * var(--u)); color: #d9f59f; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.x9w-news .xa-ticker .dot { width: calc(10 * var(--u)); height: calc(10 * var(--u)); background: #c6f532; box-shadow: 0 0 calc(10 * var(--u)) #c6f53288; }
.x9w-news .xa-ticker button.it:focus-visible { outline: 2px solid var(--x9-lime); outline-offset: -3px; border-radius: 8px; }

/* ---- guidance card (3, 4): compact — no label, no description; the icon area (later: the products that need attention) smaller;
   the button sized to its words (a 44-px target), «+3 تنبيهات» under the icon */
.x9w-next { height: calc(150 * var(--k)); }
.x9w-next.has-button { height: calc(196 * var(--k)); }
.x9w-next h1 { left: calc(236 * var(--k)); right: calc(28 * var(--k)); top: calc(26 * var(--k)); font-size: max(16px, calc(38 * var(--k))); line-height: calc(54 * var(--k)); }
.x9w-next:not(.has-button) h1, .x9w-next[data-guide="fine"] h1 { top: calc(46 * var(--k)); }
.x9w-bigicon { left: calc(48 * var(--k)); top: calc(18 * var(--k)); width: calc(104 * var(--k)); height: calc(104 * var(--k)); }
.x9w-next:not(.has-button) .x9w-bigicon { top: calc(22 * var(--k)); }
.x9w-stack-box { top: calc(4 * var(--u)); width: calc(206 * var(--u)); height: calc(138 * var(--u)); }
.x9w-stack-box > .x9w-stack { transform: scale(calc(var(--x9w-scale, .4514) * .72)); }
.x9w-count { left: calc(22 * var(--k)); top: calc(12 * var(--k)); width: calc(38 * var(--k)); height: calc(38 * var(--k)); }
.x9w-review { left: auto; right: calc(28 * var(--k)); top: calc(96 * var(--k)); height: calc(74 * var(--k)); min-height: 0; width: auto; min-width: calc(210 * var(--k)); max-width: calc(100% - 290 * var(--k)); padding: 0 calc(30 * var(--k));
    box-sizing: border-box; border-radius: calc(20 * var(--k)); font-size: max(14px, calc(32 * var(--k))); gap: calc(10 * var(--k)); white-space: nowrap; }
.x9w-review::after { content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, var(--x9-tap)); height: max(100%, var(--x9-tap)); transform: translate(-50%, -50%); }
.x9w-review .x9-icon { width: calc(26 * var(--k)); height: calc(26 * var(--k)); min-width: 12px; }
.x9w-other { left: calc(14 * var(--k)); top: auto; bottom: calc(6 * var(--k)); width: calc(200 * var(--k)); height: var(--x9-tap); min-height: 0; padding: 0 calc(10 * var(--k)); text-align: center;
    font-size: max(12px, calc(28 * var(--k))); font-weight: 600; color: #d6ebc8; }

/* ---- add card (3, 4): «إضافة منتج», no description, the box art 30 % smaller, the link field lit (lighter glass, a thin glowing lime
   edge, a shine passing every few seconds in every state), «لصق» / «×» inside it, one row «جلب المنتج» + «المزيد», no method buttons */
.x9w-add, .x9w-add:has(.x9w-status-line:not(:empty)) { height: calc(380 * var(--k) + var(--x9w-note-height, 0px)); }
.x9w-add h2 { top: calc(26 * var(--k)); font-size: max(17px, calc(44 * var(--k))); }
.x9w-box-art { left: calc(2 * var(--k)); top: calc(-6 * var(--k)); width: calc(163 * var(--k)); height: calc(144 * var(--k)); }
.x9ui .x9w-url { top: calc(124 * var(--k)); height: calc(100 * var(--k)); overflow: hidden; isolation: isolate;
    border: 1px solid #c6f532a8; background: linear-gradient(125deg, #6a979c8f, #2f5d56db);
    box-shadow: inset 0 1px 3px #e6fff470, 0 0 0 .5px #c6f53233, 0 0 calc(16 * var(--k)) #c6f5323d; }
.x9ui .x9w-url:focus-within { border-color: #d6ff6b; box-shadow: inset 0 1px 3px #e6fff470, 0 0 0 1px #c6f53266, 0 0 calc(22 * var(--k)) #c6f53255; }
.x9ui .x9w-url::after, .x9ui .x9w-url.is-guide::after, .x9ui .x9w-url:focus-within.is-guide::after { content: ''; display: block; position: absolute; inset: 0; z-index: 0; width: 30%; border-radius: inherit; pointer-events: none;
    background: linear-gradient(90deg, transparent, #f1ffc85c, transparent); animation: x9-sweep 4.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .x9ui .x9w-url::after, .x9ui .x9w-url.is-guide::after, .x9ui .x9w-url:focus-within.is-guide::after { animation: none; display: none; } }
.x9w-url-input { z-index: 1; padding-left: calc(132 * var(--k)); font-size: max(15px, calc(33.2 * var(--k))); }
.x9w-paste { left: calc(10 * var(--k)); width: auto; min-width: var(--x9-tap); padding: 0 calc(6 * var(--k)); z-index: 2; color: #eaffb8; }
.x9w-paste > span { display: block; padding: calc(9 * var(--k)) calc(22 * var(--k)); border-radius: calc(16 * var(--k)); border: 1px solid #c6f53280; background: #c6f53226;
    font-size: max(13px, calc(28 * var(--k))); font-weight: 700; line-height: 1.25; }
.x9w-paste:active > span { background: #c6f53240; }
.x9w-url.has-value .x9w-paste { color: #dcebe5; }
.x9w-url.has-value .x9w-paste .x9-icon { width: calc(36 * var(--k)); height: calc(36 * var(--k)); min-width: 16px; }
.x9w-add-row { position: absolute; left: calc(27.6 * var(--k)); right: calc(27.6 * var(--k)); top: calc(246 * var(--k) + var(--x9w-note-height, 0px)); height: calc(108.5 * var(--k)); min-height: var(--x9-tap);
    display: flex; gap: calc(18 * var(--k)); direction: rtl; }
.x9w-add-row > .x9w-fetch { position: relative; left: auto; right: auto; top: auto; flex: 1; min-width: 0; height: 100%; }
.x9w-add-more { flex: none; width: calc(196 * var(--k)); height: 100%; min-height: var(--x9-tap); display: flex; align-items: center; justify-content: center; gap: calc(10 * var(--k)); box-sizing: border-box;
    border-radius: calc(28.8 * var(--k)); border: 1px solid #b4d9d870; background: linear-gradient(140deg, #6c949066, #2d544b8c); box-shadow: inset 0 1px 3px #d5f3ec55, 0 4px 10px #00140f66;
    color: #eef6f2; font-size: max(14px, calc(32 * var(--k))); font-weight: 750; white-space: nowrap; -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); }
.x9w-add-more .x9-icon { width: calc(34 * var(--k)); height: calc(34 * var(--k)); min-width: 15px; color: #cfe7f0; }
.x9w-add-more:active { transform: scale(.98); }
.x9w-add.x9-preview-open > .x9w-add-row { visibility: hidden; }
/* «جارٍ قراءة الرابط…» sits under the field (the link stays visible with its ×), in the place of the hidden button row */
.x9w-add > .x9-link-panel:not(.is-category) { top: calc(234 * var(--k)); height: calc(132 * var(--k)); }
.x9w-add > .x9-link-panel.is-category { top: calc(124 * var(--k)); }

/* ---- the list's tool row (5): three icons — search, filters, select; each bar covers the icons in the same place, × gives them back */
.x9w-tools { position: relative; height: calc(98 * var(--u)); min-height: var(--x9-tap); margin-top: calc(44 * var(--u)); direction: rtl; }
.x9w-tools[hidden], .x9w.is-empty .x9w-tools { display: none; }
.x9w-tool-icons { height: 100%; display: flex; align-items: center; justify-content: flex-start; gap: calc(18 * var(--u)); }
.x9w-tool-icons[hidden] { display: none; }
.x9w-tool, .x9w-tool-close { position: relative; flex: none; width: calc(98 * var(--u)); height: calc(98 * var(--u)); min-width: var(--x9-tap); min-height: var(--x9-tap); display: grid; place-items: center; box-sizing: border-box;
    border-radius: calc(26 * var(--u)); border: 1px solid #b0d3d36e; background: linear-gradient(140deg, #4f78776b, #1c3a35b8); box-shadow: inset 0 1px 3px #c2eeef4d, 0 6px 12px #00000080;
    color: #d6e7f2; -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); }
.x9w-tool .x9-icon { width: calc(46 * var(--u)); height: calc(46 * var(--u)); min-width: 20px; min-height: 20px; }
.x9w-tool.is-on { border-color: #c6f53299; }
.x9w-tool-dot { position: absolute; top: calc(14 * var(--u)); left: calc(14 * var(--u)); width: 8px; height: 8px; border-radius: 50%; background: #c6f532; box-shadow: 0 0 8px #c6f532aa; }
.x9w-tool-dot[hidden] { display: none; }
.x9w-tool-close .x9-icon { width: calc(38 * var(--u)); height: calc(38 * var(--u)); min-width: 17px; min-height: 17px; }
.x9w-tool-layer { position: absolute; inset: 0; display: flex; align-items: center; gap: calc(14 * var(--u)); animation: x9w-layer-in 160ms ease-out; }
.x9w-tool-layer[hidden] { display: none; }
@keyframes x9w-layer-in { from { opacity: 0; transform: translateY(calc(6 * var(--u))); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .x9w-tool-layer { animation: none; } }
/* search: the field with its icon, instant */
.x9w-tool-search .x9w-search-box { position: relative; flex: 1; min-width: 0; height: 100%; min-height: var(--x9-tap); display: flex; align-items: center; gap: calc(14 * var(--u)); padding: 0 calc(24 * var(--u)); box-sizing: border-box;
    border-radius: calc(26 * var(--u)); border: 1px solid #c6f53280; background: linear-gradient(120deg, #3a6168a6, #1a3633ee); box-shadow: inset 0 1px 3px #c2eeef50, 0 0 calc(12 * var(--u)) #c6f53222;
    -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); }
.x9w-tool-search .x9w-search-box .x9-icon { position: static; flex: none; width: calc(40 * var(--u)); height: calc(40 * var(--u)); min-width: 18px; color: #c9daea; pointer-events: none; }
.x9w-tool-search .x9w-search-box input { position: static; flex: 1; min-width: 0; width: auto; height: 100%; min-height: 0; padding: 0; border: 0; background: none; outline: none; direction: rtl; color: var(--x9-ink);
    font: 500 max(15px, calc(33 * var(--u))) var(--x9-font); }
.x9w-tool-search .x9w-search-box input::placeholder { color: #bccad8; opacity: 1; }
.x9w-tool-search .x9w-search-box input::-webkit-search-cancel-button { display: none; -webkit-appearance: none; }
/* filters: the status chips (and «النوع والماركة»), scrolling sideways */
.x9w-tool-filters .x9w-chips { flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; gap: calc(14 * var(--u)); }
.x9w-tool-filters .x9w-chip { height: 100%; min-height: var(--x9-tap); }
.x9w-tool-filters .x9w-chips-scroll { padding-bottom: 0; margin-bottom: 0; align-items: stretch; }
.x9w-chips-scroll .x9w-chip.x9w-chip-kind { width: auto; min-width: 0; padding: 0 calc(22 * var(--u)); gap: calc(10 * var(--u)); }
.x9w-chip-kind .x9-icon { width: calc(38 * var(--u)); height: calc(38 * var(--u)); min-width: 16px; color: #c1d4f2; }
/* select: the selection bar here, instead of over the header */
.x9w-selrow { justify-content: space-between; padding: 0 calc(8 * var(--u)) 0 calc(20 * var(--u)); box-sizing: border-box; border-radius: calc(26 * var(--u)); border: 1px solid #c6f53266;
    background: #183b30f2; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #eef7ec; }
.x9w-selrow .x9w-tool-close { order: 0; width: var(--x9-tap); height: var(--x9-tap); border: 0; background: none; box-shadow: none; }
.x9w-selrow .x9w-sel-count { flex: 1; text-align: center; font-size: 16px; font-weight: 700; }
.x9w-selrow .x9w-sel-all { min-height: var(--x9-tap); padding: 0 calc(20 * var(--u)); font-size: 15px; font-weight: 700; color: #c6f532; border: 0; background: none; }
.xp.x9w-selecting .x9-top { visibility: visible; }

/* ---- font (7): IBM Plex Sans Arabic everywhere; the Work screen's small words a little larger on phones */
.x9w-meta { font-size: max(12.5px, calc(28.5 * var(--u))); }
.x9w-assistant-copy, .x9w-assistant-copy small { font-size: calc(29 * var(--u)); }
.x9w-empty { font-size: calc(29 * var(--u)); }
.x9w-chip { font-size: max(13px, calc(31 * var(--k))); }

/* ---- «المزيد» (4): ordered ways, clear readable names */
.x9n-window[data-kind="add-more"] .x9w-ways { display: flex; flex-direction: column; }
.x9n-window[data-kind="add-more"] .x9-exp-row.x9w-way { min-height: 56px; padding: 10px 4px; gap: 12px; border-bottom: 1px solid #ffffff14; }
.x9n-window[data-kind="add-more"] .x9-exp-row.x9w-way:last-child { border-bottom: 0; }
.x9n-window[data-kind="add-more"] .x9-exp-row.x9w-way strong { font-size: 16px; line-height: 1.5; font-weight: 700; color: #f3f8f4; }
.x9n-window[data-kind="add-more"] .x9-exp-row.x9w-way small { font-size: 13px; line-height: 1.5; color: #c4d6cf; }
.x9n-window[data-kind="add-more"] .x9-exp-row.x9w-way > .x9-icon:first-child { width: 24px; height: 24px; flex: none; color: #c6f532; }

/* owner decision 2026-10-10: card sizes like the phone's system cards (Xiaomi Home): product card = the recommendation cards,
   add card = the big top card */
html.x9ui .x9w .x9w-card { height: calc(270 * var(--k)); border-radius: calc(49 * var(--k)); margin-bottom: calc(6 * var(--k)); }
html.x9ui .x9w .x9w-card .x9w-photo { width: calc(250 * var(--k)); border-radius: 0 calc(47 * var(--k)) calc(47 * var(--k)) 0; }
html.x9ui .x9w .x9w-add { height: auto; min-height: calc(500 * var(--k)); border-radius: calc(58 * var(--k)); display: flex; flex-direction: column; justify-content: space-between; }
html.x9ui .x9w .x9w-card .x9w-info { right: calc(268 * var(--k)); top: calc(34 * var(--k)); }
html.x9ui .x9w .x9w-add > *:last-child { margin-bottom: calc(10 * var(--k)); }
html.x9ui .x9w .x9w-add { justify-content: space-evenly; padding-block: calc(18 * var(--k)); }
html.x9ui .x9w .x9w-add > * { margin-block: 0 !important; }
html.x9ui .x9w .x9w-add > * { translate: 0 calc(62 * var(--k)); }

/* owner 2026-10-11 (option ج): the cards stay see-through; the trails are 25% softer everywhere and fade further behind the list.
   One static dark veil over the lines (the page is black, so only the lines dim) — nothing redrawn per frame. */
html.x9ui body > .x9-bg::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.25) 16%, rgba(0,0,0,.6) 34%, rgba(0,0,0,.6) 90%, rgba(0,0,0,.4) 100%); }
