/* ============================================================
   موقع شات — طبقة الهوية (v2)
   تُحمَّل بعد style.css: توكنز دافئة فاتحة + صفحة «اكتشف» بنمط قائمة.
   ============================================================ */

:root,
html[data-theme="light"] {
  --bg: #FBF8F3;
  --bg-soft: #FFFFFF;
  --bg-deep: #F3EDE4;
  --cream: #F7F2EA;
  --glass: #FFFFFF;
  --glass-strong: #FFFFFF;
  --border: rgba(28, 22, 16, 0.09);
  --hairline: rgba(28, 22, 16, 0.08);
  --border-hover: rgba(242, 114, 60, 0.45);

  --primary: #F2723C;
  --primary-2: #F79E4A;
  --primary-glow: rgba(242, 114, 60, 0.22);
  --accent: #1FA97A;
  --accent-soft: rgba(31, 169, 122, 0.12);
  --text: #1B1611;
  --text-muted: #7A6E63;
  --text-soft: #A99C8F;
  --danger: #E05252;
  --gold: #D99A2B;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 26px;

  --sh-sm: 0 1px 2px rgba(28, 22, 16, 0.06), 0 2px 8px rgba(28, 22, 16, 0.04);
  --sh-md: 0 6px 18px rgba(28, 22, 16, 0.08);
  --sh-glow: 0 10px 26px rgba(242, 114, 60, 0.24);

  --grad-primary: linear-gradient(135deg, #F2723C 0%, #F79E4A 100%);
  --grad-bg: radial-gradient(760px 480px at 100% -8%, rgba(247, 158, 74, 0.16), transparent 62%),
             radial-gradient(680px 420px at -4% 104%, rgba(242, 114, 60, 0.10), transparent 60%),
             var(--bg);

  --nav-h: 66px;
}

html[data-theme="dark"] {
  --bg: #14100D;
  --bg-soft: #1C1712;
  --bg-deep: #100D0B;
  --cream: #241D17;
  --glass: #1C1712;
  --glass-strong: #241D17;
  --border: rgba(255, 255, 255, 0.08);
  --hairline: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(247, 158, 74, 0.5);
  --text: #F8F3EC;
  --text-muted: #A79A8D;
  --text-soft: #7C7065;
  --sh-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --sh-md: 0 8px 22px rgba(0, 0, 0, 0.45);
  --grad-bg: radial-gradient(760px 480px at 100% -8%, rgba(247, 158, 74, 0.14), transparent 62%),
             radial-gradient(680px 420px at -4% 104%, rgba(242, 114, 60, 0.10), transparent 60%),
             var(--bg);
}

/* ---------- الأساس ---------- */
body { background: var(--grad-bg) fixed; color: var(--text); }

.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}
.container { width: min(1080px, 94vw); }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg-soft) 92%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}
.logo img { width: 32px; height: 32px; border-radius: 10px; }
.nav-links a { font-weight: 700; font-size: .92rem; }

.btn { border-radius: 14px; font-weight: 800; }
.btn-primary { background: var(--grad-primary); box-shadow: 0 6px 16px var(--primary-glow); color: #fff; }
.btn-ghost { background: var(--bg-soft); border: 1px solid var(--border); box-shadow: var(--sh-sm); }

/* ---------- شريط التنقل السفلي ---------- */
.bottom-nav {
  background: color-mix(in srgb, var(--bg-soft) 96%, transparent);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav a, .bottom-nav button {
  flex: 1; text-align: center; padding: 10px 6px 9px;
  font-size: .7rem; font-weight: 700; color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: 0; font-family: inherit; cursor: pointer;
}
.bottom-nav a.active, .bottom-nav button.active { color: var(--primary); }
.bottom-nav svg { width: 22px; height: 22px; }


/* ============================================================
   الصفحة الرئيسية (تسويقية) — نفس الهوية
   ============================================================ */
.site-header { box-shadow: none; }
.theme-toggle {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--sh-sm);
}
.hero { padding: var(--sp-7) 0 var(--sp-6); text-align: start; }
.hero-badge {
  background: var(--bg-soft); border: 1px solid var(--border);
  color: var(--text); box-shadow: var(--sh-sm);
}
.hero h1 { margin: var(--sp-4) 0 var(--sp-3); max-width: 26ch; line-height: 1.4; }
.hero p.lead { margin-inline: 0; }
.hero-cta { justify-content: flex-start; }
.online-strip {
  background: var(--bg-soft); border: 1px solid var(--border);
  box-shadow: var(--sh-sm); margin-top: var(--sp-5);
}
.room-card, .feature, .faq-item { background: var(--bg-soft); border: 1px solid var(--border); box-shadow: var(--sh-sm); }
.room-card:hover, .feature:hover { box-shadow: var(--sh-md); border-color: var(--border-hover); }
.room-card .r-ico, .feature .f-ico { border-radius: 14px; }
.sec-tag {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border-color: color-mix(in srgb, var(--primary) 24%, transparent);
  color: var(--primary);
}
.stats-strip, .cta-panel { border-radius: var(--r-xl); box-shadow: var(--sh-md); }

/* ============================================================
   صفحة «اكتشف»
   ============================================================ */
.dc-app { min-height: 100dvh; padding-bottom: 84px; }

.dc-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: calc(10px + env(safe-area-inset-top, 0px)) 0 10px;
  border-bottom: 1px solid transparent;
}
.dc-head-in { width: min(760px, 94vw); margin-inline: auto; }

.dc-brand-row { display: flex; align-items: center; gap: 10px; }
.dc-brand {
  font-size: 1.5rem; font-weight: 900; letter-spacing: -.8px;
  display: inline-flex; align-items: center;
}
.dc-brand span { color: var(--primary); }
.dc-brand-row .spacer { flex: 1; }

.dc-icon-btn {
  width: 38px; height: 38px; border-radius: 999px;
  display: grid; place-items: center; color: var(--text-muted);
  background: none; border: 0; cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.dc-icon-btn:hover { background: var(--cream); color: var(--text); }
.dc-me-btn {
  width: 38px; height: 38px; border-radius: 999px; overflow: hidden;
  border: 2px solid var(--bg-soft); box-shadow: 0 2px 8px rgba(160, 120, 80, .14);
  display: grid; place-items: center; background: var(--cream); font-size: 1rem;
  padding: 0; cursor: pointer;
}
.dc-me-btn img { width: 100%; height: 100%; object-fit: cover; }

.dc-status-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.dc-live-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft); border-radius: 999px; padding: 4px 10px;
}
.dc-live-pill .d { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.dc-live-pill .t { font-size: .72rem; font-weight: 700; color: #17805C; }
html[data-theme="dark"] .dc-live-pill .t { color: #4ED3A5; }
.dc-live-pill .n { font-family: var(--font-num); font-size: .76rem; font-weight: 800; color: #17805C; }
html[data-theme="dark"] .dc-live-pill .n { color: #4ED3A5; }
.dc-caps {
  font-family: var(--font-num); font-size: .66rem; text-transform: uppercase;
  letter-spacing: .12em; color: var(--text-soft);
}

.dc-search-row { display: flex; gap: 8px; margin-top: 12px; }
.dc-search-row input {
  flex: 1; min-width: 0; height: 44px; border-radius: 16px;
  border: 1px solid var(--hairline); background: var(--bg-soft);
  padding: 0 14px; font-family: inherit; font-size: .88rem; color: var(--text);
  outline: none; transition: border-color .18s var(--ease);
}
.dc-search-row input::placeholder { color: var(--text-soft); }
.dc-search-row input:focus { border-color: var(--primary); }
.dc-filters-btn {
  position: relative; width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 16px; border: 1px solid var(--hairline);
  background: var(--bg-soft); color: var(--text-muted);
  display: grid; place-items: center; cursor: pointer;
  transition: border-color .18s var(--ease), color .18s var(--ease), background .18s var(--ease);
}
.dc-filters-btn.on { border-color: var(--primary); color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--bg-soft)); }
.dc-filters-btn .dotmark {
  position: absolute; inset-inline-end: -2px; top: -2px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--primary);
  border: 2px solid var(--bg);
}

.dc-body { width: min(760px, 94vw); margin-inline: auto; padding-top: 8px; }
.dc-section-label {
  padding: 2px 10px 6px; font-family: var(--font-num); font-size: .66rem;
  text-transform: uppercase; letter-spacing: .12em; color: var(--text-soft);
}

.dc-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }

.dc-row {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 11px 10px; border-radius: 18px; cursor: pointer;
  transition: background .16s var(--ease), opacity .3s var(--ease);
}
.dc-row:hover { background: var(--cream); }
.dc-row.offline { opacity: .55; }

.dc-av {
  position: relative; width: 52px; height: 52px; flex: 0 0 52px;
  border-radius: 19px; display: grid; place-items: center;
  font-size: 1.35rem; background: var(--cream); overflow: visible;
}
.dc-av .face {
  width: 100%; height: 100%; border-radius: 19px; overflow: hidden;
  display: grid; place-items: center; background: var(--bg-deep);
}
.dc-av .face img { width: 100%; height: 100%; object-fit: cover; }
.dc-av .presence {
  position: absolute; inset-inline-end: -3px; bottom: -3px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); border: 2.5px solid var(--bg);
}
.dc-av .presence.off { background: var(--text-soft); }
.dc-av .flag {
  position: absolute; inset-inline-start: -4px; bottom: -4px;
  font-size: .7rem; line-height: 1; background: var(--bg-soft);
  border: 1px solid var(--hairline); border-radius: 999px; padding: 2px 3px;
}

.dc-info { min-width: 0; flex: 1; }
.dc-name-row { display: flex; align-items: center; gap: 6px; }
.dc-name {
  font-size: .92rem; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dc-chip-age {
  flex: 0 0 auto; font-size: .66rem; font-weight: 700; color: var(--text-muted);
  background: var(--cream); border-radius: 999px; padding: 1px 7px;
}
.dc-sub-row {
  margin-top: 3px; display: flex; align-items: center; gap: 6px;
  font-size: .78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden;
}
.dc-sub-row .d { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: 0 0 6px; }
.dc-sub-row .d.off { background: var(--text-soft); }
.dc-sub-row .sep { color: var(--text-soft); }
.dc-sub-row .loc { overflow: hidden; text-overflow: ellipsis; }
.dc-bio-line {
  margin-top: 2px; font-size: .76rem; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.dc-chat-btn {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 12%, var(--bg-soft));
  color: var(--primary); display: grid; place-items: center; border: 0; cursor: pointer;
  transition: filter .16s var(--ease);
}
.dc-chat-btn:hover { filter: brightness(.96); }
.dc-chat-btn svg { width: 17px; height: 17px; }

.dc-empty { text-align: center; padding: 56px 16px; }
.dc-empty .ico {
  width: 56px; height: 56px; border-radius: 20px; margin: 0 auto 10px;
  background: var(--cream); color: var(--text-soft); display: grid; place-items: center;
}
.dc-empty h3 { font-size: .95rem; font-weight: 700; margin-bottom: 4px; }
.dc-empty p { font-size: .82rem; color: var(--text-muted); }
.dc-empty .btn { margin-top: 12px; height: 38px; border-radius: 999px; padding: 0 18px; font-size: .82rem; }

.dc-loader { display: flex; justify-content: center; padding: 18px; }
.dc-loader span {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--primary) 30%, transparent);
  border-top-color: var(--primary);
  animation: dcspin .8s linear infinite;
}
@keyframes dcspin { to { transform: rotate(360deg); } }

/* ---------- الأوراق (sheets) ---------- */
.dc-bg {
  position: fixed; inset: 0; z-index: 300; background: rgba(18, 14, 10, .45);
  opacity: 0; pointer-events: none; transition: opacity .22s var(--ease);
}
.dc-bg.on { opacity: 1; pointer-events: auto; }
.dc-sheet {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 301;
  background: var(--bg-soft); border-radius: 24px 24px 0 0;
  border-top: 1px solid var(--border); padding: 8px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateY(102%); transition: transform .28s var(--ease);
  max-height: 90dvh; overflow-y: auto; box-shadow: 0 -8px 30px rgba(0, 0, 0, .18);
  width: min(560px, 100%); margin-inline: auto;
}
.dc-sheet.on { transform: translateY(0); }
.dc-sheet .grab { width: 42px; height: 4px; border-radius: 999px; background: var(--hairline); margin: 6px auto 14px; }
.dc-sheet h3 { font-size: 1.02rem; font-weight: 800; margin-bottom: 14px; }

.dc-field { margin-bottom: 12px; }
.dc-field label { display: block; font-size: .78rem; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.dc-field input, .dc-field select {
  width: 100%; height: 44px; border-radius: 13px; padding: 0 12px;
  background: var(--bg-deep); border: 1px solid var(--hairline);
  font-family: inherit; font-size: .9rem; color: var(--text); outline: none;
}
.dc-field input:focus, .dc-field select:focus { border-color: var(--border-hover); }
.dc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dc-label {
  font-size: .8rem; font-weight: 700; color: var(--text-muted);
  margin: 14px 0 8px; display: flex; align-items: center; gap: 8px;
}
.dc-label .val { font-family: var(--font-num); font-size: .78rem; color: var(--text); }
.dc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dc-chip {
  height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--hairline); background: var(--bg-soft);
  font-family: inherit; font-size: .8rem; font-weight: 600; color: var(--text);
  display: inline-flex; align-items: center; gap: 5px;
}
.dc-chip.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--bg-soft)); color: var(--primary); }
.dc-chip .n { font-family: var(--font-num); font-size: .68rem; color: var(--text-soft); }
.dc-chip.on .n { color: var(--primary); }
.dc-chip.more { background: var(--cream); }

/* شريط العمر المزدوج */
.dc-range { position: relative; height: 40px; margin: 2px 0 6px; }
.dc-range .track {
  position: absolute; inset-inline: 0; top: 50%; height: 6px; transform: translateY(-50%);
  border-radius: 999px; background: var(--hairline);
}
.dc-range .fill {
  position: absolute; top: 50%; height: 6px; transform: translateY(-50%);
  border-radius: 999px; background: var(--grad-primary);
}
.dc-range input[type="range"] {
  position: absolute; inset-inline: 0; top: 0; width: 100%; height: 40px;
  -webkit-appearance: none; appearance: none; background: none; pointer-events: none; margin: 0;
}
.dc-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-soft); border: 2.5px solid var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18); cursor: pointer;
}
.dc-range input[type="range"]::-moz-range-thumb {
  pointer-events: auto; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg-soft); border: 2.5px solid var(--primary); cursor: pointer;
}

.dc-actions { display: flex; gap: 10px; margin-top: 16px; }
.dc-actions .btn { flex: 1; height: 48px; border-radius: 16px; font-size: .92rem; }

.dc-note { font-size: .74rem; color: var(--text-soft); margin-top: 10px; line-height: 1.6; }

/* ورقة معلومات العضو */
.dc-user { display: flex; flex-direction: column; align-items: center; padding: 4px 4px 10px; }
.dc-user .big-av {
  width: 96px; height: 96px; border-radius: 30px; display: grid; place-items: center;
  font-size: 2.6rem; background: var(--cream); position: relative; overflow: visible;
}
.dc-user .big-av .face { width: 100%; height: 100%; border-radius: 30px; overflow: hidden; display: grid; place-items: center; }
.dc-user .big-av .face img { width: 100%; height: 100%; object-fit: cover; }
.dc-user .big-av .flag { position: absolute; inset-inline-start: -4px; bottom: -4px; font-size: 1rem; background: var(--bg-soft); border: 1px solid var(--hairline); border-radius: 999px; padding: 2px 5px; }
.dc-user h4 { margin-top: 12px; font-size: 1.15rem; font-weight: 800; }
.dc-user .u-bio { margin-top: 6px; font-size: .82rem; color: var(--text-muted); text-align: center; max-width: 300px; line-height: 1.6; }
.dc-facts { width: 100%; margin-top: 16px; border: 1px solid var(--hairline); border-radius: 16px; overflow: hidden; }
.dc-facts div { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; font-size: .84rem; }
.dc-facts div + div { border-top: 1px solid var(--hairline); }
.dc-facts dt { color: var(--text-muted); }
.dc-facts dd { font-weight: 700; }
.dc-user .dc-cta {
  margin-top: 16px; width: 100%; height: 50px; border-radius: 16px;
  background: var(--grad-primary); color: #fff; font-family: inherit;
  font-size: .95rem; font-weight: 800; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 10px 24px var(--primary-glow);
}
.dc-user .dc-cta.ghost {
  margin-top: 8px; background: none; color: var(--text); box-shadow: none;
  border: 1.5px solid var(--hairline);
}

@media (min-width: 760px) {
  .dc-app { padding-bottom: 40px; }
  .dc-list { gap: 4px; }
}

/* ============================================================
   صفحة التسجيل (join)
   ============================================================ */
.jn-wrap {
  min-height: 100dvh; width: min(560px, 100%);
  margin-inline: auto; padding: 0 16px 40px;
}
.jn-top {
  display: flex; align-items: center; gap: 10px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 0 12px;
}
.jn-back {
  width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center;
  color: var(--text-muted); background: var(--bg-soft); border: 1px solid var(--hairline);
}
.jn-brand { font-weight: 900; font-size: 1.1rem; }
.jn-brand span { color: var(--primary); }
.jn-login { margin-inline-start: auto; font-size: .84rem; font-weight: 700; color: var(--primary); }

.jn-card {
  background: var(--bg-soft); border: 1px solid var(--hairline);
  border-radius: 24px; padding: 22px 18px; box-shadow: var(--sh-sm);
}
.jn-card h1 { font-size: 1.45rem; font-weight: 900; margin-bottom: 6px; }
.jn-sub { font-size: .86rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 18px; }

.jn-avatar-block { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 18px; }
.jn-av {
  width: 84px; height: 84px; border-radius: 28px; display: grid; place-items: center;
  font-size: 2.4rem; background: var(--cream); border: 1px solid var(--hairline);
  box-shadow: var(--sh-sm);
}
.jn-av-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.jn-av-grid button {
  width: 42px; height: 42px; border-radius: 14px; font-size: 1.25rem;
  background: var(--bg-soft); border: 1px solid var(--hairline); cursor: pointer;
  display: grid; place-items: center; transition: transform .12s var(--ease), border-color .12s var(--ease);
}
.jn-av-grid button.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--bg-soft)); transform: translateY(-2px); }

.jn-field { margin-bottom: 14px; }
.jn-field > label { display: block; font-size: .8rem; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.jn-val { font-family: var(--font-num); font-size: .78rem; color: var(--primary); margin-inline-start: 4px; }
.jn-input-wrap { position: relative; display: flex; align-items: center; }
.jn-field input[type="text"], .jn-field input[type="password"], .jn-field select {
  width: 100%; height: 48px; border-radius: 15px; padding: 0 14px;
  background: var(--bg-deep); border: 1px solid var(--hairline);
  font-family: inherit; font-size: .92rem; color: var(--text); outline: none;
  transition: border-color .16s var(--ease);
}
.jn-field input:focus, .jn-field select:focus { border-color: var(--primary); }
.jn-eye {
  position: absolute; inset-inline-end: 8px; width: 34px; height: 34px;
  border-radius: 10px; border: 0; background: none; color: var(--text-muted);
  display: grid; place-items: center; cursor: pointer;
}
.jn-hint {
  position: absolute; inset-inline-end: 12px; font-size: .72rem; font-weight: 700;
  color: var(--text-soft); pointer-events: none;
}
.jn-hint.ok { color: var(--accent); }
.jn-hint.bad { color: var(--danger); }
.jn-error { font-size: .76rem; color: var(--danger); margin-top: 6px; }

.jn-row { display: flex; gap: 12px; }
.jn-row .jn-field { flex: 1; }
.jn-range {
  width: 100%; height: 34px; -webkit-appearance: none; appearance: none; background: none; margin: 0;
}
.jn-range { --jp: 8%; }
.jn-range::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px;
  background: linear-gradient(to left, var(--primary) 0 var(--jp), var(--bg-deep) var(--jp) 100%);
}
.jn-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg-soft); border: 2.5px solid var(--primary);
  margin-top: -8px; box-shadow: 0 2px 6px rgba(0,0,0,.16); cursor: pointer;
}
.jn-range::-moz-range-track { height: 6px; border-radius: 999px; background: var(--primary); }
.jn-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--bg-soft); border: 2.5px solid var(--primary); }

.jn-genders { display: flex; gap: 10px; }
.jn-genders button {
  flex: 1; height: 46px; border-radius: 15px; cursor: pointer;
  border: 1px solid var(--hairline); background: var(--bg-soft);
  font-family: inherit; font-size: .88rem; font-weight: 700; color: var(--text);
  transition: border-color .14s var(--ease), background .14s var(--ease), color .14s var(--ease);
}
.jn-genders button.on {
  border-color: var(--primary); color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, var(--bg-soft));
}

.jn-cta {
  width: 100%; height: 52px; border-radius: 17px; border: 0; cursor: pointer;
  background: var(--grad-primary); color: #fff; font-family: inherit;
  font-size: .98rem; font-weight: 800; box-shadow: 0 10px 24px var(--primary-glow);
  transition: filter .16s var(--ease), transform .12s var(--ease);
}
.jn-cta:active { transform: scale(.985); }
.jn-cta:disabled { opacity: .6; cursor: default; }

.jn-free {
  margin-top: 14px; font-size: .78rem; color: var(--text-muted); line-height: 1.8;
  display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap;
}
.jn-pill {
  font-size: .7rem; font-weight: 800; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 2px 9px;
}
.jn-terms { margin-top: 16px; text-align: center; font-size: .74rem; color: var(--text-soft); }
.jn-terms a { color: var(--primary); }

/* ============================================================
   صفحة الرسائل (messages)
   ============================================================ */
.ms-wrap { width: min(760px, 94vw); margin-inline: auto; padding-bottom: 92px; }
.ms-head {
  position: sticky; top: 0; z-index: 40; padding: calc(12px + env(safe-area-inset-top, 0px)) 0 10px;
  background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(14px);
}
.ms-title { font-size: 1.4rem; font-weight: 900; }
.ms-list { display: flex; flex-direction: column; gap: 2px; }
.ms-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 10px;
  border-radius: 16px; transition: background .16s var(--ease);
}
.ms-row:hover { background: var(--cream); }
.ms-av {
  position: relative; width: 52px; height: 52px; flex: 0 0 52px; border-radius: 19px;
  background: var(--cream); display: grid; place-items: center; font-size: 1.3rem; overflow: visible;
}
.ms-av .face { width: 100%; height: 100%; border-radius: 19px; overflow: hidden; display: grid; place-items: center; background: var(--bg-deep); }
.ms-av .face img { width: 100%; height: 100%; object-fit: cover; }
.ms-av .presence { position: absolute; inset-inline-end: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2.5px solid var(--bg); }
.ms-av .presence.off { background: var(--text-soft); }
.ms-body { min-width: 0; flex: 1; }
.ms-name { font-size: .92rem; font-weight: 700; }
.ms-last { font-size: .8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.ms-last .me { color: var(--text-soft); }
.ms-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.ms-time { font-size: .7rem; color: var(--text-soft); font-family: var(--font-num); }
.ms-unread {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--primary); color: #fff; font-size: .68rem; font-weight: 800;
  display: grid; place-items: center; font-family: var(--font-num);
}
.ms-empty { text-align: center; padding: 64px 16px; }
.ms-empty .ico { width: 56px; height: 56px; border-radius: 20px; background: var(--cream); color: var(--text-soft); display: grid; place-items: center; margin: 0 auto 12px; }
.ms-empty h3 { font-size: .95rem; margin-bottom: 4px; }
.ms-empty p { font-size: .82rem; color: var(--text-muted); }
.ms-empty .btn { margin-top: 14px; height: 40px; border-radius: 999px; padding: 0 18px; font-size: .84rem; }

/* ============================================================
   صفحات التطبيق (الغرف · الإعدادات) — مشتركة
   ============================================================ */
.app-page { min-height: 100dvh; padding-bottom: 88px; width: min(760px, 94vw); margin-inline: auto; }
.app-head {
  position: sticky; top: 0; z-index: 40;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 0 10px;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.app-head-in { display: flex; align-items: baseline; gap: 10px; }
.app-title { font-size: 1.55rem; font-weight: 900; letter-spacing: -.4px; }
.app-count {
  margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: .76rem; color: var(--accent); font-weight: 700;
  background: var(--accent-soft); border-radius: 999px; padding: 4px 10px;
}
.app-count b { font-family: var(--font-num); font-size: .82rem; }
.app-count .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.app-search {
  margin-top: 12px; display: flex; align-items: center; gap: 8px;
  background: var(--bg-soft); border: 1px solid var(--hairline);
  border-radius: 16px; padding: 0 14px; height: 46px; color: var(--text-soft);
  box-shadow: var(--sh-sm);
}
.app-search input {
  flex: 1; border: 0; background: none; outline: none;
  font-family: inherit; font-size: .9rem; color: var(--text);
}
.app-search input::placeholder { color: var(--text-soft); }
.app-body { padding-top: 6px; }
.app-label {
  font-family: var(--font-num); font-size: .66rem; text-transform: uppercase;
  letter-spacing: .12em; color: var(--text-soft); padding: 4px 8px 8px;
}
.app-note { margin-top: 18px; font-size: .76rem; color: var(--text-soft); line-height: 1.7; padding: 0 8px; }

/* قائمة الغرف */
.rm-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.rm-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-soft); border: 1px solid var(--hairline);
  border-radius: 18px; padding: 12px 12px; box-shadow: var(--sh-sm);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.rm-row:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--border-hover); }
.rm-ico {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 15px;
  display: grid; place-items: center; font-size: 1.4rem; background: var(--cream);
}
.rm-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.rm-name { font-size: .94rem; font-weight: 800; }
.rm-sub { font-size: .76rem; color: var(--text-muted); }
.rm-go {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 12px;
  display: grid; place-items: center; color: var(--text-soft); background: var(--cream);
}
.rm-go.hot { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.rm-skel { height: 70px; border-radius: 18px; background: linear-gradient(90deg, var(--cream), var(--bg-soft), var(--cream)); background-size: 200% 100%; animation: rmsh 1.2s linear infinite; }
@keyframes rmsh { to { background-position: -200% 0; } }
.rm-empty { text-align: center; padding: 40px 10px; color: var(--text-muted); font-size: .86rem; }

/* ============================================================
   صفحة الإعدادات
   ============================================================ */
.st-group { margin-bottom: 14px; }
.st-card { background: var(--bg-soft); border: 1px solid var(--hairline); border-radius: 20px; overflow: hidden; box-shadow: var(--sh-sm); }
.st-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.st-row + .st-row { border-top: 1px solid var(--hairline); }
.st-ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--cream); color: var(--text-muted); flex: 0 0 34px; }
.st-txt { flex: 1; min-width: 0; }
.st-txt b { display: block; font-size: .9rem; font-weight: 700; }
.st-txt span { display: block; font-size: .74rem; color: var(--text-muted); margin-top: 2px; }
.st-seg { display: flex; gap: 4px; background: var(--cream); padding: 4px; border-radius: 12px; }
.st-seg button {
  border: 0; background: none; font-family: inherit; font-size: .76rem; font-weight: 700;
  color: var(--text-muted); padding: 6px 10px; border-radius: 9px; cursor: pointer;
}
.st-seg button.on { background: var(--bg-soft); color: var(--primary); box-shadow: var(--sh-sm); }
.st-switch { position: relative; width: 46px; height: 27px; flex: 0 0 46px; }
.st-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.st-switch i {
  position: absolute; inset: 0; border-radius: 999px; background: var(--hairline);
  transition: background .18s var(--ease); pointer-events: none;
}
.st-switch i::after {
  content: ''; position: absolute; top: 3px; inset-inline-start: 3px;
  width: 21px; height: 21px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .18s var(--ease);
}
.st-switch input:checked + i { background: var(--primary); }
.st-switch input:checked + i::after { transform: translateX(-19px); }
html[dir="rtl"] .st-switch input:checked + i::after { transform: translateX(-19px); }

.st-field { padding: 12px 16px; }
.st-field + .st-field { border-top: 1px solid var(--hairline); }
.st-field label { display: block; font-size: .76rem; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.st-field input, .st-field select {
  width: 100%; height: 44px; border-radius: 12px; padding: 0 12px;
  background: var(--cream); border: 1px solid var(--hairline);
  font-family: inherit; font-size: .9rem; color: var(--text); outline: none;
}
.st-field input:focus, .st-field select:focus { border-color: var(--primary); }
.st-save { padding: 12px 16px 16px; }
.st-save .btn { width: 100%; height: 46px; border-radius: 14px; }
.st-danger { color: var(--danger); font-weight: 800; }
.st-note { font-size: .74rem; color: var(--text-soft); padding: 0 6px; line-height: 1.7; }
.st-cta { text-align: center; padding: 40px 16px; background: var(--bg-soft); border: 1px solid var(--hairline); border-radius: 20px; }
.st-cta h3 { font-size: .98rem; margin-bottom: 6px; }
.st-cta p { font-size: .82rem; color: var(--text-muted); }
.st-cta .btn { margin-top: 14px; height: 42px; border-radius: 999px; padding: 0 20px; font-size: .85rem; }

/* ===== هوية موقع شات ===== */
:root, html[data-theme="light"]{
  --primary:#6D4AFF;--primary-2:#9B7BFF;
  --primary-glow:rgba(109,74,255,.22);
  --accent:#7C5CFF;--accent-soft:rgba(124,92,255,.12);
  --border-hover:rgba(109,74,255,.45);
  --grad-primary:linear-gradient(135deg,#6D4AFF 0%,#9B7BFF 100%);
  --sh-glow:0 10px 26px rgba(109,74,255,.24);
  --brand:#6D4AFF;--brand-2:#9B7BFF;--brand-ink:#4A2AD6;
  --brand-soft:rgba(109,74,255,.11);
  --ring:0 0 0 3px rgba(109,74,255,.22);
  --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"]{
  --primary:#9B7BFF;--primary-2:#B79BFF;--accent:#B79BFF;
  --accent-soft:rgba(155,123,255,.16);--brand:#9B7BFF;--brand-2:#B79BFF;
  --brand-soft:rgba(155,123,255,.14);
}
