/* =========================================================
   AL BLACK RABBIT HIT - نظام تصميم موحّد لكل صفحات التطبيق
   ألوان أكثر دفئًا وراحة للعين، مناسبة لجميع الفئات العمرية،
   مع الحفاظ على شخصية العلامة (الأرنب الأسود).
   ========================================================= */

:root {
    --bg-deep: #1c1220;
    --bg-deep-2: #241a2c;
    --bg-gradient: radial-gradient(120% 120% at 50% 0%, #2c1e33 0%, #1c1220 55%, #150c18 100%);

    --surface: rgba(255, 255, 255, 0.06);
    --surface-solid: #291d30;
    --surface-2: #34253d;
    --line: rgba(255, 255, 255, 0.09);

    --text: #faf6f3;
    --text-muted: #cbb9c7;
    --text-faint: #9c8a99;

    --accent-1: #ff6b6b;   /* مرجاني دافئ */
    --accent-2: #ff9f6b;   /* برتقالي دافئ */
    --accent-3: #ffc56b;   /* ذهبي */
    --accent-pink: #ff7eb3;
    --accent-purple: #a78bfa;

    --gradient-brand: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
    --gradient-soft: linear-gradient(135deg, rgba(255,107,107,0.16), rgba(167,139,250,0.16));

    --online: #4ade80;
    --danger: #ff7a7a;
    --warning-bg: #3a2e1a;
    --warning-text: #ffd9a0;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --radius-full: 999px;

    --shadow-soft: 0 8px 24px rgba(0,0,0,0.35);
    --shadow-glow: 0 0 24px rgba(255,107,107,0.25);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

button, a, .btn, input, select, textarea {
    touch-action: manipulation;
}

html, body { height: 100%; }

body {
    margin: 0;
    font-family: 'Cairo', Arial, sans-serif;
    background: var(--bg-gradient);
    color: var(--text);
}

a { color: inherit; }

/* ===== أزرار ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--radius-full);
    padding: 14px 22px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--gradient-brand);
    color: #2a1210;
    box-shadow: var(--shadow-glow);
}
.btn-primary:hover { filter: brightness(1.06); }

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
}
.btn-secondary:hover { background: var(--surface-2); }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--line);
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-block { width: 100%; }

/* ===== بطاقات / حاويات ===== */
.card {
    background: var(--surface-solid);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

/* ===== حقول الإدخال ===== */
.field { margin-bottom: 16px; text-align: start; }

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--accent-3);
}

.field input,
.field select {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.94);
    color: #201622;
    font-family: inherit;
    font-size: 1rem;
}

.field input::placeholder { color: #8a7a87; }

.field input:focus,
.field select:focus {
    outline: 2px solid var(--accent-1);
    outline-offset: 1px;
}

.error-text {
    color: var(--danger);
    font-size: 0.78rem;
    min-height: 16px;
    margin-top: 4px;
}

/* ===== شارة تنبيه ===== */
.notice {
    background: var(--warning-bg);
    color: var(--warning-text);
    font-size: 0.75rem;
    text-align: center;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

/* ===== شعار العلامة (نص متدرج) ===== */
.brand-title {
    font-weight: 900;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}

/* ===== أيقونات متحركة: الأرنب الأسود المضيء + بيت الشجرة ===== */
img.rb-rabbit { width: 100%; height: 100%; display: block; object-fit: contain; pointer-events: none; }
img.rb-tree { width: 100%; height: 100%; flex: 0 0 auto; display: block; pointer-events: none; border-radius: 50%; transition: transform .2s ease, filter .2s ease; }
button:hover img.rb-tree, button:focus-visible img.rb-tree { transform: scale(1.12) rotate(-3deg); filter: drop-shadow(0 0 7px rgba(120,255,190,.8)); }
button:active img.rb-tree { transform: scale(.94); }
button.rb-pop img.rb-tree { animation: rbPop .26s ease-out forwards; }
@keyframes rbPop { 0% { transform: scale(1); } 45% { transform: scale(1.34) rotate(7deg); filter: drop-shadow(0 0 14px #fff2a8); } 100% { transform: scale(1.12); } }
.rb-spark { position: fixed; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; pointer-events: none; z-index: 9999; box-shadow: 0 0 8px currentColor; animation: rbSpark .6s ease-out forwards; }
@keyframes rbSpark { from { transform: translate(0,0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { button.rb-pop img.rb-tree { animation: none; } .rb-spark { display: none; } }
.btn.home-btn { padding: 0; }
.header-avatar-fallback.rb-anim,
.pq-avatar-fallback.rb-anim,
.pm-avatar-fallback.rb-anim,
.avatar-placeholder.rb-anim { background: none; border: none; padding: 0; overflow: visible; }
.pq-avatar-fallback.rb-anim { width: 100%; height: 100%; }

/* ===== ربط جهاز ثانٍ (الإعدادات) ===== */
.link-device-box { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.link-device-box .hint-text { font-size: 0.8rem; color: var(--text-faint); margin: 0; }
.link-code-box { text-align: center; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.link-code-value { font-size: 1.8rem; font-weight: 800; letter-spacing: 6px; color: var(--accent-3); }
.link-code-sub { font-size: 0.75rem; color: var(--text-faint); margin-top: 4px; }
.link-device-sep { font-size: 0.8rem; color: var(--text-faint); margin-top: 6px; }
.link-status-msg { font-size: 0.82rem; min-height: 1.1em; }

/* ===== حاويات إعلانات (AdSense) — معطّلة الآن عمدًا =====
   سياسة ثابتة: لا إعلان أبدًا داخل نافذة رسائل الدردشة (chat.html) ولا داخل ساحة اللعب (game.html canvas/board).
   الحاوية فارغة ولا تُحمِّل أي سكربت طرف ثالث حتى تُفعَّل صراحة بعد الإطلاق بإضافة data-ad-slot وكود AdSense داخلها. */
.ad-slot {
    display: none;               /* تبقى مخفية حتى التفعيل الصريح لاحقًا */
    width: 100%;
    max-width: 100%;
    margin: 10px 0;
    padding: 6px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px dashed var(--line);
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-faint);
    overflow: hidden;
}
.ad-slot[data-ad-active="true"] { display: block; }   /* يُضبط لاحقًا بعد الإطلاق فقط */

/* ===== غرفة الروابط: إضافة/حذف/تثبيت ===== */
.add-link-btn { margin: 4px 0 10px; }
.add-link-form { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 8px; padding: 12px; margin-bottom: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.add-link-form input { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-family: inherit; }
.add-link-actions { display: flex; gap: 8px; }
.add-link-error { font-size: 0.78rem; color: #ff6b6b; min-height: 1.1em; }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; max-width: 420px; margin: 0 auto 8px; }
.link-row .link-numbered { flex: 1 1 auto; }
.link-row.pinned .link-numbered { border-color: var(--accent-3); }
.link-row-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.link-icon-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 0.95rem; cursor: pointer; padding: 0; }

/* ===== قبول/رفض الملاحظة المشتركة ===== */
.tag.status-accepted { color: #6bffb0; }
.tag.status-rejected { color: #ff8080; }
.note-decision { display: flex; gap: 8px; margin-top: 8px; }
.note-decision .btn { padding: 6px 14px; font-size: 0.8rem; }
.btn-accept { background: linear-gradient(135deg, #2fbf71, #1c8f56); color: #fff; border: none; border-radius: var(--radius-full); cursor: pointer; }
.btn-reject { background: linear-gradient(135deg, #d94f4f, #a83232); color: #fff; border: none; border-radius: var(--radius-full); cursor: pointer; }

/* =========================================================
   أيقونات النيون الخاصة (rb-icons.js) + تلميح الاسم + قوائم الضغط المطوّل
   ========================================================= */
.rbi {
    width: 1.3em; height: 1.3em; flex: 0 0 auto; display: inline-block; vertical-align: middle;
    fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
    filter: drop-shadow(0 0 1.5px currentColor) drop-shadow(0 0 5px var(--ic-glow, currentColor));
    transition: transform .18s ease, filter .18s ease;
    pointer-events: none;
}
.ic-bolt     { color: #ffe45c; }
.ic-book, .ic-bookopen { color: #ffb44f; }
.ic-chat     { color: #ff74c0; }
.ic-orbs     { color: #c49bff; }
.ic-paw      { color: #ff8fc8; }
.ic-lens     { color: #62e6ff; }
.ic-feather  { color: #6fffc8; }
.ic-moonmic  { color: #cfa8ff; }
.ic-stop     { color: #ff6b6b; }
.ic-comet    { color: #3a0d1c; --ic-glow: #fff3b0; }
.ic-shield   { color: #ff6b6b; }
.ic-shieldok { color: #7dffb0; }
.ic-moon     { color: #93b8ff; }
.ic-sun      { color: #ffd166; }
.ic-flame    { color: #ff6a3d; }
.ic-tablets  { color: #5ff2da; }
.ic-arrow    { color: #ffab52; }
.ic-reply    { color: #ffd76b; }
.ic-pin      { color: #ff5fd6; }
.ic-star     { color: #fff17c; }
.ic-quill    { color: #93ff7d; }
.ic-rune     { color: #7ad9ff; }
.ic-frame    { color: #66f3ff; }
.ic-chest    { color: #ffcb52; }
.ic-wheel    { color: #d6b8ff; }
.ic-seek     { color: #6fe8ff; }
.ic-eye      { color: #8affd2; }
.ic-eyeoff   { color: #b6a7c4; }
.ic-vine     { color: #7dff9e; }
.ic-plus     { color: #ff86c8; }
.ic-close    { color: #ffb3b3; }
.ic-crown    { color: #ff5c6c; }
.ic-key      { color: #ffd166; }
.ic-place    { color: #ff7a59; }
.ic-rabbit   { color: #f3e9ff; --ic-glow: #b67bff; }
.ic-door     { color: #ff8a8a; }
.ic-photo    { color: #7fd6ff; }
.ic-devices  { color: #8ab4ff; }
.ic-scroll   { color: #ffd59a; }
.ic-sparkle  { color: #fff1a8; }
.ic-calendar { color: #ffb86b; }
.ic-shieldheart { color: #6ff0ff; --ic-glow: #3fd0ff; }
.ic-heart    { color: #ff5f8f; }
.ic-siren    { color: #ff4d4d; }
.ic-phone    { color: #7dffb0; }
.ic-home     { color: #ffcf6b; }
.ic-school   { color: #8ab4ff; }
.ic-work     { color: #c9a3ff; }
.ic-hospital { color: #ff7a7a; }
.ic-tune     { color: #ff9ad5; }

/* أزرار الأيقونات: هالة نيون عند التمرير/التركيز، ونبضة عند الضغط */
[data-icon] { position: relative; }
button[data-icon]:hover .rbi, button[data-icon]:focus-visible .rbi, label[data-icon]:hover .rbi {
    transform: scale(1.14);
    filter: drop-shadow(0 0 2px currentColor) drop-shadow(0 0 9px var(--ic-glow, currentColor)) drop-shadow(0 0 16px var(--ic-glow, currentColor));
}
button[data-icon]:active .rbi { transform: scale(.9); }
.icon-btn[data-icon], .icon-round-btn[data-icon] { font-size: 1.15rem; }
.icon-btn[data-icon]:hover, .icon-round-btn[data-icon]:hover { box-shadow: 0 0 12px rgba(190, 120, 255, .35); }
.neon-menu button[data-icon] .rbi, .rb-sheet-item .rbi { width: 1.35em; height: 1.35em; margin-inline-end: 4px; }

/* تلميح الاسم (يظهر بالتمرير، أو لثانية بعد اللمس على الجوال) */
.rb-tip {
    position: fixed; z-index: 10000; pointer-events: none;
    padding: 5px 11px; border-radius: 10px; white-space: nowrap;
    font: 700 0.76rem 'Cairo', sans-serif; color: #fff;
    background: rgba(14, 6, 20, 0.94); border: 1px solid rgba(200, 140, 255, 0.55);
    box-shadow: 0 0 10px rgba(180, 110, 255, 0.45);
    opacity: 0; transform: translateY(-3px); transition: opacity .14s ease, transform .14s ease;
}
.rb-tip.show { opacity: 1; transform: none; }

/* ===== لوحة الإجراءات (قائمة الضغط المطوّل) ===== */
.rb-sheet-overlay {
    position: fixed; inset: 0; z-index: 9000; display: none;
    background: rgba(8, 3, 12, 0.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    align-items: flex-end; justify-content: center;
}
.rb-sheet-overlay.show { display: flex; }
.rb-sheet {
    width: min(520px, 100%); max-height: 82vh; overflow-y: auto;
    background: linear-gradient(180deg, #2b1d33, #1e1425);
    border: 1px solid rgba(200, 140, 255, 0.35); border-bottom: none;
    border-radius: 22px 22px 0 0; padding: 10px 10px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 30px rgba(0,0,0,.5), 0 0 22px rgba(170, 100, 255, .18);
    animation: rbSheetUp .2s ease-out;
}
@keyframes rbSheetUp { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.rb-sheet-grip { width: 42px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.22); margin: 2px auto 10px; }
.rb-sheet-head { padding: 0 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.rb-sheet-title { font-weight: 800; font-size: 0.95rem; }
.rb-sheet-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-sheet-item {
    width: 100%; display: flex; align-items: center; gap: 10px;
    background: none; border: none; color: var(--text); text-align: start;
    font: 700 0.92rem 'Cairo', sans-serif; padding: 12px 12px; border-radius: 14px; cursor: pointer;
}
.rb-sheet-item:hover, .rb-sheet-item:focus-visible { background: rgba(255,255,255,0.06); outline: none; }
.rb-sheet-item.danger { color: #ff8b8b; }
.rb-sheet-item .rb-sheet-note { margin-inline-start: auto; font-size: 0.72rem; color: var(--text-faint); font-weight: 400; }
.rb-sheet-cancel { margin-top: 6px; justify-content: center; background: rgba(255,255,255,0.05); }

/* ===== إشعار قصير ===== */
.rb-toast {
    position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%);
    z-index: 9500; padding: 9px 18px; border-radius: 14px;
    font: 700 0.85rem 'Cairo', sans-serif; color: #fff; white-space: nowrap;
    background: rgba(14, 6, 20, 0.94); border: 1px solid rgba(255, 120, 180, .5);
    box-shadow: 0 0 14px rgba(255, 90, 160, .4); opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.rb-toast.show { opacity: 1; }

/* عناصر تُفتح بالضغط المطوّل: لا تحديد نص ولا قائمة النظام */
.rb-longpress { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* ===== منتقي خلفيات الدردشة ===== */
.wp-scope { display: flex; gap: 8px; margin: 4px 4px 12px; }
.wp-scope-btn { flex: 1; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 700 0.8rem 'Cairo', sans-serif; cursor: pointer; }
.wp-scope-btn.on { border-color: #c48bff; box-shadow: 0 0 10px rgba(196, 139, 255, .45); background: rgba(196, 139, 255, .14); }
.wp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 4px 8px; }
.wp-item { position: relative; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; border: 2px solid transparent; background: #140b1a; padding: 0; cursor: pointer; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font: 700 0.7rem 'Cairo', sans-serif; }
.wp-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wp-item span { position: relative; z-index: 1; padding: 3px 6px; border-radius: 8px; background: rgba(0,0,0,.55); line-height: 1.3; text-align: center; }
.wp-item img + span { position: absolute; bottom: 6px; left: 6px; right: 6px; }
.wp-item .rbi { width: 2rem; height: 2rem; }
.wp-item.on { border-color: #ff7ac6; box-shadow: 0 0 14px rgba(255, 122, 198, .6); }
.wp-item:hover { box-shadow: 0 0 12px rgba(140, 220, 255, .45); }
.wp-device, .wp-none { border: 1px dashed rgba(255,255,255,.25); }
.has-wallpaper { background-size: cover; background-position: center; background-repeat: no-repeat; }

/* معاينة الخلفية بصفحة الإعدادات */
.wp-settings { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.wp-preview { width: 64px; height: 112px; border-radius: 12px; border: 1px solid var(--line); background: #140b1a; flex: 0 0 auto; background-size: cover; background-position: center; }
.wp-settings-txt { display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; color: var(--text-muted); }
/* غرفة الروابط: أيقونات النيون */
.link-numbered .rbi { margin-inline-end: 6px; }
.link-icon-btn { display: inline-flex; align-items: center; justify-content: center; }
.link-icon-btn.on { border-color: #ff5fd6; box-shadow: 0 0 8px rgba(255, 95, 214, .5); }
.avatar-fallback .rbi { width: 1.6rem; height: 1.6rem; }
.fab[data-icon] { display: inline-flex; align-items: center; justify-content: center; }
.fab .rbi { color: #3a0d1c; --ic-glow: #fff3b0; width: 1.9rem; height: 1.9rem; }
.btn-primary .rbi { color: #3a0d1c; --ic-glow: #fff3b0; }
.btn-accept .rbi, .btn-reject .rbi { color: #fff; width: 1.1em; height: 1.1em; }
.note-delete .rbi { width: 1.15rem; height: 1.15rem; }
.req-bell .rbi { width: 1.5rem; height: 1.5rem; }
.toggle-visibility .rbi { width: 1.2rem; height: 1.2rem; }
/* غرفة الألعاب: أزرار الدردشة داكنة بإطار نيون حتى تظهر الأيقونات بوضوح، وزر الإرسال بالتدرج */
.room-chat-input button[data-icon], .room-chat-input label[data-icon] { background: var(--surface-2); border: 1px solid rgba(255,255,255,.14); }
.room-chat-input button[data-icon="comet"] { background: var(--gradient-brand); border: none; }
.room-chat-input button.recording { background: var(--danger); }

/* ===== خلفية موحّدة لكل الغرف (rb-wallpaper.js → applyPage) ===== */
.rb-page-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: none !important; background-color: #0e0a1c !important; }
.rb-page-bg .rb-bg-main, .rb-page-bg .rb-bg-blur { position: absolute; inset: 0; background-position: center; background-repeat: no-repeat; background-size: cover; }
/* شاشة عريضة: الصورة كاملة في المنتصف، والأطراف نسخة مموّهة معتمة منها */
.rb-page-bg .rb-bg-blur { filter: blur(40px) brightness(0.36) saturate(1.2); transform: scale(1.2); }
.rb-page-bg.fit .rb-bg-main {
    left: 50%; right: auto; transform: translateX(-50%); background-size: cover;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}
html.rb-bg-on { background: #0e0a1c; }
html.rb-bg-on body { background: transparent !important; }
/* تثبيت التطبيق (الإعدادات) */
.install-box { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.install-icon { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 0 12px rgba(255, 70, 70, .45); flex: 0 0 auto; }
.install-txt { display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; color: var(--text-muted); }

/* ===== زر مساعد البلاك رابيت هيت العائم ===== */
.rb-ai-fab {
    position: fixed; left: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 60;
    width: 58px; height: 58px; border-radius: 50%; overflow: visible; display: block;
    background: radial-gradient(circle, #2b1840, #120a1c);
    box-shadow: 0 0 0 2px rgba(196, 139, 255, .75), 0 0 18px rgba(196, 139, 255, .6), 0 8px 18px rgba(0,0,0,.5);
    animation: aiFloat 3.6s ease-in-out infinite;
}
.rb-ai-fab img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.rb-ai-fab .rb-ai-dot { position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; border-radius: 50%; background: #7dffb0; box-shadow: 0 0 8px #7dffb0; border: 2px solid #120a1c; }
.rb-ai-fab:hover { box-shadow: 0 0 0 2px #e2c8ff, 0 0 26px rgba(196, 139, 255, .9), 0 8px 18px rgba(0,0,0,.5); }
body[data-assistant-high] .rb-ai-fab { bottom: calc(86px + env(safe-area-inset-bottom)); }
@keyframes aiFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .rb-ai-fab { animation: none; } }

/* أصوات التنبيه — الإعدادات */
.sound-row { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.sound-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font-size: 0.86rem; color: var(--text-muted); cursor: pointer; }
.sound-toggle input { width: 22px; height: 22px; flex: none; accent-color: #ff7ac6; }

/* قفل الدردشة بكلمة سر */
.rb-lock-dialog { position: fixed; inset: 0; z-index: 4000; display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(8, 5, 18, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.rb-lock-dialog.gate { background: radial-gradient(circle at 50% 35%, #1d1236 0%, #07040f 75%); backdrop-filter: none; }
.rb-lock-card { width: min(360px, 100%); background: rgba(22, 15, 40, .96); border: 1px solid rgba(255, 122, 198, .35); border-radius: 22px;
    padding: 24px 20px 18px; text-align: center; box-shadow: 0 0 40px rgba(255, 122, 198, .18); }
.rb-lock-ic { display: inline-flex; width: 58px; height: 58px; align-items: center; justify-content: center; border-radius: 50%;
    background: rgba(255, 200, 80, .08); box-shadow: 0 0 22px rgba(255, 200, 80, .35); margin-bottom: 10px; }
.rb-lock-ic .rbi { width: 32px; height: 32px; color: #ffd36b; }
.rb-lock-title { font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: 6px; overflow-wrap: anywhere; }
.rb-lock-sub { font-size: .84rem; color: var(--text-muted, #bcb3d6); margin-bottom: 14px; line-height: 1.6; }
.rb-lock-in { width: 100%; box-sizing: border-box; margin-bottom: 10px; text-align: center; font-size: 1.05rem; letter-spacing: 2px;
    padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(201, 167, 255, .35); background: rgba(255, 255, 255, .06); color: #fff; font-family: inherit; outline: none; }
.rb-lock-in::placeholder { color: rgba(255, 255, 255, .45); letter-spacing: 0; }
.rb-lock-in:focus { border-color: #ffd36b; box-shadow: 0 0 0 3px rgba(255, 211, 107, .18); }
.rb-lock-msg { min-height: 1.3em; font-size: .82rem; color: #ff9b9b; margin-bottom: 8px; }
.rb-lock-msg.ok { color: #8ef0b8; }
.rb-lock-btns { display: flex; gap: 10px; }
.rb-lock-btns .btn { flex: 1; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.rb-lock-forgot { margin-top: 12px; background: none; border: 0; color: #c9a7ff; font-size: .82rem; text-decoration: underline; cursor: pointer; font-family: inherit; }

/* ===== صورة الرئيسية (بدل الشجرة) وزر المساعد بجانبها ===== */
img.rb-home-img { object-fit: cover; border-radius: 50%; }
a.rb-ai-head { position: relative; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: radial-gradient(circle, #2b1840, #120a1c); box-shadow: 0 0 0 2px rgba(196, 139, 255, .75), 0 0 12px rgba(196, 139, 255, .55); transition: box-shadow .2s ease, transform .15s ease; }
a.rb-ai-head img { width: 100%; height: 100%; border-radius: 50%; display: block; pointer-events: none; }
a.rb-ai-head:hover, a.rb-ai-head:focus-visible { box-shadow: 0 0 0 2px #e2c8ff, 0 0 20px rgba(196, 139, 255, .95); transform: scale(1.06); }
a.rb-ai-head:active { transform: scale(.94); }
.rb-ai-badge { position: absolute; bottom: -5px; inset-inline-end: -5px; font: 900 .55rem/1 'Cairo', sans-serif; letter-spacing: .4px; padding: 2px 5px; border-radius: 999px;
    background: #c48bff; color: #1a0b2a; border: 1.5px solid #120a1c; direction: ltr; }
.rb-ai-word { direction: ltr; unicode-bidi: isolate; }
