/* KulliQ matches — a page of its own: midnight navy and gold, Cairo, phone first.
   Light and dark follow the device; the header, the day pill and the open match stay navy and gold.
   Match colours: live red · today gold · coming blue · finished grey · postponed amber. */
:root {
  --navy: #0a0f1f; --navy-2: #141d3d;
  --gold: #e3b84f; --gold-2: #f6d88a; --gold-3: #b88a2a; --gold-ink: #7a5710; --gold-soft: #fbf1d5;
  --bg: #eef1f7; --surface: #ffffff; --ink: #0d1324; --muted: #5d6680; --line: #e0e4ee;
  --blue: #3563ff; --blue-soft: #e8eeff; --blue-ink: #2347cc;
  --live: #e8344f; --live-ink: #b51d38;
  --amber: #c9782b; --amber-soft: #fbefe2;
  --done-bg: #eef0f4; --done-line: #dde1ea; --done-edge: #c4cad6; --done-score: #747d91; --done-tag: #e1e5ec;
  --wash: 14%;
  --font: "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(10, 15, 31, .05), 0 8px 24px rgba(10, 15, 31, .07);
  --navyGrad: linear-gradient(160deg, #141d3d, #0a0f1f);
  --goldGrad: linear-gradient(135deg, #f6d88a, #e3b84f 55%, #b88a2a);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
img, svg { display: block; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(980px, calc(100% - 28px)); margin-inline: auto; padding: max(14px, env(safe-area-inset-top)) 0 max(28px, env(safe-area-inset-bottom)); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; padding: .65rem 1.1rem; font-weight: 800;
}
.btn.small { padding: .4rem .9rem; font-size: .88rem; border-radius: 10px; }
.btn.gold { background: var(--goldGrad); border-color: transparent; color: #241a05; }
.btn:hover { filter: brightness(1.04); }
.linkBtn { border: 0; background: none; padding: 0; cursor: pointer; color: var(--blue-ink); font-weight: 800; font-size: .84rem; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- header: league, flag, the ball, the leader ---------- */
.mHero {
  position: relative; overflow: hidden; isolation: isolate; display: grid; gap: 14px; padding: 22px 18px 18px; border-radius: 24px; color: #fff;
  grid-template-columns: 1fr; grid-template-areas: "txt" "leader";
  background:
    radial-gradient(380px 220px at 0% 0%, rgba(227, 184, 79, .22), transparent 70%),
    radial-gradient(420px 260px at 100% 110%, rgba(53, 99, 255, .3), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .028) 0 2px, transparent 2px 13px),
    linear-gradient(160deg, #0b1124, #141d3d 58%, #0a0f1f);
  box-shadow: inset 0 0 0 1px rgba(227, 184, 79, .28), 0 18px 40px rgba(10, 15, 31, .22);
}
.mHero::after { content: ""; position: absolute; inset: 0 12% auto; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.mHero > * { position: relative; }
.mHeroTxt { grid-area: txt; min-width: 0; align-self: center; padding-inline-end: 64px; }
.kicker { margin: 0 0 6px; color: var(--gold-2); font-size: .8rem; font-weight: 800; }
.mHero h1 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: clamp(1.15rem, 5.1vw, 2.25rem); font-weight: 900; line-height: 1.25; }
.tz { margin: 6px 0 0; color: rgba(255, 255, 255, .7); font-size: .84rem; font-weight: 600; }

/* the ball (drawn and turned by fx.js): drops in and bounces, then floats; a tap kicks it up */
.heroBall {
  --bs: 54px; grid-area: ball; position: absolute; top: 12px; left: 12px; width: calc(var(--bs) + 14px); height: calc(var(--bs) * 1.42);
  padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.heroBall:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 12px; }
.hbBall { position: absolute; top: 0; left: 50%; width: var(--bs); height: var(--bs); margin-left: calc(var(--bs) / -2); transform-origin: 50% 100%; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .45)); }
.hbBall svg { width: 100%; height: 100%; }
.hbShadow { position: absolute; bottom: 2px; left: 50%; width: calc(var(--bs) * .8); height: calc(var(--bs) * .16); margin-left: calc(var(--bs) * -.4); border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent); transform: scale(.8); }
.hbGlow { position: absolute; top: calc(var(--bs) / 2); left: 50%; width: calc(var(--bs) * 1.9); height: calc(var(--bs) * 1.9); margin: calc(var(--bs) * -.95) 0 0 calc(var(--bs) * -.95); border-radius: 50%; background: radial-gradient(closest-side, rgba(227, 184, 79, .34), transparent 72%); }
.heroBall.in .hbBall { animation: hbDrop 1.35s cubic-bezier(.33, 0, .3, 1) both; }
.heroBall.in .hbShadow { animation: hbShadowDrop 1.35s cubic-bezier(.33, 0, .3, 1) both; }
.heroBall.idle .hbBall { animation: hbFloat 3.6s ease-in-out infinite; }
.heroBall.idle .hbShadow { animation: hbShadowFloat 3.6s ease-in-out infinite; }
.heroBall.idle .hbGlow { animation: hbGlow 3.6s ease-in-out infinite; }
.heroBall.kick .hbBall { animation: hbKick 1s cubic-bezier(.2, .7, .3, 1) both; }
.heroBall.kick .hbShadow { animation: hbShadowKick 1s ease both; }
.hbSparks i {
  position: absolute; top: calc(var(--bs) * .9); left: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%;
  background: var(--gold-2); box-shadow: 0 0 8px var(--gold); opacity: 0; animation: spark .8s ease-out var(--d) forwards;
}
@keyframes hbDrop {
  0% { transform: translateY(-170px); }
  36% { transform: translateY(14px) scale(1.14, .84); }
  54% { transform: translateY(-34px) scale(.96, 1.05); }
  70% { transform: translateY(14px) scale(1.07, .92); }
  82% { transform: translateY(-9px); }
  92% { transform: translateY(14px) scale(1.02, .98); }
  100% { transform: translateY(0); }
}
@keyframes hbShadowDrop { 0% { transform: scale(.25); opacity: .1; } 36%, 70%, 92% { transform: scale(1.05); opacity: 1; } 54% { transform: scale(.55); opacity: .45; } 82% { transform: scale(.85); } 100% { transform: scale(.8); opacity: .85; } }
@keyframes hbFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes hbShadowFloat { 0%, 100% { transform: scale(.8); opacity: .85; } 50% { transform: scale(.6); opacity: .5; } }
@keyframes hbGlow { 50% { opacity: .55; transform: scale(.9); } }
@keyframes hbSpin { to { transform: rotate(360deg); } }
@keyframes hbKick { 0% { transform: translateY(0); } 12% { transform: translateY(10px) scale(1.12, .86); } 48% { transform: translateY(-74px) scale(.97, 1.03); } 82% { transform: translateY(12px) scale(1.06, .93); } 100% { transform: translateY(0); } }
@keyframes hbShadowKick { 48% { transform: scale(.3); opacity: .2; } }
@keyframes spark { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(.3); } }

/* the flag: a gold pole and finial, the cloth waving in 24 slices, a light passing over it */
.flag { --fw: 38px; --fh: 25.33px; position: relative; display: inline-flex; align-items: flex-start; flex: none; direction: ltr; padding-top: 6px; }
.flag::before {
  content: ""; position: absolute; inset: -8px -14px -10px -6px; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(227, 184, 79, .3), transparent); animation: glow 3.2s ease-in-out infinite;
}
.pole {
  position: relative; width: 3.5px; height: calc(var(--fh) + 16px); margin-top: -3px; border-radius: 2px;
  background: linear-gradient(90deg, #7a5516, #ffeab0 45%, #c8952f 70%, #7a5516); box-shadow: 1px 1px 2px rgba(0, 0, 0, .35);
}
.pole::before {
  content: ""; position: absolute; top: -6px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fffbe8, #f0c45a 50%, #8a6420); box-shadow: 0 0 8px rgba(250, 199, 117, .9);
}
.cloth { position: relative; display: flex; width: var(--fw); height: var(--fh); filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .35)); }
.cloth i {
  --a: calc((var(--i) + 3) * .1px);
  flex: 0 0 calc(var(--fw) / 24 + .6px); margin-right: -.6px; height: 100%;
  background: var(--src) no-repeat; background-size: var(--fw) var(--fh); background-position: calc(var(--i) * var(--fw) / -24) 0;
  animation: wave 2.4s ease-in-out infinite; animation-delay: calc((24 - var(--i)) * -.08s);
}
.cloth::after {
  content: ""; position: absolute; inset: -3px 0; pointer-events: none; mix-blend-mode: soft-light;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .3) 0, rgba(255, 255, 255, .28) 11px, rgba(0, 0, 0, .3) 22px) 0 0 / 44px 100%;
  animation: shade 2.4s linear infinite;
}
.sheen {
  position: absolute; inset: -3px 0; pointer-events: none; mix-blend-mode: overlay;
  background: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, .85) 50%, transparent 62%) 0 0 / 260% 100% no-repeat;
  animation: sheen 3.8s ease-in-out infinite;
}
@keyframes wave { 0%, 100% { transform: translateY(calc(var(--a) * -1)); } 50% { transform: translateY(var(--a)); } }
@keyframes shade { to { background-position: 44px 0; } }
@keyframes sheen { 0%, 45% { background-position: 130% 0; } 100% { background-position: -130% 0; } }
@keyframes glow { 50% { opacity: .45; } }

.leader {
  grid-area: leader; position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; cursor: pointer; color: #fff;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(227, 184, 79, .3); border-radius: 18px; padding: 10px 12px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
/* a gold light crosses the leader's card now and then */
.leader::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 40%, rgba(227, 184, 79, .28) 50%, transparent 60%) 0 0 / 250% 100% no-repeat;
  animation: sheen 5.5s ease-in-out 1.5s infinite;
}
.leader:hover, .leader:focus-visible { background: rgba(255, 255, 255, .12); outline: none; }
.ldTxt { display: grid; flex: 1; min-width: 0; line-height: 1.4; }
.ldTxt small { color: var(--gold-2); font-weight: 800; font-size: .74rem; }
.ldTxt b { font-size: 1.15rem; font-weight: 900; }
.ldTxt em { font-style: normal; font-size: .82rem; color: rgba(255, 255, 255, .85); font-weight: 600; }
.ldGo { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; font-size: .84rem; white-space: nowrap; color: var(--gold-2); }
.ldGo svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 760px) {
  .mHero { grid-template-columns: 1fr 210px; grid-template-areas: "txt ball" "leader ball"; gap: 16px 24px; padding: 30px; }
  .mHeroTxt { padding-inline-end: 0; }
  .heroBall { --bs: 118px; position: relative; top: auto; left: auto; align-self: center; justify-self: center; }
  .leader { max-width: 540px; }
  .flag { --fw: 54px; --fh: 36px; }
}

/* ---------- crests: the club's own crest, no frame ---------- */
.crest { position: relative; display: grid; place-items: center; flex: none; width: 50px; height: 50px; }
.crest img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(10, 15, 31, .2)); }
.crest:not(:has(img)) { border-radius: 50%; background: var(--line); }
.crest:not(:has(img))::after { content: attr(data-l); font-weight: 900; font-size: 1.15rem; color: var(--muted); }
.crest.big { width: 46px; height: 46px; }
.crest.big img, .crest.xl img { filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, .85)) drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.crest.sm { width: 26px; height: 26px; }
.crest.sm img { filter: none; }
.crest.sm:not(:has(img))::after { font-size: .8rem; }
.crest.xl { width: 96px; height: 96px; }

/* league tabs, above the header: a small flag (or a gold star) and the name */
.lgTabs { display: flex; gap: 8px; overflow-x: auto; margin: 0 -14px 12px; padding: 2px 14px; scrollbar-width: none; scroll-snap-type: x proximity; }
.lgTabs::-webkit-scrollbar { display: none; }
.lgTabs button {
  flex: none; display: inline-flex; align-items: center; gap: 8px; scroll-snap-align: start; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 99px; padding: .4rem 1rem .4rem .9rem; font-weight: 800; font-size: .92rem; min-height: 42px;
  box-shadow: var(--shadow); transition: background .25s ease, color .25s ease;
}
.lgTabs button img { width: 20px; height: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(10, 15, 31, .12); }
.lgTabs .tStar { color: var(--gold); font-size: 1rem; line-height: 1; }
.lgTabs .tBall { display: block; width: 19px; height: 19px; filter: drop-shadow(0 1px 1.5px rgba(10, 15, 31, .35)); }
.lgTabs .tBall svg, .ldBall svg { display: block; width: 100%; height: 100%; }
.lgTabs button[aria-selected="true"] { background: var(--navyGrad); border-color: var(--gold); color: var(--gold-2); }

/* matches / table: a navy pill slides between the two */
.seg {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 14px; max-width: 460px; padding: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.segInd {
  position: absolute; top: 4px; bottom: 4px; right: 4px; width: calc(50% - 6px); border-radius: 12px; background: var(--navyGrad);
  box-shadow: inset 0 0 0 1px rgba(227, 184, 79, .55), 0 4px 12px rgba(10, 15, 31, .25); transition: transform .42s cubic-bezier(.3, 1.3, .5, 1);
}
.seg.isTable .segInd { transform: translateX(calc(-100% - 4px)); }
.seg button { position: relative; z-index: 1; border: 0; background: transparent; color: var(--muted); border-radius: 12px; min-height: 46px; font-weight: 800; font-size: 1rem; cursor: pointer; transition: color .25s ease; }
.seg button[aria-selected="true"] { color: var(--gold-2); }

/* club picker, last update */
.mTools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 12px; }
.teamPick { display: flex; align-items: center; gap: 8px; flex: 1 1 240px; max-width: 360px; }
.teamPick > span:first-child { font-weight: 800; font-size: .92rem; color: var(--muted); }
.selWrap { position: relative; flex: 1; min-width: 0; }
.selWrap::after { content: ""; position: absolute; left: .95rem; top: 50%; width: 7px; height: 7px; pointer-events: none; border: solid var(--muted); border-width: 0 0 2px 2px; transform: translateY(-70%) rotate(-45deg); }
.selWrap select {
  width: 100%; appearance: none; -webkit-appearance: none; cursor: pointer; min-height: 44px; font-weight: 700;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .45rem .9rem .45rem 2.3rem;
}
.selWrap select:focus-visible { outline: 2px solid var(--gold); border-color: var(--gold); }
.upd { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; color: var(--muted); font-size: .82rem; font-weight: 600; }
.upd #status span { white-space: nowrap; }
.refresh {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; min-height: 38px;
  border: 1px solid var(--line); background: var(--surface); color: var(--blue-ink); border-radius: 10px; padding: .3rem .7rem; font-weight: 800; font-size: .85rem;
}
.refresh svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.refresh.busy svg { animation: hbSpin .8s linear infinite; }

/* ---------- the day strip (sticks to the top): a navy pill slides to the chosen day ---------- */
.dayBar {
  position: sticky; top: 0; z-index: 20; margin: 12px -14px 0; padding: 10px 14px 8px;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
}
.dayTop { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; min-height: 30px; }
.dayTop b { font-size: 1rem; font-weight: 900; }
.toToday { border: 1px solid var(--gold); background: var(--gold-soft); color: var(--gold-ink); border-radius: 99px; padding: .15rem .85rem; font-weight: 900; font-size: .84rem; cursor: pointer; }
.dScroll {
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent);
}
.dScroll::-webkit-scrollbar { display: none; }
.dTrack { position: relative; display: flex; gap: 6px; width: max-content; padding: 3px 22px; }
.dInd {
  position: absolute; top: 3px; bottom: 3px; left: 0; width: 54px; border-radius: 16px; background: var(--navyGrad);
  box-shadow: inset 0 0 0 1.5px var(--gold), 0 6px 16px rgba(10, 15, 31, .28);
  transition: transform .5s cubic-bezier(.3, 1.25, .45, 1), width .3s ease;
}
.dc {
  position: relative; z-index: 1; display: grid; justify-items: center; align-content: center; width: 54px; min-height: 64px; padding: 4px 0;
  border: 0; border-radius: 16px; background: transparent; color: var(--ink); cursor: pointer; scroll-snap-align: center; line-height: 1.2; transition: color .3s ease;
}
.dc small { font-size: .72rem; font-weight: 700; color: var(--muted); transition: color .3s ease; }
.dc b { font-size: 1.15rem; font-weight: 900; }
.dc i { width: 5px; height: 5px; margin-top: 4px; border-radius: 50%; }
.dc.has i { background: var(--blue); }
.dc.live i { background: var(--live); animation: blink 1.4s ease-in-out infinite; }
.dc.isToday small { color: var(--gold-ink); font-weight: 900; }
.dc:not(.sel):hover { background: var(--surface); }
.dc.sel { color: #fff; }
.dc.sel small { color: var(--gold-2); }
.dc.sel.has i { background: var(--gold-2); }
.dMonth {
  position: relative; z-index: 1; display: grid; place-items: center; padding: 0 8px; margin-inline: 2px;
  color: var(--gold-ink); font-size: .74rem; font-weight: 900; border-inline-start: 2px solid color-mix(in srgb, var(--gold) 60%, transparent);
}

/* load / error messages */
.msg {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px;
  background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); border-radius: 14px; padding: 12px 14px;
}
.msg p { margin: 0; font-size: .92rem; flex: 1 1 260px; }
.skel { display: grid; gap: 12px; margin-top: 14px; }
.skel i {
  display: block; height: 132px; border-radius: 20px; border: 1px solid var(--line);
  background: linear-gradient(90deg, var(--surface) 30%, var(--bg) 50%, var(--surface) 70%) 0 0 / 220% 100%; animation: skel 1.3s linear infinite;
}
@keyframes skel { to { background-position: -220% 0; } }

/* an empty day */
.noDay {
  display: grid; justify-items: center; gap: 6px; margin-top: 14px; padding: 24px 16px; text-align: center; border-radius: 20px;
  background: var(--surface); border: 1px dashed color-mix(in srgb, var(--gold) 60%, var(--line));
}
.noDay b { font-size: 1.12rem; font-weight: 900; }
.noDay span { color: var(--muted); font-weight: 700; font-size: .92rem; }
.noDay .btn { margin-top: 6px; }
.ndIcon { position: relative; width: 44px; height: 44px; margin-bottom: 2px; border-radius: 14px; background: var(--navyGrad); box-shadow: inset 0 0 0 1.5px var(--gold); }
.ndIcon::after {
  content: ""; position: absolute; inset: 10px; background: var(--gold-2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4M9.5 13.5l5 4M14.5 13.5l-5 4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4M9.5 13.5l5 4M14.5 13.5l-5 4'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- match cards ---------- */
.dayH { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; font-size: 1rem; font-weight: 900; }
.dayH .linkBtn { margin-inline-start: auto; }
.cards { display: grid; gap: 12px; }
@media (min-width: 760px) { .cards { grid-template-columns: 1fr 1fr; } }

/* each half of the card is washed in its club's colour, with the club's edge colour on the outer side */
.match {
  position: relative; cursor: pointer; border: 1px solid var(--line); border-radius: 20px; padding: 14px 12px 10px;
  background:
    linear-gradient(to left, color-mix(in srgb, var(--h) var(--wash), transparent), transparent 46%, transparent 54%, color-mix(in srgb, var(--a) var(--wash), transparent)),
    var(--surface);
  box-shadow: inset -5px 0 0 var(--h2), inset 5px 0 0 var(--a2), var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.match:hover { transform: translateY(-2px); }
.match:active { transform: scale(.985); }
.match:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.match.k-today { border-color: color-mix(in srgb, var(--gold) 70%, var(--line)); box-shadow: inset -5px 0 0 var(--h2), inset 5px 0 0 var(--a2), 0 0 0 1px color-mix(in srgb, var(--gold) 55%, transparent), 0 10px 26px rgba(227, 184, 79, .18); }
.match.k-live { --wash: 20%; border-color: var(--live); box-shadow: inset -5px 0 0 var(--h2), inset 5px 0 0 var(--a2), 0 0 0 1px var(--live), 0 10px 26px color-mix(in srgb, var(--live) 22%, transparent); }
.match.k-done { background: var(--done-bg); border-color: var(--done-line); box-shadow: inset -5px 0 0 var(--done-edge), inset 5px 0 0 var(--done-edge); }
.mDate { margin: -4px 0 8px; text-align: center; color: var(--muted); font-size: .8rem; font-weight: 800; }

.mRow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 6px; }
.team { display: grid; justify-items: center; gap: 4px; min-width: 0; text-align: center; }
.crestBtn { display: grid; padding: 3px; border: 0; background: none; border-radius: 14px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.crestBtn:hover .crest img { transform: scale(1.06); }
.crestBtn:active .crest { transform: scale(.92); }
.crestBtn:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.crest, .crest img { transition: transform .15s ease; }
.tn { font-weight: 900; font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
.rk { font-size: .72rem; font-weight: 800; line-height: 1.6; color: var(--muted); }
.rk.lead { color: #3b2706; background: var(--goldGrad); border-radius: 99px; padding: 0 .55rem; }
.rk.drop { color: var(--live-ink); }
.rk.up { color: var(--blue-ink); }
.team.lose .tn { color: var(--muted); font-weight: 700; }
.team.mine .tn { color: var(--blue-ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.k-done .crest { filter: saturate(.55); opacity: .88; }
.k-done .tn { color: var(--muted); }
.k-done .team.win .tn { color: var(--ink); }
.k-off .team { opacity: .7; }

.mid { display: grid; justify-items: center; align-content: start; gap: 5px; min-width: 92px; padding-top: 8px; text-align: center; }
.mid small { color: var(--muted); font-size: .76rem; font-weight: 800; line-height: 1.3; white-space: nowrap; }
.k-live .mid small { color: var(--live-ink); }
.kTag { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 0 .65rem; font-size: .72rem; font-weight: 900; line-height: 1.8; white-space: nowrap; }
.kTag.live { background: var(--live); color: #fff; }
.kTag.live i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1.4s ease-in-out infinite; }
.kTag.today { background: var(--goldGrad); color: #3b2706; }
.kTag.done { background: var(--done-tag); color: var(--muted); }
.kTag.off { background: var(--amber-soft); color: var(--amber); font-size: .82rem; }
@keyframes blink { 50% { opacity: .25; } }
.time { font-weight: 900; font-size: 1.14rem; white-space: nowrap; line-height: 1.5; background: var(--blue-soft); color: var(--blue-ink); border-radius: 11px; padding: .1rem .8rem; }
.k-today .time { background: var(--surface); color: var(--gold-ink); box-shadow: inset 0 0 0 1.5px var(--gold); }
.time.tbd { font-size: .78rem; font-weight: 800; background: var(--bg); color: var(--muted); box-shadow: none; }
.score {
  display: flex; direction: rtl; align-items: center; gap: 9px; line-height: 1.3;
  font-weight: 900; font-size: 1.55rem; font-variant-numeric: tabular-nums;
  background: var(--surface); border-radius: 12px; padding: .05rem .85rem;
}
.score span { opacity: .5; font-weight: 600; }
.k-live .score { color: var(--live-ink); background: color-mix(in srgb, var(--live) 10%, var(--surface)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--live) 45%, transparent); }
.k-done .score { background: var(--done-score); color: #fff; }
.score.goal { animation: goal 1.4s ease 2; }
@keyframes goal { 40% { background: var(--gold-2); color: #3b2706; box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 45%, transparent); } }

.mCh {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-top: 10px; padding-top: 8px;
  border-top: 1px dashed var(--line); color: var(--muted); font-size: .84rem; font-weight: 700;
}
.k-done .mCh { border-top-color: var(--done-line); }
.mCh span { display: inline-flex; align-items: center; gap: 5px; }
.mCh svg { width: 16px; height: 16px; fill: none; stroke: var(--gold-3); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.k-done .mCh svg { stroke: var(--muted); }
.mKey { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .8rem; }
.mKey code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: var(--font); background: var(--bg); border-radius: 8px; padding: .2rem .5rem; }
.mKey button { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: .15rem .6rem; cursor: pointer; font-weight: 800; color: var(--blue-ink); }

/* cards and table rows rise in one after another; «هدف!» with confetti in the scorer's colours */
.rise { animation: rise .55s cubic-bezier(.2, .8, .3, 1) both; animation-delay: calc(var(--k, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.burst { position: absolute; top: 44%; left: 50%; width: 0; height: 0; pointer-events: none; z-index: 2; }
.burst i {
  position: absolute; width: 8px; height: 13px; margin: -6px -4px; border-radius: 2px; background: var(--c); opacity: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); animation: confetti 1.5s cubic-bezier(.15, .7, .35, 1) var(--d) forwards;
}
.burst b {
  position: absolute; left: 50%; top: -58px; transform: translateX(-50%); white-space: nowrap; font-size: 1.5rem; font-weight: 900;
  color: #fff; background: linear-gradient(135deg, var(--live), #f0a43a); border-radius: 12px; padding: 0 .7rem;
  box-shadow: 0 8px 22px rgba(200, 49, 79, .4); opacity: 0; animation: goalTxt 2.2s cubic-bezier(.3, 1.5, .5, 1) forwards;
}
@keyframes confetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(.6); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 46px)) rotate(var(--r)) scale(1); } }
@keyframes goalTxt { 0% { opacity: 0; transform: translateX(-50%) scale(.3); } 18%, 75% { opacity: 1; transform: translateX(-50%) scale(1); } 100% { opacity: 0; transform: translateX(-50%) translateY(-10px) scale(.9); } }

/* one club: its head, then its matches */
.teamHead {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 20px; color: #fff;
  background: var(--navyGrad); box-shadow: inset 0 0 0 1px rgba(227, 184, 79, .4), var(--shadow);
}
.teamHead > div { flex: 1; min-width: 0; }
.teamHead b { display: block; font-size: 1.2rem; font-weight: 900; }
.teamHead small { color: rgba(255, 255, 255, .78); font-weight: 700; }
.teamHead .btn { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(227, 184, 79, .45); }

/* ---------- league table ---------- */
.tblWrap { margin-top: 12px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.tbl th { padding: 10px 4px; background: var(--navyGrad); color: var(--gold-2); font-size: .76rem; font-weight: 800; text-align: center; white-space: nowrap; }
.tbl td { padding: 7px 4px; text-align: center; border-bottom: 1px solid var(--line); font-weight: 700; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .tmC { text-align: start; }
.tmIn { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tmIn b { font-weight: 800; overflow-wrap: anywhere; line-height: 1.3; }
.rkC { width: 38px; }
.rkC span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-weight: 900; font-size: .85rem; }
.ptsC { font-weight: 900; font-size: 1.04rem; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--blue) 6%, transparent); }
.tbl tbody tr:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.tbl tr.lead { background: color-mix(in srgb, var(--gold) 14%, transparent); }
.tbl tr.lead .rkC span { background: var(--goldGrad); color: #3b2706; }
.tbl tr.drop { background: color-mix(in srgb, var(--live) 6%, transparent); }
.tbl tr.drop .rkC span { background: color-mix(in srgb, var(--live) 16%, transparent); color: var(--live-ink); }
.tbl tr.up { background: color-mix(in srgb, var(--blue) 7%, transparent); }
.tbl tr.up .rkC span { background: color-mix(in srgb, var(--blue) 16%, transparent); color: var(--blue-ink); }
.tbl tr.po .rkC span { background: var(--amber-soft); color: var(--amber); }
.tbl tr.mine { background: var(--blue-soft); }
.tbl tr.mine b { color: var(--blue-ink); }
.tbl tr.flash { animation: rowFlash 2.4s ease; }
@keyframes rowFlash { 0%, 55% { background: color-mix(in srgb, var(--gold) 35%, transparent); } }
.tKey { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.kLead::before, .kdrop::before, .kup::before, .kpo::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.kLead::before { background: var(--gold); }
.kdrop::before { background: color-mix(in srgb, var(--live) 40%, transparent); }
.kup::before { background: color-mix(in srgb, var(--blue) 45%, transparent); }
.kpo::before { background: var(--amber); }
.tHint { margin: 6px 0 0; color: var(--muted); font-size: .8rem; font-weight: 600; }
.tNote { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--amber-soft); font-size: .88rem; }

/* ---------- a club's options (bottom sheet on phones) ---------- */
.sheet {
  position: fixed; inset: auto 0 0; margin: 0 auto; width: min(520px, 100%); max-width: 100%; max-height: 90vh;
  padding: 0; border: 0; border-radius: 24px 24px 0 0; background: var(--surface); color: var(--ink); box-shadow: 0 -12px 40px rgba(0, 0, 0, .25);
}
.sheet::backdrop { background: rgba(5, 8, 18, .55); }
@media (min-width: 600px) { .sheet { inset: 0; margin: auto; height: fit-content; border-radius: 24px; } }
.sheetIn { display: grid; gap: 14px; padding: 20px 16px max(16px, env(safe-area-inset-bottom)); }
.shHead { display: flex; align-items: center; gap: 12px; }
.shHead .crest.big img { filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .25)); }
.shHead b { display: block; font-size: 1.25rem; font-weight: 900; line-height: 1.3; }
.shHead small { color: var(--muted); font-size: .86rem; font-weight: 700; }
.shBtns { display: grid; gap: 8px; }
.shBtns .btn { width: 100%; min-height: 48px; }
.shClose { border: 0; background: none; color: var(--muted); font-weight: 800; padding: 6px; cursor: pointer; }

/* ---------- one match alone, for a screenshot ---------- */
.poster { padding: 0; border: 0; margin: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; background: transparent; color: #fff; overflow: auto; }
.poster::backdrop { background: rgba(4, 7, 15, .86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pWrap { min-height: 100%; display: grid; place-items: center; align-content: center; gap: 14px; padding: 60px 14px 28px; }
.pClose {
  position: fixed; top: max(12px, env(safe-area-inset-top)); left: 12px; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; z-index: 2;
  border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); color: #fff; font-size: 1.05rem; transition: opacity .6s ease;
}
.pHint { margin: 0; color: rgba(255, 255, 255, .72); font-size: .86rem; font-weight: 700; transition: opacity .6s ease; }
.poster.idle .pClose { opacity: .2; }
.poster.idle .pHint { opacity: 0; }
.pCard {
  position: relative; overflow: hidden; width: min(440px, 100%); border-radius: 28px; padding: 20px 18px 14px;
  background:
    radial-gradient(260px 230px at 100% 45%, color-mix(in srgb, var(--h) 50%, transparent), transparent 70%),
    radial-gradient(260px 230px at 0% 45%, color-mix(in srgb, var(--a) 50%, transparent), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .03) 0 2px, transparent 2px 13px),
    linear-gradient(165deg, #121a36, #0a0f1f 60%, #070b16);
  box-shadow: inset 0 0 0 1px rgba(227, 184, 79, .45), 0 30px 60px rgba(0, 0, 0, .5);
  animation: pIn .45s cubic-bezier(.2, .9, .3, 1.15) both;
}
.pCard::before { content: ""; position: absolute; inset: 0 14% auto; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
@keyframes pIn { from { opacity: 0; transform: translateY(18px) scale(.94); } }
.pHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 800; }
.pLg { display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; }
.pFlag { width: 27px; height: 18px; border-radius: 2px; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.pSeason { color: var(--gold-2); font-size: .8rem; }
.pWhen { margin: 12px 0 0; text-align: center; color: rgba(255, 255, 255, .85); font-size: .9rem; font-weight: 700; }
.pTeams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 8px; margin-top: 16px; }
.pTeam { display: grid; justify-items: center; gap: 6px; text-align: center; min-width: 0; }
.pTeam b { font-size: 1.3rem; font-weight: 900; line-height: 1.3; }
.pTeam small { color: rgba(255, 255, 255, .78); font-size: .78rem; font-weight: 700; }
.pMid { display: grid; justify-items: center; gap: 8px; padding-top: 26px; min-width: 96px; }
.pMid .time { font-size: 1.6rem; background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(227, 184, 79, .7); padding: .1rem .9rem; }
.pMid .score { font-size: 2.3rem; background: rgba(255, 255, 255, .1); color: #fff; box-shadow: none; }
.pMid small { color: var(--gold-2); font-size: .86rem; font-weight: 800; white-space: nowrap; }
.pCard.k-live .score { background: var(--live); color: #fff; }
.pCard.k-done .score { background: rgba(255, 255, 255, .16); }
.pCard .kTag.done { background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .85); }
.pCh { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 18px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .14); font-weight: 800; }
.pCh span { display: inline-flex; align-items: center; gap: 6px; }
.pCh svg { width: 17px; height: 17px; fill: none; stroke: var(--gold-2); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pFoot { margin-top: 12px; text-align: center; color: rgba(255, 255, 255, .42); font-size: .74rem; font-weight: 700; direction: ltr; }

/* ---------- foot of the page ---------- */
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-top: 26px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.lgLive::before { background: var(--live); }
.lgToday::before { background: var(--gold); }
.lgNext::before { background: var(--blue); }
.lgDone::before { background: var(--done-score); }
.src { margin: 10px 0 0; text-align: center; color: var(--muted); font-size: .8rem; font-weight: 600; }
.madeBy { display: flex; justify-content: center; margin: 14px 0 0; font-size: .92rem; }
.madeBy a { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); text-decoration: none; font-weight: 700; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); }
.madeBy a:hover, .madeBy a:focus-visible { border-color: var(--gold); color: var(--ink); outline: none; }
.madeBy svg { width: 22px; height: 22px; }
.madeBy .wm { direction: ltr; color: var(--ink); font-weight: 800; font-family: "Segoe UI", var(--font); }
.madeBy .wm b { color: #1D9E75; }

@media (max-width: 480px) {
  .upd { margin-inline-start: 0; width: 100%; justify-content: space-between; }
  .teamPick { max-width: none; }
  .match { padding: 14px 10px 10px; }
  .crest { width: 46px; height: 46px; }
  .crest.big { width: 42px; height: 42px; }
  .crest.sm { width: 26px; height: 26px; }
  .crest.xl { width: 84px; height: 84px; }
  .mid { min-width: 84px; }
  .tbl { font-size: .86rem; }
  .tbl th, .tbl td { padding-inline: 2px; }
  .rkC { width: 32px; }
  .tmIn { gap: 6px; }
}
@media (max-width: 359px) { .tbl .wdl { display: none; } .pTeam b { font-size: 1.1rem; } }
@media (prefers-reduced-motion: reduce) {
  .heroBall *, .flag *, .flag::before, .leader::after, .kTag.live i, .dc.live i, .score.goal, .rise, .skel i,
  .refresh.busy svg, .burst, .burst *, .pCard, .tbl tr.flash { animation: none !important; }
  .segInd, .dInd { transition: none; }
}

/* ---------- dark (device setting) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #060a14; --surface: #0f1629; --ink: #eef1f8; --muted: #8e98b2; --line: #1c2541;
    --blue: #7a9bff; --blue-soft: #16214a; --blue-ink: #a9bcff;
    --gold-soft: #2c2410; --gold-ink: #f3cf73;
    --live: #ff4d6a; --live-ink: #ff8a9e;
    --amber: #f0a560; --amber-soft: #2f2416;
    --done-bg: #0b111f; --done-line: #19213a; --done-edge: #2a3350; --done-score: #4a5370; --done-tag: #1a2238;
    --wash: 22%;
    --shadow: none;
  }
  /* in the dark the moving pills turn gold, so they still stand out */
  .segInd, .dInd { background: var(--goldGrad); box-shadow: 0 6px 16px rgba(0, 0, 0, .4); }
  .seg button[aria-selected="true"], .dc.sel, .dc.sel small { color: #241a05; }
  .dc.sel.has i { background: #241a05; }
  .crest img { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .55)) drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
  .msg { background: #33261a; }
  .madeBy .wm b { color: #5DCAA5; }
}

/* ---------- competitions within a day, postponements, «مباشر الآن» ---------- */
.dayTools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 0 2px; }
.dayTools .dayH { margin: 0; flex: 1 1 auto; }
.liveChip { display: inline-flex; align-items: center; gap: 6px; color: var(--live-ink); border-color: color-mix(in srgb, var(--live) 45%, var(--line)); }
.liveChip i { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: blink 1.4s ease-in-out infinite; }
.liveChip.on { background: var(--live); border-color: var(--live); color: #fff; }
.liveChip.on i { background: #fff; }
.compH {
  display: flex; align-items: center; gap: 9px; margin: 22px 0 10px; padding: 8px 12px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); font-size: .98rem; font-weight: 900; box-shadow: var(--shadow);
}
.compH .fl { width: 22px; height: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(10, 15, 31, .12); flex: none; }
.compH .tStar { color: var(--gold); font-size: 1.05rem; line-height: 1; }
.compH span { flex: 1 1 auto; min-width: 0; }
.compH small { color: var(--muted); font-weight: 800; font-size: .8rem; background: var(--bg); border-radius: 99px; padding: 0 .55rem; }
.compH .linkBtn { flex: none; font-size: .8rem; }
.tbdNote {
  margin: 0 0 10px; padding: 9px 12px; border-radius: 12px; font-size: .85rem; font-weight: 700; color: var(--muted);
  background: var(--bg); border: 1px dashed color-mix(in srgb, var(--gold) 50%, var(--line));
}
.mNote {
  display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px;
  color: var(--amber); font-size: .8rem; font-weight: 800;
}
.mNote svg, .pNote svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.match.slot { background: var(--surface); border-style: dashed; border-color: color-mix(in srgb, var(--amber) 55%, var(--line)); box-shadow: none; }
.match.slot .crest { filter: grayscale(.4); opacity: .8; }
.match.slot .mid small { white-space: normal; max-width: 150px; color: var(--amber); }
.pNote { margin: 14px 0 0; text-align: center; color: var(--gold-2); font-size: .86rem; font-weight: 800; }
.ldBall { display: block; width: 44px; height: 44px; flex: none; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .4)); }
.mDate b { color: var(--gold-ink); font-weight: 900; }
.pLg .tStar { color: var(--gold-2); }
@media (prefers-reduced-motion: reduce) { .liveChip i { animation: none; } }

/* ---------- a finished match's kick-off time, who scored ---------- */
.mid small.kt { display: inline-flex; align-items: center; gap: 4px; }
.kt svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.mGoals, .pGoals { display: grid; grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr); align-items: start; gap: 6px; }
.mGoals { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--muted); font-size: .78rem; font-weight: 700; }
.k-done .mGoals { border-top-color: var(--done-line); }
.gl { margin: 0; padding: 0; list-style: none; display: grid; gap: 1px; text-align: center; line-height: 1.45; min-width: 0; }
.gl li { overflow-wrap: anywhere; }
.gn { color: var(--ink); font-weight: 800; }
.k-done .gn { color: color-mix(in srgb, var(--ink) 78%, var(--muted)); }
.gm span { font-variant-numeric: tabular-nums; }
.gl em { font-style: normal; margin-inline-start: 2px; color: var(--muted); font-size: .9em; }
.gIcon { display: grid; place-items: center; padding-top: 1px; }
.gIcon svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.k-live .gIcon svg { stroke: var(--live-ink); }
.pGoals { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .86rem; font-weight: 700; color: rgba(255, 255, 255, .72); }
.pGoals .gn { color: #fff; }
.pGoals em { color: var(--gold-2); }
.pGoals .gIcon svg { stroke: var(--gold-2); }

/* ---------- «مفضلتي»: the tab, what was picked, the picker ---------- */
.lgTabs .tHeart { display: block; width: 17px; height: 17px; }
.tHeart svg, .favIcon svg, .favBtn svg { display: block; width: 100%; height: 100%; fill: var(--gold); }
.favPeek { display: flex; align-items: center; flex: none; }
.favPeek .crest { width: 34px; height: 34px; }
.favPeek .crest + .crest { margin-inline-start: -8px; }
.favPeek .crest img { filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, .85)) drop-shadow(0 3px 5px rgba(0, 0, 0, .45)); }
.fpFlags { display: flex; gap: 4px; margin-inline-start: 6px; }
.fpFlags .fl { width: 22px; height: auto; border-radius: 2px; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.fpFlags .tStar { color: var(--gold-2); }
.favEmpty { gap: 8px; padding: 28px 18px; }
.favEmpty .btn { min-height: 48px; padding-inline: 1.6rem; }
.favEmpty small { color: var(--muted); font-size: .8rem; font-weight: 600; max-width: 330px; }
.favIcon { width: 52px; height: 52px; padding: 13px; border-radius: 16px; background: var(--navyGrad); box-shadow: inset 0 0 0 1.5px var(--gold); }
.favBtn { gap: 8px; }
.favBtn svg { width: 18px; height: 18px; fill: none; stroke: var(--gold-3); stroke-width: 2; }
.favBtn.on { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-ink); }
.favBtn.on svg { fill: var(--gold); stroke: var(--gold); }

.favSheet { height: min(88vh, 760px); overflow: hidden; }
.favSheet[open] { display: flex; flex-direction: column; }
@media (min-width: 600px) { .favSheet { height: min(86vh, 760px); width: min(600px, 100%); } }
.favIn { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 16px 16px 0; }
.favIn > * { flex-shrink: 0; }
.favTop { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.favTop b { font-size: 1.25rem; font-weight: 900; }
.favTop .shClose { font-size: 1.1rem; width: 40px; height: 40px; }
.favNote { margin: 2px 0 0; color: var(--muted); font-size: .84rem; font-weight: 600; }
.favH { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 8px; font-size: 1rem; font-weight: 900; }
.favH small { color: var(--muted); font-size: .78rem; font-weight: 700; }
.favLgs { display: flex; flex-wrap: wrap; gap: 8px; }
.favLg, .favClub {
  position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 44px; text-align: start;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 14px; font-weight: 800;
  -webkit-tap-highlight-color: transparent; transition: background .2s ease, border-color .2s ease;
}
.favLg { padding: .3rem .8rem .3rem .65rem; border-radius: 99px; font-size: .92rem; }
.favLg .fl { width: 22px; height: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(10, 15, 31, .12); }
.favLg .tStar { color: var(--gold); }
.favLg[aria-pressed="true"], .favClub[aria-pressed="true"] { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-ink); }
.fCheck { display: none; width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--goldGrad); position: relative; }
.fCheck::after { content: ""; position: absolute; left: 6px; top: 3.5px; width: 4px; height: 8px; border: solid #3b2706; border-width: 0 2px 2px 0; transform: rotate(45deg); }
[aria-pressed="true"] > .fCheck { display: block; }
.favSearch input {
  width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: .4rem .9rem; font-weight: 700;
}
.favSearch input:focus-visible { outline: 2px solid var(--gold); border-color: var(--gold); }
.favClubs { display: grid; gap: 8px; margin: 10px 0 14px; }
.favGrp { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.favGrp summary {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px; cursor: pointer; list-style: none; font-weight: 900; font-size: .95rem; min-height: 46px;
}
.favGrp summary::-webkit-details-marker { display: none; }
.favGrp summary::after { content: ""; width: 7px; height: 7px; margin-inline-start: 4px; border: solid var(--muted); border-width: 0 0 2px 2px; transform: rotate(-45deg); transition: transform .2s ease; }
.favGrp[open] summary::after { transform: rotate(135deg); }
.favGrp summary .fl { width: 22px; height: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(10, 15, 31, .12); flex: none; }
.favGrp summary .tStar { color: var(--gold); }
.favGrp summary span { flex: 1; min-width: 0; }
.fgN { min-width: 24px; text-align: center; border-radius: 99px; background: var(--goldGrad); color: #3b2706; font-size: .78rem; font-weight: 900; padding: 0 .45rem; }
.favGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; padding: 0 10px 10px; }
.favClub { padding: .3rem .5rem; font-size: .88rem; line-height: 1.3; }
.favClub > span:not(.crest) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.favClub .crest.sm { width: 28px; height: 28px; }
.favNone { margin: 4px 0; text-align: center; color: var(--muted); font-weight: 700; }
.favBar {
  position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; margin: auto -16px 0; padding: 10px 16px max(12px, env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 20px rgba(10, 15, 31, .06);
}
.favBar span { flex: 1; min-width: 0; font-weight: 800; font-size: .9rem; color: var(--muted); }
.favBar .btn { min-height: 44px; padding-inline: 1.5rem; }
.favBar .linkBtn { font-size: .8rem; color: var(--muted); }
.favPeek ~ .ldTxt b { font-size: 1rem; line-height: 1.5; }

/* ---------- كوليك سبورت: the logo at the top, the whistle's sound switch ---------- */
.brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.brandLogo { display: block; border-radius: 8px; -webkit-tap-highlight-color: transparent; }
.brandLogo svg { display: block; height: 30px; width: auto; }
.brandLogo:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.kqL { fill: var(--ink); }
.kqQ, .kqS { fill: var(--gold-3); }
.sndBtn {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none; cursor: pointer; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--gold-3); box-shadow: var(--shadow); -webkit-tap-highlight-color: transparent;
}
.sndBtn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sndBtn .spk { fill: currentColor; }
.sndBtn .off, .sndBtn[aria-pressed="false"] .on { display: none; }
.sndBtn[aria-pressed="false"] { color: var(--muted); }
.sndBtn[aria-pressed="false"] .off { display: inline; }
.sndBtn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-color-scheme: dark) {
  .kqQ { fill: var(--gold); }
  .kqS { fill: var(--gold-2); }
  .sndBtn { color: var(--gold-2); }
}
@media (max-width: 359px) { .brandLogo svg { height: 26px; } }
.mid small.pso { color: var(--ink); white-space: normal; max-width: 130px; }
.pMid small.pso { color: #fff; }
