/* ============================================================
   Chess Kingdom — PERF MOBILE
   يُفعَّل فقط على الموبايل/الأجهزة الضعيفة (html.lowfx).
   الهدف: صفر تهنيج أثناء سحب القطعة ولعب النقلة.
   مفيش أي تغيير في قواعد اللعبة — بس إلغاء تأثيرات الرسم التقيلة.
   ============================================================ */

/* 1) لا انيميشن مستمر ولا تأخير — النهاية بتتطبق فورًا (fill-mode محفوظ) */
html.lowfx *, html.lowfx *::before, html.lowfx *::after {
  animation-duration: .001s !important;
  animation-delay: 0s !important;
  animation-iteration-count: 1 !important;
  transition: none !important;
  text-shadow: none !important;
  filter: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  mix-blend-mode: normal !important;
  scroll-behavior: auto !important;
}

/* 2) حركة القطع: بدون transition إطلاقًا (ده كان بيعمل تأخير/لاج مع الإصبع) */
html.lowfx .piece, html.lowfx .piece svg { transition: none !important; }
html.lowfx .glide .piece { transition: transform .22s ease-out !important; }
html.lowfx .piece { will-change: transform; contain: layout style; }
html.lowfx .piece.lifted { z-index: 60; }

/* 3) الرقعة: عزل كامل للرسم + شيل الظلال المموّهة جواها */
html.lowfx .board { contain: layout paint style; transform: translateZ(0); }
html.lowfx .board *, html.lowfx .board *::before, html.lowfx .board *::after { box-shadow: none !important; }

/* 4) تمييز المربعات بـ outline رخيص بدل box-shadow/glow */
html.lowfx .sq.last::before { background: rgba(var(--l), .38) !important; }
html.lowfx .sq.sel::before  { background: rgba(var(--h), .45) !important; outline: 3px solid var(--gold-pale); outline-offset: -3px; }
html.lowfx .sq.hov::before  { background: rgba(var(--p), .5) !important; outline: 4px solid var(--x2); outline-offset: -4px; }
html.lowfx .sq.hint::before { background: rgba(127,184,255,.34) !important; outline: 3px solid var(--sapphire); outline-offset: -3px; }
html.lowfx .sq.tg::after    { background: var(--gold) !important; opacity: .9; }
html.lowfx .sq.tg.cap::after{ background: none !important; border: 4px solid rgba(var(--h), .92) !important; opacity: 1; }
html.lowfx .sq.rvf::before, html.lowfx .sq.rvt::before { outline: 2px solid rgba(var(--h), .8); outline-offset: -2px; }

/* 5) طبقات زخرفية كاملة مقفولة */
html.lowfx #burst, html.lowfx #ambient, html.lowfx .beams, html.lowfx .fl, html.lowfx .floaters,
html.lowfx .bsweep, html.lowfx .rip, html.lowfx #rkFx, html.lowfx .home-aurora, html.lowfx .home-stars,
html.lowfx .home-halo, html.lowfx .home-rays, html.lowfx .frame::after { display: none !important; }

/* 6) ظلال المحتوى الكبيرة (static) بتتبسّط عشان الـ raster أخف */
html.lowfx .frame, html.lowfx .card, html.lowfx .sheet, html.lowfx .overlay .sheet {
  box-shadow: 0 6px 14px rgba(0,0,0,.45) !important;
}

/* 7) سكرول أنعم وتجاهل اللمس غير اللازم */
html.lowfx { -webkit-tap-highlight-color: transparent; }
html.lowfx body { overscroll-behavior: none; }
