/* =========================================================
   infotik — نظام تصميم بمقياس طباعي معياري (Modular Scale)
   المقياس: 1.2 على الجوال ← 1.333 على الشاشات الكبيرة
   ========================================================= */

/* ===== خط ثمانية ===== */
@font-face { font-family: "Thmanyah Sans"; src: url("../fonts/thmanyahsans-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("../fonts/thmanyahsans-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("../fonts/thmanyahsans-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("../fonts/thmanyahsans-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("../fonts/thmanyahsans-Black.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Serif Display"; src: url("../fonts/thmanyahserifdisplay-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Serif Display"; src: url("../fonts/thmanyahserifdisplay-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Serif Display"; src: url("../fonts/thmanyahserifdisplay-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Serif Display"; src: url("../fonts/thmanyahserifdisplay-Black.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }

:root {
  /* --- المقياس الطباعي (سلس بين 360px و 1440px) --- */
  --step--2: clamp(0.65rem, 0.6375rem + 0.0556vw, 0.6875rem);
  --step--1: clamp(0.78rem, 0.7604rem + 0.0926vw, 0.8438rem);
  --step-0: clamp(0.9375rem, 0.875rem + 0.2778vw, 1.125rem);
  --step-1: clamp(1.125rem, 1rem + 0.5556vw, 1.5rem);
  --step-2: clamp(1.35rem, 1.1333rem + 0.963vw, 2rem);
  --step-3: clamp(1.62rem, 1.2712rem + 1.55vw, 2.666rem);
  --step-4: clamp(1.944rem, 1.407rem + 2.386vw, 3.554rem);
  --step-5: clamp(2.3325rem, 1.5306rem + 3.564vw, 4.738rem);

  /* --- مقياس المسافات مشتق من نفس الأساس --- */
  --space-3xs: calc(var(--step-0) * 0.25);
  --space-2xs: calc(var(--step-0) * 0.5);
  --space-xs: calc(var(--step-0) * 0.75);
  --space-s: var(--step-0);
  --space-m: calc(var(--step-0) * 1.5);
  --space-l: calc(var(--step-0) * 2);
  --space-xl: calc(var(--step-0) * 3);
  --space-2xl: calc(var(--step-0) * 4);

  --font: "Thmanyah Sans", system-ui, sans-serif;
  --font-display: "Thmanyah Serif Display", "Thmanyah Sans", system-ui, sans-serif;
  /* الأرقام والمعرّفات بنفس الخط مع أرقام متساوية العرض */
  --mono: "Thmanyah Sans", ui-monospace, monospace;

  --radius: 18px;
  --radius-s: 12px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --dock-h: 70px;
  /* مسافة أسفل الشاشة (شريط الهوم بالآيفون): داخل تلجرام القيمتين نفس المسافة، فناخذ الأكبر بدل ما نجمعهم */
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --dock-gap: max(12px, calc(var(--safe-bottom) + 4px));

  /* --- الألوان (داكن) --- */
  --accent: #fe2c55;
  --accent-2: #25f4ee;
  --on-accent: #fff;
  --bg: #0b0b0e;
  --surface: #131317;
  --surface-2: #1a1a20;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f2f4;
  --muted: #8d8d99;
  --danger: #ff5a5f;
  --success: #2fd27a;
  --dock-bg: rgba(22, 22, 26, 0.72);
  --dock-edge: rgba(255, 255, 255, .1);
  --dock-shine: rgba(255, 255, 255, .1);
  --dock-active: rgba(255, 255, 255, .12);
  --dock-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 18px 40px -14px rgba(0, 0, 0, .6);
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8);
  --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --glow: color-mix(in srgb, var(--accent) 16%, transparent);
  color-scheme: dark;
}

[data-theme="light"] {
  /* فاتح دافي: كريمي مائل للصفار بدل الأبيض الناصع */
  --bg: #f6f1e4;
  --surface: #fcf9f1;
  --surface-2: #efe8d7;
  --line: rgba(60, 45, 10, 0.1);
  --line-strong: rgba(60, 45, 10, 0.2);
  --text: #1d1a13;
  --muted: #77705f;
  --dock-bg: rgba(255, 253, 247, 0.92);
  --dock-edge: rgba(60, 45, 10, .26);
  --dock-shine: rgba(255, 255, 255, 1);
  --dock-active: rgba(60, 45, 10, .13);
  --dock-shadow: 0 1px 0 rgba(255, 255, 255, .9), 0 2px 4px rgba(60, 45, 10, .16), 0 14px 32px -10px rgba(60, 45, 10, .5);
  --shadow: 0 24px 50px -30px rgba(70, 55, 20, 0.35);
  --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --glow: color-mix(in srgb, var(--accent) 10%, transparent);
  color-scheme: light;
}

[data-accent="cyan"] { --accent: #14c9c3; --on-accent: #001c1b; }
[data-accent="violet"] { --accent: #8b5cf6; }
[data-accent="gold"] { --accent: #e5a400; --on-accent: #1d1500; }
[data-accent="green"] { --accent: #10b981; --on-accent: #00140d; }

/* ===== الأساسيات ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; touch-action: manipulation; }

body {
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
  padding-bottom: calc(var(--dock-h) + var(--dock-gap) + var(--space-l));
  transition: background-color .3s, color .3s;
  overflow-x: hidden;
}
/* توهج خفيف بلون التمييز أعلى الصفحة يعطي عمق بدل الخلفية المسطحة */
body::before {
  content: ""; position: fixed; z-index: -1; inset: 0 0 auto; height: 420px; pointer-events: none;
  background: radial-gradient(70% 100% at 85% -10%, var(--glow), transparent 70%);
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button, a, label, .chip { -webkit-tap-highlight-color: transparent; }
input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ===== الطباعة ===== */
.eyebrow {
  font-size: var(--step--2);
  font-weight: 500;
  color: var(--muted);
  display: flex; align-items: center; gap: var(--space-2xs);
}
.eyebrow span[dir="ltr"] { font-family: var(--mono); color: var(--accent); letter-spacing: .05em; }
.display {
  font-family: var(--font-display);
  font-size: var(--step-5);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.display em { font-style: normal; color: var(--accent); font-weight: 500; }
.state-title { font-size: var(--step-1); font-weight: 700; line-height: 1.3; color: var(--text); }

/* ===== الهيدر ===== */
/* البار العلوي: كبسولة زجاجية عائمة (Liquid Glass) بنفس مواد البار السفلي، تتبع الثيم والسكن تلقائياً */
.topbar {
  --tb-top: calc(env(safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px) + 10px);
  position: sticky; top: var(--tb-top); z-index: 40;
  width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--max) - 2 * var(--gutter));
  margin: var(--tb-top) auto var(--space-xs);
  padding: 6px 8px; min-height: 52px; border-radius: 999px; isolation: isolate;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs);
  background: var(--dock-bg); border: 1px solid var(--dock-edge);
  -webkit-backdrop-filter: blur(22px) saturate(1.9); backdrop-filter: blur(22px) saturate(1.9);
  box-shadow: inset 0 1px 0 var(--dock-shine), inset 0 -1px 0 rgba(0, 0, 0, .18), var(--dock-shadow);
}
.topbar::before { /* لمعة زجاجية ناعمة على النص العلوي */
  content: ""; position: absolute; inset: 1px 14px auto; height: 46%; border-radius: 999px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--dock-shine) 70%, transparent), transparent);
}
.wordmark { display: inline-flex; align-items: center; gap: var(--space-2xs); }
.wordmark { padding-inline-end: 6px; }
.wm-mark {
  width: 2.1em; height: 2.1em; border-radius: 50%; display: grid; place-items: center;
  background: var(--text); color: var(--bg); font-size: var(--step-0);
  text-shadow: -1.5px -1px 0 #25f4ee, 1.5px 1px 0 #fe2c55;
}
.wm-text { font-size: var(--step-2); font-weight: 300; letter-spacing: -0.03em; line-height: 1; }
.wm-text b { font-weight: 700; color: var(--accent); }
.topbar-actions { display: flex; align-items: center; gap: var(--space-2xs); }
.topbar .icon-btn { width: 38px; height: 38px; border-radius: 50%; background: color-mix(in srgb, var(--dock-shine) 45%, transparent); border-color: var(--dock-edge); box-shadow: inset 0 1px 0 var(--dock-shine); }

.icon-btn {
  width: 42px; height: 42px; border-radius: var(--radius-s); display: grid; place-items: center; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--highlight); transition: border-color .2s, transform .15s;
}
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.ghost { background: transparent; border: 0; width: 38px; height: 38px; color: var(--muted); }

/* زر تبديل الدارك/اللايت: مفتاح زجاجي (Liquid Glass) — مسار مثلّج وكرة لامعة تنزلق */
.theme-switch {
  --ts-w: 66px; --ts-h: 36px; --ts-k: 28px; --ts-pad: 3px;
  position: relative; flex-shrink: 0; direction: ltr; padding: 0;
  width: var(--ts-w); height: var(--ts-h); border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .02) 55%), rgba(22, 22, 28, .55);
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), inset 0 -8px 14px rgba(0, 0, 0, .4), 0 8px 20px -10px rgba(0, 0, 0, .7);
  cursor: pointer; transition: transform .15s, background .4s, box-shadow .4s, border-color .4s;
}
.theme-switch::before { /* لمعة زجاجية ناعمة على نص المسار */
  content: ""; position: absolute; inset: 1px 8px auto; height: 42%; border-radius: 99px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), transparent); pointer-events: none;
}
.theme-switch:active { transform: scale(.96); }
.theme-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ts-knob {
  position: absolute; top: calc((var(--ts-h) - var(--ts-k)) / 2 - 1px); left: var(--ts-pad); width: var(--ts-k); height: var(--ts-k); border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; color: #2b2e38;
  background: radial-gradient(circle at 32% 24%, #fff 0, rgba(238, 240, 246, .95) 28%, rgba(176, 182, 196, .9) 70%, rgba(130, 136, 150, .95));
  box-shadow: inset 0 1.5px 1px rgba(255, 255, 255, .95), inset 0 -4px 7px rgba(60, 66, 82, .35), 0 4px 10px rgba(0, 0, 0, .5), 0 0 0 .5px rgba(255, 255, 255, .35);
  transition: transform .5s cubic-bezier(.34, 1.45, .4, 1), width .25s, background .4s;
}
.theme-switch:active .ts-knob { width: calc(var(--ts-k) + 6px); }
.ts-knob i { grid-area: 1 / 1; transition: opacity .3s, transform .5s cubic-bezier(.34, 1.45, .4, 1); }
.ts-sun { opacity: 0; transform: rotate(-90deg) scale(.5); color: #8a6a1f; }
.theme-switch[data-state="light"] .ts-knob { transform: translateX(calc(var(--ts-w) - var(--ts-k) - var(--ts-pad) * 2 - 2px)); }
.theme-switch[data-state="light"] .ts-moon { opacity: 0; transform: rotate(90deg) scale(.5); }
.theme-switch[data-state="light"] .ts-sun { opacity: 1; transform: none; }
:root[data-theme="light"] .theme-switch {
  border-color: rgba(0, 0, 0, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .25) 60%), rgba(235, 230, 218, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -8px 14px rgba(120, 104, 70, .16), 0 8px 18px -10px rgba(80, 66, 40, .45);
}
:root[data-theme="light"] .theme-switch::before { background: linear-gradient(180deg, rgba(255, 255, 255, .75), transparent); }
:root[data-theme="light"] .ts-knob {
  background: radial-gradient(circle at 32% 24%, #fff 0, #fff7e0 30%, #f1dca2 72%, #e2c673);
  box-shadow: inset 0 1.5px 1px #fff, inset 0 -4px 7px rgba(150, 110, 30, .3), 0 4px 10px rgba(110, 84, 30, .35), 0 0 0 .5px rgba(255, 255, 255, .8);
}
@media (prefers-reduced-motion: reduce) { .ts-knob, .ts-knob i, .theme-switch { transition: none; } }

/* ===== الحاوية والصفحات ===== */
.app { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.view { display: none; }
.view.active { display: block; animation: rise .45s cubic-bezier(.2, .7, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.page-head { padding: var(--space-l) 0 var(--space-m); display: grid; gap: var(--space-xs); }

/* ===== صفحة النتيجة ===== */
.result-head { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-s) 0 0; }
.result-title { display: grid; gap: 2px; min-width: 0; }
.result-user { font-size: var(--step-1); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-user:empty { display: none; }
/* داخل تلجرام زر الرجوع حق تلجرام يكفي */
.in-tg .result-back { display: none; }
#view-result .profile, #view-result .skeleton { padding-top: var(--space-m); }
.retry-btn { justify-self: start; margin-top: var(--space-2xs); }
/* البار السفلي يختفي بصفحة النتيجة عشان تحس إنها صفحة مستقلة */
body.on-result .dock { transform: translate(-50%, calc(100% + var(--space-l))); opacity: 0; pointer-events: none; }
.dock { transition: transform .35s cubic-bezier(.2, .7, .2, 1), opacity .25s; }

/* ===== حقول الإدخال ===== */
.search-bar {
  display: flex; gap: var(--space-2xs); padding: var(--space-3xs);
  border-radius: calc(var(--radius) + 4px); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); max-width: 760px;
}
.field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-2xs); padding: 0 var(--space-s);
  border-radius: var(--radius); background: var(--surface-2); border: 1px solid transparent; transition: border-color .2s;
}
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.field > i { color: var(--muted); font-size: var(--step--1); }
.field input { flex: 1; min-width: 0; height: 3.2em; border: 0; outline: 0; background: transparent; font-size: max(16px, var(--step-0)); }
.field input::placeholder { color: var(--muted); }
.field.small { flex: 1 1 260px; background: var(--surface); border-color: var(--line); }
.field.small input { height: 2.8em; }

.btn-primary {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 var(--space-m); min-height: 3em; border-radius: var(--radius); white-space: nowrap;
  font-weight: 700; font-size: var(--step-0); color: var(--on-accent);
  background: linear-gradient(180deg, color-mix(in srgb, #fff 12%, var(--accent)), var(--accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 10px 24px -12px color-mix(in srgb, var(--accent) 80%, transparent);
  transition: transform .15s, filter .2s;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: scale(.96); }
.btn-primary:disabled { opacity: .75; cursor: progress; }
.btn-label { display: inline-flex; align-items: center; gap: var(--space-2xs); }
.btn-primary .spinner { display: none; }
.btn-primary.loading .btn-label { visibility: hidden; }
.btn-primary.loading .spinner { display: block; position: absolute; inset: 0; margin: auto; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-top-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-soft {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2xs);
  padding: var(--space-2xs) var(--space-s); min-height: 2.75em; border-radius: var(--radius-s);
  background: var(--surface-2); border: 1px solid var(--line); font-size: var(--step--1); font-weight: 500;
  transition: border-color .2s, transform .15s;
}
.btn-soft:hover { border-color: var(--line-strong); }
.btn-soft:active { transform: scale(.97); }
.btn-soft.danger { color: var(--danger); }
.btn-soft.accent { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn-pair { display: flex; gap: var(--space-2xs); }
.btn-pair > * { flex: 1; }
.link-btn { color: var(--accent); font-size: var(--step--1); display: inline-flex; gap: var(--space-3xs); align-items: center; }

.seg { display: inline-flex; padding: 3px; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line); gap: 2px; }
.seg button { padding: .45em .9em; border-radius: 9px; font-size: var(--step--1); color: var(--muted); white-space: nowrap; transition: background .2s, color .2s; }
.seg button.active { background: var(--text); color: var(--bg); font-weight: 500; box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .35); }

/* ===== آخر عمليات البحث ===== */
.chip {
  display: flex; align-items: center; gap: var(--space-2xs); min-width: 0; width: 100%;
  padding-block: 4px; padding-inline: 4px var(--space-s); border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line); font-size: var(--step--1); white-space: nowrap; overflow: hidden;
}
.chip:hover { border-color: var(--line-strong); }
.chip img { flex: none; width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.chip bdi { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: start; }

/* ===== الحالات ===== */
.state { padding: var(--space-xl) 0; color: var(--muted); display: grid; gap: var(--space-xs); max-width: 560px; }
.state-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: var(--space-xs); }
.state-grid span { display: grid; gap: var(--space-2xs); background: var(--surface); padding: var(--space-s); font-size: var(--step-0); font-weight: 500; color: var(--text); }
.state-grid span i { width: 2.1em; height: 2.1em; border-radius: 10px; display: grid; place-items: center; font-size: var(--step--1); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.state.error .state-title i { color: var(--danger); }

.skeleton { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-xs); padding-top: var(--space-l); }
.sk { height: 110px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.sk-hero { grid-column: 1 / -1; height: 260px; }
.sk-wide { grid-column: 1 / -1; height: 90px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ===== الوحدات (Modules) ===== */
.module {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--space-m); min-width: 0; box-shadow: var(--highlight);
}
.module > .eyebrow { margin-bottom: var(--space-xs); }

/* ===== بطاقة الحساب: شبكة معيارية ===== */
.profile {
  display: grid; gap: var(--space-xs); padding-top: var(--space-l);
  grid-template-columns: repeat(2, 1fr);
}
.profile > * { grid-column: 1 / -1; animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.profile > *:nth-child(2) { animation-delay: .04s; }
.profile > *:nth-child(3) { animation-delay: .08s; }
.profile > *:nth-child(n+4) { animation-delay: .12s; }

.identity { position: relative; display: grid; gap: var(--space-xs); justify-items: start; }
.identity-top { width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-xs); }
.identity-btns { display: flex; gap: var(--space-3xs); }
.identity-btns .icon-btn { width: 38px; height: 38px; background: var(--surface-2); }
.identity-btns .icon-btn.on { color: #f5b301; }
.avatar {
  width: clamp(88px, 18vw, 132px); aspect-ratio: 1; border-radius: 50%; object-fit: cover; cursor: zoom-in;
  background: var(--surface-2); border: 1px solid var(--line);
}
.nick { font-family: var(--font-display); font-size: var(--step-3); font-weight: 700; line-height: 1.15; word-break: break-word; }
.nick .verified { color: #20d5ec; font-size: .55em; vertical-align: middle; }
.uname { font-family: var(--mono); color: var(--muted); font-size: var(--step--1); }
.bio { font-size: var(--step-0); line-height: 1.7; white-space: pre-line; max-width: 46ch; }
.tags { display: flex; flex-wrap: wrap; gap: var(--space-3xs); }
.tag {
  font-size: var(--step--2); padding: .35em .8em; border-radius: 99px; border: 1px solid var(--line-strong);
  color: var(--muted); display: inline-flex; align-items: center; gap: .4em;
}
.tag.hot { color: var(--on-accent); background: var(--accent); border-color: transparent; }
.tag.ok { color: var(--success); }
.tag.link { color: var(--text); }
.tag.level { color: #e5a400; border-color: color-mix(in srgb, #e5a400 45%, transparent); font-family: var(--mono); }

.country {
  display: grid; gap: var(--space-2xs); border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  background: radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%), var(--surface);
}
.country .eyebrow { margin: 0; }
.country-main { display: flex; align-items: center; gap: var(--space-s); }
.flag { font-size: var(--step-3); line-height: 1; }
.country-name { font-size: var(--step-1); font-weight: 700; line-height: 1.3; }
.country-code { margin-inline-start: auto; font-family: var(--mono); font-size: var(--step--2); font-weight: 700; letter-spacing: .08em; padding: .3em .7em; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.country-sub { font-size: var(--step--1); color: var(--muted); }

.stat { display: grid; gap: var(--space-xs); align-content: space-between; min-height: 6.5em; grid-column: span 1; padding: var(--space-s); }
.stat .eyebrow i { width: 1.9em; height: 1.9em; border-radius: 8px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.stat b { font-size: var(--step-3); font-weight: 700; line-height: 1; direction: ltr; text-align: right; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

.details { padding: 0; overflow: hidden; }
.details > .eyebrow { padding: var(--space-m) var(--space-m) 0; }
.row { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-xs) var(--space-m); border-top: 1px solid var(--line); }
.details > .eyebrow + .row { border-top: 0; }
.row .k { color: var(--muted); font-size: var(--step--1); flex-shrink: 0; }
.row .v { margin-inline-start: auto; font-family: var(--mono); font-size: var(--step--1); text-align: left; direction: ltr; word-break: break-all; }
.row .ago { display: block; font-family: var(--font); font-size: var(--step--2); color: var(--muted); direction: rtl; text-align: left; }
.row .copy { color: var(--muted); padding: 4px; flex-shrink: 0; }
.row .copy:hover { color: var(--accent); }

/* تتبّع الرابط */
.track-result { display: grid; gap: var(--space-xs); padding-top: var(--space-m); }
.track-owner { position: relative; }
.track-close { position: absolute; top: var(--space-xs); inset-inline-end: var(--space-xs); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--muted); }
.track-close:active { transform: scale(.9); }
.track-owner b { display: block; font-family: var(--mono); font-size: var(--step-2); font-weight: 700; word-break: break-all; text-align: left; }
.track-actions { display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin-top: var(--space-s); }
.track-actions .btn-soft { flex: 1 1 140px; justify-content: center; }

.actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2xs); }

/* ===== الأرشيف ===== */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--space-2xs); align-items: center; margin-bottom: var(--space-s); }
.archive-list { display: grid; gap: var(--space-2xs); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.arch-item {
  display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-xs); border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color .2s; animation: rise .35s both;
}
.arch-item:hover { border-color: var(--line-strong); }
.arch-item img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--surface-2); flex-shrink: 0; }
.arch-info { flex: 1; min-width: 0; display: grid; }
.arch-info strong { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arch-info span { color: var(--muted); font-size: var(--step--2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arch-info bdi { font-family: var(--mono); }
.arch-side { display: flex; align-items: center; gap: var(--space-3xs); flex-shrink: 0; }
.arch-side .fl { font-size: var(--step-2); margin-inline-end: var(--space-3xs); }
.arch-side button { width: 34px; height: 34px; border-radius: 10px; color: var(--muted); }
.arch-side button:hover { background: var(--surface-2); color: var(--text); }
.arch-side button.on { color: #f5b301; }

.lock-screen { display: grid; justify-items: start; gap: var(--space-xs); padding: var(--space-l) 0; color: var(--muted); }
.lock-screen > i { font-size: var(--step-4); color: var(--accent); }

/* ===== البث ===== */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; animation: pulse 1.6s infinite; flex-shrink: 0; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }

.notice { margin-top: var(--space-s); padding: var(--space-xs) var(--space-s); border-radius: var(--radius-s); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); color: var(--text); font-size: var(--step--1); max-width: 760px; }
.notice.info { border-color: var(--line-strong); }

/* مشغّل عام (مشغّل التسجيلات يستخدمه) */
.player { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; width: 100%; margin-inline: auto; }
.player video { width: 100%; height: 100%; background: #000; }

/* البث بملء الشاشة: الفيديو يغطي الشاشة، والشات والهدايا والتحكم فوقه */
.live-open, .live-open body { overflow: hidden; }
.live-room {
  position: fixed; inset: 0; z-index: 70; background: #000; color: #fff; overflow: hidden;
  animation: svIn .25s ease;
  --live-top: calc(12px + env(safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
}
.live-room .player { position: absolute; inset: 0; border-radius: 0; }
.live-room .player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.live-shade { position: absolute; inset-inline: 0; pointer-events: none; }
.live-shade.top { top: 0; height: 170px; background: linear-gradient(rgba(0,0,0,.7), transparent); }
.live-shade.bottom { bottom: 0; height: 55%; background: linear-gradient(transparent, rgba(0,0,0,.85)); }

.live-top { position: absolute; top: 0; inset-inline: 0; padding: var(--live-top) 14px 0; display: grid; gap: 8px; z-index: 2; max-width: 760px; margin-inline: auto; }
.live-head { display: flex; align-items: center; gap: 8px; }
.live-host { display: flex; align-items: center; gap: 8px; min-width: 0; padding-block: 4px; padding-inline: 4px 14px; border-radius: 99px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.live-host img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); background: #222; flex-shrink: 0; }
.live-meta { display: grid; min-width: 0; line-height: 1.3; }
#liveUser { font-family: var(--mono); font-weight: 700; font-size: var(--step--1); direction: ltr; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-meta > span { font-size: var(--step--2); color: rgba(255,255,255,.8); display: inline-flex; align-items: center; gap: 4px; }
.live-room .badge { position: static; color: var(--on-accent); letter-spacing: .08em; font-weight: 900; }
.live-room .live-close { margin-inline-start: auto; }
.live-title { font-size: var(--step--1); color: rgba(255,255,255,.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 4px rgba(0,0,0,.6); }

/* أزرار البث: زجاجية فوق الفيديو مهما كان الثيم */
#liveRoom .icon-btn { width: 44px; height: 44px; border-radius: 50%; color: #fff; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.16); box-shadow: none; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
#liveRoom .icon-btn:active { transform: scale(.92); }
#liveRoom .live-rec { color: #ff3b3b; font-size: 18px; }

.play-overlay { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-xs); background: rgba(0,0,0,.45); color: #fff; font-size: var(--step--1); }
.play-overlay i { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 22px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; color: #fff; font-family: var(--mono); font-size: var(--step--2); font-weight: 700; background: var(--accent); }

.live-bottom { position: absolute; bottom: 0; inset-inline: 0; z-index: 2; padding: 0 14px calc(12px + var(--safe-bottom)); display: grid; gap: 10px; max-width: 760px; margin-inline: auto; pointer-events: none; }
.live-bottom > * { pointer-events: auto; }
.live-bottom .hint { justify-self: center; padding: 6px 12px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; font-size: var(--step--1); text-align: center; }

/* الشات يطلع فوق الفيديو ويتلاشى من فوق */
#liveRoom .feeds { background: none; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding-inline-end: 64px; }
.feed-panel { display: none; height: min(34vh, 300px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; -webkit-mask-image: linear-gradient(transparent, #000 30%); mask-image: linear-gradient(transparent, #000 30%); }
.feed-panel::-webkit-scrollbar { display: none; }
.feed-panel.active { display: flex; flex-direction: column; }
.feed-panel > :first-child { margin-top: auto; }
.feed-empty { height: 100%; display: grid; place-items: center; color: rgba(255,255,255,.7); font-size: var(--step--1); text-align: center; }
.msg { padding: 3px 0; font-size: var(--step--1); line-height: 1.55; word-break: break-word; text-shadow: 0 1px 3px rgba(0,0,0,.8); animation: rise .2s both; }
.msg .who { color: #25f4ee; font-weight: 700; margin-inline-end: .5em; }
.gift { display: flex; align-items: center; gap: var(--space-2xs); align-self: flex-start; margin-top: 6px; padding: 5px 12px 5px 6px; border-radius: 99px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.12); text-shadow: none; }
.gift .who { color: var(--accent); }
.gift img, .gift .gi { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; display: grid; place-items: center; color: var(--accent); }
.gift .coins { color: #e5a400; font-family: var(--mono); font-size: var(--step--2); margin-inline-start: .5em; white-space: nowrap; }

.live-bar { display: flex; align-items: center; gap: 8px; }
.feed-tabs { display: flex; gap: 6px; min-width: 0; }
.feed-tabs button { display: inline-flex; align-items: center; gap: .45em; height: 44px; padding: 0 14px; border-radius: 99px; font-size: var(--step--1); white-space: nowrap; color: rgba(255,255,255,.8); background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.feed-tabs button.active { background: #fff; color: #0b0b0e; font-weight: 700; border-color: transparent; }
.feed-tabs button span { font-family: var(--mono); font-size: var(--step--2); opacity: .7; }
.player-controls { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }

.live-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--step--2); color: rgba(255,255,255,.75); }
.live-foot .link-btn { color: #fff; font-size: var(--step--2); margin-inline-start: auto; }
#feedStatus { display: inline-flex; align-items: center; gap: .5em; }
.quality-row { display: flex; gap: 4px; flex-wrap: wrap; }
#liveRoom .q-btn { padding: .35em .8em; border-radius: 99px; font-family: var(--mono); font-size: var(--step--2); font-weight: 700; color: #fff; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.14); box-shadow: none; direction: ltr; }
#liveRoom .q-btn.active { background: #fff; color: #0b0b0e; border-color: transparent; }
.hint { text-align: center; font-size: var(--step--1); color: var(--muted); }

@media (max-width: 360px) {
  .feed-tabs button { padding: 0 10px; }
  .feed-tabs button i { display: none; }
}

/* ===== بطاقات المشاهدة/التسجيل ===== */
.mode-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-xs); margin-bottom: var(--space-m); }
.mode-card {
  position: relative; display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-s);
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-align: start;
  transition: border-color .2s, background .2s, transform .15s;
}
.mode-card:hover { border-color: var(--line-strong); }
.mode-card:active { transform: scale(.98); }
.mode-card.active { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent); }
.mode-icon { width: 2.6em; height: 2.6em; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-2); color: var(--accent); }
.mode-card.active .mode-icon { background: var(--accent); color: var(--on-accent); }
.mode-text { display: grid; min-width: 0; }
.mode-text strong { font-weight: 700; font-size: var(--step-0); }
.mode-text small { font-size: var(--step--2); opacity: .65; }
.mode-badge { position: absolute; top: 8px; inset-inline-end: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font-family: var(--mono); font-size: var(--step--2); font-weight: 700; }
.mode-badge .live-dot { background: currentColor; width: 6px; height: 6px; }

/* ===== التسجيل ===== */
.rec-form { display: grid; gap: var(--space-s); max-width: 760px; }
.rec-form > .eyebrow { margin: 0; }
.rec-form .field { background: var(--surface-2); }
.rec-group { display: grid; gap: var(--space-2xs); }
.rec-label { font-size: var(--step--1); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-3xs); }
.chips button { padding: .45em 1em; border-radius: 99px; font-size: var(--step--1); border: 1px solid var(--line-strong); color: var(--muted); transition: background .2s, color .2s; }
.chips button.active { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.custom-min { display: flex; align-items: center; gap: var(--space-2xs); max-width: 220px; color: var(--muted); font-size: var(--step--1); }
.custom-min .text-input { width: 110px; text-align: center; font-family: var(--mono); }
.rec-start { justify-self: start; }
.rec-group .seg { justify-self: start; }
.rec-dot-icon { width: .7em; height: .7em; border-radius: 50%; background: currentColor; display: inline-block; flex-shrink: 0; }
.rec-start .rec-dot-icon { background: var(--on-accent); }
.rec-note { font-size: var(--step--2); color: var(--muted); display: flex; gap: .5em; align-items: baseline; }
.rec-section { margin-top: var(--space-l); }
.rec-section > .eyebrow { margin-bottom: var(--space-xs); }
.rec-lib-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-xs); margin-bottom: var(--space-xs); }
.rec-storage { font-family: var(--mono); font-size: var(--step--2); color: var(--muted); }
.rec-active { display: grid; gap: var(--space-2xs); }
.rec-day { font-size: var(--step--1); font-weight: 700; margin: var(--space-s) 0 var(--space-2xs); }
.rec-day:first-child { margin-top: 0; }
#recList { display: grid; gap: var(--space-2xs); grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
#recList .rec-day { grid-column: 1 / -1; }
.rec-item {
  display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-xs); border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); min-width: 0; animation: rise .3s both;
}
.rec-item.live { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.rec-item > img, .rec-thumb { width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; background: var(--surface-2); object-fit: cover; }
.rec-thumb { position: relative; overflow: hidden; display: grid; place-items: center; }
.rec-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rec-thumb i { position: relative; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; }
.rec-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.rec-info strong { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-info > span { color: var(--muted); font-size: var(--step--2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-info bdi { font-family: var(--mono); }
.rec-meta { display: flex; flex-wrap: wrap; gap: .3em .9em; }
.rec-meta i { opacity: .7; margin-inline-end: .2em; }
.rec-reason { color: #e5a400; }
.rec-processing { color: var(--accent); }
.rec-actions button:disabled { opacity: .35; cursor: progress; }
.rec-actions { display: flex; flex-shrink: 0; }
.rec-actions button { width: 36px; height: 36px; border-radius: 10px; color: var(--muted); }
.rec-actions button:hover { background: var(--surface-2); color: var(--text); }
.rec-time { font-family: var(--mono); font-size: var(--step--1); color: var(--accent); display: inline-flex; align-items: center; gap: .4em; white-space: nowrap; }
.rec-time small { color: var(--muted); }
.rec-time .rec-dot-icon { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.rec-progress { height: 3px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.rec-progress i { display: block; height: 100%; background: var(--accent); transition: width 1s linear; }
.rec-progress.indeterminate i { width: 30% !important; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(100%); } to { transform: translateX(-340%); } }

.player-card { width: min(520px, 100%); text-align: start; justify-items: stretch; padding: var(--space-m); }
.player-card-head { display: flex; align-items: center; gap: var(--space-xs); }
.rec-player { aspect-ratio: 9 / 16; max-height: 62vh; }
.rec-player video { object-fit: contain; }

@media (max-width: 420px) {
  .mode-card { flex-direction: column; align-items: flex-start; }
  .rec-item.live { flex-wrap: wrap; }
  .rec-item.live .rec-info { flex-basis: calc(100% - 70px); }
  .rec-item.live .rec-time { margin-inline-start: 64px; }
}

/* ===== الإعدادات ===== */
.settings-grid { display: grid; gap: var(--space-xs); grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: start; }
.settings-grid .module { padding: var(--space-s) var(--space-m); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: var(--space-s); padding: var(--space-s) 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.module > .eyebrow + .setting { border-top: 0; padding-top: 0; }
.setting.column { flex-direction: column; align-items: stretch; }
.setting strong { display: block; font-weight: 500; }
.setting small { display: block; color: var(--muted); font-size: var(--step--1); }
.swatches { display: flex; gap: var(--space-2xs); }
.swatches button { width: 28px; height: 28px; border-radius: 50%; background: var(--sw); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); transition: transform .15s; }
.swatches button.active { box-shadow: 0 0 0 2px var(--sw); transform: scale(1.1); }
.text-input { height: 2.9em; border-radius: var(--radius-s); padding: 0 var(--space-s); background: var(--surface-2); border: 1px solid var(--line); outline: 0; font-size: max(16px, var(--step-0)); width: 100%; }
.text-input:focus { border-color: var(--accent); }
.switch { position: relative; width: 50px; height: 30px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line-strong); cursor: pointer; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked + span { background: var(--accent); border-color: transparent; }
.switch input:checked + span::after { transform: translateX(-20px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.colophon { font-size: var(--step-5); font-weight: 300; letter-spacing: -0.04em; line-height: 1; color: var(--line-strong); padding: var(--space-xl) 0 var(--space-s); text-align: center; }
.colophon b { font-weight: 700; }

/* ===== البار السفلي العائم (زجاج سائل) =====
   البحث بدائرة زجاجية لحالها، والباقي كبسولة زجاجية: أيقونة واسم دايماً ظاهرين،
   والتبويب المختار تطلع خلفه حبة فاتحة وتتلوّن أيقونته واسمه بلون التطبيق */
.dock {
  position: fixed; z-index: 50; left: 50%; transform: translateX(-50%);
  bottom: var(--dock-gap);
  width: min(430px, calc(100% - 2 * var(--gutter))); height: var(--dock-h);
  display: flex; align-items: stretch; gap: 10px;
}
.dock-pill, .dock-search {
  background: var(--dock-bg); border: 1px solid var(--dock-edge);
  backdrop-filter: blur(22px) saturate(1.9); -webkit-backdrop-filter: blur(22px) saturate(1.9);
  box-shadow: inset 0 1px 0 var(--dock-shine), inset 0 -1px 0 rgba(0, 0, 0, .18), var(--dock-shadow);
}
.dock-pill { flex: 1; min-width: 0; display: flex; align-items: stretch; gap: 2px; padding: 5px; border-radius: 999px; }
.dock-pill button {
  position: relative; flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 999px; color: var(--text); font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap;
  transition: background-color .3s, color .3s, transform .15s;
}
.dock-pill button i { font-size: 21px; transition: transform .3s cubic-bezier(.34, 1.4, .64, 1); }
.dock-svg { width: 25px; height: 25px; margin-block: -2px; transition: transform .3s cubic-bezier(.34, 1.4, .64, 1); }
.dock-pill button:active .dock-svg { transform: scale(.82); }
.dock-pill button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; line-height: 1.55; padding-block: 1px 3px; }
.dock-pill button:active i, .dock-search:active i { transform: scale(.82); }
.dock-avatar { width: 25px; height: 25px; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 0 0 1.5px var(--line-strong); transition: transform .3s cubic-bezier(.34, 1.4, .64, 1), box-shadow .2s; }
.dock-pill button:active .dock-avatar { transform: scale(.82); }
.dock-pill button.active .dock-avatar { box-shadow: 0 0 0 2px var(--accent); }
.dock-pill button.active { color: var(--accent); background: var(--dock-active); box-shadow: inset 0 1px 0 var(--dock-shine); }

.dock-search {
  flex: none; width: var(--dock-h); height: var(--dock-h); border-radius: 50%;
  display: grid; place-items: center; color: var(--text); font-size: 22px;
  transition: color .3s, background-color .3s;
}
.dock-search i { transition: transform .3s cubic-bezier(.34, 1.4, .64, 1); }
.dock-search.active {
  color: var(--accent);
  background: radial-gradient(90% 70% at 50% 110%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 70%), var(--dock-bg);
}

.dock-rec {
  position: absolute; top: 9px; left: calc(50% + 7px); width: 8px; height: 8px; border-radius: 50%;
  background: #ff3b3b; box-shadow: 0 0 0 2px var(--dock-bg); animation: blink 1s steps(2) infinite;
}
.dock-pill button.active .dock-rec { display: none; }

/* ===== النوافذ ===== */
.sheet { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: var(--gutter); background: rgba(0,0,0,.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: rise .2s both; }
.sheet-card { width: min(380px, 100%); display: grid; gap: var(--space-xs); padding: var(--space-l); border-radius: calc(var(--radius) + 6px); background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow); text-align: center; justify-items: center; }
.sheet-icon { font-size: var(--step-3); color: var(--accent); }
.sheet-sub { color: var(--muted); font-size: var(--step--1); }
.pin-input { width: 100%; height: 2.4em; text-align: center; font-family: var(--mono); font-size: var(--step-3); letter-spacing: .4em; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line); outline: 0; }
.pin-error { color: var(--danger); font-size: var(--step--1); min-height: 1.4em; }
.pin-error.gate-success { color: #22c55e; font-weight: 600; }
.sheet-card .btn-pair { width: 100%; }


/* ===== الاشتراك الإجباري ===== */
.gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--gutter); background: var(--bg); animation: rise .2s both; }
.gate-card { width: min(380px, 100%); display: grid; gap: var(--space-xs); justify-items: center; text-align: center; }
.gate-icon { font-size: var(--step-5); color: #2aabee; margin-bottom: var(--space-2xs); }
.gate-btn { width: 100%; justify-content: center; }
.gate-card .sheet-sub { line-height: 1.7; margin-bottom: var(--space-xs); }
.gate-id-box { width: 100%; display: grid; gap: 8px; margin: 4px 0 6px; text-align: start; }
.gate-id-label { font-size: var(--step--1); font-weight: 600; color: var(--muted); }
.gate-id-input { width: 100%; height: 44px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--border); padding: 0 14px; font-family: var(--mono); font-size: max(16px, var(--step-0)); color: var(--text); box-sizing: border-box; }
.gate-id-input:focus { outline: none; border-color: #2aabee; box-shadow: 0 0 0 2px rgba(42, 171, 238, 0.2); }
.gate-help { font-size: 13px; color: #2aabee; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; line-height: 1.4; }
.gate-help:hover { text-decoration: underline; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

.toast {
  position: fixed; z-index: 90; left: 50%; bottom: calc(var(--dock-h) + var(--dock-gap) + var(--space-s));
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: .7em 1.2em; border-radius: var(--radius-s); background: var(--text); color: var(--bg); font-size: var(--step--1); font-weight: 500;
  transition: opacity .25s, transform .25s; white-space: nowrap; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.lightbox { position: fixed; inset: 0; z-index: 89; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: var(--gutter); cursor: zoom-out; animation: rise .2s both; }
.lightbox img { max-width: min(520px, 100%); max-height: 80vh; border-radius: var(--radius); }

/* ===== الاستجابة: جوال صغير ===== */
@media (max-width: 380px), (max-height: 680px) {
  :root { --dock-h: 64px; }
  .dock { gap: 8px; }
  .dock-pill button { font-size: 10.5px; gap: 2px; }
  .dock-pill button i { font-size: 18px; }
  .dock-avatar { width: 22px; height: 22px; }
  .dock-svg { width: 22px; height: 22px; }
  .dock-search { font-size: 20px; }
}
@media (max-width: 380px) {
  .btn-primary { padding: 0 var(--space-s); }
  .search-bar .btn-label i { display: none; }
}

/* ===== تابلت ===== */
@media (min-width: 640px) {
  .profile { grid-template-columns: repeat(6, 1fr); }
  .stat { grid-column: span 2; }
  .actions { grid-template-columns: repeat(4, 1fr); }
  .state-grid { grid-template-columns: repeat(4, 1fr); }
  .skeleton { grid-template-columns: repeat(4, 1fr); }
}

/* ===== ديسكتوب: شبكة 12 عمود ===== */
@media (min-width: 1024px) {
  .profile { grid-template-columns: repeat(12, 1fr); grid-auto-flow: row dense; }
  .idcard { grid-column: 1 / span 5; grid-row: span 3; align-self: start; }
  .age { grid-column: 6 / -1; }
  .stats-wrap { grid-column: 6 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xs); }
  .stats-wrap .stat { grid-column: auto; }
  .details { grid-column: 6 / -1; }
  .actions { grid-column: 1 / span 5; grid-template-columns: repeat(2, 1fr); align-self: start; }

}

/* داخل التابلت والجوال: إحصائيات كشبكة فرعية */
.stats-wrap { display: contents; }
@media (min-width: 1024px) { .stats-wrap { display: grid; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ===== حلقة الستوري حول الصورة ===== */
.avatar-ring { position: relative; padding: 4px; border-radius: 50%; background: var(--line); flex-shrink: 0; transition: transform .15s; }
.avatar-ring:active { transform: scale(.96); }
.avatar-ring .avatar { display: block; border: 3px solid var(--surface); cursor: pointer; }
.avatar-ring.has-story { background: conic-gradient(from 210deg, #25f4ee, #fe2c55, #ff9a3c, #fe2c55, #25f4ee); }
.avatar-ring.loading { background: conic-gradient(var(--accent) 0 25%, var(--line) 25% 100%); animation: spin 1s linear infinite; }
.avatar-ring.loading .avatar { animation: spin 1s linear infinite reverse; }
.story-count { position: absolute; bottom: 4px; inset-inline-end: 4px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; background: #fe2c55; color: #fff; font-size: 12px; font-weight: 700; border: 2px solid var(--surface); }

/* ===== عارض الستوري ===== */
.sv-open, .sv-open body { overflow: hidden; }
.story-viewer { position: fixed; inset: 0; z-index: 95; background: #000; display: grid; place-items: center; animation: svIn .25s ease; touch-action: none; }
@keyframes svIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.sv-stage { position: relative; width: 100%; height: 100%; max-width: calc(100dvh * 9 / 16); overflow: hidden; background: #000; color: #fff; user-select: none; -webkit-user-select: none; }
@media (min-width: 700px) { .sv-stage { height: min(92dvh, 900px); border-radius: 18px; } }
.sv-media { position: absolute; inset: 0; display: grid; place-items: center; }
.sv-media video, .sv-media img { width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; pointer-events: none; }
.sv-shade { position: absolute; inset-inline: 0; pointer-events: none; }
.sv-shade.top { top: 0; height: 140px; background: linear-gradient(rgba(0,0,0,.6), transparent); }
.sv-shade.bottom { bottom: 0; height: 45%; background: linear-gradient(transparent, rgba(0,0,0,.8)); }

.sv-top { position: absolute; top: 0; inset-inline: 0; padding: calc(10px + env(safe-area-inset-top) + var(--tg-content-safe-area-inset-top, 0px)) 12px 0; z-index: 2; }
.sv-bars { display: flex; gap: 3px; direction: ltr; flex-direction: row-reverse; }
.sv-bars span { flex: 1; height: 2.5px; border-radius: 2px; background: rgba(255,255,255,.3); overflow: hidden; }
.sv-bars i { display: block; height: 100%; width: 0; background: #fff; float: right; }
.sv-head { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.sv-head img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1.5px solid rgba(255,255,255,.8); background: #222; }
.sv-who { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.sv-who strong { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-who > span { font-size: 12px; opacity: .75; }
.sv-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 17px; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.sv-paused { opacity: 0; transition: opacity .2s; font-size: 14px; }
.story-viewer.paused .sv-paused { opacity: .85; }

.sv-loading { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.sv-loading .spinner { width: 34px; height: 34px; color: #fff; }
.sv-error { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; color: rgba(255,255,255,.85); pointer-events: none; }
.sv-error i { font-size: 30px; }

.sv-foot { position: absolute; bottom: 0; inset-inline: 0; z-index: 2; padding: 0 14px calc(14px + var(--safe-bottom)); display: grid; gap: 10px; }
.sv-caption { font-size: 14px; line-height: 1.6; max-height: 4.8em; overflow: hidden; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.sv-music { font-size: 13px; opacity: .9; display: flex; gap: 8px; align-items: center; white-space: nowrap; overflow: hidden; }
.sv-music span { overflow: hidden; text-overflow: ellipsis; }
.sv-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 10px 6px; border-radius: 16px; background: rgba(255,255,255,.1); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.12); }
.sv-stats span { display: grid; justify-items: center; gap: 2px; text-align: center; min-width: 0; }
.sv-stats i { font-size: 15px; opacity: .95; }
.sv-stats span:nth-child(1) i { color: #25f4ee; }
.sv-stats span:nth-child(2) i { color: #fe2c55; }
.sv-stats span:nth-child(5) i { color: #f5b301; }
.sv-stats b { font-size: 14px; font-weight: 700; direction: ltr; }
.sv-stats small { font-size: 10px; opacity: .7; }
.sv-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sv-expire { font-size: 12px; opacity: .7; }
.sv-save { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 99px; background: #fff; color: #000; font-size: 13px; font-weight: 700; }
.sv-save:active { transform: scale(.96); }

/* ===== داخل تلجرام ===== */
.in-tg body { overscroll-behavior: none; }
.in-tg body { min-height: var(--tg-viewport-stable-height, 100dvh); }

/* ===== الأرشيف داخل الإعدادات ===== */
.setting-link { width: 100%; text-align: start; cursor: pointer; flex-wrap: nowrap; color: inherit; }
.setting-link > div { flex: 1; min-width: 0; }
.setting-ico { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); color: var(--accent); }
.setting-chev { color: var(--muted); font-size: 14px; }
.setting-link:active { opacity: .7; }
.back-link { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: var(--step--1); }
.back-link:active { opacity: .7; }
.archive-data { margin-top: var(--space-m); }

/* ===== الدعم الفني ===== */
.support { display: grid; gap: var(--space-xs); max-width: 760px; }
.support .module { padding: var(--space-s) var(--space-m); }
.sup-id-row { display: flex; align-items: center; gap: var(--space-xs); min-width: 0; }
.sup-avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000)); color: var(--on-accent); font-weight: 700; font-size: var(--step-1); }
.sup-avatar.empty { background: #2aabee; color: #fff; font-size: 22px; }
.sup-id-text { flex: 1; min-width: 0; }
.sup-id-text strong { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-id-text small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: var(--step--1); white-space: nowrap; overflow: hidden; }
.sup-copy-id { display: inline-flex; align-items: center; gap: 5px; color: inherit; font-size: inherit; }
.sup-copy-id i { font-size: .85em; opacity: .7; }
.sup-badge { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 99px; font-size: var(--step--2); font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.sup-badge.ok { color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); border-color: color-mix(in srgb, var(--success) 30%, transparent); }

.sup-help { display: grid; gap: var(--space-s); }
.sup-help > .eyebrow { margin-bottom: 0; }
.sup-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2xs); }
.sup-cats button {
  display: grid; justify-items: center; gap: 6px; padding: var(--space-xs) 6px; border-radius: var(--radius-s);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: var(--step--1); font-weight: 500; text-align: center;
  transition: border-color .2s, color .2s, background .2s, transform .15s;
}
.sup-cats button i { font-size: 18px; }
.sup-cats button:active { transform: scale(.96); }
.sup-cats button.active { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); }
.sup-cats button.active i { color: var(--accent); }
.sup-tips { padding: var(--space-xs) var(--space-s); border-radius: var(--radius-s); background: color-mix(in srgb, var(--accent) 7%, transparent); border: 1px dashed color-mix(in srgb, var(--accent) 35%, transparent); font-size: var(--step--1); animation: rise .25s both; }
.sup-tips-title { font-weight: 700; color: var(--accent); display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
.sup-tips ul { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 4px; color: var(--text); line-height: 1.6; }

.sup-contact {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--space-xs) var(--space-s);
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, #2aabee 16%, transparent), transparent 60%), var(--surface) !important;
}
.sup-contact-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; color: #fff; background: linear-gradient(135deg, #37b9f5, #1d8fd8); box-shadow: 0 10px 24px -10px rgba(42, 171, 238, .8); }
.sup-contact-text strong { display: block; font-weight: 700; font-size: var(--step-0); }
.sup-contact-text small { display: block; color: var(--muted); font-size: var(--step--1); }
.sup-contact-btn { grid-column: 1 / -1; width: 100%; background: #2aabee; color: #fff; }

.sup-faq details { border-top: 1px solid var(--line); }
.sup-faq .eyebrow + details { border-top: 0; }
.sup-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--space-xs); padding: var(--space-xs) 0; font-weight: 500; }
.sup-faq summary::-webkit-details-marker { display: none; }
.sup-faq summary::after { content: "+"; font-size: 1.3em; line-height: 1; color: var(--muted); transition: transform .2s; }
.sup-faq details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.sup-faq details p { color: var(--muted); font-size: var(--step--1); padding-bottom: var(--space-xs); line-height: 1.7; }
@media (max-width: 380px) { .sup-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== مشاهدة البث: تحت الصيانة ===== */
.mode-card.maint .mode-icon { color: #e5a400; }
.mode-card.maint.active .mode-icon { background: #e5a400; color: #1d1a13; }
.mode-card.maint.active { background: color-mix(in srgb, #e5a400 9%, var(--surface)); border-color: color-mix(in srgb, #e5a400 50%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, #e5a400 10%, transparent); }
.mode-card.maint:not(.active) .mode-text strong { opacity: .75; }
.mode-badge.maint { background: #e5a400; color: #1d1a13; font-family: var(--font); }
.maint-card {
  position: relative; overflow: hidden; display: grid; justify-items: center; text-align: center; gap: var(--space-2xs);
  padding: var(--space-xl) var(--space-m) var(--space-l); border-radius: var(--radius); max-width: 760px;
  background: radial-gradient(90% 70% at 50% 0%, rgba(229, 164, 0, .14), transparent 70%), var(--surface); border: 1px solid var(--line);
}
.maint-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 6px;
  background: repeating-linear-gradient(-45deg, #e5a400 0 12px, #1d1a13 12px 24px); background-size: 34px 100%; animation: maint-stripes 1.2s linear infinite; opacity: .9;
}
@keyframes maint-stripes { to { background-position: 34px 0; } }
.maint-visual { position: relative; width: 96px; height: 96px; display: grid; place-items: center; margin-bottom: var(--space-2xs); }
.maint-visual .fa-tower-broadcast { font-size: 34px; color: var(--muted); }
.maint-gear { position: absolute; color: #e5a400; animation: spin 6s linear infinite; }
.maint-gear.g1 { top: 4px; inset-inline-end: 2px; font-size: 30px; }
.maint-gear.g2 { bottom: 8px; inset-inline-start: 4px; font-size: 20px; animation-direction: reverse; animation-duration: 4s; opacity: .8; }
.maint-visual::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, #e5a400 45%, transparent); animation: spin 18s linear infinite; }
.maint-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; font-size: var(--step--2); font-weight: 700; color: #e5a400; background: rgba(229, 164, 0, .12); border: 1px solid rgba(229, 164, 0, .3); }
.maint-tag .live-dot { background: #e5a400; width: 6px; height: 6px; }
.maint-card h3 { font-size: var(--step-2); font-weight: 700; line-height: 1.25; }
.maint-card p { color: var(--muted); max-width: 400px; font-size: var(--step--1); line-height: 1.7; }
.maint-card .btn-primary { margin-top: var(--space-xs); }

/* ===== تبويبات النتيجة ونظام الصفحات والتقليب (Swipe & Pager) ===== */
.result-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3xs);
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: var(--space-s);
  max-width: 440px;
}
.result-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: calc(var(--radius) - 4px);
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--step--1);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.result-tab.active {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.result-tab.active i {
  color: var(--accent);
}
.result-tab-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

/* حاوية التقليب ثلاثية الأبعاد (3D Pager Container) */
.result-pager {
  position: relative;
  width: 100%;
  overflow: hidden;
  perspective: 1400px;
  padding-top: var(--space-s);
}
.result-track {
  display: flex;
  width: 100%;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.42s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.result-page {
  width: 100%;
  flex: 0 0 100%;
  min-width: 0;
  transform-style: preserve-3d;
  transition: opacity 0.38s ease, transform 0.42s cubic-bezier(0.2, 0.9, 0.3, 1), filter 0.38s ease;
  will-change: transform, opacity;
}
/* تأثير التقليب كانه يقلب في صفحات كتاب مع ميلان وبعد ثلاثي الأبعاد */
.result-page:not(.active) {
  opacity: 0.15;
  filter: blur(2px);
  pointer-events: none;
}
[dir="rtl"] .result-page-profile:not(.active) {
  transform: scale(0.93) rotateY(-8deg);
  transform-origin: left center;
}
[dir="rtl"] .result-page-videos:not(.active) {
  transform: scale(0.93) rotateY(8deg);
  transform-origin: right center;
}
[dir="ltr"] .result-page-profile:not(.active) {
  transform: scale(0.93) rotateY(8deg);
  transform-origin: right center;
}
[dir="ltr"] .result-page-videos:not(.active) {
  transform: scale(0.93) rotateY(-8deg);
  transform-origin: left center;
}
.result-page.active {
  opacity: 1;
  filter: blur(0);
  transform: scale(1) rotateY(0deg);
  pointer-events: auto;
}

/* صفحة الفيديوهات */
.result-page-videos {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  min-height: 480px;
}
.posts-subnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  padding: 4px 0;
}
.posts-seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-s);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.posts-seg button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: calc(var(--radius-s) - 2px);
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--step--1);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
/* نفس شكل .seg بباقي الموقع */
.posts-seg button.active {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .35);
}
.posts-count-indicator {
  font-size: var(--step--2);
  color: var(--muted);
  font-weight: 500;
}

/* شبكة الفيديوهات (TikTok / Reels Grid) */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 480px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
}
@media (min-width: 800px) {
  .posts-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }
}
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-s);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s, border-color 0.2s;
  user-select: none;
}
.post-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
}
.post-card:active {
  transform: scale(0.96);
}
.post-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface-2);
}
.post-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.post-card:hover .post-thumb {
  transform: scale(1.06);
}
.post-badge {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  color: #fff;
}
.post-type-badge {
  inset-inline-end: auto;
  inset-inline-start: 6px;
}
.post-overlay-stats {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 8px 6px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.85) 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
.post-overlay-stats .pstat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.post-overlay-stats .pstat i {
  font-size: 10px;
  opacity: 0.9;
}
.post-caption {
  padding: 6px 8px 8px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

/* هياكل تحميل الفيديوهات */
.posts-skeleton {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
@media (min-width: 800px) {
  .posts-skeleton { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
}
.sk-post-card {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-s);
  background: var(--surface-2);
  animation: sk-shimmer 1.4s ease-in-out infinite alternate;
}
@keyframes sk-shimmer {
  from { opacity: 0.5; }
  to { opacity: 0.9; }
}

.posts-more-wrap {
  display: flex;
  justify-content: center;
  padding: var(--space-s) 0;
}
.load-more-btn {
  min-width: 180px;
}

/* عارض الفيديو: نفس هيكل عارض الستوري (sv-*) مع تشغيل/إيقاف بالضغط وشريط تقدّم قابل للسحب */
/* ===== عارض الفيديو: تقليب عمودي مثل تيك توك بأسلوب Liquid Glass ===== */
.video-modal {
  --lg-fill: rgba(255, 255, 255, .1);
  --lg-edge: rgba(255, 255, 255, .22);
  --lg-blur: blur(22px) saturate(1.8) brightness(1.05);
  --lg-shine: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(255, 255, 255, .06), 0 10px 30px -12px rgba(0, 0, 0, .6);
  position: fixed; inset: 0; z-index: 1000; background: #000; display: grid; place-items: center; color: #fff; animation: svIn .25s ease;
}
.video-modal[hidden] { display: none; }
@media (min-width: 700px) { .video-modal { background: radial-gradient(120% 80% at 50% 0%, #1b1b22, #050507 70%); } }

/* الزجاج: تعبئة شفافة + ضباب مشبّع + حافة لامعة من فوق */
.vf-glass, .vf-bubble, .vf-info {
  background: linear-gradient(160deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .04) 55%), var(--lg-fill);
  border: 1px solid var(--lg-edge);
  backdrop-filter: var(--lg-blur); -webkit-backdrop-filter: var(--lg-blur);
  box-shadow: var(--lg-shine);
}

.vf-stage { position: relative; width: 100%; height: 100%; max-width: calc(100dvh * 9 / 16); overflow: hidden; background: #000; }
@media (min-width: 700px) { .vf-stage { height: min(94dvh, 940px); max-width: calc(min(94dvh, 940px) * 9 / 16); border-radius: 26px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 120px -30px rgba(0, 0, 0, .9); } }

.vf-feed {
  height: 100%; overflow-y: auto; overflow-x: hidden; scroll-snap-type: y mandatory; overscroll-behavior: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.vf-feed::-webkit-scrollbar { display: none; }
.vf-slide { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; user-select: none; -webkit-user-select: none; }

.vf-media { position: absolute; inset: 0; display: grid; place-items: center; background: #000; }
.vf-media > video, .vf-poster { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; }
.vf-poster { transition: opacity .3s; -webkit-user-drag: none; }
.vf-slide.ready .vf-poster { opacity: 0; }
.vf-photos, .vf-photo-carousel { position: relative; width: 100%; height: 100%; overflow: hidden; background: #000; }
/* تمرير أفقي أصلي: صورة وحدة لكل سحبة، والعمودي يبقى لتقليب المنشورات */
.vf-photo-track {
  display: flex; width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; touch-action: pan-x pan-y;
}
.vf-photo-track::-webkit-scrollbar { display: none; }
.vf-photo-slide {
  flex: 0 0 100%; width: 100%; height: 100%; position: relative; overflow: hidden; display: grid; place-items: center;
  scroll-snap-align: center; scroll-snap-stop: always; user-select: none; -webkit-user-select: none;
}
/* الصورة كاملة بدون قص، وخلفها نفس الصورة مكبّرة ومضبّبة تعبّي الفراغ */
.vf-photo-fill { position: absolute; inset: -8%; width: 116%; height: 116%; object-fit: cover; filter: blur(28px) saturate(1.4) brightness(.62); transform: scale(1.05); pointer-events: none; }
.vf-photo-img { position: relative; width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; pointer-events: none; }
.vf-photo-slide.broken .vf-photo-img { display: none; }
.vf-photo-badge {
  position: absolute; top: calc(64px + env(safe-area-inset-top)); inset-inline-end: 14px; z-index: 5;
  padding: 4px 12px; border-radius: 99px; font-size: 12px; font-weight: 700; letter-spacing: .02em;
  background: rgba(0, 0, 0, .58); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .45); pointer-events: none;
}
.vf-photo-dots {
  position: absolute; bottom: calc(158px + var(--safe-bottom)); inset-inline: 0; display: flex; justify-content: center; align-items: center; gap: 6px; z-index: 5; pointer-events: none;
}
.vf-photo-dots i, .vf-dots i {
  width: 6px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .4); transition: width .28s cubic-bezier(.34, 1.56, .64, 1), background .28s;
}
.vf-photo-dots i.on, .vf-dots i.on {
  width: 18px; background: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, .8);
}

.vf-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(0, 0, 0, .45), transparent 22%, transparent 55%, rgba(0, 0, 0, .7)); }

.vf-play, .vf-loading { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.vf-play i {
  width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; padding-inline-start: 5px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .06)); border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(18px) saturate(1.8); -webkit-backdrop-filter: blur(18px) saturate(1.8); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
  opacity: 0; transform: scale(.7); transition: opacity .2s, transform .25s cubic-bezier(.34, 1.5, .64, 1);
}
[dir="rtl"] .vf-play i { padding-inline-start: 0; padding-inline-end: 5px; }
.vf-slide.paused .vf-play i { opacity: 1; transform: none; }
.vf-loading[hidden] { display: none; }
.vf-loading .spinner { width: 36px; height: 36px; color: #fff; opacity: .9; }
.vf-slide.failed .vf-play i { --ic-s: var(--ic-warn); }
.vf-slide.failed .vf-play i { opacity: 1; transform: none; padding: 0; }

/* الشريط الجانبي: فقاعات زجاج فوق بعض مثل تيك توك */
.vf-rail {
  position: absolute; z-index: 3; inset-inline-end: 10px; bottom: calc(22px + var(--safe-bottom));
  display: grid; justify-items: center; gap: 14px;
}
.vf-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; background: #222; margin-bottom: 4px; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .7); }
.vf-act { display: grid; justify-items: center; gap: 4px; color: #fff; text-decoration: none; }
.vf-bubble { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; transition: transform .18s; }
.vf-act:is(button, a):active .vf-bubble { transform: scale(.88); }
.vf-act b { font-size: 12px; font-weight: 700; direction: ltr; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.vf-act.like i { color: #fff; transition: color .18s; }
.vf-act.like.on i { color: #ff3b5c; filter: drop-shadow(0 0 8px rgba(255, 59, 92, .5)); }
.vf-act.like.pop .vf-bubble { animation: likePop .35s ease; }
@keyframes likePop { 0% { transform: scale(.8); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
.likes-ico { color: #ff3b5c; }
.likes-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-s); margin-bottom: var(--space-s); color: var(--muted); font-size: var(--step--1); }
.like-author { max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vf-act.save i { color: #ffc93c; }

/* قائمة المشاركة: تطلع جنب الزر */
.vf-share { position: relative; }
.vf-share-menu {
  position: absolute; inset-inline-end: 0; bottom: calc(100% + 10px);
  display: grid; gap: 4px; padding: 6px; border-radius: 18px; min-width: max-content;
  background: linear-gradient(160deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .05) 55%), rgba(20, 20, 24, .45);
  border: 1px solid var(--lg-edge); backdrop-filter: var(--lg-blur); -webkit-backdrop-filter: var(--lg-blur); box-shadow: var(--lg-shine);
  animation: vfMenu .22s cubic-bezier(.34, 1.4, .64, 1) both; transform-origin: bottom right;
}
.vf-share-menu[hidden] { display: none; }
@keyframes vfMenu { from { opacity: 0; transform: translateY(8px) scale(.88); } }
[dir="rtl"] .vf-share-menu { transform-origin: bottom left; }
.vf-share-menu > * { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; color: #fff; font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.vf-share-menu > *:active { background: rgba(255, 255, 255, .14); }
@media (hover: hover) { .vf-share-menu > *:hover { background: rgba(255, 255, 255, .12); } }
.vf-share-menu i { width: 18px; text-align: center; font-size: 15px; }
.vf-share [aria-expanded="true"] .vf-bubble { background: rgba(255, 255, 255, .3); }

/* بطاقة المعلومات تحت: زجاج بزوايا ناعمة */
.vf-info {
  position: absolute; z-index: 2; bottom: calc(18px + var(--safe-bottom)); inset-inline-start: 10px; inset-inline-end: 72px;
  padding: 11px 14px 12px; border-radius: 20px; display: grid; gap: 6px; min-width: 0;
}
.vf-who { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.vf-who bdi { font-weight: 800; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vf-when { font-size: 12px; opacity: .7; white-space: nowrap; }
.vf-caption { font-size: 13.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; overflow-wrap: anywhere; }
.vf-caption.open { display: block; max-height: 28vh; overflow-y: auto; }
.vf-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; min-width: 0; opacity: .92; }
.vf-views { flex: none; display: inline-flex; align-items: center; gap: 5px; }
.vf-views b { direction: ltr; }
.vf-music { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 6px; }
.vf-marquee { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.vf-marquee span { display: inline-block; padding-inline: 10%; }
.vf-slide.active:not(.paused) .vf-marquee span { animation: vfMarquee 9s linear infinite; }
@keyframes vfMarquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }
[dir="rtl"] .vf-slide.active:not(.paused) .vf-marquee span { animation-name: vfMarqueeRtl; }
@keyframes vfMarqueeRtl { from { transform: translateX(0); } to { transform: translateX(100%); } }

/* شريط التقدّم: رفيع، ويكبر لما تسحبه */
.vf-seek { position: absolute; z-index: 3; bottom: var(--safe-bottom); inset-inline: 0; padding: 7px 0 6px; cursor: pointer; touch-action: none; }
.vf-seek span { display: flex; height: 2.5px; background: rgba(255, 255, 255, .22); transition: height .15s; }
.vf-seek i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #25f4ee, #fff 40%, #fe2c55); box-shadow: 0 0 8px rgba(255, 255, 255, .5); }
.vf-seek.drag span, .vf-seek:hover span { height: 5px; }

/* الشريط العلوي: إغلاق، رقم الفيديو، الصوت */
.vf-top {
  position: absolute; z-index: 4; top: 0; inset-inline: 0; pointer-events: none;
  padding: calc(10px + env(safe-area-inset-top) + var(--tg-content-safe-area-inset-top, 0px)) 12px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.vf-top > * { pointer-events: auto; }
.vf-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 17px; transition: transform .18s, opacity .2s; }
.vf-icon:active { transform: scale(.9); }
.vf-icon:disabled { opacity: .3; pointer-events: none; }
.vf-count { padding: 7px 14px; border-radius: 99px; font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.vf-count:empty { visibility: hidden; }

.vf-hint {
  position: absolute; z-index: 4; inset-inline: 0; margin-inline: auto; width: max-content; max-width: 86%; bottom: 46%;
  display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 99px; font-size: 13px; font-weight: 600; pointer-events: none;
  animation: vfHint 1.6s ease-in-out infinite;
}
.vf-hint[hidden] { display: none; }
.vf-hint i { animation: vfSwipe 1.6s ease-in-out infinite; }
@keyframes vfHint { 50% { transform: translateY(-6px); } }
@keyframes vfSwipe { 0%, 100% { transform: translateY(8px); opacity: .5; } 50% { transform: translateY(-8px); opacity: 1; } }

/* أزرار فوق/تحت للماوس على الشاشات الكبيرة */
.vf-nav { display: none; }
@media (min-width: 700px) and (hover: hover) {
  .vf-nav { display: grid; gap: 12px; position: absolute; inset-inline-end: max(24px, calc(50% - min(94dvh, 940px) * 9 / 32 - 90px)); top: 50%; transform: translateY(-50%); }
  .vf-nav .vf-icon { width: 50px; height: 50px; font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .vf-hint, .vf-hint i, .vf-slide.active .vf-marquee span { animation: none !important; }
}
body.modal-open { overflow: hidden; }

/* ===== لوحة التعليقات الزجاجية (Comments Sheet) ===== */
.vf-comments-sheet {
  position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; justify-content: flex-end;
  pointer-events: auto; animation: vfFadeIn .22s ease both;
}
.vf-comments-sheet[hidden] { display: none; }
@keyframes vfFadeIn { from { opacity: 0; } to { opacity: 1; } }

.vf-sheet-backdrop {
  position: absolute; inset: 0; background: rgba(0, 0, 0, .48); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  cursor: pointer;
}
.vf-sheet-card {
  position: relative; z-index: 2; width: 100%; max-height: 74%; height: 74%; display: flex; flex-direction: column;
  background: linear-gradient(168deg, rgba(24, 24, 32, .96), rgba(12, 12, 16, .98));
  border-top: 1px solid rgba(255, 255, 255, .16); border-radius: 24px 24px 0 0;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .2);
  backdrop-filter: blur(34px) saturate(1.8); -webkit-backdrop-filter: blur(34px) saturate(1.8);
  animation: vfSheetUp .3s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes vfSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.vf-sheet-header {
  padding: 10px 16px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); display: flex; flex-direction: column; gap: 8px; flex-shrink: 0;
}
.vf-sheet-handle {
  width: 40px; height: 4.5px; border-radius: 99px; background: rgba(255, 255, 255, .32); align-self: center; margin-bottom: 2px;
}
.vf-sheet-title-row {
  display: flex; align-items: center; justify-content: space-between;
}
.vf-sheet-title {
  display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: #fff;
}
.vf-sheet-title i { color: #25f4ee; font-size: 16px; }
.vf-sheet-total {
  padding: 2px 9px; border-radius: 99px; background: rgba(37, 244, 238, .12); border: 1px solid rgba(37, 244, 238, .3);
  font-size: 12px; font-weight: 700; color: #25f4ee;
}
.vf-sheet-close {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: rgba(255, 255, 255, .75);
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); cursor: pointer; transition: transform .15s, background .15s, color .15s;
}
.vf-sheet-close:hover { background: rgba(255, 255, 255, .18); color: #fff; transform: scale(1.05); }
.vf-sheet-close:active { transform: scale(.92); }

.vf-sheet-body {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent;
}
.vf-sheet-body::-webkit-scrollbar { width: 5px; }
.vf-sheet-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .2); border-radius: 99px; }

.vf-comments-list {
  display: flex; flex-direction: column; gap: 14px;
}

.vf-comment-item {
  display: flex; gap: 12px; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.vf-comment-item:last-child { border-bottom: none; }
.vf-c-avatar {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 1.5px solid rgba(255, 255, 255, .18);
  flex-shrink: 0; background: #222; box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
}
.vf-c-content {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px;
}
.vf-c-user-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.2;
}
.vf-c-nickname {
  font-size: 13.5px; font-weight: 700; color: #fff; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vf-c-username {
  font-size: 11.5px; color: rgba(255, 255, 255, .45); direction: ltr; font-weight: 500;
}
.vf-c-region {
  font-size: 10px; padding: 1px 5px; border-radius: 4px; background: rgba(254, 44, 85, .15); border: 1px solid rgba(254, 44, 85, .3);
  color: #fe2c55; font-weight: 700; text-transform: uppercase;
}
.vf-c-verified { color: #20d5ec; font-size: 11px; }

.vf-c-text {
  font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, .92); word-break: break-word; white-space: pre-wrap;
  font-family: inherit; margin: 2px 0 0;
}
.vf-c-media {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px;
}
.vf-c-media img {
  max-width: 140px; max-height: 140px; border-radius: 10px; object-fit: contain; background: rgba(0, 0, 0, .3);
  border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
}
.vf-c-footer {
  display: flex; align-items: center; gap: 12px; font-size: 11.5px; color: rgba(255, 255, 255, .42); margin-top: 3px;
}
.vf-c-time { white-space: nowrap; }

.vf-c-like {
  display: flex; flex-direction: column; align-items: center; gap: 3px; color: rgba(255, 255, 255, .5);
  cursor: pointer; flex-shrink: 0; padding-top: 4px; min-width: 28px;
}
.vf-c-like i { font-size: 15px; transition: transform .15s, color .15s; }
.vf-c-like b { font-size: 11px; font-weight: 600; direction: ltr; }
.vf-c-like:hover i { color: #ff3b5c; transform: scale(1.15); }
.vf-c-like.liked i { color: #ff3b5c; }

.vf-c-replies-btn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #25f4ee;
  background: none; border: none; padding: 4px 0; cursor: pointer; margin-top: 4px; transition: opacity .15s;
}
.vf-c-replies-btn:hover { opacity: .85; }
.vf-c-replies-btn i { font-size: 11px; transition: transform .2s; }
.vf-c-replies-btn.open i { transform: rotate(180deg); }

.vf-c-replies-list {
  display: flex; flex-direction: column; gap: 10px; margin-top: 8px; padding-inline-start: 12px;
  border-inline-start: 2px solid rgba(255, 255, 255, .1);
}

.vf-comments-loader, .vf-comments-empty, .vf-comments-error {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 36px 16px; text-align: center; color: rgba(255, 255, 255, .6);
}
.vf-comments-loader[hidden], .vf-comments-empty[hidden], .vf-comments-error[hidden] { display: none; }
.vf-comments-empty i { font-size: 38px; color: rgba(255, 255, 255, .25); margin-bottom: 4px; }
.vf-comments-empty p { font-size: 14px; font-weight: 600; margin: 0; }
.vf-comments-error i { font-size: 32px; color: #fe2c55; }
.vf-comments-error p { font-size: 13.5px; color: rgba(255, 255, 255, .8); margin: 0; }
.vf-retry-btn {
  padding: 7px 18px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2);
  color: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background .15s;
}
.vf-retry-btn:hover { background: rgba(255, 255, 255, .2); }

.vf-comments-more-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 11px;
  border-radius: 14px; background: rgba(255, 255, 255, .07); color: #fff; font-size: 13px; font-weight: 700;
  border: 1px solid rgba(255, 255, 255, .12); cursor: pointer; transition: background .18s, transform .15s;
  margin-top: 6px;
}
.vf-comments-more-btn:hover { background: rgba(255, 255, 255, .14); }
.vf-comments-more-btn:active { transform: scale(.98); }
.vf-comments-more-btn[hidden] { display: none; }

/* ===== الواجهة من اليسار لليمين (English / Русский) ===== */
[dir="ltr"] .switch input:checked + span::after { transform: translateX(20px); }
[dir="ltr"] .stat b { text-align: left; }
[dir="ltr"] .row .v, [dir="ltr"] .row .ago { text-align: right; }
[dir="ltr"] .row .ago { direction: ltr; }
/* الأسهم اللي تدل على الاتجاه تنقلب */
[dir="ltr"] .fa-arrow-right, [dir="ltr"] .fa-arrow-left, [dir="ltr"] .fa-chevron-left { transform: scaleX(-1); }
[dir="ltr"] .sv-bars { flex-direction: row; }
[dir="ltr"] .sv-bars i { float: left; }
[dir="ltr"] .eyebrow, [dir="ltr"] .rec-label, [dir="ltr"] .setting small { letter-spacing: .01em; }
/* خيار لغة أسماء الدول يخص الواجهة العربية بس، بالباقي تتبع لغة التطبيق */
html:not([lang="ar"]) #countryLangRow { display: none; }
#langSeg button[lang="ru"], #langSeg button[lang="en"] { font-family: system-ui, sans-serif; }

/* تبويب الريبوست المقفل */
.posts-seg .tab-lock { font-size: .75em; opacity: .6; margin-inline-start: 2px; }

/* ===== قسم الفيديوهات: قريباً ===== */
.soon-card { display: none; }
.result-page-videos.is-soon > :not(.soon-card) { display: none !important; }
.result-page-videos.is-soon > .soon-card {
  position: relative; overflow: hidden; display: grid; justify-items: center; text-align: center; gap: var(--space-2xs);
  margin-top: var(--space-s); padding: var(--space-xl) var(--space-m) var(--space-l); border-radius: var(--radius);
  background: radial-gradient(90% 70% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), var(--surface);
  border: 1px solid var(--line);
}
.soon-visual { position: relative; width: 88px; height: 88px; display: grid; place-items: center; margin-bottom: var(--space-2xs); }
.soon-visual::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--accent) 50%, transparent); animation: spin 18s linear infinite; }
.soon-visual .fa-film { font-size: 34px; color: var(--muted); }
.soon-play { position: absolute; bottom: 6px; inset-inline-end: 4px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px -6px var(--accent); }
.soon-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; font-size: var(--step--2); font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.soon-tag .live-dot { width: 6px; height: 6px; }
.soon-card h3 { font-size: var(--step-2); font-weight: 700; line-height: 1.3; }
.soon-card p { color: var(--muted); max-width: 400px; font-size: var(--step--1); line-height: 1.7; }

/* ===== رادار البحث ===== */
.radar { position: relative; width: min(260px, 68vw); aspect-ratio: 1; margin: var(--space-m) auto 0; }
.radar-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line-strong); }
.radar-ring.r2 { inset: 16%; }
.radar-ring.r3 { inset: 32%; border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 290deg, color-mix(in srgb, var(--accent) 38%, transparent) 360deg);
  animation: spin 4.5s linear infinite;
}
.radar-core {
  position: absolute; inset: 39%; border-radius: 50%; display: grid; place-items: center; font-size: var(--step-1);
  background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 14%, transparent);
}
.radar-blips { position: absolute; inset: 0; }
.blip {
  position: absolute; width: 42px; height: 42px; padding: 0; border-radius: 50%; overflow: hidden; transform: translate(50%, -50%);
  border: 2px solid var(--accent); background: var(--surface-2); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .5);
  animation: blipIn .45s cubic-bezier(.34, 1.4, .64, 1) both;
}
.blip:nth-child(2) { width: 36px; height: 36px; border-color: #25f4ee; animation-delay: .08s; }
.blip:nth-child(3) { width: 34px; height: 34px; border-color: var(--line-strong); animation-delay: .16s; }
.blip:nth-child(4) { width: 30px; height: 30px; border-color: var(--line-strong); animation-delay: .24s; }
.blip img { width: 100%; height: 100%; object-fit: cover; }
.blip:active { transform: translate(50%, -50%) scale(.9); }
@keyframes blipIn { from { opacity: 0; transform: translate(50%, -50%) scale(.3); } }

.radar-head { padding: var(--space-s) 0 var(--space-m); text-align: center; justify-items: center; gap: var(--space-3xs); }
.radar-head .display { font-size: var(--step-4); }
.radar-sub { color: var(--muted); font-size: var(--step--1); }
#view-search .search-bar, .quick-tools { margin-inline: auto; max-width: 560px; }

.quick-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2xs); padding-top: var(--space-m); }
.quick-tool {
  display: grid; gap: 2px; justify-items: start; text-align: start; padding: var(--space-s); min-width: 0;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--highlight);
  transition: border-color .2s, transform .15s;
}
.quick-tool:hover { border-color: var(--line-strong); }
.quick-tool:active { transform: scale(.97); }
.quick-tool strong { font-size: var(--step-0); font-weight: 700; margin-top: var(--space-2xs); }
.quick-tool small { font-size: var(--step--2); color: var(--muted); }
.qt-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.qt-ico.cyan { color: #25f4ee; }
[data-theme="light"] .qt-ico.cyan { color: #0b8f8a; }

/* ===== بطاقة معلومات الحساب ===== */
.idcard { position: relative; display: grid; padding: 0; overflow: hidden; }
.idcard-head {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-xs);
  padding: 10px var(--space-m); background: var(--accent); color: var(--on-accent); font-size: var(--step--1); font-weight: 900;
}
.idcard-head span[dir="ltr"] { font-family: var(--mono); font-size: var(--step--2); font-weight: 700; letter-spacing: .18em; }
.idcard-body {
  position: relative; display: flex; align-items: center; gap: var(--space-s); padding: var(--space-m);
  background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--text) 3%, transparent) 0 2px, transparent 2px 9px);
}
.idcard .avatar { width: clamp(84px, 22vw, 112px); }
.idcard-name { display: grid; min-width: 0; padding-inline-end: 70px; }
.idcard .k { font-size: var(--step--2); color: var(--muted); }
.idcard .nick { font-size: var(--step-2); }
.idcard-stamp {
  position: absolute; inset-inline-end: var(--space-s); top: 50%; width: 74px; height: 74px; padding: 6px;
  display: grid; place-items: center; text-align: center; border-radius: 50%;
  border: 2px dashed var(--accent); color: var(--accent); font-size: var(--step--2); font-weight: 900; line-height: 1.2;
  transform: translateY(-50%) rotate(-14deg); opacity: .9; pointer-events: none;
}
.idcard-fields {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border-block: 1px solid var(--line);
}
.idf { display: grid; gap: 2px; min-width: 0; padding: var(--space-xs) var(--space-m); background: var(--surface); }
.idf .v { font-weight: 700; display: flex; align-items: baseline; gap: .4em; min-width: 0; line-height: 1.4; overflow-wrap: anywhere; }
.idf .v.ok { color: var(--success); }
.idf .flag { font-size: 1.15em; }
.idcard > .country-sub, .idcard > .bio, .idcard > .tags { margin: var(--space-s) var(--space-m) 0; }
.idcard-foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs);
  margin-top: var(--space-s); padding: var(--space-xs) var(--space-m); border-top: 1px dashed var(--line-strong);
}
.idcard-code {
  display: inline-flex; align-items: center; gap: .6em; min-width: 0; overflow: hidden;
  font-family: var(--mono); font-size: var(--step--2); letter-spacing: .1em; color: var(--muted); white-space: nowrap;
}
.idcard-code span { overflow: hidden; text-overflow: ellipsis; }

/* ===== عمر الحساب ===== */
.age { display: grid; gap: var(--space-2xs); padding: var(--space-s) var(--space-m); }
.age .eyebrow { margin: 0; }
.age-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-xs); }
.age-val { color: var(--muted); font-size: var(--step--1); }
.age-val b { color: var(--text); font-size: var(--step-1); font-weight: 900; }
.age-bar { display: flex; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.age-bar i { display: block; height: 100%; margin-inline-start: auto; border-radius: 99px; background: var(--accent); }
.age-scale { display: flex; justify-content: space-between; font-size: var(--step--2); color: var(--muted); }

/* ===== حسابي: بطاقة العضوية + عرض VIP ===== */
.settings-grid .account { grid-column: 1 / -1; }
.account { display: grid; gap: var(--space-xs); grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.account:empty { display: none; }

.acc-card {
  position: relative; display: grid; gap: var(--space-s); padding: var(--space-m); overflow: hidden;
  border-radius: calc(var(--radius) + 4px); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--highlight);
  animation: rise .45s cubic-bezier(.2, .7, .2, 1) both;
}
.acc-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); }
.acc-brand { font-size: var(--step-1); font-weight: 300; letter-spacing: -0.03em; line-height: 1; }
.acc-brand b { font-weight: 700; color: var(--accent); }
.acc-brand em { font-style: normal; font-weight: 900; font-size: .62em; letter-spacing: .18em; margin-inline-start: .3em; vertical-align: middle; }
.acc-chip {
  display: inline-flex; align-items: center; gap: .45em; padding: .35em .85em; border-radius: 99px;
  font-size: var(--step--2); font-weight: 700; color: var(--muted); border: 1px solid var(--line-strong); white-space: nowrap;
}

.acc-user { display: flex; align-items: center; gap: var(--space-xs); min-width: 0; }
.acc-avatar {
  flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; display: grid; place-items: center;
  background: var(--surface-2); color: var(--accent); font-size: var(--step-1); font-weight: 900; border: 2px solid var(--line-strong);
}
.acc-names { display: grid; min-width: 0; line-height: 1.35; }
.acc-names strong { font-family: var(--font-display); font-size: var(--step-1); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-handle { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); text-align: start; }

.acc-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border-radius: var(--radius-s); overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.acc-meta > div { display: grid; gap: 2px; min-width: 0; padding: var(--space-xs) var(--space-s); background: var(--surface); }
.acc-meta .k { font-size: var(--step--2); color: var(--muted); }
.acc-meta .v { font-weight: 700; display: flex; align-items: center; gap: .4em; min-width: 0; }
.acc-meta .v.muted { color: var(--muted); font-weight: 500; }
.acc-id { display: inline-flex; align-items: center; gap: .5em; font-family: var(--mono); font-size: var(--step--2); letter-spacing: .08em; color: var(--muted); white-space: nowrap; }
.acc-meta .acc-id { color: var(--text); font-weight: 700; letter-spacing: .02em; }
.acc-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); padding-top: var(--space-xs); border-top: 1px dashed var(--line-strong); }
.acc-empty { display: flex; align-items: center; gap: var(--space-xs); }
.acc-empty strong { display: block; }
.acc-empty small { color: var(--muted); font-size: var(--step--1); }
.acc-loading .acc-meta { background: none; border: 0; gap: var(--space-2xs); }
.acc-loading .sk { height: 58px; border-radius: var(--radius-s); }

/* بطاقة VIP: داكنة وذهبية مهما كان الثيم، مثل بطاقة عضوية حقيقية */
.acc-card.vip {
  --gold: #e8c46a;
  color: #f6f1e4; border-color: color-mix(in srgb, var(--gold) 45%, transparent);
  background-color: #14110a;
  background-image:
    radial-gradient(120% 90% at 100% 0%, rgba(232, 196, 106, .18), transparent 55%),
    repeating-linear-gradient(135deg, rgba(232, 196, 106, .045) 0 2px, transparent 2px 10px);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 233, 170, .12);
}
.acc-card.vip::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 236, 180, .1) 48%, transparent 60%);
  background-size: 250% 100%; animation: accShine 5s ease-in-out infinite;
}
@keyframes accShine { 0%, 60% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
.acc-card.vip .acc-brand b { color: #f6f1e4; }
.acc-card.vip .acc-brand em { color: var(--gold); }
.acc-chip.gold { color: #1a1406; background: #e8c46a; border-color: transparent; }
.acc-card.vip .acc-avatar { border-color: var(--gold); background: #231d10; color: var(--gold); box-shadow: 0 0 0 4px rgba(232, 196, 106, .14); }
.acc-card.vip .acc-handle, .acc-card.vip .acc-meta .k, .acc-card.vip .acc-id { color: #b9ad8f; }
.acc-card.vip .acc-meta { background: rgba(232, 196, 106, .18); border-color: rgba(232, 196, 106, .18); }
.acc-card.vip .acc-meta > div { background: rgba(20, 17, 10, .92); }
.acc-card.vip .acc-meta .v i { color: var(--gold); }
.acc-card.vip .acc-foot { border-color: rgba(232, 196, 106, .3); }
.acc-thanks { font-size: var(--step--2); font-weight: 700; color: var(--gold); }

/* عرض VIP لغير المشتركين */
.acc-promo {
  display: grid; gap: var(--space-s); padding: var(--space-m); border-radius: calc(var(--radius) + 4px);
  background: var(--surface); border: 1px solid color-mix(in srgb, #e8c46a 40%, var(--line));
  box-shadow: var(--highlight); animation: rise .45s .06s cubic-bezier(.2, .7, .2, 1) both;
}
.acc-promo-head { display: flex; align-items: center; gap: var(--space-xs); }
.acc-crown { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; background: #14110a; color: #e8c46a; box-shadow: inset 0 0 0 1px rgba(232, 196, 106, .4); }
.acc-promo-kicker { font-size: var(--step--2); font-weight: 900; letter-spacing: .18em; color: #b8902c; text-align: start; }
[data-theme="dark"] .acc-promo-kicker { color: #e8c46a; }
.acc-promo h3 { font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; line-height: 1.2; }
.acc-features { list-style: none; display: grid; gap: var(--space-2xs); }
.acc-features li { display: flex; align-items: center; gap: var(--space-xs); }
.acc-features li > span { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 14px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.acc-features strong { display: block; font-weight: 700; font-size: var(--step--1); }
.acc-features small { display: block; color: var(--muted); font-size: var(--step--2); }
.acc-cta { width: 100%; justify-content: center; }

/* مدخل «حسابي» أعلى الإعدادات */
.settings-grid .acc-entry-wrap { grid-column: 1 / -1; padding-block: var(--space-2xs); }
.acc-entry { border-top: 0; gap: var(--space-xs); }
.acc-entry .acc-avatar { width: 46px; height: 46px; font-size: var(--step-0); }
.acc-entry strong { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-entry .acc-chip { flex: none; }
#view-account .account { padding-bottom: var(--space-m); }
.acc-hint { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .4em; font-size: var(--step--1); color: var(--muted); text-align: center; }
.acc-hint code { font-family: var(--mono); font-weight: 700; color: var(--text); padding: .1em .55em; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }

/* ===== أدوات VIP تحت التفاصيل: بطاقتين جنب بعض ===== */
.vip-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs); }
@media (min-width: 1024px) { .profile .vip-tools { grid-column: 6 / -1; } }
.vip-tool {
  display: grid; gap: 4px; align-content: start; justify-items: start; text-align: start; cursor: pointer; min-width: 0;
  padding: var(--space-s); border-color: color-mix(in srgb, #e8c46a 35%, var(--line));
  background: linear-gradient(160deg, color-mix(in srgb, #e8c46a 10%, var(--surface)), var(--surface) 65%);
  transition: border-color .2s, transform .15s;
}
.vip-tool:hover { border-color: color-mix(in srgb, #e8c46a 60%, var(--line)); }
.vip-tool:active { transform: scale(.97); }
.vip-tool-top { width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; margin-bottom: var(--space-2xs); }
.vip-tool-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 17px; background: #14110a; color: #e8c46a; }
.vip-tool-tag { display: inline-flex; align-items: center; gap: .35em; padding: .25em .6em; border-radius: 99px; font-size: var(--step--2); font-weight: 900; color: #1a1406; background: #e8c46a; }
.vip-tool strong { font-weight: 700; font-size: var(--step--1); line-height: 1.35; }
.vip-tool small { color: var(--muted); font-size: var(--step--2); line-height: 1.4; }

/* ===== شاشة طرق الدخول ===== */
.login-open, .login-open body { overflow: hidden; }
.login-sheet {
  position: fixed; inset: 0; z-index: 88; display: grid; place-items: end center; padding: 0;
  background: rgba(4, 4, 6, .7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: loginFade .25s ease;
}
@keyframes loginFade { from { opacity: 0; } }
.login-card {
  width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: linear-gradient(var(--surface), var(--surface)), var(--bg); border: 1px solid var(--line); border-radius: 24px 24px 0 0;
  padding: var(--space-m) var(--space-m) calc(var(--space-l) + var(--safe-bottom));
  box-shadow: 0 -24px 60px -30px rgba(0, 0, 0, .8); animation: loginUp .3s cubic-bezier(.2, .8, .2, 1);
}
@media (min-width: 560px) { .login-sheet { place-items: center; } .login-card { border-radius: 24px; } }
@keyframes loginUp { from { transform: translateY(16px); opacity: 0; } }

.login-head { display: flex; align-items: center; gap: var(--space-xs); margin-bottom: var(--space-m); }
.login-title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.login-title .eyebrow { margin: 0; }
.login-title bdi { font-family: var(--mono); font-weight: 700; font-size: var(--step-0); }
.login-head-ico { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 18px; background: #14110a; color: #e8c46a; }
.login-close { background: var(--surface-2); }

.login-summary { display: flex; align-items: baseline; gap: .5em; padding: var(--space-s) var(--space-m); border-radius: var(--radius); background: var(--surface-2); color: var(--muted); font-size: var(--step--1); margin-bottom: var(--space-s); }
.login-summary .num { font-size: var(--step-3); font-weight: 900; color: var(--text); line-height: 1; }

.login-list { list-style: none; display: grid; gap: var(--space-2xs); }
.login-row {
  display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-s); border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--line); opacity: 0; transform: translateY(10px);
  animation: loginRow .45s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: var(--d);
}
@keyframes loginRow { to { opacity: 1; transform: none; } }
.login-row-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 17px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.login-row.off .login-row-ico { background: var(--surface); color: var(--muted); }
.login-row-text { flex: 1; min-width: 0; display: grid; }
.login-row-text strong { font-weight: 700; }
.login-row-text small { color: var(--muted); font-size: var(--step--2); }
.login-row.off { opacity: 0; }
.login-row.off .login-row-text strong { color: var(--muted); }
.login-row-state { flex: none; font-size: 18px; }
.login-row.on .login-row-state { color: var(--success); }
.login-row.off .login-row-state { color: var(--muted); opacity: .5; }

/* إحصائيات اللايف */
.ls-head { display: flex; align-items: center; gap: var(--space-xs); margin-bottom: var(--space-s); }
.ls-avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.ls-who { flex: 1; min-width: 0; display: grid; }
.ls-who small { color: var(--muted); font-size: var(--step--2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-state { flex: none; padding: .3em .75em; border-radius: 99px; font-size: var(--step--2); font-weight: 800; background: var(--surface-2); color: var(--muted); }
.ls-state.on { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.ls-state.on i { font-size: .6em; vertical-align: middle; }
.ls-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2xs); margin-bottom: var(--space-s); }
.ls-tile { display: grid; justify-items: center; gap: 2px; padding: var(--space-xs) 4px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); text-align: center; }
.ls-tile i { color: #e8c46a; font-size: 15px; }
.ls-tile b { font-size: var(--step-0); font-weight: 900; line-height: 1.2; }
.ls-tile small { color: var(--muted); font-size: var(--step--2); }
.ls-sub { margin: var(--space-s) 0 var(--space-2xs); color: var(--muted); font-size: var(--step--1); font-weight: 700; }

.login-note { margin-top: var(--space-s); display: flex; align-items: center; gap: .5em; font-size: var(--step--2); color: var(--muted); }

/* حالة التحميل: رادار فحص */
.login-scan { display: grid; justify-items: center; gap: var(--space-s); padding: var(--space-xl) 0; color: var(--muted); }
.login-scan-ring { position: relative; width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); color: #e8c46a; font-size: 26px; }
.login-scan-sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 290deg, color-mix(in srgb, #e8c46a 45%, transparent) 360deg); animation: spin 1.1s linear infinite; }

/* مقفلة لغير المشتركين / خطأ */
.login-locked { display: grid; justify-items: center; text-align: center; gap: var(--space-xs); padding: var(--space-l) var(--space-s); }
.login-lock { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: #14110a; color: #e8c46a; margin-bottom: var(--space-2xs); }
.login-lock.err { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.login-locked h3 { font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; }
.login-locked p { color: var(--muted); max-width: 32ch; }
.login-locked .btn-primary { margin-top: var(--space-2xs); }

/* ===== فحص ارتباط البريد ===== */
.login-title-text { font-weight: 700; font-size: var(--step-0); }
.email-form { display: grid; gap: var(--space-xs); }
.email-form .field { background: var(--surface-2); border-radius: var(--radius); }
.email-form .btn-primary { width: 100%; }
.email-error { display: flex; align-items: center; gap: .4em; color: var(--danger); font-size: var(--step--1); }
.email-result { display: grid; justify-items: center; text-align: center; gap: var(--space-2xs); padding: var(--space-m) var(--space-s) var(--space-s); }
.email-badge {
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; margin-bottom: var(--space-2xs);
  animation: emailPop .5s cubic-bezier(.34, 1.5, .64, 1) both;
}
@keyframes emailPop { from { transform: scale(.3); opacity: 0; } }
.email-result.taken .email-badge { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 7%, transparent); }
.email-result.free .email-badge { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); box-shadow: 0 0 0 10px color-mix(in srgb, var(--success) 7%, transparent); }
.email-addr { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); max-width: 100%; overflow-wrap: anywhere; }
.email-result h3 { font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; animation: rise .4s .1s both; }
.email-result p { color: var(--muted); animation: rise .4s .16s both; }
.email-again { width: 100%; justify-content: center; margin-top: var(--space-xs); }

/* ===== أفعال على حسابك: حذف الريبوستات / إلغاء المتابعة ===== */
.act-warn { display: flex; align-items: flex-start; gap: .5em; padding: var(--space-xs) var(--space-s); border-radius: var(--radius-s); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 9%, transparent); font-size: var(--step--1); }
.act-warn i { color: var(--danger); margin-top: .2em; }
.act-label { font-size: var(--step--1); font-weight: 700; margin-top: var(--space-3xs); }
.act-help { font-size: var(--step--2); color: var(--muted); }
.act-help summary { cursor: pointer; display: inline-flex; align-items: center; gap: .4em; }
.act-help ol { margin: var(--space-3xs) 0 0; padding-inline-start: 1.4em; display: grid; gap: .2em; }
.act-chips button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.act-channel { width: 100%; justify-content: center; }
.act-confirm { display: flex; align-items: center; gap: .5em; font-size: var(--step--1); cursor: pointer; }
.act-confirm input { width: 18px; height: 18px; accent-color: var(--danger); flex: none; }

/* ===== الإعلان المنبثق ===== */
.ad-popup {
  position: fixed; inset: 0; z-index: 92; display: grid; place-items: center; padding: var(--gutter);
  background: rgba(4, 4, 6, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: loginFade .25s ease;
}
.ad-card {
  position: relative; width: min(400px, 100%); max-height: 86dvh; overflow: hidden auto; border-radius: 22px;
  background: linear-gradient(var(--surface), var(--surface)), var(--bg); border: 1px solid var(--line); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9);
  animation: adPop .4s cubic-bezier(.34, 1.3, .64, 1) both;
}
@keyframes adPop { from { opacity: 0; transform: scale(.88) translateY(14px); } }
.ad-close {
  position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-size: 16px; color: #fff; background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ad-close:active { transform: scale(.9); }
.ad-tag {
  position: absolute; top: 14px; inset-inline-end: 12px; z-index: 2; padding: 3px 10px; border-radius: 99px;
  font-size: var(--step--2); font-weight: 700; color: #fff; background: rgba(0, 0, 0, .5);
}
.ad-card.text-only .ad-tag { position: static; display: inline-block; margin: var(--space-s) var(--space-m) 0; color: var(--muted); background: var(--surface-2); }
.ad-card.text-only .ad-close { color: var(--text); background: var(--surface-2); border-color: var(--line); }
.ad-media { display: block; background: #000; }
.ad-media img { width: 100%; max-height: 62dvh; object-fit: contain; }
.ad-body { display: grid; gap: var(--space-2xs); padding: var(--space-s) var(--space-m) var(--space-m); }
.ad-card.text-only .ad-body { padding-top: var(--space-xs); }
.ad-body h3 { font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; line-height: 1.25; }
.ad-body p { color: var(--muted); white-space: pre-line; }
.ad-cta { margin-top: var(--space-2xs); width: 100%; }
.ad-cta i { font-size: .8em; }

/* ===== لوحة التحكم ===== */
.adm-ico { background: #14110a; color: #e8c46a; }
.admin { display: grid; gap: var(--space-xs); padding-bottom: var(--space-m); }
.adm-live {
  display: grid; gap: 2px; padding: var(--space-m); border-radius: calc(var(--radius) + 4px); color: #fff;
  background-color: #0e0e12;
  background-image: radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .03) 0 2px, transparent 2px 10px);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.adm-live-top { display: flex; align-items: center; justify-content: space-between; }
.adm-live-label { display: inline-flex; align-items: center; gap: .55em; font-weight: 700; font-size: var(--step--1); }
.adm-live-num { font-size: clamp(3.4rem, 15vw, 5.5rem); font-weight: 900; line-height: 1; letter-spacing: -0.03em; direction: ltr; text-align: right; }
.adm-live-sub { color: rgba(255, 255, 255, .7); font-size: var(--step--2); }
.adm-refresh { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); color: #fff; }

.adm-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs); }
@media (min-width: 760px) { .adm-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.adm-stat { display: grid; gap: var(--space-2xs); padding: var(--space-s); }
.adm-stat span { color: var(--muted); font-size: var(--step--2); display: inline-flex; align-items: center; gap: .45em; }
.adm-stat span i { color: var(--accent); }
.adm-stat b { font-size: var(--step-3); font-weight: 900; line-height: 1; direction: ltr; text-align: right; }
.adm-stat.gold span i { color: #e8c46a; }

.adm-ads { display: grid; gap: var(--space-s); }
.adm-ads-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); }
.adm-ads-head h3 { font-size: var(--step-1); font-weight: 700; }
.adm-ads-head small { color: var(--muted); font-size: var(--step--1); }
.adm-current { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-xs); border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.adm-current img, .adm-current-txt { flex: none; width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: #000; }
.adm-current-txt { display: grid; place-items: center; color: var(--accent); background: var(--surface); font-size: 22px; }
.adm-current > div:not(.adm-current-btns) { flex: 1; min-width: 0; display: grid; }
.adm-current strong { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-current small { color: var(--muted); font-size: var(--step--2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-current-btns { display: flex; gap: 6px; }
.adm-current-btns .icon-btn { width: 40px; height: 40px; }
.icon-btn.danger { color: var(--danger); }

.adm-form { display: grid; gap: var(--space-xs); padding-top: var(--space-xs); border-top: 1px dashed var(--line-strong); }
.adm-form .eyebrow { margin: 0; }
.adm-drop {
  position: relative; display: grid; place-items: center; min-height: 150px; border-radius: var(--radius); cursor: pointer; overflow: hidden;
  border: 1.5px dashed var(--line-strong); background: var(--surface-2); transition: border-color .2s;
}
.adm-drop:hover { border-color: var(--accent); }
.adm-drop-empty { display: grid; justify-items: center; gap: 4px; text-align: center; padding: var(--space-s); color: var(--muted); }
.adm-drop-empty i { font-size: 28px; color: var(--accent); margin-bottom: 4px; }
.adm-drop-empty strong { color: var(--text); font-weight: 700; }
.adm-drop-empty small { font-size: var(--step--2); }
.adm-drop.has-img .adm-drop-empty { display: none; }
.adm-drop-img { width: 100%; max-height: 320px; object-fit: contain; background: #000; }
.adm-remove-img { justify-self: start; color: var(--danger); }
.adm-field { display: grid; gap: 4px; min-width: 0; }
.adm-field > span { font-size: var(--step--1); color: var(--muted); }
.adm-field textarea.text-input { height: auto; padding-block: var(--space-xs); resize: vertical; line-height: 1.6; }
.adm-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--space-xs); }
.adm-error { color: var(--danger); font-size: var(--step--1); }
.adm-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--space-xs); }
.adm-actions .btn-soft { justify-content: center; }
.adm-note { display: flex; gap: .5em; font-size: var(--step--2); color: var(--muted); }
.adm-note i { margin-top: .3em; }

.adm-empty { color: var(--muted); justify-content: center; padding: var(--space-s) 0 !important; }

/* ===== المستخدمين في لوحة التحكم ===== */
.adm-users { display: grid; gap: var(--space-xs); }
.adm-users-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-xs); }
.adm-users-head h3 { font-size: var(--step-1); font-weight: 700; }
.adm-users-count { color: var(--muted); font-size: var(--step--1); padding: .2em .7em; border-radius: 99px; background: var(--surface-2); }
.adm-users-count:empty { display: none; }
.adm-search { background: var(--surface-2); }
.adm-search input::-webkit-search-cancel-button { display: none; }
.adm-filters { gap: 6px; }
.adm-filters button { white-space: nowrap; }

.adm-user-list { list-style: none; display: grid; gap: 6px; }
.adm-user {
  display: flex; align-items: flex-start; gap: var(--space-xs); padding: var(--space-xs); border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--line); animation: rise .3s both;
}
.adm-user.online { border-color: color-mix(in srgb, var(--success) 35%, var(--line)); }
.adm-uavatar {
  position: relative; flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 900; font-size: var(--step-1); color: var(--accent); background: var(--surface); border: 1px solid var(--line-strong);
}
.adm-uavatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.adm-uavatar .adm-online { position: absolute; bottom: 1px; inset-inline-end: 1px; width: 12px; height: 12px; border-radius: 50%; background: var(--success); border: 2px solid var(--surface-2); }
.adm-uinfo { flex: 1; min-width: 0; display: grid; gap: 3px; }
.adm-uname { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.adm-uname strong { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.adm-badge { display: inline-flex; align-items: center; gap: .3em; padding: .15em .55em; border-radius: 99px; font-size: var(--step--2); font-weight: 800; white-space: nowrap; }
.adm-badge.vip { color: #1a1406; background: #e8c46a; }
.adm-badge.premium { color: #fff; background: linear-gradient(135deg, #6c5ce7, #a66bff); }
.adm-umeta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: var(--step--1); }
.adm-handle { color: var(--accent); font-family: var(--mono); font-weight: 600; }
.adm-uid { display: inline-flex; align-items: center; gap: .4em; font-family: var(--mono); font-size: var(--step--2); color: var(--muted); }
.adm-utags { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: var(--step--2); color: var(--muted); }
.adm-utags span { display: inline-flex; align-items: center; gap: .35em; }
.adm-utags .muted { opacity: .8; }
.adm-ago { flex: none; font-size: var(--step--2); color: var(--muted); padding-top: 2px; white-space: nowrap; }
.adm-now { color: var(--success); font-weight: 800; }
.adm-more { width: 100%; justify-content: center; }

/* ===== سجل أحدث الزيارات ===== */
.adm-visit { gap: var(--space-s); padding: var(--space-s); align-items: center; }
.adm-visit .adm-uavatar { width: 44px; height: 44px; border-radius: 14px; font-size: var(--step-0); }
.adm-visit .adm-uavatar img { border-radius: 13px; }
.adm-visit .adm-uname { align-items: baseline; }
.adm-visit-dev { background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); }
.adm-uid.off { color: var(--muted); opacity: .7; }
.adm-visit-ip { padding: .1em .5em; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.adm-visit-ip em { color: var(--accent); }
.adm-visit-tags { margin-top: 1px; }
.adm-visit-tags em { font-style: normal; color: var(--muted); opacity: .7; margin-inline-end: .25em; }
.adm-visit-tags .adm-visit-loc { color: var(--text); font-weight: 600; }
.adm-visit-time { align-self: flex-start; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: left; padding-top: 0; }
.adm-visit-time small { color: var(--muted); font-size: var(--step--2); font-variant-numeric: tabular-nums; }

/* ===== تبويب التحليلات ===== */
.adm-pane[data-pane="analytics"] { display: grid; gap: var(--space-s); }
.adm-stat-text { font-size: var(--step--1); font-weight: 800; line-height: 1.3; min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; word-break: break-word; }
.adm-breakdown-sec { display: grid; gap: var(--space-xs); }
/* min(100%, …) يمنع تجاوز العرض على الشاشات الضيقة (مشكلة auto-fit المعروفة) */
.adm-breakdown { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--space-xs); }
.adm-bars { display: grid; gap: 9px; align-content: start; min-width: 0; padding: var(--space-s); border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.adm-bars-head { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--step--1); color: var(--muted); }
.adm-bars-head i { color: var(--accent); }
.adm-bars-empty { color: var(--muted); font-size: var(--step--1); }
.adm-bar { display: grid; gap: 4px; min-width: 0; }
.adm-bar-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: var(--step--1); }
.adm-bar-top > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-bar-top .num { flex: none; color: var(--muted); font-size: var(--step--2); }
.adm-bar-track { height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; }
.adm-bar-track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .5s ease; }

/* ===== تبويب VIP ===== */
.vip-page { display: grid; gap: var(--space-s); padding-bottom: var(--space-m); }
.vip-head { padding-bottom: 0; }
.vip-hero {
  position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-s); padding: var(--space-m);
  border-radius: calc(var(--radius) + 6px); color: #f6f1e4; overflow: hidden;
  background-color: #14110a;
  background-image: radial-gradient(110% 120% at 100% 0%, rgba(232, 196, 106, .24), transparent 58%),
    repeating-linear-gradient(135deg, rgba(232, 196, 106, .05) 0 2px, transparent 2px 10px);
  border: 1px solid rgba(232, 196, 106, .4);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 233, 170, .14);
}
.vip-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 236, 180, .12) 48%, transparent 60%);
  background-size: 250% 100%; animation: accShine 5s ease-in-out infinite;
}
.vip-hero > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.vip-hero-crown { flex: none; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; color: #1a1406; background: #e8c46a; box-shadow: 0 10px 26px -10px rgba(232, 196, 106, .8); }
.vip-hero-kicker { font-size: var(--step--2); font-weight: 900; letter-spacing: .2em; color: #e8c46a; text-align: start; }
.vip-hero h2 { font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; line-height: 1.2; }
.vip-hero-sub { font-size: var(--step--1); color: #c9bd9f; }
.vip-hero-cta { width: 100%; position: relative; z-index: 1; }

.vip-tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs); }
@media (min-width: 760px) { .vip-tools-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.vip-card {
  position: relative; display: grid; align-content: start; gap: 5px; text-align: start; min-width: 0; cursor: pointer;
  padding: var(--space-s); border-radius: calc(var(--radius) + 2px); overflow: hidden;
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--c) 16%, transparent), transparent 60%), var(--surface);
  border: 1px solid color-mix(in srgb, var(--c) 28%, var(--line)); box-shadow: var(--highlight);
  animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d);
  transition: transform .15s, border-color .2s;
}
.vip-card:active { transform: scale(.97); }
.vip-card:hover { border-color: color-mix(in srgb, var(--c) 55%, var(--line)); }
.vip-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--space-2xs); }
.vip-card-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 19px; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); }
.vip-card-lock { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; color: var(--muted); background: var(--surface-2); }
.vip-card.locked .vip-card-lock { color: #1a1406; background: #e8c46a; }
.vip-card strong { font-weight: 800; font-size: var(--step-0); line-height: 1.3; }
.vip-card small { color: var(--muted); font-size: var(--step--2); line-height: 1.5; }
.vip-foot { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .4em; color: var(--muted); font-size: var(--step--1); text-align: center; }
.vip-foot code { font-family: var(--mono); font-weight: 700; color: var(--text); padding: .1em .55em; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }

/* شبكة الفيديوهات داخل أدوات VIP */
.vip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border-radius: var(--radius-s); overflow: hidden; }
.vip-tile {
  position: relative; aspect-ratio: 3 / 4; background: var(--surface-2); overflow: hidden; cursor: pointer;
  opacity: 0; animation: loginRow .4s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: var(--d);
}
.vip-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.vip-tile:active img { transform: scale(1.05); }
.vip-tile::after { content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); pointer-events: none; }
.vip-tile-stat, .vip-tile-dur, .vip-tile-when { position: absolute; z-index: 1; color: #fff; font-size: 10.5px; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.vip-tile-stat { bottom: 6px; inset-inline-start: 6px; display: inline-flex; align-items: center; gap: 3px; }
.vip-tile-stat i { font-size: 8px; }
.vip-tile-dur { top: 6px; inset-inline-end: 6px; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .45); text-shadow: none; }
.vip-tile-when { bottom: 6px; inset-inline-end: 6px; opacity: .85; }
.vip-more { width: 100%; justify-content: center; margin-top: var(--space-xs); }

/* صف مجموعات الهايلايت */
.vip-hl-row { display: flex; gap: var(--space-xs); overflow-x: auto; padding: 2px 2px var(--space-xs); margin-bottom: var(--space-2xs); scrollbar-width: none; }
.vip-hl-row::-webkit-scrollbar { display: none; }
.vip-hl { flex: none; width: 74px; display: grid; justify-items: center; gap: 3px; text-align: center; }
.vip-hl-ring { width: 66px; height: 66px; border-radius: 50%; padding: 3px; background: var(--line-strong); transition: background .25s; }
.vip-hl.active .vip-hl-ring { background: conic-gradient(from 210deg, #25f4ee, #fe2c55, #ff9a3c, #fe2c55, #25f4ee); }
.vip-hl-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); background: var(--surface-2); }
.vip-hl-title { max-width: 100%; font-size: var(--step--2); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vip-hl small { color: var(--muted); font-size: 10px; }
.vip-hl.active .vip-hl-title { color: var(--accent); }

/* ===== كرت المتابعين: نفس شكل باقي الإحصائيات مع كلمة «عرض» بجانب الرقم ===== */
.stat-followers { cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.stat-followers:active { opacity: .7; }
.stat-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-xs); }
.stat-view { font-size: var(--step--2); font-weight: 700; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; padding-bottom: 2px; }
.stat-view i { font-size: .8em; }

/* ===== نافذة قائمة المتابعين (Followers Sheet) ===== */
.followers-open, .followers-open body { overflow: hidden; }

.followers-sheet {
  position: fixed; inset: 0; z-index: 89; display: grid; place-items: end center; padding: 0;
  background: rgba(4, 4, 6, .75); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  animation: fSheetFade .25s ease;
}
@keyframes fSheetFade { from { opacity: 0; } }

.followers-card {
  width: 100%; max-width: 560px; height: 88dvh; max-height: 860px; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border: 1px solid var(--line-strong); border-radius: 26px 26px 0 0;
  box-shadow: 0 -24px 60px -20px rgba(0, 0, 0, .85);
  animation: fSheetUp .32s cubic-bezier(.16, 1, .3, 1);
  overflow: hidden;
  position: relative;
}
@media (min-width: 600px) {
  .followers-sheet { place-items: center; padding: var(--space-m); }
  .followers-card { border-radius: 26px; height: 84dvh; }
}
@keyframes fSheetUp { from { transform: translateY(32px); opacity: 0; } }

.followers-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  padding: var(--space-m) var(--space-m) var(--space-s);
  border-bottom: 1px solid var(--line);
}
.followers-target-info {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
}
.target-avatar-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(from 210deg, #25f4ee, #fe2c55, #ff9a3c, #fe2c55, #25f4ee);
  flex-shrink: 0;
}
.target-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface);
  background: var(--surface-2);
}
.followers-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.f-eyebrow {
  font-size: var(--step--2);
  color: var(--accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}
.f-target-name {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.f-target-name strong {
  font-size: var(--step-0);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.f-target-name span {
  font-size: var(--step--2);
  color: var(--muted);
  font-family: var(--mono);
}
.followers-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* شريط البحث وعداد المتابعين */
.followers-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-m);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.f-search-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0 12px;
  height: 40px;
  transition: border-color .2s, box-shadow .2s;
}
.f-search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.f-search-icon {
  font-size: 13px;
  color: var(--muted);
  margin-inline-end: 8px;
}
.f-search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: var(--step--1);
  font-family: inherit;
}
.f-search-clear {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.f-counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 38px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: var(--step--1);
  font-weight: 700;
  white-space: nowrap;
}
.f-counter-badge i {
  color: var(--accent);
}

/* منطقة التمرير */
.followers-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-s) var(--space-m) calc(var(--space-l) + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* بطاقة المتابع الواحد */
.followers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.follower-card {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.follower-card:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .4);
}
.follower-card:active {
  transform: scale(.98);
}
.f-avatar-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 2px;
  background: var(--line-strong);
  flex-shrink: 0;
}
.f-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
}
.f-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.f-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.f-nick {
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.f-name-row .verified {
  color: var(--accent);
  font-size: 13px;
  flex-shrink: 0;
}
.f-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: var(--step--2);
}
.f-username {
  color: var(--muted);
  font-family: var(--mono);
}
.f-region {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-tertiary, var(--muted));
  font-size: 11px;
}
.f-flag {
  font-size: 13px;
}
.f-stats-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.f-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.f-stat-pill i {
  font-size: 10px;
  opacity: .8;
}
.f-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.f-inspect-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}
.f-inspect-btn:hover {
  background: var(--accent);
  color: #fff;
}
.f-tt-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: all .2s;
}
.f-tt-btn:hover {
  color: #fe2c55;
  border-color: #fe2c55;
  transform: scale(1.08);
}

/* Skeleton Loading */
.followers-skeleton {
  display: grid;
  gap: 8px;
}
.sk-follower-item {
  height: 72px;
  border-radius: 16px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: skShimmer 1.4s infinite;
  border: 1px solid var(--line);
}
@keyframes skShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* مؤشرات التحميل ونهاية القائمة */
.followers-more-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--space-s);
  color: var(--muted);
  font-size: var(--step--1);
}
.followers-more-action {
  display: flex;
  justify-content: center;
  padding: var(--space-xs) 0;
}
.f-load-more-btn {
  width: 100%;
  max-width: 240px;
  justify-content: center;
  border-radius: 99px;
}
.followers-end-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--space-m) 0;
  color: var(--muted);
  font-size: var(--step--1);
}
.followers-end-msg i {
  color: var(--success, #25f4ee);
}

/* حالات القائمة الفارغة أو الخاصة */
.followers-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xs);
  padding: var(--space-xl) var(--space-m);
  color: var(--muted);
}
.followers-empty i {
  font-size: 32px;
  opacity: .5;
}
.f-empty-icon.lock {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  margin-bottom: var(--space-2xs);
}
.followers-empty h4 {
  font-size: var(--step-1);
  font-weight: 800;
  color: var(--text);
}
.followers-empty p {
  font-size: var(--step--1);
  max-width: 34ch;
}
.retry-f-btn {
  margin-top: var(--space-xs);
  border-radius: 99px;
}

/* ===== Relationship Intelligence (VIP) — js/relationship.js ===== */
.rel-card { --rel-green: var(--success); --rel-blue: #4c8dff; --rel-grey: var(--muted); }
[data-theme="light"] .rel-card { --rel-green: #12985a; --rel-blue: #2563eb; }
.rel-head-ico { color: #2fd27a; background: color-mix(in srgb, #2fd27a 14%, #14110a); }
[dir="ltr"] .rel-back i, [dir="ltr"] .rel-chev { transform: scaleX(-1); }
.rel-intro { color: var(--muted); font-size: var(--step--1); margin: calc(var(--space-xs) * -1) 0 var(--space-s); }

.rel-form { display: grid; gap: var(--space-2xs); }
.rel-form .field { border-color: var(--line); }
.rel-form .field.invalid { border-color: var(--danger); }
.rel-tag { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 900; font-size: var(--step--2); color: var(--on-accent); background: var(--accent); }
.rel-form .field:last-of-type .rel-tag { background: var(--accent-2); color: #001c1b; }
.rel-swap { justify-self: center; width: 36px; height: 36px; margin: -10px 0; z-index: 1; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-strong); color: var(--muted); transform: rotate(90deg); transition: color .2s, transform .25s; }
.rel-swap:active { transform: rotate(270deg); color: var(--text); }
.rel-form .btn-primary { margin-top: var(--space-2xs); }

.rel-history { margin-top: var(--space-m); display: grid; gap: var(--space-2xs); }
.rel-history-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2xs); }
.rel-history h4 { display: flex; align-items: center; gap: .5em; font-size: var(--step--1); font-weight: 700; color: var(--muted); }
.rel-notice { display: flex; align-items: center; gap: .6em; margin: 0 0 var(--space-s); padding: var(--space-2xs) var(--space-xs); border-radius: var(--radius-s); font-size: var(--step--1); color: var(--text); background: color-mix(in srgb, #e5a400 10%, var(--surface-2)); border: 1px solid color-mix(in srgb, #e5a400 32%, transparent); }
.rel-notice i { flex: none; color: #d99a00; }
/* زر الضغط المطوّل للتأكيد: التعبئة الحمرا تمشي من جهة البداية (يمين بالعربي) */
.rel-hold {
  position: relative; isolation: isolate; flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 2.1em;
  padding: 0 .9em; overflow: hidden; border-radius: 99px; font-size: var(--step--2); font-weight: 700; white-space: nowrap;
  color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 55%, transparent);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; outline: none;
  transition: transform .15s cubic-bezier(.23, 1, .32, 1), background-color .15s, color .15s;
}
.rel-hold[hidden] { display: none; }
.rel-hold:active:not([data-input="keyboard"]) { transform: scale(.98); }
.rel-hold:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 40%, transparent); }
.rel-hold-label, .rel-hold-fill { display: flex; align-items: center; justify-content: center; gap: .4em; }
.rel-hold-fill { position: absolute; inset: 0; z-index: 1; color: #fff; background: var(--danger); clip-path: inset(0 100% 0 0); transition: clip-path 180ms cubic-bezier(.23, 1, .32, 1); pointer-events: none; }
html[dir="rtl"] .rel-hold-fill { clip-path: inset(0 0 0 100%); }
.rel-hold.holding .rel-hold-fill { clip-path: inset(0); transition: clip-path var(--hold, 1000ms) linear; }
.rel-hold[data-input="keyboard"] .rel-hold-fill { transition-duration: 0ms; }
.rel-hold.confirmed { color: #fff; background: var(--danger); border-color: var(--danger); }
@media (prefers-reduced-motion: reduce) { .rel-hold-fill, .rel-hold.holding .rel-hold-fill { transition-duration: 0ms; } }
.rel-hist-row { display: flex; align-items: stretch; gap: 6px; animation: rise .4s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d); transition: opacity .2s, transform .2s; }
.rel-hist-row.removing { opacity: 0; transform: translateX(12px); pointer-events: none; }
.rel-hist-row .rel-hist { flex: 1; min-width: 0; animation: none; }
.rel-hist-del { flex: none; width: 44px; border-radius: var(--radius-s); display: grid; place-items: center; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); transition: color .2s, border-color .2s, transform .15s; }
.rel-hist-del:hover, .rel-hist-del:focus-visible { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.rel-hist-del:active { transform: scale(.94); }
.rel-hist-list { display: grid; gap: 6px; }
.rel-hist {
  display: flex; align-items: center; gap: var(--space-xs); width: 100%; text-align: start; padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line);
  animation: rise .4s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d); transition: border-color .2s, transform .15s;
}
.rel-hist:active { transform: scale(.98); }
.rel-hist-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 14px; color: var(--c, var(--rel-grey)); background: color-mix(in srgb, var(--c, var(--rel-grey)) 15%, transparent); }
.rel-hist.mutual { --c: var(--rel-green); } .rel-hist.oneway { --c: var(--rel-blue); }
.rel-hist-main { flex: 1; min-width: 0; display: grid; }
.rel-hist-pair { font-family: var(--mono); font-weight: 700; font-size: var(--step--1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.rel-hist-pair i { font-size: 10px; color: var(--muted); margin: 0 2px; }
.rel-hist-main small { color: var(--muted); font-size: var(--step--2); }
.rel-skel { height: 52px; border-radius: var(--radius-s); background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 60%, var(--line-strong)) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.rel-empty { display: flex; align-items: center; justify-content: center; gap: .6em; padding: var(--space-s); color: var(--muted); font-size: var(--step--1); text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-s); list-style: none; }
.rel-empty.big { flex-direction: column; padding: var(--space-l) var(--space-s); }
.rel-empty.big i { font-size: 26px; }

.rel-chip { display: inline-flex; align-items: center; gap: .35em; flex: none; padding: .2em .65em; border-radius: 99px; font-size: var(--step--2); font-weight: 700; white-space: nowrap; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.rel-chip.ok { color: var(--rel-green); background: color-mix(in srgb, var(--rel-green) 12%, transparent); border-color: color-mix(in srgb, var(--rel-green) 30%, transparent); }
.rel-chip.part { color: #d99a00; background: color-mix(in srgb, #e5a400 12%, transparent); border-color: color-mix(in srgb, #e5a400 30%, transparent); }
.rel-muted { color: var(--muted); font-size: var(--step--2); }

/* القفل */
.rel-perks { list-style: none; display: grid; gap: 6px; width: 100%; max-width: 340px; margin: var(--space-2xs) 0; text-align: start; }
.rel-perks li { display: flex; align-items: center; gap: .7em; padding: .6em .8em; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line); font-size: var(--step--1); animation: rise .4s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d); }
.rel-perks i { width: 20px; text-align: center; color: #e8c46a; }

/* التقدم */
.rel-progress { display: grid; gap: var(--space-s); }
.rel-pair-mini { display: flex; align-items: center; justify-content: center; gap: .6em; font-family: var(--mono); font-weight: 700; flex-wrap: wrap; }
.rel-pair-mini i { color: var(--muted); font-size: .8em; }
.rel-stages { list-style: none; display: grid; gap: 4px; padding: var(--space-xs); border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.rel-stages li { display: flex; align-items: center; gap: .7em; padding: .35em .2em; color: var(--muted); font-size: var(--step--1); transition: color .3s; }
.rel-stages li.active { color: var(--text); font-weight: 700; }
.rel-stages li.done { color: var(--text); }
.rel-stage-dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--surface); border: 1px solid var(--line-strong); }
.rel-stages li.done .rel-stage-dot { background: var(--rel-green); border-color: transparent; color: #04140b; }
.rel-stages li.active .rel-stage-dot { border-color: var(--accent); color: var(--accent); }
.rel-stage-dot .spinner { width: 14px; height: 14px; border-width: 2px; }
.rel-progs { display: grid; gap: var(--space-2xs); }
.rel-prog { display: grid; gap: 8px; padding: var(--space-xs); border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.rel-prog-head { display: flex; align-items: center; gap: var(--space-2xs); min-width: 0; }
.rel-prog-name { flex: 1; min-width: 0; display: grid; font-family: var(--mono); font-weight: 700; font-size: var(--step--1); }
.rel-prog-name bdi:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-prog-name small { font-family: var(--font); font-weight: 400; color: var(--muted); font-size: var(--step--2); }
.rel-wait { display: inline-flex; align-items: center; gap: .3em; color: var(--muted); font-size: var(--step--2); white-space: nowrap; }
.rel-bar { position: relative; height: 6px; border-radius: 99px; background: var(--surface); overflow: hidden; }
.rel-bar > span { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .5s ease; }
.rel-bar.live::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: relSweep 1.4s linear infinite; }
@keyframes relSweep { from { background-position: -100% 0; } to { background-position: 200% 0; } }

.rel-ava { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--surface-2); border: 2px solid var(--line-strong); }
.rel-ava.sm { width: 38px; height: 38px; flex: none; border-width: 1px; }

/* النتيجة */
.rel-banner { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2xs) var(--space-xs); padding: var(--space-xs) var(--space-s); margin-bottom: var(--space-s); border-radius: var(--radius); background: color-mix(in srgb, #e5a400 10%, var(--surface-2)); border: 1px solid color-mix(in srgb, #e5a400 35%, transparent); }
.rel-banner > i { color: #e5a400; }
.rel-banner > span { flex: 1; min-width: 160px; display: grid; }
.rel-banner strong { font-size: var(--step--1); }
.rel-banner small { color: var(--muted); font-size: var(--step--2); }
.rel-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-2xs); margin-bottom: var(--space-s); }
.rel-person { display: grid; justify-items: center; gap: 2px; min-width: 0; text-align: center; animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; }
.rel-person:last-child { animation-delay: 80ms; }
.rel-person .rel-ava { margin-bottom: 4px; }
.rel-person strong { font-weight: 700; font-size: var(--step--1); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-person > bdi { font-family: var(--mono); color: var(--muted); font-size: var(--step--2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.rel-link { --c: var(--rel-grey); position: relative; width: 74px; display: grid; place-items: center; }
.rel-link::before { content: ""; position: absolute; inset-inline: 0; top: 50%; border-top: 2px dashed color-mix(in srgb, var(--c) 55%, transparent); }
.rel-link.mutual::before { border-top-style: solid; }
.rel-link span { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); animation: relPop .5s .15s cubic-bezier(.2, 1.4, .4, 1) both; }
[dir="rtl"] .rel-link.oneway span i { transform: scaleX(-1); }
@keyframes relPop { from { transform: scale(.4); opacity: 0; } }
.rel-link.mutual, .rel-status.mutual { --c: var(--rel-green); }
.rel-link.oneway, .rel-status.oneway { --c: var(--rel-blue); }
.rel-status { --c: var(--rel-grey); text-align: center; padding: var(--space-s); border-radius: var(--radius); background: radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--c) 18%, transparent), transparent 70%), var(--surface-2); border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line)); animation: rise .45s .1s cubic-bezier(.2, .7, .2, 1) both; }
.rel-status-kicker { font-size: var(--step--2); font-weight: 900; letter-spacing: .14em; color: var(--c); }
.rel-status h3 { font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; line-height: 1.25; }
.rel-status p { color: var(--muted); font-size: var(--step--1); margin-top: 2px; }
.rel-status p bdi, .rel-dir bdi { font-family: var(--mono); font-weight: 700; color: var(--text); }

.rel-dirs { list-style: none; display: grid; gap: 6px; margin-top: var(--space-xs); }
.rel-dir { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px var(--space-2xs); padding: var(--space-xs) var(--space-s); border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line); animation: rise .4s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--d) + 150ms); }
.rel-dir-pair { display: flex; align-items: center; gap: .45em; min-width: 0; font-size: var(--step--1); direction: ltr; justify-content: flex-start; overflow: hidden; }
.rel-dir-pair bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-dir-arrow { color: var(--muted); font-size: .85em; flex: none; }
.rel-dir-state { display: inline-flex; align-items: center; gap: .35em; font-weight: 700; font-size: var(--step--1); white-space: nowrap; }
.rel-dir.yes .rel-dir-state { color: var(--rel-green); }
.rel-dir.no .rel-dir-state { color: var(--muted); }
.rel-dir.unk .rel-dir-state { color: #d99a00; }
.rel-dir-note { grid-column: 1 / -1; color: var(--muted); font-size: var(--step--2); }
.rel-dir-note bdi { font-weight: 400; color: var(--muted); }

.rel-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: var(--space-xs); }
.rel-meta > div { padding: var(--space-2xs) var(--space-xs); border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.rel-meta > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.rel-meta dt { color: var(--muted); font-size: var(--step--2); }
.rel-meta dd { font-size: var(--step--1); font-weight: 500; }
.rel-meta dd .rel-chip { white-space: normal; }

.rel-actions { display: grid; gap: 6px; margin-top: var(--space-s); }
.rel-actions .btn-soft { width: 100%; }
.login-locked .rel-actions { width: 100%; max-width: 320px; }

.rel-mutual-card { display: flex; align-items: center; gap: var(--space-xs); width: 100%; text-align: start; margin-top: var(--space-xs); padding: var(--space-xs) var(--space-s); border-radius: var(--radius); background: color-mix(in srgb, var(--accent-2) 8%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--accent-2) 30%, var(--line)); }
.rel-mutual-card > span:nth-child(2) { flex: 1; display: grid; }
.rel-mutual-card small { color: var(--muted); font-size: var(--step--2); }
.rel-mutual-card small b { color: var(--text); }
.rel-mutual-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 15%, transparent); }
.rel-chev { color: var(--muted); font-size: 12px; }

/* المتابعون المشتركون */
.rel-mutual-head { display: grid; justify-items: center; gap: 4px; margin-bottom: var(--space-xs); }
.rel-mutual-head .eyebrow { margin: 0; }
.rel-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.rel-stats > div { display: grid; gap: 2px; padding: var(--space-xs); border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.rel-stats b { font-size: var(--step-2); font-weight: 900; line-height: 1.1; }
.rel-stats > div:nth-child(-n+2) b { color: var(--accent-2); }
[data-theme="light"] .rel-stats > div:nth-child(-n+2) b, [data-theme="light"] .rel-mutual-ico { color: #0b8f8a; }
.rel-stats span { color: var(--muted); font-size: var(--step--2); overflow: hidden; text-overflow: ellipsis; }
.rel-stats span bdi { font-family: var(--mono); }
.rel-chip-row { display: flex; align-items: center; flex-wrap: wrap; gap: .5em; margin-top: var(--space-xs); }
.rel-search { width: 100%; margin-top: var(--space-xs); background: var(--surface-2); }
.rel-users { list-style: none; display: grid; gap: 4px; margin-top: var(--space-2xs); }
.rel-users > li { animation: rise .35s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d); }
.rel-user { display: flex; align-items: center; gap: var(--space-xs); width: 100%; text-align: start; padding: 8px var(--space-xs); border-radius: var(--radius-s); transition: background .2s; }
.rel-user:hover, .rel-user:active { background: var(--surface-2); }
.rel-user-text { flex: 1; min-width: 0; display: grid; }
.rel-user-text strong { font-weight: 700; font-size: var(--step--1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-user-text bdi { font-family: var(--mono); color: var(--muted); font-size: var(--step--2); text-align: start; }
.rel-verified { color: #20d5ec; font-size: .8em; }
.rel-more { width: 100%; margin-top: 4px; }

/* بطاقة الأداة في تبويب VIP */
.vip-card-wide { grid-column: 1 / -1; padding: var(--space-m) var(--space-s); }
.vip-card-wide .vip-card-top { align-items: center; gap: var(--space-2xs); }
.vip-card-wide .vip-card-ico { width: 52px; height: 52px; font-size: 21px; }
.vip-card-wide strong { font-size: var(--step-1); }
.vip-card-new { margin-inline-end: auto; padding: .2em .7em; border-radius: 99px; font-size: var(--step--2); font-weight: 900; color: #04140b; background: var(--c); }
.vip-card-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.vip-card-chips span { padding: .2em .6em; border-radius: 99px; font-size: var(--step--2); color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.vip-card-note { display: flex; align-items: center; gap: .45em; margin-top: 6px; padding: .4em .7em; border-radius: var(--radius-s); font-size: var(--step--2); color: var(--muted); background: color-mix(in srgb, #e5a400 9%, transparent); border: 1px solid color-mix(in srgb, #e5a400 28%, transparent); }
.vip-card-note i { color: #d99a00; }

@media (prefers-reduced-motion: reduce) {
  .rel-hist, .rel-hist-row, .rel-perks li, .rel-person, .rel-link span, .rel-status, .rel-dir, .rel-users > li { animation: none; }
  .rel-bar.live::after { animation: none; }
}

/* ===== مراسلة الدعم (js/chat.js) ===== */
#supChat.sup-contact-btn { background: var(--accent); }
.has-dot { position: relative; }
.has-dot::after { content: ""; position: absolute; top: 6px; inset-inline-end: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.dock button.has-dot::after { top: 8px; inset-inline-end: calc(50% - 22px); }
.chat-card { height: min(92dvh, 780px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: var(--space-2xs); padding: var(--space-xs) var(--space-s); border-bottom: 1px solid var(--line); flex: none; }
.chat-head .icon-btn { width: 38px; height: 38px; border-radius: 50%; }
.chat-head .icon-btn.on { color: var(--danger); }
.chat-title { flex: 1; min-width: 0; display: grid; }
.chat-title strong { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-title small { color: var(--muted); font-size: var(--step--2); }
.chat-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--space-s); display: flex; flex-direction: column; gap: 6px; }
.chat-empty { margin: auto; display: grid; justify-items: center; gap: var(--space-2xs); color: var(--muted); text-align: center; max-width: 28ch; }
.chat-empty i { font-size: 38px; opacity: .6; }
.chat-day { align-self: center; margin: var(--space-2xs) 0; padding: 2px 12px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: var(--step--2); }
.chat-row { display: flex; }
.chat-row.me { justify-content: flex-start; }   /* بالعربي: اللي أرسلته على اليمين */
.chat-row.them { justify-content: flex-end; }
.chat-row.me { flex-direction: row; }
.chat-bubble { max-width: min(82%, 380px); padding: 8px 12px 6px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 4px; overflow-wrap: anywhere; }
.chat-row.me .chat-bubble { background: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); border-end-start-radius: 6px; }
.chat-row.them .chat-bubble { border-end-end-radius: 6px; }
.chat-bubble p { white-space: pre-wrap; line-height: 1.5; }
.chat-meta { justify-self: end; display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 11px; }
.chat-tick { letter-spacing: -2px; }
.chat-tick.read { color: var(--accent-2); }
.chat-img, .chat-vid { display: block; width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; background: #000; cursor: zoom-in; }
.chat-vid { cursor: default; }
.chat-aud { width: 100%; min-width: 220px; height: 40px; }
.chat-ph { display: grid; place-items: center; min-height: 80px; color: var(--muted); font-size: var(--step--1); gap: 6px; }
.chat-ph-line { min-height: 40px; grid-auto-flow: column; justify-content: start; }
.chat-compose { position: relative; flex: none; display: flex; align-items: flex-end; gap: var(--space-2xs); padding: var(--space-xs) var(--space-s) calc(var(--space-xs) + var(--safe-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.chat-compose.busy { opacity: .6; pointer-events: none; }
.chat-compose .icon-btn { width: 42px; height: 42px; border-radius: 50%; flex: none; }
.chat-compose textarea { flex: 1; min-width: 0; max-height: 120px; resize: none; padding: 10px 14px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface-2); font-size: max(16px, var(--step-0)); line-height: 1.4; outline: 0; }
.chat-compose textarea:focus { border-color: var(--accent); }
.chat-send { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 17px; }
.chat-send:active { transform: scale(.92); }
.chat-rec { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; gap: var(--space-xs); padding: 0 var(--space-s); background: var(--surface); }
.chat-rec[hidden] { display: none; }
.chat-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: recBlink 1s infinite; }
@keyframes recBlink { 50% { opacity: .25; } }
.chat-rec-hint { color: var(--muted); flex: 1; }
.chat-rec ~ .chat-send { position: relative; z-index: 2; }
.chat-list { display: grid; gap: 4px; }
.chat-item { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-xs); border-radius: var(--radius); text-align: start; background: var(--surface-2); border: 1px solid var(--line); }
.chat-item.unread { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.chat-item-text { flex: 1; min-width: 0; display: grid; }
.chat-item-text strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-text small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-side { flex: none; display: grid; justify-items: end; gap: 4px; color: var(--muted); font-size: var(--step--2); }
.chat-badge { min-width: 22px; padding: 1px 6px; border-radius: 99px; text-align: center; background: var(--accent); color: #fff; font-size: 12px; }

/* ===== مراسلة الدعم: الجولة الثانية (أفتار، تعديل، تفاعلات، معاينة، هدية VIP، بانر) ===== */
.chat-row, .chat-row.me, .chat-row.them { flex-direction: column; }
.chat-row.me { align-items: flex-start; }    /* بالعربي: رسائلي يمين */
.chat-row.them { align-items: flex-end; }
.chat-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-xs); }
.chat-avatar { position: relative; overflow: hidden; flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: color-mix(in srgb, var(--accent) 20%, var(--surface)); color: var(--accent); }
.chat-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chat-avatar.support { background: linear-gradient(135deg, #37b9f5, #1d8fd8); color: #fff; }
.chat-head .chat-avatar { width: 42px; height: 42px; }
.chat-id { color: var(--muted); font-size: var(--step--2); display: inline-flex; gap: .3em; align-items: center; }
.chat-id b { color: var(--text); }
.chat-item-id { font-size: 11px; opacity: .8; }
.chat-gift { color: #e8c46a; }
.chat-more { width: 22px; height: 18px; display: grid; place-items: center; color: var(--muted); opacity: .7; font-size: 11px; }
.chat-edited { font-style: italic; }
.chat-reacts { display: flex; gap: 4px; margin-top: -8px; padding: 0 10px; position: relative; z-index: 1; }
.chat-react { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line-strong); font-size: 13px; cursor: pointer; }
.chat-react.mine { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.chat-react b { font-size: 11px; color: var(--muted); }
.chat-menu { position: absolute; z-index: 5; display: grid; gap: 4px; padding: 6px; border-radius: 20px; background: var(--dock-bg); border: 1px solid var(--dock-edge); -webkit-backdrop-filter: blur(22px) saturate(1.8); backdrop-filter: blur(22px) saturate(1.8); box-shadow: inset 0 1px 0 var(--dock-shine), var(--dock-shadow); animation: loginUp .18s ease; }
.chat-menu-emoji { display: flex; gap: 2px; }
.chat-menu-emoji button { width: 38px; height: 38px; border-radius: 50%; font-size: 21px; transition: transform .15s; }
.chat-menu-emoji button:active { transform: scale(1.25); }
.chat-menu-emoji button.on { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.chat-menu-acts { display: flex; gap: 4px; border-top: 1px solid var(--line); padding-top: 4px; }
.chat-menu-acts button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border-radius: 14px; font-size: var(--step--1); font-weight: 700; }
.chat-menu-acts button:active { background: var(--surface-2); }
.chat-extra { flex: none; padding: var(--space-2xs) var(--space-s) 0; background: var(--surface); border-top: 1px solid var(--line); }
.chat-extra[hidden] { display: none; }
.chat-editbar { display: flex; align-items: center; gap: var(--space-xs); color: var(--accent); padding: 4px 0; }
.chat-editbar > div { flex: 1; min-width: 0; display: grid; }
.chat-editbar small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-editbar .icon-btn { width: 34px; height: 34px; }
.chat-preview { display: flex; align-items: center; gap: var(--space-xs); padding: 6px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.chat-preview-media { flex: none; max-width: 46%; }
.chat-preview-media img, .chat-preview-media video { display: block; max-height: 120px; max-width: 100%; border-radius: 12px; background: #000; }
.chat-preview.audio .chat-preview-media { max-width: 62%; }
.chat-preview-media audio { width: 100%; min-width: 160px; height: 38px; }
.chat-preview-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.chat-preview-info small { color: var(--muted); font-size: var(--step--2); }
.chat-preview > .icon-btn { width: 34px; height: 34px; align-self: flex-start; }
.chat-gift-sheet { position: absolute; inset: 0; z-index: 6; display: grid; place-items: end center; background: rgba(4, 4, 6, .55); animation: loginFade .2s ease; }
.chat-gift-sheet.busy { pointer-events: none; opacity: .75; }
.chat-gift-card { width: 100%; display: grid; gap: var(--space-s); padding: var(--space-m) var(--space-m) calc(var(--space-m) + var(--safe-bottom)); border-radius: 24px 24px 0 0; background: var(--surface); border-top: 1px solid var(--line-strong); animation: loginUp .25s cubic-bezier(.2, .8, .2, 1); }
.chat-gift-head { display: flex; align-items: center; gap: var(--space-xs); }
.chat-gift-head > div { flex: 1; min-width: 0; display: grid; }
.chat-gift-head small { color: var(--muted); }
.chat-gift-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; color: #1a1406; background: #e8c46a; }
.chat-gift-status { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); color: var(--muted); font-size: var(--step--1); }
.chat-gift-status.on { color: var(--success); }
.chat-gift-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2xs); }
.chat-gift-plans button { padding: 14px 4px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); font-size: var(--step-0); }
.chat-gift-plans button:active { transform: scale(.95); border-color: #e8c46a; }
.chat-gift-revoke { justify-self: center; color: var(--danger); }
/* بانر الإشعار داخل التطبيق (مثل إشعارات الجوال) */
.notif { position: fixed; z-index: 120; top: calc(env(safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px) + 8px); left: 50%; width: min(420px, calc(100% - 16px)); display: flex; align-items: center; gap: var(--space-xs); padding: 10px 14px 10px 12px; border-radius: 22px; transform: translate(-50%, -140%); opacity: 0; pointer-events: none; cursor: pointer; color: var(--text);
  background: var(--dock-bg); border: 1px solid var(--dock-edge); -webkit-backdrop-filter: blur(24px) saturate(1.9); backdrop-filter: blur(24px) saturate(1.9);
  box-shadow: inset 0 1px 0 var(--dock-shine), 0 18px 40px -14px rgba(0, 0, 0, .65); transition: transform .45s cubic-bezier(.34, 1.3, .5, 1), opacity .3s; }
.notif.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.notif-ico { width: 40px; height: 40px; border-radius: 12px; }
.notif-text { flex: 1; min-width: 0; display: grid; }
.notif-text b { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-text span { color: var(--muted); font-size: var(--step--1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif small { align-self: flex-start; color: var(--muted); font-size: 11px; }
@media (prefers-reduced-motion: reduce) { .notif { transition: opacity .2s; } }

/* ===== مراسلة الدعم: الرد بالسحب + «يكتب…» ===== */
.chat-row { position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.chat-row .chat-text { user-select: text; -webkit-user-select: text; }
.chat-row.swiping > .chat-bubble, .chat-row.swiping > .chat-reacts { transform: translateX(var(--sw, 0px)); transition: none; }
.chat-row > .chat-bubble, .chat-row > .chat-reacts { transition: transform .32s cubic-bezier(.2, .9, .3, 1.2); }
.chat-row::before { content: ""; position: absolute; top: 50%; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%; opacity: 0; pointer-events: none;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface-2)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23888'%3E%3Cpath d='M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z'/%3E%3C/svg%3E") center / 18px no-repeat;
  transform: scale(calc(.5 + var(--p, 0) * .5)); transition: opacity .1s, background-color .2s; }
:root[dir="rtl"] .chat-row::before { left: 10px; }
:root:not([dir="rtl"]) .chat-row::before { right: 10px; }
.chat-row.swiping::before { opacity: var(--p, 0); }
.chat-row.armed::before { background-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z'/%3E%3C/svg%3E"); }
.chat-row.flash > .chat-bubble { animation: chatFlash 1.3s ease; }
@keyframes chatFlash { 0%, 60% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.chat-quote { display: grid; gap: 1px; padding: 5px 10px; margin: 0 -2px 2px; border-radius: 10px; border-inline-start: 3px solid var(--accent); background: color-mix(in srgb, var(--text) 8%, transparent); cursor: pointer; max-width: 100%; }
.chat-quote.theirs { border-inline-start-color: var(--accent-2); }
.chat-quote b { font-size: var(--step--2); font-weight: 800; color: var(--accent); }
.chat-quote.theirs b { color: var(--accent-2); }
.chat-quote span { font-size: var(--step--1); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chat-quote.gone { cursor: default; opacity: .7; border-inline-start-color: var(--muted); }
.chat-quote.gone b { color: var(--muted); }
.chat-replybar { display: flex; align-items: center; gap: var(--space-xs); padding: 6px 10px; margin-bottom: 6px; border-radius: 14px; background: var(--surface-2); border-inline-start: 3px solid var(--accent); }
.chat-replybar.theirs { border-inline-start-color: var(--accent-2); }
.chat-replybar-ico { color: var(--accent); display: grid; }
.chat-replybar.theirs .chat-replybar-ico { color: var(--accent-2); }
.chat-replybar > div { flex: 1; min-width: 0; display: grid; }
.chat-replybar b { font-size: var(--step--1); color: var(--accent); }
.chat-replybar.theirs b { color: var(--accent-2); }
.chat-replybar small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-replybar .icon-btn { width: 32px; height: 32px; }
.chat-menu-acts button svg { flex: none; }
.chat-title small.typing, .chat-item-text small.typing-line { color: var(--accent); font-weight: 700; }
.typing-text { display: inline-flex; align-items: baseline; gap: 2px; }
.typing-dots { display: inline-flex; gap: 2px; margin-inline-start: 3px; font-style: normal; }
.typing-dots b { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: typeDot 1.2s infinite ease-in-out; }
.typing-dots b:nth-child(2) { animation-delay: .15s; } .typing-dots b:nth-child(3) { animation-delay: .3s; }
@keyframes typeDot { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-typing { display: flex !important; align-items: center; gap: 4px; padding: 12px 14px; min-height: 0; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typeDot 1.2s infinite ease-in-out; }
.chat-typing span:nth-child(2) { animation-delay: .15s; } .chat-typing span:nth-child(3) { animation-delay: .3s; }
@media (prefers-reduced-motion: reduce) { .chat-row > .chat-bubble, .chat-row > .chat-reacts { transition: none; } .typing-dots b, .chat-typing span { animation: none; } }

/* ===== رادار التغيّرات (js/watchdog.js) ===== */
.wd-card { height: min(92dvh, 820px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.wd-head { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-s) var(--space-m) var(--space-xs); flex: none; }
.wd-head-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; color: #fff; background: linear-gradient(135deg, #ff3b5c, #ff8a3d); box-shadow: 0 10px 24px -12px rgba(255, 59, 92, .9); }
.wd-head-title { flex: 1; min-width: 0; display: grid; }
.wd-head-title strong { font-weight: 800; font-size: var(--step-1); }
.wd-head-title small { color: var(--muted); font-size: var(--step--1); }
.wd-tabs { margin: 0 var(--space-m) var(--space-xs); flex: none; }
.wd-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.wd-badge { min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; }
.wd-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: var(--space-xs) var(--space-m) calc(var(--space-l) + var(--safe-bottom)); display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: var(--space-s); }
.wd-body > * { min-width: 0; }
.wd-add { display: grid; gap: var(--space-xs); padding: var(--space-s); border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.wd-add-top { display: flex; justify-content: space-between; align-items: center; }
.wd-usage { padding: 2px 10px; border-radius: 99px; background: var(--surface); color: var(--muted); font-size: var(--step--1); }
.wd-add .field { background: var(--surface); border-radius: var(--radius); }
.wd-add .btn-primary { width: 100%; }
.wd-hint { color: var(--muted); font-size: var(--step--2); display: flex; gap: 6px; align-items: baseline; }
.wd-note { display: flex; gap: 8px; align-items: baseline; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); color: var(--muted); font-size: var(--step--1); line-height: 1.6; }
.wd-note.warn { color: #e5a400; }
.wd-empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: var(--space-l) var(--space-s); color: var(--muted); }
.wd-empty > i { font-size: 34px; opacity: .6; }
.wd-empty p { color: var(--text); font-weight: 700; }
.wd-list, .wd-events { display: grid; gap: var(--space-xs); }
.wd-avatar { position: relative; overflow: hidden; flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: color-mix(in srgb, var(--accent) 20%, var(--surface)); color: var(--accent); }
.wd-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wd-acc { display: grid; gap: 10px; padding: var(--space-s); border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.wd-acc-top { display: flex; align-items: center; gap: var(--space-xs); }
.wd-acc-name { flex: 1; min-width: 0; display: grid; }
.wd-acc-name strong { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-acc-name small { color: var(--muted); text-align: start; }
.wd-verified { color: #20d5ec; font-size: .85em; }
.wd-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: var(--step--2); font-weight: 800; background: var(--surface); }
.wd-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.wd-status.on { color: var(--success); } .wd-status.on i { animation: recBlink 1.6s infinite; }
.wd-status.paused { color: var(--muted); } .wd-status.error { color: #e5a400; }
.wd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wd-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: var(--step--2); }
.wd-acc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: var(--step--2); }
.wd-acc-err { color: #e5a400; font-size: var(--step--2); display: flex; gap: 6px; align-items: baseline; }
.wd-acc-acts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.wd-acc-acts button:disabled { opacity: .5; pointer-events: none; }
.wd-acc-acts button.spin i, .adm-actions .spin i { animation: spin 1s linear infinite; }
.wd-acc-acts button { display: grid; justify-items: center; gap: 3px; padding: 8px 2px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: var(--step--2); font-weight: 700; }
.wd-acc-acts button:active { transform: scale(.95); }
.wd-acc-acts button.danger { color: var(--danger); }
.wd-filter-acc { display: flex; align-items: center; gap: var(--space-xs); padding: 6px 8px; border-radius: var(--radius); background: var(--surface-2); }
.wd-filter-acc .wd-avatar { width: 32px; height: 32px; font-size: 13px; }
.wd-filter-acc span { flex: 1; }
.wd-filter-acc .icon-btn { width: 32px; height: 32px; }
.wd-filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.wd-filters button { flex: none; }
.wd-event { display: grid; gap: 10px; padding: var(--space-s); border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.wd-event.unseen { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }
.wd-event-head { display: flex; align-items: center; gap: var(--space-xs); }
.wd-event-head > div { flex: 1; min-width: 0; display: grid; }
.wd-event-head strong { font-weight: 800; }
.wd-event-head small { color: var(--muted); font-size: var(--step--2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-event-head time { color: var(--muted); font-size: var(--step--2); flex: none; }
.wd-event-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 16px; background: var(--surface); color: var(--accent); }
.wd-event-ico.t-video_new { color: var(--success); } .wd-event-ico.t-video_gone, .wd-event-ico.t-unavailable { color: #e5a400; } .wd-event-ico.t-avatar { color: #8b5cf6; } .wd-event-ico.t-bio { color: #20d5ec; }
.wd-cmp-imgs { display: flex; align-items: center; justify-content: center; gap: var(--space-s); }
.wd-cmp-imgs figure { display: grid; justify-items: center; gap: 4px; margin: 0; }
.wd-cmp-imgs img, .wd-img-gone { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: var(--surface); border: 2px solid var(--line-strong); }
.wd-img-gone { display: grid; place-items: center; color: var(--muted); font-size: var(--step--2); }
.wd-cmp-imgs figure:last-child img { border-color: var(--accent); }
.wd-cmp-imgs figcaption { color: var(--muted); font-size: var(--step--2); }
.wd-cmp-arrow { color: var(--muted); }
.wd-cmp { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wd-cmp > i { color: var(--muted); font-size: 12px; }
.wd-old, .wd-new { padding: 4px 10px; border-radius: 10px; font-weight: 700; max-width: 100%; overflow-wrap: anywhere; }
.wd-old { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); text-decoration: line-through; }
.wd-new { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.wd-bio { display: grid; gap: 6px; }
.wd-bio > div { padding: 8px 10px; border-radius: 12px; background: var(--surface); }
.wd-bio small { color: var(--muted); font-size: var(--step--2); }
.wd-bio p { white-space: pre-wrap; line-height: 1.6; overflow-wrap: anywhere; }
.wd-bio del { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); border-radius: 4px; }
.wd-bio ins { color: var(--success); background: color-mix(in srgb, var(--success) 16%, transparent); text-decoration: none; border-radius: 4px; }
.wd-video { display: flex; gap: var(--space-xs); align-items: flex-start; }
.wd-thumb { position: relative; flex: none; width: 72px; height: 96px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--surface); color: var(--muted); }
.wd-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wd-video > div { flex: 1; min-width: 0; display: grid; gap: 4px; }
.wd-video p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--step--1); }
.wd-video small { color: var(--muted); font-size: var(--step--2); }
.wd-video .wd-warn, .wd-plain { color: var(--muted); font-size: var(--step--1); line-height: 1.6; }
.wd-video .wd-warn { color: #e5a400; }
.wd-event-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: var(--step--2); }
.wd-event-foot .ok { color: var(--success); } .wd-event-foot .warn { color: #e5a400; }
.wd-more { justify-self: center; }
.wd-set { display: grid; gap: 4px; }
.wd-set .setting strong i { color: var(--accent); width: 1.2em; }
.wd-bot { margin-top: var(--space-xs); justify-self: start; }
.wd-bulk { display: flex; gap: var(--space-xs); flex-wrap: wrap; }
/* ===== لوحة التحكم: أقسام بتبويبات ===== */
.adm-tabs { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px) + 72px); z-index: 5; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; padding: 4px; border-radius: 18px;
  background: var(--dock-bg); border: 1px solid var(--dock-edge); -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8); box-shadow: inset 0 1px 0 var(--dock-shine); }
.adm-tabs button { display: grid; justify-items: center; gap: 3px; padding: 8px 2px; border-radius: 14px; font-size: var(--step--2); font-weight: 700; color: var(--muted); transition: background-color .2s, color .2s; }
.adm-tabs button i { font-size: 16px; }
.adm-tabs button.active { background: var(--surface); color: var(--accent); box-shadow: inset 0 1px 0 var(--dock-shine); }
.adm-pane { display: grid; gap: var(--space-xs); animation: loginFade .2s ease; }
.adm-pane[hidden] { display: none; }
/* الرادار */
.adm-wd { display: grid; gap: var(--space-s); }
.adm-sec-head { display: flex; align-items: center; gap: var(--space-xs); }
.adm-sec-head > div { flex: 1; min-width: 0; display: grid; }
.adm-sec-head h3 { font-size: var(--step-1); font-weight: 800; }
.adm-sec-head small { color: var(--muted); font-size: var(--step--1); }
.adm-sec-ico { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 19px; color: #fff; background: linear-gradient(135deg, #ff3b5c, #ff8a3d); }
.adm-sec-title { display: flex; align-items: center; gap: 8px; font-size: var(--step-0); font-weight: 800; }
.adm-sec-title i { color: var(--accent); }
.adm-wd-status { list-style: none; display: grid; gap: 6px; margin: 0; padding: 0; }
.adm-wd-status li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: var(--step--1); line-height: 1.6; color: var(--muted); }
.adm-wd-status li i { flex: none; margin-top: .3em; }
.adm-wd-status li.ok { color: var(--success); }
.adm-wd-status li.warn { color: #e5a400; background: color-mix(in srgb, #e5a400 10%, var(--surface-2)); }
.adm-wd-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 640px) { .adm-wd-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.adm-wd-stat { display: grid; gap: 4px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.adm-wd-stat span { color: var(--muted); font-size: var(--step--2); display: flex; gap: 6px; align-items: center; }
.adm-wd-stat b { font-size: var(--step-2); font-weight: 900; line-height: 1.1; }
.adm-wd-stat.warn b { color: #e5a400; }
.adm-wd-types { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: var(--step--1); }
.adm-chip { display: inline-flex; gap: 5px; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); font-size: var(--step--2); }
.adm-wd-form { display: grid; grid-template-columns: 1fr; gap: var(--space-xs); }
@media (min-width: 640px) { .adm-wd-form { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.adm-wd-form .adm-field small { color: var(--muted); font-size: var(--step--2); }
.adm-wd-form .text-input { text-align: center; font-weight: 800; font-size: var(--step-0); }
.adm-wd-save { width: 100%; }
.adm-wd-save:disabled { opacity: .55; }
.adm-wd-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs); }
.adm-wd-tools .btn-soft { justify-content: center; }
.adm-wd-tools .spin i { animation: spin 1s linear infinite; }
.adm-wd-hint { display: flex; gap: 8px; align-items: baseline; color: var(--muted); font-size: var(--step--2); line-height: 1.6; }

/* تاريخ انتهاء الاشتراك */
.acc-meta .v.warn, .vip-left.warn { color: #e5a400; font-weight: 800; }

/* ===== 🔴 ننبهك بالبث (js/live_alerts.js) ===== */
.live-alerts-card { height: min(92dvh, 820px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.la-head { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-s) var(--space-m) var(--space-xs); flex: none; min-width: 0; }
.la-head > .icon-btn { flex: none; }
.la-head-ico { flex: none; }
.la-head-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 19px; color: #fff; background: linear-gradient(135deg, #fe2c55, #ff7a45); box-shadow: 0 10px 24px -12px rgba(254, 44, 85, .9); }
.la-head-title { flex: 1; min-width: 0; display: grid; }
.la-head-title strong { font-weight: 800; font-size: var(--step-1); }
.la-head-title small { color: var(--muted); font-size: var(--step--1); }
.la-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: var(--space-xs) var(--space-m) calc(var(--space-l) + var(--safe-bottom)); display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: var(--space-s); container-type: inline-size; }
.la-body > * { min-width: 0; }
/* تنويه تلجرام */
.la-tg { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px var(--space-xs); padding: var(--space-s); border-radius: var(--radius); background: color-mix(in srgb, #2aabee 10%, var(--surface-2)); border: 1px solid color-mix(in srgb, #2aabee 35%, var(--line)); }
.la-tg.warn { background: color-mix(in srgb, #e5a400 10%, var(--surface-2)); border-color: color-mix(in srgb, #e5a400 40%, var(--line)); }
.la-tg-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; color: #fff; background: #2aabee; }
.la-tg-text { display: grid; gap: 3px; min-width: 0; }
.la-tg-text strong { font-weight: 800; }
.la-tg.warn .la-tg-text strong { color: #e5a400; }
.la-tg-text small { color: var(--muted); font-size: var(--step--1); line-height: 1.6; }
.la-tg-acts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs); }
.la-tg-acts > button { min-width: 0; white-space: normal; text-align: center; line-height: 1.3; }
.la-tg-ico { flex: none; }
.la-tg-acts .btn-primary { background: #2aabee; color: #fff; }
.la-tg-acts .btn-soft { justify-content: center; }
/* الإضافة */
.la-add { display: flex; gap: var(--space-2xs); padding: var(--space-3xs); border-radius: calc(var(--radius) + 4px); background: var(--surface-2); border: 1px solid var(--line); }
.la-add { min-width: 0; }
.la-add .field { flex: 1 1 auto; min-width: 0; background: var(--surface); }
.la-add .btn-primary { flex: none; padding-inline: var(--space-s); }
/* القائمة */
.la-list-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--space-xs); }
.la-list-head strong { font-weight: 800; }
.la-count { padding: 2px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: var(--step--2); }
.la-live-count { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; color: #ff3b5c; font-weight: 800; font-size: var(--step--1); }
.la-live-count i, .la-badge.live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: recBlink 1.2s infinite; }
.la-list { display: grid; gap: var(--space-2xs); }
.la-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px var(--space-xs); padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.la-item.live { border-color: color-mix(in srgb, #ff3b5c 55%, var(--line)); background: color-mix(in srgb, #ff3b5c 7%, var(--surface-2)); }
.la-av-wrap { position: relative; flex: none; }
.la-avatar { position: relative; overflow: hidden; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: color-mix(in srgb, var(--accent) 20%, var(--surface)); color: var(--accent); }
.la-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.la-live-ring { position: absolute; inset: -3px; border-radius: 50%; border: 2px solid #ff3b5c; animation: laPulse 1.6s ease-out infinite; }
@keyframes laPulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.18); opacity: 0; } }
.la-item-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.la-item-text strong { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.la-item-text small { color: var(--muted); font-size: var(--step--2); text-align: start; }
.la-state { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--step--2); color: var(--muted); margin-top: 2px; }
.la-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; background: var(--surface); font-weight: 700; font-style: normal; }
.la-badge.live { color: #fff; background: #ff3b5c; }
.la-badge.warn { color: #e5a400; }
.la-item-acts { display: flex; align-items: center; gap: 6px; min-width: 0; }
.la-item-acts .icon-btn { width: 36px; height: 36px; border-radius: 50%; }
.la-item-acts .la-del { color: var(--danger); }
.la-item-acts .spin i { animation: spin 1s linear infinite; }
.la-watch { padding: 8px 12px; font-size: var(--step--1); background: #ff3b5c; color: #fff; }
.la-empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: var(--space-l) var(--space-s); color: var(--muted); }
.la-empty > i { font-size: 34px; color: #ff3b5c; opacity: .6; }
.la-empty p { color: var(--text); font-weight: 700; }
.la-hint { display: flex; gap: 8px; align-items: baseline; color: var(--muted); font-size: var(--step--2); line-height: 1.6; }

/* ===== ننبهك بالبث: متجاوب مع كل الأحجام (يعتمد على عرض الشاشة نفسها مو الجهاز) ===== */
@container (max-width: 440px) {
  /* البطاقة: الأزرار تحت الاسم بصف كامل، والأيقونات بصفها */
  .la-item { grid-template-columns: auto minmax(0, 1fr); }
  .la-item-acts { grid-column: 1 / -1; justify-content: flex-end; }
  .la-item-acts .la-watch { flex: 1 1 auto; justify-content: center; }
}
@container (max-width: 340px) {
  .la-tg-acts { grid-template-columns: minmax(0, 1fr); }
  .la-add .btn-primary .btn-label { gap: 0; }
  .la-add .btn-primary { padding-inline: var(--space-xs); min-width: 46px; }
  .la-add-txt { display: none; }  /* على الشاشات الضيقة جدّاً: أيقونة بس */
  .la-live-count { margin-inline-start: 0; }
}
@media (max-height: 520px) {
  /* الوضع الأفقي بالجوال: نستغل الارتفاع كله */
  .live-alerts-card { height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .la-head { padding-block: 8px 4px; }
}
@media (max-width: 380px) {
  .la-head, .la-body { padding-inline: var(--space-xs); }
  .la-head-title strong { font-size: var(--step-0); }
  .la-head-title small { font-size: var(--step--2); }
  .la-avatar { width: 42px; height: 42px; }
  .la-head-ico { width: 38px; height: 38px; font-size: 16px; }
}

/* ===== بطاقة الحساب (js/card.js) ===== */
.card-ico { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent); }
.card-prev { position: relative; display: grid; place-items: center; border-radius: 22px; overflow: hidden; background: var(--surface-2); aspect-ratio: 4 / 5; max-height: min(50dvh, 520px); margin: 0 auto var(--space-s); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .7); }
.card-prev img { display: block; width: 100%; height: 100%; object-fit: contain; -webkit-touch-callout: default; user-select: auto; transition: opacity .2s; }
.card-prev.busy img { opacity: .25; }
.card-prev:not(.busy) .spinner { display: none; }
.card-prev .spinner { position: absolute; inset: 0; margin: auto; color: var(--accent); }
.card-themes { display: flex; gap: var(--space-2xs); margin-bottom: var(--space-s); }
.card-theme { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 2.8em; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; font-size: var(--step--1); color: var(--muted); transition: border-color .2s, color .2s; }
.card-theme.on { color: var(--text); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.card-sw { width: 1.1em; height: 1.1em; border-radius: 50%; border: 1px solid var(--line-strong); }
.card-sw-dark { background: #0b0b0e; }
.card-sw-light { background: #f6f1e4; }
.card-sw-aurora { background: linear-gradient(135deg, #8b5cf6, #25f4ee); }
.card-acts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2xs); }
.card-acts .btn-primary { grid-column: 1 / -1; }
.card-acts .btn-soft { justify-content: center; }

/* ===== الرسائل الصوتية: مشغّل + شريط التسجيل (js/chat.js) ===== */
.vp { display: flex; align-items: center; gap: 10px; min-width: min(240px, 100%); padding: 2px 0; }
.vp-play { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, color-mix(in srgb, #fff 14%, var(--accent)), var(--accent)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 14px -8px color-mix(in srgb, var(--accent) 90%, transparent); transition: transform .15s; }
.vp-play:active { transform: scale(.92); }
.vp-play svg { grid-area: 1 / 1; }
.vp-play .ic-play:dir(rtl) { transform: scaleX(-1); }
.vp-play .ic-pause, .vp-play .spinner { display: none; grid-area: 1 / 1; }
.vp.playing .ic-play { display: none; }
.vp.playing .ic-pause { display: block; }
.vp.loading .vp-play svg { display: none; }
.vp.loading .vp-play .spinner { display: block; width: 18px; height: 18px; border-width: 2.5px; }
.vp-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.vp-wave { display: flex; align-items: center; gap: 2px; height: 30px; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.vp-wave i { flex: 1 1 0; min-width: 2px; max-width: 5px; height: calc(var(--h, .4) * 100%); border-radius: 3px; background: color-mix(in srgb, var(--text) 24%, transparent); transition: background .12s, height .35s ease; }
.vp-wave i.on { background: var(--accent); }
.vp-info { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 18px; color: var(--muted); font-size: 11.5px; }
.vp-time { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.vp.started .vp-time { color: var(--text); }
.vp-speed { display: none; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 800; line-height: 1.5; color: var(--text); background: color-mix(in srgb, var(--text) 10%, transparent); border: 1px solid var(--line); }
.vp.started .vp-speed { display: inline-block; }
.vp.err { opacity: .7; }
.vp.err .vp-play { background: var(--surface-2); color: var(--muted); box-shadow: none; }
.vp.err .vp-wave { opacity: .35; pointer-events: none; }

.chat-preview.audio { padding: 8px 10px; gap: 10px; }
.chat-preview.audio .vp { flex: 1; min-width: 0; }
.chat-preview.audio .vp-play { width: 44px; height: 44px; }
.chat-preview.audio > .icon-btn { align-self: center; }

.chat-rec { gap: var(--space-2xs); padding-inline-end: calc(var(--space-s) + 42px + var(--space-2xs)); }
.chat-rec [data-rec-cancel] { flex: none; color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface-2)); }
.chat-rec-pill { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-radius: 22px; background: var(--surface-2); border: 1px solid var(--line); }
.chat-rec-dot { flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 18%, transparent); }
.chat-rec-time { flex: none; min-width: 2.7em; font-weight: 800; font-variant-numeric: tabular-nums; text-align: start; }
#chatRecWave { flex: 1; min-width: 0; height: 26px; color: var(--accent); }
.chat-send[data-mode="stop"] { background: var(--danger); animation: recPulse 1.5s ease-out infinite; }
@keyframes recPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 55%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
@media (prefers-reduced-motion: reduce) { .chat-send[data-mode="stop"], .chat-rec-dot { animation: none; } }

/* ===== لوحة التحكم: تبويب الباقة (js/admin.js) ===== */
.adm-usage { display: grid; gap: var(--space-s); }
.adm-usage-load { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: var(--space-xs); padding: var(--space-l) var(--space-m); color: var(--muted); text-align: center; }
.adm-usage-load.err { color: var(--danger); }
.adm-usage-load .btn-soft { width: 100%; justify-content: center; }
.adm-usage-alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 16px; font-size: var(--step--1); line-height: 1.6; font-weight: 600; }
.adm-usage-alert i { flex: none; margin-top: .25em; }
.adm-usage-alert.warn { color: #b98100; background: color-mix(in srgb, #e5a400 14%, var(--surface)); border: 1px solid color-mix(in srgb, #e5a400 35%, var(--line)); }
.adm-usage-alert.bad { color: var(--danger); background: color-mix(in srgb, var(--danger) 11%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line)); }
.adm-usage-plan { display: grid; gap: var(--space-s); }
.adm-usage-plan-top { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; }
.adm-usage-plan-top > div { flex: 1; min-width: 0; display: grid; }
.adm-usage-plan-top small { color: var(--muted); font-size: var(--step--2); }
.adm-usage-plan-top h3 { font-size: var(--step-1); font-weight: 800; overflow-wrap: anywhere; }
.adm-pill { flex: none; padding: .3em .8em; border-radius: 99px; font-size: var(--step--2); font-weight: 800; background: var(--surface-2); color: var(--muted); }
.adm-pill.ok { color: var(--success); background: color-mix(in srgb, var(--success) 14%, var(--surface-2)); }
.adm-pill.bad { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, var(--surface-2)); }
.adm-usage-exp { display: flex; align-items: center; gap: var(--space-s); padding: var(--space-s); border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.adm-usage-exp-num { flex: none; display: grid; justify-items: center; min-width: 5.2em; padding-inline-end: var(--space-s); border-inline-end: 1px solid var(--line); }
.adm-usage-exp-num b { font-size: clamp(2.6rem, 11vw, 3.6rem); font-weight: 900; line-height: 1; letter-spacing: -.03em; direction: ltr; }
.adm-usage-exp-num span { font-size: var(--step--2); color: var(--muted); font-weight: 700; }
.adm-usage-exp-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.adm-usage-exp-info small { color: var(--muted); font-size: var(--step--2); }
.adm-usage-exp-info strong { font-size: var(--step--1); font-weight: 800; line-height: 1.5; overflow-wrap: anywhere; }
.adm-usage-exp.ok .adm-usage-exp-num b { color: var(--success); }
.adm-usage-exp.warn .adm-usage-exp-num b { color: #e5a400; }
.adm-usage-exp.bad .adm-usage-exp-num b { color: var(--danger); }
.adm-usage-day { display: grid; gap: var(--space-s); }
.adm-usage-day-body { display: flex; align-items: center; gap: var(--space-m); flex-wrap: wrap; justify-content: center; }
.adm-ring-wrap { position: relative; flex: none; width: clamp(130px, 38vw, 170px); aspect-ratio: 1; }
.adm-ring { width: 100%; height: 100%; display: block; }
.adm-ring circle { fill: none; stroke-width: 11; }
.adm-ring .trk { stroke: var(--surface-2); }
.adm-ring .bar { stroke-linecap: round; transition: stroke-dashoffset .8s cubic-bezier(.2, .8, .2, 1); }
.adm-ring.ok .bar { stroke: var(--success); }
.adm-ring.warn .bar { stroke: #e5a400; }
.adm-ring.bad .bar { stroke: var(--danger); }
.adm-ring-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.adm-ring-txt b { font-size: clamp(1.5rem, 6vw, 2rem); font-weight: 900; line-height: 1.1; direction: ltr; }
.adm-ring-txt small { color: var(--muted); font-size: var(--step--2); }
.adm-usage-dl { flex: 1 1 200px; min-width: 0; display: grid; gap: 6px; margin: 0; }
.adm-usage-dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-xs); padding: 9px 12px; border-radius: 12px; background: var(--surface-2); }
.adm-usage-dl dt { color: var(--muted); font-size: var(--step--1); }
.adm-usage-dl dd { margin: 0; font-weight: 800; font-size: var(--step-0); direction: ltr; text-align: end; }
.adm-usage-dl dd:not(.num) { direction: rtl; font-size: var(--step--1); }
.adm-usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-xs); }
.adm-usage-grid .adm-stat b { font-size: var(--step-2); overflow-wrap: anywhere; }
.adm-usage-grid .adm-stat b small { font-size: var(--step--1); color: var(--muted); font-weight: 700; }
.adm-usage-at { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: var(--step--2); }
@media (max-width: 380px) {
  .adm-tabs button span { font-size: 10.5px; }
  .adm-usage-exp { flex-direction: column; align-items: flex-start; }
  .adm-usage-exp-num { padding-inline-end: 0; border-inline-end: 0; justify-items: start; }
}

/* ===== معمل الزوار (خاص بالمشرف) — js/admin_lab.js ===== */
.vip-card-lab { border-style: dashed; background: radial-gradient(120% 100% at 100% 0%, color-mix(in srgb, #3b82f6 20%, transparent), transparent 60%), radial-gradient(90% 90% at 0% 100%, color-mix(in srgb, #8b5cf6 14%, transparent), transparent 60%), var(--surface); }
.vip-card-lab .vip-card-ico { color: #fff; background: linear-gradient(135deg, #3b82f6, #8b5cf6); box-shadow: 0 10px 24px -10px rgba(59, 130, 246, .8); }
.vip-card-lab .vip-card-new { color: #fff; background: linear-gradient(135deg, #2563eb, #7c3aed); display: inline-flex; align-items: center; gap: .35em; }
.vip-card-lab .vip-card-new i { color: #fde68a; font-size: .9em; }
.lab-live-dot { color: var(--success); font-size: .55em; vertical-align: middle; animation: blink 1.4s ease-in-out infinite; }

.lab-card { --lab: #3b82f6; --lab-2: #8b5cf6; display: grid; gap: var(--space-s); align-content: start; }
.lab-head { display: flex; align-items: center; gap: var(--space-xs); padding-bottom: var(--space-s); border-bottom: 1px solid var(--line); }
.lab-head-ico { flex: none; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 19px; color: #fff; background: linear-gradient(135deg, var(--lab), var(--lab-2)); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--lab) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35); }
.lab-head-text { flex: 1; min-width: 0; display: grid; gap: 3px; justify-items: start; }
.lab-head-text h3 { font-size: var(--step-1); font-weight: 900; line-height: 1.2; }
.lab-badge { display: inline-flex; align-items: center; gap: .35em; padding: .15em .6em; border-radius: 99px; font-size: var(--step--2); font-weight: 800; color: color-mix(in srgb, var(--lab) 80%, var(--text)); background: color-mix(in srgb, var(--lab) 14%, transparent); border: 1px solid color-mix(in srgb, var(--lab) 30%, transparent); }
.lab-badge i { color: #e5a400; }
.lab-x { flex: none; width: 38px; height: 38px; background: var(--surface-2); }

.lab-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.lab-stat { display: grid; justify-items: center; gap: 1px; padding: 10px 4px; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line); text-align: center; min-width: 0; }
.lab-stat i { font-size: 13px; color: var(--lab); margin-bottom: 2px; }
.lab-stat b { font-size: var(--step-1); font-weight: 900; line-height: 1.1; }
.lab-stat small { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.lab-stat.live i { color: var(--success); font-size: 9px; margin-block: 2px 4px; animation: blink 1.4s ease-in-out infinite; }

.lab-link { display: grid; gap: 8px; padding: var(--space-s); border-radius: var(--radius); background: linear-gradient(135deg, color-mix(in srgb, var(--lab) 12%, transparent), color-mix(in srgb, var(--lab-2) 8%, transparent)), var(--surface-2); border: 1px solid color-mix(in srgb, var(--lab) 28%, var(--line)); }
.lab-link-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--step--1); font-weight: 800; }
.lab-link-top > span i { color: var(--lab); }
.lab-link-open { display: inline-flex; align-items: center; gap: .4em; padding: .3em .75em; border-radius: 99px; font-size: var(--step--2); font-weight: 700; color: var(--text); background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.lab-link-url { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 11px 14px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); color: var(--text); font-family: var(--mono); font-size: var(--step--1); cursor: pointer; transition: transform .15s, border-color .2s; }
.lab-link-url span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.lab-link-url i { flex: none; color: var(--lab); }
.lab-link-url:active { transform: scale(.98); }
.lab-link-url:hover { border-color: color-mix(in srgb, var(--lab) 45%, var(--line)); }

.lab-list-head { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.lab-list-head strong { display: inline-flex; align-items: center; gap: .45em; font-weight: 800; }
.lab-list-head strong > i { color: var(--lab); }
.lab-count { padding: .05em .55em; border-radius: 99px; font-size: var(--step--2); font-weight: 800; color: var(--muted); background: var(--surface-2); }
.lab-refresh { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; }
.lab-refresh.spin i { animation: labSpin .8s linear infinite; }
@keyframes labSpin { to { transform: rotate(360deg); } }

.lab-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 42px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.lab-search:focus-within { border-color: color-mix(in srgb, var(--lab) 50%, var(--line)); }
.lab-search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: var(--step--1); }
.lab-search input::-webkit-search-cancel-button { display: none; }

.lab-list { display: grid; gap: 6px; }
.lab-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 10px 12px; text-align: start; cursor: pointer; color: var(--text);
  border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line);
  animation: loginRow .4s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d); opacity: 0; transform: translateY(8px);
  transition: border-color .2s, background .2s, transform .15s;
}
.lab-row:hover { border-color: color-mix(in srgb, var(--lab) 40%, var(--line)); }
.lab-row:active { transform: scale(.98); }
.lab-av, .lgd-av {
  --av: 59, 130, 246;
  position: relative; flex: none; display: grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 900;
  background: linear-gradient(135deg, rgb(var(--av)), color-mix(in srgb, rgb(var(--av)) 55%, #000));
}
.lab-av { width: 46px; height: 46px; font-size: 17px; }
.lab-av img, .lgd-av img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.lab-dot { position: absolute; bottom: 0; inset-inline-end: 0; z-index: 1; width: 12px; height: 12px; border-radius: 50%; background: var(--success); border: 2.5px solid var(--surface-2); box-shadow: 0 0 10px var(--success); }
.lab-row-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.lab-row-name { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.lab-row-name strong { font-weight: 800; font-size: var(--step--1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-row-name small { flex: none; max-width: 45%; color: var(--muted); font-size: var(--step--2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-row-meta { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--step--2); color: var(--muted); }
.lab-row-meta > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-chip { flex: none; display: inline-flex; align-items: center; gap: .3em; padding: .05em .5em; border-radius: 99px; color: color-mix(in srgb, var(--lab) 75%, var(--text)); background: color-mix(in srgb, var(--lab) 12%, transparent); }
.lab-row-end { flex: none; display: grid; justify-items: end; gap: 4px; color: var(--muted); font-size: var(--step--2); }
.lab-row-end small.on { color: var(--success); font-weight: 800; }
.lab-row-end i { font-size: 11px; opacity: .6; }
.lab-skel { pointer-events: none; }
.lab-skel > span { width: 46px; height: 46px; border-radius: 50%; background: var(--surface); }
.lab-skel > div { flex: 1; display: grid; gap: 7px; }
.lab-skel i { display: block; height: 10px; border-radius: 6px; background: var(--surface); width: 60%; animation: labPulse 1.2s ease-in-out infinite; }
.lab-skel i + i { width: 38%; }
@keyframes labPulse { 50% { opacity: .45; } }
.lab-empty { display: grid; justify-items: center; gap: 4px; padding: var(--space-l) var(--space-s); text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.lab-empty i { font-size: 26px; opacity: .4; margin-bottom: 6px; }
.lab-empty strong { color: var(--text); font-weight: 800; }
.lab-empty small { font-size: var(--step--2); }

/* ===== شاشة تفاصيل الزائر: Liquid Glass بنفس مواد عارض الفيديو (vf-glass) ===== */
.lab-detail {
  --lg-fill: rgba(255, 255, 255, .08);
  --lg-edge: rgba(255, 255, 255, .2);
  --lg-blur: blur(28px) saturate(1.9) brightness(1.05);
  --lg-shine: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(255, 255, 255, .06), 0 30px 80px -20px rgba(0, 0, 0, .75);
  --lg-tile: rgba(255, 255, 255, .07);
  --lg-tile-edge: rgba(255, 255, 255, .12);
  --lg-text: #fff;
  --lg-muted: rgba(255, 255, 255, .62);
  position: fixed; inset: 0; z-index: 96; display: grid; place-items: end center; overflow: hidden;
  background: rgba(3, 4, 10, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: loginFade .25s ease; color: var(--lg-text);
}
[data-theme="light"] .lab-detail {
  --lg-fill: rgba(255, 255, 255, .55);
  --lg-edge: rgba(255, 255, 255, .9);
  --lg-shine: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(60, 45, 10, .06), 0 30px 80px -24px rgba(40, 30, 80, .45);
  --lg-tile: rgba(255, 255, 255, .55);
  --lg-tile-edge: rgba(255, 255, 255, .95);
  --lg-text: #17151f;
  --lg-muted: rgba(23, 21, 31, .6);
  background: rgba(30, 25, 60, .25);
}
.lab-detail[hidden] { display: none; }
.lab-detail.out { animation: loginFade .22s ease reverse forwards; }
.lab-detail.out .lgd-card { animation: lgdDown .22s ease forwards; }
@media (min-width: 560px) { .lab-detail { place-items: center; } }

/* بقع ألوان خلف الزجاج عشان يبان الانكسار والتشبّع */
.lgd-blobs { position: absolute; inset: 0; pointer-events: none; }
.lgd-blobs i { position: absolute; width: 60vmin; height: 60vmin; border-radius: 50%; filter: blur(50px); opacity: .55; animation: lgdFloat 12s ease-in-out infinite alternate; }
.lgd-blobs i:nth-child(1) { background: #3b82f6; top: 18%; right: -12%; }
.lgd-blobs i:nth-child(2) { background: #8b5cf6; bottom: 8%; left: -15%; animation-delay: -4s; }
.lgd-blobs i:nth-child(3) { background: #fe2c55; bottom: -18%; right: 22%; width: 42vmin; height: 42vmin; opacity: .35; animation-delay: -8s; }
@keyframes lgdFloat { to { transform: translate(6vmin, -5vmin) scale(1.12); } }

.lgd-card {
  position: relative; width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  padding: 14px var(--space-m) calc(var(--space-l) + var(--safe-bottom)); border-radius: 30px 30px 0 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03) 55%), var(--lg-fill);
  border: 1px solid var(--lg-edge); border-bottom: 0;
  backdrop-filter: var(--lg-blur); -webkit-backdrop-filter: var(--lg-blur); box-shadow: var(--lg-shine);
  animation: lgdUp .42s cubic-bezier(.16, 1, .3, 1) both;
}
.lgd-card::-webkit-scrollbar { display: none; }
@media (min-width: 560px) { .lgd-card { border-radius: 30px; border-bottom: 1px solid var(--lg-edge); padding-bottom: var(--space-l); } .lgd-handle { display: none !important; } }
@keyframes lgdUp { from { transform: translateY(40px) scale(.97); opacity: 0; } }
@keyframes lgdDown { to { transform: translateY(40px) scale(.97); opacity: 0; } }

.lgd-handle { display: block; width: 42px; height: 5px; margin: 0 auto 6px; border-radius: 99px; background: var(--lg-muted); opacity: .6; }
.lgd-x {
  position: absolute; top: 14px; inset-inline-end: 14px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: var(--lg-text); background: var(--lg-tile); border: 1px solid var(--lg-tile-edge); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: transform .15s;
}
.lgd-x:active { transform: scale(.9); }

.lgd-hero { display: grid; justify-items: center; gap: 4px; padding: var(--space-s) 0 var(--space-m); text-align: center; }
.lgd-av { width: 96px; height: 96px; font-size: 38px; margin-bottom: 8px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .14), 0 0 0 5px var(--lg-edge), 0 18px 40px -12px rgba(var(--av), .8); }
.lgd-av .lab-dot { width: 20px; height: 20px; bottom: 4px; inset-inline-end: 4px; border-width: 3px; border-color: rgba(20, 20, 30, .85); }
.lgd-hero h3 { font-family: var(--font-display); font-size: var(--step-2); font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.lgd-user { font-size: var(--step--1); color: var(--lg-muted); font-weight: 600; }
.lgd-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.lgd-pill { display: inline-flex; align-items: center; gap: .4em; padding: .3em .8em; border-radius: 99px; font-size: var(--step--2); font-weight: 700; background: var(--lg-tile); border: 1px solid var(--lg-tile-edge); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.lgd-pill i { font-size: .85em; color: var(--lg-muted); }
.lgd-pill.on { color: #34d399; border-color: rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .12); }
.lgd-pill.on i { color: #34d399; font-size: .6em; animation: blink 1.4s ease-in-out infinite; }
.lgd-pill.gold { color: #e5a400; border-color: rgba(229, 164, 0, .45); background: rgba(229, 164, 0, .12); }
.lgd-pill.gold i { color: #e5a400; }
[data-theme="light"] .lgd-pill.on { color: #0f8a5f; }

.lgd-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; margin-bottom: var(--space-m); }
.lgd-act {
  display: grid; justify-items: center; gap: 6px; padding: 12px 4px; border-radius: 18px; cursor: pointer; color: var(--lg-text); font-size: var(--step--2); font-weight: 700;
  background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .02)), var(--lg-tile); border: 1px solid var(--lg-tile-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); transition: transform .15s;
}
.lgd-act i { font-size: 18px; color: #60a5fa; }
.lgd-act:active { transform: scale(.94); }
[data-theme="light"] .lgd-act i { color: #2563eb; }

.lgd-sec { margin-top: var(--space-s); }
.lgd-sec h4 { display: flex; align-items: center; gap: .5em; margin: 0 4px 8px; font-size: var(--step--1); font-weight: 800; color: var(--lg-muted); }
.lgd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.lgd-tile {
  position: relative; display: grid; gap: 2px; padding: 12px 14px 12px 12px; padding-inline-start: 44px; min-width: 0; text-align: start; cursor: pointer; color: var(--lg-text);
  border-radius: 18px; background: var(--lg-tile); border: 1px solid var(--lg-tile-edge); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: transform .15s, background .2s;
}
.lgd-tile.wide { grid-column: 1 / -1; }
.lgd-tile > i { position: absolute; top: 50%; inset-inline-start: 12px; transform: translateY(-50%); width: 24px; text-align: center; font-size: 15px; color: #60a5fa; }
.lgd-tile small { font-size: 10.5px; color: var(--lg-muted); font-weight: 600; }
.lgd-tile b { font-size: var(--step--1); font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lgd-tile b[dir="ltr"] { text-align: right; font-family: var(--mono); }
.lgd-tile:active { transform: scale(.97); }
.lgd-tile.off { cursor: default; }
.lgd-tile.off b { color: var(--lg-muted); font-weight: 600; }
.lgd-tile.off > i { color: var(--lg-muted); }
[data-theme="light"] .lgd-tile > i { color: #2563eb; }
@media (max-width: 360px) { .lgd-grid { grid-template-columns: minmax(0, 1fr); } .lab-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .lgd-blobs i, .lab-live-dot, .lab-stat.live i, .lgd-pill.on i { animation: none; } .lgd-card { animation-duration: .01s; } }

/* محرر صفحة الزائر داخل المعمل */
.lab-wp { display: grid; gap: var(--space-s); padding: var(--space-s); border-radius: calc(var(--radius) + 4px); background: var(--surface-2); border: 1px solid var(--line); }
.lab-wp-load { display: flex; align-items: center; justify-content: center; gap: 8px; padding: var(--space-m); color: var(--muted); font-size: var(--step--1); }
.lab-wp-load i { animation: labSpin .8s linear infinite; }
.lab-wp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lab-wp-head strong { display: inline-flex; align-items: center; gap: .45em; font-weight: 800; }
.lab-wp-head strong i { color: var(--lab); }
.lab-wp-state { padding: .15em .65em; border-radius: 99px; font-size: var(--step--2); font-weight: 700; color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }
.lab-wp-state.dirty { color: #e5a400; background: color-mix(in srgb, #e5a400 14%, transparent); }
.lab-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.lab-seg button { display: inline-flex; align-items: center; justify-content: center; gap: .5em; height: 42px; border-radius: 12px; font: inherit; font-weight: 700; font-size: var(--step--1); color: var(--muted); background: none; border: 0; cursor: pointer; transition: background .2s, color .2s; }
.lab-seg button[aria-checked="true"] { color: #fff; background: linear-gradient(135deg, var(--lab), var(--lab-2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 18px -10px var(--lab); }
.lab-wp-note { font-size: var(--step--2); color: var(--muted); line-height: 1.6; margin-top: -4px; }

/* المعاينة: الصفحة الحقيقية بإطار جوال مصغّر */
.lab-phone { position: relative; justify-self: center; width: 200px; height: 390px; border-radius: 30px; overflow: hidden; background: #07070c; border: 6px solid #1c1c22; box-shadow: 0 0 0 1px var(--line-strong), 0 24px 50px -24px rgba(0, 0, 0, .8); }
.lab-phone iframe { position: absolute; top: 0; right: 0; width: 376px; height: 756px; border: 0; transform: scale(.5); transform-origin: top right; }
.lab-wp-replay { justify-self: center; display: inline-flex; align-items: center; gap: .4em; margin-top: -6px; padding: .35em .9em; border-radius: 99px; font: inherit; font-size: var(--step--2); font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--line); cursor: pointer; }

.lab-field { display: grid; gap: 6px; }
.lab-label { font-size: var(--step--1); font-weight: 700; }
.lab-label small { font-weight: 500; color: var(--muted); font-size: var(--step--2); }
.lab-input { width: 100%; min-width: 0; padding: 11px 13px; border-radius: 14px; font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--line); outline: 0; resize: vertical; transition: border-color .2s; }
.lab-input:focus { border-color: color-mix(in srgb, var(--lab) 55%, var(--line)); }
textarea.lab-input { line-height: 1.7; min-height: 100px; }
.lab-themes { display: flex; gap: 10px; }
.lab-themes button { width: 38px; height: 38px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; background: linear-gradient(135deg, var(--a), var(--b)) padding-box; box-shadow: 0 0 0 1px var(--line); transition: transform .15s; }
.lab-themes button[aria-checked="true"] { box-shadow: 0 0 0 2px var(--surface-2), 0 0 0 4px var(--a); transform: scale(1.06); }
.lab-img { position: relative; border-radius: 16px; overflow: hidden; }
.lab-img > img { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); }
.lab-img-empty { width: 100%; display: grid; justify-items: center; gap: 3px; padding: 18px 12px; border-radius: 16px; font: inherit; color: var(--muted); background: var(--surface); border: 1.5px dashed var(--line-strong); cursor: pointer; }
.lab-img-empty i { font-size: 22px; color: var(--lab); margin-bottom: 4px; }
.lab-img-empty strong { color: var(--text); font-size: var(--step--1); }
.lab-img-empty small { font-size: var(--step--2); }
.lab-img-x, .lab-img-swap { position: absolute; top: 8px; display: inline-flex; align-items: center; gap: .4em; height: 34px; border-radius: 99px; font: inherit; font-size: var(--step--2); font-weight: 700; color: #fff; background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer; }
.lab-img-x { inset-inline-start: 8px; width: 34px; justify-content: center; }
.lab-img-swap { inset-inline-end: 8px; padding: 0 12px; }
.lab-more { border-radius: 14px; background: var(--surface); border: 1px solid var(--line); padding: 0 12px; }
.lab-more summary { display: flex; align-items: center; gap: .5em; padding: 12px 0; font-size: var(--step--1); font-weight: 700; cursor: pointer; list-style: none; }
.lab-more summary::-webkit-details-marker { display: none; }
.lab-more summary i { color: var(--lab); }
.lab-more summary small { color: var(--muted); font-weight: 500; }
.lab-more[open] { padding-bottom: 12px; display: grid; gap: 10px; }
.lab-more .lab-input { background: var(--surface-2); }
.lab-wp-err { padding: 9px 12px; border-radius: 12px; font-size: var(--step--1); color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.lab-wp-save { width: 100%; }
.lab-wp-save:disabled:not(.loading) { opacity: .5; cursor: default; }
.vip-lab-note { margin-top: 6px; }
.lgd-anon { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 18px; font-size: var(--step--1); line-height: 1.6; color: var(--lg-muted); background: var(--lg-tile); border: 1px dashed var(--lg-tile-edge); }
.lgd-anon i { flex: none; font-size: 20px; color: #60a5fa; }

/* شاشة التعريف بـ «من فتح الرابط» (للمقفلة) */
.lgp-hero { padding-bottom: var(--space-s); }
.lgp-ico { width: 78px; height: 78px; border-radius: 26px; display: grid; place-items: center; font-size: 34px; color: #fff; margin-bottom: 8px; background: linear-gradient(140deg, #3b82f6, #8b5cf6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 18px 40px -14px #3b82f6; }
.lgp-list { list-style: none; display: grid; gap: 8px; margin: var(--space-xs) 0 var(--space-s); }
.lgp-list li { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 18px; background: var(--lg-tile); border: 1px solid var(--lg-tile-edge); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22); animation: up .6s cubic-bezier(.16, 1, .3, 1) both; animation-delay: var(--d); }
.lgp-list li > span { flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 17px; color: #60a5fa; background: color-mix(in srgb, #3b82f6 16%, transparent); }
.lgp-list li div { display: grid; gap: 2px; min-width: 0; }
.lgp-list strong { font-weight: 800; font-size: var(--step--1); }
.lgp-list small { font-size: var(--step--2); line-height: 1.6; color: var(--lg-muted); }
.lgp-lock { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; font-size: var(--step--1); font-weight: 700; line-height: 1.5; color: #e8c46a; background: color-mix(in srgb, #e5a400 12%, transparent); border: 1px solid color-mix(in srgb, #e5a400 35%, transparent); }
.lgp-lock i { flex: none; font-size: 18px; }
.lgp-cta { width: 100%; margin-top: var(--space-s); }
[data-theme="light"] .lgp-lock { color: #8a6500; }
