/* frame.css v4 — إطار المحتوى (رؤية «دفتر القيادة» 2026-11-14: من 1024 شريط جانبي أيمن ثابت، وعمود المحتوى يتمدّد حتى --page-max بدل الإطار البسيط 834 — يلغي A-29).
 * آخر ورقة قبل shell.css. بلا ألوان ولا محدِّدات صفحات: عرض العمود وحواف القشرة والحشوات فقط. */

/* ≥1024: عمود المحتوى جوار الشريط الجانبي (القشرة في css/shell.css) */
@media (min-width: 1024px) {
  :root, html[data-ui], html[data-ui="copper"], html[data-ui="copper"]:root { --page-max: 834px; --sidebar-w: 256px; }   /* بوابة المزوّدين (بلا #app): الإطار البسيط القديم */
  html:has(#app), html[data-ui="copper"]:has(#app):root { --page-max: 1120px; }
  :is(html, html[data-ui]) body:not(:has(#app)) :is(.topbar, #topbar, #tabs) { padding-inline: max(16px, calc((100% - 834px) / 2 + 16px)); }
  main, html[data-ui="copper"] main, :is(html, html[data-ui]) body[data-page="dashboard"] main, :is(html, html[data-ui]) body:is(:has(.hv2-on), :has(.vx-on)) main, main#view { max-width: min(100%, var(--page-max)); margin-inline: auto; }
  .dashboard-workspace, .dashboard-workspace:has(> .home2), html[data-ui="copper"] body .chat-shell { max-width: min(100%, var(--page-max)); margin-inline: auto; }
  :is(html, html[data-ui]) body:has(.chat-shell) main#view { padding-inline: 16px; padding-top: 16px; }
}
/* 900–1023: حشوة القشرة 16px كالمحتوى (الشريط السفلي، لا جانبي) */
@media (min-width: 900px) and (max-width: 1023.98px) {
  :is(html, html[data-ui]) body :is(.topbar, #topbar), body:not(:has(#login.auth-screen:not([hidden]))) #lang-bar { padding-inline: 16px; }
  main#view { max-width: none; }                                                     /* البوابة: #view 900 كان يزيح المحتوى 30px */
  :is(html, html[data-ui]) body:not(:has(.home2)) main#view { padding-inline: 16px; }  /* المال 12px والمحادثات 0 ← 16 كالقشرة */
}
/* DP-22 الآيباد العمودي 600–899: حشوة المحتوى 16px (حشوة القشرة 16px في copper.css) */
@media (min-width: 600px) and (max-width: 899.98px) {
  :is(html, html[data-ui]) body:not(:has(.home2)):not(:has(.hv2-on)):not(:has(.vx-on)):not(:has(.chat-shell)):not(:has(.community-feed)) main#view { padding-inline: 16px; }
}
/* DP-14 حشوة علوية موحّدة للمحتوى (≥900)، عدا الرئيسية (صورة الرأس تلتصق بالقشرة). تحت 900: copper.css */
@media (min-width: 900px) {
  :is(html, html[data-ui]) body:not(:has(.home2)) main { padding-top: 16px; }
}
/* DP-25 التركيز لا يختفي خلف صف التبويبات اللاصق المعتم (DP-16): scroll-padding-top = موضع اللصق (0) + ارتفاع الصف (60) + 8، بالقياس */
html:has(main :is(.feed-section-tabs, .herd-section-tabs, .settings-section-tabs)) { scroll-padding-top: 68px; }
