/* ============================================================
   موقع شات — طبقة التطبيق (App shell v1)
   تُحمَّل بعد ui.css: شريط تنقل واحد، رؤوس صفحات، بطاقات،
   وإصلاحات الهاتف (safe-area · أهداف لمس · بلا تمرير أفقي).
   ============================================================ */

:root {
  --arf-app-max: 720px;
  --arf-tb-h: 64px;
  --arf-brand: #F2723C;
  --arf-brand-2: #FFA64D;
  --arf-brand-ink: #B4441A;
  --arf-brand-soft: rgba(242, 114, 60, 0.11);
  --arf-ring: 0 0 0 3px rgba(242, 114, 60, 0.22);
}

html[data-theme="light"] {
  --arf-bg: #FBF7F1;
  --arf-bg-soft: #FFFFFF;
  --arf-bg-deep: #F4EDE3;
  --arf-cream: #F8F2E9;
  --arf-text: #191410;
  --arf-text-muted: #786A5D;
  --arf-text-soft: #A79485;
  --arf-hairline: rgba(25, 20, 16, 0.085);
  --arf-border: rgba(25, 20, 16, 0.10);
  --arf-sh-sm: 0 1px 2px rgba(40, 26, 12, .05), 0 4px 14px rgba(40, 26, 12, .05);
  --arf-sh-md: 0 10px 30px rgba(52, 32, 12, .10);
  --arf-grad-bg: radial-gradient(680px 420px at 96% -6%, rgba(255, 166, 77, .20), transparent 60%),
             radial-gradient(620px 420px at -8% 8%, rgba(242, 114, 60, .10), transparent 62%),
             var(--arf-bg);
}

/* ---------- أساس آمن للهاتف ---------- */
html, body { max-width: 100%; overflow-x: hidden; }
body { -webkit-tap-highlight-color: transparent; }
img, svg, video { max-width: 100%; }
button, a, input, select, textarea { touch-action: manipulation; }
:focus-visible { outline: none; box-shadow: var(--arf-ring); border-radius: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============================================================
   شريط التنقل السفلي (يظهر على كل المقاسات)
   ============================================================ */
.tabbar-wrap {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 120;
  display: flex; justify-content: center;
  padding: 0 12px calc(10px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}
.tabbar {
  pointer-events: auto;
  width: min(560px, 100%);
  display: flex; align-items: flex-end; justify-content: space-around;
  gap: 2px;
  background: color-mix(in srgb, var(--arf-bg-soft) 93%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border: 1px solid var(--arf-hairline);
  border-radius: 26px;
  box-shadow: 0 10px 34px rgba(52, 32, 12, .13), 0 2px 6px rgba(52, 32, 12, .05);
  padding: 7px 6px;
  position: relative;
}
html[data-theme="dark"] .tabbar {
  background: rgba(28, 23, 18, .92);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .5);
}

.tnv-item {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: 3px; padding: 6px 2px 5px;
  border: 0; background: none; font-family: inherit; cursor: pointer;
  color: var(--arf-text-soft); text-decoration: none;
  border-radius: 18px;
  transition: color .18s var(--arf-ease), transform .18s var(--arf-ease), background .18s var(--arf-ease);
}
.tnv-item .tnv-ico {
  position: relative;
  width: 34px; height: 30px; display: grid; place-items: center;
  border-radius: 12px;
  transition: background .18s var(--arf-ease), transform .18s var(--arf-ease);
}
.tnv-item svg { width: 22px; height: 22px; }
.tnv-item .tnv-label {
  font-size: .66rem; font-weight: 700; letter-spacing: -.1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.tnv-item:active .tnv-ico { transform: scale(.9); }
.tnv-item.active { color: var(--arf-brand); }
.tnv-item.active .tnv-ico { background: var(--arf-brand-soft); }
.tnv-item.active .tnv-label { font-weight: 800; }

/* زر الدردشة المركزي */
.tnv-item.tb-center { flex: 0 0 66px; justify-content: flex-end; }
.tnv-item.tb-center .tnv-ico {
  width: 52px; height: 52px; border-radius: 20px;
  background: var(--arf-grad-primary); color: #fff;
  box-shadow: 0 8px 20px rgba(242, 114, 60, .38);
  transform: translateY(-14px);
  border: 3px solid var(--arf-bg-soft);
}
html[data-theme="dark"] .tnv-item.tb-center .tnv-ico { border-color: #1C1712; }
.tnv-item.tb-center svg { width: 24px; height: 24px; }
.tnv-item.tb-center .tnv-label { display: none; }
.tnv-item.tb-center { padding-bottom: 4px; }
.tnv-item.tb-center.active .tnv-ico { background: var(--arf-grad-primary); }
.tnv-item.tb-center.active .tnv-label { color: var(--arf-brand); }

.tnv-badge[hidden] { display: none; }
.tnv-badge {
  position: absolute; top: -6px; inset-inline-end: -7px;
  min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 999px; background: var(--arf-danger); color: #fff;
  font-family: var(--arf-font-num); font-size: .58rem; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--arf-bg-soft);
}
html[data-theme="dark"] .tnv-badge { border-color: #1C1712; }

/* مساحة أسفل الصفحات حتى لا يغطي الشريط المحتوى */
body.has-tabbar { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
.app-page, .dmc-app, .ms-wrap, .rmx-app {
  padding-bottom: calc(var(--arf-tb-h) + 34px + env(safe-area-inset-bottom, 0px));
}

/* ============================================================
   رأس الصفحة الموحّد
   ============================================================ */
.ph {
  position: sticky; top: 0; z-index: 40;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 0 10px;
  background: color-mix(in srgb, var(--arf-bg) 88%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--arf-ease);
}
.ph.stuck { border-bottom-color: var(--arf-hairline); }
.ph-in { width: min(var(--arf-app-max), 92vw); margin-inline: auto; }
.ph-row { display: flex; align-items: center; gap: 10px; }
.ph-titles { min-width: 0; flex: 1; }
.ph-eyebrow {
  font-family: var(--arf-font-num); font-size: .64rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--arf-text-soft);
  display: block; margin-bottom: 1px;
}
.ph-title { font-size: 1.5rem; font-weight: 900; letter-spacing: -.6px; line-height: 1.25; }
.ph-sub { font-size: .78rem; color: var(--arf-text-muted); margin-top: 2px; }
.ph-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 15px;
  display: grid; place-items: center; cursor: pointer;
  background: var(--arf-bg-soft); border: 1px solid var(--arf-hairline);
  color: var(--arf-text-muted); box-shadow: var(--arf-sh-sm);
  transition: transform .14s var(--arf-ease), color .18s var(--arf-ease), border-color .18s var(--arf-ease);
}
.icon-btn:hover { color: var(--arf-text); border-color: var(--arf-border-hover); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn.accent { color: #fff; background: var(--arf-grad-primary); border-color: transparent; box-shadow: 0 6px 16px var(--arf-primary-glow); }

.avatar-btn {
  width: 42px; height: 42px; border-radius: 15px; overflow: hidden;
  display: grid; place-items: center; cursor: pointer; padding: 0;
  background: var(--arf-cream); border: 1px solid var(--arf-hairline);
  box-shadow: var(--arf-sh-sm); font-size: 1.15rem;
}
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   لوحة ترحيب بعد التسجيل
   ============================================================ */
.welcome {
  width: min(var(--arf-app-max), 92vw); margin: 10px auto 4px;
  border-radius: 24px; padding: 18px;
  background: linear-gradient(135deg, rgba(242,114,60,.14), rgba(255,166,77,.07));
  border: 1px solid rgba(242,114,60,.20);
  display: flex; align-items: center; gap: 14px;
  animation: wIn .5s var(--arf-ease) both;
} from { opacity: 0; transform: translateY(-8px); }
.welcome .w-ico {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 16px;
  display: grid; place-items: center; color: #fff;
  background: var(--arf-grad-primary); box-shadow: 0 8px 18px rgba(242,114,60,.3);
}
.welcome b { display: block; font-size: .95rem; font-weight: 800; }
.welcome span { display: block; font-size: .78rem; color: var(--arf-text-muted); margin-top: 2px; }
.welcome .w-x { margin-inline-start: auto; }
.welcome[hidden] { display: none; }

/* ============================================================
   الغرف — نسخة التطبيق
   ============================================================ */
.rmx-app { width: min(var(--arf-app-max), 92vw); margin-inline: auto; }

.rmx-hero {
  position: relative; overflow: hidden;
  border-radius: 26px; padding: 20px;
  background: linear-gradient(135deg, var(--arf-primary) 0%, var(--arf-primary-2) 100%);
  color: #fff; box-shadow: 0 14px 34px rgba(109, 74, 255, .28);
  margin-bottom: 18px;
}
.rmx-hero::after {
  content: ''; position: absolute; inset-block-start: -40%; inset-inline-end: -18%;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255, 255, 255, .16);
}
.rmx-hero::before {
  content: ''; position: absolute; inset-block-end: -60%; inset-inline-start: -10%;
  width: 190px; height: 190px; border-radius: 50%;
  background: rgba(255, 255, 255, .10);
}
.rmx-hero .h-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .68rem; font-weight: 800;
  background: rgba(255, 255, 255, .22); border-radius: 999px; padding: 4px 10px;
  position: relative; z-index: 1;
}
.rmx-hero h2 { font-size: 1.42rem; font-weight: 900; margin: 10px 0 4px; letter-spacing: -.5px; position: relative; z-index: 1; }
.rmx-hero p { font-size: .82rem; opacity: .92; position: relative; z-index: 1; }
.rmx-hero .h-cta {
  position: relative; z-index: 1; margin-top: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 14px;
  background: #fff; color: var(--arf-brand-ink); font-family: inherit;
  font-size: .86rem; font-weight: 800; text-decoration: none;
  box-shadow: 0 6px 16px rgba(90, 40, 10, .18);
}
.rmx-hero .h-live {
  position: absolute; z-index: 1; inset-block-start: 18px; inset-inline-end: 18px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--arf-font-num); font-size: .74rem; font-weight: 800;
}
.rmx-hero .h-live i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 2s infinite; }

.rmx-chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.rmx-chips::-webkit-scrollbar { display: none; }
.rmx-chip {
  flex: 0 0 auto; height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--arf-hairline); background: var(--arf-bg-soft);
  font-family: inherit; font-size: .78rem; font-weight: 700; color: var(--arf-text-muted);
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: all .16s var(--arf-ease);
}
.rmx-chip.on { background: var(--arf-text); color: var(--arf-bg-soft); border-color: var(--arf-text); }

.rmx-group { margin-bottom: 16px; }
.rmx-group-h {
  display: flex; align-items: center; gap: 8px;
  font-size: .74rem; font-weight: 800; color: var(--arf-text-soft);
  margin: 4px 4px 8px;
}
.rmx-group-h::after { content: ''; height: 1px; flex: 1; background: var(--arf-hairline); }

.rmx-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.rmx-grid > .rmx-card:only-child { grid-column: 1 / -1; } .rmx-grid { grid-template-columns: 1fr 1fr; }

.rmx-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--arf-bg-soft); border: 1px solid var(--arf-hairline);
  border-radius: 20px; padding: 12px 13px; text-decoration: none;
  box-shadow: var(--arf-sh-sm);
  transition: transform .16s var(--arf-ease), box-shadow .16s var(--arf-ease), border-color .16s var(--arf-ease);
}
.rmx-card:hover { transform: translateY(-2px); box-shadow: var(--arf-sh-md); border-color: var(--arf-border-hover); }
.rmx-card:active { transform: scale(.99); }
.rmx-tile {
  width: 50px; height: 50px; flex: 0 0 50px; border-radius: 17px;
  display: grid; place-items: center; font-size: 1.5rem;
  background: linear-gradient(150deg, var(--arf-cream), var(--arf-bg-soft));
  border: 1px solid var(--arf-hairline);
}
.rmx-card.hot .rmx-tile { background: linear-gradient(150deg, rgba(242,114,60,.16), rgba(255,166,77,.08)); border-color: rgba(242,114,60,.22); }
.rmx-c-body { min-width: 0; flex: 1; }
.rmx-c-name { font-size: .92rem; font-weight: 800; display: block; }
.rmx-c-sub { display: flex; align-items: center; gap: 6px; font-size: .73rem; color: var(--arf-text-muted); margin-top: 3px; }
.rmx-c-sub .live { width: 6px; height: 6px; border-radius: 50%; background: var(--arf-accent); }
.rmx-c-sub .live.none { background: var(--arf-text-soft); }
.rmx-c-go {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 12px;
  display: grid; place-items: center; color: var(--arf-text-soft);
  background: var(--arf-cream);
}
.rmx-card.hot .rmx-c-go { background: var(--arf-brand-soft); color: var(--arf-brand); }
.rmx-fallback { text-align: center; padding: 34px 10px; color: var(--arf-text-muted); font-size: .86rem; }
.rmx-fallback a { color: var(--arf-brand); font-weight: 700; }

/* صفحات الدول (SEO) */
.rmx-seo {
  margin-top: 22px; border-top: 1px solid var(--arf-hairline); padding-top: 20px;
}
.rmx-seo h2 { font-size: 1.08rem; font-weight: 800; margin-bottom: 6px; }
.rmx-seo p { font-size: .82rem; color: var(--arf-text-muted); line-height: 1.9; }
.rmx-seo-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rmx-seo-links a {
  font-size: .74rem; color: var(--arf-text-muted); text-decoration: none;
  border: 1px solid var(--arf-hairline); border-radius: 999px; padding: 5px 10px;
  background: var(--arf-bg-soft);
}

/* ============================================================
   الإعدادات
   ============================================================ */
.sfx-sec { margin-bottom: 16px; }
#st-account + .sfx-sec, #st-account + .st-group { margin-top: 18px; }
.sfx-sec > h2 {
  font-size: .72rem; font-weight: 800; color: var(--arf-text-soft);
  letter-spacing: .04em; margin: 0 6px 8px;
}
.sfx-card {
  background: var(--arf-bg-soft); border: 1px solid var(--arf-hairline);
  border-radius: 22px; overflow: hidden; box-shadow: var(--arf-sh-sm);
}
.sfx-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 15px;
  color: var(--arf-text); text-decoration: none; min-height: 60px;
}
.sfx-row + .sfx-row, .sfx-card > .sfx-row + .sfx-field { border-top: 1px solid var(--arf-hairline); }
.sfx-ico {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 12px;
  display: grid; place-items: center; background: var(--arf-brand-soft); color: var(--arf-brand);
}
.sfx-ico svg { width: 18px; height: 18px; }
.sfx-txt { min-width: 0; flex: 1; }
.sfx-txt b { display: block; font-size: .88rem; font-weight: 700; }
.sfx-txt span { display: block; font-size: .73rem; color: var(--arf-text-muted); margin-top: 1px; }
.sfx-arrow { color: var(--arf-text-soft); flex: 0 0 auto; }
.set-value { font-size: .78rem; color: var(--arf-text-soft); font-weight: 700; }

.sfx-profile { display: flex; align-items: center; gap: 14px; padding: 18px 16px; position: relative; }
.sfx-profile > .icon-btn.accent { position: absolute; inset-inline-start: 16px; bottom: 16px; width: 38px; height: 38px; border-radius: 13px; }
.sfx-profile .p-av {
  width: 62px; height: 62px; flex: 0 0 62px; border-radius: 22px;
  display: grid; place-items: center; font-size: 1.8rem; overflow: hidden;
  background: var(--arf-cream); border: 1px solid var(--arf-hairline);
}
.sfx-profile .p-av img { width: 100%; height: 100%; object-fit: cover; }
.sfx-profile .p-info { min-width: 0; flex: 1; }
.sfx-profile .p-name { font-size: 1.05rem; font-weight: 900; display: block; }
.sfx-profile .p-meta { font-size: .76rem; color: var(--arf-text-muted); margin-top: 2px; display: block; }
.sfx-profile .p-badge {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 6px;
  font-size: .68rem; font-weight: 800; color: #17805C;
  background: var(--arf-accent-soft); border-radius: 999px; padding: 2px 9px;
}

.sfx-field { padding: 12px 15px; }
.sfx-field label { display: block; font-size: .73rem; font-weight: 700; color: var(--arf-text-muted); margin-bottom: 6px; }
.sfx-field input, .sfx-field select {
  width: 100%; height: 44px; border-radius: 13px; padding: 0 12px;
  background: var(--arf-cream); border: 1px solid var(--arf-hairline);
  font-family: inherit; font-size: .9rem; color: var(--arf-text); outline: none;
  transition: border-color .16s var(--arf-ease), box-shadow .16s var(--arf-ease);
}
.sfx-field input:focus, .sfx-field select:focus { border-color: var(--arf-brand); box-shadow: var(--arf-ring); }
.sfx-actions { padding: 12px 15px 15px; }
.sfx-actions .btn { width: 100%; height: 46px; border-radius: 14px; }
.btn-danger-soft { color: var(--arf-danger); }

/* ============================================================
   التسجيل السريع (v2)
   ============================================================ */
.jn-wrap { width: min(560px, 100%); margin-inline: auto; padding: 0 16px; }
.jn-hero { text-align: center; padding: 8px 0 18px; }
.jn-hero .badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .68rem; font-weight: 800; color: var(--arf-brand);
  background: var(--arf-brand-soft); border-radius: 999px; padding: 4px 11px;
}
.jn-hero h1 { font-size: 1.7rem; font-weight: 900; letter-spacing: -.8px; margin: 10px 0 6px; }
.jn-hero p { font-size: .84rem; color: var(--arf-text-muted); line-height: 1.7; }

.jn-steps { display: flex; align-items: center; gap: 6px; justify-content: center; margin-bottom: 14px; }
.jn-steps i { height: 4px; border-radius: 999px; background: var(--arf-hairline); flex: 1; max-width: 54px; }
.jn-steps i.on { background: var(--arf-grad-primary); }

.jn-card { border-radius: 26px; padding: 18px 16px; }
.jn-avatar-block { margin-bottom: 14px; flex-direction: row; align-items: center; gap: 12px; }
.jn-av {
  width: 66px; height: 66px; flex: 0 0 66px; border-radius: 22px; font-size: 2rem;
  background: linear-gradient(150deg, var(--arf-cream), var(--arf-bg-soft));
  border: 1px solid var(--arf-hairline);
  box-shadow: 0 10px 26px rgba(80, 50, 20, .10);
}
.jn-av-grid { gap: 6px; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding: 2px 2px 6px; scrollbar-width: none; }
.jn-av-grid::-webkit-scrollbar { display: none; }
.jn-av-grid button { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 13px; font-size: 1.15rem; }
.jn-field { margin-bottom: 13px; }
.jn-field input[type="text"], .jn-field input[type="password"], .jn-field select {
  height: 50px; border-radius: 15px; background: var(--arf-cream);
}
.jn-cta { height: 54px; border-radius: 18px; font-size: 1rem; }
.jn-alt { text-align: center; margin-top: 12px; font-size: .8rem; color: var(--arf-text-muted); }
.jn-alt a { color: var(--arf-brand); font-weight: 800; }

/* شاشة نجاح التسجيل */
.jn-done {
  position: fixed; inset: 0; z-index: 400; display: none;
  place-items: center; padding: 24px;
  background: var(--arf-bg); text-align: center;
}
.jn-done.on { display: grid; animation: wIn .3s var(--arf-ease) both; }
.jn-done .tick {
  width: 86px; height: 86px; border-radius: 30px; margin: 0 auto 16px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #1FA97A, #35C795);
  box-shadow: 0 14px 32px rgba(31, 169, 122, .34);
  animation: tickIn .5s var(--arf-spring) both;
} from { transform: scale(.6); opacity: 0; }
.jn-done h2 { font-size: 1.35rem; font-weight: 900; }
.jn-done p { font-size: .86rem; color: var(--arf-text-muted); margin-top: 6px; }
.jn-done .loader {
  margin: 18px auto 0; width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid rgba(242,114,60,.25); border-top-color: var(--arf-brand);
  animation: dcspin .8s linear infinite;
}

/* ============================================================
   لمسات على صفحة الاكتشاف والرسائل
   ============================================================ */
.dc-head-in { width: min(var(--arf-app-max), 92vw); }
.dmc-body { width: min(var(--arf-app-max), 92vw); }
.ms-wrap { width: min(var(--arf-app-max), 92vw); }
.dmc-row { border-radius: 20px; }
.dmc-row:active { background: var(--arf-cream); }
.dmc-row.is-guest { background: color-mix(in srgb, var(--arf-primary) 4%, transparent); }
.dmc-guest-badge {
  flex: 0 0 auto; font-size: .64rem; font-weight: 800;
  color: var(--arf-primary); background: var(--arf-primary-soft);
  border: 1px solid color-mix(in srgb, var(--arf-primary) 22%, transparent);
  border-radius: 999px; padding: 1px 7px;
}
.dc-me-btn { width: 42px; height: 42px; border-radius: 15px; }
.dmc-icon-btn { width: 42px; height: 42px; border-radius: 15px; border: 1px solid var(--arf-hairline); background: var(--arf-bg-soft); box-shadow: var(--arf-sh-sm); }
.dmc-search-row input { height: 46px; }
.dmc-filters-btn { height: 46px; flex-basis: 46px; }
.dmc-chat-btn { width: 40px; height: 40px; flex-basis: 40px; border-radius: 14px; }

.ms-row { border-radius: 18px; }
.ms-nav-cta {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 14px; border-radius: 999px;
  background: var(--arf-brand-soft); color: var(--arf-brand);
  font-size: .78rem; font-weight: 800; text-decoration: none;
}
  .hero-cta { align-items: stretch; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .site-header .header-actions .btn-primary { display: none; }
  .sfx-row { flex-wrap: wrap; row-gap: 8px; }
  .sfx-row .st-seg { order: 3; width: 100%; }
  .st-seg button { flex: 1; }
  .ms-nav-cta span { display: none; }
  .ph-title { font-size: 1.3rem; }
  .tnv-item .tnv-label { font-size: .6rem; }
  .tnv-item.tb-center .tnv-ico { width: 46px; height: 46px; }
  .rmx-hero h2 { font-size: 1.2rem; }
  .dc-brand { font-size: 1.25rem; }
  .tabbar, .rmx-card, .welcome { transition: none !important; animation: none !important; }

/* قائمة المحظورين داخل صفحة الإعدادات */
.st-blocked { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; }
.st-blocked[hidden] { display: none !important; }
.st-blk-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--arf-bg-soft); border: 1px solid var(--arf-hairline);
  border-radius: 14px; padding: 9px 11px;
}
.st-blk-av {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1rem; flex: none; color: #fff;
}
.st-blk-nm { flex: 1; font-weight: 800; font-size: .87rem; }
.st-blk-un {
  border: 1px solid var(--arf-hairline); background: var(--arf-surface); color: var(--arf-text);
  border-radius: 999px; padding: 7px 12px; font-family: inherit;
  font-size: .76rem; font-weight: 800;
}
.st-blk-empty { text-align: center; color: var(--arf-text-muted); font-size: .84rem; padding: 12px 6px; }

/* ===== هوية موقع شات ===== */
:root, html[data-theme="light"]{
  --arf-primary:#6D4AFF;--arf-primary-2:#9B7BFF;
  --arf-primary-glow:rgba(109,74,255,.22);
  --arf-accent:#7C5CFF;--arf-accent-soft:rgba(124,92,255,.12);
  --arf-border-hover:rgba(109,74,255,.45);
  --arf-grad-primary:linear-gradient(135deg,#6D4AFF 0%,#9B7BFF 100%);
  --arf-sh-glow:0 10px 26px rgba(109,74,255,.24);
  --arf-brand:#6D4AFF;--arf-brand-2:#9B7BFF;--arf-brand-ink:#4A2AD6;
  --arf-brand-soft:rgba(109,74,255,.11);
  --arf-ring:0 0 0 3px rgba(109,74,255,.22);
  --arf-grad-bg:radial-gradient(760px 480px at 100% -8%, rgba(155,123,255,.20), transparent 62%),
            radial-gradient(680px 420px at -4% 104%, rgba(109,74,255,.12), transparent 60%);
}
html[data-theme="dark"]{
  --arf-primary:#9B7BFF;--arf-primary-2:#B79BFF;--arf-accent:#B79BFF;
  --arf-accent-soft:rgba(155,123,255,.16);--arf-brand:#9B7BFF;--arf-brand-2:#B79BFF;
  --arf-brand-soft:rgba(155,123,255,.14);
}


/* Shared application refresh — same quiet purple identity as conversations. */
:root, html[data-theme="light"] {
  --arf-bg: #f7f7fc; --arf-bg-soft: #fff; --arf-bg-deep: #eeedf6; --arf-cream: #f2f2f9;
  --arf-text: #282339; --arf-text-muted: #706a80; --arf-text-soft: #817a91;
  --arf-primary: #7353ec; --arf-primary-2: #9977f5; --arf-primary-soft: rgba(115,83,236,.09);
  --arf-brand: #7353ec; --arf-brand-2: #9977f5; --arf-brand-ink: #5637c2; --arf-brand-soft: rgba(115,83,236,.09);
  --arf-hairline: rgba(83,70,121,.09); --arf-border: rgba(83,70,121,.12); --arf-border-hover: rgba(115,83,236,.35);
  --arf-ring: 0 0 0 3px rgba(115,83,236,.12); --arf-grad-bg: #f7f7fc;
  --arf-grad-primary: linear-gradient(135deg,#7353ec,#9371f2);
  --arf-sh-sm: 0 2px 10px rgba(40,30,70,.025); --arf-sh-md: 0 12px 32px -18px rgba(40,30,70,.2);
}
html[data-theme="dark"] {
  --arf-bg: #13111d; --arf-bg-soft: #1c1929; --arf-bg-deep: #100e18; --arf-cream: #252134;
  --arf-text: #f4f1ff; --arf-text-muted: #b3abc8; --arf-text-soft: #a099b3;
  --arf-primary: #b59aff; --arf-primary-2: #c4afff; --arf-primary-soft: rgba(181,154,255,.12);
  --arf-brand: #b59aff; --arf-brand-ink: #d5c6ff; --arf-brand-soft: rgba(181,154,255,.12);
  --arf-hairline: rgba(220,211,255,.09); --arf-border: rgba(220,211,255,.12); --arf-grad-bg: #13111d;
}
body:has(.dmc-app), body:has(.app-page), body:has(.ms-wrap), body:has(.rmx-app) { background: var(--arf-bg); }
.ph { padding-top: calc(18px + env(safe-area-inset-top,0px)); padding-bottom: 14px; border-bottom: 1px solid var(--arf-hairline); background: var(--arf-bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
.ph-title { font-size: 1.55rem; font-weight: 800; letter-spacing: -.4px; line-height: 1.5; }
.ph-eyebrow { font-family: inherit; font-size: .67rem; letter-spacing: 0; color: var(--arf-text-muted); margin-bottom: 3px; }
.ph-sub { font-size: .76rem; line-height: 1.8; }
.icon-btn, .avatar-btn, .dmc-icon-btn, .dc-me-btn { width: 42px; height: 42px; border-radius: 14px; box-shadow: none; }
.dc-status-row { margin-top: 10px; gap: 10px; }
.dmc-live-pill { background: rgba(31,169,122,.09); padding: 5px 10px; }
.dmc-caps { letter-spacing: 0; font-family: inherit; font-size: .64rem; }
.dmc-search-row { margin-top: 14px; }
.dmc-search-row input { height: 48px; border-radius: 15px; box-shadow: none; }
.dmc-filters-btn { height: 48px; flex-basis: 48px; border-radius: 15px; }
.dmc-body { padding-top: 18px; }
.dmc-list { gap: 9px; }
.dmc-row, .dmc-row.is-guest { background: var(--arf-bg-soft); padding: 14px 12px; border: 1px solid var(--arf-hairline); border-radius: 18px; box-shadow: var(--arf-sh-sm); }
.dmc-row:hover, .dmc-row.is-guest:hover { border-color: var(--arf-border-hover); background: var(--arf-bg-soft); }
.dmc-row.offline { opacity: .8; }
.dmc-av, .dmc-av .face { border-radius: 17px; }
.dmc-name { font-size: .88rem; font-weight: 800; }
.dmc-sub-row { font-size: .71rem; margin-top: 5px; }
.dmc-section-label { letter-spacing: 0; font-family: inherit; font-size: .7rem; padding-inline: 4px; padding-bottom: 10px; }
.dmc-chat-btn { background: var(--arf-brand-soft); color: var(--arf-brand); border: 0; border-radius: 13px; box-shadow: none; }
.dmc-sheet { border-radius: 26px 26px 0 0; padding-inline: 22px; box-sizing: border-box; }
.dmc-user .big-av { width: 88px; height: 88px; }
.dmc-user .big-av .face { border-radius: 26px; }
.dmc-user h4 { font-size: 1.15rem; margin-top: 14px; }
.dmc-facts { border-radius: 18px; overflow: hidden; border-color: var(--arf-hairline); }
.dmc-user .dmc-cta { min-height: 46px; border-radius: 15px; font-size: .85rem; box-shadow: none; }
.sfx-card { border-radius: 20px; box-shadow: var(--arf-sh-sm); }
.sfx-sec { margin-bottom: 20px; }
.sfx-sec > h2 { font-size: .74rem; letter-spacing: 0; margin-bottom: 10px; color: var(--arf-text-muted); }
.sfx-profile { padding: 22px 18px; background: linear-gradient(135deg,var(--arf-brand-soft),transparent 80%); gap: 15px; }
.sfx-profile .p-av { width: 68px; height: 68px; flex-basis: 68px; border-radius: 22px; background: var(--arf-bg-soft); }
.sfx-profile .p-name { font-weight: 800; font-size: 1.07rem; }
.sfx-profile .p-meta { font-size: .7rem; line-height: 1.8; }
.sfx-profile > .icon-btn.accent { width: 32px; height: 32px; inset-inline-start: 15px; bottom: 16px; border: 2px solid var(--arf-bg-soft); border-radius: 11px; box-shadow: none; }
.sfx-profile .p-badge { background: rgba(31,169,122,.1); color: #17805c; font-size: .63rem; }
html[data-theme="dark"] .sfx-profile .p-badge { color: #62d8af; }
.sfx-field { padding: 11px 18px; }
.sfx-field label { font-size: .71rem; margin-bottom: 7px; }
.sfx-field input, .sfx-field select { box-sizing: border-box; height: 46px; background: var(--arf-bg); border-radius: 13px; font-size: 16px; }
.sfx-field input:focus, .sfx-field select:focus { border-color: var(--arf-brand); box-shadow: var(--arf-ring); }
.sfx-actions { padding: 14px 18px 18px; }
.sfx-actions .btn { height: 46px; font-size: .82rem; box-shadow: none; }
.sfx-row { padding: 14px 16px; min-height: 64px; }
.sfx-txt b { font-size: .82rem; }
.sfx-txt span { font-size: .7rem; line-height: 1.7; }
.sfx-ico { border-radius: 12px; background: var(--arf-brand-soft); }
.ms-list { display: flex; flex-direction: column; gap: 8px; }
.ms-row { border: 1px solid var(--arf-hairline); border-radius: 18px; background: var(--arf-bg-soft); padding: 15px 13px; margin: 0; box-shadow: var(--arf-sh-sm); }
.ms-row:hover { border-color: var(--arf-border-hover); background: var(--arf-bg-soft); }
.ms-name { font-size: .87rem; font-weight: 800; }
.ms-last { font-size: .73rem; margin-top: 4px; }
.ms-av, .ms-av .face { border-radius: 17px; }
.ms-empty { border: 1px solid var(--arf-hairline); border-radius: 22px; background: var(--arf-bg-soft); padding: 42px 20px; margin-top: 14px; }
.ms-empty .ico { border-radius: 21px; background: var(--arf-brand-soft); color: var(--arf-brand); box-shadow: none; }
.ms-nav-cta { border-radius: 13px; font-size: .72rem; padding-inline: 12px; }
.rmx-card { border-radius: 18px; border-color: var(--arf-hairline); box-shadow: var(--arf-sh-sm); background: var(--arf-bg-soft); }
.rmx-tile { border-radius: 15px; }
.rmx-chip { border-radius: 12px; box-shadow: none; }
.rmx-hero { box-shadow: none; border-radius: 22px; }
#app-nav .tabbar { min-height: 68px; border-radius: 21px; box-shadow: 0 5px 20px -12px rgba(40,30,70,.2); }
#app-nav .tnv-item { min-height: 56px; gap: 2px; border-radius: 15px; }
#app-nav .tnv-item .tnv-label { font-size: .65rem; } .dmc-row { gap: 9px; padding-inline: 10px; } .dmc-av { width: 46px; height: 46px; flex-basis: 46px; } .sfx-profile { padding-inline: 14px; }
