/* =====================================================================
   لمّة — الموقع
   ===================================================================== */
:root {
  --ground: #FBF3EE;
  --surface: #FFFFFF;
  --ink: #3A0A1E;
  --ink-2: #4A2E3A;
  --muted: #6E5560;
  --line: #F1E2DA;
  --line-2: #E6D0C4;
  --brand: #8E1B44;
  --brand-dark: #6B1030;
  --brand-soft: #F7E1E7;
  --rose: #D97A97;
  --sand: #E8BFA8;
  --deep: #5A0F2A;
  --cream: #F6E2D6;
  --ok: #2F6B45;
  --ok-soft: #E3F1E8;
  --warn: #8A4B00;
  --warn-soft: #FDF0DC;
  --danger: #B42318;
  --danger-soft: #FDE8E6;
  --radius: 18px;
  --nav-h: 68px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  background: var(--ground);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
}
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { margin: 0; line-height: 1.3; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0; }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.ltr { direction: ltr; unicode-bidi: embed; }
.center { text-align: center; }
.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; }
fieldset { margin: 0; min-width: 0; }
.ic { flex-shrink: 0; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { inset-inline-start: 8px; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; }

/* ---------- الهيدر والقائمة ---------- */
.top { background: var(--deep); color: var(--cream); position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; }
.logo:hover { color: #fff; }
.logo span { font-family: 'Tajawal', sans-serif; font-weight: 800; font-size: 30px; line-height: 1; }
.tabs { display: flex; gap: 4px; }
.tabs a { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; color: var(--cream); text-decoration: none; font-weight: 500; min-height: 44px; }
.tabs a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.tabs a.on { background: rgba(255, 255, 255, .14); color: #fff; font-weight: 600; }
.tab-ic { position: relative; display: inline-flex; }
.dot { position: absolute; top: -6px; inset-inline-end: -10px; background: var(--rose); color: var(--deep); font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }

@media (max-width: 760px) {
  .tabs {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line);
    justify-content: space-around; gap: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabs a { flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); padding: 6px 4px; min-width: 64px; }
  .tabs a:hover { background: transparent; color: var(--ink); }
  .tabs a.on { background: transparent; color: var(--brand); }
  body.has-nav { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
  .logo span { font-size: 26px; }
}

/* ---------- الصفحة ---------- */
.page { max-width: 720px; margin: 0 auto; padding: 20px 16px 40px; display: flex; flex-direction: column; gap: 18px; }
.wide { padding: 0 0 40px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card > h2 { margin-bottom: 14px; }
.card.stack > h2 { margin-bottom: 0; }
h2 .ic { vertical-align: -4px; color: var(--brand); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.empty { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* ---------- أزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 14px; border: 1px solid transparent;
  font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, opacity .15s;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover:not(:disabled) { background: #000; color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover:not(:disabled) { background: var(--ground); color: var(--ink); }
.btn-light { background: var(--cream); color: var(--deep); }
.btn-light:hover { background: #fff; color: var(--deep); }
.btn-outline-light { background: transparent; color: var(--cream); border-color: rgba(246, 226, 214, .5); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #8F1C13; color: #fff; }
.btn-text { background: none; border: none; color: var(--brand); padding: 0 6px; min-height: 44px; font-weight: 600; }
.btn-icon { width: 48px; padding: 0; }
.btn.is-done { background: var(--ok-soft); color: var(--ok); opacity: 1; }
form.act { display: contents; }

/* ---------- فورمات ---------- */
label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 15px; }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; }
input, select, textarea {
  font-family: inherit; font-size: 16px; color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; background: var(--surface); min-height: 50px; width: 100%;
}
textarea { min-height: 96px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--brand); flex-shrink: 0; }
input[type="file"] { padding: 10px; }
input:disabled, select:disabled { background: var(--ground); color: var(--muted); }
.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.code-input { font-size: 28px; letter-spacing: 10px; text-align: center; font-weight: 700; }

/* ---------- تنبيهات ---------- */
.flash { border-radius: 14px; padding: 12px 16px; font-weight: 500; }
.flash-ok { background: var(--ok-soft); color: var(--ok); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.note { background: var(--warn-soft); color: var(--warn); border-radius: 14px; padding: 12px 16px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.dev-code { background: var(--brand-soft); color: var(--brand-dark); border: 1px dashed var(--brand); border-radius: 14px; padding: 12px 16px; font-size: 14px; }
.dev-code strong { font-size: 20px; letter-spacing: 4px; }

.toast {
  position: fixed; inset-inline: 16px; bottom: 24px; margin: 0 auto; max-width: 420px; z-index: 50;
  background: var(--ink); color: #fff; border-radius: 14px; padding: 14px 18px; font-weight: 500; text-align: center;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--danger); }
body.has-nav .toast { bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); }
@media (min-width: 761px) { body.has-nav .toast { bottom: 24px; } }

/* ---------- صور شخصية وشارات ---------- */
.av { border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--line); }
.av-sm { width: 40px; height: 40px; }
.av-md { width: 56px; height: 56px; }
.av-lg { width: 96px; height: 96px; }
.av-xl { width: 120px; height: 120px; }
.av-empty { display: inline-flex; align-items: center; justify-content: center; background: var(--brand); color: #fff; font-weight: 700; }
.av-sm.av-empty { font-size: 16px; }
.av-md.av-empty { font-size: 22px; }
.av-lg.av-empty { font-size: 38px; }
.av-xl.av-empty { font-size: 46px; }
.verified { color: #A8325A; vertical-align: -3px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 13px; padding: 4px 12px; border-radius: 12px; background: var(--ground); color: var(--ink-2); border: 1px solid var(--line); }
.tag-shared { background: var(--brand-soft); color: var(--brand-dark); border-color: transparent; font-weight: 600; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 10px; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-brand { background: var(--brand-soft); color: var(--brand-dark); }

/* ---------- فلاتر (pills) ---------- */
.pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex-shrink: 0; min-height: 40px; padding: 0 16px; border-radius: 20px; display: inline-flex; align-items: center; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); text-decoration: none; font-size: 14px; }
.pill:hover { color: var(--ink); border-color: var(--brand); }
.pill.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }

/* ---------- كروت الأشخاص ---------- */
.people { display: flex; flex-direction: column; gap: 14px; }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 12px; transition: opacity .25s, transform .25s; }
.person.leaving { opacity: 0; transform: scale(.97); }
.person-head { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.person-head:hover { color: var(--ink); }
.person-head:hover .name { color: var(--brand); }
.name { font-weight: 600; font-size: 17px; display: flex; align-items: center; gap: 4px; }
.match { margin-inline-start: auto; font-size: 14px; font-weight: 700; color: #A8325A; background: var(--brand-soft); padding: 6px 12px; border-radius: 12px; white-space: nowrap; }
.person p.bio { font-size: 15px; color: var(--ink-2); }
.person-actions { display: flex; gap: 10px; }
.person-actions .btn-primary { flex: 1; }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: none; }
.list-item a.who { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; flex: 1; min-width: 0; }
.list-item a.who:hover .name { color: var(--brand); }
.list-item .acts { display: flex; gap: 8px; flex-shrink: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.segmented { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px; gap: 4px; }
.segmented a { flex: 1; text-align: center; padding: 10px 8px; border-radius: 12px; text-decoration: none; color: var(--ink-2); font-weight: 500; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.segmented a.on { background: var(--ink); color: #fff; font-weight: 600; }
.segmented .badge { background: var(--rose); color: var(--deep); }

/* ---------- البروفايل ---------- */
.profile-hero { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.profile-hero .band { background: var(--deep); height: 96px; }
.profile-hero .body { padding: 0 20px 22px; margin-top: -56px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.profile-hero .av { border: 5px solid var(--surface); }
.profile-hero h1 { display: flex; align-items: center; gap: 6px; font-size: 24px; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: var(--line); }
.photo-tile { position: relative; }
.photo-tile .badge { position: absolute; top: 8px; inset-inline-start: 8px; }
.photo-tile form { position: absolute; bottom: 8px; inset-inline-end: 8px; }
.photo-tile .btn { min-height: 36px; padding: 0 10px; font-size: 13px; background: rgba(58, 10, 30, .78); color: #fff; }

details.menu { position: relative; }
details.menu > summary { list-style: none; cursor: pointer; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu[open] > .menu-body { display: flex; }
.menu-body { margin-top: 10px; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.danger-zone { border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- الاهتمامات ---------- */
.interest-group { display: flex; flex-direction: column; gap: 10px; }
.interest-group h3 { font-size: 14px; color: var(--muted); font-weight: 600; }
.choice { display: inline-flex; flex-direction: row; cursor: pointer; font-weight: 400; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { min-height: 46px; padding: 0 18px; border-radius: 23px; display: inline-flex; align-items: center; background: var(--surface); border: 1px solid var(--line-2); font-size: 15px; transition: background-color .12s; }
.choice input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.choice input:focus-visible + span { outline: 3px solid var(--rose); outline-offset: 2px; }
.choice input:disabled + span { opacity: .45; cursor: not-allowed; }
.sticky-bar { position: sticky; bottom: 0; background: var(--ground); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; align-items: stretch; text-align: center; }
.steps { display: flex; gap: 6px; }
.steps span { flex: 1; height: 5px; border-radius: 3px; background: var(--line-2); }
.steps span.on { background: var(--brand); }

/* ---------- صفحة الدخول ---------- */
.auth { max-width: 440px; margin: 0 auto; padding: 32px 16px 48px; display: flex; flex-direction: column; gap: 18px; }
.auth .card { padding: 26px 22px; display: flex; flex-direction: column; gap: 16px; }
.auth-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--deep); }

/* ---------- الصفحة الرئيسية للزوار ---------- */
.hero { background: var(--deep); color: var(--cream); }
.hero-in { max-width: 1100px; margin: 0 auto; padding: 64px 20px 72px; display: flex; flex-wrap: wrap; align-items: center; gap: 40px; }
.hero-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 18px; }
.hero h1 { font-size: clamp(32px, 6vw, 52px); line-height: 1.2; color: #fff; }
.hero p { font-size: 18px; color: var(--cream); max-width: 34em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art { flex: 1 1 280px; display: flex; justify-content: center; color: var(--cream); }
.hero-art svg { width: min(320px, 70vw); height: auto; }
.section { max-width: 1100px; margin: 0 auto; padding: 56px 20px 0; display: flex; flex-direction: column; gap: 24px; }
.section > h2 { font-size: 28px; }
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; counter-reset: step; }
.how li { list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.how li::before { counter-increment: step; content: counter(step); width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.how { padding: 0; margin: 0; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.feature .ic { color: var(--brand); width: 30px; height: 30px; }
.safety { background: var(--brand-soft); border-radius: 24px; padding: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.safety-item { display: flex; gap: 12px; align-items: flex-start; }
.safety-item .ic { color: var(--brand-dark); margin-top: 3px; }
.cta { background: var(--deep); color: var(--cream); border-radius: 24px; padding: 40px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.cta h2 { color: #fff; font-size: 28px; }
.footer { max-width: 1100px; margin: 56px auto 0; padding: 24px 20px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* =====================================================================
   المرحلة التانية: الحساب في الهيدر، المجتمعات، البوستات، الفعاليات، الشات
   ===================================================================== */
.me-link { display: flex; align-items: center; gap: 8px; color: var(--cream); text-decoration: none; padding: 4px 10px 4px 4px; border-radius: 24px; min-height: 44px; }
.me-link:hover, .me-link.on { background: rgba(255, 255, 255, .12); color: #fff; }
.me-link .av { width: 34px; height: 34px; border: 2px solid rgba(246, 226, 214, .5); }
.me-link .av-empty { font-size: 14px; }
@media (max-width: 760px) { .me-name { display: none; } .me-link { padding: 4px; } }
@media (min-width: 761px) and (max-width: 980px) { .tabs a { padding: 8px 10px; } .tabs a > span:last-child { font-size: 14px; } .me-name { display: none; } }
@media (max-width: 760px) { .tabs a { min-width: 0; flex: 1; font-size: 11px; } }

.stack-xs { display: flex; flex-direction: column; gap: 4px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; text-decoration: none; min-height: 32px; }

/* ---------- كروت المجتمعات ---------- */
.comm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.comm-tile { border-radius: 20px; padding: 16px; min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; color: #fff; text-decoration: none; background: var(--brand); position: relative; overflow: hidden; }
.comm-tile:nth-child(3n+2) { background: var(--deep); }
.comm-tile:nth-child(3n+3) { background: #A8325A; }
.comm-tile:hover { color: #fff; filter: brightness(1.08); }
.comm-tile.has-cover { background-size: cover; background-position: center; }
.comm-tile.has-cover::before { content: ''; position: absolute; inset: 0; background: rgba(58, 10, 30, .55); }
.comm-tile > * { position: relative; }
.comm-tile strong { font-size: 17px; line-height: 1.35; }
.comm-tile .small { opacity: .9; }
.comm-new { background: rgba(255, 255, 255, .22); padding: 2px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; align-self: flex-start; }
.comm-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.comm-row:last-child { border-bottom: none; }
.comm-row a.who { display: flex; flex-direction: column; flex: 1; min-width: 0; color: var(--ink); text-decoration: none; }
.comm-row a.who:hover strong { color: var(--brand); }
.comm-hero { background: var(--deep); color: var(--cream); border-radius: 24px; padding: 24px 20px; display: flex; flex-direction: column; gap: 10px; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.comm-hero.has-cover::before { content: ''; position: absolute; inset: 0; background: rgba(58, 10, 30, .68); }
.comm-hero > * { position: relative; }
.comm-hero h1 { color: #fff; }
.comm-hero p { color: var(--cream); }

/* ---------- البوستات ---------- */
.composer { display: flex; flex-direction: column; gap: 10px; }
.composer textarea { min-height: 84px; }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.file-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 600; font-size: 14px; cursor: pointer; min-height: 44px; flex-direction: row; }
.file-btn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-btn:focus-within { outline: 3px solid var(--rose); outline-offset: 2px; border-radius: 8px; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: opacity .25s, transform .25s; }
.post.leaving, .event-card.leaving { opacity: 0; transform: scale(.97); }
.post-head { display: flex; align-items: flex-start; gap: 10px; }
.post-head a.who { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: 1; min-width: 0; }
.post-head a.who:hover .name { color: var(--brand); }
.post-head .name { font-size: 15px; }
.post-body { white-space: normal; word-break: break-word; }
.post-img { border-radius: 14px; max-height: 480px; width: 100%; object-fit: cover; background: var(--line); }
.post-foot { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--line); padding-top: 6px; flex-wrap: wrap; }
.react { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; color: var(--muted); font-family: inherit; font-size: 14px; font-weight: 600; padding: 0 10px; min-height: 44px; border-radius: 12px; cursor: pointer; text-decoration: none; }
.react:hover { background: var(--ground); color: var(--ink); }
.react.on { color: var(--brand); }
.react.on .ic { fill: currentColor; }
.post-foot details.menu .menu-body { position: absolute; inset-inline-end: 0; width: min(320px, 80vw); z-index: 5; box-shadow: 0 12px 32px rgba(58, 10, 30, .14); }
.post-foot details.menu > summary { min-height: 44px; display: inline-flex; align-items: center; padding: 0 8px; color: var(--muted); }
.comment { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: none; }
.comment .bubble-c { background: var(--ground); border-radius: 4px 16px 16px 16px; padding: 8px 12px; flex: 1; min-width: 0; }
.comment .bubble-c p { word-break: break-word; }
.comment .meta { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.comment.reply { padding-inline-start: 42px; }

/* ---------- الفعاليات ---------- */
.events { display: flex; flex-direction: column; gap: 12px; }
.event-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: flex; gap: 14px; align-items: flex-start; color: var(--ink); text-decoration: none; }
.event-card:hover { border-color: var(--brand); color: var(--ink); }
.event-card .ic { vertical-align: -3px; }
.event-date { flex-shrink: 0; width: 60px; height: 64px; border-radius: 14px; background: var(--brand); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.event-date strong { font-size: 24px; }
.event-date span { font-size: 12px; }
.event-title { font-weight: 700; font-size: 17px; }
.event-hero { background: var(--deep); color: var(--cream); border-radius: 24px; overflow: hidden; }
.event-hero img { width: 100%; max-height: 260px; object-fit: cover; }
.event-hero .body { padding: 22px 20px; display: flex; flex-direction: column; gap: 10px; }
.event-hero h1 { color: #fff; }
.event-hero .meta { display: flex; flex-direction: column; gap: 6px; }
.event-hero .meta span { display: flex; align-items: center; gap: 8px; }
.link-light { color: var(--cream); }
.link-light:hover { color: #fff; }
.capacity { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.capacity span { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.faces { display: flex; flex-wrap: wrap; gap: 8px; }
.faces a { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; text-decoration: none; color: var(--ink-2); font-size: 12px; text-align: center; }
.faces a span { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.join-bar { position: sticky; bottom: 0; background: var(--ground); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 10px; }
body.has-nav .join-bar { bottom: 0; }
@media (max-width: 760px) { body.has-nav .join-bar { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); } }
.join-bar .btn, .join-bar form { flex: 1; }
.join-bar form .btn { width: 100%; }

/* ---------- الشات ---------- */
.convs { display: flex; flex-direction: column; }
.conv { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.conv:last-child { border-bottom: none; }
.conv:hover { background: #FFF9F6; color: var(--ink); }
.conv .grow { min-width: 0; }
.conv .top-line { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.conv .preview { color: var(--muted); font-size: 14px; }
.conv.unread .preview { color: var(--ink); font-weight: 600; }
.conv .count { background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; border-radius: 11px; min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.conv-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

body.chat-page main.page { padding-bottom: 0; gap: 0; max-width: 760px; }
/* صفحة المحادثة: الهيدر وخانة الكتابة ثابتين، والرسايل بس هي اللي بتعمل سكرول */
/* الصفحة كلها مثبتة على الجزء الظاهر من الشاشة بالظبط (من غير شريط المتصفح وأزرار أندرويد) */
body.chat-page { position: fixed; top: 0; left: 0; right: 0; bottom: 0; height: auto; margin: 0; display: flex; flex-direction: column; overflow: hidden; overscroll-behavior: none; }
body.chat-page.vv-fit { bottom: auto; height: var(--vv-h); }
body.chat-page .top, body.chat-page .flash { flex-shrink: 0; }
body.chat-page main.page { flex: 1; min-height: 0; width: 100%; box-sizing: border-box; display: flex; flex-direction: column; padding-top: 0; padding-bottom: 0; }
.chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-head, .chat-bottom, .chat > .note, .chat > .btn-block { flex-shrink: 0; }
.chat .messages { min-height: 0; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
@media (max-width: 760px) { body.has-nav.chat-page { padding-bottom: 0; } body.chat-page .tabs { display: none; } body.chat-page .toast { bottom: 96px; } }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.chat-head a.who { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: 1; min-width: 0; }
.chat-head .status { font-size: 12px; color: var(--muted); }
.chat-head .status.online { color: var(--ok); }
.chat-head details.menu .menu-body { position: absolute; inset-inline-end: 0; width: min(300px, 85vw); z-index: 5; box-shadow: 0 12px 32px rgba(58, 10, 30, .14); }
.messages { flex: 1; overflow-y: auto; padding: 16px 2px; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 78%; display: flex; flex-direction: column; gap: 2px; align-self: flex-end; align-items: flex-end; }
.msg.mine { align-self: flex-start; align-items: flex-start; }
.msg .b { padding: 9px 14px; border-radius: 18px; border-bottom-left-radius: 6px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.msg.mine .b { background: var(--brand); color: #fff; border-color: var(--brand); border-radius: 18px; border-bottom-right-radius: 6px; }
.msg .b img { border-radius: 12px; max-height: 300px; margin: 2px -6px; }
.msg.deleted .b { background: transparent; color: var(--muted); font-style: italic; border-style: dashed; }
.msg .t { font-size: 11px; color: var(--muted); padding: 0 6px; display: flex; gap: 6px; align-items: center; }
.msg .who-name { font-size: 12px; color: var(--muted); padding: 0 6px; font-weight: 600; }
.msg .act { background: none; border: none; color: var(--muted); font-size: 11px; cursor: pointer; padding: 0; font-family: inherit; text-decoration: underline; }
.msg { transition: transform .15s ease; }
.msg .b .txt { white-space: pre-wrap; }
.msg .b { white-space: normal; }
/* اقتباس الرسالة اللي بترد عليها */
.msg .quote { display: flex; flex-direction: column; gap: 1px; width: 100%; min-width: 140px; text-align: start; font: inherit; cursor: pointer;
  background: rgba(58, 10, 30, .06); border: none; border-inline-start: 3px solid var(--brand); border-radius: 8px; padding: 5px 9px; margin: 0 -4px 6px; color: inherit; }
.msg .quote b { font-size: 12px; color: var(--brand); }
.msg .quote span { font-size: 13px; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.msg.mine .quote { background: rgba(255, 255, 255, .16); border-inline-start-color: #fff; }
.msg.mine .quote b { color: #fff; }
.msg.flash-hl .b { animation: hl 1.4s ease; }
@keyframes hl { 0%, 40% { box-shadow: 0 0 0 4px var(--brand-soft); } 100% { box-shadow: 0 0 0 0 transparent; } }
/* الرسالة الصوتية */
.voice { display: flex; align-items: center; gap: 10px; min-width: 210px; padding: 2px 0; }
.voice audio { display: none; }
.voice .vplay { width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; }
.msg.mine .voice .vplay { background: #fff; color: var(--brand); }
.voice .vbar { flex: 1; height: 6px; border-radius: 3px; background: rgba(58, 10, 30, .14); position: relative; cursor: pointer; overflow: hidden; }
.msg.mine .voice .vbar { background: rgba(255, 255, 255, .3); }
.voice .vfill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: var(--brand); border-radius: 3px; }
.msg.mine .voice .vfill { background: #fff; }
.voice .vtime { font-size: 12px; font-variant-numeric: tabular-nums; min-width: 34px; opacity: .85; }
.chat-head .status.typing { color: var(--brand); font-weight: 600; }
/* شريط الرد والتسجيل تحت */
.chat-bottom { border-top: 1px solid var(--line); background: var(--ground); }
.chat-bottom .composer-chat { border-top: none; }
.reply-bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 12px; background: var(--surface); border: 1px solid var(--line); border-inline-start: 3px solid var(--brand); border-radius: 12px; }
.reply-bar .grow { display: flex; flex-direction: column; min-width: 0; }
.reply-bar b { font-size: 12px; color: var(--brand); }
.reply-bar span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-bar { display: flex; align-items: center; gap: 10px; padding: 10px 0 calc(12px + env(safe-area-inset-bottom)); }
.rec-bar .btn-icon { border-radius: 50%; width: 48px; flex-shrink: 0; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #d93a3a; animation: blink 1s infinite; flex-shrink: 0; }
@keyframes blink { 50% { opacity: .25; } }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 17px; }
.rec-hint { color: var(--muted); font-size: 13px; }
.msg.pending .b { opacity: .6; }
.day-sep, .sys { align-self: center; font-size: 12px; color: var(--muted); background: var(--line); padding: 4px 12px; border-radius: 10px; margin: 6px 0; text-align: center; }
.chat-warning { display: flex; gap: 8px; background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.6; }
.composer-chat { display: flex; gap: 8px; align-items: flex-end; padding: 10px 0 calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--ground); }
.composer-chat textarea { min-height: 48px; max-height: 140px; border-radius: 24px; padding: 12px 16px; resize: none; }
.composer-chat .btn-icon { border-radius: 50%; width: 48px; flex-shrink: 0; }
.composer-chat .file-btn { width: 44px; justify-content: center; }
.older { align-self: center; }
body.chat-page main.page { padding-top: 0; }
body.chat-page .flash { margin-top: 12px; }
.post-head a.who .grow, .person-head .grow, .list-item a.who .grow { display: flex; flex-direction: column; min-width: 0; }
.post-meta { display: flex; flex-direction: column; min-width: 0; }
.post-meta a.name { color: var(--ink); text-decoration: none; font-size: 15px; }
.post-meta a.name:hover { color: var(--brand); }

/* ---------- الدخول بجوجل ---------- */
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.google-btn { display: flex; justify-content: center; min-height: 44px; }

/* ---------- اللوجو ---------- */
.logo { gap: 8px; }
.logo .brand-mark { height: 40px; width: auto; }
.logo .brand-word { height: 28px; width: auto; }
.brand-full, .brand-mark { display: block; max-width: 100%; height: auto; }
.hero-art .brand-full { width: min(300px, 62vw); height: auto; }
.auth-head .brand-mark { width: 84px; margin-bottom: 4px; }
.empty .brand-mark { width: 64px; }
@media (max-width: 760px) { .logo .brand-mark { height: 36px; } .logo .brand-word { height: 25px; } }
@media (max-width: 760px) {
  .hero-in { padding-top: 36px; gap: 24px; }
  .hero-art { order: -1; }
  .hero-art .brand-full { width: 170px; }
}

/* ---------- إظهار الباسورد ---------- */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-left: 52px; }
.pw-toggle { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: none; background: none; color: var(--muted); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pw-toggle:hover { color: var(--ink); background: var(--ground); }
.pw-toggle[aria-pressed="true"] { color: var(--brand); }

/* ---------- اسم المستخدم والـ ID ---------- */
.identity { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; font-size: 14px; color: var(--muted); }
.identity .handle { color: var(--brand-dark); font-weight: 600; }
.identity .pid strong { color: var(--ink); font-weight: 700; letter-spacing: .5px; }
.copy-id { width: 32px; height: 32px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.copy-id:hover { color: var(--brand); border-color: var(--brand); }
.at-field { position: relative; display: block; }
.at-field > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.at-field input { padding-left: 32px; }
input[readonly] { background: var(--ground); color: var(--ink-2); }

/* ===== صور الشات + التفاعلات + عارض الصور ===== */
.msg .img-link { display: block; cursor: zoom-in; }
.msg .rx { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -10px; padding: 0 8px; position: relative; z-index: 1; }
.msg .rx:empty { display: none; }
.rx-chip { display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 7px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface);
  font: inherit; font-size: 14px; line-height: 1; cursor: pointer; box-shadow: 0 1px 3px rgba(58, 10, 30, .12); color: var(--ink); }
.rx-chip span { font-size: 12px; font-weight: 600; color: var(--muted); }
.rx-chip.on { border-color: var(--brand); background: var(--brand-soft); }
.rx-picker { position: fixed; z-index: 60; display: flex; gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 28px;
  box-shadow: 0 10px 30px rgba(58, 10, 30, .22); animation: pop .14s ease-out; }
.rx-picker[hidden] { display: none !important; }
.rx-picker button { width: 42px; height: 42px; border: none; background: none; border-radius: 50%; font-size: 24px; cursor: pointer; line-height: 1; transition: transform .1s; }
.rx-picker button:hover, .rx-picker button:focus-visible { transform: scale(1.18); background: var(--brand-soft); }
.rx-picker button.on { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
.rx-picker.in-viewer { z-index: 120; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

body.viewer-open { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 100; background: #0d0508; color: #fff; display: flex; flex-direction: column; animation: fadein .15s ease-out; }
.viewer[hidden] { display: none !important; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.vw-top { display: flex; align-items: center; gap: 4px; padding: calc(8px + env(safe-area-inset-top)) 8px 8px; background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, 0)); position: relative; z-index: 2; }
.vw-who { display: flex; flex-direction: column; min-width: 0; padding: 0 6px; line-height: 1.35; }
.vw-who b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vw-who span { font-size: 12px; opacity: .75; }
.vw-btn { width: 46px; height: 46px; border-radius: 50%; border: none; background: none; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.vw-btn:hover, .vw-btn:focus-visible { background: rgba(255, 255, 255, .12); }
.vw-btn[hidden] { display: none; }
.vw-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.vw-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .12s ease-out; transform-origin: center; cursor: zoom-in; }
.viewer.zoomed .vw-stage img { cursor: grab; transition: none; }
.vw-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: none; background: rgba(255, 255, 255, .14); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; }
.vw-nav:hover { background: rgba(255, 255, 255, .24); }
.vw-nav[hidden] { display: none; }
.vw-next { left: 12px; }
.vw-prev { right: 12px; }
@media (max-width: 760px) { .vw-nav { display: none; } }
.vw-bottom { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 12px calc(14px + env(safe-area-inset-bottom)); min-height: 40px; background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .6)); }
.vw-bottom .rx { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.vw-bottom .rx-chip { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .2); color: #fff; box-shadow: none; }
.vw-bottom .rx-chip span { color: rgba(255, 255, 255, .8); }
.vw-bottom .rx-chip.on { background: rgba(255, 255, 255, .28); border-color: #fff; }
.vw-count { font-size: 13px; opacity: .7; }

/* ===== الاكتشاف بالكروت ===== */
body.discover-page main.page { gap: 12px; padding-top: 12px; padding-bottom: 12px; max-width: 480px; }
.discover { display: flex; flex-direction: column; gap: 14px; }
.deck { position: relative; height: clamp(400px, calc(100dvh - 64px - 52px - 92px - 44px), 680px); }
@media (max-width: 760px) { .deck { height: clamp(380px, calc(100dvh - 64px - 52px - 92px - 36px - var(--nav-h) - env(safe-area-inset-bottom)), 680px); } }
.deck-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px;
  background: var(--surface); border: 1px dashed var(--line-2); border-radius: 26px; }
.deck-empty[hidden] { display: none; }
.deck-empty h2 { margin: 6px 0 0; font-size: 20px; }

.dcard { position: absolute; inset: 0; border-radius: 26px; overflow: hidden; background: #2a1520; color: #fff; box-shadow: 0 14px 34px rgba(58, 10, 30, .22);
  transition: transform .3s ease, opacity .3s ease; touch-action: pan-y; user-select: none; -webkit-user-select: none; will-change: transform; }
.dcard.top { cursor: grab; }
.dcard.dragging { transition: none; cursor: grabbing; }
.dcard.bump { animation: bump .25s; }
@keyframes bump { 50% { transform: scale(.98); } }
.dc-photo { position: absolute; inset: 0; }
.dc-photo img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.dc-photo.none { display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 35%, #8a1d44, #3a0a1e 70%); }
.dc-initial { font-size: 140px; font-weight: 700; color: rgba(255, 255, 255, .22); line-height: 1; margin-bottom: 18%; }
.dcard::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .35) 0, rgba(0, 0, 0, 0) 18%, rgba(0, 0, 0, 0) 45%, rgba(10, 2, 6, .88) 100%); }
.dc-bars { position: absolute; top: 10px; inset-inline: 12px; display: flex; gap: 4px; z-index: 3; }
.dc-bars span { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .35); }
.dc-bars span.on { background: #fff; }
.dc-tap { position: absolute; top: 0; bottom: 42%; width: 50%; z-index: 2; background: none; border: none; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dc-tap-next { left: 0; }
.dc-tap-prev { right: 0; }
.dc-match { --p: 0; position: absolute; top: 24px; left: 16px; z-index: 3; width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: conic-gradient(#ff6b8a calc(var(--p) * 1%), rgba(255, 255, 255, .25) 0); }
.dc-match::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: rgba(20, 5, 12, .72); }
.dc-match span { position: relative; font-weight: 700; font-size: 14px; }
.dc-stamp { position: absolute; top: 46px; z-index: 4; padding: 4px 14px; border: 4px solid; border-radius: 12px; font-size: 30px; font-weight: 800; opacity: 0; pointer-events: none; }
.dc-stamp-like { left: 22px; top: 96px; color: #4ade80; transform: rotate(14deg); }
.dc-stamp-nope { right: 22px; top: 96px; color: #ff5470; transform: rotate(-14deg); }
.dc-info { position: absolute; inset-inline: 0; bottom: 0; z-index: 3; padding: 18px 22px 22px; padding-inline-end: 64px; display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
.dc-info a, .dc-info button { pointer-events: auto; }
.dc-name { margin: 0; font-size: 30px; font-weight: 700; line-height: 1.25; display: flex; align-items: center; flex-wrap: wrap; gap: 0 10px; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
.dc-dot { opacity: .9; }
.dc-age { font-weight: 600; }
.dc-verified { color: #4aa3ff; display: inline-flex; }
.dc-place { margin: 0; font-size: 17px; opacity: .95; }
.dc-status { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; opacity: .9; }
.dc-status i { width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid #9be15d; }
.dc-status.on i { background: #9be15d; }
.dc-bio { margin: 4px 0 0; font-size: 14px; opacity: .85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dc-chips span { font-size: 13px; padding: 3px 10px; border-radius: 14px; background: rgba(255, 255, 255, .18); backdrop-filter: blur(6px); }
.dc-more { position: absolute; left: 18px; bottom: 22px; display: inline-flex; }

.deck-actions { direction: ltr; display: flex; align-items: center; justify-content: center; gap: 14px; }
.da { border: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; background: var(--surface);
  box-shadow: 0 6px 18px rgba(58, 10, 30, .14); transition: transform .12s ease, box-shadow .12s ease; -webkit-tap-highlight-color: transparent; }
.da:hover:not(:disabled) { transform: translateY(-2px) scale(1.04); }
.da:active:not(:disabled) { transform: scale(.92); }
.da:disabled { opacity: .45; cursor: default; box-shadow: none; }
.da-undo { width: 52px; height: 52px; color: #c9922e; }
.da-skip { width: 64px; height: 64px; color: #6b5560; }
.da-msg { width: 78px; height: 78px; color: #fff; background: linear-gradient(135deg, #b5285f, #6e1236); box-shadow: 0 10px 24px rgba(142, 25, 70, .4); }
.da-like { width: 64px; height: 64px; color: #ff3d6e; }

.sheet-back, .match-back { position: fixed; inset: 0; z-index: 90; background: rgba(20, 5, 12, .55); display: flex; align-items: flex-end; justify-content: center; animation: fadein .15s; }
.sheet-back[hidden], .match-back[hidden] { display: none; }
.sheet { width: 100%; max-width: 480px; background: var(--surface); border-radius: 22px 22px 0 0; padding: 16px 18px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px;
  animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 761px) { .sheet-back { align-items: center; } .sheet { border-radius: 22px; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sheet-head h2 { margin: 0; font-size: 18px; }
.sheet textarea { resize: none; }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; }
.match-back { align-items: center; background: radial-gradient(circle at 50% 40%, rgba(142, 25, 70, .96), rgba(40, 6, 20, .97)); }
.match-box { width: min(380px, 90vw); text-align: center; color: #fff; display: flex; flex-direction: column; gap: 12px; animation: pop .25s ease-out; }
.match-box h2 { margin: 6px 0 0; font-size: 28px; }
.match-box p { margin: 0 0 10px; opacity: .9; }
.match-faces { display: flex; justify-content: center; }
.match-faces .mf { width: 110px; height: 110px; border-radius: 50%; border: 4px solid #fff; overflow: hidden; background: #6e1236; display: inline-flex; align-items: center; justify-content: center;
  font-size: 44px; font-weight: 700; margin: 0 -10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.match-faces .mf img { width: 100%; height: 100%; object-fit: cover; }
.btn-ghost-light { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .5); }

/* ===== متصل الآن ===== */
.av-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.av-dot { position: absolute; bottom: 2%; inset-inline-start: 2%; width: 26%; height: 26%; min-width: 12px; min-height: 12px; max-width: 22px; max-height: 22px;
  border-radius: 50%; background: #3bb54a; border: 2.5px solid var(--surface); box-shadow: 0 0 0 1px rgba(0, 0, 0, .04); }
.presence { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.presence i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid currentColor; flex-shrink: 0; opacity: .6; }
.presence.on { color: #2f9a3d; font-weight: 600; }
.presence.on i { background: currentColor; opacity: 1; }
.presence.recent i { border-color: #3bb54a; opacity: 1; }

/* ===== زرار اللغة ===== */
.lang-btn { margin-inline-start: auto; min-width: 44px; height: 36px; padding: 0 10px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--cream); border: 1px solid rgba(255, 255, 255, .28); text-decoration: none; font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.lang-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.top-in .lang-btn + .me-link { margin-inline-start: 0; }

/* ===== النسخة الإنجليزي (من الشمال لليمين) ===== */
[dir="ltr"] .msg { align-self: flex-start; align-items: flex-start; }
[dir="ltr"] .msg.mine { align-self: flex-end; align-items: flex-end; }
[dir="ltr"] svg[style*="scaleX(-1)"] { transform: none !important; }
[dir="ltr"] .pw-wrap input { padding-left: 14px; padding-right: 52px; }
[dir="ltr"] .pw-toggle { left: auto; right: 4px; }
[dir="ltr"] .vw-next { left: auto; right: 12px; }
[dir="ltr"] .vw-prev { right: auto; left: 12px; }
[dir="ltr"] .dc-tap-next { left: auto; right: 0; }
[dir="ltr"] .dc-tap-prev { right: auto; left: 0; }
[dir="ltr"] .dc-match { left: auto; right: 16px; }
[dir="ltr"] .dc-more { left: auto; right: 18px; }
[dir="ltr"] body { font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif; }

/* ===== خلفية صفحة الدخول ===== */
body.login-page { background: #f6dcd8; }
body.login-page::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: #f3d3cf url("brand/login-bg-mobile.jpg") center top / cover no-repeat;
  background-image: image-set(url("brand/login-bg-mobile.webp") type("image/webp"), url("brand/login-bg-mobile.jpg") type("image/jpeg")); }
@media (min-width: 761px), (min-aspect-ratio: 1/1) {
  body.login-page::before { background-position: center;
    background-image: url("brand/login-bg-desktop.jpg");
    background-image: image-set(url("brand/login-bg-desktop.webp") type("image/webp"), url("brand/login-bg-desktop.jpg") type("image/jpeg")); }
}
body.login-page .auth { padding-top: 28px; }
body.login-page .auth .card { background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 18px 50px rgba(90, 15, 42, .18); }
body.login-page .segmented { background: rgba(255, 255, 255, .6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
body.login-page .auth-head h1 { text-shadow: 0 1px 12px rgba(255, 255, 255, .7); }
body.login-page .auth > .muted, body.login-page .auth > p { color: var(--deep); }
body.login-page .auth > p.muted, body.login-page .auth > .small.muted { align-self: center; background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: 6px 14px; border-radius: 20px; color: var(--deep); font-size: 13px; }

/* ===== الصفحات الثابتة: سياسة الخصوصية والمساعدة ===== */
body.doc-page main.wide { max-width: 1100px; margin: 0 auto; padding: 0 16px 56px; }
.doc { display: flex; flex-direction: column; gap: 24px; }
.doc-hero { margin: 20px 0 0; padding: 40px 28px; border-radius: 26px; color: #fff; text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #8E1B44 0%, #6B1030 55%, #4A0B22 100%); box-shadow: 0 16px 40px rgba(107, 16, 48, .25); }
.doc-hero::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; top: -220px; inset-inline-end: -120px; background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%); pointer-events: none; }
.doc-hero h1 { font-size: clamp(28px, 5vw, 40px); margin: 6px 0 4px; color: #fff; }
.doc-hero p { opacity: .85; margin: 0; }
.doc-kicker { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 4px 12px; border-radius: 20px; background: rgba(255, 199, 90, .2); color: #FFD88A; }
.doc-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .doc-body { grid-template-columns: 1fr; } }
.doc-toc { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
@media (max-width: 860px) { .doc-toc { position: static; } }
.doc-toc strong { font-size: 13px; color: var(--muted); padding: 4px 8px 8px; }
.doc-toc a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.doc-toc a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.doc-toc a span { width: 24px; height: 24px; border-radius: 8px; background: var(--ground); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.doc-toc .doc-toc-other { margin-top: 8px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; padding-top: 12px; color: var(--brand); font-weight: 600; }
.doc-content { display: flex; flex-direction: column; gap: 16px; }
.doc-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; scroll-margin-top: 84px; line-height: 1.85; }
.doc-sec h2 { display: flex; align-items: center; gap: 12px; font-size: 20px; margin: 0 0 10px; }
.doc-sec h2 .num { width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: linear-gradient(135deg, #E8457A, #8E1B44); color: #fff; font-size: 15px; box-shadow: 0 6px 14px rgba(142, 27, 68, .3); }
.doc-sec h3 { font-size: 16px; margin: 16px 0 6px; color: var(--brand-dark); }
.doc-sec p { margin: 0 0 10px; color: var(--ink-2); }
.doc-sec ul { margin: 0 0 10px; padding-inline-start: 22px; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }
.doc-sec li::marker { color: var(--brand); }

.help-hero { padding-bottom: 30px; }
.help-search { position: relative; z-index: 1; display: flex; flex-direction: row; align-items: center; gap: 10px; max-width: 560px; margin: 20px auto 0; padding: 0 18px; height: 56px;
  border-radius: 18px; background: #fff; color: var(--muted); box-shadow: 0 12px 30px rgba(0, 0, 0, .18); }
.help-search input { flex: 1; border: none; outline: none; background: transparent; font: inherit; font-size: 16px; color: var(--ink); min-height: 0; padding: 0; box-shadow: none; }
.help-cats { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.help-cats a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 14px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2);
  color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; }
.help-cats a:hover { background: rgba(255, 255, 255, .22); }
.help-body { display: flex; flex-direction: column; gap: 18px; max-width: 860px; width: 100%; margin: 0 auto; }
.help-group { scroll-margin-top: 84px; display: flex; flex-direction: column; gap: 8px; }
.help-group[hidden] { display: none; }
.help-group h2 { display: flex; align-items: center; gap: 12px; font-size: 20px; margin: 10px 0 4px; }
.hg-ic { width: 40px; height: 40px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
  background: linear-gradient(135deg, #E8457A, #8E1B44); box-shadow: 0 8px 18px rgba(142, 27, 68, .28); }
.faq { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; transition: border-color .15s, box-shadow .15s; }
.faq[hidden] { display: none; }
.faq[open] { border-color: #F0C3D1; box-shadow: 0 10px 24px rgba(58, 10, 30, .08); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; font-weight: 600; font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; width: 28px; height: 28px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 500; flex-shrink: 0; transition: transform .2s; }
.faq[open] summary::after { content: "−"; }
.faq-a { padding: 0 18px 16px; color: var(--ink-2); line-height: 1.85; }
.faq-a p { margin: 0 0 8px; }
.faq-a ul { margin: 0 0 8px; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 6px; }
.help-empty { text-align: center; color: var(--muted); padding: 24px; }
.rules { margin-top: 10px; }
.rules-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .rules-grid { grid-template-columns: 1fr; } }
.rule { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.rule-ic { width: 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-weight: 800; color: #fff; }
.rule-ok .rule-ic { background: linear-gradient(135deg, #6BE08F, #1E9D55); }
.rule-no .rule-ic { background: linear-gradient(135deg, #FF8A7A, #D6382A); }
.rule strong { display: block; margin-bottom: 2px; }
.rule p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.rules-note { padding: 16px 18px; border-radius: 16px; background: var(--warn-soft); color: var(--ink); }
.rules-note p { margin: 4px 0 0; color: var(--ink-2); line-height: 1.8; }
.help-contact { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px; border-radius: 22px; color: #fff;
  background: linear-gradient(135deg, #3A0A1E, #6B1030); margin-top: 10px; }
.help-contact h2 { margin: 0 0 4px; color: #fff; font-size: 20px; }
.help-contact p { margin: 0; opacity: .85; }
.help-links { text-align: center; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.legal-links { text-align: center; font-size: 13px; color: var(--muted); }
.legal-links a { color: var(--muted); }

/* ===== الفوتر ===== */
.site-footer { margin-top: 64px; color: rgba(246, 226, 214, .78); position: relative; overflow: hidden;
  background: linear-gradient(160deg, #5A0F2A 0%, #3E0A1E 55%, #2A0614 100%); }
.site-footer::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 85% 0%, rgba(232, 69, 122, .28), transparent 40%), radial-gradient(circle at 0% 100%, rgba(255, 199, 90, .10), transparent 35%); }
.site-footer::after { content: ""; position: absolute; top: 0; inset-inline: 0; height: 3px; background: linear-gradient(90deg, #E8457A, #FFC75A, #E8457A); opacity: .85; }
.sf-in { position: relative; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.site-footer > .sf-in { display: grid; grid-template-columns: minmax(240px, 1.2fr) 2.6fr; gap: 40px; padding-top: 52px; padding-bottom: 40px; }
@media (max-width: 860px) { .site-footer > .sf-in { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; } }
.sf-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.sf-logo .brand-word { height: 32px; width: auto; }
.sf-brand p { margin: 14px 0 0; line-height: 1.85; font-size: 14px; max-width: 340px; }
.sf-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.sf-badges span { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: #F6E2D6; }
.sf-social { display: flex; gap: 8px; margin-top: 18px; }
.sf-social a { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #F6E2D6;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); transition: background .15s, transform .15s; }
.sf-social a:hover { background: #E8457A; border-color: #E8457A; color: #fff; transform: translateY(-2px); }
.sf-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.45fr); gap: 24px; }
@media (max-width: 860px) { .sf-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; } }
.sf-col h3 { margin: 0 0 14px; font-size: 14px; font-weight: 700; color: #fff; letter-spacing: .01em; }
.sf-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sf-col a { color: rgba(246, 226, 214, .78); text-decoration: none; font-size: 14px; transition: color .15s; }
.sf-col a:hover { color: #FFD88A; }
.sf-contact { display: flex; flex-direction: column; gap: 10px; }
.sf-contact h3 { margin-bottom: 4px; }
.sf-mail, .sf-lang { display: inline-flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; }
.sf-mail span { direction: ltr; overflow-wrap: anywhere; }
.sf-lang { margin-top: 4px; padding: 7px 12px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #F6E2D6 !important; font-weight: 600; }
.sf-lang:hover { background: rgba(255, 255, 255, .16); }
.sf-bottom { position: relative; border-top: 1px solid rgba(255, 255, 255, .1); }
.sf-bottom .sf-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 22px; font-size: 13px; color: rgba(246, 226, 214, .6); }
.sf-made span { color: #E8457A; }
@media (max-width: 760px) { body.has-nav .site-footer { margin-bottom: 0; } .sf-bottom .sf-in { justify-content: center; text-align: center; } }
body.login-page .site-footer { margin-top: 40px; }
