/* Football Rivals — original styling in the spirit of the 2010–2013 three-column web frame
   (SCREENS_2013_WEB.md §1). No OSM artwork is used (FR-DEC-007). */
:root {
  --navy: #0e2238;
  --navy-2: #16314f;
  --navy-3: #21456d;
  --grass: #2f8a3e;
  --grass-dark: #236b30;
  --lime: #8fd14f;
  --gold: #f2b705;
  --bg: #e9edf2;
  --panel: #ffffff;
  --line: #d5dce5;
  --head: #eef2f7;
  --text: #1b2533;
  --muted: #6b7889;
  --good: #2e9e4f;
  --ok: #e0a800;
  --bad: #d64545;
  --win: #2e9e4f;
  --draw: #9aa5b4;
  --loss: #d64545;
  --radius: 6px;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); min-height: 100vh; }
a { color: var(--navy-3); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-size: 12px; background: var(--head); padding: 1px 4px; border-radius: 3px; word-break: break-all; }
h1, h2, h3 { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.strong { font-weight: 700; }
.grow { flex: 1; min-width: 0; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
body.busy { cursor: progress; }
body.busy .btn-play { opacity: .6; pointer-events: none; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px; padding: 0 20px; height: 56px;
  background: linear-gradient(180deg, var(--navy-2), var(--navy)); color: #fff;
  border-bottom: 3px solid var(--grass);
}
.brand { color: #fff; font-size: 20px; letter-spacing: .3px; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand b { color: var(--lime); }
.brand:hover { text-decoration: none; }
.ball { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0 40%, #cfd8e3 41% 100%); box-shadow: inset 0 0 0 2px var(--navy); position: relative; }
.ball::after { content: ""; position: absolute; inset: 7px; background: var(--navy); clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%); }
.top-club { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-club strong { display: block; font-size: 15px; }
.top-club small { color: #b9c7d8; }
.top-actions { margin-left: auto; display: flex; gap: 8px; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff; color: var(--navy); font: inherit; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--head); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--grass); border-color: var(--grass-dark); color: #fff; }
.btn-primary:hover { background: var(--grass-dark); }
.btn-play { background: var(--gold); border-color: #c99600; color: var(--navy); }
.btn-play:hover { background: #ffc61a; }
.btn-ghost { background: transparent; border-color: transparent; color: inherit; }
.topbar .btn-ghost { color: #dbe5f1; border-color: #3a5a80; }
.topbar .btn-ghost:hover { background: var(--navy-3); }
.btn.small { padding: 3px 8px; font-size: 12px; float: right; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-weight: 600; font-size: 13px; }
.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
input, select { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--text); min-width: 0; }
input:focus, select:focus, .btn:focus-visible, .chip:focus-visible { outline: 2px solid var(--grass); outline-offset: 1px; }

/* ---------- Frame ---------- */
.frame { display: grid; grid-template-columns: 200px minmax(0, 1fr) 260px; gap: 16px; padding: 16px 20px; max-width: 1440px; margin: 0 auto; align-items: start; }
.frame.no-nav { grid-template-columns: minmax(0, 1fr); max-width: 1100px; }
.leftnav { position: sticky; top: 72px; background: var(--panel); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.nav-group h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: #fff; background: var(--navy-2); padding: 7px 12px; }
.nav-group a { display: block; padding: 8px 14px; color: var(--text); border-left: 3px solid transparent; }
.nav-group a:hover { background: var(--head); text-decoration: none; }
.nav-group a.active { border-left-color: var(--grass); background: #e6f3e8; font-weight: 700; }
.nav-group.dev h3 { background: #6b4f00; }
.main { min-width: 0; display: grid; gap: 16px; }
.rightcol { position: sticky; top: 72px; display: grid; gap: 16px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.panel > h2 { font-size: 15px; margin: -14px -16px 12px; padding: 10px 16px; background: var(--head); border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel > h3 { font-size: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel.error { border-color: var(--bad); }
.panel.banner { border-left: 4px solid var(--gold); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.more { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.hero { background: linear-gradient(120deg, var(--navy), var(--navy-3)); color: #fff; border-radius: var(--radius); padding: 22px 24px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 3px solid rgba(255,255,255,.08); box-shadow: 0 0 0 40px rgba(255,255,255,.03); }
.hero h1 { font-size: 24px; margin-bottom: 4px; }
.hero p { margin: 0; color: #c9d6e6; }
.hero-club { display: flex; gap: 20px; align-items: center; }
.kpis { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.kpis > div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 6px 14px; min-width: 96px; }
.kpis small { display: block; color: #a9bbd0; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.kpis b { font-size: 20px; }

/* ---------- Common bits ---------- */
.crest { flex: none; vertical-align: middle; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.crest-empty { width: 30px; height: 33px; border: 2px dashed var(--line); border-radius: 4px 4px 14px 14px; }
.stars .star { color: #c9d1db; }
.stars .star.on { color: var(--gold); }
.stars .star.half { background: linear-gradient(90deg, var(--gold) 50%, #c9d1db 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pos { display: inline-block; min-width: 34px; text-align: center; font-size: 11px; font-weight: 700; border-radius: 3px; padding: 2px 4px; color: #fff; }
.pos-G { background: #e08a00; } .pos-D { background: #2f6fb5; } .pos-M { background: var(--grass); } .pos-A { background: #c0392b; }
.tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 10px; background: var(--head); color: var(--muted); font-weight: 600; margin-left: 4px; }
.tag.bad { background: #fde3e3; color: var(--bad); }
.tag.gold { background: #fff2c2; color: #8a6400; }
.tag.yellow { background: #fff2a8; color: #6b5800; }
.dot { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; }
.dot-W { background: var(--win); } .dot-D { background: var(--draw); } .dot-L { background: var(--loss); }
span.formdots { display: inline-flex; gap: 3px; }
.meter { display: inline-block; width: 64px; height: 8px; border-radius: 4px; background: #e3e8ee; vertical-align: middle; overflow: hidden; }
.meter.thin { width: 100%; height: 4px; }
.meter .fill { display: block; height: 100%; }
.fill.good { background: var(--good); } .fill.ok { background: var(--ok); } .fill.bad { background: var(--bad); }
.meter-num { font-size: 11px; color: var(--muted); margin-left: 5px; font-variant-numeric: tabular-nums; }
.card { display: inline-block; width: 9px; height: 12px; border-radius: 2px; vertical-align: -1px; margin-left: 4px; }
.card.y { background: #f5d000; } .card.r { background: #d9262c; }
.ok-text { color: var(--good); font-weight: 600; }
.save-status { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.save-status.ok { color: var(--good); } .save-status.warn { color: #b07a00; } .save-status.error { color: var(--bad); } .save-status.pending { color: var(--muted); }
.warn-link { display: block; margin-top: 8px; font-size: 12px; color: #9a6a00; font-weight: 600; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 6px 8px; border-bottom: 2px solid var(--line); white-space: nowrap; }
table.data td { padding: 6px 8px; border-bottom: 1px solid #edf0f4; white-space: nowrap; }
table.data tbody tr:hover { background: #f6f9fc; }
table.data tr.me, table.mini tr.me, .results li.me { background: #e6f3e8; }
table.data tr.me td:first-child { box-shadow: inset 3px 0 var(--grass); }
table.data tr.unavail td { color: var(--muted); }
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sorted { color: var(--navy); }
table.data.compact td { padding: 4px 6px; }
table.mini { width: 100%; border-collapse: collapse; font-size: 13px; }
table.mini td { padding: 4px 6px; border-bottom: 1px solid #edf0f4; }
table.mini td:first-child { width: 22px; color: var(--muted); }
table.mini tr.gap td { text-align: center; color: var(--muted); padding: 0; }
.league .pos-cell { font-weight: 700; }
.league tr.z-champ td.pos-cell { box-shadow: inset 4px 0 var(--gold); }
.league tr.z-europe td.pos-cell { box-shadow: inset 4px 0 #2f6fb5; }
.league tr.z-playoff td.pos-cell { box-shadow: inset 4px 0 #e08a00; }
.league tr.z-releg td.pos-cell { box-shadow: inset 4px 0 var(--bad); }
.arrow { width: 14px; font-size: 10px; } .up { color: var(--good); } .down { color: var(--bad); }
.legend { margin-top: 10px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 6px; }
.lg.z-champ { background: var(--gold); } .lg.z-europe { background: #2f6fb5; } .lg.z-playoff { background: #e08a00; } .lg.z-releg { background: var(--bad); }
.ha { display: inline-block; width: 20px; text-align: center; font-size: 11px; font-weight: 700; border-radius: 3px; }
.ha.h { background: var(--navy); color: #fff; } .ha.a { background: var(--head); color: var(--navy); border: 1px solid var(--line); }
tr.current { background: #fff8e0; }

/* ---------- Home ---------- */
.league-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.league-list li { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.league-list small { display: block; color: var(--muted); }
.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.club-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 8px; align-content: start; transition: box-shadow .15s, transform .15s; }
.club-card:hover { box-shadow: 0 4px 14px rgba(14,34,56,.12); transform: translateY(-1px); }
.club-card header { display: flex; gap: 10px; align-items: center; }
.club-card h3 { font-size: 15px; }
.club-card small { color: var(--muted); }
.club-meta { display: flex; justify-content: space-between; font-size: 12px; align-items: center; }
.stars-list { list-style: none; margin: 0; padding: 0; font-size: 12px; display: grid; gap: 3px; }
.stars-list b { float: right; }
.club-card.taken { opacity: .7; }
.taken-label { font-weight: 700; color: var(--grass-dark); }

/* ---------- Control Centre / results ---------- */
.score-line, .results a { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; color: var(--text); }
.score-line:hover, .results a:hover { text-decoration: none; }
.score-line .team, .results .team { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.score-line .home, .results .home { justify-content: flex-end; text-align: right; }
.score-line .score { font-size: 24px; font-weight: 800; background: var(--navy); color: #fff; padding: 4px 14px; border-radius: var(--radius); min-width: 84px; text-align: center; }
.results { list-style: none; margin: 0; padding: 0; }
.results li { border-bottom: 1px solid #edf0f4; padding: 8px 6px; }
.results .score { font-weight: 800; min-width: 64px; text-align: center; background: var(--head); border-radius: 4px; padding: 2px 8px; }
.round-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 4px; }
.round-grid a { text-align: center; padding: 5px 0; border-radius: 4px; background: var(--head); color: var(--muted); font-weight: 600; font-size: 13px; }
.round-grid a.played { background: #dcebdf; color: var(--grass-dark); }
.round-grid a.on { background: var(--navy); color: #fff; }
.news { list-style: none; margin: 0; padding: 0; }
.news li { display: grid; grid-template-columns: 22px 34px 1fr; gap: 6px; padding: 6px 0; border-bottom: 1px solid #edf0f4; font-size: 13px; }
.news .day { color: var(--muted); font-size: 12px; font-weight: 600; }
.next { display: grid; gap: 6px; text-align: center; }
.next-teams { display: flex; justify-content: center; align-items: center; gap: 12px; color: var(--muted); font-weight: 700; }
.next small { color: var(--muted); }

/* ---------- Match report ---------- */
.match-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; background: linear-gradient(120deg, var(--navy), var(--navy-3)); color: #fff; border: 0; }
.mh-team { display: grid; justify-items: center; gap: 6px; font-size: 16px; text-align: center; }
.mh-score { font-size: 40px; font-weight: 800; text-align: center; }
.mh-score small { display: block; font-size: 12px; font-weight: 400; color: #b9c7d8; }
.scorers-line { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; font-size: 13px; color: var(--muted); padding: 8px 16px; }
.scorers-line div:first-child { text-align: right; }
.timeline { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow: auto; }
.timeline li { display: grid; grid-template-columns: 36px 26px 1fr; gap: 6px; padding: 5px 4px; border-bottom: 1px solid #f0f2f5; font-size: 13px; align-items: center; }
.timeline .min { color: var(--muted); font-weight: 700; text-align: right; }
.timeline .ico { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.timeline .ev-goal { background: #eef8f0; }
.timeline .ev-goal.away { background: #eef3fb; }
.timeline .ev-halftime, .timeline .ev-fulltime, .timeline .ev-kickoff { background: var(--head); font-weight: 600; }
.timeline .sc { margin-left: 6px; background: var(--navy); color: #fff; border-radius: 3px; padding: 0 5px; }
.stats { display: grid; gap: 10px; }
.stat { display: grid; grid-template-columns: 40px 1fr 40px; gap: 8px; align-items: center; position: relative; padding-top: 14px; }
.stat label { position: absolute; top: 0; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.stat .num:last-of-type { text-align: left; }
.stat-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #e3e8ee; }
.stat-bar span:first-child { background: var(--grass); } .stat-bar span:last-child { background: var(--navy-3); }
.motm-line { margin: 12px 0 0; font-size: 13px; }
tr.motm { background: #fffbe6; }
.grade { display: inline-block; min-width: 24px; text-align: center; border-radius: 3px; padding: 0 3px; background: var(--head); }
.grade.g8, .grade.g9, .grade.g10 { background: #d8f0dd; color: var(--grass-dark); }
.grade.g1, .grade.g2, .grade.g3, .grade.g4 { background: #fde3e3; color: var(--bad); }

/* ---------- Line-up ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar label { display: flex; gap: 6px; align-items: center; font-weight: 600; }
.line-strength { margin-left: auto; font-size: 13px; color: var(--muted); }
.line-strength b { color: var(--text); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg button { font: inherit; border: 0; background: #fff; padding: 7px 12px; cursor: pointer; color: var(--muted); font-weight: 600; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--navy); color: #fff; }
.lineup-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pitch {
  position: relative; border-radius: var(--radius); padding: 18px 10px; display: grid; gap: 18px; min-height: 560px; align-content: space-around;
  background: repeating-linear-gradient(180deg, #2f8a3e 0 56px, #2a7f38 56px 112px); border: 3px solid #1f6a2c;
}
.pitch-lines { position: absolute; inset: 10px; border: 2px solid rgba(255,255,255,.55); pointer-events: none; }
.pitch-lines .half { position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid rgba(255,255,255,.55); }
.pitch-lines .circle { position: absolute; left: 50%; top: 50%; width: 110px; height: 110px; margin: -55px 0 0 -55px; border: 2px solid rgba(255,255,255,.55); border-radius: 50%; }
.pitch-lines .box { position: absolute; left: 28%; right: 28%; height: 70px; border: 2px solid rgba(255,255,255,.55); }
.pitch-lines .box.top { top: -2px; border-top: 0; } .pitch-lines .box.bottom { bottom: -2px; border-bottom: 0; }
.pitch-row { display: flex; justify-content: space-evenly; gap: 6px; position: relative; padding: 0 6px; }
.slot { position: relative; flex: 0 1 132px; min-width: 0; min-height: 52px; border-radius: var(--radius); display: grid; place-items: center; padding: 4px; transition: background .1s, box-shadow .1s; }
.slot.empty { border: 2px dashed rgba(255,255,255,.6); background: rgba(0,0,0,.08); }
.slot.filled { background: rgba(255,255,255,.12); }
.slot.misfit .chip { box-shadow: 0 0 0 2px #f5a623; }
.slot .chip .pos { display: none; }
.slot.misfit .chip .pos { display: inline-block; }
.slot .chip { justify-content: space-between; }
.slot-label { color: rgba(255,255,255,.85); font-weight: 700; font-size: 12px; letter-spacing: .5px; }
.slot-meter { position: absolute; left: 8px; right: 8px; bottom: 2px; }
.spec { position: absolute; top: -6px; right: -4px; width: 17px; height: 17px; border-radius: 50%; background: var(--gold); color: var(--navy); font-size: 10px; font-style: normal; font-weight: 800; display: grid; place-items: center; border: 1px solid #c99600; }
.spec + .spec { right: 14px; } .spec + .spec + .spec { right: 32px; } .spec + .spec + .spec + .spec { right: 50px; }
.drop-hover { box-shadow: 0 0 0 3px var(--gold) !important; }
.chip {
  display: flex; align-items: center; gap: 6px; padding: 5px 7px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  cursor: grab; user-select: none; width: 100%; min-width: 0; font-size: 13px;
}
.chip:hover { border-color: var(--navy-3); }
.chip.selected { box-shadow: 0 0 0 3px var(--gold); }
.chip.dragging { opacity: .4; }
.chip.unavail { background: #fbeaea; }
.chip .pos { min-width: 30px; font-size: 10px; }
.chip-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.chip-ovr { font-weight: 800; color: var(--navy); }
.chip-ratings { font-size: 11px; color: var(--muted); }
.bench-panel { margin-top: 12px; }
.bench { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.bench-slot { min-height: 38px; border-radius: var(--radius); display: grid; align-items: center; }
.bench-slot.empty { border: 2px dashed var(--line); place-items: center; }
.bench-slot .slot-label { color: var(--muted); }
.pool { display: grid; gap: 5px; max-height: 420px; overflow: auto; padding: 2px; }
.pool-panel.drop-hover { box-shadow: 0 0 0 3px var(--gold); }
.specs { grid-template-columns: 1fr 1fr; }
.problems { margin: 0; padding-left: 18px; color: #9a3a3a; font-size: 13px; }

/* ---------- Tactics ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.opt { font: inherit; text-align: left; border: 2px solid var(--line); background: #fff; border-radius: var(--radius); padding: 10px 12px; cursor: pointer; display: grid; gap: 3px; color: var(--text); }
.opt small { color: var(--muted); font-size: 12px; }
.opt:hover { border-color: var(--navy-3); }
.opt.on { border-color: var(--grass); background: #e9f6ec; box-shadow: inset 0 0 0 1px var(--grass); }
.opt:disabled { cursor: default; opacity: .7; }
.sliders { display: grid; gap: 14px; }
.slider { display: grid; grid-template-columns: 110px 1fr 130px; align-items: center; gap: 12px; font-weight: 600; }
.slider input { accent-color: var(--grass); padding: 0; border: 0; }
.slider output { font-weight: 700; color: var(--navy); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; }

/* ---------- Dev ---------- */
.dev-note { border-left: 4px solid #6b4f00; }

#toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: var(--radius); opacity: 0; transition: .2s; pointer-events: none; z-index: 50; font-weight: 600; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: var(--bad); }

/* ---------- Narrow windows ---------- */
@media (max-width: 1200px) {
  .frame { grid-template-columns: 190px minmax(0, 1fr); }
  .rightcol { display: none; }
}
@media (max-width: 860px) {
  .frame, .frame.no-nav { grid-template-columns: minmax(0, 1fr); padding: 12px 16px; }
  .leftnav { position: static; display: flex; overflow-x: auto; }
  .nav-group { display: flex; align-items: stretch; }
  .nav-group h3 { display: none; }
  .nav-group a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  .nav-group a.active { border-bottom-color: var(--grass); }
  .grid2, .lineup-grid { grid-template-columns: minmax(0, 1fr); }
  .top-club small { display: none; }
  .brand { font-size: 16px; }
  .slot .chip { padding: 4px 5px; font-size: 12px; }
  .slot .chip-ovr { display: none; }
  .slider { grid-template-columns: 1fr; gap: 4px; }
  .mh-score { font-size: 28px; }
}

/* ---------- Cups and match report (FR-DEC-032) ---------- */
.comp { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 3px; background: var(--head); color: var(--navy); border: 1px solid var(--line); }
.comp-league { background: #e6f3e8; color: var(--grass-dark); border-color: #cfe6d4; }
.comp-cup { background: #fff2c2; color: #7a5a00; border-color: #f0d98a; }
.comp-league_cup { background: #e3ecf8; color: #24508a; border-color: #c4d6ef; }
.comp-super { background: #f1e6fa; color: #6a1b9a; border-color: #dcc6ee; }
.ha.n { background: #fff2c2; color: #7a5a00; }
.tag.ok { background: #dcefe0; color: var(--grass-dark); }
.report p { margin: 0 0 10px; line-height: 1.55; }
.report p:last-child { margin-bottom: 0; }
.mh-score em { display: block; font-size: 13px; font-style: normal; font-weight: 600; color: var(--gold); }
.shootout { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 13px; }
.shootout li span:first-child { font-size: 14px; }
.shootout li.scored span:first-child { color: var(--good); }
.shootout li.missed { color: var(--muted); }
.shootout li.missed span:first-child { color: var(--bad); }
h3.mt { margin-top: 14px; }
.cup-tabs { flex-wrap: wrap; }
.cup-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.panel > div > h2.plain { margin: 0 0 4px; padding: 0; background: none; border: 0; font-size: 18px; }
.cup-winner { display: flex; align-items: center; gap: 8px; font-size: 16px; background: #fff8e0; border: 1px solid #f0d98a; border-radius: var(--radius); padding: 6px 12px; }
.results .team.winner { color: var(--grass-dark); font-weight: 800; }
.results .decided { text-align: center; font-size: 12px; color: var(--muted); margin-top: 2px; }
.qual { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

.auto-pick { font-size: 13px; background: #fff8e0; border: 1px solid #f0d98a; border-radius: var(--radius); padding: 5px 9px; }

/* ---------- Club economy and transfers (M9/M11) ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(10, 26, 42, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { width: min(420px, 100%); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.modal p { margin: 0 0 10px; }
.bad-text { color: var(--bad); min-height: 1em; }
.money-pos { color: var(--good); }
.money-neg { color: var(--bad); }
.ecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ecard { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 6px; align-content: start; background: #fff; }
.ecard h3 { font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.ecard.on { border-color: var(--grass); background: #f1f9f2; }
.ecard .btn { justify-self: start; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.statgrid > div { background: var(--head); border-radius: var(--radius); padding: 8px 12px; }
.statgrid small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
.statgrid b { font-size: 18px; }
table.data td.act { white-space: nowrap; text-align: right; }
table.data td.act .btn { padding: 3px 9px; font-size: 12px; }
.lvl { display: flex; gap: 4px; }
.lvl span { width: 18px; height: 10px; border-radius: 2px; background: var(--line); }
.lvl span.on { background: var(--grass); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
table.data td.clip { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.data td.clip-sm { max-width: 90px; }

/* ---------- Training and next match (M10) ---------- */
.ecard select { width: 100%; }
.spy-pitch { background: linear-gradient(180deg, #2f8a3e, #236b30); border-radius: var(--radius); padding: 10px; display: grid; gap: 8px; }
.spy-line { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.spy-p { background: rgba(255,255,255,.92); border-radius: 4px; padding: 3px 7px; font-size: 12px; white-space: nowrap; }
.next-teams { display: flex; align-items: center; gap: 10px; }

/* ---------- Board, season end, career (M14) ---------- */
.mood { font-size: 12px; padding: 2px 8px; border-radius: 10px; font-weight: 700; }
.mood-delighted { background: #d4f0da; color: #1d6b31; } .mood-satisfied { background: #e3f3e6; color: var(--grass-dark); }
.mood-hopeful { background: #fff2c2; color: #8a6400; } .mood-worried { background: #ffe1c7; color: #9a4b00; } .mood-angry { background: #fde3e3; color: var(--bad); }
.season-end .speech { font-size: 17px; font-style: italic; margin: 6px 0 12px; }
.kpis.dark > div { background: var(--head); border-color: var(--line); }
.kpis.dark small { color: var(--muted); }
.cabinet { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.trophy { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; justify-items: center; gap: 4px; text-align: center; background: linear-gradient(180deg, #fffaf0, #fff); }
.trophy .ico { font-size: 30px; }
.trophy.target { background: #f4f8f4; }
tr.verdict td { border-top: 0; padding-top: 0; }

/* ---------- Clock and pre-season (M13) ---------- */
.clock .countdown { font-size: 20px; margin: 0; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.check input { width: auto; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checklist li { display: flex; gap: 8px; align-items: center; }
.checklist li span { width: 18px; color: var(--muted); font-weight: 700; }
.checklist li.done span { color: var(--good); }
.checklist li.done a { color: var(--muted); text-decoration: line-through; }
.preseason h2 { font-size: 15px; margin-bottom: 6px; }
.nowrap { white-space: nowrap; }
.ps-table { width: 100%; }
.fr-line { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; padding: 6px 4px; }
.fr-line .team.home { text-align: right; }

/* ---------- Newspaper (FR-DEC-042) ---------- */
.paper { background: #fbf8f1; border: 1px solid #d9d2c3; border-radius: var(--radius); padding: 18px 26px 26px; color: #1c1a17; font-family: Georgia, "Times New Roman", serif; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.masthead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; border-bottom: 4px double #1c1a17; padding-bottom: 8px; }
.masthead h1 { font-size: 40px; font-weight: 900; letter-spacing: 1px; text-align: center; font-family: "Old English Text MT", Georgia, serif; }
.mast-side { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: #555; }
.mast-side.right { text-align: right; }
.paper-nav { display: flex; justify-content: space-between; font-size: 12px; padding: 6px 0; border-bottom: 1px solid #1c1a17; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .5px; }
.paper a { color: #1c1a17; }
.kicker { font-family: Arial, sans-serif; font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: #a3261c; font-weight: 700; }
.lead h2 { font-size: 34px; line-height: 1.05; margin: 4px 0 10px; font-weight: 900; }
.lead-score { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 10px; flex-wrap: wrap; }
.lead-score .big { font-size: 28px; font-weight: 900; padding: 0 6px; }
.lead-body { columns: 2 260px; column-gap: 26px; font-size: 15px; line-height: 1.5; }
.lead-body p { margin: 0 0 10px; }
.lead-body p.drop::first-letter { float: left; font-size: 46px; line-height: .9; padding: 4px 6px 0 0; font-weight: 900; }
/* Press photo and byline */
.byline { font-size: 13px; font-style: italic; color: #4a453c; margin: -4px 0 10px; }
.byline b { font-style: normal; color: #1c1a17; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.lead-grid .lead-body { columns: 1; }
.press { margin: 0; }
.press-photo { display: block; width: 100%; height: auto; border: 1px solid #1c1a17; filter: grayscale(1) contrast(1.06) brightness(1.02); mix-blend-mode: multiply; }
.press figcaption { font-size: 12px; line-height: 1.35; color: #3d3a33; padding: 5px 0 0; border-bottom: 1px solid #cfc7b5; padding-bottom: 6px; font-style: italic; }
@media (min-width: 1200px) { .lead-grid { grid-template-columns: minmax(0, 1fr) 380px; } .lead-grid .lead-body { columns: 2 220px; } }
@media (max-width: 760px) { .lead-grid { grid-template-columns: 1fr; } }
.paper-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; border-top: 2px solid #1c1a17; margin-top: 16px; padding-top: 12px; }
.paper-cols section + section { border-left: 1px solid #cfc7b5; padding-left: 20px; }
.paper-cols h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .8px; border-bottom: 1px solid #1c1a17; margin-bottom: 8px; padding-bottom: 3px; }
.paper-results, .paper-list { margin: 0 0 12px; padding-left: 18px; font-size: 14px; line-height: 1.6; }
.paper-results { list-style: none; padding: 0; }
.paper-list.plain { list-style: none; padding: 0; }
.paper li.me { font-weight: 700; }
.paper small { color: #6b6457; }
.paper-card { display: grid; gap: 4px; background: #fbf8f1; border-color: #d9d2c3; font-family: Georgia, serif; color: #1c1a17; text-decoration: none; }
.paper-card:hover { text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.pc-mast { font-weight: 900; font-size: 18px; border-bottom: 2px solid #1c1a17; padding-bottom: 4px; }
.pc-mast small { font-weight: 400; font-size: 12px; color: #6b6457; font-family: Arial, sans-serif; }
.pc-title { font-size: 22px; font-weight: 900; line-height: 1.1; }
.paper-card p { margin: 0; font-size: 14px; color: #3d3a33; }
@media (max-width: 900px) { .paper-cols { grid-template-columns: 1fr; } .paper-cols section + section { border-left: 0; padding-left: 0; } }

/* ---------- Live match (FR-DEC-043) ---------- */
.live { display: grid; gap: 14px; }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 18px 22px; border-radius: var(--radius);
  background: radial-gradient(circle at 50% 0, #1d3350, #0a1422 70%); border: 3px solid #233a58; box-shadow: inset 0 0 30px rgba(0,0,0,.6); }
.scoreboard.flash { animation: sbflash .4s 5 alternate; }
@keyframes sbflash { from { box-shadow: inset 0 0 30px rgba(0,0,0,.6), 0 0 0 rgba(143,209,79,0); } to { box-shadow: inset 0 0 30px rgba(0,0,0,.6), 0 0 30px rgba(143,209,79,.9); } }
.sb-team { display: flex; align-items: center; gap: 12px; }
.sb-team:last-child { flex-direction: row-reverse; text-align: right; }
.led { font-family: "Courier New", monospace; font-weight: 700; color: #ffd84a; text-shadow: 0 0 6px rgba(255,200,40,.8), 0 0 14px rgba(255,160,0,.4); letter-spacing: 1.5px; text-transform: uppercase; font-size: 18px;
  background-image: radial-gradient(rgba(0,0,0,.35) 1px, transparent 1.2px); background-size: 3px 3px; }
.sb-mid { display: grid; justify-items: center; gap: 6px; }
.led-score { font-size: 54px; line-height: 1; display: flex; gap: 10px; }
.led-score .sep { opacity: .6; }
.sb-time { display: flex; gap: 8px; align-items: center; background: #050a12; border: 1px solid #2b4566; border-radius: 4px; padding: 4px 12px; }
.led-time { font-size: 24px; color: #8fe0ff; text-shadow: 0 0 8px rgba(120,210,255,.9); min-width: 60px; text-align: right; }
.live-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.vol { display: flex; align-items: center; gap: 6px; }
.vol input { width: 110px; padding: 0; accent-color: var(--grass); }
.live-main { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 14px; align-items: center; }
.comm { display: flex; gap: 16px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.commentator { width: 110px; height: 110px; flex: none; border-radius: 10px; }
.commentator .mouth.talking { animation: talk .18s infinite alternate; }
@keyframes talk { from { ry: 2; } to { ry: 6; } }
.bubble { position: relative; background: #fff; border: 2px solid var(--navy-2); border-radius: 14px; padding: 12px 16px; font-size: 17px; min-height: 52px; flex: 1; }
.bubble::before { content: ""; position: absolute; left: -12px; top: 22px; border: 6px solid transparent; border-right: 10px solid var(--navy-2); }
.bubble.pop { animation: pop .25s ease-out; }
@keyframes pop { from { transform: scale(.97); opacity: .4; } to { transform: none; opacity: 1; } }
.poss { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 6px; }
.poss-bar { position: relative; height: 34px; border-radius: 6px; background: linear-gradient(90deg, #2f8a3e 0 50%, #2b7f39 50%); border: 2px solid #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.poss-bar::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 2px solid rgba(255,255,255,.8); }
.poss-dot { position: absolute; top: 9px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 4px #000; transition: left .8s ease; }
.live-log { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; max-height: 360px; overflow: auto; }
.live-log li { display: grid; grid-template-columns: 24px 38px 1fr; gap: 6px; padding: 5px 4px; border-bottom: 1px solid var(--line); }
.live-log li.goal { background: #eaf6ec; font-weight: 700; }
.live-log .min { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .live-main { grid-template-columns: 1fr; } .led-score { font-size: 40px; } }

/* ---------- Playing with friends (FR-DEC-044) ---------- */
.btn-small { padding: 3px 9px; font-size: 12px; }
.form-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form-inline input { flex: 1 1 220px; min-width: 0; }
.mono, .big-code, .code-chip { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .5px; }
.big-code { font-size: 26px; font-weight: 800; letter-spacing: 3px; background: var(--head); border: 1px dashed var(--line); border-radius: 8px; padding: 12px 16px; margin: 10px 0; text-align: center; user-select: all; }
.code-chip { display: inline-block; background: var(--navy); color: #fff; border-radius: 6px; padding: 2px 8px; font-weight: 700; }
.plain-list { list-style: none; padding: 0; margin: 0 0 10px; font-size: 13px; line-height: 1.7; }
.panel.invite { border-left: 4px solid var(--grass); }
.panel.friends h3, .panel.friends h3 + p { margin-top: 0; }
.panel.friends h3 { font-size: 15px; margin-bottom: 4px; }
.recovery { max-width: 620px; margin: 0 auto; }
.join-panel { border-left: 4px solid var(--gold); }
td.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
