/* collision-ok: بازنویسیِ عمدیِ همین برگه (سه‌کشویی ⇒ فهرستِ آرام) */
/* ═══ برگه‌ی آرامِ «خرید و فروش خودکار» (۲۳ نوامبر ۲۰۲۶ — دورِ دوم) ═══
   علیرضا بعد از سه‌کشویی: «همچنان شلوغه و چشمو خسته میکنه و مثل اپل اروم و راحت نیست» ⇒ ماکتِ «الف»
   ⇒ «امکان انتخاب وزن یا مبلغ باشه» ⇒ «۳، بساز». فهرستِ گروهیِ آیفون: زمینه #f2f2f7، گروهِ سفید با گوشه‌ی ۲۶،
   ردیف ۵۲، خطِ موییِ ۰٫۵ از لبه‌ی متن؛ رنگِ برند (سرمه‌ای روز، طلایی شب) فقط روی دکمه، مکان‌نما و تیکِ کالا.
   نسخه‌ی عددی: Desktop/claude/apple-spec/mellicoin-autolimit-calm-spec-v3.md
   پیشوندِ html:not(#a4a):not(#a4b) #asBg .as4 (سه شناسه) عمداً از ios27.css (دو شناسه) قوی‌تر است.
   وزنِ قلم فقط ۴۰۰/۵۰۰. */

html:not(#a4a):not(#a4b) #asBg .as4 {
  --a4-bg:#f2f2f7; --a4-card:#fff; --a4-l1:#000; --a4-l2:rgba(60,60,67,.6); --a4-l3:rgba(60,60,67,.3); --a4-ph:#c7c7cc;
  --a4-hl:rgba(60,60,67,.29); --a4-fill:rgba(118,118,128,.12); --a4-seg:#fff; --a4-acc:#14233B; --a4-on:#fff;
  --a4-hit:#e9e9ee; --a4-bad:#ff3b30; --a4-tint:rgba(20,35,59,.12);
  --s2-bg:var(--a4-bg);
  background:var(--a4-bg) !important; color:var(--a4-l1); caret-color:var(--a4-acc);
}
html[data-theme="dark"]:not(#a4a):not(#a4b) #asBg .as4 {
  --a4-bg:#1c1c1e; --a4-card:#2c2c2e; --a4-l1:#fff; --a4-l2:rgba(235,235,245,.6); --a4-l3:rgba(235,235,245,.3); --a4-ph:#636366;
  --a4-hl:rgba(84,84,88,.65); --a4-fill:rgba(118,118,128,.24); --a4-seg:#636366; --a4-acc:#F2C46B; --a4-on:#14233B;
  --a4-hit:#3a3a3c; --a4-bad:#ff453a; --a4-tint:rgba(242,196,107,.2);
}

/* ── سربرگ: فقط ✕ و عنوان؛ راهنما رفت ته «گزینه‌های بیشتر» ── */
html:not(#a4a):not(#a4b) #asBg .as4 .as2-top .hq[data-hq="as.what"] { display:none !important; }

/* ── بخر | بفروش ── */
html:not(#a4a):not(#a4b) #asBg .as4 .as4-seg { display:grid !important; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:0; height:32px;
  box-sizing:border-box; margin:4px 0 18px !important; padding:2px !important; border:0 !important; border-radius:9px !important;
  background:var(--a4-fill) !important; box-shadow:none !important; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-seg .as-side { height:28px; min-height:0 !important; margin:0 !important; padding:0 !important; border:0 !important;
  border-radius:7px !important; background:none !important; box-shadow:none !important; color:var(--a4-l1) !important; font:inherit;
  font-size:14px !important; font-weight:500 !important; line-height:28px; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-seg .as-side.on { background:var(--a4-seg) !important;
  box-shadow:0 3px 8px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04) !important; }

/* ── گروه و ردیف‌ها ── */
html:not(#a4a):not(#a4b) #asBg .as4 .as4-card { margin:0; background:var(--a4-card); border-radius:26px; overflow:hidden; box-shadow:none; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-card > * { position:relative; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-card > * + *::before { content:""; position:absolute; top:0; inset-inline-start:16px; inset-inline-end:0;
  height:.5px; background:var(--a4-hl); pointer-events:none; z-index:1; }
html:not(#a4a):not(#a4b) #asBg .as4 :is(.as4-row,.as4-r) { display:flex; align-items:center; gap:8px; width:100%; min-height:52px; box-sizing:border-box;
  margin:0; padding:0 16px; border:0; border-radius:0; background:none; box-shadow:none; font:inherit; font-size:17px; font-weight:400;
  color:var(--a4-l1); text-align:start; transition:background-color .2s; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-row { cursor:pointer; -webkit-tap-highlight-color:transparent; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-row:active,
html:not(#a4a):not(#a4b) #asBg .as4 .as4-r:focus-within { background:var(--a4-hit); }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-row:focus-visible { outline:2px solid var(--a4-acc); outline-offset:-2px; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-k { flex:0 0 auto; font-size:17px; font-weight:400; line-height:22px; color:var(--a4-l1); }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-v { flex:1 1 auto; min-width:0; text-align:end; font-size:17px; font-weight:400; line-height:22px;
  color:var(--a4-l2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
html:not(#a4a):not(#a4b) #asBg .as4 #asTitle { font-size:inherit; font-weight:400; line-height:inherit; color:inherit; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-ch { flex:0 0 auto; color:var(--a4-l3); font-size:22px; line-height:1; transform:scaleX(.8); transition:transform .25s; }
html:not(#a4a):not(#a4b) #asBg .as4 :is(.as4-dr.open .as4-ch,.as4-morerow[aria-expanded="true"] .as4-ch) { transform:rotate(-90deg) scaleX(.8); }

/* ── فهرستِ کالا زیرِ ردیفِ «کالا»، داخلِ همان گروه ── */
html:not(#a4a):not(#a4b) #asBg .as4 .as4-open { padding:0; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-items { max-height:220px; overflow-y:auto; background:none; border-radius:0; box-shadow:none; }
html:not(#a4a):not(#a4b) #asBg .as4 :is(.as4-it,.as4-all) { position:relative; display:flex; align-items:center; gap:10px; width:100%; min-height:44px;
  box-sizing:border-box; margin:0; padding:0; padding-inline:40px 16px; border:0; border-radius:0; background:none; box-shadow:none;
  font:inherit; font-size:17px; font-weight:400; color:var(--a4-l1); text-align:start; cursor:pointer; transition:background-color .2s; }
html:not(#a4a):not(#a4b) #asBg .as4 :is(.as4-it,.as4-all)::before { content:""; position:absolute; top:0; inset-inline-start:40px; inset-inline-end:0;
  height:.5px; background:var(--a4-hl); }
html:not(#a4a):not(#a4b) #asBg .as4 :is(.as4-it,.as4-all):active { background:var(--a4-hit); }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-in { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-rd { flex:0 0 auto; color:var(--a4-acc); font-size:17px; font-weight:500; line-height:1; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-all { color:var(--a4-l2); }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-none { margin:0; padding:12px 16px; padding-inline-start:40px; color:var(--a4-l2); font-size:15px; }

/* ── ردیفِ قیمت: «وقتی هر مثقال شد» + «الان …» زیرش؛ کارتِ شرطِ اصلی بی‌قاب سمتِ مقدار ── */
html:not(#a4a):not(#a4b) #asBg .as4 .as4-rp { min-height:68px; padding-block:8px; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-rp .as4-k { display:flex; flex-direction:column; gap:2px; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-now { display:block; font-size:13px; line-height:18px; font-weight:400; color:var(--a4-l2); cursor:pointer; }
html:not(#a4a):not(#a4b) #asBg .as4 #as4Main { flex:1 1 auto; min-width:0; }
html:not(#a4a):not(#a4b) #asBg .as4 #as4Main .ac { margin:0 !important; padding:0 !important; border:0 !important; border-radius:0 !important;
  background:none !important; box-shadow:none !important; overflow:visible !important; clip-path:none !important; }
html:not(#a4a):not(#a4b) #asBg .as4 #as4Main :is(.ac-head,.ac-lab,.as-quick,.as-modes) { display:none !important; }
html:not(#a4a):not(#a4b) #asBg .as4 #as4Main .ac-res:not(.warn) { display:none !important; }
html:not(#a4a):not(#a4b) #asBg .as4 #as4Main .ac-body { display:block !important; margin:0 !important; padding:0 !important; }
html:not(#a4a):not(#a4b) #asBg .as4 :is(#as4Main .ac,#as4Main .ac-body,#as4Main .ac-step) { width:100% !important; box-sizing:border-box; }
html:not(#a4a):not(#a4b) #asBg .as4 #as4Main .ac-step { display:flex !important; align-items:center; gap:8px; height:auto; min-height:0 !important;
  margin:0 !important; padding:0 !important; border:0 !important; border-radius:0 !important; background:none !important; box-shadow:none !important; }
html:not(#a4a):not(#a4b) #asBg .as4 #as4Main .ac-step::before { content:none !important; }
/* هر سه عدد (قیمت، وزن، مبلغ) روی یک لبه: خانه‌ی قیمت ltr است، پس «چپ» نه «end»؛ واحدها ستونِ ۳۸ پیکسلی
   (۲۳ نوامبر، علیرضا: «عدد هم‌راستا نیست و فاصله‌اش از چپ زیاده»، «تومان نداره») */
html:not(#a4a):not(#a4b) #asBg .as4 :is(#as4Main .ac-step > input,.as4-inp) { flex:1 1 auto; min-width:64px; width:auto !important; height:44px !important;
  margin:0 !important; padding:0 !important; border:0 !important; border-radius:0 !important; background:none !important; box-shadow:none !important;
  outline:0 !important; font:inherit; font-size:17px !important; font-weight:500 !important; color:var(--a4-l1) !important; text-align:left !important;
  caret-color:var(--a4-acc); }
html:not(#a4a):not(#a4b) #asBg .as4 :is(#as4Main .ac-step > input,.as4-inp)::placeholder { color:var(--a4-ph) !important; opacity:1;
  font-size:17px !important; font-weight:400 !important; }
html:not(#a4a):not(#a4b) #asBg .as4 :is(#as4Main .ac-u,.as4-u) { flex:0 0 auto; position:static !important; transform:none !important;
  width:38px !important; text-align:end !important;
  font-size:15px !important; font-weight:400 !important; color:var(--a4-l2) !important; }
html:not(#a4a):not(#a4b) #asBg .as4 #as4Main .ac-body:has(.ac-res.warn) :is(.ac-step > input,.ac-u) { color:var(--a4-bad) !important; }
html:not(#a4a):not(#a4b) #asBg .as4 #as4Main .ac-res.warn { margin:0 !important; padding:0 0 2px !important; border:0 !important; background:none !important;
  text-align:end; font-size:13px !important; line-height:18px; color:var(--a4-bad) !important; }

/* ── ردیفِ دکمه‌های آماده (فروش: «همه‌ی X که داری»، نصف، یک‌چهارم؛ پیشنهادِ خرید) ── */
html:not(#a4a):not(#a4b) #asBg .as4 .as4-chips { gap:8px; overflow-x:auto; scrollbar-width:none; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-chips .as-quick { display:flex !important; flex-wrap:nowrap; align-items:center; gap:8px; margin:0 !important;
  padding:0 !important; border:0 !important; background:none !important; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-chips .as-quick:is([hidden],:empty) { display:none !important; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-chips .as-q-cap { flex:0 0 auto; font-size:13px !important; font-weight:400 !important; color:var(--a4-l2) !important; white-space:nowrap; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-chips .as-q { flex:0 0 auto; width:auto; height:32px; min-height:0 !important; margin:0 !important; padding:0 12px !important;
  border:0 !important; border-radius:16px !important; background:var(--a4-fill) !important; box-shadow:none !important; color:var(--a4-l1) !important;
  font:inherit; font-size:14px !important; font-weight:400 !important; line-height:32px; white-space:nowrap; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-chips .as-q.on { background:var(--a4-tint) !important; color:var(--a4-acc) !important; }

/* ── جمله‌ی زیرِ گروه: خطِ اول کارِ کامل، خطِ دوم فاصله از الان ── */
html:not(#a4a):not(#a4b) #asBg .as4 .as4-say { margin:7px 16px 22px !important; padding:0 !important; font-size:13px; line-height:1.6; font-weight:400;
  color:var(--a4-l2); text-align:start; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-say b { font-weight:500; color:var(--a4-l1); }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-say small { display:block; margin-top:2px; font-size:13px; color:var(--a4-l2); }

/* ── «گزینه‌های بیشتر» و راهنما ── */
html:not(#a4a):not(#a4b) #asBg .as4 .as4-more { margin:12px 0 0; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-g2 { margin-top:22px; }
html:not(#a4a):not(#a4b) #asBg .as4 .as4-help { display:block; width:100%; margin:12px 0 0; padding:10px 0; border:0; background:none; box-shadow:none;
  font:inherit; font-size:15px; font-weight:400; color:var(--a4-l2); text-align:center; cursor:pointer; }

/* ── دکمه‌ی اصلی: تنها رنگِ برند ── */
html:not(#a4a):not(#a4b) #asBg .as4 .sheet-foot { display:flex !important; flex-direction:column; align-items:stretch; gap:8px; }
html:not(#a4a):not(#a4b) #asBg .as4 #asSave:not(.done) { display:flex !important; align-items:center; justify-content:center; width:100% !important;
  height:50px; min-height:50px; margin:0 !important; padding:0 !important; border:0 !important; border-radius:25px !important;
  background:var(--a4-acc) !important; color:var(--a4-on) !important; font:inherit; font-size:17px !important; font-weight:500 !important;
  box-shadow:none !important; opacity:1 !important; transition:transform .12s, opacity .12s; }
html:not(#a4a):not(#a4b) #asBg .as4 #asSave:not(.done):active { transform:scale(.98); opacity:.85 !important; }
html:not(#a4a):not(#a4b) #asBg .as4 #asSave:not(.done):disabled { background:var(--a4-fill) !important; color:var(--a4-l3) !important; }

@supports (corner-shape:squircle) {
  html:not(#a4a):not(#a4b) #asBg .as4 .as4-card { border-radius:36px; corner-shape:squircle; }
}
html:not(#a4a):not(#a4b) #asBg .as4 .as4-morerow .as4-ch { margin-inline-start:auto; }

/* ── دکمه‌ی بستنِ ✕ مثلِ شیشه‌ی اپل (۲۳ نوامبر، «مال اپل شیشه ای هست و انعکاس داره» ⇒ «آره، بساز»):
   لبه‌ی بالا و پایین براق، دو طرف خاکستری (conic روی border-box)، وسط کمی سایه‌دار؛ ضربدر ۳۲ با خطِ ۱٫۷۵ */
html:not(#a4a):not(#a4b) #asBg .as4 .as-x { border:1.5px solid transparent !important; color:#2c2c2e !important;
  background:linear-gradient(180deg,#f4f4f5 0%,#ececee 25%,#e9e9eb 55%,#ededef 80%,#f6f6f7 100%) padding-box,
    conic-gradient(from 0deg,#fff 0deg,#d2d2d6 32deg,#c3c3c8 90deg,#d2d2d6 148deg,#fff 180deg,#d2d2d6 212deg,#c3c3c8 270deg,#d2d2d6 328deg,#fff 360deg) border-box !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.75),inset 0 2px 1px rgba(255,255,255,.9),inset 0 -2px 2px rgba(255,255,255,.8),0 1px 4px rgba(0,0,0,.06) !important; }
html:not(#a4a):not(#a4b) #asBg .as4 .as-x svg { width:32px !important; height:32px !important; }
html:not(#a4a):not(#a4b) #asBg .as4 .as-x svg path { stroke-width:1.75 !important; }
html[data-theme="dark"]:not(#a4a):not(#a4b) #asBg .as4 .as-x { color:#fff !important;
  background:linear-gradient(180deg,#58585e 0%,#4b4b50 25%,#46464b 55%,#4a4a4f 80%,#55555a 100%) padding-box,
    conic-gradient(from 0deg,#a4a4aa 0deg,#5e5e64 32deg,#3c3c41 90deg,#5e5e64 148deg,#8a8a90 180deg,#5e5e64 212deg,#3c3c41 270deg,#5e5e64 328deg,#a4a4aa 360deg) border-box !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06),inset 0 2px 1px rgba(255,255,255,.14),inset 0 -2px 2px rgba(255,255,255,.07),0 3px 10px rgba(0,0,0,.35) !important; }

/* لپ‌تاپ: عنوان وسط مثلِ برگه‌ی مک؛ «بستن» خاکستری، نه رنگی */
@media (min-width:641px) {
  html:not(#a4a):not(#a4b) #asBg .as4 .as2-top { display:block !important; text-align:center; }
  html:not(#a4a):not(#a4b) #asBg .as4 .as4-seg { margin-top:12px !important; }
  html:not(#a4a):not(#a4b) #asBg .as4 #asHead { display:block; width:100%; margin-inline:0; justify-content:center; text-align:center; font-size:17px; font-weight:500; }
  html:not(#a4a):not(#a4b) #asBg .as4 #asCancel { color:var(--a4-l2) !important; font-weight:400 !important; }
}
