/* ============================================================
   Theme: arabicref — «نبض المرجع» — طبقة الألوان (Phase 2)
   تُحمّل بعد theme-arabicref-core.css (نواة تخطيط rm-* معاد نطاقها).
   هنا فقط: إعادة تلوين الأسطح بهوية المرجع المقاسة (أخضر داكن + بيج كريمي)
   + خط Noto Kufi Arabic (OFL، مستضاف ذاتيًا في /fonts/).
   كل القواعد تحت [data-theme="arabicref"] — صفر تأثير على بقية الثيمات.
   ============================================================ */

/* ===== الخط: Noto Kufi Arabic — SIL OFL 1.1 (نسخة محلية، بلا نسخ ملفات المرجع) ===== */
@font-face{
  font-family:"Noto Kufi Arabic";
  font-style:normal;font-weight:100 900;font-display:swap;
  src:url("/fonts/notokufi-arabic.woff2") format("woff2");
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1;
}
@font-face{
  font-family:"Noto Kufi Arabic";
  font-style:normal;font-weight:100 900;font-display:swap;
  src:url("/fonts/notokufi-latin.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
[data-theme="arabicref"] body,
[data-theme="arabicref"] button,[data-theme="arabicref"] input,
[data-theme="arabicref"] textarea,[data-theme="arabicref"] select{
  font-family:"Noto Kufi Arabic","Segoe UI",Tahoma,Arial,sans-serif;
}

/* ===== المتغيرات المشتقة (فوق نواة royalmodern) ===== */
[data-theme="arabicref"]{
  --ar-green:#0e5404;--ar-green-deep:#0b4a03;--ar-green-soft:#e8f1e4;
  --ar-cream:#f4efe4;--ar-cream-2:#efe8d8;--ar-panel:#fbf8f0;
  --ar-line:#ddd2ba;--ar-line-2:#cfdcc6;--ar-ink:#1c1c1c;--ar-muted:#6b6b6b;
  /* redefinition of royalmodern tokens used by the base with !important */
  --chat-bg:transparent;--surface-cream:#fbf8f0;--panel-bg:#fbf8f0;
  --app-bg:#f4efe4;--landing-bg-1:#f6f1e6;--landing-bg-2:#efe8d6;--landing-bg-3:#f2ecdd;
  color-scheme:light;
}

/* ===== الخلفية الزخرفية الكريمية ===== */
[data-theme="arabicref"] body{
  background:
    radial-gradient(circle at 25% 25%, rgba(14,84,4,.05) 0 2px, transparent 3px),
    radial-gradient(circle at 75% 75%, rgba(14,84,4,.05) 0 2px, transparent 3px),
    repeating-radial-gradient(circle at 50% 40%, rgba(160,140,90,.10) 0 14px, rgba(160,140,90,.05) 14px 28px),
    linear-gradient(160deg,#f6f1e6 0%,#efe8d6 45%,#f2ecdd 100%);
  background-attachment:fixed;
}
[data-theme="arabicref"] .chat-shell{
  background:linear-gradient(160deg,#f6f1e6 0%,#efe8d6 55%,#f2ecdd 100%);
}

/* ===== الهيدر 46px — أخضر متدرج ===== */
[data-theme="arabicref"] .rm-header{
  background:linear-gradient(90deg,var(--ar-green-deep),var(--ar-green) 35%,#11570a);
  border-bottom:2px solid #0a3d02;box-shadow:0 2px 6px rgba(0,0,0,.35);
}
@keyframes rmPulse{0%,100%{text-shadow:0 0 6px #2ecc7155}50%{text-shadow:0 0 18px #2ecc71bb}}
[data-theme="arabicref"] .rm-ico{
  background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.28);color:#fff;
}
[data-theme="arabicref"] .rm-ico:hover{border-color:#ffffffaa;box-shadow:0 0 10px rgba(255,255,255,.25)}
[data-theme="arabicref"] .rm-ico-badge{background:#ffd76a;color:#5a3a00;border-color:#b8860b}
[data-theme="arabicref"] .rm-status{color:#eaf3ea}
[data-theme="arabicref"] .rm-status b{color:#fff}
[data-theme="arabicref"] .rm-brand{color:#fff;animation:rmPulse 1.6s infinite}
[data-theme="arabicref"] .rm-brand span{background:#fff;border-color:#fff;color:var(--ar-green)}
[data-theme="arabicref"] .rm-bars{color:#fff}
[data-theme="arabicref"] .rm-bars:hover{color:#ffe9b0}

/* ===== قائمة ☰ والإعدادات — كريمي ===== */
[data-theme="arabicref"] .rm-settings{
  background:var(--ar-panel);border:1px solid var(--ar-line);
  box-shadow:0 18px 50px rgba(60,50,20,.35);
}
[data-theme="arabicref"] .rm-dd-item{color:var(--ar-ink)}
[data-theme="arabicref"] .rm-dd-item:hover{background:var(--ar-green-soft);color:var(--ar-green-deep)}
[data-theme="arabicref"] .rm-menu{
  background:#f8f4ea;border-inline-end:1px solid var(--ar-line);
  box-shadow:8px 0 30px rgba(60,50,20,.35);
}
[data-theme="arabicref"] .rm-mi{color:var(--ar-ink);border-bottom:1px solid #eee4cf}
[data-theme="arabicref"] .rm-mi:hover{background:var(--ar-green-soft);color:var(--ar-green-deep)}
[data-theme="arabicref"] .rm-mi .rm-arrow{color:#a89a78}
[data-theme="arabicref"] .rm-mi.rm-has-sub{color:var(--ar-green-deep);font-weight:700}
[data-theme="arabicref"] .rm-sub{background:#efe8d8}
[data-theme="arabicref"] .rm-sub-item{color:#3a3a3a;border-bottom:1px solid #e4dac2}
[data-theme="arabicref"] .rm-sub-item:hover{color:var(--ar-green-deep);background:var(--ar-green-soft)}
[data-theme="arabicref"] .rm-state-متصل i{color:#2ecc71}
[data-theme="arabicref"] .rm-state-بعيد i{color:#f5a623}
[data-theme="arabicref"] .rm-state-مشغول i{color:#ff5f7e}
[data-theme="arabicref"] .pstat.pstat-online{background:#2ecc71;box-shadow:0 0 8px #2ecc71aa}
[data-theme="arabicref"] .pstat.pstat-away{background:#f5a623;box-shadow:0 0 8px #f5a623aa}
[data-theme="arabicref"] .pstat.pstat-busy{background:#ff5f7e;box-shadow:0 0 8px #ff5f7eaa}
[data-theme="arabicref"] .rm-searchbar{
  background:var(--ar-panel);border:1px solid var(--ar-line);
  box-shadow:0 14px 40px rgba(60,50,20,.3);
}
[data-theme="arabicref"] .rm-searchbar input{background:#fff;border:1px solid var(--ar-line-2);color:var(--ar-ink)}
[data-theme="arabicref"] .rm-searchbar input:focus{border-color:var(--ar-green)}
[data-theme="arabicref"] .rm-search-close{background:#fff;border:1px solid var(--ar-line-2);color:var(--ar-muted)}
[data-theme="arabicref"] .rm-search-close:hover{color:var(--ar-green-deep);border-color:var(--ar-green)}

/* ===== شريط التنقل السفلي 46px — أخضر (ID لتجاوز #rmNav في النواة) ===== */
[data-theme="arabicref"] #rmNav{
  background:linear-gradient(to bottom,var(--ar-green),var(--ar-green-deep));
  border-top:2px solid #0a3d02;box-shadow:0 -2px 6px rgba(0,0,0,.25);
}
[data-theme="arabicref"] #rmNav .rm-nav-btn{color:#dfeee0}
[data-theme="arabicref"] #rmNav .rm-nav-btn:hover,[data-theme="arabicref"] #rmNav .rm-nav-btn:active{color:#fff}
[data-theme="arabicref"] .rm-nav-btn i{font-style:normal}
[data-theme="arabicref"] .rm-nav-btn span{font-size:10.5px}

/* ===== الألواح: مركز الشات + القوائم الجانبية ===== */
[data-theme="arabicref"] .center-panel,
[data-theme="arabicref"] .side{
  background:var(--ar-panel);border:1px solid var(--ar-line);border-radius:12px;
  box-shadow:0 1px 4px rgba(0,0,0,.18);color:var(--ar-ink);
}
[data-theme="arabicref"] .room-head{
  background:linear-gradient(90deg,#f2ecdc,#f7f2e6);border-bottom:1px solid var(--ar-line-2);
}
[data-theme="arabicref"] .room-head #roomName{color:var(--ar-green-deep);font-weight:800}
[data-theme="arabicref"] .room-head small{color:var(--ar-muted)}
[data-theme="arabicref"] .messages{background:#faf6ec;color:var(--ar-ink)}
[data-theme="arabicref"] .msg{border-bottom:1px solid #ece4d0}
[data-theme="arabicref"] .msg .time{color:#9a8f74}
[data-theme="arabicref"] .msg.system{color:var(--ar-green);font-weight:700;font-style:normal}
[data-theme="arabicref"] .msg.private{background:#fdf9ee;border:1px solid var(--ar-line)}
[data-theme="arabicref"] .msg .mention{color:#5a3a00;background:#ffe9b0;border-radius:5px}
[data-theme="arabicref"] .users,[data-theme="arabicref"] .rooms-box{background:#fbf8f0}
[data-theme="arabicref"] .user{border-bottom:1px solid #eee4cf}
[data-theme="arabicref"] .user.selected{background:var(--ar-green-soft);outline:2px solid var(--ar-green);color:var(--ar-ink)}
[data-theme="arabicref"] .avatar{border:2px solid var(--ar-line-2);background:#fff}
[data-theme="arabicref"] .panel-tabs{background:var(--ar-green);border-bottom:0}
[data-theme="arabicref"] .ptab{color:#dfeee0}
[data-theme="arabicref"] .ptab.active{color:var(--ar-green-deep);background:#fff}
[data-theme="arabicref"] .user-actions{background:var(--ar-green-soft);border-top:1px solid var(--ar-line-2)}
[data-theme="arabicref"] .toolbar{background:var(--ar-green-soft);border-bottom:1px solid var(--ar-line-2)}
[data-theme="arabicref"] .toolbar button,[data-theme="arabicref"] .user-actions button,
[data-theme="arabicref"] .rooms-panel button{background:#fff;border:1px solid var(--ar-line-2);color:var(--ar-green-deep);font-weight:700}
[data-theme="arabicref"] .toolbar button:hover,[data-theme="arabicref"] .user-actions button:hover{border-color:var(--ar-green);color:var(--ar-green-deep)}
[data-theme="arabicref"] .rm-ugroup-h{color:#7d6570;border-bottom:1px solid #e4dac2}
[data-theme="arabicref"] .rm-ugroup-h::after{background:linear-gradient(90deg,#0e540433,transparent)}
[data-theme="arabicref"] .rm-usub{color:#8d8265}

/* قائمة الغرف: بطاقات بيضاء + الغرفة النشطة خضراء */
[data-theme="arabicref"] #roomsList .room{background:#fff;border:1px solid var(--ar-line);color:var(--ar-ink)}
[data-theme="arabicref"] #roomsList .room:hover{border-color:var(--ar-green);background:var(--ar-green-soft)}
[data-theme="arabicref"] #roomsList .room.active{
  background:var(--ar-green-soft);border-inline-start:3px solid var(--ar-green);color:var(--ar-green-deep);font-weight:800;
}
[data-theme="arabicref"] .rooms-sec-title{color:var(--ar-green-deep)}
[data-theme="arabicref"] .rm-rooms-head{background:var(--ar-green-soft);border:1px solid var(--ar-line);color:var(--ar-green-deep)}
[data-theme="arabicref"] .rm-room-count{color:var(--ar-muted)}

/* ===== صندوق الكتابة ===== */
[data-theme="arabicref"] .composer{background:transparent}
[data-theme="arabicref"] .format-row{background:var(--ar-green-soft);border:1px solid var(--ar-line-2);border-radius:10px}
[data-theme="arabicref"] .format-row button{background:#fff;border:1px solid var(--ar-line-2);color:var(--ar-ink)}
[data-theme="arabicref"] .format-row button:hover{border-color:var(--ar-green)}
[data-theme="arabicref"] .format-row select,[data-theme="arabicref"] .color-tool{background:#fff;color:var(--ar-ink);border:1px solid var(--ar-line-2)}
[data-theme="arabicref"] #fmtSize,[data-theme="arabicref"] #fmtFamily{color:var(--ar-ink)!important;background:#fff!important;border-color:var(--ar-line-2)}
[data-theme="arabicref"] .hint{color:#8d8265}
/* كبسولة الكتابة: نفس خصوصية النواة (.composer #messageInput) — التحميل لاحقًا يضمن الفوز */
[data-theme="arabicref"] .composer .input-bar{background:transparent;border:none;box-shadow:none}
[data-theme="arabicref"] .composer #messageInput{
  background:rgba(255,255,255,.92);border:1px solid var(--ar-line);color:var(--ar-ink);
}
[data-theme="arabicref"] .composer #messageInput:focus{border-color:var(--ar-green);box-shadow:0 0 0 3px rgba(14,84,4,.12)}
[data-theme="arabicref"] .composer #messageInput:empty::before{color:#8a8a8a}
[data-theme="arabicref"] .composer .format-row select{background:#fff;border:1px solid var(--ar-line-2);color:var(--ar-ink)}
[data-theme="arabicref"] .composer .format-row .hint{color:#8d8265}
[data-theme="arabicref"] .emoji-panel{background:#fff;border:1px solid var(--ar-line)}
[data-theme="arabicref"] .composer .input-bar .send,
[data-theme="arabicref"] #sendBtn{
  background:var(--ar-green);color:#fff;border:none;font-weight:800;
  box-shadow:0 2px 5px rgba(14,84,4,.4);
}
[data-theme="arabicref"] .composer .input-bar .send:hover,
[data-theme="arabicref"] #sendBtn:hover{background:#147510}

/* الراديو */
[data-theme="arabicref"] .rm-radio{background:var(--ar-panel);border:1px solid var(--ar-line)}
[data-theme="arabicref"] .rm-radio-btn{background:var(--ar-green);color:#fff;border:0}
[data-theme="arabicref"] .rm-radio-sel{background:#fff;border:1px solid var(--ar-line-2);color:var(--ar-ink)}
[data-theme="arabicref"] .rm-radio-name{color:var(--ar-ink)}

/* ===== لوحات R5 (الخاص/الإشعارات) — كريمي ===== */
[data-theme="arabicref"] .rm-r5-panel{
  background:var(--ar-panel);border:1px solid var(--ar-line);
  box-shadow:0 18px 50px rgba(60,50,20,.35);color:var(--ar-ink);
}
[data-theme="arabicref"] #rmPmPanel,[data-theme="arabicref"] #rmNotifPanel{
  background:var(--ar-panel);border:1px solid var(--ar-line);color:var(--ar-ink);
}

/* ===== صفوف المتواجدين: هوية داكنة كالمرجع — تحييد الألوان الخمرية فقط ===== */
[data-theme="arabicref"] .rm-row{color:#fff}
[data-theme="arabicref"] .rm-row.rm-tier-1{background:linear-gradient(90deg,#26241f,#1d1b18 78%);border:1px solid #4a463c;border-radius:9px}
[data-theme="arabicref"] .rm-row.rm-tier-2{background:linear-gradient(90deg,#2a261a,#1d1b18 78%);border:1px solid #6b5a2a;border-radius:9px}
[data-theme="arabicref"] .rm-row.rm-tier-3{background:linear-gradient(90deg,#2b1d1d,#1d1b18 78%);border:1px solid #7a2a2a;border-radius:9px}
[data-theme="arabicref"] .rm-row.rm-tier-4{background:linear-gradient(90deg,#221d2b,#1d1b18 78%);border:1px solid #4a3a6b;border-radius:9px}
[data-theme="arabicref"] .rm-row.rm-tier-5{background:linear-gradient(90deg,#16241d,#1d1b18 78%);border:1px solid #2a5c42;border-radius:9px}
[data-theme="arabicref"] .rm-banner-row{background:linear-gradient(90deg,#33290f,#1d1b18 70%);border:1px solid #6b4d17;border-radius:9px}
[data-theme="arabicref"] .rm-row.rm-dye-row{border:1px solid #55503f;border-radius:9px}
[data-theme="arabicref"] .rm-row .user-name{text-shadow:0 1px 2px rgba(0,0,0,.8)}

/* ===== بطاقة العضو — مودال أبيض كالمرجع ===== */
[data-theme="arabicref"] #memberCardModal .member-card{
  background:#fff;color:var(--ar-ink);border:1px solid var(--ar-line);
  box-shadow:0 0 0 1px rgba(0,0,0,.06),0 18px 60px rgba(60,50,20,.4);
}
[data-theme="arabicref"] #memberCardModal .mc-banner::after{
  background:linear-gradient(180deg,transparent,#ffffffd9 78%,#fff);
}
[data-theme="arabicref"] #memberCardModal .mc-frame{background:transparent}
[data-theme="arabicref"] #memberCardModal .mc-frame .mc-role{color:#8a6d1a;text-shadow:none}
[data-theme="arabicref"] #memberCardModal .mc-frame .mc-name{color:var(--ar-ink)!important;text-shadow:none}
[data-theme="arabicref"] #memberCardModal .mc-frame .mc-username{color:var(--ar-muted)!important;text-shadow:none}
[data-theme="arabicref"] #memberCardModal .mc-bio{color:#3a3a3a}
[data-theme="arabicref"] #memberCardModal .mc-info-row{border-color:#eee4cf;color:#3a3a3a}
[data-theme="arabicref"] #memberCardModal .mc-info-row span{color:var(--ar-muted)}
[data-theme="arabicref"] #memberCardModal .mc-stats{color:var(--ar-ink)}
[data-theme="arabicref"] #memberCardModal .mc-stat{background:var(--ar-green-soft);border:1px solid var(--ar-line);color:var(--ar-ink)}
[data-theme="arabicref"] #memberCardModal .mc-stat span{color:var(--ar-muted)}
[data-theme="arabicref"] #memberCardModal .rm-mc-eco{background:var(--ar-green-soft);border:1px solid var(--ar-line);color:var(--ar-green-deep)}
[data-theme="arabicref"] #memberCardModal .rm-mc-giftlog{background:#fdf9ee;color:#5a5340}
[data-theme="arabicref"] #memberCardModal .mc-btn{background:#fff;border:1px solid var(--ar-line-2);color:var(--ar-green-deep)}
[data-theme="arabicref"] #memberCardModal .mc-btn:hover{background:var(--ar-green-soft)}
[data-theme="arabicref"] #memberCardModal .mc-btn.mc-pm{background:var(--ar-green);border-color:var(--ar-green);color:#fff}
[data-theme="arabicref"] #memberCardModal .mc-editbtn{background:var(--ar-green);color:#fff;border-color:var(--ar-green)}
[data-theme="arabicref"] #memberCardModal .mc-statusline{color:var(--ar-muted)}
[data-theme="arabicref"] #memberCardModal .mc-sub,[data-theme="arabicref"] #memberCardModal .mc-sub-end{color:var(--ar-muted)}
[data-theme="arabicref"] #memberCardModal .rm-ptabs{background:var(--ar-green-soft)}
[data-theme="arabicref"] #memberCardModal .rm-ptab{color:var(--ar-muted);border-bottom-color:transparent}
[data-theme="arabicref"] #memberCardModal .rm-ptab.active{color:var(--ar-green-deep);border-bottom-color:var(--ar-green)}
[data-theme="arabicref"] #memberCardModal .rm-ppanel{background:#faf6ec;color:var(--ar-ink)}
[data-theme="arabicref"] #memberCardModal .mc-edit input,
[data-theme="arabicref"] #memberCardModal .mc-edit select{background:#fff;border:1px solid var(--ar-line-2);color:var(--ar-ink)}

/* ===== النوافذ: خاص / ملفي / صفحات — بيضاء ===== */
[data-theme="arabicref"] .modal > div{background:#fff;border:1px solid var(--ar-line);color:var(--ar-ink)}
[data-theme="arabicref"] .private-title{color:var(--ar-green-deep);border-bottom:1px solid var(--ar-line)}
[data-theme="arabicref"] .private-box{background:#fff}
[data-theme="arabicref"] .private-messages{background:#faf6ec;color:var(--ar-ink)}
[data-theme="arabicref"] .private-compose textarea{background:#fff;border:1px solid var(--ar-line-2);color:var(--ar-ink)}
[data-theme="arabicref"] .profile-box{background:#fff}
[data-theme="arabicref"] .pf-body label{color:#3a3a3a}
[data-theme="arabicref"] .pf-body input{background:#fff;border:1px solid var(--ar-line-2);color:var(--ar-ink)}

/* شريط التمرير */
[data-theme="arabicref"] ::-webkit-scrollbar{width:9px}
[data-theme="arabicref"] ::-webkit-scrollbar-thumb{background:#b9ac8d;border-radius:8px}
[data-theme="arabicref"] ::-webkit-scrollbar-track{background:rgba(0,0,0,.05)}

/* ===== الجوال ===== */
@media (max-width:768px){
  [data-theme="arabicref"] .center-panel,[data-theme="arabicref"] .side{border-radius:8px}
  [data-theme="arabicref"] .format-row{overflow-x:auto}
}

/* ============================================================
   EXACT MATCH layer — قياسات حية من المرجع @1303×1007
   header 46 | ads-left 180 | right-panel 254 | room-row 40 |
   msg fs 14 h~33 | member-row 48 | footer 46 (tabs 50px يمين)
   ============================================================ */
[data-theme="arabicref"] body{display:block;overflow:hidden}
[data-theme="arabicref"] .chat-shell{
  width:100vw;height:100vh;max-width:none;border:none;border-radius:0;
  box-shadow:none;background:transparent;padding:0 0 46px;
}
/* الهيدر: يمين = الحالة + الاسم + Badge الرتبة ثم الأيقونات • وسط فارغ • يسار = ☰ + الشعار (RTL: row يبدأ من اليمين) */
[data-theme="arabicref"] .rm-header{flex-direction:row;justify-content:flex-start}
[data-theme="arabicref"] .rm-status{order:0;flex:0 1 auto;min-width:0}
[data-theme="arabicref"] .rm-actions{order:1;margin-inline-end:auto}
[data-theme="arabicref"] .rm-bars{order:2;margin-inline-end:9px}
[data-theme="arabicref"] .rm-brand{order:3;margin-inline-end:10px}
/* مساحة العمل: إعلانات 180 يسارًا + شات + لوحة 254 يمينًا، بدون حواف */
[data-theme="arabicref"] .workspace{
  grid-template-areas:"ads main drag side";
  grid-template-columns:180px minmax(0,1fr) 7px 254px;
  gap:10px;padding:0;height:calc(100vh - 92px);
}
[data-theme="arabicref"] #rmLeftAd{
  grid-area:ads;order:0;display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.55);border-inline-end:1px solid var(--ar-line);
}
[data-theme="arabicref"] .center-panel,
[data-theme="arabicref"] .side{
  background:transparent;border:none;border-radius:0;box-shadow:none;
}
/* الشات: الخلفية الزخرفية تظهر مباشرة كالمرجع */
[data-theme="arabicref"] .messages{background:transparent}
[data-theme="arabicref"] .room-head{
  background:transparent;border-bottom:none;
}
/* اللوحة اليمنى: بيضاء مسطحة + ترويسة 46px فاتحة */
[data-theme="arabicref"] .side{background:#fff;border-inline-start:1px solid #e5e0d2}
[data-theme="arabicref"] .panel-tabs{height:46px;background:rgba(0,0,0,.05);border-bottom:1px solid #e5e0d2}
[data-theme="arabicref"] .ptab{flex:1;background:transparent;color:#444;font-size:14px;border-radius:0}
[data-theme="arabicref"] .ptab.active{background:rgba(14,84,4,.08);color:var(--ar-green-deep);font-weight:700;box-shadow:inset 0 -3px 0 var(--ar-green)}
/* الرسائل: 14px / صف ~33px / رمادي #666 كالمرجع */
[data-theme="arabicref"] #messages{font-size:14px}
[data-theme="arabicref"] .msg{min-height:33px;padding:3px 10px;font-size:14px;line-height:1.45;color:#666}
[data-theme="arabicref"] .msg .msg-sender{font-size:14px}
[data-theme="arabicref"] .msg .time{font-size:11px}
/* صفوف الأعضاء: 48px للسطر الواحد — تتمدد تلقائيًا مع Badge الرتبة/اللقب bioShort */
[data-theme="arabicref"] #usersList .rm-row{
  height:auto;min-height:48px;padding:2px 8px;gap:6px;
}
[data-theme="arabicref"] #usersList .rm-row .avatar-wrap{width:34px;height:34px;flex:0 0 34px}
[data-theme="arabicref"] #usersList .rm-row .avatar-wrap img{width:32px;height:32px}
[data-theme="arabicref"] #usersList .rm-row .user-name{font-size:14px}
[data-theme="arabicref"] #usersList .rm-row .u-role{font-size:11px}
/* صفوف الغرف: 40px مسطحة بيضاء بلا زوايا كالمرجع */
[data-theme="arabicref"] #roomsList .room{
  height:40px;border-radius:0;border:none;border-bottom:1px solid #eee;
  background:#fff;display:flex;align-items:center;padding:0 8px;font-size:14px;
}
[data-theme="arabicref"] #roomsList .room:hover{background:rgba(14,84,4,.05)}
[data-theme="arabicref"] #roomsList .room.active{background:rgba(14,84,4,.09);border-inline-start:3px solid var(--ar-green)}
/* الكاتب: كبسولة رمادية شفافة radius 18 + إرسال دائرة خضراء */
[data-theme="arabicref"] .composer{background:transparent;border:none}
[data-theme="arabicref"] .format-row{
  background:transparent;border:none;min-height:28px;gap:2px;opacity:.85;
}
[data-theme="arabicref"] .format-row button{background:transparent;border:none;box-shadow:none;font-size:13px}
[data-theme="arabicref"] .composer #messageInput{
  background:rgba(128,128,128,.14);border:none;border-radius:18px;color:#444;
}
/* المرجع: + يسار الكبسولة وزر الإرسال الدائري يمينها */
[data-theme="arabicref"] .composer .input-bar{flex-direction:row-reverse}
[data-theme="arabicref"] .composer #messageInput:focus{box-shadow:none;border:none}
/* الفوتر: أزرار 50px متجمعة يمينًا + خط 12px كالمرجع */
[data-theme="arabicref"] #rmNav{justify-content:flex-start;gap:0;padding:0}
[data-theme="arabicref"] #rmNav .rm-nav-btn{
  flex:0 0 50px;width:50px;min-width:50px;gap:1px;padding:0;
}
[data-theme="arabicref"] #rmNav .rm-nav-btn i{font-size:15px;font-style:normal}
[data-theme="arabicref"] #rmNav .rm-nav-btn span{font-size:12px}

/* ============================================================
   Room Ownership + Identity — صورة/علم/لون/تاج/عداد + إعدادات المالك
   ============================================================ */
/* صف الغرفة: صورة 28px + علم 18px + اسم مرن + شارات + عدّاد يمين */
[data-theme="arabicref"] .ar-room{gap:8px}
[data-theme="arabicref"] .ar-room-img{width:28px;height:28px;border-radius:6px;object-fit:cover;flex:0 0 28px;background:#fff;border:1px solid #e2dcc9}
[data-theme="arabicref"] .ar-room-ph{display:flex;align-items:center;justify-content:center;font-size:14px}
[data-theme="arabicref"] .ar-room-flag{width:18px;height:13px;border-radius:2px;object-fit:cover;flex:0 0 18px;border:1px solid #d8d2bf}
[data-theme="arabicref"] .ar-room .rm-room-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#1c1c1c}
[data-theme="arabicref"] .ar-room .rm-room-lock{font-size:12px;flex:0 0 auto}
[data-theme="arabicref"] .ar-room-crown{font-size:12px;flex:0 0 auto;filter:saturate(1.1)}
[data-theme="arabicref"] .ar-room-count{
  min-width:22px;padding:1px 7px;border-radius:999px;font-size:11px;font-weight:700;
  line-height:16px;text-align:center;background:#fff;border:1px solid #ddd6c2;color:#666;flex:0 0 auto;
}
[data-theme="arabicref"] .room.active .ar-room-count{background:var(--ar-green);border-color:var(--ar-green);color:#fff}

/* زر ⚙ إعدادات الغرفة في رأس الغرفة */
[data-theme="arabicref"] .ar-gear{
  margin-inline-start:auto;background:#fff;border:1px solid var(--ar-line-2);color:var(--ar-green-deep);
  font-family:inherit;font-size:12px;font-weight:700;padding:4px 10px;border-radius:8px;cursor:pointer;
}
[data-theme="arabicref"] .ar-gear:hover{background:var(--ar-green-soft);border-color:var(--ar-green)}
[data-theme="arabicref"] .ar-gear.hidden{display:none}

/* نافذة إعدادات الغرفة */
[data-theme="arabicref"] .ar-set-backdrop{position:fixed;inset:0;background:rgba(20,16,8,.45);z-index:2998}
[data-theme="arabicref"] .ar-set-card{
  position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:2999;
  width:min(420px,92vw);background:#fff;border:1px solid var(--ar-line);border-radius:12px;
  box-shadow:0 18px 60px rgba(40,32,10,.45);padding:16px;font-size:14px;
}
[data-theme="arabicref"] .ar-set-title{font-weight:800;color:var(--ar-green-deep);margin-bottom:10px}
[data-theme="arabicref"] .ar-set-lb{display:block;font-size:12px;color:#555;margin:10px 0 4px;font-weight:700}
[data-theme="arabicref"] .ar-set-file{width:100%;font-size:12px}
[data-theme="arabicref"] .ar-set-hint{font-size:11px;color:#8d8265;margin-top:3px}
[data-theme="arabicref"] .ar-set-pal{display:flex;gap:6px;flex-wrap:wrap}
[data-theme="arabicref"] .ar-pal{width:26px;height:26px;border-radius:50%;border:2px solid #fff;outline:1px solid #c9c2ab;cursor:pointer;padding:0}
[data-theme="arabicref"] .ar-pal.on{outline:2px solid var(--ar-green);outline-offset:1px}
[data-theme="arabicref"] .ar-pal-none{background:#fff;color:#888;font-size:11px;line-height:24px}
[data-theme="arabicref"] .ar-set-ta{width:100%;font-family:inherit;font-size:13px;border:1px solid var(--ar-line-2);border-radius:8px;padding:6px;resize:vertical}
[data-theme="arabicref"] .ar-set-actions{display:flex;gap:8px;margin-top:12px}
[data-theme="arabicref"] .ar-set-save{flex:1;background:var(--ar-green);color:#fff;border:none;border-radius:8px;padding:7px;font-family:inherit;font-weight:800;cursor:pointer}
[data-theme="arabicref"] .ar-set-save:hover{background:#147510}
[data-theme="arabicref"] .ar-set-close{background:#fff;border:1px solid var(--ar-line-2);border-radius:8px;padding:7px 14px;font-family:inherit;cursor:pointer;color:#444}
[data-theme="arabicref"] .ar-set-msg{font-size:12px;color:var(--ar-green-deep);margin-top:6px;min-height:16px;text-align:center}
[data-theme="arabicref"] .ar-set-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px}
[data-theme="arabicref"] .ar-set-sub{display:block;font-size:11px;color:#777;margin-bottom:3px;font-weight:700}
[data-theme="arabicref"] .ar-set-mini{background:#fff;border:1px solid var(--ar-line-2);border-radius:8px;padding:4px 10px;font-family:inherit;font-size:12px;cursor:pointer;color:#a33;margin-top:4px}
[data-theme="arabicref"] .ar-pal-txt{background:#fff;color:#333;font-weight:800;font-size:13px}
[data-theme="arabicref"] .ar-pal-txt-d{background:#1d232b;color:#fff}

/* ============================================================
   ثيم الغرفة الكامل — Room-scoped: منطقة الغرفة فقط تتغير عند الدخول
   المتغيرات تأتي من applyRoomTheme() وتُزال عند مغادرة الغرفة (لا تسريب)
   ============================================================ */
[data-theme="arabicref"] .center-panel.ar-themed{
  --chat-bg:var(--ar-room-bg,#f5efdf);
  background-color:var(--ar-room-bg,#f5efdf);
  background-image:var(--ar-room-bg-image,none);
  background-size:cover;background-position:center;
  border-radius:12px;padding:0 0 4px;overflow:hidden;
}
/* ترويسة الغرفة بشريط هوية الغرفة */
[data-theme="arabicref"] .center-panel.ar-themed .room-head{
  background:linear-gradient(135deg,rgba(var(--ar-room-primary-rgb,14,84,4),.92),rgb(var(--ar-room-primary-rgb,14,84,4)));
  min-height:46px;padding:0 14px;display:flex;align-items:center;gap:10px;border-radius:0;
}
[data-theme="arabicref"] .center-panel.ar-themed .room-head #roomName,
[data-theme="arabicref"] .center-panel.ar-themed .room-head #chatMode,
[data-theme="arabicref"] .center-panel.ar-themed .room-head .room-suspended{color:#fff;text-shadow:0 1px 4px rgba(0,0,0,.35)}
[data-theme="arabicref"] .center-panel.ar-themed .room-head .ar-gear{
  background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.4);color:#fff;
}
/* اللمسة المساعدة: زر الإرسال وselect النشط يتبعان accent إن وُجد */
[data-theme="arabicref"] .center-panel.ar-themed #sendBtn{
  background:var(--ar-room-accent,rgb(var(--ar-room-primary-rgb,14,84,4)));
}
/* نص الغرفة: light (افتراضي) فوق خلفية فاتحة — dark نص فاتح فوق خلفية غامقة */
[data-theme="arabicref"] .center-panel.ar-dark #messages{color:#e9e5da}
[data-theme="arabicref"] .center-panel.ar-dark .msg{color:#e9e5da}
[data-theme="arabicref"] .center-panel.ar-dark .msg .time{color:#b9b2a2}
[data-theme="arabicref"] .center-panel.ar-dark .composer #messageInput{background:rgba(255,255,255,.13);color:#fff}
[data-theme="arabicref"] .center-panel.ar-dark .composer #messageInput:empty:before{color:#cfc8b6}

/* ============================================================
   بطاقة العضو — تنظيم المرجع (قياسات حية من arabic.chat):
   modal 540×~ r16 أبيض | hero 204 بتدرج/صبغة لون الغرفة فوق البانر
   | identity أسفل الـhero: avatar 88 حلقة بيضاء + دور + اسم 24/700 + @username
   | أيقونات 40×40 r8 أعلى اليسار | إغلاق 40×40 أعلى اليمين
   | صفوف معلومات 38px بفواصل ملوّنة من لون الغرفة | أقسام بيضاء نظيفة
   تعارض特异性: قواعد النواة #memberCardModal — هنا نفس الـscope لاحقًا فتتغلب.
   كل بياناتنا تبقى (sub/bio/status/flags/stats/actions/tabs) — Presentation فقط.
   ============================================================ */
[data-theme="arabicref"] #memberCardModal .member-card{
  width:min(540px,94vw);background:#fff;color:#3d3d3d;
  border:0;border-radius:16px;overflow:hidden;
  box-shadow:0 24px 60px rgba(0,0,0,.28),0 0 0 1px rgba(0,0,0,.06);
}
[data-theme="arabicref"] #memberCardModal .mc-banner{
  height:204px;border-radius:0;border-bottom:0;
  background-color:rgb(var(--ar-room-primary-rgb,14,84,4));
}
/* صبغة لون الغرفة فوق صورة البانر (إن وجدت) — البانر يبقى ظاهرًا غير مطموس */
[data-theme="arabicref"] #memberCardModal .ar-hero{
  position:absolute;inset:0;display:flex;flex-direction:column;
  background:linear-gradient(180deg,rgba(var(--ar-room-primary-rgb,14,84,4),.42),rgba(var(--ar-room-primary-rgb,14,84,4),.9));
}
[data-theme="arabicref"] #memberCardModal .mc-banner::after{content:none}
[data-theme="arabicref"] #memberCardModal .mc-banner-pattern{opacity:.18}
/* أزرار الأيقونات والإغلاق — 40×40، هوامش 8px وفراغ 4px كالمرجع:
   يسار: إغلاق/متابعة/إبلاغ — يمين: صوت الملف + زر الخاص */
[data-theme="arabicref"] #memberCardModal .ar-hero-controls{position:absolute;top:8px;left:8px;display:flex;gap:4px;z-index:6}
[data-theme="arabicref"] #memberCardModal .ar-hero-msg{position:absolute;top:8px;right:8px;display:flex;gap:4px;z-index:6}
[data-theme="arabicref"] #memberCardModal .ar-card-iconbtn{
  width:40px;height:40px;border:none;border-radius:8px;background:rgba(255,255,255,.14);
  color:#fff;font-size:17px;line-height:1;cursor:pointer;padding:0;
}
[data-theme="arabicref"] #memberCardModal .ar-card-iconbtn:hover{background:rgba(255,255,255,.26)}
/* الإغلاق الحقيقي وزر الصوت يُنقلان داخل المجموعتين فيصبحان static */
[data-theme="arabicref"] #memberCardModal .mc-close{
  position:static;top:auto;inset-inline-end:auto;z-index:auto;width:40px;height:40px;border-radius:8px;
  border:0;background:rgba(255,255,255,.14);color:#fff;font-size:20px;
}
[data-theme="arabicref"] #memberCardModal .mc-audio{
  position:static;top:auto;inset-inline-start:auto;z-index:auto;margin:0;width:40px;height:40px;border-radius:8px;
  border:0;background:rgba(255,255,255,.14);color:#fff;font-size:17px;
}
/* الهوية داخل الـhero — عمود مركزي كالمرجع: avatar 88 أعلى بـ52px ثم الرتبة ثم الاسم 24px ثم @username */
[data-theme="arabicref"] #memberCardModal .ar-identity{
  position:relative;z-index:5;
  display:flex;flex-direction:column;align-items:center;gap:0;
  padding:48px 16px 0;
}
[data-theme="arabicref"] #memberCardModal .ar-identity .mc-avatar-wrap{
  position:relative;top:auto;inset-inline-start:auto;inset-inline-end:auto;left:auto;right:auto;
  width:88px;height:88px;margin:0;align-self:center;z-index:3;
}
[data-theme="arabicref"] #memberCardModal .ar-identity .mc-avatar{
  width:88px;height:88px;object-fit:cover;border:0;border-radius:50%;background:#fff;
  box-shadow:0 0 0 6px rgba(255,255,255,.14),0 6px 18px rgba(0,0,0,.18);
}
[data-theme="arabicref"] #memberCardModal .ar-identity .mc-avatar-fallback{width:88px;height:88px;line-height:88px;font-size:34px;border-radius:50%}
[data-theme="arabicref"] #memberCardModal .ar-identity .mc-online-dot{width:20px;height:20px;border:2px solid #fff;bottom:4px;right:4px;left:auto;z-index:4}
[data-theme="arabicref"] #memberCardModal .ar-identity .mc-role{
  position:static;margin:2px 0 0;align-self:center;z-index:3;
  text-align:center;font-size:12px;font-weight:800;color:#fff;letter-spacing:0;
  background:rgba(var(--rb,110,110,110),.55);border:1px solid rgba(var(--rb,160,160,160),.9);border-radius:999px;
  padding:3px 11px;text-shadow:0 1px 3px rgba(0,0,0,.35);
}
[data-theme="arabicref"] #memberCardModal .ar-identity .mc-name{
  position:static;margin:0;align-self:center;z-index:3;
  text-align:center;padding:0;font-size:24px;font-weight:700;color:#fff;line-height:1.15;
  text-shadow:0 2px 8px rgba(0,0,0,.35);
}
[data-theme="arabicref"] #memberCardModal .ar-identity .mc-username{
  position:static;margin:1px 0 0;align-self:center;z-index:3;
  text-align:center;color:rgba(255,255,255,.85);font-size:11.5px;line-height:1.2;text-shadow:0 1px 4px rgba(0,0,0,.3);
}
[data-theme="arabicref"] #memberCardModal .ar-identity .mc-crown{position:static;display:inline-block;margin-inline-start:6px;box-shadow:none;vertical-align:-2px}
/* ما تحت الـhero: أقسام بيضاء نظيفة */
[data-theme="arabicref"] #memberCardModal .mc-frame{
  display:block;position:relative;background:#fff;padding:14px 20px 16px;
}
[data-theme="arabicref"] #memberCardModal .mc-sub,
[data-theme="arabicref"] #memberCardModal .mc-sub-end{
  text-align:center;font-size:11.5px;color:#6b6b6b;background:#faf7ee;border-radius:8px;
  padding:4px 10px;margin:10px 0 0;
}
[data-theme="arabicref"] #memberCardModal .mc-sub-end{color:#8a7f66}
[data-theme="arabicref"] #memberCardModal .mc-bio{color:#555;font-size:13px;padding:8px 2px 2px;text-align:start}
[data-theme="arabicref"] #memberCardModal .mc-statusline{color:#666;font-size:12.5px;text-align:start;padding:2px 0 4px;font-weight:700}
/* صفوف المعلومات 38px بفاصل ملوّن من لون الغرفة كالمرجع (بدون حد علوي) + أيقونة SVG قبل التسمية */
[data-theme="arabicref"] #memberCardModal .mc-info{background:transparent;border:0;border-radius:0;padding:4px 0 0;margin:8px 0 0}
[data-theme="arabicref"] #memberCardModal .mc-info-row{
  display:flex;justify-content:space-between;align-items:center;gap:8px;
  min-height:38px;padding:8px 2px;border-bottom:1px solid rgba(var(--ar-room-primary-rgb,14,84,4),.18);
  border-top:0;
  font-size:14px;border-radius:0;background:transparent;
}
[data-theme="arabicref"] #memberCardModal .mc-info-row:last-child{border-bottom:0}
[data-theme="arabicref"] #memberCardModal .mc-info-row .ar-rowicon{
  width:14px;height:14px;flex:0 0 auto;color:#444;opacity:.85;margin-inline-end:6px;
}
[data-theme="arabicref"] #memberCardModal .mc-info-row span{color:#444;font-weight:800;font-size:14px;display:inline-flex;align-items:center}
[data-theme="arabicref"] #memberCardModal .mc-info-row b{color:#444;font-weight:400;font-size:14px;direction:ltr;unicode-bidi:plaintext}
[data-theme="arabicref"] #memberCardModal .mc-info-row.mc-link b{color:#3f7fbf;cursor:pointer}
[data-theme="arabicref"] #memberCardModal .mc-info-row b .rm-flag-img,
[data-theme="arabicref"] #memberCardModal .mc-flag-inline{box-shadow:0 0 0 1px rgba(0,0,0,.12)}
[data-theme="arabicref"] #memberCardModal .rm-card-flag{box-shadow:0 0 0 1px rgba(0,0,0,.12)}
/* الإحصاءات: شرائح فاتحة بلمسة لون الغرفة */
[data-theme="arabicref"] #memberCardModal .mc-stats{display:flex;gap:6px;margin-top:8px}
[data-theme="arabicref"] #memberCardModal .mc-stat{
  flex:1;background:#faf7ee;border:1px solid #eee7d2;border-radius:10px;padding:6px 2px;text-align:center;color:#444;
}
[data-theme="arabicref"] #memberCardModal .mc-stat b{display:block;color:rgb(var(--ar-room-primary-rgb,14,84,4));font-size:12.5px}
[data-theme="arabicref"] #memberCardModal .mc-stat span{color:#777;font-size:10px}
/* الأزرار: أساسي بلون الغرفة + ثانوية فاتحة */
[data-theme="arabicref"] #memberCardModal .mc-actions{display:flex;gap:7px;margin-top:10px}
[data-theme="arabicref"] #memberCardModal .mc-btn{
  background:rgb(var(--ar-room-primary-rgb,14,84,4));color:#fff;border:0;border-radius:9px;
  font-size:12.5px;padding:9px 12px;font-weight:700;
}
[data-theme="arabicref"] #memberCardModal .mc-btn.mc-block,
[data-theme="arabicref"] #memberCardModal .mc-btn.mc-report{background:#f1ece2;border:0;color:#8a5a5a}
[data-theme="arabicref"] #memberCardModal .mc-btn.mc-like{background:#faf3dd;border:1px solid #e8d9a8;color:#8a6d1f}
[data-theme="arabicref"] #memberCardModal .mc-editbtn{
  margin-top:8px;background:#faf7ee;border:1px dashed #cbbf9d;color:#7a6a35;border-radius:9px;font-size:12.5px;
}
/* تبويبات الملف الخاص (بطاقتي) — نفس الأسلوب الفاتح */
[data-theme="arabicref"] #memberCardModal .rm-ptabs{background:#faf7ee;border:1px solid #eee7d2}
[data-theme="arabicref"] #memberCardModal .rm-ptab{color:#8a7f66}
[data-theme="arabicref"] #memberCardModal .rm-ptab:hover{color:#444;background:#f1ead6}
[data-theme="arabicref"] #memberCardModal .rm-ptab.active{background:rgb(var(--ar-room-primary-rgb,14,84,4));color:#fff;box-shadow:none}
[data-theme="arabicref"] #memberCardModal .rm-ppanel{background:#fbf9f2;border:1px solid #eee7d2}
[data-theme="arabicref"] #memberCardModal .rm-pp-hd{color:#5a5138}
[data-theme="arabicref"] #memberCardModal .rm-pp-hd.rm-pp-danger{color:#c04a5a}
[data-theme="arabicref"] #memberCardModal .rm-pp-note{color:#8a8270}
[data-theme="arabicref"] #memberCardModal .rm-pp-msg{color:#777}
[data-theme="arabicref"] #memberCardModal .rm-pp-msg2{color:#c04a5a}
[data-theme="arabicref"] #memberCardModal .rm-pp-lb{color:#555}
[data-theme="arabicref"] #memberCardModal .rm-pp-sel,
[data-theme="arabicref"] #memberCardModal .rm-pp-inp{background:#fff;border:1px solid #ddd4bd;color:#444}
[data-theme="arabicref"] #memberCardModal .rm-pp-chk{color:#555}
[data-theme="arabicref"] #memberCardModal .rm-pp-save{background:rgb(var(--ar-room-primary-rgb,14,84,4))}
[data-theme="arabicref"] #memberCardModal .rm-pp-delbtn{background:#c04a5a}
[data-theme="arabicref"] #memberCardModal .rm-fr-item{background:#fff;border:1px solid #eee7d2}
[data-theme="arabicref"] #memberCardModal .rm-fr-av{border:1px solid #eee7d2}
[data-theme="arabicref"] #memberCardModal .rm-fr-avph{background:#e8e2d2;color:#777}
[data-theme="arabicref"] #memberCardModal .rm-fr-nm{color:#444}
[data-theme="arabicref"] #memberCardModal .rm-fr-btn{background:#fff;color:#777;border:1px solid #ddd4bd}
[data-theme="arabicref"] #memberCardModal .rm-fr-btn.ok{background:rgb(var(--ar-room-primary-rgb,14,84,4));border-color:transparent;color:#fff}
[data-theme="arabicref"] #memberCardModal .rm-fr-btn.warn:hover{color:#c04a5a}
[data-theme="arabicref"] #memberCardModal .rm-fr-empty{color:#999}
/* الجوال: نفس البنية المركزية بارتفاع hero مضغوط قليلًا */
@media (max-width:768px){
  [data-theme="arabicref"] #memberCardModal .mc-banner{height:196px}
  [data-theme="arabicref"] #memberCardModal .ar-identity{padding-top:42px}
  [data-theme="arabicref"] #memberCardModal .ar-identity .mc-avatar-wrap{width:76px;height:76px}
  [data-theme="arabicref"] #memberCardModal .ar-identity .mc-avatar,
  [data-theme="arabicref"] #memberCardModal .ar-identity .mc-avatar-fallback{width:76px;height:76px;line-height:76px}
  [data-theme="arabicref"] #memberCardModal .ar-identity .mc-name{font-size:20px}
}
/* معاينة مظهر الغرفة في محرر الإدارة */
[data-theme="arabicref"] .ar-room-preview{border:1px solid var(--ar-line-2)}

/* ============================================================
   Pre-R3c: Badge الرتبة الموحد — من الرتبة الحقيقية في النظام فقط
   (owner/admin/super_admin/senior_moderator/moderator/vip/member/guest)
   نفس الشكل في: الهيدر + صفوف المتواجدين + بطاقة العضو
   owner ذهبي • admin عنابي • moderator بنفسجي • vip ذهبي فاتح • member محايد
   ============================================================ */
[data-theme="arabicref"] .role-owner{--rb:201,162,39;--rb-t:#7a5c0a}
[data-theme="arabicref"] .role-admin{--rb:143,21,56;--rb-t:#8f1538}
[data-theme="arabicref"] .role-super_admin{--rb:168,15,50;--rb-t:#a80f32}
[data-theme="arabicref"] .role-senior_moderator{--rb:122,38,80;--rb-t:#7a2650}
[data-theme="arabicref"] .role-moderator{--rb:107,55,83;--rb-t:#6b3753}
[data-theme="arabicref"] .role-vip{--rb:154,106,0;--rb-t:#8a6a10}
[data-theme="arabicref"] .role-member{--rb:102,102,102;--rb-t:#555555}
[data-theme="arabicref"] .role-guest{--rb:136,136,136;--rb-t:#666666}
/* الهيدر + صفوف المتواجدين: خلفية فاتحة بلون الرتبة ونص داكن مقروء */
[data-theme="arabicref"] .status .top-role,
[data-theme="arabicref"] #usersList .ar-rank-badge{
  display:inline-flex;align-items:center;gap:3px;
  font-size:10.5px;font-weight:800;line-height:1.5;white-space:nowrap;
  padding:2px 9px;border-radius:999px;margin:0;
  color:var(--rb-t,#555555);
  background:rgba(var(--rb,102,102,102),.13);
  border:1px solid rgba(var(--rb,102,102,102),.6);
  text-shadow:none;flex:0 0 auto;
}
[data-theme="arabicref"] .status .top-role{margin-inline:7px;height:auto;min-width:0}
/* الهيدر أخضر داكن: نص فاتح وحد بلون الرتبة حتى يظهر الـBadge بوضوح */
[data-theme="arabicref"] .rm-header .top-role{
  color:#ffe9b0;text-shadow:0 1px 2px rgba(0,0,0,.4);
  background:rgba(255,255,255,.13);
  border:1px solid rgba(var(--rb,201,162,39),.85);
}
/* صف العضو: Badge بجانب الاسم على نفس السطر، وأسفله bioShort كما هو */
[data-theme="arabicref"] #usersList .ar-rank-badge{order:1;margin-inline-start:2px}
/* Identity Cleanup — صف المتواجدين: اللقب المزخرف (display name المصبوغ) هو سطر الاسم الوحيد.
   لا شارة رتبة مكررة (.u-role من الرندر الأساسي + .ar-rank-badge من التحسين) ولا نبذة مصغرة
   (.rm-usub / bioShort) داخل الصف — الرتبة والنبذة تُقرأ من الملف الشخصي فقط.
   يبقى في الصف: الحالة، الصورة، اللقب، «رتبة النشاط»، «أنت»، المايك، الإبلاغ. */
[data-theme="arabicref"] #usersList .user .u-role,
[data-theme="arabicref"] #usersList .user .ar-rank-badge,
[data-theme="arabicref"] #usersList .user .rm-usub{display:none!important}
/* الصف يتمدد لأسطره الإضافية (Badge/اللقب) — الارتفاع 48 يبقى لأصفار السطر الواحد عبر min-height */
[data-theme="arabicref"] #usersList .user{max-height:none}
/* بطاقة العضو فوق البنر: نص أبيض على لون الرتبة الأقوى (التخطيط في قسم البطاقة أعلاه) */
[data-theme="arabicref"] #memberCardModal .ar-identity .mc-role{color:#fff}
/* عند وجود لافتة العضو (rbanner) في الـhero: اللافتة تنزل لأسفل الـhero بعيدًا عن الهوية المركزية */
[data-theme="arabicref"] #memberCardModal .ar-has-bntitle .mc-bn-titlewrap{
  top:auto;bottom:8px;left:12px;right:12px;text-align:start;transform:none;
}
@media(max-width:760px){
  [data-theme="arabicref"] .status .top-role{font-size:10px;padding:2px 7px}
  [data-theme="arabicref"] #usersList .ar-rank-badge{font-size:9.5px;padding:2px 7px}
}
/* ===== الجوال ≤640px: عمود واحد — الشات ثم اللوحة السفلية (نفس سلوك الأساس، بدون أعمدة جانبية) ===== */
@media(max-width:640px){
  [data-theme="arabicref"] .workspace{
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:"main" "side";
    grid-template-rows:minmax(0,1fr) auto;
    gap:0;height:auto;min-height:calc(100vh - 92px);
  }
  [data-theme="arabicref"] #rmLeftAd{display:none}
  [data-theme="arabicref"] .side{border-inline-start:none;border-top:1px solid #e5e0d2}
  [data-theme="arabicref"] .users-panel{max-height:190px}
  [data-theme="arabicref"] .rooms-panel{display:none}
  /* الهيدر: الحالة تأخذ المساحة المتبقية (الشعار النصي يبقى داخل قائمة ☰)، بلا overflow */
  [data-theme="arabicref"] .rm-status{flex:1 1 auto;text-align:center}
  [data-theme="arabicref"] .rm-brand{display:none}
  [data-theme="arabicref"] .rm-header .top-role{font-size:9.5px;padding:2px 6px;margin-inline:4px}
}


/* ============================================================
   «ملفي الشخصي» — الواجهة المرجعية (arabicref فقط) — إعادة تنفيذ مستقلة
   المرجع: خيارات ⚙ → ملفي الشخصي (pe_modal 560px / hero 204 / tabs 44 / حقول 2×258)
   البيانات والحفظ من نظامنا الحقيقي عبر /api/profile + /api/profile-bio.
   ============================================================ */
[data-theme="arabicref"] #myProfileModal .mp-modal{
  width:560px;max-width:94vw;height:470px;max-height:88vh;
  background:#fff;border-radius:16px;overflow:hidden;
  display:flex;flex-direction:column;
  box-shadow:0 18px 60px rgba(0,0,0,.28);
}
/* الـhero — أخضر الهوية بتدرج المرجع (تحت → فوق تعتيم خفيف) */
[data-theme="arabicref"] #myProfileModal .mp-hero{
  position:relative;flex:0 0 auto;
  height:auto;min-height:204px;display:flex;flex-direction:column;align-items:center;
  background:linear-gradient(0deg, rgba(0,0,0,.30), rgba(0,0,0,.06)), var(--ar-green);
}
[data-theme="arabicref"] #myProfileModal .mp-close{
  position:absolute;top:8px;left:8px;z-index:6;
  width:36px;height:36px;border:0;border-radius:50%;cursor:pointer;
  background:rgba(0,0,0,.28);color:#fff;font-size:16px;line-height:1;
}
[data-theme="arabicref"] #myProfileModal .mp-close:hover{background:rgba(0,0,0,.42)}
/* الصورة 88×88 مركزية — أعلى 52px — حلقة بيضاء 2px كالمرجع */
[data-theme="arabicref"] #myProfileModal .mp-avbox{
  position:relative;margin-top:52px;width:88px;height:88px;flex:0 0 auto;
}
[data-theme="arabicref"] #myProfileModal .mp-avatar{
  width:88px;height:88px;border-radius:50%;object-fit:cover;background:#fbf8f0;
  box-shadow:0 0 0 2px #fff, 0 4px 14px rgba(0,0,0,.12);
}
[data-theme="arabicref"] #myProfileModal .mp-cam{
  position:absolute;bottom:0;left:0;z-index:2;
  width:30px;height:30px;border:2px solid #fff;border-radius:50%;cursor:pointer;
  background:var(--ar-green-deep);color:#fff;font-size:13px;line-height:1;padding:0;
}
[data-theme="arabicref"] #myProfileModal .mp-who{
  margin-top:auto;width:calc(100% - 32px);text-align:center;padding-top:6px;padding-bottom:16px;
}
[data-theme="arabicref"] #myProfileModal .mp-rank{
  font-size:14px;font-weight:700;color:#fff;line-height:1.4;
  text-shadow:0 1px 3px rgba(0,0,0,.35);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
[data-theme="arabicref"] #myProfileModal .mp-name{
  font-size:24px;font-weight:700;line-height:1.2;color:#fff;
  text-shadow:0 1px 4px rgba(0,0,0,.3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
/* التبويبات — 44px، مؤشر سفلي 2px بلون الهوية */
[data-theme="arabicref"] #myProfileModal .mp-tabs{
  flex:0 0 auto;display:flex;gap:2px;background:#fff;padding:0 8px;
  border-bottom:1px solid var(--ar-line);
}
[data-theme="arabicref"] #myProfileModal .mp-tab{
  position:relative;height:44px;padding:0 14px;border:0;background:none;cursor:pointer;
  font:600 14px/1 "Noto Kufi Arabic",system-ui,sans-serif;color:var(--ar-muted);
}
[data-theme="arabicref"] #myProfileModal .mp-tab.on{color:var(--ar-ink)}
[data-theme="arabicref"] #myProfileModal .mp-tab.on::after{
  content:"";position:absolute;inset-inline:10px;bottom:0;height:2px;border-radius:2px 2px 0 0;
  background:var(--ar-green);
}
/* اللوحات — تمرير داخلي، شبكة عمودين بعرض حقل 258px كالمرجع */
[data-theme="arabicref"] #myProfileModal .mp-panels{flex:1 1 auto;min-height:0;overflow-y:auto;background:#fff}
[data-theme="arabicref"] #myProfileModal .mp-panel{padding:14px 20px 16px}
[data-theme="arabicref"] #myProfileModal .mp-grid{
  display:grid;grid-template-columns:1fr 1fr;gap:12px 12px;direction:rtl;
}
[data-theme="arabicref"] #myProfileModal .mp-field{display:flex;flex-direction:column;gap:6px;min-width:0}
[data-theme="arabicref"] #myProfileModal .mp-field-wide{grid-column:1 / -1}
[data-theme="arabicref"] #myProfileModal .mp-label{font-size:12px;font-weight:600;color:#444}
[data-theme="arabicref"] #myProfileModal .mp-pick{
  min-height:40px;background:rgba(128,128,128,.08);border-radius:10px;padding:0 12px;
  display:flex;align-items:center;
}
[data-theme="arabicref"] #myProfileModal .mp-pick input,
[data-theme="arabicref"] #myProfileModal .mp-pick textarea,
[data-theme="arabicref"] #myProfileModal .mp-pick select{
  width:100%;border:0;background:none;outline:none;resize:none;
  font:400 14px/1.5 "Noto Kufi Arabic",system-ui,sans-serif;color:#444;padding:0;
}
[data-theme="arabicref"] #myProfileModal .mp-pick textarea{padding:8px 0}
[data-theme="arabicref"] #myProfileModal .mp-pick-sel{position:relative;padding-inline-end:26px}
[data-theme="arabicref"] #myProfileModal .mp-pick-sel::after{
  content:"▾";position:absolute;inset-inline-end:10px;top:50%;transform:translateY(-50%);
  font-size:13px;color:#444;pointer-events:none;
}
[data-theme="arabicref"] #myProfileModal .mp-pick-col{flex-direction:column;align-items:stretch;gap:2px;padding:6px 12px}
[data-theme="arabicref"] #myProfileModal .mp-check{
  display:flex;align-items:center;gap:7px;font-size:12.5px;font-weight:600;color:#444;cursor:pointer;
}
[data-theme="arabicref"] #myProfileModal .mp-check input{width:15px;height:15px;accent-color:var(--ar-green);margin:0}
[data-theme="arabicref"] #myProfileModal .mp-check-row{min-height:32px}
/* الحفظ — حبة دواء 36px بلون الهوية كزر المرجع */
[data-theme="arabicref"] #myProfileModal .mp-actions{display:flex;align-items:center;gap:12px;margin-top:16px}
[data-theme="arabicref"] #myProfileModal .mp-save{
  height:36px;padding:0 18px;border:0;border-radius:999px;cursor:pointer;
  background:var(--ar-green);color:#fff;font:600 14px/1 "Noto Kufi Arabic",system-ui,sans-serif;
}
[data-theme="arabicref"] #myProfileModal .mp-save:disabled{opacity:.6;cursor:default}
[data-theme="arabicref"] #myProfileModal .mp-save:hover{background:var(--ar-green-deep)}
[data-theme="arabicref"] #myProfileModal .mp-msg{font-size:12.5px;color:var(--ar-muted)}
/* تبويب الحساب — يستضيف أقسامنا الحقيقية (pfMailSection) بنفسها */
[data-theme="arabicref"] #myProfileModal .mp-account-slot{display:block}
/* المظهر — يستضيف pfDyeSection الحقيقية (صبغة الاسم) */
[data-theme="arabicref"] #myProfileModal .mp-dye-slot{display:block;padding-top:2px}
/* الأصدقاء/تجاهل — يستضيفان عرض rmProfileFriends/rmProfileIgnore الأساسي */
[data-theme="arabicref"] #myProfileModal .mp-list-body{display:block;padding-top:2px}
[data-theme="arabicref"] #myProfileModal .mp-list-body .rm-pp-hd{font-size:12.5px;font-weight:700;color:#444;margin:4px 0 8px}
[data-theme="arabicref"] #myProfileModal .mp-list-body .rm-pp-msg,[data-theme="arabicref"] #myProfileModal .mp-list-body .rm-pp-note,
[data-theme="arabicref"] #myProfileModal .mp-list-body .rm-fr-empty{font-size:12.5px;color:#8a8a8a;padding:10px 0}
[data-theme="arabicref"] #myProfileModal .mp-list-body .rm-fr-item{display:flex;align-items:center;gap:9px;padding:7px 0;border-bottom:1px solid #f1f1f1}
[data-theme="arabicref"] #myProfileModal .mp-list-body .rm-fr-av{width:34px;height:34px;border-radius:50%;object-fit:cover}
[data-theme="arabicref"] #myProfileModal .mp-list-body .rm-fr-avw{flex:0 0 auto}
[data-theme="arabicref"] #myProfileModal .mp-list-body .rm-fr-avph{display:flex;align-items:center;justify-content:center;background:rgba(128,128,128,.14);font-weight:700;color:#666}
[data-theme="arabicref"] #myProfileModal .mp-list-body .rm-fr-nm{font-size:13.5px;font-weight:600;color:#333;cursor:pointer;flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
[data-theme="arabicref"] #myProfileModal .mp-list-body .rm-fr-on{width:8px;height:8px;border-radius:50%;background:#2fb457;display:inline-block;margin-inline-start:6px}
[data-theme="arabicref"] #myProfileModal .mp-list-body .rm-fr-btn{
  flex:0 0 auto;height:30px;padding:0 12px;border:0;border-radius:999px;cursor:pointer;
  background:rgba(128,128,128,.10);color:#555;font:600 12px/1 "Noto Kufi Arabic",system-ui,sans-serif;
}
[data-theme="arabicref"] #myProfileModal .mp-list-body .rm-fr-btn.ok{background:var(--ar-green);color:#fff}
[data-theme="arabicref"] #myProfileModal .mp-list-body .rm-fr-btn.warn{background:rgba(196,60,60,.12);color:#c43c3c}
/* المزيد — حذف عضوية (نفس صفوف المرجع الحمراء) */
[data-theme="arabicref"] #myProfileModal .mp-delrow{
  height:36px;padding:0 18px;border:0;border-radius:999px;cursor:pointer;
  background:rgba(196,60,60,.10);color:#c43c3c;font:600 13px/1 "Noto Kufi Arabic",system-ui,sans-serif;
}
[data-theme="arabicref"] #myProfileModal .mp-delrow:hover{background:rgba(196,60,60,.18)}
[data-theme="arabicref"] #myProfileModal .mp-delbox{
  display:flex;flex-direction:column;gap:8px;margin-top:12px;padding:12px;
  background:rgba(196,60,60,.05);border:1px solid rgba(196,60,60,.25);border-radius:12px;
}
[data-theme="arabicref"] #myProfileModal .mp-delbox.hidden{display:none}
[data-theme="arabicref"] #myProfileModal .mp-delbox input{
  height:40px;border:0;background:rgba(128,128,128,.08);border-radius:10px;padding:0 12px;outline:none;
  font:400 14px/1.4 "Noto Kufi Arabic",system-ui,sans-serif;color:#444;
}
[data-theme="arabicref"] #myProfileModal .mp-danger{
  height:36px;border:0;border-radius:999px;cursor:pointer;align-self:flex-start;padding:0 18px;
  background:#c43c3c;color:#fff;font:600 13px/1 "Noto Kufi Arabic",system-ui,sans-serif;
}
/* الجوال — 390×844: عرض كامل، hero مضغوط، شبكة بعمود واحد */
@media (max-width:768px){
  [data-theme="arabicref"] #myProfileModal .mp-modal{width:100%;max-width:none;max-height:100dvh;height:100dvh;border-radius:0}
  [data-theme="arabicref"] #myProfileModal .mp-hero{height:auto;min-height:196px}
  [data-theme="arabicref"] #myProfileModal .mp-avbox{margin-top:42px;width:76px;height:76px}
  [data-theme="arabicref"] #myProfileModal .mp-avatar{width:76px;height:76px}
  [data-theme="arabicref"] #myProfileModal .mp-grid{grid-template-columns:1fr}
  [data-theme="arabicref"] #myProfileModal .mp-panel{padding:12px 14px 14px}
  [data-theme="arabicref"] #myProfileModal .mp-tabs{overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
  [data-theme="arabicref"] #myProfileModal .mp-tabs::-webkit-scrollbar{display:none}
  [data-theme="arabicref"] #myProfileModal .mp-tab{flex:0 0 auto}
  [data-theme="arabicref"] #myProfileModal .mp-bio{font-size:12px;-webkit-line-clamp:2}
}
/* ===== إعلانات الشات داخل عمود الشات (arabicref) — الشريحة تنكمش الرسائل فقط، لا تحريك الشات ===== */
[data-theme="arabicref"] .center-panel>.rm-slot{flex:0 0 auto;width:100%;max-width:728px;margin:0 auto 8px}
[data-theme="arabicref"] .center-panel>#rmChatBottomAd{margin:8px auto}
[data-theme="arabicref"] .center-panel>#rmChatBottomAd+.composer{margin-top:0}
/* Mock Ads المحلية (?debug_ads=1) — اختبار تخطيط فقط، لا علاقة بـAdSense */
[data-theme="arabicref"] .ar-mock-ad{
  display:flex;align-items:center;justify-content:center;
  background:repeating-linear-gradient(45deg,#1c2333,#1c2333 14px,#232b40 14px,#232b40 28px);
  border:1px dashed #4a5a7d;border-radius:8px;color:#9fb4d8;
  font:600 13px/1 "Noto Kufi Arabic",system-ui,sans-serif;letter-spacing:.5px;
}
[data-theme="arabicref"] .rm-left-ad .ar-mock-ad,[data-theme="arabicref"] .rm-right-ad .ar-mock-ad{width:160px;height:600px}
/* الجوال: لا سكك جانبية ولا شريحة علوية عريضة — تُخفى بالطريقة الصحيحة */
@media (max-width:768px){
  [data-theme="arabicref"] .rm-left-ad,[data-theme="arabicref"] .rm-right-ad{display:none!important}
  [data-theme="arabicref"] .center-panel>.rm-slot{max-width:100%}
}
/* ===== الملف الموحد: وضع العرض (بطاقة العضو داخل واجهة ملفي) ===== */
[data-theme="arabicref"] #myProfileModal .mp-field input:disabled,
[data-theme="arabicref"] #myProfileModal .mp-field textarea:disabled,
[data-theme="arabicref"] #myProfileModal .mp-field select:disabled{opacity:.82;background:#faf8f2;color:#555;cursor:default}
[data-theme="arabicref"] #myProfileModal .mp-view-strip{display:flex;flex-direction:column;gap:10px;padding:10px 0 2px;border-top:1px dashed #e7e0cf}
[data-theme="arabicref"] #myProfileModal .mp-view-rows{display:grid;gap:6px}
[data-theme="arabicref"] #myProfileModal .mp-view-row{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:#4a463c}
[data-theme="arabicref"] #myProfileModal .mp-view-row span{color:#8a8577;font-weight:700}
[data-theme="arabicref"] #myProfileModal .mp-view-row b{font-weight:700;text-align:end;word-break:break-word}
[data-theme="arabicref"] #myProfileModal .mc-stats{display:flex;gap:6px;margin-top:0}
[data-theme="arabicref"] #myProfileModal .mc-stat{flex:1;background:#faf7ee;border:1px solid #eee7d2;border-radius:10px;padding:6px 2px;text-align:center;color:#444}
[data-theme="arabicref"] #myProfileModal .mc-stat b{display:block;color:rgb(var(--ar-room-primary-rgb,14,84,4));font-size:12.5px}
[data-theme="arabicref"] #myProfileModal .mc-stat span{color:#777;font-size:10px}
[data-theme="arabicref"] #myProfileModal .mc-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:0}
[data-theme="arabicref"] #myProfileModal .mc-btn{background:rgb(var(--ar-room-primary-rgb,14,84,4));color:#fff;border:0;border-radius:9px;font-size:12.5px;padding:9px 12px;font-weight:700;cursor:pointer}
[data-theme="arabicref"] #myProfileModal .mc-btn.mc-block,[data-theme="arabicref"] #myProfileModal .mc-btn.mc-report{background:#f1ece2;border:0;color:#8a5a5a}
[data-theme="arabicref"] #myProfileModal .mc-btn.mc-like{background:#faf3dd;border:1px solid #e8d9a8;color:#8a6d1f}
[data-theme="arabicref"] #myProfileModal .mc-msg{font-size:12px;color:#7a7568;min-height:14px}
[data-theme="arabicref"] #myProfileModal .mc-social{display:flex;gap:8px;justify-content:center}
/* ===== Rich Member View — وضع العرض الغني لملف عضو آخر (عرض فقط) =====
   إخفاء نموذج التحرير بالكامل: الحقول المعطلة استُبدلت بصفوف قراءة أنظف */
[data-theme="arabicref"] #myProfileModal.mp-member-mode .mp-grid,
[data-theme="arabicref"] #myProfileModal.mp-member-mode .mp-actions{display:none}
[data-theme="arabicref"] #myProfileModal .mp-soc-label{font-size:11.5px;font-weight:700;color:#8a8577;text-align:center}
[data-theme="arabicref"] #myProfileModal .mc-social .mc-soc-link{
  display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;
  background:#faf7ee;border:1px solid #eee7d2;color:rgb(var(--ar-room-primary-rgb,14,84,4));
  font-size:15px;text-decoration:none}
[data-theme="arabicref"] #myProfileModal .mc-social .mc-soc-link:hover{background:#f1ead8}
[data-theme="arabicref"] #myProfileModal .mp-view-copy{
  background:rgb(var(--ar-room-primary-rgb,14,84,4));color:#fff;border:0;border-radius:8px;
  font-size:11.5px;font-weight:700;padding:5px 10px;cursor:pointer}
[data-theme="arabicref"] #myProfileModal .mp-yt-facade{
  position:relative;overflow:hidden;border-radius:12px;border:1px solid #eee7d2;cursor:pointer;
  background:#111;aspect-ratio:16/9}
[data-theme="arabicref"] #myProfileModal .mp-yt-facade img{width:100%;height:100%;object-fit:cover;display:block;opacity:.92}
[data-theme="arabicref"] #myProfileModal .mp-yt-facade.no-thumb img{display:none}
[data-theme="arabicref"] #myProfileModal .mp-yt-play{
  position:absolute;top:50%;right:50%;transform:translate(50%,-50%);
  width:46px;height:32px;border-radius:9px;background:rgba(200,30,30,.92);color:#fff;
  display:flex;align-items:center;justify-content:center;font-size:15px;box-shadow:0 4px 14px rgba(0,0,0,.35)}
[data-theme="arabicref"] #myProfileModal .mp-yt-open{
  position:absolute;bottom:6px;right:8px;font-size:10.5px;font-weight:700;color:#fff;
  background:rgba(0,0,0,.55);border-radius:7px;padding:3px 8px}
@media (max-width:768px){
  [data-theme="arabicref"] #myProfileModal .mp-yt-facade{aspect-ratio:16/9}
  [data-theme="arabicref"] #myProfileModal .mp-view-row{font-size:12.5px}
}
/* ===== هوية الهيدر الموحد: رتبة → username → لقب (ثلاثة أسطر مستقلة) ===== */
[data-theme="arabicref"] #myProfileModal .mp-user{font-size:13.5px;font-weight:700;color:rgba(255,255,255,.92);letter-spacing:.2px;margin:2px 0 3px;text-shadow:0 1px 2px rgba(0,0,0,.35);word-break:break-all}
[data-theme="arabicref"] #myProfileModal .mp-who{display:flex;flex-direction:column;align-items:center}
/* سطر النبذة داخل الهيدر — أصغر من اللقب، سطران كحد أقصى، لا يلامس التبويبات */
[data-theme="arabicref"] #myProfileModal .mp-bio{
  margin:4px 0 0;max-width:100%;text-align:center;
  font-size:12.5px;font-weight:600;line-height:1.5;color:rgba(255,255,255,.9);
  text-shadow:0 1px 3px rgba(0,0,0,.4);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  overflow-wrap:anywhere;
}
[data-theme="arabicref"] #myProfileModal .mp-bio:empty{display:none!important}
/* ===== تحكم غلاف الهيدر (تبويب المظهر — للمؤهلين فقط يظهر أصلًا) ===== */
[data-theme="arabicref"] #myProfileModal .mp-hero-ctl{display:flex;flex-direction:column;gap:6px;margin:2px 0 10px;padding:10px;border:1px dashed #e0d8c2;border-radius:10px;background:#fbf9f2}
[data-theme="arabicref"] #myProfileModal .mp-hero-lbl{font-size:12px;font-weight:700;color:#8a8577}
[data-theme="arabicref"] #myProfileModal .mp-hero-row{display:flex;gap:8px;align-items:center}
[data-theme="arabicref"] #myProfileModal .mp-hero-ctl .mp-btn-soft{background:#f1ece2;color:#6a6558}
[data-theme="arabicref"] #myProfileModal .mp-hero-ctl .mp-msg{font-size:11.5px;color:#7a7568}
