/* ==========================================================================
   CM01/02 UI Stylesheet (Optimized & Cleaned)
   Body text: Eras (ITC Eras)
   Headings: Handel Gothic
   ========================================================================== */

/* ---------- Local Custom Fonts ---------- */
@font-face {
  font-family: "Handel Gothic";
  src: url("HandelGothic Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "Handel Gothic";
  src: url("HandelGo.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: "HandelGothic";
  src: url("HandelGothic Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "HandelGothic BT";
  src: url("HandelGothic Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* Consolidated Eras aliases pointing to your working .otf file */
@font-face {
  font-family: "ITC Eras";
  src: url("eras.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "ITC Eras Medium";
  src: url("eras.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "ITC Eras Demi";
  src: url("eras.otf") format("opentype");
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: "Eras Medium ITC";
  src: url("eras.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "Eras ITC";
  src: url("eras.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

/* ---------- CSS Variables & Global Resets ---------- */
:root {
  --blue: #06135b;
  --purple: #2b066f;
  --yellow: #fff400;
  --cyan: #77f5ef;
  --orange: #ff8400;
  --green: #00510a;
  --lime: #00e91a;
  --grey: #9b9b9b;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: #070707;
  color: #fff;
  font-family: "ITC Eras", "ITC Eras Medium", "ITC Eras Demi", "Eras Medium ITC", Arial, sans-serif;
  font-size: 14px;
}

button, input, select { font: inherit; }
.hide { display: none !important; }

/* ---------- Main Layout Structure ---------- */
.game {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(rgba(45,35,20,.25), rgba(45,35,20,.25)), linear-gradient(120deg, #817054, #a18f6d 45%, #6c604d);
}

aside {
  width: 100px;
  min-width: 100px;
  background: linear-gradient(#06104f, #07145d);
  border-right: 4px solid #111;
  padding: 7px 6px;
}
aside button {
  width: 100%;
  height: 54px;
  background: #07145d;
  color: #fff;
  border: 1px solid #162987;
  font-weight: bold;
}
aside .yellow, .sel { color: var(--yellow); }
aside .cyan { color: #61f3f4; }

.date {
  height: 48px;
  text-align: center;
  color: var(--yellow);
  background: #061159;
  border: 1px solid #1d2c96;
  padding: 5px;
  font-size: 12px;
}
.arr {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin: 4px 0;
}
.arr button { height: 38px; color: var(--yellow); }

main {
  width: calc(100% - 100px);
  padding: 7px 10px 10px;
  max-width: 1600px;
}

header, .playerhead, .clubhead {
  font-family: "HandelGothic BT", "HandelGothic", "Handel Gothic", Arial, sans-serif;
}

header {
  height: 67px;
  background: linear-gradient(#fff900, #dfd800);
  border: 2px solid #938f00;
  color: #0a247c;
  font-size: 33px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  text-shadow: 2px 2px #817c00;
  position: relative;
}
header small {
  position: absolute;
  right: 8px;
  top: 9px;
  font-family: "Eras Medium ITC", "Eras ITC", Arial, sans-serif;
  font-size: 12px;
  text-shadow: none;
  border-bottom: 1px solid #333;
}

.tabs, .ptabs, .ctabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 5px;
}
.tabs button, .ptabs button, .ctabs button, .clubfooter button, .scouts button {
  height: 39px;
  background: var(--purple);
  color: #fff;
  border: 1px solid #5c3daf;
  font-weight: bold;
}
.tabs .on, .ptabs .on, .ctabs .on {
  border: 2px solid var(--yellow);
  color: var(--yellow);
}

.toolbar {
  display: grid;
  grid-template-columns: 125px 125px 125px 1fr 125px 125px;
  gap: 2px;
  margin: 7px 10px 0;
}
.toolbar button, .toolbar select, .clubtools button, .playerbuttons button {
  height: 24px;
  background: #9c9c9c;
  color: #fff;
  border: 1px solid #dedede;
  text-shadow: 1px 1px #555;
  font-weight: bold;
  font-size: 12px;
}

.region {
  text-align: center;
  color: var(--cyan);
  font-weight: bold;
  font-size: 12px;
  padding: 5px 0;
  margin: 0 10px;
  border-top: 1px solid rgba(255,255,255,.12);
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.results { margin: 0 10px; background: rgba(30,30,20,.48); }
.title {
  height: 57px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yellow);
  font-size: 20px;
  font-weight: bold;
  position: relative;
  border-bottom: 1px solid #777;
}

.pager {
  position: absolute;
  right: 0;
  top: 3px;
  display: flex;
  gap: 2px;
  align-items: center;
}
.pager button, .pager b {
  height: 25px;
  background: #11166d;
  color: var(--yellow);
  border: 1px solid #3343ae;
  padding: 4px 7px;
}

.scroll { overflow: auto; max-height: 56vh; min-height: 340px; }

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 900px;
}
th {
  height: 25px;
  background: #a2a2a2;
  color: #fff;
  border-right: 2px solid #666;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #555;
  padding: 3px 6px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}
th:hover { background: #b4b4b4; }
th.sorted { color: var(--yellow); }
th.num { text-align: center; }

td {
  height: 25px;
  padding: 3px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
tbody tr { cursor: pointer; }
tbody tr:hover { background: rgba(60,40,120,.42); }
td.name { font-weight: bold; }
td.club button {
  background: none;
  border: 0;
  color: #72ffff;
  padding: 0;
  font-weight: bold;
  cursor: pointer;
}
td.nat { color: var(--yellow); }
td.pos { color: var(--orange); }
td.num { color: #68f0ec; text-align: center; }
td.value, .value { text-align: center !important; }
td.value { background: #590059; border: 1px solid #916095; }

.found {
  text-align: center;
  color: var(--cyan);
  font-size: 18px;
  font-weight: bold;
  padding: 13px;
}
.scouts, .clubfooter {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 8px 10px 0;
}
.scouts button { color: #9a76c7; }

.bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin: 7px 10px 0;
}
.bottom button, .filterbottom button {
  height: 39px;
  background: linear-gradient(#aaa, #8c8c8c);
  border: 1px solid #ddd;
  color: #f5f5f5;
  font-size: 17px;
  font-weight: bold;
}

/* ---------- Modals & Filters ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: auto;
}
.filterbox {
  width: min(670px, 96vw);
  background: #001b05;
  border: 3px solid #002d08;
  padding: 8px;
  box-shadow: 0 0 0 1px #003a0b;
}
.filterbox h2 {
  text-align: center;
  margin: 0;
  background: #050505;
  padding: 13px;
  font-size: 19px;
  font-family: "Eras Demi ITC", "Eras Medium ITC", Arial, sans-serif;
}
.filtertabs {
  display: grid;
  grid-template-columns: 125px 125px 1fr 125px;
  gap: 2px;
  margin: 9px 0;
}
.filtertabs button {
  height: 23px;
  background: #999;
  border: 1px solid #ddd;
  color: #fff;
}
.filtertabs .on { border-color: #fff; }

.greenpane {
  background: var(--green);
  border: 2px solid #006611;
  padding: 8px 10px;
  min-height: 335px;
}
.gline {
  display: grid;
  grid-template-columns: 150px 1fr minmax(140px, 1.2fr);
  align-items: center;
  gap: 10px;
  min-height: 29px;
}
.gline > b { font-size: 17px; color: #d3d3d3; }
.gline input, .gline select {
  height: 25px;
  background: #00570b;
  color: var(--yellow);
  border: 1px solid var(--yellow);
  padding: 2px 8px;
}
.gline i { color: var(--lime); font-size: 12px; }
.range { display: flex; align-items: center; gap: 5px; }
.range input { width: 80px; }
.range span { color: var(--lime); }

.quick { display: flex; gap: 8px; }
.quick button { border: 0; background: none; color: var(--lime); padding: 0; }
.quick button:hover { text-decoration: underline; }
.filterbottom { display: grid; grid-template-columns: 3fr 1fr; gap: 2px; margin-top: 8px; }

.attrgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px 36px;
  padding: 0 5px;
}
.astep {
  display: grid;
  grid-template-columns: 1fr 31px 31px 31px;
  align-items: center;
  min-height: 28px;
}
.astep .label { color: #d2d2d2; font-weight: bold; }
.astep.active .label { color: var(--yellow); }
.astep button {
  height: 23px;
  background: #00470b;
  color: #fff;
  border: 1px solid #002d05;
}
.astep .aval {
  text-align: center;
  color: var(--lime);
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}
.astep.active .aval { color: var(--yellow); }
.match { text-align: right; color: #fff; margin-top: 3px; }
.match span { color: #74f6f0; }

/* ---------- Player Profiles, Squads & Club Themes ---------- */
.playerbox, .squadbox {
  width: min(1100px, 98vw);
  background: #171717;
  padding: 8px;
  border: 1px solid #555;
  --team-fg: #FFFFFF;
  --team-bg: #101010;
  --team-fg2: #FFFFFF;
  --team-bg2: #424242;
}
.playerbox {
  background: linear-gradient(color-mix(in srgb, var(--team-bg) 22%, #111 78%), color-mix(in srgb, var(--team-bg) 10%, #111 90%));
}
.squadbox {
  background: color-mix(in srgb, var(--team-bg) 16%, #171717 84%);
}

.playerhead, .clubhead {
  height: 64px;
  background: var(--team-bg) !important;
  color: var(--team-fg) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.playerhead h1, .clubhead h1 { color: var(--team-fg) !important; font-size: 30px; margin: 0; text-shadow: 2px 2px #222; }
/* Soft neutral-grey shadow for player headings, suitable for all club colours. */
.playerhead h1 {
  text-shadow: 1px 1px 2px rgba(95, 95, 95, 0.65), 2px 2px 3px rgba(45, 45, 45, 0.35);
}
.playerhead button, .clubhead button {
  position: absolute;
  right: 8px;
  top: 5px;
  background: #11346d;
  color: #fff;
  border: 1px solid #78a0ff;
}

.playermeta {
  text-align: center;
  color: var(--yellow);
  background: #121212;
  font-size: 18px;
  font-weight: bold;
  padding: 8px;
  margin-top: 4px;
}
.playerbuttons { text-align: right; margin: 5px; }

.profilegrid {
  display: grid;
  grid-template-columns: minmax(400px, 1fr) minmax(400px, 800px);
  gap: 8px;
}
.profileattrs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 12px;
  background: #161616;
  padding: 8px;
}
.prow {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #333;
  padding: 4px;
}
.prow b { color: var(--yellow); }
.position {
  text-align: center;
  color: var(--cyan);
  font-size: 18px;
  font-weight: bold;
  background: #181818;
  padding: 10px;
}
.shot img { width: 100%; max-width: 800px; cursor: zoom-in; }

.clubtools {
  display: grid;
  grid-template-columns: 125px 125px 1fr 125px;
  gap: 2px;
  margin: 7px 10px;
}
.squadlabel {
  text-align: center;
  color: var(--team-fg) !important;
  font-size: 20px;
  font-weight: bold;
  background: color-mix(in srgb, var(--team-bg) 48%, #161616 52%) !important;
  padding: 6px;
}
.squadcols, .nationcols {
  display: block !important;
  grid-template-columns: none !important;
  grid-auto-flow: initial !important;
  background: linear-gradient(color-mix(in srgb, var(--team-bg) 45%, #5a4e4a 55%), color-mix(in srgb, var(--team-bg) 33%, #5a4e4a 67%)) !important;
  max-height: 440px;
  overflow: auto;
}
.squadpair {
  width: 100%;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 115px minmax(0, 1fr) 115px !important;
  column-gap: 14px;
  align-items: center;
  min-height: 28px;
}
.squadpair .pname {
  background: none;
  border: 0;
  color: #fff;
  text-align: left;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  padding: 2px 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.05;
  pointer-events: auto !important;
  position: relative;
  z-index: 2;
}
.squadpair .sp { color: var(--yellow); font-weight: bold; }
.squadpair:hover { background: rgba(255,255,255,.07); }
.squadpair .empty { visibility: hidden; }

.title-club {
  display: inline;
  width: auto !important;
  height: auto !important;
  position: static !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: inherit !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  text-shadow: inherit !important;
  cursor: pointer;
}
.title-club:hover { text-decoration: underline; text-decoration-thickness: 2px; }

/* ---------- Sidebar & Nav ---------- */
.sidebar { overflow: hidden; position: relative; z-index: 5; }
.sidebar > button {
  font-size: 11.5px;
  line-height: 1.12;
  white-space: normal;
  overflow: hidden;
  text-overflow: clip;
  padding: 2px;
}
.sidebar .side-single { font-size: 10.5px; letter-spacing: -.15px; }
.sidebar button.nav-active { color: #fff400 !important; border-color: #fff400 !important; background: #071a72 !important; }

.donate { cursor: pointer; }
.donate-main, .head-donate {
  font-family: "ITC Eras", "Eras Medium ITC", Arial, sans-serif !important;
  font-size: 11px !important;
  line-height: 16px !important;
  text-shadow: none !important;
  padding: 2px 12px !important;
  width: auto !important;
  min-width: 74px !important;
  height: 23px !important;
  border: 1px solid #777 !important;
  box-shadow: none !important;
  font-weight: bold !important;
}
.donate-main {
  position: absolute !important;
  right: 8px !important;
  top: 9px !important;
  background: #efefef !important;
  color: #9d0000 !important;
}
.head-donate {
  position: absolute !important;
  right: 8px !important;
  top: 5px !important;
  background: #f2f2f2 !important;
  color: #a50000 !important;
  border-color: #555 !important;
}
.playerbox .head-donate, .squadbox .head-donate, .nationbox .head-donate {
  background: var(--team-fg) !important;
  color: var(--team-bg) !important;
  border-color: var(--team-bg) !important;
}
.competitionbox .head-donate, .findbox .head-donate { background: #efefef !important; color: #9d0000 !important; }

button:disabled {
  color: #5d5d5d !important;
  background: #777 !important;
  border-color: #999 !important;
  text-shadow: 1px 1px #aaa !important;
  cursor: default;
}
.back-next { grid-template-columns: 85fr 15fr !important; }
.back-next button:first-child, .back-next button:last-child { font-size: 18px; }

/* ---------- Nation, Find & Comp Screens ---------- */
.nationbox, .findbox {
  width: min(1100px, 98vw);
  background: #171717;
  padding: 8px;
  border: 1px solid #555;
}
.nationbox { --team-fg: #fff; --team-bg: #c60000; --team-fg2: #fff; --team-bg2: #333; }
.nationhead, .findhead {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-family: "HandelGothic BT", "HandelGothic", "Handel Gothic", Arial, sans-serif;
}
.nationhead { background: var(--team-bg); color: var(--team-fg); }
.findhead { background: linear-gradient(#f51b1b, #c60000); color: #fff; }
.nationhead h1, .findhead h1 { font-size: 30px; margin: 0; text-shadow: 2px 2px #222; }

.nationtools {
  display: grid;
  grid-template-columns: 125px 125px 1fr 125px;
  gap: 2px;
  margin: 7px 10px;
  align-items: start;
}
.nationtools > button, .nation-filter-wrap > button {
  height: 24px;
  background: #9c9c9c;
  color: #fff;
  border: 1px solid #dedede;
  text-shadow: 1px 1px #555;
  font-weight: bold;
  font-size: 12px;
}
.nation-filter-wrap, .club-filter-wrap { position: relative; z-index: 20; }
.nation-filter-wrap > button, .club-filter-wrap > button { width: 100%; }

.nation-filter-menu, .squad-filter-menu {
  position: absolute;
  right: 0;
  top: 24px;
  width: 170px;
  background: #00a510;
  border: 1px solid #005c08;
  z-index: 80;
  padding: 3px;
}
.nation-filter-menu button, .squad-filter-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: #00a510;
  border: 0;
  color: #001700 !important;
  font-size: 13px !important;
  line-height: 18px !important;
  padding: 6px 8px;
  font-weight: bold;
  text-shadow: none !important;
}
.nation-filter-menu button:hover, .squad-filter-menu button:hover { background: #17c51d; }
.nation-filter-menu hr { border: 0; border-top: 1px solid #006c08; margin: 3px 0; }

.nationpager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: #181818;
  padding: 5px;
  color: #fff400;
}
.nationpager button { background: #11166d; color: #fff400; border: 1px solid #3343ae; height: 25px; }
.nation-link, .nat button {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  padding: 0;
  cursor: pointer;
}
.nation-link:hover, .nat button:hover { text-decoration: underline; }

.shot-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.96);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  cursor: zoom-out;
}
.shot-overlay img { max-width: 98vw; max-height: 92vh; object-fit: contain; }
.shot-overlay div { color: #ddd; margin-top: 8px; }

.findbox { background: linear-gradient(rgba(25,45,125,.75), rgba(18,32,96,.75)), #192a70; }
.findtabs { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 6px; }
.findtabs button { height: 39px; background: #2b066f; color: #fff; border: 1px solid #5c3daf; font-weight: bold; }
.findtabs button.on { border: 2px solid #fff400; color: #fff400; }
.findsearch {
  height: 32px;
  display: grid;
  grid-template-columns: 125px 1fr 250px;
  align-items: center;
  background: #1b2a77;
  margin: 6px 10px 0;
}
.findsearch b { padding-left: 12px; }
.findsearch input { height: 25px; background: #0d1d6b; color: #7ef9fa; border: 0; padding: 4px 8px; }
.findpager { display: flex; justify-content: flex-end; align-items: center; gap: 2px; }
.findpager button, .findpager b { height: 25px; background: #11166d; color: #fff400; border: 1px solid #3343ae; padding: 4px 7px; }
.findtitle { text-align: center; color: #fff400; font-size: 20px; font-weight: bold; padding: 9px; background: rgba(30,30,30,.45); margin: 0 10px; }
.findlist { margin: 0 10px; min-height: 390px; max-height: 55vh; overflow: auto; background: rgba(12,18,70,.55); }
.findlist table { min-width: 650px; }
.findlist td { font-size: 17px; }
.findlist td:nth-child(2) { color: #fff400; }
.findlist td:nth-child(3) { color: #ff8400; }
.findlist tbody tr { cursor: pointer; }
.findlist tbody tr:hover { background: rgba(255,255,255,.08); }

/* ---------- Competitions & Pickers ---------- */
.picker-layer { position: fixed; inset: 0; z-index: 180; background: transparent; pointer-events: none; }
.picker-layer .green-menu { pointer-events: auto; }
.green-menu {
  position: absolute;
  background: #00a610;
  border: 1px solid #005b08;
  box-shadow: 0 2px 4px rgba(0,0,0,.4);
  padding: 2px;
  min-width: 125px;
  overscroll-behavior: contain;
}
.green-menu button {
  display: block;
  width: 100%;
  height: 29px;
  text-align: left;
  padding: 4px 8px;
  background: #00a610;
  border: 0;
  border-bottom: 1px solid #007208;
  color: #001600;
  font-weight: bold;
  white-space: nowrap;
}
.green-menu button:hover:not(:disabled) { background: #fff400; color: #101010; }
.green-menu button:disabled { background: #00860c !important; color: #003b05 !important; text-shadow: none !important; }

.comp-root { left: 94px; top: 220px; max-height: calc(100vh - 8px); }
.comp-nations { left: 218px; top: 335px; max-height: 390px; overflow: auto; }
.comp-divisions { left: 345px; top: 335px; max-height: 390px; overflow: auto; min-width: 230px; }
.picker-note { position: absolute; left: 94px; top: 525px; background: rgba(0,0,0,.78); color: #ddd; padding: 5px 8px; font-size: 11px; }

.nc-root { left: 94px; top: 264px; max-height: calc(100vh - 8px); }
.nc-menu2 { left: 218px; top: 264px; max-height: 390px; overflow: auto; }
.nc-menu3 { left: 342px; top: 264px; max-height: 390px; overflow: auto; min-width: 150px; }
.nc-menu4 { left: 500px; top: 264px; max-height: 390px; overflow: auto; min-width: 220px; }

.competitionbox {
  width: min(1100px, 98vw);
  background: #09094d;
  padding: 8px;
  border: 1px solid #555;
  --comp-fg: #0c2d8d;
  --comp-bg: #fff;
}
.competitionhead {
  height: 66px;
  background: #f7f7f7;
  color: var(--comp-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 2px solid #bcbcbc;
  font-family: "HandelGothic BT", "HandelGothic", "Handel Gothic", Arial, sans-serif;
}
.competitionhead h1 { font-size: 31px; margin: 0; text-shadow: 2px 2px #bbb; }
.competitiontabs { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 6px; }
.competitiontabs button, .competitionfooter button {
  height: 39px;
  background: #2b066f;
  color: #fff;
  border: 1px solid #5c3daf;
  font-weight: bold;
}
.competitiontabs .on { color: #fff400; border: 2px solid #fff400; }
.competitiontools {
  display: grid;
  grid-template-columns: 125px 34px minmax(190px, 320px) 34px;
  gap: 3px;
  margin: 8px 10px;
}
.competitiontools button, .competitiontools select {
  height: 27px;
  background: #9b9b9b;
  color: #fff;
  border: 1px solid #ddd;
  font-weight: bold;
}
.competitiontools select { padding: 2px 8px; }

.league-title {
  text-align: center;
  color: #fff400;
  font-size: 22px;
  font-weight: bold;
  padding: 8px;
  background: linear-gradient(rgba(30,30,100,.72), rgba(30,30,100,.72)), var(--comp-bg);
}
.league-wrap { margin: 0 10px; max-height: 430px; overflow: auto; background: linear-gradient(120deg, #111153, #14144f 60%, #090940); }
.league-table { min-width: 700px; table-layout: auto; }
.league-table th { background: #9b9b9b; color: #fff; text-align: center; border: 1px solid #ddd; height: 28px; }
.league-table th:nth-child(2) { text-align: left; }
.league-table td { height: 29px; border-bottom: 1px dashed #c6c600; color: #fff; font-size: 17px; }
.league-table td.clubcell { font-weight: bold; }
.league-table td.clubcell button {
  background: none;
  border: 0;
  color: #fff;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
}
.league-table td.clubcell button:hover { text-decoration: underline; }
.league-table td.num { text-align: center; color: #fff; }
.league-table td.pts { background: #5a0057; border: 1px solid #8f448c; text-align: center; }

.posbadge {
  display: inline-block;
  min-width: 52px;
  background: #071c9a;
  border: 1px solid #1235d0;
  color: #fff;
  text-align: center;
  font-size: 12px;
  padding: 3px 6px;
}
.competitionfooter { display: grid; grid-template-columns: repeat(5, 1fr); margin: 8px 10px 0; }
.nc-list-title { color: #fff400; padding: 5px 8px; font-weight: bold; background: #006c08; }

.competition-screen {
  position: fixed;
  left: 100px;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 220;
  background: #88775c;
  padding: 7px 10px;
  overflow: auto;
}
.competition-screen .competitionbox { width: 100%; max-width: none; min-height: calc(100vh - 14px); margin: 0; background: #09094d; }
.competition-screen .league-wrap { max-height: calc(100vh - 330px); min-height: 320px; }

/* ---------- Results / Misc Helpers ---------- */
.results th, .results td { font-size: 12.5px; }
.results td.num { white-space: nowrap; }
.results td.based { color: #fff400; }
.results td.nat { color: #ffd800; }
.squad-empty { padding: 35px 20px; text-align: center; color: #fff400; font-weight: bold; font-size: 15px; }

/* Sortitoutsi Cut-out Portraits */
.player-face-holder {
  height: 112px;
  width: 112px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  margin: 8px auto 0;
}
.player-face {
  display: block;
  max-height: 112px;
  max-width: 112px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: bottom center;
}
.player-face.hide { display: none; }

/* ---------- Responsive Adjustments ---------- */
@media(max-width: 900px) {
  aside { display: none; }
  main { width: 100%; }
  .toolbar { grid-template-columns: 1fr 1fr 1fr; }
  .toolbar span { display: none; }
  .profilegrid { grid-template-columns: 1fr; }
  .gline { grid-template-columns: 125px 1fr; }
  .gline > :nth-child(3) { grid-column: 2; }
  .attrgrid { grid-template-columns: 1fr; }
  .nationtools { grid-template-columns: 1fr 1fr; }
  .nation-filter-wrap { grid-column: 2; }
  .findsearch { grid-template-columns: 100px 1fr; }
  .findpager { grid-column: 1/3; }
  .comp-root, .nc-root { left: 12px; }
  .comp-nations, .nc-menu2 { left: 136px; }
  .comp-divisions, .nc-menu3 { left: 260px; }
  .nc-menu4 { left: 414px; }
  .competitiontools { grid-template-columns: 90px 32px 1fr 32px; }
  .competition-screen { left: 0; }
  .squadpair {
    grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr) 80px !important;
    column-gap: 8px;
  }
  .squadpair .right-name, .squadpair .right-pos { display: initial !important; }
}
/* Player Search pagination improvements */
.results .pager {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.results .pager button,
.results .pager b {
    box-sizing: border-box;
    height: 30px;
    min-width: 37px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #11166d;
    color: #fff600;
    border: 1px solid #3343ae;
    font-size: 16px;
    line-height: 1;
    font-weight: bold;
    flex-shrink: 0;
}

.results .pager b {
    min-width: 110px;
    font-style: italic;
}

.results .pager button {
    cursor: pointer;
}

.results .pager button:hover {
    background: #263caa;
}
