/* ══════════════════════════════════════════════════════════
   خارطة الأندية القرائية — «مجسّم على ورق»
   صفحة واحدة فاتحة بهوية وهج: ورق عاجي، مجسّم المملكة بتدرّج البنفسجي وحافة مذهّبة
   وظلّ ناعم، ولوحة نتائج بيضاء تطفو فوق المسرح.
   كل القواعد محصورة تحت ‎.wjm‎ فلا تمسّ بقية الموقع، والمدد والمنحنيات
   من مفردات الحركة المعرّفة في nav.css (‎--wj-d*‎ و‎--wj-e-*‎) بلا قيمة حرفية.
   ══════════════════════════════════════════════════════════ */
.wjm {
  --m-paper: #FAF9F6;
  --m-paper-2: #F6F2F7;
  --m-white: #FFFFFF;
  --m-ink: #2B1B3F;
  --m-ink-2: #5F5070;
  --m-ink-3: #736685;       /* أفتح درجات النص: تباينها مع الأبيض والورق ≥ 4.5 */
  --m-line: #ECE3EF;
  --m-line-2: #DACBE0;
  --m-primary: #994C9C;
  --m-primary-d: #823F86;
  --m-deep: #4A2475;
  --m-lilac: #F6EEF8;
  --m-lilac-2: #EBDDF0;
  --m-gold: #FDC70C;
  --m-gold-d: #8A6400;
  --m-cyan: #3CC8F0;
  --m-cyan-d: #0B6F8F;
  --m-shadow: 0 1px 2px rgba(74, 36, 117, .06), 0 8px 26px rgba(74, 36, 117, .10);
  --m-shadow-lg: 0 2px 6px rgba(74, 36, 117, .07), 0 24px 64px rgba(74, 36, 117, .15);
  position: relative;       /* بلا isolation: نافذة الجوال (fixed) يجب أن تعلو ترويسة الموقع وشريطه السفلي */
  font-family: var(--wj-font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--m-ink);
  color-scheme: light;
  /* ورقة واحدة تحمل الترويسة والمسرح معًا: أنصع عند موضع الخارطة وأدفأ عند الأطراف */
  background: radial-gradient(115% 85% at 36% 52%, #FFFFFF 0%, #FBF8F5 44%, #F2EBE4 100%);
}
.wjm *, .wjm *::before, .wjm *::after { box-sizing: border-box; }
.wjm button, .wjm input, .wjm select, .wjm textarea { font: inherit; color: inherit; }
.wjm .nums { font-variant-numeric: tabular-nums; }
.wjm :focus-visible { outline: 2px solid var(--m-primary); outline-offset: 2px; border-radius: 8px; }
.wjm ::selection { background: var(--m-lilac-2); color: var(--m-deep); }
.wjm a { color: inherit; }
.wjm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- الترويسة: الشعار · التعريف · العروض · الأفعال (على الورقة نفسها بلا شريط) ---------- */
.wjm-mast {
  display: flex; align-items: center; gap: 10px 22px;
  padding: 16px clamp(16px, 2.2vw, 30px) 12px;
}
.wjm-mast h1 { margin: 0; flex: none; line-height: 0; }
.wjm-mast-logo { display: block; height: 66px; width: auto; }
.wjm-mast-txt { min-width: 0; padding-inline-start: 20px; border-inline-start: 1px solid var(--m-line-2); }
.wjm-mast-txt p { margin: 0; font-size: 14px; color: var(--m-ink-2); line-height: 1.6; max-width: 34ch; }
.wjm-count {
  display: inline-block; margin-top: 5px;
  background: var(--m-lilac-2); color: var(--m-deep);
  font-size: 12.5px; font-weight: 700; padding: 2px 12px; border-radius: 999px; white-space: nowrap;
}
.wjm-count:empty { display: none; }
.wjm-nav { display: flex; gap: 2px; margin-inline-start: auto; }
.wjm-nav button {
  position: relative; min-height: 44px; padding: 8px 14px;
  background: none; border: 0; border-radius: 999px;
  color: var(--m-ink-2); font-size: 14.5px; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: color var(--wj-d1) var(--wj-e-out);
}
.wjm-nav button:hover { color: var(--m-deep); }
.wjm-nav button[aria-pressed="true"] { color: var(--m-deep); font-weight: 700; }
.wjm-nav button::after {
  content: ""; position: absolute; inset-inline: 24%; bottom: 4px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--m-gold), var(--m-cyan), var(--m-primary));
  transform: scaleX(0); transition: transform var(--wj-d2) var(--wj-e-out);
}
.wjm-nav button[aria-pressed="true"]::after { transform: scaleX(1); }
.wjm-acts { display: flex; gap: 8px; flex: none; }
.wjm-act {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px;
  border-radius: 999px; padding: 8px 20px; border: 1px solid transparent;
  font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background var(--wj-d1) var(--wj-e-out), border-color var(--wj-d1) var(--wj-e-out),
              color var(--wj-d1) var(--wj-e-out), transform var(--wj-d1) var(--wj-e-out);
}
.wjm-act:active { transform: scale(.97); }
.wjm-act.is-pri { background: var(--m-primary); color: #fff; box-shadow: 0 6px 18px rgba(153, 76, 156, .26); }
.wjm-act.is-pri:hover { background: var(--m-primary-d); }
.wjm-act.is-out { background: #fff; border-color: var(--m-line-2); color: var(--m-deep); }
.wjm-act.is-out:hover { border-color: var(--m-primary); }
.wjm-act.is-on, .wjm-act.is-on:hover { background: var(--m-deep); border-color: var(--m-deep); color: #fff; }   /* الجولة جارية */
.wjm-act svg { flex: none; }
.wjm-act .i-stop, .wjm-act.is-on .i-play { display: none; }
.wjm-act.is-on .i-stop { display: block; }

/* ---------- المسرح: الخارطة بعرض الصفحة، ولوحة النتائج تطفو فوقها ---------- */
.wjm-main { --wjm-rail: 0px; position: relative; }
@media (min-width: 1024px) {
  .wjm-main {
    --wjm-rail: 420px;
    display: grid; grid-template-columns: var(--wjm-rail) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
    height: calc(100svh - var(--wjm-top, 164px)); min-height: 600px; max-height: 1180px;
  }
  .wjm-map { grid-column: 1 / -1; grid-row: 1; }
  .wjm-rail { grid-column: 1; grid-row: 1; margin: 2px 0 20px; margin-inline-start: 20px; }
}
@media (min-width: 1024px) and (max-width: 1199.98px) {
  .wjm-main { --wjm-rail: 376px; }
  .wjm-rail { margin-inline-start: 16px; }
}

/* ---------- لوحة النتائج ---------- */
.wjm-rail {
  position: relative; z-index: 3; display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  background: #fff; border: 1px solid var(--m-line); border-radius: 24px; box-shadow: var(--m-shadow-lg);
}
.wjm-rail-head { display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 12px; border-bottom: 1px solid var(--m-line); }
.wjm-search { display: flex; gap: 8px; }
.wjm-search label {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  background: var(--m-paper); border: 1px solid var(--m-line-2); border-radius: 999px; padding: 0 14px;
  color: var(--m-ink-3);
  transition: border-color var(--wj-d1) var(--wj-e-out), box-shadow var(--wj-d1) var(--wj-e-out), background var(--wj-d1) var(--wj-e-out);
}
.wjm-search label:focus-within { border-color: var(--m-primary); background: #fff; box-shadow: 0 0 0 3px rgba(153, 76, 156, .14); }
.wjm-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; padding: 11px 0; color: var(--m-ink); font-size: 16px; }
.wjm-search input::placeholder { color: var(--m-ink-3); opacity: 1; }
@media (min-width: 1024px) { .wjm-search input { font-size: 14.5px; } }
.wjm-fbtn {
  display: flex; align-items: center; gap: 6px; flex: none;
  background: #fff; border: 1px solid var(--m-line-2); border-radius: 999px; color: var(--m-deep);
  padding: 0 15px; min-height: 44px; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: border-color var(--wj-d1) var(--wj-e-out), background var(--wj-d1) var(--wj-e-out);
}
.wjm-fbtn:hover { border-color: var(--m-primary); }
.wjm-fbtn[aria-expanded="true"] { border-color: var(--m-primary); background: var(--m-lilac); }
.wjm-filters { display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 4px; }
.wjm-fgroup > span { display: block; font-size: 12px; font-weight: 600; color: var(--m-ink-3); margin-bottom: 6px; }
.wjm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wjm-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px;
  border: 1px solid var(--m-line-2); background: #fff; border-radius: 999px; color: var(--m-ink-2);
  padding: 4px 12px; font-size: 13px; cursor: pointer;
  transition: border-color var(--wj-d1) var(--wj-e-out), background var(--wj-d1) var(--wj-e-out), color var(--wj-d1) var(--wj-e-out);
}
.wjm-chip:hover { border-color: var(--m-primary); color: var(--m-deep); }
.wjm-chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.wjm-chip[aria-pressed="true"] { background: var(--m-lilac-2); border-color: var(--m-primary); color: var(--m-deep); font-weight: 700; }
.wjm-meta { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--m-ink-3); }
.wjm-meta b { color: var(--m-deep); font-size: 15px; }
.wjm-active { display: flex; gap: 6px; flex-wrap: wrap; }
.wjm-active:empty { display: none; }
.wjm-active button {
  background: var(--m-lilac); border: 1px solid var(--m-lilac-2); color: var(--m-deep); font-weight: 600;
  border-radius: 999px; padding: 3px 11px; font-size: 12.5px; min-height: 28px; cursor: pointer;
  transition: border-color var(--wj-d1) var(--wj-e-out);
}
.wjm-active button:hover { border-color: var(--m-primary); }
.wjm-list {
  display: flex; flex-direction: column; gap: 10px; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain; padding: 12px 12px 22px; background: var(--m-paper-2);
  scrollbar-width: thin; scrollbar-color: var(--m-line-2) transparent;
}
.wjm-empty { color: var(--m-ink-3); text-align: center; padding: 40px 12px; }

/* ---------- بطاقة الجهة ---------- */
.wjm-card {
  display: flex; flex-direction: column; gap: 11px;
  background: #fff; border: 1px solid var(--m-line); border-radius: 18px; padding: 14px;
  transition: border-color var(--wj-d1) var(--wj-e-out), box-shadow var(--wj-d2) var(--wj-e-out);
}
.wjm-card:hover { border-color: var(--m-line-2); box-shadow: 0 6px 20px rgba(74, 36, 117, .09); }
.wjm-card.is-hot { border-color: var(--m-primary); box-shadow: 0 0 0 3px rgba(153, 76, 156, .12); }
.wjm-ctop { display: flex; gap: 12px; align-items: flex-start; }
.wjm-mono {
  flex: none; width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center; font-size: 22px; font-weight: 700;
}
.wjm-mono.is-club { border-radius: 50%; }
.wjm-mono.is-house { border-radius: 14px 14px 24px 24px; }
.wjm-mono.is-wahaj { background: linear-gradient(150deg, #FDC70C 0%, #3CC8F0 52%, #B46AB8 100%); }
.wjm-ctitle { min-width: 0; flex: 1; }
.wjm-ctitle h3 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.45; color: var(--m-ink); }
.wjm-ctitle p { margin: 1px 0 0; font-size: 12.5px; color: var(--m-ink-3); }
.wjm-tag { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 12px; font-weight: 600; border: 1px solid; border-radius: 999px; padding: 1px 10px; }
.wjm-tag i { width: 7px; height: 7px; border-radius: 50%; }
.wjm-cstats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 9px 10px; background: var(--m-paper); border-radius: 12px; }
.wjm-stat { display: flex; gap: 8px; align-items: center; min-width: 0; }
.wjm-stat .ic { flex: none; display: grid; place-items: center; color: var(--m-primary); }
.wjm-stat div { min-width: 0; }
.wjm-stat small { display: block; font-size: 11px; color: var(--m-ink-3); line-height: 1.3; }
.wjm-stat b { display: block; font-size: 13.5px; font-weight: 700; color: var(--m-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wjm-stat b.is-na { color: var(--m-ink-3); font-weight: 500; }
.wjm-cactions { display: flex; gap: 8px; align-items: center; margin-top: auto; }      /* في الشبكة: الأزرار عند قاع كل بطاقة */
.wjm-cactions > * { flex: none; }
.wjm-cactions > .is-site, .wjm-cactions > .is-dis { flex: 0 1 auto; min-width: 0; overflow: hidden; }   /* الرابط الطويل هو الذي ينضغط */
.wjm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px;
  border: 1px solid transparent; border-radius: 999px; padding: 7px 16px;
  font-size: 13.5px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background var(--wj-d1) var(--wj-e-out), border-color var(--wj-d1) var(--wj-e-out), color var(--wj-d1) var(--wj-e-out);
}
.wjm a.wjm-btn.is-pri, .wjm-btn.is-pri { background: var(--m-primary); color: #fff; }
.wjm-btn.is-pri:hover { background: var(--m-primary-d); }
/* في البطاقات: الرابط بلون هادئ (القائمة طويلة، والبنفسجي الصريح يبقى للفعل الرئيس في الصفحة) ويمتلئ عند المرور */
.wjm-card a.wjm-btn.is-pri { background: var(--m-lilac-2); color: var(--m-deep); }
.wjm-card a.wjm-btn.is-pri:hover { background: var(--m-primary); color: #fff; }
.wjm-card a.wjm-btn.is-house { background: #DDF2EC; color: #0F6B5B; }
.wjm-card a.wjm-btn.is-house:hover { background: #1E7F6B; color: #fff; }
.wjm-btn.is-gh { background: #fff; border-color: var(--m-line-2); color: var(--m-deep); }
.wjm-btn.is-gh:hover { border-color: var(--m-primary); }
.wjm-btn.is-site { direction: ltr; max-width: 100%; }
.wjm-btn.is-site bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wjm-btn.is-ico { padding: 7px 10px; margin-inline-start: auto; color: var(--m-primary); }
.wjm-btn.is-dis { background: var(--m-paper); color: var(--m-ink-3); cursor: default; }
.wjm-more { display: flex; flex-direction: column; gap: 8px; border-top: 1px dashed var(--m-line-2); padding-top: 10px; font-size: 13.5px; }
.wjm-more p { margin: 0; color: var(--m-ink-2); line-height: 1.8; }
.wjm-kv { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--m-ink); }
.wjm-kv > span { color: var(--m-ink-3); font-size: 12px; min-width: 64px; }
.wjm-kv code { font-family: inherit; direction: ltr; unicode-bidi: isolate; background: var(--m-lilac); border-radius: 8px; padding: 1px 8px; user-select: all; }
.wjm-kv button { background: #fff; border: 1px solid var(--m-line-2); border-radius: 8px; color: var(--m-ink-2); font-size: 12px; padding: 2px 9px; min-height: 26px; cursor: pointer; }
.wjm-kv button:hover { border-color: var(--m-primary); color: var(--m-deep); }
.wjm-kv a { color: var(--m-primary); font-weight: 600; }

/* ---------- مسرح الخارطة ---------- */
.wjm-map { position: relative; min-height: 0; overflow: hidden; }
.wjm-map canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wjm-gl { pointer-events: none; }
.wjm-hud { touch-action: pan-y; cursor: grab; outline-offset: -3px; }
.wjm-hud.is-drag { cursor: grabbing; }
.wjm-hud.is-point { cursor: pointer; }
.wjm-wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--m-ink-3); font-size: 14px; pointer-events: none; margin: 0; }
.wjm-map.is-ready .wjm-wait { display: none; }

/* المساحة الخالية من المسرح (ما لا تغطيه لوحة النتائج): تُحاذى بها العناصر العائمة وتتبع عرضها */
.wjm-free { position: absolute; inset: 0; inset-inline-start: var(--wjm-rail); pointer-events: none; container: wjm-free / inline-size; }
.wjm-float { position: absolute; z-index: 2; pointer-events: auto; }
.wjm-float, .wjm-tip { font-size: 12.5px; }

/* الأرقام ثم مفتاح الارتفاع في عمود واحد: المفتاح يتبع الأرقام مهما كان ارتفاعها */
.wjm-top {
  top: 12px; inset-inline-start: 16px; max-width: calc(100% - 32px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; pointer-events: none;
}
.wjm-stats {
  display: flex; max-width: 100%; padding: 6px 4px;
  background: #fff; border: 1px solid var(--m-line); border-radius: 18px; box-shadow: var(--m-shadow);
}
.wjm-stats div { flex: none; position: relative; padding: 4px 17px; text-align: center; min-width: 78px; }
.wjm-stats div + div::before { content: ""; position: absolute; inset-block: 9px; inset-inline-start: 0; width: 1px; background: var(--m-line); }
.wjm-stats b { display: block; font-size: 21px; font-weight: 700; line-height: 1.2; color: var(--m-deep); }
.wjm-stats div:first-child b { color: var(--m-primary); }
.wjm-stats small { font-size: 11.5px; color: var(--m-ink-3); white-space: nowrap; }
/* ماذا يمثّل ارتفاع المنطقة ولونها */
.wjm-metric {
  display: flex; align-items: center; gap: 2px; pointer-events: auto;
  background: #fff; border: 1px solid var(--m-line); border-radius: 999px; padding: 3px; box-shadow: var(--m-shadow);
}
.wjm-metric > span { padding: 0 10px 0 6px; color: var(--m-ink-3); white-space: nowrap; }
.wjm-metric button {
  background: none; border: 0; border-radius: 999px; padding: 5px 13px; min-height: 32px; color: var(--m-ink-2); font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background var(--wj-d1) var(--wj-e-out), color var(--wj-d1) var(--wj-e-out);
}
.wjm-metric button:hover { color: var(--m-deep); }
.wjm-metric button[aria-pressed="true"] { background: var(--m-primary); color: #fff; }
.wjm-legend {
  bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 14px; align-items: center; white-space: nowrap; pointer-events: none;
  background: #fff; border: 1px solid var(--m-line); border-radius: 999px; box-shadow: var(--m-shadow);
  padding: 7px 16px; color: var(--m-ink-2);
}
.wjm-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-inline-end: 6px; vertical-align: -1px; }
.wjm-legend .is-hollow { border: 2px solid var(--m-primary); background: #fff; }
.wjm-ctrl { bottom: 18px; inset-inline-start: 16px; display: flex; flex-direction: column; gap: 6px; }
.wjm-ctrl button {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--m-line); box-shadow: var(--m-shadow); color: var(--m-deep);
  font-size: 19px; line-height: 1; cursor: pointer;
  transition: border-color var(--wj-d1) var(--wj-e-out), background var(--wj-d1) var(--wj-e-out), color var(--wj-d1) var(--wj-e-out);
}
.wjm-ctrl button:hover { border-color: var(--m-primary); }
.wjm-ctrl button[aria-pressed="true"] { background: var(--m-primary); border-color: var(--m-primary); color: #fff; }
.wjm-ctrl .is-wide { font-size: 12px; font-weight: 700; }
.wjm-hint {
  top: 12px; inset-inline-end: 16px; color: var(--m-ink-2); pointer-events: none;
  background: rgba(255, 255, 255, .86); border: 1px solid var(--m-line); border-radius: 999px; padding: 6px 13px;
  transition: opacity var(--wj-d3) var(--wj-e-out);
}
.wjm-hint.is-off { opacity: 0; }
.wjm-tip {
  position: absolute; z-index: 4; pointer-events: none; max-width: 270px;
  background: var(--m-ink); color: #fff; border-radius: 12px; padding: 8px 12px;
  box-shadow: 0 12px 30px rgba(43, 27, 63, .28);
}
.wjm-tip b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.wjm-tip span { display: block; color: #D8CBE6; }

/* بطاقة المنطقة المحدّدة: أرقامها ومدنها */
.wjm-insight {
  top: 12px; inset-inline-end: 16px; width: 272px; max-height: calc(100% - 150px); overflow-y: auto;
  background: #fff; border: 1px solid var(--m-line); border-radius: 20px; padding: 15px 16px 16px;
  box-shadow: var(--m-shadow-lg);
  scrollbar-width: thin; scrollbar-color: var(--m-line-2) transparent;
}
.wjm-insight h2 { margin: 0; padding-inline-end: 34px; font-size: 19px; font-weight: 700; color: var(--m-deep); line-height: 1.35; }
.wjm-insight .is-x {
  position: absolute; top: 11px; inset-inline-end: 11px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--m-paper); border: 1px solid var(--m-line); cursor: pointer; font-size: 13px; line-height: 1; color: var(--m-ink-2);
  transition: border-color var(--wj-d1) var(--wj-e-out), color var(--wj-d1) var(--wj-e-out);
}
.wjm-insight .is-x:hover { border-color: var(--m-primary); color: var(--m-deep); }
.wjm-insight .is-big { margin: 2px 0 12px; font-size: 13px; color: var(--m-ink-2); }
.wjm-insight .is-big b { font-size: 28px; font-weight: 700; color: var(--m-primary); margin-inline-end: 5px; }
.wjm-ik { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.wjm-ik div { background: var(--m-lilac); border-radius: 12px; padding: 7px 6px; text-align: center; }
.wjm-ik b { display: block; font-size: 17px; font-weight: 700; color: var(--m-deep); }
.wjm-ik small { font-size: 10.5px; color: var(--m-ink-2); white-space: nowrap; }
.wjm-insight h3 { margin: 0 0 7px; font-size: 11.5px; font-weight: 600; color: var(--m-ink-3); }
.wjm-ic { display: flex; flex-direction: column; gap: 7px; margin: 0 0 14px; padding: 0; list-style: none; }
.wjm-ic li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; font-size: 13px; align-items: center; color: var(--m-ink); }
.wjm-ic li i { grid-column: 1 / -1; height: 5px; border-radius: 5px; background: linear-gradient(90deg, var(--m-gold), var(--m-primary)); transform-origin: right center; }
.wjm-ic li b { font-weight: 700; color: var(--m-deep); }
.wjm-insight .wjm-btn { width: 100%; min-height: 36px; font-size: 12.5px; }

/* الجولة: تعليق المحطة الحالية */
.wjm-tour {
  bottom: 66px; left: 50%; transform: translateX(-50%); text-align: center; pointer-events: none;
  background: #fff; border: 1px solid var(--m-line); border-radius: 22px; padding: 13px 30px 14px; min-width: 270px;
  box-shadow: var(--m-shadow-lg);
}
.wjm-tour b { display: block; font-size: clamp(20px, 2.2vw, 28px); font-weight: 700; color: var(--m-deep); line-height: 1.3; }
.wjm-tour span { display: block; font-size: 13.5px; color: var(--m-primary); font-weight: 600; margin-top: 2px; }
.wjm-tour small { display: block; font-size: 11px; color: var(--m-ink-3); margin-top: 6px; }

/* ---------- عرض القائمة ---------- */
.wjm-main.is-list { display: block; height: auto; min-height: 0; max-height: none; }
.wjm-main.is-list .wjm-map { display: none; }
.wjm-main.is-list .wjm-rail { margin: 0; background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.wjm-main.is-list .wjm-rail-head { max-width: 860px; margin-inline: auto; width: 100%; border: 0; padding: 6px clamp(16px, 2.2vw, 30px) 12px; }
.wjm-main.is-list .wjm-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); align-content: start; gap: 14px;
  overflow: visible; background: none; padding: 6px clamp(16px, 2.2vw, 30px) 44px;
}

/* ---------- النوافذ (عن الخارطة · أضف ناديك) ---------- */
.wjm-about { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 20px; background: rgba(43, 27, 63, .44); }
.wjm-main.is-list .wjm-about { position: fixed; z-index: 95; }       /* فوق ترويسة الموقع (50) وشريط الجوال (80) ودون نافذة البحث (100) */
.wjm-about-box {
  position: relative; width: 100%; max-width: 620px; max-height: 100%; overflow: auto;
  background: #fff; border-radius: 24px; padding: 26px 28px 28px; box-shadow: var(--m-shadow-lg);
  scrollbar-width: thin; scrollbar-color: var(--m-line-2) transparent;
}
.wjm-about h2 { margin: 0 0 8px; font-size: 22px; font-weight: 700; color: var(--m-deep); }
.wjm-about h3 { margin: 18px 0 8px; font-size: 15px; font-weight: 700; color: var(--m-primary); }
.wjm-about p, .wjm-about li { margin: 0 0 6px; color: var(--m-ink-2); font-size: 14px; line-height: 1.85; }
.wjm-about ul { margin: 0; padding-inline-start: 18px; }
.wjm-about .is-close { float: left; margin-inline-start: 12px; }
.wjm-form { display: flex; flex-direction: column; gap: 13px; margin-top: 16px; }
.wjm-form.hidden { display: none; }      /* forms.js يخفي الحقول بعد الإرسال بصنف ‎.hidden‎ */
.wjm-form .is-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.wjm-form label { display: block; font-size: 12.5px; font-weight: 700; color: var(--m-ink-2); margin-bottom: 5px; }
.wjm-form .req { color: var(--m-primary); }
.wjm-form input, .wjm-form select, .wjm-form textarea {
  width: 100%; background: #fff; border: 1px solid var(--m-line-2); border-radius: 12px;
  padding: 10px 13px; color: var(--m-ink); font-size: 16px; outline: none;
  transition: border-color var(--wj-d1) var(--wj-e-out), box-shadow var(--wj-d1) var(--wj-e-out);
}
.wjm-form input::placeholder, .wjm-form textarea::placeholder { color: var(--m-ink-3); opacity: 1; }
.wjm-form input:focus, .wjm-form select:focus, .wjm-form textarea:focus { border-color: var(--m-primary); box-shadow: 0 0 0 3px rgba(153, 76, 156, .14); }
.wjm-form textarea { min-height: 88px; resize: vertical; line-height: 1.75; }
.wjm-form fieldset { border: 1px solid var(--m-line); background: var(--m-paper); border-radius: 16px; padding: 12px 14px 14px; margin: 0; display: flex; flex-direction: column; gap: 13px; }
.wjm-form legend { padding: 0 8px; font-size: 12.5px; color: var(--m-primary); font-weight: 700; }
.wjm-form .wjm-note { margin: 0; font-size: 12.5px; color: var(--m-ink-3); line-height: 1.7; }
.wjm-form .wjm-btn { min-height: 46px; font-size: 15px; }
.wjm-ok { text-align: center; padding: 30px 8px 10px; }
.wjm-ok h3 { margin: 0 0 6px; font-size: 20px; color: var(--m-deep); }
.wjm-ok p { margin: 0; }

/* ---------- العناصر العائمة تتبع عرض المساحة الخالية ---------- */
/* مساحة متوسطة (سطح مكتب صغير · لوحي): التلميح وبطاقة المنطقة ينزلان بمحاذاة مفتاح الارتفاع */
@container wjm-free (max-width: 899.98px) {
  .wjm-hint, .wjm-insight { top: 86px; }
  .wjm-metric > span { display: none; }
  .wjm-map.is-tour .wjm-insight { display: none; }       /* تعليق الجولة يكفي؛ لا يتراكبان */
}
/* مساحة ضيّقة (جوال): شريط أرقام يُمرَّر أفقيًا، وبطاقة المنطقة سطر واحد فوق مفتاح الألوان */
@container wjm-free (max-width: 599.98px) {
  .wjm-top { top: 10px; inset-inline-start: 10px; max-width: calc(100% - 20px); gap: 6px; }
  .wjm-stats { overflow-x: auto; pointer-events: auto; scrollbar-width: none; border-radius: 16px; padding: 4px 2px; }
  .wjm-stats::-webkit-scrollbar { display: none; }
  .wjm-stats div { min-width: 0; padding: 3px 12px; }
  .wjm-stats b { font-size: 17px; }
  .wjm-stats small { font-size: 10.5px; }
  .wjm-metric { font-size: 12px; }
  .wjm-hint { display: none; }
  .wjm-legend { bottom: 30px; gap: 8px; font-size: 11px; padding: 6px 10px; }
  .wjm-ctrl { bottom: 72px; inset-inline-start: 10px; }
  .wjm-tour { bottom: 72px; min-width: 0; width: max-content; max-width: calc(100% - 124px); padding: 9px 18px 10px; border-radius: 18px; }
  .wjm-tour b { font-size: 18px; }
  .wjm-tour span { font-size: 12.5px; }
  .wjm-tour small { margin-top: 3px; }
  .wjm-insight {
    top: auto; bottom: 72px; inset-inline: 62px 10px; width: auto; max-height: none; overflow: visible;
    display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px;
    padding: 8px 14px; padding-inline-end: 46px; border-radius: 16px;
  }
  .wjm-insight h2 { font-size: 15.5px; padding: 0; }
  .wjm-insight .is-big { margin: 0; font-size: 12px; }
  .wjm-insight .is-big b { font-size: 16px; }
  .wjm-insight .is-x { top: 50%; inset-inline-end: 8px; transform: translateY(-50%); }
  .wjm-insight .wjm-ik, .wjm-insight h3, .wjm-insight .wjm-ic, .wjm-insight .wjm-btn { display: none; }
}

/* ---------- الجوال واللوحي: الخارطة فوق، ولوحة النتائج ورقة تصعد على طرفها ---------- */
@media (max-width: 1180px) {
  .wjm-mast-txt p { display: none; }
  .wjm-mast-txt { padding-inline-start: 14px; }
}
@media (max-width: 1023.98px) {
  .wjm-mast { flex-wrap: wrap; padding-block: 12px 8px; }
  .wjm-mast-logo { height: 54px; }
  .wjm-nav { order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .wjm-nav::-webkit-scrollbar { display: none; }
  .wjm-acts { margin-inline-start: auto; }
  .wjm-act { padding: 8px 15px; font-size: 13.5px; }
  .wjm-main { display: flex; flex-direction: column; }
  .wjm-map { order: -1; height: 66svh; min-height: 420px; max-height: 660px; }      /* الخارطة أولًا وإن جاءت اللوحة قبلها في المصدر */
  .wjm-rail { margin-top: -20px; border-radius: 24px 24px 0 0; border-inline: 0; border-bottom: 0; box-shadow: 0 -10px 34px rgba(74, 36, 117, .12); overflow: visible; }
  .wjm-rail-head { position: relative; padding-top: 22px; }
  .wjm-rail-head::before { content: ""; position: absolute; top: 9px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--m-line-2); }
  .wjm-list { overflow: visible; }
  .wjm-main.is-list .wjm-rail-head::before { display: none; }
  /* النافذة على الجوال صفحة كاملة فوق ترويسة الموقع وشريطه، وزر الإغلاق يبقى في أعلاها */
  .wjm-about { position: fixed; inset: 0; z-index: 95; display: block; padding: 0; background: #fff; }
  .wjm-about-box { max-width: none; height: 100%; max-height: none; border-radius: 0; box-shadow: none; padding: 16px 18px 32px; overscroll-behavior: contain; }
  .wjm-about .is-close { position: sticky; top: 0; z-index: 1; box-shadow: var(--m-shadow); }
  .wjm-form .is-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .wjm-mast-txt { display: none; }
  /* النص يبقى اسمًا للزر عند قارئ الشاشة، ويُخفى بصريًا فقط */
  .wjm-act span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .wjm-act { position: relative; padding: 8px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .wjm-nav button::after, .wjm-hint, .wjm-card, .wjm-act { transition: none; }
}
