/* NRA Portal — visual language adapted from TMI (dark, red accent, card navigation). Branding colours are variables. */
:root {
  /* NRA logo colours: red ring #D21924, cedar green #097E3F, white, black ball */
  --brand: #d21924; --brand-2: #9c111a; --accent: #1fae5b; --cedar: #097e3f;
  --bg: #05070b; --panel: #0b1118; --panel-2: #101722; --line: #27313d; --line-2: #1a232e;
  --text: #f6f7f9; --muted: #aab4c0; --warn: #ffd166; --danger: #ff8a92; --ok: #7bf0c6; --info: #8ec5ff;
  --radius: 18px; --shadow: 0 18px 50px rgba(0,0,0,.22);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 85% -5%, rgba(9,126,63,.22), transparent 38%), radial-gradient(circle at 10% 0, rgba(210,25,36,.16), transparent 34%), var(--bg) fixed; background-color: var(--bg); color: var(--text);
  font: 15px/1.45 Inter, "Segoe UI", "Noto Sans Arabic", Tahoma, Arial, sans-serif; overflow-x: hidden; }
a { color: inherit; }
[dir=rtl], .ar { font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif; }
h1, h2, h3 { letter-spacing: -.5px; margin: 0 0 12px; line-height: 1.15; }
h1 { font-size: clamp(24px, 4vw, 34px); } h2 { font-size: 21px; } h3 { font-size: 17px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: .02em; }
.hidden { display: none !important; }

/* ── shell ── */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(5,8,13,.9); border-bottom: 1px solid rgba(255,255,255,.09); backdrop-filter: blur(14px); }
.topbar .in { max-width: 1240px; margin: auto; padding: 10px 16px; display: flex; gap: 12px; align-items: center; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; letter-spacing: .02em; min-width: 0; }
.brand .logo { width: 42px; height: 42px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 900; flex: none; overflow: hidden; box-shadow: 0 0 0 2px var(--brand); }
.brand .logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brand .nm { display: flex; flex-direction: column; min-width: 0; }
.brand .nm b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .nm small { color: var(--muted); font-weight: 600; font-size: 11px; }
.topbar .sp { flex: 1; }
.topbar .act { display: flex; gap: 8px; align-items: center; }
.wrap { max-width: 1240px; margin: auto; padding: 22px 16px 70px; }

/* pill menu (TMI compact menu) */
.nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; padding: 8px; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: rgba(9,14,21,.82); }
.nav a { text-decoration: none; border: 1px solid #26313d; background: #101721; border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: 13px; white-space: nowrap; transition: .15s; }
.nav a:hover, .nav a.on { border-color: var(--brand); background: linear-gradient(180deg, var(--brand), var(--brand-2)); }

/* ── panels & cards ── */
.card { background: linear-gradient(145deg, rgba(16,23,33,.96), rgba(8,12,18,.96)); border: 1px solid rgba(255,255,255,.09); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin: 0 0 16px; min-width: 0; }
.card.flat { box-shadow: none; background: rgba(9,14,21,.82); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid > * { min-width: 0; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
.tile { border: 1px solid rgba(255,255,255,.12); background: linear-gradient(180deg, rgba(16,23,33,.94), rgba(7,11,16,.94)); border-radius: 16px; padding: 14px; text-decoration: none; }
.tile b { display: block; font-size: 28px; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 12.5px; }
a.tile:hover { border-color: var(--brand); transform: translateY(-2px); }

/* hub cards (TMI card navigation) */
.hub { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 6px 0 18px; }
.hub a { min-height: 86px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; border-radius: 18px; text-decoration: none; text-align: center;
  background: linear-gradient(180deg, rgba(16,23,33,.96), rgba(7,11,16,.96)); border: 1px solid rgba(255,255,255,.13); font-weight: 800; transition: .18s; }
.hub a span { font-size: 24px; line-height: 1; }
.hub a:hover { transform: translateY(-3px); border-color: var(--brand); background: linear-gradient(180deg, var(--brand), var(--brand-2)); }
.hub a .cnt { font-size: 11px; background: var(--brand); border-radius: 999px; padding: 1px 8px; }

/* alerts — ACTION REQUIRED */
.alerts { display: grid; gap: 8px; }
.alert { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid; text-decoration: none; font-weight: 700; }
.alert .n { font-size: 22px; min-width: 38px; text-align: center; font-variant-numeric: tabular-nums; }
.alert.warn { border-color: #8a6a1f; background: rgba(138,106,31,.12); color: var(--warn); }
.alert.danger { border-color: #8b1d26; background: rgba(255,32,43,.1); color: #ffb3b8; }
.alert.info { border-color: #1f4e8a; background: rgba(31,78,138,.12); color: var(--info); }
.alert:hover { filter: brightness(1.2); }

/* ── forms ── */
label { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #b9c0ca; margin: 10px 0 5px; font-weight: 700; }
label.inline { display: inline-flex; gap: 8px; align-items: center; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text); margin: 4px 12px 4px 0; }
input, select, textarea { width: 100%; font: inherit; color: #fff; background: #070b11; border: 1px solid #303b48; border-radius: 11px; padding: 10px 12px; min-height: 42px; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand); }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(210,25,36,.45); outline-offset: 1px; }
.form { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.form .full { grid-column: 1 / -1; }
.form .actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.err { color: var(--danger); } .okc { color: var(--ok); }

button, .btn { font: inherit; font-weight: 800; color: #fff; background: #131b26; border: 1px solid #2c3744; border-radius: 11px; padding: 10px 14px; cursor: pointer; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 42px; transition: .15s; }
button:hover, .btn:hover { border-color: #4a5868; }
button.primary, .btn.primary { background: var(--brand); border-color: var(--brand); box-shadow: 0 9px 24px rgba(210,25,36,.2); }
button.ok, .btn.ok { background: var(--cedar); border-color: #1fae5b; }
button.danger, .btn.danger { border-color: #7d1d25; color: var(--danger); }
button.ghost, .btn.ghost { background: transparent; }
button.sm, .btn.sm { padding: 5px 10px; min-height: 32px; font-size: 13px; border-radius: 9px; }
button:disabled { opacity: .45; cursor: not-allowed; }

/* ── badges ── */
.badge { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #2b3744; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 800; white-space: nowrap; background: #0d141d; }
.badge.ok { border-color: #1f8a66; color: var(--ok); } .badge.warn { border-color: #8a6a1f; color: var(--warn); }
.badge.danger { border-color: #8b1d26; color: var(--danger); } .badge.info { border-color: #1f4e8a; color: var(--info); }
.badge.live { border-color: var(--brand); color: #fff; background: var(--brand); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .65; } }

/* ── tables ── */
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #232d38; border-radius: 12px; max-width: 100%; }
table { width: 100%; border-collapse: collapse; }
th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #b9c0ca; text-align: start; padding: 10px 12px; border-bottom: 1px solid #2b3744; background: #0d141d; white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid #18212c; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; } tbody tr.click:hover td { background: rgba(255,255,255,.03); }
td.num, th.num { text-align: end; font-variant-numeric: tabular-nums; }
.tblTools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.tblTools input, .tblTools select { width: auto; flex: 1 1 180px; }
.empty { padding: 22px; text-align: center; color: var(--muted); }

/* ── modal ── */
.modalBg { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 80; display: grid; place-items: center; padding: 16px; animation: fade .12s; }
.modal { width: min(680px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal.wide { width: min(980px, 100%); }
.modal header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.modal header h2 { margin: 0; }
@keyframes fade { from { opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 99; max-width: min(92vw, 560px); padding: 12px 16px; border-radius: 12px; font-weight: 700; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.toast.bad { background: #3a0e12; border: 1px solid var(--brand); color: #ffd7da; }
.toast.warn { background: #3a2e08; border: 1px solid #c99a06; color: #ffe9a8; }
.toast.ok { background: #0b2a20; border: 1px solid #1f8a66; color: #bff5e0; }
.reasons { margin: 8px 0 0; padding: 0 0 0 18px; } .reasons li { margin: 3px 0; }

/* ── tabs ── */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 14px; padding-bottom: 2px; }
.tabs button { border-radius: 999px; min-height: 36px; padding: 6px 14px; white-space: nowrap; }
.tabs button.on { background: var(--brand); border-color: var(--brand); }

/* ── people / ID cards ── */
.person { display: flex; gap: 12px; align-items: center; min-width: 0; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #17202b; border: 1px solid #2b3744; display: grid; place-items: center; flex: none; font-weight: 900; color: var(--muted); }
.avatar.lg { width: 84px; height: 84px; font-size: 26px; }
.idcard { width: min(420px, 100%); aspect-ratio: 1.586; border-radius: 18px; padding: 16px; position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #1b2533 0%, #0a0f16 60%), #0a0f16; border: 1px solid #334155; box-shadow: var(--shadow); display: grid; grid-template-columns: 96px 1fr; gap: 12px; }
.idcard::before { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: var(--brand); opacity: .18; }
.idcard .ph { width: 96px; height: 120px; border-radius: 12px; object-fit: cover; background: #17202b; border: 1px solid #334155; display: grid; place-items: center; font-size: 34px; color: var(--muted); }
.idcard .org { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #cbd5e1; }
.idcard .nm { font-size: 18px; font-weight: 900; line-height: 1.1; }
.idcard .kv { font-size: 12px; color: #cbd5e1; margin-top: 4px; }
.idcard .code { font-family: ui-monospace, Consolas, monospace; font-size: 15px; font-weight: 800; letter-spacing: .06em; color: #fff; }
.idcard .st { position: absolute; right: 14px; bottom: 12px; }

/* ── match / fixture cards ── */
.fixture { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid #232d38; border-radius: 14px; background: #0b1118; text-decoration: none; }
.fixture + .fixture { margin-top: 8px; }
.fixture .t { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 800; }
.fixture .t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fixture .t.away { justify-content: flex-end; text-align: end; }
.fixture .sc { text-align: center; min-width: 86px; }
.fixture .sc b { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.fixture .meta { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 12px; justify-content: center; }
a.fixture:hover { border-color: var(--brand); }
.crest { width: 26px; height: 26px; border-radius: 7px; background: #17202b; flex: none; object-fit: contain; }

.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; text-align: center; padding: 18px 10px; }
.scoreboard .team { font-weight: 900; font-size: clamp(16px, 3.4vw, 24px); }
.scoreboard .big { font-size: clamp(44px, 10vw, 76px); font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: .04em; line-height: 1; }
.scoreboard .clock { font-size: clamp(18px, 4vw, 26px); font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 900; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 1fr 52px 1fr; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed #1c2631; }
.timeline .min { text-align: center; font-weight: 900; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline .h { text-align: end; } .timeline .a { text-align: start; }
.timeline .del { text-decoration: line-through; opacity: .5; }

/* bracket */
.bracket { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 6px; }
.bracket .round { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; min-width: 210px; }
.bracket .round h4 { margin: 0; text-align: center; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.bm { border: 1px solid #2b3744; border-radius: 12px; background: #0b1118; overflow: hidden; text-decoration: none; display: block; }
.bm div { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; }
.bm div + div { border-top: 1px solid #1c2631; }
.bm .w { font-weight: 900; color: var(--ok); }
.bm .src { color: var(--muted); font-style: italic; }

/* ── LIVE CONSOLE (tablet-first, big buttons, one screen) ── */
.console { display: grid; gap: 12px; }
.console .board { position: sticky; top: 58px; z-index: 5; }
.console .pads { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.console .side h3 { text-align: center; margin: 0 0 8px; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console .side .btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.evbtn { min-height: 74px; font-size: 18px; border-radius: 16px; font-weight: 900; }
.evbtn.goal { background: var(--cedar); border-color: #1fae5b; }
.evbtn.yellow { background: #c79a00; border-color: #ffd23f; color: #111; }
.evbtn.red { background: #9b111e; border-color: var(--brand); }
.evbtn.sub { background: #173b6b; border-color: #2f6fbd; }
.console .plus { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 86px; height: 86px; margin: 0 auto 8px; border-radius: 14px; background: var(--cedar); border-color: #1fae5b; line-height: 1.05; }
.console .plus b { font-size: 30px; } .console .plus span { font-size: 11px; max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console .plus:hover { background: #23b153; }
.console .phasebar { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.console .phasebar button { min-height: 52px; flex: 1 1 140px; }
.pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.pick { min-height: 64px; flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.15; }
.pick b { font-size: 20px; }
.pick.sel { background: var(--brand); border-color: var(--brand); }
.pick.inel { opacity: .45; border-style: dashed; }
.minute { display: flex; align-items: center; gap: 8px; }
.minute input { width: 90px; text-align: center; font-size: 22px; font-weight: 900; }

.plist .prow { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px dashed #1c2631; }
.plist .prow .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* lineup builder */
.lu { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid #232d38; border-radius: 12px; background: #0b1118; }
.lu + .lu { margin-top: 6px; }
.lu .seg { display: inline-flex; border: 1px solid #2b3744; border-radius: 10px; overflow: hidden; }
.lu .seg button { border: 0; border-radius: 0; min-height: 34px; padding: 4px 10px; font-size: 12.5px; background: #0d141d; }
.lu .seg button.on { background: var(--brand); }
.lu.blocked { border-color: #7d1d25; }

/* capture */
.capture { display: grid; gap: 12px; }
.capture .prev { max-width: 100%; max-height: 300px; border-radius: 12px; border: 1px solid #2b3744; object-fit: contain; background: #000; }
.diff { background: rgba(255,209,102,.1); border: 1px solid #8a6a1f; border-radius: 8px; padding: 2px 6px; }

/* public hero */
.hero { padding: 26px 18px; border-radius: 22px; background: linear-gradient(135deg, rgba(210,25,36,.28), rgba(9,126,63,.22)); border: 1px solid rgba(255,255,255,.1); margin-bottom: 18px; }
.hero h1 { margin-bottom: 6px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 10px; }
.section-title h2 { margin: 0; }

.print-only { display: none; }
@media print {
  body { background: #fff; color: #000; }
  .topbar, .nav, .noprint, button { display: none !important; }
  .card { box-shadow: none; border: 1px solid #999; background: #fff; color: #000; }
  .print-only { display: block; }
  td, th { color: #000; background: #fff; border-color: #bbb; }
  .muted { color: #444; }
}

@media (max-width: 720px) {
  .wrap { padding: 14px 16px 60px; }
  .topbar .in { padding: 8px 12px; }
  .brand .nm small { display: none; }
  .fixture { grid-template-columns: 1fr auto 1fr; padding: 10px; }
  .fixture .sc { min-width: 64px; }
  .console .pads { grid-template-columns: 1fr; }
  .console .board { top: 54px; }
  .evbtn { min-height: 62px; font-size: 16px; }
  .idcard { grid-template-columns: 78px 1fr; } .idcard .ph { width: 78px; height: 98px; }
  .hide-sm { display: none !important; }
  th, td { padding: 8px 7px; }
  .tbl .crest { display: none; }
  .lu { grid-template-columns: 1fr; }
  .lu .seg button { padding: 4px 8px; }
}

/* ── TMI-style portal cards (home + create user), NRA colours ── */
.portalGrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); margin: 6px 0 20px; }
.portalCard { display: block; position: relative; min-height: 190px; padding: 16px 15px; text-align: start; color: #fff; text-decoration: none; border: 1px solid color-mix(in srgb, var(--card-accent, var(--brand)) 55%, transparent); border-radius: 20px; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--card-accent, var(--brand)) 14%, #0b1118), #06090e 70%); box-shadow: 0 12px 30px rgba(0,0,0,.3); cursor: pointer; transition: .2s transform, .2s border-color; font: inherit; width: 100%; }
.portalCard:hover { transform: translateY(-5px); border-color: var(--card-accent, var(--brand)); }
.portalCard::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 75% 15%, color-mix(in srgb, var(--card-accent, var(--brand)) 22%, transparent), transparent 45%); pointer-events: none; }
.portalCard::before { content: ''; position: absolute; right: -34px; top: -34px; width: 150px; height: 150px; border-radius: 50%; background: var(--brand-logo, url('/img/nra-logo.png')) center / contain no-repeat; opacity: .09; filter: grayscale(.2); pointer-events: none; }
.portalCard > * { position: relative; z-index: 1; }
.portalCard .icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--card-accent, var(--brand)); color: var(--card-accent, var(--brand)); font-size: 22px; background: rgba(0,0,0,.5); margin-bottom: 28px; }
.portalCard h3 { font-size: 20px; line-height: 1.08; margin: 0 0 8px; letter-spacing: -.3px; }
.portalCard h3 span { display: block; }
.portalCard p { font-size: 12.5px; line-height: 1.45; color: #d3d8df; margin: 0; padding-right: 34px; }
.portalCard .arrow { position: absolute; inset-inline-end: 14px; bottom: 12px; font-size: 22px; color: var(--card-accent, var(--brand)); }
.portalCard .cnt { position: absolute; inset-inline-end: 12px; top: 12px; background: var(--brand); border-radius: 999px; padding: 2px 9px; font-weight: 900; font-size: 13px; }
.portalCard.red { --card-accent: #e0313b; } .portalCard.green { --card-accent: #1fae5b; } .portalCard.white { --card-accent: #e8edf2; }
@media (max-width: 560px) { .portalGrid { grid-template-columns: 1fr 1fr; gap: 10px; } .portalCard { min-height: 160px; padding: 12px; } .portalCard .icon { width: 40px; height: 40px; font-size: 19px; margin-bottom: 18px; } .portalCard h3 { font-size: 16px; } .portalCard p { font-size: 11px; padding-right: 0; } }
.hero .heroLogo { width: 92px; height: 92px; border-radius: 50%; background: #fff; flex: none; box-shadow: 0 0 0 3px var(--brand); }

.alerts .alert { padding: 8px 12px; } .alerts .alert .n { font-size: 18px; }

/* phones: menu behind ☰ (as TMI) */
.menuBtn { display: none; }
@media (max-width: 720px) { .brand .nm { display: none; } .menuBtn { display: inline-flex; } #nav:not(.open) { display: none; } #nav.open { position: sticky; top: 58px; z-index: 25; } .brand .nm b { font-size: 15px; } }

/* TMI academy editor */
.acadToolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 8px; }
.acad { background: rgba(9,14,21,.82); border: 1px solid #27303b; border-radius: 16px; padding: 14px; margin: 12px 0; }
.acad.off { opacity: .8; border-style: dashed; border-color: #5d8fbf; background: rgba(40,70,100,.15); }
.acadHead { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.logoPick { cursor: pointer; margin: 0; text-transform: none; letter-spacing: 0; }
.logoBox { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: #fff; border: 2px dashed #3b4858; font-size: 26px; overflow: hidden; }
.logoBox img { width: 100%; height: 100%; object-fit: contain; }
.toggle { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 800; white-space: nowrap; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text); }
.catList { margin: 12px 0; }
.catRow { display: grid; grid-template-columns: minmax(90px, .6fr) 1.4fr auto; gap: 10px; align-items: center; margin: 6px 0; }
.acadFoot { display: flex; flex-wrap: wrap; gap: 8px; }
.warn { color: var(--warn); }
@media (max-width: 600px) { .catRow { grid-template-columns: 1fr 1fr auto; } .acadHead { grid-template-columns: auto 1fr; } .acadHead .toggle { grid-column: 1 / -1; } }

/* public home: numbers bar + footer (TMI style) */
.statsBar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; margin: 18px 0; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; overflow: hidden; background: linear-gradient(90deg, rgba(210,25,36,.14), rgba(9,126,63,.14)); }
.statsBar .stat { padding: 14px 10px; text-align: center; border-right: 1px solid rgba(255,255,255,.08); }
.statsBar .stat:last-child { border-right: 0; }
.statsBar .stat b { display: block; font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }
.statsBar .stat span { color: var(--muted); font-size: 12px; }
@media (max-width: 860px) { .statsBar { grid-template-columns: repeat(3, 1fr); } .statsBar .stat:nth-child(3n) { border-right: 0; } .statsBar .stat:nth-child(-n+3) { border-bottom: 1px solid rgba(255,255,255,.08); } }
@media (max-width: 420px) { .statsBar .stat b { font-size: 20px; } .statsBar .stat span { font-size: 10.5px; } }
.siteFoot { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.footGrid { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; }
.socials { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.socials a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; font-weight: 900; border: 1px solid var(--line); background: #101721; }
.socials a:hover { border-color: var(--brand); background: var(--brand); }
.siteFoot .legal { color: var(--muted); font-size: 12px; margin-top: 12px; text-align: center; }
@media (max-width: 600px) { .footGrid { grid-template-columns: 1fr; } .topbar .act .btn { padding: 5px 8px; font-size: 12px; } }
/* Arabic (RTL) */
html[dir=rtl] body { font-family: "Noto Sans Arabic", Tahoma, "Segoe UI", Arial, sans-serif; }
html[dir=rtl] .portalCard p { padding-right: 0; padding-left: 34px; }
html[dir=rtl] .portalCard .arrow { transform: scaleX(-1); }
html[dir=rtl] .portalCard::before { right: auto; left: -34px; }
.langBtn { font-weight: 900; }

/* ───────── NRA ID card (CR80: 85.6 × 54 mm) — band colour: green academy · red club · navy NRA ───────── */
.nraCard { --band: #1b2a41; width: min(440px, 100%); aspect-ratio: 85.6 / 54; background: #fdfcf9; color: #111; border-radius: 14px; overflow: hidden; display: grid; grid-template-rows: 22% 1fr; box-shadow: 0 8px 28px rgba(0,0,0,.35); font-family: Tahoma, "Segoe UI", Arial, sans-serif; container-type: inline-size; }
.nraCard.k-academy { --band: #097E3F; } .nraCard.k-club { --band: #D21924; } .nraCard.k-nra { --band: #1b2a41; }
.nraCard.k-gold { --band: #B08A2E; } .nraCard.k-gold .ncBand { background: linear-gradient(110deg, #8C6A1E, #D4AF37 55%, #A67C26); }
.nraCard.k-blue { --band: #1F5FAE; }
.nraCard.k-brown { --band: #6B4226; }
/* players (user, 17 Oct): red ribbon for every player + a small line: green = free (digital only), blue = LFA holder */
.nraCard.k-player { --band: #D21924; }
.nraCard.l-free .ncBand { box-shadow: inset 0 -1.8cqw 0 #097E3F; } .nraCard.l-lfa .ncBand { box-shadow: inset 0 -1.8cqw 0 #1F5FAE; }
/* printing on white PVC: nothing white / near-white is printed (it leaves yellow tracks) — those areas stay bare card */
/* the band, the coloured lines and the code must print in colour: browsers drop background colours unless told (20 Oct) */
.nraCard, .nraCard * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important; }
.ncInit { display: inline-grid; place-items: center; height: 5.5cqw; width: 5.5cqw; border-radius: 50%; border: .35cqw solid var(--band); color: var(--band); font-size: 2.2cqw; font-weight: 900; line-height: 1; flex: none; }
@media print {
  .nraCard { background: transparent !important; box-shadow: none !important; }
  .nraCard .ncQr, .nraCard .ncLogo, .nraCard .ncNoPhoto { background: transparent !important; }
  .nraCard .ncQr svg rect[fill="#ffffff"], .nraCard .ncQr svg rect[fill="white"], .nraCard .ncQr svg rect[fill="#FFFFFF"] { fill: none !important; }
  .nraCard .ncQr svg path[fill="#ffffff"], .nraCard .ncQr svg path[fill="white"] { fill: none !important; }
}
.ncBand { background: var(--band); color: #fff; display: flex; align-items: center; gap: 2.5cqw; padding: 0 3cqw; }
.ncLogo { height: 78%; aspect-ratio: 1; border-radius: 50%; background: #fff; object-fit: contain; }
.ncOrg { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; } .ncOrg b { font-size: 3.4cqw; text-transform: uppercase; letter-spacing: .03em; } .ncOrg span { font-size: 3cqw; opacity: .9; }
.ncKind { margin-left: auto; white-space: nowrap; border: 1px solid rgba(255,255,255,.7); border-radius: 99px; padding: .4cqw 2cqw; font-size: 2.6cqw; font-weight: 800; letter-spacing: .08em; }
.ncBody { display: grid; grid-template-columns: 26% 1fr 22%; gap: 3cqw; padding: 3cqw; align-items: start; position: relative; }
.ncBody::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2.2cqw; background: var(--band); opacity: .85; }
.ncPhoto { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 1.6cqw; border: .4cqw solid var(--band); background: #e8eef3; }
.ncNoPhoto { display: grid; place-items: center; font-size: 9cqw; color: #889; }
.ncInfo { min-width: 0; display: flex; flex-direction: column; gap: .6cqw; }
.ncNameAr { font-size: 4.6cqw; font-weight: 800; line-height: 1.2; } .ncName { font-size: 3.6cqw; font-weight: 700; line-height: 1.2; }
.ncRole { font-size: 3cqw; color: #333; } .ncAcad { display: flex; align-items: center; gap: 1.4cqw; font-size: 3cqw; font-weight: 700; } .ncAcad img { height: 5.5cqw; width: 5.5cqw; object-fit: contain; }
.ncCode { font-family: ui-monospace, Consolas, monospace; font-size: 3.8cqw; font-weight: 800; letter-spacing: .05em; margin-top: 1cqw; color: var(--band); }
.ncValid { font-size: 2.6cqw; color: #444; }
.ncQr { align-self: end; margin-bottom: 3cqw; background: #fff; padding: 1cqw; border-radius: 1cqw; } .ncQr svg { width: 100%; height: auto; display: block; }
/* console offline: nothing can be recorded until the internet is back */
/* offline (20 Oct): the event buttons keep working (📴 notebook); the other actions say "offline" */

/* console on phones (user, 18 Oct: "a bit messy on phone"): the score panel never hides the clock buttons */
@media (max-height: 700px) { .console .board { position: static; } }
@media (max-width: 900px), (max-height: 700px) {
  .console .board .scoreboard { padding: 10px 6px; gap: 6px; }
  .console .board .scoreboard .big { font-size: clamp(34px, 9vw, 52px); }
  .console .plus { width: 64px; height: 64px; margin-bottom: 4px; }
  .console .plus b { font-size: 24px; }
  .console .plus span { display: none; }               /* the team name is written just under it */
  .console .phasebar button { min-height: 46px; flex: 1 1 120px; }
  .evbtn { min-height: 56px; font-size: 15px; }
}

/* official match report on A4 (user, 18 Oct): page 1 = the report, page 2 = the 4 photos */
.a4 { background: #fff; color: #111; max-width: 210mm; margin: 0 auto; padding: 10mm; font-size: 10px; line-height: 1.3; border-radius: 6px; }
.a4 .r-top { display: flex; gap: 10px; align-items: center; border-bottom: 2px solid #c8102e; padding-bottom: 6px; }
.a4 .r-title { font-size: 15px; font-weight: 900; }
.a4 .r-code { font-family: monospace; font-size: 11px; }
.a4 .r-muted { color: #666; font-size: 9px; }
.a4 .r-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 6px 0 2px; }
.a4 .r-team { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 12px; }
.a4 .r-big { font-size: 26px; font-weight: 900; text-align: center; }
.a4 .r-line { font-size: 9px; color: #333; margin: 2px 0; }
.a4 .r-h { background: #f1f1f1; border-left: 3px solid #c8102e; font-weight: 800; padding: 2px 6px; margin: 6px 0 3px; font-size: 10px; }
.a4 .r-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.a4 .r-t { width: 100%; border-collapse: collapse; font-size: 8.5px; }
.a4 .r-t th, .a4 .r-t td { border: 1px solid #ddd; padding: 1px 3px; text-align: start; }
.a4 .r-t th { background: #fafafa; }
.a4 .r-ar { color: #555; }
.a4 .r-ev { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 9px; }
.a4 .r-text { white-space: pre-wrap; font-size: 9px; max-height: 60mm; overflow: hidden; }
.a4 .r-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 14px; }
.a4 .r-sign div { border-top: 1px solid #888; padding-top: 3px; font-size: 9px; }
.a4 .r-page2 { break-before: page; page-break-before: always; margin-top: 16px; }
.a4 .r-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.a4 .r-photo { border: 1px solid #ccc; border-radius: 6px; padding: 4px; height: 115mm; display: flex; flex-direction: column; }
.a4 .r-photo img { flex: 1; width: 100%; min-height: 0; object-fit: cover; border-radius: 4px; }
@media print { @page { size: A4; margin: 8mm; } .a4 { padding: 0; max-width: none; border-radius: 0; } .a4 .r-photo { height: 125mm; } }
@media print {
  body:has(.a4) { background: #fff !important; }
  body:has(.a4) * { visibility: hidden; }
  body:has(.a4) .a4, body:has(.a4) .a4 * { visibility: visible; }
  body:has(.a4) .a4 { position: absolute; left: 0; top: 0; width: 100%; }
}

/* LIVE CONSOLE — TMI Match Notes model for two teams (user, 18 Oct: compact on a phone) */
.mnBoard { padding: 8px 10px; }
.mnTop { display: grid; grid-template-columns: auto auto 1fr auto auto; gap: 8px; align-items: center; }
.mnSide { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 78px; }
.mnPlus { width: 74px; height: 66px; border-radius: 14px; background: var(--cedar); border-color: #1fae5b; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 2px; line-height: 1; }
.mnPlus:hover { background: #23b153; }
.mnPlus img, .mnLogo { width: 30px; height: 30px; object-fit: contain; border-radius: 6px; }
.mnPlus b { font-size: 22px; }
.mnTeamName { font-size: 11px; font-weight: 800; max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.mnScore { font-size: 52px; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 40px; text-align: center; line-height: 1; }
.mnMid { text-align: center; min-width: 0; }
.mnMid .clock { font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 900; }
.mnPhase { font-size: 12px; color: var(--muted); margin-top: 2px; }
.mnPens { font-weight: 900; font-size: 16px; color: var(--warn); }
.mnBoard .phasebar { margin-top: 8px; gap: 6px; }
.mnBoard .phasebar button { min-height: 44px; flex: 1 1 110px; padding: 6px 8px; }
.mnBoard .phasebar .alert { flex: 1 1 100%; margin: 0; }
.mnTabs { display: none; }
.mnGrid { display: grid; grid-template-columns: 1fr minmax(250px, 300px) 1fr; gap: 10px; align-items: start; }
.mnTeam { padding: 8px; min-width: 0; }
.mnHead { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.mnHead b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mnRow { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); margin: 4px 0; cursor: pointer; min-height: 40px; user-select: none; }
.mnRow.sel { outline: 3px solid var(--accent); background: rgba(31,174,91,.18); }
.mnRow.bench { opacity: .85; } .mnRow.out { opacity: .45; }
.mnRow .sm { padding: 2px 6px; min-height: 0; }
.mnNum { min-width: 30px; height: 30px; border-radius: 50%; background: var(--line); display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; }
.mnNm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mnBench summary { cursor: pointer; margin: 6px 0 2px; }
.mnAct { padding: 8px; position: sticky; top: 64px; }
.mnSel { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; min-height: 30px; }
.mnSel b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mnSelTeam { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.mnBtns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mnBtns.two { grid-template-columns: 1fr 1fr; }
.mnBtns .evbtn { min-height: 58px; font-size: 24px; padding: 4px; }
.mnBtns.two .evbtn { font-size: 18px; }
.mnBtnLbl { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; font-size: 11px; color: var(--muted); margin-top: 2px; }
.mnSub { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.mnSub select { flex: 1; min-width: 0; }
.mnOut { font-weight: 900; color: var(--danger); white-space: nowrap; }
@media (max-width: 899px) {
  .mnTabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .mnTabs button { min-height: 42px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mnTabs button.on { background: var(--cedar); border-color: #1fae5b; }
  .mnGrid { grid-template-columns: 1fr; gap: 8px; }
  .mnTeam:not(.on) { display: none; }
  .mnAct { order: 3; position: sticky; top: auto; bottom: 0; z-index: 6; box-shadow: 0 -8px 18px rgba(0,0,0,.45); background: var(--panel); }
  .console.mn .board { position: static; }
}
@media (max-width: 480px) {
  .mnTop { gap: 4px; }
  .mnSide { width: 58px; } .mnTeamName { max-width: 58px; }
  .mnPlus { width: 56px; height: 54px; } .mnPlus img { width: 22px; height: 22px; } .mnPlus b { font-size: 18px; }
  .mnScore { font-size: 38px; min-width: 26px; }
  .mnMid .clock { font-size: 30px; }
  .mnBtns .evbtn { min-height: 50px; font-size: 22px; }
  .mnBoard .phasebar button { min-height: 40px; flex: 1 1 90px; font-size: 13px; }
}
@media (orientation: landscape) and (max-height: 560px) {
  .mnPlus { height: 48px; } .mnScore { font-size: 36px; } .mnMid .clock { font-size: 28px; }
  .mnGrid { grid-template-columns: 1fr minmax(220px, 260px) 1fr; }
  .mnTabs { display: none; } .mnTeam:not(.on) { display: block; }
  .mnAct { position: sticky; top: 0; order: 0; box-shadow: none; }
}
@media (max-width: 899px) {
  .mnBoard .phasebar { flex-wrap: nowrap; overflow-x: auto; }
  .mnBoard .phasebar button { min-height: 38px; flex: 1 0 auto; white-space: nowrap; font-size: 13px; padding: 4px 10px; }
  .mnBoard .phasebar .alert { flex: 1 0 100%; white-space: normal; }
  .mnBoard .phasebar:has(.alert) { flex-wrap: wrap; }
  .mnAct { padding: 6px 8px; } .mnSel { margin-bottom: 4px; min-height: 26px; }
  .mnBtnLbl { display: none; }
  .mnSub { margin-top: 6px; }
}
/* phone in landscape on the console: only the console (TMI landscape rules) — the menu and the pilot banner come back on other pages */
@media (orientation: landscape) and (max-height: 560px) {
  body:has(.console.mn) .topbar, body:has(.console.mn) #nav, body:has(.console.mn) #pilotBar { display: none !important; }
  body:has(.console.mn) .wrap { padding-top: 6px; }
  .mnBoard { padding: 4px 8px; } .mnBoard .phasebar { margin-top: 4px; } .mnBoard .phasebar button { min-height: 34px; }
}
.mnMid .clock, .mnMid .small, .mnScore, .mnPens { direction: ltr; unicode-bidi: isolate; }

/* penalty shoot-out: one circle per kick — grey = to take, green = scored, red = saved / off target (user, 18 Oct) */
.mnShoot { margin-top: 6px; display: grid; gap: 4px; }
.mnShootRow { display: flex; align-items: center; gap: 8px; }
.mnShootName { width: 90px; font-size: 12px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mnDots { display: flex; gap: 6px; flex-wrap: wrap; }
.mnDot { width: 20px; height: 20px; border-radius: 50%; background: #5d6672; border: 2px solid #8a94a0; display: inline-block; }
.mnDot.ok { background: #1fae5b; border-color: #7bf0c6; }
.mnDot.no { background: #d21924; border-color: #ff8a92; }
.mnBtns.three { grid-template-columns: 1fr 1fr 1fr; }
.mnBtns.three .evbtn { font-size: 15px; }

/* upright phone: every name on screen — 2 columns of players, tight rows, no pilot banner / lock line on the console */
.mnIdBtn { display: none; }
@media (max-width: 899px) and (orientation: portrait) {
  body:has(.console.mn) #pilotBar, .mnLockLine { display: none !important; }
  body:has(.console.mn) .wrap { padding-top: 6px; }
  .mnBoard { padding: 6px 8px; }
  .mnTeam { padding: 6px; }
  .mnTeam .mnHead { display: none; }
  .mnList { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .mnRow { margin: 0; min-height: 34px; padding: 2px 5px; gap: 5px; font-size: 13.5px; border-radius: 8px; }
  .mnRow .sm { display: none; }
  .mnNum { min-width: 24px; height: 24px; font-size: 12px; }
  .mnRow.sel { outline-width: 2px; }
  .mnIdBtn { display: inline-flex; }
  .mnBench summary { margin: 4px 0 2px; }
  .mnTabs button { min-height: 36px; padding: 4px 8px; }
  .mnBtns .evbtn { min-height: 46px; }
  .console.mn { gap: 8px; }
}

/* official report, bigger (user, 18 Oct: "too small"): teams one under the other, the match information and officials tables */
.a4 { font-size: 12px; line-height: 1.35; }
.a4 .r-title { font-size: 18px; } .a4 .r-code { font-size: 12px; } .a4 .r-muted { font-size: 10.5px; }
.a4 .r-team { font-size: 14px; } .a4 .r-big { font-size: 32px; }
.a4 .r-line, .a4 .r-ev, .a4 .r-text, .a4 .r-sign div { font-size: 11px; }
.a4 .r-h { font-size: 12px; margin: 8px 0 4px; }
.a4 .r-t { font-size: 11px; } .a4 .r-t th, .a4 .r-t td { padding: 2px 4px; }
.a4 .r-text { max-height: none; }
.a4 .r-ht { text-align: center; font-weight: 800; font-size: 12px; }
.a4 .r-kv { width: 100%; border-collapse: collapse; font-size: 11px; }
.a4 .r-kv th, .a4 .r-kv td { border: 1px solid #ddd; padding: 2px 5px; text-align: start; vertical-align: top; }
.a4 .r-kv th { background: #fafafa; width: 42%; font-weight: 700; }
.a4 .r-teamblock { break-inside: avoid; }
.a4 .r-sub { font-weight: 800; font-size: 11px; margin: 5px 0 2px; color: #333; }
.a4 .r-sign { break-inside: avoid; }
@media (max-width: 600px) { .a4 { padding: 4mm; } .a4 .r-2 { grid-template-columns: 1fr; } }
.a4 .r-t th, .a4 .r-kv th { color: #222; text-transform: none; letter-spacing: 0; font-size: inherit; }
.mnCap { font-weight: 900; color: var(--warn); }
/* penalty during normal play: "P" next to +1 (user, 19 Oct) */
.mnPlusRow { display: flex; gap: 4px; align-items: stretch; }
.mnPen { width: 30px; min-height: 0; padding: 0; border-radius: 10px; font-weight: 900; font-size: 16px; background: #173b6b; border-color: #2f6fbd; }
.mnSide { width: auto; min-width: 78px; }
@media (max-width: 480px) { .mnPen { width: 26px; font-size: 14px; } .mnPlus { width: 50px; } .mnSide { min-width: 58px; } }

/* report: the photos of the players who arrived late (user, 19 Oct) */
.a4 .r-late { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.a4 .r-photo.r-photo-sm { height: 70mm; }

/* NRA ID (user, 19 Oct): L1 = silver, referee = black; "LFA" + number on every LFA card holder */
.nraCard.k-silver { --band: #8E969E; } .nraCard.k-silver .ncBand { background: linear-gradient(110deg, #7B838B, #D9DDE1 55%, #8E969E); color: #1b1f24; }
.nraCard.k-silver .ncBand .ncKind { border-color: rgba(0,0,0,.45); } .nraCard.k-silver .ncCode { color: #4E565E; }
.nraCard.k-black { --band: #111; } .nraCard.k-black .ncBand { background: linear-gradient(110deg, #000, #2a2a2a 60%, #111); }
.ncLfa { display: inline-flex; align-items: center; gap: 1.2cqw; margin-top: .8cqw; font-size: 3cqw; font-weight: 800; }
.ncLfa b { background: #1F5FAE; color: #fff; border-radius: 1cqw; padding: .2cqw 1.4cqw; letter-spacing: .06em; }
/* LFA card holder (user, 19 Oct): "LFA LFA LFA…" in white on a line under the ribbon and at the bottom of the card */
.nraCard.is-lfa .ncBand { position: relative; box-shadow: none; }
.ncLfaLine { position: absolute; left: 0; right: 0; height: 2.6cqw; background: #1F5FAE; color: #fff; font: 900 1.9cqw/2.6cqw Tahoma, "Segoe UI", Arial, sans-serif; letter-spacing: .14em; white-space: nowrap; overflow: hidden; text-align: center; }
.ncBand > .ncLfaLine { bottom: 0; }
.ncLfaLine.bottom { bottom: 0; }
.nraCard.is-lfa .ncBody::after { display: none; }
.nraCard.is-lfa { grid-template-rows: 25% 1fr; } .nraCard.is-lfa .ncBand { padding-bottom: 2.6cqw; }
/* 19 Oct (user): free player = white card, no ribbon colour; observer = silver */
.nraCard.l-free { --band: #4E565E; }
.nraCard.l-free .ncBand { background: #fff; color: #111; box-shadow: none; border-bottom: .3cqw solid #d5d9dd; }
.nraCard.l-free .ncBand .ncKind { border-color: rgba(0,0,0,.45); }
.nraCard.l-free .ncBody::after { display: none; }

/* no club logo → the club's initials (user, 19 Oct) */
.mnInit { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #097e3f; font: 900 12px/30px Tahoma, Arial, sans-serif; text-align: center; display: inline-block; }
@media (max-width: 480px) { .mnInit { width: 22px; height: 22px; font-size: 10px; line-height: 22px; } }
/* 19 Oct (user): the actions (🟨 🟥 🔄 🩹) under the scoreboard, above the names — the two teams side by side below */
.mnGrid { grid-template-columns: 1fr 1fr; }
.mnAct { order: 0; position: sticky; top: 62px; bottom: auto; z-index: 6; background: var(--panel); box-shadow: 0 8px 18px rgba(0,0,0,.35); }
@media (max-width: 899px) { .mnGrid { grid-template-columns: 1fr; } .mnAct { order: 0; top: 58px; bottom: auto; box-shadow: 0 8px 18px rgba(0,0,0,.45); } }
@media (orientation: landscape) and (max-height: 560px) { .mnGrid { grid-template-columns: 1fr 1fr; } .mnAct { top: 0; } }
/* 19 Oct (user): phone (< 600 px) = one team at a time (tabs); iPad / tablet and bigger = both teams side by side */
@media (min-width: 600px) and (max-width: 899px) {
  .mnTabs { display: none !important; }
  .mnGrid { grid-template-columns: 1fr 1fr !important; gap: 8px; }
  .mnTeam:not(.on) { display: block !important; }
  .mnTeam .mnHead { display: flex !important; }
  .mnList { grid-template-columns: 1fr !important; }
  .mnTeam .alert { display: block !important; } .mnTeam .alert button { display: block; width: 100%; margin: 6px 0 0 !important; }
}

/* 19 Oct (user): logo 0 - 0 logo — the club logo (or initials) beside each score, not inside +1 */
.mnTop { grid-template-columns: auto auto auto 1fr auto auto auto; }
.mnBadge { display: flex; align-items: center; justify-content: center; }
.mnBadge img { width: 44px; height: 44px; object-fit: contain; border-radius: 50%; background: #fff; }
.mnBadge .mnInit { width: 44px; height: 44px; font-size: 15px; line-height: 44px; }
@media (max-width: 480px) {
  .mnTop { gap: 3px; } .mnBadge img, .mnBadge .mnInit { width: 26px; height: 26px; font-size: 10px; line-height: 26px; }
  .mnPlus { width: 46px; } .mnPen { width: 22px; } .mnSide { min-width: 0; width: auto; } .mnTeamName { max-width: 70px; }
  .mnScore { font-size: 34px; min-width: 22px; } .mnMid .clock { font-size: 28px; }
}
/* the coaches' substitution requests on the observer console */
.mnReq { border-color: #2f6fbd; padding: 8px 10px; } .mnReq h3 { margin: 0 0 6px; font-size: 15px; }
.mnReqRow { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--line-2); }
.mnPhase { white-space: nowrap; } @media (max-width: 480px) { .mnPhase { font-size: 11px; } }

/* the observer's grade bars 0–10 (user, 19 Oct) */
.gradeRow { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(160px, 1.4fr) minmax(120px, 1fr); gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.gradeBar { display: flex; align-items: center; gap: 8px; }
.gradeBar input[type=range] { flex: 1; accent-color: var(--accent); min-height: 30px; }
.gradeVal { min-width: 26px; text-align: center; font-size: 18px; }
@media (max-width: 600px) { .gradeRow { grid-template-columns: 1fr; gap: 4px; } }

/* report: events by action / by time (user, 19 Oct) */
.a4 .r-evblock .r-t { margin-bottom: 4px; }
.a4 .r-t td[dir=auto] { unicode-bidi: plaintext; }
@media print { .a4 .r-evblock, .a4 .r-t tr { break-inside: avoid; } }

/* tournament wizard (20 Oct 2026) */
.wzSteps{display:flex;gap:4px;overflow-x:auto;margin:10px 0 12px;padding-bottom:4px}
.wzStep{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;gap:2px;min-width:74px;padding:6px 4px;border:1px solid var(--line);border-radius:10px;background:var(--panel-2);color:var(--text);cursor:pointer}
.wzStep:disabled{opacity:.45;cursor:default}
.wzStep span{display:inline-flex;width:24px;height:24px;border-radius:50%;align-items:center;justify-content:center;background:var(--line);color:var(--text);font-weight:700;font-size:13px}
.wzStep small{font-size:11px;text-align:center;line-height:1.2;color:var(--muted)}
.wzStep.on{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand) inset}.wzStep.on span{background:var(--brand);color:#fff}.wzStep.on small{color:var(--text)}
.wzStep.done span{background:var(--cedar);color:#fff}
.wzField{margin:14px 0;padding-bottom:12px;border-bottom:1px dashed var(--line)}
.wzLabel{display:flex;align-items:center;gap:6px;margin-bottom:6px}
.wzI{border:1px solid var(--info);background:transparent;color:var(--info);border-radius:50%;width:24px;height:24px;min-height:0;padding:0;font-weight:700;cursor:pointer;line-height:22px}
.wzInfo{background:var(--panel-2);border:1px solid var(--info);border-radius:10px;padding:8px 12px;margin-top:8px;font-size:14px;color:var(--text)}
.wzInfo p{margin:4px 0}.wzInfo b{color:var(--info)}
.wzChoice{display:flex;flex-wrap:wrap;gap:6px}
.wzOpt{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--panel-2);color:var(--text);cursor:pointer;text-align:start}
.wzOpt span{color:var(--muted);font-weight:400}
.wzOpt.on{border-color:var(--accent);background:rgba(31,174,91,.18);box-shadow:0 0 0 1px var(--accent) inset}
.wzOpt.on b::before{content:'✓ ';color:var(--ok)}
.wzRow{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:6px 0}
.wzRow select,.wzRow input{width:auto}
.wzGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:6px;margin-top:8px}
.wzPhase{margin:10px 0;padding:10px}
.wzTie li{margin:3px 0}.wzTie button{margin-inline-start:6px}
.wzRev{border-bottom:1px solid var(--line);padding:6px 0}.wzRev ul{margin:4px 0 6px;padding-inline-start:20px}

/* changes of match events (20 Oct 2026) */
.evChg{border:1px solid var(--line);border-radius:12px;padding:8px 10px;margin:8px 0;background:var(--panel-2)}
.evChgT{width:100%;border-collapse:collapse;margin:6px 0;font-size:14px}.evChgT td{padding:3px 6px;border-bottom:1px solid var(--line-2)}
.evChgT td.before{color:var(--danger);text-decoration:line-through}.evChgT td.after{color:var(--ok);font-weight:700}

/* 🗺 the structure of the tournament (wizard, 20 Oct 2026) */
.tsFab{position:fixed;bottom:22px;right:18px;z-index:60;width:60px;height:60px;min-height:0;border-radius:50%;padding:0;font-size:28px;line-height:60px;background:var(--brand);color:#fff;border:2px solid #fff;box-shadow:0 8px 24px rgba(0,0,0,.45);cursor:pointer}
html[dir=rtl] .tsFab{right:auto;left:18px}
.tsWrap{display:flex;flex-direction:column;gap:6px}
.tsStage{border:2px solid var(--brand);border-radius:14px;padding:10px;margin:4px 0}
.tsHead{margin-bottom:8px}
.tsGroups{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px}
.tsBox{border:2px solid #d21924;border-radius:10px;padding:6px 8px;background:var(--panel-2)}
.tsBoxT{font-weight:800;color:#ff8a92;margin-bottom:4px}
.tsRound{margin:6px 0}.tsRoundT{font-weight:800;margin-bottom:4px;color:var(--warn)}
.tsMatches{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px}
.tsMatch{border:2px solid #e5c100;border-radius:10px;padding:6px 8px;background:var(--panel-2);text-align:center;font-size:14px}
.tsArrow{text-align:center;font-size:20px;color:var(--muted)}
@media print{.tsFab{display:none}}

/* the bracket (World-Cup style) */
.tsBox{padding:0;overflow:hidden;border:1px solid var(--line)}.tsBoxT{color:#fff;text-align:center;font-size:12px;letter-spacing:.06em;padding:4px;margin:0}
.tsBox .tsTeam{margin:4px 6px}
.tsTree{display:flex;gap:10px;overflow-x:auto;padding-bottom:6px;align-items:stretch}
.tsCol{display:flex;flex-direction:column;min-width:112px;flex:0 0 auto}
.tsColT{font-size:12px;font-weight:800;color:var(--warn);text-align:center;margin-bottom:4px}
.tsColM{display:flex;flex-direction:column;justify-content:space-around;gap:8px;flex:1}
.tsCenter .tsColM{justify-content:center}
.tsSlot{border-left:3px solid var(--muted);padding-left:6px}
.tsKey{font-size:10px;color:var(--muted)}
.tsTeam{background:#f4f5f7;color:#111;border-radius:4px;padding:3px 6px;margin:2px 0;font-size:13px;font-weight:700;white-space:nowrap}
.tsCenter .tsTeam{background:#ffe066}

.mnBtnLbl.three { grid-template-columns: repeat(3, 1fr); }

/* the ⚠ light of the 🗺 button and the problems list (20 Oct) */
.tsFab{overflow:visible}
.tsLight{position:absolute;top:-6px;right:-6px;width:26px;height:26px;border-radius:50%;font-size:15px;line-height:26px;font-weight:900;border:2px solid #fff;color:#111}
html[dir=rtl] .tsLight{right:auto;left:-6px}
.tsLight.green{background:#2fb344;color:#fff}.tsLight.yellow{background:#ffd43b}.tsLight.red{background:#fa5252;color:#fff;animation:tsBlink 1.2s infinite}
@keyframes tsBlink{50%{opacity:.45}}
.tsWarn{border-radius:10px;padding:8px 10px;margin-bottom:6px;font-size:14px;line-height:1.4}
.tsWarn.green{background:rgba(47,179,68,.15);border:1px solid #2fb344}.tsWarn.yellow{background:rgba(255,212,59,.12);border:1px solid #ffd43b}.tsWarn.red{background:rgba(250,82,82,.15);border:1px solid #fa5252}
.tsWarn div{margin:3px 0}

/* the separate ⚠ circle above the 🗺 button (20 Oct) */
.tsWarnFab{position:fixed;bottom:94px;right:24px;z-index:60;width:48px;height:48px;min-height:0;border-radius:50%;padding:0;font-size:24px;line-height:44px;font-weight:900;border:2px solid #fff;box-shadow:0 6px 18px rgba(0,0,0,.45);cursor:pointer}
html[dir=rtl] .tsWarnFab{right:auto;left:24px}
.tsWarnFab.green{background:#2fb344;color:#fff}.tsWarnFab.yellow{background:#ffd43b;color:#111}.tsWarnFab.red{background:#fa5252;color:#fff;animation:tsBlink 1.2s infinite}
@media print{.tsWarnFab{display:none}}

/* card cases (21 Oct): a small card icon; a red card can carry "2Y" */
.ccCard{display:inline-grid;place-items:center;width:16px;height:22px;border-radius:3px;vertical-align:middle;font-size:9px;font-weight:900;color:#fff;line-height:1}
.ccCard.yellow{background:#fcc419}.ccCard.red{background:#e03131}

/* ───────── public live page (user, 22 Oct): scoreboard, PENALTY, substitution, line-up pitch, HD Media videos ───────── */
.lfxCard{position:relative}
.lfxBoard{position:relative;padding:10px 4px 4px;overflow:hidden;border-radius:12px}
.lfxTeams{display:grid;grid-template-columns:1fr auto 1fr;gap:6px;align-items:start;text-align:center}
.lfxLogo{width:58px;height:58px;border-radius:50%;margin:0 auto 6px;display:grid;place-items:center;font-weight:900;font-size:18px;color:#fff;border:3px solid rgba(255,255,255,.15);position:relative;overflow:hidden}
.lfxLogo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#fff}
.lfxTn{font-weight:900;font-size:clamp(14px,3.4vw,20px);margin-bottom:6px}
.lfxMid{padding-top:4px;min-width:96px;position:relative}
/* GOAAAAAL · SAVED · OFF TARGET on top of the score, blinking 3 s (user, 23 Oct) — a heavy slanted display type with a gradient, an outline and a glow */
.lfxFlash{position:absolute;left:50%;top:-4px;z-index:8;pointer-events:none;white-space:nowrap;font-family:Bahnschrift,"DIN Alternate","Segoe UI Black","Arial Black",Impact,system-ui,sans-serif;font-weight:900;font-style:italic;font-stretch:condensed;text-transform:uppercase;font-size:clamp(30px,9vw,58px);line-height:1;letter-spacing:.02em;padding:4px 14px;border-radius:12px;background:rgba(8,14,24,.82);backdrop-filter:blur(3px);-webkit-background-clip:text;animation:lfxFlash 3s linear var(--d,0s) forwards}
.lfxFlash{color:transparent;background-image:linear-gradient(180deg,#fff6bf 0%,#ffd43b 45%,#f08c00 100%),linear-gradient(rgba(8,14,24,.85),rgba(8,14,24,.85));-webkit-background-clip:text,padding-box;background-clip:text,padding-box;filter:drop-shadow(0 0 10px rgba(255,212,59,.7))}
.lfxFlash.saved{background-image:linear-gradient(180deg,#ebfbee 0%,#69db7c 45%,#2b8a3e 100%),linear-gradient(rgba(8,14,24,.85),rgba(8,14,24,.85));filter:drop-shadow(0 0 10px rgba(105,219,124,.7))}
.lfxFlash.off{background-image:linear-gradient(180deg,#fff5f5 0%,#ff8787 45%,#c92a2a 100%),linear-gradient(rgba(8,14,24,.85),rgba(8,14,24,.85));filter:drop-shadow(0 0 10px rgba(255,107,107,.7))}
@keyframes lfxFlash{0%{opacity:0;transform:translateX(-50%) skewX(-8deg) scale(.4)}6%{opacity:1;transform:translateX(-50%) skewX(-8deg) scale(1.15)}10%{opacity:1;transform:translateX(-50%) skewX(-8deg)}24%{opacity:1}30%{opacity:.15}36%{opacity:1}52%{opacity:1}58%{opacity:.15}64%{opacity:1}92%{opacity:1;transform:translateX(-50%) skewX(-8deg)}100%{opacity:0;transform:translateX(-50%) skewX(-8deg)}}
@media (prefers-reduced-motion:reduce){.lfxFlash{animation:none}}
.lfxScore{font-size:clamp(40px,10vw,70px);font-weight:900;font-variant-numeric:tabular-nums;line-height:1;letter-spacing:.04em}
.lfxClock{font-weight:900;color:#40c057;font-size:18px;margin-top:4px}
.lfxEvents{display:flex;flex-direction:column;gap:6px}
.lfxEv{font-size:12.5px}
.lfxNm{font-weight:700;display:block;margin-bottom:2px}
.lfxBalls{display:flex;justify-content:center;gap:6px;flex-wrap:wrap}
.lfxBalls span{display:flex;flex-direction:column;align-items:center;font-size:15px;line-height:1.1}
.lfxBalls small{font-size:10.5px;opacity:.7}
.lfxCard .lfxCard,.lfxCard i.lfxCard{display:inline-block}
i.lfxCard{display:inline-block;width:10px;height:14px;border-radius:2px;vertical-align:middle;font-style:normal}
i.lfxCard.y{background:#fcc419}i.lfxCard.r{background:#e03131;color:#fff;font-size:8px;font-weight:900;text-align:center;line-height:14px;min-width:13px}
.lfxPen{margin:12px 4px 2px;border-radius:14px;background:#2b1d05;border:2px solid #f59f00;text-align:center;padding:10px;animation:lfxBlink 1s steps(2,start) infinite;display:flex;gap:10px;justify-content:center;align-items:center;flex-wrap:wrap}
.lfxPen b{font-size:24px;color:#ffd43b;letter-spacing:3px}
.lfxPenFor{width:100%;font-size:12px;color:#ffe8a3}
.lfxWhistle{width:34px;height:24px}
@keyframes lfxBlink{50%{opacity:.25}}
.lfxSub{margin:10px 4px 0;border-radius:14px;background:rgba(28,126,214,.12);border:1px solid #1c7ed6;padding:8px 12px;display:flex;align-items:center;gap:10px;text-align:start}
.lfxSubIc{font-size:24px}
.lfxIn{color:#2f9e44;font-weight:800}.lfxOut{color:#e03131;font-weight:800}
.lfxTabs{display:flex;gap:8px;margin-top:12px}
.lfxTab{flex:1;padding:10px;border-radius:12px;font-weight:800}
.lfxTab.on{background:#2f9e44;border-color:#2f9e44;color:#fff}
.lfxLayer{position:absolute;inset:0;pointer-events:none;z-index:3;display:flex;align-items:center;justify-content:center}
.lfxLayer video,.lfxLayer canvas{width:100%;height:100%;object-fit:contain}
/* the sponsor ticker above the scoreboard: phrases with logos the height of the text, English right → left, Arabic left → right */
.lfxTicker{position:relative;height:44px;margin:0 0 10px;border-radius:10px;overflow:hidden;background:linear-gradient(90deg,#0b2a4a,#164a80,#0b2a4a);border:1px solid rgba(255,255,255,.18)}
.lfxTkItem{position:absolute;top:0;bottom:0;left:0;display:flex;align-items:center;gap:.45em;white-space:nowrap;font-size:22px;font-weight:800;color:#fff;will-change:transform}
.lfxTkItem img{height:1.25em;width:auto;max-width:6em;object-fit:contain;border-radius:3px}
.lmTkRow{display:grid;grid-template-columns:auto 1fr auto auto;gap:8px;align-items:center}
.lmTkRow input[type=text]{min-width:0}
.lmTkLogo{display:flex;align-items:center;gap:4px;min-width:44px}
.lmTkLogo img{height:30px;width:auto;max-width:90px;object-fit:contain;border-radius:3px;background:#0b2a4a;padding:2px}
.lmTkPrev{margin-top:10px}
.lmTkOff{padding:10px 12px;border:1px dashed #3a4554;border-radius:10px;color:var(--muted,#9aa6b2);font-weight:700}
@media (max-width:820px){.lmTkRow{grid-template-columns:1fr 1fr auto}.lmTkRow input[type=text]{grid-column:1/-1;order:-1}}
.lfxOverlay{position:relative;inset:auto;height:56px;margin:0 0 10px;border-radius:10px;overflow:hidden;z-index:1}
.lfxOverlay video,.lfxOverlay canvas{width:100%;height:100%;object-fit:contain}
/* event videos: a small screen in the middle column, under the phase name (user, 22 Oct) */
.lfxEventVid{position:relative;width:100%;min-width:130px;max-width:220px;aspect-ratio:16/9;margin:8px auto 0;border-radius:10px;overflow:hidden;pointer-events:none}
.lfxEventVid .lfxLayer{position:absolute;inset:0}
/* a goal: the net over the scoring side, the ball flies in, the net shakes */
.lfxNet{position:absolute;top:8px;width:42%;max-width:240px;z-index:6;pointer-events:none;animation:lfxNetIn 3.2s ease-out var(--d,0s) forwards}
.lfxNet.home{left:2%}.lfxNet.away{right:2%}
.lfxNet svg{width:100%;height:auto;display:block;filter:drop-shadow(0 2px 6px rgba(0,0,0,.6))}
.lfxNetMesh{transform-origin:60px 12px;animation:lfxShake .9s ease-out calc(var(--d,0s) + .55s) 2}
.lfxNetBall{animation:lfxBall .6s cubic-bezier(.2,.7,.4,1) var(--d,0s) both}
@keyframes lfxNetIn{0%{opacity:0;transform:translateY(-12px)}8%{opacity:1;transform:none}85%{opacity:1}100%{opacity:0}}
@keyframes lfxBall{0%{transform:translate(60px,118px) scale(1.8)}100%{transform:translate(60px,46px) scale(1)}}
@keyframes lfxShake{0%,100%{transform:none}15%{transform:translate(0,4px) scale(1.04,1.08)}30%{transform:translate(-3px,-2px) skewX(4deg)}45%{transform:translate(3px,2px) skewX(-4deg)}60%{transform:translate(-2px,0) skewX(2deg)}80%{transform:translate(1px,0)}}
/* a penalty saved / missed: a banner for a few seconds */
.lfxMiss{margin:10px 4px 0;padding:8px 12px;border-radius:14px;text-align:center;animation:lfxMissIn 6s ease-out var(--d,0s) forwards}
.lfxMiss b{font-size:22px;letter-spacing:2px}
.lfxMiss.saved{background:rgba(47,158,68,.18);border:2px solid #2f9e44}.lfxMiss.saved b{color:#69db7c}
.lfxMiss.off{background:rgba(224,49,49,.15);border:2px solid #e03131}.lfxMiss.off b{color:#ff8787}
@keyframes lfxMissIn{0%{transform:scale(.7);opacity:0}6%{transform:scale(1.08);opacity:1}10%{transform:none}88%{opacity:1}100%{opacity:0}}
@media (prefers-reduced-motion:reduce){.lfxNetMesh,.lfxNetBall{animation:none}.lfxNetBall{transform:translate(60px,46px)}}
.lfxPitch{position:relative;height:520px;margin-top:12px;border-radius:16px;background:repeating-linear-gradient(#2b8a3e 0 48px,#2f9746 48px 96px);border:2px solid rgba(211,249,216,.6);overflow:hidden;touch-action:none}
.lfxHalf{position:absolute;left:0;right:0;top:50%;border-top:2px solid rgba(255,255,255,.55)}
.lfxCircle{position:absolute;left:50%;top:50%;width:124px;height:124px;margin:-62px 0 0 -62px;border:2px solid rgba(255,255,255,.55);border-radius:50%;overflow:hidden;display:grid;place-items:center;color:rgba(255,255,255,.6)}
.lfxCircle .lfxLayer{position:absolute;inset:0}
.lfxCircle .lfxLayer video,.lfxCircle .lfxLayer canvas{object-fit:cover}
.lfxBox{position:absolute;left:28%;right:28%;bottom:0;height:64px;border:2px solid rgba(255,255,255,.55);border-bottom:0}
.lfxBox.top{top:0;bottom:auto;border-bottom:2px solid rgba(255,255,255,.55);border-top:0}
.lfxChip{position:absolute;width:86px;margin-left:-43px;text-align:center;z-index:2;color:#fff;user-select:none}
.lfxPitch.edit .lfxChip{cursor:grab}.lfxChip.drag{cursor:grabbing;z-index:9;transform:scale(1.08)}
.lfxAv{width:56px;height:56px;border-radius:50%;margin:0 auto;border:3px solid #fff;background:#cfd8e3;position:relative}
.lfxAv.sm{width:46px;height:46px}
.lfxAv.gk{border-color:#ffd43b}
.lfxAv img,.lfxAv svg{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}
.lfxNo{position:absolute;bottom:-4px;right:-7px;background:#c92a2a;color:#fff;font-size:11px;font-weight:900;border-radius:999px;padding:1px 6px;border:2px solid #fff}
.lfxBadge{position:absolute;top:-7px;left:-8px;font-size:15px}
.lfxPn{font-size:12px;font-weight:800;margin-top:6px;line-height:1.15;text-shadow:0 1px 3px #000}
.lfxPi{font-size:11px;margin-top:2px}
.lfxBench{margin-top:12px}
.lfxBench h4{margin:0 0 8px;font-size:13px;opacity:.75}
.lfxBenchRow{display:flex;gap:10px;flex-wrap:wrap}
.lfxBenchRow .lfxChip{position:static;margin:0;width:80px;color:inherit}
.lfxBenchRow .lfxPn{text-shadow:none}
.lmPrev{margin-top:10px;height:200px;border-radius:12px;position:relative;overflow:hidden;background:repeating-conic-gradient(#d0d5db 0 25%,#f1f3f5 0 50%) 0 0/20px 20px}
.lmPrev .lfxLayer{position:absolute;inset:0}

/* numbers bar: always 3 per row (user, 22 Oct) */
.statsBar { grid-template-columns: repeat(3, 1fr); }
.statsBar .stat { border-right: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); }
.statsBar .stat:nth-child(3n) { border-right: 0; }
.statsBar .stat:nth-last-child(-n+3) { border-bottom: 0; }

/* L = late attendance (user, 22 Oct) */
.lateL{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 5px;margin:0 4px;border-radius:6px;background:#f08c00;color:#fff;font-weight:900;font-size:12px;border:0;cursor:pointer;vertical-align:middle}

/* the severity scale (23 Oct) — lightest → gravest: flag-orange · flag-red · warn-yellow · warn-orange · warn-red; colour AND shape change */
.sevRow{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
.sev{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;font-weight:800;font-size:13px;line-height:1.2;cursor:pointer;min-height:0;border:2px solid}
.sev i{font-style:normal}
.sev.flag-orange{border-radius:999px;border-width:1px;background:transparent;border-color:#f76707;color:#ffa94d}
.sev.flag-red{border-radius:999px;border-width:1px;background:transparent;border-color:#e03131;color:#ff8787}
.sev.warn-yellow{border-radius:6px;background:rgba(250,176,5,.12);border-color:#fab005;color:#ffd43b}
.sev.warn-orange{border-radius:6px;background:#f76707;border-color:#f76707;color:#fff}
.sev.warn-red{border-radius:4px;background:#e03131;border-color:#ff8787;color:#fff;box-shadow:0 0 0 3px rgba(224,49,49,.3);animation:sevBlink 1.2s ease-in-out infinite}
@keyframes sevBlink{50%{box-shadow:0 0 0 6px rgba(224,49,49,0);filter:brightness(1.25)}}
@media (prefers-reduced-motion:reduce){.sev.warn-red{animation:none}}
/* compact rule tiles (user, 24 Oct): a referee card + title + one sentence; ✎ opens every option */
.ruleTiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px;align-items:start}
.ruleTile{display:flex;gap:12px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--panel-2);min-width:0}
.ruleTile .rtText{flex:1;min-width:0}
.ruleTile .rtTitle{font-weight:700;line-height:1.25}
.ruleTile .rtDesc{font-size:13px;color:var(--muted);margin-top:2px}
.ruleTile .rtBtns{display:flex;gap:4px;align-self:flex-start}
.ruleTile.open{grid-column:1/-1;display:block;border-color:var(--accent)}
.ruleTile.open .rtHead{display:flex;gap:12px;align-items:center;margin-bottom:4px}
.refCard{flex:none;display:inline-grid;place-items:center;width:30px;height:42px;border-radius:5px;transform:rotate(-8deg);box-shadow:0 2px 5px rgba(0,0,0,.3);font-size:11px;font-weight:900;color:#fff;letter-spacing:.5px}
.refCard.yellow{background:linear-gradient(160deg,#ffe066,#fcc419)}
.refCard.red{background:linear-gradient(160deg,#ff6b6b,#e03131)}
.refCard.board{width:44px;height:34px;transform:none;background:#111;border:2px solid #444;font-size:15px;line-height:1;gap:0}
.refCard.board .in{color:#51cf66}.refCard.board .out{color:#ff6b6b}
.refCard.injury{width:38px;height:38px;border-radius:50%;transform:none;background:#fff;border:2px solid #e03131;color:#e03131;font-size:18px}
.rtAdd{display:flex;align-items:center;justify-content:center;min-height:62px;border:1px dashed var(--line);border-radius:12px;background:none;color:var(--muted);cursor:pointer;font-weight:600}
.rtAdd:hover{border-color:var(--accent);color:var(--text)}
/* the 🗺 map and ⚠ buttons higher (user, 24 Oct): they covered Save; the page can also scroll above them */
.tsFab{bottom:130px}
.tsWarnFab{bottom:202px}
body:has(.tsFab) #view{padding-bottom:150px}
/* the estimate on each category line (user, 24 Oct): small light-blue neon screens */
.estChips{display:inline-flex;gap:8px;flex-wrap:wrap;align-items:center}
.estChip{display:inline-flex;align-items:center;gap:6px;padding:4px 6px 4px 10px;border-radius:10px;border:1.5px solid #4dd8ff;background:rgba(77,216,255,.08);color:#c8f6ff;box-shadow:0 0 8px rgba(77,216,255,.55),inset 0 0 6px rgba(77,216,255,.2);white-space:nowrap;line-height:1.2}
.estChip b{font-size:17px;color:#e8fbff;text-shadow:0 0 6px rgba(77,216,255,.9)}
.estChip .small{color:#9fe9ff}
.estInfo{min-height:0;width:22px;height:22px;padding:0;border-radius:50%;border:1.5px solid #4dd8ff;background:transparent;color:#4dd8ff;font:italic 700 13px/18px Georgia,serif;cursor:pointer}
/* the review as a PDF (user, 24 Oct): on the review page, printing shows only the review and then the structure map,
   black on white — whether 📄 PDF or the browser's own Print is used (a phone's print does not wait for the page) */
.printOnly{display:none}
@media print{
  body:has(#wzReview){background:#fff!important;color:#000}
  body:has(#wzReview) :not(:has(#wzReview)):not(#wzReview):not(#wzReview *){display:none!important}
  body:has(#wzReview) :has(#wzReview){background:#fff!important;border:0!important;box-shadow:none!important;padding:0!important;margin:0!important;max-width:none!important}
  #wzReview{color:#000;background:#fff;font-size:11pt}
  #wzReview .printOnly{display:block!important}
  #wzReview button,#wzReview .wzRev .row.between button{display:none!important}
  #wzReview h2{color:#000;margin:0 0 4px}
  #wzReview h3{color:#000;border-bottom:1px solid #999;margin-top:12px}
  #wzReview li{color:#000;break-inside:avoid}
  #wzReview .printMap{break-before:page}
  #wzReview .tsTree{flex-wrap:wrap;overflow:visible}
  #wzReview .tsStage{border-color:#999;break-inside:avoid}
  #wzReview .tsBox{background:#fff;border-color:#999}
  #wzReview .tsColT,#wzReview .tsKey,#wzReview .tsArrow{color:#333}
  #wzReview .tsTeam{border:1px solid #bbb}
  #wzReview *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
/* the home advert when nothing is live (user, 24 Oct) */
.homeIdleBox{position:relative;width:100%;aspect-ratio:16/9;border-radius:14px;overflow:hidden;background:#000;border:1px solid var(--line)}
.homeIdleBox .lfxLayer,.homeIdleBox video,.homeIdleBox canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
/* "Create my account" on the sign-in page (user, 24 Oct): as wide as the sign-in box, a green neon card */
.signupCard{display:flex;align-items:center;gap:14px;width:100%;box-sizing:border-box;margin-top:14px;padding:16px 18px;border-radius:16px;border:2px solid #39ff88;background:rgba(57,255,136,.08);color:#d9ffe9;text-decoration:none;box-shadow:0 0 12px rgba(57,255,136,.55),inset 0 0 10px rgba(57,255,136,.18);transition:box-shadow .2s,transform .2s}
.signupCard:hover{box-shadow:0 0 20px rgba(57,255,136,.85),inset 0 0 12px rgba(57,255,136,.25);transform:translateY(-1px)}
.signupCard b{display:block;font-size:20px;color:#eafff2;text-shadow:0 0 8px rgba(57,255,136,.9)}
.signupCard .small{display:block;color:#a9f5c8;margin-top:2px}
.signupCard .suPlus{font-size:30px;font-weight:900;color:#39ff88;text-shadow:0 0 8px rgba(57,255,136,.9)}
.signupCard .suArrow{margin-inline-start:auto;font-size:22px;color:#39ff88}
html[dir=rtl] .signupCard .suArrow{transform:scaleX(-1)}
/* Powered by 3S TECH (user, 24 Oct): at the bottom of every page; its black background melts into the page */
.poweredBy{display:flex;justify-content:center;padding:10px 0 18px}
.poweredBy img{height:46px;width:auto;mix-blend-mode:screen;opacity:.92}
@media print{.poweredBy{display:none}}
/* the compact home (user, 24 Oct — version C) */
.homeTiles{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:10px 0 4px}
@media (min-width:700px){.homeTiles{grid-template-columns:repeat(6,1fr)}}
.statRibbon{display:block;position:relative;overflow:hidden;height:38px;margin:10px 0 4px;border-radius:10px;background:linear-gradient(90deg,#3a0c10,#0e2416);border:1px solid rgba(255,255,255,.08);color:var(--text);text-decoration:none}
.statRibbon:before,.statRibbon:after{content:'';position:absolute;top:0;bottom:0;width:24px;z-index:1;pointer-events:none}
.statRibbon:before{left:0;background:linear-gradient(90deg,#3a0c10,transparent)}.statRibbon:after{right:0;background:linear-gradient(270deg,#0e2416,transparent)}
.srRun{display:flex;width:max-content;height:100%;align-items:center;animation:srMove 32s linear infinite}
.statRibbon:hover .srRun{animation-play-state:paused}
.srSet{display:flex;align-items:center;gap:16px;padding-inline-end:16px;white-space:nowrap;font-size:13px}
.srSet b{font-size:16px;color:#fff}.srSet i{font-style:normal;color:#39ff88;font-size:9px}
@keyframes srMove{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@keyframes srMoveR{from{transform:translateX(0)}to{transform:translateX(50%)}}
html[dir=rtl] .srRun{animation-name:srMoveR}
@media (prefers-reduced-motion:reduce){.srRun{animation-duration:90s}}
.homeNews{display:flex;align-items:stretch;gap:0;margin:8px 0 0;border-radius:10px;overflow:hidden;border:1px solid rgba(255,255,255,.18);text-decoration:none;color:#fff}
.homeNews .hnTag{flex:none;display:flex;align-items:center;padding:0 12px;background:var(--red,#d21924);font-weight:800;font-size:13px;letter-spacing:.04em;text-transform:uppercase}
.homeNews .lfxTicker{flex:1;margin:0;height:36px;border:0;border-radius:0}
.homeNews .lfxTkItem{font-size:14px}
/* the home tiles = the cards of before, compact (user, 24 Oct): logo watermark, Settings colours */
.portalCard.homeTile{min-height:0;padding:12px 8px 10px;border-radius:16px;display:flex;flex-direction:column;align-items:center;text-align:center}
.portalCard.homeTile .icon{width:38px;height:38px;font-size:18px;margin:0 0 6px}
.portalCard.homeTile h3{font-size:13.5px;margin:0;line-height:1.15}.portalCard.homeTile h3 span{font-size:11px;font-weight:600;color:#c9ced8;margin-top:2px}
.portalCard.homeTile::before{width:90px;height:90px;right:-26px;top:-26px}
html[dir=rtl] .portalCard.homeTile::before{right:auto;left:-26px}
.portalCard.homeTile.red{--card-accent:var(--brand)}.portalCard.homeTile.green{--card-accent:var(--accent)}
/* the public header: the logo + "Official Website" and the name, on phones too */
.topbar.pub .brand .nm{display:flex!important}
.topbar.pub .brand .nm small{display:block!important;color:var(--accent);font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;font-weight:800}
.topbar.pub .brand .nm b{font-size:15px;white-space:normal;line-height:1.15}
/* 📲 Download our APP (user, 24 Oct) — with the 3S TECH logo */
.appCard{display:flex;align-items:center;gap:12px;margin:12px 0 4px;padding:10px 12px;border-radius:14px;border:1.5px solid #39ff88;background:rgba(57,255,136,.07);color:#d9ffe9;text-decoration:none;box-shadow:0 0 12px rgba(57,255,136,.45),inset 0 0 8px rgba(57,255,136,.15)}
.appCard .appIco{font-size:28px}.appCard .appTxt{flex:1;min-width:0}.appCard b{display:block;font-size:16px;color:#eafff2;text-shadow:0 0 8px rgba(57,255,136,.8)}.appCard small{color:#a9f5c8;font-size:11.5px}
.appCard .appBrand{height:38px;width:auto;mix-blend-mode:screen;flex:none}
/* the installed app on phones with a notch (user, 24 Oct): the top bar and the bottom stay clear of the clock / home bar */
.topbar{padding-top:env(safe-area-inset-top,0px)}
body{padding-bottom:env(safe-area-inset-bottom,0px)}
.topbar .in{padding-left:max(12px,env(safe-area-inset-left,0px));padding-right:max(12px,env(safe-area-inset-right,0px))}
/* the Super Admin's two dashboards (user, 24 Oct) */
.dashSwitch{display:inline-flex;gap:4px;padding:4px;border-radius:12px;background:var(--panel);border:1px solid var(--line);margin:0 0 12px}
.dashSwitch button{min-height:0;padding:8px 14px;border:0;border-radius:9px;background:transparent;color:var(--muted);font-weight:800}
.dashSwitch button.on{background:var(--brand);color:#fff}
.portalCard.dashGroup.open{outline:2px solid var(--card-accent,var(--brand))}
.dashInner{margin:14px 0;padding:14px;border-radius:16px;border:1px dashed var(--line);background:rgba(255,255,255,.02)}
.dashInner h2{margin:0 0 10px;font-size:18px}

/* the menu groups (25 Oct) */
.nav details.navGrp { position: relative; }
.nav details.navGrp > summary { list-style: none; cursor: pointer; border: 1px solid #26313d; background: #101721; border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: 13px; white-space: nowrap; transition: .15s; }
.nav details.navGrp > summary::-webkit-details-marker { display: none; }
.nav details.navGrp > summary:hover, .nav details.navGrp.on > summary, .nav details.navGrp[open] > summary { border-color: var(--brand); }
.nav details.navGrp.on > summary { background: linear-gradient(180deg, var(--brand), var(--brand-2)); }
.nav .navDrop { position: absolute; top: calc(100% + 6px); inset-inline-start: 0; z-index: 40; min-width: 200px; display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid #26313d; border-radius: 14px; background: #0b1119; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.nav .navDrop a { border-radius: 10px; }
@media (max-width: 720px) { .nav details.navGrp { width: 100%; } .nav .navDrop { position: static; box-shadow: none; margin-top: 6px; } }

/* the temporary card of a tournament transfer (25 Oct): big red TEMPORARY + بطاقة مؤقتة */
.nraCard { position: relative; }
.ncTemp { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%) rotate(-14deg); color: #d0021b; border: 3px solid #d0021b; border-radius: 8px; padding: 2px 10px; font: 900 22px/1.1 system-ui, sans-serif; letter-spacing: 2px; text-align: center; background: rgba(255,255,255,.72); pointer-events: none; }
.ncTemp span { display: block; font-size: 18px; letter-spacing: 0; direction: rtl; }

/* 📜 the scope page prints as the signed agreement (26 Oct) */
@media print { .noPrint, .sidebar, .topbar, nav { display: none !important; } .scopeItem { break-inside: avoid; } }
.scopePoints { margin: 6px 0; padding-inline-start: 20px; } .scopePoints li { margin: 2px 0; } .scopePoints button { margin-inline-start: 6px; padding: 0 6px; }

/* 🟦 the blue-sheet guest (30 Oct): GUEST TRIAL PLAYER in blue — on the card under the red TEMPORARY, next to his name in the tournament */
.ncTemp .ncGuest { display: block; color: #1c7ed6; font-size: 13px; letter-spacing: .5px; margin-top: 2px; }
.ncTemp .ncGuest span { display: block; font-size: 12px; direction: rtl; }
.guestTag { display: inline-block; margin-inline-start: 6px; padding: 0 6px; border: 1px solid #1c7ed6; border-radius: 6px; color: #1c7ed6; font-size: 11px; font-weight: 800; letter-spacing: .3px; vertical-align: middle; white-space: nowrap; }
/* (4 Nov, user) the report tables stay inside the white paper (screen and PDF): the headers wrap, long words break, smaller on a phone */
.a4 table { max-width: 100%; }
.a4 .r-t th, .a4 .r-kv th { white-space: normal; vertical-align: bottom; }
.a4 .r-t th, .a4 .r-t td, .a4 .r-kv th, .a4 .r-kv td { overflow-wrap: anywhere; word-break: normal; vertical-align: top; color: #111; border: 1px solid #c9c9c9; }
.a4 .r-t th, .a4 .r-kv th { background: #f2f2f2; color: #222; }
@media (max-width: 600px) { .a4 .r-t, .a4 .r-kv { font-size: 9.5px; } .a4 .r-t th, .a4 .r-t td { padding: 2px 2px; } }
@media print { .a4 .r-t { font-size: 9.5px; } .a4 .r-t th, .a4 .r-t td { padding: 2px 3px; } }

/* (4 Nov, user) the NRA money page: rows that never spill out of their card */
.mPage { display: grid; gap: 12px; }
.mHero { border-radius: 18px; padding: 16px 18px; background: color-mix(in srgb, #0b7a3e 18%, transparent); border: 2px solid #0b7a3e; }
.mBig { font-size: 34px; font-weight: 900; color: #3ccf7f; font-variant-numeric: tabular-nums; line-height: 1.15; margin: 2px 0; }
.mBox { padding: 6px 14px 8px; margin: 0; }
.mBoxT { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 0 4px; }
.mRow { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; width: 100%; padding: 10px 0; border: 0; border-top: 1px solid rgba(255,255,255,.08); background: none; color: inherit; text-align: start; font: inherit; border-radius: 0; min-height: 0; }
.mBox .mRow:first-of-type { border-top: 0; }
button.mRow { cursor: pointer; } button.mRow:hover { background: rgba(255,255,255,.03); }
.mIc { font-size: 18px; text-align: center; }
.mNm { min-width: 0; overflow-wrap: anywhere; } .mNm b { display: block; font-weight: 700; } .mNm small { display: block; color: var(--muted); font-size: 12px; }
.mVal { font-weight: 900; font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; } .mVal i { font-style: normal; color: var(--muted); margin-inline-start: 8px; }
.mBar { grid-column: 2 / 4; height: 5px; border-radius: 9px; background: rgba(255,255,255,.07); overflow: hidden; } .mBar span { display: block; height: 100%; border-radius: 9px; }
.mTwo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mIO { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 16px; border: 2px solid; background: rgba(255,255,255,.02); color: inherit; min-width: 0; text-align: start; }
.mIO small { color: var(--muted); font-size: 12.5px; } .mIO b { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* every number tile: a long name wraps inside the card */
.tile { min-width: 0; } .tile span, .tile b { overflow-wrap: anywhere; } .tile span { display: block; }

/* (4 Nov, user) 📺 Watch live on <logo> + the link */
.strBox { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 12px auto 4px; padding: 12px 16px; max-width: 420px; border-radius: 16px; border: 2px solid #ff3b3b; background: rgba(255,59,59,.08); text-decoration: none; color: inherit; text-align: center; }
.strBox:hover { background: rgba(255,59,59,.14); }
.strTitle { font-weight: 900; font-size: 15px; letter-spacing: .02em; }
.strLogo { display: inline-flex; align-items: center; color: inherit; } .strLogo svg { display: block; height: 26px; width: auto; }
.strUrl { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; text-decoration: underline; }

/* 📱 iPhone Safari (9 Nov): the card body must never grow wider than the card — Safari sized the QR's svg at its own size,
   which made the body about twice as wide (huge photo, name / number / QR cut off). Every column may shrink to the card. */
.nraCard { grid-template-columns: minmax(0, 1fr); }
.nraCard > * { min-width: 0; }
.ncBody { grid-template-columns: minmax(0, 26fr) minmax(0, 52fr) minmax(0, 22fr); min-width: 0; overflow: hidden; }
.ncBody > * { min-width: 0; }
.ncQr { min-width: 0; width: 100%; box-sizing: border-box; }
.ncQr svg { max-width: 100%; aspect-ratio: 1; }
.ncPhoto { max-width: 100%; box-sizing: border-box; min-width: 0; }
