/* ============================================================
   ALOKA Live · Design System v2 "Stadium"
   Premium 2026 sports-tech identity. Refined glassmorphism,
   layered elevation, tonal light/dark pairing, RTL-first with
   full LTR support (logical props). Token-driven theming.
   ============================================================ */

 :root {
  /* ofoq Tv — Ofoq Pro 2026 palette */
  --aloka-primary: #3905BB;
  --aloka-secondary: #680CF2;
  --aloka-primary-dark: #070022;
  --aloka-primary-light: #26048A;
  --aloka-secondary-hover: #9651FB;
  --aloka-glow: rgba(104, 12, 242, .34);

  --primary: #680CF2;
  --primary-600: #9651FB;
  --primary-700: #C4A1F4;
  --primary-soft: rgba(104, 12, 242, .16);
  --secondary: #3905BB;
  --accent: #680CF2;
  --accent-2: #9651FB;
  --ink: #ECE5F7;

  --bg: #070022;
  --bg-soft: #0B0134;
  --surface: #120250;
  --surface-2: #1A0363;
  --text: #ECE5F7;
  --text-2: #D6C7F5;
  --text-3: #B8A7FF;
  --line: rgba(196, 161, 244, .13);
  --glass: rgba(11, 1, 52, .82);
  --glass-soft: rgba(18, 2, 80, .68);
  --shadow-1: 0 2px 8px rgba(0,0,0,.28), 0 10px 28px rgba(0,0,0,.22);
  --shadow-2: 0 8px 24px rgba(0,0,0,.34), 0 28px 70px rgba(0,0,0,.44);
  --live: #EF4444;
  --win: #16A34A;
  --lose: #EF4444;
  --draw: #94A3B8;
  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 13px;
  --ease-out: cubic-bezier(.22, .72, .28, 1);
  --ease-spring: cubic-bezier(.3, 1.4, .4, 1);
  --font-ar: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-en: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --header-h: 64px;
}

html.dark {
  --bg: #070022;
  --bg-soft: #0B0134;
  --surface: #120250;
  --surface-2: #1A0363;
  --text: #ECE5F7;
  --text-2: #D6C7F5;
  --text-3: #B8A7FF;
  --line: rgba(196, 161, 244, .13);
  --glass: rgba(11, 1, 52, .82);
  --glass-soft: rgba(18, 2, 80, .68);
  --shadow-1: 0 2px 8px rgba(0,0,0,.28), 0 10px 28px rgba(0,0,0,.22);
  --shadow-2: 0 8px 24px rgba(0,0,0,.34), 0 28px 70px rgba(0,0,0,.44);
  --primary: #680CF2;
  --primary-600: #9651FB;
  --primary-700: #C4A1F4;
  --primary-soft: rgba(104, 12, 242, .18);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* Visually-hidden but accessible to search engines / screen readers.
   Used for semantic SEO headings that must not alter the visual layout. */
.seo-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- SEO Content Engine article (server-rendered, below the tabs) ---- */
.match-article {
  margin: 22px 0 8px;
}
.match-article .ma-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px clamp(16px, 4vw, 30px);
}
.match-article .ma-lead {
  font-size: 1.02rem;
  line-height: 1.9;
  color: var(--text);
  margin: 0 0 6px;
  font-weight: 600;
}
.match-article h2 {
  font-size: 1.15rem;
  line-height: 1.5;
  margin: 24px 0 10px;
  padding-inline-start: 12px;
  border-inline-start: 4px solid var(--primary);
  font-weight: 800;
  color: var(--text);
}
.match-article p {
  margin: 0 0 12px;
  line-height: 1.95;
  color: var(--text-2);
}
.match-article ul {
  margin: 0 0 14px;
  padding-inline-start: 1.35em;
  line-height: 1.9;
  color: var(--text-2);
}
.match-article li { margin: 4px 0; }
.match-article li::marker { color: var(--primary); }

/* "Match facts" — floats beside the text on wide screens, no layout shift */
.match-article .ma-facts {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 4px 0 18px;
  background: var(--surface-2);
}
.match-article .ma-facts-title {
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--primary-600);
  margin: 0 0 10px;
  padding: 0;
  border: 0;
}
.match-article .ma-facts dl { margin: 0; display: grid; gap: 8px; }
.match-article .ma-facts dl > div {
  display: flex; justify-content: space-between; gap: 12px;
  padding-bottom: 8px; border-bottom: 1px dashed var(--line);
}
.match-article .ma-facts dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.match-article .ma-facts dt { color: var(--text-2); font-size: .92rem; }
.match-article .ma-facts dd { margin: 0; font-weight: 700; text-align: end; }
@media (min-width: 780px) {
  .match-article .ma-facts {
    float: inline-end;
    width: 300px;
    margin-inline-start: 22px;
  }
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ar);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100dvh;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
  transition: background .35s ease, color .35s ease;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[lang="en"] body { font-family: var(--font-en); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { line-height: 1.3; font-weight: 800; }
h1, h2 { text-wrap: balance; }
::selection { background: color-mix(in srgb, var(--primary) 28%, transparent); }
@supports (scrollbar-color: auto) {
  html { scrollbar-color: color-mix(in srgb, var(--text-3) 45%, transparent) transparent; scrollbar-width: thin; }
}
/* Scores, clocks and data columns never shift width as digits tick */
.mc-time, .mc-score, .fc-score, .fc-time, .mh-score, .mh-time, .countdown,
.standings td, .comp-table td, .sc-val strong, .lc-score, .ring-min, .pl-time {
  font-variant-numeric: tabular-nums;
}
.light-only { display: block; } .dark-only { display: none; }
html.dark .light-only { display: none; } html.dark .dark-only { display: block; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.skip-link { position: absolute; inset-inline-start: -999px; }
.skip-link:focus { inset-inline-start: 12px; top: 12px; z-index: 200; background: var(--surface); padding: 8px 14px; border-radius: 10px; }
.muted { color: var(--text-3); }

/* ---------- Glass ---------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border: 1px solid var(--line);
}
.glass-soft {
  background: var(--glass-soft);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border: 1px solid var(--line);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  border-block: 0;
  box-shadow: 0 1px 0 var(--line), var(--shadow-1);
}
/* brand hairline: a whisper of the identity gradient under the glass */
.site-header::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary) 55%, transparent) 30%, color-mix(in srgb, var(--accent) 45%, transparent) 70%, transparent);
  opacity: .5; pointer-events: none;
}
.header-inner { display: flex; align-items: center; gap: 18px; height: 100%; }
.brand { display: flex; align-items: center; flex-shrink: 1; min-width: 0; }
.brand-logo { height: 34px; width: auto; max-width: 44vw; object-fit: contain; object-position: center; }
@media (max-width: 420px) { .brand-logo { height: 30px; } .header-actions { gap: 4px; } .header-inner { gap: 10px; } }
.main-nav { display: none; align-items: center; gap: 4px; margin-inline-start: 8px; }
.nav-link {
  position: relative;
  padding: 8px 15px; border-radius: 999px; font-weight: 700; font-size: 14px;
  color: var(--text-2); transition: color .2s ease, background .2s ease;
  display: inline-flex; align-items: center; gap: 7px;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active { color: var(--primary-700); background: var(--primary-soft); }
.nav-link.active::after {
  content: ""; position: absolute; bottom: -13px; inset-inline: 18px; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--primary);
}
html.dark .nav-link.active { color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.icon-btn {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; color: var(--text-2); transition: all .2s ease; border: 1px solid transparent;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.icon-btn:active { transform: scale(.94); }
.lang-switch {
  font-weight: 800; font-size: 13px; padding: 7px 13px; border-radius: 999px;
  border: 1.5px solid var(--line); color: var(--text-2); transition: all .25s ease;
}
.lang-switch:hover { border-color: var(--primary); color: var(--primary-600); }
#theme-toggle .ic-sun { display: none; }
html.dark #theme-toggle .ic-sun { display: block; }
html.dark #theme-toggle .ic-moon { display: none; }

@media (min-width: 960px) {
  .main-nav { display: flex; }
  body { padding-bottom: 0; }
  .bottom-nav { display: none !important; }
}

/* ---------- Live dot ---------- */
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--live); box-shadow: 0 0 0 0 rgba(239, 68, 68, .5);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .45); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 76px 0 66px; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(620px 300px at 82% -12%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%),
    radial-gradient(720px 400px at 8% -2%, color-mix(in srgb, var(--primary) 24%, transparent), transparent 70%),
    radial-gradient(900px 480px at 50% 118%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 72%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .5;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%);
  mask-image: linear-gradient(180deg, #000, transparent 80%);
}
.hero-inner { text-align: center; max-width: 720px; }
.hero-title {
  font-size: clamp(30px, 6vw, 52px); font-weight: 900; letter-spacing: -.5px;
  background: linear-gradient(92deg, var(--text) 20%, var(--primary) 60%, var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: rise .7s ease both;
}
.hero-sub { color: var(--text-2); font-size: clamp(15px, 2.4vw, 18px); margin-top: 12px; animation: rise .7s .08s ease both; }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; animation: rise .7s .16s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px;
  border-radius: 999px; font-weight: 800; font-size: 14px;
  transition: transform .2s var(--ease-out), box-shadow .25s ease, border-color .2s, color .2s, background .2s;
  border: 1.5px solid transparent;
}
.btn:active { transform: translateY(0) scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 65%, var(--accent)));
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .35),
    0 8px 22px color-mix(in srgb, var(--primary) 32%, transparent);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .35),
    0 12px 30px color-mix(in srgb, var(--primary) 44%, transparent);
}
.btn-ghost { border-color: var(--line); background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.btn-ghost:hover { border-color: color-mix(in srgb, var(--primary) 55%, var(--line)); color: var(--primary-700); transform: translateY(-2px); }
html.dark .btn-ghost:hover { color: var(--primary); }
.btn-light { background: #fff; color: var(--ink); box-shadow: 0 8px 22px rgba(0, 0, 0, .22); }
.btn-light:hover { transform: translateY(-2px); }

/* ---------- Sections ---------- */
.section { margin: 38px auto; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
.section-head h2 { font-size: 20px; display: flex; align-items: center; gap: 10px; letter-spacing: -.2px; }
.section-head h2::before {
  content: ""; width: 4px; height: 20px; border-radius: 3px; flex: none;
  background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 55%, var(--accent)));
}
.view-all {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--primary-700); font-weight: 800; font-size: 12.5px; white-space: nowrap;
  padding: 6px 14px; border-radius: 999px;
  background: var(--primary-soft); border: 1px solid var(--line);
  transition: all .2s var(--ease-out);
}
.view-all::after { content: "‹"; font-size: 14px; line-height: 1; }
html[dir="ltr"] .view-all::after { content: "›"; }
html.dark .view-all { color: #9651FB; background: rgba(104, 12, 242, .14); border-color: rgba(104, 12, 242, .25); }
.view-all:hover { transform: translateY(-1px); border-color: var(--accent); color: var(--accent); }
html.dark .view-all:hover { color: #C4A1F4; }
.page-head { padding: 26px 0 4px; }
.page-head h1 { font-size: clamp(22px, 4vw, 30px); }
.page-sub { color: var(--text-3); margin-top: 4px; font-size: 14px; }

/* ---------- Cards ---------- */
.card { border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-1); margin-bottom: 16px; }
.card-title { font-size: 16px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card-title::before {
  content: ""; width: 4px; height: 17px; border-radius: 3px; flex: none;
  background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 55%, var(--accent)));
}
.card-subtitle { font-size: 13px; color: var(--text-3); margin: 16px 0 8px; }
.card-hover { transition: transform .28s var(--ease-out), box-shadow .28s ease, border-color .25s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }

/* ---------- Horizontal scrollers ---------- */
.hscroll {
  display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex-shrink: 0; }

/* ---------- Live slider cards ---------- */
.live-card {
  width: 250px; border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px;
  position: relative; box-shadow: var(--shadow-1); transition: transform .28s ease, box-shadow .28s ease;
}
.live-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.lc-league { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.lc-league span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lc-team { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; min-width: 0; }
.lc-team img { width: 28px; height: 28px; aspect-ratio: 1; object-fit: contain; border-radius: 50%; flex: none; }
.lc-score { font-weight: 900; font-size: 17px; color: var(--primary-700, #0b8457); }
html.dark .lc-score { color: var(--primary); }
.lc-minute {
  position: absolute; top: 12px; inset-inline-end: 12px; font-size: 11px; font-weight: 800;
  color: var(--live); background: color-mix(in srgb, var(--live) 12%, transparent);
  padding: 3px 9px; border-radius: 999px; animation: blink 2s infinite;
}
@keyframes blink { 50% { opacity: .55; } }

/* ---------- League block & match cards ---------- */
.league-block { margin-bottom: 18px; }
.league-head {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0; border-bottom: 0;
}
.league-head h3 { font-size: 14px; font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.league-head img { border-radius: 6px; }
.league-head .chev { color: var(--text-3); transition: transform .2s; }
.league-head:hover .chev { transform: translateX(-3px); color: var(--primary); }
html[dir="ltr"] .league-head:hover .chev { transform: translateX(3px); }
html[dir="rtl"] .chev { transform: scaleX(-1); }
html[dir="rtl"] .league-head:hover .chev { transform: scaleX(-1) translateX(3px); }
.league-matches { display: flex; flex-direction: column; gap: 8px; }
.league-head + .league-matches { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }

.match-card {
  position: relative;
  display: grid; grid-template-columns: 1fr 96px 1fr 34px; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; box-shadow: var(--shadow-1);
  transition: border-color .2s ease, box-shadow .25s ease, transform .2s var(--ease-out);
}
.match-card:hover {
  border-color: color-mix(in srgb, var(--primary) 32%, var(--line));
  box-shadow: var(--shadow-2); transform: translateY(-1px);
}
/* live matches carry a pulsing accent edge on the leading side */
.match-card:has(.is-live)::before {
  content: ""; position: absolute; inset-block: 10px; inset-inline-start: -1px; width: 3px;
  border-radius: 3px; background: var(--live); animation: blink 2s infinite;
}
.mc-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mc-team img { aspect-ratio: 1; object-fit: contain; border-radius: 50%; background: var(--surface-2); flex: none; }
.mc-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-home { justify-content: flex-start; }
.mc-away { flex-direction: row-reverse; }
.mc-center { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.mc-score { font-weight: 900; font-size: 17px; display: flex; gap: 5px; align-items: center; }
.mc-score i { color: var(--text-3); font-style: normal; font-weight: 400; }
.mc-time { font-weight: 800; font-size: 15px; color: var(--text); direction: ltr; }
.mc-status { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.is-live { color: var(--live); background: color-mix(in srgb, var(--live) 12%, transparent); animation: blink 2s infinite; }
.is-ft { color: var(--text-3); background: var(--surface-2); }
.is-soon { color: var(--primary-600); background: var(--primary-soft); }
html.dark .is-soon { color: var(--primary); }

.fav-btn {
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; color: var(--text-3); transition: all .2s ease;
}
.fav-btn:hover { color: #f59e0b; background: rgba(245, 158, 11, .1); }
.fav-btn.is-fav { color: #f59e0b; }
.fav-btn.is-fav svg { fill: #f59e0b; stroke: #f59e0b; }
.fav-btn.standalone { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 12px; }

/* ---------- Featured grid ---------- */
.featured-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.featured-card { border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-1); }
.fc-league { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); margin-bottom: 14px; min-width: 0; }
.fc-league span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.fc-team { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.fc-team img { aspect-ratio: 1; object-fit: contain; border-radius: 50%; background: var(--surface-2); padding: 4px; flex: none; }
.fc-team b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.fc-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fc-score { font-size: 24px; font-weight: 900; display: inline-flex; align-items: center; gap: 6px; }
.fc-time { font-size: 20px; font-weight: 900; color: var(--primary-600); direction: ltr; }
html.dark .fc-time { color: var(--primary); }
.fc-date { color: var(--text-3); font-size: 11px; text-align: center; }

/* ---------- Pills ---------- */
.league-pill, .team-pill {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px;
  font-weight: 700; font-size: 13.5px; white-space: nowrap;
}
.league-pill img { border-radius: 8px; }
.team-pill { flex-direction: column; border-radius: var(--radius); padding: 14px 18px; min-width: 108px; text-align: center; }
.team-pill img { border-radius: 50%; }
.team-pill span { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- News ---------- */
.news-grid { display: grid; gap: 14px; }
@media (min-width: 900px) { .news-grid { grid-template-columns: 1.4fr 1fr; } }
.news-side { display: flex; flex-direction: column; gap: 10px; }
.news-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.news-card {
  display: grid; grid-template-columns: 118px 1fr; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px; box-shadow: var(--shadow-1); overflow: hidden;
  transition: border-color .2s, box-shadow .25s, transform .2s var(--ease-out);
}
.news-card:hover {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
  box-shadow: var(--shadow-2); transform: translateY(-2px);
}
.news-thumb { border-radius: 10px; overflow: hidden; aspect-ratio: 16/10; background: var(--surface-2); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.news-card:hover .news-thumb img { transform: scale(1.06); }
.news-title { font-size: 13.5px; font-weight: 700; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-time { color: var(--text-3); font-size: 11.5px; display: block; margin-top: 6px; }
.news-meta-line { display:flex; align-items:center; gap:7px; flex-wrap:wrap; margin-top:6px; color:var(--text-3); font-size:10.5px; }
.news-author { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.news-category,.article-category { padding:2px 7px; border-radius:999px; background:var(--primary-soft); color:var(--primary-700); font-weight:800; }
.article-author b { color:var(--text); }
.news-desc { color: var(--text-2); font-size: 13px; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card:not(.news-big) .news-desc { font-size: 11.5px; line-height: 1.45; margin-top: 4px; -webkit-line-clamp: 1; }
.news-big { grid-template-columns: 1fr; border-radius: var(--radius); padding: 0; }
.news-big .news-thumb { border-radius: 0; aspect-ratio: 16/9; }
.news-big .news-body { padding: 16px 18px 18px; }
.news-big .news-title { font-size: 18px; -webkit-line-clamp: 3; }

/* ---------- Highlights ---------- */
.hl-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.hl-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; justify-content: flex-end;
  min-height: 130px; padding: 16px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 18%, var(--surface)), var(--surface) 60%);
  border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.hl-play {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: #ffffff; box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 45%, transparent);
  margin-bottom: auto;
}
.hl-title { font-weight: 800; font-size: 14px; }
.hl-card small { color: var(--text-3); font-size: 12px; }
.video-links { display: flex; flex-direction: column; gap: 8px; }
.video-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 13.5px;
}
.video-link .hl-play { width: 34px; height: 34px; margin: 0; }

/* ---------- Stats strip ---------- */
.stats-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px;
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-1);
}
.stat-box { text-align: center; }
.stat-box b { font-size: clamp(22px, 4vw, 32px); font-weight: 900; color: var(--primary-600); display: block; }
html.dark .stat-box b { color: var(--primary); }
.stat-box span { color: var(--text-3); font-size: 12.5px; font-weight: 700; }

/* ---------- App banner & newsletter ---------- */
.app-banner {
  display: flex; align-items: center; gap: 22px; justify-content: space-between;
  border-radius: 24px; padding: 30px;
  background: linear-gradient(120deg, var(--ink), #16233B 55%, #0d3b2e);
  color: #fff; overflow: hidden; position: relative; box-shadow: var(--shadow-2);
}
.app-banner::after {
  content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary) 38%, transparent), transparent 70%);
  top: -140px; inset-inline-end: -80px;
}
.ab-copy h2 { font-size: clamp(19px, 3vw, 26px); margin-bottom: 8px; }
.ab-copy p { color: #b8c6da; max-width: 480px; margin-bottom: 16px; }
.ab-copy .btn { margin-inline-end: 8px; }
.ab-art img { width: 120px; height: 120px; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .45)); border-radius: 26px; }
.newsletter {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
  border-radius: 24px; padding: 26px 30px; box-shadow: var(--shadow-1);
}
.newsletter h2 { font-size: 19px; } .newsletter p { color: var(--text-3); font-size: 13.5px; }
.nl-form { display: flex; gap: 8px; flex: 1; max-width: 460px; min-width: 260px; }
.nl-form input {
  flex: 1; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 11px 18px; transition: border-color .25s;
}
.nl-form input:focus { outline: none; border-color: var(--primary); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 64px; background: var(--ink); color: #cbd6e5;
  position: relative;
}
.site-footer::before {
  content: ""; position: absolute; top: 0; inset-inline: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary) 35%, var(--accent) 65%, transparent);
  opacity: .55;
}
html.dark .site-footer { background: #060B14; }
.footer-grid { display: grid; gap: 28px; padding: 44px 0 26px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand p { color: #8fa1b8; font-size: 13.5px; margin-top: 12px; max-width: 340px; }
.site-footer h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.site-footer nav a { display: block; padding: 5px 0; color: #8fa1b8; font-size: 13.5px; transition: color .2s; }
.site-footer nav a:hover { color: var(--accent-2); }
.social-row { display: flex; gap: 8px; }
.social-row .icon-btn { color: #8fa1b8; border: 1px solid rgba(255, 255, 255, .1); }
.social-row .icon-btn:hover { color: var(--primary); background: rgba(255, 255, 255, .06); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 18px 0; font-size: 12.5px; color: #64748b; }

/* ---------- Bottom nav (mobile) — floating dock ---------- */
.bottom-nav {
  position: fixed; bottom: calc(10px + env(safe-area-inset-bottom)); inset-inline: 12px; z-index: 100;
  display: flex; justify-content: space-around; padding: 7px 6px;
  border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow-2);
}
.bn-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 12px; border-radius: 16px; color: var(--text-3); font-size: 10.5px; font-weight: 700;
  transition: color .2s, background .2s;
}
.bn-item:active { transform: scale(.94); }
.bn-item.active { color: var(--primary-700); background: var(--primary-soft); }
html.dark .bn-item.active { color: var(--primary); }
.bn-item.active svg { filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--primary) 55%, transparent)); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: 14px 0 0; font-size: 12.5px; color: var(--text-3); display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumbs a:hover { color: var(--primary-600); }
.crumb-sep { opacity: .5; }

/* ---------- Day nav ---------- */
.day-nav {
  display: flex; gap: 4px; padding: 6px; border-radius: 999px; margin: 14px auto 20px;
  overflow-x: auto; scrollbar-width: none; align-items: center;
}
.day-nav::-webkit-scrollbar { display: none; }
.day-tab {
  display: flex; flex-direction: column; align-items: center; padding: 7px 16px; border-radius: 999px;
  font-size: 13px; color: var(--text-2); white-space: nowrap; transition: all .25s; flex-shrink: 0;
}
.day-tab small { font-size: 10.5px; color: var(--text-3); }
.day-tab:hover { background: var(--surface-2); }
.day-tab.active {
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 72%, var(--accent)));
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 16px color-mix(in srgb, var(--primary) 40%, transparent);
}
.day-tab.active small { color: rgba(255, 255, 255, .75); }
.day-tab.is-live.active { background: var(--live); color: #fff; }
.day-tab.is-live.active small, .day-tab.is-live.active .live-dot { color: #fff; background: #fff; }
.day-picker { position: relative; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: var(--text-2); cursor: pointer; flex-shrink: 0; }
.day-picker:hover { background: var(--surface-2); }
.day-picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.date-sep { font-size: 12.5px; color: var(--text-3); margin: 14px 0 6px; font-weight: 700; }

/* ---------- Empty state ---------- */
.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  padding: 54px 24px; border-radius: var(--radius); color: var(--text-3); margin: 20px 0;
}
.empty-note { color: var(--text-3); padding: 18px 0; }
.error-404 .err-code {
  font-size: 84px; font-weight: 900; line-height: 1;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---------- Match hero ---------- */
.match-hero, .entity-hero { position: relative; padding: 26px 0 0; overflow: visible; }
.mh-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(560px 260px at 15% -20%, color-mix(in srgb, var(--primary) 20%, transparent), transparent 70%),
    radial-gradient(560px 260px at 85% -20%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
}
.mh-inner { position: relative; padding: 8px 0 22px; }
.mh-league { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-2); font-size: 13.5px; font-weight: 700; margin-bottom: 18px; }
.mh-league img { border-radius: 6px; }
.mh-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; max-width: 720px; margin-inline: auto; }
.mh-team { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.mh-team img { width: 76px; height: 76px; aspect-ratio: 1; object-fit: contain; border-radius: 50%; background: var(--surface); padding: 6px; box-shadow: var(--shadow-1); transition: transform .3s ease; }
.mh-team:hover img { transform: scale(1.06); }
.mh-team { min-width: 0; }
.mh-team b { font-size: clamp(14px, 2.6vw, 18px); max-width: 100%; overflow-wrap: anywhere; }
.mh-center { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 10px; }
/* Score row, reference style: home number · status pill / live ring · away
   number. Follows the page direction so each number sits on its team's side. */
.mh-score { font-size: clamp(34px, 7vw, 52px); font-weight: 900; display: flex; gap: clamp(12px, 3.5vw, 22px); align-items: center; }
.mh-score i { color: var(--text-3); font-style: normal; font-weight: 300; }
.mh-score .mh-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 74px; }
.mh-time { font-size: clamp(24px, 5vw, 34px); font-weight: 900; color: var(--primary-600); direction: ltr; }
html.dark .mh-time { color: var(--primary); }
.mh-status {
  font-size: 13px; font-weight: 800; padding: 6px 18px; border-radius: 999px;
  background: var(--glass-soft); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.mh-pens {
  display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800;
  color: var(--text-2); white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 16px; box-shadow: var(--shadow-1);
}
.mh-pens .mh-pens-label { font-size: 11.5px; font-weight: 800; color: var(--text-2); white-space: nowrap; }
.mh-pens i { color: var(--text-3); font-style: normal; }
.mh-pens b.is-win { color: var(--primary-600); }
html.dark .mh-pens b.is-win { color: var(--primary); }
.mh-pens-note { display: block; font-size: 12px; font-weight: 700; color: var(--text-3); margin-top: 2px; }
/* Meta row under the hero teams: venue, kickoff, round */
.mh-meta {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 6px 16px; margin-top: 14px; color: var(--text-2); font-size: 12.5px; font-weight: 700;
}
.mh-meta-item { display: inline-flex; align-items: center; gap: 5px; }
.mh-meta-item svg { color: var(--text-2); flex: none; }

/* ---------- Score breakdown (halves / extra time / penalties) ---------- */
.score-breakdown { margin-top: 4px; }
.sb-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.sb-head .sb-team { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; min-width: 0; }
.sb-head .sb-team img { border-radius: 6px; flex: none; }
.sb-head .sb-team-a { justify-content: flex-end; }
/* Score pairs are home-first in the DOM and must follow the page direction
   (home = right in RTL) so each number sits on its team's side. Forcing LTR
   here put the away score under the home team — the reversal bug. */
.sb-head .sb-total { display: inline-flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 900; }
.sb-head .sb-total i { color: var(--text-3); font-style: normal; font-weight: 300; }
.sb-rows { list-style: none; margin: 8px 0 0; padding: 0; }
.sb-rows li { display: grid; grid-template-columns: 2.2rem 1fr 2.2rem; align-items: center; padding: 7px 0; font-weight: 800; }
.sb-rows li + li { border-top: 1px solid var(--border); }
.sb-rows li em { text-align: center; font-style: normal; font-weight: 700; font-size: 12px; color: var(--text-3); }
.sb-rows li span:first-child { text-align: start; }
.sb-rows li span:last-child { text-align: end; }
.sb-note { margin: 10px 0 0; font-size: 12px; font-weight: 800; color: var(--primary-600); text-align: center; }
html.dark .sb-note { color: var(--primary); }
.mh-actions { position: absolute; top: 0; inset-inline-end: 0; display: flex; gap: 8px; }
.mh-watch { display: flex; justify-content: center; margin-bottom: 6px; }
/* ---------- Live minute ring ---------- */
.live-ring { position: relative; width: 72px; height: 72px; display: grid; place-items: center; }
.live-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 5; }
.ring-fg {
  fill: none; stroke: var(--live); stroke-width: 5; stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(.2, .7, .3, 1);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--live) 55%, transparent));
}
.ring-min { font-size: 15px; font-weight: 900; color: var(--live); direction: ltr; z-index: 1; }
.ring-pulse {
  position: absolute; inset: -4px; border-radius: 50%; pointer-events: none;
  border: 2px solid color-mix(in srgb, var(--live) 45%, transparent);
  animation: ringpulse 2s ease-out infinite;
}
@keyframes ringpulse {
  0% { transform: scale(.92); opacity: .9; }
  70% { transform: scale(1.12); opacity: 0; }
  100% { transform: scale(1.12); opacity: 0; }
}
.ring-done .ring-pulse { display: none; }
.ring-done .ring-fg { stroke: var(--text-3); filter: none; }
.ring-done .ring-min { color: var(--text-3); }

.countdown { display: flex; gap: 6px; align-items: center; font-weight: 900; font-size: 18px; color: var(--text-2); direction: ltr; }
.countdown span { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; min-width: 46px; text-align: center; box-shadow: var(--shadow-1); }
.countdown i { font-style: normal; color: var(--text-3); }

/* ---------- Entity hero (team/league/player) ---------- */
.entity-inner { display: flex; align-items: center; gap: 18px; padding: 14px 0 20px; min-width: 0; }
.entity-inner > div { min-width: 0; }
.entity-inner h1 { overflow-wrap: anywhere; }
.entity-logo { border-radius: 20px; background: var(--surface); padding: 10px; box-shadow: var(--shadow-1); }
.entity-logo.round { border-radius: 50%; }
.entity-inner h1 { font-size: clamp(20px, 4vw, 28px); }
.entity-inner .fav-btn { margin-inline-start: auto; }
.form-badges { display: flex; gap: 5px; margin-top: 8px; }
.form-badge {
  width: 22px; height: 22px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 11px; font-weight: 900; color: #fff;
}
.form-w { background: var(--win); } .form-l { background: var(--lose); } .form-d { background: var(--draw); }

/* ---------- Tabs ---------- */
.tabs {
  display: flex; gap: 2px; padding: 5px; border-radius: 999px; overflow-x: auto;
  scrollbar-width: none; margin-bottom: 4px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 9px 18px; border-radius: 999px; font-weight: 800; font-size: 13.5px; color: var(--text-2);
  white-space: nowrap; transition: all .25s ease; flex-shrink: 0;
}
.tab:hover { color: var(--text); }
.tab.active {
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 72%, var(--accent)));
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 16px color-mix(in srgb, var(--primary) 40%, transparent);
}
.tab-panel { display: none; animation: fadein .35s ease; }
.tab-panel.active { display: block; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.match-body { padding-top: 22px; }
.two-col { display: grid; gap: 16px; align-items: start; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }

.seg-control { display: inline-flex; gap: 2px; background: var(--surface-2); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.seg { padding: 7px 18px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--text-2); transition: all .2s; }
.seg.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

/* ---------- Info list ---------- */
.info-list { display: flex; flex-direction: column; }
.info-list > div { display: flex; justify-content: space-between; gap: 14px; padding: 11px 2px; border-bottom: 1px dashed var(--line); }
.info-list > div:last-child { border-bottom: 0; }
.info-list dt { color: var(--text-3); font-size: 13px; }
.info-list dd { font-weight: 700; font-size: 13.5px; text-align: end; }
.info-list dd a:hover { color: var(--primary-600); }
.channel-list { list-style: none; padding: 0; display: flex; flex-direction: column; }
.channel-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 2px; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.channel-list li:last-child { border-bottom: 0; }
.channel-list span { color: var(--text-2); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; display: flex; flex-direction: column; }
.tl-period { display: flex; justify-content: center; padding: 10px 0; }
.tl-period-label {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800;
  color: var(--text-2); background: var(--surface-2); padding: 6px 16px; border-radius: 999px;
}
.tl-event { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px dashed var(--line); }
.tl-event:last-child { border-bottom: 0; }
.tl-event.side-away { flex-direction: row-reverse; text-align: end; }
.tl-min { font-weight: 900; font-size: 13px; color: var(--text-3); min-width: 40px; text-align: center; direction: ltr; }
.tl-icon { display: inline-flex; color: var(--primary-600); }
html.dark .tl-icon { color: var(--primary); }
.ev-cancelled .tl-icon, .ev-missed_pen .tl-icon { color: var(--live); }
.tl-body { display: flex; flex-direction: column; min-width: 0; }
.tl-body b { font-size: 13.5px; }
.tl-body small { color: var(--text-3); font-size: 11.5px; }
.tl-video { color: var(--primary-600); margin-inline-start: auto; }
.tl-event.side-away .tl-video { margin-inline-start: 0; margin-inline-end: auto; }

/* ---------- Formation pitch ---------- */
.pitch-card { padding: 0; overflow: hidden; border: 1px solid var(--line); }
.pitch-header {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 14px 18px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.pitch-team { display: flex; align-items: center; gap: 9px; font-size: 13.5px; min-width: 0; }
.pitch-team b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pitch-team img { border-radius: 50%; background: var(--surface-2); }
.pitch-formation {
  font-style: normal; font-weight: 800; font-size: 11.5px; letter-spacing: .5px;
  background: var(--primary-soft); color: var(--primary-600); padding: 3px 10px; border-radius: 999px;
}
html.dark .pitch-formation { color: var(--primary); }

.pitch {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  aspect-ratio: 68 / 105; max-height: 860px; width: 100%;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.045) 0 9.1%, rgba(0,0,0,.05) 9.1% 18.2%),
    radial-gradient(140% 90% at 50% 0%, #2f9e57 0%, #237e46 55%, #1c6b3b 100%);
  padding: 4.5% 3% ;
}
html.dark .pitch {
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.03) 0 9.1%, rgba(0,0,0,.10) 9.1% 18.2%),
    radial-gradient(140% 90% at 50% 0%, #1f7a43 0%, #175f35 55%, #114a29 100%);
}
/* pitch markings */
.pl { position: absolute; border: 1.5px solid rgba(255,255,255,.35); pointer-events: none; }
.pl-outline { inset: 2.2% 2.6%; border-radius: 6px; }
.pl-halfway { left: 2.6%; right: 2.6%; top: 50%; border-width: 0 0 1.5px; }
.pl-circle { left: 50%; top: 50%; width: 21%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; }
.pl-spot-c { left: 50%; top: 50%; width: 5px; height: 5px; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(255,255,255,.4); border: 0; }
.pl-box-top { top: 2.2%; left: 21%; right: 21%; height: 11.5%; border-top: 0; }
.pl-box6-top { top: 2.2%; left: 36%; right: 36%; height: 4.4%; border-top: 0; }
.pl-arc-top { top: 12.2%; left: 50%; width: 13%; aspect-ratio: 2/1; transform: translateX(-50%); border-radius: 0 0 120px 120px; border-top: 0; }
.pl-box-bottom { bottom: 2.2%; left: 21%; right: 21%; height: 11.5%; border-bottom: 0; }
.pl-box6-bottom { bottom: 2.2%; left: 36%; right: 36%; height: 4.4%; border-bottom: 0; }
.pl-arc-bottom { bottom: 12.2%; left: 50%; width: 13%; aspect-ratio: 2/1; transform: translateX(-50%); border-radius: 120px 120px 0 0; border-bottom: 0; }

.pitch-side { display: flex; flex-direction: column; justify-content: space-between; flex: 1; min-height: 0; z-index: 1; gap: 2px; }
.side-home { padding-bottom: 5%; }
.side-away { padding-top: 5%; }
.pitch-line { display: flex; justify-content: space-evenly; align-items: center; direction: ltr; }

.fp-chip {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: clamp(52px, 16vw, 84px); text-align: center;
  transition: transform .22s cubic-bezier(.2, .7, .3, 1.4);
}
.fp-chip:hover { transform: translateY(-3px) scale(1.05); z-index: 3; }
.fp-photo { position: relative; width: clamp(38px, 11vw, 50px); height: clamp(38px, 11vw, 50px); }
.fp-photo > img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  background: #fff; border: 2px solid rgba(255,255,255,.85);
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.fp-num {
  position: absolute; bottom: -4px; left: -4px; min-width: 17px; height: 17px; padding: 0 3px;
  border-radius: 7px; background: #070022; color: #fff; font-size: 9.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 1.5px solid rgba(255,255,255,.7);
}
.fp-rating {
  position: absolute; top: -6px; right: -8px; min-width: 22px; height: 16px; padding: 0 4px;
  border-radius: 6px; color: #ffffff; font-size: 9.5px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.r-elite { background: #22c55e; }
.r-good  { background: #86efac; }
.r-ok    { background: #fbbf24; }
.r-low   { background: #cbd5e1; color: #334155; }
.fp-cap {
  position: absolute; top: -6px; left: -6px; width: 15px; height: 15px; border-radius: 50%;
  background: #f59e0b; color: #451a03; font-style: normal; font-size: 9px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.fp-marks { position: absolute; bottom: -6px; right: -6px; display: flex; gap: 2px; align-items: flex-end; }
.fp-goal { font-style: normal; font-size: 11px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.fp-goal.og { filter: hue-rotate(140deg) drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.fp-card { display: inline-block; width: 8px; height: 11px; border-radius: 2px; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.fp-card.yellow { background: #facc15; } .fp-card.red { background: #ef4444; }
.fp-sub {
  display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px;
  border-radius: 50%; background: #ef4444; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.fp-name {
  font-size: clamp(9.5px, 2.4vw, 11.5px); font-weight: 700; color: #fff; line-height: 1.25;
  text-shadow: 0 1px 3px rgba(0,0,0,.65); max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- Lineups ---------- */
.lineup-team img { border-radius: 50%; }
.lineup-list { list-style: none; padding: 0; display: flex; flex-direction: column; }
.lineup-list li { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px dashed var(--line); }
.lineup-list li:last-child { border-bottom: 0; }
.lineup-list.bench { opacity: .85; }
.lp-num { min-width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; color: var(--text-2); }
.lineup-list img { border-radius: 50%; background: var(--surface-2); }
.lp-name { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1; }
.lp-name small { color: var(--text-3); font-weight: 600; font-size: 11px; }
.badge-cap { font-style: normal; font-size: 10px; font-weight: 900; background: var(--primary); color: #ffffff; border-radius: 6px; padding: 1px 6px; }
.lp-marks { display: flex; align-items: center; gap: 7px; margin-inline-start: auto; }
.mark-card { display: inline-block; width: 11px; height: 15px; border-radius: 3px; }
.mark-card.yellow { background: #facc15; } .mark-card.red { background: #ef4444; }
.mark-goal { font-style: normal; font-size: 13px; }
.lp-rating { font-size: 11.5px; font-weight: 800; background: var(--primary-soft); color: var(--primary-600); padding: 2px 8px; border-radius: 7px; }
html.dark .lp-rating { color: var(--primary); }

/* ---------- Stat bars ---------- */
.stats-teams { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; font-weight: 800; font-size: 13.5px; }
.stats-teams span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.stats-teams img { border-radius: 50%; }
.stat-bars { display: flex; flex-direction: column; gap: 13px; }
.stat-row { display: grid; grid-template-columns: 44px 1fr 44px; gap: 10px; align-items: center; }
.sv { font-size: 13px; font-weight: 800; text-align: center; }
.stat-mid { display: flex; flex-direction: column; gap: 5px; }
.stat-label { text-align: center; font-size: 12px; color: var(--text-3); font-weight: 700; }
.stat-track { display: flex; height: 7px; border-radius: 999px; overflow: hidden; background: var(--surface-2); direction: ltr; }
html[dir="rtl"] .stat-track { direction: rtl; } /* home fill hugs the home side */
.fill-h { background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 60%, var(--accent))); border-start-end-radius: 0; transition: width .8s cubic-bezier(.2, .7, .3, 1); }
.fill-a { background: color-mix(in srgb, var(--text-3) 45%, var(--surface-2)); transition: width .8s cubic-bezier(.2, .7, .3, 1); }
.heatmap-placeholder { margin-top: 22px; text-align: center; color: var(--text-3); }
.heatmap-placeholder svg { max-width: 420px; margin: 0 auto 8px; color: var(--text-3); }
.heatmap-placeholder p { font-size: 12.5px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.standings { width: 100%; border-collapse: collapse; font-size: 13px; }
.standings th {
  color: var(--text-3); font-size: 11px; font-weight: 800; letter-spacing: .03em;
  padding: 9px 6px; text-align: center; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}
.standings th:first-child { border-start-start-radius: 10px; }
.standings th:last-child { border-start-end-radius: 10px; }
.standings td { padding: 10px 6px; text-align: center; border-bottom: 1px dashed var(--line); }
.standings tr:last-child td { border-bottom: 0; }
.standings .col-team { text-align: start; }
.standings .col-team a { display: flex; align-items: center; gap: 9px; font-weight: 700; min-width: 140px; }
.standings .col-team a:hover { color: var(--primary-600); }
.standings .col-team img { border-radius: 50%; background: var(--surface-2); }
.standings .col-pts strong { color: var(--primary-600); }
html.dark .standings .col-pts strong { color: var(--primary); }
.pos-pill {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 8px; font-weight: 800; font-size: 11.5px;
  background: color-mix(in srgb, var(--pos-color, var(--text-3)) 14%, transparent);
  color: var(--pos-color, var(--text-2));
  border: 1.5px solid color-mix(in srgb, var(--pos-color, var(--text-3)) 40%, transparent);
}
.row-highlight td { background: var(--primary-soft); }
tbody tr { transition: background .2s; }
tbody tr:hover td { background: var(--surface-2); }
.rules-box { border-radius: var(--radius-sm); padding: 14px 18px; font-size: 13px; color: var(--text-2); margin-bottom: 16px; }
.rules-box summary { cursor: pointer; font-weight: 700; }
.rules-box ol { margin: 10px 0 0; padding-inline-start: 20px; }

/* ---------- Scorers ---------- */
.scorers-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.scorer-row { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px dashed var(--line); }
.scorer-row:last-child { border-bottom: 0; }
.sc-rank { min-width: 24px; height: 24px; border-radius: 8px; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; color: var(--text-2); }
.scorer-row:first-child .sc-rank { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #451a03; }
.sc-player { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.sc-player img { border-radius: 50%; background: var(--surface-2); }
.sc-player:hover strong { color: var(--primary-600); }
.sc-meta { display: flex; flex-direction: column; min-width: 0; }
.sc-meta strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-meta small { color: var(--text-3); font-size: 11.5px; }
.sc-val { text-align: center; }
.sc-val strong { font-size: 16px; font-weight: 900; color: var(--primary-600); display: block; }
html.dark .sc-val strong { color: var(--primary); }
.sc-val small { color: var(--text-3); font-size: 10.5px; }

/* ---------- Grids ---------- */
.leagues-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin-bottom: 30px; }
.league-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px 14px; border-radius: var(--radius); text-align: center; font-size: 13.5px;
}
.league-card .fav-btn { position: absolute; top: 8px; inset-inline-end: 8px; }
.players-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-bottom: 30px; }
.player-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 14px; border-radius: var(--radius); text-align: center; }
.player-card img { border-radius: 50%; background: var(--surface-2); }
.pc-goals { font-size: 12px; font-weight: 800; background: var(--primary-soft); color: var(--primary-600); padding: 3px 12px; border-radius: 999px; }
html.dark .pc-goals { color: var(--primary); }
.pc-league { color: var(--text-3); font-size: 11px; }
.boards-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .boards-grid { grid-template-columns: 1fr 1fr; } }
.team-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
.kpi { text-align: center; background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 6px; }
.kpi b { font-size: 20px; font-weight: 900; color: var(--primary-600); display: block; }
html.dark .kpi b { color: var(--primary); }
.kpi span { font-size: 11px; color: var(--text-3); font-weight: 700; }

/* ---------- Player profile (VisionOS / liquid glass) ---------- */
.player-hero { position: relative; padding: 30px 0 8px; overflow: hidden; }
.ph-aurora {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(520px 300px at 78% -8%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 68%),
    radial-gradient(560px 320px at 12% 4%, color-mix(in srgb, var(--primary) 28%, transparent), transparent 68%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
}
.ph-aurora::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%); mask-image: linear-gradient(180deg, #000, transparent 75%);
}
.ph-inner { display: flex; align-items: center; gap: 22px; padding: 6px 0 20px; }
.ph-photo-wrap { position: relative; flex-shrink: 0; width: 150px; height: 150px; }
.ph-photo-glow {
  position: absolute; inset: -14px; border-radius: 50%; z-index: 0;
  background: conic-gradient(from 120deg, var(--primary), var(--accent), #a78bfa, var(--primary));
  filter: blur(22px); opacity: .55; animation: spin 9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ph-photo {
  position: relative; z-index: 1; width: 150px; height: 150px; border-radius: 50%; object-fit: cover;
  background: var(--surface); border: 3px solid rgba(255,255,255,.85); box-shadow: var(--shadow-2);
}
html.dark .ph-photo { border-color: rgba(255,255,255,.14); }
.ph-number {
  position: absolute; z-index: 2; bottom: 4px; inset-inline-end: 4px; min-width: 34px; height: 34px; padding: 0 6px;
  border-radius: 12px; background: var(--ink); color: #fff; font-weight: 900; font-size: 16px;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface); box-shadow: var(--shadow-1);
}
.ph-id { min-width: 0; }
.ph-name { font-size: clamp(24px, 5vw, 40px); font-weight: 900; letter-spacing: -.5px; overflow-wrap: anywhere; }
.ph-full { color: var(--text-3); margin-top: 2px; font-size: 14px; }
.ph-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ph-tag {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px;
  background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line); font-size: 13px; font-weight: 700; box-shadow: var(--shadow-1);
}
.ph-tag img { border-radius: 4px; }
.ph-club { display: inline-flex; align-items: center; gap: 7px; }
.ph-club:hover { color: var(--primary-600); }
.ph-pos { color: var(--primary-600); background: var(--primary-soft); border-color: transparent; }
html.dark .ph-pos { color: var(--primary); }

.ph-vitals { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin-top: 4px; }
.vital { border-radius: 16px; padding: 14px 10px; text-align: center; box-shadow: var(--shadow-1); }
.vital b { display: block; font-size: clamp(15px, 3vw, 20px); font-weight: 900; }
.vital b i { font-style: normal; font-size: 11px; font-weight: 700; color: var(--text-3); margin-inline-start: 2px; }
.vital span { font-size: 11.5px; color: var(--text-3); font-weight: 700; }

.player-body { padding-top: 22px; }
.stat-rings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.ring-card { border-radius: 20px; padding: 18px 10px 16px; text-align: center; box-shadow: var(--shadow-1); }
.ring-viz { position: relative; width: 110px; height: 110px; margin: 0 auto; }
.ring-viz svg { transform: rotate(-90deg); }
.rc-bg { fill: none; stroke: var(--surface-2); stroke-width: 8; }
.rc-fg { fill: none; stroke: var(--rc); stroke-width: 8; stroke-linecap: round;
  transition: stroke-dashoffset 1.3s cubic-bezier(.2,.7,.3,1); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--rc) 45%, transparent)); }
.rc-val { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 900; }
.rc-label { display: block; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--text-2); }

.stat-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 16px; }
.chip { border-radius: 16px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 3px; box-shadow: var(--shadow-1); }
.chip-ic { font-size: 18px; height: 22px; }
.chip b { font-size: 20px; font-weight: 900; }
.chip span { font-size: 11.5px; color: var(--text-3); font-weight: 700; text-align: center; }
.card-y, .card-r { width: 15px; height: 20px; border-radius: 3px; display: inline-block; }
.card-y { background: #facc15; } .card-r { background: #ef4444; }
.card-y-sm, .card-r-sm { display: inline-block; width: 11px; height: 15px; border-radius: 2px; vertical-align: middle; }
.card-y-sm { background: #facc15; } .card-r-sm { background: #ef4444; }

.comp-stats .card-title { margin-bottom: 14px; }
.comp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.comp-table th { color: var(--text-3); font-size: 11.5px; font-weight: 700; padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line); }
.comp-table td { padding: 10px 6px; text-align: center; border-bottom: 1px dashed var(--line); }
.comp-table tr:last-child td { border-bottom: 0; }
.comp-table .ct-name { text-align: start; }
.comp-table .ct-name a, .comp-table .ct-name { display: flex; align-items: center; gap: 8px; font-weight: 700; min-width: 150px; }
.comp-table .ct-name img { border-radius: 5px; }
.comp-table .ct-name a:hover { color: var(--primary-600); }
.comp-table td strong { color: var(--primary-600); }
html.dark .comp-table td strong { color: var(--primary); }
@media (max-width: 560px) {
  .ph-inner { flex-direction: column; text-align: center; }
  .ph-tags { justify-content: center; }
  .stat-rings { gap: 8px; }
  .ring-viz { width: 92px; height: 92px; }
  .rc-val { font-size: 25px; }
}

/* Player description + textual vital + richer stat table */
.ph-desc { margin-top: 12px; color: var(--text-2); font-size: 14px; line-height: 1.6; max-width: 62ch; }
.vital b.vital-txt { font-size: clamp(13px, 2.6vw, 16px); }
.comp-table-rich th, .comp-table-rich td { padding-inline: 5px; }
.comp-table-rich th { white-space: nowrap; }
.comp-table .ct-name .ct-plain { display: inline; }
.comp-table tfoot .ct-total td { border-top: 2px solid var(--line); border-bottom: 0; font-weight: 900; background: color-mix(in srgb, var(--primary) 6%, transparent); }
.comp-table tfoot .ct-total .ct-name { color: var(--text-1); font-weight: 900; }

/* Transfer history timeline */
.transfers-card { margin-top: 16px; }
.transfer-timeline { list-style: none; margin: 6px 0 0; padding: 0; position: relative; }
.transfer-timeline::before { content: ""; position: absolute; inset-inline-start: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.transfer-row { position: relative; padding-inline-start: 26px; padding-block: 10px; }
.tr-dot { position: absolute; inset-inline-start: 0; top: 16px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.tr-body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; }
.tr-teams { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14.5px; min-width: 0; flex-wrap: wrap; }
.tr-team { min-width: 0; }
.tr-to { color: var(--primary-600); }
html.dark .tr-to { color: var(--primary); }
.tr-from { color: var(--text-3); }
.tr-arrow { color: var(--text-3); flex: none; }
.tr-meta { display: inline-flex; align-items: center; gap: 8px; }
.tr-type { font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.tr-type.tt-move { color: var(--accent-700, #26048A); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.tr-type.tt-loan { color: #b45309; background: color-mix(in srgb, #f59e0b 18%, transparent); }
.tr-type.tt-free { color: var(--primary-600); background: var(--primary-soft); }
html.dark .tr-type.tt-move { color: #C4A1F4; }
html.dark .tr-type.tt-loan { color: #fbbf24; }
html.dark .tr-type.tt-free { color: var(--primary); }
.tr-date { font-size: 12px; color: var(--text-3); font-weight: 700; direction: ltr; }

/* ---------- Player statistics by competition (tabbed) ---------- */
.stats-section { margin-top: 18px; }
.section-title { font-size: clamp(20px, 4vw, 26px); font-weight: 900; letter-spacing: -.4px; margin-bottom: 14px; }
.comp-switch { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; scrollbar-width: none; }
.comp-switch::-webkit-scrollbar { display: none; }
.cs-pill {
  display: inline-flex; align-items: center; gap: 9px; flex: none; cursor: pointer;
  padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 800; white-space: nowrap;
  color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); transition: all .18s;
}
.cs-pill:hover { color: var(--text-1); }
.cs-pill.active { color: #fff; background: var(--ink); border-color: transparent; box-shadow: var(--shadow-2); }
.cs-badge {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-size: 12px; font-weight: 900; background: var(--primary-soft); color: var(--primary-600);
}
.cs-pill.active .cs-badge { background: rgba(255,255,255,.16); color: #fff; }

.comp-panel { display: none; animation: fadeUp .35s ease; }
.comp-panel.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.pstat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 420px) { .pstat-grid { gap: 8px; } }
.pstat-card {
  border-radius: 18px; padding: 18px 10px 15px; text-align: center; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; overflow: hidden;
}
.pstat-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--tone, var(--primary)); opacity: .9; }
.pstat-ic { font-size: 22px; height: 30px; display: grid; place-items: center; }
.pstat-ic i.card-y, .pstat-ic i.card-r { width: 16px; height: 22px; border-radius: 3px; }
.pstat-val { font-size: 30px; font-weight: 900; line-height: 1; }
.pstat-label { font-size: 12px; font-weight: 700; color: var(--text-3); }
.tone-green  { --tone: var(--primary); }
.tone-red    { --tone: #ef4444; }
.tone-gold   { --tone: #f59e0b; }
.tone-blue   { --tone: var(--accent); }
.tone-yellow { --tone: #facc15; }
.tone-neutral{ --tone: #94a3b8; }

.pstat-donuts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
@media (max-width: 420px) { .pstat-donuts { grid-template-columns: repeat(2, 1fr); } }
.donut-card { border-radius: 18px; padding: 16px 10px; text-align: center; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; align-items: center; gap: 4px; }
.donut-viz { position: relative; width: 100px; height: 100px; }
.donut-viz svg { transform: rotate(-90deg); }
.donut-viz .rc-bg { fill: none; stroke: var(--surface-2); stroke-width: 9; }
.donut-viz .rc-fg { fill: none; stroke: var(--rc); stroke-width: 9; stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(.2,.7,.3,1); }
.donut-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 900; color: var(--text-2); }
.donut-val { font-size: 22px; font-weight: 900; color: var(--primary-600); }
html.dark .donut-val { color: var(--primary); }
.donut-label { font-size: 12px; font-weight: 700; color: var(--text-3); }
.tm-card { justify-content: center; }
.tm-card .tm-val { font-size: 34px; font-weight: 900; }

/* ---------- Match form comparison / H2H ---------- */
.form-compare { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-team { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 13.5px; min-width: 0; }
.form-team img { border-radius: 50%; background: var(--surface-2); }
.form-dots { display: flex; gap: 5px; direction: ltr; }
.h2h-strip { display: flex; justify-content: space-around; border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 2px; }
.h2h-cell { text-align: center; }
.h2h-cell b { display: block; font-size: 20px; font-weight: 900; color: var(--primary-600); }
html.dark .h2h-cell b { color: var(--primary); }
.h2h-cell small { color: var(--text-3); font-size: 11px; max-width: 90px; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Coach card ---------- */
.coach-card { display: flex; align-items: center; gap: 14px; }
.coach-card img { border-radius: 50%; background: var(--surface-2); }
.coach-card b { display: block; font-size: 15px; }
.coach-card small { color: var(--text-3); font-size: 12px; }

/* ---------- Team squad (grouped by line) ---------- */
.squad-group { margin-bottom: 14px; }
.squad-line { display: flex; align-items: center; gap: 9px; }
.squad-count { font-size: 12px; font-weight: 800; color: var(--text-3); background: var(--surface-2); border-radius: 999px; padding: 2px 10px; }
.squad-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.squad-player {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 16px 10px; border-radius: var(--radius-sm); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.sp-photo { position: relative; width: 52px; height: 52px; }
.sp-photo img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.sp-num {
  position: absolute; bottom: -3px; inset-inline-end: -4px; min-width: 20px; height: 20px; padding: 0 4px;
  border-radius: 7px; background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface);
}
.sp-name { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.sp-pos { color: var(--text-3); font-size: 11px; }

/* ---------- Article ---------- */
.article { max-width: 780px; padding-top: 20px; }
.article-head h1 { font-size: clamp(20px, 4vw, 30px); line-height: 1.45; }
.article-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-3); font-size: 13px; margin: 14px 0; }
.article-cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; box-shadow: var(--shadow-1); }
.article-cover img { width: 100%; height: auto; }
.article-body { font-size: 16px; line-height: 2; color: var(--text); }
.article-body p { margin-bottom: 14px; }
.article-body h2, .article-body h3 { margin: 22px 0 10px; }
.article-body a { color: var(--primary-600); text-decoration: underline; }
.article-partial { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2);
  border: 1px solid var(--line); font-size: 13.5px; }
.article-partial a { color: var(--primary-600); font-weight: 800; margin-inline-start: 6px; }
.prose p { margin-bottom: 12px; } .prose ul { padding-inline-start: 22px; } .prose h2 { font-size: 17px; margin: 18px 0 8px; }
.contact-line { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.contact-line a { color: var(--primary-600); }

/* ---------- Static / legal pages (privacy, terms, about, contact) ---------- */
.legal-page { max-width: 860px; }
.legal-card {
  border-radius: var(--radius-lg); padding: clamp(22px, 4.5vw, 40px);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.legal-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  color: var(--text-3); font-size: 12.5px; font-weight: 700; margin: 6px 0 18px;
}
.legal-meta svg { flex: none; }
.legal-intro {
  font-size: 15.5px; line-height: 1.9; color: var(--text);
  padding: 14px 18px; border-radius: var(--radius-sm);
  background: var(--primary-soft);
  border-inline-start: 4px solid var(--primary);
  margin-bottom: 22px;
}
.legal-body h2 {
  font-size: 17.5px; margin: 26px 0 10px; padding-inline-start: 12px;
  border-inline-start: 4px solid var(--primary); line-height: 1.5;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 15px; margin: 18px 0 8px; color: var(--text); }
.legal-body p { margin: 0 0 12px; line-height: 1.95; color: var(--text-2); }
.legal-body ul, .legal-body ol { margin: 0 0 14px; padding-inline-start: 1.4em; line-height: 1.9; color: var(--text-2); }
.legal-body li { margin: 5px 0; }
.legal-body li::marker { color: var(--primary); }
.legal-body a { color: var(--primary-700); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
html.dark .legal-body a { color: var(--primary); }
.legal-body strong { color: var(--text); }
.legal-note {
  margin-top: 22px; padding: 13px 16px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px dashed var(--line);
  color: var(--text-3); font-size: 13px; line-height: 1.8;
}

/* About page value grid */
.about-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin: 20px 0 6px; }
.about-tile {
  display: flex; flex-direction: column; gap: 8px; padding: 18px;
  border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line);
}
.about-tile svg { color: var(--primary-700); }
html.dark .about-tile svg { color: var(--primary); }
.about-tile b { font-size: 14.5px; }
.about-tile p { margin: 0; font-size: 13px; color: var(--text-3); line-height: 1.75; }

/* Contact channel cards */
.contact-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-top: 18px; }
.contact-card {
  display: flex; align-items: flex-start; gap: 14px; padding: 18px;
  border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line);
  transition: border-color .2s, transform .2s var(--ease-out), box-shadow .25s;
}
.contact-card:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.contact-ic {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center;
  border-radius: 13px; background: var(--primary-soft); color: var(--primary-700);
}
html.dark .contact-ic { color: var(--primary); }
.contact-card b { display: block; font-size: 14.5px; margin-bottom: 3px; }
.contact-card p { margin: 0; font-size: 12.5px; color: var(--text-3); line-height: 1.7; }
.contact-card a { color: var(--primary-700); font-weight: 800; font-size: 13.5px; word-break: break-all; }
html.dark .contact-card a { color: var(--primary); }

/* ---------- Search / forms ---------- */
.search-bar {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; border-radius: 999px;
  margin: 6px 0 26px; color: var(--text-3);
}
html[dir="rtl"] .search-bar { padding: 8px 18px 8px 8px; }
.search-bar input { flex: 1; border: 0; background: transparent; font-size: 15px; }
.search-bar input:focus { outline: none; }
.inline-search input {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 9px 18px; min-width: 220px; transition: border-color .25s;
}
.inline-search input:focus { outline: none; border-color: var(--primary); }
.page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 30px 0; }
.page-indicator { color: var(--text-3); font-weight: 700; font-size: 13.5px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: calc(90px + env(safe-area-inset-bottom)); inset-inline-start: 50%;
  transform: translateX(-50%) translateY(20px); z-index: 300;
  background: var(--ink); color: #fff; padding: 11px 22px; border-radius: 999px; font-weight: 700; font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: all .35s cubic-bezier(.2, .7, .3, 1.2);
  box-shadow: var(--shadow-2);
}
html[dir="rtl"] .toast { transform: translateX(50%) translateY(20px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
html[dir="rtl"] .toast.show { transform: translateX(50%) translateY(0); }
@media (min-width: 960px) { .toast { bottom: 30px; } }

/* ---------- Favorites page ---------- */
.fav-group { margin-bottom: 26px; }
.fav-group h2 { font-size: 17px; margin-bottom: 12px; }
.fav-items { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.fav-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); font-weight: 700; font-size: 14px;
}
.fav-item img { border-radius: 50%; width: 34px; height: 34px; background: var(--surface-2); }
.fav-item .fav-x { margin-inline-start: auto; color: var(--text-3); }
.fav-item .fav-x:hover { color: var(--live); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .3, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Skeleton shimmer (used by JS refreshes) ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 50%, var(--surface)) 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Score flash on live update ---------- */
@keyframes scoreflash { 0% { transform: scale(1); color: var(--primary); } 50% { transform: scale(1.35); color: var(--primary); } 100% { transform: scale(1); } }
.score-flash { animation: scoreflash .9s cubic-bezier(.2, .7, .3, 1.2); display: inline-block; }

/* ---------- Watch / video player ---------- */
.watch-page { padding: 18px 0 30px; }
.watch-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.wt-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text-2); }
.wt-back:hover { color: var(--primary-600); }
html[dir="rtl"] .wt-back svg { transform: scaleX(-1); }
.wt-teams { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.wt-teams span { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.wt-teams img { border-radius: 50%; }
.wt-score { font-weight: 900; font-size: 17px; display: inline-flex; align-items: center; gap: 5px; font-style: normal; } .wt-vs { color: var(--text-3); }

.player-shell { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-2); }
/* The overlay classes below set display:flex, which would override the UA
   [hidden] rule — force hidden to win so JS toggling actually works. */
.player-shell [hidden] { display: none !important; }
.pl-stage { position: relative; aspect-ratio: 16/9; background: #000; }
.pl-video { width: 100%; height: 100%; object-fit: contain; background: #000; }

.pl-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.pl-spinner { width: 54px; height: 54px; border-radius: 50%; border: 4px solid rgba(255,255,255,.2); border-top-color: var(--primary); animation: spin 1s linear infinite; }
.pl-error { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(0,0,0,.7); color: #fff; text-align: center; padding: 20px; }
.pl-error p { max-width: 340px; }

.pl-controls { position: absolute; inset: 0; }
.pl-big-play { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%;
  background: rgba(22,199,132,.92); color: #ffffff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: transform .2s; }
.pl-big-play:hover { transform: scale(1.08); }
html[dir="rtl"] .pl-big-play svg { transform: scaleX(-1); }

.pl-bar {
  position: absolute; inset-inline: 0; bottom: 0; display: flex; align-items: center; gap: 8px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(0,0,0,.72), transparent);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  transition: opacity .3s, transform .3s; color: #fff;
}
.idle .pl-bar { opacity: 0; transform: translateY(8px); pointer-events: none; }
.idle { cursor: none; }
.pl-btn { color: #fff; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; transition: background .2s; }
.pl-btn:hover { background: rgba(255,255,255,.16); }
.pl-txt { width: auto; padding: 0 10px; font-weight: 800; font-size: 13px; }
.pl-spacer { flex: 1; }
.pl-vol { display: flex; align-items: center; gap: 4px; }
.pl-volbar { width: 0; opacity: 0; transition: width .25s, opacity .25s; accent-color: var(--primary); cursor: pointer; }
.pl-vol:hover .pl-volbar { width: 74px; opacity: 1; }
.pl-live { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 12px; color: #fff; }
.pl-live .live-dot { background: var(--live); }
.pl-time { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pl-menu { position: relative; }
.pl-menu-list {
  position: absolute; bottom: 44px; inset-inline-end: 0; min-width: 96px; display: none; flex-direction: column;
  background: rgba(27, 7, 97,.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 6px; box-shadow: var(--shadow-2);
}
.pl-menu.open .pl-menu-list { display: flex; }
.pl-menu-list button { color: #cdd6e4; font-weight: 700; font-size: 13px; padding: 7px 12px; border-radius: 8px; text-align: start; }
.pl-menu-list button:hover { background: rgba(255,255,255,.1); color: #fff; }
.pl-menu-list button.on { color: var(--primary); }

.pl-servers { display: flex; align-items: center; gap: 8px; padding: 12px 14px; overflow-x: auto; scrollbar-width: none; background: var(--surface); border-top: 1px solid var(--line); }
.pl-servers::-webkit-scrollbar { display: none; }
.pls-label { font-size: 12px; font-weight: 800; color: var(--text-3); white-space: nowrap; }
.pls-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px; font-weight: 700; font-size: 13px;
  background: var(--surface-2); color: var(--text-2); white-space: nowrap; transition: all .2s; flex-shrink: 0; }
.pls-btn:hover { color: var(--text); }
.pls-btn.on { background: var(--primary); color: #ffffff; box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 40%, transparent); }
.pls-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .7; }
.pls-btn.on .pls-dot { background: #ffffff; animation: blink 2s infinite; }
.watch-note { text-align: center; color: var(--text-3); font-size: 12.5px; margin-top: 14px; }

/* Watch Now button on the match hero */
.watch-cta {
  display: inline-flex; align-items: center; gap: 9px; margin: 6px auto 0; padding: 12px 26px;
  border-radius: 999px; font-weight: 900; font-size: 15px; color: #fff;
  background: linear-gradient(120deg, #ef4444, #f97316);
  box-shadow: 0 10px 26px rgba(239,68,68,.4); transition: transform .2s, box-shadow .2s;
}
.watch-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(239,68,68,.5); }
.watch-cta .live-dot { background: #fff; }

/* ---------- Print ---------- */
@media print { .site-header, .bottom-nav, .site-footer, .hero-cta, .fav-btn { display: none !important; } }

/* ==== Yacine channel servers grid (decrypt → pick server → play) ==== */
.yac-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px;margin-bottom:24px}
.yac-card{display:flex;align-items:center;gap:14px;padding:16px 18px;border-radius:16px;text-decoration:none;color:inherit}
.yac-num{flex:0 0 auto;width:40px;height:40px;border-radius:12px;display:grid;place-items:center;font-weight:800;font-size:17px;color:#fff;background:linear-gradient(135deg,var(--brand,#16C784),var(--brand-accent,#22D3EE))}
.yac-body{flex:1;display:flex;flex-direction:column;gap:7px;min-width:0}
.yac-body b{font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.yac-tags{display:flex;gap:6px;flex-wrap:wrap}
.yac-tag{font-size:11px;font-weight:700;padding:3px 9px;border-radius:20px;border:1px solid rgba(128,128,128,.3);opacity:.9}
.yac-tag.hls{color:#16C784;border-color:rgba(22,199,132,.45)}
.yac-tag.dash{color:#22D3EE;border-color:rgba(34,211,238,.45)}
.yac-tag.drm{color:#f0a020;border-color:rgba(240,160,32,.45)}
.yac-play{flex:0 0 auto;opacity:.7}
.yac-card:hover .yac-play{opacity:1}
.yac-empty{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;padding:40px 20px;border-radius:16px;color:var(--muted,#64748b)}

/* ==== Player aspect-ratio modes (switchable live, remembered) ==== */
.pl-video.ar-fit     { object-fit: contain; }  /* whole picture, letterboxed */
.pl-video.ar-stretch { object-fit: fill; }     /* stretch to fill the frame  */
.pl-video.ar-zoom    { object-fit: cover; }     /* crop edges, fill the frame */
.pl-arhint{position:absolute;top:14px;left:50%;transform:translateX(-50%);background:rgba(0,0,0,.72);color:#fff;padding:6px 15px;border-radius:20px;font-size:13px;font-weight:700;z-index:8;pointer-events:none;white-space:nowrap}

/* ============================================================
   Match center v2 — FIFA rank chips, penalty-shootout UI,
   injury chips, highlight-provider labels. Mobile-first, RTL-safe
   (logical properties), respects prefers-reduced-motion globally.
   ============================================================ */

/* FIFA world-ranking chip under each hero team name */
.mh-rank {
  font-size: 10.5px; font-weight: 800; letter-spacing: .02em; direction: ltr;
  color: var(--text-3); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px;
  box-shadow: var(--shadow-1);
}

/* Aggregate note under the hero score */
.mh-agg { font-weight: 800; }
.agg-pair { display: inline-flex; gap: 3px; }

/* ---------- Penalty shootout (Sofascore-style takers board) ---------- */
.pen-shootout .card-title { justify-content: space-between; }
.ps-final {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 900;
  color: var(--primary-700); background: var(--primary-soft);
  padding: 3px 13px; border-radius: 999px;
}
.ps-final i { font-style: normal; font-weight: 400; opacity: .6; }
html.dark .ps-final { color: var(--primary); }

.ps-team { padding: 12px 0 6px; }
.ps-team + .ps-team { border-top: 1px dashed var(--line); }
.ps-team-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.ps-team-head img { border-radius: 50%; background: var(--surface-2); flex: none; }
.ps-team-head b { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-count {
  margin-inline-start: auto; font-size: 12.5px; font-weight: 900; direction: ltr;
  color: var(--text-2); background: var(--surface-2); padding: 2px 11px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.ps-winner .ps-count { color: var(--primary-700); background: var(--primary-soft); }
html.dark .ps-winner .ps-count { color: var(--primary); }

.ps-attempts {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 12px 14px;
}
.ps-chip {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  width: 62px; text-align: center;
}
.ps-photo { position: relative; width: 40px; height: 40px; }
.ps-photo > img {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  background: var(--surface-2); border: 2px solid var(--line);
}
.is-scored .ps-photo > img { border-color: color-mix(in srgb, var(--win) 65%, transparent); }
.is-missed .ps-photo > img { border-color: color-mix(in srgb, var(--lose) 60%, transparent); filter: grayscale(.55); }
.ps-badge {
  position: absolute; bottom: -3px; inset-inline-end: -3px;
  width: 17px; height: 17px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  border: 2px solid var(--surface); box-shadow: var(--shadow-1);
}
.is-scored .ps-badge { background: var(--win); }
.is-missed .ps-badge { background: var(--lose); }
.ps-order {
  position: absolute; top: -5px; inset-inline-start: -5px;
  min-width: 15px; height: 15px; padding: 0 3px; border-radius: 6px;
  background: var(--ink); color: #fff; font-style: normal;
  font-size: 9px; font-weight: 900; display: grid; place-items: center;
  border: 1.5px solid var(--surface);
}
.ps-name {
  font-size: 10.5px; font-weight: 700; color: var(--text-2); line-height: 1.3;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.is-missed .ps-name { color: var(--text-3); }
@media (min-width: 560px) {
  .ps-chip { width: 70px; }
  .ps-photo, .ps-photo > img { width: 44px; height: 44px; }
}

/* ---------- Timeline injury chip (substitution reason) ---------- */
.tl-chip {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
}
.tl-injury { color: #b45309; background: color-mix(in srgb, #f59e0b 16%, transparent); }
html.dark .tl-injury { color: #fbbf24; }
.tl-event.side-away .tl-chip { margin-inline-end: 0; }

/* ---------- Highlight link provider tag ---------- */
.video-link { position: relative; }
.vl-provider {
  margin-inline-start: auto; flex: none;
  font-size: 11px; font-weight: 800; letter-spacing: .02em;
  color: var(--text-3); background: var(--surface-2);
  padding: 3px 10px; border-radius: 999px;
}
.video-link:hover .vl-provider { color: var(--primary-700); background: var(--primary-soft); }
html.dark .video-link:hover .vl-provider { color: var(--primary); }

/* ---------- Videos tab (match highlights grid) ---------- */
.videos-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.vcard {
  display: flex; flex-direction: column; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  overflow: hidden; box-shadow: var(--shadow-1);
}
.vc-thumb {
  position: relative; aspect-ratio: 16/9; display: block;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 22%, var(--ink)), var(--ink) 75%);
  overflow: hidden;
}
.vc-thumb > img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out); }
.vcard:hover .vc-thumb > img { transform: scale(1.05); }
.vc-thumb-ph {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: .9;
}
.vc-thumb-ph img { width: 46px; height: 46px; }
.vc-play {
  position: absolute; inset: 0; margin: auto; width: 46px; height: 46px;
  display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 92%, #fff);
  color: #ffffff; box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  transition: transform .2s var(--ease-spring);
}
html[dir="rtl"] .vc-play svg { transform: scaleX(-1); }
.vcard:hover .vc-play { transform: scale(1.1); }
.vc-provider {
  position: absolute; top: 8px; inset-inline-end: 8px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .02em; color: #fff;
  background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: 3px 10px; border-radius: 999px;
}
.vc-body { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 13px; }
.vc-body b { font-size: 13.5px; }
.vc-body small { color: var(--text-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.show-more-wrap { display: flex; justify-content: center; padding-top: 16px; }
.show-more-wrap .btn svg { transition: transform .2s; }
.show-more-wrap .btn:hover svg { transform: translateY(2px); }
.card-title .view-all { margin-inline-start: auto; font-size: 12.5px; }
.vc-thumb > img { position: relative; z-index: 1; }

/* ============================================================
   Videos section — list, cards, watch page, notify bottom sheet
   Mobile-first, RTL-safe, dark-mode aware, glassmorphism.
   ============================================================ */

/* Search bar on the videos page */
.videos-search { margin: 4px 0 14px; }
.videos-tabs { margin: 0 0 20px; }

/* Card title + meta (extends the base .vcard/.vc-thumb from the match tab) */
.vc-title {
  font-size: 14px; font-weight: 800; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 7px; }
.vc-champ {
  font-size: 11px; font-weight: 800; color: var(--primary-700);
  background: var(--primary-soft); padding: 3px 10px; border-radius: 999px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
html.dark .vc-champ { color: var(--primary); }
.vc-date { font-size: 11px; color: var(--text-3); font-weight: 700; }
.vc-img { position: relative; z-index: 1; }

/* Numbered pagination (videos — News-style) */
.page-numbers { display: inline-flex; align-items: center; gap: 6px; }
.page-num {
  min-width: 36px; height: 36px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; font-weight: 800; font-size: 13.5px;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--line);
  transition: border-color .2s, color .2s;
  font-variant-numeric: tabular-nums;
}
.page-num:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); color: var(--primary-700); }
html.dark .page-num:hover { color: var(--primary); }
.page-num.is-current {
  color: #ffffff; border-color: transparent;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 72%, var(--accent)));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 16px color-mix(in srgb, var(--primary) 35%, transparent);
}

/* ---------- In-site video watch page ---------- */
.video-page { padding: 16px 0 30px; }
.video-page .wt-back { margin-bottom: 14px; }
.vp-stage {
  position: relative; aspect-ratio: 16/9; width: 100%;
  border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 24%, var(--ink)), var(--ink) 75%);
  box-shadow: var(--shadow-2);
}
.vp-poster {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  padding: 0; border: 0; cursor: pointer; background: transparent;
}
.vp-poster > img { width: 100%; height: 100%; object-fit: cover; }
.vp-big-play {
  position: absolute; inset: 0; margin: auto; width: 76px; height: 76px;
  display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 92%, #fff); color: #ffffff;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .45); transition: transform .2s var(--ease-spring);
}
html[dir="rtl"] .vp-big-play svg { transform: scaleX(-1); }
.vp-poster:hover .vp-big-play { transform: scale(1.09); }
.vp-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.vp-info { margin-top: 16px; }
.vp-title { font-size: clamp(17px, 3.5vw, 22px); font-weight: 900; line-height: 1.5; }
.vp-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.vp-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700;
  color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line);
  padding: 6px 13px; border-radius: 999px;
}
.vp-champ { color: var(--primary-700); background: var(--primary-soft); border-color: transparent; }
html.dark .vp-champ { color: var(--primary); }
.vp-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.vp-act { padding: 10px 18px; font-size: 13.5px; }
.vp-related { margin-top: 26px; }

/* ---------- Notification bottom sheet (Android 16 / iOS 26) ---------- */
.sheet { position: fixed; inset: 0; z-index: 400; }
.sheet[hidden] { display: none; }
.sheet-scrim {
  position: absolute; inset: 0; background: rgba(6, 12, 24, .55);
  opacity: 0; transition: opacity .32s var(--ease-out);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.sheet.open .sheet-scrim { opacity: 1; }
.sheet-panel {
  position: absolute; inset-inline: 0; bottom: 0;
  max-height: 88dvh; display: flex; flex-direction: column;
  border-radius: 28px 28px 0 0; padding: 8px 18px calc(18px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .35);
  transform: translateY(100%); transition: transform .38s var(--ease-out);
  margin-inline: auto; max-width: 560px;
}
.sheet.open .sheet-panel { transform: translateY(0); }
.sheet-grip {
  width: 44px; height: 5px; border-radius: 999px; background: var(--text-3);
  opacity: .35; margin: 6px auto 12px; cursor: grab;
}
.sheet-head { display: flex; align-items: flex-start; gap: 13px; padding-bottom: 12px; }
.sheet-ic {
  width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 15px;
  background: var(--primary-soft); color: var(--primary-700);
}
html.dark .sheet-ic { color: var(--primary); }
.sheet-title { font-size: 19px; font-weight: 900; }
.sheet-sub { font-size: 13px; color: var(--text-3); margin-top: 3px; line-height: 1.6; }
.sheet-x {
  margin-inline-start: auto; width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border-radius: 10px; color: var(--text-3); background: var(--surface-2);
}
.sheet-x:hover { color: var(--text); }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; margin: 2px -4px; padding: 2px 4px; }

.topic-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 15px; margin-bottom: 8px;
  border-radius: 15px; background: var(--surface-2); border: 1px solid var(--line);
  cursor: pointer; transition: border-color .2s, background .2s;
}
.topic-row:hover { border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); }
.topic-all { background: var(--primary-soft); border-color: transparent; margin-bottom: 12px; }
.topic-name { font-size: 14.5px; font-weight: 700; flex: 1; min-width: 0; }
.topic-all .topic-name { font-weight: 800; }

/* iOS/Android style switch */
.switch { position: relative; flex: none; width: 46px; height: 28px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch-track {
  position: absolute; inset: 0; border-radius: 999px; background: color-mix(in srgb, var(--text-3) 45%, transparent);
  transition: background .25s var(--ease-out);
}
.switch-track::after {
  content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
  transition: transform .25s var(--ease-spring);
}
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
html[dir="rtl"] .switch input:checked + .switch-track::after { transform: translateX(-18px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--primary); outline-offset: 2px; }

.sheet-foot { padding-top: 14px; }
.sheet-save { width: 100%; justify-content: center; position: relative; }
.sheet-save .sv-spin {
  width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #ffffff; animation: spin 1s linear infinite; display: none;
}
.sheet-save.is-loading .sv-label { visibility: hidden; }
.sheet-save.is-loading .sv-spin { display: block; position: absolute; inset: 0; margin: auto; }

/* ---------- Telegram follow (footer) ---------- */
.tg-follow {
  display: inline-flex; align-items: center; gap: 12px; padding: 11px 18px 11px 14px;
  border-radius: 16px; background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12); transition: transform .2s var(--ease-out), background .2s;
}
.tg-follow:hover { transform: translateY(-2px); background: rgba(41, 171, 226, .16); }
.tg-ic {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 13px;
  background: linear-gradient(135deg, #2AABEE, #229ED9); color: #fff;
  box-shadow: 0 8px 20px rgba(42, 171, 226, .4);
}
.tg-txt { display: flex; flex-direction: column; line-height: 1.3; }
.tg-txt b { color: #fff; font-size: 15px; }
.tg-txt small { color: #8fa1b8; font-size: 12.5px; direction: ltr; }

/* ---------- Update-available bar (new release prompt) ---------- */
.update-bar {
  position: fixed; z-index: 500; inset-inline: 12px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between;
  padding: 12px 16px; border-radius: 18px; margin-inline: auto; max-width: 560px;
  background: var(--glass); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  border: 1px solid var(--line); box-shadow: var(--shadow-2);
  transform: translateY(160%); opacity: 0; transition: transform .4s var(--ease-out), opacity .4s;
}
.update-bar.show { transform: translateY(0); opacity: 1; }
@media (min-width: 960px) { .update-bar { bottom: 20px; } }
.ub-txt { font-weight: 800; font-size: 14px; flex: 1; min-width: 160px; }
.ub-actions { display: flex; gap: 8px; }
.ub-btn { padding: 8px 16px; border-radius: 999px; font-weight: 800; font-size: 13px; transition: transform .15s, background .2s, color .2s; }
.ub-btn:active { transform: scale(.95); }
.ub-now { background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 65%, var(--accent))); color: #ffffff; }
.ub-later { background: var(--surface-2); color: var(--text-2); }
.ub-later:hover { color: var(--text); }
/* Update bar — loading state ("جاري تحديث الموقع...") */
.update-bar .ub-txt { display: inline-flex; align-items: center; gap: 10px; }
.ub-spin {
  width: 17px; height: 17px; flex: none; border-radius: 50%;
  border: 2.5px solid color-mix(in srgb, var(--primary) 30%, transparent);
  border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}
.update-bar.is-updating { justify-content: center; }

/* ---------- Video player: X embed + blocked-embed fallback ---------- */
.vp-stage.vp-x {
  aspect-ratio: auto; height: clamp(420px, 90vw, 620px);
  background: var(--surface); display: flex; align-items: stretch;
}
.vp-x-frame { background: #fff; }
html.dark .vp-x-frame { background: var(--surface); }
.vp-blocked { position: absolute; inset: 0; }
.vp-blocked-bg {
  width: 100%; height: 100%; object-fit: cover; filter: blur(6px) brightness(.45);
}
.vp-blocked-note {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; text-align: center;
  padding: 22px; color: #fff;
}
.vp-blocked-note p { max-width: 480px; font-weight: 700; font-size: 14.5px; line-height: 1.8; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.vp-blocked-note .btn { margin: 0; }
.vp-static-note { pointer-events: auto; }
.vp-static-note p { color: #fff; }

/* ---------- Layout safety ---------- */
/* EN home overflowed 25px: the Subscribe button pushed .nl-form past the
   viewport (longer Latin label). Let the input shrink and the form wrap. */
.nl-form input { min-width: 0; }
.nl-form { flex-wrap: wrap; }
/* Never allow any future stray element to open a horizontal gap. */
body { overflow-x: clip; }
/* [hidden] must always win — .empty-state{display:flex} was overriding the UA
   rule and showing "no results" blocks that were meant to be hidden. */
[hidden] { display: none !important; }

/* Videos search form (server-side) + SEO copy block */
.videos-search .vs-go { margin: 0; padding: 9px 20px; font-size: 13px; flex: none; }
.videos-search input { min-width: 0; }
.videos-search-note { color: var(--text-3); font-size: 13px; font-weight: 700; margin: -8px 0 14px; }
.videos-search-note a { color: var(--primary-700); text-decoration: underline; text-underline-offset: 3px; }
html.dark .videos-search-note a { color: var(--primary); }
.videos-seo { margin-top: 26px; }
.videos-seo h2 { font-size: 17px; margin-bottom: 10px; }
.videos-seo p { color: var(--text-2); font-size: 13.5px; line-height: 1.95; margin: 0 0 10px; }
.videos-seo p:last-child { margin-bottom: 0; }

/* Notification sheet v2 — league logos + two-step (enable → manage) */
.topic-logo {
  width: 28px; height: 28px; border-radius: 8px; object-fit: contain;
  background: var(--surface-2, rgba(127,127,127,.08)); padding: 2px; flex: none;
}
.push-pitch p {
  color: var(--text-2); font-size: 14px; line-height: 2; font-weight: 600;
  margin: 4px 2px 6px;
}
.push-status {
  display: flex; align-items: center; gap: 8px;
  color: var(--primary-700); background: var(--primary-soft);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 12px;
  font-size: 13px; font-weight: 800;
}
html.dark .push-status { color: var(--primary); }
.push-status svg { flex: none; }

/* Sheet scroll fix — the two-step wrappers must pass the panel's height
   constraint (max-height: 88dvh) down to .sheet-body, otherwise the league
   list has no bounded height and cannot scroll. */
#notify-sheet [data-push-step] {
  display: flex; flex-direction: column; min-height: 0; flex: 0 1 auto;
}
#notify-sheet [data-push-step] .sheet-body {
  flex: 1 1 auto; min-height: 0; overscroll-behavior: contain;
}

/* Footer copyright backlink — same tone as the surrounding text */
.rights-link { color: inherit; font-weight: 800; text-decoration: none; }
.rights-link:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   ALOKA Live — brand layer (navy header/footer) + Cinema module
   Header, footer and bottom-nav carry the brand navy (#070022)
   in BOTH themes; interactive accents use the brand blue.
   ============================================================ */

/* ---------- Brand navy header (both themes) ---------- */
.site-header.glass {
  background: rgba(27, 7, 97, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.site-header .nav-link { color: #a8b7cc; }
.site-header .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.site-header .nav-link.active,
html.dark .site-header .nav-link.active { color: #fff; background: rgba(124, 77, 255, .22); }
.site-header .icon-btn { color: #cbd6e5; }
.site-header .icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.site-header .lang-switch { color: #cbd6e5; border-color: rgba(255, 255, 255, .16); }
.site-header .lang-switch:hover { color: #fff; border-color: rgba(255, 255, 255, .34); }
.site-header::after {
  background: linear-gradient(90deg, transparent, rgba(124, 77, 255, .8) 30%, rgba(56, 189, 248, .8) 70%, transparent);
  opacity: .8;
}

/* Footer: brand navy in both themes */
.site-footer { background: #070022; }
html.dark .site-footer { background: #0B0134; }
.site-footer::before {
  background: linear-gradient(90deg, transparent, #3905BB 35%, #680CF2 65%, transparent);
}

/* Bottom nav: navy glass in both themes */
.bottom-nav.glass {
  background: rgba(27, 7, 97, .93);
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.bottom-nav .bn-item { color: #8fa1b8; }
.bottom-nav .bn-item.active,
html.dark .bottom-nav .bn-item.active { color: #680CF2; background: rgba(124, 77, 255, .16); }

/* Dark mode: primary buttons/lines lean on the accent blue for contrast */
html.dark .btn-primary {
  background: linear-gradient(135deg, #26048A, #680CF2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 22px rgba(76, 14, 205, .35);
}
html.dark .nav-link.active::after,
html.dark .section-head h2::before { background: var(--accent); }

/* ---------- Generic chips (genres / seasons / sources) ---------- */
.genre-chips, .season-chips, .episode-chips { display: flex; gap: 8px; padding: 4px 2px 10px; }
a.chip, button.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 999px; flex: 0 0 auto;
  background: var(--surface); border: 1.5px solid var(--line);
  color: var(--text-2); font-weight: 700; font-size: 13px;
  cursor: pointer; transition: all .2s var(--ease-out);
  box-shadow: none;
}
a.chip:hover, button.chip:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  color: var(--text); transform: translateY(-1px);
}
a.chip.active, button.chip.active {
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 60%, var(--accent)));
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent);
}
html.dark a.chip.active, html.dark button.chip.active {
  background: linear-gradient(135deg, #26048A, #680CF2);
}
.chip-sm { padding: 6px 13px; font-size: 12.5px; }

/* ---------- Poster cards ---------- */
.poster-rail { gap: 14px; padding-bottom: 8px; }
.poster-card {
  display: flex; flex-direction: column; gap: 8px;
  width: 152px; flex: 0 0 auto;
}
.poster-grid {
  display: grid; gap: 16px 14px; margin-top: 16px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.poster-grid .poster-card { width: auto; }
.poster-thumb {
  position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius-sm);
  overflow: hidden; background: var(--surface-2);
  box-shadow: var(--shadow-1);
}
.poster-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .35s var(--ease-out);
}
.poster-card:hover .poster-thumb img { transform: scale(1.06); }
.poster-rating {
  position: absolute; top: 8px; inset-inline-start: 8px;
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(27, 7, 97, .82); color: #fbbf24;
  font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.poster-type {
  position: absolute; top: 8px; inset-inline-end: 8px;
  background: rgba(124, 77, 255, .88); color: #fff;
  font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px;
}
.poster-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; background: linear-gradient(to top, rgba(27, 7, 97, .65), rgba(27, 7, 97, .15));
  opacity: 0; transition: opacity .25s ease;
}
.poster-card:hover .poster-play { opacity: 1; }
.poster-play svg {
  background: rgba(104, 12, 242, .92); border-radius: 50%;
  padding: 12px; width: 48px; height: 48px;
  box-shadow: 0 10px 26px rgba(27, 7, 97, .45);
}
.poster-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.poster-title {
  font-size: 13.5px; font-weight: 800; color: var(--text);
  line-height: 1.45; overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.poster-year { font-size: 12px; color: var(--text-3); font-weight: 600; }

/* Skeletons for the poster grid (SSR fallback while cache is cold) */
.skeleton-grid {
  display: grid; gap: 16px 14px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.skeleton-poster { aspect-ratio: 2 / 3; border-radius: var(--radius-sm); }

/* ---------- Cinema hero (hubs) ---------- */
.cinema-hero { position: relative; min-height: clamp(340px, 52vw, 480px); overflow: hidden; }
.ch-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.ch-slide.active { opacity: 1; pointer-events: auto; position: relative; }
.ch-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ch-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--bg) 2%, transparent 55%),
    linear-gradient(to inline-end, rgba(27, 7, 97, .88) 10%, rgba(27, 7, 97, .35) 60%, transparent);
}
html[dir="rtl"] .ch-overlay {
  background:
    linear-gradient(to top, var(--bg) 2%, transparent 55%),
    linear-gradient(270deg, rgba(27, 7, 97, .88) 10%, rgba(27, 7, 97, .35) 60%, transparent);
}
html[dir="ltr"] .ch-overlay {
  background:
    linear-gradient(to top, var(--bg) 2%, transparent 55%),
    linear-gradient(90deg, rgba(27, 7, 97, .88) 10%, rgba(27, 7, 97, .35) 60%, transparent);
}
.ch-content {
  position: relative; z-index: 2; display: flex; flex-direction: column;
  justify-content: flex-end; gap: 10px;
  min-height: clamp(340px, 52vw, 480px); padding-top: 40px; padding-bottom: 46px;
  color: #fff; max-width: none;
}
.ch-eyebrow { font-size: 13px; font-weight: 800; color: #C4A1F4; letter-spacing: .4px; margin: 0; }
.ch-badge {
  align-self: flex-start; background: rgba(124, 77, 255, .9); color: #fff;
  font-size: 11.5px; font-weight: 800; padding: 4px 12px; border-radius: 999px;
}
.ch-title { font-size: clamp(24px, 5vw, 40px); font-weight: 900; line-height: 1.25; max-width: 640px; }
.ch-meta { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 14px; color: #cbd6e5; }
.ch-rating { display: inline-flex; align-items: center; gap: 5px; color: #fbbf24; }
.ch-overview { max-width: 560px; color: #cbd6e5; line-height: 1.8; font-size: 14.5px; }
.ch-actions { display: flex; gap: 10px; margin-top: 6px; }
.ch-dots {
  position: absolute; z-index: 3; bottom: 14px; inset-inline: 0;
  display: flex; justify-content: center; gap: 8px;
}
.ch-dot {
  width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0;
  background: rgba(255, 255, 255, .35); cursor: pointer; transition: all .25s;
}
.ch-dot.active { width: 22px; background: #3905BB; }

/* ---------- Cinema toolbar (search + genre chips on hubs) ---------- */
.cinema-toolbar { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.cinema-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 6px 8px 6px 18px; max-width: 560px;
  box-shadow: var(--shadow-1); color: var(--text-3);
}
html[dir="rtl"] .cinema-search { padding: 6px 18px 6px 8px; }
.cinema-search input {
  flex: 1; border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 14.5px; min-width: 0; padding: 8px 0;
}
.cinema-search input:focus { outline: none; }
.cinema-search:focus-within { border-color: var(--accent); }
.cinema-search-page { margin-bottom: 22px; }
.search-cross-link { margin: 12px 0 0; }

/* ---------- Cinema detail pages ---------- */
.cd-hero { position: relative; overflow: hidden; }
.cd-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cd-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 4%, rgba(27, 7, 97, .78) 60%, rgba(27, 7, 97, .55));
}
.cd-head {
  position: relative; z-index: 2; display: flex; gap: clamp(16px, 3.5vw, 34px);
  padding-top: clamp(28px, 6vw, 60px); padding-bottom: clamp(22px, 4vw, 40px);
  color: #fff; align-items: flex-end;
}
.cd-poster {
  flex: 0 0 clamp(120px, 22vw, 220px);
  border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: 0 18px 50px rgba(2, 6, 23, .6);
}
.cd-poster img { width: 100%; height: auto; display: block; }
.cd-info { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding-bottom: 4px; }
.cd-title { font-size: clamp(22px, 4.4vw, 36px); font-weight: 900; line-height: 1.3; }
.cd-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255, 255, 255, .12); color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.badge-rating { color: #fbbf24; }
a.badge-link:hover { background: rgba(124, 77, 255, .35); color: #fff; }
.cd-overview {
  max-width: 640px; color: #cbd6e5; line-height: 1.85; font-size: 14.5px;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.cd-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .cd-head { flex-direction: column; align-items: flex-start; }
  .cd-poster { flex-basis: auto; width: 132px; }
}

/* ---------- In-page player ---------- */
.player-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius);
  overflow: hidden; background: #0B0134; box-shadow: var(--shadow-2);
}
.player-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; padding: 0; cursor: pointer; background: #0B0134;
  display: grid; place-items: center;
}
.player-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.pp-btn {
  position: relative; z-index: 2; display: grid; place-items: center;
  width: 84px; height: 84px; border-radius: 50%; color: #fff;
  background: linear-gradient(135deg, #26048A, #680CF2);
  box-shadow: 0 14px 40px rgba(104, 12, 242, .42);
  transition: transform .25s var(--ease-spring);
}
.player-poster:hover .pp-btn { transform: scale(1.08); }
.player-sources {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px;
  color: var(--text-3); font-size: 13px; font-weight: 700;
}
.player-hint { color: var(--text-3); font-weight: 500; }
.season-chips { margin-bottom: 6px; }
.episode-chips { margin-bottom: 14px; }
.episode-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:14px; margin:6px 0 18px; }
.episode-card { min-width:0; overflow:hidden; border-radius:var(--radius-sm); background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-1); transition:.22s var(--ease-out); }
.episode-card:hover,.episode-card.active { transform:translateY(-2px); border-color:rgba(124, 77, 255,.48); box-shadow:var(--shadow-2); }
.episode-card.active { box-shadow:0 0 0 2px rgba(124, 77, 255,.18),var(--shadow-2); }
.episode-thumb { position:relative; display:block; aspect-ratio:16/9; overflow:hidden; background:var(--surface-2); }
.episode-thumb img { width:100%; height:100%; object-fit:cover; transition:transform .35s; }
.episode-card:hover .episode-thumb img { transform:scale(1.04); }
.episode-play { position:absolute; inset:0; display:grid; place-items:center; color:#fff; background:linear-gradient(to top,rgba(2,6,23,.55),transparent 65%); }
.episode-play svg { width:42px; height:42px; padding:10px; border-radius:50%; background:linear-gradient(135deg,#26048A,#680CF2); box-shadow:0 8px 24px rgba(104,12,242,.38); }
.episode-number { position:absolute; bottom:8px; inset-inline-start:8px; color:#fff; background:rgba(2,6,23,.76); padding:3px 8px; border-radius:8px; font-size:10.5px; font-weight:900; backdrop-filter:blur(5px); }
.episode-watched { display:none; position:absolute; top:8px; inset-inline-end:8px; width:25px; height:25px; border-radius:50%; place-items:center; background:#22c55e; color:#fff; font-weight:900; }
.episode-card.is-watched .episode-watched { display:grid; }
.episode-info { min-width:0; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:11px 12px 13px; }
.episode-info b { min-width:0; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.episode-info small { flex:none; color:var(--text-3); font-size:10.5px; }
@media (max-width:560px) { .episode-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; } .episode-info { padding:9px; } .episode-info b { font-size:11.5px; } .episode-info small { display:none; } }

/* ---------- Cast rail ---------- */
.cast-rail { gap: 14px; }
.cast-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 108px; flex: 0 0 auto; text-align: center;
}
.cast-card img {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  background: var(--surface-2); box-shadow: var(--shadow-1);
}
.cast-card b { font-size: 12.5px; color: var(--text); line-height: 1.4; }
.cast-card small { font-size: 11.5px; color: var(--text-3); line-height: 1.4; }

/* ---------- Pager ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 28px; }
.pager-info { color: var(--text-3); font-weight: 700; font-size: 13.5px; }

/* ---------- Page title on listing pages ---------- */
.page-title { font-size: clamp(20px, 3.6vw, 28px); font-weight: 900; }

/* ============================================================
   App-like experience layer (2026)
   PJAX transitions, progress bar, favorites, contrast (WCAG),
   image fallback, touch optimizations.
   ============================================================ */

/* ---------- Dark-mode contrast (WCAG AA on #070022/#120250) ---------- */
html.dark {
  --text-2: #b7c3d6;   /* was a8b7cc — 4.5:1+ on surface */
  --text-3: #8b9bb2;   /* was 708196 — legible secondary */
}
html.dark .poster-year,
html.dark .news-time,
html.dark .cast-card small,
html.dark .pager-info,
html.dark .player-hint { color: #93a3ba; }
.site-footer nav a { color: #a5b3c8; }
.footer-brand p { color: #a5b3c8; }
.site-header .nav-link { color: #b7c3d6; }
.bottom-nav .bn-item { color: #9daebf; }
html.dark .empty-note, .empty-note { color: var(--text-2); }
html.dark .ch-overview, html.dark .cd-overview { color: #d3dce8; }
.ch-meta { color: #d3dce8; }
html.dark .badge { color: #e8eef6; }

/* ---------- Image loading + broken-image fallback ----------
   Every image box shows the site mark while a slow image is still loading.
   app.js removes this background as soon as the real image has decoded. */
img:not(.image-ready):not(.img-fallback) {
  background-color: var(--surface-2);
  background-image: url("/assets/brand/icon.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: min(34%, 76px) auto;
}
img.img-fallback {
  object-fit: contain !important;
  padding: 18%;
  background: var(--surface-2);
  opacity: .9;
}

/* ---------- PJAX: top progress bar + content transitions ---------- */
@keyframes qbar { 0% { inline-size: 0; opacity: 1; } 70% { inline-size: 68%; } 100% { inline-size: 92%; opacity: 1; } }
body.pjax-loading::before {
  content: ""; position: fixed; top: 0; inset-inline-start: 0; z-index: 999;
  block-size: 3px; inline-size: 0;
  background: linear-gradient(90deg, #26048A, #680CF2);
  box-shadow: 0 0 12px rgba(56, 189, 248, .8);
  animation: qbar 1.2s ease-out forwards;
  pointer-events: none;
}
#main { view-transition-name: none; }
#main.page-leave { opacity: 0; transform: translateY(6px); transition: opacity .09s ease, transform .09s ease; }
#main.page-enter { animation: pageIn .24s var(--ease-out) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  #main.page-leave, #main.page-enter { animation: none; transition: none; opacity: 1; transform: none; }
}

/* ---------- Favorites: poster-card star + detail button ---------- */
.poster-fav {
  position: absolute; bottom: 8px; inset-inline-end: 8px; z-index: 2;
  display: grid; place-items: center;
  inline-size: 30px; block-size: 30px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: rgba(27, 7, 97, .82); color: #cbd6e5;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform .2s var(--ease-spring), color .2s, background .2s;
}
.poster-fav:hover { transform: scale(1.12); color: #fff; }
.poster-fav.is-fav { background: rgba(104, 12, 242, .92); color: #fbbf24; }
.poster-fav.is-fav svg { fill: currentColor; }
.fav-btn.is-fav { border-color: #3905BB; color: #fbbf24; }
.fav-btn.is-fav svg { fill: currentColor; }
.fav-posters { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.fav-posters .fav-poster { flex-direction: column; text-align: center; }
.fav-posters .fav-poster img { inline-size: 100%; block-size: auto; aspect-ratio: 2/3; object-fit: cover; border-radius: var(--radius-sm); }

/* ---------- Touch / swipe optimizations ---------- */
a, button { -webkit-tap-highlight-color: transparent; }
.hscroll {
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.hscroll > * { scroll-snap-align: start; }
html { overscroll-behavior-y: none; }
.bn-item, .chip, .nav-link { min-block-size: 40px; }
.bn-item:active, .chip:active { transform: scale(.95); }

/* ============================================================
   Poster card v2 — title inside the artwork + hover info panel
   ============================================================ */
.poster-card { gap: 0; }
.poster-thumb { border-radius: var(--radius-sm); }
/* Always-visible caption: translucent brand-navy gradient, centered */
.poster-caption {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 26px 10px 9px; text-align: center;
  background: linear-gradient(to top, rgba(27, 7, 97, .96) 20%, rgba(27, 7, 97, .68) 60%, transparent);
  pointer-events: none;
}
.poster-caption .poster-title {
  color: #fff; font-size: 13px; font-weight: 800; line-height: 1.45;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  text-shadow: 0 1px 6px rgba(2, 6, 23, .6);
}
.poster-caption .poster-year { color: #b7c8de; font-size: 11.5px; font-weight: 700; }
html.dark .poster-caption .poster-year, .poster-caption .poster-year { color: #b7c8de; }

/* Hover info panel: play + overview + genre chips (desktop pointer only) */
.poster-info {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 14px 12px;
  text-align: center;
  background: rgba(27, 7, 97, .86);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .22s ease;
  pointer-events: none;
}
@media (hover: hover) {
  .poster-card:hover .poster-info { opacity: 1; }
  .poster-card:hover .poster-caption { opacity: 0; transition: opacity .18s ease; }
  .poster-card:hover .poster-thumb img { transform: scale(1.07); }
}
.pi-play {
  display: grid; place-items: center;
  inline-size: 52px; block-size: 52px; border-radius: 50%;
  color: #fff; background: linear-gradient(135deg, #26048A, #680CF2);
  box-shadow: 0 10px 26px rgba(104, 12, 242, .42);
}
.pi-overview {
  color: #dbe4f0; font-size: 11.5px; line-height: 1.7; font-weight: 600;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  margin: 0;
}
.pi-genres { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pi-genre {
  font-size: 10.5px; font-weight: 800; color: #dce9fb;
  background: rgba(124, 77, 255, .32); border: 1px solid rgba(104, 12, 242, .38);
  padding: 3px 10px; border-radius: 999px;
}
/* Old below-image caption block is gone from the markup */
.poster-body { display: none; }

/* ============================================================
   v2.1 additions — Settings & More hub, cookie consent, cinema
   access control (locked screens, age badges), polish.
   ============================================================ */

/* ---------- Settings & More (mobile app-style hub) ---------- */
.more-page { display: grid; gap: 18px; padding-bottom: 28px; max-width: 760px; }
.more-group {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px 18px 14px; background: var(--glass-soft);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.mg-title {
  font-size: 13px; font-weight: 800; color: var(--text-3);
  letter-spacing: .02em; margin: 14px 2px 6px;
}
.mg-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 2px; border-bottom: 1px dashed var(--line); min-height: 56px;
}
.mg-row:last-child { border-bottom: 0; }
.mg-ic { color: var(--primary); display: grid; place-items: center; flex: none; }
.mg-label { flex: 1; font-weight: 700; font-size: 14.5px; min-width: 0; }
.mg-label small { display: block; color: var(--text-3); font-weight: 600; font-size: 12px; margin-top: 2px; }
.mg-ctl { flex: none; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* Segmented control (language / theme) */
.seg {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
}
.seg-btn {
  border: 0; background: transparent; color: var(--text-2); cursor: pointer;
  font: inherit; font-weight: 700; font-size: 13px; padding: 8px 16px;
  border-radius: 999px; min-height: 36px; transition: all .18s var(--ease-out);
  -webkit-tap-highlight-color: transparent; text-decoration: none; display: inline-flex; align-items: center;
}
.seg-btn.active { background: var(--primary); color: #fff; box-shadow: var(--shadow-1); }
html.dark .seg-btn.active { color: #0B0134; }

/* Section tiles */
.mg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 6px 0 4px; }
@media (min-width: 640px) { .mg-grid { grid-template-columns: repeat(4, 1fr); } }
.mg-tile {
  display: flex; align-items: center; gap: 10px; min-height: 58px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line);
  font-weight: 700; font-size: 13.5px; color: var(--text);
}
.mg-tile-ic { position: relative; color: var(--primary); display: grid; place-items: center; flex: none; }
.mg-tile-ic .live-dot { position: absolute; top: -2px; inset-inline-end: -4px; }
.mg-tile > span:not(.mg-tile-ic) { flex: 1; min-width: 0; }
.mg-arrow { color: var(--text-3); flex: none; }
.mg-list { display: flex; flex-direction: column; }
.mg-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 52px; padding: 12px 2px; border-bottom: 1px dashed var(--line);
  font-weight: 700; font-size: 14px; color: var(--text);
}
.mg-item:last-child { border-bottom: 0; }
.mg-item svg { color: var(--text-3); }
.more-version { text-align: center; color: var(--text-3); font-size: 12px; }

/* ---------- Toggle switch (cookie settings) ---------- */
.switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sw-track {
  width: 48px; height: 28px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line); transition: background .2s var(--ease-out); position: relative;
}
.sw-track::after {
  content: ""; position: absolute; top: 3px; inset-inline-start: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .2s var(--ease-spring);
}
.switch input:checked + .sw-track { background: var(--accent); border-color: transparent; }
.switch input:checked + .sw-track::after { transform: translateX(-20px); }
[dir="ltr"] .switch input:checked + .sw-track::after { transform: translateX(20px); }
.switch.is-locked { opacity: .6; cursor: not-allowed; }
.ck-row .mg-label b { font-size: 14px; }
.ck-actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px 0 6px; }
.ck-note { color: var(--text-3); font-size: 12.5px; padding-bottom: 8px; }

/* ---------- Cookie consent banner ---------- */
.cookie-bar {
  position: fixed; z-index: 90; inset-inline: 12px;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  max-width: 680px; margin-inline: auto;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; gap: 12px;
  opacity: 0; transform: translateY(16px);
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.cookie-bar.show { opacity: 1; transform: none; }
.cookie-bar .cb-text b { font-size: 14.5px; display: block; margin-bottom: 3px; }
.cookie-bar .cb-text p { color: var(--text-2); font-size: 12.5px; line-height: 1.65; margin: 0; }
.cookie-bar .cb-text a { color: var(--accent); font-weight: 700; }
.cookie-bar .cb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-bar .cb-actions .btn { padding: 9px 16px; font-size: 13px; min-height: 40px; }
@media (min-width: 768px) {
  .cookie-bar { bottom: 18px; flex-direction: row; align-items: center; }
  .cookie-bar .cb-text { flex: 1; }
}

/* ---------- Cinema access control ---------- */
.locked-panel {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 38px 22px; text-align: center; display: grid; justify-items: center; gap: 10px;
}
.locked-panel .lp-icon {
  width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center;
  color: var(--accent); background: var(--primary-soft); margin-bottom: 4px;
}
.locked-panel.is-unavailable .lp-icon { color: var(--text-3); background: var(--surface-2); }
.locked-panel .lp-title { font-size: 18px; font-weight: 800; }
.locked-panel .lp-text { color: var(--text-2); font-size: 14px; max-width: 460px; line-height: 1.8; }
.locked-panel .lp-actions { padding-top: 6px; }
.locked-panel .lp-perks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.locked-panel .lp-perks li {
  color: var(--text-3); font-size: 12.5px; font-weight: 600;
  display: flex; align-items: center; gap: 7px;
}
.locked-panel .lp-perks li::before {
  content: "✓"; color: var(--win); font-weight: 900;
}

/* Age rating badges */
.age-badge {
  font-weight: 800; letter-spacing: .02em;
  background: rgba(148, 163, 184, .2); color: var(--text-2);
}
.age-badge.age-13 { background: rgba(56, 189, 248, .18); color: #3905BB; }
.age-badge.age-16 { background: rgba(245, 158, 11, .18); color: #b45309; }
.age-badge.age-18 { background: rgba(239, 68, 68, .18); color: #dc2626; }
html.dark .age-badge.age-13 { color: #C4A1F4; }
html.dark .age-badge.age-16 { color: #fbbf24; }
html.dark .age-badge.age-18 { color: #f87171; }
.poster-age {
  position: absolute; top: 8px; inset-inline-start: 8px; z-index: 2;
  font-size: 10.5px; padding: 3px 8px; border-radius: 999px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.poster-rating ~ .poster-age { top: 34px; }
.poster-lock {
  position: absolute; bottom: 44px; inset-inline-end: 8px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 800; padding: 4px 9px; border-radius: 999px;
  background: rgba(27, 7, 97, .78); color: #C4A1F4;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* ---------- Polish: touch targets + transitions ---------- */
.bottom-nav .bn-item { min-height: 52px; }
@media (prefers-reduced-motion: reduce) {
  .cookie-bar, .seg-btn, .sw-track, .sw-track::after { transition: none; }
}

/* ============================================================
   v2.2 additions — mobile header cleanup, Telegram dialog,
   settings-page rows, lock-screen dismiss.
   ============================================================ */

/* Mobile header: logo + search only; logo pinned LEFT in both languages
   (identical to the English layout), actions pinned right. */
@media (max-width: 959px) {
  .mob-hide { display: none !important; }
  [dir="rtl"] .site-header .header-inner { flex-direction: row-reverse; }
  [dir="rtl"] .site-header .header-actions { margin-inline-start: 0; margin-inline-end: auto; }
}

/* Settings rows that act as links + static value rows */
.mg-link { color: var(--text); }
.mg-link:active { background: var(--surface-2); }
.mg-value { color: var(--text-3); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }

/* Lock screen dismissed via its Close button */
.locked-panel.lp-min { display: none; }

/* ---------- Telegram join dialog ---------- */
.tg-dialog {
  position: fixed; inset: 0; z-index: 95;
  display: grid; place-items: center; padding: 20px;
}
.tg-dialog .tgd-overlay {
  position: absolute; inset: 0; background: rgba(2, 6, 23, .62);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .28s var(--ease-out);
}
.tg-dialog .tgd-card {
  position: relative; width: min(400px, 100%);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px 22px 22px; text-align: center; box-shadow: var(--shadow-2);
  display: grid; justify-items: center; gap: 10px;
  opacity: 0; transform: translateY(18px) scale(.96);
  transition: opacity .3s var(--ease-out), transform .34s var(--ease-spring);
}
.tg-dialog.show .tgd-overlay { opacity: 1; }
.tg-dialog.show .tgd-card { opacity: 1; transform: none; }
.tg-dialog .tgd-ic {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: linear-gradient(135deg, #2AABEE, #229ED9);
  box-shadow: 0 8px 24px rgba(34, 158, 217, .4); margin-bottom: 2px;
}
.tg-dialog .tgd-title { font-size: 17px; font-weight: 800; line-height: 1.5; }
.tg-dialog .tgd-desc { color: var(--text-2); font-size: 13.5px; line-height: 1.75; max-width: 320px; margin: 0; }
.tg-dialog .tgd-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; padding-top: 8px; }
.tg-dialog .tgd-actions .btn { min-height: 44px; }
@media (prefers-reduced-motion: reduce) {
  .tg-dialog .tgd-overlay, .tg-dialog .tgd-card { transition: none; }
}

/* ============================================================
   v2.3 — footer is desktop-only. On phones/small tablets the
   whole footer disappears (its functionality lives in /more);
   the links remain in the HTML for crawlers, nothing is
   rendered and no space is reserved. Desktop unchanged.
   ============================================================ */
@media (max-width: 959px) {
  .site-footer { display: none; }
}

/* ============================================================
   v2.4 — favorites poster grid + tap-to-reveal poster details.
   ============================================================ */

/* Poster info panel opened by tap on touch devices (Chrome/WebView parity
   with desktop hover). */
.poster-card.pi-open .poster-info { opacity: 1; }
.poster-card.pi-open .poster-caption { opacity: 0; transition: opacity .18s ease; }
.poster-card.pi-open .poster-thumb img { transform: scale(1.07); }

/* Favorites: cinema titles as a real poster grid (same language as the
   movies/series sections). */
.fav-posters {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 12px;
}
@media (min-width: 640px) {
  .fav-posters { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
}
.fav-pcard {
  position: relative; display: block; border-radius: var(--radius-sm);
  -webkit-tap-highlight-color: transparent;
}
.fav-pcard .fp-thumb {
  position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden;
  border-radius: var(--radius-sm); background: var(--surface-2);
  border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.fav-pcard .fp-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .35s var(--ease-out);
}
.fav-pcard:hover .fp-thumb img { transform: scale(1.06); }
.fav-pcard .fp-empty {
  position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3);
}
.fav-pcard .fp-caption {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 1;
  padding: 26px 8px 9px; text-align: center;
  color: #fff; font-size: 12.5px; font-weight: 800; line-height: 1.45;
  background: linear-gradient(to top, rgba(27, 7, 97, .96) 22%, rgba(27, 7, 97, .62) 62%, transparent);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  text-shadow: 0 1px 6px rgba(2, 6, 23, .6);
}
.fav-pcard .fp-x {
  position: absolute; top: 7px; inset-inline-end: 7px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  color: #fff; background: rgba(27, 7, 97, .72);
  border: 1px solid rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  margin: 0; transition: background .2s ease, transform .15s ease;
}
.fav-pcard .fp-x:hover { background: var(--live); color: #fff; }
.fav-pcard .fp-x:active { transform: scale(.9); }

/* ============================================================
   v2.6 — AI Assistant widget (ChatGPT-style, site design tokens).
   ============================================================ */

/* Floating action button */
.ai-fab {
  position: fixed; z-index: 88;
  inset-inline-end: 16px; bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #26048A, #680CF2);
  box-shadow: 0 10px 30px rgba(104, 12, 242, .38);
  transition: transform .2s var(--ease-spring), box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.ai-fab:hover { transform: translateY(-2px) scale(1.04); }
.ai-fab:active { transform: scale(.93); }
@media (min-width: 960px) { .ai-fab { bottom: 24px; } }
body.ai-open .ai-fab { display: none; }

/* Overlay (mobile) — must sit ABOVE the bottom nav (z-index 100) */
.ai-overlay {
  position: fixed; inset: 0; z-index: 120; background: rgba(2, 6, 23, .55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .28s ease;
}
.ai-overlay.show { opacity: 1; pointer-events: auto; }
@media (min-width: 960px) { .ai-overlay { display: none; } }

/* Panel: bottom sheet on mobile, floating window on desktop */
.ai-panel {
  position: fixed; z-index: 121; display: flex; flex-direction: column;
  inset-inline: 0; bottom: 0; height: min(78dvh, 640px);
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid var(--line); border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-2);
  transform: translateY(26px); opacity: 0;
  transition: transform .32s var(--ease-spring), opacity .26s ease;
}
.ai-panel.open { transform: none; opacity: 1; }
@media (min-width: 960px) {
  .ai-panel {
    inset-inline: auto; inset-inline-end: 24px; bottom: 24px;
    width: 400px; height: min(72vh, 620px);
    border-radius: var(--radius-lg); border-bottom: 1px solid var(--line);
  }
}

/* Header */
.ai-head {
  display: flex; align-items: center; gap: 10px; flex: none;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.ai-head-ic {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #26048A, #680CF2);
}
.ai-head-ic svg { width: 20px; height: 20px; }
.ai-head-txt { flex: 1; min-width: 0; line-height: 1.3; }
.ai-head-txt b { display: block; font-size: 14.5px; }
.ai-head-txt small { color: var(--text-3); font-size: 11px; font-weight: 700; }
.ai-hbtn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--text-2); cursor: pointer;
  display: grid; place-items: center; flex: none;
}
.ai-hbtn:hover { background: var(--surface-2); color: var(--text); }

/* Messages */
.ai-body { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.ai-msg { display: flex; }
.ai-msg.ai-user { justify-content: flex-end; }
.ai-bubble {
  max-width: 86%; padding: 10px 14px; border-radius: 16px;
  font-size: 13.5px; line-height: 1.75; font-weight: 600;
  animation: aiIn .25s var(--ease-out);
}
.ai-user .ai-bubble {
  background: linear-gradient(135deg, #26048A, #3905BB); color: #fff;
  border-end-end-radius: 5px;
}
.ai-assistant .ai-bubble {
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  border-end-start-radius: 5px;
}
@keyframes aiIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Typing dots */
.ai-typing { display: inline-flex; gap: 5px; align-items: center; padding: 14px 16px; }
.ai-typing i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--text-3);
  animation: aiDot 1.2s infinite;
}
.ai-typing i:nth-child(2) { animation-delay: .18s; }
.ai-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes aiDot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-4px); } }

/* Cards inside chat */
.ai-cards { display: flex; flex-direction: column; gap: 10px; }
.ai-card {
  display: block; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: var(--shadow-1); padding: 12px;
  color: var(--text); transition: transform .18s var(--ease-out), border-color .2s;
  animation: aiIn .3s var(--ease-out);
}
.ai-card:hover { transform: translateY(-2px); border-color: rgba(104, 12, 242, .38); }
.ai-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 10px; padding: 8px 16px; border-radius: 999px;
  background: linear-gradient(135deg, #26048A, #680CF2); color: #fff;
  font-size: 12.5px; font-weight: 800; min-height: 36px;
}
/* Match card */
.acm-row { display: flex; align-items: center; gap: 8px; }
.acm-team { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.acm-team b { font-size: 12.5px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.acm-logo { width: 42px; height: 42px; object-fit: contain; }
.acm-mid { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 70px; }
.acm-score { font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--primary); }
.acm-state { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.acm-state.is-live { background: rgba(239, 68, 68, .14); color: var(--live); }
.acm-state.is-ft { background: var(--surface-2); color: var(--text-2); }
.acm-state.is-soon { background: var(--primary-soft); color: var(--primary); }
.acm-meta { margin-top: 8px; color: var(--text-3); font-size: 11.5px; font-weight: 700; text-align: center; }
.ai-card-match { text-align: center; }
/* Poster card (movie/series) */
.ai-card-poster { display: flex; gap: 12px; }
.acp-poster { width: 72px; aspect-ratio: 2/3; object-fit: cover; border-radius: 10px; flex: none; background: var(--surface-2); }
.acp-info { flex: 1; min-width: 0; }
.acp-title { display: block; font-size: 13.5px; line-height: 1.4; }
.acp-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.acp-chip { font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.acp-rate { background: rgba(245, 158, 11, .15); color: #b45309; }
html.dark .acp-rate { color: #fbbf24; }
.acp-age { background: rgba(239, 68, 68, .14); color: #dc2626; }
html.dark .acp-age { color: #f87171; }
.acp-ov { margin: 7px 0 0; color: var(--text-2); font-size: 11.5px; line-height: 1.65; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
/* News card */
.ai-card-news { display: flex; gap: 12px; align-items: flex-start; }
.acn-img { width: 84px; height: 60px; object-fit: cover; border-radius: 9px; flex: none; background: var(--surface-2); }
.acn-info { flex: 1; min-width: 0; }
.acn-title { display: block; font-size: 12.5px; line-height: 1.55; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.acn-time { color: var(--text-3); font-weight: 700; font-size: 11px; }
.ai-card-news .ai-cta { padding: 6px 13px; min-height: 30px; margin-top: 7px; }
/* Entity / channel card */
.ai-card-entity { display: flex; align-items: center; gap: 12px; }
.ace-img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; flex: none; background: var(--surface-2); padding: 4px; }
.ace-tv { display: grid; place-items: center; color: var(--primary); }
.ace-title { flex: 1; min-width: 0; font-size: 13.5px; }
.ai-card-entity .ai-cta { margin-top: 0; padding: 7px 14px; min-height: 32px; }

/* Suggestion chips */
.ai-sugs { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 2px; }
.ai-sug {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2);
  font: inherit; font-size: 12px; font-weight: 700; padding: 8px 14px;
  border-radius: 999px; cursor: pointer; min-height: 36px;
  transition: all .18s ease; -webkit-tap-highlight-color: transparent;
}
.ai-sug:hover { border-color: rgba(124, 77, 255, .5); color: var(--primary); }

/* Input row */
.ai-input {
  flex: none; display: flex; gap: 8px; align-items: center;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
}
.ai-input input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px;
  padding: 11px 18px; outline: none;
}
.ai-input input:focus { border-color: rgba(124, 77, 255, .55); }
.ai-send {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; flex: none;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #26048A, #680CF2);
}
.ai-send:disabled { opacity: .5; cursor: default; }
[dir="rtl"] .ai-send svg { transform: scaleX(-1); }
@media (prefers-reduced-motion: reduce) {
  .ai-panel, .ai-bubble, .ai-card, .ai-fab { transition: none; animation: none; }
}

/* v2.6.1 — mobile chat fixes: the panel now layers ABOVE the bottom nav
   (which is z-index 100), the nav hides while the chat is open so the
   input row is always visible, and the page behind stops scrolling. */
@media (max-width: 959px) {
  body.ai-open .bottom-nav { display: none !important; }
  body.ai-open { overflow: hidden; }
}

/* ============================================================
   v2.7 — AI UI Generator: styles for HTML answers rendered
   inside the chat (paragraphs, info rows, lists, model cards).
   ============================================================ */
.ai-html { max-width: 92%; display: flex; flex-direction: column; gap: 10px; animation: aiIn .28s var(--ease-out); }
.ai-html .ai-p {
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  border-radius: 16px; border-end-start-radius: 5px;
  padding: 10px 14px; margin: 0; font-size: 13.5px; line-height: 1.75; font-weight: 600;
}
.ai-html .ai-card { margin: 0; }
.ai-html .aic-title { font-size: 14.5px; font-weight: 800; margin: 0 0 8px; color: var(--text); }
.ai-html .aic-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 2px; border-bottom: 1px dashed var(--line);
  font-size: 13px; font-weight: 700;
}
.ai-html .aic-row:last-of-type { border-bottom: 0; }
.ai-html .aic-k { color: var(--text-3); flex: none; }
.ai-html .aic-v { color: var(--text); text-align: end; min-width: 0; overflow-wrap: anywhere; }
.ai-html .aic-link { color: var(--accent); font-weight: 800; }
.ai-html .ai-list { margin: 6px 0 0; padding-inline-start: 18px; display: grid; gap: 5px; }
.ai-html .ai-list li { color: var(--text-2); font-size: 12.5px; line-height: 1.7; font-weight: 600; }
.ai-html a:not(.ai-cta):not(.ai-card) { color: var(--accent); font-weight: 700; }
.ai-html img { max-width: 100%; border-radius: 10px; }
.ai-html table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ai-html th, .ai-html td { padding: 7px 9px; border-bottom: 1px solid var(--line); text-align: start; }
.ai-html th { color: var(--text-3); font-size: 11.5px; }

/* v2.8 — AI goals block + standings/scorers tables inside chat answers */
.ai-html .aic-goals { margin-top: 8px; }
.ai-html .aicg-team { display: block; font-size: 12.5px; font-weight: 800; color: var(--primary); margin: 6px 0 2px; }
.ai-html .ai-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 4px; }
.ai-html .ai-table th, .ai-html .ai-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: start; }
.ai-html .ai-table th { color: var(--text-3); font-size: 11px; font-weight: 800; }
.ai-html .ai-table td small { color: var(--text-3); font-weight: 600; }
.ai-html .ai-table tbody tr:last-child td { border-bottom: 0; }

/* ============================================================
   v3.0 — additive UI/UX upgrade: readable match names, standalone
   channels catalogue, and Android app fallback dialog.
   ============================================================ */

/* Team names are allowed two lines instead of being forced into FC A… */
.mc-name,
.fc-team b,
.lc-team > span {
  min-width: 0;
  white-space: normal;
  overflow: hidden;
  text-overflow: clip;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.lc-team > span { flex: 1; }
.mc-away .mc-name { text-align: end; }

@media (max-width: 560px) {
  .match-card {
    grid-template-columns: minmax(0,1fr) 72px minmax(0,1fr) 30px;
    gap: 5px; padding: 10px 8px;
  }
  .mc-team { gap: 6px; align-items: center; }
  .mc-team img { width: 30px; height: 30px; }
  .mc-name { font-size: clamp(11.5px, 3.2vw, 13px); }
  .mc-score { font-size: 15px; }
  .mc-time { font-size: 13px; }
  .mc-status { font-size: 9.5px; padding-inline: 6px; }
  .live-card { width: min(82vw, 268px); }
  .lc-team { font-size: 12.5px; }
  .fc-team b { font-size: 12px; min-height: 32px; }
  .featured-card { padding: 14px 10px; }
  .fc-teams { gap: 6px; }
}

/* Keep the expanded desktop navigation inside its own scroll area. */
@media (min-width: 960px) {
  .main-nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav .nav-link { flex: 0 0 auto; }
}
@media (min-width: 960px) and (max-width: 1180px) {
  .header-inner { gap: 9px; }
  .main-nav { gap: 2px; margin-inline-start: 2px; }
  .nav-link { padding: 8px 10px; font-size: 12.5px; }
}

/* Channels */
.channels-hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(560px 260px at 15% 0, rgba(56,189,248,.28), transparent 70%),
    radial-gradient(620px 280px at 90% 5%, rgba(104,12,242,.28), transparent 72%),
    linear-gradient(145deg, #0B0134, #070022 58%, #120250);
}
.channels-hero::after { content:""; position:absolute; inset:0; opacity:.18; background-image:radial-gradient(#C4A1F4 1px,transparent 1px); background-size:24px 24px; }
.channels-hero-inner { position:relative; z-index:1; padding-block:clamp(52px,8vw,88px); }
.channels-hero h1 { font-size:clamp(30px,6vw,54px); margin-top:8px; }
.channels-hero p { max-width:650px; color:#cbd5e1; font-size:clamp(14px,2vw,17px); margin-top:12px; }
.channels-kicker { color:#C4A1F4; font-size:13px; font-weight:900; letter-spacing:.04em; }
.channels-page { padding-bottom:20px; }
.channel-category-head { margin-bottom:14px; }
.channel-category-title { display:flex; align-items:center; gap:12px; }
.channel-category-title img { width:44px; height:44px; object-fit:cover; border-radius:13px; background:var(--surface-2); }
.channel-category-title h2::before { display:none; }
.channel-category-title small { color:var(--text-3); font-size:12px; }
.channel-group-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr)); gap:14px; }
.channel-group-card {
  min-width:0; display:grid; grid-template-columns:76px minmax(0,1fr) 22px; align-items:center; gap:14px;
  min-height:112px; padding:16px; border-radius:var(--radius); background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-1);
}
.channel-group-logo { width:76px; height:68px; display:grid; place-items:center; border-radius:15px; background:var(--surface-2); overflow:hidden; }
.channel-group-logo img { width:100%; height:100%; object-fit:contain; }
.channel-group-copy { min-width:0; display:flex; flex-direction:column; gap:4px; }
.channel-group-copy b { font-size:15px; }
.channel-group-copy small { color:var(--text-3); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.channel-group-copy em { color:var(--accent); font-size:11.5px; font-style:normal; font-weight:800; }
.channel-arrow { color:var(--text-3); }
html[dir="ltr"] .channel-arrow,.channel-back svg { transform:scaleX(-1); }
html[dir="ltr"] .channel-back svg { transform:none; }
.channel-group-hero { padding-top:28px; }
.channel-back { display:inline-flex; align-items:center; gap:6px; color:var(--text-3); font-weight:800; font-size:13px; margin-bottom:14px; }
.channel-group-heading { display:flex; align-items:center; gap:20px; padding:20px; border-radius:var(--radius-lg); }
.channel-group-heading > img { width:112px; height:76px; object-fit:contain; background:var(--surface-2); border-radius:17px; }
.channel-group-heading span { color:var(--accent); font-size:12px; font-weight:800; }
.channel-group-heading h1 { font-size:clamp(24px,5vw,36px); margin-top:2px; }
.channel-group-heading p { color:var(--text-3); margin-top:6px; }
.channel-total { display:grid; place-items:center; min-width:32px; height:32px; padding-inline:9px; border-radius:10px; background:var(--primary-soft); color:var(--primary-700); font-weight:900; }
.channel-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,250px),1fr)); gap:14px; }
.channel-card { display:flex; flex-direction:column; min-width:0; padding:16px; border-radius:var(--radius); background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-1); }
.channel-card:hover { border-color:rgba(124, 77, 255,.38); box-shadow:var(--shadow-2); transform:translateY(-2px); }
.channel-card-top { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.channel-logo { width:96px; height:70px; display:grid; place-items:center; border-radius:15px; overflow:hidden; background:var(--surface-2); }
.channel-logo img { width:100%; height:100%; object-fit:contain; }
.channel-card-body { flex:1; padding-block:14px; }
.channel-card-body h2 { font-size:16px; }
.channel-card-body p { color:var(--text-3); font-size:12.5px; margin-top:6px; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.channel-badges,.channel-watch-meta { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-top:12px; }
.channel-badge { padding:3px 9px; border-radius:999px; font-size:10.5px; font-weight:900; background:var(--surface-2); color:var(--text-2); }
.channel-badge.status-live { color:#4ade80; background:rgba(34,197,94,.12); }
.channel-badge.status-offline { color:#f87171; background:rgba(239,68,68,.12); }
.channel-badge.status-soon { color:#fbbf24; background:rgba(245,158,11,.12); }
.channel-badge.quality { color:#C4A1F4; background:rgba(14,165,233,.12); }
.channel-badge.featured { color:#fbbf24; background:rgba(245,158,11,.12); }
.channel-play-btn { width:100%; min-height:46px; justify-content:center; }
.channel-play-btn.disabled { background:var(--surface-2); color:var(--text-3); cursor:not-allowed; }
.channel-card.is-disabled { opacity:.72; }
.channel-video { aspect-ratio:16/9; background:#0B0134; border-radius:var(--radius); overflow:hidden; }
.channel-video video { width:100%; height:100%; object-fit:contain; background:#0B0134; }

/* App-required dialog */
body.dialog-open { overflow:hidden; }
.app-dialog { position:fixed; inset:0; z-index:1000; display:grid; place-items:center; padding:20px; }
.app-dialog[hidden] { display:none; }
.app-dialog-backdrop { position:absolute; inset:0; background:rgba(2,6,23,.72); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); opacity:0; transition:opacity .2s; }
.app-dialog-panel {
  position:relative; z-index:1; width:min(420px,100%); padding:28px; text-align:center; color:#e2e8f0;
  background:linear-gradient(155deg,rgba(42, 10, 131,.96),rgba(27, 7, 97,.98)); border:1px solid rgba(148,163,184,.18);
  border-radius:26px; box-shadow:0 30px 80px rgba(0,0,0,.55); transform:translateY(14px) scale(.97); opacity:0; transition:.24s var(--ease-out);
}
.app-dialog.open .app-dialog-backdrop { opacity:1; }
.app-dialog.open .app-dialog-panel { opacity:1; transform:none; }
.app-dialog-panel > img { margin:0 auto 14px; border-radius:18px; box-shadow:0 12px 30px rgba(76, 14, 205,.35); }
.app-dialog-panel h2 { font-size:22px; }
.app-dialog-panel p { color:#a8b7cc; margin-top:8px; line-height:1.8; }
.app-dialog-actions { display:grid; gap:9px; margin-top:22px; }
.app-dialog-actions .btn { justify-content:center; }
.app-dialog-x { position:absolute; top:12px; inset-inline-end:12px; width:38px; height:38px; border-radius:12px; color:#94a3b8; font-size:24px; }
.app-dialog-x:hover { background:rgba(255,255,255,.07); color:#fff; }

@media (max-width:560px) {
  .channel-group-grid,.channel-grid { grid-template-columns:1fr; }
  .channel-group-heading { align-items:flex-start; padding:16px; gap:14px; }
  .channel-group-heading > img { width:88px; height:64px; }
  .app-dialog { padding:14px; align-items:end; }
  .app-dialog-panel { border-radius:26px 26px 20px 20px; padding:26px 20px calc(24px + env(safe-area-inset-bottom)); }
}

/* ==== 2026 channel catalogue: category rails + compact logo grid ==== */
.channels-hero-compact .channels-hero-inner{padding-block:clamp(34px,6vw,58px)}
.channels-catalog-page{padding-top:8px}
.channel-category{overflow:visible}
.channel-rail-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:15px}
.channel-rail-title{display:flex;align-items:center;gap:12px;min-width:0}
.channel-rail-title>span{width:5px;height:44px;flex:none;border-radius:6px;background:linear-gradient(180deg,var(--primary),#680CF2);box-shadow:0 0 20px rgba(104,12,242,.28)}
.channel-rail-title h2{font-size:clamp(19px,3vw,27px)}
.channel-rail-title h2::before{display:none}
.channel-rail-head>a{flex:none;padding:7px 13px;border-radius:11px;color:var(--text-2);background:var(--surface);border:1px solid var(--line);font-size:12px;font-weight:800}
.channel-group-rail{display:grid;grid-auto-flow:column;grid-auto-columns:clamp(205px,30vw,310px);gap:14px;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x mandatory;scrollbar-width:none;padding:2px 2px 10px;touch-action:pan-x pan-y}
.channel-group-rail::-webkit-scrollbar{display:none}
.channel-group-poster{display:block;min-width:0;overflow:hidden;border-radius:19px;background:#0d0330;border:1px solid rgba(148,163,184,.11);box-shadow:0 12px 30px rgba(2,6,23,.28);scroll-snap-align:start;transition:.22s var(--ease-out)}
.channel-group-poster:hover{transform:translateY(-3px);border-color:rgba(124, 77, 255,.34);box-shadow:0 18px 38px rgba(2,6,23,.4)}
.channel-group-poster-art{display:grid;place-items:center;aspect-ratio:16/9;padding:14px;background:linear-gradient(155deg,#0B0134,#0a0226)}
.channel-group-poster-art img{width:100%;height:100%;object-fit:contain}
.channel-group-poster-name{display:block;padding:12px 13px 13px;color:#f8fafc;text-align:center;font-size:14px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.channel-group-topbar{position:relative;z-index:2;color:#fff;background:rgba(5,14,29,.94);border-bottom:1px solid rgba(148,163,184,.1);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}
.channel-group-topbar>.container{min-height:72px;display:grid;grid-template-columns:48px 1fr 48px;align-items:center;gap:8px}
.channel-group-topbar h1{text-align:center;font-size:clamp(19px,4vw,27px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.channel-back-icon,.channel-refresh{width:44px;height:44px;display:grid;place-items:center;border-radius:13px;color:#e2e8f0;background:transparent;border:0}
.channel-back-icon:hover,.channel-refresh:hover{background:rgba(255,255,255,.07)}
.channel-listing-section{padding-top:22px}
.channel-logo-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(7px,1.4vw,13px)}
.channel-logo-card{position:relative;min-width:0;padding:0;overflow:hidden;border-radius:15px;background:#0d0330;border:1px solid rgba(148,163,184,.1);box-shadow:0 7px 22px rgba(2,6,23,.25)}
.channel-logo-card:hover{transform:translateY(-2px);border-color:rgba(124, 77, 255,.32)}
.channel-logo-card-link{display:flex;min-height:clamp(150px,24vw,230px);height:100%;flex-direction:column;align-items:stretch;color:#f8fafc}
.channel-logo-card-art{display:grid;place-items:center;flex:1;min-height:0;padding:clamp(12px,3vw,27px) 12px 8px}
.channel-logo-card-art img{width:100%;height:100%;max-height:130px;object-fit:contain}
.channel-logo-card h2{margin:0;min-height:48px;padding:10px 7px 13px;text-align:center;font-size:clamp(10.5px,2.7vw,15px);line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.channel-card-favorite{position:absolute;top:7px;inset-inline-end:7px;width:32px;height:32px;background:rgba(2,6,23,.68);border-color:rgba(255,255,255,.1);z-index:2}
.channel-logo-card.is-disabled{opacity:.5}
@media(max-width:560px){
  .channels-hero-compact .channels-hero-inner{padding-block:28px 34px}
  .channel-group-rail{grid-auto-columns:72vw;gap:10px;margin-inline-end:-16px;padding-inline-end:16px}
  .channel-category{margin-top:25px}
  .channel-rail-title>span{height:36px}
  .channel-group-topbar>.container{min-height:64px;grid-template-columns:42px 1fr 42px}
  .channel-back-icon,.channel-refresh{width:40px;height:40px}
  .channel-logo-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .channel-logo-card{border-radius:12px}
  .channel-logo-card-link{min-height:142px}
  .channel-logo-card-art{padding:20px 8px 5px}
  .channel-logo-card h2{min-height:42px;padding:7px 4px 10px;font-size:10.5px}
  .channel-card-favorite{width:29px;height:29px;top:5px;inset-inline-end:5px}
}

/* ==== Channels v6: site-native slider and cinema-identical poster cards ==== */
.channel-feature-slider{
  position:relative;aspect-ratio:16/7;margin-top:12px;overflow:hidden;
  border-radius:var(--radius-lg);background:var(--surface-2);box-shadow:var(--shadow-1)
}
.channel-feature-track{position:relative;width:100%;height:100%}
.channel-feature-slide{
  position:absolute;inset:0;display:block;width:100%;height:100%;opacity:0;
  visibility:hidden;pointer-events:none;transition:opacity .48s ease,visibility .48s ease
}
.channel-feature-slide.is-active{z-index:1;opacity:1;visibility:visible;pointer-events:auto}
.channel-feature-slide img{display:block;width:100%;height:100%;object-fit:cover}
.channel-feature-shade{
  position:absolute;z-index:1;inset:0;pointer-events:none;
  background:linear-gradient(to top,rgba(2,6,23,.7),transparent 58%),linear-gradient(90deg,rgba(2,6,23,.88),rgba(2,6,23,.52) 42%,transparent 72%)
}
html[dir="rtl"] .channel-feature-shade{transform:scaleX(-1)}
.channel-feature-content{
  position:absolute;z-index:2;top:50%;inset-inline-start:clamp(24px,5vw,70px);transform:translateY(-50%);
  display:flex;flex-direction:column;align-items:flex-start;gap:clamp(7px,1.2vw,13px);width:min(48%,620px);
  color:#fff;text-align:start;text-shadow:0 2px 12px rgba(2,6,23,.62)
}
.channel-feature-content>strong{font-size:clamp(23px,4vw,46px);font-weight:900;line-height:1.22;letter-spacing:-.02em}
.channel-feature-description{font-size:clamp(13px,1.65vw,20px);font-weight:600;line-height:1.75;color:#e2e8f0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.channel-feature-cta{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:9px 20px;border-radius:999px;
  color:#fff;background:linear-gradient(135deg,var(--primary),var(--accent));box-shadow:0 8px 24px color-mix(in srgb,var(--primary) 42%,transparent);
  font-size:clamp(12px,1.3vw,15px);font-weight:900;text-shadow:none
}
html[dir="rtl"] .channel-feature-cta svg{transform:scaleX(-1)}
.channel-feature-arrow{
  position:absolute;z-index:3;top:50%;display:grid;place-items:center;width:42px;height:42px;
  margin-top:-21px;border:1px solid rgba(255,255,255,.18);border-radius:50%;color:#fff;
  background:rgba(27, 7, 97,.72);-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px);
  box-shadow:0 6px 20px rgba(2,6,23,.28);cursor:pointer;transition:transform .2s var(--ease-out),background .2s
}
.channel-feature-arrow:hover{background:rgba(27, 7, 97,.9);transform:scale(1.06)}
.channel-feature-arrow.is-prev{inset-inline-start:13px}.channel-feature-arrow.is-next{inset-inline-end:13px}
.channel-feature-dots{
  position:absolute;z-index:3;inset-inline:0;bottom:11px;display:flex;justify-content:center;gap:6px;
  pointer-events:none
}
.channel-feature-dot{
  width:7px;height:7px;padding:0;border:0;border-radius:999px;background:rgba(255,255,255,.52);
  box-shadow:0 1px 4px rgba(2,6,23,.35);pointer-events:auto;cursor:pointer;transition:width .22s,background .22s
}
.channel-feature-dot.is-active{width:22px;background:#fff}
.channels-catalog-page{padding-top:0;padding-bottom:20px}
.channels-catalog-page>.empty-state{margin-top:16px}
.channel-category{overflow:visible;margin-block:30px}
.channel-category .section-head{margin-bottom:16px}
.channel-category .section-head h2{font-size:20px}
.channel-group-rail{
  display:flex;grid-auto-flow:unset;grid-auto-columns:unset;gap:14px;margin:0;overflow-x:auto;
  padding:2px 0 8px;scroll-snap-type:x proximity
}
.channel-group-poster{
  display:flex;width:152px;min-width:152px;overflow:visible;border:0;border-radius:0;
  background:transparent;box-shadow:none
}
.channel-group-poster:hover{border:0;box-shadow:none;transform:none}
.channel-poster-thumb{width:100%}
.channel-poster-thumb>img,.channel-poster-link>img{object-fit:cover}
.channel-group-poster:hover .channel-poster-thumb>img,.channel-poster-card:hover .channel-poster-link>img{transform:scale(1.07)}
.channel-listing-section{margin-top:18px;padding-top:0;padding-bottom:22px}
.channel-poster-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 10px;margin-top:0}
.channel-poster-grid .channel-poster-card{width:auto}
.channel-poster-card{position:relative;min-width:0}
.channel-poster-card.is-disabled{opacity:.55}
.channel-poster-link{display:block;width:100%;height:100%;color:inherit}
.channel-poster-link>img{display:block;width:100%;height:100%;transition:transform .35s var(--ease-out)}
.channel-poster-link[aria-disabled="true"]{cursor:not-allowed}
.channel-card-favorite{z-index:4}

@media(max-width:560px){
  .channel-feature-slider{aspect-ratio:16/7.4;margin-top:8px;border-radius:var(--radius-sm)}
  .channel-feature-arrow{width:36px;height:36px;margin-top:-18px}
  .channel-feature-arrow.is-prev{inset-inline-start:8px}.channel-feature-arrow.is-next{inset-inline-end:8px}
  .channel-feature-dots{bottom:8px}
  .channel-category{margin-block:25px}
  .channel-group-rail{display:flex;grid-auto-columns:unset;gap:14px;margin:0;padding:2px 0 8px}
  .channel-group-poster{width:152px;min-width:152px}
  .channel-feature-content{inset-inline-start:16px;width:min(59%,300px);gap:5px}
  .channel-feature-content>strong{font-size:clamp(16px,5.2vw,22px);line-height:1.28}
  .channel-feature-description{font-size:clamp(10.5px,3vw,13px);line-height:1.55;-webkit-line-clamp:2}
  .channel-feature-cta{min-height:32px;padding:6px 13px;font-size:10.5px}
  .channel-feature-arrow{display:none}
  .channel-poster-card .poster-caption{padding:22px 5px 7px}
  .channel-poster-card .poster-caption .poster-title{font-size:clamp(10px,2.8vw,12px);line-height:1.35}
  .channel-poster-card .channel-card-favorite{width:27px;height:27px;bottom:5px;inset-inline-end:5px}
}
@media(min-width:360px){.channel-poster-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:600px){.channel-poster-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 12px}}
@media(min-width:820px){.channel-poster-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(min-width:1060px){.channel-poster-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.channel-feature-slide{transition:none}}

/* Public site protection requested for app-like WebView behaviour. Forms stay usable. */
body{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
input,textarea,select,[contenteditable="true"]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
img{-webkit-user-drag:none;user-drag:none}


/* ============================================================
   ofoq Tv — final site-wide palette lock
   Matches / channels / movies / series / news / standings
   ============================================================ */
html,body{background:#070022;color:#ECE5F7}
.site-header,.site-footer{background:#070022 !important}
.bottom-nav{background:rgba(11,1,52,.96) !important;border-color:rgba(196,161,244,.12) !important}
.glass{background:rgba(11,1,52,.82);border-color:rgba(196,161,244,.13)}
.glass-soft{background:rgba(18,2,80,.68);border-color:rgba(196,161,244,.11)}
.match-card,.channel-card,.movie-card,.series-card,.news-card,.league-card,.standings-card,.panel,.card{border-color:rgba(196,161,244,.12)}
::selection{background:rgba(104,12,242,.35);color:#ECE5F7}
