/* ====================
   Theme Tokens
   Global CSS variables used across all pages.
   ==================== */
:root {
  /* BRAND PALETTE (primary controls) */
  --brand-brown: #1a1208;
  --brand-blue: #78aee8;
  --brand-yellow: #e2bc56;
  --brand-brown-soft: #3a2812;
  --brand-blue-deep: #2F1E1B;
  --brand-yellow-rgb: 226, 188, 86;
  --brand-blue-rgb: 120, 174, 232;

  /* MAIN BACKGROUND COLORS */
  /* Change these first for overall app color scheme */
  --bg: var(--brand-brown);
  --bg-soft: var(--brand-blue-deep);
  --panel: rgba(16, 35, 64, 0.85);

  /* BORDERS + ACCENT COLORS */
  /* --gold is the main highlight color used in headings/chips */
  /* --mint is a secondary accent used in highlights */
  --line: rgba(var(--brand-yellow-rgb), 0.35);
  --gold: var(--brand-yellow);
  --mint: var(--brand-blue);
  --danger: #ff6f6f;
  --panel-strong: rgba(9, 20, 37, 0.86);
  --panel-soft: rgba(255, 255, 255, 0.045);
  --surface-highlight: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  --shadow-premium: 0 24px 60px rgba(3, 7, 14, 0.48);

  /* TEXT COLORS */
  /* --text = default text, --muted = lighter secondary text */
  --text: #f4f2e9;
  --muted: #b9c2d3;
}

body.team-theme-tom {
  /* Team color overrides when TOM is logged in */
  --gold: #ff6b6b;
  --mint: #ff9aa2;
  --line: rgba(255, 107, 107, 0.45);
}

body.team-theme-den {
  /* Team color overrides when DEN is logged in */
  --gold: #6fa8ff;
  --mint: #8fd3ff;
  --line: rgba(111, 168, 255, 0.45);
}

body.team-theme-chris {
  /* Team color overrides when CHRIS is logged in */
  --gold: #ffd84d;
  --mint: #ffe992;
  --line: rgba(255, 216, 77, 0.45);
}

body.team-theme-craig {
  /* Team color overrides when CRAIG is logged in */
  --gold: #b48cff;
  --mint: #d1b3ff;
  --line: rgba(180, 140, 255, 0.45);
}

body.team-theme-tyler {
  /* Team color overrides when TYLER is logged in */
  --gold: #5fd37b;
  --mint: #8ae9a2;
  --line: rgba(95, 211, 123, 0.45);
}

/* ====================
   Home Split Page
   Landing page with two full-side actions:
   - Draft (left)
   - My Squad (right)
   ==================== */
body.home-split-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 10%, rgba(var(--brand-yellow-rgb), 0.13), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(var(--brand-blue-rgb), 0.14), transparent 35%),
    linear-gradient(160deg, var(--brand-brown), var(--brand-blue-deep) 45%, var(--brand-brown-soft));
  color: #f4f2e9;
}

.home-split-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.7rem, 1.6vw, 1.35rem);
  padding: clamp(0.8rem, 1.6vw, 1.35rem);
}

.home-split-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(1.4rem, 4vw, 3rem);
  text-decoration: none;
  color: #f4f2e9;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 32px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow-premium);
  transition: transform 0.28s ease, filter 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.home-split-card h1 {
  font-size: clamp(2rem, 5vw, 4.6rem);
  margin: 0.35rem 0 0.8rem;
  letter-spacing: 0.11em;
  font-family: "Cinzel", serif;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.home-split-card p {
  margin: 0;
  max-width: 34ch;
  color: rgba(244, 242, 233, 0.88);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.6;
}

.home-split-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.84);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.home-split-meta {
  margin-top: 1.15rem;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.home-split-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 42%),
    radial-gradient(circle at 50% 120%, rgba(255, 255, 255, 0.18), transparent 42%);
  opacity: 0.72;
}

.home-split-card::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  pointer-events: none;
}

.home-split-card:hover,
.home-split-card:focus-visible {
  transform: translateY(-4px) scale(1.01);
  filter: brightness(1.06);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 30px 70px rgba(2, 6, 14, 0.52), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.draft-side {
  background:
    radial-gradient(circle at 15% 20%, rgba(94, 154, 255, 0.4), transparent 40%),
    linear-gradient(160deg, #143b7a, #0c2760 52%, #07183b);
}

.squad-side {
  background:
    radial-gradient(circle at 80% 20%, rgba(181, 129, 79, 0.36), transparent 42%),
    linear-gradient(160deg, #5a371d, #3f2511 52%, #241408);
}

@media (max-width: 860px) {
  .home-split-wrap {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }
}

body:not(.squads-page)[class*="team-theme-"] .panel,
body:not(.squads-page)[class*="team-theme-"] .squad-box,
body:not(.squads-page)[class*="team-theme-"] .active-player-card,
body:not(.squads-page)[class*="team-theme-"] .auction-highlight-grid article,
body:not(.squads-page)[class*="team-theme-"] .market-item {
  background: rgba(6, 6, 6, 0.9);
  border-color: var(--line);
}

body:not(.squads-page)[class*="team-theme-"] h2,
body:not(.squads-page)[class*="team-theme-"] h3,
body:not(.squads-page)[class*="team-theme-"] label,
body:not(.squads-page)[class*="team-theme-"] .muted-note,
body:not(.squads-page)[class*="team-theme-"] .highlight-value {
  color: var(--gold);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(var(--brand-yellow-rgb), 0.13), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(var(--brand-blue-rgb), 0.14), transparent 35%),
    linear-gradient(160deg, var(--brand-brown), var(--brand-blue-deep) 45%, var(--brand-brown-soft));
  /* GLOBAL BODY FONT (change app-wide default font here) */
  font-family: "Manrope", sans-serif;
  line-height: 1.45;
  overflow-x: hidden;
}

/* Global animated grain layer for subtle TV-broadcast texture. */
body::after {
  content: "";
  position: fixed;
  inset: -200px;
  pointer-events: none;
  z-index: -1;
  opacity: 0.08;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.35) 0 1px, transparent 1.2px),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.25) 0 1px, transparent 1.2px),
    radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.22) 0 1px, transparent 1.2px);
  background-size: 3px 3px, 4px 4px, 5px 5px;
  animation: broadcastGrainDrift 8s steps(8, end) infinite;
}

@keyframes broadcastGrainDrift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-12px, 8px); }
  50% { transform: translate(10px, -10px); }
  75% { transform: translate(-8px, -6px); }
  100% { transform: translate(0, 0); }
}

body.team-theme-tom {
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 107, 107, 0.16), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(255, 154, 162, 0.14), transparent 35%),
    linear-gradient(160deg, #170708, #2a0d10 45%, #3a151a);
}

body.team-theme-den {
  background:
    radial-gradient(circle at 10% 10%, rgba(111, 168, 255, 0.16), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(143, 211, 255, 0.14), transparent 35%),
    linear-gradient(160deg, #06101e, #0c1f3d 45%, #12335c);
}

body.team-theme-chris {
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 216, 77, 0.2), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(255, 233, 146, 0.16), transparent 35%),
    linear-gradient(160deg, #1b1304, #2b1e08 45%, #3f2c0d);
}

body.team-theme-craig {
  background:
    radial-gradient(circle at 10% 10%, rgba(180, 140, 255, 0.18), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(209, 179, 255, 0.15), transparent 35%),
    linear-gradient(160deg, #12081f, #22103a 45%, #35195b);
}

body.team-theme-tyler {
  background:
    radial-gradient(circle at 10% 10%, rgba(95, 211, 123, 0.16), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(138, 233, 162, 0.14), transparent 35%),
    linear-gradient(160deg, #06180b, #0f2a15 45%, #1a4022);
}

h1,
h2,
h3,
.brand {
  /* DISPLAY FONT for major headings/nav brand */
  font-family: "Cinzel", serif;
  margin: 0;
  letter-spacing: 0.02em;
}

.bg-orb {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.45;
  animation: drift 14s ease-in-out infinite alternate;
}

.orb-a {
  background: rgba(var(--brand-yellow-rgb), 0.8);
  top: -120px;
  left: -140px;
}

.orb-b {
  background: rgba(var(--brand-blue-rgb), 0.78);
  right: -150px;
  bottom: -150px;
  animation-delay: 1s;
}

@keyframes drift {
  from {
    transform: translateY(-8px) scale(1);
  }
  to {
    transform: translateY(20px) scale(1.1);
  }
}

.hero {
  padding: 0.25rem clamp(1rem, 3vw, 3rem) 1.2rem;
  display: flex;
  flex-direction: column;
}

.top-nav {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  margin-bottom: 0.2rem;
  gap: 0.8rem;
}

.top-nav-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown > summary {
  list-style: none;
}

.nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 180px;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(6, 12, 20, 0.96);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.25rem;
  z-index: 20;
}

.nav-dropdown:not([open]) .nav-dropdown-menu {
  display: none;
}

.nav-dropdown[open]:not(:hover):not(:focus-within) .nav-dropdown-menu {
  display: none;
}

.nav-dropdown-item {
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.nav-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.09);
}

.backend-auth {
  display: flex;
  align-items: center;
}

.backend-user-menu {
  position: relative;
}

.backend-user-label {
  list-style: none;
  cursor: pointer;
  user-select: none;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.backend-user-label::-webkit-details-marker {
  display: none;
}

.backend-user-label::after {
  content: " ▾";
  color: var(--gold);
}

.backend-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d4f;
  box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.25);
}

.backend-user-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 190px;
  padding: 0.4rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(6, 12, 20, 0.96);
  box-shadow: var(--shadow);
  display: none;
  gap: 0.35rem;
  z-index: 35;
}

.backend-user-menu-dropdown .btn {
  width: 100%;
}

.backend-notifications {
  width: min(320px, 84vw);
  padding: 0.35rem 0.4rem 0.45rem;
  border: 1px solid rgba(194, 154, 93, 0.25);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
}

.backend-notifications-title {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.backend-notifications-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}

.backend-notifications-item {
  font-size: 0.76rem;
  line-height: 1.25;
}

.backend-notification-link {
  display: block;
  text-decoration: none;
  color: var(--muted);
  padding: 0.3rem 0.35rem;
  border-radius: 7px;
}

.backend-notification-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.trade-offer-popup-card {
  width: min(430px, 94vw);
}

.trade-offer-popup-player {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.75rem 0 1rem;
}

.trade-offer-popup-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.55rem 0 0.35rem;
}

.trade-offer-thumb {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.trade-offer-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trade-offer-thumb-fallback {
  font-size: 0.66rem;
  font-weight: 800;
  color: var(--text);
}

.trade-offer-popup-image {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}

.trade-offer-popup-player-text strong {
  display: block;
  color: var(--text);
}

.trade-offer-popup-player-text span {
  color: var(--muted);
  font-size: 0.86rem;
}

.trade-proposal-row .chip {
  margin-right: 0.35rem;
}

.trade-reaction-btn {
  padding: 0.28rem 0.55rem;
  line-height: 1.2;
  font-size: 0.78rem;
}

.trade-reaction-btn.is-active {
  border-color: rgba(216, 177, 111, 0.75);
  background: rgba(216, 177, 111, 0.16);
  color: #f9e7c7;
}

/* Desktop: open user menu on hover or keyboard focus. */
@media (hover: hover) and (pointer: fine) {
  .backend-user-menu:hover .backend-user-menu-dropdown,
  .backend-user-menu:focus-within .backend-user-menu-dropdown {
    display: grid;
  }
}

/* Mobile/touch: open user menu on tap (details open state). */
@media (hover: none), (pointer: coarse) {
  .backend-user-menu[open] .backend-user-menu-dropdown {
    display: grid;
  }
}

.brand {
  /* LEFT HEADER BRAND SIZE */
  /* Increase/decrease this for "FSB Fantasy..." text size in header */
  font-size: 1.2rem;
  font-weight: 700;
}

/* Keep brand link white in all states (avoid default visited purple). */
a.brand,
a.brand:visited,
a.brand:hover,
a.brand:active,
a.brand:focus-visible {
  color: var(--text);
  text-decoration: none;
}

a.brand {
  display: inline-block;
  transition: transform 0.16s ease, font-weight 0.16s ease, opacity 0.16s ease;
  opacity: 0.96;
}

a.brand:hover,
a.brand:focus-visible {
  font-weight: 800;
  transform: scale(1.03);
}

.top-nav-title {
  /* CENTERED PAGE TITLE IN HEADER ROW */
  /* Main title size for each page */
  margin: 0;
  text-align: center;
  font-size: clamp(1.35rem, 7.5vw, 6rem);
  line-height: 1.1;
  font-family: "Cinzel", serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-compact {
  padding-bottom: 1rem;
}

.hero-content {
  max-width: 760px;
  animation: rise 700ms ease both;
  text-align: center;
  margin: 0 auto;
}

.hero-logo-home {
  margin: 0 auto;
  text-align: center;
}

.home-logo-mark {
  width: 400px;
  height: 148px;
  margin: 0.65rem auto 0.95rem;
  border-radius: 24px;
  border: 2px solid var(--line);
  background:
    radial-gradient(circle at 28% 24%, rgba(216, 177, 111, 0.34), transparent 52%),
    linear-gradient(160deg, rgba(13, 22, 40, 0.94), rgba(6, 10, 18, 0.94));
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  font-family: "Cinzel", serif;
  font-size: 2.7rem;
  letter-spacing: 0.07em;
  color: var(--gold);
}

@keyframes rise {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.kicker {
  /* SMALL UPPER LABEL ABOVE TITLES (e.g. "Season 2026/2027") */
  text-transform: uppercase;
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  margin: 0;
}

.kicker:empty {
  display: none;
}

h1 {
  /* MAIN HEADING SIZE */
  /* Most page title sizing is controlled here */
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  margin: 0.1rem 0 0.5rem;
}

.hero-copy {
  /* SUBTITLE/TAGLINE UNDER MAIN TITLE */
  /* Change this color and spacing if subtitle readability needs tuning */
  max-width: 52ch;
  color: var(--muted);
  margin: 0.5rem 0 0.8rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.72rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  line-height: 1.2;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, filter 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn-primary {
  background: linear-gradient(135deg, #c28a3f, #e2bc56 55%, #f0cf75);
  border-color: rgba(255, 235, 181, 0.45);
  color: #1a1408;
  box-shadow: 0 12px 28px rgba(226, 188, 86, 0.22);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
}

.btn-danger {
  background: rgba(220, 53, 69, 0.18);
  border-color: rgba(255, 99, 110, 0.7);
  color: #ffb3bb;
}

.global-mode-toggle {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 60;
  padding: 0.35rem 0.75rem;
  line-height: 1.6;
  font-size: 0.84rem;
}

#placeBidBtn {
  font-size: 1rem;
}

main {
  padding: 0 clamp(1rem, 3vw, 3rem) 3rem;
  display: grid;
  gap: 1rem;
}

.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-premium);
  padding: 1.08rem;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0.8;
  pointer-events: none;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.season-data-head {
  justify-content: center;
}

.season-data-card {
  cursor: pointer;
}

.season-data-card:hover,
.season-data-card:focus-visible {
  outline: 1px solid var(--line);
  filter: brightness(1.04);
}

#seasonTop50Body {
  max-height: 62vh;
  overflow: auto;
}

.auction-turn-box {
  text-align: right;
}

.auction-turn-box .highlight-label {
  margin: 0.15rem 0;
}

.auction-turn-box .highlight-label span {
  color: var(--gold);
}

.chip {
  border: 1px solid var(--line);
  color: var(--gold);
  border-radius: 999px;
  padding: 0.34rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.04);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

th {
  color: var(--gold);
  font-size: 0.86rem;
}

.league-team-link {
  background: transparent;
  border: none;
  color: var(--gold);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.league-team-link:hover,
.league-team-link:focus-visible {
  filter: brightness(1.1);
}

.league-weekly-link {
  background: transparent;
  border: none;
  color: var(--gold);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.league-weekly-link:hover,
.league-weekly-link:focus-visible {
  filter: brightness(1.1);
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.grid-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card-grid {
  display: grid;
  gap: 0.65rem;
}

.player-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 0.7rem;
}

.player-meta p {
  margin: 0;
}

.player-meta .name {
  font-weight: 800;
}

.player-meta .role {
  color: var(--muted);
  font-size: 0.84rem;
}

.points-pill {
  color: #0f1c31;
  background: var(--mint);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-weight: 800;
}

.fixture-list,
.squad-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fixture-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18rem;
}

.fixture-club-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.fixture-club {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
}

.fixture-club-name {
  white-space: nowrap;
}

.fixture-club-badge,
.fixture-club-badge-fallback {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.fixture-club-badge {
  object-fit: contain;
}

.fixture-club-badge-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 214, 79, 0.18);
  border: 1px solid rgba(255, 214, 79, 0.38);
  color: var(--gold);
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.fixture-vs {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.fixture-time {
  color: var(--gold);
  font-weight: 700;
  text-align: left;
}

.fixture-score-btn {
  border: 1px solid rgba(255, 214, 79, 0.38);
  background: rgba(0, 0, 0, 0.42);
  color: var(--gold);
  border-radius: 8px;
  padding: 0.2rem 0.5rem;
  font-weight: 700;
  cursor: pointer;
}

.fixture-score-btn:hover {
  background: rgba(255, 214, 79, 0.14);
}

.fixture-event-team {
  margin-left: 0.5rem;
  font-size: 0.72rem;
  opacity: 0.8;
}

.transfer-pool-item {
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: #ffffff;
  background: rgba(12, 12, 12, 0.95) !important;
  border-color: var(--line) !important;
}

.transfer-pool-item .market-item-row {
  width: 100%;
}

.transfer-pool-item strong,
.transfer-pool-item span,
.transfer-pool-item .muted-note {
  color: #ffffff;
}

.transfer-pool-item.is-selected {
  outline: 2px solid rgba(255, 214, 79, 0.8);
  background: rgba(255, 214, 79, 0.1);
}

.transfer-controls-row {
  margin-bottom: 0.55rem;
}

.transfer-player-pane {
  margin-top: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.24);
  padding: 0.45rem;
  max-height: 420px;
  overflow: auto;
}

.transfer-player-pool-list {
  margin-top: 0;
}

.player-stats-controls {
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

.player-stats-controls select {
  max-width: 260px;
}

.player-stats-controls input {
  max-width: 340px;
}

.player-stats-groups {
  display: grid;
  gap: 0.8rem;
}

.player-stats-groups .market-list {
  overflow-x: auto;
}

.player-stats-grid-header,
.player-stats-grid-row {
  display: grid;
  grid-template-columns: minmax(220px, 2.4fr) repeat(10, minmax(52px, 1fr));
  gap: 0.45rem;
  align-items: center;
  min-width: 860px;
}

.player-stats-grid-header {
  padding: 0.2rem 0.55rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.player-stats-sort-btn {
  border: 0;
  background: transparent;
  color: var(--gold);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

.player-stats-sort-btn:hover {
  color: #fff;
}

.player-stats-grid-row {
  width: 100%;
}

.player-stats-col {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.82rem;
}

.player-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.free-agent-card {
  background: rgba(12, 12, 12, 0.95) !important;
  border-color: var(--line) !important;
  color: #ffffff !important;
}

body:not(.squads-page)[class*="team-theme-"] .market-item.free-agent-card {
  background: rgba(12, 12, 12, 0.95) !important;
  border-color: var(--line) !important;
}

.free-agent-card strong,
.free-agent-card span,
.free-agent-card .muted-note,
.free-agent-card .market-drafted-note {
  color: #ffffff !important;
}

.builder-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1rem;
}

label {
  font-size: 0.85rem;
  color: var(--muted);
}

select {
  margin-top: 0.35rem;
  width: 100%;
  padding: 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(12, 12, 12, 0.95);
  color: #ffffff;
}

select option {
  background: #101010;
  color: #ffffff;
}

select:focus {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 1px;
}

input {
  margin-top: 0.35rem;
  width: 100%;
  padding: 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.market-list {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.55rem;
}

.pool-filter-row {
  margin-top: 0.4rem;
  margin-bottom: 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.pool-filter-panel {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(140px, 220px);
  gap: 0.55rem 0.75rem;
  align-items: end;
}

.pool-sort-wrap {
  display: grid;
  grid-template-columns: minmax(160px, 240px);
  gap: 0.35rem;
  justify-items: start;
}

.market-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.55rem;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.market-item-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.8fr) minmax(58px, 0.6fr) minmax(145px, 1.5fr) minmax(72px, 0.7fr);
  align-items: center;
  column-gap: 0.7rem;
  min-width: 0;
  flex: 1 1 620px;
}

.market-col {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.player-name-with-alert {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  overflow: visible;
  position: relative;
  z-index: 2;
}

.player-col strong,
.team-col span,
.position-col span,
.points-col span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.position-col {
  justify-content: flex-start;
}

.team-col {
  justify-content: flex-start;
}

.points-col {
  justify-content: flex-start;
  color: var(--gold);
  font-weight: 700;
}

.availability-alert {
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 12px solid #95a5a6;
  display: inline-block;
  margin-left: 0.15rem;
  cursor: help;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
  position: relative;
  z-index: 3;
}

.availability-alert.ok {
  border-bottom-color: #7f8c8d;
}

.availability-alert.medium {
  border-bottom-color: #f39c12;
}

.availability-alert.high {
  border-bottom-color: #e74c3c;
}

.availability-alert[data-tooltip]:hover::after,
.availability-alert[data-tooltip]:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  min-width: 180px;
  max-width: 300px;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: rgba(8, 10, 16, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f5f7ff;
  font-size: 0.72rem;
  line-height: 1.25;
  white-space: normal;
  z-index: 9999;
  pointer-events: none;
}

.availability-alert[data-tooltip]:hover,
.availability-alert[data-tooltip]:focus-visible {
  z-index: 9999;
}

.my-squad-player-name-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  overflow: visible;
  position: relative;
  z-index: 3;
}

.drafted-name-with-alert {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.trade-player-card {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0.5rem;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(12, 12, 16, 0.7);
  color: #fff;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
}

.trade-player-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.45) inset;
}

.trade-player-meta {
  min-width: 0;
  display: grid;
  gap: 0.6rem;
  text-align: left;
}

.trade-player-meta strong,
.trade-player-meta span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trade-player-meta span {
  color: var(--muted);
  font-size: 0.78rem;
}

#tradeCashSlider {
  width: 100%;
}

.trade-drop-zone {
  min-height: 74px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  padding: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  background: rgba(12, 12, 16, 0.35);
}

.trade-pill {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(22, 26, 40, 0.85);
  color: #fff;
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.trade-pill.cash {
  border-color: rgba(212, 175, 55, 0.5);
  color: var(--gold);
}

/* Trade cash chip: larger readable pill with stacked-coin image and year clarity. */
.trade-cash-chip-row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.trade-cash-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 72px;
  padding: 0.45rem 1rem 0.45rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(135deg, rgba(8, 18, 36, 0.96), rgba(6, 14, 30, 0.96));
  color: #f4f6ff;
}

.trade-cash-chip.is-current-year {
  border-color: rgba(216, 177, 111, 0.7);
  box-shadow: inset 0 0 0 1px rgba(216, 177, 111, 0.25);
}

.trade-cash-chip.is-next-year {
  border-color: rgba(125, 227, 193, 0.7);
  box-shadow: inset 0 0 0 1px rgba(125, 227, 193, 0.25);
}

.trade-cash-chip-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45));
  margin-left: 0.05rem;
}

.trade-cash-chip-copy {
  display: grid;
  gap: 0.12rem;
  text-align: left;
}

.trade-cash-chip-title {
  font-size: 0.72rem;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #c7d3f3;
  text-transform: uppercase;
}

.trade-cash-chip-sub {
  font-size: 1.18rem;
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: #f2f6ff;
}

.trade-cash-chip .trade-pill-remove {
  margin-left: 0.2rem;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  line-height: 1;
  color: #f5f7ff;
  background: rgba(255, 255, 255, 0.07);
}

.trade-cash-token {
  border: 1px solid rgba(212, 175, 55, 0.6);
  color: var(--gold);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  cursor: grab;
  user-select: none;
  font-weight: 700;
  background: rgba(212, 175, 55, 0.08);
}

.trade-cash-control {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.45rem;
}

.trade-cash-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.trade-cash-slider-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  flex-wrap: wrap;
}

.trade-cash-input {
  width: min(100%, 260px);
}

.trade-cash-help {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
}

.trade-cash-value-chip {
  cursor: pointer;
  background: #000;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.trade-cash-value-chip:hover,
.trade-cash-value-chip:focus-visible {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.my-week-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.35rem 0 0.75rem;
}

.mw-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.75);
  color: #efe8ff;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
}

.mw-nav-btn:hover,
.mw-nav-btn:focus-visible {
  border-color: var(--gold);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(216, 177, 111, 0.3);
}

.matchweek-chip {
  min-width: 220px;
  border-radius: 12px;
  padding: 0.35rem 0.85rem 0.42rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.78);
  display: grid;
  justify-items: center;
  gap: 0.08rem;
}

.matchweek-title {
  color: #ffffff;
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.05;
}

.matchweek-dates {
  color: #d8d2e9;
  font-size: 0.96rem;
  line-height: 1.1;
}

.trade-proposal-row {
  display: grid;
  gap: 0.4rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.trade-proposal-row:last-child {
  border-bottom: 0;
}

.trade-proposal-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
}

.squad-player-menu {
  position: fixed;
  z-index: 120;
  min-width: 230px;
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(6, 12, 20, 0.96);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.25rem;
}

.squad-player-menu button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  font: inherit;
}

.squad-player-menu button:hover {
  background: rgba(255, 255, 255, 0.11);
}

.market-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.market-drafted-note {
  width: 100%;
  margin-top: -0.1rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.team-kit-img,
.player-photo-img {
  width: 34px;
  height: 34px;
  object-fit: cover;
}

.team-kit-img {
  border-radius: 999px;
}

.player-photo-img {
  border-radius: 6px;
  object-position: center top;
}

.player-photo-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  display: inline-block;
}

.player-photo-wrap .player-photo-img {
  width: 34px;
  height: 34px;
}

.player-photo-wrap .player-avatar-fallback {
  position: absolute;
  inset: 0;
}

.player-avatar-fallback {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.team-kit-img.placeholder,
.player-photo-img.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.market-item button {
  background: rgba(125, 227, 193, 0.14);
  border: 1px solid rgba(125, 227, 193, 0.45);
  color: var(--mint);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-weight: 700;
  cursor: pointer;
}

.market-item button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.market-dots-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.market-dots-btn:hover {
  filter: brightness(1.1);
}

.squad-box {
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem;
}

.my-squad-pitch {
  display: grid;
  gap: 0.75rem;
  overflow-x: visible;
  padding-bottom: 0.35rem;
}

.team-selection-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 1rem;
  align-items: start;
}

.weekly-fixtures-panel {
  position: static;
}

body.my-squad-page .hero {
  padding-top: 0.8rem;
}

body.my-squad-page .top-nav {
  padding: 0.95rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(5, 13, 24, 0.44);
  box-shadow: 0 16px 40px rgba(2, 6, 12, 0.34);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body.my-squad-page .top-nav-actions {
  gap: 0.7rem;
}

.my-squad-hero-copy {
  margin-left: auto;
  margin-right: auto;
}

.my-squad-tabs-panel {
  padding: 0.7rem 0.85rem;
}

.my-squad-tabs-row {
  justify-content: flex-start;
  gap: 0.75rem;
}

.my-squad-tabs-row .btn {
  min-width: 136px;
  background: rgba(255, 255, 255, 0.04);
}

.my-squad-tabs-row .btn.btn-primary {
  background: linear-gradient(135deg, #f0cf75, #f6df9a 55%, #fff2c7);
  border-color: rgba(255, 243, 201, 0.72);
  color: #211506;
  box-shadow:
    0 12px 26px rgba(226, 188, 86, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.weekly-fixtures-panel {
  background:
    linear-gradient(180deg, rgba(120, 174, 232, 0.12), rgba(255, 255, 255, 0.015)),
    var(--panel-strong);
}

.my-squad-submit-row {
  justify-content: flex-start;
}

.my-squad-submit-row .btn-primary {
  min-width: 170px;
}

.formation-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.formation-control {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  background: rgba(0, 0, 0, 0.25);
}

.formation-control strong {
  min-width: 1.1rem;
  text-align: center;
}

.formation-step-btn {
  min-width: 2rem;
  padding: 0.25rem 0.55rem;
  line-height: 1.2;
}

.my-squad-pitch-board {
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  padding: 1.2rem 0.9rem 1.4rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0 auto;
  clip-path: polygon(13% 0, 87% 0, 100% 100%, 0 100%);
  background:
    radial-gradient(circle at 50% 52%, rgba(255, 255, 255, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015)),
    repeating-linear-gradient(
      0deg,
      rgba(17, 172, 88, 0.97) 0,
      rgba(17, 172, 88, 0.97) 60px,
      rgba(12, 155, 76, 0.99) 60px,
      rgba(12, 155, 76, 0.99) 120px
    );
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 18px 42px rgba(4, 14, 8, 0.34);
}

.my-squad-pitch-board::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 3px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  clip-path: polygon(13% 0, 87% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

.my-squad-pitch-board::after {
  content: none;
}

.pitch-hoarding {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 6px;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0.95;
}

.hoarding-top {
  top: 18px;
  left: 16%;
  right: 16%;
  height: 34px;
  font-size: 0.72rem;
  background: linear-gradient(90deg, #3a7dff, #2ac7ff 48%, #3a7dff);
}

.hoarding-left,
.hoarding-right {
  top: 58px;
  bottom: 18px;
  width: 28px;
  font-size: 0.66rem;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  background: linear-gradient(180deg, #5c2cf0, #2f58f6 55%, #1496ff);
}

.hoarding-left {
  left: 8px;
}

.hoarding-right {
  right: 8px;
}

.pitch-markings {
  position: absolute;
  inset: 16px;
  z-index: 1;
  pointer-events: none;
}

.pitch-markings .mark {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-color: rgba(255, 255, 255, 0.9);
  border-style: solid;
}

.pitch-markings .penalty-box {
  top: 6%;
  width: 52%;
  height: 30%;
  border-width: 3px;
  border-top: 0;
}

.pitch-markings .six-yard-box {
  top: 6%;
  width: 24%;
  height: 14%;
  border-width: 3px;
  border-top: 0;
}

.pitch-markings .penalty-spot {
  top: 27%;
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
}

.pitch-markings .penalty-arc {
  top: 30%;
  width: 22%;
  height: 13%;
  border-width: 3px;
  border-top: 0;
  border-radius: 0 0 120px 120px;
}

.my-squad-pitch-board .row-3::after {
  content: none;
}

.my-squad-pitch-row {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-evenly;
  gap: 0.5rem;
  flex-wrap: nowrap;
  margin: 0.58rem auto;
}

.my-squad-pitch-row.row-0 {
  width: 42%;
  margin-top: 0.2rem;
}

.my-squad-pitch-row.row-1 {
  width: 82%;
}

.my-squad-pitch-row.row-2 {
  width: 94%;
}

.my-squad-pitch-row.row-3 {
  width: 78%;
  margin-bottom: 1rem;
}

.pitch-slot {
  width: 86px;
  min-width: 86px;
  min-height: 142px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.45);
  background: rgba(7, 70, 33, 0.26);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem;
}

.pitch-slot.has-player {
  border-style: solid;
  background: rgba(0, 0, 0, 0.16);
}

.pitch-slot.slot-locked {
  opacity: 0.45;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(40, 40, 40, 0.35);
}

.my-squad-pitch.is-dragging .pitch-slot {
  opacity: 0.26;
  transition: opacity 120ms ease, box-shadow 120ms ease, border-color 120ms ease, background 120ms ease;
}

.my-squad-pitch.is-dragging .pitch-slot.drag-slot-available {
  opacity: 1;
  border-color: rgba(123, 255, 201, 0.9);
  box-shadow: 0 0 0 2px rgba(123, 255, 201, 0.28), 0 0 16px rgba(123, 255, 201, 0.28);
  background: rgba(12, 108, 52, 0.42);
}

.my-squad-pitch.is-dragging .pitch-slot.drag-slot-dim.slot-locked {
  opacity: 0.2;
}

.pitch-slot-empty {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
}

.my-squad-player-card {
  width: 78px;
  display: grid;
  justify-items: center;
  gap: 0.18rem;
  cursor: grab;
  user-select: none;
}

.my-squad-player-card:active {
  cursor: grabbing;
}

.my-squad-player-photo-wrap {
  width: 72px;
  height: 86px;
  position: relative;
}

.my-squad-player-img,
.my-squad-player-photo-wrap .player-avatar-fallback {
  width: 72px;
  height: 86px;
}

.my-squad-player-img {
  border-radius: 6px;
  object-fit: cover;
}

.my-squad-player-photo-wrap .player-avatar-fallback {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(22, 29, 37, 0.8);
  font-size: 1rem;
  font-weight: 800;
}

.my-squad-player-nameplate {
  min-width: 88px;
  max-width: 92px;
  border-radius: 9px 9px 6px 6px;
  border: 1px solid rgba(116, 255, 191, 0.45);
  background:
    linear-gradient(180deg, rgba(19, 35, 56, 0.96), rgba(12, 23, 39, 0.94)),
    radial-gradient(circle at 20% 0, rgba(93, 240, 183, 0.22), transparent 55%);
  padding: 0.2rem 0.28rem;
  box-shadow:
    0 7px 14px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.my-squad-player-name {
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.1;
  font-weight: 800;
  color: #ecfff4;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.38);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-squad-player-week {
  text-align: center;
  min-width: 88px;
  max-width: 92px;
  border-radius: 6px 6px 10px 10px;
  border: 1px solid rgba(126, 224, 255, 0.5);
  border-top: 0;
  padding: 0.16rem 0.2rem;
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #d8f8ff;
  background:
    linear-gradient(180deg, rgba(18, 58, 79, 0.94), rgba(12, 37, 54, 0.96)),
    radial-gradient(circle at 80% 0, rgba(91, 220, 255, 0.22), transparent 60%);
  box-shadow:
    0 6px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  text-decoration: underline dotted rgba(216, 248, 255, 0.75);
}

@media (max-width: 900px) {
  .team-selection-layout {
    grid-template-columns: 1fr;
  }

  .weekly-fixtures-panel {
    position: static;
  }

  .my-squad-pitch-board {
    clip-path: none;
    min-width: 0;
    max-width: 100%;
  }

  .my-squad-pitch-board::before {
    clip-path: none;
    inset: 10px;
  }

  .my-squad-pitch-row.row-0,
  .my-squad-pitch-row.row-1,
  .my-squad-pitch-row.row-2,
  .my-squad-pitch-row.row-3 {
    width: 100%;
  }

  .my-squad-bench {
    min-width: 0;
    max-width: 100%;
  }

  .hoarding-left,
  .hoarding-right {
    display: none;
  }

  .hoarding-top {
    left: 10%;
    right: 10%;
  }
}

.my-squad-bank {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem;
  background: rgba(0, 0, 0, 0.28);
}

.my-squad-bench {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  padding: 0.7rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)),
    repeating-linear-gradient(
      0deg,
      rgba(17, 172, 88, 0.85) 0,
      rgba(17, 172, 88, 0.85) 34px,
      rgba(12, 155, 76, 0.88) 34px,
      rgba(12, 155, 76, 0.88) 68px
    );
}

.my-squad-bench-grid {
  display: grid;
  grid-template-columns: repeat(4, 86px);
  justify-content: center;
  gap: 0.5rem;
}

.bench-slot {
  width: 100px;
  min-width: 100px;
  min-height: 148px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.45);
  background: rgba(7, 70, 33, 0.26);
  padding: 0.28rem;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.3rem;
}

.bench-slot.has-player {
  border-style: solid;
  background: rgba(0, 0, 0, 0.16);
}

.bench-label {
  font-size: 0.74rem;
  font-weight: 800;
  color: #f3fff8;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.03em;
}

.my-squad-bank-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.6rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.my-squad-bank-one-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.3rem;
  scrollbar-width: thin;
}

.my-squad-bank-inline-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.6rem;
}

.my-squad-bank-inline-group .my-squad-player-card {
  flex: 0 0 auto;
}

.bank-pos-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 0.18rem 0.5rem;
  margin: 0 0 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--gold);
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.bank-empty {
  min-width: 130px;
  padding: 0.38rem 0.5rem;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.drafted-squads-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

body.squads-page {
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.08), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.06), transparent 35%),
    linear-gradient(160deg, #050505, #101010 45%, #191919);
}

body.squads-page .bg-orb {
  opacity: 0.22;
  filter: blur(95px) grayscale(1);
}

body.squads-page .panel {
  background: rgba(10, 10, 10, 0.88);
  border-color: rgba(255, 255, 255, 0.22);
}

body.squads-page .chip {
  color: #f0f0f0;
  border-color: rgba(255, 255, 255, 0.35);
}

body.squads-page .highlight-label,
body.squads-page .muted-note {
  color: #cfcfcf;
}

body.squads-page .highlight-timer {
  color: #f2f2f2;
}

body.squads-page .team-card {
  border-width: 2px;
}

body.squads-page .team-card h3 {
  letter-spacing: 0.03em;
}

body.squads-page .team-card-tom {
  border-color: rgba(255, 107, 107, 0.8);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.35);
}

body.squads-page .team-card-tom h3 {
  color: #ff7b7b;
}

body.squads-page .team-card-den {
  border-color: rgba(111, 168, 255, 0.8);
  box-shadow: inset 0 0 0 1px rgba(111, 168, 255, 0.35);
}

body.squads-page .team-card-den h3 {
  color: #82b7ff;
}

body.squads-page .team-card-chris {
  border-color: rgba(255, 216, 77, 0.85);
  box-shadow: inset 0 0 0 1px rgba(255, 216, 77, 0.35);
}

body.squads-page .team-card-chris h3 {
  color: #ffe168;
}

body.squads-page .team-card-craig {
  border-color: rgba(180, 140, 255, 0.85);
  box-shadow: inset 0 0 0 1px rgba(180, 140, 255, 0.35);
}

body.squads-page .team-card-craig h3 {
  color: #c4a0ff;
}

body.squads-page .team-card-tyler {
  border-color: rgba(95, 211, 123, 0.85);
  box-shadow: inset 0 0 0 1px rgba(95, 211, 123, 0.35);
}

body.squads-page .team-card-tyler h3 {
  color: #78df93;
}

.squad-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* My Squad: Player News should read like text rows, not split flex rows. */
#mySquadNewsList li {
  display: block;
  text-align: left;
}

.squad-list li.position-marker {
  margin-top: 0.35rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.squad-list li.position-empty {
  color: var(--muted);
  font-size: 0.84rem;
}

.my-squad-points-link {
  cursor: pointer;
  color: var(--gold);
  text-decoration: underline dotted rgba(216, 177, 111, 0.8);
}

.remove-btn {
  border: 0;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
}

.squad-metrics {
  margin: 0.8rem 0;
  color: var(--muted);
}

.squad-metrics p {
  margin: 0.3rem 0;
}

.auth-form {
  display: grid;
  gap: 0.55rem;
  max-width: 460px;
}

.status-text {
  margin: 0.7rem 0 0;
  color: var(--mint);
  font-weight: 600;
}

.error-text {
  color: var(--danger);
}

.muted-note {
  color: var(--muted);
  margin: 0.65rem 0 0;
}

.active-player-card {
  margin-top: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.2);
}

.active-player-card p {
  margin: 0.3rem 0;
  color: var(--muted);
}

.nominated-player-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.nominated-player-head h3 {
  margin: 0;
}

.nomination-order-list {
  margin-top: 0.7rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.nomination-order-item {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.nomination-order-item.is-current {
  border-color: rgba(216, 177, 111, 0.6);
  color: var(--gold);
  background: rgba(216, 177, 111, 0.15);
}

.nomination-order-item.is-me {
  box-shadow: inset 0 0 0 1px rgba(125, 227, 193, 0.45);
}

.bid-controls {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.55rem;
}

#bidInput {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.manager-board,
.draft-log {
  margin: 0;
  padding: 0;
  list-style: none;
}

.manager-board li,
.draft-log li {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.manager-board p {
  margin: 0.25rem 0;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 1rem;
}

/* Cross-page first-signing celebration overlay and card visuals. */
.first-signing-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 10, 20, 0.72);
  backdrop-filter: blur(2px);
  z-index: 75;
  padding: 1rem;
}

.first-signing-card {
  width: min(92vw, 520px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(8, 10, 14, 0.96);
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  padding: 0;
  text-align: center;
  overflow: hidden;
}

.walkout-card {
  position: relative;
}

.walkout-lights {
  position: absolute;
  inset: -20% -10%;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.55), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.5), transparent 32%),
    linear-gradient(110deg, rgba(255, 255, 255, 0.2), transparent 25%, rgba(255, 255, 255, 0.18) 52%, transparent 78%);
  opacity: 0;
  pointer-events: none;
}

.first-signing-image-strip {
  width: 100%;
  min-height: 170px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.2)),
    url("assets/breaking-news-overlay.png") center/cover no-repeat,
    linear-gradient(90deg, #f9dc3e, #e6b316 45%, #f6d02c);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.walkout-banner {
  filter: saturate(1.15) contrast(1.02);
}

.first-signing-content {
  padding: 0.85rem 0.9rem 0.95rem;
  background: rgba(5, 9, 16, 0.94);
}

.first-signing-head-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.first-signing-badge-image {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.35rem;
}

.first-signing-badge-fallback {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: linear-gradient(135deg, rgba(88, 30, 140, 0.95), rgba(25, 96, 184, 0.95));
  color: #f7f9ff;
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.first-signing-card h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #ffffff;
}

.first-signing-player {
  margin: 0.8rem auto 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
}

.first-signing-player-photo-wrap {
  width: 72px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
}

.walkout-photo-wrap {
  overflow: visible;
}

.first-signing-player-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.first-signing-player-photo-wrap .player-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #2f6af8, #8c3ce6);
}

.first-signing-player-meta p {
  margin: 0;
  text-align: left;
}

.first-signing-player-meta p:first-child {
  color: #f6f8ff;
  font-weight: 800;
}

.first-signing-player-meta p:last-child {
  color: #9de9ff;
  font-size: 0.95rem;
  font-weight: 700;
}

.first-signing-team {
  margin: 0.3rem 0 0;
  color: #d9ebff;
}

.walkout-signed-for {
  margin: 0.3rem 0 0;
  color: #ffe389;
  font-weight: 900;
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateY(8px);
}

.first-signing-overlay.is-playing .first-signing-card {
  animation: firstSigningBreakingIn 0.7s cubic-bezier(0.2, 0.92, 0.2, 1) both;
}

.first-signing-overlay.is-playing .walkout-lights {
  animation: walkoutLightsFlash 1.1s ease-in-out 2;
}

.first-signing-overlay.is-playing .walkout-badge,
.first-signing-overlay.is-playing .walkout-badge-fallback {
  animation: walkoutBadgeSpinIn 760ms cubic-bezier(0.15, 0.88, 0.2, 1) both;
}

.first-signing-overlay.is-playing .walkout-player-image,
.first-signing-overlay.is-playing .walkout-player-fallback {
  animation: walkoutPlayerIn 900ms cubic-bezier(0.18, 0.92, 0.2, 1) both;
}

.first-signing-overlay.is-playing .walkout-signed-for {
  animation: walkoutSignedIn 620ms ease forwards;
  animation-delay: 540ms;
}

@keyframes firstSigningBreakingIn {
  0% {
    transform: translateY(26px) scale(0.9);
    opacity: 0;
    filter: blur(4px);
  }
  60% {
    transform: translateY(0) scale(1.02);
    opacity: 1;
    filter: blur(0);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: blur(0);
  }
}

.modal-card {
  width: min(460px, 95vw);
  background: rgba(10, 10, 10, 0.95);
  border: 5px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.player-details-modal-card {
  width: min(900px, 96vw);
  max-height: 86vh;
  overflow: auto;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.player-details-body {
  display: grid;
  gap: 0.7rem;
}

.player-details-head {
  display: grid;
  justify-content: flex-end;
}

.player-details-avatar .player-photo-wrap,
.player-details-avatar .player-photo-wrap .player-photo-img,
.player-details-avatar .player-avatar-fallback {
  width: 100px;
  height: 100px;
}

.player-details-avatar .player-avatar-fallback {
  font-size: 1.05rem;
}

.player-details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.player-details-stat {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
}

.player-details-stat p {
  margin: 0;
}

.player-details-stat .label {
  font-size: 0.74rem;
  color: var(--muted);
}

.player-details-stat .value {
  font-size: 0.95rem;
  color: var(--gold);
  font-weight: 700;
}

.player-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.player-history-table th,
.player-history-table td {
  padding: 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

/* Previous Winners page: compact 5-slot history layout. */
.winners-slots-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.winner-slot-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(7, 14, 27, 0.52);
  padding: 0.75rem;
}

.winner-slot-head h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.winner-slot-main-line {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  line-height: 1.35;
}

.winner-slot-mini-list {
  display: grid;
  gap: 0.3rem;
}

.winner-slot-mini-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  opacity: 0.92;
}

/* Previous winners table hierarchy: winner > runner-up > 3rd/4th/5th. */
.winners-cell-winner {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.winners-cell-runner {
  font-size: 0.92rem;
  font-weight: 700;
  opacity: 0.95;
}

.winners-cell-place {
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.9;
}

@keyframes walkoutLightsFlash {
  0% { opacity: 0; }
  20% { opacity: 0.9; }
  45% { opacity: 0.15; }
  70% { opacity: 0.75; }
  100% { opacity: 0; }
}

@keyframes walkoutBadgeSpinIn {
  0% { transform: rotate(-220deg) scale(0.2); opacity: 0; }
  65% { transform: rotate(14deg) scale(1.08); opacity: 1; }
  100% { transform: rotate(0deg) scale(1); opacity: 1; }
}

@keyframes walkoutPlayerIn {
  0% { transform: translateX(-120%) scale(0.88); opacity: 0; }
  70% { transform: translateX(8%) scale(1.03); opacity: 1; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes walkoutSignedIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Team-week popup formation layout (league table team-name modal). */
.team-week-pitch {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 0.6rem;
  background:
    linear-gradient(180deg, rgba(18, 122, 63, 0.92), rgba(12, 96, 49, 0.95));
}

.team-week-board {
  display: grid;
  gap: 0.55rem;
}

.team-week-title-row {
  text-align: center;
}

.team-week-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  width: 100%;
  margin: 0 auto;
}

.team-week-row-gk {
  max-width: 18%;
}

.team-week-row-def {
  max-width: 74%;
}

.team-week-row-mid {
  max-width: 88%;
}

.team-week-row-fwd {
  max-width: 62%;
}

.team-week-player-card {
  width: 92px;
  min-width: 92px;
  display: grid;
  justify-items: center;
  align-items: start;
  gap: 0.15rem;
}

.team-week-player-name,
.team-week-player-points {
  text-align: center;
  width: 100%;
  margin: 0;
}

.team-week-bench {
  margin-top: 0.7rem;
}

@media (max-width: 860px) {
  .team-week-row,
  .team-week-row-gk,
  .team-week-row-def,
  .team-week-row-mid,
  .team-week-row-fwd {
    max-width: 100%;
    flex-wrap: wrap;
  }
}

/* Shared live-auction summary card used on Home/Shortlist/Admin pages. */
.auction-highlight {
  border-color: rgba(125, 227, 193, 0.5);
  background:
    linear-gradient(130deg, rgba(125, 227, 193, 0.12), rgba(216, 177, 111, 0.12)),
    rgba(15, 28, 49, 0.9);
}

.auction-highlight-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.55fr) minmax(120px, 0.7fr) minmax(150px, 1fr) minmax(130px, 0.85fr);
  gap: 0.8rem;
}

.auction-highlight-grid article {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.8rem;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.live-auction-hero {
  position: relative;
  width: 100%;
  min-height: 170px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(8, 26, 59, 0.9), rgba(6, 20, 47, 0.9)),
    rgba(255, 255, 255, 0.04);
  overflow: hidden;
  padding: 0.5rem 0.7rem 2.9rem;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.live-auction-hero-name {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(1.2rem, 2.5vw, 2.15rem);
  line-height: 0.95;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(214, 224, 245, 0.52);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 0.5rem;
}

.live-auction-hero-photo {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  height: 150px;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: bottom center;
}

.live-auction-hero-fallback {
  position: absolute;
  left: 50%;
  bottom: 0.6rem;
  transform: translateX(-50%);
  width: 84px;
  height: 84px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  color: #f0f4ff;
  background: rgba(255, 255, 255, 0.18);
}

.live-auction-hero-team,
.live-auction-hero-pos {
  position: absolute;
  bottom: 0.6rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: rgba(207, 220, 247, 0.58);
}

.live-auction-hero-team { left: 0.7rem; }
.live-auction-hero-pos { right: 0.7rem; }

.transfer-manager-status-list {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.transfer-manager-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.8rem;
  font-weight: 700;
}

.transfer-manager-status-chip.is-bidding {
  border-color: rgba(56, 214, 132, 0.7);
  color: #9ef2c4;
}

.transfer-manager-status-chip.is-out {
  border-color: rgba(255, 91, 91, 0.75);
  color: #ffb0b0;
}

.transfer-active-rounds-list {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.7rem;
}

.transfer-round-card {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  padding: 0.75rem 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.9rem;
}

.transfer-round-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 45%, transparent);
}

.transfer-round-card-main {
  display: grid;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
}

.transfer-round-card-main span {
  font-size: 0.82rem;
  opacity: 0.92;
}

.transfer-round-card-actions {
  display: grid;
  gap: 0.45rem;
  min-width: 92px;
  flex: 0 0 auto;
}

.transfer-card-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
}

.transfer-player-hero {
  position: relative;
  width: 100%;
  min-height: 190px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, #081a3b, #06142f);
  overflow: hidden;
  padding: 0.55rem 0.75rem 3.8rem;
}

.transfer-player-hero-name {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(1.6rem, 3.2vw, 3rem);
  line-height: 0.92;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(214, 224, 245, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 1.5rem;
}

.transfer-player-hero-photo {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  height: 170px;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: bottom center;
  z-index: 2;
}

.transfer-player-hero-fallback {
  position: absolute;
  left: 50%;
  bottom: 0.45rem;
  transform: translateX(-50%);
  width: 92px;
  height: 92px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  color: #f0f4ff;
  background: rgba(255, 255, 255, 0.2);
  z-index: 2;
}

.transfer-player-hero-team,
.transfer-player-hero-pos {
  position: absolute;
  bottom: 0.85rem;
  font-size: 1.9rem;
  font-weight: 800;
  color: rgba(207, 220, 247, 0.52);
  z-index: 1;
}

.transfer-player-hero-team {
  left: 0.75rem;
}

.transfer-player-hero-pos {
  right: 0.75rem;
}

.transfer-player-hero-close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.45);
  color: #f5f7ff;
  font-size: 0.78rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.transfer-round-player-photo {
  width: 64px;
  height: 84px;
  object-fit: cover;
  flex: 0 0 auto;
}

.transfer-card-player-text {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  flex: 0 0 auto;
}

.transfer-card-player-text strong {
  font-size: 1.02rem;
  line-height: 1.15;
}

.transfer-card-player-text span {
  font-size: 0.8rem;
  opacity: 0.8;
}

.transfer-card-meta-inline {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 0.45rem;
  margin-left: 0;
  margin-top: 0.6rem;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
}

.transfer-card-meta-inline span {
  display: grid;
  gap: 0.08rem;
  padding: 0.34rem 0.5rem;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  min-width: 0;
}

.transfer-card-meta-inline span strong {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.82;
}

.transfer-card-meta-inline span em {
  font-style: normal;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transfer-round-manager-list {
  margin-top: 0.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.transfer-mini-status {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.22);
}

.transfer-mini-status.is-in {
  color: #9ef2c4;
  border-color: rgba(56, 214, 132, 0.65);
}

.transfer-mini-status.is-out {
  color: #ffb0b0;
  border-color: rgba(255, 91, 91, 0.75);
}

@media (max-width: 980px) {
  .transfer-round-card {
    flex-direction: column;
    align-items: stretch;
  }

  .transfer-round-card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  .transfer-card-top {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .transfer-card-meta-inline {
    margin-left: 0;
    margin-top: 0.2rem;
    grid-template-columns: 1fr;
  }
}

.highlight-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.highlight-value {
  margin: 0.45rem 0 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.summary-player-photo {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  object-fit: cover;
  margin: 0.35rem 0;
}

.summary-player-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
}

.summary-player-line .highlight-value {
  margin: 0;
}

.summary-player-line .live-auction-hero {
  width: min(100%, 420px);
  margin: 0 auto;
}

.highlight-timer {
  margin: 0.45rem 0 0;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold);
}

footer {
  padding: 1rem 1.2rem 2rem;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 980px) {
  .grid-two,
  .grid-three,
  .builder-layout {
    grid-template-columns: 1fr;
  }

  .auction-highlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drafted-squads-grid {
    grid-template-columns: 1fr;
  }

  .market-item {
    align-items: stretch;
  }

  .market-item-row {
    flex: 1 1 100%;
    min-width: 0;
  }

  .market-item-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }
}

@media (max-width: 620px) {
  .top-nav {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 0.8rem;
  }

  .global-mode-toggle {
    top: 0.55rem;
    left: 0.55rem;
    padding: 0.32rem 0.64rem;
    font-size: 0.78rem;
  }

  .nav-dropdown-menu {
    position: static;
    margin-top: 0.35rem;
    min-width: 0;
    width: 100%;
  }

  .top-nav-actions {
    width: 100%;
    justify-content: flex-start;
  }

  h1 {
    font-size: clamp(1.7rem, 8vw, 2.3rem);
  }

  .panel {
    padding: 0.85rem;
  }

  .auction-highlight-grid {
    grid-template-columns: 1fr;
  }

  .player-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-item-row {
    grid-template-columns: minmax(0, 1fr) minmax(52px, auto);
    row-gap: 0.35rem;
  }

  .position-col,
  .team-col,
  .points-col {
    grid-column: 1 / -1;
  }

  .market-item-actions {
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .market-item button,
  .market-dots-btn {
    min-height: 2rem;
  }

  .player-stats-grid-header,
  .player-stats-grid-row {
    min-width: 820px;
    gap: 0.35rem;
  }

  .player-stats-col,
  .player-stats-sort-btn {
    font-size: 0.7rem;
  }

  /* My Squad mobile fit: reduce clipping and keep controls reachable on narrow screens. */
  body.my-squad-page .hero {
    padding-top: 0.55rem;
    padding-bottom: 0.45rem;
  }

  body.my-squad-page .hero-content {
    margin-top: 0.28rem;
  }

  body.my-squad-page .top-nav-title {
    margin: 0;
    text-align: center;
  }

  .my-squad-tabs-panel {
    padding: 0.55rem 0.5rem;
  }

  .my-squad-tabs-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0.5rem;
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .my-squad-tabs-row .btn {
    min-width: 118px;
    padding: 0.44rem 0.6rem;
    font-size: 0.78rem;
    flex: 0 0 auto;
  }

  .my-week-controls {
    gap: 0.4rem;
  }

  .mw-nav-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .matchweek-chip {
    min-width: 0;
    width: 100%;
    padding: 0.42rem 0.48rem;
  }

  .matchweek-title {
    font-size: 1rem;
  }

  .matchweek-dates {
    font-size: 0.76rem;
  }

  .my-squad-pitch-board {
    padding: 0.9rem 0.45rem 1rem;
  }

  .my-squad-pitch-board::before {
    inset: 8px;
    border-width: 2px;
  }

  .my-squad-pitch-row {
    gap: 0.45rem;
  }

  .pitch-slot {
    width: 82px;
    min-width: 82px;
    min-height: 138px;
  }

  .my-squad-player-photo-wrap {
    width: 66px;
    height: 66px;
  }

  .my-squad-player-nameplate,
  .my-squad-player-week {
    min-width: 72px;
    max-width: 78px;
  }

  .my-squad-player-name {
    font-size: 0.66rem;
  }

  .my-squad-player-week {
    font-size: 0.62rem;
  }

  .my-squad-bench {
    padding: 0.55rem 0.35rem;
  }

  .my-squad-bench-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .bench-slot {
    width: 100%;
    min-width: 0;
    min-height: 130px;
    padding: 0.24rem;
  }

  .transfer-controls-row {
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.45rem;
  }

  .transfer-controls-row input[type="number"] {
    width: 100%;
    max-width: none !important;
    min-width: 0;
  }

  .transfer-player-pane {
    max-height: 56vh;
  }

  #tradeTabPanel .section-head {
    align-items: flex-start;
    gap: 0.35rem;
  }

  .trade-floor-grid {
    gap: 0.55rem;
  }

  .trade-drop-zone {
    min-height: 170px;
    padding: 0.45rem;
  }

  .trade-team-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    flex-wrap: nowrap;
  }

  .trade-team-head h2 {
    font-size: 1.05rem;
    line-height: 1.1;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .trade-team-badge,
  .trade-team-badge-fallback {
    width: 30px;
    height: 30px;
    min-width: 30px;
  }

  .trade-cash-control {
    gap: 0.3rem;
  }

  .trade-cash-value-chip {
    width: 100%;
    justify-content: center;
  }

  .trade-player-card {
    padding: 0.42rem 0.45rem;
  }

  .trade-player-meta strong {
    font-size: 0.82rem;
  }

  .trade-player-meta span {
    font-size: 0.72rem;
  }

  .player-stats-controls,
  .player-stats-pos-tabs {
    gap: 0.45rem;
    flex-wrap: wrap;
  }
}


