/* ═══════════════════════════════════════════════════════════════════════
   «الحالات» (.st-*) — 1.5، القدرة statuses. المرجع: docs/DESIGN.md §٩.
   ───────────────────────────────────────────────────────────────────────
   ١ الألوان والخطوط (محتوى)  ٢ الشريط  ٣ العارض  ٤ المحرّر
   ٥ الأوراق (الاختيار، الخصوصية، المنتقي، المشاهدون، الكتم)  ٦ البطاقة الصغيرة  ٧ تقليل الحركة
   الشريط والأوراق بالرموز (فاتح وداكن)؛ مسرح العارض والمحرّر أسود دائماً بإطار أبيض كعارض الصور.
   الطبقتان z-index 55: فوق الرأس والشريط السفلي (30) والزر العائم (25)، وتحت الأوراق (60/61)
   والإشعار (80) والشريط (90) والمكالمة. transform و opacity وحدهما يتحرّكان.
   ═══════════════════════════════════════════════════════════════════════ */

/* ═══ ١. الألوان والخطوط — محتوى لا واجهة (كتدرّج الصورة الرمزية) ═══════
   أبيض عريض 24px فما فوق على الطرف الأفتح من كل تدرّج: تباين ≥ 3:1. */
.st-bg-ocean  { background: linear-gradient(160deg, #2F6FED, #1A3A8F); }
.st-bg-violet { background: linear-gradient(160deg, #7C4DFF, #3D1E9E); }
.st-bg-teal   { background: linear-gradient(160deg, #0E9F8E, #04564D); }
.st-bg-sunset { background: linear-gradient(160deg, #E8590C, #A61E4D); }
.st-bg-rose   { background: linear-gradient(160deg, #D6336C, #7A1340); }
.st-bg-forest { background: linear-gradient(160deg, #2B8A3E, #12401C); }
.st-bg-night  { background: linear-gradient(160deg, #343A40, #0B0D10); }
.st-bg-gold   { background: linear-gradient(160deg, #B7791F, #6B3F06); }
.st-font-bold  { font-family: var(--font); font-weight: 800; }
.st-font-naskh { font-family: 'Noto Naskh Arabic', 'Amiri', 'Traditional Arabic', serif; font-weight: 700; }
.st-font-light { font-family: var(--font); font-weight: 400; }

/* ═══ ٢. الشريط (أعلى قائمة المحادثات) ═══════════════════════════════════ */
.st-strip { padding: 2px 0; }
.st-strip-h { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 6px 16px 0; }
.st-strip-t { font-size: var(--fz-sm); font-weight: 800; color: var(--fg-3); }
.st-here {
  margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border: 0; border-radius: 13px; background: color-mix(in srgb, var(--success) 13%, transparent); color: var(--success);
  font-size: var(--fz-xs); font-weight: 700; white-space: nowrap; transition: background-color var(--dur-1);
}
.st-here:active { background: color-mix(in srgb, var(--success) 22%, transparent); }
.st-here-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--online); flex: none; }
.st-here.st-here-away { background: var(--bg-2); color: var(--fg-2); }
.st-here-away .st-here-dot { background: var(--warning); }
.st-strip-row {
  display: flex; gap: 4px; overflow-x: auto; overscroll-behavior-x: contain;
  padding: 8px 10px 6px; scrollbar-width: none; scroll-snap-type: x proximity;
}
.st-strip-row::-webkit-scrollbar { display: none; }
.st-tile { position: relative; flex: none; width: 72px; scroll-snap-align: start; }
.st-tile-b {
  width: 100%; padding: 0; border: 0; background: none; color: inherit;
  display: grid; justify-items: center; gap: 5px; transition: transform var(--dur-1) var(--ease);
  -webkit-touch-callout: none;
}
.st-tile-b:active { transform: scale(.94); }
.st-ring { position: relative; width: 64px; height: 64px; display: grid; place-items: center; flex: none; }
.st-ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
[dir="rtl"] .st-ring-svg { transform: scaleX(-1); }     /* القطع تدور مع اتجاه القراءة */
.st-seg { fill: none; stroke-width: 2.5; }
.st-seg.unseen { stroke: var(--accent); }
/* المشاهَدة رمادية مصمتة: --fg-3 كما هو ≥ 3:1 على --bg في كل سمة (فاتح 3.0، داكن 4.3، OLED 4.4) — بشفافية .45
   كانت 1.6–1.8:1 فلا تُميَّز «شوهدت» من «لا حلقة». */
.st-seg.seen { stroke: var(--fg-3); }
.st-seg-pend { stroke: var(--accent); stroke-linecap: round; }
.st-ring-spin { transform-box: view-box; transform-origin: 32px 32px; animation: spin 1.2s linear infinite; }
.st-ring .av > i { border-color: var(--bg); }
.st-name {
  max-width: 68px; font-size: var(--fz-xs); font-weight: 700; line-height: 1.3; color: var(--fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-seen .st-name { font-weight: 500; color: var(--fg-2); }
.st-folder .st-name { font-weight: 500; color: var(--fg-3); }
.st-up .st-name { color: var(--accent); }
.st-fail .st-name { color: var(--danger); }
/* «+» حالة جديدة: دائرة 20px بالأكسنت عند أسفل الوجه جهة نهاية السطر، ومنطقة لمسها 32px */
.st-add {
  position: absolute; top: 37px; inset-inline-start: 40px; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 50%; background: none; display: grid; place-items: center;
}
.st-add > i {
  width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-fg);
  display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); font-style: normal;
  transition: transform var(--dur-1) var(--ease);
}
.st-add:active > i { transform: scale(.88); }
.st-add .icon-svg { width: 14px; height: 14px; }
.st-add svg { stroke-width: 3; }
.st-badge-fail {
  position: absolute; top: 43px; inset-inline-start: 46px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--danger); color: #fff; font-size: 13px; font-weight: 800;
  box-shadow: 0 0 0 2px var(--bg); pointer-events: none;
}
.st-folder-av {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-3); color: var(--fg-2);
}
.st-folder-av .icon-svg { width: 24px; height: 24px; }
.st-folder-n { position: absolute; bottom: 2px; inset-inline-end: 0; height: 18px; min-width: 18px; padding: 0 5px; box-shadow: 0 0 0 2px var(--bg); }
.st-skel { display: grid; justify-items: center; gap: 5px; pointer-events: none; }   /* ارتفاع البلاطة الحقيقية: لا قفزة حين تصل */
.st-skel-av { width: 54px; height: 54px; border-radius: 50%; }
.st-skel-name { display: block; width: 40px; height: 9px; margin: 3px 0 4px; border-radius: 5px; }
/* أثناء التحديد في القائمة: الشريط يغيب (chats.css يخفي الغلاف كله). */

/* لا حالة لأحد غيري: سطر واحد مضغوط (~56px لا ~110) — «حالتي» ووجهها 36 في حلقة 44، والحبّة في طرفه. */
.st-strip.st-compact { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.st-compact .st-strip-row { order: 0; flex: 1; min-width: 0; padding: 4px 14px; overflow: visible; }   /* الوجه على حافّة 16 كالعنوان */
.st-compact .st-strip-h { order: 1; flex: none; min-height: 0; padding: 0; padding-inline-end: 16px; }
.st-compact .st-strip-t { display: none; }
.st-compact .st-tile { width: auto; max-width: 100%; }
.st-compact .st-tile-b {
  display: flex; align-items: center; gap: 12px; justify-items: start; width: auto; max-width: 100%;
  padding: 2px 6px 2px 2px; padding-inline: 2px 6px; border-radius: 26px;
}
.st-compact .st-ring { width: 44px; height: 44px; }
.st-compact .st-seg { stroke-width: 3.4; }
.st-name-w { display: grid; min-width: 0; text-align: start; gap: 1px; }
.st-compact .st-name { max-width: none; font-size: var(--fz-md); }
.st-sub { font-size: var(--fz-xs); font-weight: 500; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-compact .st-up .st-sub { color: var(--accent); }
.st-compact .st-fail .st-sub { color: var(--danger); }
.st-compact .st-add { top: 21px; inset-inline-start: 23px; width: 28px; height: 28px; }
.st-compact .st-add > i { width: 18px; height: 18px; }
.st-compact .st-add .icon-svg { width: 12px; height: 12px; }
.st-compact .st-badge-fail { top: 27px; inset-inline-start: 29px; width: 18px; height: 18px; font-size: 12px; }

/* ═══ ٣. العارض ══════════════════════════════════════════════════════════ */
.st-viewer {
  position: fixed; inset: 0; z-index: 55; overflow: hidden; color: #fff;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.st-v-back { position: absolute; inset: 0; background: #000; }
.st-v-panes { position: absolute; inset: 0; transform-origin: 50% 50%; }
.st-pane { position: absolute; inset: 0; overflow: hidden; background: #000; }
.st-pane-nb { pointer-events: none; }
.st-stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; }
.st-stage-bg { position: absolute; inset: -8%; background: center / cover no-repeat; opacity: .6; }   /* المصغّرة مكبّرة: ضبابية بطبعها */
.st-media { position: absolute; inset: 0; display: grid; place-items: center; }
.st-img, .st-vid {
  width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; user-select: none;
  animation: fade-in 160ms var(--ease) both;
}
.st-vid { background: transparent; }
.st-card { position: absolute; inset: 0; display: grid; place-items: center; }
.st-card-t {
  color: #fff; text-align: center; unicode-bidi: plaintext; white-space: pre-wrap; overflow-wrap: anywhere;
  line-height: 1.35; text-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
.st-spin {
  position: absolute; width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .85); border-top-color: transparent; animation: spin .8s linear infinite;
}
.st-spin-sm { position: static; width: 16px; height: 16px; border-width: 2px; }
.st-spin-dark { position: static; width: 26px; height: 26px; border-width: 2.5px; border-color: var(--fg-3); border-top-color: transparent; }
.st-err {
  position: absolute; z-index: 2; max-width: 80%; display: grid; justify-items: center; gap: 10px; padding: 20px 24px;
  border-radius: 18px; background: rgba(0, 0, 0, .55); color: rgba(255, 255, 255, .92);
  font-weight: 700; text-align: center; animation: fade-in var(--dur-2) var(--ease) both;
}
.st-err .icon-svg { width: 36px; height: 36px; opacity: .85; }
.st-retry {
  pointer-events: auto; height: 38px; padding: 0 18px; border: 0; border-radius: 19px;
  background: rgba(255, 255, 255, .18); color: #fff; font-weight: 800; font-size: var(--fz-md);
}
.st-scrim { position: absolute; inset-inline: 0; pointer-events: none; transition: opacity 150ms linear; }
.st-scrim-top { top: 0; height: calc(120px + var(--safe-t)); background: linear-gradient(rgba(0, 0, 0, .45), transparent); }
.st-scrim-bot { bottom: 0; height: calc(180px + var(--safe-b)); background: linear-gradient(transparent, rgba(0, 0, 0, .5)); }
.st-chrome { position: absolute; inset: 0; display: flex; flex-direction: column; pointer-events: none; transition: opacity 150ms linear; }
.st-viewer.st-bare .st-chrome, .st-viewer.st-bare .st-scrim { opacity: 0; }
.st-viewer.st-bare .st-chrome * { pointer-events: none !important; }
/* أشرطة التقدّم: الأولى عند بداية السطر، والامتلاء منها (يميناً في العربية) */
.st-bars { display: flex; gap: 3px; padding: calc(var(--safe-t) + 8px) 8px 0; }
.st-bar { flex: 1 1 0; min-width: 0; height: 3px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, .35); }
.st-bar > i { display: block; width: 100%; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left center; }
[dir="rtl"] .st-bar > i { transform-origin: right center; }
.st-bar.done > i { transform: scaleX(1); }
.st-bar.on > i.run { animation: st-fill var(--d, 5000ms) linear forwards; }
.st-viewer.paused .st-bar.on > i { animation-play-state: paused; }
@keyframes st-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.st-head { display: flex; align-items: center; gap: 2px; padding: 8px 4px 0; padding-inline-start: 12px; }
.st-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.st-who .av { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .25); }
.st-who-t { min-width: 0; display: grid; }
.st-who-n { font-size: var(--fz-md); font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.st-who-s { font-size: 13px; line-height: 1.3; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }
.st-ib {
  pointer-events: auto; width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%;
  background: transparent; color: #fff; display: grid; place-items: center; transition: background-color var(--dur-1);
}
.st-ib:active { background: rgba(255, 255, 255, .18); }
.st-ib .icon-svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); }
.st-hint {
  pointer-events: auto; align-self: center; margin-top: 14px; display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; border: 0; border-radius: 17px; background: rgba(0, 0, 0, .6); color: #fff;
  font-size: var(--fz-sm); font-weight: 700; animation: fade-in var(--dur-2) var(--ease) both;
}
.st-hint .icon-svg { width: 18px; height: 18px; }
.st-foot { margin-top: auto; }
.st-cap {
  pointer-events: auto; margin: 0 14px 6px; color: #fff; font-size: 15px; line-height: 1.45; text-align: center;
  unicode-bidi: plaintext; white-space: pre-wrap; overflow-wrap: anywhere; text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.st-cap.open {
  display: block; -webkit-line-clamp: unset; max-height: 46vh; overflow-y: auto; padding: 10px 12px;
  border-radius: 14px; background: rgba(0, 0, 0, .55); touch-action: pan-y;
}
.st-bottom { position: relative; pointer-events: auto; padding: 6px 10px calc(10px + var(--safe-b)); }
.st-bottom-own { display: flex; justify-content: center; }
.st-reply-w { display: flex; align-items: center; gap: 8px; }
.st-reply {
  flex: 1; min-width: 0; height: 44px; padding: 0 16px; border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 22px;
  background: rgba(0, 0, 0, .22); color: #fff; outline: none; font: inherit; font-size: var(--fz-base);
  -webkit-user-select: text; user-select: text; transition: border-color var(--dur-1), background-color var(--dur-1);
}
.st-reply::placeholder { color: rgba(255, 255, 255, .78); }
.st-reply:focus { border-color: #fff; background: rgba(0, 0, 0, .45); }
.st-react {
  width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: transparent; color: #fff;
  display: grid; place-items: center; transition: transform var(--dur-1) var(--ease), background-color var(--dur-2);
}
.st-react:active { transform: scale(.9); }
.st-react .icon-svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); }
.st-react.st-send { background: var(--accent); color: var(--accent-fg); }
.st-react.st-send .icon-svg { width: 22px; height: 22px; filter: none; }
.st-react-e { font-size: 26px; line-height: 1; animation: pop-in var(--dur-2) var(--ease-spring) both; }
.st-rx-row {
  position: absolute; z-index: 2; bottom: calc(100% - 4px); inset-inline-end: 8px; display: flex; gap: 2px; padding: 6px;
  border-radius: 30px; background: rgba(28, 28, 32, .94); box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  transform-origin: bottom; animation: st-rx-in 160ms var(--ease) both;
}
.st-rx-row button {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; padding: 0;
  font-size: 27px; line-height: 1; transition: transform var(--dur-1) var(--ease);
}
.st-rx-row button:active { transform: scale(1.25); }
@keyframes st-rx-in { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }
.st-burst { position: fixed; z-index: 4; width: 48px; height: 48px; font-size: 44px; line-height: 48px; text-align: center; pointer-events: none; }
.st-views {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border: 0; border-radius: 22px;
  background: rgba(0, 0, 0, .35); color: #fff; font-size: var(--fz-md); font-weight: 700; font-variant-numeric: tabular-nums;
}
.st-views:active { background: rgba(0, 0, 0, .55); }
.st-views .icon-svg { width: 20px; height: 20px; }
.st-views-rx { display: inline-flex; align-items: center; gap: 4px; padding-inline-start: 8px; border-inline-start: 1px solid rgba(255, 255, 255, .3); }
.st-views-rx .icon-svg { width: 17px; height: 17px; color: #FF6B81; }
.st-views-rx b { font-weight: 700; }
.st-pend { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; font-weight: 700; font-size: var(--fz-md); }
.st-pend-retry { pointer-events: auto; border: 0; background: none; color: #fff; font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; padding: 6px 2px; }
/* لا ظلّ ولا تكبير لحقل في وضع اليد الواحدة: العارض فوق كل شيء */

/* ═══ ٤. المحرّر ═════════════════════════════════════════════════════════ */
.st-compose {
  position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; overflow: hidden;
  background: #000; color: #fff;
}
.st-c-bgs, .st-c-bg { position: absolute; inset: 0; }
.st-c-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-t) + 8px) 10px 8px; }
.st-c-ib {
  width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .25);
  color: #fff; display: grid; place-items: center; transition: background-color var(--dur-1), transform var(--dur-1) var(--ease);
}
.st-c-ib:active { background: rgba(0, 0, 0, .45); transform: scale(.94); }
.st-c-ib .icon-svg { width: 22px; height: 22px; }
.st-c-aa span { font-size: 17px; line-height: 1; }
.st-c-mid { position: relative; z-index: 1; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px 0; }
.st-c-text {
  display: block; max-height: 100%; padding: 0; border: 0; outline: none; resize: none; background: transparent;
  color: #fff; caret-color: #fff; text-align: center; unicode-bidi: plaintext; line-height: 1.35;
  white-space: pre-wrap; overflow-wrap: anywhere; overflow: hidden; -webkit-user-select: text; user-select: text;
}
.st-c-text::placeholder { color: rgba(255, 255, 255, .6); }
.st-c-probe {
  position: absolute; top: 0; inset-inline-start: -10000px; visibility: hidden; pointer-events: none;
  white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.35; text-align: center;
}
.st-c-count { position: absolute; z-index: 2; top: calc(var(--safe-t) + 62px); inset-inline-end: 16px; font-size: var(--fz-sm); font-weight: 700; color: rgba(255, 255, 255, .85); }
.st-c-fontchip {
  position: absolute; z-index: 3; top: calc(var(--safe-t) + 62px); left: 50%; translate: -50% 0;
  padding: 6px 16px; border-radius: 16px; background: rgba(0, 0, 0, .45); font-size: var(--fz-lg);
  animation: fade-in var(--dur-2) var(--ease) both;
}
.st-c-swatches { position: relative; z-index: 2; display: flex; justify-content: center; flex-wrap: nowrap; gap: max(4px, min(12px, calc((100vw - 280px) / 7))); padding: 8px 12px 6px; animation: fade-in var(--dur-2) var(--ease) both; }
.st-swatch {
  width: 32px; height: 32px; flex: none; padding: 0; border: 0; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .4); transition: transform var(--dur-1) var(--ease);
}
.st-swatch:active { transform: scale(.9); }
/* .st-c-swatches قبلها: touch.css (:focus:not(:focus-visible) {outline: none}) بالخصوصية نفسها ويأتي بعد هذا
   الملف، فكانت الحلقة تختفي عن الدائرة التي لُمست للتوّ (المركَّزة) — وهي المختارة بالذات. */
.st-c-swatches .st-swatch[aria-checked="true"] { outline: 2px solid #fff; outline-offset: 2px; }
.st-c-bottom { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 8px 12px calc(12px + var(--safe-b)); }
.st-c-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; max-width: 72%; padding: 0 12px;
  border: 0; border-radius: 18px; background: rgba(0, 0, 0, .3); color: #fff; font-size: var(--fz-sm); font-weight: 700;
}
.st-c-chip:active { background: rgba(0, 0, 0, .5); }
.st-c-chip .icon-svg { width: 16px; height: 16px; flex: none; }
.st-c-chip-l { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-c-send {
  width: 52px; height: 52px; flex: none; border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-fg);
  display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  transition: transform var(--dur-1) var(--ease), opacity var(--dur-2);
}
.st-c-send:active:not(:disabled) { transform: scale(.92); }
.st-c-send:disabled { opacity: .45; box-shadow: none; }
.st-c-send .icon-svg { width: 24px; height: 24px; }
/* الصورة والفيديو */
.st-c-stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; background: #000; }
.st-c-thumbbg { position: absolute; inset: -10%; background: center / cover no-repeat; opacity: .6; }
.st-c-img, .st-c-vid { position: relative; width: 100%; height: 100%; object-fit: contain; }
.st-compose[data-mode="media"] .st-c-top { background: linear-gradient(rgba(0, 0, 0, .45), transparent); }
.st-c-dur { padding: 4px 10px; border-radius: 12px; background: rgba(0, 0, 0, .45); font-size: var(--fz-sm); font-weight: 700; direction: ltr; }
.st-c-bottom-media { margin-top: auto; flex-direction: column; align-items: stretch; padding-top: 28px; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }
.st-c-caption {
  width: 100%; min-height: 44px; height: 44px; padding: 11px 16px; border: 0; outline: none; resize: none; border-radius: 22px;
  background: rgba(0, 0, 0, .5); color: #fff; font: inherit; font-size: var(--fz-base); line-height: 1.4;
  unicode-bidi: plaintext; overflow: hidden; -webkit-user-select: text; user-select: text;
}
.st-c-caption::placeholder { color: rgba(255, 255, 255, .72); }
.st-c-row { display: flex; align-items: center; gap: 8px; }
/* فيديو أطول من دقيقة: أيّ دقيقة تُنشر (الخطّ الزمني من اليسار إلى اليمين كأي مشغّل، والنص عربي) */
.st-c-trim { display: grid; gap: 6px; padding: 8px 12px 10px; border-radius: 16px; background: rgba(0, 0, 0, .45); }
.st-c-trim-h { display: flex; align-items: center; gap: 6px; font-size: var(--fz-sm); font-weight: 700; }
.st-c-trim-h .icon-svg { width: 16px; height: 16px; flex: none; }
.st-c-trim-l { font-weight: 800; }
.st-c-range { width: 100%; height: 32px; margin: 0; accent-color: var(--accent); touch-action: pan-x; }
/* تجهيز الفيديو (قصّ و/أو ضغط على الهاتف): فوق المسرح، والطبقة لا تُلمس إلا «إلغاء» */
.st-compose.st-c-busy .st-c-top, .st-compose.st-c-busy .st-c-bottom { opacity: .35; pointer-events: none; }
.st-c-prep {
  position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 10px;
  padding: 24px; background: rgba(0, 0, 0, .72); text-align: center; animation: fade-in var(--dur-2) var(--ease) both;
}
.st-c-prep-c { position: relative; width: 76px; height: 76px; display: grid; place-items: center; }
.st-c-prep-c svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
[dir="rtl"] .st-c-prep-c svg { transform: rotate(-90deg) scaleY(-1); }   /* يمتلئ مع اتجاه القراءة */
.st-c-prep-bg { fill: none; stroke: rgba(255, 255, 255, .25); stroke-width: 4; }
.st-c-prep-fg { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 200ms linear; }
.st-c-prep-c b { font-size: var(--fz-md); font-weight: 800; }
.st-c-prep-t { font-size: var(--fz-lg); font-weight: 800; }
.st-c-prep-s { max-width: 280px; font-size: var(--fz-sm); line-height: 1.5; color: rgba(255, 255, 255, .8); }
.st-c-prep-x {
  margin-top: 6px; height: 40px; padding: 0 22px; border: 0; border-radius: 20px;
  background: rgba(255, 255, 255, .18); color: #fff; font-weight: 800; font-size: var(--fz-md); pointer-events: auto;
}
.st-c-prep-x:active { background: rgba(255, 255, 255, .3); }

/* ═══ ٥. الأوراق ═════════════════════════════════════════════════════════ */
/* «حالة جديدة» */
.st-ch-item { min-height: 64px; gap: 14px; }
.st-ch-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; }
.st-ch-ic .icon-svg { color: #fff; width: 22px; height: 22px; }
.st-ch-t { display: grid; gap: 1px; text-align: start; }
.st-ch-t b { font-weight: 700; }
.st-ch-t small { font-size: var(--fz-sm); font-weight: 500; color: var(--fg-3); }
.st-ch-priv { font-size: var(--fz-md); font-weight: 500; }
.st-ch-pl { flex: 1; min-width: 0; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-ch-pl b { font-weight: 700; color: var(--accent); }
.st-ch-priv .chev { color: var(--fg-3); }
/* زميل (ضغطة مطوّلة) */
.st-ps-h { display: flex; align-items: center; gap: 12px; padding: 0 4px 12px; }
.st-ps-t { min-width: 0; }
.st-ps-n { font-size: var(--fz-lg); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-ps-s { font-size: var(--fz-sm); color: var(--fg-3); }
/* «من يرى حالاتي» */
.st-priv-list { background: none; margin-inline: -16px; }
.st-priv-row { padding: 0; gap: 0; min-height: 64px; }
.st-priv-pick {
  flex: 1; min-width: 0; min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 8px 16px;
  border: 0; background: none; color: inherit; font: inherit; text-align: start;
}
.st-priv-check { width: 24px; height: 24px; flex: none; display: grid; place-items: center; color: var(--accent); opacity: 0; transform: scale(.6); transition: opacity var(--dur-1), transform var(--dur-1) var(--ease-spring); }
.st-priv-row.on .st-priv-check { opacity: 1; transform: none; }
.st-priv-check svg { stroke-width: 3; }
.st-priv-row.on .item-title { color: var(--accent); }
.st-priv-more { margin-inline-end: 6px; color: var(--fg-3); }
.st-priv-save { width: auto; margin: 6px -16px 0; border-top: 1px solid var(--sep); cursor: pointer; }
.st-priv-note { padding: 10px 4px 0; font-size: var(--fz-sm); line-height: 1.6; color: var(--fg-3); }
/* الزوّار ضمن «جهات اتصالي» (للمدير كلهم): يُقال صراحةً قبل النشر */
.st-priv-visitors {
  display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 0; padding: 10px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--warning) 12%, transparent); color: var(--fg-2); font-size: var(--fz-sm); line-height: 1.55;
}
.st-priv-visitors .icon-svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--warning); }
/* منتقي الأشخاص */
.st-pick-row { display: flex; justify-content: flex-end; padding: 2px 0 2px; }
.st-pick-done {
  height: 46px; min-width: 120px; padding: 0 24px; border: 0; border-radius: 23px;
  background: var(--accent); color: var(--accent-fg); font-size: var(--fz-base); font-weight: 800;
  transition: transform var(--dur-1) var(--ease);
}
.st-pick-done:active { transform: scale(.96); }
.st-pick-load { display: grid; place-items: center; padding: 36px; }
.st-pick-none, .st-muted-none, .st-v-empty { padding: 28px 16px; text-align: center; color: var(--fg-3); font-size: var(--fz-md); }
.st-pick .pick-chips[hidden] { display: none; }
.st-pick-more { padding: 14px; }
.st-pick-note { padding: 14px 16px 18px; text-align: center; font-size: var(--fz-sm); color: var(--fg-3); }
.st-pick-vis { display: inline-block; padding: 0 6px; border-radius: 8px; background: color-mix(in srgb, var(--warning) 18%, transparent); color: var(--fg); font-weight: 700; }
/* المكتومة */
.st-muted-list { background: none; margin-inline: -16px; }
.st-mrow { padding: 0; padding-inline-end: 10px; gap: 4px; }
.st-mrow-b {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px 16px;
  border: 0; background: none; color: inherit; font: inherit; text-align: start;
}
.st-ring-sm { width: 44px; height: 44px; }
.st-ring-sm .st-seg { stroke-width: 3; }
/* المشاهدون */
.st-vh { display: flex; align-items: center; gap: 8px; }
.st-vcount { font-size: var(--fz-sm); }
.st-viewers { background: none; margin-inline: -16px; --sep-inset: 64px; min-height: 64px; }
.st-viewers .item-sub { font-size: var(--fz-sm); color: var(--fg-3); }
.st-vrx { font-size: 20px; line-height: 1; }
.st-vrow-in { animation: fade-in var(--dur-2) var(--ease) both; }
.st-v-load { display: grid; place-items: center; padding: 28px; }
.st-vnote { padding: 12px 4px 0; }
/* الإيموجي في المحرّر */
.st-emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding-bottom: 6px; }
.st-emoji-grid button { height: 44px; padding: 0; border: 0; border-radius: 12px; background: none; font-size: 26px; line-height: 1; }
.st-emoji-grid button:active { background: var(--bg-2); }
/* سطر معلومات في ⋮ (لا يُلمس) */
.st-menu-info { color: var(--fg-2); font-weight: 500; font-size: var(--fz-md); cursor: default; }
.st-menu-info:active { background: none; }

/* ═══ ٦. البطاقة الصغيرة (فقاعة «ردّ على حالة» — thread.css §١٤) ════════ */
.st-mini {
  width: 36px; height: 48px; flex: none; border-radius: 6px; overflow: hidden; display: grid; place-items: center;
  background-color: #2A2F38; background-position: center; background-size: cover; background-repeat: no-repeat; color: #fff;
}
.st-mini-t {
  padding: 2px; font-size: 8px; line-height: 1.2; text-align: center; unicode-bidi: plaintext; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.st-mini-play, .st-mini-ic { width: 16px; height: 16px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
.st-mini-play svg { fill: currentColor; }
.st-mini-none { background: var(--bg-3); color: var(--fg-3); }

/* ═══ ٧. تقليل الحركة: تلاشٍ فقط — والساعة تبقى (الامتلاء ليس زينة بل وقت الحالة) ═══ */
body.reduce-motion .st-viewer .st-bar.on > i.run { animation-duration: var(--d, 5000ms) !important; }
body.reduce-motion .st-ring-spin { animation-duration: 1.2s !important; }
@media (prefers-reduced-motion: reduce) {
  .st-viewer .st-bar.on > i.run { animation-duration: var(--d, 5000ms) !important; }
  .st-ring-spin { animation-duration: 1.2s !important; }
  .st-rx-row, .st-react-e, .st-hint, .st-c-fontchip, .st-c-swatches { animation: none; }
}
body.reduce-motion .st-rx-row, body.reduce-motion .st-react-e { animation: none; }
