/* =============================================================================
   FOWZ — ضبط الهاتف فقط (الحاسوب لا يتأثر: كل القواعد داخل max-width).
   الشريط العلوي لا يتزاحم في الهواتف الصغيرة، والزر العائم لا يغطي المحتوى (المساعد موجود في الشريط السفلي).
   ========================================================================== */
@media (max-width: 900px) {
  #v29-fab, .v29-fab { display: none !important; }  /* «مراسلة الإدارة» موجودة في الشريط العلوي */
  .lg-content { overflow-x: clip; }
}
@media (max-width: 520px) {
  .lg-topbar { gap: 6px !important; padding-inline: 10px !important; }
  .lg-top-left, .lg-top-actions { gap: 6px !important; min-width: 0; flex-wrap: nowrap !important; }
  .lg-top-left > *, .lg-top-actions > * { flex: none !important; }
  .lg-top-btn { width: 40px !important; height: 40px !important; min-width: 40px; }
  .fz-cd-pill { height: 40px; padding: 0 10px !important; font-size: 12.5px !important; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
  .fz-cd-pill .cd-x { display: none !important; }
  .fs-support { width: 40px !important; height: 40px !important; padding: 0 !important; display: grid !important; place-items: center; border-radius: 50% !important; }
  .fs-support > span { display: none !important; }
  .ref-profile { padding: 3px !important; gap: 0 !important; min-width: 0 !important; width: auto !important; }
  .ref-profile > :not(.ref-profile-avatar) { display: none !important; }
  .ref-profile-avatar { width: 40px !important; height: 40px !important; }
}
@media (max-width: 360px) {
  .lg-topbar { gap: 4px !important; padding-inline: 8px !important; }
  .lg-top-left, .lg-top-actions { gap: 4px !important; }
  .lg-top-btn, .fs-support { width: 36px !important; height: 36px !important; min-width: 36px; }
  .ref-profile-avatar { width: 36px !important; height: 36px !important; }
  .fz-cd-pill { height: 36px; padding: 0 8px !important; font-size: 11.5px !important; }
}

/* ---------- iPhone notch / Dynamic Island: installed on the home screen (black-translucent + viewport-fit=cover) the page runs
   UNDER the status bar. Everything pinned to the top moves down by the safe area. --fz-sat = that height (tests can set it). */
:root { --fz-sab: env(safe-area-inset-top, 0px); --fz-sat: var(--fz-sab); }
.lg-topbar { padding-top: var(--fz-sat) !important; block-size: calc(var(--topbar-h) + var(--fz-sat)) !important; box-sizing: border-box; }
/* the free-trial timer (fowz-trial.js) floats at the top: while it shows, the bar moves down by its height */
html.fz-trial-on { --fz-sat: calc(var(--fz-sab) + 54px); }
.lg-sidebar { padding-top: calc(var(--sp-5, 20px) + var(--fz-sat)) !important; }
.cx-panel { top: calc(var(--topbar-h) + var(--fz-sat)) !important; }
