/* مفتش جودة المساجد — واجهة ميدانية عربية، مصمَّمة للاستخدام بيد واحدة تحت الشمس. */

:root {
  color-scheme: light;
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-2: #eef2f1;
  --surface-3: #e2e8e6;
  --line: #d8e0dd;
  --line-soft: #e8eeec;
  --ink: #14201d;
  --ink-2: #4a5c57;
  --ink-3: #7b8a85;
  --brand: #0f766e;
  --brand-ink: #0b5952;
  --brand-soft: #d7efec;
  --gold: #a97a1f;
  --gold-soft: #fbf1dc;
  --good: #15803d;
  --good-soft: #ddf3e3;
  --warn: #b45309;
  --warn-soft: #fdeed8;
  --bad: #b91c1c;
  --bad-soft: #fbe3e3;
  --shadow: 0 1px 2px rgba(16, 40, 34, .06), 0 8px 24px -12px rgba(16, 40, 34, .18);
  --shadow-lg: 0 24px 60px -20px rgba(10, 30, 26, .35);
  --r: 14px;
  --r-lg: 20px;
  --tap: 44px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1412;
  --surface: #14201d;
  --surface-2: #1b2a26;
  --surface-3: #24352f;
  --line: #2b3d38;
  --line-soft: #223129;
  --ink: #e8f0ed;
  --ink-2: #a9bcb6;
  --ink-3: #7b908a;
  --brand: #2dd4bf;
  --brand-ink: #7ff0e2;
  --brand-soft: #123b37;
  --gold: #e3b566;
  --gold-soft: #33280f;
  --good: #4ade80;
  --good-soft: #10331f;
  --warn: #fbbf24;
  --warn-soft: #35270c;
  --bad: #f87171;
  --bad-soft: #3a1717;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font-family: "Segoe UI", "Noto Naskh Arabic", "Tahoma", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.4; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ───────────────────────── بداية التشغيل ───────────────────────── */
#splash {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  background: var(--bg); color: var(--brand);
  transition: opacity .4s ease, visibility .4s;
}
#splash.gone { opacity: 0; visibility: hidden; }
.splash-mark { font-size: 44px; line-height: 1; }
#splash p { color: var(--ink-2); font-weight: 600; letter-spacing: .3px; }

/* ───────────────────────── الشريط العلوي ───────────────────────── */
#topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 6px;
  padding: calc(var(--safe-t) + 8px) 10px 8px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-titles { flex: 1; min-width: 0; }
#topTitle { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#topSub { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#btnBack svg { transform: scaleX(1); }

.icon-btn {
  display: grid; place-items: center;
  width: var(--tap); height: var(--tap);
  border: 0; border-radius: 12px; background: transparent; color: var(--ink-2);
  cursor: pointer; flex: none;
}
.icon-btn:active { background: var(--surface-2); }

/* ───────────────────────── المحتوى ───────────────────────── */
#view {
  padding: 14px 12px calc(84px + var(--safe-b));
  max-width: 780px; margin: 0 auto;
  outline: none;
}
#view > * + * { margin-top: 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-pad { padding: 14px; }
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.card-head h2 { font-size: 14.5px; }
.card-head .sub { font-size: 11.5px; color: var(--ink-3); font-weight: 500; }

.section-title {
  display: flex; align-items: baseline; gap: 8px;
  padding: 4px 4px 0; margin-top: 20px !important;
}
.section-title h2 { font-size: 13px; color: var(--ink-3); letter-spacing: .4px; }
.section-title .line { flex: 1; height: 1px; background: var(--line); }

/* ───────────────────────── الحقول ───────────────────────── */
.field { display: block; }
.field + .field { margin-top: 12px; }
.field > span.label {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px;
}
.field .hint { font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2 .field + .field { margin-top: 0; }

input[type="text"], input[type="date"], input[type="time"], input[type="number"], select, textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 9px 12px;
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  transition: border-color .15s, background .15s;
}
textarea { min-height: 72px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); background: var(--surface);
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: 14px 19px, 19px 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-left: 32px;
}
.required-miss input, .required-miss textarea { border-color: var(--bad); background: var(--bad-soft); }

/* ───────────────────────── الأزرار ───────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 10px 18px;
  border: 1.5px solid transparent; border-radius: 12px;
  background: var(--brand); color: #fff; font-weight: 700;
  cursor: pointer; transition: transform .08s, filter .15s;
}
html[data-theme="dark"] .btn { color: #05201d; }
.btn:active { transform: scale(.98); }
.btn svg { width: 19px; height: 19px; }
.btn.ghost { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.btn.quiet { background: transparent; color: var(--brand); border-color: transparent; }
.btn.danger { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.btn.block { display: flex; width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; min-width: 130px; }

/* ───────────────────────── الشارات ───────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
  background: var(--surface-3); color: var(--ink-2);
}
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad  { background: var(--bad-soft);  color: var(--bad); }
.badge.brand { background: var(--brand-soft); color: var(--brand-ink); }
html[data-theme="dark"] .badge.brand { color: var(--brand); }
.badge.gold { background: var(--gold-soft); color: var(--gold); }

/* ───────────────────────── قائمة النماذج ───────────────────────── */
.sec-list { display: grid; gap: 10px; }
.sec-card {
  display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 12px;
  width: 100%; text-align: right;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); box-shadow: var(--shadow); cursor: pointer;
}
.sec-card:active { background: var(--surface-2); }
.sec-card.off { opacity: .5; }
.sec-card h3 { font-size: 14px; }
.sec-card .meta { font-size: 11.5px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; }
.sec-card .chev { color: var(--ink-3); }

.ring { position: relative; width: 46px; height: 46px; flex: none; }
.ring svg { width: 46px; height: 46px; stroke-width: 3.5; }
.ring .track { stroke: var(--surface-3); }
.ring .fill { stroke: var(--brand); transition: stroke-dasharray .4s ease; }
.ring .fill.good { stroke: var(--good); }
.ring .fill.warn { stroke: var(--warn); }
.ring .fill.bad { stroke: var(--bad); }
.ring b {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums;
}

/* ───────────────────────── بطاقة المعيار ───────────────────────── */
.item {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
}
.item + .item { margin-top: 10px; }
.item.done { border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.item.blocked { border-color: var(--bad); }

.item-head { display: flex; gap: 10px; padding: 12px 13px 10px; align-items: flex-start; }
.item-no {
  flex: none; width: 27px; height: 27px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--ink-2);
  font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.item.done .item-no { background: var(--good-soft); color: var(--good); }
.item-head h3 { font-size: 14px; flex: 1; }
.item-head .w { font-size: 11px; color: var(--ink-3); font-weight: 700; white-space: nowrap; }
.item-text { padding: 0 13px 10px; font-size: 12.8px; color: var(--ink-2); line-height: 1.7; }
.item-body { padding: 0 13px 13px; }
.item-body > * + * { margin-top: 11px; }

/* سلّم الدرجات */
.scale-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; font-weight: 700; color: var(--ink-3);
}
.scores { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; }
.scores button {
  min-height: 40px; padding: 0;
  border: 1.5px solid var(--line); border-radius: 9px;
  background: var(--surface-2); color: var(--ink-2);
  font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums;
  cursor: pointer; transition: transform .08s;
}
.scores button:active { transform: scale(.92); }
.scores button[aria-pressed="true"] { color: #fff; border-color: transparent; }
html[data-theme="dark"] .scores button[aria-pressed="true"] { color: #06120f; }
.scores button[aria-pressed="true"][data-tone="good"] { background: var(--good); }
.scores button[aria-pressed="true"][data-tone="ok"]   { background: var(--brand); }
.scores button[aria-pressed="true"][data-tone="warn"] { background: var(--warn); }
.scores button[aria-pressed="true"][data-tone="bad"]  { background: var(--bad); }
.scores button.capped { opacity: .38; }
.scores.locked { opacity: .45; pointer-events: none; }

.band {
  padding: 10px 12px; border-radius: 12px;
  background: var(--surface-2); border-right: 3px solid var(--brand);
  font-size: 12.5px; line-height: 1.7; color: var(--ink-2);
}
.band b { display: block; font-size: 11px; color: var(--ink-3); margin-bottom: 3px; }
.band[data-tone="good"] { border-right-color: var(--good); }
.band[data-tone="warn"] { border-right-color: var(--warn); background: var(--warn-soft); color: var(--ink); }
.band[data-tone="bad"]  { border-right-color: var(--bad);  background: var(--bad-soft);  color: var(--ink); }

/* قواعد الاستثناء */
.rule-box {
  padding: 10px 12px; border-radius: 12px;
  background: var(--gold-soft); border: 1px dashed color-mix(in srgb, var(--gold) 45%, transparent);
  font-size: 12.3px; color: var(--ink);
}
.rule-box > * + * { margin-top: 8px; }
.rule-box .rule-title { font-size: 11px; font-weight: 800; color: var(--gold); letter-spacing: .3px; }
.check { display: flex; gap: 9px; align-items: flex-start; cursor: pointer; line-height: 1.55; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }

.toggle-absent {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: 12px;
  background: var(--surface-2); border: 1.5px solid var(--line); cursor: pointer;
  font-size: 12.5px; font-weight: 600;
}
.toggle-absent[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
html[data-theme="dark"] .toggle-absent[aria-pressed="true"] { color: var(--brand); }
.switch { width: 40px; height: 23px; border-radius: 999px; background: var(--surface-3); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 2.5px; right: 2.5px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
[aria-pressed="true"] .switch { background: var(--brand); }
[aria-pressed="true"] .switch::after { transform: translateX(-17px); }

.note-line { font-size: 11.8px; color: var(--ink-2); display: flex; gap: 6px; align-items: flex-start; }
.note-line svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.miss-line { color: var(--bad); font-weight: 600; }

.earned {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: 12px; background: var(--surface-2);
  font-size: 12.5px; font-weight: 700;
}
.earned b { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--brand); }
html[data-theme="dark"] .earned b { color: var(--brand-ink); }

/* الصور */
.photos { display: flex; gap: 8px; flex-wrap: wrap; }
.photo { position: relative; width: 66px; height: 66px; border-radius: 11px; overflow: hidden; border: 1px solid var(--line); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo button {
  position: absolute; top: 2px; left: 2px; width: 22px; height: 22px;
  border: 0; border-radius: 50%; background: rgba(0,0,0,.62); color: #fff;
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.photo button svg { width: 13px; height: 13px; stroke-width: 2.6; }
.photo-add {
  width: 66px; height: 66px; border-radius: 11px;
  border: 1.5px dashed var(--line); background: var(--surface-2); color: var(--ink-3);
  display: grid; place-items: center; cursor: pointer; gap: 0;
}

/* ───────────────────────── النتيجة ───────────────────────── */
.score-hero {
  padding: 22px 16px; text-align: center;
  background: linear-gradient(160deg, var(--brand-soft), var(--surface) 75%);
  border-bottom: 1px solid var(--line-soft);
}
html[data-theme="dark"] .score-hero { background: linear-gradient(160deg, var(--brand-soft), var(--surface) 78%); }
.score-hero .big {
  font-size: 52px; font-weight: 800; line-height: 1.05; letter-spacing: -1px;
  font-variant-numeric: tabular-nums; color: var(--brand-ink);
}
html[data-theme="dark"] .score-hero .big { color: var(--brand); }
.score-hero .cls { margin-top: 8px; font-size: 15px; font-weight: 800; }
.score-hero .pts { margin-top: 4px; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cls-HIGH { color: var(--good); }
.cls-MEDIUM { color: var(--warn); }
.cls-LOW { color: var(--bad); }

.bar-row { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); }
.bar-row:last-child { border-bottom: 0; }
.bar-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; }
.bar-top .nm { font-weight: 600; }
.bar-top .vl { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-sub { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bar { height: 7px; border-radius: 999px; background: var(--surface-3); margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width .5s ease; }
.bar i.good { background: var(--good); } .bar i.warn { background: var(--warn); } .bar i.bad { background: var(--bad); }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { padding: 12px 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-align: center; box-shadow: var(--shadow); }
.kpi b { display: block; font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 11px; color: var(--ink-3); }

.defect-row { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); display: flex; gap: 10px; }
.defect-row:last-child { border-bottom: 0; }
.defect-row .sc {
  flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-weight: 800; font-size: 13px; background: var(--bad-soft); color: var(--bad); font-variant-numeric: tabular-nums;
}
.defect-row .sc.warn { background: var(--warn-soft); color: var(--warn); }
.defect-row h4 { font-size: 13px; }
.defect-row p { font-size: 12px; color: var(--ink-2); line-height: 1.6; }
.defect-row .where { font-size: 11px; color: var(--ink-3); }

/* ───────────────────────── الأرشيف ───────────────────────── */
.visit-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: right;
  padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line-soft);
  background: transparent; cursor: pointer;
}
.visit-row:last-child { border-bottom: 0; }
.visit-row:active { background: var(--surface-2); }
.visit-row h4 { font-size: 13.5px; }
.visit-row p { font-size: 11.5px; color: var(--ink-3); }
.visit-row .pct { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 15px; }

.empty { text-align: center; padding: 34px 20px; color: var(--ink-3); }
.empty svg { width: 42px; height: 42px; margin-bottom: 10px; opacity: .5; }
.empty p { font-size: 13px; }

/* ───────────────────────── الشريط السفلي ───────────────────────── */
#tabbar {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 45;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 6px calc(6px + var(--safe-b));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  border-top: 1px solid var(--line);
}
#tabbar button {
  display: grid; justify-items: center; gap: 2px;
  padding: 6px 2px; border: 0; background: transparent;
  color: var(--ink-3); font-size: 10.5px; font-weight: 600; cursor: pointer;
  border-radius: 12px;
}
#tabbar button[aria-current="page"] { color: var(--brand); }
html[data-theme="dark"] #tabbar button[aria-current="page"] { color: var(--brand-ink); }
#tabbar button svg { width: 21px; height: 21px; }

/* قبل تسجيل الدخول: لا تنقّل ولا زر حساب — شاشة الدخول هي كل ما يظهر */
body.auth-gate #tabbar,
body.auth-gate #btnAccount,
body.auth-gate #btnBack { display: none; }

/* ───────────────────────── اللوحة المنزلقة ───────────────────────── */
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(6, 18, 15, .55); backdrop-filter: blur(2px); }
.sheet-panel {
  position: absolute; inset-inline: 0; bottom: 0; max-height: 82vh;
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-lg);
  padding-bottom: var(--safe-b);
  animation: rise .28s cubic-bezier(.2, .9, .3, 1);
}
@keyframes rise { from { transform: translateY(100%); } }
.sheet-grip { width: 38px; height: 4px; border-radius: 999px; background: var(--line); margin: 9px auto 2px; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 6px 12px 8px; border-bottom: 1px solid var(--line-soft); }
.sheet-head h2 { flex: 1; font-size: 15px; }
#sheetBody { padding: 14px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#sheetBody > * + * { margin-top: 12px; }

.band-row { display: grid; grid-template-columns: 54px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; line-height: 1.65; }
.band-row:last-child { border-bottom: 0; }
.band-row b {
  align-self: start; text-align: center; padding: 3px 0; border-radius: 8px;
  font-size: 11.5px; font-variant-numeric: tabular-nums;
  background: var(--surface-3); color: var(--ink-2);
}
.band-row[data-tone="good"] b { background: var(--good-soft); color: var(--good); }
.band-row[data-tone="ok"] b { background: var(--brand-soft); color: var(--brand-ink); }
.band-row[data-tone="warn"] b { background: var(--warn-soft); color: var(--warn); }
.band-row[data-tone="bad"] b { background: var(--bad-soft); color: var(--bad); }
html[data-theme="dark"] .band-row[data-tone="ok"] b { color: var(--brand); }

/* ───────────────────────── التنبيه العائم ───────────────────────── */
#toast {
  position: fixed; z-index: 80; bottom: calc(80px + var(--safe-b)); inset-inline: 0;
  margin: 0 auto; width: max-content; max-width: 88%;
  padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: 12.5px; font-weight: 600; text-align: center;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .22s, transform .22s;
}
#toast.on { opacity: 1; transform: translateY(0); }

/* ───────────────────────── مؤشر التقدم العلوي ───────────────────────── */
.progress-strip { display: flex; gap: 3px; padding: 0 12px 10px; }
.progress-strip i { flex: 1; height: 3px; border-radius: 999px; background: var(--surface-3); }
.progress-strip i.on { background: var(--good); }
.progress-strip i.miss { background: var(--bad); }

.list-plain { padding: 0; }
.list-plain > * + * { margin-top: 0; }

.callout {
  display: flex; gap: 10px; padding: 11px 13px; border-radius: var(--r);
  font-size: 12.3px; line-height: 1.65;
  background: var(--brand-soft); color: var(--brand-ink);
}
html[data-theme="dark"] .callout { color: var(--ink); }
.callout svg { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.callout.warn { background: var(--warn-soft); color: var(--ink); }
.callout.bad { background: var(--bad-soft); color: var(--ink); }
.callout.gold { background: var(--gold-soft); color: var(--ink); }
.callout.good { background: var(--good-soft); color: var(--ink); }

@media (min-width: 620px) {
  .scores button { min-height: 46px; font-size: 14px; }
  #view { padding-inline: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ───────────────────────── الطباعة ───────────────────────── */
@media print {
  #topbar, #tabbar, #toast, #splash, .sheet, .btn-row, .btn { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  #view { padding: 0; max-width: none; }
  .card { break-inside: avoid; box-shadow: none; border-color: #999; }
  .defect-row, .bar-row { break-inside: avoid; }
}
