/* ═══════════════════════════════════════════════════════════
   Chalets Sunset — ثيم Luxury Nature
   أوف وايت · أخضر زيتوني · جوزي · بيج · لمسات ذهبية
   جوال أولاً (Mobile First)
   ═══════════════════════════════════════════════════════════ */

@import url('/css/fonts.css');

:root {
  /* ألوان الهوية */
  --olive: #3f5145;        /* الأساسي — الهوية والأزرار */
  --olive-dk: #32413a;
  --olive-lt: #55695b;
  --beige: #d8cbb8;        /* المساعد */
  --beige-lt: #e9e1d5;
  --wood: #765a43;         /* الخشبي — الأسعار والعناوين الفرعية */
  --gold: #b69a68;         /* الذهبي الهادئ — الإبراز والحدود */
  --gold-dk: #9a8257;
  --gold-soft: rgba(182, 154, 104, .16);
  --gold-line: rgba(182, 154, 104, .4);
  --charcoal: #292b28;

  /* الوضع الفاتح */
  --bg: #f7f4ee;
  --bg-soft: #efeae1;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --line: #e6dfd3;
  --text: #292b28;
  --text-2: #6b6a63;
  --text-3: #9c9a91;

  /* دلالات طبيعية هادئة */
  --green: #4e7a52;
  --green-bg: #e8efe6;
  --amber: #a5802f;
  --amber-bg: #f5eeda;
  --red: #a2554a;
  --red-bg: #f4e8e4;
  --blue: #4a6b7a;
  --blue-bg: #e7eef1;
  --gray-bg: #efeae1;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 18px;
  --r-xl: 24px;

  --sh-sm: 0 1px 2px rgba(41, 43, 40, .04), 0 1px 3px rgba(41, 43, 40, .03);
  --sh: 0 3px 14px rgba(41, 43, 40, .06);
  --sh-lg: 0 14px 40px rgba(41, 43, 40, .13);

  --head-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

html[data-theme='dark'] {
  --bg: #1a1e1b;
  --bg-soft: #1f2420;
  --surface: #232823;
  --surface-2: #2a302b;
  --line: #39413a;
  --text: #f0ede6;
  --text-2: #a9afa6;
  --text-3: #797f78;

  --olive: #6d8a74;
  --olive-dk: #5d7864;
  --olive-lt: #8aa48f;
  --gold: #c5aa7a;
  --gold-dk: #b69a68;
  --wood: #b08a6a;
  --gold-soft: rgba(197, 170, 122, .13);
  --gold-line: rgba(197, 170, 122, .32);

  --green: #7fa583;
  --green-bg: #22301f;
  --amber: #c9a45f;
  --amber-bg: #2f2814;
  --red: #c88377;
  --red-bg: #33211c;
  --blue: #7fa0b0;
  --blue-bg: #1a262b;
  --gray-bg: #272d28;

  --sh-sm: 0 1px 3px rgba(0, 0, 0, .45);
  --sh: 0 4px 16px rgba(0, 0, 0, .45);
  --sh-lg: 0 16px 42px rgba(0, 0, 0, .6);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Tajawal', 'Segoe UI', Tahoma, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.68;
  font-size: 15px;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .32em; line-height: 1.4; font-weight: 700; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
p { margin: 0 0 .75em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 15px 0; }
::selection { background: var(--beige); color: var(--charcoal); }

/* ───────── التخطيط ───────── */

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }

.section { padding: 22px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.section-head p { margin: 3px 0 0; color: var(--text-2); font-size: 13.5px; }
.section-head h2 { position: relative; padding-bottom: 7px; }
.section-head h2::after {
  content: ''; position: absolute; bottom: 0; inset-inline-start: 0;
  width: 38px; height: 2px; background: var(--gold); border-radius: 2px;
}
.eyebrow {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 2px;
  color: var(--wood); text-transform: uppercase; margin-bottom: 5px;
}

.grid { display: grid; gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 9px; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.center { text-align: center; }
.hide { display: none !important; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────── الشريط العلوي — أوف وايت ───────── */

.header {
  position: sticky; top: 0; z-index: 70;
  height: var(--head-h);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { height: 100%; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 9px; height: 100%; }
.brand span { color: var(--olive); font-weight: 800; font-size: 15.5px; }
.nav-links { display: none; }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }

/* ───────── الهيدر فوق البانر ─────────
   بدل شريط بيج فاتح ملتصق فوق بانر غامق، يصير الهيدر شفافاً فيبدو
   البانر متصلاً من أعلى الشاشة. وبعد التمرير يعود شريطاً صريحاً
   لأن المحتوى تحته فاتح. الصنف has-hero على body في الصفحة الرئيسية. */

body.has-hero .hero { margin-top: calc(var(--head-h) * -1); }
body.has-hero .hero-inner { padding-top: calc(46px + var(--head-h)); }

body.has-hero .header {
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
body.has-hero .header:not(.stuck) {
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
}
/* محتويات الهيدر تنقلب لألوان فاتحة فوق البانر الغامق */
body.has-hero .header:not(.stuck) .nav-links a { color: rgba(255, 255, 255, .82); }
body.has-hero .header:not(.stuck) .nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .14); }
body.has-hero .header:not(.stuck) .icon-btn {
  background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .26);
  color: #fff; backdrop-filter: blur(6px);
}
body.has-hero .header:not(.stuck) .icon-btn:hover {
  background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .42);
}
body.has-hero .header:not(.stuck) .btn-primary {
  background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .3);
  color: #fff; box-shadow: none; backdrop-filter: blur(6px);
}
body.has-hero .header:not(.stuck) .btn-primary:hover { background: #fff; color: var(--olive); }

/* بعد التمرير: حدّ ذهبي وظلّ ناعم بدل الخط الرمادي الحادّ */
.header.stuck { border-bottom-color: var(--gold-line); box-shadow: 0 6px 24px rgba(41, 43, 40, .07); }
html[data-theme=dark] .header.stuck { box-shadow: 0 6px 24px rgba(0, 0, 0, .3); }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; font-size: 16px; transition: .15s; position: relative; flex: none;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--gold-line); }
.icon-btn:active { transform: scale(.93); }
.icon-btn .dot {
  position: absolute; top: 5px; inset-inline-end: 5px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--wood); color: #fff; font-size: 10px; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
}

/* ───────── الأزرار ───────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  background: var(--surface-2); color: var(--text);
  font-weight: 700; font-size: 14.5px; cursor: pointer;
  transition: background .2s, color .2s, transform .12s, box-shadow .2s, border-color .2s;
  white-space: nowrap; text-align: center;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* الزر الأساسي: أخضر زيتوني بنص أبيض */
.btn-primary {
  background: var(--olive); color: #fff;
  box-shadow: 0 3px 10px rgba(63, 81, 69, .22);
}
.btn-primary:hover:not(:disabled) { background: var(--olive-dk); box-shadow: 0 5px 16px rgba(63, 81, 69, .3); }

/* زر ذهبي للإبراز الثانوي */
.btn-sun { background: var(--gold); color: #fff; box-shadow: 0 3px 10px rgba(182, 154, 104, .26); }
.btn-sun:hover { background: var(--gold-dk); }

.btn-outline { background: transparent; border-color: var(--line); color: var(--olive); }
.btn-outline:hover { background: var(--surface-2); border-color: var(--gold-line); }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-ok { background: var(--green-bg); color: var(--green); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }

/* ───────── البطاقات ───────── */

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
}
.card-pad { padding: 16px; }
.card-hover { transition: transform .2s, box-shadow .2s, border-color .2s; }
.card-hover:active { transform: scale(.995); }

/* ───────── الشارات ───────── */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 6px;
  font-size: 11.5px; font-weight: 700; line-height: 1.7; white-space: nowrap;
  background: var(--gray-bg); color: var(--text-2);
}
.badge-free { background: var(--green-bg); color: var(--green); }
.badge-few { background: var(--amber-bg); color: var(--amber); }
.badge-full { background: var(--red-bg); color: var(--red); }
.badge-info { background: var(--blue-bg); color: var(--blue); }
.badge-sun, .badge-grad { background: var(--gold); color: #fff; }
.badge-gold { background: var(--beige); color: var(--wood); }
.badge-olive { background: var(--olive); color: #fff; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-2); font-weight: 500;
}

/* ───────── الحقول ───────── */

.field { display: block; margin-bottom: 11px; }
.field > label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--text-2); }
.input, .select, .textarea {
  width: 100%; min-width: 0; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; transition: border-color .15s, box-shadow .15s;
  font-size: 15px;
}
.input:focus, .select:focus, .textarea:focus {
  outline: 0; border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(63, 81, 69, .12);
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.7; }
.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: left 16px top 50%, left 11px top 50%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-inline-start: 34px;
}
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }

/* ───────── التنبيهات ───────── */

.alert { padding: 12px 14px; border-radius: var(--r); font-size: 13.5px; border: 1px solid transparent; line-height: 1.7; }
.alert-err { background: var(--red-bg); color: var(--red); border-color: color-mix(in srgb, var(--red) 22%, transparent); }
.alert-ok { background: var(--green-bg); color: var(--green); }
.alert-info { background: var(--blue-bg); color: var(--blue); }
.alert-warn { background: var(--amber-bg); color: var(--amber); }

#toasts {
  position: fixed; inset-inline: 12px; bottom: calc(16px + var(--safe-b)); z-index: 200;
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
}
.toast {
  background: var(--charcoal); color: #fff; padding: 12px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 500; box-shadow: var(--sh-lg);
  animation: toastIn .25s ease-out; max-width: 92vw;
}
.toast.err { background: #8e4438; }
.toast.ok { background: var(--olive); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } }

/* ───────── النوافذ ───────── */

.modal-bg {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(30, 33, 29, .55); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .18s;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: var(--surface); width: 100%; max-height: 92vh; overflow-y: auto;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  border-top: 2px solid var(--olive);
  padding: 18px 16px calc(20px + var(--safe-b));
  animation: sheetUp .26s cubic-bezier(.2, .8, .3, 1);
}
@keyframes sheetUp { from { transform: translateY(100%); } }
.modal::before {
  content: ''; display: block; width: 42px; height: 4px; border-radius: 3px;
  background: var(--line); margin: -6px auto 14px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h3 { margin: 0; }

/* ───────── التقويم ───────── */

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 8px; }
.cal-title { font-weight: 700; font-size: 15px; }
.cal-dows, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dows div { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--text-3); padding-bottom: 6px; }
.cal-day {
  aspect-ratio: 1 / 1; min-width: 0; border-radius: 7px; border: 1px solid transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; cursor: pointer; position: relative;
  overflow: hidden; background: var(--surface-2); transition: .12s;
}
.cal-day em { font-style: normal; font-size: 8px; font-weight: 700; opacity: .8; line-height: 1; margin-top: 1px; }
.cal-day.empty { background: transparent; cursor: default; box-shadow: none; }
.cal-day.past {
  background: var(--surface-2); color: var(--text-3);
  cursor: not-allowed; opacity: 1;
  box-shadow: inset 0 0 0 1px var(--line);
}
.cal-day.free { background: var(--green-bg); color: var(--green); }
.cal-day.few { background: var(--amber-bg); color: var(--amber); }
.cal-day.full { background: var(--red-bg); color: var(--red); cursor: not-allowed; }
.cal-day.sel { background: var(--olive) !important; color: #fff !important; border-color: var(--olive-dk); }
.cal-day.range { background: var(--beige-lt) !important; color: var(--wood) !important; }
.cal-day:not(.past):not(.full):not(.empty):hover { border-color: var(--olive); }
.cal-day:not(.past):not(.full):not(.empty):active { transform: scale(.9); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; font-size: 11.5px; color: var(--text-2); }
.cal-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; margin-inline-end: 4px; vertical-align: -1px; }

/* ───────── النجوم ───────── */

.stars { display: inline-flex; gap: 1px; color: var(--gold); font-size: 14px; letter-spacing: 1px; }
.stars-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.stars-input input { display: none; }
.stars-input label { font-size: 30px; color: var(--line); cursor: pointer; transition: .12s; line-height: 1; }
.stars-input label:hover, .stars-input label:hover ~ label,
.stars-input input:checked ~ label { color: var(--gold); }

/* ───────── الجداول ───────── */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: start; font-size: 11.5px; font-weight: 700; color: var(--text-3); padding: 9px 10px; white-space: nowrap; border-bottom: 1px solid var(--line); }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }

/* ───────── الحالات الفارغة والتحميل ───────── */

.empty { text-align: center; padding: 42px 18px; color: var(--text-2); }
.empty .ico { font-size: 40px; margin-bottom: 8px; opacity: .5; }
.empty h3 { color: var(--text); }

.skel { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shine 1.3s infinite; border-radius: var(--r); }
@keyframes shine { to { background-position: -200% 0; } }

.spinner { width: 20px; height: 20px; border: 2.5px solid var(--line); border-top-color: var(--olive); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────── التبويبات ───────── */

.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 9px 15px; border-radius: 8px; background: transparent;
  border: 1px solid var(--line); font-size: 13.5px; font-weight: 700;
  cursor: pointer; white-space: nowrap; flex: none; color: var(--text-2); transition: .15s;
}
.tab:hover { border-color: var(--olive); color: var(--olive); }
.tab.on { background: var(--olive); color: #fff; border-color: var(--olive); }

/* ───────── المحادثة ───────── */

.chat { display: flex; flex-direction: column; gap: 9px; padding: 4px; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.7; word-break: break-word; }
.bubble.me { align-self: flex-start; background: var(--olive); color: #fff; border-end-start-radius: 4px; }
.bubble.them { align-self: flex-end; background: var(--surface-2); border: 1px solid var(--line); border-end-end-radius: 4px; }
.bubble time { display: block; font-size: 10.5px; opacity: .6; margin-top: 3px; }

/* ───────── الإحصاءات ───────── */

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 13px;
  position: relative; overflow: hidden;
}
.stat::before {
  content: ''; position: absolute; top: 0; inset-inline-start: 0;
  width: 3px; height: 100%; background: var(--olive); opacity: .7;
}
.stat .k { font-size: 11.5px; color: var(--text-2); font-weight: 500; display: flex; align-items: center; gap: 5px; }
.stat .v { font-size: 23px; font-weight: 800; margin-top: 3px; color: var(--wood); }
.stat .v small { font-size: 12px; font-weight: 500; color: var(--text-3); }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 110px; padding-top: 8px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; height: 100%; }
.bars .bar i { width: 100%; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--olive-lt), var(--olive)); display: block; min-height: 3px; transition: height .4s; }
.bars .bar b { font-size: 9.5px; color: var(--text-3); font-weight: 500; }

/* ───────── واتساب العائم ───────── */

.fab-wa {
  position: fixed; inset-inline-end: 14px; bottom: calc(16px + var(--safe-b)); z-index: 60;
  width: 50px; height: 50px; border-radius: 50%; background: var(--olive); color: var(--beige);
  display: grid; place-items: center; font-size: 24px;
  box-shadow: 0 6px 20px rgba(41, 43, 40, .22);
  transition: transform .15s, background .2s, color .2s;
}
.fab-wa:hover { background: var(--wood); color: #fff; }
.fab-wa:active { transform: scale(.9); }

/* ═══════════ من 640 بكسل ═══════════ */

@media (min-width: 640px) {
  body { font-size: 15.5px; }
  h1 { font-size: 33px; }
  h2 { font-size: 25px; }
  .section { padding: 32px 0; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .modal-bg { align-items: center; padding: 20px; }
  .modal { max-width: 560px; border-radius: var(--r-xl); padding: 22px; }
  .modal::before { display: none; }
  .cal-day { font-size: 13.5px; border-radius: 9px; }
  .modal.modal-wide { max-width: 720px; }
}

/* ═══════════ من 900 بكسل ═══════════ */

@media (min-width: 900px) {
  :root { --head-h: 84px; }
  h1 { font-size: 42px; }
  .wrap { padding: 0 24px; }
  .section { padding: 42px 0; }
  .nav-links { display: flex; gap: 2px; margin-inline-start: 22px; }
  .nav-links a {
    padding: 8px 13px; border-radius: 8px; font-size: 14.5px; font-weight: 500;
    color: var(--charcoal); transition: .18s;
  }
  .nav-links a:hover { color: var(--olive); background: var(--surface-2); }
  html[data-theme='dark'] .nav-links a { color: var(--text-2); }
  .card-hover:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); border-color: var(--gold-line); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ═══════════ التقويم على الشاشات الصغيرة ═══════════
   خلايا أوسع وأوضح للمس، بلا ازدحام نصوص */

@media (max-width: 520px) {
  .cal-dows, .cal-grid { gap: 3px; }
  .cal-day { border-radius: 6px; font-size: 12px; }
  .cal-day em { font-size: 7.5px; margin-top: 0; }
  .cal-dows div { font-size: 10px; padding-bottom: 5px; }

  .cal-head { margin-bottom: 10px; }
  .cal-title { font-size: 14.5px; }
  .cal-head .icon-btn { width: 34px; height: 34px; font-size: 15px; }

  .cal-legend {
    gap: 8px; justify-content: center; font-size: 10.5px;
    margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
  }
  .cal-legend i { width: 9px; height: 9px; }
}

/* شاشات ضيقة جداً */
@media (max-width: 380px) {
  .cal-dows, .cal-grid { gap: 2px; }
  .cal-day { font-size: 11.5px; border-radius: 5px; }
  .cal-day em { display: none; }
  .cal-dows div { font-size: 9px; }
}

/* ═══════════ حماية شاملة من التمدّد الأفقي ═══════════ */

.cal-grid > *, .cal-dows > * { min-width: 0; }
.row > *, .stack > *, .spread > * { min-width: 0; }
.summary-line { min-width: 0; }
.summary-line span, .summary-line b { overflow-wrap: anywhere; }
.chip, .badge { max-width: 100%; overflow-wrap: anywhere; }
.bubble { overflow-wrap: anywhere; }
.model-card, .card, .adm-card, .fold { max-width: 100%; }
