/* ============================================================
   Theme: royalmodern — «نبض ملكي الجديد» 👑✨
   تصميم مستقل كامل: خمري داكن فاخر + ذهبي + وردي ملكي
   المصداق: designA_royal.html (Mockup A)
   القاعدة: كل شيء معرّم تحت [data-theme="arabicref"] —
   صفر تأثير على royal/clean/vibrant/saudi أو الافتراضي.
   ملاحظة الخط: Google Fonts (Cairo) محجوب بـ CSP الحالي
   (style-src 'self' 'unsafe-inline') — القرار: fallback نظامي
   بلا تحميل خارجي. لو Cairo مثبّت على الجهاز يُستخدم تلقائيًا.
   ============================================================ */

/* ===== 1) Design Tokens ===== */
[data-theme="arabicref"]{
  --rose:#241019;--rose-dark:#1d1016;--rose-soft:#e0245e;
  --paper:#241521;--ink:#f3e9df;--line:#3a2430;--chrome:#241521;
  --app-bg:#0c0709;
  --landing-bg-1:#120a0e;--landing-bg-2:#1d1016;--landing-bg-3:#4a0f22;
  --hdr-bg:#2a0f18;--ftr-bg:#120a0e;
  --gold:#d4af37;--gold-text:#f3d97b;--gold-soft:#3a2a12;--gold-soft2:#4a3616;
  --surface-cream:#1a0f15;
  --topbar-1:#2a0f18;--topbar-2:#1d1016;--topbar-line:#4a2a38;
  --toolbar-bg:#221420;--toolbar-line:#3a2430;
  --head-1:#3a1420;--head-2:#241019;--head-line:#4a2a38;
  --panel-border:#3a2430;--panel-bg:#1d1117;
  --panel-pink:#221420;--composer-line:#3a2430;--footer-line:#3a2430;
  --frame-border:#4a2a38;--shell-border:#4a2a38;
  --btn-line:#5a3a4a;--btn-2:#2a1722;
  --input-border:#4a2a38;
  --accent-dark:#6b1f2e;--accent-deep:#8a1038;--deep:#1d1016;
  --name-color:#f3d97b;--on-dark-soft:#d8b9c6;
  --chat-bg:#1a0f15;--input-bar-bg:#221420;--emoji-bg:#221420;--ptab-active:#6b1f2e;--ptab-badge:#3a1420;
  color-scheme:dark;
}

/* ===== 2) الخط (fallback بلا أي تحميل خارجي — CSP-safe) ===== */
[data-theme="arabicref"] body,
[data-theme="arabicref"] button,[data-theme="arabicref"] input,
[data-theme="arabicref"] textarea,[data-theme="arabicref"] select{
  font-family:"Cairo","Segoe UI",Tahoma,Arial,sans-serif;
}

/* ===== 3) الإطار الرئيسي والهيدر ===== */
[data-theme="arabicref"] .chat-shell{
  background:radial-gradient(1200px 500px at 50% -10%,#241019,#120a0e 60%);
}
[data-theme="arabicref"] .topbar{
  background:linear-gradient(90deg,#2a0f18,#1d1016 40%,#1d1016);
  border-bottom:1px solid #4a2a38;gap:14px;
}
/* نبض الشعار — أنيميشن توهج وردي هادئ (prefers-reduced-motion يعطّلها أسفلًا) */
@keyframes rmPulse{0%,100%{text-shadow:0 0 6px #e0245e55}50%{text-shadow:0 0 20px #e0245ecc}}
[data-theme="arabicref"] .brand{animation:rmPulse 1.6s infinite;color:#fff}
[data-theme="arabicref"] .brand span{background:#e0245e2e;border-color:#e0245e66;color:#ffc4cf}
[data-theme="arabicref"] .status{color:#d8b9c6}
[data-theme="arabicref"] .status b{color:#f3e9df}
[data-theme="arabicref"] .topbar-actions button{
  background:#2a1722;border:1px solid #4a2a38;color:#d8b9c6;border-radius:9px;
}
[data-theme="arabicref"] .topbar-actions button:hover{border-color:#d4af3777;color:#f3d97b}

/* أيقونة الخاص المضافة (طبقة Royal Modern) */
[data-theme="arabicref"] .rm-head-ico{
  background:#2a1722;border:1px solid #4a2a38;color:#ffc4cf;border-radius:9px;
  padding:6px 10px;font-size:15px;cursor:pointer;line-height:1;position:relative;
}
[data-theme="arabicref"] .rm-head-ico:hover{border-color:#e0245e88;box-shadow:0 0 10px #e0245e55}

/* مساحة إعلان الهيدر — حاوية جاهزة مخفية (مصدرها: Ad Slots المستقلة لاحقًا) */
[data-theme="arabicref"] #rmHeaderAd{display:none}
[data-theme="arabicref"] #rmHeaderAd:not(:empty){
  display:flex;align-items:center;justify-content:center;margin-inline:auto;
  min-height:42px;max-width:468px;width:100%;
  border:1.5px dashed #b08d3a;border-radius:8px;overflow:hidden;background:#1a0f14;
}

/* ===== 4) شريط الأدوات والأزرار ===== */
[data-theme="arabicref"] .toolbar{background:#221420;border-bottom:1px solid #3a2430}
[data-theme="arabicref"] .toolbar button,[data-theme="arabicref"] .user-actions button,
[data-theme="arabicref"] .rooms-panel button,[data-theme="arabicref"] .format-row button{
  background:linear-gradient(#2a1722,#241521);color:#d8b9c6;border:1px solid #4a2a38;border-radius:9px;
}
[data-theme="arabicref"] .toolbar button:hover,[data-theme="arabicref"] .user-actions button:hover,
[data-theme="arabicref"] .rooms-panel button:hover{border-color:#d4af3777;color:#f3d97b;filter:none}
[data-theme="arabicref"] .format-row select,[data-theme="arabicref"] .color-tool{
  background:#241521;color:#d8b9c6;border:1px solid #4a2a38;border-radius:8px;
}
[data-theme="arabicref"] #fmtSize,[data-theme="arabicref"] #fmtFamily{color:#d8b9c6!important;background:#241521!important;border-color:#4a2a38}
[data-theme="arabicref"] .hint{color:#8d7480}

/* ===== 5) منطقة العمل: الشات والقوائم ===== */
[data-theme="arabicref"] #workspace{background:transparent;border:0;gap:8px}
[data-theme="arabicref"] .center-panel,
[data-theme="arabicref"] .side{
  background:#1a0f15;border:1px solid #3a2430;border-radius:12px;overflow:hidden;
}
[data-theme="arabicref"] .room-head{background:linear-gradient(90deg,#3a1420,#241019);border-bottom:1px solid #4a2a38}
[data-theme="arabicref"] .room-head small{color:#d8b9c6}
[data-theme="arabicref"] .messages{background:#1a0f15;color:#e9dce2;font-size:15px;line-height:1.9}
[data-theme="arabicref"] .msg{border-bottom:1px solid #221420}
[data-theme="arabicref"] .msg .time{color:#6f5763}
[data-theme="arabicref"] .msg.system{color:#8d7480;font-style:italic}
[data-theme="arabicref"] .msg.private{background:#241019;border:1px solid #4a2a38}
/* R9c-16 (ب): سجل رسائل نافذة الخاص كريمي موحد كالصورة المرجعية — بلا مساس بالغرفة أو صندوق الكتابة أو Classic؛ تنسيقات المستخدم الصريحة (ألوان/أحجام) تبقى كما هي */
[data-theme="arabicref"] .fl-msgs{background:#fffde7}
[data-theme="arabicref"] .fl-msgs .msg{color:#33202a;border-bottom-color:#ece5c8}
[data-theme="arabicref"] .fl-msgs .msg b.msg-sender:not(.vipname){color:#8a1038}
[data-theme="arabicref"] .fl-msgs .msg.private{background:transparent;border-color:#e8dfc0}
/* R9c-16 (ج): صندوق الكتابة في نافذة الخاص بنفس الطابع الفاتح — نص داكن وplaceholder مقروء؛ الحقل هنا حصرًا داخل نوافذ الخاص */
[data-theme="arabicref"] .fl-compose textarea{background:#fffde7;color:#33202a;border-color:#d9c9a8}
[data-theme="arabicref"] .fl-compose textarea::placeholder{color:#8a7a5a;opacity:1}
[data-theme="arabicref"] .private-mark{color:#e0245e}
[data-theme="arabicref"] .msg .mention{color:#ffd76a;background:#3a2a12;border-radius:5px;padding:0 4px}
[data-theme="arabicref"] .users,[data-theme="arabicref"] .rooms-box{background:#1d1117}
[data-theme="arabicref"] .user{border-bottom:1px solid #221420}
[data-theme="arabicref"] .user:hover{background:#241521}
[data-theme="arabicref"] .user.selected{background:#8a1038;color:#fff}
[data-theme="arabicref"] .avatar{border:2px solid #57415a;border-radius:50%;background:#2a1722}
[data-theme="arabicref"] .panel-tabs{background:#180d13;border-bottom:1px solid #2c1a24}
[data-theme="arabicref"] .ptab{color:#9b7f8b}
[data-theme="arabicref"] .ptab.active{color:#f3d97b;border-bottom-color:#d4af37}
[data-theme="arabicref"] .user-actions{background:#221420;border-top:1px solid #3a2430}

/* تجميع المتواجدين حسب الرتبة (طبقة royalmodern فقط — تُبنى في JS) */
[data-theme="arabicref"] .rm-ugroup-h{
  margin:9px 8px 3px;font-size:10.5px;font-weight:800;letter-spacing:.5px;color:#7d6570;
  border-bottom:1px solid #2c1a24;padding-bottom:3px;
}
[data-theme="arabicref"] .rm-ugroup-h:first-child{margin-top:5px}

/* الغرف */
[data-theme="arabicref"] #roomsList .room{
  background:#241521;border:1px solid #3a2430;color:#d8b9c6;border-radius:9px;padding:6px 9px;
}
[data-theme="arabicref"] #roomsList .room:hover{border-color:#d4af3766;color:#f3d97b}
[data-theme="arabicref"] #roomsList .room.active{
  background:linear-gradient(90deg,#3a1420,#1d1117);border-inline-start:3px solid #e0245e;color:#ffd6de;
}
[data-theme="arabicref"] .rooms-sec-title{color:#7d6570;font-weight:800;font-size:11px}

/* ===== R2 — قائمة الغرف المطورة (royalmodern فقط): ترويسة العدد + صفوف 40px + قفل/حماية + عداد بأيقونة ===== */
[data-theme="arabicref"] .rm-rooms-head{
  display:flex;align-items:center;gap:6px;margin:2px 4px 7px;padding:7px 10px;
  background:linear-gradient(90deg,#2a141e,#1d1117);border:1px solid #3a2430;border-radius:9px;
  color:#c9aeb9;font-size:11.5px;font-weight:700;
}
[data-theme="arabicref"] .rm-rooms-head b{color:#f3d97b;font-size:13px}
[data-theme="arabicref"] #roomsList .rm-room-row{
  display:flex;align-items:center;gap:7px;height:40px;min-height:40px;padding:0 10px;margin:3px 4px;
}
[data-theme="arabicref"] .rm-room-ico{flex:0 0 auto;font-size:14px;filter:saturate(.9)}
[data-theme="arabicref"] .rm-room-name{
  flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  font-weight:700;font-size:12.5px;
}
[data-theme="arabicref"] .rm-room-lock{flex:0 0 auto;font-size:11px;opacity:.85}
[data-theme="arabicref"] #roomsList .rm-room-row .room-count-badge{
  display:inline-flex;align-items:center;gap:3px;flex:0 0 auto;min-width:34px;justify-content:center;
  padding:2px 9px;border-radius:999px;font-size:11px;font-weight:800;line-height:16px;
  background:#3a1420;color:#ffd6de;border:1px solid #c2577d88;box-shadow:0 1px 3px #000a;
}
[data-theme="arabicref"] #roomsList .rm-room-row.active .room-count-badge{background:#e0245e;border-color:#ff7ba0;color:#fff}

/* ===== 6) صندوق الكتابة والإرسال ===== */
[data-theme="arabicref"] .composer{background:#221420;border-top:1px solid #3a2430}
[data-theme="arabicref"] .input-bar{background:#221420;border:1px solid #4a2a38;border-radius:11px}
[data-theme="arabicref"] .input-bar:focus-within{border-color:#e0245e88;box-shadow:0 0 0 3px #e0245e22}
/* R9c-5: الكتابة تلقائيًا بحجم 18 وسميك — في صندوق المنشورات وصندوق الخاص وفي عرض رسائل الشات
   (royalmodern فقط، عرض محلي لا يغيّر بيانات السيرفر، وأدوات التنسيق تعمل فوقه) */
[data-theme="arabicref"] .input-bar .editor-area{color:#f3e9df;font-size:18px;font-weight:700}
[data-theme="arabicref"] #privateInput{color:#f3e9df;font-size:18px;font-weight:700}
[data-theme="arabicref"] .messages{font-size:18px}
[data-theme="arabicref"] .msg{font-weight:700}
[data-theme="arabicref"] .msg.system{font-weight:400}
[data-theme="arabicref"] .editor-area:empty::before{color:#7d6570;font-weight:400}
[data-theme="arabicref"] .send{
  background:linear-gradient(135deg,#e0245e,#8a1038);color:#fff;border:0;border-radius:50px;
  box-shadow:0 4px 14px #e0245e44;font-weight:bold;
}
[data-theme="arabicref"] .send:hover{filter:brightness(1.1)}
[data-theme="arabicref"] .emoji-panel{background:#221420;border:1px solid #4a2a38;border-radius:12px}
[data-theme="arabicref"] .emoji-panel button{background:#2a1722;border-color:#4a2a38}
[data-theme="arabicref"] .private-compose textarea{
  background:#1a0f15;color:#f3e9df;border:1px solid #4a2a38;border-radius:9px;
}

/* ===== 7) النوافذ (خاص/إدارة/ملفي) ===== */
[data-theme="arabicref"] .modal{background:#0c0709cc}
[data-theme="arabicref"] .private-box,[data-theme="arabicref"] .profile-box,[data-theme="arabicref"] .admin-box{
  background:#1d1117;border:1px solid #4a2a38;color:#f3e9df;box-shadow:0 24px 70px #000c;
}
[data-theme="arabicref"] .private-title{background:linear-gradient(90deg,#3a1420,#241019);color:#f3d97b;border-bottom:1px solid #4a2a38}
[data-theme="arabicref"] .private-messages,[data-theme="arabicref"] .pf-body,[data-theme="arabicref"] .admin-body{color:#e9dce2}
[data-theme="arabicref"] .admin-titlebar{background:linear-gradient(90deg,#3a1420,#241019);color:#f3d97b;border-bottom:1px solid #4a2a38}
[data-theme="arabicref"] .admin-tabs{background:#180d13;border-bottom:1px solid #2c1a24}
[data-theme="arabicref"] .admin-tab{color:#9b7f8b;background:#241521;border-color:#3a2430}
[data-theme="arabicref"] .admin-tab.active{color:#fff;background:#e0245e;border-color:#e0245e}
[data-theme="arabicref"] .admin-searchbar input{
  background:#241521;border:1px solid #4a2a38;color:#f3e9df;border-radius:9px;
}
[data-theme="arabicref"] .admin-row{color:#d8b9c6}
[data-theme="arabicref"] .admin-body input,[data-theme="arabicref"] .admin-body select,[data-theme="arabicref"] .admin-body textarea{
  background:#241521;border:1px solid #4a2a38;color:#f3e9df;
}
[data-theme="arabicref"] .admin-body .mini,[data-theme="arabicref"] .mini{
  background:#2a1722;border:1px solid #4a2a38;color:#d8b9c6;border-radius:9px;
}
[data-theme="arabicref"] .admin-body button:not(.mini){background:linear-gradient(135deg,#e0245e,#8a1038);color:#fff;border:0}
[data-theme="arabicref"] .toast{background:#1d1117;border:1px solid #d4af3766;color:#f3e9df;box-shadow:0 12px 40px #000a}
/* R9c-4: الـtoast كان bottom:18px فيختفي خلف شريطي الراديو والتنقل — يُرفع فوقهما مع التفاف النص الطويل */
[data-theme="arabicref"] .toast{bottom:132px;max-width:min(92vw,760px);white-space:normal;text-align:center;line-height:1.7}
[data-theme="arabicref"] .pf-body label{color:#c9aeb9}
[data-theme="arabicref"] .pf-body input{
  background:#241521;border:1px solid #4a2a38;color:#f3e9df;border-radius:9px;
}
[data-theme="arabicref"] .pf-msg{color:#f3d97b}

/* ===== 8) الغرفة الصوتية ===== */
[data-theme="arabicref"] .voice-view{background:#0c0709}
[data-theme="arabicref"] .vv-stage-wrap{background:transparent}
[data-theme="arabicref"] .vv-stage{background:#1a0f15;border:1px solid #3a2430;border-radius:12px}
[data-theme="arabicref"] .vv-head{border-bottom:1px solid #2c1a24}
[data-theme="arabicref"] .vv-room-title{color:#f3d97b}
[data-theme="arabicref"] .vv-chip{background:#241521;border:1px solid #3a2430;color:#d8b9c6}
[data-theme="arabicref"] .vv-chip-owner{border-color:#d4af3777;color:#f3d97b}
[data-theme="arabicref"] .vv-chip-live{border-color:#1d5237;color:#a7ecca}
[data-theme="arabicref"] .vv-controls{background:#221420;border-top:1px solid #3a2430}
[data-theme="arabicref"] .vp-req{background:linear-gradient(135deg,#e0245e,#8a1038);color:#fff;border:0;border-radius:50px}
[data-theme="arabicref"] .vv-deafen{background:#2a1722;border:1px solid #4a2a38;color:#d8b9c6}
[data-theme="arabicref"] .vv-side{background:#1d1117;border:1px solid #3a2430;border-radius:12px}
[data-theme="arabicref"] .vv-users{color:#e9dce2}
[data-theme="arabicref"] .vv-queue-wrap{background:#180d13;border:1px solid #2c1a24;border-radius:11px}
[data-theme="arabicref"] .vv-queue-title{color:#d8b9c6}

/* ===== 9) R6 — Ad Slots: المواضع الإعلانية المستقلة =====
   الحاويات يُنشئها mount وتُزال في unmount. فارغة/مطفأة = display:none صفر أثر.
   devices="desktop|mobile" يحسمها العميل في JS (تفريغ المحتوى) — CSS يغطي مواضع الجوانب والجوال فقط. */
[data-theme="arabicref"] .rm-slot{display:none}
[data-theme="arabicref"] .rm-slot.ad-on{display:block}
[data-theme="arabicref"] .rm-slot-h{width:100%;overflow:hidden;text-align:center}
[data-theme="arabicref"] .rm-slot-in{display:flex;align-items:center;justify-content:center;max-width:100%;overflow:hidden}
[data-theme="arabicref"] .rm-slot-a{display:block;max-width:100%}
[data-theme="arabicref"] .rm-slot-img{max-width:100%;max-height:110px;object-fit:contain;display:block}
[data-theme="arabicref"] #rmHeaderAd.ad-on{margin:6px 8px 0;border:1px solid #3a2430;border-radius:10px;background:#150c11;max-height:120px}
[data-theme="arabicref"] #rmChatTopAd.ad-on{margin:0 8px 6px;border:1px solid #3a2430;border-radius:10px;background:#150c11;max-height:120px}
[data-theme="arabicref"] #rmChatBottomAd.ad-on{margin:6px 8px;border:1px solid #3a2430;border-radius:10px;background:#150c11;max-height:120px}
[data-theme="arabicref"] #rmMobileAd.ad-on{margin:4px 8px;border:1px solid #3a2430;border-radius:10px;background:#150c11;max-height:64px}
[data-theme="arabicref"] #rmMobileAd .rm-slot-img{max-height:52px}
@media(min-width:901px){[data-theme="arabicref"] #rmMobileAd{display:none!important}}
/* الجانبان: يمين ويسار — ≥1500px فقط، عبر grid-areas صريحة بجوار الشبكة الأصلية (main/drag/side) */
@media(min-width:1500px){
  [data-theme="arabicref"] #workspace.rm-with-rightad{grid-template-columns:minmax(0,1fr) 250px 7px var(--sideW);grid-template-areas:"main rightad drag side"}
  [data-theme="arabicref"] #workspace.rm-with-leftad{grid-template-columns:250px minmax(0,1fr) 7px var(--sideW);grid-template-areas:"leftad main drag side"}
  [data-theme="arabicref"] #workspace.rm-with-rightad.rm-with-leftad{grid-template-columns:250px minmax(0,1fr) 250px 7px var(--sideW);grid-template-areas:"leftad main rightad drag side"}
  /* R9b: أعمدة الإعلانات تنهار تمامًا عندما لا يوجد إعلان جانبي فعّال — لا فراغات محجوزة 250px */
  [data-theme="arabicref"] #workspace.rm-with-rightad.rm-with-leftad:not(:has(#rmRightAd.ad-on)):not(:has(#rmLeftAd.ad-on)){grid-template-columns:minmax(0,1fr) 7px var(--sideW);grid-template-areas:"main drag side"}
  [data-theme="arabicref"] #workspace.rm-with-rightad.rm-with-leftad:has(#rmRightAd.ad-on):not(:has(#rmLeftAd.ad-on)){grid-template-columns:minmax(0,1fr) 250px 7px var(--sideW);grid-template-areas:"main rightad drag side"}
  [data-theme="arabicref"] #workspace.rm-with-rightad.rm-with-leftad:not(:has(#rmRightAd.ad-on)):has(#rmLeftAd.ad-on){grid-template-columns:250px minmax(0,1fr) 7px var(--sideW);grid-template-areas:"leftad main drag side"}
  [data-theme="arabicref"] #workspace #rmRightAd{grid-area:rightad}
  [data-theme="arabicref"] #workspace #rmLeftAd{grid-area:leftad}
  [data-theme="arabicref"] #rmRightAd.ad-on,
  [data-theme="arabicref"] #rmLeftAd.ad-on{
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    border:1.5px dashed #b08d3a;border-radius:10px;background:#150c11;min-height:300px;overflow:hidden;
  }
}

/* ===== 10) R1 — هيكل المرجع: هيدر 46px + قائمة ☰ 180px + بحث + تنقل سفلي 46px =====
   مطابقة هندسية للمرجع (قياسات 2026-10-13): هيدر 46px، قائمة 180px بعناصر 41px،
   فوتر 46px بأزرار 4. الألوان من هوية royalmodern — لا ألوان منسوخة من المرجع. */

/* إخفاء الهيدر/الشريط/الفوتر القديمة داخل شاشة الشات فقط (صوتية وLanding بلا مساس) */
[data-theme="arabicref"] #chatView > .topbar,
[data-theme="arabicref"] #chatView > .toolbar,
[data-theme="arabicref"] #chatView > footer{display:none}
[data-theme="arabicref"] #chatView{padding-bottom:46px}

/* --- الهيدر: 46px، يمين أيقونات، وسط الحالة، يسار الشعار و☰ (DOM: RTL) --- */
[data-theme="arabicref"] .rm-header{
  display:flex;align-items:center;gap:10px;height:46px;flex:0 0 46px;
  background:linear-gradient(90deg,#1d1016,#2a0f18 30%,#2a0f18);
  border-bottom:1px solid #4a2a38;padding:0 8px;position:relative;z-index:1300;
}
[data-theme="arabicref"] .rm-actions{display:flex;align-items:center;gap:6px;order:0}
[data-theme="arabicref"] .rm-ico{
  width:32px;height:32px;display:flex;align-items:center;justify-content:center;
  background:#2a1722;border:1px solid #4a2a38;border-radius:9px;color:#ffc4cf;
  font-size:15px;font-style:normal;cursor:pointer;padding:0;line-height:1;position:relative;
}
[data-theme="arabicref"] .rm-ico:hover{border-color:#d4af3788;box-shadow:0 0 10px #d4af3733}
[data-theme="arabicref"] .rm-ico i{font-style:normal}
[data-theme="arabicref"] .rm-status{
  flex:1;text-align:center;order:1;color:#d8b9c6;font-size:12.5px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;
}
[data-theme="arabicref"] .rm-status b{color:#f3e9df}
[data-theme="arabicref"] .rm-brand{
  order:2;font-weight:900;color:#f3d97b;font-size:14.5px;white-space:nowrap;
  animation:rmPulse 1.6s infinite;
}
[data-theme="arabicref"] .rm-brand span{
  background:#e0245e2e;border:1px solid #e0245e66;color:#ffc4cf;
  border-radius:6px;font-size:10px;padding:1px 5px;margin-inline-start:4px;vertical-align:2px;
}
[data-theme="arabicref"] .rm-bars{
  order:3;width:34px;height:34px;display:flex;align-items:center;justify-content:center;
  background:transparent;border:0;color:#fff;font-size:19px;cursor:pointer;padding:0;
}
[data-theme="arabicref"] .rm-bars:hover{color:#f3d97b}
[data-theme="arabicref"] .rm-bars i{font-style:normal}

/* --- قائمة الإعدادات المنسدلة (من أيقونة ⚙ أو زر الخيارات) --- */
[data-theme="arabicref"] .rm-settings{
  position:fixed;top:52px;inset-inline-end:8px;z-index:1400;width:225px;
  background:#1d1117;border:1px solid #d4af3755;border-radius:12px;
  box-shadow:0 18px 50px #000d;padding:5px;
}
[data-theme="arabicref"] .rm-dd-item{
  display:flex;align-items:center;gap:9px;width:100%;min-height:38px;
  background:transparent;border:0;border-radius:8px;color:#e9dce2;font-size:13px;
  cursor:pointer;padding:6px 9px;text-align:start;
}
[data-theme="arabicref"] .rm-dd-item:hover{background:#2a1722;color:#f3d97b}
[data-theme="arabicref"] .rm-dd-item i{font-style:normal;width:20px;text-align:center;flex:0 0 20px}

/* --- قائمة الهامبرغر: 180px تنزلق من اليسار (موضع المرجع الفيزيائي) --- */
[data-theme="arabicref"] .rm-menu-overlay{
  position:fixed;inset:0;z-index:1450;background:#000a;
}
[data-theme="arabicref"] .rm-menu{
  position:fixed;top:0;bottom:0;left:0;z-index:1460;width:180px;
  background:#1d1117f8;border-inline-end:1px solid #4a2a38;
  box-shadow:8px 0 30px #000a;overflow-y:auto;padding:6px 0 12px;
  animation:rmSlideIn .18s ease-out;
}
@keyframes rmSlideIn{from{transform:translateX(-24px);opacity:.4}to{transform:none;opacity:1}}
[data-theme="arabicref"] .rm-mi{
  display:flex;align-items:center;gap:9px;width:100%;min-height:41px;
  background:transparent;border:0;border-bottom:1px solid #2c1a24;
  color:#e9dce2;font-size:13px;cursor:pointer;padding:10px 12px;text-align:start;
}
[data-theme="arabicref"] .rm-mi:hover{background:#2a1722;color:#f3d97b}
[data-theme="arabicref"] .rm-mi i{font-style:normal;width:20px;text-align:center;flex:0 0 20px;font-size:14px}
[data-theme="arabicref"] .rm-mi .rm-arrow{margin-inline-start:auto;font-style:normal;color:#8d7480;font-size:15px}
[data-theme="arabicref"] .rm-mi.rm-has-sub{color:#f3d97b}
[data-theme="arabicref"] .rm-sub{background:#160c11}
[data-theme="arabicref"] .rm-sub-item{
  display:flex;align-items:center;gap:9px;width:100%;min-height:37px;
  background:transparent;border:0;border-bottom:1px solid #221420;
  color:#d8b9c6;font-size:12.5px;cursor:pointer;padding:8px 12px 8px 24px;text-align:start;
}
[data-theme="arabicref"] .rm-sub-item:hover{color:#f3d97b;background:#241521}
[data-theme="arabicref"] .rm-sub-item i{font-style:normal;width:18px;text-align:center}
/* ألوان نقاط الحالة: أخضر/برتقالي/أحمر (عرض فقط حتى تفعيل Backend الحالة) */
[data-theme="arabicref"] .rm-state-متصل i{color:#4caf50}
[data-theme="arabicref"] .rm-state-بعيد i{color:#ff9800}
[data-theme="arabicref"] .rm-state-مشغول i{color:#e0245e}

/* --- شريط البحث الحقيقي (فلترة قائمة المتواجدين) --- */
[data-theme="arabicref"] .rm-searchbar{
  position:fixed;top:54px;inset-inline:0;z-index:1350;display:flex;gap:6px;
  width:min(480px,94vw);margin:0 auto;padding:6px;
  background:#1d1117f5;border:1px solid #d4af3755;border-radius:12px;box-shadow:0 14px 40px #000c;
}
[data-theme="arabicref"] .rm-searchbar input{
  flex:1;background:#241521;border:1px solid #4a2a38;color:#f3e9df;
  border-radius:9px;padding:8px 12px;font-size:13.5px;outline:none;
}
[data-theme="arabicref"] .rm-searchbar input:focus{border-color:#e0245e88}
[data-theme="arabicref"] .rm-search-close{
  width:36px;background:#2a1722;border:1px solid #4a2a38;color:#d8b9c6;border-radius:9px;cursor:pointer;
}
[data-theme="arabicref"] .rm-search-close:hover{color:#f3d97b;border-color:#d4af3788}

/* ===== R5: شارات الهيدر + لوحات الخاص والإشعارات ===== */
[data-theme="arabicref"] .rm-ico-badge{
  position:absolute;top:-5px;inset-inline-start:-5px;min-width:17px;height:17px;
  display:flex;align-items:center;justify-content:center;padding:0 4px;
  background:#e0245e;color:#fff;font-size:10px;font-weight:800;font-style:normal;
  border-radius:999px;border:1px solid #ffd7e0;box-shadow:0 2px 6px #000a;
}
[data-theme="arabicref"] .rm-ico-badge.hidden{display:none}
[data-theme="arabicref"] .rm-r5panel{
  position:fixed;top:52px;inset-inline-start:8px;z-index:1400;width:300px;max-width:94vw;
  max-height:min(60vh,460px);overflow-y:auto;
  background:#1d1117;border:1px solid #d4af3755;border-radius:12px;
  box-shadow:0 18px 50px #000d;padding:6px;
}
[data-theme="arabicref"] .rm-r5-hd{
  display:flex;align-items:center;justify-content:space-between;
  padding:6px 8px;border-bottom:1px solid #2c1a24;color:#f3d97b;font-weight:800;font-size:13.5px;
}
[data-theme="arabicref"] .rm-r5-x{
  width:26px;height:26px;background:#2a1722;border:1px solid #4a2a38;border-radius:7px;
  color:#d8b9c6;cursor:pointer;font-size:12px;line-height:1;
}
[data-theme="arabicref"] .rm-r5-x:hover{color:#f3d97b;border-color:#d4af3788}
[data-theme="arabicref"] .rm-r5-sec{padding:7px 8px 3px;color:#d4af37;font-size:11.5px;font-weight:700;letter-spacing:.3px}
[data-theme="arabicref"] .rm-r5-empty{padding:6px 10px 10px;color:#8d7480;font-size:12px}
[data-theme="arabicref"] .rm-r5-msg{padding:12px;color:#d8b9c6;font-size:12.5px;text-align:center}
[data-theme="arabicref"] .rm-r5-row{
  display:flex;align-items:center;gap:7px;padding:7px 9px;border-radius:9px;
  color:#e9dce2;font-size:12.5px;cursor:pointer;
}
[data-theme="arabicref"] .rm-r5-row:hover{background:#2a1722}
[data-theme="arabicref"] .rm-r5-row.unread{background:#2a1219;border:1px solid #e0245e44}
[data-theme="arabicref"] .rm-r5-nm{color:#f3d97b;font-weight:700;cursor:pointer;white-space:nowrap}
[data-theme="arabicref"] .rm-r5-nm:hover{text-decoration:underline}
[data-theme="arabicref"] .rm-r5-tx{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#d8b9c6}
[data-theme="arabicref"] .rm-r5-ts{color:#8d7480;font-size:10.5px;white-space:nowrap}
[data-theme="arabicref"] .rm-r5-un{
  flex:0 0 auto;min-width:18px;height:18px;display:flex;align-items:center;justify-content:center;
  padding:0 4px;background:#e0245e;color:#fff;font-size:10px;font-weight:800;border-radius:999px;
}
[data-theme="arabicref"] .rm-r5-row i{font-style:normal;flex:0 0 auto}
[data-theme="arabicref"] .rm-r5-btn{
  flex:0 0 auto;min-height:26px;padding:2px 9px;border-radius:999px;font-size:11.5px;font-weight:700;
  background:#2a1722;border:1px solid #4a2a38;color:#e9dce2;cursor:pointer;
}
[data-theme="arabicref"] .rm-r5-btn.ok{background:#123a24;border-color:#2fa76a;color:#b9ecd0}
[data-theme="arabicref"] .rm-r5-btn.ok:hover{background:#17502e}
[data-theme="arabicref"] .rm-r5-btn.warn{background:#3a1418;border-color:#e0245e77;color:#ffc4cf}
[data-theme="arabicref"] .rm-r5-btn.warn:hover{background:#4d1a20}
[data-theme="arabicref"] .rm-r5-mark{
  width:calc(100% - 16px);margin:4px 8px 8px;min-height:32px;border-radius:9px;
  background:#2a1722;border:1px solid #d4af3755;color:#f3d97b;font-size:12px;font-weight:700;cursor:pointer;
}
[data-theme="arabicref"] .rm-r5-mark:hover{border-color:#d4af3788}

/* --- شريط التنقل السفلي: 46px ثابت بأزرار المرجع الأربعة (Desktop + جوال) --- */
[data-theme="arabicref"] #rmNav{
  position:fixed;bottom:0;inset-inline:0;z-index:1200;display:flex;height:46px;
  background:#180d13f5;border-top:1px solid #3a2430;backdrop-filter:blur(8px);
  padding-bottom:env(safe-area-inset-bottom,0);
}
[data-theme="arabicref"] #rmNav .rm-nav-btn{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;
  background:transparent;border:0;color:#8d7480;font-size:9.5px;cursor:pointer;padding:3px 0;
}
[data-theme="arabicref"] #rmNav .rm-nav-btn i{font-style:normal;font-size:16px;line-height:1}
[data-theme="arabicref"] #rmNav .rm-nav-btn:hover,
[data-theme="arabicref"] #rmNav .rm-nav-btn:active{color:#f3d97b}
@media(max-width:640px){
  [data-theme="arabicref"] .rm-status{font-size:11px}
  [data-theme="arabicref"] .rm-brand{font-size:12.5px}
  [data-theme="arabicref"] .rm-ico{width:29px;height:29px;font-size:13.5px}
}

/* ===== 11) صفحة الافتتاح (Landing) ===== */
[data-theme="arabicref"] body:has(.lp-page:not(.hidden)){
  background:linear-gradient(160deg,#120a0e,#1d1016 45%,#4a0f22);
}
[data-theme="arabicref"] .lp-hdr{background:#120a0ef0;border-bottom-color:#d4af3755;box-shadow:0 6px 24px #0008}
[data-theme="arabicref"] .lp-brand .lp-heart{
  background:radial-gradient(circle at 35% 30%,#ff5c8a,#b3123f);color:#fff;
  box-shadow:0 0 14px #e0245e88;border-radius:50%;
}
[data-theme="arabicref"] .lp-hero-copy h1 em{
  background:linear-gradient(90deg,#f3d97b,#e0245e);-webkit-background-clip:text;background-clip:text;
}
[data-theme="arabicref"] .lp-kicker{background:#d4af371f;border-color:#d4af3755}
[data-theme="arabicref"] .lp-nav a.cta{background:linear-gradient(135deg,#d4af37,#8a5a17);color:#241708}
[data-theme="arabicref"] .lp-chip{background:#ffffff0a}
[data-theme="arabicref"] .lp-feat .lp-ic{background:#e0245e1a;border-color:#e0245e44}
[data-theme="arabicref"] .lp-feat:hover{border-color:#e0245e66}
[data-theme="arabicref"] .lp-btn-login{background:linear-gradient(135deg,#e0245e,#8a1038);box-shadow:0 10px 24px #e0245e44}
[data-theme="arabicref"] .lp-lc-badge{background:linear-gradient(135deg,#e0245e,#8a1038);box-shadow:0 10px 24px #e0245e55}
[data-theme="arabicref"] .login-card{border-top:4px solid #d4af37}
[data-theme="arabicref"] .login-card input:focus{border-color:#e0245e;box-shadow:0 0 0 4px #e0245e22}
[data-theme="arabicref"] .lp-ftr{border-top-color:#d4af3733}

/* ===== 12) إمكانية الوصول ===== */
@media (prefers-reduced-motion:reduce){
  [data-theme="arabicref"] .brand{animation:none}
}

/* ===== 13) صفوف المتواجدين — إعادة بناء على هيئة المرجع:
       صورة بإطار الرتبة يمين + اسم ملون بسطر فرعي + شارة الرتبة + علم صورة في الطرف الآخر ===== */
[data-theme="arabicref"] .rm-row{
  flex-wrap:wrap;align-items:center;gap:0 4px;border-radius:9px;margin:2px 4px;padding:4px 7px;min-height:46px;
}
/* إطار الصورة حسب الرتبة/الفئة */
[data-theme="arabicref"] .rm-row .avatar{border-width:2px;border-style:solid;border-radius:50%}
[data-theme="arabicref"] .rm-banner-row .avatar,
[data-theme="arabicref"] .rm-row.rm-role-owner .avatar{border-color:#d4af37;box-shadow:0 0 10px #d4af3766}
[data-theme="arabicref"] .rm-row.rm-role-admin .avatar{border-color:#c9a227}
[data-theme="arabicref"] .rm-row.rm-tier-8 .avatar{border-color:#ffd76a}
[data-theme="arabicref"] .rm-row.rm-tier-7 .avatar{border-color:#e5e4e2}
[data-theme="arabicref"] .rm-row.rm-tier-6 .avatar{border-color:#b9f2ff}
[data-theme="arabicref"] .rm-row.rm-tier-5 .avatar{border-color:#50c878}
[data-theme="arabicref"] .rm-row.rm-tier-4 .avatar{border-color:#9966cc}
[data-theme="arabicref"] .rm-row.rm-tier-3 .avatar{border-color:#ff5c8a}
[data-theme="arabicref"] .rm-row.rm-tier-2 .avatar{border-color:#d4af3766}
[data-theme="arabicref"] .rm-row.rm-tier-1 .avatar{border-color:#c0c0c0}
[data-theme="arabicref"] .rm-row.rm-role-mod .avatar{border-color:#3fb6a8}
/* بنرات الرتب: الإدارة العليا = خمري/ذهبي، الأثرياء (tier 8) = ذهبي، كبار الشخصيات (6-7) = ملكي بنفسجي */
[data-theme="arabicref"] .rm-banner-row{
  background:linear-gradient(90deg,#33200f,#1d1117 70%);border:1px solid #6b4d17;border-radius:9px;
}
[data-theme="arabicref"] .rm-banner-row.rm-role-owner{background:linear-gradient(90deg,#3a2410,#241019 65%);border-color:#d4af37aa;box-shadow:0 0 14px #d4af3733}
[data-theme="arabicref"] .rm-banner-row .user-name{font-weight:900}
[data-theme="arabicref"] .rm-row.rm-tier-8{
  background:linear-gradient(90deg,#2d2208,#1d1117 75%);border:1px solid #8a6d1d;border-radius:9px;
}
[data-theme="arabicref"] .rm-row.rm-tier-7,
[data-theme="arabicref"] .rm-row.rm-tier-6{
  background:linear-gradient(90deg,#241026,#1d1117 78%);border:1px solid #4a2a5a;border-radius:9px;
}
/* علم الدولة — صورة من الحزمة المحلية في الطرف المقابل للصورة */
[data-theme="arabicref"] .rm-flag-img{
  width:20px;height:15px;object-fit:cover;border-radius:2.5px;margin-inline-start:auto;flex:0 0 auto;
  box-shadow:0 0 0 1px #000a,0 0 5px #0008;order:5;
}
/* السطر الفرعي: الرتبة/الفئة/الحالة — من البيانات الحقيقية فقط */
[data-theme="arabicref"] .rm-usub{
  order:10;flex-basis:100%;font-size:10px;color:#8d7480;margin-top:1px;
  padding-inline-start:42px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
/* ألوان أسماء الفئات حسب tier (بدون تجاوز صبغة/لون اسم صريح) */
[data-theme="arabicref"] .rm-row.rm-tier-8 .user-name{text-shadow:0 0 8px #ffd76a55}
[data-theme="arabicref"] .rm-row.rm-tier-6 .user-name,
[data-theme="arabicref"] .rm-row.rm-tier-7 .user-name{text-shadow:0 0 6px #b9f2ff44}
/* ترويسات المجموعات: أثرياء/كبار الشخصيات/فئات مميزة */
[data-theme="arabicref"] .rm-ugroup-h{display:flex;align-items:center;gap:6px;color:#caa64d;font-size:10.5px}
[data-theme="arabicref"] .rm-ugroup-h::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,#d4af3744,transparent)}

/* ===== R2 — تدرجات صفوف المتواجدين على هيئة المرجع (بيانات موجودة فقط) ===== */
/* صف المالك: تدرج عمودي كحلي→أحمر→ذهبي + ارتفاع 60px */
[data-theme="arabicref"] .rm-row.rm-banner-row.rm-role-owner{
  min-height:60px;
  background:linear-gradient(180deg,#1b2440 0%,#4a1024 55%,#6b4d17 130%);
  border-color:#d4af37cc;box-shadow:0 0 16px #d4af3733;
}
[data-theme="arabicref"] .rm-row.rm-banner-row.rm-role-owner .user-name{color:#ffe9b0;text-shadow:0 1px 3px #000a}
/* صف الإدارة: تدرج أسود→أخضر داكن→أسود */
[data-theme="arabicref"] .rm-row.rm-banner-row.rm-role-admin{
  min-height:54px;
  background:linear-gradient(180deg,#0c120c 0%,#12281a 50%,#0c120c 100%);
  border-color:#2e5c3a;
}
[data-theme="arabicref"] .rm-row.rm-banner-row.rm-role-admin .user-name{color:#c8f0d2;text-shadow:0 1px 3px #000a}
/* تدرجات الفئات 1-5 (كانت بلا خلفية صف): ألوان مميزة خفيفة تحافظ على هوية tier */
[data-theme="arabicref"] .rm-row.rm-tier-1{background:linear-gradient(90deg,#241d20,#1d1117 78%);border:1px solid #4a4048;border-radius:9px}
[data-theme="arabicref"] .rm-row.rm-tier-2{background:linear-gradient(90deg,#28221a,#1d1117 78%);border:1px solid #6b5a2a;border-radius:9px}
[data-theme="arabicref"] .rm-row.rm-tier-3{background:linear-gradient(90deg,#2b1a24,#1d1117 78%);border:1px solid #7a2a4a;border-radius:9px}
[data-theme="arabicref"] .rm-row.rm-tier-4{background:linear-gradient(90deg,#221a2b,#1d1117 78%);border:1px solid #4a3a6b;border-radius:9px}
[data-theme="arabicref"] .rm-row.rm-tier-5{background:linear-gradient(90deg,#16241d,#1d1117 78%);border:1px solid #2a5c42;border-radius:9px}
/* صف الصبغة المخصصة: الخلفية تأتي inline من ألوان الصبغة الحقيقية — هنا الإطار والشكل فقط */
[data-theme="arabicref"] .rm-row.rm-dye-row{border:1px solid #4a2a38;border-radius:9px}
[data-theme="arabicref"] .rm-row.rm-dye-row .avatar{border-color:#c2577d}

/* ===== 14) بطاقة العضو — مطابقة قياسات المرجع الحقيقية:
       غلاف 300px + كتلة الهوية (صورة+رتبة+اسم) داخل أسفل الغلاف نفسه
       (identity y=200..288 من الغلاف، الصورة تنتهي قبل حافة الغلاف بـ8px)
       ثم صفوف معلومات على أسود بفواصل رقيقة ===== */
[data-theme="arabicref"] #memberCardModal .member-card{
  width:min(430px,94vw);background:#0b0709;color:#f3e9df;
  border:1px solid #d4af3744;border-radius:16px;overflow:hidden;
  box-shadow:0 0 0 1px #000a,0 18px 60px #000d,0 0 46px #d4af3718;
  padding:0;
}
[data-theme="arabicref"] #memberCardModal .mc-shimmer{display:none}
/* الغلاف 300px بزوايا علوية مستديرة (كالمرجع) */
[data-theme="arabicref"] #memberCardModal .mc-banner{
  height:300px;border-radius:0;border-bottom:0;background-size:cover;background-position:center;position:relative;
}
[data-theme="arabicref"] #memberCardModal .mc-banner::after{
  content:"";position:absolute;inset-inline:0;bottom:0;height:110px;
  background:linear-gradient(180deg,transparent,#0b0709cc 78%,#0b0709);
  pointer-events:none;
}
[data-theme="arabicref"] #memberCardModal .mc-banner-pattern{opacity:.35}
/* زر الإغلاق أعلى اليسار والصوت أعلى اليمين — مواضع المرجع */
[data-theme="arabicref"] #memberCardModal .mc-close{
  position:absolute;top:10px;inset-inline-end:10px;z-index:6;
  width:30px;height:30px;border-radius:50%;border:0;background:#000000a6;color:#fff;font-size:15px;
}
[data-theme="arabicref"] #memberCardModal .mc-audio{
  position:absolute;top:10px;inset-inline-start:10px;z-index:6;margin:0;
  width:30px;height:30px;border-radius:50%;border:0;background:#000000a6;color:#ffc4cf;font-size:15px;
}
/* الإطار: كتلة نسبية — الهوية مطلقة داخل أسفل الغلاف كالمرجع */
[data-theme="arabicref"] #memberCardModal .mc-frame{
  display:block;position:relative;
  padding:0 14px 14px;background:transparent;border:0;
}
/* الصورة: أسفل الغلاف -8px (top = 300-96-8 = 196 من الغلاف = -110 من بداية الإطار) */
[data-theme="arabicref"] #memberCardModal .mc-avatar-wrap{
  position:absolute;top:-110px;inset-inline-start:16px;z-index:3;
  width:96px;height:96px;margin:0;
}
[data-theme="arabicref"] #memberCardModal .mc-crown{display:none}
[data-theme="arabicref"] #memberCardModal .mc-avatar{
  width:96px;height:96px;object-fit:cover;background:#1a1013;
  border:3px solid #ffffff33;border-radius:50%;
  box-shadow:0 0 0 2px #d4af3788,0 0 20px #d4af3740;
}
[data-theme="arabicref"] #memberCardModal .mc-online-dot{
  width:12px;height:12px;border:2px solid #0b0709;bottom:4px;inset-inline-end:4px;z-index:4;
}
/* الرتبة والاسم والحساب: داخل الغلاف في المساحة يسار الصورة، سطر فوق سطر */
[data-theme="arabicref"] #memberCardModal .mc-role{
  position:absolute;top:-96px;inset-inline-start:128px;inset-inline-end:14px;z-index:3;
  text-align:center;font-size:13px;font-weight:800;color:#f3d97b;letter-spacing:.3px;
  border:0;background:transparent;padding:0;margin:0;
  text-shadow:0 1px 6px #000c;
}
[data-theme="arabicref"] #memberCardModal .mc-name{
  position:absolute;top:-78px;inset-inline-start:128px;inset-inline-end:14px;z-index:3;
  text-align:center;padding:0;margin:0;
  font-size:24px;font-weight:900;color:#f3d97b;line-height:1.35;
  text-shadow:0 1px 8px #000d;
}
[data-theme="arabicref"] #memberCardModal .mc-username{
  position:absolute;top:-42px;inset-inline-start:128px;inset-inline-end:14px;z-index:3;
  text-align:center;color:#e8dce2;font-size:11.5px;margin:0;
  text-shadow:0 1px 6px #000c;
}
/* سطر الاشتراك: أول سطر بعد الغلاف بعرض كامل */
[data-theme="arabicref"] #memberCardModal .mc-sub,
[data-theme="arabicref"] #memberCardModal .mc-sub-end{
  text-align:center;font-size:11.5px;color:#caa64d;margin:8px 0 0;
}
[data-theme="arabicref"] #memberCardModal .mc-sub-end{color:#9b7f8b}
/* البقية بعرض كامل أسفل الغلاف */
[data-theme="arabicref"] #memberCardModal .mc-bio,
[data-theme="arabicref"] #memberCardModal .mc-statusline,
[data-theme="arabicref"] #memberCardModal .mc-social,
[data-theme="arabicref"] #memberCardModal .mc-stats,
[data-theme="arabicref"] #memberCardModal .mc-actions,
[data-theme="arabicref"] #memberCardModal .mc-editbtn{
  margin-top:10px;
}
[data-theme="arabicref"] #memberCardModal .mc-bio{
  color:#d8b9c6;font-size:12.5px;padding:8px 2px 2px;text-align:start;
}
[data-theme="arabicref"] #memberCardModal .mc-statusline{
  color:#ff5c8a;font-size:12.5px;text-align:center;padding:2px 0 4px;font-weight:700;
}
/* صفوف المعلومات بفواصل رقيقة — التسمية يمين والقيمة يسار (قياس المرجع: صف ~34px) */
[data-theme="arabicref"] #memberCardModal .mc-info{
  background:transparent;border:0;border-radius:0;padding:4px 0 0;margin:6px 0 0;
}
[data-theme="arabicref"] #memberCardModal .mc-info-row{
  display:flex;justify-content:space-between;align-items:center;gap:8px;
  min-height:34px;padding:6px 2px;border-bottom:1px solid #ffffff12;font-size:13px;border-radius:0;background:transparent;
}
[data-theme="arabicref"] #memberCardModal .mc-info-row:last-child{border-bottom:0}
[data-theme="arabicref"] #memberCardModal .mc-info-row span{color:#f0eaee;font-weight:800}
[data-theme="arabicref"] #memberCardModal .mc-info-row b{color:#b9aab2;font-weight:400;direction:ltr;unicode-bidi:plaintext}
[data-theme="arabicref"] #memberCardModal .mc-info-row.mc-link b{color:#8fb6d9;cursor:pointer}
/* علم صورة صغير داخل قيمة الدولة */
[data-theme="arabicref"] #memberCardModal .mc-info-row b .rm-flag-img,
[data-theme="arabicref"] #memberCardModal .mc-flag-inline{
  width:19px;height:14px;object-fit:cover;border-radius:2.5px;margin-inline-end:6px;vertical-align:-2px;
  box-shadow:0 0 0 1px #000a;
}
/* شارة العلم بجانب الاسم — صورة */
[data-theme="arabicref"] #memberCardModal .rm-card-flag{
  width:21px;height:16px;object-fit:cover;border-radius:3px;margin-inline-start:8px;vertical-align:-2px;
  box-shadow:0 0 0 1px #000a,0 0 6px #d4af3733;
}
/* الإحصائيات شرائح داكنة */
[data-theme="arabicref"] #memberCardModal .mc-stats{
  display:flex;gap:6px;margin-top:8px;
}
[data-theme="arabicref"] #memberCardModal .mc-stat{
  flex:1;background:#150c11;border:1px solid #2c1a24;border-radius:8px;padding:6px 2px;text-align:center;
}
[data-theme="arabicref"] #memberCardModal .mc-stat b{display:block;color:#f3d97b;font-size:12.5px}
[data-theme="arabicref"] #memberCardModal .mc-stat span{color:#8d7480;font-size:9.5px}
[data-theme="arabicref"] #memberCardModal #mcJoined{font-size:10.5px;line-height:1.5}
/* الأزرار */
[data-theme="arabicref"] #memberCardModal .mc-actions{display:flex;gap:6px;margin-top:10px}
[data-theme="arabicref"] #memberCardModal .mc-btn{
  background:linear-gradient(135deg,#e0245e,#8a1038);color:#fff;border:0;border-radius:9px;
  font-size:12px;padding:8px 10px;font-weight:700;
}
[data-theme="arabicref"] #memberCardModal .mc-btn.mc-block,
[data-theme="arabicref"] #memberCardModal .mc-btn.mc-report{background:#241521;border:1px solid #4a2a38;color:#d8b9c6}
[data-theme="arabicref"] #memberCardModal .mc-btn.mc-like{background:#241521;border:1px solid #d4af3755;color:#f3d97b}
[data-theme="arabicref"] #memberCardModal .mc-editbtn{
  margin-top:8px;background:#2a1722;border:1px dashed #d4af3766;color:#f3d97b;border-radius:9px;font-size:12px;
}

/* ===== R3 — شريط الكتابة المطابق: شريط 46px + كبسولة 38px + إيموجي داخل الحقل + إرسال دائري ===== */
[data-theme="arabicref"] .composer .input-bar{
  position:relative;height:46px;padding:0 6px;gap:8px;align-items:center;
  background:transparent;border:none;box-shadow:none;border-radius:0;
}
[data-theme="arabicref"] .composer .input-bar:focus-within{border:none;box-shadow:none}
[data-theme="arabicref"] .composer #messageInput{
  min-height:38px;max-height:38px;border-radius:100px;font-size:18px;font-weight:700;
  padding:0 16px;padding-inline-end:48px;
  display:flex;align-items:center;overflow-y:auto;overflow-x:hidden;
  background:#241318;border:1px solid #3a2430;color:#f3d9de;
  transition:border-color .15s,box-shadow .15s;
}
[data-theme="arabicref"] .composer #messageInput:focus{border-color:#e0245e;box-shadow:0 0 0 3px #e0245e22;outline:none}
[data-theme="arabicref"] .composer #messageInput:empty::before{content:attr(data-placeholder);color:#8a6b76;pointer-events:none}
[data-theme="arabicref"] .composer #emojiToggle{
  position:absolute;inset-inline-end:54px;top:50%;transform:translateY(-50%);
  width:32px;height:32px;border-radius:50%;padding:0;margin:0;
  background:transparent;border:none;font-size:18px;line-height:1;opacity:.92;z-index:2;
}
[data-theme="arabicref"] .composer #emojiToggle:hover{background:#e0245e22}
[data-theme="arabicref"] .composer .input-bar .send{
  width:38px;height:38px;min-width:38px;padding:0;border-radius:50%;border:none;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#e0245e,#8a1e46);color:#fff;
  box-shadow:0 2px 8px #000a;
}
[data-theme="arabicref"] .composer .input-bar .send:hover{filter:brightness(1.12)}
[data-theme="arabicref"] .composer .input-bar .send svg{display:block}
/* صف التنسيق: أزرار دائرية مدمجة متناسقة مع الهوية */
[data-theme="arabicref"] .composer .format-row{gap:4px;margin-bottom:7px}
[data-theme="arabicref"] .composer .format-row button,
[data-theme="arabicref"] .composer .format-row .color-tool{
  min-width:28px;height:28px;padding:0 8px;border-radius:999px;
  background:#241318;border:1px solid #3a2430;color:#e8ccd4;
  font-size:12px;display:inline-flex;align-items:center;justify-content:center;gap:3px;
}
[data-theme="arabicref"] .composer .format-row button:hover{border-color:#e0245e88;color:#fff}
[data-theme="arabicref"] .composer .format-row select{height:28px;border-radius:999px;background:#241318;border:1px solid #3a2430;color:#e8ccd4;padding:0 8px;font-size:12px}
[data-theme="arabicref"] .composer .format-row .hint{color:#8a6b76}
[data-theme="arabicref"] .composer .format-row .rm-m9-fbtn{color:#f3d97b;border-color:#6b5a2a;font-weight:800}
[data-theme="arabicref"] .composer .format-row .rm-m9-fbtn:hover{border-color:#d4af37;color:#ffe9b0}

/* نافذة الإيموجي المطابقة: 456×222 بتبويبات (إيموجي + ملصقات مصورة حقيقية) */
[data-theme="arabicref"] .emoji-panel.rm-emoji-win{
  flex-direction:column!important;flex-wrap:nowrap!important;
  width:min(456px,calc(100vw - 16px));height:222px;padding:8px;gap:6px;
  background:#1d1117;border:1px solid #3a2430;border-radius:14px;
}
[data-theme="arabicref"] .emoji-panel.rm-emoji-win .rm-emoji-tabs{display:flex;gap:6px;flex:0 0 auto}
[data-theme="arabicref"] .emoji-panel.rm-emoji-win .rm-emoji-tab{
  padding:4px 14px;border-radius:999px;font-size:12px;font-weight:700;cursor:pointer;
  background:#241318;border:1px solid #3a2430;color:#c9aeb9;
}
[data-theme="arabicref"] .emoji-panel.rm-emoji-win .rm-emoji-tab.active{background:#e0245e;border-color:#ff7ba0;color:#fff}
[data-theme="arabicref"] .emoji-panel.rm-emoji-win .rm-emoji-pane{flex:1 1 auto;min-height:0;overflow-y:auto}
[data-theme="arabicref"] .emoji-panel.rm-emoji-win .rm-emoji-pane-emo{display:grid;grid-template-columns:repeat(auto-fill,minmax(38px,1fr));gap:4px;align-content:start}
[data-theme="arabicref"] .emoji-panel.rm-emoji-win .rm-emoji-pane-sti.hidden{display:none}
[data-theme="arabicref"] .emoji-panel.rm-emoji-win .emo-stickers{margin:0}
[data-theme="arabicref"] .emoji-panel.rm-emoji-win .emo-stickers-hd{color:#caa64d;font-size:11px;font-weight:800;margin:2px 2px 6px}
[data-theme="arabicref"] .emoji-panel.rm-emoji-win:not(.has-stickers) .rm-emoji-pane-sti{color:#8a6b76;font-size:11px}

/* M9 — لوحة 24 لونًا للنص (لون الاسم المحفوظ = R4) */
[data-theme="arabicref"] .rm-m9{
  position:fixed;inset:0;z-index:300;display:flex;align-items:center;justify-content:center;
  background:rgba(0,0,0,.5);
}
[data-theme="arabicref"] .rm-m9.hidden{display:none}
[data-theme="arabicref"] .rm-m9-box{
  width:min(400px,92vw);background:#1d1117;border:1px solid #3a2430;border-radius:14px;
  padding:12px;box-shadow:0 18px 50px #000c;
}
[data-theme="arabicref"] .rm-m9-hd{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
[data-theme="arabicref"] .rm-m9-hd span{color:#f3d97b;font-weight:800;font-size:13px}
[data-theme="arabicref"] .rm-m9-x{width:26px;height:26px;border-radius:50%;background:#241318;border:1px solid #3a2430;color:#c9aeb9;cursor:pointer;font-size:12px}
[data-theme="arabicref"] .rm-m9-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}
[data-theme="arabicref"] .rm-m9-sw{height:36px;border-radius:8px;border:1px solid #00000055;cursor:pointer;box-shadow:inset 0 1px 2px #ffffff22}
[data-theme="arabicref"] .rm-m9-sw:hover{transform:scale(1.08);border-color:#f3d97b}
[data-theme="arabicref"] .rm-m9-sw:active{transform:scale(.96)}

/* R4 — تبويبات ملفي: معلوماتي/الأصدقاء/تجاهل/خيارات/المزيد (البطاقة الخاصة فقط) */
[data-theme="arabicref"] .member-card.rm-tabbed:not(.rm-tab-info) .mc-info,
[data-theme="arabicref"] .member-card.rm-tabbed:not(.rm-tab-info) .mc-social,
[data-theme="arabicref"] .member-card.rm-tabbed:not(.rm-tab-info) .mc-actions,
[data-theme="arabicref"] .member-card.rm-tabbed:not(.rm-tab-info) .mc-editbtn,
[data-theme="arabicref"] .member-card.rm-tabbed:not(.rm-tab-info) .mc-edit{display:none}
[data-theme="arabicref"] .rm-ptabs{
  display:flex;gap:4px;margin-top:12px;width:100%;
  background:#1d1117;border:1px solid #3a2430;border-radius:12px;padding:4px;
}
[data-theme="arabicref"] .rm-ptab{
  flex:1 1 0;min-width:0;padding:6px 4px;border-radius:8px;border:none;cursor:pointer;
  background:transparent;color:#c9aeb9;font-size:11px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
[data-theme="arabicref"] .rm-ptab:hover{color:#fff;background:#241318}
[data-theme="arabicref"] .rm-ptab.active{background:linear-gradient(135deg,#e0245e,#8a1e46);color:#fff;box-shadow:0 2px 8px #0008}
[data-theme="arabicref"] .rm-ppanel{
  width:100%;margin-top:8px;background:#1d1117;border:1px solid #3a2430;border-radius:12px;
  padding:10px;display:flex;flex-direction:column;gap:8px;max-height:300px;overflow-y:auto;
}
[data-theme="arabicref"] .rm-ppanel.hidden{display:none}
[data-theme="arabicref"] .rm-pp-hd{color:#f3d97b;font-weight:800;font-size:12px;margin:2px 0 0}
[data-theme="arabicref"] .rm-pp-hd.rm-pp-danger{color:#ff7b8f}
[data-theme="arabicref"] .rm-pp-note{color:#8a6b76;font-size:11px;line-height:1.6}
[data-theme="arabicref"] .rm-pp-msg{color:#c9aeb9;font-size:12px;text-align:center;padding:8px 0}
[data-theme="arabicref"] .rm-pp-msg2{color:#ff9db1;font-size:11px;min-height:14px;word-break:break-word}
[data-theme="arabicref"] .rm-pp-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
[data-theme="arabicref"] .rm-pp-lb{color:#e8ccd4;font-size:11.5px}
[data-theme="arabicref"] .rm-pp-sel{
  background:#241318;border:1px solid #3a2430;border-radius:8px;color:#f3d9de;
  font-size:11.5px;padding:5px 8px;max-width:58%;
}
[data-theme="arabicref"] .rm-pp-chk{display:flex;align-items:center;gap:6px;color:#e8ccd4;font-size:11.5px;cursor:pointer}
[data-theme="arabicref"] .rm-pp-chk input{accent-color:#e0245e}
[data-theme="arabicref"] .rm-pp-inp{
  width:100%;box-sizing:border-box;background:#241318;border:1px solid #3a2430;border-radius:8px;
  color:#f3d9de;font-size:12px;padding:7px 10px;
}
[data-theme="arabicref"] .rm-pp-inp:focus{border-color:#e0245e;outline:none}
[data-theme="arabicref"] .rm-pp-save{
  padding:7px 12px;border-radius:8px;border:none;cursor:pointer;font-size:12px;font-weight:700;
  background:linear-gradient(135deg,#e0245e,#8a1e46);color:#fff;
}
[data-theme="arabicref"] .rm-pp-save:hover{filter:brightness(1.12)}
[data-theme="arabicref"] .rm-pp-delbtn{background:linear-gradient(135deg,#a11230,#5c0a1c)}
[data-theme="arabicref"] .rm-fr-item{
  display:flex;align-items:center;gap:8px;background:#241318;border:1px solid #3a2430;
  border-radius:10px;padding:6px 8px;
}
[data-theme="arabicref"] .rm-fr-avw{flex:0 0 auto}
[data-theme="arabicref"] .rm-fr-av{width:30px;height:30px;border-radius:50%;object-fit:cover;display:block;border:1px solid #3a2430}
[data-theme="arabicref"] .rm-fr-avph{display:flex;align-items:center;justify-content:center;background:#3a2430;color:#e8ccd4;font-size:13px;font-weight:800}
[data-theme="arabicref"] .rm-fr-nm{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#f3e2e6;font-size:12px;font-weight:600}
[data-theme="arabicref"] .rm-fr-on{width:8px;height:8px;border-radius:50%;background:#2fdc84;display:inline-block;margin-inline-start:6px;box-shadow:0 0 6px #2fdc8488}
[data-theme="arabicref"] .rm-fr-btn{
  flex:0 0 auto;padding:4px 9px;border-radius:999px;border:1px solid #3a2430;cursor:pointer;
  background:#1d1117;color:#c9aeb9;font-size:10.5px;font-weight:700;white-space:nowrap;
}
[data-theme="arabicref"] .rm-fr-btn:hover{border-color:#e0245e88;color:#fff}
[data-theme="arabicref"] .rm-fr-btn.ok{background:linear-gradient(135deg,#e0245e,#8a1e46);border-color:transparent;color:#fff}
[data-theme="arabicref"] .rm-fr-btn.warn:hover{border-color:#ff7b8f;color:#ff9db1}
[data-theme="arabicref"] .rm-fr-empty{color:#8a6b76;font-size:11px;text-align:center;padding:2px 0}
/* لون الاسم المحفوظ: شبكة 24 لونًا */
[data-theme="arabicref"] .rm-nc-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:6px}
[data-theme="arabicref"] .rm-nc-sw{height:26px;border-radius:6px;border:2px solid #00000055;cursor:pointer;box-shadow:inset 0 1px 2px #ffffff22}
[data-theme="arabicref"] .rm-nc-sw:hover{transform:scale(1.1);border-color:#f3d97b}
[data-theme="arabicref"] .rm-nc-sw.cur{border-color:#f3d97b;box-shadow:0 0 0 2px #f3d97b66}
[data-theme="arabicref"] .rm-nc-clear{background:#241318;border:1px solid #3a2430;color:#e8ccd4}
/* زر الصداقة في بطاقات الآخرين */
[data-theme="arabicref"] .rm-fbtn{font-size:11.5px}

/* ============================================================
   R7 — كبار الشخصيات والأثرياء والاقتصاد (أصول أصلية بنا)
   لوحتا Top + متجر الهدايا + الإطارات + الأوسمة + نقاطي
   ============================================================ */
/* لوحة Top / متجر الهدايا — 400×640 على الحاسب كما في المرجع، ملء الشاشة على الجوال */
[data-theme="arabicref"] .rm-top-panel{
  position:fixed;top:56px;inset-inline-start:12px;z-index:1500;width:400px;height:640px;
  max-width:94vw;max-height:calc(100dvh - 70px);overflow:hidden;display:flex;flex-direction:column;
  background:linear-gradient(180deg,#241319,#160d12);border:1px solid #d4af3755;border-radius:14px;
  box-shadow:0 22px 60px #000e,0 0 0 1px #00000066;
}
[data-theme="arabicref"] .rm-top-hd{
  display:flex;align-items:baseline;gap:8px;padding:11px 14px;flex:0 0 auto;
  border-bottom:1px solid #d4af3733;color:#f3d97b;font-weight:800;font-size:15px;
  background:linear-gradient(90deg,#d4af3718,transparent);
}
[data-theme="arabicref"] .rm-top-sub{flex:1 1 auto;color:#b3927f;font-size:10.5px;font-weight:600;font-style:normal}
[data-theme="arabicref"] .rm-top-x{
  flex:0 0 auto;width:28px;height:28px;background:#2a1722;border:1px solid #4a2a38;border-radius:8px;
  color:#d8b9c6;cursor:pointer;font-size:13px;line-height:1;align-self:center;
}
[data-theme="arabicref"] .rm-top-x:hover{color:#f3d97b;border-color:#d4af3788}
[data-theme="arabicref"] .rm-top-body{flex:1 1 auto;overflow-y:auto;padding:8px}
[data-theme="arabicref"] .rm-top-row{
  display:flex;align-items:center;gap:9px;padding:7px 9px;border-radius:10px;cursor:pointer;
  color:#efe3e8;font-size:13px;
}
[data-theme="arabicref"] .rm-top-row:nth-child(even){background:#ffffff08}
[data-theme="arabicref"] .rm-top-row:nth-child(1){background:linear-gradient(90deg,#d4af3726,transparent);border:1px solid #d4af3740}
[data-theme="arabicref"] .rm-top-row:nth-child(2){background:linear-gradient(90deg,#c9ccd422,transparent);border:1px solid #c9ccd433}
[data-theme="arabicref"] .rm-top-row:nth-child(3){background:linear-gradient(90deg,#b0713a22,transparent);border:1px solid #b0713a44}
[data-theme="arabicref"] .rm-top-row:hover{background:#2a1722}
[data-theme="arabicref"] .rm-top-rank{flex:0 0 34px;text-align:center;font-weight:800}
[data-theme="arabicref"] .rm-top-medal{font-size:20px}
[data-theme="arabicref"] .rm-top-num{color:#b3927f;font-size:13px}
[data-theme="arabicref"] .rm-top-av{
  flex:0 0 38px;width:38px;height:38px;border-radius:50%;object-fit:cover;
  border:1px solid #d4af3740;background:#1d1117;
}
[data-theme="arabicref"] .rm-top-avph{
  display:flex;align-items:center;justify-content:center;color:#f3d97b;font-weight:800;font-size:16px;
}
[data-theme="arabicref"] .rm-top-nm{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700;color:#f7ece2}
[data-theme="arabicref"] .rm-top-role{
  flex:0 0 auto;max-width:42%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:10.5px;font-weight:700;color:#b3927f;background:#ffffff0d;border:1px solid #ffffff14;border-radius:999px;padding:2px 8px;
}
[data-theme="arabicref"] .rm-top-role.rm-top-staff{color:#ffd98a;border-color:#d4af3755;background:#d4af3714}
/* متجر الهدايا */
[data-theme="arabicref"] .rm-gift-points{
  padding:6px 9px;margin-bottom:6px;border-radius:9px;background:#d4af3712;border:1px solid #d4af3733;
  color:#e9dce2;font-size:12px;
}
[data-theme="arabicref"] .rm-gift-points b{color:#f3d97b}
[data-theme="arabicref"] .rm-gift-target{
  width:100%;box-sizing:border-box;background:#241318;border:1px solid #3a2430;border-radius:8px;
  color:#f3d9de;font-size:12.5px;padding:8px 10px;margin-bottom:8px;
}
[data-theme="arabicref"] .rm-gift-target:focus{border-color:#e0245e;outline:none}
[data-theme="arabicref"] .rm-gift-row{
  display:flex;align-items:center;gap:9px;padding:8px 9px;border-radius:10px;
  background:#ffffff07;border:1px solid #ffffff0f;margin-bottom:6px;
}
[data-theme="arabicref"] .rm-gift-ico{flex:0 0 30px;font-size:22px;text-align:center}
[data-theme="arabicref"] .rm-gift-nm{flex:1 1 auto;min-width:0;color:#f7ece2;font-weight:700;font-size:13px}
[data-theme="arabicref"] .rm-gift-cost{flex:0 0 auto;color:#f3d97b;font-size:11.5px;font-weight:700}
[data-theme="arabicref"] .rm-gift-btn{
  flex:0 0 auto;padding:5px 12px;border-radius:999px;border:none;cursor:pointer;
  background:linear-gradient(135deg,#e0245e,#8a1e46);color:#fff;font-size:11.5px;font-weight:800;
}
[data-theme="arabicref"] .rm-gift-btn:hover{filter:brightness(1.12)}
[data-theme="arabicref"] .rm-gift-btn:disabled{opacity:.55;cursor:default}
[data-theme="arabicref"] .rm-gift-msg{color:#ff9db1;font-size:11.5px;min-height:16px;padding:2px 4px}
/* الإطارات البصرية حول الصور — غلاف موحّد في القائمة وبطاقة العضو (إسناد إداري فقط) */
[data-theme="arabicref"] .avatar-wrap.rm-frame-gold,
[data-theme="arabicref"] .mc-avatar-wrap.rm-frame-gold{border-radius:50%;box-shadow:0 0 0 2px #d4af37,0 0 9px #d4af3799}
[data-theme="arabicref"] .avatar-wrap.rm-frame-silver,
[data-theme="arabicref"] .mc-avatar-wrap.rm-frame-silver{border-radius:50%;box-shadow:0 0 0 2px #c9ccd4,0 0 8px #c9ccd488}
[data-theme="arabicref"] .avatar-wrap.rm-frame-neon,
[data-theme="arabicref"] .mc-avatar-wrap.rm-frame-neon{border-radius:50%;box-shadow:0 0 0 2px #38d9f5,0 0 10px #38d9f5aa}
[data-theme="arabicref"] .avatar-wrap.rm-frame-glow,
[data-theme="arabicref"] .mc-avatar-wrap.rm-frame-glow{border-radius:50%;box-shadow:0 0 0 2px #e0245e,0 0 12px #e0245e99}
[data-theme="arabicref"] .avatar-wrap.rm-frame-gradient,
[data-theme="arabicref"] .mc-avatar-wrap.rm-frame-gradient{border-radius:50%;box-shadow:0 0 0 2px #e0245e,0 0 0 4px #d4af3755}
[data-theme="arabicref"] .avatar-wrap.rm-frame-royal,
[data-theme="arabicref"] .mc-avatar-wrap.rm-frame-royal{border-radius:50%;box-shadow:0 0 0 2px #f3d97b,0 0 0 4px #8a1e4688,0 0 11px #d4af3788}
/* صف الأوسمة في بطاقة العضو */
[data-theme="arabicref"] .rm-mc-awards{
  display:flex;flex-wrap:wrap;gap:6px;align-items:center;justify-content:center;
  padding:7px 10px;margin:2px 14px 8px;border-radius:10px;
  background:#d4af3710;border:1px solid #d4af3729;
}
[data-theme="arabicref"] .rm-mc-award{font-size:19px;line-height:1;filter:drop-shadow(0 1px 2px #000a);cursor:help}
/* نقاطي في معلوماتي */
[data-theme="arabicref"] .rm-mc-eco{
  padding:8px 10px;margin-top:8px;border-radius:10px;text-align:center;
  background:#d4af3712;border:1px dashed #d4af3744;color:#e9dce2;font-size:12.5px;
}
[data-theme="arabicref"] .rm-mc-eco b{color:#f3d97b}
[data-theme="arabicref"] .rm-mc-giftlog{
  padding:6px 10px;margin-top:6px;border-radius:9px;color:#b3927f;font-size:11px;line-height:1.7;
  background:#ffffff06;border:1px solid #ffffff0f;
}
[data-theme="arabicref"] .rm-gbtn{font-size:11.5px}
/* الجوال: لوحتا Top ملء الشاشة */
@media (max-width:900px){
  [data-theme="arabicref"] .rm-top-panel{
    inset:0;width:100%;height:100dvh;max-width:none;max-height:none;border-radius:0;border:none;
  }
  [data-theme="arabicref"] .rm-top-hd{padding-top:max(11px,env(safe-area-inset-top))}
}

/* ============================================================
   R8 — الأخبار والحائط والراديو وفئات الملصقات (أصول أصلية بنا)
   ============================================================ */
/* الأخبار */
[data-theme="arabicref"] .rm-news-item{
  padding:9px 11px;margin-bottom:7px;border-radius:10px;
  background:#ffffff07;border:1px solid #ffffff0f;
}
[data-theme="arabicref"] .rm-news-item.rm-news-pinned{border-color:#d4af3755;background:#d4af3710}
[data-theme="arabicref"] .rm-news-item h4{margin:0 0 5px;color:#f3d97b;font-size:13.5px}
[data-theme="arabicref"] .rm-news-pin{font-size:12px}
[data-theme="arabicref"] .rm-news-body{color:#e9dce2;font-size:12.5px;line-height:1.7;white-space:pre-wrap;word-break:break-word}
[data-theme="arabicref"] .rm-news-item time{display:block;margin-top:5px;color:#8d7480;font-size:10.5px}
/* الحائط — أوسع من لوحات Top */
@media(min-width:901px){[data-theme="arabicref"] .rm-wall-panel{width:520px;height:600px}}
[data-theme="arabicref"] .rm-wall-composer{padding:8px;display:flex;flex-wrap:wrap;gap:7px;align-items:center;border-bottom:1px solid #d4af3722}
[data-theme="arabicref"] .rm-wall-composer textarea{
  flex:1 1 100%;box-sizing:border-box;resize:vertical;min-height:58px;
  background:#241318;border:1px solid #3a2430;border-radius:9px;color:#f3d9de;font-size:12.5px;padding:8px 10px;font-family:inherit;
}
[data-theme="arabicref"] .rm-wall-composer textarea:focus{border-color:#e0245e;outline:none}
[data-theme="arabicref"] .rm-wall-cnt{flex:1 1 auto;color:#8d7480;font-size:10.5px}
[data-theme="arabicref"] .rm-wall-postbtn{
  flex:0 0 auto;padding:7px 18px;border-radius:999px;border:none;cursor:pointer;
  background:linear-gradient(135deg,#e0245e,#8a1e46);color:#fff;font-size:12px;font-weight:800;
}
[data-theme="arabicref"] .rm-wall-postbtn:hover{filter:brightness(1.12)}
[data-theme="arabicref"] .rm-wall-postbtn:disabled{opacity:.55;cursor:default}
[data-theme="arabicref"] .rm-wall-err{flex:1 1 100%;color:#ff9db1;font-size:11px;min-height:14px}
[data-theme="arabicref"] .rm-wall-feed{flex:1 1 auto;overflow-y:auto;padding:8px}
[data-theme="arabicref"] .rm-wall-post{
  padding:9px 11px;margin-bottom:8px;border-radius:10px;
  background:#ffffff07;border:1px solid #ffffff0f;
}
[data-theme="arabicref"] .rm-wall-post header{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:5px}
[data-theme="arabicref"] .rm-wall-author{color:#f3d97b;font-size:12.5px;cursor:pointer}
[data-theme="arabicref"] .rm-wall-author:hover{text-decoration:underline}
[data-theme="arabicref"] .rm-wall-post header time{color:#8d7480;font-size:10px;flex:0 0 auto}
[data-theme="arabicref"] .rm-wall-text{color:#efe3e8;font-size:12.5px;line-height:1.7;white-space:pre-wrap;word-break:break-word}
[data-theme="arabicref"] .rm-wall-bar{display:flex;gap:7px;align-items:center;margin-top:7px}
[data-theme="arabicref"] .rm-wall-bar button{
  background:#2a1722;border:1px solid #4a2a38;border-radius:999px;color:#e9dce2;
  font-size:11px;padding:3px 10px;cursor:pointer;
}
[data-theme="arabicref"] .rm-wall-bar button:hover{border-color:#d4af3788}
[data-theme="arabicref"] .rm-wall-like.active{color:#ff7d98;border-color:#e0245e77}
[data-theme="arabicref"] .rm-wall-del:hover{color:#ffc4cf;border-color:#e0245e77}
[data-theme="arabicref"] .rm-wall-comments{margin-top:7px;border-top:1px dashed #ffffff1a;padding-top:6px}
[data-theme="arabicref"] .rm-wall-comment{color:#d8c2cc;font-size:11.5px;line-height:1.6;padding:3px 2px}
[data-theme="arabicref"] .rm-wall-comment b{color:#f3d97b;font-weight:700}
[data-theme="arabicref"] .rm-wall-comment time{color:#8d7480;font-size:9.5px}
[data-theme="arabicref"] .rm-wall-cform{display:flex;gap:6px;margin-top:5px}
[data-theme="arabicref"] .rm-wall-cform input{
  flex:1 1 auto;min-width:0;background:#241318;border:1px solid #3a2430;border-radius:8px;
  color:#f3d9de;font-size:11.5px;padding:6px 9px;
}
[data-theme="arabicref"] .rm-wall-cform input:focus{border-color:#e0245e;outline:none}
[data-theme="arabicref"] .rm-wall-csend{
  flex:0 0 auto;background:#2a1722;border:1px solid #d4af3755;border-radius:8px;
  color:#f3d97b;font-size:11px;font-weight:700;padding:5px 12px;cursor:pointer;
}
/* R8b: منشئ المنشور — صورة/استطلاع/إعدادات */
[data-theme="arabicref"] .rm-wall-tools{display:flex;gap:6px;flex:1 1 100%;flex-wrap:wrap}
[data-theme="arabicref"] .rm-wall-tool{
  background:#2a1722;border:1px solid #4a2a38;border-radius:999px;color:#e9dce2;
  font-size:11px;padding:4px 11px;cursor:pointer;
}
[data-theme="arabicref"] .rm-wall-tool:hover{border-color:#d4af3788}
[data-theme="arabicref"] .rm-wall-tool.active{border-color:#e0245e;color:#ffd7e0}
[data-theme="arabicref"] .rm-wall-tool.sm{font-size:10.5px;padding:3px 9px}
[data-theme="arabicref"] .rm-wall-tool:disabled{opacity:.45;cursor:default}
[data-theme="arabicref"] .rm-wall-imgtag{
  flex:1 1 100%;display:flex;align-items:center;gap:6px;
  background:#241318;border:1px dashed #d4af3755;border-radius:8px;
  color:#f3d97b;font-size:11px;padding:5px 9px;
}
[data-theme="arabicref"] .rm-wall-imgtag.hidden{display:none}
[data-theme="arabicref"] .rm-wall-imgx{background:none;border:none;color:#ff9db1;cursor:pointer;font-size:12px;margin-inline-start:auto}
[data-theme="arabicref"] .rm-wall-pollbox,.rm-wall-setbox{
  flex:1 1 100%;display:flex;flex-direction:column;gap:6px;
  background:#241318;border:1px solid #3a2430;border-radius:10px;padding:8px;
}
[data-theme="arabicref"] .rm-wall-pollbox.hidden,.rm-wall-setbox.hidden{display:none}
[data-theme="arabicref"] .rm-wall-pollbox input{
  background:#180d13;border:1px solid #3a2430;border-radius:8px;color:#f3d9de;
  font-size:11.5px;padding:6px 9px;min-width:0;
}
[data-theme="arabicref"] .rm-wall-pollbox input:focus{border-color:#e0245e;outline:none}
[data-theme="arabicref"] .rm-wall-pollopts{display:flex;flex-direction:column;gap:5px}
[data-theme="arabicref"] .rm-wall-setbox label{display:flex;align-items:center;gap:7px;color:#d8c2cc;font-size:11.5px}
[data-theme="arabicref"] .rm-wall-setbox select{
  background:#180d13;border:1px solid #3a2430;border-radius:8px;color:#f3d9de;font-size:11.5px;padding:4px 8px;
}
/* R8b: عرض المنشور — صورة/استطلاع/خصوصية */
[data-theme="arabicref"] .rm-wall-img{max-width:100%;max-height:220px;border-radius:10px;margin-top:7px;display:block;object-fit:contain;background:#180d13}
[data-theme="arabicref"] .rm-wall-priv{display:inline-block;color:#d4af37;font-size:10px;border:1px solid #d4af3744;border-radius:999px;padding:1px 8px;margin-top:6px}
[data-theme="arabicref"] .rm-wall-poll{margin-top:8px;display:flex;flex-direction:column;gap:5px;background:#ffffff06;border:1px solid #ffffff10;border-radius:10px;padding:8px}
[data-theme="arabicref"] .rm-wall-poll-q{color:#f3d97b;font-size:12px;font-weight:700}
[data-theme="arabicref"] .rm-wall-poll-opt{
  text-align:start;background:#2a1722;border:1px solid #4a2a38;border-radius:8px;
  color:#e9dce2;font-size:11.5px;padding:6px 10px;cursor:pointer;display:flex;justify-content:space-between;gap:8px;
}
[data-theme="arabicref"] .rm-wall-poll-opt:hover{border-color:#d4af3788}
[data-theme="arabicref"] .rm-wall-poll-opt.mine{border-color:#e0245e;color:#ffd7e0}
[data-theme="arabicref"] .rm-wall-poll-n{color:#b99aa8;font-size:10.5px;flex:0 0 auto}
[data-theme="arabicref"] .rm-wall-poll-ft{color:#8d7480;font-size:10px}
[data-theme="arabicref"] .rm-wall-coff{color:#8d7480;font-size:11px;padding:4px 2px}
[data-theme="arabicref"] .rm-wall-bar button:disabled{opacity:.45;cursor:default}
/* مشغل الراديو — شريط واحد ثابت فوق شريط التنقل بفاصل واضح (لا يلامس الـnav ولا يغطيه) */
[data-theme="arabicref"] #rmRadio{
  position:fixed;bottom:calc(52px + env(safe-area-inset-bottom,0px));inset-inline:0;z-index:1190;
  display:flex;align-items:center;gap:8px;height:40px;padding:0 10px;
  background:#180d13f5;border-top:1px solid #3a2430;backdrop-filter:blur(8px);
}
/* حجز مساحة الراديو داخل التدفق عند ظهوره: composer/الرسائل تبقى فوقه ولا تُغطى —
   46px nav + 6px فاصل + 40px راديو + 4px هامش تنفّس */
[data-theme="arabicref"] #chatView.rm-radio-on{padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))}
[data-theme="arabicref"] .rm-radio-ico{font-size:15px;flex:0 0 auto}
[data-theme="arabicref"] .rm-radio-btn{
  flex:0 0 auto;width:30px;height:30px;border-radius:50%;border:1px solid #d4af3755;
  background:#2a1722;color:#f3d97b;font-size:12px;cursor:pointer;line-height:1;padding:0;
}
[data-theme="arabicref"] .rm-radio-btn:hover{border-color:#d4af37}
[data-theme="arabicref"] .rm-radio-sel{
  flex:0 1 180px;min-width:0;max-width:45%;background:#241318;border:1px solid #3a2430;border-radius:8px;
  color:#f3d9de;font-size:11.5px;padding:4px 6px;
}
[data-theme="arabicref"] .rm-radio-name{
  flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:#f3d97b;font-size:12px;font-weight:700;
}
[data-theme="arabicref"] .rm-radio-vol{flex:0 0 80px;accent-color:#e0245e;cursor:pointer}
/* فئات الملصقات داخل نافذة الإيموجي */
[data-theme="arabicref"] .rm-sti-cats{display:flex;flex-wrap:wrap;gap:5px;padding:4px 6px 2px}
[data-theme="arabicref"] .rm-sti-cat{
  background:#2a1722;border:1px solid #4a2a38;border-radius:999px;color:#e9dce2;
  font-size:10.5px;font-weight:700;padding:3px 11px;cursor:pointer;
}
[data-theme="arabicref"] .rm-sti-cat:hover{border-color:#d4af3788}
[data-theme="arabicref"] .rm-sti-cat.active{background:#d4af3718;border-color:#d4af37;color:#f3d97b}
[data-theme="arabicref"] .emo-empty-cat{color:#8d7480;font-size:11px;padding:8px 6px;text-align:center}
@media (max-width:640px){
  [data-theme="arabicref"] .rm-radio-sel{flex:0 1 110px}
  [data-theme="arabicref"] .rm-radio-vol{flex:0 0 62px}
  [data-theme="arabicref"] .rm-radio-name{font-size:11px}
}
/* ===== R9c: إعلانات الإدارة — خلفياتها فاتحة ثابتة بينما --ink هنا فاتح، فكان النص غير مرئي.
   نص داكن افتراضيًا مقروء، والإدارة تتحكم بلون الخط اختياريًا عبر textColor من نموذج الإعلان ===== */
[data-theme="arabicref"] .admin-ad,[data-theme="arabicref"] .ad-sys{color:#4a2430}
/* ===== R10b: الحائط — يوتيوب للعرض فقط (نمط «اضغط للتشغيل») + لوحة لون الخط + شارة «الجميع» ===== */
[data-theme="arabicref"] .rm-wall-text .yt-facade{display:flex;align-items:center;gap:10px;width:min(340px,100%);min-height:56px;background:linear-gradient(135deg,#2b1520,#472233);border:1px solid #d8b9c1;border-radius:10px;padding:8px 12px;cursor:pointer;margin-top:7px}
[data-theme="arabicref"] .rm-wall-text .yt-facade .yt-play{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;background:#e0245e;color:#fff;font-size:13px;flex:0 0 34px}
[data-theme="arabicref"] .rm-wall-text .yt-facade .yt-t{color:#f3d9de;font-size:12px;font-weight:bold}
[data-theme="arabicref"] .rm-wall-text .yt-facade:hover{border-color:#e0245e}
[data-theme="arabicref"] .rm-wall-palette{flex-direction:row;flex-wrap:wrap;align-items:center;gap:6px}
[data-theme="arabicref"] .rm-wall-swatch{width:24px;height:24px;border-radius:50%;border:2px solid #ffffff33;cursor:pointer;padding:0}
[data-theme="arabicref"] .rm-wall-swatch.active{border-color:#ffd7e0;box-shadow:0 0 0 2px #e0245e66}
[data-theme="arabicref"] .rm-wall-pub{color:#8fd3a8;border-color:#8fd3a844}
