/* Index: a fast, precise shopping app. Cool near-white canvas, white panels, slate type, hairlines,
   one electric violet and a mint for success. Geist for the UI, Geist Mono for figures, IBM Plex Sans Arabic.
   Small radii, dense but airy. Logical properties throughout so Arabic mirrors. */

:root {
  --bg: #f7f8fa;
  --panel: #ffffff;
  --sunk: #f1f3f6;
  --hover: #f3f4f7;
  --stage: #eceef2;
  --line: #e4e7ec;
  --line2: #d3d8e0;
  --ink: #141a26;
  --ink2: #3b4354;
  --mute: #5a6274;
  --accent: #6d4aff;
  --accent-ink: #ffffff;
  --accent-hi: #5a36f5;
  --accent-text: #5631ee;
  --accent-soft: #efebff;
  --accent-ring: rgba(109, 74, 255, .28);
  --mint: #12a574;
  --mint-text: #07704d;
  --mint-soft: #e2f6ee;
  --sale-text: #b4234f;
  --sale-soft: #fdebf0;
  --warn-text: #a8321b;
  --warn-soft: #fdeee9;
  --pla: #0f6e9e; --pla-soft: #e4f2fa;
  --petg: #7a4a06; --petg-soft: #fbf1df;
  --shadow: 0 1px 2px rgba(20, 26, 38, .05);
  --pop: 0 24px 60px -16px rgba(20, 26, 38, .28), 0 0 0 1px var(--line);
  --r: 6px;
  --r2: 10px;
  --font: 'Geist', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --top: 56px;
  --tabs: 0px;
  --gut: 24px;
  /* room view */
  --rv-bg: #eceef2; --rv-surface: #ffffff; --rv-text: #141a26; --rv-muted: #5a6274; --rv-line: #e4e7ec;
  --rv-accent: #6d4aff; --rv-accent-text: #ffffff; --rv-radius: 6px; --rv-font: var(--font); --rv-font-display: var(--font);
  color-scheme: light;
}
/* dark: follows the system, or ?theme=dark / ?theme=light (sets data-theme on <html>) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f14; --panel: #14171e; --sunk: #191c25; --hover: #1c202a; --stage: #1d212b;
    --line: #262b36; --line2: #343a47; --ink: #e9ebf1; --ink2: #c3c8d4; --mute: #9aa1b2;
    --accent: #6d4aff; --accent-hi: #7b5cff; --accent-text: #b2a3ff; --accent-soft: #221b45; --accent-ring: rgba(140, 113, 255, .4);
    --mint: #2fc48c; --mint-text: #4fdca4; --mint-soft: #0f2a21;
    --sale-text: #ff8fb0; --sale-soft: #3a1522; --warn-text: #ff9c86; --warn-soft: #36160f;
    --pla: #7cc8ef; --pla-soft: #10283a; --petg: #f0c27a; --petg-soft: #33240d;
    --shadow: none; --pop: 0 24px 60px -16px rgba(0, 0, 0, .7), 0 0 0 1px var(--line2);
    --rv-bg: #1d212b; --rv-surface: #14171e; --rv-text: #e9ebf1; --rv-muted: #9aa1b2; --rv-line: #262b36; --rv-accent: #6d4aff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0d0f14; --panel: #14171e; --sunk: #191c25; --hover: #1c202a; --stage: #1d212b;
    --line: #262b36; --line2: #343a47; --ink: #e9ebf1; --ink2: #c3c8d4; --mute: #9aa1b2;
    --accent: #6d4aff; --accent-hi: #7b5cff; --accent-text: #b2a3ff; --accent-soft: #221b45; --accent-ring: rgba(140, 113, 255, .4);
    --mint: #2fc48c; --mint-text: #4fdca4; --mint-soft: #0f2a21;
    --sale-text: #ff8fb0; --sale-soft: #3a1522; --warn-text: #ff9c86; --warn-soft: #36160f;
    --pla: #7cc8ef; --pla-soft: #10283a; --petg: #f0c27a; --petg-soft: #33240d;
    --shadow: none; --pop: 0 24px 60px -16px rgba(0, 0, 0, .7), 0 0 0 1px var(--line2);
    --rv-bg: #1d212b; --rv-surface: #14171e; --rv-text: #e9ebf1; --rv-muted: #9aa1b2; --rv-line: #262b36; --rv-accent: #6d4aff;
    color-scheme: dark;
  }
[lang="ar"] { --font: 'IBM Plex Sans Arabic', 'Geist', system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-block-start: calc(var(--top) + 12px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.5 var(--font); font-feature-settings: 'ss01', 'cv11'; -webkit-font-smoothing: antialiased; padding-block-end: var(--tabs); }
html.has-dlg { overflow: hidden; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.ico { width: 18px; height: 18px; flex: none; }
[dir="rtl"] [data-dir] { transform: scaleX(-1); }
.num, .pr, kbd, .fopt__n, .tb__n { font-family: var(--mono); font-feature-settings: 'tnum'; }
[lang="ar"] { --mono: 'IBM Plex Sans Arabic', 'Geist', sans-serif; }   /* Geist Mono spaces out د.إ */
.mute { color: var(--mute); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; inset-inline-start: 12px; inset-block-start: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: var(--r); text-decoration: none; font-weight: 600; }
.skip:focus { inset-block-start: 10px; }

kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--line2); border-block-end-width: 2px; border-radius: 4px; background: var(--panel); color: var(--mute); font-size: 12px; line-height: 1; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line2); border-radius: var(--r); background: var(--panel); color: var(--ink); font-weight: 500; font-size: 14px; text-decoration: none; white-space: nowrap; box-shadow: var(--shadow); transition: background .12s, border-color .12s, transform .08s; }
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn--primary kbd { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); color: #fff; }
.btn--ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--mute); }
.btn--ghost:hover { background: var(--hover); color: var(--ink); }
.btn--sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn--block { width: 100%; }
.btn--grow { flex: 1; }
.btn.is-done { background: var(--mint); border-color: var(--mint); color: #fff; }
.k-in { margin-inline-start: 2px; }
.ibtn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid transparent; border-radius: var(--r); background: transparent; color: var(--ink2); }
.ibtn:hover { background: var(--hover); color: var(--ink); }
.ibtn.is-done { color: var(--mint-text); }
.linkbtn { border: 0; background: none; padding: 4px 2px; color: var(--accent-text); font-weight: 500; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); min-height: 28px; min-width: 32px; }

/* ---------- top bar ---------- */
.top { position: sticky; inset-block-start: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: var(--top); padding-inline: 16px; background: var(--panel); border-block-end: 1px solid var(--line); }
.mark { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; font-size: 15px; min-height: 44px; flex: none; }
.mark__g { width: 26px; height: 26px; }
[lang="ar"] .mark__t { letter-spacing: 0; }
.top__nav { display: flex; gap: 2px; margin-inline-start: 8px; }
.top__nav a { padding: 6px 10px; border-radius: var(--r); text-decoration: none; color: var(--mute); font-weight: 500; font-size: 13.5px; }
.top__nav a:hover { background: var(--hover); color: var(--ink); }
.top__nav a[aria-current] { color: var(--ink); background: var(--sunk); }
.cmdk { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; min-width: 300px; height: 36px; padding: 0 6px 0 10px; border: 1px solid var(--line2); border-radius: var(--r); background: var(--sunk); color: var(--mute); font-size: 13.5px; }
.cmdk:hover { border-color: var(--accent); color: var(--ink); }
.cmdk__t { flex: 1; text-align: start; }
.tbtn { position: relative; display: inline-grid; place-items: center; min-width: 40px; height: 36px; padding: 0 8px; border: 1px solid transparent; border-radius: var(--r); background: none; text-decoration: none; color: var(--ink2); font-weight: 500; }
.tbtn:hover { background: var(--hover); }
.tbtn--lang { font-size: 14px; }
.badge { position: absolute; inset-block-start: 1px; inset-inline-end: -1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font: 600 11.5px/18px var(--mono); text-align: center; }
.badge.is-zero { display: none; }
.tabs { display: none; }

/* ---------- shared bits ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--shadow); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px 3px 8px; border: 1px solid var(--line2); border-radius: 99px; background: var(--panel); font-size: 12.5px; font-weight: 500; color: var(--ink2); }
.pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px var(--mint-soft); }
.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; font: 600 12px/1 var(--mono); letter-spacing: .02em; }
.chip--pla { background: var(--pla-soft); color: var(--pla); }
.chip--petg { background: var(--petg-soft); color: var(--petg); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; background: var(--sunk); color: var(--ink2); font-size: 12px; font-weight: 600; }
.tag--sale { background: var(--sale-soft); color: var(--sale-text); font-family: var(--mono); }
.tag--own { background: var(--accent-soft); color: var(--accent-text); }
.tag--ok { background: var(--mint-soft); color: var(--mint-text); }
.tag--rates { margin-inline-start: auto; font-weight: 500; }
.pr { display: inline-flex; align-items: baseline; gap: 6px; }
.pr__now { font-weight: 600; color: var(--ink); }
.pr__was { color: var(--mute); font-size: max(12px, .88em); }
.pr--lg .pr__now { font-size: 20px; }
.pr--xl .pr__now { font-size: 26px; letter-spacing: -.02em; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-inline-end: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
.note { font-size: 13px; color: var(--mute); }
.note a { color: var(--accent-text); display: inline-block; padding-block: 4px; }
.note--box { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunk); color: var(--ink2); }
.note--box b { color: var(--ink); }
.pod { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mint-text); font-weight: 500; }
.sec__h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-block-end: 10px; }
.sec__h h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.sec__sub { color: var(--mute); font-size: 13px; }
.sub-h { font-size: 13px; font-weight: 600; color: var(--ink); margin-block: 18px 8px; }
.kv { display: grid; gap: 0; font-size: 13px; }
.kv > div { display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: 12px; padding-block: 7px; border-block-start: 1px solid var(--line); }
.kv > div:first-child { border-block-start: 0; }
.kv dt { color: var(--mute); }
.kv dd { color: var(--ink); min-width: 0; }
.kv--tight > div { padding-block: 5px; }
.ticks { display: grid; gap: 12px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .ico { color: var(--accent-text); margin-block-start: 1px; }
.ticks b { display: block; font-weight: 600; font-size: 13.5px; }
.ticks li > span > span { display: block; color: var(--mute); font-size: 13px; }
.ticks--sm { gap: 10px; margin-block-start: 14px; }

/* studio thumbnails (rendered by js/stage.js) */
.th { position: relative; display: block; overflow: hidden; background: radial-gradient(120% 90% at 50% 30%, color-mix(in srgb, var(--stage) 40%, var(--panel)), var(--stage)); }
.th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.th.is-on img { opacity: 1; }
.th__ph { position: absolute; inset: 0; display: grid; place-items: center; color: color-mix(in srgb, var(--mute) 45%, transparent); font: 600 14px var(--mono); letter-spacing: .05em; }
.th.is-on .th__ph { visibility: hidden; }
html.rm .th img { transition: none; }

/* toasts */
.toasts { position: fixed; inset-block-end: calc(16px + var(--tabs) + env(safe-area-inset-bottom)); inset-inline-end: 16px; z-index: 60; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 8px; border-radius: var(--r2); background: var(--ink); color: var(--bg); box-shadow: var(--pop); opacity: 0; transform: translateY(8px); transition: opacity .18s, transform .18s; }
.toast.is-on { opacity: 1; transform: none; }
html.rm .toast { transition: none; }
.toast .th { width: 44px; height: 44px; border-radius: 6px; flex: none; }
.toast__dot { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--mint); color: #fff; flex: none; }
.toast__txt { flex: 1; display: grid; font-size: 13px; min-width: 0; }
.toast__txt b { font-weight: 600; }
.toast__txt span { opacity: .78; }
.toast__btn { flex: none; display: inline-grid; place-items: center; min-height: 36px; padding: 0 12px; border: 1px solid color-mix(in srgb, var(--bg) 30%, transparent); border-radius: var(--r); background: none; color: var(--bg); font-weight: 600; font-size: 13px; text-decoration: none; }

/* ---------- dialogs: palette and sheets ---------- */
dialog { padding: 0; border: 0; background: none; color: var(--ink); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(13, 15, 20, .38); }
.pal { position: fixed; inset-block-start: 12vh; margin-inline: auto; width: min(640px, calc(100vw - 24px)); }
.pal__in { display: flex; flex-direction: column; max-height: min(560px, 76vh); border-radius: 12px; background: var(--panel); box-shadow: var(--pop); overflow: hidden; }
.pal__bar { display: flex; align-items: center; gap: 10px; padding: 0 10px 0 16px; border-block-end: 1px solid var(--line); }
.pal__bar .ico { color: var(--mute); }
.pal__bar input { flex: 1; min-width: 0; height: 54px; border: 0; background: none; font-size: 16px; outline: none; }
.pal__esc { border: 0; background: none; padding: 8px; min-height: 40px; }
.pal__list { overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.pal__g { padding: 10px 10px 4px; color: var(--mute); font-size: 12px; font-weight: 600; }
.pal__it { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border-radius: 7px; cursor: pointer; }
.pal__it[aria-selected="true"] { background: var(--accent-soft); }
.pal__it[aria-selected="true"] .pal__ico { color: var(--accent-text); }
.pal__ico { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink2); flex: none; }
.th--pal { width: 32px; height: 32px; border-radius: 6px; flex: none; }
.pal__l { flex: 1; display: grid; min-width: 0; }
.pal__lab { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal__sub { color: var(--mute); font-size: 12.5px; }
.pal__none { padding: 24px 12px; color: var(--mute); text-align: center; }
.pal__foot { display: flex; gap: 16px; align-items: center; padding: 8px 14px; border-block-start: 1px solid var(--line); background: var(--sunk); color: var(--mute); font-size: 12px; }
.pal__foot kbd { margin-inline-end: 3px; }
.pal__n { margin-inline-start: auto; }

.sheet { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-height: 92dvh; }
.sheet__in, .sheet > .side__in, .sheet > .insp__in { background: var(--panel); border-radius: 14px 14px 0 0; box-shadow: var(--pop); max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; padding-block-end: env(safe-area-inset-bottom); }
.sheet__h { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 8px 16px; position: sticky; inset-block-start: 0; background: var(--panel); }
.sheet__h h2 { font-size: 16px; font-weight: 600; }
.sheet--keys { inset: 0; margin: auto; width: min(460px, calc(100vw - 24px)); height: fit-content; }
.sheet--keys .sheet__in { border-radius: 12px; padding-block-end: 8px; }
.keys { padding: 0 16px 8px; }
.keys > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; border-block-start: 1px solid var(--line); font-size: 13.5px; }
.keys dd { display: flex; gap: 4px; align-items: center; flex: none; }
.keys__or { color: var(--mute); font-size: 12px; }
html:not(.rm) .pal[open] .pal__in, html:not(.rm) .sheet--keys[open] .sheet__in { animation: pop .14s cubic-bezier(.2, .8, .2, 1); }
html:not(.rm) .sheet--fac[open] > *, html:not(.rm) .sheet--insp[open] > * { animation: rise .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { from { opacity: 0; transform: scale(.98) translateY(-4px); } }
@keyframes rise { from { transform: translateY(24px); opacity: .6; } }

/* ---------- home: the app ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr) 360px; align-items: start; }
.side, .insp { position: sticky; inset-block-start: var(--top); height: calc(100dvh - var(--top)); overflow-y: auto; scrollbar-width: thin; }
.side { border-inline-end: 1px solid var(--line); background: var(--bg); }
.side__in { padding: 14px 12px 20px; }
.side__h { display: flex; align-items: center; gap: 6px; padding: 2px 6px 6px; }
.side__h h2 { flex: 1; font-size: 13px; font-weight: 600; }
.side__x, .side__go, .insp__x { display: none; }
.fac { margin: 0 0 12px; padding: 0; border: 0; min-width: 0; }
.fac legend { padding: 8px 6px 4px; font-size: 12px; font-weight: 600; color: var(--mute); }
.fopt { position: relative; display: flex; align-items: center; gap: 9px; min-height: 32px; padding: 0 6px; border-radius: var(--r); cursor: pointer; font-size: 13.5px; color: var(--ink2); }
.fopt:hover { background: var(--hover); color: var(--ink); }
.fopt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.fopt__box { display: grid; place-items: center; width: 16px; height: 16px; border: 1.5px solid var(--line2); border-radius: 4px; background: var(--panel); color: transparent; flex: none; }
.fopt__box .ico { width: 12px; height: 12px; stroke-width: 2.6; }
.fopt input:checked + .fopt__box { background: var(--accent); border-color: var(--accent); color: #fff; }
.fopt input:focus-visible ~ .fopt__l { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.fopt__l { flex: 1; }
.fopt__n { color: var(--mute); font-size: 12px; }
.fopt.is-none { color: var(--mute); }
.fopt input:checked ~ .fopt__l { color: var(--ink); font-weight: 500; }
.sw__t { width: 28px; height: 16px; border-radius: 9px; background: var(--line2); position: relative; flex: none; transition: background .15s; }
.sw__t::after { content: ''; position: absolute; inset-block-start: 2px; inset-inline-start: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.fopt input:checked + .sw__t { background: var(--accent); }
.fopt input:checked + .sw__t::after { transform: translateX(12px); }
[dir="rtl"] .fopt input:checked + .sw__t::after { transform: translateX(-12px); }
.side__keys { display: flex; align-items: center; gap: 8px; padding: 6px; color: var(--mute); font-size: 12px; }

.main { min-width: 0; padding: 20px var(--gut) 32px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.intro__copy { display: grid; gap: 10px; justify-items: start; }
.intro h1 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.12; letter-spacing: -.028em; font-weight: 600; max-width: 22ch; }
[lang="ar"] .intro h1 { letter-spacing: 0; line-height: 1.35; }
.intro__sub { color: var(--mute); font-size: 15px; max-width: 56ch; }
.intro__cta { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 4px; }
.intro__k kbd { margin-inline-end: 2px; }
.how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r2); background: var(--panel); overflow: hidden; }
.how__h { grid-column: 1 / -1; padding: 9px 14px; border-block-end: 1px solid var(--line); background: var(--sunk); }
.how__h h2 { font-size: 12.5px; font-weight: 600; color: var(--ink2); }
.how li:not(.how__h) { display: grid; gap: 2px; align-content: start; padding: 12px 14px 14px; border-inline-start: 1px solid var(--line); font-size: 13px; color: var(--mute); }
.how li:nth-child(2) { border-inline-start: 0; }
.how b { color: var(--ink); font-weight: 600; font-size: 13.5px; }
.how__n { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-block-end: 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); font: 600 12px var(--mono); }

.pins { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pin { color: var(--accent-text); width: 16px; height: 16px; align-self: center; }
.pinb { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 64px; padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: var(--r2); background: var(--panel); text-align: start; box-shadow: var(--shadow); }
.pinb:hover { border-color: var(--line2); }
.pinb.is-sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.th--pin { width: 52px; height: 52px; border-radius: 6px; flex: none; }
.pinb__t { display: grid; gap: 2px; min-width: 0; font-size: 13px; }
.pinb__n { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cats { display: none; }
.tb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-block-end: 10px; border-block-end: 1px solid var(--line); }
.tb__t { flex: 1; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.tb__n { color: var(--mute); font-weight: 400; font-size: 12.5px; margin-inline-start: 6px; }
.tb__f { display: none; }
.sel select { height: 32px; padding: 0 28px 0 10px; border: 1px solid var(--line2); border-radius: var(--r); background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6274' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 6px center / 16px; font-size: 13px; appearance: none; }
[dir="rtl"] .sel select { padding: 0 10px 0 28px; background-position: left 6px center; }
.seg { display: inline-flex; padding: 2px; border: 1px solid var(--line2); border-radius: var(--r); background: var(--sunk); }
.seg button { display: grid; place-items: center; width: 32px; height: 28px; border: 0; border-radius: 4px; background: none; color: var(--mute); }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 26, 38, .12); }
.active { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.active:empty { display: none; }
.achip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 6px 0 10px; border: 1px solid var(--accent-ring); border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); font-size: 12.5px; font-weight: 500; }
.achip .ico { width: 14px; height: 14px; }
.results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.grp { display: flex; align-items: baseline; gap: 8px; margin-block: 8px 2px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.grp__n { color: var(--mute); font: 500 12px var(--mono); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r2); background: var(--panel); overflow: hidden; box-shadow: var(--shadow); transition: border-color .12s, box-shadow .12s; }
.card:hover { border-color: var(--line2); }
.card.is-sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.card__hit { position: absolute; inset: 0; z-index: 1; border: 0; background: none; border-radius: inherit; }
.card__hit:focus-visible { outline-offset: -2px; }
.th--card { aspect-ratio: 1; border-block-end: 1px solid var(--line); }
.card__meta { display: grid; gap: 2px; padding: 9px 10px 10px; min-width: 0; }
.card__n { font-weight: 500; font-size: 13.5px; line-height: 24px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative; z-index: 2; justify-self: start; max-width: 100%; }
.card__n:hover { text-decoration: underline; }
.card__by { color: var(--mute); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-block-start: 6px; font-size: 13.5px; }
.card__add { position: absolute; z-index: 2; inset-block-start: 8px; inset-inline-end: 8px; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line2); border-radius: var(--r); background: color-mix(in srgb, var(--panel) 90%, transparent); color: var(--ink2); opacity: 0; transition: opacity .12s; }
.card:hover .card__add, .card.is-sel .card__add, .card__add:focus-visible { opacity: 1; }
.card__add:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.card__add.is-done { opacity: 1; background: var(--mint); border-color: var(--mint); color: #fff; }
.tag--sale.tag { position: static; }
.card > .tag--sale { position: absolute; z-index: 2; inset-block-start: 8px; inset-inline-start: 8px; }
@media (hover: none) { .card__add { opacity: 1; } }

.twrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r2); background: var(--panel); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: start; font-weight: 500; color: var(--mute); font-size: 12.5px; padding: 0 10px; height: 36px; border-block-end: 1px solid var(--line); background: var(--sunk); white-space: nowrap; }
.tbl td { padding: 6px 10px; border-block-end: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-block-end: 0; }
.tbl tbody tr { cursor: default; }
.tbl tbody tr:hover td { background: var(--hover); }
.tbl tbody tr.is-sel td { background: var(--accent-soft); }
.tbl tbody tr.is-sel td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
[dir="rtl"] .tbl tbody tr.is-sel td:first-child { box-shadow: inset -2px 0 0 var(--accent); }
.th-sort { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 4px; margin-inline-start: -4px; border: 0; border-radius: 4px; background: none; color: inherit; font-weight: 500; }
.th-sort:hover { color: var(--ink); background: var(--hover); }
.th-sort__i .ico { width: 14px; height: 14px; opacity: .55; }
.th-sort__i.is-on .ico { opacity: 1; color: var(--accent-text); }
.tbl__th0 { width: 56px; padding-inline-end: 0 !important; }
.th--row { width: 40px; height: 40px; border-radius: 6px; }
.tbl__name a { font-weight: 500; text-decoration: none; }
.tbl__name a:hover { text-decoration: underline; }
.tbl__sub { display: none; color: var(--mute); font-size: 12.5px; }
.tbl__city, .tbl__maker { color: var(--ink2); }
.tbl__price { text-align: end; white-space: nowrap; }
th.tbl__price { text-align: end; }
.tbl__add { width: 48px; text-align: end; }
.empty { display: grid; justify-items: center; gap: 10px; padding: 40px 16px; border: 1px dashed var(--line2); border-radius: var(--r2); color: var(--mute); }

.panels { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px; }
.panels .panel { padding: 16px; display: grid; gap: 10px; align-content: start; }
.panels h2 { font-size: 15px; font-weight: 600; }
.band > p { color: var(--ink2); }
.band .btn { justify-self: start; }
.kv--fig { grid-template-columns: repeat(3, minmax(0, 1fr)); display: grid; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.kv--fig > div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 8px 10px; border: 0; border-inline-start: 1px solid var(--line); }
.kv--fig > div:first-child { border-inline-start: 0; }
.kv--fig dd { font: 600 16px var(--mono); }
.is-good dd { color: var(--mint-text); }

.insp { border-inline-start: 1px solid var(--line); background: var(--panel); }
.insp__stage, .viewer { position: relative; aspect-ratio: 1 / 1; background: var(--stage); overflow: hidden; outline-offset: -2px; }
.insp__stage canvas, .viewer canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; cursor: grab; }
.insp__stage canvas:active, .viewer canvas:active { cursor: grabbing; }
.insp__poster { position: absolute; inset: 0; transition: opacity .3s; }
.insp__poster .th { width: 100%; height: 100%; }
.is-live .insp__poster { opacity: 0; pointer-events: none; }
.insp__hint { position: absolute; inset-inline: 0; inset-block-start: 12px; margin: auto; width: fit-content; padding: 4px 10px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: 12.5px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.insp__hint.is-on { opacity: 1; }
.vtools { position: absolute; inset-block-end: 10px; inset-inline-start: 10px; display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(6px); }
.vtools .ibtn { width: 32px; height: 32px; }
.insp__body { padding: 14px 16px 20px; display: grid; gap: 12px; }
.insp__top { display: flex; align-items: flex-start; gap: 8px; }
.insp__name { flex: 1; font-size: 17px; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.insp__by { color: var(--mute); font-size: 13px; margin-block-start: -8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.insp__buy { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sw { margin: 0; padding: 0; border: 0; min-width: 0; }
.sw legend { padding: 0; margin-block-end: 6px; font-size: 13px; color: var(--mute); }
.sw legend b { color: var(--ink); font-weight: 500; }
.sw__row { display: flex; gap: 6px; }
.swc { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; }
.swc input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.swc span { width: 26px; height: 26px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16); transition: box-shadow .12s; }
.swc input:checked + span { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16), 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); }
.swc input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 5px; }
.insp__act { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.insp__act .btn { min-height: 40px; }
.insp__keys { display: flex; align-items: center; gap: 4px; color: var(--mute); font-size: 12px; }
.insp__keys span { margin-inline-start: 4px; }

/* ---------- inner pages ---------- */
.page { width: min(1240px, 100%); margin-inline: auto; padding: 16px var(--gut) 48px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.crumb { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 13px; color: var(--mute); }
.crumb a { text-decoration: none; padding: 4px 2px; }
.crumb a:hover { color: var(--ink); text-decoration: underline; }
.crumb .ico { width: 14px; height: 14px; }
.crumb [aria-current] { color: var(--ink); font-weight: 500; }

/* product */
.pd { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr); gap: 16px; align-items: start; }
.pd__view { position: sticky; inset-block-start: calc(var(--top) + 16px); border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; background: var(--panel); }
.viewer { aspect-ratio: 5 / 4; }
.viewer__fail { position: absolute; inset-inline: 12px; inset-block-end: 12px; padding: 8px 10px; border-radius: var(--r); background: var(--panel); font-size: 13px; color: var(--ink2); }
.vbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px; border-block-start: 1px solid var(--line); }
.vbar__g { display: flex; gap: 2px; padding-inline-end: 10px; border-inline-end: 1px solid var(--line); }
.sw--bar .sw__row { gap: 2px; }
.vbar__rv { margin-inline-start: auto; }
.pd__props { padding: 20px; display: grid; gap: 10px; align-content: start; }
.pd__by { color: var(--mute); font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pd__props h1 { font-size: 26px; line-height: 1.15; letter-spacing: -.025em; font-weight: 600; }
[lang="ar"] .pd__props h1 { letter-spacing: -.02em; }
.pd__price { display: flex; align-items: center; gap: 10px; }
.kv--props { margin-block: 6px; border-block: 1px solid var(--line); }
.buy { display: flex; gap: 8px; margin-block-start: 6px; }
.buy .btn { min-height: 44px; }
.step { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: var(--r); background: var(--panel); }
.step button { display: grid; place-items: center; width: 40px; height: 42px; border: 0; background: none; color: var(--ink2); }
.step button:disabled { color: var(--line2); cursor: default; }
.step output { min-width: 28px; text-align: center; font: 600 14px var(--mono); }
.step--sm button { width: 36px; height: 34px; }
.pd__desc { color: var(--ink2); max-width: 62ch; }
.related { display: grid; }
.bar { display: none; }

/* sell */
.shead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; padding-block: 8px 4px; }
.shead > div:first-child { display: grid; gap: 10px; justify-items: start; max-width: 680px; }
.shead h1 { font-size: clamp(26px, 2.8vw, 36px); line-height: 1.1; letter-spacing: -.03em; font-weight: 600; }
[lang="ar"] .shead h1 { letter-spacing: 0; line-height: 1.35; }
.shead__sub { color: var(--mute); font-size: 15px; }
.shead__cta { display: flex; gap: 8px; }
.nos { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--ink2); }
.nos li { display: flex; align-items: center; gap: 6px; }
.nos .ico { color: var(--mint-text); }
.editor { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.ed { overflow: hidden; }
.ed__h { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-block-end: 1px solid var(--line); background: var(--sunk); }
.ed__h h2 { flex: 1; font-size: 14px; font-weight: 600; }
.ed__sec { padding: 18px; border-block-end: 1px solid var(--line); display: grid; gap: 12px; }
.ed__t { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.ed__n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); font: 600 12px var(--mono); flex: none; }
.ed__foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 18px; }
.ed__foot .btn { min-height: 42px; }
.drop { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px dashed var(--line2); border-radius: var(--r2); color: var(--mute); font-size: 13px; }
.drop .ico { width: 22px; height: 22px; color: var(--accent-text); }
.drop b { display: block; color: var(--ink); font-weight: 500; }
.files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.file { position: relative; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: var(--r2); cursor: pointer; }
.file input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.file:hover { border-color: var(--line2); }
.file:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.file:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.th--file { width: 44px; height: 44px; border-radius: 6px; flex: none; }
.file__t { flex: 1; display: grid; min-width: 0; font-size: 13px; }
.file__t .num { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__m { font-size: 12px; color: var(--mute); white-space: nowrap; }
.est { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--mint-text); }
.est:empty { display: none; }
.fld { display: grid; gap: 6px; min-width: 0; }
.fld-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fld__label { font-size: 13px; font-weight: 500; color: var(--ink2); }
.fld__in { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line2); border-radius: var(--r); background: var(--panel); font-size: 14px; }
.fld__in:hover { border-color: color-mix(in srgb, var(--line2) 50%, var(--mute)); }
.fld__in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.fld__in[aria-invalid="true"] { border-color: var(--warn-text); }
.fld__ta { height: auto; padding-block: 10px; resize: vertical; }
.fld__box { display: flex; align-items: stretch; border: 1px solid var(--line2); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.fld__box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.fld__box .fld__in { border: 0; box-shadow: none; }
.fld__pre { display: grid; place-items: center; padding: 0 10px; background: var(--sunk); border-inline-end: 1px solid var(--line); color: var(--mute); font: 500 13px var(--mono); }
.fld__sel select { appearance: none; background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6274' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; padding-inline-end: 34px; }
[dir="rtl"] .fld__sel select { background-position: left 10px center; }
.fld__sel .ico { display: none; }
.fld__help { font-size: 12.5px; color: var(--mute); }
.fld__err, .err { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; font-size: 13px; color: var(--warn-text); }
.err { padding: 10px 12px; border-radius: var(--r); background: var(--warn-soft); margin: 12px 18px 0; }
.fld__opt { color: var(--mute); font-weight: 400; }
.mats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.matc { position: relative; display: block; cursor: pointer; }
.matc input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.matc__b { display: grid; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r2); font-size: 13px; color: var(--ink2); }
.matc__b b { font: 600 14px var(--mono); color: var(--ink); }
.matc input:checked + .matc__b { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.matc input:focus-visible + .matc__b { outline: 2px solid var(--accent); outline-offset: 2px; }
.cols { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 8px; }
.cols__row { display: flex; flex-wrap: wrap; gap: 8px; }
.colc { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px 0 8px; border: 1px solid var(--line); border-radius: 99px; cursor: pointer; font-size: 13px; }
.colc input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.colc__d { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16); color: transparent; }
.colc__d .ico { width: 14px; height: 14px; stroke-width: 2.6; }
.colc:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.colc input:checked + .colc__d { color: #fff; filter: drop-shadow(0 0 1px rgba(0, 0, 0, .5)); }
.colc:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pricef { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 16px; align-items: start; }
.pricef .fld__in { font: 600 18px var(--mono); height: 44px; }
.figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.figs > div { padding: 8px 12px; border-block-start: 1px solid var(--line); }
.figs > div:nth-child(-n+2) { border-block-start: 0; }
.figs > div:nth-child(even) { border-inline-start: 1px solid var(--line); }
.figs dt { font-size: 12.5px; color: var(--mute); }
.figs dd { font: 600 17px var(--mono); }
.chart { position: relative; padding: 12px 12px 8px; border: 1px solid var(--line); border-radius: var(--r2); }
.chart__h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; margin-block-end: 6px; }
.chart__plot { position: relative; }
.chart__empty { padding: 18px 0; font-size: 13px; }
.cv { display: block; width: 100%; height: auto; overflow: visible; }
.cv__grid { stroke: var(--line); stroke-width: 1; }
.cv__axis { stroke: var(--line2); stroke-width: 1; }
.cv__lab { fill: var(--mute); font: 12px var(--mono); }
.cv__line { stroke: var(--accent); stroke-width: 2; fill: none; stroke-linecap: round; }
.cv__area { fill: var(--accent); opacity: .08; }
.cv__min { fill: var(--panel); stroke: var(--accent); stroke-width: 2; }
.cv__cur { stroke: var(--ink2); stroke-width: 1; stroke-dasharray: 3 3; }
.cv__dot { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.cv__dot--h { fill: var(--ink); }
.cv__hit { fill: transparent; cursor: crosshair; }
.cv__tip { position: absolute; inset-block-start: 0; padding: 4px 8px; border-radius: 5px; background: var(--ink); color: var(--bg); font: 500 12px var(--mono); pointer-events: none; white-space: nowrap; }
.cv__ax { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; margin-block-start: 2px; }
.monthly { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.monthly input { width: 100%; accent-color: var(--accent); min-height: 32px; }
.monthly output { font-weight: 600; color: var(--ink); }
.monthly__v { display: grid; text-align: end; font-size: 12.5px; color: var(--mute); }
.monthly__v b { font-size: 17px; color: var(--mint-text); }
.brk summary { cursor: pointer; font-size: 13px; font-weight: 500; color: var(--accent-text); min-height: 32px; display: flex; align-items: center; }
.brk .kv { margin-block-start: 6px; }
.brk .is-total { font-weight: 600; }
.brk .is-total dd { color: var(--ink); }
.prev { position: sticky; inset-block-start: calc(var(--top) + 16px); display: grid; gap: 12px; }
.prev .panel { padding: 14px 16px 16px; }
.prev__h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-block-end: 10px; }
.prev__h h2 { font-size: 14px; font-weight: 600; }
.prev__h .mute { font-size: 12.5px; }
.meter { height: 4px; border-radius: 2px; background: var(--sunk); overflow: hidden; margin-block-end: 10px; }
.meter span { display: block; height: 100%; inline-size: 0; background: var(--mint); transition: inline-size .3s; }
.ck { display: grid; gap: 2px; }
.ck li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 4px; border-radius: var(--r); }
.ck__b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line2); color: var(--mute); font: 600 11.5px var(--mono); flex: none; }
.ck__b .ico { width: 14px; height: 14px; stroke-width: 2.4; }
.ck li.is-done .ck__b { background: var(--mint); border-color: var(--mint); color: #fff; }
.ck li.is-next { background: var(--accent-soft); }
.ck li.is-next .ck__b { border-color: var(--accent); color: var(--accent-text); }
.ck__t { display: grid; font-size: 13px; }
.ck__t b { font-weight: 500; }
.ck__t span { color: var(--mute); font-size: 12.5px; }
.pv { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 12px; align-items: start; }
.pv__lab { font-size: 12px; margin-block-end: 6px; }
.card--pv { box-shadow: var(--shadow); }
.th--empty { background: repeating-linear-gradient(45deg, var(--sunk) 0 8px, var(--stage) 8px 16px); }
.pv__pp { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r2); }
.pv__crumb { font-size: 12px; }
.pv__t { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.btn--fake { pointer-events: none; min-height: 32px; font-size: 13px; }
.pv__pod { font-size: 12px; }
.pv .dot { margin-inline-end: 3px; }
.guide { display: grid; }
.tbl--guide th[scope="row"] { color: var(--ink); font-weight: 500; font-size: 13px; background: none; border-block-end: 1px solid var(--line); white-space: normal; width: 22%; padding-block: 10px; vertical-align: top; }
.tbl--guide td { vertical-align: top; padding-block: 10px; color: var(--ink2); }
.tbl--guide thead th { font: 600 13px var(--mono); color: var(--ink); }
.guide__notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-block-start: 12px; }
.rules { padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.rules h2 { font-size: 15px; font-weight: 600; margin-block-end: 6px; }
.rules p { color: var(--ink2); }
.rules .sub-h { margin-block-start: 0; }
.ban { display: grid; gap: 6px; }
.ban li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.ban li::before { content: ''; width: 12px; height: 2px; background: var(--warn-text); flex: none; }
.scta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px; border-radius: var(--r2); background: var(--ink); color: var(--bg); }
.scta h2 { font-size: 17px; font-weight: 600; }
.scta p { opacity: .8; }

/* cart and checkout */
.two { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.two__main { display: grid; gap: 14px; min-width: 0; }
.ph { display: grid; gap: 4px; }
.ph h1, .emptyc h1, .done h1 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.ph__sub { color: var(--mute); }
.lines { overflow: hidden; }
.line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 14px; border-block-start: 1px solid var(--line); }
.line:first-child { border-block-start: 0; }
.line.is-new { animation: flash 1.2s; }
@keyframes flash { from { background: var(--accent-soft); } }
.th--line { width: 72px; height: 72px; border-radius: 8px; }
.line__info { display: grid; gap: 3px; min-width: 0; }
.line__n { font-size: 14px; font-weight: 500; }
.line__n a { text-decoration: none; display: inline-block; padding-block: 3px; }
.line__n a:hover { text-decoration: underline; }
.line__by { color: var(--mute); font-size: 13px; }
.line__spec { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink2); }
.line__col { display: inline-flex; align-items: center; }
.line__ctrl { display: flex; align-items: center; gap: 4px; }
.line__price { display: grid; justify-items: end; min-width: 84px; }
.line__each { color: var(--mute); font-size: 12.5px; }
.next { padding: 4px 16px 16px; }
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.steps3 li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.steps3 .ico { color: var(--accent-text); }
.steps3 b { display: block; font-weight: 600; }
.steps3 li > span > span { display: block; color: var(--mute); }
.sum { position: sticky; inset-block-start: calc(var(--top) + 16px); padding: 4px 16px 16px; display: grid; gap: 12px; }
.sum__h { display: flex; align-items: center; justify-content: space-between; margin-block-start: 14px; }
.sum__h h2 { font-size: 13px; font-weight: 600; }
.sum__rows { display: grid; font-size: 13.5px; }
.sum__rows > div { display: flex; justify-content: space-between; gap: 12px; padding-block: 7px; border-block-start: 1px solid var(--line); }
.sum__rows > div:first-child { border-block-start: 0; }
.sum__rows dt small { color: var(--mute); font-size: 12px; }
.sum__rows dd { font-family: var(--mono); text-align: end; }
.sum__rows .is-save dd { color: var(--mint-text); }
.sum__rows .is-total { border-block-start: 1px solid var(--line2); padding-block-start: 10px; font-weight: 600; font-size: 15px; }
.sum .btn--primary { min-height: 44px; }
.emptyc { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 48px 20px; }
.emptyc__i { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); }
.emptyc__i .ico { width: 26px; height: 26px; }
.emptyc p { color: var(--mute); }
.emptyc__a { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-block-start: 6px; }
.fstack { display: grid; gap: 14px; }
.fsec { padding: 18px; display: grid; gap: 14px; }
.fsec__t { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.ck-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; min-height: 44px; }
.ck-check input { width: 18px; height: 18px; margin-block-start: 2px; accent-color: var(--accent); flex: none; }
.ck-check a { color: var(--accent-text); }
.ckls { display: grid; gap: 10px; }
.ckl { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.th--ck { width: 44px; height: 44px; border-radius: 6px; flex: none; }
.ckl__txt { flex: 1; display: grid; min-width: 0; }
.ckl__name { line-height: 26px; font-weight: 500; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ckl__meta { color: var(--mute); display: flex; align-items: center; }
.ckl__price { white-space: nowrap; }
.done { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.done > .panel { padding: 18px; display: grid; gap: 10px; }
.done > .panel:first-child { grid-column: 1 / -1; justify-items: start; }
.done__ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--mint); color: #fff; }
.done__num { display: grid; gap: 2px; }
.done__num b { font: 600 22px var(--mono); color: var(--accent-text); }
.done__note { color: var(--mute); }
.done h2 { font-size: 13px; font-weight: 600; }
.done address { font-style: normal; line-height: 1.6; }
.done__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.done .steps3 { grid-template-columns: 1fr; }

/* footer */
.foot { border-block-start: 1px solid var(--line); padding: 18px var(--gut) 22px; display: grid; gap: 8px; background: var(--panel); }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; }
.foot__brand { font-size: 13px; color: var(--mute); }
.foot__brand b { color: var(--ink); font-weight: 600; margin-inline-end: 6px; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.foot__nav a { font-size: 13px; color: var(--ink2); text-decoration: none; padding: 6px 0; }
.foot__nav a:hover { color: var(--ink); text-decoration: underline; }
.foot__small { font-size: 12.5px; color: var(--mute); }

/* ---------- responsive ---------- */
@media (max-width: 1279px) {
  .app { grid-template-columns: 216px minmax(0, 1fr) 320px; }
  .how { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how li:nth-child(4) { border-inline-start: 0; }
  .how li:nth-child(n+4) { border-block-start: 1px solid var(--line); }
  .pins { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cmdk { min-width: 240px; }
}
@media (max-width: 1099px) {
  .app { display: block; }
  .side, .insp { display: none; }
  .cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gut)); padding-inline: var(--gut); }
  .cats::-webkit-scrollbar { display: none; }
  .cchip { flex: none; min-height: 36px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 99px; background: var(--panel); font-size: 13.5px; font-weight: 500; color: var(--ink2); white-space: nowrap; }
  .cchip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
  .tb__f { display: inline-flex; }
  .sheet .side__in { padding: 0 16px 0; }
  .sheet .side__h { position: sticky; inset-block-start: 0; z-index: 1; background: var(--panel); padding: 14px 0 8px; }
  .sheet .side__h h2 { font-size: 16px; }
  .sheet .side__x { display: inline-grid; }
  .sheet .side__keys { display: none; }
  .sheet .side__go { display: block; position: sticky; inset-block-end: 0; padding: 10px 0 12px; background: var(--panel); border-block-start: 1px solid var(--line); }
  .sheet .side__go .btn { min-height: 44px; }
  .sheet .fopt { min-height: 44px; font-size: 15px; }
  .sheet .fac legend { font-size: 13px; }
  .sheet .insp__x { display: inline-grid; margin-block-start: -6px; margin-inline-end: -8px; width: 44px; height: 44px; }
  .sheet .insp__stage { aspect-ratio: 4 / 3; max-height: 42dvh; width: 100%; border-radius: 14px 14px 0 0; }
  .sheet .insp__keys { display: none; }
  .sheet .insp__act .btn { min-height: 44px; }
  .sheet--insp .kv { display: none; }
  .pd { grid-template-columns: minmax(0, 1fr); }
  .pd__view { position: static; }
  .editor, .two, .done { grid-template-columns: minmax(0, 1fr); }
  .prev, .sum { position: static; }
  .prev { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  :root { --tabs: calc(58px + env(safe-area-inset-bottom)); --gut: 16px; }
  .top__nav { display: none; }
  .cmdk { min-width: 0; }
  .tabs { position: fixed; z-index: 40; inset-inline: 0; inset-block-end: 0; display: grid; grid-template-columns: repeat(4, 1fr); height: var(--tabs); padding-block-end: env(safe-area-inset-bottom); background: var(--panel); border-block-start: 1px solid var(--line); }
  .tabs a, .tabs button { display: grid; place-items: center; align-content: center; gap: 2px; border: 0; background: none; text-decoration: none; color: var(--mute); font-size: 12px; font-weight: 500; min-height: 58px; }
  .tabs [aria-current] { color: var(--accent-text); }
  .tabs .ico { width: 22px; height: 22px; }
  .tabs__ic { position: relative; display: block; }
  .tabs .badge { inset-block-start: -6px; inset-inline-end: -12px; }
  .bar { position: fixed; z-index: 35; inset-inline: 0; inset-block-end: var(--tabs); display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--panel); border-block-start: 1px solid var(--line); transform: translateY(110%); visibility: hidden; transition: transform .2s, visibility .2s; }
  .bar.is-on { transform: none; visibility: visible; }
  html.rm .bar { transition: none; }
  .bar__t { flex: 1; display: grid; min-width: 0; font-size: 13px; }
  .bar__n { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bar .btn { min-height: 44px; }
  .toasts { inset-inline: 16px; width: auto; }
}
@media (max-width: 699px) {
  body { font-size: 15px; }
  main p, .ticks li > span > span, .how li:not(.how__h) { font-size: 15px; }
  .top { gap: 6px; padding-inline: 12px 8px; }
  .mark__t { font-size: 15px; }
  .cmdk { width: 44px; height: 44px; padding: 0; justify-content: center; border-color: transparent; background: none; margin-inline-start: auto; }
  .cmdk__t, .cmdk__k { display: none; }
  .cmdk .ico { width: 20px; height: 20px; }
  .tbtn { min-width: 44px; height: 44px; }
  .tbtn--cart { display: none; }
  .main { padding-block-start: 16px; gap: 20px; }
  .intro h1 { font-size: 28px; }
  .intro__sub { font-size: 16px; }
  .intro__k { display: none; }
  .intro__cta .btn { min-height: 44px; }
  .pins { display: flex; overflow-x: auto; scrollbar-width: none; gap: 8px; margin-inline: calc(-1 * var(--gut)); padding-inline: var(--gut); scroll-snap-type: x mandatory; scroll-padding-inline: var(--gut); }
  .pins li { flex: 0 0 78%; scroll-snap-align: start; }
  .tb { gap: 6px; }
  .tb__t { flex-basis: 100%; }
  .tb__f, .sel select { min-height: 44px; height: 44px; }
  .sel { flex: 1; }
  .sel select { width: 100%; font-size: 16px; }
  .seg button { width: 44px; height: 38px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card__add { width: 44px; height: 44px; inset-block-start: 4px; inset-inline-end: 4px; }
  .card__n { font-size: 14px; }
  .achip { min-height: 36px; }
  .tbl__maker, .tbl__city, .tbl--rel .tbl__mat { display: none; }
  .tbl__sub { display: block; }
  .tbl .ibtn { width: 44px; height: 44px; }
  .th-sort { min-height: 40px; }
  .tbl__name a { display: inline-block; padding-block: 8px; }
  .panels, .rules, .guide__notes, .prev, .pv, .fld-row, .files, .pricef { grid-template-columns: minmax(0, 1fr); }
  .kv--fig dd { font-size: 15px; }
  .panels .btn, .band .btn { min-height: 44px; }
  .viewer { aspect-ratio: 1; }
  .vbar__g { border: 0; padding: 0; }
  .vbar .ibtn, .swc { width: 44px; height: 44px; }
  .vbar__rv, .vbar [data-rot] { display: none; }
  .vbar { flex-wrap: nowrap; justify-content: space-between; }
  .pd__props { padding: 16px; }
  .shead__cta .btn, .ed__foot .btn, .scta .btn { min-height: 44px; }
  .ed__sec, .fsec { padding: 16px; }
  .fld__in { height: 44px; font-size: 16px; }
  .monthly { grid-template-columns: minmax(0, 1fr); }
  .monthly input { min-height: 44px; }
  .monthly__v { text-align: start; }
  .brk summary, .linkbtn { min-height: 44px; }
  .line { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: 'th info price' 'th ctrl ctrl'; gap: 8px 12px; }
  .line__th { grid-area: th; align-self: start; }
  .th--line { width: 64px; height: 64px; }
  .line__info { grid-area: info; }
  .line__price { grid-area: price; align-self: start; min-width: 0; }
  .line__ctrl { grid-area: ctrl; justify-content: space-between; }
  .step--sm button { width: 44px; height: 44px; }
  .line__rm { width: 44px; height: 44px; }
  .steps3 { grid-template-columns: minmax(0, 1fr); }
  .foot__nav a { padding: 10px 0; }
  .foot__nav .linkbtn { min-height: 44px; }
  .crumb a { padding-block: 12px; }
  .pal { inset-block-start: 8px; }
  .pal__it { min-height: 52px; }
  .sheet .swc { width: 44px; height: 44px; }
  main p[class], main .note { font-size: 15px; }
  .colc { min-height: 44px; }
  .note a, .pd__props .note a { padding-block: 10px; }
  .foot__nav a { padding: 12px 0; }
  .tbl--rel .tbl__name a { min-height: 44px; display: inline-flex; align-items: center; }
  .ckl__name { line-height: 44px; }
  .line__n a { padding-block: 9px; }
  .btn, .step button, .cchip { min-height: 44px; }
  .step button { height: 44px; width: 44px; }
  .seg button { height: 40px; }
  .how { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how li:not(.how__h) { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-block-start: 1px solid var(--line); }
  .how li:nth-child(odd):not(.how__h) { border-inline-start: 1px solid var(--line) !important; }
  .how li:nth-child(2) { border-block-start: 0; }
  .how li:nth-child(3) { border-block-start: 0; }
  .how li > span:not(.how__n) { display: none; }
  .how__n { margin: 0; flex: none; }
  .how b { font-size: 14px; line-height: 1.3; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
html.rm *, html.rm *::before, html.rm *::after { animation: none !important; transition: none !important; }
/* English product names inside Arabic rows: keep them LTR so ellipses cut the end, not the start */
[dir="rtl"] :is(.pinb__n, .card__n, .pal__lab, .ckl__name, .bar__n, .tbl__name a, .insp__name, .line__n a)[lang="en"] { direction: ltr; text-align: right; unicode-bidi: isolate; }
