/* ==========================================================================
   Viora — طبقة الفخامة البصريّة (Premium Visual Layer)
   إضافيّة بالكامل: تُحمَّل بعد styles.css وتُحسّن الأصناف المشتركة فقط.
   لا تمسّ أيّ منطق خلفيّ/قاعدة بيانات/مصادقة/وظائف الغرف — بصريّ صِرف.
   الأداء: نُحرّك transform/opacity/filter فقط (60FPS)، ونحترم prefers-reduced-motion.
   ========================================================================== */

:root {
  /* لوحة الفخامة (تُضاف فوق التوكنات القائمة) */
  --lux-gold-1: #ffe08a;
  --lux-gold-2: #ffb23e;
  --lux-gold-3: #a9741b;
  --lux-diamond: #8ff0ff;
  --lux-royal: #b478ff;
  --neon-green: #39ff14;      /* أخضر فسفوريّ للإعلانات */
  --neon-green-2: #00ff88;
  --lux-glass: rgba(255, 255, 255, 0.07);
  --lux-glass-brd: rgba(255, 255, 255, 0.16);
  /* توهّجات جاهزة (bloom) */
  --glow-violet: 0 0 18px rgba(124, 58, 237, .55), 0 0 42px rgba(168, 85, 247, .35);
  --glow-gold: 0 0 16px rgba(255, 190, 70, .6), 0 0 40px rgba(255, 160, 40, .32);
  --glow-neon: 0 0 14px rgba(57, 255, 20, .7), 0 0 38px rgba(0, 255, 136, .4);
  --ease-lux: cubic-bezier(.22, 1, .36, 1);
}

/* الحركة السلسة العامّة — تفعيل تسريع GPU للطبقات المتحرّكة الشائعة دون إفراط. */
.decor-frame-img, .decor-vip, .gp-ge, .fs-seat-av, .vp-seat-av, .lux-frame, .neon-announce {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* ==========================================================================
   1) بطاقات زجاجيّة أرقى + انعكاسات وظلال (glassmorphism / reflections / bloom)
   ========================================================================== */
.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015)),
    var(--glass);
  border: 1px solid var(--lux-glass-brd);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, .14),
    inset 0 -1px 0 rgba(0, 0, 0, .25);
  position: relative;
}
/* لمعة علويّة رقيقة (حافّة زجاج) */
.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 42%;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .10), transparent);
  pointer-events: none;
  opacity: .7;
}

/* أزرار النيون/الذهب — توهّج bloom ناعم */
.btn.neon { box-shadow: var(--glow-violet); }
.btn.gold { box-shadow: var(--glow-gold); }
.btn.neon, .btn.gold, .btn.block { transition: transform .16s var(--ease-lux), box-shadow .2s ease, filter .2s ease; }
.btn.neon:active, .btn.gold:active, .btn.block:active { transform: translateY(1px) scale(.985); filter: brightness(1.06); }

/* الشريط السفليّ — زجاج أعمق */
.tabbar {
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* ==========================================================================
   2) الأطر الفاخرة حول الأفاتار (3D frames + neon/glow) — .decor-frame
   يعمل مع صور PNG/WebP الشفّافة (media_url) ومع الأطر البديلة (CSS placeholders).
   ========================================================================== */
.decor-frame {
  position: relative;
  display: inline-grid;
  place-items: center;
  isolation: isolate;
}
.decor-frame .avatar { position: relative; z-index: 1; }

/* هالة نيون دوّارة خلف الأفاتار (bloom) — طبقة مستقلّة لا تكلّف تخطيطاً */
.decor-frame::before {
  content: '';
  position: absolute;
  inset: -14%;
  z-index: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    var(--violet2), var(--cyan), var(--pink), var(--gold), var(--violet2));
  filter: blur(7px);
  opacity: .55;
  animation: luxSpin 6s linear infinite;
  pointer-events: none;
}
/* صورة الإطار الشفّافة تطفو فوق كلّ شيء مع ظلّ/توهّج واقعيّ */
/* الأطر الفاخرة الكبيرة (تاج/أجنحة تحتاج هامشاً أوسع حول الأفاتار) */
.decor-frame-img.frame-xl { inset: -34%; width: 168%; height: 168%; }

.decor-frame-img {
  position: absolute;
  inset: -18%;
  width: 136%;
  height: 136%;
  z-index: 2;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .5)) drop-shadow(0 0 10px rgba(168, 85, 247, .45));
  animation: luxFloat 4.5s ease-in-out infinite;
}

/* أطر بديلة مولّدة بالـ CSS (تُستعمَل قبل رفع أصول PNG الحقيقيّة) — حسب المستوى/الطبقة */
.lux-frame {
  position: absolute;
  inset: -12%;
  z-index: 2;
  border-radius: 50%;
  pointer-events: none;
  padding: 3px;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
}
.lux-frame.pf-gold { background: conic-gradient(from 0deg, var(--lux-gold-1), var(--lux-gold-2), var(--lux-gold-3), var(--lux-gold-1)); box-shadow: var(--glow-gold); animation: luxSpin 5s linear infinite; }
.lux-frame.pf-diamond { background: conic-gradient(from 0deg, #eaffff, var(--lux-diamond), #4aa6ff, #eaffff); box-shadow: 0 0 16px rgba(143, 240, 255, .6); animation: luxSpin 4s linear infinite; }
.lux-frame.pf-royal { background: conic-gradient(from 0deg, var(--lux-royal), var(--gold), var(--pink), var(--lux-royal)); box-shadow: var(--glow-violet); animation: luxSpin 6s linear infinite; }
.lux-frame.pf-neon { background: conic-gradient(from 0deg, var(--neon-green), var(--neon-green-2), #063, var(--neon-green)); box-shadow: var(--glow-neon); animation: luxSpin 4.5s linear infinite; }

/* ==========================================================================
   إطارات متحركة فاخرة (Animated Frames) — طبقة overlay حول الأفاتار.
   • تُشترى وتُفعّل من المتجر (kind=frame, media_type=css, meta.fx=<name>).
   • لا تكبّر المقعد/الصف (position:absolute + inset، لا تخطيط).
   • 60FPS: transform/opacity/filter فقط. تحترم prefers-reduced-motion + body.perf-lite.
   • الفئة على العنصر: .decor-frame-fx.ff-<name> (يولّدها frameLayerHtml في assets.js).
   ========================================================================== */
.decor-frame-fx {
  position: absolute; inset: 0; /* بحجم الصورة تماماً — الحلقة تُلاصق حافّتها بلا امتداد ولا فجوة */
  z-index: 2; border-radius: 50%;
  pointer-events: none;
  transform: translateZ(0); /* طبقة مركّبة مستقلّة (GPU) */
}
.decor-frame-fx::before, .decor-frame-fx::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
}
/* حلقة واحدة نظيفة عند وجود إطار CSS متحرّك: أزل هالة البلوم المنفصلة (الحلقة الثانية)
   وحلقة الذهب الداخليّة (av-ring)، فيبقى إطار واحد متمركز بحجم الصورة ومركزه شفّاف. */
.decor-frame:has(.decor-frame-fx)::before { display: none; }
.decor-frame:has(.decor-frame-fx) .avatar.av-ring { padding: 0; background: none; }
/* الحلقة اللونيّة (::before) تُقصّ بقناع دائريّ لتصير إطاراً رفيعاً حول الأفاتار */
.decor-frame-fx::before {
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
}

/* — شفق قطبيّ: حلقة دوّارة بنفسجيّة/سماويّة + توهّج نبضيّ — */
.ff-aurora::before { background: conic-gradient(from 0deg, #7c3aed, #22d3ee, #e879f9, #a855f7, #7c3aed);
  filter: drop-shadow(0 0 6px rgba(168, 85, 247, .7)); animation: luxSpin 6s linear infinite; }
.ff-aurora::after { inset: -6%; background: radial-gradient(circle, rgba(124, 58, 237, .32), transparent 68%);
  filter: blur(5px); animation: fxPulse 3s ease-in-out infinite; z-index: -1; }

/* — تاج الجمر: ذهب فاخر بدوران بطيء وتوهّج دافئ نابض — */
.ff-emberking::before { background: conic-gradient(from 0deg, #fff2bf, #ffbf4d, #ff8a1e, #b8860b, #fff2bf);
  filter: drop-shadow(0 0 7px rgba(255, 180, 60, .85)); animation: luxSpin 5s linear infinite; }
.ff-emberking::after { box-shadow: inset 0 0 9px 1px rgba(255, 195, 90, .55); animation: fxPulse 2.4s ease-in-out infinite; }

/* — نبض سايبر: حلقة نيون متقطّعة سماويّة/بنفسجيّة + توهّج — */
.ff-cyberpulse::before {
  background: conic-gradient(from 0deg, #22d3ee 0 9%, transparent 9% 20%, #a855f7 20% 29%, transparent 29% 40%,
    #22d3ee 40% 49%, transparent 49% 60%, #a855f7 60% 69%, transparent 69% 80%, #22d3ee 80% 89%, transparent 89% 100%);
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, .85)); animation: luxSpin 3.6s linear infinite; }
.ff-cyberpulse::after { border: 1.5px solid rgba(34, 211, 238, .45); animation: fxPulse 1.8s ease-in-out infinite; }

/* — مدار الجواهر: حلقة ذهبيّة رفيعة + جُسيمات تدور حول الأفاتار — */
.ff-orbit::before { background: conic-gradient(from 0deg, #ffd76a, #fff2bf, #ffb23e, #ffd76a); opacity: .85;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); }
.ff-orbit::after {
  background:
    radial-gradient(circle 3px at 50% 1%, #ffffff 55%, transparent 60%),
    radial-gradient(circle 2.5px at 99% 50%, #ffe89a 55%, transparent 60%),
    radial-gradient(circle 3px at 50% 99%, #8ff0ff 55%, transparent 60%),
    radial-gradient(circle 2.5px at 1% 50%, #ffd76a 55%, transparent 60%);
  filter: drop-shadow(0 0 3px rgba(255, 240, 200, .9)); animation: luxSpin 4s linear infinite; }

/* — منشور ثلاثيّ الأبعاد: حلقة قزحيّة مع إمالة 3D لمعان — */
.ff-prism3d { animation: fxTilt 5s ease-in-out infinite; }
.ff-prism3d::before { background: conic-gradient(from 0deg, #ff4d9d, #a855f7, #22d3ee, #34d399, #ffd76a, #ff4d9d);
  filter: drop-shadow(0 0 6px rgba(168, 85, 247, .6)); animation: luxSpin 7s linear infinite; }

/* — الجحيم: حلقة نار برتقاليّة/حمراء بوميض — */
.ff-inferno::before { background: conic-gradient(from 0deg, #ffcf5a, #ff8a1e, #ff2d2d, #7a0000, #ff8a1e, #ffcf5a);
  filter: drop-shadow(0 0 8px rgba(255, 90, 20, .85)); animation: luxSpin 4s linear infinite, fxFlicker .5s steps(2) infinite; }

/* — الصقيع: بريق ثلجيّ سماويّ + وميض نجوم — */
.ff-frost::before { background: conic-gradient(from 0deg, #eaffff, #8ff0ff, #4aa6ff, #d8fbff, #eaffff);
  filter: drop-shadow(0 0 6px rgba(143, 240, 255, .75)); animation: luxSpin 7s linear infinite; }
.ff-frost::after { background:
    radial-gradient(circle 2px at 22% 14%, #fff 55%, transparent 60%),
    radial-gradient(circle 1.5px at 82% 80%, #fff 55%, transparent 60%),
    radial-gradient(circle 2px at 88% 22%, #d8fbff 55%, transparent 60%);
  animation: fxTwinkle 2s ease-in-out infinite; }

/* — الملكيّ: بنفسجيّ/ذهبيّ مع بريق نجوم دوّار — */
.ff-royal::before { background: conic-gradient(from 0deg, #7c3aed, #ffd76a, #e879f9, #a855f7, #7c3aed);
  filter: drop-shadow(0 0 7px rgba(168, 85, 247, .7)); animation: luxSpin 5.5s linear infinite; }
.ff-royal::after { background:
    radial-gradient(circle 2.5px at 50% 2%, #fff2bf 55%, transparent 60%),
    radial-gradient(circle 2px at 92% 60%, #ffffff 55%, transparent 60%),
    radial-gradient(circle 2px at 12% 74%, #ffd76a 55%, transparent 60%);
  filter: drop-shadow(0 0 3px rgba(255, 220, 150, .9)); animation: luxSpin 4s linear infinite reverse; }

/* معاينة الإطار في المتجر/الإدارة: أفاتار عيّنة دائريّ ثابت الحجم */
.frame-prev { position: relative; width: 76px; height: 76px; display: inline-grid; place-items: center; }
.frame-prev .frame-prev-av { width: 76px; height: 76px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #6b7280, #232838 72%); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .3); }

/* ==== 10 إطارات بسيطة نظيفة (تدرّج/نيون، مولّدة) — .decor-frame-fx.ff-<fx> ==== */
.ff-gold::before{background:conic-gradient(from 0deg, #fff2bf, #ffd76a, #ffb23e, #a9741b, #ffd76a, #fff2bf);filter:drop-shadow(0 0 5px rgba(255,190,70,.7));}
.ff-goldspin::before{background:conic-gradient(from 0deg, #fff2bf, #ffd76a, #ffb23e, #a9741b, #ffd76a, #fff2bf);filter:drop-shadow(0 0 5px rgba(255,190,70,.75));animation:luxSpin 6s linear infinite;}
.ff-emerald::before{background:conic-gradient(from 0deg, #d1ffe8, #34d399, #059669, #065f46, #34d399, #d1ffe8);filter:drop-shadow(0 0 5px rgba(52,211,153,.7));}
.ff-emeraldpulse::before{background:conic-gradient(from 0deg, #d1ffe8, #34d399, #059669, #34d399, #d1ffe8);filter:drop-shadow(0 0 5px rgba(52,211,153,.55));}
.ff-emeraldpulse::after{inset:-5%;background:radial-gradient(circle, rgba(52,211,153,.55), transparent 68%);filter:blur(5px);animation:fxPulse 2.6s ease-in-out infinite;z-index:-1;}
.ff-diamondline::before{background:conic-gradient(from 0deg, #ffffff, #d8fbff, #8ff0ff, #4aa6ff, #8ff0ff, #ffffff);filter:drop-shadow(0 0 5px rgba(143,240,255,.7));}
.ff-diamondspin::before{background:conic-gradient(from 0deg, #ffffff, #d8fbff, #8ff0ff, #4aa6ff, #8ff0ff, #ffffff);filter:drop-shadow(0 0 5px rgba(143,240,255,.75));animation:luxSpin 5s linear infinite;}
.ff-violet::before{background:conic-gradient(from 0deg, #efe1ff, #c583ff, #a855f7, #6d28c9, #a855f7, #efe1ff);filter:drop-shadow(0 0 5px rgba(168,85,247,.7));}
.ff-violetneon::before{background:conic-gradient(from 0deg, #efe1ff, #c583ff, #a855f7, #6d28c9, #a855f7, #efe1ff);filter:drop-shadow(0 0 5px rgba(168,85,247,.8));animation:luxSpin 5.5s linear infinite;}
.ff-cyan::before{background:conic-gradient(from 0deg, #d6fbff, #22d3ee, #0891b2, #22d3ee, #d6fbff);filter:drop-shadow(0 0 5px rgba(34,211,238,.7));}
.ff-cyanpulse::before{background:conic-gradient(from 0deg, #d6fbff, #22d3ee, #0891b2, #22d3ee, #d6fbff);filter:drop-shadow(0 0 5px rgba(34,211,238,.55));}
.ff-cyanpulse::after{inset:-5%;background:radial-gradient(circle, rgba(34,211,238,.55), transparent 68%);filter:blur(5px);animation:fxPulse 2.6s ease-in-out infinite;z-index:-1;}

/* ==== 10 شارات SVG (mask + تدرّج + توهّج، مولّدة) — .svgbadge.sb-<fx> ==== */
.svgbadge{display:inline-block;width:1.15em;height:1.15em;vertical-align:-.18em;pointer-events:none;}
.svgbadge.big{width:40px;height:40px;}
.sb-star{-webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M12%202l2.9%206.3%206.9.6-5.2%204.5%201.6%206.8L12%2017.3%205.8%2020.8%207.4%2014%202.2%209.5l6.9-.6z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M12%202l2.9%206.3%206.9.6-5.2%204.5%201.6%206.8L12%2017.3%205.8%2020.8%207.4%2014%202.2%209.5l6.9-.6z'/%3E%3C/svg%3E") center/contain no-repeat;background:linear-gradient(160deg,#fff2bf,#ffd76a,#ffb23e);filter:drop-shadow(0 0 2.5px rgba(255,190,70,.85));}
.sb-crown{-webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M4%208l3.5%202.5L12%205l4.5%205.5L20%208l-1.5%209.5h-13z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M4%208l3.5%202.5L12%205l4.5%205.5L20%208l-1.5%209.5h-13z'/%3E%3C/svg%3E") center/contain no-repeat;background:linear-gradient(160deg,#ffe8a3,#ffcf5a,#e0a021);filter:drop-shadow(0 0 2.5px rgba(255,200,80,.85));}
.sb-shield{-webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M12%202l8%203v6c0%205-4%208-8%2011-4-3-8-6-8-11V5z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M12%202l8%203v6c0%205-4%208-8%2011-4-3-8-6-8-11V5z'/%3E%3C/svg%3E") center/contain no-repeat;background:linear-gradient(160deg,#a7f3d0,#34d399,#059669);filter:drop-shadow(0 0 2.5px rgba(52,211,153,.8));}
.sb-diamond{-webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M12%202l7%207-7%2013-7-13z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M12%202l7%207-7%2013-7-13z'/%3E%3C/svg%3E") center/contain no-repeat;background:linear-gradient(160deg,#ffffff,#8ff0ff,#22d3ee);filter:drop-shadow(0 0 2.5px rgba(143,240,255,.85));}
.sb-hexagon{-webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M12%202l8.7%205v10L12%2022l-8.7-5V7z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M12%202l8.7%205v10L12%2022l-8.7-5V7z'/%3E%3C/svg%3E") center/contain no-repeat;background:linear-gradient(160deg,#efe1ff,#c583ff,#7c3aed);filter:drop-shadow(0 0 2.5px rgba(168,85,247,.8));}
.sb-heart{-webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M12%2021C5%2015%203%209%206.5%205.8%209%203.5%2011%205%2012%207c1-2%203-3.5%205.5-1.2C21%209%2019%2015%2012%2021z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M12%2021C5%2015%203%209%206.5%205.8%209%203.5%2011%205%2012%207c1-2%203-3.5%205.5-1.2C21%209%2019%2015%2012%2021z'/%3E%3C/svg%3E") center/contain no-repeat;background:linear-gradient(160deg,#ffd1e6,#ff6fae,#e5397d);filter:drop-shadow(0 0 2.5px rgba(255,111,174,.8));}
.sb-bolt{-webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M13%202L4%2014h6l-2%208%209-13h-6z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M13%202L4%2014h6l-2%208%209-13h-6z'/%3E%3C/svg%3E") center/contain no-repeat;background:linear-gradient(160deg,#fff3a3,#ffd23e,#22d3ee);filter:drop-shadow(0 0 2.5px rgba(255,210,60,.85));}
.sb-flame{-webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M12%202c2.5%204%205%206%205%2010a5%205%200%2001-10%200c0-2%201-3.5%202.5-4.5C9%209%2010%2011%2011%2011c-1-3%201-6%201-9z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M12%202c2.5%204%205%206%205%2010a5%205%200%2001-10%200c0-2%201-3.5%202.5-4.5C9%209%2010%2011%2011%2011c-1-3%201-6%201-9z'/%3E%3C/svg%3E") center/contain no-repeat;background:linear-gradient(160deg,#ffd76a,#ff8a1e,#ff2d2d);filter:drop-shadow(0 0 2.5px rgba(255,120,30,.85));}
.sb-orb{-webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M12%202a10%2010%200%20100%2020%2010%2010%200%20000-20z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M12%202a10%2010%200%20100%2020%2010%2010%200%20000-20z'/%3E%3C/svg%3E") center/contain no-repeat;background:radial-gradient(circle at 38% 32%,#eaf6ff,#6db3ff,#2563eb);filter:drop-shadow(0 0 2.5px rgba(90,150,255,.8));}
.sb-sparkle{-webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M12%202c1%205%204%208%209%209-5%201-8%204-9%209-1-5-4-8-9-9%205-1%208-4%209-9z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20d='M12%202c1%205%204%208%209%209-5%201-8%204-9%209-1-5-4-8-9-9%205-1%208-4%209-9z'/%3E%3C/svg%3E") center/contain no-repeat;background:linear-gradient(160deg,#ffffff,#e0c3ff,#a855f7);filter:drop-shadow(0 0 2.5px rgba(200,150,255,.9));animation:fxTwinkle 2.2s ease-in-out infinite;}

/* ==== شارات ثلاثيّة الأبعاد (عملة معدنيّة بارزة + bevel + لمعان مائل + توهّج) — .badge3d.b3-<fx> ====
   تُرسَم بجانب الاسم بحجم em ثابت (لا تكبّر الصفّ). القاعدة تستعمل متغيّرات اللون --c1/--c2/--c3/--g.
   الإيموجي (‎.b3i‎) بارز بظلّ داخليّ؛ ::after لمعان يمسح دائريّاً (mix-blend screen). 60FPS. */
.badge3d{
  --c1:#fff6d8; --c2:#ffd76a; --c3:#e0a021; --g:rgba(255,200,80,.7);
  display:inline-grid; place-items:center; width:1.42em; height:1.42em; vertical-align:-.34em;
  border-radius:50%; font-size:.66em; line-height:1; position:relative; pointer-events:none;
  overflow:hidden; isolation:isolate; border:.5px solid rgba(255,255,255,.4);
  background:
    radial-gradient(circle at 34% 26%, rgba(255,255,255,.9), rgba(255,255,255,0) 44%),
    conic-gradient(from 210deg, var(--c1), var(--c2), var(--c3), var(--c2), var(--c1));
  box-shadow:
    inset 0 1.2px 1.4px rgba(255,255,255,.8),
    inset 0 -2px 3px rgba(0,0,0,.55),
    0 1.4px 3px rgba(0,0,0,.55),
    0 0 7px var(--g);
}
.badge3d .b3i{
  position:relative; z-index:2; display:block; transform:translateZ(0);
  filter:drop-shadow(0 1px .5px rgba(0,0,0,.6)) drop-shadow(0 0 2px var(--g));
}
.badge3d::after{
  content:''; position:absolute; inset:0; border-radius:50%; z-index:3; pointer-events:none;
  background:linear-gradient(115deg, transparent 40%, rgba(255,255,255,.6) 50%, transparent 60%);
  mix-blend-mode:screen; opacity:.85; animation:b3Shine 3.4s linear infinite;
}
.badge3d.big{ width:44px; height:44px; font-size:24px; vertical-align:middle; }
@keyframes b3Shine{ 0%{transform:translateX(-70%)} 100%{transform:translateX(70%)} }
@keyframes b3Flicker{ 0%,100%{transform:scale(1)} 45%{transform:scale(1.12)} 70%{transform:scale(.96)} }
@keyframes b3Spin{ to{transform:rotate(360deg)} }
@keyframes b3Twinkle{ 0%,100%{filter:drop-shadow(0 1px .5px rgba(0,0,0,.6)) drop-shadow(0 0 1px var(--g))} 50%{filter:drop-shadow(0 1px .5px rgba(0,0,0,.6)) drop-shadow(0 0 5px var(--g))} }

/* ألوان + حركات متنوّعة لكلّ شارة */
.b3-fire   {--c1:#ffe6a0;--c2:#ff7a1a;--c3:#c81e1e;--g:rgba(255,90,20,.85);}
.b3-fire .b3i{animation:b3Flicker 1.7s ease-in-out infinite;}
.b3-bolt   {--c1:#fff9b0;--c2:#ffd23e;--c3:#22a8ee;--g:rgba(255,220,60,.9);}
.b3-crown  {--c1:#fff3c4;--c2:#ffcf5a;--c3:#c98a1e;--g:rgba(255,200,80,.85);}
.b3-star   {--c1:#ffffff;--c2:#ffe08a;--c3:#f0b23a;--g:rgba(255,215,110,.9);}
.b3-star .b3i{animation:b3Twinkle 2.4s ease-in-out infinite;}
.b3-heart  {--c1:#ffd8e8;--c2:#ff6fae;--c3:#d61f6b;--g:rgba(255,90,150,.85);}
.b3-diamond{--c1:#ffffff;--c2:#8ff0ff;--c3:#12a8d6;--g:rgba(120,235,255,.9);}
.b3-diamond{animation:b3Spin 7s linear infinite;}
.b3-rocket {--c1:#e3ecff;--c2:#7c8cff;--c3:#4429c8;--g:rgba(120,120,255,.85);}
.b3-lion   {--c1:#ffe9b0;--c2:#eaa22a;--c3:#8a5410;--g:rgba(230,160,40,.8);}
.b3-eagle  {--c1:#eaf2ff;--c2:#9fb6d6;--c3:#3a5578;--g:rgba(150,180,220,.75);}
.b3-wolf   {--c1:#eef2f6;--c2:#9aa8bd;--c3:#4a5870;--g:rgba(150,180,220,.7);}
.b3-rose   {--c1:#ffe0ec;--c2:#ff5f8f;--c3:#146b3a;--g:rgba(255,90,140,.8);}
.b3-sword  {--c1:#eef1f8;--c2:#a7b0d8;--c3:#5b4aa8;--g:rgba(150,130,240,.8);}
.b3-shield {--c1:#c8f7df;--c2:#34d399;--c3:#0a7a52;--g:rgba(52,211,153,.8);}
.b3-moon   {--c1:#e6ecff;--c2:#aeb8e8;--c3:#4a4f8a;--g:rgba(170,180,255,.75);}
.b3-sun    {--c1:#fff6c4;--c2:#ffc23e;--c3:#ff6a1a;--g:rgba(255,180,40,.9);}
.b3-sun{animation:b3Spin 10s linear infinite;}
.b3-gem    {--c1:#dbfff6;--c2:#3ee0c0;--c3:#0a8a9a;--g:rgba(60,220,200,.8);}
.b3-skull  {--c1:#f4f4ea;--c2:#c8cfe0;--c3:#7c3aed;--g:rgba(168,85,247,.85);}
.b3-trophy {--c1:#fff0c0;--c2:#ffcf5a;--c3:#b8801a;--g:rgba(255,200,80,.85);}
.b3-galaxy {--c1:#e8d8ff;--c2:#9d6bff;--c3:#2a2a8a;--g:rgba(150,100,255,.85);}
.b3-galaxy .b3i{animation:b3Twinkle 2.8s ease-in-out infinite;}
.b3-crystal{--c1:#f0e6ff;--c2:#c583ff;--c3:#6a1fd6;--g:rgba(180,110,255,.85);}


/* حلقة توهّج بسيطة عند تفعيل av-ring القائم */
.avatar.av-ring { box-shadow: 0 0 0 2px rgba(255, 255, 255, .12), var(--glow-violet); }

/* ==========================================================================
   3) شارات VIP فاخرة بلمعة متحرّكة — .decor-vip / .decor-badge
   ========================================================================== */
.decor-vip {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 9px 2px 7px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 10.5px;
  line-height: 1.5;
  color: #1a1030;
  background: linear-gradient(135deg, var(--lux-gold-1), var(--lux-gold-2));
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: var(--glow-gold), inset 0 1px 0 rgba(255, 255, 255, .6);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .4);
}
/* لمعة تمرّ عبر الشارة (shine sweep) */
.decor-vip::after {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .85), transparent);
  transform: skewX(-18deg);
  animation: luxShine 3.2s var(--ease-lux) infinite;
  pointer-events: none;
}
/* تدرّج ألوان حسب المستوى */
.decor-vip.vip-1 { background: linear-gradient(135deg, #d8fbff, var(--lux-diamond)); color: #05323a; box-shadow: 0 0 14px rgba(143, 240, 255, .6), inset 0 1px 0 rgba(255, 255, 255, .7); }
.decor-vip.vip-3 { background: linear-gradient(135deg, var(--lux-royal), var(--gold)); color: #2a1140; box-shadow: var(--glow-violet), inset 0 1px 0 rgba(255, 255, 255, .5); }

.decor-badge { filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)) drop-shadow(0 0 6px rgba(255, 207, 90, .5)); }
.decor-badge img { transition: transform .2s var(--ease-lux); }
.decor-badge:hover img { transform: scale(1.12) rotate(-4deg); }

/* الاسم الملوّن (VIP/decor) — توهّج نصّيّ خفيف */
.decor-name.colored { text-shadow: 0 0 10px currentColor, 0 1px 2px rgba(0, 0, 0, .6); }
.owner-badge { filter: drop-shadow(0 0 6px rgba(255, 207, 90, .8)); }

/* ==========================================================================
   4) مقاعد الميكروفون الفاخرة بحواف متوهّجة — .fs-seat / .vp-seat / .seat
   ========================================================================== */
.fs-seat-av, .vp-seat-av { position: relative; }
/* حلقة زجاجيّة متوهّجة حول أفاتار المتحدّث (طبقة مستقلّة = 60FPS) */
.fs-seat.filled .fs-seat-av::after,
.vp-seat.filled .vp-seat-av::after,
/* مقعد المضيف (host) — حافّة ذهبيّة مميّزة */
.fs-seat.host .fs-seat-av::after,
/* المقاعد الشاغرة — قاعدة زجاجيّة أنيقة */
.fs-seat.vacant .fs-seat-slot,
.seat:not(.filled) {
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(255, 255, 255, .08), transparent 60%),
    rgba(255, 255, 255, .04);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
/* المقاعد الممتلئة — عمق زجاجيّ + انعكاس سفليّ */
.seat.filled {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 10px 24px rgba(0, 0, 0, .55), var(--glow-violet);
}
.seat.filled::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 34%;
  background: linear-gradient(0deg, rgba(124, 58, 237, .28), transparent);
  pointer-events: none;
}

/* ==========================================================================
   5) الإعلان النيونيّ المتحرّك — .neon-announce (مكوّن قابل لإعادة الاستخدام)
   + تحسين بانر الرئيسيّة القائم بمسح ضوئيّ ووميض بوق.
   ========================================================================== */
.neon-announce {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  padding: 9px 14px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(5, 30, 12, .92), rgba(6, 40, 20, .78));
  border: 1px solid rgba(57, 255, 20, .45);
  box-shadow: var(--glow-neon), inset 0 0 18px rgba(57, 255, 20, .12);
  color: #eafff0;
  font-weight: 800;
}
.neon-announce .na-horn {
  flex: 0 0 auto;
  font-size: 18px;
  filter: drop-shadow(0 0 6px rgba(57, 255, 20, .9));
  transform-origin: 70% 70%;
  animation: hornRing 1.6s var(--ease-lux) infinite;
}
.neon-announce .na-text {
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-shadow: 0 0 8px rgba(57, 255, 20, .6);
}
/* شريط متحرّك (marquee) للنصّ الطويل */
.neon-announce .na-text.scroll > span {
  display: inline-block;
  padding-inline-start: 100%;
  animation: naMarquee 14s linear infinite;
}
/* مسح ضوئيّ قطريّ يمرّ فوق الإعلان */
.neon-announce::after {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: -40%;
  width: 35%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg);
  animation: luxSweep 3.6s var(--ease-lux) infinite;
  pointer-events: none;
}

/* تحسين بانر الرئيسيّة القائم: توهّج فسفوريّ + مسح ضوئيّ (بصريّ فقط) */
.home-banner { position: relative; }
.hb-slide::after {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: -50%;
  width: 40%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: skewX(-20deg);
  animation: luxSweep 5s var(--ease-lux) infinite;
  pointer-events: none;
  z-index: 3;
}
.hb-cta { box-shadow: 0 0 12px rgba(57, 255, 20, .4); transition: transform .16s var(--ease-lux); }
.hb-slide.on .hb-cta { animation: naPulse 2.2s ease-in-out infinite; }
/* أيقونة بوق متحرّكة على بانر النيون القائم — تتوهّج بلون النيون الفسفوريّ للبانر (--neon) */
.hb-neon .hb-cap-t::before {
  content: '📣';
  display: inline-block;
  margin-inline-end: 6px;
  font-size: .95em;
  transform-origin: 70% 70%;
  filter: drop-shadow(0 0 6px var(--neon, var(--neon-green)));
  animation: hornRing 1.8s var(--ease-lux) infinite;
}

/* ==========================================================================
   6) لوحة الهدايا الفاخرة بأيقونات ثلاثيّة الأبعاد — .gp-*
   ========================================================================== */
.gp-tile {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .01)),
    rgba(20, 14, 44, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 6px 16px rgba(0, 0, 0, .35);
  transition: transform .16s var(--ease-lux), box-shadow .2s ease, border-color .2s ease;
}
.gp-tile:hover { transform: translateY(-2px); }
/* أيقونة الهديّة بإحساس ثلاثيّ الأبعاد (ظلّ + توهّج + طفو) */
.gp-ge, .gp-gemoji {
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .45)) drop-shadow(0 0 8px rgba(168, 85, 247, .3));
  transition: transform .2s var(--ease-lux);
}
.gp-tile:active .gp-ge { transform: scale(1.14); }
/* هالات الندرة (bloom) */
.gp-tile.rar-rare { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 14px rgba(91, 139, 255, .35); }
.gp-tile.rar-epic { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 16px rgba(168, 85, 247, .4); }
.gp-tile.rar-legendary { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), var(--glow-gold); }
.gp-tile.rar-legendary::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 40%, rgba(255, 207, 90, .18), transparent 60%);
  background-size: 220% 100%;
  animation: luxSweepBg 3s linear infinite;
  pointer-events: none;
}
.gp-tile.sel { box-shadow: 0 8px 24px rgba(232, 121, 249, .5), var(--glow-violet); }
.gp-tile.sel .gp-ge, .gp-tile.sel .gp-gemoji { animation: gp3d 1.4s ease-in-out infinite; }
.gp-bal { box-shadow: var(--glow-gold); }

/* ==========================================================================
   الحركات (Keyframes) — كلّها transform/opacity/filter لأداء 60FPS
   ========================================================================== */
@keyframes luxSpin { to { transform: rotate(360deg); } }
@keyframes luxFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
/* حركات الإطارات المتحركة (transform/opacity/filter فقط — 60FPS) */
@keyframes fxPulse { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes fxTwinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes fxFlicker { 0% { opacity: .82; } 100% { opacity: 1; } }
@keyframes fxTilt { 0%, 100% { transform: perspective(320px) rotateY(-16deg); } 50% { transform: perspective(320px) rotateY(16deg); } }
@keyframes luxShine { 0% { inset-inline-start: -60%; } 55%, 100% { inset-inline-start: 130%; } }
@keyframes luxSweep { 0% { inset-inline-start: -45%; } 60%, 100% { inset-inline-start: 130%; } }
@keyframes luxSweepBg { to { background-position: -220% 0; } }
@keyframes hornRing {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30%, 50% { transform: rotate(-14deg); }
  20%, 40% { transform: rotate(14deg); }
}
@keyframes naMarquee { to { transform: translateX(-100%); } }
@keyframes naPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes naFade { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes gp3d {
  0%, 100% { transform: perspective(200px) rotateY(0) translateY(0); }
  50% { transform: perspective(200px) rotateY(18deg) translateY(-2px); }
}

/* ==========================================================================
   احترام تفضيل تقليل الحركة + وضع أداء منخفض اختياريّ (body.perf-lite)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .decor-frame::before, .decor-frame-img, .lux-frame,
  .decor-frame-fx, .decor-frame-fx::before, .decor-frame-fx::after, .svgbadge,
  .badge3d, .badge3d::after, .badge3d .b3i,
  .decor-vip::after, .neon-announce .na-horn, .neon-announce::after,
  .neon-announce .na-text.scroll > span, .hb-slide::after, .hb-slide.on .hb-cta,
  .fs-seat.filled .fs-seat-av::after, .vp-seat .vp-seat-av::after,
  .gp-tile.rar-legendary::before, .gp-tile.sel .gp-ge {
    animation: none !important;
  }
  /* ثبات مرئيّ عند تقليل الحركة: نُبقي الإطار المتحرّك ثلاثيّ الأبعاد بلا إمالة */
  .ff-prism3d { transform: none !important; }
}
body.perf-lite .decor-frame::before,
body.perf-lite .decor-frame-fx, body.perf-lite .decor-frame-fx::before, body.perf-lite .decor-frame-fx::after, body.perf-lite .svgbadge,
body.perf-lite .badge3d, body.perf-lite .badge3d::after, body.perf-lite .badge3d .b3i,
body.perf-lite .fs-seat.filled .fs-seat-av::after,
body.perf-lite .vp-seat .vp-seat-av::after,
body.perf-lite .gp-tile.rar-legendary::before { animation: none !important; }
body.perf-lite .ff-prism3d { transform: none !important; }

/* ═════════ إعادة تصميم شريط أدوات + كتابة الروم الصوتيّ (vparty فقط) ═════════ */
/* ① شريط الكتابة المستقلّ: زجاج شفّاف بحدود بنفسجيّة/فضّيّة */
.vparty .fs-chatbar { position: relative; z-index: 6; flex: 0 0 auto;
  padding: 8px calc(12px + env(safe-area-inset-right)) 4px calc(12px + env(safe-area-inset-left)); }
.vparty .fs-chatbar .fs-inputform { gap: 8px; border-radius: 999px; padding: 5px 6px 5px 14px; margin: 0;
  background: linear-gradient(135deg, rgba(124,58,237,.15), rgba(255,255,255,.05));
  border: 1px solid rgba(180,162,255,.4);
  box-shadow: 0 4px 18px rgba(10,8,30,.4), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: border-color .18s ease, box-shadow .18s ease; }
.vparty .fs-chatbar .fs-inputform:focus-within { border-color: rgba(205,188,255,.72);
  box-shadow: 0 6px 22px rgba(124,58,237,.42), inset 0 1px 0 rgba(255,255,255,.16); }
.vparty .fs-chatbar .input { background: transparent; border: none; box-shadow: none; color: #f2ecff; font-size: 14px; }
.vparty .fs-chatbar .input::placeholder { color: rgba(203,184,255,.6); }
.vparty .fs-chatbar .fs-send { width: 42px; height: 42px; flex-shrink: 0; }

/* ② شريط الأدوات: خلفيّة زجاجيّة متدرّجة داكنة بدل الصلبة (سلوك flex الأصلي محفوظ) */
.vparty .fs-bar.live-bar { gap: 10px;
  background: linear-gradient(180deg, rgba(14,10,34,.35), rgba(8,6,22,.82));
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(180,162,255,.14); padding-top: 12px; }

/* أزرار أكبر قليلاً + مسافات متناسقة */
.vparty .fs-bar .circbtn { width: 48px; height: 48px; font-size: 21px; }

/* ③ توهّج الزرّ النشط — المايك المفعّل (غير المكتوم) فقط */
.vparty .fs-bar .circbtn.selfmic:not(.muted) {
  background: linear-gradient(135deg, rgba(0,200,83,.32), rgba(10,125,63,.28));
  border-color: rgba(94,255,163,.6); animation: vpMicGlow 1.8s ease-in-out infinite; }
@keyframes vpMicGlow {
  0%,100% { box-shadow: 0 0 0 1px rgba(94,255,163,.35), 0 0 16px 2px rgba(0,200,83,.45), inset 0 1px 0 rgba(255,255,255,.25); }
  50%     { box-shadow: 0 0 0 1px rgba(94,255,163,.55), 0 0 26px 5px rgba(0,200,83,.68), inset 0 1px 0 rgba(255,255,255,.3); } }
/* المايك المكتوم: بلا توهّج */
.vparty .fs-bar .circbtn.selfmic.muted {
  background: linear-gradient(135deg, rgba(60,20,30,.5), rgba(40,14,22,.5)); border-color: rgba(255,120,140,.4); }

/* ④ زرّ الإنهاء: وردي/أحمر مستدير أنيق */
.vparty .fs-bar .btn.danger { border-radius: 999px; padding: 0 18px; height: 46px; font-weight: 800; flex-shrink: 0;
  background: linear-gradient(135deg, #ff4d6d, #d61a5c); border: 1px solid rgba(255,140,165,.5);
  box-shadow: 0 6px 18px rgba(214,26,92,.5), inset 0 1px 0 rgba(255,255,255,.25); }
.vparty .fs-bar .btn.danger:active { transform: translateY(1px) scale(.97); }

/* ⑤ الكيبورد: يبقى شريط الكتابة يرتفع فوق اللوحة (عبر visualViewport الموجودة).
   لا نُخفي شريط الأدوات (الحقل صار في fs-chatbar مستقل فلا داعي لطيّه). */
.vparty.kb-open .fs-chatbar { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }

/* وضع توفير الطاقة: بلا توهّج نابض (اتّساقاً مع بقيّة perf-lite) */
body.perf-lite .vparty .fs-bar .circbtn.selfmic:not(.muted) { animation: none !important; }

/* ⑥ إعلان الغرفة: نصّ متحرّك (marquee) فقط بلا صندوق — أعلى المقاعد (vparty فقط) */
.vparty .fs-announce {
  display: block !important; overflow: hidden; max-width: none !important; z-index: 5;
  background: none !important; border: none !important; box-shadow: none !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  border-radius: 0 !important; padding: 2px 0 !important; margin: 0 0 4px !important;
  animation: none !important; }
.vparty .fs-announce::after { display: none !important; }        /* إزالة البريق */
.vparty .fs-announce .ar-ann-scroll {
  display: inline-block; white-space: nowrap; padding-left: 100%;
  color: rgba(216,206,255,.85); font-size: 13px; font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,.45);
  animation: vpAnnMarquee 15s linear infinite; will-change: transform; }
@keyframes vpAnnMarquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.vparty .fs-announce:hover .ar-ann-scroll { animation-play-state: paused; }
body.perf-lite .vparty .fs-announce .ar-ann-scroll { animation: none; padding-left: 0; }

/* ═════════ شاشة البثّ المباشر بنمط TikTok Live (.adv-room فقط — لا تلمس .vparty) ═════════ */
/* ① الفيديو يملأ الشاشة كاملاً بلا حاوية تقصّه */
/* ═══ المسرح: كتلة ثابتة بارتفاع 50dvh تماماً على كل الأجهزة ═══
   .live-wrap عمود فلكس؛ نُرتّب أبناءه صراحةً فيأتي المسرح مباشرةً تحت الشريط العلوي:
   الرأس(1) ← المسرح(2) ← منطقة الشات السوداء(3) ← شريط الكتابة(4) ← شريط الأدوات(5).
   flex: 0 0 50dvh يمنع أي تمدّد/انكماش، والارتفاع لا يعتمد على نسبة أبعاد المصدر ولا المحتوى. */
.adv-room .fs-header { order: 1; }
.adv-room .fs-chatbar { order: 4; }
.adv-room .fs-bar { order: 5; }

/* ⓞ توكنز نمط TikTok LIVE — مُنطاقة على ‎.adv-room‎ بأسماء ‎--tk-*‎ حتى لا تصطدم بتوكنز التطبيق العامّة
   (‎--pink/--cyan/--muted‎ لها قيم أخرى في styles.css وتستخدمها شاشات أخرى). القيم كما في المواصفة. */
.adv-room {
  --tk-seat: #1c1c1e;                    /* خلفيّة المقعد الفاضي */
  --tk-seat-line: rgba(255,255,255,.06);
  --tk-chip: rgba(255,255,255,.14);      /* الحبوب العلويّة + الأزرار الدائريّة */
  --tk-muted: rgba(255,255,255,.55);     /* نصّ «إرسال دعوة» */
  --tk-pink: #FE2C55;
  --tk-cyan: #25F4EE;
  --tk-heart: #FF8A5B;                   /* القلب داخل الحبّة البيضاء */
  --tk-live: #30D158;
  --tk-rail-w: 23.5vw;                   /* عرض عمود المقاعد */
  --rail-w: var(--tk-rail-w);            /* اسم المواصفة V2 — مرادف لنفس القيمة (لا قيمة مكرّرة) */
  font-family: "TikTok Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}
.adv-room.fs-live { background: #000; }  /* خلفيّة سوداء صافية بدل بنفسجيّ التطبيق */

/* ② الهيدر شفّاف (تدرّج خفيف للقراءة فقط) */
.adv-room .fs-header { background: linear-gradient(180deg, rgba(0,0,0,.4), transparent) !important; }
.adv-room .tk-head { gap: 10px;
  padding: calc(env(safe-area-inset-top) + 6px) calc(env(safe-area-inset-right) + 12px) 0 calc(env(safe-area-inset-left) + 12px); }

/* الصفّ الأوّل: كرت المضيف على الحافة البادئة (يمين في العربيّة) وزرّ الإنهاء + المشاهدون على اللاحقة */
.adv-room .tk-row1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.adv-room .tk-left { display: flex; align-items: center; gap: 10px; flex: none; }
.adv-room .tk-power { width: 34px; height: 34px; flex: none; padding: 0; border: 0; background: transparent;
  display: grid; place-items: center; color: #fff; cursor: pointer; }
.adv-room .tk-viewers { display: flex; align-items: center; gap: 6px; background: var(--tk-chip);
  border-radius: 999px; padding: 5px 12px; font-size: 15px; font-weight: 700; white-space: nowrap;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* كرت المضيف: صورة ٤٤px ← الاسم + سطر الإعجابات ← حبّة بيضاء فيها القلب */
.adv-room .tk-host { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 64%;
  background: rgba(0,0,0,.35); border-radius: 999px; padding: 3px 3px 3px 4px; cursor: pointer; }
.adv-room .tk-hostav { flex: none; display: grid; place-items: center; }
.adv-room .tk-host .avatar { width: 44px !important; height: 44px !important; border: 1.5px solid rgba(255,255,255,.25); }
.adv-room .tk-host .vipframe { padding: 2px; }
.adv-room .tk-host .vipframe > .avatar { width: 40px !important; height: 40px !important; }
.adv-room .tk-hostmeta { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.adv-room .tk-hostline { display: flex; align-items: center; gap: 4px; min-width: 0; }
.adv-room .tk-hostname { font-size: 15px; font-weight: 700; max-width: 96px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adv-room .tk-hostline .cbadge, .adv-room .tk-hostline img { flex: none; }
.adv-room .tk-hostlikes { display: flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 600;
  color: rgba(255,255,255,.85); }
.adv-room .tk-likepill { display: flex; align-items: center; gap: 5px; flex: none;
  background: #fff; color: #111; border-radius: 999px; padding: 5px 9px; font-size: 14px; font-weight: 800; }

/* الصفّ الثاني: «الترتيب اليومي» على الحافة البادئة و«إضافة الآن» على اللاحقة */
.adv-room .tk-row2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.adv-room .tk-slot { width: 1px; height: 1px; }
.adv-room .tk-pill { display: flex; align-items: center; gap: 6px; border: 0; color: #fff; cursor: pointer;
  background: var(--tk-chip); border-radius: 999px; padding: 7px 13px; font-size: 14px; font-weight: 700;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.adv-room .tk-pill:active { transform: scale(.96); }
.adv-room .tk-pill.tk-add { background: rgba(255,255,255,.12); font-weight: 600; }
.adv-room .tk-pill.tk-add.on { color: rgba(255,255,255,.7); }
.adv-room .tk-rosette { width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: conic-gradient(from 210deg, #a24bff, #6c4bff, #c04bff, #a24bff); display: grid; place-items: center; }
.adv-room .tk-rosette::after { content: ''; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; }

/* الودجت الصغير: سهم + بيت + نقطة «مباشر». في عمود RTL يكون flex-end هو الحافة اليسرى فيزيائيّاً. */
.adv-room .tk-mini { align-self: flex-end; display: flex; align-items: center; gap: 8px; width: max-content;
  background: rgba(255,255,255,.13); border-radius: 12px; padding: 7px 10px; color: #fff; }
.adv-room .tk-mini svg { opacity: .9; }
.adv-room .tk-livedot { width: 9px; height: 9px; border-radius: 50%; background: var(--tk-live);
  box-shadow: 0 0 0 3px rgba(48,209,88,.18); }

/* ③ الشريط السفليّ + الكتابة: شفّاف تماماً (لا glass) */
.adv-room .fs-chatbar { position: relative; z-index: 6; flex: 0 0 auto;
  padding: 8px calc(12px + env(safe-area-inset-right)) 4px calc(12px + env(safe-area-inset-left)); }
.adv-room .fs-chatbar .fs-inputform { gap: 8px; border-radius: 999px; padding: 5px 6px 5px 16px; margin: 0;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color .18s ease; }
.adv-room .fs-chatbar .fs-inputform:focus-within { border-color: rgba(255,255,255,.42); }
.adv-room .fs-chatbar .input { background: transparent; border: none; box-shadow: none; color: #fff; font-size: 14px; }
.adv-room .fs-chatbar .input::placeholder { color: rgba(255,255,255,.66); }
.adv-room .fs-chatbar .fs-send { width: 40px; height: 40px; flex-shrink: 0; }
/* الشريط السفليّ: ٤ أزرار دائريّة ٤٤px على الحافة اليسرى فيزيائيّاً + زرّان ملوّنان على اليمنى */
.adv-room .tk-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-top: none;
  padding: 12px calc(16px + env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left)); }
.adv-room .tk-group { display: flex; align-items: center; gap: 12px; }
.adv-room .tk-circle { width: 44px; height: 44px; flex: none; padding: 0; border: 0; border-radius: 50%;
  background: var(--tk-chip); display: grid; place-items: center; color: #fff; cursor: pointer;
  transition: background .15s ease, transform .12s ease; }
.adv-room .tk-circle:hover { background: rgba(255,255,255,.22); }
.adv-room .tk-circle:active { transform: scale(.92); }
.adv-room .tk-circle.off { opacity: .55; }
.adv-room .tk-circle .badge { position: absolute; top: -3px; inset-inline-end: -3px; }
/* من ٣٦٠px: نُضيّق الفراغ والأقطار قليلاً فتبقى الأزرار الستّة في سطر واحد بلا التفاف */
@media (max-width: 389px) {
  .adv-room .tk-bar { gap: 8px; padding-inline: calc(10px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-left)); }
  .adv-room .tk-group { gap: 8px; }
  .adv-room .tk-circle { width: 40px; height: 40px; }
  .adv-room .tk-circle svg { width: 20px; height: 20px; }
}

/* ④ الشات أسفل الشاشة على الحافة اليسرى فيزيائيّاً: يحجز عرض عمود المقاعد على اليمين فلا يتداخل معه
   إطلاقاً، ارتفاع أقصى ٤٢٪، تمرير مخفيّ، وتلاشٍ بقناع تدرّج أعلى المنطقة */
/* الشات يملأ المنطقة السوداء تحت المسرح. لا حشو لعمود المقاعد — العمود صار داخل المسرح. */
.adv-room .fs-lowerleft { pointer-events: none;
  position: absolute; inset: 0; width: auto; max-width: none;
  height: auto; max-height: none; gap: 0;
  padding: 6px 14px 6px 14px; justify-content: flex-end; }
.adv-room .fs-chat { background: none !important; border: 0 !important; box-shadow: none !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  height: auto; max-height: 100%; gap: 12px !important; pointer-events: auto;
  overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none;   /* بلا شريط تمرير ظاهر */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 26px); mask-image: linear-gradient(to bottom, transparent, #000 26px); }
.adv-room .fs-chat::-webkit-scrollbar { width: 0; height: 0; }
/* الرسالة: بلا صندوق — شارة دائريّة ٣٠px، ثمّ اسم بوزن ٧٠٠ خافت، ثمّ النصّ أبيض بوزن ٥٠٠ يلتفّ */
.adv-room .fs-chat .fs-msg { background: none !important; border: none !important; box-shadow: none !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important; border-radius: 0 !important;
  padding: 2px 0 !important; width: 100%; max-width: 100%; gap: 9px; align-items: flex-start; animation: none; }
.adv-room .fs-chat .fs-msg .avatar, .adv-room .fs-chat .fs-msg .vipframe { width: 30px !important; height: 30px !important; flex-shrink: 0; }
.adv-room .fs-chat .fs-msgbody { display: block; min-width: 0; font-size: 15.5px; line-height: 1.55; }
.adv-room .fs-chat .fs-msgname { display: inline; font-size: 15.5px; font-weight: 700; color: rgba(255,255,255,.72);
  text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.adv-room .fs-chat .fs-msgname::after { content: '\00a0'; }  /* مسافة قبل النصّ */
.adv-room .fs-chat .fs-msgtext { display: inline; font-size: 15.5px; font-weight: 500; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.8); }
/* رسالة النظام الترحيبيّة: شارة دائريّة ٣٠px + نصّ بوزن ٧٠٠ */
.adv-room .fs-chat .tk-sys { display: flex; gap: 9px; align-items: flex-start; }
.adv-room .tk-sysbadge { width: 30px; height: 30px; border-radius: 50%; flex: none; color: #fff;
  background: rgba(255,255,255,.16); display: grid; place-items: center; }
.adv-room .tk-systext { margin: 0; font-size: 15.5px; line-height: 1.55; font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,.8); }
/* المشرف فقط: نقر رسالة يفتح الإشراف؛ لغيره النقر يمرّ للفيديو (لا مؤقّت، الرسائل تبقى قابلة للنقر) */
.adv-room .fs-chat.mod .fs-msg { pointer-events: auto; cursor: pointer; }

/* ⑤ الهدايا تظهر animation أسفل-يسار الشاشة (تختفي تلقائياً عبر JS) */
.adv-room .fs-giftfly { left: 12px !important; right: auto !important; transform: none !important;
  bottom: calc(120px + env(safe-area-inset-bottom)) !important; max-width: 72vw !important; }

/* ⑥ الكيبورد: شريط الكتابة يرتفع فوق اللوحة */
.adv-room.kb-open .fs-chatbar { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }

/* الشبكة داخل .fs-bg الآن، فنُخفي *الفيديو* وحده لا الحاوية — وإلّا اختفت الشبكة معه.
   المسرح يبقى 50dvh ويُقسم داخليّاً بلا تغيير ارتفاعه الكلّي. */
/* شريط المقاعد يبقى ظاهراً في وضع الأعمدة أيضاً (لإدارة الضيوف) */

/* تركيز ظاهر على كل زرّ داخل شاشة البثّ + احترام تقليل الحركة للعناصر الجديدة */
.adv-room button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .adv-room .tk-seat, .adv-room .tk-circle, .adv-room .tk-pill { transition: none !important; }
  .adv-room .tk-livedot { box-shadow: none; }
}
/* التخطيط على الهاتف العموديّ: صفوف مكدّسة/شبكة — لا أعمدة جانبيّة ضيّقة (كانت ~4.5:16 فتقصّ بشدّة) */
/* خريطة الأعمدة حسب العدد (V5 §3): 1→1 · 2→2 · 3–4→2×2 · 5–6→3×2.
   كان 2 يُرسم صفّين مكدّسين عموديّاً (grid-template-rows: 1fr 1fr) فيظهر الشخصان فوق بعضهما
   بدل جنب بعض — وهو ما تنصّ المواصفة على عكسه. */
.adv-room .fs-guestgrid[data-n="3"],
.adv-room .fs-guestgrid[data-n="5"],
.adv-room .fs-guestgrid[data-n="3"] .fs-gcell:last-child,
/* جنباً إلى جنب فقط على شاشة عريضة/أفقيّة */
@media (min-aspect-ratio: 1 / 1) {
}

/* ═════════ المواصفة V2 — لوحات وأدوات شاشة المضيف (.adv-room فقط) ═════════ */

/* ── أ.1 حبة الموسيقى ── */
.adv-room .tk-musicpill { display: inline-flex; align-items: center; gap: 7px; max-width: 62vw; }
.adv-room .tk-musicpill.hidden { display: none; }   /* بلا مقطع شغّال ⇒ تختفي تماماً (لا حبّة فارغة) */
.adv-room .tk-album { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.18); color: #fff; }
.adv-room .tk-mustxt { font-size: 14px; font-weight: 700; white-space: nowrap; }
.adv-room .tk-mustxt b { display: inline-block; max-width: 110px; overflow: hidden; text-overflow: ellipsis;
  vertical-align: bottom; white-space: nowrap; font-weight: 700; }

/* ── أ.2 حبة الهدف ── */
.adv-room .tk-goalpill { display: inline-flex; align-items: center; gap: 7px; }
.adv-room .tk-goalbox { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: rgba(255,255,255,.18); font-size: 15px; line-height: 1; }
.adv-room .tk-goaltxt { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }


/* ── ب. شريط التحكّم الصوتيّ العائم ── */
.adv-room .tk-audiowrap { position: absolute; z-index: 7; bottom: 46%; inset-inline-start: 20px;
  inset-inline-end: calc(var(--rail-w) + 20px); display: flex; align-items: center; gap: 10px;
  transition: opacity .22s ease, transform .22s ease; }
.adv-room .tk-audiowrap.away { opacity: 0; transform: translateY(8px); pointer-events: none; }
.adv-room .tk-audiobar { flex: 1; min-width: 0; height: 64px; border-radius: 32px;
  background: rgba(28,28,30,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: space-around; padding: 0 10px; }
.adv-room .tk-ab { width: 46px; height: 46px; flex: none; padding: 0; border: 0; background: transparent;
  color: #fff; display: grid; place-items: center; cursor: pointer; border-radius: 50%;
  transition: transform .12s ease, opacity .15s ease; }
.adv-room .tk-ab svg { width: 28px; height: 28px; }
.adv-room .tk-ab:active { transform: scale(.92); }
.adv-room .tk-ab.on { color: var(--tk-pink); }
.adv-room .tk-ab.disabled, .adv-room .tk-ab:disabled { opacity: .32; cursor: default; }
/* زرّ تبديل الكاميرا المنفصل: دائرة 52px تطفو على حافة عمود المقاعد */
.adv-room .tk-flipbtn { width: 52px; height: 52px; flex: none; padding: 0; border: 0; border-radius: 50%;
  background: rgba(28,28,30,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform .12s ease; }
.adv-room .tk-flipbtn:active { transform: scale(.92); }

/* ── هـ. قواعد اللوحات المشتركة ── */
body.tk-noscroll { overflow: hidden; }               /* منع تمرير الخلفية أثناء فتح أي لوحة */
.tk-panel-ov { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,.4);
  /* اللوحات تُركَّب في #modalRoot — خارج شجرة .adv-room — فلا تصل إليها توكنزها بالوراثة.
     نُعيد تعريف المستخدَم منها هنا حتى تعمل accent-color وحدود التحديد وخلفيّات المصغّرات. */
  --tk-seat: #1c1c1e;
  --tk-seat-line: rgba(255,255,255,.06);
  --tk-pink: #FE2C55;
  --tk-cyan: #25F4EE;
  --tk-chip: rgba(255,255,255,.14);
  --tk-muted: rgba(255,255,255,.55);
  /* توكنز اللوحات الفاتحة (V4) */
  --sheet-bg: #FFFFFF;
  --card-bg: #F7F7F8;
  --tk-red: #FE2C55;
  --txt: #000000;
  --txt-2: #8E8E93;
  --chev: #C7C7CC;
  --pill-off: #EFEFF0;
  --online: #34C759; }
.tk-panel { width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto; outline: none;
  animation: tkSlideUp .22s ease both; }
.tk-panel::-webkit-scrollbar { display: none; }
@keyframes tkSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ── نظام اللوحات الموحّد (V3/0): نوعان dark / light ── */
.tk-panel { animation-duration: .22s; }
.tk-panel.tk-dark { background: rgba(0,0,0,.92); color: #fff; border-radius: 18px 18px 0 0;
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); }
.tk-panel.tk-light { background: #F2F2F7; color: #000; border-radius: 22px 22px 0 0;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); }
.tk-ptitle { font-size: 16px; font-weight: 800; text-align: center; padding-bottom: 12px; }
.tk-panel.tk-light .tk-ptitle { color: #000; }
.tk-soon { text-align: center; font-size: 14px; opacity: .6; padding: 26px 0; }
.tk-panel.tk-light .tk-soon { color: #8E8E93; opacity: 1; }
/* زرّ رجوع داخل اللوحات الفرعيّة */
.tk-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; padding: 6px 10px;
  border: 0; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff;
  font-size: 13px; font-weight: 700; cursor: pointer; }
.tk-back:active { transform: scale(.95); }
/* شبكة عامّة للوحات الفرعيّة (مصغّرات + نص) */
.tk-sgrid { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 16px 10px; }
.tk-scell { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0;
  border: 0; background: transparent; color: #fff; cursor: pointer; transition: transform .12s ease; }
.tk-scell:active { transform: scale(.94); }
.tk-sthumb { width: 100%; aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center;
  background: var(--tk-seat); border: 2px solid transparent; overflow: hidden; }
.tk-scell.sel .tk-sthumb { border-color: var(--tk-pink); }
.tk-slbl { font-size: 13px; font-weight: 500; text-align: center; }
.tk-em { font-size: 26px; line-height: 1; }
.tk-filt, .tk-bgsw { width: 100%; height: 100%; display: block; }
.tk-filt.f-none { background: #2a2a2e; }
.tk-filt.f-warm { background: linear-gradient(135deg,#ffb35c,#ff6b4a); }
.tk-filt.f-cool { background: linear-gradient(135deg,#5cc8ff,#4a6bff); }
.tk-filt.f-mono { background: linear-gradient(135deg,#e6e6e6,#4a4a4a); }
.tk-filt.f-vivid { background: linear-gradient(135deg,#ff2fd0,#ffe14a); }
.tk-filt.f-retro { background: linear-gradient(135deg,#c9a86a,#7a5c3a); }
.tk-filt.f-soft { background: linear-gradient(135deg,#ffd9e8,#c9d9ff); }
.tk-filt.f-sharp { background: linear-gradient(135deg,#00e0b0,#004a6b); }
.tk-filt.f-dream { background: linear-gradient(135deg,#b98cff,#5ce1ff); }
/* التدرّجات الستّة مصدر واحد: تخدم مربّع الاختيار في لوحة المؤثّرات (‎.tk-bgsw‎)
   وخلفيّة الغرفة الفعليّة (‎.bgp-bN‎) المحفوظة بصيغة ‎preset:bN‎ — بلا أصول صور. */
.tk-bgsw.b1, .bgp-b1 { background: linear-gradient(135deg,#1e2a5a,#0a0f24); }
.tk-bgsw.b2, .bgp-b2 { background: linear-gradient(135deg,#5a1e3a,#240a16); }
.tk-bgsw.b3, .bgp-b3 { background: linear-gradient(135deg,#1e5a3a,#0a2416); }
.tk-bgsw.b4, .bgp-b4 { background: linear-gradient(135deg,#5a4a1e,#241c0a); }
.tk-bgsw.b5, .bgp-b5 { background: linear-gradient(135deg,#3a1e5a,#160a24); }
.tk-bgsw.b6, .bgp-b6 { background: linear-gradient(135deg,#2a2a2e,#0a0a0c); }
/* تبويبات */
.tk-tabs { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; }
.tk-tabs::-webkit-scrollbar { display: none; }
.tk-tab { flex: none; padding: 7px 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.7); font-size: 13px; font-weight: 700; }
.tk-tab.on { background: #fff; color: #111; }
/* منزلقات «التحسين» */
.tk-sl { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.tk-slname { flex: 0 0 84px; font-size: 14px; font-weight: 600; }
.tk-slr { flex: 1; min-width: 0; accent-color: var(--tk-pink); }
.tk-slval { flex: 0 0 34px; text-align: end; font-size: 13px; font-variant-numeric: tabular-nums; opacity: .75; }
.tk-reset { width: 100%; margin-top: 14px; padding: 12px; border: 0; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff; font-size: 14px; font-weight: 700; }
.tk-upload { width: 100%; margin-bottom: 14px; padding: 12px; border: 1px dashed rgba(255,255,255,.3);
  border-radius: 12px; background: transparent; color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
/* رابط المشاركة */
.tk-lurl { padding: 12px 4px 0; font-size: 12px; color: #8E8E93; word-break: break-all; text-align: center; }

/* ── ج. لوحة المؤثرات ── */
.tk-panel.tk-fx { min-height: 38vh; max-height: 72vh; }
.tk-panel.tk-fxsub { min-height: 42vh; max-height: 78vh; }
/* مدخل «التفاعل» أعلى شبكة المؤثّرات (V4/١) */
.tk-engentry { width: 100%; margin-bottom: 16px; padding: 12px 14px; border: 0; border-radius: 12px;
  background: rgba(255,255,255,.10); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 700; }
.tk-engentry:active { transform: scale(.98); }

/* ── لوحة «التفاعل» (V4/١) — ورقة بيضاء، شبكة ٤ أعمدة ── */
.tk-panel.tk-engage { background: var(--sheet-bg); min-height: 40vh; max-height: 74vh; }
.tk-panel.tk-engage .tk-ptitle { font-size: 17px; font-weight: 700; color: var(--txt); padding-bottom: 22px; }
.tk-enggrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px 8px; direction: rtl; }
.tk-engcell { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0;
  border: 0; background: transparent; cursor: pointer; transition: transform .12s ease; }
.tk-engcell:active { transform: scale(.94); }
.tk-engic { position: relative; display: grid; place-items: center; color: #3A3A3C; }
.tk-engic svg { width: 40px; height: 40px; }
/* شارة «جديد»: نقطة 8px حمراء أعلى يسار الأيقونة */
.tk-engnew { position: absolute; top: 0; left: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--tk-red); }
.tk-englbl { font-size: 12.5px; font-weight: 500; line-height: 1.28; color: var(--txt);
  text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tk-fxgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 12px; direction: rtl; }
.tk-fxcell { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 0;
  border: 0; background: transparent; color: #fff; cursor: pointer; transition: transform .12s ease; }
.tk-fxcell:active { transform: scale(.92); }
.tk-fxcell .tk-fxic { position: relative; display: grid; place-items: center; }
.tk-fxlbl { font-size: 13px; font-weight: 500; line-height: 1.2; text-align: center; }
.tk-fxcell.on::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  margin-top: 34px; width: 6px; height: 6px; border-radius: 50%; background: var(--tk-pink); }
/* معطّلة: بصريّاً وفعليّاً (كما تعامل المواصفة «مزدوجة»).
   تبقى ظاهرة ومقروءة — لا تُخفى — ويُكتب سبب التعطيل تحتها صراحةً حتى يعرف
   المستخدم أنّ الميزة موجودة لكنّها تحتاج شرطاً غير متوفّر هنا. */
.tk-fxcell.off { color: rgba(255,255,255,.34); pointer-events: none; }
.tk-fxwhy {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
  color: rgba(255,255,255,.42);
  text-wrap: balance;
}

/* ── د. ورقة «المزيد» الفاتحة ── */
/* المواصفة تطلب ~52% — نجعلها الحدّ الأدنى وندعها تنمو حتى 82vh، لأننا أضفنا بطاقة ثالثة
   («أدوات المضيف») للحفاظ على وظائف الورقة القديمة؛ بحدّ 52vh ثابت كانت تُقصّ الإعدادات والأدوات. */
/* الخلفيّة/الحشو/الزوايا تأتي من .tk-light — هنا الارتفاع فقط. */
.tk-panel.tk-more { min-height: 52vh; max-height: 82vh; }
.tk-lcard { background: #fff; border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
.tk-lhead { padding: 12px 18px 4px; font-size: 13px; font-weight: 700; color: #8E8E93; }
.tk-lrow { width: 100%; min-height: 62px; padding: 0 18px; border: 0; background: transparent;
  display: flex; align-items: center; gap: 14px; cursor: pointer; text-align: start; }
.tk-lrow:active { background: #EDEDF2; }
.tk-lic { flex: none; display: grid; place-items: center; }
.tk-ltitle { flex: 1; min-width: 0; font-size: 17px; font-weight: 700; color: #000;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-ltail { flex: none; display: flex; align-items: center; gap: 8px; }
.tk-lgrey { font-size: 15px; font-weight: 400; color: #8E8E93; font-style: normal; }
.tk-ldot { width: 8px; height: 8px; border-radius: 50%; background: var(--tk-red, #FE2C55); }
/* chevron يتّجه لليسار في RTL — المواصفة صريحة */
.tk-panel.tk-more .tk-ltail svg { transform: none; }
.tk-lfoot { padding-top: 22px; text-align: center; font-size: 15px; font-weight: 500; color: #8E8E93; }
.tk-lreport { border: 0; background: transparent; padding: 0; font-size: 15px; font-weight: 700; color: #000; cursor: pointer; }
/* مفتاح تبديل بنمط iOS: 51×31 */
.tk-ios { width: 51px; height: 31px; flex: none; border-radius: 999px; background: #E9E9EA;
  position: relative; cursor: pointer; transition: background .2s ease; display: block; }
.tk-ios > i { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s ease; }
.tk-ios.on { background: #34C759; }
.tk-ios.on > i { transform: translateX(20px); }
.tk-ios:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

/* الورقة العامّة داخل نظام اللوحات (الموسيقى/هدف الهدايا) — نوع dark بخلفيّة أوضح قليلاً للنماذج */
.tk-panel.tk-sheet.tk-dark { background: #161618; }

/* تركيز ظاهر داخل كل اللوحات */
.tk-panel button:focus-visible, .tk-panel input:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tk-panel.tk-light button:focus-visible, .tk-panel.tk-light input:focus-visible { outline: 2px solid #000; }

/* ضيّق (360px): لا يكسر صفّ الحبّتين — نقلّص العرض الأقصى للاسم والفراغات */
@media (max-width: 380px) {
  .adv-room .tk-mustxt b { max-width: 68px; }
  .adv-room .tk-musicpill, .adv-room .tk-goalpill { gap: 5px; }
  .adv-room .tk-row2 { gap: 6px; }
  .adv-room .tk-audiowrap { inset-inline-start: 12px; gap: 8px; }
  .tk-fxgrid { gap: 20px 8px; }
  .tk-enggrid { gap: 26px 6px; }
  .tk-englbl { font-size: 12px; }
}

/* احترام تقليل الحركة: ظهور فوري بلا انزلاق (المواصفة هـ) */
@media (prefers-reduced-motion: reduce) {
  .tk-panel { animation: none; }
  .adv-room .tk-audiowrap { transition: none; }
  .tk-fxcell:active, .tk-engcell:active, .tk-engentry:active, .adv-room .tk-ab:active, .adv-room .tk-flipbtn:active { transform: none; }
  .tk-ios, .tk-ios > i { transition: none; }
}

/* ═════════ SCREEN A — شاشة ما قبل البثّ (نمط TikTok، قيم مضبوطة) ═════════ */
/* لا نعيد تعريف تخطيط .golive/.gl-preview (الأساس يعمل: flex عموديّ + معاينة flex:1 + قناع إذن مُعتِم) */
.golive.glv2 #glVideo { width: 100%; height: 100%; object-fit: cover; }
.golive.glv2 img, .golive.glv2 video { max-width: 100%; max-height: 100%; }  /* أمان: لا وسائط تتجاوز الحاوية */
.golive.glv2 svg { width: 24px; height: 24px; flex-shrink: 0; }  /* حارس: أيّ <svg> مضمّن بلا حجم لا يتمدّد (سبب أيقونة الخلفيّة العملاقة) */
/* X إغلاق أعلى-يمين */
.golive.glv2 .glv-x { position: absolute; z-index: 6; top: calc(10px + env(safe-area-inset-top)); right: 12px;
  width: 34px; height: 34px; display: grid; place-items: center; border: none; border-radius: 999px;
  background: rgba(0,0,0,.38); color: #fff; }
.golive.glv2 .glv-x svg { width: 22px; height: 22px; }
/* مفاتيح دائريّة أعلى-يسار */
.golive.glv2 .glv-toprail { position: absolute; z-index: 6; top: calc(10px + env(safe-area-inset-top)); left: 12px; display: flex; gap: 8px; }
.golive.glv2 .glv-round { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border: none;
  border-radius: 999px; background: rgba(0,0,0,.38); color: #fff; }
.golive.glv2 .glv-round svg { width: 22px; height: 22px; }
/* حالة الإطفاء: الأيقونة مُعتَّمة بشفافيّة .5 + شرطة مائلة عبرها */
.golive.glv2 .glv-round:not(.on) svg { opacity: .5; }
.golive.glv2 .glv-round:not(.on)::after { content: ''; position: absolute; width: 26px; height: 2px; background: #fff; opacity: .5; transform: rotate(-45deg); border-radius: 2px; }
/* أسفل الشاشة */
.golive.glv2 .glv-bottom { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0;
  padding: 30px 12px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.55) 45%); }
/* صفّ الأدوات: أيقونة خطّيّة فوق نصّ */
.golive.glv2 .glv-tools { display: flex; justify-content: center; gap: 36px; }
.golive.glv2 .glv-tool { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0;
  background: none; border: none; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); cursor: pointer; }
.golive.glv2 .glv-tool svg { width: 24px; height: 24px; }
.golive.glv2 .glv-tool span { font-size: 11px; font-weight: 500; }
/* البطاقة الداكنة */
.golive.glv2 .glv-card { background: #161618; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.golive.glv2 .glv-cardhead { display: flex; align-items: center; gap: 10px; }
.golive.glv2 .glv-cardhead .avatar { width: 40px; height: 40px; flex-shrink: 0; }
.golive.glv2 .glv-title { flex: 1; min-width: 0; background: none; border: none; outline: none; color: #fff; font-size: 16px; }
.golive.glv2 .glv-title::placeholder { color: rgba(255,255,255,.6); }
.golive.glv2 .glv-subrow { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.golive.glv2 .glv-sel { flex: 1; min-width: 0; background: rgba(255,255,255,.1); border: none; border-radius: 10px;
  color: rgba(255,255,255,.85); font-size: 13px; padding: 9px 10px; }
/* زرّ البثّ الأحمر (بعرض كامل) */
.golive.glv2 .glv-golive { height: 48px; border: none; border-radius: 999px; background: #FE2C55; color: #fff;
  font-size: 17px; font-weight: 600; cursor: pointer; }
.golive.glv2 .glv-golive:disabled { opacity: .6; }
/* قناع الإذن يبقى فوق المعاينة */
/* قناع الإذن يُترك للأساس (مُعتِم z3) — لا نجعله شفّافاً وإلا ظهر مربّع الفيديو الفارغ (أيقونة وسائط عملاقة) خلفه */


/* زرّ كاميرا الضيف: أخضر عند التشغيل، عاديّ عند الإطفاء (opt-in) */
.adv-room .fs-bar #guestCam.on { background: rgba(0,200,83,.32); border-color: rgba(94,255,163,.6); }
