/* ==========================================================================
   صُفّارة — نظام التصميم
   أخضر الملعب + ليموني الأضواء الكاشفة. داكن وفاتح. الجوال أولًا.
   قاعدة: النص يظهر كاملًا دائمًا (لا قطع ولا حذف)، والتخطيط يتّسع له.
   ========================================================================== */

/* ---------- الخطوط (مستضافة محليًا) ---------- */
@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); }

/* ---------- الألوان الخام ---------- */
:root {
  --pitch-950: #03120b;
  --pitch-900: #061a11;
  --pitch-850: #0a2418;
  --pitch-800: #0e2f20;
  --pitch-750: #123a28;
  --pitch-700: #174a33;
  --pitch-600: #0f7a47;
  --pitch-500: #16a35f;
  --pitch-400: #2fcf7d;
  --pitch-300: #74e6a9;
  --pitch-100: #dff7ea;
  --pitch-50: #f1fbf5;
  --lime-400: #c6f432;
  --lime-500: #aede10;
  --lime-700: #5d7a00;
  --live: #ff3b5c;
  --gold: #ffc233;
  --card-yellow: #ffd02e;
  --card-red: #f0344f;
  /* مربع المركز (D168): نص أبيض بتباين 4.5:1 على الأقل مع كل لون، في الوضعين (الفحص 12) */
  --pos-g: #c2410c;
  --pos-d: #2563eb;
  --pos-m: #15803d;
  --pos-f: #dc2626;
  --pos-u: #64716b;
  --pos-ink: #ffffff;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --gap: 16px;
  --header-h: 64px;
  --bottom-nav-h: 68px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font-ar: "Plex Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-en: "Inter", "Segoe UI", system-ui, sans-serif;
}

/* ---------- الوضع الداكن (افتراضي) ---------- */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050f0a;
  --bg-grad: radial-gradient(1200px 500px at 50% -120px, rgba(22, 163, 95, .22), transparent 70%);
  --surface: #0b1a13;
  --surface-2: #10231a;
  --surface-3: #163024;
  --surface-hover: #14291f;
  --border: #1d3a2c;
  --border-strong: #2a5140;
  --text: #ecf7f1;
  --text-2: #a9c4b6;
  --text-3: #7d9c8d;
  --brand: #2fcf7d;
  --brand-strong: #16a35f;
  --brand-text: #2fcf7d;
  --brand-soft: rgba(47, 207, 125, .14);
  --brand-ink: #03120b;
  /* المميز (D167): الليموني خلفية بنص غامق، أو نص وأيقونة في الداكن وحده لأن تباينه كافٍ */
  --accent: var(--lime-400);
  --accent-soft: rgba(198, 244, 50, .14);
  --accent-bg: var(--lime-400);
  --accent-bg-hover: var(--lime-500);
  --accent-on: #1a2400;
  --accent-text: var(--lime-400);
  --accent-fill: var(--lime-400);
  --accent-data: var(--lime-400);
  --gold-text: var(--gold);
  --gold-icon: var(--gold);
  --form-ink: #03120b;
  --live: #ff5470;
  --live-soft: rgba(255, 59, 92, .16);
  --win: #2fcf7d;
  --draw: #8da79a;
  --loss: #ff5d77;
  --focus: #c6f432;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 8px 28px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
  --pitch-grass-a: #0f5a36;
  --pitch-grass-b: #116340;
  --pitch-line: rgba(255, 255, 255, .55);
  --overlay: rgba(1, 8, 5, .72);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f7f4;
  --bg-grad: radial-gradient(1200px 500px at 50% -160px, rgba(22, 163, 95, .16), transparent 70%);
  --surface: #ffffff;
  --surface-2: #f5f9f6;
  --surface-3: #eaf2ed;
  --surface-hover: #f0f6f2;
  --border: #dfe9e3;
  --border-strong: #c3d6ca;
  --text: #0b1d14;
  --text-2: #3e5a4b;
  --text-3: #5a7064;
  --brand: #0b7442;
  --brand-strong: #0b6e3e;
  --brand-text: #0b6e3e;
  --brand-soft: rgba(15, 138, 79, .1);
  --brand-ink: #ffffff;
  --accent: #b5e61d;
  --accent-soft: rgba(150, 196, 0, .16);
  --accent-bg: #b5e61d;
  --accent-bg-hover: #a3d20f;
  --accent-on: #1a2400;
  --accent-text: var(--brand);
  --accent-fill: var(--lime-700);
  --accent-data: var(--lime-700);
  --gold-text: #8a5a00;
  --gold-icon: #b37400;
  --form-ink: #ffffff;
  --live: #c8143d;
  --live-soft: rgba(225, 29, 72, .1);
  --win: #0b7442;
  --draw: #627569;
  --loss: #c8143d;
  --focus: #0b7442;
  --shadow-sm: 0 1px 2px rgba(10, 40, 25, .06);
  --shadow: 0 8px 24px rgba(10, 40, 25, .08);
  --shadow-lg: 0 24px 60px rgba(10, 40, 25, .14);
  --pitch-grass-a: #1c8a52;
  --pitch-grass-b: #20955a;
  --pitch-line: rgba(255, 255, 255, .8);
  --overlay: rgba(6, 26, 17, .45);
}

@media (prefers-color-scheme: light) {
  [data-theme="auto"] {
    color-scheme: light;
    --bg: #f3f7f4;
    --bg-grad: radial-gradient(1200px 500px at 50% -160px, rgba(22, 163, 95, .16), transparent 70%);
    --surface: #ffffff;
    --surface-2: #f5f9f6;
    --surface-3: #eaf2ed;
    --surface-hover: #f0f6f2;
    --border: #dfe9e3;
    --border-strong: #c3d6ca;
    --text: #0b1d14;
    --text-2: #3e5a4b;
    --text-3: #5a7064;
    --brand: #0b7442;
    --brand-strong: #0b6e3e;
    --brand-text: #0b6e3e;
    --brand-soft: rgba(15, 138, 79, .1);
    --brand-ink: #ffffff;
    --accent: #b5e61d;
    --accent-soft: rgba(150, 196, 0, .16);
    --accent-bg: #b5e61d;
    --accent-bg-hover: #a3d20f;
    --accent-on: #1a2400;
    --accent-text: var(--brand);
    --accent-fill: var(--lime-700);
    --accent-data: var(--lime-700);
    --gold-text: #8a5a00;
    --gold-icon: #b37400;
    --form-ink: #ffffff;
    --live: #c8143d;
    --live-soft: rgba(225, 29, 72, .1);
    --win: #0b7442;
    --draw: #627569;
    --loss: #c8143d;
    --focus: #0b7442;
    --shadow-sm: 0 1px 2px rgba(10, 40, 25, .06);
    --shadow: 0 8px 24px rgba(10, 40, 25, .08);
    --shadow-lg: 0 24px 60px rgba(10, 40, 25, .14);
    --pitch-grass-a: #1c8a52;
    --pitch-grass-b: #20955a;
    --pitch-line: rgba(255, 255, 255, .8);
    --overlay: rgba(6, 26, 17, .45);
  }
}

/* ---------- الأساس ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-grad), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
html[lang="ar"] body { font-family: var(--font-ar); }
html[lang="en"] body { font-family: var(--font-en); letter-spacing: -.005em; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-xs); }
.num, .score, time { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { width: 1.15em; height: 1.15em; flex: none; stroke-width: 2; }
.icon-sm { width: .95em; height: .95em; }
.icon-lg { width: 1.5em; height: 1.5em; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--accent-bg); color: var(--accent-on); padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 700; }
.skip-link:focus { top: 12px; }

/* ---------- الهيكل ---------- */
.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 16px; }
.page { padding-block: 20px calc(var(--bottom-nav-h) + 28px); }
@media (min-width: 1024px) { .page { padding-block-end: 48px; } }
.layout { display: grid; gap: 20px; align-items: start; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) {
  .layout-home { grid-template-columns: 260px minmax(0, 1fr) 300px; }
  .layout-main { grid-template-columns: minmax(0, 1fr) 320px; }
}
.sidebar { display: none; }
@media (min-width: 1024px) { .sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--header-h) + 16px); } }
/* الجوال: العمود الجانبي الثاني (الترتيب والهدافون) يظهر بعد القائمة، والمباراة المميزة أعلاها */
@media (max-width: 1023.98px) {
  .sidebar.sidebar-after { display: flex; flex-direction: column; gap: 16px; }
  .only-wide { display: none !important; }
}
@media (min-width: 1024px) { .only-narrow { display: none !important; } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 13px; }

/* ---------- الترويسة ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  min-height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--text); }
.brand img { width: 36px; height: 36px; border-radius: 11px; box-shadow: 0 0 0 1px var(--border); }
.brand:hover { color: var(--text); }
.brand-name { letter-spacing: 0; }
.main-nav { display: none; gap: 4px; margin-inline-start: 18px; }
@media (min-width: 900px) { .main-nav { display: flex; } }
.nav-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; color: var(--text-2); font-weight: 500; transition: background .2s var(--ease), color .2s var(--ease); }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.header-search { display: none; position: relative; }
@media (min-width: 720px) { .header-search { display: block; } }
.header-search input { width: 240px; height: 40px; padding-inline: 40px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); transition: border-color .2s, width .25s var(--ease); }
.header-search input:focus { outline: none; border-color: var(--brand); width: 280px; }
.header-search .icon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); }

/* ---------- الأزرار ---------- */
.btn {
  --btn-bg: var(--surface-2); --btn-fg: var(--text); --btn-bd: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 8px 18px; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
  font-weight: 600; line-height: 1.3; text-align: center;
  transition: transform .15s var(--ease), background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { color: var(--btn-fg); border-color: var(--border-strong); background: var(--surface-3); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn-primary { --btn-bg: var(--brand); --btn-fg: var(--brand-ink); --btn-bd: transparent; box-shadow: 0 6px 20px color-mix(in srgb, var(--brand) 32%, transparent); }
.btn-primary:hover { --btn-bg: var(--brand-strong); background: var(--brand-strong); border-color: transparent; }
.btn-accent { --btn-bg: var(--accent-bg); --btn-fg: var(--accent-on); --btn-bd: transparent; }
.btn-accent:hover { background: var(--accent-bg-hover); border-color: transparent; }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-danger { --btn-bg: var(--live-soft); --btn-fg: var(--loss); --btn-bd: transparent; }
.btn-danger:hover { background: var(--live); color: #fff; border-color: transparent; }
.btn-sm { min-height: 34px; padding: 4px 12px; font-size: 13px; }
.btn-lg { min-height: 50px; padding: 10px 24px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--text-2); transition: background .2s, color .2s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .icon { width: 20px; height: 20px; }
.icon-btn-sm { width: 32px; height: 32px; }
.icon-btn-sm .icon { width: 18px; height: 18px; }

/* ---------- البطاقات ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-title { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
.card-title .icon { color: var(--brand); }
.card-body { padding: 14px 18px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; margin-block-end: 12px; flex-wrap: wrap; }
.section-title .icon { color: var(--brand); }

/* ---------- الشارات والرقائق ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--surface-3); color: var(--text-2); line-height: 1.7; }
.badge-live { background: var(--live-soft); color: var(--live); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-accent { background: var(--accent-soft); color: var(--text); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 var(--live); animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } html { scroll-behavior: auto; } }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 14px; transition: all .2s var(--ease); }
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip-live[aria-pressed="true"] { background: var(--live); border-color: var(--live); color: #fff; }
.chip .count { font-variant-numeric: tabular-nums; opacity: .8; }

/* ---------- شريط الأيام ---------- */
.day-strip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: stretch; gap: 6px; }
.day-strip-scroll { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.day-pill { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-width: 0; padding: 6px 2px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text-2); transition: all .2s var(--ease); text-align: center; line-height: 1.25; }
.day-pill:hover { color: var(--text); border-color: var(--border-strong); }
.day-pill .dow { font-size: 13px; font-weight: 600; }
.day-pill .dnum { font-size: 18px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.day-pill .mon { font-size: 13px; font-weight: 500; }
.day-pill[aria-current="date"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 35%, transparent); }
.day-pill[aria-current="date"] .dnum { color: var(--brand-ink); }
.day-pill.is-today:not([aria-current="date"]) { border-color: var(--brand); }
.day-strip .icon-btn { border: 1px solid var(--border); background: var(--surface); height: auto; border-radius: var(--radius); width: 40px; }
.date-picker { position: relative; overflow: hidden; }
.date-picker input[type="date"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
@media (max-width: 420px) { .day-strip .icon-btn { width: 32px; } .day-pill .dnum { font-size: 16px; } }

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-block: 14px; }
.toolbar h1 { font-size: 22px; }

/* ---------- مجموعة البطولة وصف المباراة ---------- */
.comp-group { overflow: hidden; }
.comp-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: linear-gradient(to bottom, var(--surface-2), var(--surface)); flex-wrap: wrap; }
.comp-head a { display: inline-flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.group-toggle svg { transition: transform .2s ease; }
.mine-head { display: inline-flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.mine-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--surface-2); color: var(--gold-icon); flex: none; }
.mine-icon .icon { width: 18px; height: 18px; fill: currentColor; }
.group-toggle[aria-expanded="false"] svg { transform: rotate(180deg); }
.comp-group.is-collapsed .comp-head { border-bottom-color: transparent; }
.comp-name { font-weight: 700; font-size: 15px; }
.comp-country { font-size: 13px; color: var(--text-3); display: block; line-height: 1.3; }
.comp-logo { width: 28px; height: 28px; flex: none; border-radius: 8px; object-fit: contain; }

.match-list { list-style: none; margin: 0; padding: 0; }
.match-row { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); transition: background .15s var(--ease); }
.match-row:last-child { border-bottom: 0; }
.match-row:hover { background: var(--surface-hover); }
.match-row .row-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.match-row.is-fav { box-shadow: inset 3px 0 0 var(--gold); }
[dir="rtl"] .match-row.is-fav { box-shadow: inset -3px 0 0 var(--gold); }
.match-status { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 13px; font-weight: 600; color: var(--text-2); text-align: center; line-height: 1.3; }
.match-status .ko { font-size: 15px; color: var(--text); font-weight: 700; }
.match-status.is-live { color: var(--live); }
.match-status.is-live .minute { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 14px; }
.match-status .minute .tick { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.team { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; font-size: 15px; line-height: 1.35; }
.team.home { justify-content: flex-end; text-align: end; }
.team.away { justify-content: flex-start; text-align: start; }
.team.home .crest { order: 2; }
.team-name { min-width: 0; }
.team.is-winner .team-name { font-weight: 700; color: var(--text); }
.team.is-loser .team-name { color: var(--text-2); font-weight: 500; }
.red-cards { display: inline-flex; gap: 2px; }
.red-card-mini { width: 8px; height: 11px; border-radius: 2px; background: var(--card-red); display: inline-block; }
.scorebox { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 76px; padding: 6px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.scorebox .sep { color: var(--text-3); font-weight: 500; }
.scorebox.is-live { background: var(--live-soft); border-color: transparent; color: var(--live); }
.scorebox.is-pending { font-size: 14px; color: var(--text-3); font-weight: 600; }
.scorebox .pens { font-size: 13px; color: var(--text-3); font-weight: 600; }
.score-flash { animation: flash 1.6s var(--ease); }
@keyframes flash { 0% { background: var(--accent-bg); color: var(--accent-on); transform: scale(1.08); } 100% { } }
@media (max-width: 560px) {
  .match-row { grid-template-columns: 52px minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; padding: 12px 10px; }
  .team { font-size: 14px; gap: 8px; }
  .scorebox { min-width: 62px; font-size: 16px; padding: 5px 8px; }
  .match-status .ko { font-size: 14px; }
}
@media (max-width: 420px) {
  .match-row { grid-template-columns: 46px minmax(0, 1fr) auto minmax(0, 1fr); }
  .team { flex-direction: column; gap: 4px; text-align: center; }
  .team.home, .team.away { justify-content: center; text-align: center; }
  .team.home .crest { order: 0; }
}

/* ---------- الشعار البديل (درع) ---------- */
.crest { width: 28px; height: 28px; flex: none; }
.crest-img { object-fit: contain; }
.crest-img.is-flag, .comp-logo.is-flag { object-fit: cover; border-radius: 6px; box-shadow: 0 0 0 1px var(--border); aspect-ratio: 4 / 3; height: auto; align-self: center; }
/* D158: درع محايد بأول حرف للنادي بلا شعار، وكأس بهوية صُفّارة للبطولة بلا شعار ولا علم */
.crest-fallback .crest-shield { fill: color-mix(in srgb, var(--text-3) 22%, var(--surface-2)); stroke: color-mix(in srgb, var(--text-3) 70%, transparent); stroke-width: 1.6; }
.crest-fallback .crest-letter { fill: var(--text); font-size: 18px; font-weight: 800; font-family: inherit; }
.comp-logo-fallback .cl-bg { fill: var(--brand-soft); }
.comp-logo-fallback .cl-cup { stroke: var(--brand); }
.crest-lg { width: 64px; height: 64px; }
.crest-xl { width: 88px; height: 88px; }
.crest-md { width: 40px; height: 40px; }
.crest-sm { width: 20px; height: 20px; }

.fav-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; border: 0; background: transparent; color: var(--text-3); transition: color .2s, transform .2s var(--ease), background .2s; }
.fav-btn:hover { color: var(--gold-icon); background: var(--surface-2); }
.fav-btn[aria-pressed="true"] { color: var(--gold-icon); }
.fav-btn[aria-pressed="true"] .icon { fill: currentColor; }
.fav-btn:active { transform: scale(.9); }

/* ---------- حالة فارغة ---------- */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 20px; text-align: center; color: var(--text-2); }
.empty .icon { width: 44px; height: 44px; color: var(--text-3); }
.empty h3 { color: var(--text); font-size: 17px; }
.empty-actions { justify-content: center; }
.empty .btn .icon { width: 18px; height: 18px; color: inherit; }

/* ---------- الشريط السفلي للجوال ---------- */
.bottom-nav { position: fixed; inset-inline: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(4, 1fr); height: var(--bottom-nav-h); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--border); }
@media (min-width: 1024px) { .bottom-nav { display: none; } }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 13px; font-weight: 600; color: var(--text-3); text-align: center; line-height: 1.2; }
.bottom-nav a .icon { width: 22px; height: 22px; }
.bottom-nav a[aria-current="page"] { color: var(--brand); }
.bottom-nav a[aria-current="page"] .icon { filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--brand) 55%, transparent)); }

/* ---------- القوائم الجانبية ---------- */
.side-list { list-style: none; margin: 0; padding: 6px; }
.side-list a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; line-height: 1.35; }
.side-list a:hover { background: var(--surface-2); color: var(--text); }
.side-list a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.side-list .count { margin-inline-start: auto; font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ---------- البطل (رأس الصفحة) ---------- */
.hero { position: relative; overflow: hidden; border-radius: var(--radius-xl); border: 1px solid var(--border); background: linear-gradient(160deg, var(--surface-2), var(--surface)); padding: 22px; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 220px at 50% -40px, var(--brand-soft), transparent 70%); pointer-events: none; }
.hero > * { position: relative; }
.hero-meta { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; color: var(--text-2); font-size: 13px; font-weight: 600; text-align: center; }
.hero-meta a { display: inline-flex; align-items: center; gap: 6px; }
.scoreboard { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; margin-block: 18px 8px; }
.sb-team { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-weight: 700; font-size: 17px; line-height: 1.35; }
.sb-team a { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sb-score { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sb-digits { display: flex; align-items: center; gap: 14px; font-size: 44px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.sb-digits .sep { color: var(--text-3); font-size: 32px; }
.sb-status { font-weight: 700; font-size: 14px; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.sb-status.is-live { color: var(--live); }
.sb-sub { font-size: 13px; color: var(--text-3); font-weight: 600; }
.sb-scorers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; font-size: 13px; color: var(--text-2); margin-top: 8px; }
.sb-scorers ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.sb-scorers .home-scorers { text-align: end; }
.sb-scorers li { display: inline-flex; gap: 6px; align-items: center; }
.sb-scorers .home-scorers li { justify-content: flex-end; }
@media (min-width: 720px) {
  .hero { padding: 30px; }
  .sb-digits { font-size: 60px; gap: 20px; }
  .sb-team { font-size: 20px; }
}

/* ---------- التبويبات ---------- */
.tabs { display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 0; background: transparent; color: var(--text-2); font-weight: 600; white-space: nowrap; transition: all .2s var(--ease); }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 30%, transparent); }
.tab-panel[hidden] { display: none; }
.tab-panel { margin-top: 16px; }

/* ---------- الأحداث (الخط الزمني) ---------- */
.timeline { list-style: none; margin: 0; padding: 8px 0; position: relative; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: 50%; width: 2px; background: var(--border); transform: translateX(-50%); }
[dir="rtl"] .timeline::before { transform: translateX(50%); }
.tl-item { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); align-items: center; gap: 10px; padding: 7px 12px; position: relative; }
.tl-minute { justify-self: center; display: grid; place-items: center; min-width: 44px; height: 30px; padding-inline: 6px; border-radius: 999px; background: var(--surface-3); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; z-index: 1; border: 2px solid var(--surface); }
.tl-body { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tl-item.side-home .tl-body { grid-column: 1; justify-content: flex-end; text-align: end; }
.tl-item.side-home .tl-body .ev-icon { order: 2; }
.tl-item.side-away .tl-body { grid-column: 3; }
.tl-item.side-away .tl-minute { grid-column: 2; grid-row: 1; }
.tl-item.side-home .tl-minute { grid-column: 2; }
.tl-text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.tl-main { font-weight: 600; }
.tl-sub { font-size: 13px; color: var(--text-3); }
.tl-divider { text-align: center; padding: 10px; position: relative; z-index: 1; }
.tl-divider span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; font-weight: 700; color: var(--text-2); }
.ev-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); flex: none; }
.ev-icon .icon { width: 17px; height: 17px; }
.ev-goal { background: var(--brand-soft); color: var(--brand); }
.ev-owngoal { background: var(--live-soft); color: var(--loss); }
.ev-miss { background: var(--live-soft); color: var(--loss); }
.ev-sub { color: var(--text-2); }
.ev-var { background: var(--accent-soft); color: var(--text); }
.ev-card { background: transparent; }
.card-shape { width: 13px; height: 18px; border-radius: 3px; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.card-shape.yellow { background: var(--card-yellow); }
.card-shape.red { background: var(--card-red); }
.card-shape.second-yellow { background: linear-gradient(135deg, var(--card-yellow) 50%, var(--card-red) 50%); }
.sub-in { color: var(--win); }
.sub-out { color: var(--loss); }
@media (max-width: 560px) {
  .timeline::before { inset-inline-start: 28px; transform: none; }
  [dir="rtl"] .timeline::before { transform: none; }
  .tl-item { grid-template-columns: 56px minmax(0, 1fr); }
  .tl-item .tl-minute, .tl-item.side-home .tl-minute, .tl-item.side-away .tl-minute { grid-column: 1; grid-row: 1; }
  .tl-item.side-home .tl-body, .tl-item.side-away .tl-body { grid-column: 2; justify-content: flex-start; text-align: start; }
  .tl-item.side-home .tl-body .ev-icon { order: 0; }
  .tl-team-tag { display: inline; }
}
.tl-team-tag { display: none; font-size: 13px; color: var(--text-3); font-weight: 600; }

/* ---------- الملعب والتشكيلة ---------- */
.lineup-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 12px; }
.lineup-head .formation { font-weight: 700; font-variant-numeric: tabular-nums; }
.lineup-head .side { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.lineup-head .side.away { justify-content: flex-end; }
/* ---------- التشكيلة: الملعب والقائمة (D134) ---------- */
.lineups[data-view="list"] .pitch-box { display: none; }
.lineups[data-view="pitch"] .ls-starters.is-drawn { display: none; }
.lineup-head .side > span:not(.formation) { min-width: 0; }
.formation { direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.bench .coach-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.lineup-head .formation { padding: 1px 8px; border-radius: 999px; background: var(--surface-3); font-size: 13px; }
.bench h4 .formation { margin-inline-start: auto; padding: 1px 8px; border-radius: 999px; background: var(--surface-3); font-size: 13px; color: var(--text); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.seg-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--text-2); font-weight: 700; font-size: 13px; cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease); }
.seg-btn:hover { color: var(--text); }
.seg-btn[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 30%, transparent); }
@media (max-width: 600px) {
  .lineup-head { grid-template-columns: 1fr 1fr; }
  .lineup-head .seg { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .lineup-head .lineup-gap { display: none; }
}
.pitch-box { position: relative; isolation: isolate; container-type: inline-size; max-width: 520px; margin-inline: auto; aspect-ratio: 68 / 105; display: grid; grid-template-rows: 1fr 1fr; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--pitch-grass-a); }
/* الملعب يطول مع المحتوى إن لزم (بلا overflow: hidden الذي يلغي الحد الأدنى التلقائي مع aspect-ratio)، والرسم مقصوص بالزوايا */
.pitch-field { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; clip-path: inset(0 round calc(var(--radius-lg) - 1px)); }
.pitch-field .grass-a { fill: var(--pitch-grass-a); }
.pitch-field .grass-b { fill: var(--pitch-grass-b); }
.pitch-field .line { fill: none; stroke: var(--pitch-line); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.pitch-half { display: flex; flex-direction: column; justify-content: space-around; gap: 1.5cqw; padding: 2.5cqw 1cqw; min-width: 0; }
.pitch-half.away { padding-bottom: 6cqw; }
.pitch-half.home { padding-top: 6cqw; }
/* اليمين واليسار في الملعب ثابتان في اللغتين، والضيف معكوس أفقيًا كما يقف أمام المضيف */
.pitch-line { display: flex; justify-content: space-around; align-items: flex-start; direction: ltr; }
.pitch-half.away .pitch-line { flex-direction: row-reverse; }
.pp { --dot: clamp(24px, 8.6cqw, 40px); --fs: clamp(13px, 2.8cqw, 14px); flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: max(3px, .9cqw); padding: 0 .8cqw; color: #fff; text-align: center; border-radius: 12px; -webkit-tap-highlight-color: transparent; }
.n-5 .pp { --dot: clamp(22px, 7.6cqw, 34px); --fs: clamp(13px, 2.5cqw, 13.5px); }
.n-6 .pp { --dot: clamp(20px, 6.8cqw, 30px); --fs: 13px; }
.pp:hover { color: #fff; }
.pp:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pp-dot { position: relative; flex: none; width: var(--dot); height: var(--dot); display: grid; place-items: center; border-radius: 50%; background: #fff; color: #0a1a12; box-shadow: 0 2px 8px rgba(0, 0, 0, .35), inset 0 0 0 1.5px rgba(0, 0, 0, .15); transition: transform .15s var(--ease); }
.pp:hover .pp-dot, .pp.is-open .pp-dot { transform: scale(1.08); }
.pitch-half.away .pp-dot { background: var(--accent-bg); }
.pitch-half.home .pp.gk .pp-dot { background: #ffb020; }
.pitch-half.away .pp.gk .pp-dot { background: #6ad0ff; }
.pp-num { font-family: var(--font-en); font-weight: 800; font-size: max(13px, calc(var(--dot) * .42)); line-height: 1; }
.pp-name { max-width: 100%; font-size: var(--fs); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; unicode-bidi: plaintext; text-shadow: 0 1px 2px rgba(0, 0, 0, .75), 0 0 8px rgba(0, 0, 0, .35); }
html[dir="rtl"] .pp-name { direction: rtl; }
/* أحداث اللاعب تحت اسمه: كل أيقونة بدقيقتها، تلتف داخل عرض اللاعب فلا تغطي جاره */
.pp-evs { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 4px; max-width: 100%; direction: ltr; }
.pp-e { display: inline-flex; align-items: center; gap: 1px; padding: 0 3px 0 1px; border-radius: 999px; background: rgba(0, 0, 0, .42); color: #fff; font-size: 13px; font-weight: 700; line-height: 1.35; white-space: nowrap; }
.pp-e .icon { width: calc(var(--fs) * 1.05); height: calc(var(--fs) * 1.05); flex: none; }
.pp-rate { position: absolute; bottom: -18%; right: -36%; padding: 0 3px; border-radius: 5px; color: #fff; font-size: 13px; font-weight: 800; line-height: 1.45; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.pp-rate.hi { background: #16a35f; } .pp-rate.mid { background: #c78a00; } .pp-rate.lo { background: #e02d47; }
.pitch-note { margin: auto; max-width: 84%; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 16px; border-radius: var(--radius); background: rgba(0, 0, 0, .38); color: #fff; text-align: center; font-size: 13px; line-height: 1.6; }
.pitch-note p { margin: 0; }
/* بطاقة اللاعب عند الضغط */
.pp-pop { position: absolute; z-index: 5; width: min(270px, calc(100% - 16px)); padding: 14px; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: pop .18s var(--ease); text-align: start; }
.pp-pop .pp-full { display: block; font-size: 15px; line-height: 1.4; padding-inline-end: 28px; }
.pp-pop .pp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; font-size: 13px; }
.pp-pop .pp-meta .rate-chip { margin-inline-start: 0; }
.pp-pop .pp-events { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--border); display: grid; gap: 6px; font-size: 13px; }
.pp-pop .pp-events li { display: flex; align-items: center; gap: 8px; }
.pp-pop .pp-events .icon { width: 18px; height: 18px; flex: none; }
.pp-pop .pp-events .num { min-width: 3.2em; font-weight: 700; }
.pp-pop .pp-close { position: absolute; top: 8px; inset-inline-end: 8px; }
.pp-pop .pp-link { margin-top: 12px; width: 100%; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .pp-pop { animation: none; } .pp-dot { transition: none; } }
.bench { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 720px) { .bench { grid-template-columns: 1fr 1fr; } }
.bench h4 { font-size: 14px; color: var(--text-2); margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.player-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.player-list li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px dashed var(--border); line-height: 1.35; }
.player-list li:last-child { border-bottom: 0; }
.shirt { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
/* صف اللاعب (D168): [الرقم + مربع المركز] [الاسم وأحداثه] [التقييم]، والرقم والمربع بعرض ثابت فتصطف الأعمدة */
.player-list li.pl-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; }
.pl-id { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.pl-id .shirt { inline-size: 30px; min-width: 30px; }
.pos-badge { display: inline-grid; place-items: center; inline-size: 44px; block-size: 26px; border-radius: 7px; font-size: 13px; font-weight: 700; line-height: 1; color: var(--pos-ink); flex: none; letter-spacing: .02em; }
.pos-g { background: var(--pos-g); }
.pos-d { background: var(--pos-d); }
.pos-m { background: var(--pos-m); }
.pos-f { background: var(--pos-f); }
.pos-u { background: var(--pos-u); }
.pl-main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.pl-evs { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }

/* ---------- الإحصائيات ---------- */
.stat { padding: 10px 0; }
.stat + .stat { border-top: 1px dashed var(--border); }
.stat-top { display: grid; grid-template-columns: 60px 1fr 60px; align-items: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-top .label { text-align: center; font-weight: 600; color: var(--text-2); font-size: 13px; }
.stat-top .v-away { text-align: end; }
.stat-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.stat-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.stat-bar svg { width: 100%; height: 8px; }
.stat-bar .fill-home { fill: var(--brand); }
.stat-bar .fill-away { fill: var(--accent-data); }
.stat-bar .fill-muted { fill: var(--text-3); opacity: .45; }
[dir="ltr"] .stat-bar.home svg { transform: scaleX(-1); }
[dir="rtl"] .stat-bar.away svg { transform: scaleX(-1); }

/* ---------- الجداول (الترتيب) ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th { font-size: 13px; font-weight: 700; color: var(--text-3); position: sticky; top: 0; background: var(--surface); }
.table td.team-cell { text-align: start; white-space: normal; min-width: 170px; }
.table td.team-cell a { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; line-height: 1.35; }
.table tr:hover td { background: var(--surface-hover); }
.table .pts { font-weight: 700; color: var(--text); }
.table .rank { position: relative; font-weight: 700; width: 44px; }
.table .rank::before { content: ""; position: absolute; inset-inline-start: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--zone, transparent); }
/* مناطق الترتيب: لون واحد لكل منطقة للصف والمفتاح معًا، وأي منطقة جديدة بلا لون تأخذ اللون المحايد */
tr[class*="zone-"], .zones-legend i { --zone: var(--text-3); }
tr.zone-cl, .zones-legend .legend-cl, tr.zone-acl, .zones-legend .legend-acl, tr.zone-caf, .zones-legend .legend-caf { --zone: #3b82f6; }
tr.zone-el, .zones-legend .legend-el, tr.zone-acl2, .zones-legend .legend-acl2, tr.zone-cafcc, .zones-legend .legend-cafcc { --zone: #f59e0b; }
tr.zone-ecl, .zones-legend .legend-ecl { --zone: #14b8a6; }
tr.zone-promo, .zones-legend .legend-promo, tr.zone-ko16, .zones-legend .legend-ko16, tr.zone-adv, .zones-legend .legend-adv { --zone: var(--win); }
tr.zone-po, .zones-legend .legend-po { --zone: #3b82f6; }
tr.zone-playoff, .zones-legend .legend-playoff { --zone: #a855f7; }
tr.zone-third, .zones-legend .legend-third { --zone: #f59e0b; }
tr.zone-rel_po, .zones-legend .legend-rel_po { --zone: #ec4899; }
tr.zone-rel, .zones-legend .legend-rel { --zone: var(--loss); }
tr.zone-out, .zones-legend .legend-out { --zone: color-mix(in srgb, var(--loss) 55%, transparent); }
.table tr.is-highlight td { background: var(--brand-soft); }
.zones-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 12px 16px; font-size: 13px; color: var(--text-2); }
.zones-legend span { display: inline-flex; align-items: center; gap: 6px; }
.zones-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; background: var(--zone); }
.form { display: inline-flex; gap: 3px; }
.form b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font-size: 13px; color: var(--form-ink); font-weight: 700; }
.form .W { background: var(--win); }
.form .D { background: var(--draw); }
.form .L { background: var(--loss); }
@media (max-width: 640px) { .table .hide-sm { display: none; } }

/* ---------- الأدوار الإقصائية (الشجرة) ---------- */
.bracket { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 18px; overflow-x: auto; padding-bottom: 8px; }
.bracket-round { display: flex; flex-direction: column; gap: 12px; justify-content: space-around; }
.bracket-round h4 { text-align: center; font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.placements { margin-top: 20px; }
.placements .section-title { font-size: 15px; margin-bottom: 10px; }
.placements .section-title .icon { color: var(--gold-icon); }
.placements-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.placement h4 { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.placement a.tie { display: block; }
.tie { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; position: relative; }
.tie a { display: block; }
.tie-team { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-weight: 600; line-height: 1.35; }
.tie-team + .tie-team { border-top: 1px solid var(--border); }
.tie-team .agg { margin-inline-start: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.tie-team.is-winner { background: var(--brand-soft); }
.tie-team.is-winner .agg { color: var(--brand); }
.tie-final { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }

/* ---------- النماذج ---------- */
.form-card { max-width: 480px; margin-inline: auto; }
.form-head { text-align: center; margin-bottom: 20px; }
.form-head .icon-wrap { width: 56px; height: 56px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 18px; background: var(--brand-soft); color: var(--brand); }
.form-head .icon-wrap .icon { width: 28px; height: 28px; }
.form-head h1 { font-size: 24px; }
.form-head p { color: var(--text-2); margin-top: 6px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .field .label { font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .icon { position: absolute; inset-inline-start: 14px; color: var(--text-3); pointer-events: none; }
.input, .select, textarea.input { width: 100%; min-height: 48px; padding: 10px 14px; padding-inline-start: 44px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); transition: border-color .2s, box-shadow .2s, background .2s; }
.input.no-icon, .select.no-icon { padding-inline-start: 14px; }
.input:hover, .select:hover { border-color: var(--border-strong); }
.input:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); background: var(--surface); }
.input[aria-invalid="true"] { border-color: var(--loss); box-shadow: 0 0 0 4px var(--live-soft); }
.select { appearance: none; background-image: none; padding-inline-end: 40px; }
.select-wrap { position: relative; }
.select-wrap .chev { position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text-3); }
.input-action { position: absolute; inset-inline-end: 6px; }
.hint { font-size: 13px; color: var(--text-3); display: flex; gap: 6px; align-items: flex-start; }
.error-text { font-size: 13px; color: var(--loss); display: flex; gap: 6px; align-items: center; font-weight: 600; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; line-height: 1.5; font-size: 14px; }
.check input { appearance: none; width: 22px; height: 22px; flex: none; border-radius: 7px; border: 2px solid var(--border-strong); background: var(--surface-2); display: grid; place-items: center; margin-top: 1px; transition: all .15s; }
.check input::after { content: ""; width: 10px; height: 6px; border: 2.5px solid var(--brand-ink); border-top: 0; border-inline-end: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
[dir="rtl"] .check input::after { border-inline-end: 2.5px solid var(--brand-ink); border-inline-start: 0; transform: rotate(45deg) translate(-1px, -1px); }
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after { opacity: 1; }
.check a { color: var(--brand); font-weight: 600; }
.captcha-q { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.captcha-q .q { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius); background: var(--accent-soft); font-weight: 700; font-size: 18px; direction: ltr; font-variant-numeric: tabular-nums; }
.form-foot { text-align: center; margin-top: 18px; color: var(--text-2); font-size: 14px; }
.form-foot a { color: var(--brand); font-weight: 600; }
.otp-input { letter-spacing: .4em; text-align: center; font-size: 22px; font-weight: 700; direction: ltr; padding-inline-start: 14px; }
.secret-box { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px dashed var(--border-strong); font-family: ui-monospace, Consolas, monospace; font-size: 15px; direction: ltr; word-break: break-all; }

/* ---------- التنبيهات (Flash) ---------- */
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); margin-bottom: 16px; font-weight: 500; }
.flash .icon { margin-top: 3px; }
.flash-success { border-color: color-mix(in srgb, var(--win) 40%, transparent); background: color-mix(in srgb, var(--win) 10%, var(--surface)); }
.flash-success .icon { color: var(--win); }
.flash-error { border-color: color-mix(in srgb, var(--loss) 40%, transparent); background: color-mix(in srgb, var(--loss) 10%, var(--surface)); }
.flash-error .icon { color: var(--loss); }
.flash-info .icon { color: var(--brand); }
.flash .close { margin-inline-start: auto; }

/* ---------- نافذة التأكيد المخصصة ---------- */
.modal { border: 0; padding: 0; background: transparent; max-width: min(440px, calc(100vw - 32px)); width: 100%; color: var(--text); }
.modal::backdrop { background: var(--overlay); backdrop-filter: blur(4px); }
.modal[open] { animation: pop .22s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: 24px; text-align: center; }
.modal-icon { width: 60px; height: 60px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 20px; background: var(--live-soft); color: var(--loss); }
.modal-icon.is-info { background: var(--brand-soft); color: var(--brand); }
.modal-icon .icon { width: 28px; height: 28px; }
.modal-title { font-size: 19px; margin-bottom: 8px; }
.modal-text { color: var(--text-2); }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal-actions .btn { flex: 1; }
/* نافذة تأكيد بمحتوى إضافي (data-confirm-extra، مثل قائمة فحص الإطلاق): أعرض، والمحتوى بمحاذاة السطر */
.modal.is-wide { max-width: min(600px, calc(100vw - 32px)); }
.modal-extra { margin-top: 16px; text-align: start; max-height: min(52vh, 460px); overflow-y: auto; }
.modal-extra:empty { display: none; }

/* ---------- التذييل ---------- */
.site-footer { border-top: 1px solid var(--border); padding-block: 28px calc(var(--bottom-nav-h) + 24px); color: var(--text-2); font-size: 14px; }
@media (min-width: 1024px) { .site-footer { padding-block-end: 28px; } }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { display: inline-flex; align-items: center; gap: 6px; }
.footer-note { width: 100%; font-size: 13px; color: var(--text-3); }

/* ---------- قوائم عامة (مباريات الفريق، الهدافون) ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); line-height: 1.35; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--surface-hover); }
.rank-num { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 10px; background: var(--surface-3); font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.rank-num.top { background: var(--accent-bg); color: var(--accent-on); }
.big-num { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; margin-inline-start: auto; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.kv-item { padding: 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.kv-item .k { font-size: 13px; color: var(--text-3); display: flex; gap: 6px; align-items: center; }
.kv-item .v { font-size: 18px; font-weight: 700; margin-top: 4px; line-height: 1.35; }
.entity-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.entity-head h1 { font-size: 26px; }
.entity-head .sub { color: var(--text-2); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.h2h-summary { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; text-align: center; }
.h2h-summary .kv-item .v { font-size: 26px; }
.round-select { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- المحتوى النصي (الشروط والخصوصية) ---------- */
.prose { max-width: 780px; line-height: 1.9; }
.prose h1 { font-size: 28px; margin-bottom: 8px; }
.prose h2 { font-size: 20px; margin: 28px 0 10px; display: flex; gap: 8px; align-items: center; }
.prose p, .prose ul { margin: 0 0 12px; color: var(--text-2); }
.prose ul { padding-inline-start: 22px; }
.prose a { color: var(--brand); font-weight: 600; }
.draft-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); background: var(--accent-soft); margin-bottom: 20px; font-weight: 600; }

/* ---------- البحث ---------- */
.search-big { position: relative; }
.search-big .input { min-height: 56px; font-size: 17px; border-radius: 999px; padding-inline-start: 52px; }
.search-big > .icon { position: absolute; inset-inline-start: 20px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 22px; height: 22px; }
.result-group h3 { font-size: 14px; color: var(--text-2); padding: 12px 16px 4px; display: flex; gap: 8px; align-items: center; }

/* ---------- الإدارة ---------- */
.admin-shell { display: grid; gap: 20px; }
@media (min-width: 1024px) { .admin-shell { grid-template-columns: 240px minmax(0, 1fr); } }
.admin-nav { display: flex; gap: 6px; overflow-x: auto; }
@media (min-width: 1024px) { .admin-nav { flex-direction: column; position: sticky; top: calc(var(--header-h) + 16px); } }
.admin-nav a { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 600; white-space: nowrap; }
.admin-nav a:hover { background: var(--surface-2); color: var(--text); }
.admin-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.metric { padding: 18px; }
.metric .k { display: flex; gap: 8px; align-items: center; color: var(--text-2); font-size: 13px; font-weight: 600; }
.metric .v { font-size: 28px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.metric .d { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.meter { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 10px; }
.meter svg { width: 100%; height: 10px; }
.meter .fill { fill: var(--brand); }
.meter .fill.warn { fill: var(--gold); }
.meter .fill.danger { fill: var(--loss); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.status-dot.ok { background: var(--win); box-shadow: 0 0 0 4px color-mix(in srgb, var(--win) 25%, transparent); }
.status-dot.warn, .status-dot.stale { background: var(--gold); }
.status-dot.down { background: var(--loss); }
.chart-bars { width: 100%; height: 160px; }
.chart-bars .bar { fill: var(--brand); }
.chart-bars .bar.over { fill: var(--gold); }
.chart-bars .axis { stroke: var(--border); stroke-width: 1; }
.chart-bars text { fill: var(--text-3); font-size: 13px; }
.src-name { direction: ltr; unicode-bidi: isolate; font-family: var(--font-en); color: var(--text-2); }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form .input { min-height: 40px; padding-inline-start: 14px; }

/* ---------- دليل التصميم ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.swatch { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.swatch i { display: block; height: 64px; }
.swatch span { display: block; padding: 8px 10px; font-size: 13px; font-weight: 600; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.icon-grid span { display: grid; place-items: center; height: 44px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); }
.sw-bg { background: var(--bg); } .sw-surface { background: var(--surface); } .sw-surface2 { background: var(--surface-2); }
.sw-brand { background: var(--brand); } .sw-accent { background: var(--accent-bg); } .sw-live { background: var(--live); }
.sw-gold { background: var(--gold); } .sw-text { background: var(--text); } .sw-text2 { background: var(--text-2); }

/* ---------- مؤشر التحديث ---------- */
.live-indicator { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); font-weight: 600; }
.live-indicator.is-stale { color: var(--gold-text); }
.error-page { text-align: center; padding: 60px 16px; }
.error-page .code { font-size: 72px; font-weight: 700; color: var(--brand); line-height: 1; font-variant-numeric: tabular-nums; }
.error-page .section-title { justify-content: center; }
.featured { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; color: var(--text); }
.featured:hover { color: var(--text); }
.scoreboard.compact { margin: 4px 0; gap: 8px; }
.scoreboard.compact .sb-team { font-size: 14px; gap: 8px; }
.sb-digits.small-digits { font-size: 30px; gap: 10px; }
.sb-digits.small-digits .sep { font-size: 22px; }

/* ---------- صفحة المباراة ---------- */
.hero-foot { margin-top: 14px; gap: 6px 16px; }
.hero-foot span { display: inline-flex; align-items: center; gap: 6px; }
.stat-top .lead { color: var(--brand); }
.side-kv { grid-template-columns: 1fr; }
.side-kv .v { font-size: 15px; }
.h2h-title { margin-top: 18px; font-size: 17px; }
.h2h-item { flex-direction: column; align-items: stretch; gap: 8px; }
.h2h-line { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; }
.h2h-line .scorebox { font-size: 15px; min-width: 64px; }
.lineup-head .formation { color: var(--text-3); font-weight: 600; }
.bench h4 + .player-list { margin-bottom: 12px; }
@media (max-width: 560px) { .sb-scorers { font-size: 13px; gap: 10px; } .hero { padding: 18px 14px; } }
.tl-main { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tl-sub { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.formation { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- صفحات البطولة والفريق واللاعب ---------- */
.entity-hero { padding: 22px; overflow: visible; z-index: 5; }
.entity-hero::before { border-radius: inherit; }
.entity-head .sub span, .entity-head .sub a { display: inline-flex; align-items: center; gap: 6px; }
.entity-kv { margin-top: 16px; }
a.kv-item:hover { border-color: var(--brand); color: var(--text); }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.table-card + .table-card { margin-top: 16px; }
.day-sep { display: flex; align-items: center; gap: 8px; padding: 8px 16px; font-size: 13px; font-weight: 700; color: var(--text-2); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.comp-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.comp-list .list-item { gap: 10px; }
.scorer-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.scorer-name { font-weight: 700; }
.round-select { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 10px 14px; }
.round-label { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; }
.tie-empty .tie-team { gap: 8px; }
.bracket { padding: 4px; }
.squad-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .squad-grid { grid-template-columns: 1fr 1fr; } }
.player-avatar { position: relative; display: grid; place-items: center; width: 88px; height: 88px; border-radius: 28px; background: var(--brand-soft); color: var(--brand); flex: none; }
.player-avatar .icon { width: 44px; height: 44px; }
.player-avatar b { position: absolute; bottom: -6px; inset-inline-end: -6px; min-width: 32px; height: 32px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-bg); color: var(--accent-on); font-size: 14px; }
.legal h2 .icon { color: var(--brand); }
.search-page { max-width: 820px; margin-inline: auto; width: 100%; }

/* ---------- الحساب والنماذج ---------- */
.form-row-end { display: flex; justify-content: flex-end; margin: -6px 0 16px; font-size: 14px; }
.form-row-end a { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 600; }
.captcha-input { max-width: 140px; }
.settings-form { max-width: 560px; }
.theme-field { border: 0; padding: 0; margin: 0 0 16px; }
.theme-field legend { margin-bottom: 8px; }
.theme-chip { position: relative; cursor: pointer; }
.theme-chip input { position: absolute; opacity: 0; pointer-events: none; }
.theme-chip:has(input:checked) { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.theme-chip:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.security-form { margin-top: 12px; }
.security-form .input-wrap { flex: 1; min-width: 220px; }
.security-form .input-wrap .input { padding-inline-start: 44px; }
.danger-zone { border-color: color-mix(in srgb, var(--loss) 35%, var(--border)); }
.danger-zone .section-title .icon { color: var(--loss); }
.secret-box { justify-content: space-between; flex-wrap: wrap; }
.account-page .entity-head .sub { gap: 6px 14px; }
[data-toggle-password] .icon-eye-off { display: none; }
[data-toggle-password][aria-pressed="true"] .icon-eye { display: none; }
[data-toggle-password][aria-pressed="true"] .icon-eye-off { display: inline; }
[data-theme-toggle] .icon-moon { display: none; }

/* ---------- لوحة التحكم ---------- */
.admin-page .page, .admin-page { padding-bottom: 48px; }
body.admin .site-footer { display: none; }
.status-line { display: flex; align-items: center; gap: 10px; }
.chart-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-3); margin-top: 6px; }
.filters { gap: 10px; }
.filters .input-wrap { flex: 1; min-width: 180px; }
.filters .select-wrap { flex: 0 1 220px; min-width: 160px; }
.tr-table .inline-form { flex-wrap: wrap; }
.tr-input { max-width: 280px; min-height: 40px; padding-inline-start: 12px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.pager { justify-content: center; gap: 12px; }
.setup-link { margin: 10px 0 18px; }
a.metric:hover { border-color: var(--brand); color: var(--text); }
.day-pill { overflow-wrap: normal; word-break: keep-all; }
@media (max-width: 520px) {
  .day-strip-scroll { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .day-strip-scroll .day-pill:first-child, .day-strip-scroll .day-pill:last-child { display: none; }
  .day-pill .dow { font-size: 13px; }
}

/* ---------- المتابعة بالنجمة (المباريات والفرق) ---------- */
.fav-star { position: relative; z-index: 2; display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 999px; border: 0; background: transparent; color: var(--text-3); transition: color .2s, background .2s, transform .15s var(--ease); }
.fav-star .icon { width: 18px; height: 18px; }
.fav-star:hover { color: var(--gold-icon); background: var(--surface-2); }
.fav-star[aria-pressed="true"] { color: var(--gold-icon); }
.fav-star[aria-pressed="true"] .icon { fill: currentColor; }
.fav-star:active { transform: scale(.88); }
.match-row { grid-template-columns: 64px minmax(0, 1fr) auto minmax(0, 1fr) 32px; }
.team-star { width: 26px; height: 26px; opacity: 0; }
.team-star .icon { width: 15px; height: 15px; }
.match-row:hover .team-star, .team-star:focus-visible, .team-star[aria-pressed="true"] { opacity: 1; }
.team.home .team-star { order: -1; }
@media (hover: none), (max-width: 719px) { .team-star { display: none; } }
@media (max-width: 560px) { .match-row { grid-template-columns: 52px minmax(0, 1fr) auto minmax(0, 1fr) 28px; } .match-star { width: 28px; height: 28px; } }
@media (max-width: 420px) { .match-row { grid-template-columns: 46px minmax(0, 1fr) auto minmax(0, 1fr) 26px; } }
.modal-icon.is-gold { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold-icon); }
.modal-icon.is-gold .icon { fill: currentColor; }
.modal-dismiss { margin-top: 10px; }

/* ---------- التوقيت ---------- */
.tz-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 600; line-height: 1.5; text-align: start; }
.tz-chip:hover { border-color: var(--brand); color: var(--text); }
.tz-chip .tz-change { color: var(--brand); padding-inline-start: 6px; border-inline-start: 1px solid var(--border); }
.tz-field { margin: 18px 0 0; text-align: start; }

/* ---------- العمود الجانبي: ترتيب مختصر وهدافون ---------- */
.card-link { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: auto; font-size: 13px; font-weight: 600; color: var(--brand); }
.mini-comp { display: flex; align-items: center; gap: 10px; padding: 10px 18px 4px; font-weight: 700; line-height: 1.35; }
.table-mini th, .table-mini td { padding: 8px 6px; font-size: 13px; }
.table-mini td.team-cell { min-width: 0; }
.table-mini td.team-cell a { gap: 8px; font-weight: 600; }
.table-mini .rank { width: 34px; }
.mini-scorers .list-item { padding: 10px 14px; gap: 10px; }
.mini-scorers .big-num { font-size: 17px; }

/* ---------- صفحة «قريبًا» قبل الإطلاق (LaunchGate) ---------- */
.soon-body { overflow-x: hidden; background: radial-gradient(640px 340px at 50% 18%, var(--brand-soft), transparent 70%), radial-gradient(420px 260px at 72% 38%, var(--accent-soft), transparent 70%), var(--bg-grad), var(--bg); background-attachment: scroll; }
.soon { position: relative; isolation: isolate; min-height: 100vh; min-height: 100dvh; max-width: 1080px; margin: 0 auto; padding: 20px 16px 28px; display: flex; flex-direction: column; gap: 36px; }
.soon-pitch { position: absolute; inset-inline: 16px; top: 120px; height: 420px; z-index: -1; pointer-events: none; border: 1px solid var(--border); border-radius: var(--radius-xl); opacity: .55; -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 95%); mask-image: linear-gradient(to bottom, #000 30%, transparent 95%); }
.soon-pitch::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 50%; border-inline-start: 1px solid var(--border); }
.soon-pitch span { position: absolute; top: 50%; left: 50%; width: 150px; height: 150px; margin: -75px 0 0 -75px; border: 1px solid var(--border); border-radius: 50%; }
.soon-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.soon-top .brand { font-size: 22px; }
.soon-top .brand img { width: 44px; height: 44px; border-radius: 13px; }
.soon-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: clamp(24px, 8vh, 88px); }
.soon-badge { margin: 0; display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent-fill) 45%, transparent); background: var(--accent-soft); color: var(--text); font-weight: 700; font-size: 14px; }
.soon-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent-fill); animation: soon-pulse 2s infinite; }
@keyframes soon-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-fill) 65%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.soon-title { margin: 0; font-size: clamp(34px, 7vw, 64px); line-height: 1.15; font-weight: 700; letter-spacing: -.01em; background: linear-gradient(120deg, var(--text) 30%, var(--brand) 75%, var(--accent-text)); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[lang="ar"] .soon-title { letter-spacing: 0; line-height: 1.35; }
.soon-lead { margin: 0; max-width: 620px; font-size: clamp(16px, 2.2vw, 19px); color: var(--text-2); line-height: 1.8; }
.soon-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
.soon-feature { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 2px; align-items: start; padding: 18px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 82%, transparent); box-shadow: var(--shadow-sm); }
.soon-feature strong { font-size: 16px; line-height: 1.4; }
.soon-feature > span:last-child { grid-column: 2; color: var(--text-2); font-size: 14px; }
.soon-ic { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--brand-soft); color: var(--brand); }
.soon-ic .icon { width: 22px; height: 22px; }
.soon-foot { margin-top: auto; text-align: center; display: flex; flex-direction: column; gap: 4px; color: var(--text-2); }
.soon-foot p { margin: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
@media (min-width: 640px) { .soon-features { grid-template-columns: repeat(2, 1fr); } .soon { padding-inline: 24px; } }
@media (min-width: 1024px) { .soon-features { grid-template-columns: repeat(4, 1fr); } .soon-feature { grid-template-columns: 1fr; } .soon-ic { grid-row: auto; margin-bottom: 10px; } .soon-feature > span:last-child { grid-column: 1; } }
@media (prefers-reduced-motion: reduce) { .soon-dot { animation: none; } }
/* ---------- اختيار الموسم (D122) ---------- */
.season-picker { position: relative; }
.season-picker > summary { list-style: none; cursor: pointer; gap: 6px; }
.season-picker > summary::-webkit-details-marker { display: none; }
.season-picker[open] .season-caret { transform: rotate(180deg); }
.season-caret { transition: transform .2s var(--ease); }
.season-menu {
  position: absolute; inset-inline-start: 0; top: calc(100% + 6px); z-index: 30; min-width: 200px; max-width: calc(100vw - 32px);
  margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-height: 320px; overflow-y: auto;
}
.season-menu a {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: var(--radius-xs);
  color: var(--text); font-variant-numeric: tabular-nums;
}
.season-menu a:hover, .season-menu a:focus-visible { background: var(--surface-hover); }
.season-menu a[aria-current="page"] { color: var(--brand-text); font-weight: 600; }
.season-menu a .icon { margin-inline-start: auto; }
.season-menu .badge-soft { font-size: 13px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); }
.season-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* جداول المجموعات جنبًا إلى جنب على الشاشات الواسعة (D123) */
.standings-grid { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 1024px) {
  .standings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .standings-grid .table th:last-child, .standings-grid .table td:last-child { display: none; }
}

/* ترتيب الفريق في بطولات الموسم (D122) */
.team-standings { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .team-standings { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.team-standing { display: flex; align-items: center; gap: 12px; color: var(--text); transition: background .15s var(--ease); }
.team-standing:hover { background: var(--surface-hover); }
.team-standing-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.team-standing-comp { font-weight: 600; }
.team-standing-rank { display: flex; flex-direction: column; align-items: center; min-width: 44px; }
.team-standing-rank b { font-size: 18px; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   تجربة المباراة المباشرة (D126)
   ========================================================================== */
.match-hero { --pulse: var(--brand); }
.sb-d { display: inline-block; min-width: .62em; text-align: center; transform-origin: 50% 60%; }
.sb-d.flip { animation: digit-flip .75s var(--ease); }
@keyframes digit-flip {
  0% { transform: perspective(300px) rotateX(0); }
  45% { transform: perspective(300px) rotateX(90deg); opacity: .2; }
  55% { transform: perspective(300px) rotateX(-90deg); opacity: .2; }
  100% { transform: perspective(300px) rotateX(0); opacity: 1; }
}
.match-hero.goal-moment { animation: goal-glow 2.4s var(--ease); }
@keyframes goal-glow {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pulse) 70%, transparent); }
  30% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--pulse) 25%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.sb-team.scored .crest { animation: crest-pulse 1.2s var(--ease) 2; }
@keyframes crest-pulse { 50% { transform: scale(1.12); filter: drop-shadow(0 0 12px var(--pulse)); } }
.goal-banner {
  position: absolute; inset-inline: 0; top: 50%; transform: translateY(-50%); margin: 0 auto; width: max-content; max-width: 90%;
  display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-radius: 999px; font-weight: 800; font-size: 20px;
  background: var(--pulse); color: #fff; box-shadow: var(--shadow-lg); z-index: 3; animation: banner 2.6s var(--ease) forwards; pointer-events: none;
}
.goal-banner .icon { width: 26px; height: 26px; }
@keyframes banner { 0% { opacity: 0; transform: translateY(-50%) scale(.6); } 12% { opacity: 1; transform: translateY(-50%) scale(1.05); } 20% { transform: translateY(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-50%) scale(.96); } }
.sb-clock { font-variant-numeric: tabular-nums; }
/* العد التنازلي: شارة بأخضر الملعب الهادئ لا الليموني الفاتح (طلب المالك) */
.sb-countdown { font-size: 13px; font-weight: 700; color: var(--brand-text); background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); padding: 3px 12px; border-radius: 999px; font-variant-numeric: tabular-nums; display: inline-flex; gap: 6px; align-items: center; }
.sb-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); }
.sb-scorers li .icon { width: 15px; height: 15px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hero-actions .btn .icon { width: 16px; height: 16px; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
[data-sound-toggle] .sound-on { display: none; }
[data-sound-toggle][aria-pressed="true"] .sound-on { display: inline; }
[data-sound-toggle][aria-pressed="true"] .sound-off { display: none; }
[data-sound-toggle][aria-pressed="true"] { color: var(--brand-text); border-color: var(--brand); }
.sb-updated { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-3); }
.sb-updated .icon { color: var(--win); }
.sb-updated.is-stale .icon { color: var(--loss); }

/* مراحل المباراة */
.phases { list-style: none; margin: 14px 0 0; padding: 0; display: flex; gap: 4px; }
.phases li { flex: 1; text-align: center; font-size: 13px; font-weight: 700; color: var(--text-3); position: relative; padding-top: 10px; }
.phases li::before { content: ""; position: absolute; top: 0; inset-inline: 2px; height: 4px; border-radius: 4px; background: var(--surface-3); }
.phases li.is-done::before { background: var(--brand); }
.phases li.is-now { color: var(--text); }
/* المرحلة الجارية: أخضر الملعب الهادئ بلا ليموني (طلب المالك، D167) */
.phases li.is-now::before { background: linear-gradient(90deg, var(--brand-strong), var(--brand)); animation: phase-glow 1.8s ease-in-out infinite; }
@keyframes phase-glow { 50% { opacity: .55; } }
@media (max-width: 560px) { .phases li span { font-size: 13px; } }

/* الخط الزمني البصري */
.match-strip { margin: 0 0 14px; padding: 10px 6px 6px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.match-strip { overflow-x: auto; scrollbar-width: thin; }
.match-strip > svg { width: 100%; min-width: 540px; height: auto; display: block; }
.ms-legend .crest { width: 20px; height: 20px; }
.ms-axis { stroke: var(--border-strong); stroke-width: 4; stroke-linecap: round; }
.ms-progress { stroke: var(--brand); stroke-width: 4; stroke-linecap: round; }
.ms-tick { stroke: var(--text-3); stroke-width: 2; }
.ms-tick.major { stroke: var(--text-2); stroke-width: 3; }
.ms-label { fill: var(--text-3); font-size: 18px; font-weight: 700; text-anchor: middle; font-family: var(--font-en); }
.ms-now { fill: var(--live); stroke: var(--surface); stroke-width: 3; animation: pulse 1.6s infinite; }
.ms-stem { stroke: var(--border-strong); stroke-width: 2; stroke-dasharray: 3 3; }
.ms-ev.is-cancelled { opacity: .7; }
.ms-legend { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 700; color: var(--text-2); padding: 4px 8px 0; }
.ms-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* الأحداث: الهدف الملغى مشطوب بسببه، والنتيجة بعد كل هدف، والوصف النصي */
.tl-item.is-goal .tl-minute { background: var(--brand); color: var(--brand-ink); }
.tl-item.is-cancelled .tl-main a, .tl-item.is-cancelled .tl-main { text-decoration: line-through; text-decoration-color: var(--loss); text-decoration-thickness: 2px; color: var(--text-2); }
.tl-cancel { display: inline-flex; align-items: center; gap: 4px; color: var(--loss); font-weight: 700; }
.tl-score { display: inline-flex; align-items: center; gap: 3px; margin-inline-start: 8px; padding: 1px 8px; border-radius: 999px; background: var(--surface-3); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tl-score i { font-style: normal; color: var(--text-3); }
.tl-say { display: block; margin-top: 4px; font-size: 13px; color: var(--text-2); line-height: 1.55; }
.ev-icon .icon { width: 20px; height: 20px; }
.ev-icon.ev-goal, .ev-icon.ev-penalty_goal { background: var(--brand-soft); }
.ev-icon.ev-own_goal, .ev-icon.ev-missed_penalty { background: var(--live-soft); }
.ev-icon.ev-yellow, .ev-icon.ev-red, .ev-icon.ev-second_yellow, .ev-icon.ev-sub { background: var(--surface-2); }
.tl-item.fresh { animation: pop .6s var(--ease); }

/* ركلات الترجيح */
.shootout { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.shootout-head { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 8px; }
.shootout-score { margin-inline-start: auto; display: inline-flex; gap: 6px; font-size: 18px; font-variant-numeric: tabular-nums; }
.shootout-score i { font-style: normal; color: var(--text-3); }
.shootout-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; flex-wrap: wrap; }
.shootout-team { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.shootout-kicks { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.kick { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.kick .icon { width: 15px; height: 15px; stroke-width: 3; }
.kick.is-scored { background: var(--win); animation: pop .4s var(--ease); }
.kick.is-missed { background: var(--loss); animation: pop .4s var(--ease); }
.kick.is-pending { border: 2px dashed var(--border-strong); }

/* التشكيلة: تقييم اللاعب وأحداثه */
.pl-mark { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.pl-mark .icon { width: 16px; height: 16px; }
.rate-chip { margin-inline-start: auto; min-width: 34px; text-align: center; padding: 1px 6px; border-radius: 6px; color: #fff; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rate-chip.hi { background: #16a35f; } .rate-chip.mid { background: #d99a00; } .rate-chip.lo { background: #f0344f; }

/* الإحصائيات: دائرة الاستحواذ وأشرطة تتحرك بنعومة */
.possession { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 6px 0 18px; }
.poss-val { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.poss-val.home { text-align: end; color: var(--brand); }
.poss-val.away { color: var(--accent-data); }
/* D150: قوس صاحب الأرض يبدأ من الأعلى نحو جهته: يسار الإنجليزية (عكس عقارب الساعة) ويمين العربية (مع عقارب الساعة)،
   والنص داخل الدائرة يُعاد لوضعه فلا ينقلب */
.donut { width: 132px; height: 132px; transform: rotate(-90deg) scaleY(-1); }
[dir="rtl"] .donut { transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 12; }
.donut-away { stroke: var(--accent-data); opacity: .9; }
.donut-home { stroke: var(--brand); stroke-linecap: round; transition: stroke-dasharray .9s var(--ease); }
.donut-label { fill: var(--text-2); font-size: 13px; font-weight: 700; text-anchor: middle; transform: scaleY(-1) rotate(90deg); transform-origin: 50px 50px; }
[dir="rtl"] .donut-label { transform: rotate(90deg); }
.stat-bar i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .9s var(--ease); }
.stat-bar.home { display: flex; justify-content: flex-end; }
.stat-bar .fill-home { background: var(--brand); }
.stat-bar .fill-away { background: var(--accent-data); }
.stat-bar .fill-muted { background: var(--text-3); opacity: .45; }
.stat .v-home, .stat .v-away { transition: color .3s; }
.stat .changed { color: var(--accent-text); }

/* الترويسة الثابتة عند النزول */
.match-sticky {
  position: fixed; top: calc(var(--header-h) + 8px); inset-inline: 12px; margin-inline: auto; max-width: 760px; z-index: 40;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 14px;
  border-radius: 999px; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(10px);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-weight: 700; font-size: 13px; line-height: 1.25;
  animation: sticky-in .25s var(--ease);
}
@keyframes sticky-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.match-sticky[hidden] { display: none; }
.match-sticky .st-team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.match-sticky .st-team.away { justify-content: flex-end; }
.match-sticky .st-mid { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.match-sticky .st-score { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; display: inline-flex; gap: 6px; }
.match-sticky .st-min { font-size: 13px; color: var(--live); }
.match-sticky .crest { width: 22px; height: 22px; }

/* إشعار الهدف داخل الموقع */
.toast-stack { position: fixed; inset-inline-end: 16px; bottom: calc(var(--bottom-nav-h) + 16px); z-index: 60; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 32px)); }
@media (min-width: 1024px) { .toast-stack { bottom: 20px; } }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); color: var(--text); animation: pop .4s var(--ease); }
.toast .icon { width: 26px; height: 26px; flex: none; }
.toast strong { display: block; font-size: 14px; }
.toast span { font-size: 13px; color: var(--text-2); }
.toast-close { margin-inline-start: auto; }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
@media (prefers-reduced-motion: reduce) {
  .sb-d.flip, .match-hero.goal-moment, .sb-team.scored .crest, .goal-banner, .phases li.is-now::before, .ms-now, .toast, .kick { animation: none; }
  .donut-home, .stat-bar i { transition: none; }
}
.share-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0 6px; }
.share-grid .btn { justify-content: center; }

/* المباراة في سطور، والفريقان قبل المباراة (D128) */
.recap { margin: 0 0 14px; padding: 14px 16px; border-radius: var(--radius); background: linear-gradient(135deg, var(--brand-soft), transparent); border: 1px solid var(--border); }
.recap h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 15px; }
.recap p { margin: 0; line-height: 1.8; color: var(--text); }
.compare .cmp-head { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; margin: 10px 0 6px; }
.compare .cmp-head span { display: inline-flex; align-items: center; gap: 8px; }
.cmp-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.cmp-row .cmp-v { font-weight: 800; font-variant-numeric: tabular-nums; }
.cmp-row .cmp-v:last-child { text-align: end; }
.cmp-k { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 600; justify-self: center; text-align: center; }
.cmp-form .form:last-child { justify-self: end; }
.side-more { display: flex; align-items: center; gap: 8px; margin: 0 6px 6px; padding: 10px 12px; border-radius: var(--radius-sm); border-top: 1px solid var(--border); color: var(--brand-text); font-weight: 700; font-size: 14px; }
.side-more span { flex: 1; }
.side-more:hover { background: var(--surface-2); }

/* ==========================================================================
   الترتيب المباشر (D130)
   ========================================================================== */
.standings-note { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--live-soft); border: 1px solid color-mix(in srgb, var(--live) 35%, transparent); font-size: 14px; }
.standings-note strong { color: var(--live); }
.standings-live.is-compact .standings-note { margin: 0 10px 8px; padding: 6px 10px; font-size: 13px; }
.table-card > .standings-note { margin: 12px 14px 4px; }
.standings-source { display: flex; align-items: center; gap: 6px; margin: 10px 2px 0; }
.standings-source .icon { color: var(--brand); }
.table tr.is-match-team td { background: color-mix(in srgb, var(--accent-bg) 22%, transparent); }
.table tr.is-match-team td:first-child { box-shadow: inset 4px 0 0 var(--accent-fill); }
[dir="rtl"] .table tr.is-match-team td:first-child { box-shadow: inset -4px 0 0 var(--accent-fill); }
.table tr.is-match-team .team-cell a { font-weight: 800; color: var(--text); }
.live-badge { display: inline-flex; align-items: center; gap: 5px; margin-inline-start: 8px; padding: 1px 8px; border-radius: 999px; font-size: 13px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; background: var(--live-soft); color: var(--live); vertical-align: middle; }
.live-badge .live-dot { width: 6px; height: 6px; }
.live-badge.win { background: color-mix(in srgb, var(--win) 18%, transparent); color: var(--win); }
.live-badge.draw { background: var(--surface-3); color: var(--text-2); }
.live-badge.win .live-dot { background: var(--win); }
.live-badge.draw .live-dot { background: var(--text-3); }
.team-cell { white-space: normal; }
.team-cell > a { display: inline-flex; }
.rank .move { display: block; font-size: 13px; font-weight: 800; line-height: 1; margin-top: 2px; }
.rank .move.up { color: var(--win); }
.rank .move.down { color: var(--loss); }
.cell-flash { animation: cell-flash 1.4s var(--ease); }
@keyframes cell-flash { 0% { background: color-mix(in srgb, var(--accent-bg) 60%, transparent); } 100% { background: transparent; } }
.group-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.group-chips .chip[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.table tr.is-moving { position: relative; z-index: 2; }
.table tr.is-moving:not(.is-match-team) td { background: var(--surface); }
.table tr.is-moving td { box-shadow: 0 6px 18px -8px rgb(0 0 0 / .35); }
@media (prefers-reduced-motion: reduce) { .cell-flash { animation: none; } }

/* ---------- صفحة الصيانة (D131) ---------- */
.maint-ic { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold-icon); box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--gold) 60%, transparent); }
.maint-ic .icon { width: 34px; height: 34px; }
.soon-badge.is-maint { border-color: color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold) 14%, transparent); }
.soon-badge.is-maint .soon-dot { background: var(--gold); animation: none; }
.maint-message { white-space: pre-line; }
.maint-until { margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 82%, transparent); color: var(--text); font-weight: 600; font-size: 15px; }

/* ---------- إحصائيات اللاعب حسب البطولة (D135) ---------- */
.sub-title { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; font-size: 15px; color: var(--text-2); }
.table th .card-shape { display: inline-block; vertical-align: middle; width: 10px; height: 14px; }
.table-compact th, .table-compact td { padding: 9px 4px; }
.table-compact td.team-cell { min-width: 0; }
.table-compact td.team-cell a { gap: 6px; }

/* مسيرة اللاعب (D138) */
.section-note { margin: -4px 0 12px; }
.career-totals { margin-bottom: 8px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
@media (max-width: 520px) { .career-totals { grid-template-columns: repeat(3, 1fr); } .career-totals .kv-item { padding: 10px; } }
.career-empty p { margin: 4px 0 0; }
.career-timeline { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.career-timeline li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); position: relative; }
.career-club { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; min-width: 0; }
.career-club-name { overflow-wrap: anywhere; }
.career-years { display: inline-flex; align-items: baseline; gap: 8px; }
.career-years .num { font-weight: 700; }
.career-range { direction: ltr; unicode-bidi: isolate; }
.career-table .career-season { white-space: nowrap; font-weight: 700; text-align: start; }
.career-table td { vertical-align: middle; }
.career-teams { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.career-teams a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.career-comps { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--text-3); margin-top: 4px; }
.career-comps a { color: inherit; }
.career-comps a:hover { color: var(--text); }
.career-table tr.is-pending td, .career-table tr.is-unavailable td { color: var(--text-3); }
.career-pending { text-align: center; }
.career-pending .badge { display: inline-flex; align-items: center; gap: 4px; }
.scorers-note { margin-top: 10px; padding-inline: 4px; }

/* ===================== D140: اطلب بطولة، والإشعارات، والتحديث الحي ===================== */
/* صف بطولة من الكتالوج */
.req-list { list-style: none; margin: 0; padding: 0; }
.req-list.card { padding: 4px 0; }
.req-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); transition: background .25s; }
.req-row:last-child { border-bottom: 0; }
.req-logo { flex: none; }
.req-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.req-name { font-weight: 700; color: var(--text); line-height: 1.35; overflow-wrap: anywhere; }
a.req-name:hover { color: var(--brand); }
.req-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--text-2); }
.req-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.req-count { font-weight: 600; color: var(--text-2); border-radius: 999px; padding-inline: 2px; }
.req-count.bump, .bump { animation: bump .7s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.18); color: var(--brand); } 100% { transform: scale(1); } }
.req-reason { display: inline-flex; gap: 6px; align-items: flex-start; color: var(--text-3); }
.req-action { flex: none; display: flex; align-items: center; }
.req-row.is-mine .req-action .btn { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.req-row.is-enabled .req-name { color: var(--brand); }
.req-row.is-rejected { opacity: .78; }
.req-list-single { margin-block: 12px 18px; border: 1px solid var(--border); border-radius: var(--radius); }
.req-in-search .req-list { margin-block: 8px; }
.req-feedback { min-height: 1.4em; margin: 0; color: var(--text-2); }
.req-feedback.is-error { color: var(--loss); }
@media (max-width: 560px) {
  .req-row { flex-wrap: wrap; }
  .req-action { width: 100%; justify-content: flex-end; }
  .req-action .btn { width: 100%; justify-content: center; }
}
.btn[aria-busy="true"] { cursor: progress; opacity: .75; }
.btn[aria-busy="true"] .icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* جرس الإشعارات */
.bell { position: relative; }
.bell-btn { position: relative; }
.bell-count { position: absolute; top: 2px; inset-inline-end: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--live); color: #fff; font-size: 13px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.bell-panel { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 70; width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 560px); display: flex; flex-direction: column; padding: 0; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--border-strong); }
.bell-panel.is-opening { animation: pop .22s var(--ease); }
.bell-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.bell-head strong { display: inline-flex; align-items: center; gap: 6px; }
.bell-panel .notif-list { overflow-y: auto; }
.bell-all { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px; border-top: 1px solid var(--border); font-weight: 600; }
@media (max-width: 560px) {
  .bell-panel { position: fixed; top: 64px; inset-inline: 12px; width: auto; }
}
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif { border-bottom: 1px solid var(--border); }
.notif:last-child { border-bottom: 0; }
.notif-link { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; color: var(--text); transition: background .2s; }
a.notif-link:hover { background: var(--surface-hover); }
.notif-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); flex: none; }
.notif-icon .icon { width: 18px; height: 18px; }
.notif.is-goal .notif-icon { background: var(--accent-soft); color: var(--accent-text); }
.notif.is-end .notif-icon, .notif.is-start .notif-icon { background: var(--surface-3); color: var(--text-2); }
.notif.is-request_done .notif-icon { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold-icon); }
.notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.45; }
.notif-body strong { font-size: 14px; }
.notif-body > span { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.notif.is-unread .notif-link { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.notif.is-unread .notif-body strong::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-inline-start: 6px; border-radius: 50%; background: var(--brand); vertical-align: middle; }
.notif.is-new { animation: slide-in .5s var(--ease); }
@keyframes slide-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.notif-empty { display: flex; align-items: center; gap: 6px; justify-content: center; padding: 22px 14px; margin: 0; }
.notif-page .notif-list { margin: 0; }
.toast.is-trophy .icon { color: var(--gold-icon); }
.toast.is-goal .icon { color: var(--accent-text); }

/* رسائل فورية صغيرة */
.notice-stack { position: fixed; inset-inline: 16px; bottom: calc(var(--bottom-nav-h) + 16px); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
@media (min-width: 1024px) { .notice-stack { bottom: 24px; } }
.notice { display: inline-flex; align-items: center; gap: 10px; max-width: min(520px, 100%); padding: 10px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.45; animation: pop .3s var(--ease); pointer-events: auto; }
.notice .icon { width: 20px; height: 20px; flex: none; }
.notice.is-ok .icon { color: var(--brand); }
.notice.is-error { border-color: color-mix(in srgb, var(--loss) 50%, transparent); }
.notice.is-error .icon { color: var(--loss); }
.notice.is-info .icon { color: var(--accent-text); }
.notice.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }

/* جزء تحدّث بالنبض: يظهر بنعومة */
.pulse-in { animation: pulse-in .7s var(--ease); }
@keyframes pulse-in { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .bump, .req-count.bump, .notif.is-new, .pulse-in, .notice, .bell-panel.is-opening, .btn[aria-busy="true"] .icon { animation: none; }
}
.req-cta { display: flex; align-items: center; gap: 14px; margin-top: 8px; color: var(--text); transition: border-color .2s, background .2s; }
.req-cta:hover { border-color: color-mix(in srgb, var(--brand) 45%, transparent); background: var(--surface-hover); }
.req-cta-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); flex: none; }
.req-cta-text { display: flex; flex-direction: column; gap: 2px; flex: 1; line-height: 1.45; }

/* مواجهات الذهاب والإياب (D147) */
.agg-line { grid-column: 2 / 5; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 8px; margin: -4px 0 0; font-size: 13px; font-weight: 600; color: var(--text-2); line-height: 1.4; }
.agg-line .icon { color: var(--brand); }
.agg-score { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.agg-score .sep { color: var(--text-3); }
.agg-pens { display: inline-flex; align-items: center; gap: 4px; }
.agg-line.agg-flash .agg-score { animation: flash 1.6s var(--ease); }
.leg-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); font-size: 13px; font-weight: 700; }
.tie-box { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.tie-chip { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 6px 8px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text-2); line-height: 1.4; }
.tie-chip .icon { color: var(--brand); }
a.tie-chip:hover { border-color: color-mix(in srgb, var(--brand) 45%, transparent); background: var(--surface-hover); }
.tie-chip-label { color: var(--text-3); }
.tie-teams { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 6px; color: var(--text); }
.tie-num { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tie-num .sep { color: var(--text-3); }
.tie-result.is-done { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 35%, transparent); color: var(--brand-text); }
.tie-result.is-live { background: var(--live-soft); border-color: color-mix(in srgb, var(--live) 35%, transparent); color: var(--live); }
.tie.is-two .tie-team, .tie.is-two .tie-head { display: grid; grid-template-columns: minmax(0, 1fr) 36px 36px 40px; align-items: center; gap: 4px; }
.tie-head { padding: 6px 12px 0; font-size: 13px; font-weight: 700; text-align: center; }
.tie-head .icon { color: var(--brand); }
.tie-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tie.is-two .tie-team .agg { margin-inline-start: 0; text-align: center; }
.tie-leg { text-align: center; color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.tie-team.is-out { color: var(--text-3); }
.tie-check { color: var(--brand); flex: none; }
.tie-pens { font-size: 13px; font-weight: 700; color: var(--text-3); margin-inline-start: 2px; }
.tie.is-live { border-color: color-mix(in srgb, var(--live) 45%, transparent); }
.team-ties-list { list-style: none; margin: 0; padding: 0; }
.team-tie { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.team-tie:last-child { border-bottom: 0; }
.team-tie:hover { background: var(--surface-hover); }
.team-tie .row-link { position: absolute; inset: 0; z-index: 1; }
.team-tie-comp { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; }
.team-tie-opp { display: flex; align-items: center; gap: 8px; font-weight: 700; min-width: 0; }
.team-tie-legs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.team-tie-leg { display: inline-flex; align-items: center; gap: 6px; }
.team-tie-leg .icon { color: var(--brand); }
.team-tie-out { grid-row: 2; grid-column: 2; display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.team-tie-out.is-through { background: var(--brand-soft); color: var(--brand-text); }
.team-tie-out.is-out { background: color-mix(in srgb, var(--loss, #d64545) 12%, transparent); color: var(--loss, #d64545); }
.team-tie-out.is-live { background: var(--live-soft); color: var(--live); }

/* أزواج الأرقام (D150): «له» و«عليه» عمودان على الشاشات العريضة، وعمود واحد معزول الاتجاه على الأضيق */
.pair { unicode-bidi: isolate; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .goals-joined { display: none; }
@media (max-width: 900px) {
  .table .goals-split { display: none; }
  .table .goals-joined { display: table-cell; }
}
.tie-result.is-unknown { background: color-mix(in srgb, var(--gold) 14%, transparent); border-color: color-mix(in srgb, var(--gold) 35%, transparent); color: color-mix(in srgb, var(--gold) 70%, var(--text)); }
.tie-result.is-admin { background: color-mix(in srgb, var(--gold) 14%, transparent); border-color: color-mix(in srgb, var(--gold) 35%, transparent); color: color-mix(in srgb, var(--gold) 70%, var(--text)); }
.tie-result { flex-wrap: nowrap; text-align: start; }
.tie-result > .icon { flex: none; }
.admin-line { flex-wrap: nowrap; }
.admin-line > .icon { flex: none; }
.tie-result.is-admin .icon, .admin-line .icon, .tie-admin .icon, .team-tie-admin .icon { color: var(--gold-icon); }
.tie-admin { display: flex; align-items: center; gap: 6px; padding: 4px 12px 6px; border-top: 1px solid var(--border); font-size: 13px; font-weight: 700; }
.team-tie-admin { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; }

/* ---------- «اقترح تصحيح» للمشرف المسجّل (D160) ---------- */
.nf-btn { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-inline-start: 6px; vertical-align: middle; border-radius: 7px; color: var(--brand); background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); cursor: pointer; flex: none; opacity: .8; transition: opacity .15s var(--ease), transform .15s var(--ease); }
.nf-btn .icon { width: 13px; height: 13px; }
.nf-btn:hover, .nf-btn:focus-visible { opacity: 1; transform: scale(1.08); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
body.nf-off .nf-btn { display: none; }
/* مفتاح أقلام التصحيح (D172): أيقونة صغيرة في الزاوية السفلى، شبه شفافة حتى يمر عليها المؤشر، فلا تغطي رقمًا ولا نصًا */
.nf-toggle { position: fixed; inset-inline-start: 6px; bottom: calc(var(--bottom-nav-h) + 6px); z-index: 70; display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); box-shadow: var(--shadow-sm); opacity: .7; cursor: pointer; transition: opacity .15s; }
.nf-toggle:hover, .nf-toggle:focus-visible { opacity: 1; }
.nf-toggle .icon { width: 15px; height: 15px; }
.nf-toggle[aria-pressed="true"] { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, transparent); background: var(--brand-soft); }
@media (min-width: 1024px) { .nf-toggle { bottom: 6px; } }
.nf-modal .modal-card { text-align: start; }
.nf-modal .modal-icon, .nf-modal .modal-title { text-align: center; }
.nf-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 0 0 12px; }
.nf-meta .src-name { font-weight: 600; color: var(--text-2); }
.nf-state { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--text-2); margin: 0 0 10px; }
.nf-feedback { min-height: 1.4em; margin: 8px 0 0; }
.nf-feedback.is-error { color: var(--loss); }


/* ==========================================================================
   الجوال (D169): لا تمرير أفقي، وأهداف لمس 44 بكسل، وأقل خط 13 بكسل، وأدوات التصحيح على الحاسوب وحده
   ========================================================================== */
/* صف اللاعب: الاسم بسطر واحد (يصغر خطه بدل أن ينكسر، match.js)، والأحداث بجانبه أو تحته */
.pl-name { display: block; max-width: 100%; white-space: nowrap; font-weight: 600; }
.pl-name.fit-wrap { white-space: normal; overflow-wrap: break-word; }
.bench-switch { display: none; }
@media (max-width: 767px) {
  /* التشكيلة: فريق واحد في كل مرة بمفتاح تبديل أعلى القائمة */
  .bench { grid-template-columns: minmax(0, 1fr); }
  .bench.has-switch .bench-switch { display: flex; width: 100%; }
  .bench-switch .seg-btn { flex: 1 1 0; min-width: 0; min-height: 44px; justify-content: center; font-size: 14px; }
  .bench-switch .seg-btn > span { white-space: normal; text-align: center; line-height: 1.25; }
  .bench.has-switch[data-side="home"] .bench-side[data-side="away"],
  .bench.has-switch[data-side="away"] .bench-side[data-side="home"] { display: none; }
  /* صف اللاعب: [الرقم والمركز] [الاسم] [التقييم]، والأحداث سطر صغير تحت الاسم */
  .pl-main { flex-direction: column; align-items: flex-start; gap: 2px; }
  .pl-evs { gap: 2px 10px; }
  .pl-evs .pl-mark { color: var(--text-3); }
  .pl-evs .pl-mark .icon { width: 14px; height: 14px; }
  .player-list li.pl-row { gap: 8px; padding: 8px 2px; }
  /* أدوات تصحيح الأسماء: لا تظهر أبدًا تحت 768 بكسل، حتى للمشرف */
  .nf-btn, .nf-toggle { display: none !important; }
  .match-row { grid-template-columns: 52px minmax(0, 1fr) auto minmax(0, 1fr) 44px; }
  .form b { width: 24px; height: 24px; }
}
/* أهداف اللمس 44 بكسل على الجوال واللوحي */
@media (max-width: 1023px) {
  .icon-btn, .icon-btn-sm { min-width: 44px; min-height: 44px; }
  .fav-star, .match-star { width: 44px; height: 44px; }
  .match-row { grid-template-columns: 64px minmax(0, 1fr) auto minmax(0, 1fr) 44px; }
  .seg-btn, .tab { min-height: 44px; }
}
@media (max-width: 767px) {
  .match-row { grid-template-columns: 52px minmax(0, 1fr) auto minmax(0, 1fr) 44px; }
}
@media (max-width: 420px) {
  .match-row { grid-template-columns: 46px minmax(0, 1fr) auto minmax(0, 1fr) 44px; }
}
/* آخر 5 مباريات (D169): العنوان سطرًا كاملًا فوق شارتي الفريقين على الشاشات الضيقة، فلا تخرج الشارات عن العرض */
.cmp-row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.form { flex-wrap: wrap; }
@media (max-width: 480px) {
  .cmp-row.cmp-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 6px; }
  .cmp-row.cmp-form .cmp-k { grid-column: 1 / -1; grid-row: 1; }
}
/* الجداول العريضة على الجوال (D169): تتمرر داخل إطارها، والترتيب والفريق ثابتان في جهة البداية */
@media (max-width: 767px) {
  .table-wrap .table .rank { position: sticky; inset-inline-start: 0; z-index: 2; background: var(--surface); width: 56px; min-width: 56px; max-width: 56px; }
  .table-wrap .table .team-cell { position: sticky; inset-inline-start: 56px; z-index: 2; background: var(--surface); min-width: 150px; box-shadow: inset -1px 0 0 var(--border); }
  [dir="rtl"] .table-wrap .table .team-cell { box-shadow: inset 1px 0 0 var(--border); }
  .table-wrap .table th.rank, .table-wrap .table th.team-cell { z-index: 3; }
  .table-wrap .table tr.is-highlight td.rank, .table-wrap .table tr.is-highlight td.team-cell { background: color-mix(in srgb, var(--brand) 10%, var(--surface)); }
  .table-wrap .table tr.is-match-team td.rank, .table-wrap .table tr.is-match-team td.team-cell { background: color-mix(in srgb, var(--accent-bg) 22%, var(--surface)); }
}
