@font-face { font-family: "Cairo"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/Cairo-400.ttf") format("truetype"); }
@font-face { font-family: "Cairo"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/Cairo-500.ttf") format("truetype"); }
@font-face { font-family: "Cairo"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/Cairo-600.ttf") format("truetype"); }
@font-face { font-family: "Cairo"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/Cairo-700.ttf") format("truetype"); }
@font-face { font-family: "Cairo"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/Cairo-800.ttf") format("truetype"); }
@font-face { font-family: "Changa"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/Changa-400.ttf") format("truetype"); }
@font-face { font-family: "Changa"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/Changa-600.ttf") format("truetype"); }
@font-face { font-family: "Changa"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/Changa-700.ttf") format("truetype"); }
@font-face { font-family: "Changa"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/Changa-800.ttf") format("truetype"); }

:root {
  color-scheme: light;
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, .9);
  --surface-soft: #f6f8fc;
  --surface-strong: #e8edf6;
  --line: rgba(28, 45, 74, .11);
  --line-strong: rgba(28, 45, 74, .2);
  --text: #101828;
  --muted: #667085;
  --accent: #155eef;
  --accent-hover: #004eeb;
  --accent-soft: #e8f0ff;
  --accent-faint: #f2f6ff;
  --on-accent: #ffffff;
  --danger: #e11d48;
  --success: #039855;
  --warning: #dc6803;
  --blue: #155eef;
  --navy: #0b1220;
  --score: #172554;
  --clock: #7c3aed;
  --shadow-sm: 0 3px 12px rgba(30, 50, 85, .055);
  --shadow-md: 0 18px 48px rgba(30, 50, 85, .12);
  --radius-xs: 6px;
  --radius-sm: 9px;
  --radius-md: 13px;
  --font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  --content: 1120px;
  --header-height: 72px;
}

html[data-palette="ruby"] {
  --accent: #b72842;
  --accent-hover: #8c1730;
  --accent-soft: #f6dfe4;
  --accent-faint: #fff4f6;
}
html[data-palette="forest"] {
  --accent: #267457;
  --accent-hover: #14533d;
  --accent-soft: #dcece5;
  --accent-faint: #f2f8f5;
}
html[data-palette="violet"] {
  --accent: #6941c6;
  --accent-hover: #53389e;
  --accent-soft: #eee8fb;
  --accent-faint: #f7f4ff;
}
html[data-palette="aqua"] {
  --accent: #087e8b;
  --accent-hover: #05626d;
  --accent-soft: #dceff1;
  --accent-faint: #f0f9fa;
}
html[data-palette="amber"] {
  --accent: #b65f09;
  --accent-hover: #914706;
  --accent-soft: #f7e7d1;
  --accent-faint: #fff8ed;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080c14;
  --surface: #101827;
  --surface-glass: rgba(16, 24, 39, .91);
  --surface-soft: #172033;
  --surface-strong: #202c42;
  --line: rgba(212, 224, 244, .11);
  --line-strong: rgba(212, 224, 244, .2);
  --text: #f8fafc;
  --muted: #98a2b3;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --accent-soft: #16345a;
  --accent-faint: #10243e;
  --on-accent: #08111f;
  --navy: #f8fafc;
  --score: #dbeafe;
  --clock: #a78bfa;
  --shadow-sm: 0 3px 12px rgba(0, 0, 0, .22);
  --shadow-md: 0 20px 54px rgba(0, 0, 0, .38);
}
html[data-theme="dark"][data-palette="ruby"] { --accent: #f06b80; --accent-hover: #ff8da0; --accent-soft: #3d2028; --accent-faint: #25171b; }
html[data-theme="dark"][data-palette="forest"] { --accent: #65c89d; --accent-hover: #83dbb5; --accent-soft: #1e382e; --accent-faint: #15251f; }
html[data-theme="dark"][data-palette="violet"] { --accent: #b69df8; --accent-hover: #ccbaff; --accent-soft: #33245c; --accent-faint: #231b3b; }
html[data-theme="dark"][data-palette="aqua"] { --accent: #58c7d2; --accent-hover: #83dce4; --accent-soft: #173840; --accent-faint: #10272c; }
html[data-theme="dark"][data-palette="amber"] { --accent: #f0ad5d; --accent-hover: #ffc981; --accent-soft: #432f19; --accent-faint: #2c2115; }

/* Optional glass system: applies to the whole interface, not match cards alone. */
html[data-surface="glass"] {
  --bg: #e7edf8;
  --surface: rgba(255, 255, 255, .66);
  --surface-glass: rgba(255, 255, 255, .72);
  --surface-soft: rgba(244, 248, 255, .58);
  --surface-strong: rgba(226, 235, 249, .68);
  --line: rgba(51, 73, 112, .14);
  --line-strong: rgba(51, 73, 112, .24);
  --shadow-sm: 0 8px 24px rgba(31, 50, 84, .08);
  --shadow-md: 0 22px 60px rgba(31, 50, 84, .15);
}
html[data-theme="dark"][data-surface="glass"] {
  --bg: #07101e;
  --surface: rgba(14, 24, 41, .7);
  --surface-glass: rgba(14, 24, 41, .76);
  --surface-soft: rgba(25, 39, 62, .6);
  --surface-strong: rgba(38, 55, 82, .64);
  --line: rgba(209, 226, 255, .13);
  --line-strong: rgba(209, 226, 255, .23);
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, .25);
  --shadow-md: 0 26px 70px rgba(0, 0, 0, .42);
}
html[data-surface="glass"] body {
  background:
    radial-gradient(circle at 10% 8%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 34vw),
    radial-gradient(circle at 91% 31%, color-mix(in srgb, var(--accent-hover) 15%, transparent), transparent 30vw),
    linear-gradient(145deg, color-mix(in srgb, var(--bg) 88%, #7587ab), var(--bg) 55%, color-mix(in srgb, var(--bg) 91%, #4c6086));
  background-attachment: fixed;
}
html[data-surface="glass"] :is(.site-header, .league-strip, .match-card, .section-card, .side-box, .info-card, .feature-news-card, .news-page-card, .article-card, .policy-card, .profile, .table-shell, .round-block, .match-detail-hero, .match-detail-tabs, .match-detail-pane, .events-panel, .lineup-card, .theme-dialog, .mobile-nav, .loading-match-card, .loading-news-card, .loading-article, .loading-details, .state-box) {
  -webkit-backdrop-filter: blur(20px) saturate(1.28);
  backdrop-filter: blur(20px) saturate(1.28);
}

html[data-font="changa"] { --font-family: "Changa", "Cairo", "Segoe UI", Tahoma, Arial, sans-serif; }
html[data-font="system"] { --font-family: "Segoe UI", Tahoma, Arial, sans-serif; }
html[data-shape="clean"] { --radius-xs: 3px; --radius-sm: 5px; --radius-md: 7px; }
html[data-layout="wide"] { --content: 1320px; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 90% -80px, color-mix(in srgb, var(--accent-soft) 82%, transparent), transparent 330px),
    var(--bg);
  color: var(--text);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  transition: background-color .22s ease, color .22s ease;
}
body.sheet-open { overflow: hidden; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--on-accent); }

.container { width: min(calc(100% - 28px), var(--content)); margin-inline: auto; }
.skip-link { position: fixed; inset-inline-start: 12px; top: -80px; z-index: 999; padding: 10px 15px; border-radius: var(--radius-sm); background: var(--surface); color: var(--text); box-shadow: var(--shadow-md); }
.skip-link:focus { top: 12px; }
.line-icon { width: 20px; height: 20px; display: block; flex: 0 0 20px; stroke-width: 1.8; }

/* App bar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 85;
  border-bottom: 1px solid var(--line);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  backdrop-filter: blur(20px) saturate(1.35);
}
.header-top { display: none; }
.header-main { min-height: var(--header-height); display: flex; align-items: center; gap: 14px; }
.brand { min-width: 166px; display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 43px; height: 43px; flex: 0 0 43px; display: grid; place-items: center; overflow: hidden; border-radius: 11px; background: var(--accent-faint); }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { display: block; overflow: hidden; color: var(--text); font-size: 19px; font-weight: 800; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.brand-sub { display: block; margin-top: -2px; color: var(--accent); font-size: 7px; font-weight: 700; letter-spacing: 2.2px; line-height: 1; }
.main-nav { margin-inline: auto; display: flex; align-items: center; justify-content: center; gap: 2px; }
.main-nav a { min-height: 42px; padding: 8px 10px; display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius-sm); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; transition: background .18s ease, color .18s ease; }
.main-nav a .line-icon { width: 17px; height: 17px; flex-basis: 17px; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.menu-button, .theme-button, .language-button {
  position: relative;
  z-index: 81;
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 14px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 92%, var(--accent) 8%), var(--surface-soft));
  color: var(--text);
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 7%, transparent), 0 6px 18px rgba(0, 0, 0, .08);
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, transform .18s ease;
}
.menu-button .line-icon, .theme-button .line-icon, .language-button .line-icon { width: 19px; height: 19px; stroke-width: 1.85; }
.menu-button:hover, .theme-button:hover, .language-button:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.menu-button { display: none; }
.language-button { width: auto; min-width: 52px; padding-inline: 9px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.language-button span { font-size: 9px; font-weight: 800; letter-spacing: .5px; }
.nav-scrim { position: fixed; inset: 0; z-index: 75; padding: 0; border: 0; background: rgba(20, 16, 12, .28); opacity: 0; visibility: hidden; pointer-events: none; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); transition: opacity .2s ease, visibility .2s ease; }
.nav-scrim.is-open { opacity: 1; visibility: visible; pointer-events: auto; }

/* Leagues */
.league-strip { height: 64px; overflow: hidden; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); }
.league-track { width: min(calc(100% - 28px), var(--content)); height: 64px; margin-inline: auto; display: flex; align-items: center; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.league-track::-webkit-scrollbar { display: none; }
.league-chip { height: 42px; min-width: max-content; padding: 5px 12px; display: flex; align-items: center; gap: 8px; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-size: 11px; font-weight: 600; transition: border-color .18s ease, color .18s ease, transform .18s ease; }
.league-chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.league-chip img { width: 27px; height: 27px; object-fit: contain; }
.league-glyph { width: 10px; height: 10px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--accent); color: transparent; font-size: 0; }

/* Home */
.home-shell { padding: 18px 0 42px; }
.home-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .76fr); gap: 18px; align-items: start; }
.home-center { min-width: 0; }
.home-sidebar { min-width: 0; }
.home-leagues-sidebar { display: none; }
.side-box, .content-card { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.side-box { padding: 9px; }
.side-box + .side-box { margin-top: 12px; }
.side-title { min-height: 45px; margin-bottom: 8px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.side-title h2 { margin: 0; font-size: 14px; font-weight: 800; }
.side-more, .text-link { color: var(--accent); font-size: 10px; font-weight: 700; }
.side-list { display: grid; gap: 4px; }
.side-link { min-height: 46px; padding: 6px 7px; display: flex; align-items: center; gap: 9px; border-radius: var(--radius-sm); transition: background .18s ease, color .18s ease; }
.side-link:hover { background: var(--accent-faint); color: var(--accent); }
.side-link img { width: 31px; height: 31px; object-fit: contain; }
.side-link span { min-width: 0; overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.match-title-bar {
  position: relative;
  min-height: 74px;
  padding: 10px 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.match-title-bar > div { position: absolute; inset-inline: 0; width: 100%; display: grid; place-items: center; pointer-events: none; }
.match-title-bar h1 { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.4; }
.match-title-bar span { color: var(--muted); font-size: 9px; font-weight: 500; }
.scope-toggle { position: absolute; inset-inline-start: 11px; top: 50%; min-height: 40px; padding: 7px 10px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); color: var(--text); font-size: 9px; font-weight: 700; cursor: pointer; transform: translateY(-50%); }
.scope-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--muted); }
.scope-toggle.is-live { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); color: var(--danger); }
.scope-toggle.is-live .scope-dot { background: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 16%, transparent); animation: pulse 1.25s infinite; }
.schedule-toolbar { width: 100%; margin: 0 0 10px; }
.schedule-toolbar .tabs:first-child { width: 100%; padding-top: 7px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; background: transparent; }
.schedule-toolbar .tab { min-height: 42px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); box-shadow: var(--shadow-sm); color: var(--muted); }
.schedule-toolbar .tab:hover, .schedule-toolbar .tab.is-active { background: var(--accent); color: var(--on-accent); }
.matches-panel { padding: 0; border: 0; background: transparent; box-shadow: none; }
.matches-list { display: grid; gap: 10px; }

/* Match cards */
.match-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); isolation: isolate; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.match-card::before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: 74%; background: radial-gradient(circle at 50% -40%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 67%); pointer-events: none; }
.match-card:has(.match-button.has-watch):hover { border-color: color-mix(in srgb, var(--accent) 34%, var(--line)); box-shadow: 0 14px 34px rgba(16, 32, 58, .13); transform: translateY(-2px); }
.match-button { width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: inherit; cursor: default; }
.match-button.has-watch { cursor: pointer; }
.match-button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent); outline-offset: -3px; }
.match-main { min-height: 92px; padding: 12px 14px 10px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(104px, .54fr) minmax(0, 1fr); align-items: center; gap: 9px; }
.team { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 9px; text-align: center; }
.team.home { flex-direction: row; }
.team.away { flex-direction: row-reverse; }
.team-logo { width: 44px; height: 44px; flex: 0 0 44px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .14)); }
.team-logo.is-fallback { padding: 7px; opacity: .72; filter: none; }
.team-name { min-width: 0; overflow: hidden; color: var(--text); font-size: 10px; font-weight: 700; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.match-center { min-width: 0; display: grid; place-items: center; align-content: center; gap: 5px; text-align: center; }
.match-result { color: var(--score); font-size: 21px; font-weight: 800; line-height: 1; direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.live-result { color: var(--text); }
.match-time { padding: 0; border: 0; background: transparent; color: var(--score); font-size: 16px; font-weight: 800; line-height: 1.2; direction: ltr; font-variant-numeric: tabular-nums; }
.status { min-width: 72px; min-height: 21px; padding: 3px 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; color: #fff; font-size: 8px; font-weight: 700; line-height: 1.2; }
.status-upcoming { background: linear-gradient(135deg, #3979e8, #2453ad); }
.status-finished { background: linear-gradient(135deg, #3d3c3d, #171515); }
.status-soon { background: linear-gradient(135deg, #31a96a, #117849); }
.status-live { background: linear-gradient(135deg, #ef3a55, #b20c28); box-shadow: 0 0 0 0 rgba(222, 31, 60, .28); animation: liveStatusPulse 1.35s infinite; }
.status-halftime { background: linear-gradient(135deg, #f1a535, #ba6810); }
.live-clock { position: relative; min-width: 62px; min-height: 24px; padding: 3px 9px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid color-mix(in srgb, var(--danger) 42%, var(--line)); border-radius: 6px; background: color-mix(in srgb, var(--surface-strong) 72%, transparent); color: var(--text); direction: ltr; box-shadow: inset 0 1px 0 color-mix(in srgb, white 5%, transparent); }
.live-clock .line-icon { width: 12px; height: 12px; flex: 0 0 12px; color: var(--danger); stroke-width: 2.2; }
.live-clock b { font-size: 8px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: .15px; }
.added-time { position: absolute; z-index: 2; top: -7px; inset-inline-end: -7px; min-width: 18px; padding: 1px 3px; border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--line)); border-radius: 5px; background: var(--surface); color: var(--danger); font-size: 6px; font-weight: 800; line-height: 1.4; box-shadow: var(--shadow-sm); }
.match-competition { min-height: 31px; padding: 4px 11px; display: flex; align-items: center; justify-content: center; gap: 7px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface-soft) 80%, transparent); color: var(--muted); font-size: 8px; font-weight: 600; }
.match-competition span { max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-competition small { padding-inline-start: 8px; border-inline-start: 1px solid var(--line); color: var(--accent); }
.competition-logo { width: 16px; height: 16px; object-fit: contain; }
.match-competition .ui-icon { width: 14px; height: 14px; flex-basis: 14px; }
.match-footer { min-height: 36px; padding: 4px 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; background: color-mix(in srgb, var(--surface-soft) 70%, transparent); }
.broadcast-item { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 7px; }
.broadcast-item + .broadcast-item { border-inline-start: 1px solid var(--line); }
.broadcast-item b { min-width: 0; overflow: hidden; color: var(--text); font-size: 8px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ui-icon { width: 15px; height: 15px; flex: 0 0 15px; display: inline-block; background: var(--accent); mask-repeat: no-repeat; mask-position: center; mask-size: contain; }
.icon-tv { mask-image: url('/assets/icons/tv.svg'); }
.icon-mic { mask-image: url('/assets/icons/mic.svg'); }
.icon-crown { mask-image: url('/assets/icons/crown.svg'); }
@keyframes pulse { 50% { opacity: .38; } }
@keyframes liveStatusPulse { 50% { box-shadow: 0 0 0 5px rgba(222, 31, 60, 0); filter: brightness(1.08); } }

/* User-selectable card variants. Spotlight is the image-inspired default. */
html[data-card-style="compact"] .match-main { min-height: 72px; padding: 7px 10px; grid-template-columns: minmax(0, 1fr) 94px minmax(0, 1fr); }
html[data-card-style="compact"] .team-logo { width: 34px; height: 34px; flex-basis: 34px; }
html[data-card-style="compact"] .team { gap: 6px; }
html[data-card-style="compact"] .match-result { font-size: 18px; }
html[data-card-style="compact"] .match-competition { min-height: 27px; }
html[data-card-style="compact"] .match-footer { min-height: 31px; }
html[data-card-style="classic"] .match-button { display: flex; flex-direction: column; }
html[data-card-style="classic"] .match-competition { order: -1; border-top: 0; }
html[data-card-style="classic"] .match-main { min-height: 104px; grid-template-columns: minmax(0, 1fr) minmax(94px, .7fr) minmax(0, 1fr); }
html[data-card-style="classic"] .team { flex-direction: column; gap: 5px; }
html[data-card-style="classic"] .team-logo { width: 43px; height: 43px; flex-basis: 43px; }

/* News */
.source-badge { padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 8px; font-weight: 700; }
.news-list { display: grid; gap: 5px; }
.news-card { min-width: 0; padding: 7px; display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: center; gap: 9px; border-radius: var(--radius-sm); transition: background .18s ease; }
.news-card:hover { background: var(--accent-faint); }
.news-image { width: 74px; height: 66px; object-fit: cover; border-radius: 8px; background: var(--surface-soft); }
.news-card h3 { margin: 0; display: -webkit-box; overflow: hidden; color: var(--text); font-size: 10px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.news-card p { margin: 2px 0; display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 8px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.news-card time { color: var(--accent); font-size: 7px; direction: ltr; }
.news-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.feature-news-card, .news-page-card { min-width: 0; overflow: hidden; display: grid; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .18s ease, border-color .18s ease; }
.feature-news-card:hover, .news-page-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.feature-news-card img { width: 100%; height: 150px; object-fit: cover; background: var(--surface-soft); }
.feature-news-card span { padding: 11px; display: grid; gap: 5px; }
.feature-news-card b { display: -webkit-box; overflow: hidden; font-size: 12px; line-height: 1.7; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.feature-news-card small { color: var(--muted); font-size: 8px; }
.news-page-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.news-page-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-soft); }
.news-page-card > div { padding: 14px; }
.news-page-card h2 { margin: 0 0 6px; font-size: 14px; line-height: 1.7; }
.news-page-card p { margin: 0 0 8px; display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.8; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.news-page-card time { color: var(--accent); font-size: 9px; }
.pagination { margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 9px; }
.article-shell { width: min(850px, calc(100% - 28px)); margin: 18px auto 0; }
.article-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.article-cover { width: 100%; max-height: 480px; object-fit: cover; }
.article-head, .article-content { padding: clamp(18px, 4vw, 38px); }
.article-head { padding-bottom: 12px; }
.article-head h1 { margin: 0 0 8px; font-size: clamp(23px, 4vw, 38px); font-weight: 800; line-height: 1.5; }
.article-head time { color: var(--accent); font-size: 10px; }
.article-content { padding-top: 8px; color: var(--text); font-size: 15px; line-height: 2.15; }
.article-content p { margin: 0 0 18px; }

/* Match details */
.match-detail-shell { width: min(880px, calc(100% - 28px)); margin: 16px auto 52px; }
.match-detail-hero { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: radial-gradient(circle at 50% 0, color-mix(in srgb, var(--accent) 18%, transparent), transparent 58%), var(--surface); box-shadow: var(--shadow-md); }
.detail-actionbar { min-height: 58px; padding: 8px 12px; display: grid; grid-template-columns: 84px minmax(0, 1fr) 84px; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.detail-actionbar > button, .detail-tools button { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--surface-soft) 90%, transparent); color: var(--text); cursor: pointer; }
.detail-actionbar > button:hover, .detail-tools button:hover, .detail-tools button.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.detail-actionbar .line-icon { width: 18px; height: 18px; }
.detail-tools { display: flex; justify-content: flex-end; gap: 6px; direction: ltr; }
.detail-competition { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 700; }
.detail-competition img { width: 23px; height: 23px; object-fit: contain; }
.detail-competition b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-scoreboard { min-height: 194px; padding: 26px 24px 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(122px, .58fr) minmax(0, 1fr); align-items: center; gap: 14px; }
.detail-team { min-width: 0; display: grid; justify-items: center; gap: 10px; text-align: center; }
.detail-team img { width: 82px; height: 82px; object-fit: contain; filter: drop-shadow(0 9px 14px rgba(0, 0, 0, .25)); }
.detail-team b { width: 100%; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.detail-center { display: grid; justify-items: center; gap: 7px; text-align: center; }
.detail-result { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 31px; font-weight: 800; }
.detail-result i { color: var(--muted); font-size: 18px; font-style: normal; }
.detail-kickoff { color: var(--score); font-size: 22px; font-weight: 800; direction: ltr; }
.detail-countdown { color: var(--muted); font-size: 8px; font-weight: 600; direction: ltr; }
.detail-venue-line { min-height: 42px; padding: 8px 14px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 20px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-soft) 82%, transparent); color: var(--muted); font-size: 9px; }
.detail-venue-line span { display: inline-flex; align-items: center; gap: 6px; }
.detail-venue-line .line-icon { width: 15px; height: 15px; color: var(--accent); }
.match-detail-tabs { position: sticky; top: calc(var(--header-height) + 8px); z-index: 28; margin: 10px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 7px; background: var(--surface-glass); box-shadow: var(--shadow-sm); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.match-detail-tab { position: relative; min-height: 46px; padding: 8px 5px; border: 0; border-inline-end: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 10px; font-weight: 700; cursor: pointer; }
.match-detail-tab:last-child { border-inline-end: 0; }
.match-detail-tab::after { content: ""; position: absolute; inset-inline: 24%; bottom: -1px; height: 3px; border-radius: 2px; background: transparent; }
.match-detail-tab.is-active { color: var(--text); }
.match-detail-tab.is-active::after { background: var(--accent); }
.match-detail-pane { min-height: 180px; }
.match-detail-pane:not([data-detail-pane="details"]) { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-sm); }
.events-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: var(--shadow-sm); }
.events-toolbar { min-height: 82px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.events-toolbar h2 { margin: 0; font-size: 14px; }.events-toolbar small { color: var(--muted); font-size: 8px; }
.event-filter { flex: 0 0 min(260px, 52%); padding: 3px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; border-radius: 7px; background: var(--surface-strong); }
.event-filter button { min-height: 36px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font: 700 9px var(--font-family, "Cairo", sans-serif); cursor: pointer; }
.event-filter button.is-active { background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 13px color-mix(in srgb, var(--accent) 30%, transparent); }
.event-list { position: relative; padding: 8px 10px 14px; display: grid; }
.timeline-event { position: relative; min-height: 70px; display: grid; grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr); align-items: center; direction: ltr; }
.timeline-event::before { content: ""; position: absolute; z-index: 0; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--line); transform: translateX(-50%); }
.timeline-event-card { position: relative; z-index: 1; min-width: 0; min-height: 54px; padding: 8px 10px; display: grid; grid-template-columns: minmax(0,1fr) 26px 28px; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); direction: rtl; }
html[dir="ltr"] .timeline-event-card { direction: ltr; grid-template-columns: 28px 26px minmax(0,1fr); }
.timeline-event.is-home .timeline-event-card { grid-column: 3; }.timeline-event.is-away .timeline-event-card { grid-column: 1; }.timeline-event.is-neutral .timeline-event-card { grid-column: 1 / 4; width: min(420px, calc(100% - 62px)); justify-self: center; }
html[dir="ltr"] .timeline-event.is-home .timeline-event-card { grid-column: 1; } html[dir="ltr"] .timeline-event.is-away .timeline-event-card { grid-column: 3; }
.timeline-minute { position: relative; z-index: 2; grid-column: 2; grid-row: 1; width: 44px; min-height: 27px; display: grid; place-items: center; justify-self: center; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--accent); font-size: 9px; font-weight: 800; }
.event-copy { min-width: 0; display: grid; }.event-copy b { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }.event-copy small { overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.event-glyph { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-strong); color: var(--muted); }
.event-glyph .line-icon { width: 15px; height: 15px; stroke-width: 1.9; }.event-glyph.is-goal { background: color-mix(in srgb, #21b97a 17%, var(--surface)); color: #22a872; }.event-glyph.is-yellow { background: #fff4c8; color: #d29b00; }.event-glyph.is-red { background: #ffe2e6; color: #cf3149; }.event-glyph.is-sub { background: var(--accent-faint); color: var(--accent); }
.event-video { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #3d72e8; color: #fff; }.event-video .line-icon { width: 14px; height: 14px; }
.timeline-break { min-height: 66px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; text-align: center; }
.timeline-break > span { height: 1px; background: var(--line); }.timeline-break > div { min-width: 120px; display: grid; gap: 1px; }.timeline-break b { color: var(--text); font-size: 16px; }.timeline-break small { color: var(--muted); font-size: 8px; }
.detail-info, .detail-subsection { margin-top: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-sm); }
.detail-info:first-child { margin-top: 0; }
.detail-info h2, .detail-subsection h2 { margin: 0 0 12px; font-size: 15px; font-weight: 800; }
.details-grid { overflow: hidden; border: 1px solid var(--line); border-radius: 5px; }
.detail-fact { min-height: 59px; padding: 9px 11px; display: grid; grid-template-columns: 28px minmax(90px, .55fr) minmax(0, 1fr) 20px; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.detail-fact:last-child { border-bottom: 0; }
.detail-fact-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 7px; background: var(--accent-faint); color: var(--accent); }
.detail-fact-icon .line-icon { width: 15px; height: 15px; }
.detail-fact small { color: var(--muted); font-size: 9px; }
.detail-fact b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.detail-fact-chevron { color: var(--muted); }
.detail-fact-chevron .line-icon { width: 14px; height: 14px; }
.teams-form { display: grid; gap: 9px; }
.teams-form > div { min-height: 54px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); }
.form-team { min-width: 0; display: flex; align-items: center; gap: 8px; }
.form-team img { width: 30px; height: 30px; object-fit: contain; }
.form-team b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.form-dots { display: flex; gap: 5px; direction: ltr; }
.form-badge { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 9px; font-style: normal; font-weight: 800; }
.form-badge.is-win { background: #159f68; }.form-badge.is-draw { background: #cb8a21; }.form-badge.is-loss { background: #c94757; }
.h2h-summary { margin-bottom: 9px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.h2h-summary span { min-height: 64px; padding: 8px; display: grid; place-items: center; align-content: center; gap: 1px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); text-align: center; }
.h2h-summary b { color: var(--score); font-size: 18px; }.h2h-summary small { color: var(--muted); font-size: 7px; }
.recent-matches { display: grid; gap: 5px; }
.recent-match { min-height: 47px; padding: 6px 9px; display: grid; grid-template-columns: minmax(0, 1fr) 62px minmax(0, 1fr); align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.recent-match:last-child { border-bottom: 0; }
.recent-match span { min-width: 0; display: flex; align-items: center; gap: 6px; }.recent-match span:last-child { justify-content: flex-end; }
.recent-match img { width: 24px; height: 24px; object-fit: contain; }.recent-match b { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }.recent-match strong { color: var(--text); font-size: 11px; text-align: center; }
.match-detail-pane.lineup-pane { padding: 0; border: 0; background: transparent; box-shadow: none; }
.lineup-view { display: grid; gap: 10px; }
.lineup-switch { padding: 4px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.lineup-switch button { min-width: 0; min-height: 47px; padding: 6px 10px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: 700 9px var(--font-family, "Cairo", sans-serif); cursor: pointer; }
.lineup-switch button.is-active { background: var(--accent); color: var(--on-accent); }.lineup-switch img { width: 28px; height: 28px; object-fit: contain; }
.lineup-side { display: grid; gap: 10px; }.lineup-side[hidden] { display: none; }
.football-pitch { position: relative; overflow: hidden; width: min(100%, 620px); aspect-ratio: .72; min-height: 0; max-height: 760px; margin-inline: auto; border: 5px solid color-mix(in srgb, #112f17 80%, var(--line)); border-radius: 6px; background-color: #2f6f31; background-image: linear-gradient(90deg, rgba(255,255,255,.035) 50%, transparent 50%), radial-gradient(circle at 50% 50%, rgba(255,255,255,.035), transparent 48%); background-size: 18% 100%, 100% 100%; box-shadow: inset 0 0 60px #0e260f9c, var(--shadow-sm); direction: ltr; }
.football-pitch::before { content: ""; position: absolute; inset: 4%; border: 1px solid #ffffff4d; pointer-events: none; }
.pitch-line, .pitch-center-circle, .pitch-box, .pitch-goal { position: absolute; z-index: 0; pointer-events: none; }
.pitch-half { left: 4%; right: 4%; top: 50%; height: 1px; background: #ffffff4d; }.pitch-center-circle { left: 50%; top: 50%; width: 21%; aspect-ratio: 1; border: 1px solid #ffffff4d; border-radius: 50%; transform: translate(-50%,-50%); }.pitch-center-circle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: #ffffff75; transform: translate(-50%,-50%); }
.pitch-box { left: 25%; width: 50%; height: 15%; border: 1px solid #ffffff4d; }.pitch-box-top { top: 4%; border-top: 0; }.pitch-box-bottom { bottom: 4%; border-bottom: 0; }.pitch-goal { left: 41%; width: 18%; height: 3%; border: 1px solid #ffffff4d; }.pitch-goal-top { top: 1%; }.pitch-goal-bottom { bottom: 1%; }
.pitch-player { position: absolute; z-index: 2; left: var(--player-x); top: var(--player-y); width: 82px; display: grid; justify-items: center; gap: 2px; color: #fff; text-align: center; transform: translate(-50%,-50%); }
.pitch-avatar { position: relative; width: 53px; height: 53px; display: block; border: 3px solid #fff; border-radius: 50%; background: #fff; box-shadow: 0 5px 14px #0a1b0bb3; }.pitch-avatar > img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }.pitch-avatar > b { position: absolute; top: -8px; right: -7px; min-width: 20px; height: 20px; padding-inline: 4px; display: grid; place-items: center; border: 2px solid #2d6d30; border-radius: 50%; background: #131827; color: #fff; font-size: 8px; }
.pitch-player > strong { width: 100%; overflow: hidden; color: #fff; font-size: 8px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 2px 5px #071c09; }.player-rating { min-width: 30px; min-height: 18px; padding: 1px 5px; display: inline-grid; place-items: center; border-radius: 4px; background: #c84f48; color: #fff; font-size: 8px; font-style: normal; font-weight: 800; line-height: 1; }.player-rating.is-mid { background: #d9a72e; }.player-rating.is-high { background: #25b97c; }
.pitch-player > .player-rating { position: absolute; top: 42px; left: 55px; }.player-mark { position: absolute; min-width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid #2d6d30; border-radius: 50%; background: #13202b; color: #fff; font-size: 7px; font-style: normal; font-weight: 900; }.player-mark.is-captain { left: -7px; top: -7px; background: #3f64d7; }.player-mark.is-goal { left: -9px; top: 29px; background: #12231a; color: #46e6a1; }.player-mark.is-card { right: -7px; bottom: -5px; width: 9px; min-width: 9px; height: 13px; border: 0; border-radius: 2px; background: #f3c42f; }.player-mark.is-card.is-red { background: #e44a5f; }.player-mark.is-sub { left: -8px; bottom: -7px; background: #171c2c; color: #49e3a2; font-size: 11px; }
.formation-badge { position: absolute; z-index: 3; left: 12px; bottom: 10px; padding: 5px 11px; border-radius: 5px; background: #fff; color: #101625; font-size: 10px; font-weight: 900; direction: ltr; }
.lineup-coach { min-height: 72px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }.lineup-coach > div { display: grid; }.lineup-coach small { color: var(--muted); font-size: 8px; }.lineup-coach b { font-size: 11px; }.lineup-coach img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; background: var(--surface-soft); }
.substitutes { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }.substitutes h3 { margin: 0 0 10px; font-size: 14px; }.substitute-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }.substitute-player { min-width: 0; min-height: 52px; padding: 6px 8px; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }.substitute-player > img { width: 34px; height: 34px; object-fit: cover; border-radius: 50%; background: var(--surface); }.substitute-player > span { min-width: 0; display: grid; }.substitute-player b { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }.substitute-player small { overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: start; }
.stats-list { display: grid; gap: 13px; }
.stat-row { display: grid; gap: 5px; }
.stat-values { display: grid; grid-template-columns: 50px 1fr 50px; align-items: center; gap: 7px; text-align: center; }
.stat-values span { color: var(--score); font-size: 10px; font-weight: 800; }
.stat-values b { color: var(--muted); font-size: 8px; font-weight: 600; }
.stat-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; direction: rtl; }
.stat-side { height: 7px; display: flex; overflow: hidden; border-radius: 99px; background: var(--surface-strong); }
.stat-side:first-child { justify-content: flex-start; }.stat-side:last-child { justify-content: flex-end; }.stat-side i { display: block; height: 100%; border-radius: inherit; }
html[dir="ltr"] .stat-compare { direction: ltr; }html[dir="ltr"] .stat-side:first-child { justify-content: flex-end; }html[dir="ltr"] .stat-side:last-child { justify-content: flex-start; }
.stat-home i { background: var(--accent); }.stat-away i { background: var(--clock); }
.match-access-note { padding: 42px 22px; display: grid; justify-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-sm); text-align: center; }
.match-access-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }.match-access-icon .line-icon { width: 25px; height: 25px; }
.match-access-note h1 { margin: 0; font-size: 20px; }
.match-access-note p { max-width: 570px; margin: 0; color: var(--muted); font-size: 11px; }

/* Shared sections and forms */
.section { padding: 18px 0 40px; }
.section-head { margin-bottom: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-head.spaced { margin-top: 25px; }
.section-title { margin: 0; font-size: 19px; font-weight: 800; }
.section-note { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.section-head > .section-note { text-align: end; }
.tabs { display: flex; gap: 5px; }
.tab, .chip, .button { min-height: 40px; padding: 7px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 11px; background: var(--surface); color: var(--muted); box-shadow: var(--shadow-sm); font-weight: 600; cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease; }
.tab:hover, .tab.is-active, .chip:hover, .chip.is-active { background: var(--accent); color: var(--on-accent); }
.chip { min-height: 32px; padding-block: 5px; box-shadow: none; background: transparent; font-size: 10px; }
.button { border-color: var(--accent); background: var(--accent); color: var(--on-accent); box-shadow: none; }
.button.secondary { border-color: var(--line); background: var(--surface); color: var(--text); }
.button:hover { transform: translateY(-1px); filter: brightness(.97); }
.button:disabled { opacity: .52; cursor: not-allowed; transform: none; }
.field { width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px; outline: 0; background: var(--surface-soft); color: var(--text); transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.field:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 13%, transparent); }
.field-label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 600; }
.form-row { padding: 11px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.grid > * { min-width: 0; }
.grid.two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.info-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.info-card h1, .info-card h2, .info-card h3 { margin: 0 0 7px; font-weight: 800; }
.info-card p { margin: 0; color: var(--muted); }
.directory-card { min-height: 84px; display: flex; align-items: center; gap: 12px; }
.directory-card:hover { border-color: var(--accent); color: var(--accent); }
.directory-card img { width: 50px; height: 50px; object-fit: contain; padding: 4px; border-radius: 10px; background: var(--surface-soft); }
.directory-card b { display: block; }
.directory-card span span { color: var(--muted); font-size: 10px; }

/* Page headers */
.page-hero { padding: 18px 0 2px; }
.page-hero .container { padding: 21px 23px; border: 1px solid var(--line); border-radius: var(--radius-md); background: linear-gradient(135deg, var(--surface), var(--accent-faint)); box-shadow: var(--shadow-sm); }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 5px; color: var(--accent); font-size: 9px; font-weight: 700; }
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.page-hero h1, .hero h1 { margin: 0; font-size: clamp(23px, 4vw, 32px); font-weight: 800; line-height: 1.4; }
.page-hero p, .hero p { max-width: 720px; margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.hero { padding: 29px 0; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
.hero-panel { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.hero-panel strong { display: block; font-size: 18px; }
.hero-panel > span { color: var(--muted); font-size: 11px; }
.detail-root { padding-top: 18px; }
.tournament-identity { background: linear-gradient(135deg, var(--surface), var(--accent-faint)); }

/* Tables */
.table-shell { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.table-scroll { width: 100%; overflow-x: hidden; }
.data-table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; }
.data-table th, .data-table td { padding: 11px 9px; border-bottom: 1px solid var(--line); text-align: center; }
.data-table th { background: var(--surface-soft); color: var(--muted); font-size: 9px; font-weight: 700; }
.data-table td { font-size: 11px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--accent-faint); }
.data-table th:nth-child(1), .data-table td:nth-child(1) { width: 7%; }.data-table th:nth-child(2), .data-table td:nth-child(2) { width: 27%; }
.scorer-table th:nth-child(1), .scorer-table td:nth-child(1) { width: 10%; }.scorer-table th:nth-child(2), .scorer-table td:nth-child(2) { width: 43%; }.scorer-table th:nth-child(3), .scorer-table td:nth-child(3) { width: 29%; }.scorer-table th:nth-child(4), .scorer-table td:nth-child(4) { width: 18%; }
.table-team { display: flex; align-items: center; gap: 8px; text-align: right; font-weight: 600; }
.table-team img { width: 29px; height: 29px; object-fit: contain; }
.rank { width: 29px; height: 29px; display: inline-grid; place-items: center; border-radius: 9px; background: var(--surface-soft); font-weight: 700; }
.data-table tbody tr:nth-child(1) .rank { background: var(--accent); color: var(--on-accent); }
.metric-value { min-width: 35px; min-height: 31px; padding: 4px 8px; display: inline-grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 13px; }
.scorer-table { min-width: 0; }
.scorer-player img { border-radius: 50%; background: var(--surface-soft); object-fit: cover; }
.group-heading td { padding: 7px 12px; background: var(--accent); color: var(--on-accent); text-align: right; font-size: 10px; font-weight: 700; }

/* Tournament */
.tournament-tabs { position: sticky; top: calc(var(--header-height) + 8px); z-index: 30; margin-top: 13px; padding: 5px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-glass); box-shadow: var(--shadow-sm); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.tournament-tab { min-height: 43px; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; }
.tournament-tab:hover, .tournament-tab.is-active { background: var(--accent); color: var(--on-accent); }
.tournament-tab:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.tournament-pane { padding-top: 14px; }
.rounds-list { display: grid; gap: 11px; }
.round-block { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.round-heading { min-height: 46px; padding: 9px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface-soft); color: var(--text); font-weight: 800; }
.round-heading small { color: var(--muted); font-size: 8px; font-weight: 600; }
.round-content { padding: 10px; display: grid; gap: 17px; }
.round-date h3 { margin: 0 0 8px; padding-inline-start: 9px; border-inline-start: 3px solid var(--accent); color: var(--muted); font-size: 10px; }
.tournament-pane .round-content .match-main { min-height: 90px; }
.tournament-pane .round-content .team-logo { width: 40px; height: 40px; }

/* Team */
.profile { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 13px; }
.profile-side { padding: 20px; text-align: center; }
.profile-logo { width: 102px; height: 102px; margin: 0 auto 11px; object-fit: contain; }
.profile-meta { color: var(--muted); font-size: 11px; }
.players-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.player-card { min-width: 0; padding: 11px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-sm); }
.player-card img { width: 41px; height: 41px; flex: 0 0 41px; object-fit: cover; border-radius: 50%; background: var(--surface-soft); }
.player-card span { min-width: 0; }
.player-card b { overflow: hidden; display: block; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.player-card small { color: var(--muted); font-size: 8px; }

/* Predictions */
.prediction-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(285px, .78fr); gap: 15px; align-items: start; }
.prediction-panel { padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.prediction-panel + .prediction-panel { margin-top: 12px; }
.prediction-rules { margin-top: 15px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.prediction-rule { padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-glass); text-align: center; }
.prediction-rule b { display: block; color: var(--accent); font-size: 21px; font-weight: 800; }
.prediction-rule small { color: var(--muted); font-size: 8px; }
.auth-tabs { margin-bottom: 12px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.auth-form { display: grid; gap: 10px; }
.auth-form .button { width: 100%; }
.account-strip { padding: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: 10px; background: var(--surface-soft); }
.account-strip span { min-width: 0; display: grid; }
.account-strip small { color: var(--muted); font-size: 8px; }
.prediction-match { padding: 12px; display: grid; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.prediction-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; }
.prediction-team { min-width: 0; display: grid; place-items: center; gap: 5px; font-size: 11px; font-weight: 700; }
.prediction-team img { width: 46px; height: 46px; object-fit: contain; }
.prediction-form { display: grid; justify-items: center; gap: 9px; }
.score-inputs { display: flex; align-items: center; justify-content: center; gap: 6px; direction: rtl; }
.score-input { width: 52px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: var(--text); text-align: center; font-weight: 800; }
.leaderboard-list { display: grid; gap: 5px; }
.leader-row { padding: 10px; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 8px; border-radius: 10px; background: var(--surface-soft); }
.leader-row.is-king { color: #764c0d; background: linear-gradient(135deg, #fff5cf, #f3d486); }
html[data-theme="dark"] .leader-row.is-king { color: #ffe39b; background: linear-gradient(135deg, #4b3813, #2a2417); }
.leader-rank { font-weight: 800; text-align: center; }
.leader-user { min-width: 0; display: grid; }
.leader-user b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader-user small { color: var(--muted); font-size: 8px; }
.leader-points { color: var(--accent); font-size: 10px; font-weight: 800; }

/* Content pages */
.content-page { width: min(880px, calc(100% - 28px)); margin: 18px auto 0; }
.policy-card { padding: clamp(21px, 4vw, 42px); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.policy-card h1 { margin: 0 0 9px; font-size: clamp(25px, 4vw, 36px); font-weight: 800; }
.policy-card h2 { margin: 28px 0 8px; font-size: 18px; font-weight: 800; }
.policy-card p, .policy-card li { color: var(--muted); line-height: 2; }
.policy-card a { color: var(--accent); font-weight: 700; }
.contact-message { min-height: 160px; resize: vertical; }
.form-success { color: var(--success); font-weight: 700; }
.form-error { color: var(--danger); font-weight: 700; }

/* States */
.state-box { min-height: 155px; padding: 24px; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--muted); text-align: center; }
.state-box strong { display: block; margin-bottom: 4px; color: var(--text); }
.skeleton { min-height: 96px; border-radius: var(--radius-md); background: linear-gradient(90deg, var(--surface-soft), var(--surface), var(--surface-soft)); background-size: 220% 100%; animation: shimmer 1.2s infinite linear; }
.loading-match-card, .loading-news-card, .loading-article, .loading-details { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.loading-match-card { min-height: 170px; padding: 11px; display: grid; gap: 12px; }
.loading-match-main { display: grid; grid-template-columns: 1fr 74px 1fr; align-items: center; gap: 9px; }
.loading-match-main > span { min-width: 0; display: grid; justify-items: center; gap: 8px; }.loading-match-center { align-content: center; }
.loading-match-foot { padding-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid var(--line); }
.loading-logo { width: 44px; height: 44px; border-radius: 50%; }.loading-pill { width: 58px; height: 26px; border-radius: 6px; }
.loading-line { width: 100%; height: 8px; border-radius: 3px; }.loading-line-short { width: 28%; }.loading-line-half { width: 58%; }.loading-line-tiny { width: 34px; }.loading-line-title { width: 76%; height: 20px; }
.loading-news-card { min-height: 150px; display: grid; grid-template-columns: minmax(110px, .7fr) 1fr; gap: 12px; padding: 10px; }.loading-news-card > div { padding: 7px 2px; display: grid; align-content: center; gap: 10px; }
.loading-news-card.is-compact { min-height: 118px; grid-template-columns: 105px 1fr; }
.loading-news-image { min-height: 128px; border-radius: 6px; }.loading-news-card.is-compact .loading-news-image { min-height: 96px; }
.loading-article { padding: 18px; display: grid; gap: 13px; }.loading-article .loading-news-image { min-height: 280px; }
.loading-details { min-height: 560px; padding: 12px; display: grid; align-content: start; gap: 18px; }
.loading-detail-actions { display: grid; grid-template-columns: 38px 1fr 82px; gap: 9px; }.loading-detail-actions i:first-child, .loading-detail-actions i:last-child { height: 38px; border-radius: 9px; }.loading-detail-actions i:nth-child(2) { width: 42%; height: 13px; margin: auto; border-radius: 4px; }
.loading-detail-score { min-height: 170px; display: grid; grid-template-columns: 1fr 90px 1fr; align-items: center; gap: 9px; }.loading-detail-score > span { display: grid; justify-items: center; gap: 10px; }.loading-detail-score .loading-logo { width: 72px; height: 72px; }
.loading-detail-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; }.loading-detail-tabs i { height: 43px; }
.loading-detail-rows { display: grid; gap: 1px; }.loading-detail-rows i { height: 55px; border-radius: 3px; }
.loading-match-card i, .loading-news-card i, .loading-article i, .loading-details i { display: block; background: linear-gradient(90deg, var(--surface-soft), var(--surface-strong), var(--surface-soft)); background-size: 220% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -220% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton, .loading-match-card i, .loading-news-card i, .loading-article i, .loading-details i { animation: none; } }
.toast { position: fixed; inset-inline: 18px; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 140; width: min(430px, calc(100% - 36px)); margin-inline: auto; padding: 12px 15px; border-radius: 13px; background: var(--navy); color: var(--bg); box-shadow: var(--shadow-md); text-align: center; font-size: 11px; opacity: 0; transform: translateY(15px); pointer-events: none; transition: .24s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

/* Theme studio */
.theme-backdrop { position: fixed; inset: 0; z-index: 110; background: rgba(20, 16, 12, .42); opacity: 0; visibility: hidden; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: opacity .22s ease, visibility .22s ease; }
.theme-backdrop.is-open { opacity: 1; visibility: visible; }
.theme-dialog { position: fixed; inset-inline: 0; bottom: 0; z-index: 120; width: min(540px, 100%); max-height: min(84vh, 690px); margin-inline: auto; padding: 9px 18px calc(20px + env(safe-area-inset-bottom)); overflow-y: auto; border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; background: var(--surface-glass); box-shadow: 0 -18px 60px rgba(25, 18, 12, .2); opacity: 0; visibility: hidden; transform: translateY(26px); -webkit-backdrop-filter: blur(26px) saturate(1.35); backdrop-filter: blur(26px) saturate(1.35); transition: opacity .22s ease, visibility .22s ease, transform .22s ease; }
.theme-dialog.is-open { opacity: 1; visibility: visible; transform: none; }
.sheet-handle { width: 58px; height: 5px; margin: 0 auto 14px; border-radius: 6px; background: var(--surface-strong); }
.theme-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.theme-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.theme-head p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.theme-close { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); color: var(--text); cursor: pointer; }
.theme-section-title { margin: 19px 0 8px; font-size: 11px; font-weight: 700; }
.mode-picker { padding: 4px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.mode-choice { min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; }
.mode-choice.is-selected { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
.theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.theme-option { min-width: 0; padding: 8px; display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--text); text-align: start; cursor: pointer; }
.theme-option.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 14%, transparent); }
.theme-preview { --preview: #155eef; height: 64px; padding: 8px; display: grid; gap: 6px; border-radius: 9px; background: #f2f6ff; }
.theme-preview[data-preview="royal"] { --preview: #155eef; background: #f2f6ff; }
.theme-preview[data-preview="ruby"] { --preview: #b72842; background: #fff6f7; }
.theme-preview[data-preview="forest"] { --preview: #267457; background: #f3f8f5; }
.theme-preview[data-preview="violet"] { --preview: #6941c6; background: #f7f4ff; }
.theme-preview[data-preview="aqua"] { --preview: #087e8b; background: #f0f9fa; }
.theme-preview[data-preview="amber"] { --preview: #b65f09; background: #fff8ed; }
.preview-bar { height: 11px; border-radius: 4px; background: var(--preview); opacity: .92; }
.preview-lines { display: grid; grid-template-columns: 1fr .55fr; gap: 5px; }
.preview-lines i { display: block; border-radius: 4px; background: color-mix(in srgb, var(--preview) 24%, white); }
.preview-card { display: grid; grid-template-columns: 1fr 24px 1fr; gap: 5px; }
.preview-card i { height: 22px; display: block; border-radius: 5px; background: color-mix(in srgb, var(--preview) 13%, white); }
.preview-card i:nth-child(2) { background: var(--preview); opacity: .7; }
.theme-option > span:last-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10px; font-weight: 700; }
.theme-check { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: transparent; font-size: 10px; }
.theme-option.is-selected .theme-check { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.theme-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.theme-choice-grid.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.style-choice { min-height: 42px; padding: 8px 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); font-size: 10px; font-weight: 700; cursor: pointer; }
.style-choice.is-selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); }
.theme-reset { width: 100%; min-height: 42px; margin-top: 17px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); color: var(--text); font-size: 10px; font-weight: 700; cursor: pointer; }

html[data-density="compact"] .match-main { min-height: 78px; padding-block: 7px; }
html[data-density="compact"] .team-logo { width: 40px; height: 40px; }
html[data-density="compact"] .match-footer { min-height: 34px; padding-block: 5px; }
html[data-density="compact"] .news-card-body { padding: 9px; }
html[data-density="compact"] .section-card { padding: 10px; }

/* Footer and mobile dock */
.site-footer { margin-top: 26px; padding: 34px 0 calc(32px + env(safe-area-inset-bottom)); background: #171310; color: #fff; }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-footer .brand-name, .site-footer .footer-links, .site-footer a { color: #fff; }
.site-footer .brand-sub { color: #d5a061; }
.footer-brand { max-width: 420px; }
.footer-brand-link { min-width: 0; }
.footer-brand p { margin: 10px 0; color: #b9afa7; font-size: 10px; }
.copyright { color: #92887f; font-size: 9px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 13px; color: #c9c1ba; font-size: 10px; }
.footer-links a:hover { color: #fff; }
.footer-groups { display: grid; grid-template-columns: repeat(2, minmax(130px, 1fr)); gap: 42px; }
.footer-groups > div { display: grid; align-content: start; gap: 7px; }
.footer-groups b { margin-bottom: 3px; color: #d5a061; font-size: 11px; }
.footer-groups a { color: #d7d0ca; font-size: 9px; }
.footer-groups a:hover { color: #fff; }
.mobile-nav { display: none; }

@media (max-width: 980px) {
  .main-nav a { padding-inline: 8px; font-size: 11px; }
  .main-nav a .line-icon { display: none; }
  .home-layout { grid-template-columns: minmax(0, 1.65fr) minmax(270px, .8fr); gap: 13px; }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prediction-layout { grid-template-columns: 1fr; }
  .players-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  :root { --header-height: 66px; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .container { width: min(calc(100% - 20px), var(--content)); }
  .header-main { position: relative; width: calc(100% - 20px); justify-content: center; }
  .header-main > .brand { position: absolute; left: 50%; min-width: 0; margin: 0; justify-content: center; transform: translateX(-50%); }
  .header-main > .brand .brand-mark { display: none; }
  .header-main > .brand .brand-sub { display: none; }
  .brand-name { font-size: 16px; }
  .menu-button { display: none; }
  .header-main > .language-button { position: absolute; right: 0; min-width: 42px; width: 42px; padding: 0; }
  .header-main > .language-button .line-icon { width: 17px; height: 17px; }
  .header-main > .language-button span { font-size: 8px; }
  .header-main > .theme-button { position: absolute; left: 0; }
  .main-nav { position: fixed; z-index: 80; top: 0; bottom: 0; inset-inline-end: 0; width: min(320px, 78vw); margin: 0; padding: calc(var(--header-height) + 28px) 15px 95px; display: grid; align-content: start; gap: 5px; overflow-y: auto; opacity: 0; visibility: hidden; pointer-events: none; border-inline-start: 1px solid var(--line); background: var(--surface-glass); box-shadow: var(--shadow-md); transform: none; -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); transition: opacity .2s ease, visibility .2s ease; }
  .main-nav.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
  .main-nav a { width: 100%; min-height: 48px; justify-content: flex-start; padding: 10px 12px; font-size: 13px; }
  .main-nav a .line-icon { display: block; }
  .league-track { width: calc(100% - 20px); }
  .home-layout { grid-template-columns: minmax(0, 1fr); }
  .home-center { order: 1; }
  .home-news { order: 2; }
  .home-news .news-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile { grid-template-columns: 1fr; }
  .profile-side { max-width: 100%; }
  .mobile-nav { position: fixed; inset-inline: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 90; height: 66px; padding: 5px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface-glass); box-shadow: 0 12px 38px rgba(24, 18, 12, .2); -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4); }
  .mobile-nav a { min-width: 0; display: grid; place-items: center; align-content: center; gap: 2px; border-radius: 14px; color: var(--muted); font-size: 7px; font-weight: 600; }
  .mobile-nav a .line-icon { width: 20px; height: 20px; }
  .mobile-nav a[aria-current="page"] { background: var(--accent); color: var(--on-accent); }
  .site-footer { padding-bottom: 40px; }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
}

  .majed-home-ad{
    width:100%;
    min-height:50px;
    display:grid;
    place-items:center;
    margin:0 auto 18px;
    overflow:hidden;
    }

  .majed-home-ad.is-empty{
    display:none;
    }

  .majed-home-ad .adx-label{
    display:block;
    width:100%;
    margin-bottom:4px;
    text-align:center;
    font-size:9px;
    color:#98a2b3;
    }

  .majed-home-ad .adx-slot{
    max-width:100%;
    overflow:hidden;
    }

  .majed-home-ad .adx-slot iframe{
    max-width:100%!important;
    }


@media (max-width: 680px) {
  body { font-size: 13px; }
  .header-main { gap: 8px; }
  .theme-button, .language-button { width: 40px; height: 40px; border-radius: 11px; }
  .league-strip, .league-track { height: 58px; }
  .league-chip { height: 39px; padding-inline: 10px; border-radius: 12px; font-size: 10px; }
  .league-chip img { width: 25px; height: 25px; }
  .home-shell { padding-top: 10px; }
  .match-title-bar { min-height: 70px; padding: 9px 96px 9px 10px; }
  .match-title-bar h1 { font-size: 14px; }
  .scope-toggle { max-width: 84px; min-height: 38px; padding-inline: 7px; font-size: 8px; }
  .schedule-toolbar .tab { min-height: 42px; font-size: 11px; }
  .match-card { border-radius: 11px; }
  .match-main { min-height: 86px; padding: 7px; grid-template-columns: minmax(0, 1fr) minmax(78px, .65fr) minmax(0, 1fr); gap: 3px; }
  .team { gap: 4px; }
  .team-logo { width: 36px; height: 36px; flex-basis: 36px; }
  .team-name { font-size: 8px; }
  .match-result { font-size: 17px; }
  .match-time { font-size: 13px; }
  .status { min-width: 64px; min-height: 21px; padding-inline: 6px; font-size: 7px; }
  .live-clock { min-width: 58px; min-height: 23px; padding-inline: 7px; }
  .live-clock b { font-size: 7.5px; }
  .live-clock .line-icon { width: 11px; height: 11px; flex-basis: 11px; }
  .match-footer { min-height: 32px; padding-inline: 5px; }
  .broadcast-item { gap: 4px; }
  .ui-icon { width: 13px; height: 13px; flex-basis: 13px; }
  html[data-card-style="compact"] .match-main { min-height: 68px; padding-block: 6px; grid-template-columns: minmax(0, 1fr) 78px minmax(0, 1fr); }
  html[data-card-style="compact"] .team-logo { width: 30px; height: 30px; flex-basis: 30px; }
  html[data-card-style="classic"] .match-main { min-height: 94px; }
  html[data-card-style="classic"] .team-logo { width: 36px; height: 36px; flex-basis: 36px; }
  .side-box { border-radius: 11px; }
  .home-news .news-list { grid-template-columns: 1fr; }
  .news-card { grid-template-columns: 80px minmax(0, 1fr); }
  .news-image { width: 80px; height: 70px; }
  .section-head { align-items: flex-start; }
  .grid, .grid.two-column, .players-grid, .news-grid, .news-page-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .prediction-rules { grid-template-columns: repeat(3, 1fr); }
  .prediction-rule { padding-inline: 5px; }
  .prediction-rule b { font-size: 18px; }
  .prediction-rule small { font-size: 7px; }
  .match-detail-shell { width: calc(100% - 20px); margin-top: 10px; }
  .detail-actionbar { min-height: 52px; padding-inline: 8px; grid-template-columns: 76px minmax(0, 1fr) 76px; }
  .detail-actionbar > button, .detail-tools button { width: 34px; height: 34px; border-radius: 9px; }
  .detail-competition { font-size: 8px; }
  .detail-scoreboard { min-height: 143px; padding: 16px 8px 12px; grid-template-columns: minmax(0, 1fr) 86px minmax(0, 1fr); gap: 5px; }
  .detail-team { gap: 5px; }
  .detail-team img { width: 53px; height: 53px; }
  .detail-team b { font-size: 9px; }
  .detail-center { gap: 5px; }
  .detail-result { gap: 6px; font-size: 21px; }
  .detail-result i { font-size: 13px; }
  .detail-kickoff { font-size: 16px; }
  .detail-venue-line { padding-inline: 8px; gap: 7px 12px; font-size: 7px; }
  .match-detail-tabs { top: calc(var(--header-height) + 6px); }
  .match-detail-tab { min-height: 39px; padding-inline: 3px; font-size: 8px; }
  .match-detail-pane:not([data-detail-pane="details"]) { padding: 10px; }
  .match-detail-pane.lineup-pane { padding: 0; }
  .detail-info, .detail-subsection { padding: 11px; }
  .detail-info h2, .detail-subsection h2 { font-size: 13px; }
  .detail-fact { min-height: 55px; grid-template-columns: 27px 82px minmax(0, 1fr) 15px; gap: 6px; padding-inline: 8px; }
  .detail-fact small { font-size: 7px; }.detail-fact b { font-size: 8px; }
  .events-toolbar { min-height: 72px; padding: 9px; align-items: flex-start; flex-direction: column; }
  .event-filter { width: 100%; max-width: none; flex-basis: auto; }
  .event-filter button { min-height: 32px; }
  .event-list { padding-inline: 5px; }
  .timeline-event { min-height: 68px; grid-template-columns: minmax(0, 1fr) 43px minmax(0, 1fr); }
  .timeline-event-card { min-height: 50px; padding: 6px; grid-template-columns: minmax(0,1fr) 22px 25px; gap: 4px; }
  html[dir="ltr"] .timeline-event-card { grid-template-columns: 25px 22px minmax(0,1fr); }
  .timeline-minute { width: 38px; font-size: 8px; }
  .event-copy b { font-size: 7.5px; }.event-copy small { font-size: 6.5px; }
  .event-video { width: 24px; height: 24px; }.event-ball, .event-sub-icon { width: 22px; height: 22px; font-size: 11px; }
  .football-pitch { min-height: 0; }
  .pitch-player { width: 64px; }
  .pitch-avatar { width: 43px; height: 43px; border-width: 2px; }
  .pitch-avatar > b { top: -6px; right: -5px; min-width: 17px; height: 17px; border-width: 1px; font-size: 7px; }
  .pitch-player > strong { font-size: 7px; }.pitch-player > .player-rating { top: 34px; left: 42px; min-width: 25px; min-height: 16px; font-size: 7px; }
  .player-mark { min-width: 15px; height: 15px; font-size: 6px; }.player-mark.is-goal { top: 23px; }.player-mark.is-card { width: 8px; min-width: 8px; height: 11px; }.player-mark.is-sub { font-size: 9px; }
  .substitute-grid { grid-template-columns: 1fr; }
  .form-team b { max-width: 105px; font-size: 8px; }.form-badge { width: 23px; height: 23px; font-size: 8px; }.form-dots { gap: 3px; }
  .recent-match { grid-template-columns: minmax(0, 1fr) 49px minmax(0, 1fr); padding-inline: 2px; }.recent-match img { width: 21px; height: 21px; }.recent-match b { font-size: 7px; }
  .loading-news-card { grid-template-columns: 92px 1fr; }.loading-news-image { min-height: 104px; }.loading-article .loading-news-image { min-height: 190px; }
  .footer-grid { align-items: flex-start; flex-direction: column; }
  .footer-groups { width: 100%; gap: 20px; }
  .tournament-tabs { top: calc(var(--header-height) + 6px); }
  .tournament-tab { padding-inline: 4px; font-size: 10px; }
  .data-table th, .data-table td { padding: 8px 3px; font-size: 8px; }
  .data-table .table-secondary { display: none; }
  .data-table th:nth-child(1), .data-table td:nth-child(1) { width: 10%; }.data-table th:nth-child(2), .data-table td:nth-child(2) { width: 36%; }
  .table-team { gap: 5px; }.table-team img { width: 24px; height: 24px; }.table-team span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rank { width: 24px; height: 24px; border-radius: 7px; }.metric-value { min-width: 29px; min-height: 27px; padding: 3px 5px; font-size: 10px; }
  .scorer-table th:nth-child(1), .scorer-table td:nth-child(1) { width: 11%; }.scorer-table th:nth-child(2), .scorer-table td:nth-child(2) { width: 48%; }.scorer-table th:nth-child(3), .scorer-table td:nth-child(3) { width: 25%; }.scorer-table th:nth-child(4), .scorer-table td:nth-child(4) { width: 16%; }
}

@media (max-width: 390px) {
  .brand-name { font-size: 14px; }
  .brand-sub { display: none; }
  .brand-mark { width: 37px; height: 37px; flex-basis: 37px; }
  .theme-button, .language-button { width: 38px; height: 38px; }
  .match-title-bar { padding-inline: 90px 8px; }
  .match-main { grid-template-columns: minmax(0, 1fr) 74px minmax(0, 1fr); }
  .team-logo { width: 34px; height: 34px; }
  .theme-dialog { padding-inline: 14px; }
  .theme-grid { gap: 7px; }
}

@media (min-width: 821px) {
  .theme-dialog { inset-inline: auto 28px; bottom: 28px; width: 440px; max-height: calc(100vh - 56px); border-bottom: 1px solid var(--line); border-radius: 18px; transform: translateY(18px) scale(.98); transform-origin: bottom right; }
  .theme-dialog.is-open { transform: none; }
  .sheet-handle { display: none; }
}

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

/* 2026-08-09y: harden every public view against horizontal overflow. */
html { width: 100%; max-width: 100%; overflow-x: hidden; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { width: 100%; max-width: 100%; overflow-x: hidden; }
main, section, article, .container, .home-layout, .home-center, .home-sidebar, .match-card, .match-main, .match-detail-shell, .match-detail-pane, .article-shell, .policy-card { min-width: 0; max-width: 100%; }
iframe, video, embed, object { max-width: 100%; }
table { max-width: 100%; }
.table-wrap, .standings-wrap, .scorers-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
.article-body, .news-detail-content { overflow-wrap: anywhere; }
.article-body pre, .news-detail-content pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; }

@media (max-width: 390px) {
  .container, .header-main, .league-track { width: calc(100% - 12px); }
  .match-title-bar { padding-inline: 82px 6px; }
  .match-main { grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr); padding-inline: 4px; }
  .status { min-width: 0; max-width: 70px; white-space: normal; line-height: 1.35; text-align: center; }
  .team-name { white-space: normal; overflow-wrap: anywhere; }
  .detail-scoreboard { grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr); padding-inline: 4px; }
  .detail-team b { white-space: normal; overflow-wrap: anywhere; }
  .mobile-nav { inset-inline: 5px; }
}

/* Responsive Google Ad Manager placements. */
.majed-ad {
  width: min(100%, 850px);
  min-width: 0;
  min-height: 280px;
  margin: 16px auto;
  padding: 6px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.home-center > .majed-ad { width: 100%; }
.majed-ad[hidden], .majed-ad[data-ad-state="empty"] { display: none !important; min-height: 0; margin: 0; padding: 0; }
.majed-ad-label { margin-bottom: 4px; color: var(--muted); font-size: 8px; line-height: 1; }
.majed-ad-slot { width: 100%; min-width: 0; min-height: 250px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.majed-ad-slot iframe { max-width: 100%; }
.majed-ad.is-compact, .majed-ad.is-compact .majed-ad-slot { min-height: 0; }

@media (max-width: 480px) {
  .majed-ad { width: 100%; min-height: 250px; margin-block: 10px; }
  .majed-ad-slot { min-height: 250px; }
  .majed-ad.is-compact, .majed-ad.is-compact .majed-ad-slot { min-height: 0; }
}

@media (max-width: 319px) {
  .majed-ad { display: none !important; }
}

/* Policy-compliant rewarded opt-in on the main site. */
.reward-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: max(14px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  display: grid;
  place-items: center;
  overflow: auto;
  background: rgba(20, 12, 15, .62);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: opacity .18s ease, visibility .18s ease;
}
.reward-backdrop.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
body.reward-open { overflow: hidden; }
.reward-dialog {
  width: min(440px, 100%);
  max-height: min(680px, calc(100dvh - 28px));
  overflow: auto;
  padding: clamp(20px, 5vw, 30px);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  color: var(--text);
  box-shadow: 0 28px 90px rgba(44, 11, 22, .3);
  text-align: center;
}
.reward-icon { width: 48px; height: 48px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 21px; }
.reward-dialog h2 { margin: 0 0 8px; font-size: clamp(19px, 5vw, 24px); line-height: 1.5; }
.reward-dialog > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.9; }
.reward-benefits { margin: 16px 0; padding: 12px 30px 12px 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--accent-faint); color: var(--text); text-align: start; font-size: 11px; }
.reward-benefits li::marker { color: var(--accent); }
.reward-status { min-height: 22px; color: var(--accent) !important; font-weight: 700; }
.reward-actions { margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 9px; }
.reward-actions .button { width: 100%; min-width: 0; min-height: 44px; margin: 0; }
.button-quiet { border: 1px solid var(--line-strong); background: var(--surface-soft); color: var(--text); box-shadow: none; }

@media (max-width: 420px) {
  .reward-dialog { padding: 19px 15px; border-radius: 10px; }
  .reward-benefits { grid-template-columns: 1fr; }
  .reward-actions { grid-template-columns: 1fr; }
}
