:root {
  --bg: #0b1020;
  --card: rgba(255,255,255,0.06);
  --card-2: rgba(255,255,255,0.09);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.65);
  --border: rgba(255,255,255,0.14);
}

/* Generic page wrapper */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 32px;
  font-weight: 800;
}

.page-subtitle {
  margin-top: 6px;
  color: rgba(255,255,255,0.7);
}

/* Rules page placeholder */
.page--rules .rules-content {
  min-height: 300px;
}


* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 20% 0%, rgba(255,255,255,0.08), transparent 60%),
              radial-gradient(900px 600px at 90% 10%, rgba(255,255,255,0.06), transparent 55%),
              var(--bg);
  color: var(--text);
}

@font-face{
  font-family: "Radikal";
  src: url("../Fonts/Radikal-Thin.ttf") format("truetype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Radikal";
  src: url("../Fonts/Radikal-W01-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Radikal";
  src: url("../Fonts/Radikal-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Radikal";
  src: url("../Fonts/Radikal-Black-Italic.ttf") format("truetype");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

:root { font-family: "Radikal", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
body  { font-family: inherit; }

.site-header {
  padding: 28px 16px 10px;
  text-align: center;
}

.site-header h1 {
  margin: 0 0 6px;
  font-size: 1.8rem;
}

.tagline {
  margin: 0;
  color: var(--muted);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px 40px;
}

/* Controls / filter UI */
.controls {
  display: flex;
  justify-content: center; /* from earlier block (still effective) */
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 14px 0 18px;     /* later wins over 12px 0 18px */
}

.controls input,
.controls select {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: #fff;
  font-size: 14px;
  line-height: 40px;
}

.controls input {
  flex: 1 1 260px;
  min-width: 220px;
}

.controls select {
  flex: 0 0 auto;
  min-width: 220px;
  cursor: pointer;
  padding-right: 34px; /* arrow spacing */
}

/* Focus styling */
.controls input:focus,
.controls select:focus {
  outline: none;
  border-color: rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.status {
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

/* Make your existing grid play nicely with fixed-size cards */
#cards.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  align-items: start;
}

/* Placeholder card styling (kept, but note .card below is the final winner for most pages) */
.card h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.card .meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.smallprint {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Player list card styling */
.player-card {
  display: flex;
  gap: 12px;
  align-items: center;

  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  background: #fff;
}

.player-card__body {
  min-width: 0; /* stops long names breaking layout */
}

.player-name {
  font-weight: 700;
  line-height: 1.2;
}

.player-meta {
  margin-top: 2px;
  font-size: 0.9rem;
  opacity: 0.75;
}

/* Generic meta list */
.meta {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
}

.meta li {
  font-size: 0.9rem;
  line-height: 1.4;
}

.meta li strong {
  font-weight: 600;
}

/* (Legacy) player-filter block */
.player-filter {
  margin: 16px 0 20px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.player-filter label {
  font-weight: 600;
}

.player-filter input {
  flex: 1;
  max-width: 420px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
}

/* --- Card becomes a badge canvas --- */
/* IMPORTANT: this block is the merged result of your 3 separate `.card` blocks,
   preserving the same computed styles. */
.card {
  /* from earliest `.card` placeholder */
  border: 1px solid var(--border);

  /* final intended badge canvas */
  position: relative;
  width: 320px;
  aspect-ratio: 3 / 4;
  background: url("../images/card-background.jpeg") center/contain no-repeat;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
  padding: 0;
}

/* Inner overlay layer (merged; later values win where conflicting) */
.card .overlay {
  position: absolute;
  inset: 0;
  padding: 22px 22px 26px; /* later wins */
  display: grid;
  grid-template-rows: auto 1fr auto auto; /* later wins */
  gap: 10px; /* later wins */
  pointer-events: none;
  color: rgba(10, 8, 20, 0.95);
}

/* --- Legacy “topline / photo-wrap / namebar / stats” styles (kept for compatibility) --- */
.card .topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: #0b0b16;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.card .rating {
  font-size: 23px;
  line-height: 1;
}

.card .pos {
  font-size: 18px;
  opacity: 0.9;
}

.card .photo-wrap {
  display: flex;
  align-items: start;
  justify-content: center;
  margin-top: 10px;
}

.card img.player-photo {
  width: 68%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
  background: rgba(255,255,255,0.15);
}

.card .namebar {
  margin-top: 14px;
  text-align: center;
  color: #fff;
  font-weight: 800;
  text-shadow: 0 2px 14px rgba(0,0,0,0.55);
}

.card .namebar .name {
  font-size: 26px;
  line-height: 1.1;
}

.card .stats {
  margin-top: 12px;
  background: rgba(255,255,255,0.72);
  border-radius: 14px;
  padding: 10px 12px;
  color: #121225;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  font-size: 13px;
  font-weight: 700;
}

.card .stats .item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.card .stats .label {
  opacity: 0.75;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.card .bottom {
  display: flex;
  justify-content: center;
  margin-top: 12px;
  color: rgba(255,255,255,0.85);
  font-weight: 800;
  text-shadow: 0 2px 14px rgba(0,0,0,0.55);
  font-size: 13px;
}

/* Everything that appears "printed" on the card */
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 4px 2px 0;
}

/* Rating (note: there’s also `.card .rating` above; both are preserved as per original file) */
.rating {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -1px;
  color: rgba(255,255,255,0.95);
  text-shadow:
    0 2px 6px rgba(0,0,0,0.45),
    0 0 18px rgba(255,255,255,0.25);
}

.pos {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
  opacity: 0.9;
}

/* Portrait sits in the "medallion" zone */
.portrait {
  display: flex;
  justify-content: center;
  align-items: start;
  margin-top: 2px;
}

/* player-photo (merged: keeps properties that still “win” because later blocks don’t override them) */
.player-photo {
  /* from list-card photo */
  height: 70px;
  flex: 0 0 56px;

  /* later card-photo wins for these */
  width: 44%;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  object-fit: cover;

  /* later wins, but earlier values remain where not overridden */
  background: none;
  border: none;

  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
}

/* Name plate */
.nameplate {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  padding: 0px 12px;
  border-radius: 14px;
}

.nameplate .name {
  font-size: 20px;
  font-weight: 900;
  text-align: center;
  color: rgba(255,255,255,0.96);
  text-shadow: 0 10px 26px rgba(0,0,0,0.45);
}

.player-position{
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: rgba(120, 255, 160, 0.95);
  text-shadow: 0 10px 26px rgba(0,0,0,0.35);
}

/* Stats plate (legacy) */
.statsplate {
  margin-top: 2px;

  padding: 10px 12px;
  border-radius: 16px;

  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  border: 1px solid rgba(255,255,255,0.35);

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;

  font-weight: 900;
}

.stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.stat span {
  font-size: 12px;
  letter-spacing: 0.6px;
  opacity: 0.72;
}

.stat b {
  font-size: 16px;
  letter-spacing: -0.2px;
}

.formplate {
  display: flex;
  justify-content: center;
  align-items: center;

  margin-top: 2px;
  font-size: 12px;
  font-weight: 900;

  color: rgba(255,255,255,0.90);
  text-shadow: 0 8px 22px rgba(0,0,0,0.55);
}

/* FIFA-style stat columns */
.stats-columns {
  margin-top: 6px;
  padding: 5px 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;

  background: rgba(255,255,255,0.60);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.28);
}

.stat-col {
  display: flex;
  flex-direction: column;
  gap: 4px; /* final winner */
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stat-item .value {
  font-size: 17px; /* final winner */
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.5px;
  color: #0b0b16;
}

.stat-item .label {
  margin-top: 1px; /* final winner */
  font-size: 10px; /* final winner */
  font-weight: 800;
  letter-spacing: 0.9px; /* final winner */
  opacity: 0.75;
}

/* Form strip */
.form-strip {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

/* Base badge */
.form-badge {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  position: relative;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 11px;
  line-height: 1;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

/* Colours */
.form-badge.is-w {
  background: #7CFF7C;
  color: #0b2b0b;
}

.form-badge.is-d {
  background: #C8C8C8;
  color: #1a1a1a;
}

.form-badge.is-l {
  background: #FF4A4A;
  color: #2b0b0b;
}

/* X state */
.form-badge.is-x {
  background: #ffffff;
  color: #000000;
  border: 1px solid rgba(0,0,0,0.35);
  box-shadow: none;
}

.form-label {
  transform: translateY(0.5px);
}

/* MOM star via clip-path */
.form-badge.is-motm {
  border-radius: 0;
  clip-path: polygon(
    50% 0%,
    62% 16%,
    80% 10%,
    78% 30%,
    96% 35%,
    82% 50%,
    96% 65%,
    78% 70%,
    80% 90%,
    62% 84%,
    50% 100%,
    38% 84%,
    20% 90%,
    22% 70%,
    4% 65%,
    18% 50%,
    4% 35%,
    22% 30%,
    20% 10%,
    38% 16%
  );
  box-shadow: 0 2px 3px rgba(0,0,0,0.45);
}

/* Captain outline */
.form-badge.is-captain {
  outline: 2px solid rgba(255,255,255,0.75);
  outline-offset: -2px;
}

/* Captain band (final winner = centred “equator” sash) */
.form-badge.is-captain .captain-band {
  position: absolute;
  left: -2px;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);

  height: 12px;
  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.5px;

  background: rgba(0, 0, 0, 0.85);
  color: #fff;

  box-shadow: 0 1px 2px rgba(0,0,0,0.45);
  pointer-events: none;
  z-index: 2;
}

/* Make sure text stays legible over the band */
.form-badge.is-captain .form-label {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* Captain band colours by team */
.form-badge.is-captain.is-pink .captain-band {
  background: linear-gradient(90deg, #ff6fae, #ff3b86);
  color: #2b0016;
}

.form-badge.is-captain.is-blue .captain-band {
  background: linear-gradient(90deg, #4aa3ff, #1e6fff);
  color: #001a33;
}

/* If both captain + MOM, keep band readable */
.form-badge.is-motm.is-captain .captain-band {
  top: 50%;
}

/* Subtle “OVR pop” on render */
.rating.ovr-pop {
  animation: ovrPop 220ms ease-out;
}

@keyframes ovrPop {
  0%   { transform: scale(0.92); filter: brightness(0.9); }
  70%  { transform: scale(1.06); filter: brightness(1.05); }
  100% { transform: scale(1.00); filter: brightness(1.0); }
}

/* Optional: cursor hint that hover shows detail */
.rating,
.overlay {
  cursor: help;
}

.ovr-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: 260px;

  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;

  background: rgba(15, 20, 30, 0.95);
  color: #fff;
  border-radius: 6px;

  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
  pointer-events: none;
  white-space: pre-line;
}

.ovr-tooltip.hidden {
  display: none;
}

/* -----------------------------
   OVR + Position stack (merged; final behaviour = absolute-pos label)
------------------------------ */

.rating-block{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}


/* Value pill content (pill itself is baked into the JPEG) */
.rating-block{
  margin-left: 2px;   /* tiny nudge into the pill */
  margin-top: 4px;
  gap: 4px;
}

/* -----------------------------
   TEMP: Remove translucent stats panel
   (layout unchanged)
------------------------------ */

.stats-columns {
  background: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  border: none !important;
}

.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(10px); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.nav__brand { font-weight: 700; text-decoration: none; }
.nav__links { display: flex; gap: 12px; }
.nav__toggle { display: none; }

@media (max-width: 720px) {
  .nav__toggle { display: inline-flex; }
  .nav__links { display: none; flex-direction: column; gap: 8px; padding-top: 8px; }
  .nav__links.is-open { display: flex; }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 10, 20, 0.6);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.topbar__inner {
  max-width: 1200px;      /* match your layout width if you have one */
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar__brand {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 700;
}

.topbar__links {
  display: flex;
  gap: 14px;
  align-items: center;
}

.topbar__links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-weight: 600;
}

.topbar__links a:hover {
  color: rgba(255,255,255,0.95);
  text-decoration: underline;
}

.topbar__links a[aria-current="page"] {
  color: rgba(255,255,255,0.95);
  text-decoration: underline;
}

.topbar__toggle {
  display: none;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 700;
}

/* Mobile */
@media (max-width: 720px) {
  .topbar__toggle { display: inline-flex; }

  .topbar__links {
    display: none;
    position: absolute;
    right: 16px;
    top: 48px;
    background: rgba(5, 10, 20, 0.95);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 10px;
    flex-direction: column;
    gap: 10px;
    min-width: 140px;
  }

  .topbar__links.is-open { display: flex; }

  /* Ensure the absolute menu has a positioning context */
  .topbar__inner { position: relative; }
}

/* Prevent first row of content sitting under the sticky topbar */
body { scroll-padding-top: 60px; } /* helps anchor links etc */

.site-header,
.container {
  padding-top: 18px; /* adjust if your topbar height changes */
}

/* Tighten card vertical rhythm: stop portrait row stretching */
.card .overlay{
  grid-template-rows: auto auto auto auto; /* was: auto 1fr auto auto */
  gap: 6px;                                /* was 10px */
  padding: 20px 22px 22px;                 /* was 22px 22px 26px */
}

/* Shave a couple px where it visually matters */
.portrait{
   margin-top: 32px; 
  margin-bottom: 6px;
  }                /* was 2px */

/* Put Market Value text INTO the baked pill (and stop it affecting layout) */
.card-top{
  position: relative;
}

/* Pill area is top-left in the artwork */
.rating-block{
  position: absolute;
  top: 10px;     /* tweak these 2 numbers to land perfectly */
  left: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;

  /* prevent accidental wrapping into the artwork title */
  max-width: 170px;
}

/* Label */
.rating-block .mv-label{
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: rgba(20, 10, 30, 0.85);
  text-shadow: none;
  white-space: nowrap;
}

/* Big digits */
.rating-block .mv-value{
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 0.95;
  color: rgba(20, 10, 30, 0.95);
  text-shadow: none;
  white-space: nowrap;
}

/* small £ */
.rating-block .mv-currency{
  font-size: 15px;
  font-weight: 900;
  position: relative;
  top: 0px;
  margin-right: 2px;
}

/* small m */
.rating-block .mv-suffix{
  font-size: 18px;
  font-weight: 900;
  margin-left: 2px;
  opacity: 0.9;
}

/* Anchor card-top to the true top-left of the artwork */
.card .card-top{
  position: absolute;
  top: 45px;
  left: 25px;
  right: 0;
  padding: 0;          /* remove the extra nudge */
}

/* Move the pill block back out of the overlay padding */
.card .rating-block{
  position: absolute;
  top: -19px;          /* negate .overlay padding */
  left: -23px;         /* negate .overlay padding */
}

/* =========================================================
   CARD PILL SYSTEM (CSS-only)
   Paste at END of styles.css so it wins
   ========================================================= */

:root{
  --pill-white: rgba(255,255,255,0.96);
  --pill-white-2: rgba(255,255,255,0.82);
  --pill-stroke: rgba(255,255,255,0.55);

  --pill-green-a: rgba(74, 255, 178, 0.95);
  --pill-green-b: rgba(0, 214, 255, 0.78);

  --pill-purple-a: rgba(122, 92, 255, 0.62);
  --pill-purple-b: rgba(122, 92, 255, 0.38);

  --pill-shadow: 0 10px 26px rgba(0,0,0,0.22);
  --pill-shadow-soft: 0 8px 18px rgba(0,0,0,0.16);
}

/* Ensure overlay can host pseudo elements */
.card .overlay{ 
  position: absolute; 
 padding: 18px 12px 14px !important;       /* a bit tighter */
}
.nameplate,
.form-row,
.rating-block,
.stat-item{ position: relative; }

/* -----------------------------------------
   1) VALUE: white "half-pill" behind Market Value block
   (sits behind the text; extends off the left edge)
----------------------------------------- */
.rating-block{
  pointer-events: none; /* already effectively non-interactive */
  z-index: 3;
    margin: 0 !important;
  padding: 0 0 0 10px; /* text inset into pill */
}

.rating-block::before{
  content:"";
  position:absolute;
    top: -8px !important;
  left: -120px !important;            /* pushes pill off-card to mimic “half pill” */
  width: 210px !important;
  height: 50px !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, var(--pill-white), var(--pill-white-2));
  box-shadow: var(--pill-shadow-soft);
  border: 1px solid rgba(0,0,0,0.10);
  /* optional: soften it a touch */
  filter: saturate(1.02);
  z-index: -1;
}

/* Keep your value text dark + crisp on white */
.rating-block .mv-label,
.rating-block .mv-value{
  color: rgba(20, 10, 30, 0.95);
  text-shadow: none;
}

/* -----------------------------------------
   2) NAME/POS: purple fade pill behind nameplate
----------------------------------------- */
.nameplate{
  padding: 6px 14px 6px !important; 
  border-radius: 999px;
  z-index: 2;
}

.nameplate::before{
  content:"";
  position:absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(122, 92, 255, 0.66),
    rgba(122, 92, 255, 0.38)
  );
  box-shadow: var(--pill-shadow);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: -1;
}

/* Text stays as you already have it */
.nameplate .name{ 
  color: rgba(255,255,255,0.96); 
   line-height: 1.1;
}
.player-position{ 
  color: rgba(120, 255, 160, 0.95); 
    margin-top: 2px;
  line-height: 1.05;
}

/* -----------------------------------------
   3) STATS: individual white pills behind each stat-item
   plus green gradient pills for CAPS + SUBS
----------------------------------------- */
.stats-columns{
  background: none !important;
  border: none !important;
  padding: 6px 10px; /* a tiny bit of structure so pills don’t collide */
  margin-top: 2px !important; 
}

.stat-item{
  padding: 6px 10px 5px !important; 
  border-radius: 16px;
  box-shadow: var(--pill-shadow-soft);
  border: 1px solid rgba(255,255,255,0.45);
  background: linear-gradient(180deg, var(--pill-white), var(--pill-white-2));
}

/* Make stat text sit nicely */
.stat-item .value{ 
  color: rgba(10, 8, 22, 0.98); 
  line-height: 0.9;
}
.stat-item .label{ 
  color: rgba(10, 8, 22, 0.72); 
  line-height: 1;
  margin-top: 1px !important;
  font-size: 0.6rem !important;
}

/* Green pills: left column 4th = CAPS, right column 4th = SUBS
   (because your JS renders them in fixed order) */
.stat-col:first-child .stat-item:nth-child(4),
.stat-col:last-child  .stat-item:nth-child(4){
  background: linear-gradient(90deg, var(--pill-green-b), var(--pill-green-a));
  border: 1px solid rgba(255,255,255,0.22);
}

/* -----------------------------------------
   4) FORM: purple fade long pill behind the form strip
----------------------------------------- */
.form-row{
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 12px; /* space inside the long pill */
  border-radius: 999px;
  z-index: 2;
    box-shadow:
  inset 0 1px 2px rgba(255,255,255,0.25),
  inset 0 -2px 6px rgba(0,0,0,0.25);
}

.form-row::before{
  content:"";
  position:absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pill-purple-a), var(--pill-purple-b));
  box-shadow: var(--pill-shadow);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: -1;
}

/* Keep form badges readable; allow hover tooltips etc */
.form-strip,
.form-badge{ pointer-events: auto; } /* overrides overlay pointer-events behaviour if needed */

.stat-col:first-child .stat-item:nth-child(4),
.stat-col:last-child  .stat-item:nth-child(4){
  padding: 7px 10px 6px !important;
}

/* ===== Mobile menu click fix ===== */

/* Put topbar on its own stacking context and above everything */
.topbar{
  z-index: 999 !important;
  position: sticky;
  isolation: isolate;            /* prevents weird stacking with children */
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

/* Ensure the button itself can receive taps */
.topbar__toggle{
  position: relative;
  z-index: 1000 !important;
  pointer-events: auto !important;
}

/* If legacy .nav still exists, stop it blocking taps */
.nav{
  pointer-events: none !important;
}
.nav *{
  pointer-events: none !important;
}

.stat-paren{
  font-size: 0.7em;
  opacity: 0.75;
  font-weight: 800;
}

/* Club badge on player card */
.club-badge{
  position: absolute;
  top: 5px;
  right: 7px;

  height: 100px;
  width: auto;

  opacity: 0.95;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));

  pointer-events: none; /* purely decorative */
}

@media (max-width: 480px){
  .club-badge{
    height: 48px;
    top: 8px;
    right: 8px;
  }
}

/* Header text + badge (does NOT take layout space) */
.card .overlay {
  position: relative; /* ensure absolute children anchor to the card */
}

.card-header {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  z-index: 3;
}

.card-header__title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1;
  color: rgba(35, 0, 55, 0.85);
  text-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.card-header__subtitle {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 10px 22px rgba(0,0,0,0.25);
}

.club-badge {
  position: absolute;
  top: 11px;
  right: 14px;
  height: 80px;      /* tweak as needed */
  width: auto;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.25));
}

/* RULES PAGE */
.rules-content{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rules-card{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 16px 16px;
  backdrop-filter: blur(6px);
}

.rules-card h2{
  margin: 0 0 10px 0;
  font-size: 20px;
  font-weight: 900;
}

.rules-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rule{
  background: rgba(0,0,0,0.16);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 12px 12px;
}

.rule h3{
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 900;
}

.rule p{
  margin: 0 0 8px 0;
  line-height: 1.35;
  color: rgba(255,255,255,0.88);
}

.rule ul{
  margin: 0;
  padding-left: 18px;
  color: rgba(255,255,255,0.88);
}

.rule li{ margin: 4px 0; }

.banter{
  opacity: 0.92;
}

.note{
  margin-top: 10px;
  color: rgba(255,255,255,0.72);
  font-size: 0.95rem;
}

.format-box{
  margin-top: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 12px;
}

.format-box p{
  margin: 10px 0 6px 0;
}

.format-box p:first-child{
  margin-top: 0;
}

@media (max-width: 720px){
  .rules-grid{
    grid-template-columns: 1fr;
  }
}

