:root {
  --bg: #000000;
  --surface: #0a0a0a;
  --surface-2: #141414;
  --line: #2b2b2b;
  --text: #ffffff;
  --muted: #9c9c9c;
  --accent: #e6e6e6;
  --green: var(--accent);
  --yellow: var(--accent);
  --cyan: var(--accent);
  --pink: var(--accent);
  --purple: var(--accent);
  --orange: var(--accent);
  --red: #ff5c5c;
  --focus: #ffffff;
  --radius: 6px;
  --sec: var(--accent);
  --display: "Barlow Condensed", Inter, system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
a { color: var(--green); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 30; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.hl { color: var(--green); }
[hidden] { display: none !important; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(135deg, #000 55%, #1a1a1a); }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 32px; display: grid; gap: 14px; }
.login-card h1 { margin: 6px 0 0; font-size: 1.8rem; }
.login-card label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.err { color: var(--red); margin: 0; min-height: 1.5em; font-weight: 600; }

/* Header */
.top { background: #000; border-bottom: 3px solid var(--accent); position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; align-items: center; gap: 20px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 1.05rem; }
.brand b { font-weight: 900; color: var(--green); }
.mark { width: 36px; height: 36px; border-radius: 4px; background: var(--green); color: #000; display: grid; place-items: center; font-weight: 900; font-size: .8rem; }
.mark.big { width: 52px; height: 52px; font-size: 1.1rem; border-radius: 4px; }
nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
nav a { --c: var(--green); color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 10px 14px; border-radius: 4px; white-space: nowrap; display: flex; align-items: center; gap: 6px; border-bottom: 3px solid transparent; }
nav a:hover { color: #fff; background: var(--surface-2); }
nav a[aria-current="page"] { color: var(--c); border-bottom-color: var(--c); border-radius: 4px 10px 0 0; }
.nav-n:not(:empty) { background: var(--yellow); color: #000; font-size: .72rem; font-weight: 800; border-radius: 4px; padding: 0 7px; }
.me { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.live { color: var(--green); font-weight: 700; font-size: .8rem; }
.live.off { color: var(--muted); }

main { padding-top: 28px; padding-bottom: 48px; outline: none; }
.hero { margin-bottom: 18px; border-left: 5px solid var(--sec); padding-left: 14px; }
h1 { font-size: 2rem; letter-spacing: -.02em; margin: 0 0 4px; font-weight: 900; }
.hero p { margin: 0; }

/* Toolbar */
.toolbar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 14px; margin-bottom: 16px; }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; min-height: 44px; padding: 0 12px; width: 100%; }
textarea { padding: 10px 12px; min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--sec); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sec) 30%, transparent); }
.search input { min-height: 54px; padding-left: 46px; font-size: 1.05rem; border-radius: 4px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.chip { flex: none; min-height: 40px; padding: 0 16px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 700; font-size: .9rem; cursor: pointer; color: var(--muted); }
.chip:hover { color: #fff; }
.chip[aria-pressed="true"] { background: var(--sec); color: #000; border-color: var(--sec); }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.filters label:not(.toggle) { display: flex; flex-direction: column; gap: 4px; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; flex: 1 1 150px; }
.filters select { text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--text); font-weight: 500; }
.toggle { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; cursor: pointer; }
.toggle input { width: 20px; height: 20px; min-height: 0; accent-color: var(--green); }
.ghost { min-height: 44px; padding: 0 14px; border: 0; background: none; color: var(--green); font-weight: 700; cursor: pointer; border-radius: 4px; }
.ghost:hover { background: var(--surface-2); }

.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 12px; }
.results-bar p, .count { margin: 0; color: var(--muted); font-weight: 600; }
.count { margin-bottom: 12px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 3px; justify-self: start; }
.seg button { border: 0; background: none; min-height: 38px; padding: 0 14px; border-radius: 8px; font-weight: 700; font-size: .9rem; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--sec); color: #000; }

/* Photos / avatars */
.av { flex: none; width: 56px; height: 56px; border-radius: 4px; display: grid; place-items: center; font-weight: 800; font-size: 1rem; background: var(--surface-2); color: var(--muted); border: 2px solid var(--line); object-fit: cover; object-position: center top; overflow: hidden; }
.av.GK { border-color: var(--orange); color: var(--orange); }
.av.DEF { border-color: var(--cyan); color: var(--cyan); }
.av.MID { border-color: var(--green); color: var(--green); }
.av.FWD { border-color: var(--pink); color: var(--pink); }

/* Player cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pcard { position: relative; display: flex; flex-direction: column; gap: 12px; text-align: left; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color .12s, transform .12s; }
.pcard:hover { border-color: var(--green); transform: translateY(-2px); }
.pc-top { display: flex; gap: 14px; align-items: center; min-width: 0; }
.pc-name { display: block; font-weight: 800; font-size: 1.05rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-sub { display: block; color: var(--muted); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; font-size: .75rem; font-weight: 800; background: var(--surface-2); color: var(--muted); white-space: nowrap; border: 1px solid var(--line); }
.b-GK { color: var(--orange); } .b-DEF { color: var(--cyan); } .b-MID { color: var(--green); } .b-FWD { color: var(--pink); }
.b-up { color: var(--cyan); }
.rec { border-color: currentColor; }
.rate { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; font-weight: 900; font-size: .9rem; color: #000; background: var(--muted); }
.r-A { background: var(--green); } .r-B { background: #ffffff; } .r-C { background: #6b6b6b; color: #fff; }
.pc-star { position: absolute; top: 12px; right: 14px; color: var(--yellow); font-size: 1.1rem; }
.pc-rate { margin-left: auto; }

.grid.list { grid-template-columns: 1fr; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.grid.list .pcard { flex-direction: row; align-items: center; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 10px 16px; }
.grid.list .pcard:hover { transform: none; background: var(--surface-2); }
.grid.list .pc-top { flex: 1; }
.grid.list .av { width: 42px; height: 42px; font-size: .8rem; }
.grid.list .pc-star { position: static; order: -1; width: 16px; }

.more { display: flex; justify-content: center; margin-top: 20px; }
.btn { min-height: 48px; padding: 0 22px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 700; cursor: pointer; }
.btn:hover { border-color: var(--green); }
.btn.primary { background: var(--green); color: #000; border-color: var(--green); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.star.on { background: var(--yellow); color: #000; border-color: var(--yellow); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: wait; }
.empty { grid-column: 1 / -1; text-align: center; padding: 48px 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Reports */
.reports { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.rcard { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--sec); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.rcard p { margin: 0; }
.rhead { display: flex; gap: 12px; align-items: center; }
.rhead .rate { margin-left: auto; }
.rhead .av { width: 48px; height: 48px; }
.link { all: unset; cursor: pointer; font-weight: 800; color: var(--text); }
.link:hover { color: var(--green); text-decoration: underline; }
.link:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.small { font-size: .85rem; color: var(--muted); }
.next { font-size: .9rem; color: var(--yellow); font-weight: 600; }

/* Fixtures */
.day { margin: 22px 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cyan); font-weight: 800; }
.day:first-child { margin-top: 0; }

/* Clubs */
.clubs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.club { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; cursor: pointer; display: flex; flex-direction: column; gap: 12px; }
.club:hover { border-color: var(--purple); }
.club h2 { margin: 0; font-size: 1.05rem; }
.club-n { display: flex; gap: 18px; }
.club-n b { display: block; font-size: 1.5rem; font-weight: 900; line-height: 1.1; color: var(--purple); }
.club-n span { font-size: .78rem; color: var(--muted); }
.club-ages { display: flex; flex-wrap: wrap; gap: 4px; }

/* Profile panel */
dialog#profile { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(620px, 100vw); max-width: 100vw; border: 0; border-left: 1px solid var(--line); padding: 0; background: var(--bg); color: var(--text); }
dialog#profile[open] { animation: slide .18s ease-out; display: flex; flex-direction: column; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
dialog::backdrop { background: rgba(0,0,0,.7); }
.pr-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.icon { width: 44px; height: 44px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface-2); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.icon:disabled { opacity: .3; cursor: default; }
.icon.close { margin-left: auto; font-size: 1rem; }
.pr-pos { font-weight: 700; font-size: .9rem; color: var(--muted); min-width: 80px; text-align: center; font-variant-numeric: tabular-nums; }
.kbd-hint { font-size: .78rem; color: var(--muted); }
.pr-body { padding: 20px; overflow-y: auto; flex: 1; display: grid; gap: 16px; align-content: start; }
.pr-head { display: flex; gap: 18px; align-items: center; }
.photo-wrap { position: relative; flex: none; }
.pr-head .av { width: 120px; height: 120px; font-size: 2rem; border-width: 3px; }
.photo-btn { position: absolute; bottom: -4px; right: -4px; min-height: 36px; padding: 0 10px; border-radius: 4px; border: 2px solid #000; background: var(--green); color: #000; font-weight: 800; font-size: .78rem; cursor: pointer; }
.pr-head h2 { margin: 0; font-size: 1.6rem; letter-spacing: -.02em; line-height: 1.15; font-weight: 900; }
.panel { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--pc, var(--green)); border-radius: var(--radius); padding: 16px; }
.panel h3 { margin: 0 0 12px; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--pc, var(--green)); font-weight: 900; display: flex; justify-content: space-between; align-items: center; }
.boxgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.boxgrid label, .form label { display: grid; gap: 4px; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.boxgrid select, .form input, .form select, .form textarea { text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--text); font-weight: 500; }
.saved { color: var(--green); font-size: .75rem; letter-spacing: 0; text-transform: none; }
.facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.facts div { padding: 8px 0; border-bottom: 1px solid var(--line); }
dt { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
dd { margin: 2px 0 0; font-weight: 700; }
.form { display: grid; gap: 12px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.note { border-left: 3px solid var(--pink); background: var(--surface-2); border-radius: 0 10px 10px 0; padding: 12px 14px; margin-bottom: 10px; }
.note p { margin: 6px 0 0; }
.note-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.note-h .rate { margin-left: auto; }
.note-h b { color: var(--pink); }
.del { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .8rem; text-decoration: underline; padding: 4px; }
.del:hover { color: var(--red); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px); background: var(--green); color: #000; font-weight: 800; padding: 12px 20px; border-radius: 4px; transition: transform .2s; z-index: 50; }
.toast.show { transform: translateX(-50%); }
.toast.bad { background: var(--red); }
.logo { width: 18px; height: 18px; object-fit: contain; vertical-align: -4px; margin-right: 6px; }
.logo.md { width: 26px; height: 26px; vertical-align: middle; margin: 0 8px; }
.logo.lg { width: 22px; height: 22px; }
.logo.xl { width: 44px; height: 44px; vertical-align: middle; margin-right: 12px; background: #fff; border-radius: 4px; padding: 4px; }
.club-line { display: flex; align-items: center; }
.foot { color: var(--muted); font-size: .85rem; padding-bottom: 32px; }

@media (max-width: 720px) {
  h1 { font-size: 1.6rem; }
  .top-in { gap: 8px; padding-top: 8px; }
  .filters label:not(.toggle) { flex: 1 1 calc(50% - 6px); }
  .reports { grid-template-columns: 1fr; }
    .kbd-hint { display: none; }
  .pr-head .av { width: 96px; height: 96px; }
  .boxgrid, .form .row2 { grid-template-columns: 1fr; }
}

/* Club look: condensed display type, sharp edges */
h1, h2, h3, nav a, .brand, .chip, .seg button, .btn, .badge, .club-n b, .m-time, .m-score, .day, .rate, .pc-name, .mark, dt, .filters label:not(.toggle) > span, .pr-pos { font-family: var(--display); }
h1 { text-transform: uppercase; font-weight: 800; font-size: 2.6rem; letter-spacing: .01em; line-height: 1; }
nav a, .chip, .seg button, .btn, .badge, .day, .panel h3 { text-transform: uppercase; letter-spacing: .06em; }
nav a { font-size: 1.05rem; font-weight: 700; }
.brand { font-size: 1.35rem; text-transform: uppercase; letter-spacing: .03em; }
.brand b { color: var(--accent); }
.mark { background: var(--accent); color: #000; }
.pc-name { font-size: 1.25rem; font-weight: 700; letter-spacing: .01em; }
.pr-head h2 { font-size: 2rem; text-transform: uppercase; font-weight: 800; letter-spacing: .01em; }
.badge { font-size: .85rem; font-weight: 700; height: 22px; }
.b-GK, .b-DEF, .b-MID, .b-FWD { color: #000; background: var(--accent); border-color: var(--accent); }
.chip { font-size: 1rem; }
.hero { border-left-width: 6px; }
.pcard, .rcard, .club, .toolbar, .panel, .match, .grid.list { box-shadow: none; }
.pcard:hover, .club:hover { transform: none; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.rate { font-size: 1.05rem; border-radius: 3px; }
.club-n b { font-size: 2rem; font-weight: 800; }
.m-time { font-size: 1.15rem; }
.m-team { font-family: var(--display); font-size: 1.15rem; text-transform: uppercase; letter-spacing: .02em; }
.toast { color: #000; }

.pc-info { display: grid; grid-template-columns: .8fr .7fr .9fr 1.6fr; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.pc-info span { display: flex; flex-direction: column; font-weight: 700; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-info small { font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); font-size: .72rem; font-weight: 700; }
.grid.list .pc-info { border: 0; padding: 0; width: 320px; flex: none; }
@media (max-width: 720px) { .grid.list .pc-info { display: none; } }

.credit { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: 1rem; color: var(--text); margin-bottom: 4px; }
.credit b { color: var(--accent); }
.login-card h1 { font-size: 2.2rem; }

.flag { width: 1.4em; height: 1.05em; margin-right: 6px; vertical-align: -2px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.15); flex: none; }
.nat { font-style: normal; display: flex; align-items: center; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.map { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 4px; background: var(--accent); color: #000; font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; text-decoration: none; }
.map:hover { filter: brightness(1.1); }

.pitch { width: 48px; height: 32px; flex: none; display: inline-block; vertical-align: middle; }
.pitch .lines { fill: none; stroke: var(--accent); stroke-width: .55; }
.pitch .zone { fill: var(--accent); opacity: .65; }
.pitch.md { width: 36px; height: 24px; margin-right: 8px; }
.pitch.lg { width: 54px; height: 36px; }
.pos-line { display: flex; align-items: center; }

/* Player card: photo · name + club badge · pitch + position */
.pcard { gap: 14px; padding: 18px; }
.pc-top { gap: 16px; }
.pcard .av { width: 72px; height: 72px; border-width: 2px; border-color: var(--accent); }
.pc-id { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.pc-name { font-size: 1.4rem; line-height: 1.05; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pc-sub { display: flex; align-items: center; font-size: .95rem; }
.logo.card { width: 24px; height: 24px; margin-right: 8px; }
.pc-pos { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; }
.pc-pos .pitch { width: 60px; height: 40px; }
.pc-pos small { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; color: #ffffff; }
.pc-star { top: 8px; right: 10px; }
.grid.list .pcard .av { width: 48px; height: 48px; }
.grid.list .pc-name { font-size: 1.15rem; -webkit-line-clamp: 1; }
.grid.list .pc-pos { flex-direction: row; min-width: 150px; }
.grid.list .pc-pos .pitch { width: 42px; height: 28px; }

/* Fixtures: match-centre style rows */
.match { display: grid; grid-template-columns: 96px 1fr 110px 1fr 280px; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 8px; }
.match:hover { border-color: var(--accent); }
.m-ko { display: flex; flex-direction: column; line-height: 1; }
.m-ko b { font-family: var(--display); font-size: 1.7rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.m-ko small, .m-comp { font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 700; color: var(--muted); margin-top: 4px; }
.m-team { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 1.25rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; min-width: 0; }
.m-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-team.home { justify-content: flex-end; text-align: right; }
.logo.crest { width: 40px; height: 40px; margin: 0; flex: none; }
.m-mid { display: flex; justify-content: center; }
.m-vs { font-family: var(--display); font-weight: 800; font-size: 1rem; letter-spacing: .1em; color: var(--muted); border: 1px solid var(--line); padding: 6px 12px; border-radius: 3px; }
.m-score { display: flex; align-items: center; gap: 6px; background: var(--accent); color: #000; padding: 4px 12px; border-radius: 3px; font-family: var(--display); font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.m-score i { font-style: normal; opacity: .6; }
.m-meta { display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--line); padding-left: 16px; min-width: 0; }
.m-comp { color: var(--accent); margin: 0; font-size: .8rem; }
.m-venue { font-size: .9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-venue em { font-style: normal; color: var(--muted); font-weight: 500; }
.m-dir { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; color: var(--text); text-decoration: none; font-family: var(--display); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--accent); padding: 2px 0; }
.m-dir svg { width: 14px; height: 14px; fill: none; stroke: var(--accent); stroke-width: 2.2; }
.m-dir:hover { color: var(--accent); }
@media (max-width: 1000px) {
  .match { grid-template-columns: 1fr auto 1fr; row-gap: 12px; }
  .m-ko { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 10px; }
  .m-meta { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 10px; }
  .m-team { font-size: 1.05rem; gap: 8px; }
  .logo.crest { width: 32px; height: 32px; }
}

/* Card details: Group · Age · Born / Nationality · Category */
.pc-info { grid-template-columns: auto auto minmax(0, 1fr) auto; column-gap: 14px; align-items: end; }
.cat { font-style: normal; align-self: flex-start; color: var(--accent); border: 1px solid var(--accent); border-radius: 3px; padding: 0 6px; font-size: .85rem; line-height: 1.5; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.grid.list .pc-info { width: 460px; }
.grid.list .pc-info > span { grid-column: auto; }

/* Player category: white text, border colour per category */
.cat { color: #fff; border-width: 1.5px; }
.cat-uae-citizen { border-color: #3ddc84; }
.cat-citizen-child { border-color: #2ec4b6; }
.cat-uae-born { border-color: #ff5c5c; }
.cat-residence { border-color: #4da3ff; }
.cat-passport-holders { border-color: #b18cff; }

/* Shadow squad */
.pr-actions { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.shadow-pick { display: grid; gap: 4px; flex: 1 1 200px; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.shadow-pick select { text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--text); }
.ss-count { display: flex; gap: 28px; flex-wrap: wrap; }
.ss-count span { display: flex; flex-direction: column; font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; color: var(--muted); font-weight: 700; }
.ss-count b { font-size: 2rem; color: var(--text); line-height: 1; letter-spacing: 0; }
.ss-count span:first-child b { color: var(--accent); }
.ss-wrap { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 16px; align-items: start; }
.ss-pitch { position: relative; aspect-ratio: 68 / 105; max-height: 920px; background: #050505; border: 1px solid var(--line); border-radius: var(--radius); }
.ss-lines { position: absolute; inset: 3%; width: 94%; height: 94%; fill: none; stroke: var(--accent); stroke-width: .3; opacity: .7; }
.slot { position: absolute; transform: translate(-50%, -50%); width: 28%; min-width: 108px; background: rgba(10,10,10,.92); border: 1px solid var(--line); border-radius: 4px; padding: 6px; display: grid; gap: 4px; }
.slot.has { border-color: var(--accent); }
.slot-h { display: flex; justify-content: space-between; align-items: center; font-family: var(--display); letter-spacing: .08em; }
.slot-h b { font-size: 1rem; }
.slot-h span { background: var(--surface-2); color: var(--muted); border-radius: 3px; padding: 0 7px; font-weight: 700; font-size: .85rem; }
.slot.has .slot-h span { background: var(--accent); color: #000; }
.ss-p { display: flex; align-items: center; gap: 6px; border: 0; background: var(--surface-2); padding: 3px; border-radius: 3px; cursor: pointer; text-align: left; min-width: 0; }
.ss-p:hover { outline: 1px solid var(--accent); }
.ss-p span { font-size: .78rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.ss-p em { font-style: normal; font-size: .7rem; color: var(--muted); }
.av.xs { width: 22px; height: 22px; font-size: .6rem; border-width: 1px; }
.slot-more { font-size: .72rem; color: var(--muted); text-align: center; }
.ss-list { display: grid; gap: 12px; }
.ss-group { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 12px 14px; }
.ss-group h3 { margin: 0 0 8px; font-size: 1.1rem; display: flex; gap: 8px; align-items: center; }
.ss-group h3 span { background: var(--accent); color: #000; border-radius: 3px; padding: 0 7px; font-size: .9rem; }
.ss-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ss-name { display: flex; align-items: center; gap: 8px; }
.ss-row .rate { margin-left: auto; }
@media (max-width: 900px) {
  .ss-wrap { grid-template-columns: 1fr; }
  .slot { min-width: 84px; padding: 4px; }
  .ss-p em { display: none; }
}

/* Clubs: summary, age-group chart and heat-map table */
.c-chart-wrap { margin-bottom: 16px; }
.c-chart { display: grid; grid-template-columns: repeat(13, 1fr); gap: 8px; height: 180px; align-items: end; }
.bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar-f { width: 100%; max-width: 44px; background: var(--accent); border-radius: 2px 2px 0 0; min-height: 2px; }
.bar-v { font-family: var(--display); font-weight: 700; font-size: .9rem; }
.bar-l { font-family: var(--display); font-weight: 700; font-size: .85rem; color: var(--muted); letter-spacing: .04em; }
.c-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.c-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.c-table th, .c-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.c-table thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.c-table thead button { all: unset; cursor: pointer; font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; font-weight: 700; color: var(--muted); }
.c-table thead button:hover, .c-table th[aria-sort="ascending"] button, .c-table th[aria-sort="descending"] button { color: var(--accent); }
.c-table thead button:focus-visible, .c-club:focus-visible, .heat:focus-visible { outline: 2px solid var(--focus); }
.c-table tbody th, .c-table thead th:first-child, .c-table tfoot th { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.c-club { all: unset; cursor: pointer; display: flex; align-items: center; font-weight: 700; font-size: .95rem; }
.c-club:hover { color: var(--accent); }
.heat { all: unset; cursor: pointer; display: block; min-width: 34px; padding: 5px 0; border-radius: 2px; font-weight: 700; font-size: .9rem; text-align: center;
  background: rgba(230, 230, 230, var(--h)); color: #fff; }
.heat[style*="--h:0.9"], .heat[style*="--h:1"], .heat[style*="--h:0.8"], .heat[style*="--h:0.7"], .heat[style*="--h:0.6"] { color: #000; }
.heat:hover { outline: 1px solid #fff; }
.c-table .zero { color: #3a3a3a; }
.c-table .tot { font-family: var(--display); font-size: 1.1rem; font-weight: 800; color: var(--accent); }
.c-table tbody tr:hover th, .c-table tbody tr:hover td { background: var(--surface-2); }
.c-table tfoot th, .c-table tfoot td { font-family: var(--display); font-weight: 800; text-transform: uppercase; border-top: 2px solid var(--accent); border-bottom: 0; }
@media (max-width: 720px) { .c-chart { gap: 3px; height: 140px; } .bar-v { font-size: .7rem; } .bar-l { font-size: .7rem; } }

/* Shadow squad numbered circles */
.num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--text); font-family: var(--display); font-size: 1.05rem; font-weight: 800; letter-spacing: 0; flex: none; }
.slot.has .num { background: var(--accent); color: #000; }
.slot-h { gap: 6px; }
.slot-h span { background: none !important; color: var(--muted) !important; font-family: var(--display); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; padding: 0; }
.slot.has .slot-h span { color: var(--accent) !important; }
.ss-group h3 { gap: 10px; }
.ss-group h3 .num { width: 28px; height: 28px; font-size: 1rem; background: var(--accent); color: #000; }

.age-select label { display: flex; flex-direction: column; gap: 4px; max-width: 220px; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.age-select select { font-size: 1rem; color: var(--text); text-transform: none; letter-spacing: 0; font-weight: 600; }

.hero-row { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.btn.primary { color: #000; }

/* James's photo in place of the JM mark */
.me-photo { object-fit: cover; object-position: center 30%; padding: 0; border: 2px solid var(--accent); background: #222; }
.mark.me-photo { width: 42px; height: 42px; }
.mark.big.me-photo { width: 88px; height: 88px; border-width: 3px; }

/* Background: faint pitch markings behind everything */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .13;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%22-40%20-40%201130%20760%22%20preserveAspectRatio%3D%22xMidYMid%20slice%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23e6e6e6%22%20stroke-width%3D%222.2%22%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%221050%22%20height%3D%22680%22/%3E%3Cpath%20d%3D%22M525%200v680M0%20138.5h165v403H0M0%20248.5h55v183H0M1050%20138.5H885v403h165M1050%20248.5H995v183h55%22/%3E%3Ccircle%20cx%3D%22525%22%20cy%3D%22340%22%20r%3D%2291.5%22/%3E%3Cpath%20d%3D%22M165%20267a91.5%2091.5%200%200%201%200%20146M885%20267a91.5%2091.5%200%200%200%200%20146%22/%3E%3C/g%3E%3Cg%20fill%3D%22%23e6e6e6%22%3E%3Ccircle%20cx%3D%22525%22%20cy%3D%22340%22%20r%3D%224%22/%3E%3Ccircle%20cx%3D%22110%22%20cy%3D%22340%22%20r%3D%224%22/%3E%3Ccircle%20cx%3D%22940%22%20cy%3D%22340%22%20r%3D%224%22/%3E%3C/g%3E%3C/svg%3E") center / cover no-repeat; }
@media (orientation: portrait) { body::before { transform: rotate(90deg) scale(1.6); } }
.login { background: transparent; }

/* Birth quarter split: stacked columns, same style as players per age group */
.q-legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .75rem; letter-spacing: .06em; align-items: center; }
.q-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: -8px; }
.q-summary { margin-bottom: 16px; }
.q-chart { height: 260px; }
.q-stack { display: flex; flex-direction: column-reverse; width: 100%; max-width: 44px; gap: 1px; }
.q-seg { display: grid; place-items: center; min-height: 0; overflow: hidden; font-family: var(--display); font-weight: 700; font-size: .8rem; }
.q-stack .q-seg:last-child { border-radius: 2px 2px 0 0; }
.q1 { background: #e6e6e6; color: #000; } .q2 { background: #bdbdbd; color: #000; } .q3 { background: #7a7a7a; color: #fff; } .q4 { background: #3d3d3d; color: #fff; }
.q1t { color: #e6e6e6 !important; } .q2t { color: #bdbdbd !important; } .q3t { color: #9a9a9a !important; } .q4t { color: #7a7a7a !important; }
@media (max-width: 720px) { .q-seg { font-size: 0; } }

/* Footer notice */
.foot { border-top: 1px solid var(--line); padding-top: 20px; display: grid; gap: 8px; }
.foot p { margin: 0; }
.copy { color: var(--text); font-size: .85rem; }
.contact { font-size: .9rem; color: var(--muted); }
.contact a { color: var(--accent); text-decoration: none; font-weight: 600; }
.contact a:hover { text-decoration: underline; }


/* Clickable birth quarters */
.q-pick { all: unset; cursor: pointer; display: flex; flex-direction: column; font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; color: var(--muted); font-weight: 700; padding: 4px 8px; margin: -4px -8px; border-radius: 4px; }
.q-pick b { font-size: 2rem; line-height: 1; letter-spacing: 0; }
.q-pick:hover, .q-pick:focus-visible { background: var(--surface-2); color: var(--text); outline: 1px solid var(--accent); }
button.q-seg { all: unset; display: grid; place-items: center; min-height: 0; overflow: hidden; font-family: var(--display); font-weight: 700; font-size: .8rem; cursor: pointer; }
button.q-seg.q1 { background: #e6e6e6; color: #000; } button.q-seg.q2 { background: #bdbdbd; color: #000; } button.q-seg.q3 { background: #7a7a7a; color: #fff; } button.q-seg.q4 { background: #3d3d3d; color: #fff; }
button.q-seg:hover, button.q-seg:focus-visible { outline: 2px solid #fff; outline-offset: -2px; position: relative; z-index: 1; }
.q-hint { margin: 0 0 12px; color: var(--muted); font-size: .85rem; }

/* Login: pitch with the shadow squad numbers 1-11 */
#gate { position: relative; overflow: hidden; }
#gate .login-card { position: relative; z-index: 1; }
.gate-pitch { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.gp-lines { fill: none; stroke: #e6e6e6; stroke-width: 2.2; opacity: .16; }
.gp-pos circle { fill: #000; stroke: #e6e6e6; stroke-width: 3; opacity: .55; }
.gp-pos text { fill: #e6e6e6; font-family: "Barlow Condensed", sans-serif; font-weight: 800; font-size: 32px; text-anchor: middle; opacity: .7; }
.gate-pitch.port { display: none; }
@media (orientation: portrait) { .gate-pitch.land { display: none; } .gate-pitch.port { display: block; } }
body:has(#gate:not([hidden]))::before { display: none; }
.login-card .toggle { display: flex; align-items: center; gap: 10px; }

/* Private academies */
.ap-tools { grid-template-columns: 1fr 220px; align-items: end; }
#acp-body .ap-contact p { margin: 4px 0; }
.ap-card .note { margin: 0; }
.ap-card details summary { cursor: pointer; margin-bottom: 8px; }
.ap-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ap-actions .btn { min-height: 40px; }
dialog.ap-dlg { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(620px, 100vw); max-width: 100vw; border: 0; border-left: 1px solid var(--line); padding: 0; background: var(--bg); color: var(--text); }
dialog.ap-dlg[open] { display: flex; flex-direction: column; }
.ap-title { font-family: var(--display); text-transform: uppercase; letter-spacing: .04em; font-size: 1.3rem; }
.ap-dlg fieldset { margin: 0; display: grid; gap: 12px; }
.ap-dlg legend { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; font-weight: 800; color: var(--accent); padding: 0 6px; }
.ap-dlg input[type=file] { padding: 8px; }
.ap-preview img { width: 120px; height: 120px; object-fit: cover; border-radius: 4px; border: 2px solid var(--accent); }
@media (max-width: 720px) { .ap-tools { grid-template-columns: 1fr; } }

/* Header: two lines. Line 1 brand + account, line 2 the tabs in groups */
.top-in { flex-wrap: nowrap; min-height: 60px; }
.me { margin-left: auto; flex: none; gap: 14px; }
.who { font-size: .8rem; }
.who b { color: var(--text); font-weight: 600; }
.navbar { border-top: 1px solid var(--line); background: #050505; }
.nav-in { display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.nav-in::-webkit-scrollbar { display: none; }
.nav-g { display: flex; align-items: center; gap: 2px; padding: 0 10px; position: relative; }
.nav-g:first-child { padding-left: 0; }
.nav-g + .nav-g::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: var(--line); }
.navbar a { padding: 12px 12px 9px; border-radius: 0; font-size: 1rem; }
.navbar a:hover { background: none; color: #fff; }
.navbar a[aria-current="page"] { border-radius: 0; }
html[dir="rtl"] .me { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .nav-g:first-child { padding-left: 10px; padding-right: 0; }
html[dir="rtl"] .nav-g + .nav-g::before { left: auto; right: 0; }
@media (max-width: 720px) {
  .who { display: none; }
  .top-in { padding-top: 0; }
  .navbar a { padding: 10px 10px 7px; font-size: .95rem; }
  .nav-g { padding: 0 6px; }
}
#signout { min-height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; }
#signout:hover { color: var(--text); border-color: var(--text); background: none; }

/* Parent contact and share prompt */
.ap-contact { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; }
.ap-contact summary { cursor: pointer; }
.ap-contact p { margin: 6px 0 0; }
.ap-contact a { color: var(--accent); font-weight: 600; }
dialog.share-dlg { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); padding: 24px; width: min(380px, calc(100vw - 32px)); }
dialog.share-dlg[open] { display: grid; gap: 12px; }
dialog.share-dlg h2 { margin: 0; font-family: var(--display); text-transform: uppercase; }
dialog.share-dlg p { margin: 0; }
.btn.wide { display: grid; place-items: center; text-decoration: none; }
a.btn { color: var(--text); }
a.btn.primary { color: #000; }

/* Slim status line under the menu */
.subbar { border-top: 1px solid var(--line); background: #050505; }
.subbar-in { display: flex; align-items: center; gap: 16px; justify-content: flex-end; min-height: 30px; font-size: .8rem; }
.subbar b { color: var(--text); font-weight: 600; }
.subbar #owner { min-height: 26px; padding: 0 8px; font-size: .8rem; }
.subbar .live { font-size: .75rem; }
@media (max-width: 720px) { .subbar-in { justify-content: space-between; gap: 8px; } }

/* Ratings and radar */
fieldset.attrs { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
fieldset.attrs legend { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 0 6px; }
.radar-panel { display: grid; justify-items: center; }
.radar-panel h3 { width: 100%; }
.radar { width: 100%; max-width: 300px; height: auto; }
.pdf-btn { min-height: 32px; padding: 0 12px; font-size: .8rem; }
.attr-line { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .78rem; color: var(--muted); margin-top: 4px; }
.attr-line b { color: var(--text); }
@media (max-width: 720px) { fieldset.attrs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Language switch */
.lang-btn { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px; color: var(--text); font-family: "Noto Kufi Arabic", var(--display); font-size: .85rem; margin-inline-end: 8px; }
.lang-btn:hover { border-color: var(--text); background: none; }
.gate-lang { justify-self: end; margin: -8px -8px 0 0; }
/* Arabic: Kufi font, no letter-spacing, right-to-left fixes */
html[lang="ar"] { --display: "Noto Kufi Arabic", "Barlow Condensed", sans-serif; }
html[lang="ar"] body { font-family: "Noto Kufi Arabic", Inter, system-ui, sans-serif; }
html[lang="ar"] * { letter-spacing: 0 !important; }
html[lang="ar"] h1 { font-size: 2.1rem; line-height: 1.3; }
html[dir="rtl"] .hero { border-left: 0; border-right: 6px solid var(--sec); padding-left: 0; padding-right: 14px; }
html[dir="rtl"] .search svg { left: auto; right: 14px; }
html[dir="rtl"] .search input { padding: 0 46px 0 16px; }
html[dir="rtl"] dialog#profile, html[dir="rtl"] dialog.ap-dlg { margin: 0 auto 0 0; border-left: 0; border-right: 1px solid var(--line); }
html[dir="rtl"] .rcard, html[dir="rtl"] .match, html[dir="rtl"] .ss-group { border-left: 1px solid var(--line); border-right: 4px solid var(--sec, var(--accent)); }
html[dir="rtl"] .note { border-left: 0; border-right: 3px solid var(--accent); border-radius: 10px 0 0 10px; }
html[dir="rtl"] .m-meta { border-left: 0; padding-left: 0; border-right: 1px solid var(--line); padding-right: 16px; }
html[dir="rtl"] .gate-lang { justify-self: start; margin: -8px 0 0 -8px; }
html[dir="rtl"] .pitch, html[dir="rtl"] .ss-lines, html[dir="rtl"] .gate-pitch, html[dir="rtl"] .radar { direction: ltr; }
html[dir="rtl"] .pc-name, html[dir="rtl"] .pc-sub, html[dir="rtl"] #pr-name, html[dir="rtl"] .link, html[dir="rtl"] .m-team span, html[dir="rtl"] .c-club, html[dir="rtl"] .ss-p span, html[dir="rtl"] .note p, html[dir="rtl"] .rcard p { unicode-bidi: plaintext; }
html[dir="rtl"] .pc-name, html[dir="rtl"] .pc-sub { text-align: right; }

/* Public fixture request page */
.req { align-items: start; padding-top: 32px; padding-bottom: 32px; }
.req-card { width: min(640px, 100%); }
.req-card fieldset { margin: 0; display: grid; gap: 12px; }
.req-card legend { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; font-weight: 800; color: var(--accent); padding: 0 6px; }
.req-card .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fld { font-weight: 600; font-size: .9rem; }
.req-ages { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check input, .req-seg input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 700; cursor: pointer; }
.chip-check input:checked + span { background: var(--accent); color: #000; border-color: var(--accent); }
.chip-check input:focus-visible + span, .req-seg input:focus-visible + span { outline: 3px solid var(--focus); }
.req-seg { display: flex; width: 100%; }
.req-seg label { flex: 1; display: block; }
.req-seg span { display: grid; place-items: center; min-height: 40px; border-radius: 4px; font-weight: 700; color: var(--muted); cursor: pointer; }
.req-seg input:checked + span { background: var(--accent); color: #000; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 600px) { .req-card .row2 { grid-template-columns: 1fr; } }

/* Fixture requests tab */
.fr-tools { grid-template-columns: 1fr auto; align-items: end; }
.fr-linkbox { display: grid; gap: 4px; min-width: 0; }
.fr-linkbox code { font-size: 1rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-btns { display: flex; gap: 8px; }
.fr-tools .filters { grid-column: 1 / -1; }
.fr-card .rhead { justify-content: space-between; align-items: start; }
.fr-name { font-family: var(--display); font-size: 1.3rem; text-transform: uppercase; }
.fr-st { width: auto; min-height: 36px; }
.fr-facts { grid-template-columns: 1fr 1fr; }
.fr-card .ap-actions { flex-wrap: wrap; }
a.btn { display: inline-grid; place-items: center; text-decoration: none; }
@media (max-width: 720px) { .fr-tools { grid-template-columns: 1fr; } .fr-btns { flex-wrap: wrap; } }

/* Fixtures given to staff */
.fx-staff select { min-height: 44px; }
.m-staff { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
.st-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 1px solid var(--accent); border-radius: 4px; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.st-chip em { font-family: var(--body, inherit); text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); }
.st-chip.me { background: var(--accent); color: #000; }
.st-chip.me em { color: #333; }
.st-chip.done { border-color: #3ddc84; }
.st-x { border: 0; background: none; color: inherit; cursor: pointer; min-width: 28px; min-height: 28px; font-size: .9rem; }
.st-add { min-height: 32px; padding: 0 12px; border: 1px dashed var(--line); background: none; color: var(--muted); border-radius: 4px; cursor: pointer; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.st-add:hover { color: var(--text); border-color: var(--accent); }
.mine-panel { margin-bottom: 16px; border-left: 4px solid var(--accent); }
.mine-panel h2 { margin: 0 0 8px; font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; }
.mine { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.mine:first-child { border-top: 0; }
.mine p { margin: 4px 0 0; }
.mine.done { opacity: .6; }
.mine-note { font-style: italic; }
.mine-act { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.fa-new { display: grid; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
#fa-form, .fa-done { display: grid; gap: 12px; }
.fa-done p { margin: 0; }
#fa-match { white-space: normal; }
@media (max-width: 640px) { .mine { flex-direction: column; align-items: stretch; } .mine-act { justify-content: space-between; } }

/* Edit / delete under a report */
.note-act { display: flex; gap: 16px; align-items: center; margin-top: 8px; }
.note-act .del { margin: 0; }
.edit { border: 0; background: none; padding: 4px 0; color: var(--text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }
.edit:hover { color: var(--accent); }
.form-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Dashboard */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi b { font-family: var(--display); font-size: 2.6rem; line-height: 1; font-weight: 800; }
.kpi span { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--muted); }
.d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.d-grid .panel { margin: 0; }
.d-wide { grid-column: 1 / -1; }
.d-months { grid-template-columns: repeat(6, 1fr); }
.d-click { cursor: pointer; }
.d-click:hover { border-color: var(--accent); }
.d-click h3 .small { float: right; text-transform: uppercase; }
.hb { display: grid; grid-template-columns: minmax(90px, 140px) 1fr 36px; align-items: center; gap: 10px; padding: 5px 0; }
.hb-l { font-weight: 700; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.hb-t { height: 12px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.hb-f { display: block; height: 100%; background: var(--accent); }
.hb-v { font-family: var(--display); font-size: 1.05rem; text-align: right; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.d-list { display: grid; }
.d-player, .d-act { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 10px 4px; color: var(--text); cursor: pointer; font: inherit; }
.d-list > :first-child { border-top: 0; }
.d-player:hover, .d-act:hover { background: var(--surface-2); }
.d-player .av { width: 44px; height: 44px; flex: none; }
.d-player > span:not(.rate) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.d-player small { color: var(--muted); }
.d-act > span:nth-child(2) { flex: 1; }
.d-act .small { width: 56px; flex: none; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, 1fr); } .d-grid { grid-template-columns: 1fr; } .kpi b { font-size: 2rem; } }

/* Pipeline board */
.pp-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.pp-col { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--sc); border-radius: var(--radius); padding: 10px; min-height: 240px; transition: border-color .1s, background .1s; }
.pp-col.over { border-color: var(--accent); background: var(--surface-2); }
.pp-col h3 { margin: 2px 4px 10px; display: flex; justify-content: space-between; font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; font-size: 1rem; }
.pp-col h3 span { color: var(--muted); }
.pp-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.pp-card .rate { flex: none; }
.pp-card { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px; color: var(--text); cursor: grab; font: inherit; }
.pp-card:hover { border-color: var(--accent); }
.pp-card.dragging { opacity: .4; }
.pp-card .av { width: 40px; height: 40px; flex: none; border-width: 1px; }
.pp-id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pp-id b { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-id small { color: var(--muted); font-size: .75rem; display: flex; align-items: center; gap: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pp-id small .logo { width: 14px; height: 14px; }
.pp-empty { margin: 0; padding: 14px 6px; text-align: center; color: var(--muted); font-size: .8rem; border: 1px dashed var(--line); border-radius: 6px; }
.pp-list .pp-card ~ .pp-empty { display: none; }
html[dir="rtl"] .pp-card, html[dir="rtl"] .d-player, html[dir="rtl"] .d-act { text-align: right; }
html[dir="rtl"] .d-click h3 .small { float: left; }

/* Club version logo in the square */
.mark.club-mark { background: transparent; }
.mark.club-mark img { width: 100%; height: 100%; object-fit: contain; }

/* Side menu layout (html.side): tabs down the left on laptops and desktops */
.nav-h { display: none; }
@media (min-width: 1000px) {
  html.side { --side: 248px; }
  html.side #app { padding-left: var(--side); }
  html.side .top { border-bottom-width: 1px; }
  html.side .top-in { max-width: none; padding: 0 28px; }
  html.side .brand { position: fixed; left: 0; top: 0; width: var(--side); height: 61px; padding: 0 20px; z-index: 12; background: #000; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  html.side .brand > span:last-child { display: flex; flex-direction: column; font-size: 1rem; line-height: 1.05; }
  html.side .navbar { position: fixed; left: 0; top: 61px; bottom: 0; width: var(--side); border-top: 0; border-right: 1px solid var(--line); border-bottom: 3px solid var(--accent); background: #050505; overflow-y: auto; z-index: 11; }
  html.side .nav-in { flex-direction: column; align-items: stretch; padding: 8px 0 24px; max-width: none; overflow: visible; }
  html.side .nav-g { flex-direction: column; align-items: stretch; gap: 0; padding: 14px 0 6px; }
  html.side .nav-g + .nav-g::before { left: 20px; right: 20px; top: 0; bottom: auto; width: auto; height: 1px; }
  html.side .nav-h { display: block; padding: 0 20px 6px; font-family: var(--display); text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 700; color: var(--muted); opacity: .7; }
  html.side .navbar a { padding: 10px 20px; border-bottom: 0; border-left: 3px solid transparent; justify-content: space-between; }
  html.side .navbar a:hover { background: var(--surface-2); }
  html.side .navbar a[aria-current="page"] { border-left-color: var(--accent); background: var(--surface-2); color: var(--accent); }
  html.side #main, html.side .foot { max-width: 1320px; padding-left: 28px; padding-right: 28px; }
  html[dir="rtl"].side #app { padding-left: 0; padding-right: var(--side); }
  html[dir="rtl"].side .brand, html[dir="rtl"].side .navbar { left: auto; right: 0; border-right: 0; border-left: 1px solid var(--line); }
  html[dir="rtl"].side .navbar a { border-left: 0; border-right: 3px solid transparent; }
  html[dir="rtl"].side .navbar a[aria-current="page"] { border-right-color: var(--accent); }
}

/* Watch list on the dashboard */
.wl-panel { margin-bottom: 16px; border-left: 4px solid var(--accent); }
.wl-row { display: grid; grid-template-columns: 90px minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.wl-row:first-child { border-top: 0; }
.wl-when { display: flex; flex-direction: column; font-family: var(--display); text-transform: uppercase; }
.wl-when span { color: var(--muted); }
.wl-game { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wl-game b { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wl-ps { display: flex; flex-wrap: wrap; gap: 6px; }
.wl-p { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; color: var(--text); cursor: pointer; font: inherit; font-size: .85rem; font-weight: 700; }
.wl-p:hover { border-color: var(--accent); }
.wl-p .av { width: 28px; height: 28px; border-width: 1px; font-size: .7rem; }
@media (max-width: 720px) { .wl-row { grid-template-columns: 1fr; gap: 6px; } }

/* Player search list */
.cmp-search { position: relative; }
.hits { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--accent); border-radius: 6px; max-height: 360px; overflow: auto; }
.hits button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 10px 12px; background: none; border: 0; border-radius: 4px; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.hits button:hover, .hits button:focus { background: var(--surface-2); }
.hits small { color: var(--muted); }

/* Compare */
.cmp-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.cmp-slot { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px; min-height: 92px; display: flex; align-items: center; }
.cmp-who { width: 100%; }
.cmp-card { display: flex; align-items: center; gap: 14px; border-left: 4px solid var(--cc, var(--accent)); padding-left: 12px; }
.cmp-card .av { width: 64px; height: 64px; flex: none; }
.cmp-card > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cmp-card b { font-family: var(--display); font-size: 1.4rem; text-transform: uppercase; line-height: 1.1; }
.cmp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
.cmp-grid .panel { margin: 0; }
.cmp-radar { display: flex; flex-direction: column; align-items: center; }
.cmp-radar .radar { width: 100%; max-width: 380px; }
.cmp-legend { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; font-weight: 700; font-size: .9rem; }
.cmp-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.cmp-table { width: 100%; border-collapse: collapse; }
.cmp-table th, .cmp-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.cmp-table thead th { font-family: var(--display); text-transform: uppercase; letter-spacing: .04em; font-size: 1rem; }
.cmp-table tbody th { color: var(--muted); font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; font-weight: 700; width: 34%; }
.cmp-best { color: #3ddc84; font-weight: 800; }
@media (max-width: 900px) { .cmp-grid, .cmp-slots { grid-template-columns: 1fr; } }

/* Quick report */
.qr-fab { position: fixed; right: 20px; bottom: 20px; z-index: 30; min-height: 54px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--accent); color: #000; font-family: var(--display); font-weight: 800; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; box-shadow: 0 6px 24px rgba(0,0,0,.6); cursor: pointer; }
.qr-fab:hover { filter: brightness(1.08); }
html[dir="rtl"] .qr-fab { right: auto; left: 20px; }
#app[hidden] ~ .qr-fab { display: none; }
.qr-sec { display: grid; gap: 8px; }
.qr-sec h3 { margin: 0; font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; font-size: .9rem; color: var(--muted); }
.qr-sec #qr-q { width: 100%; min-height: 56px; font-size: 1.1rem; }
.tap { display: flex; flex-wrap: wrap; gap: 8px; }
.tap label { flex: 1 1 0; min-width: 52px; }
.tap input { position: absolute; opacity: 0; pointer-events: none; }
.tap span { display: grid; place-items: center; min-height: 52px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); font-family: var(--display); font-weight: 800; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .03em; cursor: pointer; text-align: center; color: var(--text); }
#qr-next .tap span { font-size: .9rem; min-height: 46px; }
#qr-next .tap label { flex: 1 1 calc(50% - 8px); }
.tap input:checked + span { background: var(--accent); color: #000; border-color: var(--accent); }
.tap input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.qr-attr { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 8px; }
.qr-attr > span { font-weight: 700; font-size: .9rem; }
.qr-attr .tap label { min-width: 40px; }
.qr-save { min-height: 60px; font-size: 1.15rem; position: sticky; bottom: 0; }
@media (max-width: 720px) { dialog.qr-dlg { width: 100vw; } .qr-attr { grid-template-columns: 1fr; gap: 4px; } }
