/* =============================================================================
   base.css — تصفير، RTL، الطباعة، وقفل التخطيط (لا تمرير أفقي إطلاقًا)
   ============================================================================= */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  direction: rtl; text-align: right;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden; max-width: 100%;
  background: var(--bg);
}

body {
  font-family: var(--font-body);
  background: var(--bg); color: var(--text);
  line-height: 1.6; min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; max-width: 100%;
  overflow-wrap: break-word;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

/* لا شيء يتجاوز عرض الشاشة */
img, svg, video, canvas, iframe { max-width: 100%; }
svg { display: block; }

h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 800; line-height: 1.25; color: var(--text); }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }

/* =============================================================================
   قفل الشاشة على اللابتوب/سطح المكتب: التطبيق يملأ الشاشة بالضبط
   الرأس ثابت، والتمرير داخلي فقط. الجوال يبقى تمرير رأسي طبيعي.
   ============================================================================= */
@media (min-width: 900px) {
  body.app-lock {
    height: 100dvh; overflow: hidden;
    display: flex; flex-direction: column;
  }
  body.app-lock .app-scroll {
    flex: 1; min-height: 0;
    overflow-y: auto; overflow-x: hidden;
    scrollbar-gutter: stable;
  }
}
