/* ==========================================================================
   Arab Next · فسيفساء (Fusaifisa)
   هوية فاتحة مستقلة: كل قسم له لون ثابت، وأيقوناته داخل نجمة ثمانية (خاتم).
   كل القواعد محصورة تحت .fs-theme؛ لا نغيّر data-theme ولا data-style.
   ========================================================================== */

:root:has(body.fs-theme) { color-scheme: light; }

.fs-theme {
  /* الأسطح والحبر */
  --fs-bg: #f2f3f8;
  --fs-surface: #ffffff;
  --fs-surface-2: #f7f8fc;
  --fs-sunken: #eceef6;
  --fs-line: #e1e3ee;
  --fs-line-strong: #cfd3e4;
  --fs-ink: #171a33;
  --fs-ink-2: #464b6b;
  --fs-muted: #666b8c;

  /* ألوان الأقسام: لون، حبر بتباين ≥ 4.5:1 على الأبيض، تظليل خفيف */
  --fs-indigo: #4b55d1;      --fs-indigo-ink: #3540b5;      --fs-indigo-soft: #e7e9fb;
  --fs-teal: #12a3a0;        --fs-teal-ink: #0b6f6d;        --fs-teal-soft: #dcf3f2;
  --fs-saffron: #f0a12b;     --fs-saffron-ink: #8a5300;     --fs-saffron-soft: #fdf0da;
  --fs-violet: #8a4fd0;      --fs-violet-ink: #6b33b0;      --fs-violet-soft: #f0e7fb;
  --fs-pomegranate: #d63c5a; --fs-pomegranate-ink: #ad2541; --fs-pomegranate-soft: #fbe3e8;
  --fs-olive: #6a9a2e;       --fs-olive-ink: #44701a;       --fs-olive-soft: #e9f3dc;
  --fs-slate: #2a2f55;       --fs-slate-ink: #1d2145;       --fs-slate-soft: #e4e6f0;

  /* الخاتم: نجمة ثمانية */
  --fs-star: polygon(50% 0%, 65.7% 12.1%, 85.4% 14.6%, 87.9% 34.3%, 100% 50%, 87.9% 65.7%, 85.4% 85.4%, 65.7% 87.9%, 50% 100%, 34.3% 87.9%, 14.6% 85.4%, 12.1% 65.7%, 0% 50%, 12.1% 34.3%, 14.6% 14.6%, 34.3% 12.1%);
  /* شريط الفسيفساء: مقاطع ألوان الأقسام */
  --fs-stripe: linear-gradient(90deg,
    var(--fs-indigo) 0 16.6%, var(--fs-teal) 16.6% 33.3%, var(--fs-saffron) 33.3% 50%,
    var(--fs-violet) 50% 66.6%, var(--fs-pomegranate) 66.6% 83.3%, var(--fs-olive) 83.3% 100%);

  --fs-r-xl: 20px;
  --fs-r-lg: 16px;
  --fs-r: 12px;
  --fs-r-sm: 8px;
  --fs-shadow-1: 0 1px 2px rgba(23, 26, 51, .05), 0 1px 1px rgba(23, 26, 51, .03);
  --fs-shadow-2: 0 2px 4px rgba(23, 26, 51, .04), 0 12px 28px -12px rgba(23, 26, 51, .16);
  --fs-shadow-3: 0 24px 60px -24px rgba(23, 26, 51, .35);
  --fs-ease: cubic-bezier(.2, .8, .2, 1);
  --fs-spring: cubic-bezier(.34, 1.4, .64, 1);
  --fs-fast: 150ms;
  --fs-mid: 260ms;

  --fs-font: "Segoe UI", "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma, "Geeza Pro", Arial, sans-serif;
  --fs-font-num: "Cascadia Code", "Segoe UI Mono", Consolas, "Roboto Mono", ui-monospace, monospace;

  /* اللون الافتراضي للعنصر الذي لا يحمل فئة لون */
  --hue: var(--fs-indigo);
  --hue-ink: var(--fs-indigo-ink);
  --hue-soft: var(--fs-indigo-soft);

  color: var(--fs-ink);
  font-family: var(--fs-font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* فئات اللون: أي عنصر يحمل إحداها يورّث لونه لأبنائه */
.fs-theme .fs-hue-indigo      { --hue: var(--fs-indigo);      --hue-ink: var(--fs-indigo-ink);      --hue-soft: var(--fs-indigo-soft); }
.fs-theme .fs-hue-teal        { --hue: var(--fs-teal);        --hue-ink: var(--fs-teal-ink);        --hue-soft: var(--fs-teal-soft); }
.fs-theme .fs-hue-saffron     { --hue: var(--fs-saffron);     --hue-ink: var(--fs-saffron-ink);     --hue-soft: var(--fs-saffron-soft); }
.fs-theme .fs-hue-violet      { --hue: var(--fs-violet);      --hue-ink: var(--fs-violet-ink);      --hue-soft: var(--fs-violet-soft); }
.fs-theme .fs-hue-pomegranate { --hue: var(--fs-pomegranate); --hue-ink: var(--fs-pomegranate-ink); --hue-soft: var(--fs-pomegranate-soft); }
.fs-theme .fs-hue-olive       { --hue: var(--fs-olive);       --hue-ink: var(--fs-olive-ink);       --hue-soft: var(--fs-olive-soft); }
.fs-theme .fs-hue-ink         { --hue: var(--fs-slate);       --hue-ink: var(--fs-slate-ink);       --hue-soft: var(--fs-slate-soft); }

/* لون ثابت لكل وحدة في الرئيسية والمكتبة: نفس الوحدة = نفس اللون أينما ظهرت */
.fs-theme [data-home-module="latest"],
.fs-theme [data-home-module="search"],
.fs-theme [data-home-module="member_box"],
.fs-theme .browse-search-module,
.fs-theme .browse-results       { --hue: var(--fs-indigo); --hue-ink: var(--fs-indigo-ink); --hue-soft: var(--fs-indigo-soft); }
.fs-theme [data-home-module="new_torrents"],
.fs-theme [data-home-module="recent"],
.fs-theme [data-home-module="categories"],
.fs-theme .browse-category-module { --hue: var(--fs-teal); --hue-ink: var(--fs-teal-ink); --hue-soft: var(--fs-teal-soft); }
.fs-theme [data-home-module="news"],
.fs-theme [data-home-module="uploaders"] { --hue: var(--fs-saffron); --hue-ink: var(--fs-saffron-ink); --hue-soft: var(--fs-saffron-soft); }
.fs-theme [data-home-module="statistics"],
.fs-theme [data-home-module="last30"],
.fs-theme [data-home-module="community_links"] { --hue: var(--fs-violet); --hue-ink: var(--fs-violet-ink); --hue-soft: var(--fs-violet-soft); }
.fs-theme [data-home-module="chat"] { --hue: var(--fs-pomegranate); --hue-ink: var(--fs-pomegranate-ink); --hue-soft: var(--fs-pomegranate-soft); }
.fs-theme [data-home-module="presence"],
.fs-theme [data-home-module="tracker"] { --hue: var(--fs-olive); --hue-ink: var(--fs-olive-ink); --hue-soft: var(--fs-olive-soft); }

/* --------------------------------------------------------------------------
   أساسيات
   -------------------------------------------------------------------------- */
.fs-theme a { color: var(--fs-indigo-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--fs-fast) var(--fs-ease); }
.fs-theme a:hover { color: var(--fs-violet-ink); }
.fs-theme h1, .fs-theme h2, .fs-theme h3, .fs-theme h4 { color: var(--fs-ink); line-height: 1.35; letter-spacing: 0; }
.fs-theme h1 { font-weight: 800; }
.fs-theme ::selection { background: var(--fs-saffron-soft); color: var(--fs-ink); }
.fs-theme bdi, .fs-theme .numeric, .fs-theme time { font-variant-numeric: tabular-nums; }
.fs-theme img { max-width: 100%; }
.fs-theme :focus-visible { outline: 2px solid var(--fs-indigo); outline-offset: 2px; border-radius: var(--fs-r-sm); }
.fs-theme .muted, .fs-theme .subtext, .fs-theme .small-copy { color: var(--fs-muted); }
.fs-theme .section-note { color: var(--fs-ink-2); }
.fs-theme .positive { color: var(--fs-olive-ink) !important; }

.fs-theme .fs-header, .fs-theme .fs-header *,
.fs-theme .community-navigation, .fs-theme .community-navigation *,
.fs-theme .fs-tabbar, .fs-theme .fs-tabbar *,
.fs-theme .footer, .fs-theme .fs-to-top { box-sizing: border-box; }

.fs-theme .skip:not(:focus):not(:focus-visible) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.fs-theme .skip {
  position: fixed; inset-inline-start: 12px; top: 12px; z-index: 200;
  padding: .55rem 1rem; border-radius: var(--fs-r);
  background: var(--fs-ink); color: #fff; font-weight: 700;
}

/* --------------------------------------------------------------------------
   الخاتم: حاوية الأيقونة. الشكل على ::before حتى لا تُقصّ حلقة التركيز.
   -------------------------------------------------------------------------- */
.fs-theme .fs-tile {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  color: var(--hue-ink);
  isolation: isolate;
}
.fs-theme .fs-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hue-soft);
  clip-path: var(--fs-star);
  transition: transform 420ms var(--fs-spring), background-color var(--fs-mid) var(--fs-ease);
}
.fs-theme .fs-ico { width: 20px; height: 20px; display: block; }
.fs-theme .fs-ico .fs-fill { fill: currentColor; opacity: .2; stroke: none; }
.fs-theme .fs-ico .fs-fill-solid { fill: currentColor; stroke: none; }

/* الحركة المميّزة: النجمة تدور ثُمن دورة عند المرور، وتمتلئ بلون القسم عند التحديد */
.fs-theme a:hover > .fs-tile::before,
.fs-theme summary:hover > .fs-tile::before,
.fs-theme button:hover > .fs-tile::before { transform: rotate(22.5deg) scale(1.06); }
.fs-theme .active > .fs-tile,
.fs-theme [aria-current="page"] > .fs-tile,
.fs-theme .is-current > .fs-tile,
.fs-theme .member-menu[open] > summary > .fs-tile { color: #fff; }
.fs-theme .active > .fs-tile::before,
.fs-theme [aria-current="page"] > .fs-tile::before,
.fs-theme .is-current > .fs-tile::before,
.fs-theme .member-menu[open] > summary > .fs-tile::before { background: var(--hue); transform: rotate(22.5deg); }
.fs-theme .active > .fs-tile .fs-fill,
.fs-theme [aria-current="page"] > .fs-tile .fs-fill,
.fs-theme .is-current > .fs-tile .fs-fill { opacity: .32; }

/* --------------------------------------------------------------------------
   الرأس: شعار + بحث + شريط العضو
   -------------------------------------------------------------------------- */
.fs-theme .heritage-shell { background: transparent; }

.fs-theme .fs-header {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-block: 14px 10px;
  padding: 14px 18px 18px;
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r-xl);
  box-shadow: var(--fs-shadow-2);
  overflow: hidden;
}
/* خلفية الهيدر بخصوصية صفرية: خلفية «الموقع والهيدر» من اللوحة تتغلب عليها */
:where(.fs-theme .fs-header) {
  background-color: var(--fs-surface);
}
.fs-theme .fs-header::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 4px;
  background: var(--fs-stripe);
}

/* شبكة نقاط خفيفة تتلاشى نحو منتصف الرأس + نجمة كبيرة باهتة في الطرف */
.fs-theme .fs-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(75, 85, 209, .16) 1.2px, transparent 1.6px);
  background-size: 16px 16px;
  -webkit-mask-image: linear-gradient(270deg, #000, transparent 45%);
  mask-image: linear-gradient(270deg, #000, transparent 45%);
}
.fs-theme .fs-header > * { position: relative; z-index: 1; }
.fs-theme .fs-masthead::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 150px;
  height: 150px;
  inset-inline-start: -46px;
  top: -52px;
  background: linear-gradient(135deg, var(--fs-saffron-soft), var(--fs-indigo-soft));
  clip-path: var(--fs-star);
  opacity: .9;
  pointer-events: none;
}
.fs-theme .fs-masthead { position: relative; min-width: 0; }
.fs-theme .site-masthead { position: relative; border: 0; padding: 0; margin: 0; min-width: 0; }
.fs-theme .site-logo { display: inline-flex; align-items: center; border-radius: var(--fs-r); }
.fs-theme .site-logo img {
  display: block;
  width: auto;
  height: 64px;
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--fs-r);
}

/* البحث السريع (يرسل إلى /browse?q= كما في صفحة المكتبة) */
.fs-theme .fs-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 48px;
  padding-inline: 14px 6px;
  background: var(--fs-surface-2);
  border: 1px solid var(--fs-line-strong);
  border-radius: 999px;
  transition: border-color var(--fs-fast) var(--fs-ease), box-shadow var(--fs-fast) var(--fs-ease), background-color var(--fs-fast);
}
.fs-theme .fs-search:focus-within {
  background: var(--fs-surface);
  border-color: var(--fs-indigo);
  box-shadow: 0 0 0 4px rgba(75, 85, 209, .14);
}
.fs-theme .fs-search-icon { display: grid; place-items: center; color: var(--fs-indigo-ink); flex: none; }
.fs-theme .fs-search-icon .fs-ico { width: 20px; height: 20px; }
.fs-theme .fs-search input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--fs-ink);
  font: inherit;
  font-size: 16px;
  outline: none;
}
.fs-theme .fs-search input[type="search"]:focus { box-shadow: none; border: 0; }
.fs-theme .fs-search input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
.fs-theme .fs-search-submit {
  flex: none;
  height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--fs-indigo);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: background-color var(--fs-fast) var(--fs-ease), transform var(--fs-fast) var(--fs-ease);
}
.fs-theme .fs-search-submit:hover { background: var(--fs-indigo-ink); }
.fs-theme .fs-search-submit:active { transform: scale(.96); }

/* --------------------------------------------------------------------------
   شريط العضو: رقائق ملوّنة لكل رقم
   -------------------------------------------------------------------------- */
.fs-theme .fs-header .member-summary { min-width: 0; margin: 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
.fs-theme .fs-header .member-summary-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.fs-theme .fs-header .member-summary-top::-webkit-scrollbar { display: none; }
.fs-theme .fs-header .member-summary-identity { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 0 1 auto; }
.fs-theme .fs-header .member-summary-avatar { position: relative; display: block; flex: none; border-radius: 50%; }
.fs-theme .fs-header .member-summary-avatar img {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--fs-surface);
  box-shadow: 0 0 0 2px var(--fs-indigo);
}
.fs-theme .fs-header .member-summary-person { min-width: 0; display: flex; align-items: center; gap: 6px; }
.fs-theme .fs-header .member-summary-welcome { margin: 0; color: var(--fs-ink-2); font-size: .88rem; white-space: nowrap; }
.fs-theme .fs-header .member-summary-welcome .member-name { font-weight: 800; }
.fs-theme .fs-header .member-summary-meta { display: inline-flex; }
.fs-theme .fs-header .member-summary-ip {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--fs-olive-ink);
  background: var(--fs-olive-soft);
  cursor: help;
}
.fs-theme .fs-member-icon { display: inline-grid; place-items: center; width: auto; height: auto; background: none !important; }
.fs-theme .fs-member-icon .fs-ico { width: 18px; height: 18px; }
.fs-theme .fs-header .member-summary-ip .fs-ico { width: 16px; height: 16px; }

.fs-theme .fs-header .member-summary-stats { display: flex; gap: 6px; margin: 0; flex: none; }
.fs-theme .fs-header .member-summary-stats > div {
  --hue: var(--fs-indigo); --hue-ink: var(--fs-indigo-ink); --hue-soft: var(--fs-indigo-soft);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  min-width: 96px;
  padding: 5px 10px 5px 12px;
  border-radius: var(--fs-r);
  background: var(--hue-soft);
  border: 1px solid transparent;
  transition: border-color var(--fs-fast) var(--fs-ease), transform var(--fs-fast) var(--fs-ease);
}
.fs-theme .fs-header .member-summary-stats > div:nth-child(2) { --hue: var(--fs-saffron); --hue-ink: var(--fs-saffron-ink); --hue-soft: var(--fs-saffron-soft); }
.fs-theme .fs-header .member-summary-stats > div:nth-child(3) { --hue: var(--fs-teal); --hue-ink: var(--fs-teal-ink); --hue-soft: var(--fs-teal-soft); }
.fs-theme .fs-header .member-summary-stats > div:nth-child(4) { --hue: var(--fs-pomegranate); --hue-ink: var(--fs-pomegranate-ink); --hue-soft: var(--fs-pomegranate-soft); }
.fs-theme .fs-header .member-summary-stats > div:hover { border-color: var(--hue); }
.fs-theme .fs-header .member-summary-stats dt { display: contents; color: var(--hue-ink); }
.fs-theme .fs-header .member-summary-stats dt .fs-member-icon { grid-row: 1 / span 2; color: var(--hue-ink); }
.fs-theme .fs-header .member-summary-stats dt .fs-member-icon .fs-ico { width: 22px; height: 22px; }
.fs-theme .fs-header .member-summary-stats dt > span:last-child { font-size: .72rem; font-weight: 700; color: var(--hue-ink); line-height: 1.3; white-space: nowrap; }
.fs-theme .fs-header .member-summary-stats dd { margin: 0; line-height: 1.3; }
.fs-theme .fs-header .member-summary-stats dd a {
  color: var(--fs-ink);
  font-family: var(--fs-font-num);
  font-weight: 700;
  font-size: .86rem;
  text-decoration: none;
  white-space: nowrap;
}
.fs-theme .fs-header .member-summary-stats dd a:hover { color: var(--hue-ink); }

.fs-theme .fs-header .member-summary-links { display: flex; align-items: center; gap: 6px; flex: none; margin-inline-start: auto; }
.fs-theme .fs-header .member-summary-links form { margin: 0; }
.fs-theme .fs-header .member-summary-links a,
.fs-theme .fs-header .member-summary-links button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--fs-r);
  border: 1px solid var(--fs-line);
  background: var(--fs-surface);
  color: var(--fs-ink-2);
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--fs-fast) var(--fs-ease), border-color var(--fs-fast) var(--fs-ease), color var(--fs-fast);
}
.fs-theme .fs-header .member-summary-links a:hover { background: var(--fs-pomegranate-soft); border-color: transparent; color: var(--fs-pomegranate-ink); }
.fs-theme .fs-header .member-summary-links button:hover { background: var(--fs-slate-soft); border-color: transparent; color: var(--fs-ink); }
.fs-theme .fs-header .member-summary-mail.has-unread { color: var(--fs-pomegranate-ink); border-color: rgba(214, 60, 90, .35); }
.fs-theme .fs-header .member-unread-count {
  position: absolute;
  top: -7px;
  inset-inline-end: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  border: 2px solid var(--fs-surface);
  background: var(--fs-pomegranate);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   التنقل الرئيسي: خواتم ملوّنة + نص
   -------------------------------------------------------------------------- */
.fs-theme .community-navigation {
  position: sticky;
  top: 8px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-block-end: 18px;
  padding: 6px;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r-lg);
  box-shadow: var(--fs-shadow-1);
}
.fs-theme.fs-scrolled .community-navigation { background: rgba(255, 255, 255, .95); box-shadow: var(--fs-shadow-2); border-color: var(--fs-line-strong); }
.fs-theme .community-navigation { transition: box-shadow var(--fs-mid) var(--fs-ease), background-color var(--fs-mid), border-color var(--fs-mid); }
.fs-theme .primary-navigation { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; flex: 1 1 auto; min-width: 0; }
.fs-theme .fs-library-slot { display: contents; }
.fs-theme .community-navigation .nav-link,
.fs-theme .member-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 12px 0 14px;
  border-radius: var(--fs-r);
  color: var(--fs-ink-2);
  font-weight: 700;
  font-size: .92rem;
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background-color var(--fs-fast) var(--fs-ease), color var(--fs-fast) var(--fs-ease);
}
.fs-theme .community-navigation .nav-link .fs-tile,
.fs-theme .member-menu > summary .fs-tile { margin-inline-start: -6px; }
.fs-theme .community-navigation .nav-link:hover,
.fs-theme .member-menu > summary:hover { background: var(--fs-surface-2); color: var(--fs-ink); }
.fs-theme .community-navigation .nav-link.active,
.fs-theme .community-navigation .nav-link[aria-current="page"] { color: var(--hue-ink); background: var(--hue-soft); }
.fs-theme .community-navigation .tag,
.fs-theme .member-menu-panel .tag {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--hue);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.fs-theme .member-menu-panel .tag { background: var(--fs-saffron); color: var(--fs-ink); }

/* أقسام المكتبة المنبثقة */
.fs-theme .library-navigation { display: inline-flex; align-items: center; gap: 0; --hue: var(--fs-teal); --hue-ink: var(--fs-teal-ink); --hue-soft: var(--fs-teal-soft); }
.fs-theme .library-disclosure {
  min-width: 30px;
  min-height: 46px;
  border-radius: var(--fs-r);
  border: 0;
  background: transparent;
  color: var(--fs-teal-ink);
  font-size: 1rem;
  cursor: pointer;
}
.fs-theme .library-disclosure:hover,
.fs-theme .library-disclosure[aria-expanded="true"] { background: var(--fs-teal-soft); }
/* القائمة المنسدلة للأقسام وفق الدليل (§١٨): عمود واحد بعرض library-navigation.css،
   حد 1px وزوايا 6px وظل خفيف، وخلفية ::backdrop شفافة — هنا الألوان فقط */
.fs-theme .library-categories {
  background: var(--fs-surface);
  color: var(--fs-ink);
  border: 1px solid var(--fs-line);
  border-radius: 6px;
  box-shadow: 0 10px 28px -14px rgba(23, 26, 51, .28);
}
.fs-theme .library-categories::backdrop { background: transparent; }
.fs-theme .library-categories a { color: var(--fs-ink-2); text-decoration: none; border-radius: var(--fs-r-sm); }
.fs-theme .library-categories a:hover { color: var(--fs-teal-ink); background: var(--fs-teal-soft); }
.fs-theme .library-category-heading { color: var(--fs-teal-ink) !important; font-weight: 800; }
.fs-theme .library-all {
  display: inline-flex;
  margin-block-end: 10px;
  padding: 6px 14px;
  border-radius: 999px !important;
  background: var(--fs-teal);
  color: #fff !important;
  font-weight: 700;
}
.fs-theme .library-all:hover { background: var(--fs-teal-ink) !important; }

/* قائمة «حسابي» */
.fs-theme .member-menu { position: relative; flex: none; --hue: var(--fs-slate); --hue-ink: var(--fs-slate-ink); --hue-soft: var(--fs-slate-soft); }
.fs-theme .member-menu > summary { list-style: none; }
.fs-theme .member-menu > summary::-webkit-details-marker { display: none; }
.fs-theme .member-menu > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-inline-start: 2px;
  border-inline-end: 2px solid currentColor;
  border-block-end: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--fs-mid) var(--fs-ease);
}
.fs-theme .member-menu[open] > summary { background: var(--fs-slate-soft); color: var(--fs-ink); }
.fs-theme .member-menu[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.fs-theme .member-menu-panel {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 10px);
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: min(480px, calc(100vw - 32px));
  max-height: min(72vh, 580px);
  overflow: auto;
  padding: 10px;
  background: var(--fs-surface);
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r-lg);
  box-shadow: var(--fs-shadow-3);
  transform-origin: top left;
  animation: fs-pop var(--fs-mid) var(--fs-ease);
}
.fs-theme .member-menu-panel::before {
  content: "";
  grid-column: 1 / -1;
  height: 4px;
  margin: -10px -10px 8px;
  background: var(--fs-stripe);
}
.fs-theme .member-menu-panel a,
.fs-theme .member-menu-panel button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--fs-r-sm);
  background: transparent;
  color: var(--fs-ink-2);
  font: inherit;
  font-size: .9rem;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}
.fs-theme .member-menu-panel a:hover { background: var(--fs-indigo-soft); color: var(--fs-indigo-ink); }
.fs-theme .member-menu-panel form {
  grid-column: 1 / -1;
  margin-block-start: 6px;
  padding-block-start: 6px;
  border-block-start: 1px solid var(--fs-line);
}
.fs-theme .member-menu-panel form button { color: var(--fs-pomegranate-ink); font-weight: 700; }
.fs-theme .member-menu-panel form button:hover { background: var(--fs-pomegranate-soft); }

@keyframes fs-pop {
  from { opacity: 0; transform: translateY(-6px) scale(.97); }
  to { opacity: 1; transform: none; }
}
@keyframes fs-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   عنوان الصفحة والمحتوى والتذييل
   -------------------------------------------------------------------------- */
.fs-theme .main-wrap { min-width: 0; }
.fs-theme .topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block-end: 14px;
  padding: 0 4px;
  background: none;
  border: 0;
  color: var(--fs-ink);
  font-size: 1.35rem;
  font-weight: 800;
}
.fs-theme .topbar > span:first-child { position: relative; min-width: 0; padding-inline-start: 26px; overflow-wrap: anywhere; }
.fs-theme .topbar > span:first-child::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background: var(--fs-saffron);
  clip-path: var(--fs-star);
}
.fs-theme .preview-badge {
  flex: none;
  margin-inline-start: auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--fs-violet-soft);
  color: var(--fs-violet-ink);
  font-size: .72rem;
  font-weight: 700;
}
.fs-theme .content { min-width: 0; background: transparent; }
.fs-theme .content > * { animation: fs-rise 360ms var(--fs-ease) both; }

.fs-theme .footer {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  margin-block: 32px 18px;
  padding: 20px 20px 16px;
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r-xl);
  background: var(--fs-surface);
  color: var(--fs-muted);
  font-size: .85rem;
  overflow: hidden;
}
.fs-theme .footer::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px; background: var(--fs-stripe); }
.fs-theme .fs-footer-brand { color: var(--fs-ink); font-weight: 700; }
.fs-theme .fs-footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.fs-theme .fs-footer-links a { color: var(--fs-ink-2); text-decoration: none; font-weight: 600; }
.fs-theme .fs-footer-links a:hover { color: var(--fs-indigo-ink); text-decoration: underline; }

.fs-theme .fs-to-top {
  position: fixed;
  inset-inline-start: 18px;
  bottom: 18px;
  z-index: 50;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  background: var(--fs-ink);
  color: #fff;
  clip-path: var(--fs-star);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px) rotate(-22.5deg);
  pointer-events: none;
  transition: opacity var(--fs-mid) var(--fs-ease), transform 420ms var(--fs-spring), background-color var(--fs-fast);
}
.fs-theme .fs-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.fs-theme .fs-to-top:hover { background: var(--fs-indigo); }
.fs-theme .fs-to-top .fs-ico { width: 20px; height: 20px; }
.fs-theme .fs-to-top:focus-visible { outline: none; background: var(--fs-indigo); box-shadow: inset 0 0 0 3px #fff; }

/* شريط التبويب السفلي — للجوال فقط */
.fs-theme .fs-tabbar { display: none; }

/* --------------------------------------------------------------------------
   التنبيهات والحالات
   -------------------------------------------------------------------------- */
.fs-theme .notice,
.fs-theme .site-announcement,
.fs-theme .admin-note,
.fs-theme .topic-warning,
.fs-theme .error-message {
  --hue: var(--fs-indigo); --hue-ink: var(--fs-indigo-ink); --hue-soft: var(--fs-indigo-soft);
  position: relative;
  padding: 12px 16px 12px 16px;
  padding-inline-start: 44px;
  border: 1px solid transparent;
  border-radius: var(--fs-r);
  background: var(--hue-soft);
  color: var(--fs-ink);
}
.fs-theme .notice::before,
.fs-theme .site-announcement::before,
.fs-theme .admin-note::before,
.fs-theme .topic-warning::before,
.fs-theme .error-message::before {
  content: "";
  position: absolute;
  inset-inline-start: 16px;
  top: 15px;
  width: 16px;
  height: 16px;
  background: var(--hue);
  clip-path: var(--fs-star);
}
.fs-theme .site-announcement { --hue: var(--fs-saffron); --hue-ink: var(--fs-saffron-ink); --hue-soft: var(--fs-saffron-soft); }
.fs-theme .topic-warning { --hue: var(--fs-saffron); --hue-ink: var(--fs-saffron-ink); --hue-soft: var(--fs-saffron-soft); }
.fs-theme .error-message { --hue: var(--fs-pomegranate); --hue-ink: var(--fs-pomegranate-ink); --hue-soft: var(--fs-pomegranate-soft); color: var(--fs-pomegranate-ink); font-weight: 600; }
.fs-theme .empty-state {
  padding: 28px 20px;
  border: 1.5px dashed var(--fs-line-strong);
  border-radius: var(--fs-r-lg);
  background: var(--fs-surface-2);
  color: var(--fs-ink-2);
  text-align: center;
}
.fs-theme .empty-state h3 { color: var(--fs-ink); }
.fs-theme .tag { border-radius: 999px; background: var(--fs-sunken); color: var(--fs-ink); }

/* --------------------------------------------------------------------------
   الأزرار
   -------------------------------------------------------------------------- */
.fs-theme .button,
.fs-theme button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--fs-line-strong);
  border-radius: var(--fs-r);
  background: var(--fs-surface);
  color: var(--fs-ink);
  font: inherit;
  font-weight: 700;
  font-size: .92rem;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--fs-fast) var(--fs-ease), border-color var(--fs-fast) var(--fs-ease), color var(--fs-fast), transform var(--fs-fast) var(--fs-ease), box-shadow var(--fs-fast) var(--fs-ease);
}
.fs-theme .button:hover { border-color: var(--fs-indigo); color: var(--fs-indigo-ink); }
.fs-theme .button:active { transform: scale(.97); }
.fs-theme .button.primary,
.fs-theme button.primary {
  border-color: transparent;
  background: var(--fs-indigo);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(75, 85, 209, .8);
}
.fs-theme .button.primary:hover,
.fs-theme button.primary:hover { background: var(--fs-indigo-ink); color: #fff; }
.fs-theme .button.secondary { background: var(--fs-surface); }
.fs-theme .button.compact { min-height: 34px; padding: 0 12px; font-size: .84rem; }
.fs-theme .button.danger, .fs-theme button.danger { border-color: rgba(214, 60, 90, .4); color: var(--fs-pomegranate-ink); }
.fs-theme .button.danger:hover, .fs-theme button.danger:hover { background: var(--fs-pomegranate-soft); }
.fs-theme .button[disabled], .fs-theme button[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.fs-theme .text-link, .fs-theme .home-text-link { color: var(--hue-ink); font-weight: 700; text-decoration: none; }
.fs-theme .text-link:hover, .fs-theme .home-text-link:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   النماذج — المحرر (Quill) خارج النطاق
   -------------------------------------------------------------------------- */
.fs-theme input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="search"]),
.fs-theme .content input[type="search"],
.fs-theme select,
.fs-theme textarea:not(.ql-editor) {
  min-height: 42px;
  padding-inline: 12px;
  border: 1px solid var(--fs-line-strong);
  border-radius: var(--fs-r);
  background-color: var(--fs-surface);
  color: var(--fs-ink);
  font: inherit;
  font-size: max(16px, .95rem);
  transition: border-color var(--fs-fast) var(--fs-ease), box-shadow var(--fs-fast) var(--fs-ease);
}
.fs-theme textarea:not(.ql-editor) { padding-block: 10px; line-height: 1.65; }
.fs-theme input::placeholder, .fs-theme textarea::placeholder { color: #8a8ea9; }
.fs-theme .content input:not([type="checkbox"]):not([type="radio"]):focus,
.fs-theme select:focus,
.fs-theme textarea:not(.ql-editor):focus,
.fs-theme .guest-shell input:focus {
  border-color: var(--fs-indigo);
  box-shadow: 0 0 0 4px rgba(75, 85, 209, .14);
  outline: none;
}
.fs-theme input[type="checkbox"], .fs-theme input[type="radio"] { accent-color: var(--fs-indigo); width: 18px; height: 18px; }
.fs-theme input[type="file"] { color: var(--fs-ink-2); }
.fs-theme input[type="file"]::file-selector-button {
  margin-inline-end: 10px;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--fs-r-sm);
  background: var(--fs-indigo-soft);
  color: var(--fs-indigo-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.fs-theme label { color: var(--fs-ink-2); }
.fs-theme fieldset { border: 1px solid var(--fs-line); border-radius: var(--fs-r); background: var(--fs-surface-2); }
.fs-theme legend { padding-inline: 6px; color: var(--fs-ink); font-weight: 800; }

/* --------------------------------------------------------------------------
   الأسطح: البطاقات البيضاء مع حافة علوية بلون الوحدة
   -------------------------------------------------------------------------- */
.fs-theme .browse-module,
.fs-theme .home-module > section,
.fs-theme .topic-section,
.fs-theme .topic-side-section,
.fs-theme .panel,
.fs-theme .admin-section,
.fs-theme .console-form,
.fs-theme .request-section,
.fs-theme .upload-section,
.fs-theme .reading-block,
.fs-theme .information-article,
.fs-theme .technical-panel,
.fs-theme .content-box {
  background: var(--fs-surface);
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r-lg);
  box-shadow: var(--fs-shadow-1), inset 0 3px 0 var(--hue);
  color: var(--fs-ink);
}

.fs-theme .browse-module-heading,
.fs-theme .home-section-heading,
.fs-theme .section-heading,
.fs-theme .console-heading,
.fs-theme .page-heading { border-color: var(--fs-line); color: var(--fs-ink); }
.fs-theme .browse-module-heading h2,
.fs-theme .home-section-heading h2,
.fs-theme .section-heading h2 {
  position: relative;
  padding-inline-start: 24px;
  font-size: 1.05rem;
  font-weight: 800;
}
.fs-theme .browse-module-heading h2::before,
.fs-theme .home-section-heading h2::before,
.fs-theme .section-heading h2::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  background: var(--hue);
  clip-path: var(--fs-star);
}
.fs-theme .home-section-heading p,
.fs-theme .browse-module-heading > span { color: var(--fs-muted); font-size: .85rem; }
.fs-theme .browse-module-heading > a { color: var(--hue-ink); font-weight: 700; }
.fs-theme .page-heading h1 { font-size: 1.5rem; }
.fs-theme .eyebrow { color: var(--hue-ink); font-weight: 800; font-size: .8rem; }

/* --------------------------------------------------------------------------
   الجداول
   -------------------------------------------------------------------------- */
.fs-theme .table-wrap,
.fs-theme .home-new-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r);
  background: var(--fs-surface);
  scrollbar-width: thin;
}
.fs-theme table { border-collapse: collapse; color: var(--fs-ink); }
.fs-theme .table-wrap table,
.fs-theme .home-new-table,
.fs-theme .file-table,
.fs-theme .activity-table { width: 100%; background: transparent; }
.fs-theme .table-wrap th,
.fs-theme .home-new-table th,
.fs-theme .file-table th,
.fs-theme .activity-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 12px;
  background: var(--fs-surface-2);
  border-block-end: 1px solid var(--fs-line);
  color: var(--fs-muted);
  font-size: .78rem;
  font-weight: 800;
  text-align: start;
  white-space: nowrap;
}
.fs-theme .table-wrap td,
.fs-theme .home-new-table td,
.fs-theme .file-table td,
.fs-theme .activity-table td {
  padding: 10px 12px;
  border-block-end: 1px solid var(--fs-line);
  vertical-align: middle;
  background: transparent;
}
.fs-theme .table-wrap tbody tr,
.fs-theme .home-new-table tbody tr { transition: background-color var(--fs-fast) var(--fs-ease); }
.fs-theme .table-wrap tbody tr:hover,
.fs-theme .home-new-table tbody tr:hover { background: #f5f6fd; }
.fs-theme .table-wrap tbody tr:last-child td,
.fs-theme .home-new-table tbody tr:last-child td { border-block-end: 0; }
.fs-theme td.numeric,
.fs-theme .home-new-number,
.fs-theme .size-value {
  font-family: var(--fs-font-num);
  font-size: .84rem;
  color: var(--fs-ink-2);
  white-space: nowrap;
}

/* المثبّت: تظليل زعفراني + حد جانبي؛ علامة «مثبّت» الأصلية باقية */
.fs-theme tr.is-sticky { background: var(--fs-saffron-soft) !important; }
.fs-theme tr.is-sticky > td:first-child { box-shadow: inset -4px 0 0 var(--fs-saffron); }
.fs-theme tr.is-sticky:hover { background: #fbe8c6 !important; }

.fs-theme .release-name,
.fs-theme .home-new-name { color: var(--fs-ink); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.fs-theme .release-name:hover,
.fs-theme .home-new-name:hover { color: var(--fs-indigo-ink); }
.fs-theme .release-meta { gap: 8px; color: var(--fs-muted); font-size: .8rem; }
.fs-theme .release-meta time { font-family: var(--fs-font-num); font-size: .76rem; }
.fs-theme .browse-cover-toggle {
  min-height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--fs-teal-soft);
  color: var(--fs-teal-ink);
  font: inherit;
  font-size: .74rem;
  font-weight: 700;
  cursor: pointer;
}
.fs-theme .browse-cover-toggle:hover,
.fs-theme .browse-cover-toggle[aria-expanded="true"] { background: var(--fs-teal); color: #fff; }
.fs-theme .browse-type a { color: var(--fs-ink-2); text-decoration: none; font-weight: 600; }
.fs-theme .browse-type img, .fs-theme .home-new-category img { border-radius: var(--fs-r-sm); }
.fs-theme .browse-download,
.fs-theme .home-new-download {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  min-height: 36px;
  border-radius: var(--fs-r-sm);
  background: var(--fs-indigo-soft);
  color: var(--fs-indigo-ink);
  text-decoration: none;
  transition: background-color var(--fs-fast) var(--fs-ease), transform var(--fs-fast) var(--fs-ease);
}
.fs-theme .browse-download:hover,
.fs-theme .home-new-download:hover { background: var(--fs-indigo); transform: translateY(-1px); }

/* علامات الإصدار من اسم التورنت — كل عائلة بلون */
.fs-theme .fs-release-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.fs-theme .fs-release-tag {
  --hue-soft: var(--fs-slate-soft); --hue-ink: var(--fs-slate-ink);
  display: inline-block;
  padding: 0 7px;
  border-radius: 6px;
  background: var(--hue-soft);
  color: var(--hue-ink);
  font-family: var(--fs-font-num);
  font-size: .68rem;
  font-weight: 800;
  line-height: 20px;
  direction: ltr;
}
.fs-theme .fs-release-tag[data-tag="4K"], .fs-theme .fs-release-tag[data-tag="2160P"] { --hue-soft: var(--fs-saffron-soft); --hue-ink: var(--fs-saffron-ink); }
.fs-theme .fs-release-tag[data-tag="1080P"], .fs-theme .fs-release-tag[data-tag="720P"] { --hue-soft: var(--fs-indigo-soft); --hue-ink: var(--fs-indigo-ink); }
.fs-theme .fs-release-tag[data-tag="REMUX"], .fs-theme .fs-release-tag[data-tag="BLURAY"] { --hue-soft: var(--fs-violet-soft); --hue-ink: var(--fs-violet-ink); }
.fs-theme .fs-release-tag[data-tag="HDR"] { --hue-soft: var(--fs-pomegranate-soft); --hue-ink: var(--fs-pomegranate-ink); }
.fs-theme .fs-release-tag[data-tag="WEB-DL"] { --hue-soft: var(--fs-teal-soft); --hue-ink: var(--fs-teal-ink); }
.fs-theme .fs-release-tag[data-tag="HEVC"], .fs-theme .fs-release-tag[data-tag="X265"], .fs-theme .fs-release-tag[data-tag="FLAC"] { --hue-soft: var(--fs-olive-soft); --hue-ink: var(--fs-olive-ink); }

/* أقسام المكتبة */
.fs-theme .browse-category {
  background: var(--fs-surface);
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r);
  transition: border-color var(--fs-fast) var(--fs-ease), transform var(--fs-fast) var(--fs-ease), box-shadow var(--fs-fast) var(--fs-ease);
}
.fs-theme .browse-category:hover { border-color: var(--fs-teal); box-shadow: var(--fs-shadow-2); transform: translateY(-2px); }
.fs-theme .browse-category:has(.is-selected) { border-color: var(--fs-teal); background: var(--fs-teal-soft); }
.fs-theme .browse-category-main { color: var(--fs-ink); text-decoration: none; }
.fs-theme .browse-category-main.is-selected { color: var(--fs-teal-ink); }
.fs-theme .browse-category-children a { color: var(--fs-ink-2); text-decoration: none; }
.fs-theme .browse-category-children a:hover,
.fs-theme .browse-category-children a[aria-current="page"] { color: var(--fs-teal-ink); }
.fs-theme .browse-summary {
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r);
  background: var(--fs-surface);
  color: var(--fs-ink-2);
}
.fs-theme .browse-summary > summary { cursor: pointer; color: var(--fs-ink); font-weight: 700; }
.fs-theme .browse-summary dd { font-family: var(--fs-font-num); color: var(--fs-ink); }

/* بطاقات «آخر الإضافات» */
.fs-theme .release-card {
  background: var(--fs-surface);
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r-lg);
  overflow: hidden;
  transition: transform var(--fs-mid) var(--fs-ease), box-shadow var(--fs-mid) var(--fs-ease), border-color var(--fs-mid);
}
.fs-theme .release-card:hover { transform: translateY(-4px); box-shadow: var(--fs-shadow-2); border-color: var(--fs-line-strong); }
.fs-theme .release-card-link { color: var(--fs-ink); text-decoration: none; }
.fs-theme .release-cover { background: var(--fs-sunken); }
.fs-theme .release-cover img { transition: transform 500ms var(--fs-ease); }
.fs-theme .release-card:hover .release-cover img { transform: scale(1.04); }
.fs-theme .release-cover-fallback {
  background:
    radial-gradient(circle at 30% 20%, var(--fs-indigo-soft), transparent 55%),
    radial-gradient(circle at 75% 80%, var(--fs-saffron-soft), transparent 55%),
    var(--fs-surface-2);
  color: var(--fs-ink-2);
}
.fs-theme .release-cover-action { background: rgba(23, 26, 51, .82); color: #fff; }
.fs-theme .release-card h3 { color: var(--fs-ink); font-size: .92rem; font-weight: 700; overflow-wrap: anywhere; }
.fs-theme .release-card-category { color: var(--fs-muted); font-size: .78rem; }
.fs-theme .release-card-meta { color: var(--fs-ink-2); font-family: var(--fs-font-num); font-size: .8rem; }
.fs-theme .release-free {
  border-radius: 999px;
  background: var(--fs-olive-soft);
  color: var(--fs-olive-ink);
  font-size: .72rem;
  font-weight: 800;
}

/* شرائط الأغلفة */
.fs-theme .home-recent-item,
.fs-theme .home-recent-cover { border-radius: var(--fs-r-sm); }
.fs-theme .home-recent-controls button,
.fs-theme .content-box-cover-controls button,
.fs-theme .home-recent-play {
  min-width: 36px;
  min-height: 36px;
  border: 1px solid var(--fs-line);
  border-radius: 50%;
  background: var(--fs-surface);
  color: var(--fs-ink);
  cursor: pointer;
}
.fs-theme .home-recent-controls button:hover,
.fs-theme .content-box-cover-controls button:hover { background: var(--hue-soft); color: var(--hue-ink); }

/* --------------------------------------------------------------------------
   الموضوع والتعليقات والرسائل
   -------------------------------------------------------------------------- */
.fs-theme .topic-breadcrumb { color: var(--fs-muted); font-size: .85rem; }
.fs-theme .topic-breadcrumb a { color: var(--fs-ink-2); text-decoration: none; }
.fs-theme .topic-breadcrumb a:hover { color: var(--fs-indigo-ink); }
.fs-theme .topic-heading h1 { font-size: 1.55rem; overflow-wrap: anywhere; }
.fs-theme .topic-byline { color: var(--fs-muted); }
.fs-theme .topic-poster img { border-radius: var(--fs-r); box-shadow: var(--fs-shadow-2); }
.fs-theme .topic-facts > div,
.fs-theme .technical-grid > div,
.fs-theme .work-facts > div { background: var(--fs-surface-2); border: 1px solid var(--fs-line); border-radius: var(--fs-r-sm); }
.fs-theme .topic-facts dt, .fs-theme .technical-grid dt, .fs-theme .work-facts dt { color: var(--fs-muted); font-size: .78rem; }
.fs-theme .topic-facts dd, .fs-theme .technical-grid dd, .fs-theme .work-facts dd { color: var(--fs-ink); font-family: var(--fs-font-num); }
.fs-theme .topic-body { color: var(--fs-ink); line-height: 1.9; overflow-wrap: anywhere; }
.fs-theme .topic-download-section { --hue: var(--fs-teal); --hue-ink: var(--fs-teal-ink); --hue-soft: var(--fs-teal-soft); background: linear-gradient(180deg, var(--fs-teal-soft), var(--fs-surface) 70%); }
.fs-theme .interaction-button {
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r);
  background: var(--fs-surface);
  color: var(--fs-ink);
  cursor: pointer;
  transition: background-color var(--fs-fast) var(--fs-ease), transform var(--fs-fast) var(--fs-ease);
}
.fs-theme .interaction-button:hover { background: var(--fs-pomegranate-soft); color: var(--fs-pomegranate-ink); }
.fs-theme .interaction-button:active { transform: scale(.96); }
.fs-theme .rating-star-fill { color: var(--fs-saffron); }
.fs-theme .rating-number { color: var(--fs-saffron-ink); font-family: var(--fs-font-num); font-weight: 800; }

.fs-theme .topic-comment,
.fs-theme .pm-message,
.fs-theme .legacy-message { background: var(--fs-surface); border: 1px solid var(--fs-line); border-radius: var(--fs-r-lg); }
.fs-theme .comment-header { border-color: var(--fs-line); color: var(--fs-muted); }
.fs-theme .comment-body, .fs-theme .pm-body { color: var(--fs-ink); overflow-wrap: anywhere; }
.fs-theme .avatar, .fs-theme .profile-avatar img { border-radius: 50%; }

.fs-theme .image-dialog { background: var(--fs-surface); border: 0; border-radius: var(--fs-r-xl); box-shadow: var(--fs-shadow-3); color: var(--fs-ink); }
.fs-theme dialog::backdrop { background: rgba(23, 26, 51, .55); }

.fs-theme .chat-widget,
.fs-theme .presence-module { background: var(--fs-surface); border-color: var(--fs-line); border-radius: var(--fs-r-lg); color: var(--fs-ink); }
.fs-theme .presence-summary-label { color: var(--fs-muted); }

/* --------------------------------------------------------------------------
   الدخول والتسجيل
   -------------------------------------------------------------------------- */
.fs-theme .guest-shell { padding-block-end: 32px; }
.fs-theme .guest-shell .site-masthead { display: flex; justify-content: center; padding-block: 28px 12px; }
.fs-theme .guest-shell .site-logo img { height: 92px; }
.fs-theme .guest-login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 8px 16px 24px;
}
.fs-theme .guest-login-intro { min-width: 0; }
.fs-theme .guest-login-intro h1 {
  margin-block: 0 10px;
  font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem);
  font-weight: 800;
  line-height: 1.25;
}
.fs-theme .guest-login-intro > p { max-width: 46ch; color: var(--fs-ink-2); font-size: 1.02rem; }
.fs-theme .guest-login-card {
  position: relative;
  min-width: 0;
  padding: 26px 24px 22px;
  box-sizing: border-box;
  background: var(--fs-surface);
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r-xl);
  box-shadow: var(--fs-shadow-3);
  overflow: hidden;
}
.fs-theme .guest-login-card::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 5px; background: var(--fs-stripe); }
.fs-theme .member-card-heading h2 { margin-block: 0 16px; font-size: 1.2rem; font-weight: 800; }
.fs-theme .member-card-login-form { display: grid; gap: 6px; }
.fs-theme .member-card-login-form label { color: var(--fs-ink-2); font-weight: 700; font-size: .88rem; }
.fs-theme .member-card-login-form input:not([type="checkbox"]) {
  width: 100%;
  min-height: 46px;
  margin-block-end: 8px;
  box-sizing: border-box;
  padding-inline: 14px;
  border: 1px solid var(--fs-line-strong);
  border-radius: var(--fs-r);
  background: var(--fs-surface-2);
  color: var(--fs-ink);
  font: inherit;
  font-size: 16px;
}
.fs-theme .member-card-login-form input:not([type="checkbox"]):focus { background: var(--fs-surface); }
.fs-theme .member-card-login-form .checkbox { display: flex; align-items: flex-start; gap: 8px; margin-block: 4px 10px; }
.fs-theme .member-card-login-form p { margin: 0 0 8px; color: var(--fs-muted); font-size: .82rem; }
.fs-theme .member-card-login-form .button.primary { width: 100%; min-height: 48px; margin-block-start: 4px; font-size: 1rem; }
.fs-theme .member-card-note { margin-block-start: 16px; color: var(--fs-muted); font-size: .88rem; }
.fs-theme .member-card-note a { font-weight: 700; }
.fs-theme .member-card-return { display: inline-block; margin-block-start: 8px; color: var(--fs-muted); font-size: .84rem; }
@media (min-width: 900px) {
  .fs-theme .guest-login-layout { grid-template-columns: minmax(0, 1fr) minmax(330px, 410px); gap: 32px; padding-inline: 24px; }
  .fs-theme .guest-login-card { position: sticky; top: 16px; }
}

/* --------------------------------------------------------------------------
   الترقيم والإدارة والخطأ
   -------------------------------------------------------------------------- */
.fs-theme .pagination { color: var(--fs-muted); font-variant-numeric: tabular-nums; }
.fs-theme .admin-nav { background: var(--fs-surface); border: 1px solid var(--fs-line); border-radius: var(--fs-r-lg); }
.fs-theme .admin-nav a { color: var(--fs-ink-2); text-decoration: none; border-radius: var(--fs-r-sm); }
.fs-theme .admin-nav a:hover { background: var(--fs-slate-soft); color: var(--fs-ink); }
.fs-theme .admin-nav a[aria-current="page"], .fs-theme .admin-nav a.active { background: var(--fs-slate); color: #fff; }
.fs-theme .admin-count { color: var(--fs-indigo-ink); font-family: var(--fs-font-num); font-weight: 800; }

.fs-theme .error-page { padding-block: 48px; }
.fs-theme .error-code {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 128px;
  height: 128px;
  margin-block-end: 12px;
  color: #fff;
  font-family: var(--fs-font-num);
  font-size: 2.2rem;
  font-weight: 800;
  isolation: isolate;
}
.fs-theme .error-code::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fs-pomegranate);
  clip-path: var(--fs-star);
  animation: fs-spin-in 700ms var(--fs-spring) both;
}
@keyframes fs-spin-in { from { transform: rotate(-90deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* شريط التمرير */
.fs-theme { scrollbar-color: var(--fs-line-strong) transparent; }

/* --------------------------------------------------------------------------
   الاستجابة
   -------------------------------------------------------------------------- */
.fs-theme .sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* app.css يفرض «.nav-link span{font-size:20px;width:22px}» (كانت أيقونة نصية في التصميم الأصلي)؛
   نصوصنا وخواتمنا وعدّاداتنا spans داخل الرابط فتُحشر في 22px وتتراكب. نلغي ذلك هنا. */
body.fs-theme .nav-link span { width: auto; font-size: inherit; text-align: inherit; }
body.fs-theme .nav-link .fs-tile { width: 34px; height: 34px; }

/* تحصين التنقل ضد أنماط التطبيق الأساسية: أنماط الموقع تقسّم الشريط خلايا متساوية
   فيتجاوز النص خليته ويتراكب. نعيد كل رابط لعرض محتواه بخصوصية أعلى.
   (الجوال له شبكة خاصة تُفتح من الشريط السفلي، فلا تشمله هذه القواعد) */
@media (min-width: 761px) {
body.fs-theme .community-navigation .primary-navigation {
  display: flex;
  flex-wrap: wrap;
  grid-template-columns: none;
  grid-auto-flow: row;
  justify-content: flex-start;
  width: auto;
  overflow: visible;
}
body.fs-theme .community-navigation .primary-navigation .nav-link,
body.fs-theme .community-navigation .member-menu > summary {
  flex: 0 0 auto;
  width: auto;
  min-width: max-content;
  max-width: none;
  overflow: visible;
  white-space: nowrap;
  line-height: 1.2;
  letter-spacing: 0;
  font-size: .92rem;
  text-align: start;
}
body.fs-theme .community-navigation .library-navigation { flex: 0 0 auto; width: auto; min-width: max-content; }
body.fs-theme .community-navigation .fs-label { display: inline; font-size: inherit; line-height: inherit; white-space: nowrap; }
body.fs-theme .community-navigation .fs-tile { position: relative; flex: 0 0 34px; }
}

@media (max-width: 1440px) {
  .fs-theme .fs-header { grid-template-columns: auto minmax(0, 1fr); }
  .fs-theme .fs-header .member-summary { grid-column: 1 / -1; }
}

@media (max-width: 1000px) {
  .fs-theme .community-navigation .nav-link .fs-label,
  .fs-theme .member-menu > summary .fs-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .fs-theme .community-navigation .nav-link,
  .fs-theme .member-menu > summary { padding-inline: 10px; }
  .fs-theme .community-navigation .nav-link .fs-tile,
  .fs-theme .member-menu > summary .fs-tile { margin-inline-start: 0; }
}

@media (max-width: 760px) {
  .fs-theme { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .fs-theme .fs-header {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-block: 8px;
    padding: 12px 12px 16px;
    border-radius: var(--fs-r-lg);
  }
  .fs-theme .site-logo img { height: 48px; }
  .fs-theme .fs-search { height: 46px; }
  .fs-theme .fs-search-submit { padding: 0 14px; }
  .fs-theme .fs-header .member-summary-top { flex-wrap: wrap; overflow: visible; }
  .fs-theme .fs-header .member-summary-identity { flex: 1 1 0; }
  .fs-theme .fs-header .member-summary-welcome { overflow: hidden; text-overflow: ellipsis; }
  .fs-theme .fs-header .member-summary-stats { order: 3; flex-basis: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fs-theme .fs-header .member-summary-stats > div { min-width: 0; }
  .fs-theme .fs-header .member-summary-links button > span:not(.fs-member-icon) {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }

  /* التنقل الكامل يصبح شبكة خواتم تُفتح من زر «القائمة» في الشريط السفلي */
  .fs-theme .community-navigation { position: static; flex-wrap: wrap; padding: 6px; border-radius: var(--fs-r); }
  .fs-theme .community-navigation[data-fs-collapsible] .primary-navigation { display: none; }
  .fs-theme .community-navigation[data-fs-open] .primary-navigation {
    display: grid;
    flex-basis: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 4px;
    animation: fs-pop var(--fs-mid) var(--fs-ease);
  }
  .fs-theme .community-navigation[data-fs-open] .fs-library-slot { display: block; }
  .fs-theme .community-navigation[data-fs-open] .library-navigation { display: flex; height: 100%; }
  .fs-theme .community-navigation[data-fs-open] .nav-link {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 84px;
    padding: 10px 6px;
    background: var(--fs-surface-2);
    text-align: center;
    font-size: .8rem;
  }
  .fs-theme .community-navigation[data-fs-open] .nav-link .fs-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .fs-theme .community-navigation[data-fs-open] .nav-link .fs-tile { margin: 0; }
  .fs-theme .community-navigation[data-fs-open] .nav-link .tag { position: absolute; margin: 0; transform: translate(-22px, -26px); }
  .fs-theme .community-navigation[data-fs-open] .nav-link { position: relative; }
  .fs-theme .member-menu { flex: 1 1 100%; }
  .fs-theme .member-menu > summary { width: 100%; min-height: 46px; justify-content: flex-start; }
  .fs-theme .member-menu > summary .fs-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .fs-theme .member-menu > summary::after { margin-inline-start: auto; }
  .fs-theme .member-menu-panel {
    position: static;
    width: auto;
    max-height: none;
    margin-block-start: 6px;
    grid-template-columns: 1fr;
    box-shadow: none;
  }
  .fs-theme .topbar { font-size: 1.15rem; }

  .fs-theme .fs-tabbar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 70;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-block-start: 1px solid var(--fs-line);
    box-shadow: 0 -10px 30px -18px rgba(23, 26, 51, .35);
  }
  .fs-theme .fs-tabbar::before { content: ""; position: absolute; inset-inline: 0; top: -1px; height: 3px; background: var(--fs-stripe); }
  .fs-theme .fs-tabbar > a,
  .fs-theme .fs-tabbar > button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 56px;
    padding: 2px 0;
    border: 0;
    border-radius: var(--fs-r);
    background: transparent;
    color: var(--fs-ink-2);
    font: inherit;
    font-size: .72rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .fs-theme .fs-tabbar > .is-current,
  .fs-theme .fs-tabbar > [aria-expanded="true"] { color: var(--hue-ink); }
  .fs-theme .fs-tabbar > [aria-expanded="true"] > .fs-tile { color: #fff; }
  .fs-theme .fs-tabbar > [aria-expanded="true"] > .fs-tile::before { background: var(--hue); transform: rotate(22.5deg); }
  .fs-theme .fs-tabbar > a:active > .fs-tile::before,
  .fs-theme .fs-tabbar > button:active > .fs-tile::before { transform: rotate(22.5deg) scale(.9); }
  .fs-theme .fs-dot {
    position: absolute;
    top: 2px;
    left: calc(50% - 22px);
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    border: 2px solid var(--fs-surface);
    background: var(--fs-pomegranate);
    color: #fff;
    font-size: .64rem;
    font-weight: 800;
    line-height: 14px;
    text-align: center;
  }
  .fs-theme .fs-to-top { bottom: calc(86px + env(safe-area-inset-bottom)); inset-inline-start: 12px; }
}

@media (max-width: 360px) {
  .fs-theme .community-navigation[data-fs-open] .primary-navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fs-theme .fs-search-submit { display: none; }
}

/* تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  .fs-theme *, .fs-theme *::before, .fs-theme *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .fs-theme { background: #fff; padding: 0; }
  .fs-theme .community-navigation, .fs-theme .fs-tabbar, .fs-theme .fs-to-top, .fs-theme .fs-search, .fs-theme .member-summary { display: none !important; }
}

/* ==========================================================================
   طبقة الحيوية (1.1): كل حركة هنا لها سبب — ظهور، استجابة، أو تنبيه —
   وتتوقف كلها مع «تقليل الحركة».
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {

  /* شريط الفسيفساء يتحرك ببطء على امتداده: هوية حيّة بلا تشتيت */
  .fs-theme .fs-header::after,
  .fs-theme .footer::before,
  .fs-theme .guest-login-card::before {
    background-size: 200% 100%;
    background-image: linear-gradient(90deg,
      var(--fs-indigo), var(--fs-teal), var(--fs-saffron), var(--fs-violet), var(--fs-pomegranate), var(--fs-olive),
      var(--fs-indigo), var(--fs-teal), var(--fs-saffron), var(--fs-violet), var(--fs-pomegranate), var(--fs-olive), var(--fs-indigo));
    animation: fs-stripe-flow 18s linear infinite;
  }
  @keyframes fs-stripe-flow { to { background-position: -200% 0; } }

  /* نجمة عنوان الصفحة تدخل بدورة */
  .fs-theme .topbar > span:first-child::before { animation: fs-spin-in 700ms var(--fs-spring) both; }

  /* عدّادات غير المقروء: نبض ثلاث مرات ثم يهدأ (تنبيه حقيقي لا زينة) */
  /* fs-dot وعدّاد الرأس مطلقا الموضع أصلاً؛ نجعل الوسوم النسبية فقط مرجعاً للنبض */
  .fs-theme .community-navigation .primary-navigation > .nav-link .tag { position: relative; }
  .fs-theme .member-unread-count::after,
  .fs-theme .community-navigation .tag::after,
  .fs-theme .fs-dot::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    border: 2px solid currentColor;
    color: var(--fs-pomegranate);
    opacity: 0;
    animation: fs-ping 1.6s var(--fs-ease) 600ms 3;
    pointer-events: none;
  }
  .fs-theme .community-navigation .tag::after { color: var(--hue); }
  @keyframes fs-ping { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.8); } }

  /* ظهور البطاقات عند دخولها الشاشة (theme.js يضيف .fs-in) */
  .fs-theme.fs-reveal-ready .fs-reveal {
    opacity: 0;
    transform: translateY(18px) scale(.985);
    transition: opacity 520ms var(--fs-ease), transform 620ms var(--fs-spring);
    transition-delay: calc(var(--fs-i, 0) * 55ms);
  }
  .fs-theme.fs-reveal-ready .fs-reveal.fs-in { opacity: 1; transform: none; }

  /* الأزرار الأساسية: لمعة تعبر الزر عند المرور */
  .fs-theme .button.primary,
  .fs-theme button.primary,
  .fs-theme .fs-search-submit { position: relative; overflow: hidden; isolation: isolate; }
  .fs-theme .button.primary::after,
  .fs-theme button.primary::after,
  .fs-theme .fs-search-submit::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%);
    transform: translateX(120%);
    transition: transform 700ms var(--fs-ease);
  }
  .fs-theme .button.primary:hover::after,
  .fs-theme button.primary:hover::after,
  .fs-theme .fs-search-submit:hover::after { transform: translateX(-120%); }

  /* صفوف الجداول: حافة بلون القسم تنزلق من البداية عند المرور */
  .fs-theme .table-wrap tbody tr > td:first-child,
  .fs-theme .home-new-table tbody tr > td:first-child { transition: box-shadow 260ms var(--fs-ease); }
  .fs-theme .table-wrap tbody tr:hover > td:first-child,
  .fs-theme .home-new-table tbody tr:hover > td:first-child { box-shadow: inset -4px 0 0 var(--fs-indigo); }
  .fs-theme tr.is-sticky:hover > td:first-child { box-shadow: inset -4px 0 0 var(--fs-saffron); }

  /* البحث يتمدد قليلاً عند التركيز */
  .fs-theme .fs-search { transition: border-color var(--fs-fast) var(--fs-ease), box-shadow var(--fs-mid) var(--fs-ease), background-color var(--fs-fast), transform var(--fs-mid) var(--fs-spring); }
  .fs-theme .fs-search:focus-within { transform: scale(1.01); }
  .fs-theme .fs-search:focus-within .fs-search-icon { animation: fs-wiggle 500ms var(--fs-spring); }
  @keyframes fs-wiggle { 30% { transform: rotate(-14deg) scale(1.1); } 60% { transform: rotate(8deg); } }

  /* رقائق الأرقام ترتفع قليلاً عند المرور */
  .fs-theme .fs-header .member-summary-stats > div:hover { transform: translateY(-2px); }
}

/* ضوء يتبع المؤشر على البطاقات التفاعلية (theme.js يضبط --mx/--my) */
.fs-theme .release-card,
.fs-theme .browse-category,
.fs-theme .fs-glow { position: relative; }
.fs-theme .release-card::after,
.fs-theme .browse-category::after,
.fs-theme .fs-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, -40%), color-mix(in srgb, var(--hue) 16%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 300ms var(--fs-ease);
  pointer-events: none;
}
.fs-theme .release-card:hover::after,
.fs-theme .browse-category:hover::after,
.fs-theme .fs-glow:hover::after { opacity: 1; }
.fs-theme .browse-category { --hue: var(--fs-teal); }

/* خلفية الثيم الافتراضية: إضاءة لونية أعلى الصفحة، فاتحة دائماً.
   خصوصيتها (0,0,1) فقط حتى تتغلب على app.css ويتغلب عليها اختيار المدير من «خلفية الموقع والهيدر» */
body:where(.fs-theme) {
  background-color: var(--fs-bg);
  background-repeat: no-repeat;
  background-image:
    radial-gradient(1000px 420px at 100% -80px, rgba(75, 85, 209, .17), transparent 70%),
    radial-gradient(760px 340px at 45% -140px, rgba(240, 161, 43, .15), transparent 70%),
    radial-gradient(860px 380px at 0% -60px, rgba(18, 163, 160, .14), transparent 70%),
    radial-gradient(700px 500px at 100% 110%, rgba(138, 79, 208, .07), transparent 70%);
  background-attachment: fixed;
}

/* حافة البطاقة العلوية: تدرّج بلون الوحدة بدل خط مسطّح */
.fs-theme .browse-module,
.fs-theme .home-module > section,
.fs-theme .content-box { position: relative; }
.fs-theme .browse-module::before,
.fs-theme .home-module > section::before,
.fs-theme .content-box::before {
  content: "";
  position: absolute;
  inset-inline: 16px;
  top: 0;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, transparent, var(--hue) 20%, var(--hue) 80%, transparent);
  pointer-events: none;
}
.fs-theme .browse-module,
.fs-theme .home-module > section,
.fs-theme .content-box { box-shadow: var(--fs-shadow-1); }
.fs-theme .browse-module:hover,
.fs-theme .home-module > section:hover { box-shadow: var(--fs-shadow-2); }

/* ==========================================================================
   الملف الشخصي (profile.php)
   ========================================================================== */
.fs-theme .fs-profile { display: grid; gap: 18px; min-width: 0; }

.fs-theme .fs-profile-hero {
  position: relative;
  overflow: hidden;
  background: var(--fs-surface);
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r-xl);
  box-shadow: var(--fs-shadow-2);
}
/* غلاف ملوّن: أشعة ألوان الأقسام + نجوم باهتة */
.fs-theme .fs-profile-cover {
  height: 132px;
  background:
    radial-gradient(circle at 18% 140%, rgba(255, 255, 255, .55) 0 22%, transparent 23%),
    radial-gradient(420px 220px at 85% 0%, rgba(240, 161, 43, .55), transparent 70%),
    radial-gradient(420px 240px at 45% 120%, rgba(18, 163, 160, .5), transparent 70%),
    linear-gradient(120deg, var(--fs-indigo), var(--fs-violet) 55%, var(--fs-pomegranate));
  position: relative;
}
.fs-theme .fs-profile-cover::before,
.fs-theme .fs-profile-cover::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, .16);
  clip-path: var(--fs-star);
}
.fs-theme .fs-profile-cover::before { width: 180px; height: 180px; inset-inline-start: 12%; top: -60px; }
.fs-theme .fs-profile-cover::after { width: 90px; height: 90px; inset-inline-start: 46%; top: 40px; background: rgba(255, 255, 255, .12); }

.fs-theme .fs-profile-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  padding: 0 24px;
  margin-top: -56px;
  position: relative;
}

/* الصورة داخل الخاتم: نجمة ثمانية مع حلقة بيضاء وحلقة لون */
.fs-theme .fs-profile-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  border: 0;
  border-radius: 0;
  background: none;
  isolation: isolate;
  filter: drop-shadow(0 10px 18px rgba(23, 26, 51, .22));
}
.fs-theme .fs-profile-avatar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(135deg, var(--fs-saffron), var(--fs-pomegranate), var(--fs-indigo));
  clip-path: var(--fs-star);
}
.fs-theme .fs-profile-avatar::after {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: -1;
  background: var(--fs-surface);
  clip-path: var(--fs-star);
}
.fs-theme .fs-profile-initial,
.fs-theme .fs-profile-avatar img {
  position: absolute;
  inset: 10px;
  width: auto;
  height: auto;
  clip-path: var(--fs-star);
  border-radius: 0;
  border: 0;
}
.fs-theme .fs-profile-initial {
  display: grid;
  place-items: center;
  background: var(--fs-indigo-soft);
  color: var(--fs-indigo-ink);
  font-size: 2.6rem;
  font-weight: 800;
}
.fs-theme .fs-profile-avatar img { object-fit: cover; background: var(--fs-sunken); }

.fs-theme .fs-profile-identity { min-width: 0; padding-bottom: 4px; }
.fs-theme .fs-profile-identity h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem);
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.fs-theme .fs-profile-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fs-theme .fs-profile-chips li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--hue-soft);
  color: var(--hue-ink);
  font-size: .82rem;
  font-weight: 700;
}
.fs-theme .fs-profile-chips time { font-family: var(--fs-font-num); font-size: .78rem; }

.fs-theme .fs-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 6px; }
.fs-theme .fs-profile-actions .fs-ico { width: 18px; height: 18px; }
.fs-theme .fs-profile-actions .fs-ico .fs-fill { opacity: .25; }

.fs-theme .fs-profile-note {
  margin: 14px 24px 18px;
  padding-top: 12px;
  border-top: 1px dashed var(--fs-line);
  color: var(--fs-muted);
  font-size: .85rem;
}

/* إحصاءات المشاركة: ثلاث بطاقات ملوّنة */
.fs-theme .fs-profile-stats,
.fs-theme .fs-profile-signature {
  --hue: var(--fs-teal); --hue-ink: var(--fs-teal-ink); --hue-soft: var(--fs-teal-soft);
  padding: 18px 20px;
  background: var(--fs-surface);
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r-lg);
  box-shadow: var(--fs-shadow-1);
}
.fs-theme .fs-profile-signature { --hue: var(--fs-violet); --hue-ink: var(--fs-violet-ink); --hue-soft: var(--fs-violet-soft); }
.fs-theme .fs-profile .section-heading { margin: 0 0 14px; padding: 0; border: 0; }
.fs-theme .fs-profile .section-heading h2 { margin: 0; }
.fs-theme .fs-profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.fs-theme .fs-profile-stat-grid > div {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: var(--fs-r);
  background: var(--hue-soft);
  transition: transform var(--fs-mid) var(--fs-spring), box-shadow var(--fs-mid) var(--fs-ease);
}
.fs-theme .fs-profile-stat-grid > div:hover { transform: translateY(-3px); box-shadow: var(--fs-shadow-2); }
.fs-theme .fs-profile-stat-grid dt { display: flex; align-items: center; gap: 8px; color: var(--hue-ink); font-size: .85rem; font-weight: 800; }
.fs-theme .fs-profile-stat-grid .fs-tile::before { background: var(--fs-surface); }
.fs-theme .fs-profile-stat-grid dd {
  margin: 0;
  color: var(--fs-ink);
  font-family: var(--fs-font-num);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: start;
}
.fs-theme .fs-profile-stat-note { margin: 12px 0 0; color: var(--fs-muted); font-size: .8rem; }
.fs-theme .fs-profile-signature .topic-body { padding: 14px 16px; border-radius: var(--fs-r); background: var(--fs-surface-2); }

@media (max-width: 760px) {
  .fs-theme .fs-profile-cover { height: 104px; }
  .fs-theme .fs-profile-main { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; margin-top: -60px; padding: 0 16px; gap: 10px; }
  .fs-theme .fs-profile-avatar { width: 112px; height: 112px; }
  .fs-theme .fs-profile-chips { justify-content: center; }
  .fs-theme .fs-profile-actions { justify-content: center; width: 100%; }
  .fs-theme .fs-profile-actions .button { flex: 1 1 auto; }
  .fs-theme .fs-profile-note { margin: 14px 16px 16px; text-align: center; }
  .fs-theme .fs-profile-stats, .fs-theme .fs-profile-signature { padding: 16px; }
  .fs-theme .fs-profile-stat-grid { grid-template-columns: minmax(0, 1fr); }
  .fs-theme .fs-profile-stat-grid > div { grid-template-columns: auto 1fr; align-items: center; }
  .fs-theme .fs-profile-stat-grid dd { font-size: 1.25rem; text-align: end; }
}

@media (prefers-reduced-motion: no-preference) {
  .fs-theme .fs-profile-avatar { animation: fs-spin-in 800ms var(--fs-spring) both; }
  .fs-theme .fs-profile-chips li { animation: fs-rise 420ms var(--fs-ease) both; }
  .fs-theme .fs-profile-chips li:nth-child(2) { animation-delay: 60ms; }
  .fs-theme .fs-profile-chips li:nth-child(3) { animation-delay: 120ms; }
  .fs-theme .fs-profile-chips li:nth-child(4) { animation-delay: 180ms; }
}

/* ==========================================================================
   «حسابي» (account.php)
   ========================================================================== */
.fs-theme .fs-account { display: grid; gap: 18px; min-width: 0; }
.fs-theme .fs-account-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  overflow: hidden;
  background:
    radial-gradient(520px 220px at 100% 0%, var(--fs-indigo-soft), transparent 70%),
    radial-gradient(420px 200px at 0% 100%, var(--fs-saffron-soft), transparent 70%),
    var(--fs-surface);
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r-xl);
  box-shadow: var(--fs-shadow-2);
}
.fs-theme .fs-account-hero::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 4px; background: var(--fs-stripe); }
.fs-theme .fs-account-avatar { width: 112px; height: 112px; }
.fs-theme .fs-account-identity { min-width: 0; }
.fs-theme .fs-account-kicker { margin: 0 0 2px; color: var(--fs-indigo-ink); font-size: .82rem; font-weight: 800; }
.fs-theme .fs-account-identity h1 { margin: 0 0 8px; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.fs-theme .fs-account-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.fs-theme .fs-account-balances,
.fs-theme .fs-account-panel,
.fs-theme .fs-account-manage {
  padding: 18px 20px;
  background: var(--fs-surface);
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r-lg);
  box-shadow: var(--fs-shadow-1);
}
.fs-theme .fs-account .section-heading { margin: 0 0 6px; padding: 0; border: 0; }
.fs-theme .fs-account .section-heading h2 { margin: 0; }
.fs-theme .fs-account-lead { margin: 0 0 14px; color: var(--fs-muted); font-size: .86rem; }
.fs-theme .fs-account-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fs-theme .fs-stat-link { color: var(--hue-ink); font-size: .8rem; font-weight: 700; text-decoration: none; }
.fs-theme .fs-stat-link:hover { text-decoration: underline; }

.fs-theme .fs-account-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; }
.fs-theme .fs-account-panel { display: flex; flex-direction: column; gap: 12px; box-shadow: var(--fs-shadow-1), inset 0 3px 0 var(--hue); }
.fs-theme .fs-account-panel .button { align-self: flex-start; }
.fs-theme .fs-account-ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.fs-theme .fs-account-ledger > div { padding: 12px 14px; border-radius: var(--fs-r); background: var(--hue-soft); }
.fs-theme .fs-account-ledger dt { color: var(--hue-ink); font-size: .8rem; font-weight: 800; }
.fs-theme .fs-account-ledger dd { margin: 4px 0 0; font-family: var(--fs-font-num); font-size: 1.2rem; font-weight: 800; text-align: start; }
.fs-theme .fs-account-reward-value { margin: 0; color: var(--fs-ink); font-family: var(--fs-font-num); font-size: 1.7rem; font-weight: 800; text-align: start; }
.fs-theme .fs-account-panel-text { margin: 0; color: var(--fs-ink-2); font-size: .88rem; }
.fs-theme .fs-account-explain { border-radius: var(--fs-r); background: var(--fs-surface-2); }
.fs-theme .fs-account-explain > summary { padding: 10px 14px; color: var(--hue-ink); font-weight: 700; font-size: .88rem; cursor: pointer; }
.fs-theme .fs-account-explain > p { margin: 0; padding: 0 14px 12px; color: var(--fs-ink-2); font-size: .86rem; }
.fs-theme .fs-account-notice { margin: 0; }

/* شبكة إدارة الحساب (تُستعمل أيضاً في الإعدادات) */
.fs-theme .fs-account-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 10px; }
.fs-theme .fs-account-links > a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 14px;
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r);
  background: var(--fs-surface);
  color: var(--fs-ink);
  text-decoration: none;
  transition: border-color var(--fs-fast) var(--fs-ease), background-color var(--fs-fast) var(--fs-ease), transform var(--fs-mid) var(--fs-spring);
}
.fs-theme .fs-account-links > a:hover { border-color: var(--hue); background: var(--hue-soft); transform: translateY(-2px); }
.fs-theme .fs-account-link-text { display: grid; min-width: 0; }
.fs-theme .fs-account-link-text strong { font-size: .92rem; font-weight: 800; }
.fs-theme .fs-account-link-text small { color: var(--fs-muted); font-size: .78rem; }
.fs-theme .fs-account-link-text .tag { background: var(--fs-saffron); color: var(--fs-ink); font-size: .7rem; padding: 0 6px; }

/* ==========================================================================
   إعدادات العضو (profile-settings.php)
   ========================================================================== */
.fs-theme .fs-settings { display: grid; gap: 18px; min-width: 0; }
.fs-theme .fs-settings-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.fs-theme .fs-settings-head h1 { margin: 0 0 4px; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
.fs-theme .fs-settings-head .subtext { margin: 0; }
.fs-theme .fs-settings-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }

.fs-theme .fs-settings-nav {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 2px;
  padding: 8px;
  background: var(--fs-surface);
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r-lg);
  box-shadow: var(--fs-shadow-1);
}
.fs-theme .fs-settings-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--fs-r-sm);
  color: var(--fs-ink-2);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color var(--fs-fast) var(--fs-ease), color var(--fs-fast);
}
.fs-theme .fs-settings-nav a:hover { background: var(--fs-surface-2); color: var(--fs-ink); }
.fs-theme .fs-settings-nav a.is-current { background: var(--hue-soft); color: var(--hue-ink); }
.fs-theme .fs-settings-nav a.is-current > .fs-tile { color: #fff; }
.fs-theme .fs-settings-nav a.is-current > .fs-tile::before { background: var(--hue); transform: rotate(22.5deg); }
.fs-theme .fs-settings-nav .fs-tile { width: 30px; height: 30px; }
.fs-theme .fs-settings-nav .fs-ico { width: 17px; height: 17px; }

.fs-theme .fs-settings-main { display: grid; gap: 16px; min-width: 0; }
.fs-theme .fs-settings-form { display: grid; gap: 16px; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }

.fs-theme .fs-set-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  scroll-margin-top: 90px;
  background: var(--fs-surface);
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r-lg);
  box-shadow: var(--fs-shadow-1), inset 0 3px 0 var(--hue);
}
.fs-theme .fs-set-card-head { display: flex; align-items: flex-start; gap: 12px; }
.fs-theme .fs-set-card-head .fs-tile { width: 42px; height: 42px; }
.fs-theme .fs-set-card-head .fs-ico { width: 22px; height: 22px; }
.fs-theme .fs-set-card-head h2 { margin: 2px 0 4px; font-size: 1.1rem; font-weight: 800; }
.fs-theme .fs-set-card-head p { margin: 0; max-width: 70ch; color: var(--fs-ink-2); font-size: .87rem; }
.fs-theme .fs-set-card fieldset { margin: 0; padding: 0; border: 0; background: none; min-width: 0; }
.fs-theme .fs-set-card legend { padding: 0; margin-bottom: 8px; color: var(--fs-ink); font-size: .9rem; font-weight: 800; }

/* بطاقات الاختيار (من يفتح ملفي) */
.fs-theme .fs-choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fs-theme .fs-choice-cards > legend { grid-column: 1 / -1; }
.fs-theme .fs-choice { position: relative; display: block; cursor: pointer; }
.fs-theme .fs-choice input,
.fs-theme .fs-segment-option input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.fs-theme .fs-choice-body {
  position: relative;
  display: grid;
  gap: 2px;
  height: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  padding-inline-start: 44px;
  border: 1.5px solid var(--fs-line-strong);
  border-radius: var(--fs-r);
  background: var(--fs-surface);
  transition: border-color var(--fs-fast) var(--fs-ease), background-color var(--fs-fast);
}
.fs-theme .fs-choice-body::before {
  content: "";
  position: absolute;
  inset-inline-start: 16px;
  top: 16px;
  width: 18px;
  height: 18px;
  box-sizing: border-box;
  border: 2px solid var(--fs-line-strong);
  border-radius: 50%;
  background: var(--fs-surface);
  transition: border-color var(--fs-fast), box-shadow var(--fs-fast), background-color var(--fs-fast);
}
.fs-theme .fs-choice-body strong { color: var(--fs-ink); font-size: .95rem; }
.fs-theme .fs-choice-body small { color: var(--fs-muted); font-size: .8rem; }
.fs-theme .fs-choice:hover .fs-choice-body { border-color: var(--hue); }
.fs-theme .fs-choice input:checked + .fs-choice-body { border-color: var(--hue); background: var(--hue-soft); }
.fs-theme .fs-choice input:checked + .fs-choice-body::before { border-color: var(--hue); background: var(--hue); box-shadow: inset 0 0 0 3px var(--fs-surface); }
.fs-theme .fs-choice input:focus-visible + .fs-choice-body { outline: 2px solid var(--fs-indigo); outline-offset: 2px; }

/* أزرار مجزّأة (لا/نعم، أعداد الصفحة، التواجد) */
.fs-theme .fs-set-rows { display: grid; }
.fs-theme .fs-set-card .fs-set-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--fs-line);
}
.fs-theme .fs-set-rows > .fs-set-row:first-child { border-top: 0; padding-top: 0; }
.fs-theme .fs-set-card .fs-set-row > legend { float: right; margin: 0; padding: 6px 0; font-weight: 700; }
.fs-theme .fs-segment { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: var(--fs-sunken); margin-inline-start: auto; }
.fs-theme .fs-segment-option { position: relative; margin: 0; cursor: pointer; }
.fs-theme .fs-segment-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--fs-ink-2);
  font-size: .86rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: background-color var(--fs-fast) var(--fs-ease), color var(--fs-fast), box-shadow var(--fs-fast);
}
.fs-theme .fs-segment-option:hover span { color: var(--fs-ink); }
.fs-theme .fs-segment-option input:checked + span { background: var(--fs-surface); color: var(--hue-ink); box-shadow: 0 1px 3px rgba(23, 26, 51, .14), inset 0 0 0 1.5px var(--hue); }
.fs-theme .fs-segment-option input:focus-visible + span { outline: 2px solid var(--fs-indigo); outline-offset: 2px; }

/* الحقول */
.fs-theme .fs-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fs-theme .fs-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.fs-theme .fs-field > label,
.fs-theme .fs-field-label { color: var(--fs-ink); font-size: .88rem; font-weight: 800; }
.fs-theme .fs-field input:not([type="hidden"]),
.fs-theme .fs-field select,
.fs-theme .fs-field textarea { width: 100%; box-sizing: border-box; margin: 0; }
.fs-theme .fs-field .section-note { margin: 0; font-size: .8rem; color: var(--fs-muted); }
.fs-theme .fs-field-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fs-theme .fs-counter { flex: none; color: var(--fs-muted); font-family: var(--fs-font-num); font-size: .76rem; }
.fs-theme .fs-counter.is-near { color: var(--fs-pomegranate-ink); font-weight: 700; }
.fs-theme .fs-set-locked { margin: 0; padding: 12px 14px; border: 1px dashed var(--fs-line-strong); border-radius: var(--fs-r); background: var(--fs-surface-2); color: var(--fs-ink-2); font-size: .86rem; }

/* شريط الحفظ الثابت أسفل النموذج */
.fs-theme .fs-settings-save {
  position: sticky;
  bottom: 12px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  padding: 10px 12px 10px 14px;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r-lg);
  box-shadow: var(--fs-shadow-3);
  transition: border-color var(--fs-mid) var(--fs-ease);
}
.fs-theme .fs-save-hint { margin-inline-end: auto; color: var(--fs-muted); font-size: .82rem; }
.fs-theme .fs-settings-save.is-dirty { border-color: var(--fs-indigo); }
.fs-theme .fs-settings-save.is-dirty .fs-save-hint { color: var(--fs-indigo-ink); font-weight: 700; }

.fs-theme .fs-presence-form { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.fs-theme .fs-presence-form .fs-set-row { flex: 1 1 auto; padding: 0; border: 0; }
.fs-theme .fs-set-links { margin-top: 0; }

@media (max-width: 1000px) {
  .fs-theme .fs-account-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fs-theme .fs-settings-layout { grid-template-columns: minmax(0, 1fr); }
  .fs-theme .fs-settings-nav { position: static; display: flex; gap: 6px; overflow-x: auto; padding: 6px; scrollbar-width: none; }
  .fs-theme .fs-settings-nav a { flex: none; white-space: nowrap; }
}
@media (max-width: 760px) {
  .fs-theme .fs-account-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 20px 16px; }
  .fs-theme .fs-account-hero .fs-profile-chips { justify-content: center; }
  .fs-theme .fs-account-actions { justify-content: center; width: 100%; }
  .fs-theme .fs-account-actions .button { flex: 1 1 auto; }
  .fs-theme .fs-account-split { grid-template-columns: minmax(0, 1fr); }
  .fs-theme .fs-account-balances, .fs-theme .fs-account-panel, .fs-theme .fs-account-manage { padding: 16px; }
  .fs-theme .fs-account-stat-grid { grid-template-columns: minmax(0, 1fr); }
  .fs-theme .fs-account-links { grid-template-columns: minmax(0, 1fr); }
  .fs-theme .fs-set-card { padding: 16px; }
  .fs-theme .fs-choice-cards, .fs-theme .fs-field-grid { grid-template-columns: minmax(0, 1fr); }
  .fs-theme .fs-settings-save { bottom: calc(84px + env(safe-area-inset-bottom)); }
  /* على الجوال يظهر التلميح فقط عند وجود تغييرات غير محفوظة */
  .fs-theme .fs-save-hint { display: none; flex-basis: 100%; }
  .fs-theme .fs-settings-save.is-dirty .fs-save-hint { display: block; }
  .fs-theme .fs-settings-save { padding: 8px; }
  .fs-theme .fs-settings-save .button { flex: 1 1 0; min-height: 44px; }
}

/* ==========================================================================
   تحسينات كل الصفحات (1.4): لون لكل صفحة + مكوّنات مشتركة + لمسات خاصة.
   أنماط فقط على أصناف القوالب الأصلية؛ لا تغيّر البنية ولا تخطيط الأعمدة.
   ========================================================================== */

/* لون الصفحة: يرثه العنوان والتبويبات والأقسام التي لا تحمل لوناً خاصاً */
.fs-theme.fs-view-detail, .fs-theme.fs-view-topic-edit, .fs-theme.fs-view-topic-activity, .fs-theme.fs-view-information,
.fs-theme.fs-view-account { --hue: var(--fs-indigo); --hue-ink: var(--fs-indigo-ink); --hue-soft: var(--fs-indigo-soft); }
.fs-theme.fs-view-browse, .fs-theme.fs-view-members, .fs-theme.fs-view-member-directory, .fs-theme.fs-view-sharing,
.fs-theme.fs-view-member-bookmarks { --hue: var(--fs-teal); --hue-ink: var(--fs-teal-ink); --hue-soft: var(--fs-teal-soft); }
.fs-theme.fs-view-upload, .fs-theme.fs-view-my-uploads, .fs-theme.fs-view-member-points, .fs-theme.fs-view-upload-metadata { --hue: var(--fs-saffron); --hue-ink: var(--fs-saffron-ink); --hue-soft: var(--fs-saffron-soft); }
.fs-theme.fs-view-community-requests, .fs-theme.fs-view-member-rewards, .fs-theme.fs-view-themes { --hue: var(--fs-violet); --hue-ink: var(--fs-violet-ink); --hue-soft: var(--fs-violet-soft); }
.fs-theme.fs-view-messages, .fs-theme.fs-view-legacy-messages, .fs-theme.fs-view-chat, .fs-theme.fs-view-chat-admin, .fs-theme.fs-view-chat-delete { --hue: var(--fs-pomegranate); --hue-ink: var(--fs-pomegranate-ink); --hue-soft: var(--fs-pomegranate-soft); }
.fs-theme.fs-view-notifications, .fs-theme.fs-view-member-warnings, .fs-theme.fs-view-presence, .fs-theme.fs-view-rss-settings { --hue: var(--fs-olive); --hue-ink: var(--fs-olive-ink); --hue-soft: var(--fs-olive-soft); }
.fs-theme[class*="fs-view-admin"], .fs-theme.fs-view-account-security, .fs-theme.fs-view-moderation, .fs-theme.fs-view-moderation-review,
.fs-theme.fs-view-groups, .fs-theme.fs-view-group-edit { --hue: var(--fs-slate); --hue-ink: var(--fs-slate-ink); --hue-soft: var(--fs-slate-soft); }

/* نجمة عنوان الصفحة بلون الصفحة */
.fs-theme .topbar > span:first-child::before { background: var(--hue); }

/* --------------------------------------------------------------------------
   رؤوس الصفحات: شريط بلون الصفحة مع نجمة كبيرة باهتة
   -------------------------------------------------------------------------- */
.fs-theme .content > .page-heading,
.fs-theme .content > .topic-heading,
.fs-theme .admin-main > .page-heading {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  margin-block-end: 18px;
  padding: 20px 22px;
  overflow: hidden;
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r-xl);
  background:
    radial-gradient(420px 180px at 100% 0%, var(--hue-soft), transparent 75%),
    var(--fs-surface);
  box-shadow: var(--fs-shadow-1);
}
.fs-theme .content > .page-heading::after,
.fs-theme .content > .topic-heading::after,
.fs-theme .admin-main > .page-heading::after {
  content: "";
  position: absolute;
  inset-inline-end: -30px;
  top: -40px;
  width: 150px;
  height: 150px;
  background: var(--hue-soft);
  clip-path: var(--fs-star);
  opacity: .8;
  pointer-events: none;
}
.fs-theme .content > .page-heading > *,
.fs-theme .content > .topic-heading > *,
.fs-theme .admin-main > .page-heading > * { position: relative; z-index: 1; }
.fs-theme .page-heading h1,
.fs-theme .topic-heading h1 { margin: 0 0 4px; font-size: clamp(1.35rem, 1.05rem + 1vw, 1.85rem); font-weight: 800; }
.fs-theme .page-heading .subtext,
.fs-theme .topic-heading .subtext { margin: 0; max-width: 70ch; color: var(--fs-ink-2); }
.fs-theme .page-heading .eyebrow { display: inline-block; margin-bottom: 4px; color: var(--hue-ink); }
.fs-theme .page-heading .editor-actions,
.fs-theme .topic-heading .editor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }

/* --------------------------------------------------------------------------
   التبويبات (pm-nav في الرسائل والإشعارات والشات، sharing-tabs)
   -------------------------------------------------------------------------- */
.fs-theme .pm-nav,
.fs-theme .sharing-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin-block-end: 16px;
  padding: 4px;
  border-radius: 999px;
  background: var(--fs-sunken);
}
.fs-theme .pm-nav a,
.fs-theme .sharing-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--fs-ink-2);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color var(--fs-fast) var(--fs-ease), color var(--fs-fast), box-shadow var(--fs-fast);
}
.fs-theme .pm-nav a:hover,
.fs-theme .sharing-tabs a:hover { color: var(--fs-ink); }
.fs-theme .pm-nav a[aria-current],
.fs-theme .pm-nav a.active,
.fs-theme .sharing-tabs a[aria-current] {
  background: var(--fs-surface);
  color: var(--hue-ink);
  box-shadow: 0 1px 3px rgba(23, 26, 51, .14), inset 0 0 0 1.5px var(--hue);
}
.fs-theme .pm-nav .tag { background: var(--hue); color: #fff; font-size: .7rem; padding: 0 6px; }

/* --------------------------------------------------------------------------
   شريط التصفية والبحث داخل الصفحات
   -------------------------------------------------------------------------- */
.fs-theme .content .filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r-lg);
  background: var(--fs-surface-2);
}
.fs-theme .content .filter-bar label { display: grid; gap: 4px; font-size: .82rem; font-weight: 700; color: var(--fs-ink-2); }
.fs-theme .content .filter-bar .search-field,
.fs-theme .content .filter-bar .console-search { flex: 1 1 220px; min-width: 0; }
.fs-theme .content .filter-bar .search-field input,
.fs-theme .content .filter-bar .console-search input { width: 100%; box-sizing: border-box; }
.fs-theme .content .filter-bar .checkbox { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; }
.fs-theme .results-title { display: flex; align-items: baseline; gap: 8px; font-size: 1.05rem; font-weight: 800; }

/* --------------------------------------------------------------------------
   نماذج اللوحات (console-form) — الحسابية والإدارية
   -------------------------------------------------------------------------- */
.fs-theme .console-form {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
}
.fs-theme .console-form > h2,
.fs-theme .console-form > h3 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.fs-theme .console-form label { display: grid; gap: 6px; color: var(--fs-ink); font-size: .88rem; font-weight: 700; }
.fs-theme .console-form label.checkbox { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.fs-theme .console-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.fs-theme .console-form select,
.fs-theme .console-form textarea { width: 100%; box-sizing: border-box; }
.fs-theme .console-form > .button,
.fs-theme .console-form > button { justify-self: start; }
.fs-theme .console-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.fs-theme .console-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

/* --------------------------------------------------------------------------
   الترقيم
   -------------------------------------------------------------------------- */
.fs-theme .pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-block: 14px;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--fs-line);
  border-radius: 999px;
  background: var(--fs-surface);
  font-size: .86rem;
  font-weight: 700;
}
.fs-theme .pagination > div { display: flex; gap: 6px; }
.fs-theme .pagination .button { min-height: 36px; border-radius: 999px; }

/* --------------------------------------------------------------------------
   صفحة الموضوع (detail.php وأجزاؤها)
   -------------------------------------------------------------------------- */
.fs-theme .topic-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.fs-theme .topic-labels { display: flex; flex-wrap: wrap; gap: 6px; }
.fs-theme .topic-labels .category-label,
.fs-theme .topic-labels .tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--fs-teal-soft);
  color: var(--fs-teal-ink);
  font-size: .78rem;
  font-weight: 800;
}
.fs-theme .topic-labels .free,
.fs-theme .topic-labels .tag.free { background: var(--fs-olive-soft); color: var(--fs-olive-ink); }
.fs-theme .topic-main .topic-section,
.fs-theme .topic-side .topic-side-section { padding: 18px 20px; }
.fs-theme .topic-side { display: grid; gap: 14px; align-content: start; }
.fs-theme .topic-poster { border-radius: var(--fs-r-lg); overflow: hidden; }
.fs-theme .topic-poster img { display: block; width: 100%; height: auto; border: 0; border-radius: var(--fs-r-lg); box-shadow: var(--fs-shadow-2); transition: transform 500ms var(--fs-ease); }
.fs-theme .topic-poster:hover img { transform: scale(1.02); }
.fs-theme .poster-fallback {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  border-radius: var(--fs-r-lg);
  background:
    radial-gradient(circle at 30% 20%, var(--fs-indigo-soft), transparent 55%),
    radial-gradient(circle at 75% 80%, var(--fs-saffron-soft), transparent 55%),
    var(--fs-surface-2);
  color: var(--fs-ink-2);
  font-weight: 800;
}

/* قسم التنزيل: الإجراء الأساسي للصفحة */
.fs-theme .topic-download-section {
  position: relative;
  overflow: hidden;
  border-color: rgba(18, 163, 160, .35);
}
.fs-theme .topic-download-section::after {
  content: "";
  position: absolute;
  inset-inline-end: -26px;
  bottom: -30px;
  width: 110px;
  height: 110px;
  background: rgba(18, 163, 160, .12);
  clip-path: var(--fs-star);
  pointer-events: none;
}
.fs-theme .topic-download {
  width: 100%;
  min-height: 52px;
  border-radius: var(--fs-r);
  background: var(--fs-teal) !important;
  font-size: 1rem;
  box-shadow: 0 10px 22px -12px rgba(18, 163, 160, .9) !important;
}
.fs-theme .topic-download:hover { background: var(--fs-teal-ink) !important; }
.fs-theme .topic-download-options { display: grid; gap: 8px; }

/* الحقائق التقنية: بطاقات صغيرة */
.fs-theme .topic-facts,
.fs-theme .technical-grid { gap: 8px; }
.fs-theme .topic-facts > div,
.fs-theme .technical-grid > div { padding: 10px 12px; }
.fs-theme dl.topic-facts:not(:has(> div)) {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  padding: 12px 14px;
  border-radius: var(--fs-r);
  background: var(--fs-surface-2);
}
.fs-theme dl.topic-facts:not(:has(> div)) dt { color: var(--fs-muted); font-size: .82rem; font-weight: 700; }
.fs-theme dl.topic-facts:not(:has(> div)) dd { margin: 0; font-weight: 700; }

/* التفاعل والتقييم */
.fs-theme .topic-interactions { display: flex; flex-wrap: wrap; gap: 8px; }
.fs-theme .interaction-button { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px; font-weight: 700; }
.fs-theme .interaction-button[aria-pressed="true"] { border-color: var(--fs-pomegranate); background: var(--fs-pomegranate-soft); color: var(--fs-pomegranate-ink); }
.fs-theme .rating-star-help { color: var(--fs-muted); font-size: .8rem; }

/* التعليقات */
.fs-theme .topic-comment { padding: 14px 16px; transition: border-color var(--fs-fast) var(--fs-ease); }
.fs-theme .topic-comment:hover { border-color: var(--fs-line-strong); }
.fs-theme .topic-comment + .topic-comment { margin-top: 10px; }
.fs-theme .comment-header { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px dashed var(--fs-line); }
.fs-theme .comment-header .avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 0;
  background: var(--fs-indigo-soft);
  color: var(--fs-indigo-ink);
  font-weight: 800;
  clip-path: var(--fs-star);
}
.fs-theme .comment-body { line-height: 1.85; }
.fs-theme .comment-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fs-theme .comment-compose textarea { min-height: 120px; }
.fs-theme .moderator-note { padding: 8px 12px; border-radius: var(--fs-r-sm); background: var(--fs-saffron-soft); color: var(--fs-saffron-ink); font-size: .84rem; font-weight: 700; }
.fs-theme .section-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  margin-inline-start: 6px;
  border-radius: 999px;
  background: var(--hue-soft);
  color: var(--hue-ink);
  font-size: .76rem;
  font-weight: 800;
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   الرفع
   -------------------------------------------------------------------------- */
.fs-theme .upload-form { display: grid; gap: 16px; }
.fs-theme .upload-section { padding: 18px 20px; display: grid; gap: 10px; --hue: var(--fs-saffron); --hue-ink: var(--fs-saffron-ink); --hue-soft: var(--fs-saffron-soft); }
.fs-theme .upload-section > h2 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.fs-theme .upload-section > label,
.fs-theme .topic-editor label { color: var(--fs-ink); font-weight: 700; font-size: .88rem; }
.fs-theme .upload-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.fs-theme .upload-image-field {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1.5px dashed var(--fs-line-strong);
  border-radius: var(--fs-r);
  background: var(--fs-surface-2);
  transition: border-color var(--fs-fast) var(--fs-ease), background-color var(--fs-fast);
}
.fs-theme .upload-image-field:hover,
.fs-theme .upload-image-field:focus-within { border-color: var(--fs-saffron); background: var(--fs-saffron-soft); }
.fs-theme .upload-preview { border-radius: var(--fs-r); overflow: hidden; }
.fs-theme .topic-editor .editor-actions,
.fs-theme .upload-form .editor-actions {
  position: sticky;
  bottom: 12px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r-lg);
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  box-shadow: var(--fs-shadow-3);
}

/* --------------------------------------------------------------------------
   الرسائل
   -------------------------------------------------------------------------- */
.fs-theme .pm-thread-list { display: grid; gap: 8px; }
.fs-theme .pm-thread-list > .pm-message,
.fs-theme .pm-thread-list > article {
  position: relative;
  padding: 14px 16px;
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r);
  background: var(--fs-surface);
  transition: border-color var(--fs-fast) var(--fs-ease), transform var(--fs-mid) var(--fs-spring), box-shadow var(--fs-mid);
}
.fs-theme .pm-thread-list > article:hover { border-color: var(--fs-pomegranate); transform: translateY(-1px); box-shadow: var(--fs-shadow-2); }
.fs-theme .pm-thread-list h3 { margin: 0 0 4px; font-size: .98rem; }
.fs-theme .pm-thread-list h3 a { color: var(--fs-ink); text-decoration: none; font-weight: 800; }
.fs-theme .pm-thread-list h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.fs-theme .pm-thread-list a:not(h3 a) { position: relative; z-index: 1; }
.fs-theme .pm-preview { color: var(--fs-ink-2); font-size: .88rem; overflow-wrap: anywhere; }
.fs-theme .pm-row-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.fs-theme .pm-conversation { display: grid; gap: 12px; }
.fs-theme .pm-conversation-heading {
  padding: 16px 18px;
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r-lg);
  background: radial-gradient(360px 140px at 100% 0%, var(--fs-pomegranate-soft), transparent 75%), var(--fs-surface);
}
.fs-theme .pm-conversation-heading h2 { margin: 0 0 4px; }
.fs-theme .pm-conversation .pm-message { padding: 14px 16px; max-width: min(720px, 92%); }
.fs-theme .pm-conversation .pm-message:nth-of-type(even) { margin-inline-start: auto; background: var(--fs-pomegranate-soft); border-color: transparent; }
.fs-theme .pm-compose {
  padding: 16px 18px;
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r-lg);
  background: var(--fs-surface);
  box-shadow: var(--fs-shadow-1), inset 0 3px 0 var(--fs-pomegranate);
}
.fs-theme .pm-compose textarea { width: 100%; box-sizing: border-box; min-height: 120px; }
.fs-theme .pm-blocked { padding: 12px 14px; border-radius: var(--fs-r); background: var(--fs-sunken); color: var(--fs-ink-2); }
.fs-theme .legacy-message { padding: 16px 18px; }
.fs-theme .legacy-message-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 10px 12px; border-radius: var(--fs-r-sm); background: var(--fs-surface-2); font-size: .85rem; }
.fs-theme .legacy-message-meta dt { color: var(--fs-muted); font-weight: 700; }
.fs-theme .legacy-message-meta dd { margin: 0; }

/* --------------------------------------------------------------------------
   الإشعارات
   -------------------------------------------------------------------------- */
.fs-theme .notification-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-block-end: 12px; }
.fs-theme .notification-list { display: grid; gap: 8px; }
.fs-theme .notification-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 14px 16px;
  padding-inline-start: 22px;
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r);
  background: var(--fs-surface);
}
.fs-theme .notification-row.is-unread { border-color: rgba(106, 154, 46, .4); background: linear-gradient(90deg, var(--fs-surface), var(--fs-olive-soft)); }
.fs-theme .notification-row.is-unread::before {
  content: "";
  position: absolute;
  inset-inline-start: 7px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  background: var(--fs-olive);
  clip-path: var(--fs-star);
}
.fs-theme .notification-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 4px; }
.fs-theme .notification-meta > span:first-child {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--fs-olive-soft);
  color: var(--fs-olive-ink);
  font-size: .74rem;
  font-weight: 800;
}
.fs-theme .notification-meta time { color: var(--fs-muted); font-family: var(--fs-font-num); font-size: .76rem; }
.fs-theme .notification-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.fs-theme .notification-settings,
.fs-theme .notification-preferences { padding: 18px 20px; }

/* --------------------------------------------------------------------------
   الشات
   -------------------------------------------------------------------------- */
.fs-theme .chat-widget { padding: 16px; box-shadow: var(--fs-shadow-1), inset 0 3px 0 var(--fs-pomegranate); }
.fs-theme .chat-history {
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r);
  background:
    radial-gradient(circle, rgba(214, 60, 90, .06) 1px, transparent 1.4px) 0 0 / 14px 14px,
    var(--fs-surface-2);
}
.fs-theme .chat-compose { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fs-theme .chat-compose input:not([type="hidden"]),
.fs-theme .chat-compose textarea { flex: 1 1 220px; min-width: 0; border-radius: 999px; }
.fs-theme .chat-compose .button.primary { border-radius: 999px; background: var(--fs-pomegranate); box-shadow: 0 6px 16px -8px rgba(214, 60, 90, .8); }
.fs-theme .chat-compose .button.primary:hover { background: var(--fs-pomegranate-ink); }
.fs-theme .chat-status { color: var(--fs-muted); font-size: .8rem; }
.fs-theme .chat-smilies-picker { border: 1px solid var(--fs-line); border-radius: var(--fs-r); background: var(--fs-surface); box-shadow: var(--fs-shadow-3); }

/* --------------------------------------------------------------------------
   الطلبات والعروض
   -------------------------------------------------------------------------- */
.fs-theme .request-list { display: grid; gap: 10px; }
.fs-theme .request-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 14px 16px;
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-r);
  background: var(--fs-surface);
  transition: border-color var(--fs-fast) var(--fs-ease), transform var(--fs-mid) var(--fs-spring), box-shadow var(--fs-mid);
}
.fs-theme .request-row:hover { border-color: var(--fs-violet); transform: translateY(-1px); box-shadow: var(--fs-shadow-2); }
.fs-theme .request-row h3 { margin: 4px 0; font-size: 1rem; }
.fs-theme .request-row h3 a { color: var(--fs-ink); font-weight: 800; text-decoration: none; }
.fs-theme .request-row h3 a:hover { color: var(--fs-violet-ink); }
.fs-theme .request-row .tag { background: var(--fs-violet-soft); color: var(--fs-violet-ink); font-size: .72rem; font-weight: 800; padding: 1px 9px; border: 0; }
.fs-theme .request-meta { color: var(--fs-muted); font-size: .82rem; }
.fs-theme .request-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.fs-theme .request-counts span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--fs-surface-2);
  border: 1px solid var(--fs-line);
  color: var(--fs-ink-2);
  font-size: .8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.fs-theme .request-detail,
.fs-theme .request-form { padding: 18px 20px; }
.fs-theme .request-candidate { padding: 12px 14px; border-radius: var(--fs-r); background: var(--fs-surface-2); border: 1px solid var(--fs-line); }

/* --------------------------------------------------------------------------
   صفحات الحساب الفرعية والمجتمع
   -------------------------------------------------------------------------- */
.fs-theme .points-balance {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0 0;
  padding: 10px 18px;
  border-radius: var(--fs-r-lg);
  background: var(--fs-saffron-soft);
  color: var(--fs-ink);
  font-family: var(--fs-font-num);
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.1;
}
.fs-theme .points-balance span { font-family: var(--fs-font); font-size: .9rem; color: var(--fs-saffron-ink); }
.fs-theme.fs-view-member-rewards .points-balance { background: var(--fs-violet-soft); }
.fs-theme.fs-view-member-rewards .points-balance span { color: var(--fs-violet-ink); }

.fs-theme .reading-block { padding: 18px 20px; line-height: 1.8; }
.fs-theme .reading-block > h2 { margin-top: 0; font-size: 1.05rem; font-weight: 800; }

.fs-theme .sharing-records { display: grid; gap: 10px; }
.fs-theme .sharing-record { padding: 14px 16px; border: 1px solid var(--fs-line); border-radius: var(--fs-r); background: var(--fs-surface); }
.fs-theme .sharing-facts,
.fs-theme .sharing-policy-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.fs-theme .sharing-facts > div,
.fs-theme .sharing-policy-summary > div { padding: 10px 12px; border-radius: var(--fs-r-sm); background: var(--fs-teal-soft); }
.fs-theme .sharing-facts dt,
.fs-theme .sharing-policy-summary dt { color: var(--fs-teal-ink); font-size: .78rem; font-weight: 800; }
.fs-theme .sharing-facts dd,
.fs-theme .sharing-policy-summary dd { margin: 2px 0 0; font-family: var(--fs-font-num); font-weight: 800; }

.fs-theme .information-article { padding: 24px clamp(18px, 3vw, 36px); }
.fs-theme .information-article .topic-body { max-width: 75ch; font-size: 1.02rem; line-height: 1.95; }
.fs-theme .information-article h2,
.fs-theme .information-article h3 { position: relative; padding-inline-start: 22px; }
.fs-theme .information-article h2::before,
.fs-theme .information-article h3::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: .45em;
  width: 12px;
  height: 12px;
  background: var(--hue);
  clip-path: var(--fs-star);
}

/* الجداول في صفحات الأعضاء والمرفوعات والنشاط: الاسم بارز والأرقام بخط ثابت */
.fs-theme .table-wrap td .member-name { font-weight: 800; text-decoration: none; }
.fs-theme .activity-table td,
.fs-theme .torrent-table td { white-space: normal; }

/* --------------------------------------------------------------------------
   وحدات الرئيسية
   -------------------------------------------------------------------------- */
.fs-theme .home-module > section { padding: 16px 18px; }
.fs-theme .home-section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.fs-theme .home-section-heading h2 { margin: 0; }

.fs-theme .home-statistics,
.fs-theme .home-account-balances { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 0; }
.fs-theme .home-statistics > div,
.fs-theme .home-account-balances > div { padding: 12px; border-radius: var(--fs-r); background: var(--hue-soft); }
.fs-theme .home-statistics dt,
.fs-theme .home-account-balances dt { color: var(--hue-ink); font-size: .76rem; font-weight: 800; }
.fs-theme .home-statistics dd,
.fs-theme .home-account-balances dd { margin: 4px 0 0; color: var(--fs-ink); font-family: var(--fs-font-num); font-size: 1.15rem; font-weight: 800; text-align: start; }

.fs-theme .home-uploaders ol,
.fs-theme .home-uploaders ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fs-theme .home-uploaders li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--fs-r-sm); transition: background-color var(--fs-fast); }
.fs-theme .home-uploaders li:hover { background: var(--fs-surface-2); }
.fs-theme .uploader-rank {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  background: var(--fs-saffron-soft);
  color: var(--fs-saffron-ink);
  font-family: var(--fs-font-num);
  font-size: .84rem;
  font-weight: 800;
  clip-path: var(--fs-star);
}
.fs-theme .home-uploaders li:nth-child(1) .uploader-rank { background: var(--fs-saffron); color: #fff; }
.fs-theme .home-uploaders li:nth-child(2) .uploader-rank { background: var(--fs-slate-soft); color: var(--fs-slate-ink); }

.fs-theme .home-news { display: grid; gap: 8px; }
.fs-theme .home-news article,
.fs-theme .home-news li { padding: 10px 12px; border-radius: var(--fs-r-sm); background: var(--fs-surface-2); }

.fs-theme .home-account-box .member-card-avatar img,
.fs-theme .home-account-box .member-card-avatar { border-radius: 0; clip-path: var(--fs-star); }
.fs-theme .home-account-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; }
.fs-theme .home-account-shortcuts a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--fs-indigo-soft);
  color: var(--fs-indigo-ink);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
}
.fs-theme .home-account-shortcuts a:hover { background: var(--fs-indigo); color: #fff; }

.fs-theme .home-community-links a { font-weight: 700; }
.fs-theme .presence-module-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fs-theme .presence-names .member-name { font-weight: 700; }

/* صناديق المحتوى القابلة للتكرار */
.fs-theme .content-box { padding: 16px 18px; margin-block: 14px; }
.fs-theme .content-box-text { line-height: 1.85; }
.fs-theme .content-box-images img { border-radius: var(--fs-r); }

/* --------------------------------------------------------------------------
   الإدارة: إطار أنظف دون تغيير التخطيط
   -------------------------------------------------------------------------- */
.fs-theme .admin-nav { padding: 8px; }
.fs-theme .admin-nav-group + .admin-nav-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--fs-line); }
.fs-theme .admin-nav a { display: flex; align-items: center; min-height: 38px; padding: 0 10px; font-size: .88rem; font-weight: 600; }
.fs-theme .admin-section { padding: 18px 20px; }
.fs-theme .admin-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.fs-theme .admin-summary > * { padding: 12px 14px; border-radius: var(--fs-r); background: var(--fs-slate-soft); }
.fs-theme .admin-note { font-size: .88rem; }

/* --------------------------------------------------------------------------
   الاستجابة للجوال
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .fs-theme .content > .page-heading,
  .fs-theme .content > .topic-heading,
  .fs-theme .admin-main > .page-heading { padding: 16px; border-radius: var(--fs-r-lg); }
  .fs-theme .page-heading .editor-actions,
  .fs-theme .topic-heading .editor-actions { width: 100%; }
  .fs-theme .page-heading .editor-actions .button,
  .fs-theme .topic-heading .editor-actions .button { flex: 1 1 auto; }
  .fs-theme .pm-nav,
  .fs-theme .sharing-tabs { width: 100%; box-sizing: border-box; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .fs-theme .pm-nav a,
  .fs-theme .sharing-tabs a { flex: none; }
  .fs-theme .pm-conversation .pm-message { max-width: 100%; }
  .fs-theme .topic-main .topic-section,
  .fs-theme .topic-side .topic-side-section,
  .fs-theme .upload-section,
  .fs-theme .console-form,
  .fs-theme .reading-block { padding: 16px; }
  .fs-theme .topic-editor .editor-actions,
  .fs-theme .upload-form .editor-actions { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .fs-theme .topic-editor .editor-actions .button,
  .fs-theme .upload-form .editor-actions .button { flex: 1 1 0; }
  .fs-theme .pagination { border-radius: var(--fs-r-lg); }
}

@media (prefers-reduced-motion: no-preference) {
  .fs-theme .notification-row.is-unread::before { animation: fs-spin-in 700ms var(--fs-spring) both; }
}
