/* =====================================================================
   الطلاسي Prediction
   الاتجاه الجمالي: «ملعب تحت أضواء الليل»
     كحلي منتصف الليل  ·  ذهبي الكشافات  ·  أخضر العشب
   الخط: خط النظام (SF / SF Arabic على أجهزة آبل) للنصوص،
         و Alexandria للعناوين والأرقام.
   ===================================================================== */

:root {
  /* --- الأسطح: كحلي بتدرّج عمق حقيقي، مو لون واحد مكرر --- */
  --pitch-000: #05080f;
  --pitch-050: #080d18;
  --pitch-100: #0d1524;
  --pitch-200: #131d31;
  --pitch-300: #1b2740;
  --pitch-400: #24334f;
  --line: #1e2b45;
  --line-soft: #162034;

  /* --- النص: رمادي مائل للأزرق، مو رمادي محايد فوق خلفية ملوّنة --- */
  --ink: #f1f5fb;
  --ink-2: #9dafcc;
  --ink-3: #64789a;

  /* --- الألوان: ذهبي الكشافات مكمّل للكحلي على عجلة الألوان --- */
  --gold: #f2b03c;
  --gold-hi: #ffd177;
  --gold-lo: #b97f18;
  --grass: #1fbf6b;
  --grass-lo: #0d7a42;
  --flag: #ff5a4d;
  --sky: #4d86ff;

  /* --- الظلال: ثلاث درجات عمق مختلفة، مو ظل واحد مكرر --- */
  --lift-1: 0 1px 2px rgba(3, 6, 12, 0.5);
  --lift-2: 0 6px 18px -6px rgba(3, 6, 12, 0.7);
  --lift-3: 0 22px 48px -18px rgba(3, 6, 12, 0.92);
  --beam: 0 8px 30px -8px rgba(242, 176, 60, 0.45);

  --fx: cubic-bezier(0.22, 0.8, 0.26, 1);
}

/* الخطوط ---------------------------------------------------------- */
:root {
  --ui: -apple-system, "SF Arabic", "SF Pro Text", BlinkMacSystemFont,
    "Alexandria", "Segoe UI", system-ui, sans-serif;
  --display: "Alexandria", -apple-system, "SF Arabic", BlinkMacSystemFont,
    system-ui, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--pitch-000);
}

body {
  margin: 0;
  min-height: 100vh;
  direction: rtl;
  color: var(--ink);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background: var(--pitch-050);
  /* ضوء كشّاف واحد من أعلى اليمين — مو تدرّج متماثل */
  background-image: radial-gradient(
      120% 55% at 88% -8%,
      rgba(242, 176, 60, 0.14),
      transparent 62%
    ),
    radial-gradient(
      90% 45% at 8% 4%,
      rgba(77, 134, 255, 0.09),
      transparent 60%
    ),
    linear-gradient(180deg, var(--pitch-100) 0%, var(--pitch-050) 42%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  overscroll-behavior-y: none;
}

button,
input,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

svg {
  width: 20px;
  height: 20px;
  flex: none;
  display: block;
}

.stage {
  max-width: 620px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.page {
  flex: 1;
  padding-bottom: 24px;
  animation: rise 0.42s var(--fx);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

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

/* ================= شريط علوي ================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  height: 54px;
  padding: 0 12px;
  padding-top: env(safe-area-inset-top);
  background: linear-gradient(
    180deg,
    rgba(8, 13, 24, 0.94),
    rgba(8, 13, 24, 0.78)
  );
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.topbar h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.2px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--pitch-200);
  color: var(--ink-2);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.12s var(--fx), color 0.15s;
}

.icon-btn:active {
  transform: scale(0.9);
  color: var(--ink);
}

.step-dots {
  display: flex;
  gap: 4px;
  justify-content: center;
  align-items: center;
}

.step-dots i {
  width: 5px;
  height: 5px;
  border-radius: 9px;
  background: var(--pitch-400);
  transition: all 0.35s var(--fx);
}

.step-dots i.on {
  background: var(--gold);
}

.step-dots i.now {
  width: 18px;
  background: var(--gold-hi);
}

/* ================= لافتة الدوري ================= */
.leagueband {
  position: relative;
  overflow: hidden;
  padding: 22px 20px 20px;
  background: linear-gradient(
    255deg,
    var(--pitch-300) 0%,
    var(--pitch-200) 45%,
    var(--pitch-100) 100%
  );
  border-bottom: 1px solid var(--line);
}

/* الشعار الكبير الشبحي — يخرج عن الحافة عمداً (لا تماثل) */
.leagueband .ghost {
  position: absolute;
  inset-inline-start: -34px;
  top: 50%;
  transform: translateY(-50%);
  width: 168px;
  height: 168px;
  opacity: 0.11;
  filter: grayscale(1) brightness(2.4);
  object-fit: contain;
  pointer-events: none;
}

.leagueband .row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}

.leagueband .mark {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  display: block;
  padding: 7px;
  box-shadow: var(--lift-2);
}

.leagueband .mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.leagueband h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.leagueband .en {
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  direction: ltr;
  text-align: right;
  margin-top: 2px;
}

.leagueband .brief {
  position: relative;
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: 14px;
  max-width: 42ch;
}

.leagueband .brief b {
  color: var(--gold-hi);
  font-weight: 600;
}

/* ================= المنصّة (العنصر المميّز) ================= */
.podium {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  align-items: end;
  padding: 20px 16px 4px;
}

.plinth {
  position: relative;
  border-radius: 14px 14px 8px 8px;
  background: linear-gradient(180deg, var(--pitch-300), var(--pitch-200));
  border: 1px solid var(--line);
  padding: 9px 5px 8px;
  text-align: center;
  cursor: default;
  transition: all 0.3s var(--fx);
  overflow: hidden;
}

.plinth[data-h="1"] {
  min-height: 152px;
}
.plinth[data-h="2"] {
  min-height: 134px;
}
.plinth[data-h="3"] {
  min-height: 119px;
}
.plinth[data-h="4"] {
  min-height: 106px;
}

.plinth.empty {
  background: none;
  border-style: dashed;
  border-color: var(--pitch-400);
}

.plinth.set {
  cursor: pointer;
  box-shadow: var(--lift-2);
}

.plinth.set:active {
  transform: translateY(2px) scale(0.98);
}

/* عمود المركز الأول: عمود ضوء + إطار ذهبي */
.plinth[data-h="1"].set {
  border-color: rgba(242, 176, 60, 0.55);
  background: linear-gradient(
    180deg,
    rgba(242, 176, 60, 0.17),
    var(--pitch-200) 62%
  );
  box-shadow: var(--beam);
}

.plinth[data-h="1"].set::before {
  content: "";
  position: absolute;
  top: -46px;
  inset-inline: 18%;
  height: 92px;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(255, 209, 119, 0.4),
    transparent 70%
  );
  pointer-events: none;
}

.plinth .num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 13px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.plinth.set .num {
  color: var(--gold);
}

.plinth .nm {
  font-size: 11.5px;
  line-height: 1.25;
  color: var(--ink-2);
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.plinth.set .nm {
  color: var(--ink);
  font-weight: 600;
}

.plinth .crest {
  margin: 7px auto 0;
}

.plinth .ph {
  width: 38px;
  height: 38px;
  margin: 9px auto 0;
  border-radius: 50%;
  border: 1.5px dashed var(--pitch-400);
}

/* ================= الشعارات ================= */
.crest {
  position: relative;
  display: block;
  width: 40px;
  height: 40px;
  flex: none;
}

.crest img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.55));
}

.crest i {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  font-family: var(--display);
  font-style: normal;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--gold);
  background: var(--pitch-300);
  border: 1px solid var(--line);
  border-radius: 50%;
  direction: ltr;
}

.crest.nc i {
  display: grid;
}

.crest.sm {
  width: 28px;
  height: 28px;
}
.crest.sm i {
  font-size: 10px;
}
.crest.lg {
  width: 60px;
  height: 60px;
}
.crest.lg i {
  font-size: 19px;
}

/* ================= الفاصل المعنون ================= */
.rule {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 26px 20px 10px;
}

.rule span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--ink-3);
  text-transform: uppercase;
  white-space: nowrap;
}

.rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.rule .count {
  font-family: var(--display);
  color: var(--gold);
  letter-spacing: 0;
}

/* ================= البحث ================= */
.finder {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 16px 12px;
  padding: 11px 14px;
  background: var(--pitch-100);
  border: 1px solid var(--line);
  border-radius: 13px;
  transition: border-color 0.2s;
}

.finder:focus-within {
  border-color: var(--gold-lo);
}

.finder svg {
  width: 17px;
  height: 17px;
  color: var(--ink-3);
}

.finder input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  font-size: 16px;
}

.finder input::placeholder {
  color: var(--ink-3);
}

/* ================= شبكة الفرق ================= */
.squad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 16px;
}

@media (max-width: 360px) {
  .squad {
    grid-template-columns: repeat(2, 1fr);
  }
}

.club {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 6px 10px;
  background: var(--pitch-100);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, transform 0.12s var(--fx);
  min-height: 92px;
  justify-content: center;
}

.club:active {
  transform: scale(0.95);
}

.club span {
  font-size: 11.5px;
  line-height: 1.25;
  color: var(--ink-2);
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.club.on {
  background: linear-gradient(
    180deg,
    rgba(242, 176, 60, 0.15),
    rgba(242, 176, 60, 0.04)
  );
  border-color: rgba(242, 176, 60, 0.5);
}

.club.on span {
  color: var(--ink);
  font-weight: 600;
}

.club .rank {
  position: absolute;
  top: -6px;
  inset-inline-start: -6px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--gold);
  color: #241703;
  font-family: var(--display);
  font-weight: 800;
  font-size: 11px;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.55);
  font-variant-numeric: tabular-nums;
}

.club.dim {
  opacity: 0.7;
}

.empty-note {
  padding: 26px 20px;
  color: var(--ink-3);
  font-size: 14px;
  text-align: center;
}

/* ================= شريط الإجراء السفلي ================= */
.actionbar {
  position: sticky;
  bottom: 0;
  z-index: 55;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(
    180deg,
    rgba(8, 13, 24, 0.05),
    rgba(8, 13, 24, 0.92) 32%
  );
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 15px 20px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.2px;
  cursor: pointer;
  background: var(--pitch-300);
  color: var(--ink);
  transition: transform 0.12s var(--fx), opacity 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}

.btn-gold {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  color: #2a1a02;
  box-shadow: var(--beam);
}

.btn-grass {
  background: linear-gradient(180deg, #2ad47c, var(--grass));
  color: #032315;
  box-shadow: 0 8px 26px -8px rgba(31, 191, 107, 0.5);
}

.btn-quiet {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-family: var(--ui);
  font-weight: 500;
}

.btn-danger {
  background: rgba(255, 90, 77, 0.12);
  color: var(--flag);
  font-family: var(--ui);
  font-weight: 600;
}

.btn-sm {
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 11px;
}

.btn-pair {
  display: flex;
  gap: 9px;
}

/* ================= صفحة البداية ================= */
.opening {
  padding: 40px 20px 0;
}

.crown {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  background: linear-gradient(155deg, var(--gold-hi), var(--gold-lo));
  display: grid;
  place-items: center;
  color: #2a1a02;
  box-shadow: var(--beam), var(--lift-3);
  margin-bottom: 20px;
}

.crown svg {
  width: 38px;
  height: 38px;
}

.opening h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 46px;
  line-height: 1.12;
  letter-spacing: -1.6px;
}

.opening .sub-en {
  font-family: var(--display);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 7px;
  color: var(--gold);
  direction: ltr;
  text-align: right;
  margin-top: 8px;
}

.opening .season-tag {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 13px;
  direction: ltr;
}

.opening .lede {
  margin: 18px 0 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
  max-width: 34ch;
}

/* شريط شعارات الدوريات — عرض مختلف عن الشبكة والقوائم */
.leaguestrip {
  display: flex;
  gap: 8px;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.leaguestrip::-webkit-scrollbar {
  display: none;
}

.leaguestrip .lg {
  flex: none;
  width: 62px;
  text-align: center;
}

.leaguestrip .lg .disc {
  width: 46px;
  height: 46px;
  margin: 0 auto 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  display: block;
  padding: 6px;
  box-shadow: var(--lift-1);
}

.leaguestrip .lg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.leaguestrip .lg em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--ink-3);
}

/* حقل الاسم — سطر مفتوح، مو بطاقة */
.namefield {
  margin: 0 20px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.25s;
}

.namefield:focus-within {
  border-color: var(--gold);
}

.namefield input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.4px;
  padding: 4px 0;
}

.namefield input::placeholder {
  color: var(--ink-3);
  font-weight: 400;
}

.hint {
  margin: 9px 20px 0;
  font-size: 13.5px;
  color: var(--ink-3);
  line-height: 1.45;
}

.hint.bad {
  color: var(--flag);
}

/* جدول النقاط — عرض جدولي، مو بطاقات */
.scoretable {
  margin: 0 20px;
  width: calc(100% - 40px);
  border-collapse: collapse;
  font-size: 14.5px;
}

.scoretable td {
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2);
}

.scoretable tr:last-child td {
  border-bottom: 0;
}

.scoretable td:last-child {
  text-align: end;
  font-family: var(--display);
  font-weight: 700;
  color: var(--gold-hi);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.scoretable .tot td {
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  padding-top: 12px;
}

/* أسماء المشاركين */
.namelist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 20px;
}

.namelist b {
  font-weight: 500;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--pitch-200);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 4px 11px;
}

/* ================= المراجعة ================= */
.reviewblock {
  padding: 0 16px;
}

.reviewrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.reviewrow:last-child {
  border-bottom: 0;
}

.reviewrow .pos {
  font-family: var(--display);
  font-weight: 800;
  font-size: 13px;
  color: var(--ink-3);
  width: 14px;
  font-variant-numeric: tabular-nums;
}

.reviewrow.first .pos {
  color: var(--gold);
}

.reviewrow .t {
  flex: 1;
  font-size: 15px;
}

.reviewhead {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 18px 12px 8px;
}

.reviewhead img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.reviewhead b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
}

.lockwarn {
  margin: 20px 16px 0;
  padding: 14px 16px;
  border-inline-start: 3px solid var(--flag);
  background: rgba(255, 90, 77, 0.07);
  border-radius: 0 12px 12px 0;
  font-size: 14px;
  color: #ffb3ac;
  line-height: 1.5;
}

/* ================= شاشة النجاح ================= */
.done {
  padding: 60px 24px 24px;
  text-align: center;
}

.done .seal {
  width: 96px;
  height: 96px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: linear-gradient(160deg, #2ad47c, var(--grass-lo));
  display: grid;
  place-items: center;
  color: #04240f;
  box-shadow: 0 18px 44px -14px rgba(31, 191, 107, 0.6);
  animation: seal 0.6s var(--fx);
}

.done .seal svg {
  width: 46px;
  height: 46px;
}

@keyframes seal {
  from {
    transform: scale(0.4) rotate(-14deg);
    opacity: 0;
  }
}

.done h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.7px;
  margin: 0 0 8px;
}

.done p {
  color: var(--ink-2);
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

/* ================= جدول الترتيب ================= */
.board {
  padding: 0 16px;
}

.boardrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--pitch-100);
  border: 1px solid var(--line-soft);
  margin-bottom: 7px;
}

.boardrow.lead {
  background: linear-gradient(
    260deg,
    rgba(242, 176, 60, 0.16),
    var(--pitch-100) 65%
  );
  border-color: rgba(242, 176, 60, 0.42);
  box-shadow: var(--lift-2);
}

.boardrow .pl {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  background: var(--pitch-300);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.boardrow.lead .pl {
  background: linear-gradient(160deg, var(--gold-hi), var(--gold-lo));
  color: #2a1a02;
}

.boardrow .who {
  flex: 1;
  min-width: 0;
}

.boardrow .who b {
  font-weight: 600;
  font-size: 15.5px;
  display: block;
}

.boardrow .track {
  height: 3px;
  border-radius: 3px;
  background: var(--pitch-300);
  margin-top: 7px;
  overflow: hidden;
}

.boardrow .track i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi));
}

.boardrow .sc {
  font-family: var(--display);
  font-weight: 800;
  font-size: 21px;
  color: var(--gold-hi);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.boardrow .sc em {
  font-style: normal;
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-3);
  margin-inline-start: 3px;
}

/* التبويب */
.switcher {
  display: flex;
  gap: 4px;
  margin: 16px 16px 4px;
  padding: 4px;
  background: var(--pitch-100);
  border: 1px solid var(--line-soft);
  border-radius: 13px;
}

.switcher button {
  flex: 1;
  background: none;
  border: 0;
  padding: 9px;
  border-radius: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-3);
  cursor: pointer;
  transition: all 0.2s;
}

.switcher button.on {
  background: var(--pitch-300);
  color: var(--ink);
}

/* تفاصيل التوقعات */
details.entry {
  border-bottom: 1px solid var(--line-soft);
}

details.entry > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 4px;
  cursor: pointer;
}

details.entry > summary::-webkit-details-marker {
  display: none;
}

details.entry .arw {
  color: var(--ink-3);
  transition: transform 0.24s var(--fx);
}

details.entry[open] .arw {
  transform: rotate(-90deg);
}

.entrybody {
  padding: 0 4px 16px;
}

.line {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  font-size: 14.5px;
  color: var(--ink-2);
}

.line .n {
  color: var(--ink-3);
  font-family: var(--display);
  font-size: 12px;
  width: 12px;
  font-variant-numeric: tabular-nums;
}

.line .g {
  margin-inline-start: auto;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.g.hit {
  color: var(--grass);
}
.g.near {
  color: var(--gold);
}
.g.off {
  color: var(--ink-3);
}

.minihead {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--ink-3);
  text-transform: uppercase;
}

.minihead img {
  width: 17px;
  height: 17px;
  object-fit: contain;
}

/* ================= الأدمن ================= */
.panelrow {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.panelrow:last-of-type {
  border-bottom: 0;
}

.panelrow .body {
  flex: 1;
  min-width: 0;
}

.panelrow .body b {
  font-weight: 600;
  font-size: 15.5px;
  display: block;
}

.panelrow .body small {
  color: var(--ink-3);
  font-size: 12.5px;
  display: block;
  margin-top: 1px;
}

.panelrow .val {
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  color: var(--gold-hi);
  font-variant-numeric: tabular-nums;
}

.dot {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #05080f;
}

.dot svg {
  width: 17px;
  height: 17px;
}

.toggle {
  position: relative;
  width: 50px;
  height: 30px;
  flex: none;
  border-radius: 30px;
  background: var(--pitch-400);
  border: 0;
  cursor: pointer;
  padding: 0;
  transition: background 0.28s var(--fx);
}

.toggle.on {
  background: var(--grass);
}

.toggle i {
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.28s var(--fx);
}

.toggle.on i {
  transform: translateX(-20px);
}

.picker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.picker label {
  font-size: 14px;
  color: var(--ink-3);
  width: 62px;
  flex: none;
}

.picker select {
  flex: 1;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
  background: var(--pitch-200);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  font-size: 15px;
  color: var(--ink);
}

.picker select:focus {
  border-color: var(--gold-lo);
}

.slab {
  margin: 0 16px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  overflow: hidden;
  background: var(--pitch-100);
}

.slab > header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--pitch-200);
}

.slab > header img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.slab > header b {
  flex: 1;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14.5px;
}

.tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 3px 9px;
  border-radius: 999px;
}

.tag.ok {
  background: rgba(31, 191, 107, 0.16);
  color: var(--grass);
}

.tag.no {
  background: rgba(255, 90, 77, 0.14);
  color: var(--flag);
}

/* ================= نافذة التأكيد ================= */
.veil {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(3, 6, 12, 0.68);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: end center;
  animation: fade 0.22s ease;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.sheet {
  width: 100%;
  max-width: 620px;
  background: var(--pitch-200);
  border-top: 1px solid var(--line);
  border-radius: 22px 22px 0 0;
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
  animation: slideup 0.34s var(--fx);
  box-shadow: var(--lift-3);
}

@keyframes slideup {
  from {
    transform: translateY(100%);
  }
}

.sheet .grab {
  width: 38px;
  height: 4px;
  border-radius: 4px;
  background: var(--pitch-400);
  margin: 0 auto 18px;
}

.sheet h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.4px;
}

.sheet p {
  margin: 0 0 20px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
}

/* ================= إشعار ================= */
.flash-wrap {
  position: fixed;
  bottom: calc(88px + env(safe-area-inset-bottom));
  inset-inline: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  padding: 0 20px;
}

.flash {
  background: var(--pitch-300);
  border: 1px solid var(--line);
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  box-shadow: var(--lift-3);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s var(--fx);
  max-width: 100%;
  text-align: center;
}

.flash.show {
  opacity: 1;
  transform: none;
}

.flash.err {
  color: #ffb3ac;
  border-color: rgba(255, 90, 77, 0.4);
}

.flash.ok {
  color: #8ff0bd;
  border-color: rgba(31, 191, 107, 0.4);
}

/* ================= متنوّع ================= */
.wait {
  display: grid;
  place-items: center;
  padding: 90px 0;
}

.spin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--pitch-400);
  border-top-color: var(--gold);
  animation: turn 0.7s linear infinite;
}

.spin.dark {
  border-color: rgba(0, 0, 0, 0.22);
  border-top-color: rgba(0, 0, 0, 0.65);
}

@keyframes turn {
  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none !important;
}

.credit {
  text-align: center;
  color: var(--ink-3);
  font-size: 12px;
  padding: 30px 20px calc(24px + env(safe-area-inset-bottom));
}

.credit a {
  color: var(--ink-2);
  text-decoration: none;
}

.pad {
  padding: 0 20px;
}
