/* BRA Hub — تصميم هادئ بخط النسخ، نهاري وليلي، يبدأ من الجوال */
@font-face { font-family: "BRA Naskh"; src: url(/assets/fonts/naskh-latin-400.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "BRA Naskh"; src: url(/assets/fonts/naskh-latin-700.woff2) format("woff2"); font-weight: 600 700; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "BRA Naskh"; src: url(/assets/fonts/naskh-arabic-400.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "BRA Naskh"; src: url(/assets/fonts/naskh-arabic-500.woff2) format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "BRA Naskh"; src: url(/assets/fonts/naskh-arabic-600.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "BRA Naskh"; src: url(/assets/fonts/naskh-arabic-700.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }

:root {
  /* القيم الافتراضية — تُستبدل من إعدادات الألوان */
  --bg: #F6F4EF; --surface: #FFFFFF; --text: #1B2433; --muted: #5B6575; --accent: #1F3A5F; --border: #E3DFD6;
  --surface2: color-mix(in srgb, var(--text) 4%, var(--surface));
  --accent-soft: color-mix(in srgb, var(--accent) 11%, transparent);
  --accent-ink: #fff;
  --danger: #B3261E; --ok: #1E7B4F;
  --r: 12px; --r-lg: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
  --font: "BRA Naskh", "Noto Naskh Arabic", "Geeza Pro", "Damascus", "Sakkal Majalla", "Traditional Arabic", "Amiri", serif;
  --ui: -apple-system, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --header: 56px;
  color-scheme: light;
}
:root[data-theme="dark"] { color-scheme: dark; --accent-ink: #0E1116; --danger: #F2827A; --ok: #6FCF97; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 17px; line-height: 1.85; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ===== الهيكل ===== */
.app { display: flex; height: 100dvh; overflow: hidden; }
.drawer {
  position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 40; width: min(300px, 86vw);
  display: flex; flex-direction: column; background: var(--surface); border-inline-end: 1px solid var(--border);
  transform: translateX(100%); transition: transform .25s ease-out; padding-top: env(safe-area-inset-top);
}
.app.menu .drawer { transform: none; box-shadow: var(--shadow); }
.scrim { position: fixed; inset: 0; z-index: 35; background: rgba(10, 14, 20, .35); display: none; }
.app.menu .scrim { display: block; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.brand { display: flex; align-items: center; gap: 12px; padding: 16px; }
.mono { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 700 13px/1 var(--ui); letter-spacing: .5px; flex: none; }
.brand b { display: block; font: 600 16px/1.3 var(--ui); }
.brand small { color: var(--muted); font-size: 13px; line-height: 1.4; }

.newbtn { margin: 0 16px 12px; }
.secnav { display: grid; gap: 2px; padding: 0 8px 8px; }
.navi { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 16px; }
.navi .icon { color: var(--muted); }
.navi:hover { background: var(--surface2); }
.navi.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.navi.on .icon { color: var(--accent); }
.label { padding: 12px 20px 4px; font-size: 13px; color: var(--muted); }
.convs { flex: 1; overflow: auto; padding: 0 8px 8px; min-height: 0; }
.conv { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 15.5px; }
.conv:hover { background: var(--surface2); }
.conv.on { background: var(--accent-soft); }
.conv .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .n { font: 600 11px/1 var(--ui); color: var(--muted); border: 1px solid var(--border); border-radius: 20px; padding: 3px 7px; }
.conv .del { width: 32px; height: 32px; border: 0; background: none; color: var(--muted); border-radius: 8px; display: grid; place-items: center; }
.conv .del:hover { color: var(--danger); background: var(--surface2); }
.empty-list { color: var(--muted); font-size: 14px; padding: 8px 12px; }
.drawer-foot { border-top: 1px solid var(--border); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); display: grid; gap: 2px; }
.userrow { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--muted); font-size: 15px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font: 600 13px/1 var(--ui); flex: none; }
.userrow .grow { flex: 1; }

/* ===== الرأس ===== */
.header {
  display: flex; align-items: center; gap: 8px; min-height: var(--header); padding: 0 8px;
  padding-top: env(safe-area-inset-top); border-bottom: 1px solid var(--border); background: var(--surface);
}
.header .title { flex: 1; min-width: 0; font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.title-in { flex: 1; min-width: 0; border: 1px solid transparent; background: none; border-radius: 8px; padding: 4px 8px; font-weight: 600; font-size: 17px; }
.title-in:hover { border-color: var(--border); }
.title-in:focus { outline: none; border-color: var(--accent); background: var(--bg); }

/* ===== الأزرار والحقول ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 15.5px; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--surface2); }
.btn.danger { color: var(--danger); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14.5px; border-radius: 9px; }
.btn.icon-only { width: 44px; padding: 0; }
.btn.sm.icon-only { width: 36px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.block { width: 100%; }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > span { font-size: 14.5px; color: var(--muted); }
.field small { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.in, .ta, select.in {
  width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.in:focus, .ta:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ta { min-height: 110px; resize: vertical; line-height: 1.7; }
.ltr { direction: ltr; text-align: left; font-family: var(--mono); font-size: 14px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

.seg { display: flex; padding: 3px; border-radius: 11px; background: var(--surface2); border: 1px solid var(--border); gap: 2px; }
.seg button { flex: 1; min-height: 38px; border: 0; background: none; border-radius: 8px; padding: 0 10px; color: var(--muted); font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

.switch { position: relative; width: 44px; height: 26px; flex: none; display: inline-block; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 30px; background: var(--border); transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 20px; height: 20px; top: 3px; inset-inline-start: 3px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch input:checked + span { background: var(--accent); }
[dir="rtl"] .switch input:checked + span::before { transform: translateX(-18px); }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 2px 10px; border-radius: 20px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.pill.err { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* ===== شريط المحادثة (النماذج والوضع) ===== */
.convbar { display: grid; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
.models { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.models::-webkit-scrollbar { display: none; }
.mchip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); font-size: 15px; white-space: nowrap; flex: none;
}
.mchip.on { border-color: var(--accent); background: var(--accent-soft); }
.mchip .x { display: none; border: 0; background: none; color: var(--muted); width: 26px; height: 26px; margin-inline-end: -6px; border-radius: 6px; place-items: center; }
.wide-only { display: none; }
.mchip .x:hover { color: var(--danger); background: var(--surface2); }
.mchip.add { border-style: dashed; color: var(--muted); }
.mchip.tab-result { color: var(--accent); }
.councilbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 14.5px; color: var(--muted); }

/* ===== الخانات ===== */
.stage { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.panes { flex: 1; min-height: 0; display: flex; }
.pane { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pane[hidden], .panes[hidden] { display: none; }
.pane-head { display: none; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--border); font-size: 15px; font-weight: 600; }
.msgs { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px; overscroll-behavior: contain; }
.msgs-inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }

.msg { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.msg .who { display: flex; align-items: center; gap: 8px; font: 500 13px/1.4 var(--ui); color: var(--muted); }
.msg .round { font-size: 12px; padding: 1px 8px; border-radius: 20px; background: var(--surface2); border: 1px solid var(--border); }
.msg.user { align-items: flex-end; }
.msg.user .bubble { max-width: min(92%, 620px); padding: 10px 16px; border-radius: 16px 16px 4px 16px; background: var(--accent); color: var(--accent-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user.topic .bubble { background: var(--surface); color: var(--text); border: 1px solid var(--accent); }
.msg.error .md { color: var(--danger); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); padding: 10px 14px; border-radius: var(--r); font-family: var(--mono); font-size: 14px; white-space: pre-wrap; direction: ltr; text-align: left; }
.msg-actions { display: flex; gap: 4px; }

.md { overflow-wrap: anywhere; min-width: 0; }
.md p { margin: 0 0 .75em; }
.md p:last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3, .md h4 { margin: 1em 0 .4em; line-height: 1.5; font-weight: 700; text-wrap: balance; }
.md h1 { font-size: 1.3em; } .md h2 { font-size: 1.18em; } .md h3 { font-size: 1.06em; }
.md ul, .md ol { margin: .3em 0 .8em; padding-inline-start: 1.4em; }
.md li { margin: .2em 0; }
.md code { font-family: var(--mono); font-size: .82em; background: var(--surface2); border: 1px solid var(--border); padding: .05em .4em; border-radius: 6px; direction: ltr; unicode-bidi: isolate; }
.md pre { position: relative; direction: ltr; text-align: left; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; overflow-x: auto; margin: .6em 0 1em; }
.md pre code { background: none; border: 0; padding: 0; font-size: 13.5px; line-height: 1.6; }
.md pre .copy { position: absolute; top: 6px; right: 6px; }
.md blockquote { margin: .6em 0; padding: .2em 1em; border-inline-start: 3px solid var(--accent); color: var(--muted); }
.md .tbl { overflow-x: auto; margin: .6em 0; }
.md table { border-collapse: collapse; font-size: .94em; }
.md th, .md td { border: 1px solid var(--border); padding: 6px 12px; text-align: start; }
.md th { background: var(--surface2); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 1.2em 0; }

.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.files a img, .files video { width: min(100%, 420px); height: auto; border-radius: var(--r); border: 1px solid var(--border); display: block; background: #000; }
.filechip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text); font-size: 14.5px; }

.thinking { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.empty-pane { margin: auto; text-align: center; color: var(--muted); padding: 32px 16px; font-size: 15.5px; }

/* النتيجة النهائية */
.verdicts { border-top: 1px solid var(--border); background: var(--surface); max-height: 42dvh; overflow-y: auto; }
.verdicts:empty { display: none; }
.verdict { max-width: 900px; margin: 0 auto; padding: 16px; }
.verdict + .verdict { border-top: 1px solid var(--border); }
.verdict-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.verdict-head b { font-size: 17px; }
.verdict-head .icon { color: var(--accent); }
.verdict-head small { color: var(--muted); font: 13px/1.4 var(--ui); }
.verdict .topic { color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.verdicts.min .verdict:not(:first-child), .verdicts.min .verdict > :not(.verdict-head) { display: none; }
.verdicts.min .verdict-head { margin: 0; }

/* الكتابة */
.composer-wrap { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--bg); }
.composer { max-width: 760px; margin: 0 auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.composer:focus-within { border-color: var(--accent); }
.composer textarea { display: block; width: 100%; border: 0; background: none; resize: none; padding: 12px 14px 4px; min-height: 48px; max-height: 40dvh; outline: none; font-size: 17px; line-height: 1.7; }
.composer textarea::placeholder { color: var(--muted); }
.composer-bar { display: flex; align-items: center; gap: 6px; padding: 4px 6px 6px; }
.composer-bar .note { flex: 1; min-width: 0; font: 12.5px/1.4 var(--ui); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attachments { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 12px 0; }
.attachments:empty { display: none; }
.att { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; padding: 2px 4px 2px 10px; border-radius: 8px; background: var(--surface2); border: 1px solid var(--border); max-width: 100%; }
.att span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att button { border: 0; background: none; color: var(--muted); width: 28px; height: 28px; }
.send { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 10px; }
.pane .composer-wrap { background: none; border-top: 1px solid var(--border); }

/* الترحيب */
.hero { flex: 1; overflow-y: auto; padding: 32px 16px; }
.hero-in { max-width: 640px; margin: 0 auto; }
.hero h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); margin: 0 0 4px; line-height: 1.4; text-wrap: balance; }
.hero p { color: var(--muted); margin: 0 0 24px; }
.suggest { display: grid; gap: 8px; }
.sug { text-align: start; padding: 12px 16px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); min-height: 44px; }
.sug:hover { border-color: var(--accent); }
.sug b { display: block; font-size: 16px; }
.sug span { color: var(--muted); font-size: 15px; }
.hero .pick { margin: 24px 0 8px; font-size: 15px; color: var(--muted); }

/* ===== الصفحات ===== */
.page { flex: 1; overflow-y: auto; padding: 20px 16px calc(40px + env(safe-area-inset-bottom)); }
.page-in { max-width: 920px; margin: 0 auto; }
.page h1 { font-size: clamp(1.5rem, 5vw, 2rem); margin: 0; line-height: 1.4; }
.page .lead { color: var(--muted); margin: 4px 0 20px; }
.page h2 { font-size: 1.15rem; margin: 32px 0 12px; }
.page-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; min-width: 0; }
.card h3 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.card .sub { color: var(--muted); font-size: 15px; margin: 4px 0 12px; }
.stack { display: grid; gap: 12px; }
.code { position: relative; direction: ltr; text-align: left; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 44px 10px 12px; font: 13.5px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0; }
.code .copy { position: absolute; top: 4px; right: 4px; }
details.guide { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); margin-bottom: 8px; }
details.guide summary { cursor: pointer; padding: 12px 16px; min-height: 44px; display: flex; align-items: center; gap: 10px; font-weight: 600; list-style: none; }
details.guide summary::-webkit-details-marker { display: none; }
details.guide summary::after { content: "+"; margin-inline-start: auto; color: var(--muted); font: 20px/1 var(--ui); }
details.guide[open] summary::after { content: "−"; }
details.guide .gbody { padding: 0 16px 14px; }
details.guide ol { padding-inline-start: 1.3em; margin: .3em 0; }
.runs { display: grid; gap: 8px; margin-top: 12px; }
.runitem { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 15px; }
.runitem .md { max-height: 240px; overflow-y: auto; margin-top: 6px; }
.listrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.listrow:last-child { border-bottom: 0; }
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px; }
.swatch { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; font-size: 14.5px; }
.swatch input[type=color] { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; padding: 0; background: none; flex: none; }
.preview { border-radius: var(--r); border: 1px solid; padding: 12px; display: grid; gap: 8px; font-size: 15px; }

/* نوافذ */
.toast-wrap { position: fixed; bottom: calc(16px + env(safe-area-inset-bottom)); inset-inline: 16px; display: grid; justify-items: center; gap: 8px; z-index: 99; pointer-events: none; }
.toast { padding: 10px 16px; border-radius: 10px; background: var(--text); color: var(--bg); box-shadow: var(--shadow); font-size: 15px; max-width: 420px; animation: up .2s ease-out; }
.toast.err { background: var(--danger); color: #fff; }
@keyframes up { from { opacity: 0; transform: translateY(6px); } }
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(10, 14, 20, .4); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-height: 90dvh; overflow-y: auto; background: var(--surface); border-radius: 18px 18px 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); animation: up .2s ease-out; }
.sheet h2 { margin: 0 0 4px; font-size: 19px; }
.sheet .sub { color: var(--muted); margin: 0 0 16px; font-size: 15px; }
.sheet-foot { display: flex; gap: 8px; margin-top: 16px; }
.sheet-foot .btn { flex: 1; }
.pickgrid { display: grid; gap: 8px; }
.pickitem { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); text-align: start; font-size: 16px; }
.pickitem.on { border-color: var(--accent); background: var(--accent-soft); }
.pickitem small { color: var(--muted); margin-inline-start: auto; font-size: 13px; }

/* ===== الشاشات الأكبر ===== */
@media (min-width: 640px) {
  .suggest { grid-template-columns: 1fr 1fr; }
  .sheet-bg { align-items: center; padding: 24px; }
  .sheet { width: min(560px, 100%); border-radius: 18px; }
  .sheet-foot { justify-content: flex-end; }
  .sheet-foot .btn { flex: none; }
  .page { padding: 28px 24px 48px; }
}
@media (min-width: 1024px) {
  .drawer { position: static; transform: none; width: 280px; flex: none; }
  .scrim, .menu-btn { display: none !important; }
  .header { padding: 0 16px; }
  .convbar { padding: 10px 16px; grid-template-columns: 1fr auto; align-items: center; }
  .convbar .seg { min-width: 380px; }
  .mchip .x { display: grid; }
  .wide-only { display: inline; }
  .models .tab-result { display: none; }
  .panes.multi .pane[hidden] { display: flex; }
  .panes.multi .pane + .pane { border-inline-start: 1px solid var(--border); }
  .panes.multi .pane-head { display: flex; }
  .panes.multi .msgs { padding: 16px 20px; }
  .panes.multi .msgs-inner { max-width: none; }
  .msgs { padding: 24px; }
}
.verdicts.as-tab { max-height: none; flex: 1; border-top: 0; }
