:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #f3f7f5;
  background: #101416;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #101416;
}

a {
  color: inherit;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  padding: 0.7rem 1rem;
  background: #f5c542;
  color: #15120a;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: #263238;
  color: #f3f7f5;
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: #172023;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.1rem;
  font-weight: 900;
  text-decoration: none;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 4px;
}

.beta-badge {
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  background: rgba(245, 197, 66, 0.16);
  color: #f5c542;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.topbar nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
}

[hidden] {
  display: none !important;
}

.mobile-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  background: #263238;
  color: #f3f7f5;
}

.utility-icon-link {
  position: relative;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: #d7dfdb;
  text-decoration: none;
}

.utility-icon-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f5c542;
}

.utility-icon-link svg,
.mobile-menu-toggle svg,
.player-status svg,
.match-event svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.utility-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding: 0 4px;
  background: #ef5350;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
}

.cash-resource small {
  color: #a9b8b0;
  font-size: 0.68rem;
  white-space: nowrap;
}

.topbar form {
  margin: 0;
}

.topbar button {
  padding: 0.5rem 0.75rem;
}

.club-switcher {
  position: relative;
}

.club-switcher summary {
  min-height: 38px;
  max-width: min(280px, 28vw);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  background: #263238;
  color: #f3f7f5;
  font-weight: 900;
  cursor: pointer;
}

.club-switcher summary > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.club-switcher summary::-webkit-details-marker {
  display: none;
}

.club-switcher-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  z-index: 40;
  width: min(320px, 86vw);
  display: grid;
  gap: 0.35rem;
  padding: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #151d20;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.club-switcher-menu form,
.club-switcher-menu a,
.club-switcher-row {
  margin: 0;
}

.club-switcher-menu button,
.club-switcher-menu a,
.club-switcher-row {
  width: 100%;
  justify-content: space-between;
  display: flex;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  background: #202b2f;
  color: #f3f7f5;
  text-decoration: none;
  text-align: left;
}

.club-switcher-menu button[aria-current="true"] {
  outline: 2px solid #f5c542;
}

.club-switcher-row.is-locked {
  opacity: 0.62;
}

.club-switcher small {
  color: #f5c542;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.supporter-expiry-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--theme-accent, #f5c542) 42%, transparent);
  border-radius: 999px;
  padding: 0.16rem 0.45rem;
  background: color-mix(in srgb, var(--theme-accent, #f5c542) 12%, rgba(255, 255, 255, 0.04));
  color: var(--theme-accent, #f5c542);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.club-switcher .supporter-expiry-badge {
  margin-top: 0.15rem;
}

.resource-bar {
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) repeat(3, minmax(165px, 1fr));
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #22283d;
}

.resource-chip,
.energy-meter {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.035);
  color: #c8d3cd;
  font-weight: 800;
}

.resource-bar strong {
  color: #f3f7f5;
}

.energy-meter {
  grid-template-columns: 20px auto 1fr auto;
  grid-template-areas:
    "icon label bar value"
    "timer timer timer timer";
}

.energy-meter > svg {
  grid-area: icon;
  color: #f5c542;
}

.energy-meter > span {
  grid-area: label;
}

.energy-meter > .energy-segments {
  grid-area: bar;
}

.energy-meter > strong {
  grid-area: value;
}

.energy-meter > small {
  grid-area: timer;
  color: #f5c542;
}

.resource-track {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
}

.resource-track i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #f5c542, #ff7a2f);
}

.energy-segments {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 3px;
}

.energy-segments i {
  height: 16px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.energy-segments i.is-filled {
  background: linear-gradient(180deg, #ffd84f, #ff8a2f);
  box-shadow: 0 0 8px rgba(245, 197, 66, 0.2);
}

.resource-chip {
  grid-template-columns: 22px 1fr auto;
  grid-template-areas:
    "icon label value"
    "track track track";
}

.resource-chip > svg { grid-area: icon; width: 19px; }
.resource-chip > span:first-of-type { grid-area: label; }
.resource-chip > strong { grid-area: value; }
.resource-chip > .resource-track { grid-area: track; height: 8px; }
.cash-resource > svg { color: #75d59b; }
.xp-resource > svg { color: #77b7ff; }
.xp-resource .resource-track i { background: linear-gradient(90deg, #4d91e8, #9bc8ff); }
.credit-resource > svg { color: #ff4d2f; }
.credit-resource {
  background: rgba(255, 255, 255, 0.035);
  min-width: 0;
  overflow: hidden;
}

.credit-resource > span:first-of-type,
.credit-resource > strong {
  min-width: 0;
}

.credit-resource > strong {
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

.page {
  width: min(1120px, 94vw);
  margin: 0 auto;
  padding: 2rem 0;
}

.page-with-chat {
  width: min(1480px, 94vw);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 1rem;
}

.page-main {
  grid-column: 1;
  min-width: 0;
}

.hero {
  min-height: calc(100vh - 128px);
  display: grid;
  align-items: center;
}

.hero-logo {
  width: min(240px, 58vw);
  height: auto;
  display: block;
  margin: 0 0 1.25rem;
  border-radius: 8px;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 0.98;
}

.hero p {
  max-width: 680px;
  color: #c8d3cd;
  font-size: 1.15rem;
}

.hero-count {
  color: #f5c542;
  font-weight: 900;
}

.auth-logo {
  width: min(180px, 52vw);
  height: auto;
  display: block;
  margin: 0 auto 1rem;
  border-radius: 8px;
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.panel,
.form-panel,
.messages {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #172023;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.panel,
.form-panel {
  padding: 1.25rem;
}

.form-panel {
  max-width: 520px;
}

.form-panel input,
.form-panel select,
.form-panel textarea,
.chat-form input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 0.75rem;
  background: #101416;
  color: #f3f7f5;
}

.form-panel textarea {
  min-height: 150px;
  resize: vertical;
}

.form-panel input[type="color"] {
  min-height: 52px;
  padding: 0.35rem;
  cursor: pointer;
}

.color-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}

.color-preview div {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 0.75rem;
  border-radius: 6px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
}

.color-preview small {
  grid-column: 2;
  color: #a9b8b0;
}

.swatch {
  width: 34px;
  height: 34px;
  display: inline-block;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.72);
  background: #1565c0;
}

.mini-kit {
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
  justify-items: center;
  background:
    linear-gradient(135deg, var(--primary-preview, #1565c0) 0 50%, var(--secondary-preview, #f5f5f5) 50% 100%);
  color: #101416;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.toast-stack {
  position: fixed;
  z-index: 220;
  top: 76px;
  right: 18px;
  width: min(390px, calc(100vw - 24px));
  display: grid;
  gap: 9px;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #4c5d63;
  border-left: 4px solid #78b7d0;
  border-radius: 6px;
  padding: 11px 12px;
  background: #202a2e;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  pointer-events: auto;
  animation: toast-arrive 180ms ease-out both;
}

.toast-success {
  border-color: rgba(87, 199, 133, 0.7);
  border-left-color: #57d68d;
  box-shadow: 0 14px 45px rgba(87, 199, 133, 0.12);
}
.toast-success::after {
  content: "Reward / update";
  display: block;
  grid-column: 2;
  color: #57c785;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.toast-error { border-left-color: #ff5959; }
.toast-warning { border-left-color: #f5c542; }
.toast p { margin: 0; line-height: 1.35; }
.toast > svg { width: 20px; color: #dce7e2; }
.toast button {
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  color: #c9d5d0;
}
.toast button:hover { background: rgba(255, 255, 255, 0.08); }
.toast.is-leaving { opacity: 0; transform: translateX(12px); transition: 180ms ease; }

@keyframes toast-arrive {
  from { opacity: 0; transform: translateY(-8px); }
}

.muted,
.eyebrow {
  color: #a9b8b0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 1rem;
}

.club-card {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 55%, #172023), #172023 58%),
    #172023;
}

.club-card h1 {
  margin: 0;
  font-size: 2.4rem;
}

.stats,
.facility-list,
.tier-list {
  display: grid;
  gap: 0.65rem;
}

.stats {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stats span,
.facility-list li,
.tier-list li,
.role-row {
  border-radius: 6px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
}

.stats strong,
.facility-list strong {
  display: block;
}

.facility-list,
.tier-list {
  padding: 0;
  list-style: none;
}

.facility-upkeep-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 0.85rem;
  border: 1px solid rgba(245, 197, 66, 0.42);
  border-radius: 999px;
  padding: 0.65rem 0.85rem;
  background: linear-gradient(90deg, rgba(245, 197, 66, 0.17), rgba(255, 255, 255, 0.055));
  color: #f3f7f5;
  font-weight: 850;
}

.facility-upkeep-chip svg {
  width: 19px;
  height: 19px;
  color: #f5c542;
}

.facility-upkeep-chip span {
  min-width: 0;
}

.facility-upkeep-chip strong {
  margin-left: auto;
  color: #f5c542;
}

.tier-list .current-tier {
  border: 1px solid rgba(245, 197, 66, 0.75);
  background: linear-gradient(90deg, rgba(245, 197, 66, 0.2), rgba(255, 255, 255, 0.055));
  color: #f5c542;
  font-weight: 900;
}

.tier-list .current-tier strong {
  float: right;
  color: #fff;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.tier-list li {
  padding: 0;
}

.tier-list a {
  display: block;
  padding: 0.9rem 1rem;
  color: inherit;
  text-decoration: none;
}

.tier-list li:hover {
  border-color: rgba(245, 197, 66, 0.55);
}

.league-tier-links {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.league-tier-links a {
  border: 1px solid #34444a;
  padding: 0.55rem 0.8rem;
  background: #242e32;
  color: #f3f7f5;
  text-decoration: none;
}

.league-tier-links a[aria-current="page"] {
  border-color: #f5c542;
  color: #f5c542;
}

.chat-panel {
  grid-column: auto;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
}

.chat-feed {
  margin-top: 1rem;
}

.role-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 1rem;
  align-items: center;
  margin-top: 0.75rem;
}

.checks {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .topbar,
  .topbar nav,
  .dashboard-grid,
  .stats,
  .role-row,
  .chat-form {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
  }
}

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

.main-board,
.board-grid {
  display: grid;
  gap: 1rem;
}

.board-grid {
  grid-template-columns: 1fr 1fr;
}

.club-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.club-crest,
.club-crest-image {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
}

.club-crest {
  position: relative;
  display: grid;
  place-items: center;
  background: var(--primary, #1565c0);
  box-shadow: inset 0 0 0 5px var(--secondary, #f5f5f5), 0 12px 28px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.club-crest span {
  width: 30px;
  height: 30px;
  display: block;
  background: var(--secondary, #f5f5f5);
}

.club-crest-shield {
  border-radius: 14px 14px 26px 26px;
  clip-path: polygon(50% 0, 92% 12%, 86% 72%, 50% 100%, 14% 72%, 8% 12%);
}

.club-crest-round {
  border-radius: 50%;
}

.club-crest-round span {
  border-radius: 50%;
}

.club-crest-diamond {
  transform: rotate(45deg) scale(0.82);
  border-radius: 8px;
}

.club-crest-diamond span {
  transform: rotate(-45deg);
}

.club-crest-stripes {
  background:
    repeating-linear-gradient(90deg, var(--primary, #1565c0) 0 14px, var(--secondary, #f5f5f5) 14px 28px);
}

.club-crest-stripes span {
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(16, 20, 22, 0.72);
}

.club-crest-image {
  display: block;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.crest-preview {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.85rem;
  margin: 1rem 0;
  border-radius: 6px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
}

.crest-preview .club-crest {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
}

.game-layout .chat-panel {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto auto;
  gap: 1rem;
  grid-column: auto;
}

.page-with-chat > .chat-panel {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto auto;
  gap: 1rem;
}

.chat-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.chat-title h2 {
  margin: 0;
}

.online-count {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
  color: #c8d3cd;
  font-weight: 900;
}

.online-count svg {
  width: 18px;
  height: 18px;
}

#chatPulse {
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  background: rgba(245, 197, 66, 0.16);
  color: #f5c542;
  font-size: 0.8rem;
  font-weight: 800;
}

.game-layout .chat-feed {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  overflow: auto;
  margin-top: 0;
  padding-right: 0.25rem;
}

.page-with-chat .chat-feed {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  overflow: auto;
  margin-top: 0;
  padding-right: 0.25rem;
}

.chat-message {
  position: relative;
  border-radius: 6px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
}

.chat-message strong {
  display: block;
  color: #f5c542;
}

.chat-name-link {
  display: block;
  font-weight: 900;
  text-decoration: none;
}

.chat-name-link:hover {
  text-decoration: underline;
}

.chat-profile-link {
  display: inline-flex;
  flex: 0 0 auto;
  text-decoration: none;
}

.chat-message p {
  margin: 0.35rem 0 0;
  color: #d7dfdb;
}

.chat-message-meta {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.35rem;
  color: #a9b8b0;
  font-size: 0.72rem;
  font-weight: 800;
}

@media (max-width: 920px) {
  .game-layout,
  .board-grid {
    grid-template-columns: 1fr;
  }

  .stadium-opponent {
    grid-template-columns: minmax(180px, 0.8fr) minmax(300px, 1.4fr);
    grid-template-areas:
      "identity report"
      "rival rival"
      "actions actions"
      "feedback feedback";
  }

  .opponent-actions {
    justify-content: flex-end;
  }

  .game-layout .chat-panel {
    position: static;
    max-height: none;
  }
}

.chat-form textarea,
.ip-ban-form input,
.moderation-row input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 0.75rem;
  background: #101416;
  color: #f3f7f5;
}

.chat-form textarea {
  min-height: 78px;
  resize: vertical;
}

.chat-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: fit-content;
  max-width: 100%;
  border-radius: 6px;
  cursor: context-menu;
  outline: none;
}

.chat-identity:focus-visible {
  box-shadow: 0 0 0 2px rgba(245, 197, 66, 0.72);
}

.chat-identity .club-crest,
.chat-identity .club-crest-image {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
}

.chat-identity .club-crest span {
  width: 16px;
  height: 16px;
}

.chat-title-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.moderation-list {
  display: grid;
  gap: 0.75rem;
}

.moderation-row,
.ip-ban-form,
.challenge-form,
.search-form,
.challenge-row {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 320px) auto auto;
  gap: 0.75rem;
  align-items: center;
  border-radius: 6px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
}

.moderation-row.compact {
  grid-template-columns: 1fr auto;
}

.challenge-form {
  grid-template-columns: 1fr auto;
  margin-bottom: 1rem;
}

.search-form {
  grid-template-columns: minmax(0, 1fr) minmax(150px, auto) auto;
  margin: 1rem 0;
}

.challenge-form select,
.search-form input,
.search-form select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 0.75rem;
  background: #101416;
  color: #f3f7f5;
}

.friendly-list {
  display: grid;
  gap: 1rem;
}

.match-preference {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0;
  border-radius: 6px;
  padding: 0.75rem;
  background: rgba(245, 197, 66, 0.1);
}

.match-preference label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 900;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-control > span {
  width: 42px;
  height: 24px;
  position: relative;
  border-radius: 999px;
  background: #4a565b;
  transition: 160ms ease;
}

.switch-control > span::after {
  content: "";
  width: 18px;
  height: 18px;
  position: absolute;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
  transition: 160ms ease;
}

.switch-control input:checked + span {
  background: #f5c542;
}

.switch-control input:checked + span::after {
  transform: translateX(18px);
  background: #15120a;
}

.rival-sort-controls {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
  margin-bottom: 1rem;
}

.rival-sort-controls label {
  display: grid;
  gap: 0.3rem;
  color: #a9b8b0;
  font-size: 0.78rem;
  font-weight: 800;
}

.rival-sort-controls select {
  width: 100%;
  border: 1px solid #34444a;
  border-radius: 6px;
  padding: 0.65rem;
  background: #101416;
  color: #fff;
}

.stadium-opponent {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(300px, 1.35fr) auto;
  grid-template-areas:
    "identity report actions"
    "rival rival rival"
    "feedback feedback feedback";
  gap: 1rem;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(245, 197, 66, 0.42);
  border-radius: 6px;
  padding: 1rem;
  background:
    linear-gradient(90deg, rgba(245, 197, 66, 0.14), transparent 36%),
    rgba(255, 255, 255, 0.06);
}

.stadium-opponent::before,
.stadium-opponent::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #f5c542;
  opacity: 0.9;
}

.stadium-opponent::before {
  top: 0;
}

.stadium-opponent::after {
  bottom: 0;
}

.stadium-opponent form {
  margin: 0;
}

.opponent-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.opponent-identity .club-crest,
.opponent-identity .club-crest-image {
  width: 76px;
  height: 76px;
  flex-basis: 76px;
  box-shadow: 0 0 0 3px rgba(245, 197, 66, 0.65), 0 12px 28px rgba(0, 0, 0, 0.36);
}

.opponent-identity .club-crest span {
  width: 28px;
  height: 28px;
}

.opponent-identity strong,
.opponent-identity span {
  display: block;
}

.opponent-identity strong {
  color: #f5c542;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.health-pill {
  width: fit-content;
  margin-top: 0.25rem;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  background: rgba(40, 199, 111, 0.18);
  color: #76ffb0;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.opponent-report {
  display: grid;
  gap: 0.7rem;
}

.opponent-status-line {
  display: block;
  align-items: center;
  gap: 0.75rem;
  border-radius: 4px;
  padding: 0.45rem 0.65rem;
  background:
    linear-gradient(90deg, rgba(245, 197, 66, 0.72), rgba(245, 197, 66, 0.24) 42%, rgba(255, 255, 255, 0.06));
  color: #101416;
  font-weight: 800;
}

.opponent-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 0.25rem;
}

.opponent-metrics span {
  display: grid;
  gap: 0.2rem;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.28);
  text-align: center;
}

.opponent-metrics small {
  padding: 0.3rem 0.45rem;
  background: linear-gradient(180deg, #ffd84f, #d19b14);
  color: #4a3304;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.opponent-metrics strong {
  padding: 0.4rem 0.45rem 0.5rem;
  color: #f5c542;
  font-size: 0.95rem;
}

.opponent-metrics .difficulty-metric {
  background: rgba(0, 0, 0, 0.34);
}

.difficulty-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 36px;
  margin: 0.35rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
  line-height: 1.1;
  white-space: nowrap;
}

.difficulty-badge svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.difficulty-favorable {
  background: rgba(87, 199, 133, 0.14);
  color: #87e3aa !important;
}

.difficulty-balanced {
  background: rgba(119, 183, 255, 0.14);
  color: #a9d2ff !important;
}

.difficulty-challenging {
  background: rgba(245, 197, 66, 0.16);
  color: #f5c542 !important;
}

.difficulty-superior {
  background: rgba(239, 83, 80, 0.16);
  color: #ff9b98 !important;
}

.opponent-actions {
  display: grid;
  grid-template-columns: repeat(4, 48px);
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
}

.opponent-action {
  width: 48px;
  min-height: 48px;
  display: grid;
  place-items: center;
  gap: 0.25rem;
  border-radius: 50%;
  padding: 0.55rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.08), 0 12px 22px rgba(0, 0, 0, 0.32);
  color: #f3f7f5;
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.opponent-action svg {
  width: 22px;
  height: 22px;
}

.opponent-identity { grid-area: identity; }
.rival-record,
.rival-pending { grid-area: rival; }
.opponent-report { grid-area: report; }
.opponent-actions { grid-area: actions; }
.challenge-feedback { grid-area: feedback; }

.challenge-action {
  background: #f5c542;
  color: #15120a;
}

.challenge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.challenge-row {
  grid-template-columns: 1fr auto auto auto;
  margin-top: 0.65rem;
}

.challenge-row.compact {
  grid-template-columns: 1fr auto;
}

.match-report {
  grid-column: 1 / -1;
}

.match-report summary {
  color: #f5c542;
  cursor: pointer;
  font-weight: 900;
}

.match-report pre {
  overflow: auto;
  white-space: pre-wrap;
  margin: 0.5rem 0 0;
  border-radius: 6px;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.28);
  color: #d7dfdb;
  font-family: inherit;
}

.status-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 900;
}

.status-badge.danger {
  background: rgba(229, 57, 53, 0.18);
  color: #ff8a80;
}

.secondary-action {
  background: #263238;
  color: #f3f7f5;
}

.danger-action {
  background: #e53935;
  color: #fff;
}

.game-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #172023;
}

.game-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  color: #f3f7f5;
  text-decoration: none;
  font-weight: 800;
}

.game-nav svg {
  width: 18px;
  height: 18px;
  color: #c8d3cd;
}

.game-nav .supporter-link {
  color: #f5c542;
}

.game-nav .supporter-link svg {
  color: #f5c542;
}

.staff-nav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(245, 197, 66, 0.35);
  padding: 0 0 0.65rem;
}

.staff-nav a {
  flex: 0 0 auto;
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  background: rgba(245, 197, 66, 0.1);
  color: #f5c542;
  font-weight: 900;
  text-decoration: none;
}

.moderation-account {
  display: grid;
  gap: 1rem;
  border-radius: 6px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.06);
}

.moderation-account-header,
.status-group,
.admin-account-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.moderation-account-header strong,
.moderation-account-header span,
.moderation-account-header small {
  display: block;
}

.moderation-club-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.moderation-club-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(12, 17, 19, 0.28);
}

.moderation-club-card.is-locked {
  border-color: rgba(255, 89, 89, 0.45);
}

.moderation-club-card form {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.moderation-club-card input {
  width: 100%;
}

.admin-only-label {
  display: inline-flex;
  width: fit-content;
  margin-right: 0.35rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(245, 197, 66, 0.16);
  color: #f5c542;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-rescue-tool {
  display: inline-grid;
  gap: 0.35rem;
  justify-items: start;
  margin: 0;
  padding: 0.65rem;
  border: 1px solid rgba(255, 138, 128, 0.34);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(255, 138, 128, 0.1), rgba(255, 255, 255, 0.035));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.shared-ip-log p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
}

.risk-signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
}

.risk-signal-grid span {
  padding: 0.65rem;
  border-radius: 6px;
  background: rgba(245, 197, 66, 0.08);
  color: #c8d3cd;
}

.risk-signal-grid strong {
  color: #f5c542;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 1.2rem;
  border: 1px dashed rgba(245, 197, 66, 0.35);
  border-radius: 8px;
  background: rgba(245, 197, 66, 0.06);
  color: #c8d3cd;
  text-align: center;
  font-weight: 800;
}

.empty-state.compact {
  min-height: auto;
  padding: 0.75rem;
  font-size: 0.82rem;
  text-align: left;
}

.cup-create-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(140px, auto)) auto;
  gap: 0.65rem;
  align-items: center;
  margin: 1rem 0;
}

.cup-create-form input,
.cup-create-form select {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 0.7rem;
  background: #101416;
  color: #f3f7f5;
}

@media (max-width: 760px) {
  .cup-create-form {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 761px) and (max-width: 1420px) and (pointer: coarse) {
  .resource-bar {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    padding: 0.65rem 1rem;
  }

  .energy-meter,
  .credit-resource {
    grid-column: 1 / -1;
  }

  .credit-resource {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    padding: 0.65rem 0.8rem;
    border-left: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
  }
}

.moderation-actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  align-items: end;
}

.moderation-actions form,
.admin-account-actions form {
  display: flex;
  gap: 0.6rem;
  align-items: end;
  flex-wrap: wrap;
}

.moderation-actions label,
.admin-account-actions label {
  min-width: 180px;
  flex: 1;
  color: #c8d3cd;
  font-size: 0.78rem;
  font-weight: 800;
}

.moderation-actions input,
.admin-account-actions input {
  width: 100%;
  margin-top: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 0.75rem;
  background: #101416;
  color: #f3f7f5;
}

.account-log summary {
  color: #f5c542;
  cursor: pointer;
  font-weight: 900;
}

.account-log p {
  margin: 0.5rem 0 0;
}

.account-log time {
  color: #a9b8b0;
}

.rollback-log form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: start;
  margin-top: 0.5rem;
  border-radius: 5px;
  padding: 0.55rem;
  background: rgba(239, 83, 80, 0.08);
}

.rollback-snapshot {
  border: 1px solid #354348;
  border-radius: 6px;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.16);
  margin-top: 0.5rem;
}

.rollback-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.rollback-preview span {
  background: #20292d;
  padding: 0.55rem;
  border-radius: 4px;
}

.opponent-actions > a,
.opponent-actions > form {
  align-self: start;
}

.supporter-star {
  display: inline !important;
  margin-left: 0.2rem;
  color: #f5c542;
  font-size: 0.9em;
}

.challenge-control {
  display: grid;
  grid-template-rows: 48px minmax(16px, auto);
  justify-items: center;
  gap: 0.35rem;
}

.challenge-cooldown {
  color: #f5c542;
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
}

.leaderboard-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.player-leaderboard {
  display: grid;
  gap: 0.6rem;
}

.player-leader-row {
  display: grid;
  grid-template-columns: 42px minmax(160px, 1fr) auto auto;
  gap: 0.75rem;
  align-items: center;
  border-radius: 6px;
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.06);
}

.player-leader-row .club-crest,
.player-leader-row .club-crest-image {
  width: 42px;
  height: 42px;
}

.player-leader-row small {
  display: block;
  color: #a9b8b0;
}

.notification-list,
.message-list {
  display: grid;
  gap: 0.75rem;
}

.notification-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  border-radius: 6px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
}

.notification-row > svg,
.notification-tabs svg {
  width: 18px;
  color: var(--theme-accent, #f5c542);
}

.notification-row p {
  margin: 0.35rem 0;
}

.notification-row small {
  color: #a9b8b0;
}

.match-center {
  display: grid;
  gap: 1rem;
}

.match-scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  text-align: center;
}

.match-scoreboard strong {
  color: #f5c542;
  font-size: 2.4rem;
}

.match-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.match-summary-grid span {
  border-radius: 6px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
}

.match-summary-grid strong {
  display: block;
  color: #f5c542;
}

.match-timeline {
  position: relative;
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
  padding-left: 0.6rem;
}

.match-timeline::before {
  content: "";
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  left: 1rem;
  width: 2px;
  background: linear-gradient(#f5c542, rgba(245, 197, 66, 0.18));
}

.match-event {
  --event-color: #f5c542;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  border-left: 3px solid var(--event-color);
  border-radius: 7px;
  padding: 0.7rem 0.85rem 0.7rem 0.7rem;
  background: linear-gradient(90deg, color-mix(in srgb, var(--event-color) 16%, transparent), rgba(255, 255, 255, 0.055));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  animation: eventReveal 180ms ease-out;
}

.match-event svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  margin-left: -0.1rem;
  border-radius: 50%;
  padding: 0.18rem;
  background: rgba(0, 0, 0, 0.34);
  color: var(--event-color);
}

.event-minute {
  min-width: 42px;
  border-radius: 999px;
  padding: 0.22rem 0.4rem;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  text-align: center;
  font-size: 0.78rem;
}

.match-event-goal { --event-color: #57d68d; }
.match-event-save { --event-color: #54c7ec; }
.match-event-substitution { --event-color: #b59cff; }
.match-event-injury { --event-color: #ff756d; }
.match-event-yellow_card { --event-color: #ffd95a; }
.match-event-red_card { --event-color: #ff5959; }
.match-event-half_time,
.match-event-full_time { --event-color: #75d59b; }

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

.match-final pre {
  overflow: auto;
  white-space: pre-wrap;
  border-radius: 6px;
  padding: 0.85rem;
  background: rgba(0, 0, 0, 0.28);
  font-family: inherit;
}

.profile-record,
.upgrade-list,
.player-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.challenge-action:disabled {
  filter: grayscale(1);
  opacity: 0.48;
}

.soccer-ball {
  font-size: 1.55rem;
  line-height: 1;
}

.rival-order-actions {
  display: grid;
  flex: 0 0 28px;
  gap: 0.2rem;
}

.rival-order-actions button {
  width: 28px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  background: #263238;
}

.rival-order-actions svg {
  width: 16px;
  height: 16px;
}

.chat-translated {
  display: block;
  margin-top: 0.3rem;
  color: #829198;
  font-size: 0.68rem;
  font-style: italic;
}

.chat-tools {
  display: flex;
  gap: 0.35rem;
  margin-top: -0.35rem;
}

.chat-tools button {
  width: 38px;
  min-height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  background: #263238;
  color: #dbe5e1;
}

.chat-tools svg {
  width: 18px;
  height: 18px;
}

.emoji-picker {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.25rem;
  border: 1px solid #34444a;
  border-radius: 6px;
  padding: 0.5rem;
  background: #101416;
}

.emoji-picker[hidden] {
  display: none;
}

.emoji-picker button {
  min-width: 0;
  height: 34px;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.1rem;
}

.country-flag {
  font-size: 1.15em;
}

.country-flag-image {
  display: inline-block;
  width: 24px;
  height: 18px;
  object-fit: cover;
  vertical-align: -3px;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.formation-preview {
  margin: 1rem 0;
}

.formation-pitch {
  position: relative;
  min-height: 520px;
  aspect-ratio: 7 / 10;
  max-width: 760px;
  margin-inline: auto;
  border: 2px solid rgba(117, 213, 155, 0.55);
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(0deg, transparent 49.7%, rgba(255, 255, 255, 0.28) 50%, transparent 50.3%),
    radial-gradient(circle at center, transparent 0 12%, rgba(255, 255, 255, 0.24) 12.2% 12.6%, transparent 12.8%),
    radial-gradient(circle at 50% 50%, rgba(245, 197, 66, 0.7) 0 4px, transparent 5px),
    repeating-linear-gradient(90deg, #173f2b 0 12.5%, #123625 12.5% 25%);
}

.formation-pitch::before,
.formation-pitch::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  height: 15%;
  border: 2px solid rgba(255, 255, 255, 0.24);
}

.formation-pitch::before { top: -2px; }
.formation-pitch::after { bottom: -2px; }

.formation-player {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 0.1rem;
  width: clamp(84px, 13vw, 118px);
  padding: 0.45rem;
  border: 1px solid rgba(245, 197, 66, 0.8);
  border-radius: 8px;
  background: rgba(17, 23, 25, 0.88);
  text-align: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.formation-player span {
  justify-self: center;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #f5c542;
  color: #101416;
  font-weight: 900;
}

.formation-player strong,
.formation-player small {
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .formation-pitch {
    min-height: 560px;
  }

  .formation-player {
    min-width: 86px;
    max-width: 100px;
    font-size: 0.72rem;
  }
}

.chat-translate-button {
  margin-top: 0.3rem;
  border: 0;
  padding: 0;
  background: transparent;
  color: #8fa8b1;
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: underline;
}

.trophy-shelves {
  display: grid;
  gap: 1.25rem;
}

.trophy-shelf {
  position: relative;
  padding: 1rem 1rem 1.25rem;
  border: 1px solid rgba(245, 197, 66, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.08)),
    #172225;
}

.trophy-shelf h3 {
  width: fit-content;
  margin: -0.2rem 0 0.75rem;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  background: rgba(245, 197, 66, 0.12);
  color: #f5c542;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.trophy-shelf::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 9px;
  border-radius: 2px;
  background: linear-gradient(180deg, #c8a05a, #6b4b24 58%, #332313);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.38);
}

.season-recap {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(360px, 1.4fr);
  gap: 1rem;
  margin: 1rem 0;
  border: 1px solid rgba(245, 197, 66, 0.4);
  border-radius: 6px;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.12), rgba(255, 255, 255, 0.03));
}

.season-recap h2 {
  margin: 0.25rem 0;
}

.season-recap-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.season-recap-stats span {
  border-radius: 5px;
  padding: 0.65rem;
  background: rgba(0, 0, 0, 0.24);
}

.season-recap-stats strong {
  display: block;
}

.js-hex-color {
  background:
    linear-gradient(var(--hex-preview, #1565c0), var(--hex-preview, #1565c0)) 10px center / 34px 34px no-repeat,
    #101416;
  padding-left: 56px !important;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  text-transform: uppercase;
}

.compact-color-preview {
  margin: 0.5rem 0 1rem;
}

.section-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
  border-bottom: 1px solid #34444a;
  overflow-x: auto;
}

.section-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  padding: 0.75rem 0.9rem;
  color: #d7dfdb;
  font-weight: 900;
  text-decoration: none;
}

.section-tabs a[aria-current="page"] {
  border-bottom: 3px solid #f5c542;
  color: #f5c542;
}

.team-sheet {
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid #34444a;
  border-radius: 6px;
  background: #162126;
}

.team-sheet-selectors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.squad-selection-counts {
  display: flex;
  gap: 0.65rem;
  margin: 0.75rem 0;
}

.squad-selection-counts span {
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  background: rgba(255, 255, 255, 0.06);
}

.squad-selection-counts strong { color: #f5c542; }

.squad-picker {
  margin: 0.75rem 0 1rem;
  border: 1px solid #34444a;
  border-radius: 6px;
  overflow: hidden;
}

.squad-picker-heading,
.squad-picker-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 72px 58px 58px;
  gap: 0.5rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
}

.squad-picker-heading {
  background: #263238;
  color: #a9b8b0;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.squad-picker-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--position-color, #f5c542);
  background: rgba(255, 255, 255, 0.035);
}

.squad-picker-row.position-gk { --position-color: #f5c542; }
.squad-picker-row.position-df { --position-color: #57c785; }
.squad-picker-row.position-mf { --position-color: #62a7ff; }
.squad-picker-row.position-fw { --position-color: #ff786f; }
.squad-picker-row small { display: block; color: #a9b8b0; }

.squad-picker-row label {
  width: 38px;
  height: 34px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
}

.squad-picker-row label input {
  position: absolute;
  opacity: 0;
}

.squad-picker-row label:has(input:checked) {
  background: #f5c542;
  color: #15120a;
}

.squad-picker-row label:has(input:disabled) {
  opacity: 0.35;
  cursor: not-allowed;
}

.team-sheet fieldset {
  min-width: 0;
  border: 1px solid #34444a;
  border-radius: 6px;
  padding: 0.75rem;
}

.team-sheet fieldset > div {
  display: grid;
  gap: 0.35rem;
}

.team-sheet fieldset label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem;
}

.team-sheet fieldset input {
  width: 18px;
  height: 18px;
}

.match-event-half_time,
.match-event-full_time {
  border-left-color: #f5c542;
  background: rgba(245, 197, 66, 0.14);
  font-weight: 900;
}

.match-event-substitution {
  border-left-color: #63b3ed;
}

.match-event-injury,
.match-event-red_card {
  border-left-color: #ef5350;
}

.match-event-yellow_card {
  border-left-color: #f5c542;
  background: rgba(245, 197, 66, 0.1);
}

.match-event-goal {
  border-left-color: #57c785;
  background: rgba(87, 199, 133, 0.1);
}

.match-event-save {
  border-left-color: #63b3ed;
}

.timeline-filters {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.timeline-filters button {
  padding: 0.45rem 0.7rem;
}

.timeline-filters button.is-active {
  background: #f5c542;
  color: #15120a;
}

.level-up-summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  border: 1px solid rgba(245, 197, 66, 0.7);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(245, 197, 66, 0.14);
  animation: level-up-in 520ms ease-out both;
}

.level-up-summary > svg {
  width: 40px;
  height: 40px;
  color: #f5c542;
}

.level-up-summary strong,
.level-up-summary span {
  display: block;
}

@keyframes level-up-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.match-squads {
  margin: 1rem 0;
  border: 1px solid #34444a;
  border-radius: 6px;
  padding: 0.75rem;
}

.match-squads summary {
  cursor: pointer;
  font-weight: 900;
}

.match-squads > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.training-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.training-summary span,
.player-row,
.player-stat-grid > span {
  border-radius: 6px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
}

.training-summary strong {
  display: block;
  font-size: 1.25rem;
}

.recruitment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.recruitment-grid article,
.fitness-management {
  border: 1px solid #34444a;
  border-radius: 6px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
}

.recruitment-grid form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto;
  gap: 0.6rem;
}

.recruitment-grid select {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 0.7rem;
  background: #101416;
  color: #f3f7f5;
}

.fitness-management {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0;
}

.fitness-management h2,
.fitness-management p {
  margin-top: 0;
}

.fitness-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 240px);
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.4rem;
}

.fitness-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
}

.fitness-bar i {
  height: 100%;
  display: block;
  background: #57c785;
}

.player-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  color: #9bd4b1;
  font-weight: 800;
}

.player-status.danger {
  color: #ff8a80;
}

.chart-head {
  color: #f5c542;
  font-weight: 900;
  text-transform: uppercase;
}

.chart-table {
  margin-top: 1rem;
}

.empty-state {
  border: 1px dashed #44555c;
  border-radius: 6px;
  padding: 1.25rem;
  color: #a9b8b0;
  text-align: center;
  background: rgba(255, 255, 255, 0.025);
}

.is-loading {
  opacity: 0.7;
  cursor: wait;
}

.game-info-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.game-info-tabs button,
.game-info-tabs a {
  min-height: 84px;
  display: grid;
  place-content: center;
  gap: 0.25rem;
  border: 1px solid #34444a;
  border-radius: 6px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  color: #f3f7f5;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.game-info-tabs button:disabled {
  color: #a9b8b0;
}

.game-info-tabs a {
  border-color: rgba(245, 197, 66, 0.6);
  color: #f5c542;
}

.game-info-tabs small {
  display: block;
  font-weight: 700;
}

.section-heading-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading-actions form {
  margin: 0;
}

.section-heading-actions button {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .section-heading-actions {
    display: grid;
  }

  .section-heading-actions button {
    width: 100%;
  }
}

.social-community {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--theme-border, rgba(245, 197, 66, 0.22));
  border-radius: 8px;
  background: color-mix(in srgb, var(--theme-bg-raised, #172023) 82%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.community-link,
.discord-community {
  min-height: 72px;
  display: grid;
  grid-template-columns: 40px 1fr 22px;
  gap: 0.75rem;
  align-items: center;
  border-right: 1px solid var(--theme-border, rgba(245, 197, 66, 0.18));
  padding: 0.85rem 1rem;
  background: transparent;
  color: #fff;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.community-link:last-child {
  border-right: 0;
}

.community-link:hover,
.discord-community:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}

.community-link > svg:first-child,
.discord-community img {
  width: 38px;
  height: 38px;
  padding: 7px;
  border-radius: 6px;
}

.community-link > svg:last-child,
.discord-community > svg:last-child {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--theme-accent, #f5c542);
  opacity: 0.92;
}

.discord-link {
  border-color: var(--theme-border, rgba(245, 197, 66, 0.18));
}

.instagram-link {
  border-color: var(--theme-border, rgba(245, 197, 66, 0.18));
}

.facebook-link {
  border-color: var(--theme-border, rgba(245, 197, 66, 0.18));
}

.discord-link img {
  background: #5865f2;
}

.instagram-link > svg:first-child {
  color: #fff;
  background: linear-gradient(135deg, #f58529, #dd2a7b 48%, #8134af);
}

.facebook-link > svg:first-child {
  color: #fff;
  background: #1877f2;
}

.community-link span,
.discord-community span {
  display: grid;
  gap: 0.2rem;
}

.community-link small,
.discord-community small { color: var(--theme-muted, #c5d6d1); }

@media (max-width: 760px) {
  .social-community {
    grid-template-columns: 1fr;
  }

  .community-link,
  .discord-community {
    border-right: 0;
    border-bottom: 1px solid var(--theme-border, rgba(245, 197, 66, 0.18));
  }

  .community-link:last-child {
    border-bottom: 0;
  }
}

.expectation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.expectation-grid article {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  border: 1px solid rgba(245, 197, 66, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.expectation-grid svg {
  width: 28px;
  height: 28px;
  color: #f5c542;
}

.expectation-grid span {
  color: #c5d6d1;
}

.staff-teaching-panel {
  border-color: rgba(87, 199, 133, 0.32);
}

.staff-teaching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.staff-teaching-grid article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0.35rem 0.7rem;
  align-items: start;
  border: 1px solid rgba(87, 199, 133, 0.24);
  border-radius: 8px;
  padding: 0.9rem;
  background: rgba(87, 199, 133, 0.055);
}

.staff-teaching-grid svg {
  grid-row: span 2;
  width: 26px;
  height: 26px;
  color: #57c785;
}

.staff-teaching-grid strong,
.staff-teaching-grid span {
  min-width: 0;
}

.staff-teaching-grid span {
  color: #c5d6d1;
}

.staff-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--role-color);
  font-weight: 900;
}

.staff-role-chip svg {
  width: 18px;
  height: 18px;
}

.announcement-list,
.development-list {
  display: grid;
  gap: 0.65rem;
}

.announcement-list article,
.development-list article,
.sponsor-renewal {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.announcement-priority {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
  color: #102017;
  background: #8fd0ff;
}

.priority-important {
  background: #f5c542;
}

.priority-urgent {
  color: #fff;
  background: #dc3545;
}

.development-list article {
  grid-template-columns: 34px 1fr;
  align-items: center;
}

.development-list article > i {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #f5c542;
  background: rgba(245, 197, 66, 0.12);
}

.multi-club-onboarding {
  display: grid;
  gap: 0.8rem;
}

.multi-club-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.multi-club-pill-row span {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.045);
}

.multi-club-pill-row span.active {
  border-color: rgba(245, 197, 66, 0.65);
  color: #f5c542;
}

.multi-club-pill-row small {
  color: #c5d6d1;
}

.quick-result-list,
.staff-announcement-editor,
.compact-announcement-list {
  display: grid;
  gap: 0.65rem;
}

.quick-result-list article {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.4fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.staff-announcement-editor form {
  display: grid;
  gap: 0.65rem;
}

.sponsor-reroll-form {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin: 0.75rem 0;
  padding: 0.75rem;
  border: 1px dashed rgba(245, 197, 66, 0.45);
  border-radius: 8px;
  background: rgba(245, 197, 66, 0.08);
}

.sponsor-renewal {
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  margin-bottom: 1rem;
}

.renewal-offer-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.renewal-offer-terms span,
.renewal-offer-terms small {
  border-radius: 6px;
  padding: 0.38rem 0.5rem;
  background: rgba(255, 255, 255, 0.045);
  color: #c8d3cd;
  font-weight: 850;
}

.guided-first-match {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.8rem;
  align-items: start;
  padding: 1rem;
  margin: 0.9rem 0;
  border: 1px solid rgba(245, 197, 66, 0.55);
  border-radius: 8px;
  background: linear-gradient(110deg, rgba(245, 197, 66, 0.14), rgba(255, 255, 255, 0.035));
}

.guided-first-match svg {
  width: 34px;
  height: 34px;
  color: #f5c542;
}

.autosave-status {
  color: #93e6b7;
  font-weight: 800;
}

.autosave-status.is-error {
  color: #ff8080;
}

.cup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.cup-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 0.75rem;
  border: 1px solid rgba(245, 197, 66, 0.45);
  border-radius: 6px;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.12), rgba(255, 255, 255, 0.035));
}

.cup-card form { grid-column: 1 / -1; }
.cup-card button { width: 100%; }

.cup-art {
  width: 58px;
  height: 68px;
  display: grid;
  place-items: center;
  color: #f5c542;
  background: rgba(0, 0, 0, 0.28);
  clip-path: polygon(50% 0, 92% 18%, 82% 76%, 50% 100%, 18% 76%, 8% 18%);
}

.cup-art svg { width: 30px; height: 30px; }
.cup-card h2 { margin: 0; font-size: 1.15rem; }
.cup-clubs { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.cup-clubs span {
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.75rem;
}

.cup-result {
  border-bottom: 1px solid #34444a;
  padding: 0.75rem 0;
}

.cup-result[class*="region-cup-"] {
  padding: 0.9rem 1rem;
  border: 1px solid #34444a;
  border-radius: 8px;
  background: #202b2f;
}

.region-cup-americas { border-left: 4px solid #4d91e8 !important; }
.region-cup-eurasia { border-left: 4px solid #f5c542 !important; }
.region-cup-africa { border-left: 4px solid #57d68d !important; }

.region-cup-americas summary strong::before,
.region-cup-eurasia summary strong::before,
.region-cup-africa summary strong::before {
  display: inline-block;
  margin-right: 0.4rem;
  padding: 0.1rem 0.38rem;
  border-radius: 999px;
  color: #101416;
  font-size: 0.68rem;
  vertical-align: 0.14rem;
}

.region-cup-americas summary strong::before { content: "Americas"; background: #4d91e8; }
.region-cup-eurasia summary strong::before { content: "Eurasia"; background: #f5c542; }
.region-cup-africa summary strong::before { content: "Africa"; background: #57d68d; }

.cup-result summary {
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}

.cup-result a { display: block; padding: 0.45rem 0; }

.cup-bracket {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(245, 197, 66, 0.12), transparent 24%, transparent 76%, rgba(245, 197, 66, 0.12)),
    rgba(0, 0, 0, 0.14);
}

.bracket-round {
  display: grid;
  gap: 0.55rem;
}

.bracket-round > strong {
  color: #f5c542;
  text-transform: uppercase;
}

.bracket-round a {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.45rem;
  align-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid #34444a;
  border-radius: 6px;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
  text-decoration: none;
}

.bracket-round a::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #f5c542;
}

.bracket-round a small { grid-column: 1 / -1; color: #f5c542; }
.bracket-connector {
  height: 60%;
  border-top: 2px solid rgba(245, 197, 66, 0.5);
  border-right: 2px solid rgba(245, 197, 66, 0.5);
  border-bottom: 2px solid rgba(245, 197, 66, 0.5);
}

.bracket-final a {
  border-color: rgba(245, 197, 66, 0.7);
  background: rgba(245, 197, 66, 0.09);
}

.change-log {
  display: grid;
  gap: 1rem;
}

.change-log article {
  border-left: 3px solid #f5c542;
  padding: 0.25rem 1rem;
}

.change-log time {
  color: #f5c542;
  font-weight: 900;
}

.change-log h2 {
  margin: 0.35rem 0;
}

.league-tier-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-top: 1.5rem;
}

.league-tier-heading h2 {
  margin-bottom: 0.4rem;
}

.league-bot-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-left: 0.35rem;
  border: 1px solid rgba(119, 183, 255, 0.38);
  border-radius: 999px;
  padding: 0.12rem 0.4rem;
  background: rgba(119, 183, 255, 0.12);
  color: #a9d2ff;
  font-size: 0.66rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.league-admin-dashboard {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid rgba(245, 197, 66, 0.28);
  border-radius: 8px;
  background: rgba(245, 197, 66, 0.055);
}

.league-admin-dashboard > div:first-child {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(245, 197, 66, 0.18);
}

.league-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}

.league-admin-card {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.rollover-dry-run {
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem;
  border: 1px solid rgba(119, 183, 255, 0.18);
  border-radius: 6px;
  background: rgba(119, 183, 255, 0.065);
}

.rollover-dry-run > strong {
  color: #a9d2ff;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.league-admin-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}

.waiting-club-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.waiting-club-list span {
  max-width: 100%;
  border: 1px solid rgba(117, 213, 155, 0.3);
  border-radius: 999px;
  padding: 0.24rem 0.55rem;
  background: rgba(117, 213, 155, 0.08);
  color: #bff0cf;
  font-size: 0.82rem;
  font-weight: 850;
}

.rollover-status-badge {
  display: inline-flex;
  width: fit-content;
  margin: 0.2rem 0.35rem 0.2rem 0;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: rgba(255, 255, 255, 0.08);
  color: #dce8e1;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.rollover-status-badge.success {
  background: rgba(87, 199, 133, 0.17);
  color: #9bd4b1;
}

.rollover-status-badge.warning {
  background: rgba(245, 197, 66, 0.16);
  color: #f5c542;
}

.rollover-status-badge.info {
  background: rgba(119, 183, 255, 0.14);
  color: #a9d2ff;
}

.status-badge.success {
  background: rgba(87, 199, 133, 0.18);
  color: #9bd4b1;
}

.future-card-grid,
.training-queue-grid,
.staff-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.future-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.future-item-card,
.training-queue-card,
.staff-row {
  border-radius: 6px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
}

.future-item-card,
.training-queue-card {
  display: grid;
  gap: 0.35rem;
}

.training-ring-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
}

.training-ring-card > div,
.queue-title {
  min-width: 0;
}

.queue-title {
  display: inline;
  overflow-wrap: anywhere;
}

.training-progress-ring {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #172023 0 57%, transparent 59%),
    conic-gradient(#f5c542 calc(var(--progress, 0) * 1%), rgba(255, 255, 255, 0.12) 0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 10px 24px rgba(0, 0, 0, 0.22);
}

.training-progress-ring.is-active {
  animation: trainingPulse 1.8s ease-in-out infinite;
}

.training-progress-ring span {
  font-size: 0.72rem;
  font-weight: 950;
  color: #f5c542;
}

@keyframes trainingPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.future-item-card strong {
  color: #f5c542;
}

.training-queue-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.training-queue-card.is-queued .training-ring-card {
  grid-template-columns: 1fr;
}

.queue-timing {
  display: grid;
  gap: 0.15rem;
}

.training-queue-card.is-queued .queue-title {
  display: block;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

.training-queue-card form {
  margin-top: 0.45rem;
}

.training-queue-card button {
  width: 100%;
  min-height: 38px;
  white-space: normal;
}

.academy-scout-report {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 0.75rem;
  align-items: center;
  margin: 0.75rem 0 1rem;
  padding: 0.9rem;
  border: 1px solid rgba(117, 213, 155, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(117, 213, 155, 0.1), rgba(255, 255, 255, 0.035));
}

.academy-scout-report h3 {
  margin: 0.1rem 0;
}

.academy-scout-report > span {
  display: grid;
  gap: 0.15rem;
  min-width: 150px;
  padding: 0.65rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.18);
  color: #c8d3cd;
}

.academy-scout-report strong {
  color: #9ee7b9;
}

.staff-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.3fr) minmax(110px, 0.8fr) minmax(120px, 0.8fr) 80px 80px;
  gap: 0.75rem;
  align-items: center;
}

.staff-row-head {
  color: #f5c542;
  font-weight: 900;
  text-transform: uppercase;
}

.staff-row small {
  display: block;
  color: #a9b8b0;
  font-weight: 700;
}

.player-row {
  display: grid;
  gap: 0.75rem;
}

.player-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0.5rem;
}

.player-stat-grid span {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 0.5rem;
}

.player-stat-grid form {
  display: grid;
  grid-template-columns: minmax(64px, 1fr) 34px;
  gap: 0.4rem;
  margin: 0;
}

.player-stat-grid input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 0.45rem;
  background: #101416;
  color: #f3f7f5;
}

.player-stat-grid button {
  width: 34px;
  height: 34px;
  padding: 0;
}

button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.profile-record {
  grid-template-columns: repeat(4, 1fr);
}

.record-groups,
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.mode-card {
  display: block;
  border-radius: 6px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.mode-card:not(.mode-card-disabled):hover {
  background: rgba(245, 197, 66, 0.12);
}

.mode-card-disabled {
  opacity: 0.72;
}

.profile-stats {
  margin-top: 1rem;
}

.profile-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.profile-record span,
.upgrade-row,
.standing-row,
.result-row {
  border-radius: 6px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
}

.profile-record strong {
  display: block;
  font-size: 1.7rem;
}

.honor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.65rem;
}

.honor-grid article,
.founding-member-badge {
  display: grid;
  gap: 0.25rem;
  border: 1px solid rgba(245, 197, 66, 0.35);
  border-radius: 6px;
  padding: 0.85rem;
  background:
    radial-gradient(circle at 18% 10%, rgba(245, 197, 66, 0.16), transparent 36%),
    rgba(245, 197, 66, 0.08);
}

.honor-art {
  grid-template-columns: 54px 1fr !important;
  align-items: center;
  min-height: 86px;
}

.honor-art > span:last-child {
  display: grid;
  gap: 0.2rem;
}

.honor-icon {
  width: 48px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 12px 12px 16px 16px;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 -8px 0 rgba(255, 255, 255, 0.035);
  clip-path: polygon(50% 0, 94% 20%, 84% 78%, 50% 100%, 16% 78%, 6% 20%);
  background: rgba(0, 0, 0, 0.28);
}

.honor-icon svg {
  width: 25px;
  height: 25px;
}

.honor-league { color: #f5c542; }
.honor-cup { color: #d7e6ff; }
.honor-promotion { color: #75d59b; }
.honor-individual { color: #c8a7ff; }
.honor-special { color: #ff9f70; }

.cup-payout-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  width: fit-content;
  border: 1px solid rgba(117, 213, 155, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  color: #9ee7b9;
  background: rgba(117, 213, 155, 0.08);
  font-weight: 850;
}

.cup-payout-summary svg {
  width: 14px;
  height: 14px;
  color: #f5c542;
}

.sponsorship-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}

.sponsorship-grid article,
.active-sponsorship {
  display: grid;
  gap: 0.55rem;
  border: 1px solid #34444a;
  border-radius: 6px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.045);
}

.sponsorship-grid article {
  grid-template-rows: auto auto 1fr auto auto auto;
  position: relative;
  overflow: hidden;
}

.sponsorship-grid article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, hsl(var(--sponsor-hue) 72% 62%), transparent);
}

.sponsor-rarity-badge {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  background: rgba(255, 255, 255, 0.07);
  color: #f3f7f5;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.sponsor-rarity-rare {
  border-color: rgba(119, 183, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(119, 183, 255, 0.08);
}

.sponsor-rarity-rare::before {
  background: linear-gradient(90deg, #77b7ff, hsl(var(--sponsor-hue) 72% 62%), transparent);
}

.sponsor-rarity-epic {
  border-color: rgba(200, 167, 255, 0.58);
  box-shadow: inset 0 0 0 1px rgba(200, 167, 255, 0.12), 0 0 18px rgba(200, 167, 255, 0.1);
}

.sponsor-rarity-epic::before {
  background: linear-gradient(90deg, #c8a7ff, #f5c542, hsl(var(--sponsor-hue) 72% 62%));
}

.sponsor-rarity-rare .sponsor-rarity-badge {
  border-color: rgba(119, 183, 255, 0.45);
  color: #a9d2ff;
}

.sponsor-rarity-epic .sponsor-rarity-badge {
  border-color: rgba(200, 167, 255, 0.55);
  color: #dcc7ff;
}

.sponsorship-grid article > span:not(.sponsor-logo),
.sponsorship-grid article small {
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
}

.sponsor-relationship {
  border: 1px solid rgba(245, 197, 66, 0.22);
  color: #f5df86;
}

.sponsor-loyalty-meter {
  display: block;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.sponsor-loyalty-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #57d68d, #f5c542);
}

.sponsor-history-grid,
.sponsor-contract-list {
  display: grid;
  gap: 0.75rem;
}

.sponsor-history-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.sponsor-history-card,
.sponsor-contract-list article {
  display: grid;
  gap: 0.5rem;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.sponsor-history-card > div,
.sponsor-contract-list article {
  align-items: center;
}

.sponsor-history-card > div {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.sponsor-contract-list article {
  grid-template-columns: minmax(180px, 1fr) repeat(4, auto);
}

.admin-dashboard-section {
  position: relative;
  border-top: 3px solid rgba(245, 197, 66, 0.38);
}

.admin-dashboard-section + .admin-dashboard-section {
  margin-top: 1.15rem;
}

.sponsor-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 2px solid hsl(var(--sponsor-hue) 72% 62%);
  border-radius: 6px;
  background:
    linear-gradient(145deg, hsl(var(--sponsor-hue) 58% 34%), hsl(calc(var(--sponsor-hue) + 35) 55% 18%));
  color: #fff;
  font-size: 1rem;
  font-weight: 950;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.sponsorship-grid h3,
.active-sponsorship h3 {
  margin: 0;
  color: #f5c542;
}

.sponsorship-grid form,
.sponsorship-grid button {
  width: 100%;
}

.active-sponsorship {
  grid-template-columns: 58px minmax(220px, 1fr) auto;
  align-items: center;
  border-color: rgba(87, 199, 133, 0.55);
}

.tutorial-panel {
  border-color: rgba(245, 197, 66, 0.48);
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.1), rgba(255, 255, 255, 0.025));
}

.tutorial-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.tutorial-heading h2 {
  margin: 0.2rem 0 0;
}

.tutorial-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #101416;
  border: 1px solid #34444a;
  margin-top: 0.9rem;
}

.tutorial-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #57c785, #f5c542);
  transition: width 260ms ease;
}

.tutorial-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.tutorial-steps a,
.onboarding-card {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  border: 1px solid #34444a;
  border-radius: 6px;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
}

.tutorial-steps a {
  color: #f3f7f5;
  text-decoration: none;
}

.tutorial-steps a:hover {
  border-color: #f5c542;
}

.tutorial-steps a > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f5c542;
  color: #111;
  font-weight: 950;
}

.tutorial-steps small {
  color: #a9b8b0;
}

.reward-panel {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

.reward-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.5rem;
}

.reward-strip span,
.status-pill {
  border: 1px solid #34444a;
  border-radius: 6px;
  padding: 0.55rem;
  background: rgba(255, 255, 255, 0.045);
}

.reward-strip .active {
  border-color: #f5c542;
  color: #f5c542;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.mission-progress {
  display: grid;
  gap: 0.3rem;
}

.mission-progress span {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
}

.mission-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--theme-accent, #f5c542), var(--theme-accent-2, #ff7a2f));
}

.mission-progress small {
  color: var(--theme-muted, #c8d3cd);
  font-variant-numeric: tabular-nums;
}

.mission-streak {
  display: grid;
  gap: 0.15rem;
}

.mission-streak span {
  color: var(--theme-accent, #f5c542);
  font-size: 0.74rem;
}

.mission-period-monthly {
  border-color: color-mix(in srgb, var(--theme-accent-2, #ff7a2f) 52%, rgba(255, 255, 255, 0.12));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--theme-accent-2, #ff7a2f) 11%, transparent), transparent 58%),
    rgba(255, 255, 255, 0.045);
}

.mission-period-monthly::before {
  content: "Monthly";
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--theme-accent-2, #ff7a2f) 50%, transparent);
  border-radius: 999px;
  padding: 0.14rem 0.5rem;
  color: var(--theme-accent-2, #ff7a2f);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.onboarding-card {
  color: #f3f7f5;
}

.onboarding-card.is-complete {
  border-color: rgba(87, 199, 133, 0.55);
}

.onboarding-card form {
  margin-top: 0.35rem;
}

.onboarding-card button,
.reward-panel button {
  width: 100%;
}

.status-pill {
  display: inline-block;
  width: fit-content;
  color: #57c785;
  font-size: 0.85rem;
  font-weight: 900;
}

.rename-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr);
  gap: 1rem;
  border: 1px solid #34444a;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.04);
}

.auth-help {
  margin-top: 1rem;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #34444a;
  border-left: 4px solid var(--position-color, #f5c542);
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
}

.player-card-gk { --position-color: #f5c542; }
.player-card-df { --position-color: #57c785; }
.player-card-mf { --position-color: #62a7ff; }
.player-card-fw { --position-color: #ff786f; }

.player-card-summary {
  display: grid;
  gap: 0.65rem;
}

.player-card-header {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 58px;
  gap: 0.75rem;
  align-items: center;
}

.player-avatar {
  width: 62px;
  height: 72px;
  display: grid;
  place-content: center;
  gap: 0.15rem;
  border-radius: 6px;
  background: linear-gradient(145deg, var(--position-color), rgba(0, 0, 0, 0.45));
  color: #fff;
  text-align: center;
}

.player-avatar strong {
  font-size: 1.15rem;
}

.player-card-name h3,
.player-card-name p {
  margin: 0;
}

.player-number {
  color: var(--position-color);
  font-weight: 950;
}

.player-overall {
  display: grid;
  justify-items: center;
  border-radius: 6px;
  padding: 0.55rem;
  background: rgba(0, 0, 0, 0.3);
}

.player-overall strong {
  font-size: 1.5rem;
  color: var(--position-color);
}

.player-overall strong.effective-stat-down {
  color: #ff5555;
}

.player-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.player-card-tags span {
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.78rem;
  font-weight: 800;
}

.matchday-stadium {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #111;
}

.matchday-stadium::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("brand/matchday-stadium.b54f673e4775.webp") center top / cover no-repeat;
  opacity: 0.32;
}

.matchday-stadium::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(rgba(13, 20, 22, 0.55), rgba(13, 20, 22, 0.94) 42%, #11191b 75%);
}

.league-form {
  display: inline-flex;
  gap: 0.22rem;
}

.league-form b {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 0.68rem;
}

.form-w { background: #2f9f62; }
.form-d { background: #7d8a90; }
.form-l { background: #c84d4d; }

.active-sponsorship > div:last-child {
  display: grid;
  gap: 0.35rem;
  text-align: right;
}

.position-arrow {
  display: inline-flex;
  min-width: 32px;
  justify-content: center;
  margin-left: 0.35rem;
  font-size: 0.78rem;
}

.position-up { color: #75d59b; }
.position-down { color: #ff8a80; }
.position-level { color: #829198; }

.league-standing-row {
  position: relative;
  overflow: hidden;
}

.league-standing-row.movement-up {
  animation: tableRise 550ms ease-out;
}

.league-standing-row.movement-down {
  animation: tableDrop 550ms ease-out;
}

.league-standing-row.promotion-spot {
  box-shadow: inset 4px 0 0 #75d59b;
}

.league-standing-row.champion-spot {
  box-shadow: inset 4px 0 0 #75d59b;
}

.league-standing-row.relegation-spot {
  box-shadow: inset 4px 0 0 #ff8a80;
}

.position-arrow {
  animation: arrowPop 700ms ease-out;
}

@keyframes tableRise {
  from { transform: translateY(7px); background: rgba(87, 199, 133, 0.16); }
  to { transform: translateY(0); }
}

@keyframes tableDrop {
  from { transform: translateY(-7px); background: rgba(255, 89, 89, 0.14); }
  to { transform: translateY(0); }
}

@keyframes arrowPop {
  0% { transform: scale(0.8); opacity: 0.4; }
  55% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}

.season-archive {
  display: grid;
  gap: 0.75rem;
}

.season-archive > details {
  border: 1px solid #34444a;
  border-radius: 6px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.035);
}

.season-archive summary {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem;
  cursor: pointer;
}

.archive-awards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.archive-awards span {
  border-radius: 4px;
  padding: 0.45rem 0.65rem;
  background: rgba(245, 197, 66, 0.1);
}

.founding-member-badge {
  margin-bottom: 0.75rem;
  border-color: #f5c542;
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.2), rgba(255, 255, 255, 0.04));
}

.founding-member-badge strong,
.honor-grid strong {
  color: #f5c542;
}

.mobile-compact-details summary {
  cursor: pointer;
  font-weight: 900;
  color: #f5c542;
}

.mobile-compact-details[open] summary {
  margin-bottom: 0.65rem;
}

.league-standing-row {
  grid-template-columns: minmax(180px, 1fr) auto auto auto auto auto;
}

.fixture-calendar {
  margin-top: 1rem;
  border-top: 1px solid #34444a;
  padding-top: 0.85rem;
}

.fixture-calendar summary {
  cursor: pointer;
  color: #f5c542;
  font-weight: 900;
}

.fixture-list,
.achievement-grid {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.fixture-row {
  display: grid;
  grid-template-columns: 110px minmax(220px, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  border-radius: 6px;
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
}

.rival-record,
.rival-pending {
  grid-column: 1 / -1;
}

.rival-record {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  border-top: 1px solid rgba(245, 197, 66, 0.3);
  padding-top: 0.65rem;
  color: #f5c542;
}

.achievement-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(360px, 1.5fr);
  gap: 1rem;
  border: 1px solid #34444a;
  border-radius: 6px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.035);
}

.achievement-card h2 {
  margin-top: 0;
}

.achievement-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.achievement-tiers section {
  display: grid;
  gap: 0.25rem;
  border-radius: 6px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
}

.achievement-tiers section.is-earned {
  border: 1px solid #57c785;
  background: rgba(87, 199, 133, 0.12);
}

.achievement-tiers b {
  color: #a9b8b0;
}

.achievement-tiers .is-earned b {
  color: #9bd4b1;
}

.score-pop {
  animation: score-pop 420ms ease-out;
}

@keyframes score-pop {
  0% { transform: scale(1); color: #f5c542; }
  45% { transform: scale(1.32); color: #ffffff; text-shadow: 0 0 18px rgba(245, 197, 66, 0.8); }
  100% { transform: scale(1); color: #f5c542; }
}

.upgrade-row,
.standing-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem;
  align-items: center;
}

.result-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.65rem;
}

.match-result-row {
  grid-template-columns: minmax(84px, 0.6fr) minmax(140px, 1fr) auto;
}

.match-result-head {
  background: rgba(245, 197, 66, 0.12);
  color: #f5c542;
  font-weight: 900;
  text-transform: uppercase;
}

.result-row small {
  color: #a9b8b0;
  font-weight: 800;
}

.standings {
  display: grid;
  gap: 0.55rem;
}

.league-table {
  display: grid;
  gap: 0.45rem;
}

.league-table-head,
.league-table-row {
  display: grid;
  grid-template-columns: 126px minmax(300px, 1fr) 54px 92px 70px 64px 168px;
  gap: 0.75rem;
  align-items: center;
}

.league-table-head {
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(245, 197, 66, 0.18);
  border-radius: 6px;
  background: rgba(245, 197, 66, 0.1);
  color: #f5c542;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.league-table-row {
  min-height: 54px;
  padding: 0.58rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  background: #222c2f;
}

.league-position {
  display: grid;
  grid-template-columns: 36px 58px;
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
}

.league-position strong {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.22);
  color: #f3f7f5;
}

.position-arrow {
  font-variant-numeric: tabular-nums;
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.league-club-name {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.league-club-crest {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
}

.league-club-crest .club-crest,
.league-club-crest .club-crest-image {
  width: 34px;
  height: 34px;
  max-width: 34px;
  max-height: 34px;
  object-fit: contain;
  object-position: center;
}

.league-table-row > span:not(.league-position):not(.league-form),
.league-table-row > strong.league-points {
  font-variant-numeric: tabular-nums;
}

.league-points {
  justify-self: start;
  color: #f5c542;
}

.daily-reward-popup {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.62);
  animation: rewardBackdrop 180ms ease-out;
}

.tutorial-walkthrough-overlay {
  position: fixed;
  z-index: 420;
  right: 1rem;
  bottom: 1rem;
  width: min(420px, calc(100% - 2rem));
}

.tutorial-walkthrough-card {
  position: relative;
  display: grid;
  gap: 0.7rem;
  max-height: min(620px, calc(100dvh - 2rem));
  overflow: auto;
  padding: 1rem;
  border: 1px solid rgba(245, 197, 66, 0.42);
  border-radius: 8px;
  background: #172225;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}

.tutorial-walkthrough-card ol {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.2rem;
}

.tutorial-walkthrough-card li {
  padding: 0.6rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.tutorial-walkthrough-card li span,
.tutorial-walkthrough-card li small {
  display: block;
  color: #b9c9c4;
}

.daily-reward-card {
  width: min(620px, 100%);
  position: relative;
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem;
  border: 1px solid var(--theme-border-strong, rgba(245, 197, 66, 0.55));
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--theme-accent, #f5c542) 22%, transparent), transparent 34%),
    var(--theme-bg-soft, #172225);
  color: var(--theme-text, #eef5f2);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65), 0 0 34px color-mix(in srgb, var(--theme-accent, #f5c542) 14%, transparent);
  animation: rewardPop 320ms cubic-bezier(.2, 1.35, .35, 1);
}

.daily-reward-card form {
  margin-top: 0.2rem;
}

.daily-reward-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
}

.compact-reward-strip {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.daily-reward-roadmap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.daily-reward-roadmap > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.daily-reward-roadmap .daily-reward-finale {
  grid-template-columns: 1fr;
}

.daily-reward-roadmap .daily-reward-finale span {
  min-height: 92px;
  border-color: var(--theme-accent, #f5c542);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-accent, #f5c542) 22%, transparent), transparent 52%),
    color-mix(in srgb, var(--theme-bg-raised, #202b2f) 88%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 22px color-mix(in srgb, var(--theme-accent, #f5c542) 12%, transparent);
}

.daily-reward-roadmap .daily-reward-finale strong {
  font-size: 1.15rem;
}

.team-shop-callout {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 0.75rem;
  color: var(--theme-text, #f3f7f5);
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.team-shop-callout:hover {
  border-color: color-mix(in srgb, var(--theme-accent, #f5c542) 48%, rgba(255, 255, 255, 0.12));
  background: color-mix(in srgb, var(--theme-accent, #f5c542) 7%, var(--theme-panel, #1c2435));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--theme-accent, #f5c542) 10%, transparent);
}

.team-shop-callout svg {
  color: var(--theme-accent, #f5c542);
}

.team-shop-callout strong {
  font-size: 1.2rem;
}

.pricing-page {
  display: grid;
  gap: 1rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.pricing-grid article {
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid var(--theme-border, rgba(245, 197, 66, 0.22));
  border-radius: 8px;
  background: color-mix(in srgb, var(--theme-bg-raised, #202b2f) 84%, transparent);
}

.pricing-grid article > span {
  color: var(--theme-accent, #f5c542);
  font-size: 1.65rem;
  font-weight: 950;
}

.pricing-grid form,
.pricing-grid button {
  width: 100%;
}

.compact-reward-strip span {
  min-width: 0;
  align-content: start;
  border-radius: 7px;
  line-height: 1.15;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.multi-club-overview,
.digest-status-panel {
  display: grid;
  gap: 1rem;
}

.multi-club-table {
  display: grid;
  gap: 0.55rem;
}

.multi-club-table article {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) repeat(5, minmax(92px, 1fr)) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--theme-border, rgba(245, 197, 66, 0.22));
  border-radius: 8px;
  background: color-mix(in srgb, var(--theme-bg-raised, #202b2f) 82%, transparent);
}

.multi-club-table article.active {
  border-color: var(--theme-accent, #f5c542);
}

.digest-preference-form,
.digest-status-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.digest-preference-form label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 900;
}

.digest-status-grid span {
  display: grid;
  gap: 0.2rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--theme-border, rgba(245, 197, 66, 0.22));
  border-radius: 8px;
  background: color-mix(in srgb, var(--theme-bg-raised, #202b2f) 82%, transparent);
}

.compact-reward-strip span strong {
  font-size: 0.9rem;
}

.regional-eligibility-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(245, 197, 66, 0.35);
  border-radius: 7px;
  background: rgba(245, 197, 66, 0.08);
}

.regional-eligibility-card > div {
  display: grid;
  gap: 0.35rem;
}

.regional-eligibility-card > strong {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  background: #f5c542;
  color: #111;
}

.bracket-connector {
  min-height: 44px;
  align-self: stretch;
  background:
    linear-gradient(#f5c542, #f5c542) center / 2px 100% no-repeat,
    linear-gradient(#f5c542, #f5c542) center / 100% 2px no-repeat;
  opacity: 0.65;
}

.notice-card {
  margin: 1rem 0;
  padding: 0.9rem;
  border: 1px solid #34444a;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.staff-nav a {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
}

.staff-nav svg {
  width: 17px;
  height: 17px;
  color: #f5c542;
}

@keyframes rewardBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes rewardPop {
  from { transform: translateY(14px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.chat-toggle {
  justify-self: stretch;
  align-self: stretch;
  width: 100%;
  min-height: 0;
  padding: 0.65rem 0.7rem;
  background: #263238;
  color: #f3f7f5;
  white-space: nowrap;
}

.chat-panel.is-collapsed .chat-toggle {
  min-height: 48px;
  border: 1px solid rgba(245, 197, 66, 0.35);
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.22), #263238);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.36);
}

.chat-panel.is-collapsed .chat-toggle::before {
  content: "Chat";
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.45rem;
  color: #f5c542;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.chat-panel.is-collapsed {
  grid-template-rows: auto auto;
}

.chat-panel.is-collapsed #chatFeed,
.chat-panel.is-collapsed .chat-form,
.chat-panel.is-collapsed .chat-tools,
.chat-panel.is-collapsed .emoji-picker,
.chat-panel.is-collapsed .gif-picker {
  display: none;
}

.gif-picker {
  display: grid;
  gap: 0.6rem;
  border: 1px solid #34444a;
  border-radius: 6px;
  padding: 0.65rem;
  background: #101416;
}

.gif-picker[hidden] { display: none; }

.gif-search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
}

.gif-search-form input {
  min-width: 0;
  border: 1px solid #34444a;
  border-radius: 6px;
  padding: 0.6rem;
  background: #0d1214;
  color: #fff;
}

.gif-results {
  max-height: 280px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  overflow-y: auto;
}

.gif-results button {
  min-height: 80px;
  padding: 0;
  overflow: hidden;
  background: #202a2e;
}

.gif-results img,
.chat-gif {
  width: 100%;
  max-height: 220px;
  display: block;
  object-fit: cover;
  border-radius: 5px;
}

.chat-context-menu {
  position: absolute;
  z-index: 40;
  top: 3.35rem;
  left: 0.75rem;
  min-width: 168px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 0.35rem;
  background: #101416;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
}

.chat-context-menu[hidden] {
  display: none;
}

.chat-context-menu a,
.chat-context-menu button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 4px;
  padding: 0.55rem 0.65rem;
  background: transparent;
  color: #a9d6ff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.chat-context-menu a:hover,
.chat-context-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.danger-text {
  color: #ff8a80;
}

.supporter-page {
  text-align: center;
}

.supporter-page h1 {
  max-width: 820px;
  margin: 0 auto 1rem;
  font-size: clamp(2rem, 5vw, 4rem);
}

.supporter-page p {
  max-width: 980px;
  margin-inline: auto;
  color: #d7dfdb;
}

.team-shop-page > h1 { margin-bottom: 0.35rem; }
.team-shop-page > .muted { margin-bottom: 1rem; }

.supporter-purchase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.premium-shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.shop-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.shop-status span {
  border: 1px solid #354348;
  padding: 8px 10px;
  background: #1d262a;
}

.premium-shop-grid article {
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid #354348;
  padding: 16px;
  background: #242e32;
}

.premium-shop-grid form {
  margin-top: auto;
}

.shop-item-art {
  min-height: 116px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--shop-accent, #f5c542) 52%, #354348);
  border-radius: 6px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--shop-accent, #f5c542) 24%, #20292d), #111719 72%);
}

.shop-item-art::before,
.shop-item-art::after {
  content: "";
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--shop-accent, #f5c542) 48%, transparent);
  transform: rotate(45deg);
}

.shop-item-art::before { width: 82px; height: 82px; }
.shop-item-art::after { width: 62px; height: 62px; }
.shop-item-art svg {
  z-index: 1;
  width: 46px;
  height: 46px;
  color: var(--shop-accent, #f5c542);
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.5));
}

.shop-art-energy_refill { --shop-accent: #f5c542; }
.shop-art-sports_drink { --shop-accent: #55d6be; }
.shop-art-sports_drink_12h { --shop-accent: #42c9b0; }
.shop-art-sports_drink_24h { --shop-accent: #27b99f; }
.shop-art-fitness_kit { --shop-accent: #57d68d; }
.shop-art-morale_boost { --shop-accent: #ff7eb6; }
.shop-art-fast_energy { --shop-accent: #54c7ec; }
.shop-art-energy_drink_1h { --shop-accent: #80d9f2; }
.shop-art-energy_drink_4h { --shop-accent: #279fc8; }
.shop-art-training_speed { --shop-accent: #b59cff; }
.shop-art-injury_reduction { --shop-accent: #ff756d; }
.shop-art-sponsor_boost { --shop-accent: #6ee7b7; }
.shop-art-xp_boost { --shop-accent: #f7b955; }
.shop-art-queue_slot { --shop-accent: #9ec5ff; }

.inventory-panel { margin-top: 1rem; }
.inventory-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.inventory-heading h2,
.inventory-item h3,
.inventory-item p { margin: 0; }
.permanent-item-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.permanent-item-status span {
  border: 1px solid #354348;
  padding: 8px 10px;
  background: #20292d;
}
.inventory-grid { display: grid; gap: 10px; }
.inventory-item {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid #354348;
  padding: 12px;
  background: #242e32;
}
.inventory-item .shop-item-art { min-height: 82px; }
.inventory-item .shop-item-art svg { width: 36px; height: 36px; }
.inventory-item > div:nth-child(2) { display: grid; gap: 5px; }
.active-item-status { color: #57d68d; font-weight: 900; }

.analytics-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 24px;
}

.analytics-summary article,
.distribution-list > div {
  border: 1px solid #354348;
  padding: 13px;
  background: #242e32;
}

.analytics-summary article {
  display: grid;
  gap: 5px;
}

.analytics-summary span,
.distribution-list span { color: #b7c6c0; }
.analytics-summary strong { color: #f5c542; font-size: 1.45rem; }
.analytics-table { display: grid; border: 1px solid #354348; }
.analytics-row {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 12px;
  padding: 11px 13px;
  border-bottom: 1px solid #354348;
}
.analytics-row:last-child { border-bottom: 0; }
.audit-table .analytics-row {
  grid-template-columns: minmax(115px, 0.6fr) minmax(160px, 1fr) minmax(90px, 0.6fr) minmax(220px, 2fr);
}
.audit-table small {
  display: block;
  color: #a9b8b0;
}
.balance-simulator {
  margin: 1.25rem 0;
  border: 1px solid #354348;
  border-radius: 6px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.035);
}
.simulator-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem;
  align-items: end;
}
.simulator-form input {
  width: 100%;
}
.compact-summary {
  margin-top: 1rem;
}
.skeleton-block {
  position: relative;
  min-height: 86px;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(90deg, #20292d, #2b363b, #20292d);
  background-size: 220% 100%;
  animation: skeleton-sheen 1.25s ease-in-out infinite;
}
@keyframes skeleton-sheen {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}
.analytics-head { color: #a9b8b0; background: #20292d; font-size: 0.78rem; font-weight: 900; text-transform: uppercase; }
.analytics-geography { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 1rem; }
.distribution-list { display: grid; gap: 8px; }
.distribution-list > div { display: flex; justify-content: space-between; gap: 12px; }
.country-distribution { max-height: 430px; overflow-y: auto; }

.ticket-thread {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.ticket-thread article {
  border-left: 3px solid #65777e;
  padding: 10px;
  background: #1d262a;
}

.ticket-thread article.staff-reply {
  border-left-color: #f5c542;
}

@media (max-width: 900px) {
  .premium-shop-grid { grid-template-columns: 1fr; }
}

.supporter-purchase-grid article {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 0.5rem;
  border: 1px solid #34444a;
  border-radius: 6px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.045);
}

.supporter-state-card.is-unlocked {
  border-color: rgba(87, 214, 141, 0.62);
  background:
    linear-gradient(135deg, rgba(87, 214, 141, 0.12), transparent 45%),
    rgba(255, 255, 255, 0.045);
}

.supporter-state-card.is-locked {
  background:
    linear-gradient(135deg, rgba(245, 197, 66, 0.08), transparent 44%),
    rgba(255, 255, 255, 0.035);
}

.supporter-state-card.is-locked::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, 0.03) 14px 16px);
  pointer-events: none;
}

.supporter-purchase-grid svg { color: #f5c542; }
.supporter-purchase-grid h3,
.supporter-purchase-grid p { margin: 0; }

.sport-cycle {
  min-width: 68px;
  display: inline-block;
  color: #f5c542;
}

.sport-cycle.is-changing {
  animation: sport-word-in 300ms ease-out;
}

@keyframes sport-word-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.perk-list {
  max-width: 760px;
  display: grid;
  gap: 0.65rem;
  margin: 1rem auto;
  padding: 0;
  list-style: none;
  text-align: left;
}

.perk-list li {
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
  background: rgba(245, 197, 66, 0.1);
}

.perk-list li::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  display: inline-block;
  margin-right: 0.65rem;
  background: #f5c542;
  transform: rotate(45deg);
}

.coming-soon {
  max-width: 420px;
  display: grid;
  gap: 0.25rem;
  margin: 1.5rem auto 0;
  border: 1px solid rgba(245, 197, 66, 0.45);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(245, 197, 66, 0.1);
}

.coming-soon strong {
  color: #f5c542;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .topbar {
    position: relative;
    min-height: auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
  }

  .topbar nav {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-start;
    gap: 0.6rem;
  }

  .topbar nav.is-open {
    display: flex;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .topbar nav button,
  .topbar nav a:not(.brand) {
    min-height: 40px;
  }

  .page {
    width: min(100% - 0.75rem, 1120px);
    padding: 1rem 0 calc(6rem + env(safe-area-inset-bottom));
  }

  .panel,
  .form-panel {
    padding: 1rem;
  }

  .game-nav {
    position: fixed;
    z-index: 90;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(72px, 1fr);
    overflow-x: auto;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0.55rem;
    border-radius: 16px;
    background: rgba(18, 27, 30, 0.94);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.52);
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .game-nav a {
    min-height: 58px;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.45rem 0.55rem;
    white-space: nowrap;
    scroll-snap-align: start;
    font-size: 0.74rem;
  }

  .game-nav svg {
    width: 20px;
    height: 20px;
  }

  .club-card h1 {
    font-size: clamp(1.8rem, 9vw, 2.4rem);
  }

  .club-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .moderation-row,
  .ip-ban-form,
  .challenge-form,
  .search-form,
  .challenge-grid,
  .challenge-row,
  .stadium-opponent,
  .resource-bar,
  .staff-row,
  .mode-grid,
  .profile-detail-grid,
  .profile-record,
  .record-groups,
  .upgrade-row,
  .standing-row {
    grid-template-columns: 1fr;
  }

  .resource-bar {
    grid-template-columns: 1fr 1fr;
    padding: 0.8rem 0.85rem;
    gap: 0.65rem;
  }

  .team-sheet-selectors {
    grid-template-columns: 1fr;
  }

  .squad-picker-heading,
  .squad-picker-row {
    grid-template-columns: minmax(0, 1fr) 52px 42px 42px;
    gap: 0.3rem;
    padding: 0.5rem;
  }

  .recruitment-grid,
  .recruitment-grid form {
    grid-template-columns: 1fr;
  }

  .supporter-purchase-grid {
    grid-template-columns: 1fr;
  }

  .game-info-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .level-up-summary {
    grid-template-columns: auto 1fr;
  }

  .level-up-summary button {
    grid-column: 1 / -1;
  }

  .league-tier-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .fitness-management {
    align-items: stretch;
    flex-direction: column;
  }

  .match-squads > div {
    grid-template-columns: 1fr;
  }

  .energy-meter {
    grid-column: 1 / -1;
    grid-template-areas:
      "icon label value"
      "bar bar bar"
      "timer timer timer";
    grid-template-columns: auto 1fr auto;
  }

  .resource-bar > span {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    grid-template-areas:
      "icon label value"
      "track track track";
    min-width: 0;
    gap: 0.25rem 0.45rem;
    border-radius: 6px;
    padding: 0.65rem;
    background: rgba(255, 255, 255, 0.06);
  }

  .resource-bar > span > strong {
    justify-self: end;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .cash-resource {
    grid-template-areas:
      "icon label value"
      "note note note";
  }

  .cash-resource small {
    grid-area: note;
  }

  .credit-resource {
    min-height: 54px;
  }

  .cup-result summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .cup-bracket {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .bracket-connector {
    display: none;
  }

  .bracket-round a {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.35rem;
    padding: 0.7rem 0.55rem;
  }

  .bracket-round a span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .academy-scout-report {
    grid-template-columns: 1fr;
  }

  .player-stat-grid {
    grid-template-columns: 1fr;
  }

  .player-row {
    padding: 0.85rem;
  }

  .mobile-compact-details {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 0.65rem;
  }

  .upgrade-list {
    gap: 0.4rem;
  }

  .upgrade-row {
    gap: 0.45rem;
    padding: 0.65rem;
  }

  .upgrade-row .muted {
    font-size: 0.86rem;
    line-height: 1.3;
  }

  .upgrade-row form,
  .upgrade-row button {
    width: 100%;
  }

  .honor-grid {
    grid-template-columns: 1fr;
  }

  .fixture-row,
  .achievement-card,
  .achievement-tiers {
    grid-template-columns: 1fr;
  }

  .active-sponsorship,
  .season-archive summary,
  .season-recap,
  .season-recap-stats {
    grid-template-columns: 1fr;
  }

  .tutorial-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .tutorial-steps {
    grid-template-columns: 1fr;
  }

  .tutorial-steps a {
    min-height: auto;
  }

  .player-card-header {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
  }

  .player-avatar {
    width: 52px;
    height: 62px;
  }

  .emoji-picker {
    grid-template-columns: repeat(6, 1fr);
  }

  .active-sponsorship > div:last-child {
    text-align: left;
  }

  .fixture-calendar {
    overflow: hidden;
  }

  .fixture-carousel {
    display: flex;
    overflow-x: auto;
    gap: 0.65rem;
    padding: 0.75rem 0 0.35rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .fixture-carousel .fixture-row {
    flex: 0 0 min(82vw, 310px);
    min-height: 145px;
    align-content: center;
    scroll-snap-align: start;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }

  .opponent-identity {
    align-items: flex-start;
  }

  .opponent-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .opponent-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .opponent-action {
    width: 64px;
    min-height: 64px;
  }
}

@media (max-width: 1280px) {
  .page-with-chat {
    grid-template-columns: 1fr;
    width: min(100% - 0.75rem, 1120px);
  }

  .page-with-chat > .chat-panel {
    position: fixed;
    z-index: 100;
    inset: 0.75rem;
    width: auto;
    max-height: calc(100dvh - 1.5rem);
    margin: 0;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    box-shadow: 0 22px 80px rgba(0, 0, 0, 0.72);
  }

  .page-with-chat .chat-feed {
    max-height: none;
  }

  .page-with-chat > .chat-panel.is-collapsed,
  html[data-chat-collapsed="1"] .page-with-chat > .chat-panel {
    inset: auto 0.75rem 0.75rem auto;
    width: min(260px, calc(100% - 1.5rem));
    max-height: none;
    display: block;
    padding: 0.6rem;
  }

  html[data-chat-collapsed="1"] .page-with-chat > .chat-panel #chatFeed,
  html[data-chat-collapsed="1"] .page-with-chat > .chat-panel .chat-form,
  html[data-chat-collapsed="1"] .page-with-chat > .chat-panel .chat-tools,
  html[data-chat-collapsed="1"] .page-with-chat > .chat-panel .emoji-picker,
  html[data-chat-collapsed="1"] .page-with-chat > .chat-panel .gif-picker,
  html[data-chat-collapsed="1"] .page-with-chat > .chat-panel .chat-title {
    display: none;
  }
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body.mobile-chat-open {
    overflow: hidden;
  }

  .toast-stack {
    top: 70px;
    right: 8px;
    width: calc(100vw - 16px);
  }

  .topbar {
    width: 100%;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
  }

  .topbar nav {
    width: 100%;
    justify-content: flex-start;
  }

  .page,
  .page-with-chat {
    width: calc(100% - 1rem);
    display: block;
    margin-inline: auto;
  }

  .page-main,
  .panel,
  .form-panel,
  .stadium-opponent,
  .opponent-identity,
  .opponent-report,
  .opponent-actions,
  .moderation-account {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .stadium-opponent {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "identity"
      "rival"
      "report"
      "actions"
      "feedback";
    overflow: hidden;
    padding: 0.85rem;
  }

  .opponent-identity {
    align-items: center;
  }

  .opponent-identity .club-crest,
  .opponent-identity .club-crest-image {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
  }

  .opponent-status-line {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .opponent-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .opponent-actions {
    display: grid;
    grid-template-columns: repeat(4, 54px);
    justify-content: start;
    gap: 0.4rem;
  }

  .opponent-action {
    width: 54px;
    min-height: 54px;
    justify-self: center;
    padding: 0.35rem;
    font-size: 0.62rem;
  }

  .challenge-control {
    min-width: 0;
  }

  .match-preference,
  .rival-sort-controls {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .moderation-actions {
    grid-template-columns: 1fr;
  }

  .moderation-actions form,
  .admin-account-actions,
  .admin-account-actions form {
    width: 100%;
  }

  .role-row,
  .notification-row,
  .player-leader-row {
    grid-template-columns: 1fr;
  }

  .match-scoreboard {
    grid-template-columns: 1fr;
  }

  .match-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-leader-row .club-crest,
  .player-leader-row .club-crest-image {
    width: 50px;
    height: 50px;
  }

  .page-with-chat > .chat-panel {
    position: fixed;
    z-index: 100;
    inset: 0.5rem;
    width: auto;
    max-height: calc(100dvh - 1rem);
    margin: 0;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    box-shadow: 0 22px 80px rgba(0, 0, 0, 0.72);
  }

  .page-with-chat > .chat-panel.is-collapsed {
    inset: auto 0.5rem calc(5.5rem + env(safe-area-inset-bottom)) auto;
    width: min(230px, calc(100% - 1rem));
    display: block;
    padding: 0.6rem;
  }

  html[data-chat-collapsed="1"] .page-with-chat > .chat-panel {
    inset: auto 0.5rem calc(5.5rem + env(safe-area-inset-bottom)) auto;
    width: min(230px, calc(100% - 1rem));
    max-height: none;
  }

  html[data-chat-collapsed="1"] .page-with-chat > .chat-panel #chatFeed,
  html[data-chat-collapsed="1"] .page-with-chat > .chat-panel .chat-form,
  html[data-chat-collapsed="1"] .page-with-chat > .chat-panel .chat-tools,
  html[data-chat-collapsed="1"] .page-with-chat > .chat-panel .emoji-picker,
  html[data-chat-collapsed="1"] .page-with-chat > .chat-panel .gif-picker,
  html[data-chat-collapsed="1"] .page-with-chat > .chat-panel .chat-title {
    display: none;
  }

  .chat-panel.is-collapsed .chat-title {
    display: none;
  }

  .chat-panel.is-collapsed .chat-toggle {
    min-height: 46px;
  }

  .page-with-chat .chat-feed {
    max-height: none;
  }

  .analytics-summary,
  .analytics-geography {
    grid-template-columns: 1fr;
  }

  .analytics-row {
    grid-template-columns: 1fr repeat(3, minmax(54px, 0.7fr));
    gap: 6px;
    font-size: 0.82rem;
  }

  .inventory-heading { align-items: stretch; flex-direction: column; }
  .inventory-item { grid-template-columns: 72px minmax(0, 1fr); }
  .inventory-item form { grid-column: 1 / -1; }
  .inventory-item form button { width: 100%; }
}
/* Roster, support, and competition presentation */
.roster-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.section-tabs {
  display: flex;
  gap: 6px;
  margin: 16px 0 20px;
  border-bottom: 1px solid #354348;
}
.section-tabs a {
  min-width: 112px;
  padding: 11px 16px;
  border-bottom: 3px solid transparent;
  color: #b9c9c4;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}
.section-tabs a:hover,
.section-tabs a[aria-current="page"] {
  border-bottom-color: #f5c542;
  color: #f5c542;
  background: rgba(245, 197, 66, 0.07);
}
.roster-controls select { width: min(280px, 100%); }
.toggle-control { display: inline-flex; align-items: center; gap: 8px; }
.fitness-legend { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
.fitness-legend span { border: 1px solid currentColor; padding: 4px 8px; font-size: 12px; font-weight: 800; }
.fitness-legend .fresh, .fitness-number.fresh { color: #57d68d; }
.fitness-legend .ready, .fitness-number.ready { color: #d7df58; }
.fitness-legend .tired, .fitness-number.tired { color: #ffae42; }
.fitness-legend .critical, .fitness-number.critical { color: #ff5959; }
.fitness-bar.fresh i { background: #57d68d; }
.fitness-bar.ready i { background: #d7df58; }
.fitness-bar.tired i { background: #ffae42; }
.fitness-bar.critical i { background: #ff5959; }
.rotation-assistant {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #344348;
  background: #172125;
}
.rotation-recommendations {
  display: grid;
  gap: 0.65rem;
}
.rotation-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr) minmax(120px, auto);
  gap: 0.85rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid rgba(245, 197, 66, 0.18);
  background: #202b2f;
}
.rotation-card span {
  display: grid;
  min-width: 0;
  gap: 0.15rem;
}
.rotation-card small {
  color: #b9c9c4;
}
.rotation-card em {
  justify-self: end;
  color: #f5c542;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}
.player-shirt-thumb, .player-shirt {
  position: relative; display: inline-grid; place-items: center; color: #fff;
  background: linear-gradient(90deg, var(--shirt-primary) 0 62%, var(--shirt-secondary) 62%);
  clip-path: polygon(17% 10%, 34% 0, 43% 12%, 57% 12%, 66% 0, 83% 10%, 100% 30%, 82% 43%, 82% 100%, 18% 100%, 18% 43%, 0 30%);
}
.player-shirt-thumb { width: 34px; height: 38px; margin-right: 8px; vertical-align: middle; }
.player-shirt-thumb b { font-size: 11px; }
.player-shirt { border-radius: 0; }
.stat-values { display: inline-flex !important; grid-template-columns: none !important; gap: 7px; align-items: baseline; margin-left: 5px; }
.base-stat-modified { color: #f3f7f5; text-decoration: line-through; text-decoration-color: #9aa4a8; }
.effective-stat-down { color: #ff5555; font-weight: 900; }
.effective-stat-up { color: #57d68d; font-weight: 900; }
.rival-intensity { display: inline-block; margin-left: 6px; padding: 2px 7px; border: 1px solid currentColor; font-size: 11px; text-transform: uppercase; }
.rival-intensity.new { color: #9fb9c2; }
.rival-intensity.growing { color: #f5c542; }
.rival-intensity.heated { color: #ff8a36; }
.rival-intensity.fierce { color: #ff4d4d; }
.guide-page { max-width: 980px; }
.rule-list { display: grid; gap: 12px; }
.rule-list li, .guide-grid article, .staff-ticket, .ticket-row { background: #242e32; border: 1px solid #354348; padding: 16px; }
.rule-list li span { display: block; margin-top: 4px; color: #b9c9c4; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.guide-grid article > span { color: #f5c542; font-weight: 900; }
.guide-grid h2 { margin: 5px 0; font-size: 20px; }
.ticket-form, .staff-ticket form { display: grid; gap: 10px; }
.ticket-row { display: block; margin-bottom: 10px; }
.ticket-row summary { display: flex; justify-content: space-between; gap: 12px; }
.ticket-response, .media-prediction { border-left: 3px solid #f5c542; background: #20292d; padding: 12px; }
.media-prediction {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 12px 0;
}
.media-prediction svg {
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
}
.media-prediction span { display: grid; gap: 3px; }
.challenge-feedback { display: block; min-height: 1.2em; color: #b9c9c4; text-align: right; overflow-wrap: anywhere; }
.challenge-feedback a { color: #f5c542; }
.shop-feedback { display: block; min-height: 1.25em; margin-top: 8px; color: #b9c9c4; font-size: 13px; }
.regional-ranking-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.region-ranking-card { background: #1b2529; border: 1px solid #344348; padding: 14px; }
.award-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.award-season-card { margin-bottom: 16px; }
.award-card { background: #222c30; border: 1px solid #354348; padding: 14px; display: grid; gap: 5px; }
.regional-cup-badge { color: #f5c542; border: 1px solid #705f23; padding: 2px 7px; width: max-content; text-transform: uppercase; font-weight: 900; }
.facility-build-track {
  display: block;
  height: 8px;
  background: #111719;
  border: 1px solid #344348;
  border-radius: 999px;
  margin-top: 10px;
  overflow: hidden;
}
.facility-build-track i { display: block; height: 100%; background: linear-gradient(90deg, #f5c542, #57d68d); }
.facility-queue-card {
  border-left: 4px solid #f5c542;
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.09), transparent 38%), #202b2f;
}
.facility-queue-card .queue-title::before {
  content: "Construction";
  display: inline-block;
  margin-right: 0.45rem;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: rgba(245, 197, 66, 0.16);
  color: #f5c542;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: 0.12rem;
}
.position-filter-buttons { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.position-filter-buttons button { min-height: 36px; padding: 7px 10px; }
.position-filter-buttons button[aria-pressed="true"],
.position-filter-buttons a[aria-current="page"] { background: #f5c542; color: #111719; }
.player-list.is-compact .player-card {
  grid-template-columns: minmax(220px, 0.9fr) minmax(320px, 1.4fr);
  align-items: start;
  padding: 0.75rem;
  border-left-width: 3px;
}
.player-list.is-compact .player-card-summary {
  gap: 0.45rem;
}
.player-list.is-compact .player-card-header {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.player-list.is-compact .player-card-tags,
.player-list.is-compact .fitness-row {
  margin-top: 0;
}
.player-list.is-compact .mobile-compact-details {
  margin-top: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 0.75rem;
}
.player-list.is-compact .player-stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.45rem;
}
.player-list.is-compact .player-stat-grid > span {
  padding: 0.55rem;
}
@media (max-width: 980px) {
  .player-list.is-compact .player-card {
    grid-template-columns: 1fr;
  }
  .player-list.is-compact .mobile-compact-details {
    border-left: 0;
    padding-left: 0;
  }
  .rotation-card {
    grid-template-columns: 1fr;
  }
  .rotation-card em {
    justify-self: start;
    text-align: left;
  }
}
.stadium-opponent { transition: transform .18s ease, border-color .18s ease; }
.stadium-opponent:hover { transform: translateY(-1px); border-color: #f5c542; }
.rival-record { border-top: 1px solid rgba(245,197,66,.25); padding-top: 8px; }
.opponent-actions {
  min-width: max-content;
}
@media (max-width: 1180px) {
  .stadium-opponent {
    grid-template-columns: minmax(160px, 0.8fr) minmax(260px, 1.2fr);
    grid-template-areas:
      "identity report"
      "rival rival"
      "actions actions"
      "feedback feedback";
  }
  .opponent-actions {
    justify-content: end;
  }
  .challenge-feedback {
    text-align: right;
  }
}
@media (max-width: 980px) {
  .stadium-opponent {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "identity"
      "report"
      "rival"
      "actions"
      "feedback";
  }
  .opponent-actions {
    justify-content: start;
  }
  .challenge-feedback {
    text-align: left;
  }
  .training-queue-grid {
    grid-template-columns: 1fr;
  }
}
.tutorial-overlay {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: min(360px, calc(100vw - 32px));
  background: #172023;
  border: 1px solid #3b4b51;
  outline: 2px solid rgba(245,197,66,.55);
  outline-offset: 4px;
  box-shadow: 0 18px 48px rgba(0,0,0,.35);
  padding: 18px;
}
.tutorial-overlay::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, 0.36);
  pointer-events: none;
}
.tutorial-overlay h2 { margin: 0 0 8px; font-size: 22px; }
.tutorial-overlay p { margin: 0; color: #c5d6d1; }
.tutorial-action {
  width: max-content;
  margin-top: 12px;
}
.tutorial-highlight {
  position: relative;
  z-index: 45;
  outline: 2px solid rgba(245, 197, 66, 0.88);
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(245, 197, 66, 0.11), 0 0 24px rgba(245, 197, 66, 0.22);
  animation: tutorialSpotlightPulse 1.8s ease-in-out infinite;
}
.tutorial-highlight::after {
  content: attr(data-tutorial-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 0.22rem 0.48rem;
  border-radius: 999px;
  background: #f5c542;
  color: #101719;
  font-size: 0.72rem;
  font-weight: 900;
  pointer-events: none;
}
.tutorial-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  min-height: 32px;
  padding: 0;
}

@keyframes tutorialSpotlightPulse {
  0%, 100% {
    outline-color: rgba(245, 197, 66, 0.86);
    box-shadow: 0 0 0 5px rgba(245, 197, 66, 0.09), 0 0 18px rgba(245, 197, 66, 0.18);
  }
  50% {
    outline-color: rgba(255, 231, 143, 1);
    box-shadow: 0 0 0 10px rgba(245, 197, 66, 0.16), 0 0 34px rgba(245, 197, 66, 0.34);
  }
}

.club-switcher-thumb {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  overflow: hidden;
  border-radius: 8px;
}
.club-switcher-thumb .club-crest,
.club-switcher-thumb .club-crest-image {
  width: 30px;
  height: 30px;
  max-width: 30px;
  max-height: 30px;
  object-fit: contain;
}
.club-switcher summary .club-switcher-thumb {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}
.club-switcher summary .club-switcher-thumb .club-crest,
.club-switcher summary .club-switcher-thumb .club-crest-image {
  width: 28px;
  height: 28px;
  max-width: 28px;
  max-height: 28px;
}
.club-switcher-row,
.club-switcher-menu button {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.club-switcher-row.is-locked {
  opacity: 0.62;
  cursor: not-allowed;
}
.club-switcher-row small,
.club-switcher-menu small {
  margin-left: auto;
  color: #f5c542;
  font-size: 0.72rem;
  text-transform: uppercase;
}
.risk-signal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid rgba(245, 197, 66, 0.42);
  background: rgba(245, 197, 66, 0.1);
  color: #f5c542;
  padding: 0.25rem 0.48rem;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}
.moderation-history-list {
  display: grid;
  gap: 0.5rem;
}
.moderation-history-list p {
  display: grid;
  grid-template-columns: 120px 120px minmax(120px, 1fr) minmax(160px, 1.4fr);
  gap: 0.75rem;
  align-items: baseline;
  margin: 0;
  padding: 0.6rem 0.7rem;
  background: #1b2529;
  border: 1px solid #344348;
}
.moderation-history-list time {
  color: #b9c9c4;
  font-size: 0.88rem;
}
.staff-nav,
.subtabs,
.ticket-status-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.subtabs a,
.ticket-status-tabs a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.8rem;
  border: 1px solid #344348;
  background: #202b2f;
  color: #dbe7e3;
  text-decoration: none;
  font-weight: 900;
}
.subtabs a[aria-current="page"],
.ticket-status-tabs a[aria-current="page"] {
  color: #111719;
  background: #f5c542;
  border-color: #f5c542;
}
.daily-reward-card,
.mission-card,
.reward-summary-card {
  overflow-wrap: anywhere;
}
.daily-reward-card h2,
.daily-reward-card p {
  max-width: 100%;
}
.daily-reward-strip,
.daily-reward-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 0.5rem;
}
.daily-reward-day {
  min-width: 0;
  padding: 0.65rem 0.45rem;
}
.profile-trophy-list,
.trophy-cabinet-summary {
  display: grid;
  gap: 0.65rem;
}
.profile-trophy-row,
.badge-polish-card {
  border: 1px solid rgba(245, 197, 66, 0.38);
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.08), transparent 42%), #202b2f;
  padding: 0.85rem;
}
.timeline-event i,
.match-timeline-event i {
  color: #f5c542;
  flex: 0 0 auto;
}
.club-founded-date {
  color: #c5d6d1;
  font-weight: 800;
  margin-top: 0.25rem;
}
.guide-search {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0 0.75rem;
  max-width: 720px;
}
.guide-search span {
  color: #f5c542;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.guide-results-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 1rem;
  color: #c5d6d1;
}
.guide-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
}

.guide-category-chips button {
  min-height: 36px;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--theme-border, #344348);
  border-radius: 999px;
  background: var(--theme-bg-raised, #202b2f);
  color: var(--theme-text, #eef5f2);
}

.guide-category-chips button.active {
  border-color: var(--theme-accent, #f5c542);
  background: var(--theme-accent, #f5c542);
  color: var(--theme-accent-text, #111719);
}
.searchable-guide article[hidden] {
  display: none;
}

.guide-search-highlight {
  border-radius: 4px;
  padding: 0 0.12rem;
  background: rgba(245, 197, 66, 0.32);
  color: #fff4c5;
}

.guide-grid article {
  min-height: 100%;
}
.guide-grid article span:first-child {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #f5c542;
  color: #111719;
  font-weight: 950;
}
.launch-reset-panel {
  display: grid;
  gap: 1rem;
}
.launch-reset-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}
.launch-reset-summary article {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem;
  background: #202b2f;
  border: 1px solid #344348;
}
.launch-reset-summary span {
  color: #c5d6d1;
  font-weight: 800;
}
.launch-reset-summary strong {
  color: #f5c542;
  font-size: 1.6rem;
}
.launch-reset-warning {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid rgba(245, 197, 66, 0.65);
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.14), transparent 48%), #202b2f;
}
.launch-reset-warning strong {
  color: #f5c542;
  font-size: 1.15rem;
}
.launch-stage-form,
.launch-reset-form {
  align-items: end;
}
.launch-reset-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 280px) max-content;
  gap: 0.75rem;
}
.launch-reset-form label {
  align-self: center;
  color: #dbe7e3;
}
.launch-reset-form .danger {
  background: #ef4444;
  color: #fff;
}

@media (min-width: 761px) and (max-width: 1080px) {
  .league-table-head,
  .league-table-row {
    grid-template-columns: 86px minmax(190px, 1fr) 42px 76px 54px 52px minmax(108px, auto);
    gap: 0.45rem;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .league-position {
    grid-template-columns: 30px 42px;
    gap: 0.35rem;
  }

  .league-club-name {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 0.45rem;
    font-size: 0.92rem;
  }

  .league-club-crest {
    width: 32px;
    height: 32px;
  }

  .league-form {
    gap: 0.18rem;
  }

  .sponsor-contract-list article {
    grid-template-columns: 1fr 90px 90px;
  }

  .facility-upkeep-chip {
    border-radius: 8px;
  }

  .opponent-metrics {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .difficulty-badge {
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .guide-grid { grid-template-columns: 1fr; }
  .guide-results-meta {
    align-items: stretch;
    flex-direction: column;
  }
  .launch-reset-form {
    grid-template-columns: 1fr;
  }
  .roster-controls { align-items: stretch; }
  .league-table-head { display: none; }
  .league-table-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "club points"
      "position record"
      "played form";
    gap: 0.5rem 0.75rem;
  }
  .league-position { grid-area: position; }
  .league-club-name { grid-area: club; white-space: normal; }
  .league-table-row > span:nth-of-type(2) { grid-area: played; }
  .league-table-row > span:nth-of-type(3) { grid-area: record; }
  .league-table-row > span:nth-of-type(4) { display: none; }
  .league-form { grid-area: form; justify-self: end; }
  .league-points { grid-area: points; }
  .staff-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    padding-bottom: 0.4rem;
  }
  .staff-nav a {
    white-space: nowrap;
  }

  .sponsor-contract-list article {
    grid-template-columns: 1fr;
  }

  .facility-upkeep-chip {
    align-items: flex-start;
    border-radius: 8px;
  }

  .facility-upkeep-chip strong {
    width: 100%;
    margin-left: 0;
    font-size: 1.05rem;
  }

  .staff-teaching-grid article {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .moderation-history-list p {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .daily-reward-popup {
    align-items: flex-end;
    padding: 0.75rem;
  }
  .daily-reward-card {
    max-height: calc(100vh - 1.5rem);
    overflow-y: auto;
  }
  .club-switcher-menu {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    top: 72px;
    max-height: 60vh;
    overflow-y: auto;
    z-index: 35;
  }
  .tutorial-overlay {
    left: 12px;
    right: 12px;
    bottom: 96px;
    width: auto;
    max-height: min(48dvh, 360px);
    overflow: auto;
    padding: 14px;
  }
  .tutorial-overlay h2 { font-size: 18px; }
  .tutorial-overlay p { font-size: 14px; }
  .tutorial-action { width: 100%; text-align: center; }
  .tutorial-highlight::after { display: none; }
  .sponsor-renewal { grid-template-columns: 48px 1fr; }
  .sponsor-renewal form { grid-column: 1 / -1; }
  .sponsor-renewal button { width: 100%; }
  .quick-result-list article,
  .sponsor-reroll-form {
    display: grid;
    grid-template-columns: 1fr;
  }
  .sponsor-reroll-form button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .daily-reward-popup {
    place-items: end center;
    padding: 0.65rem;
  }

  .daily-reward-card {
    width: 100%;
    max-height: calc(100dvh - 1.3rem);
    gap: 0.75rem;
    padding: 1rem;
    overflow-y: auto;
  }

  .daily-reward-card .eyebrow {
    padding-right: 3rem;
  }

  .compact-reward-strip,
  .daily-reward-strip,
  .daily-reward-days {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(112px, 38vw);
    grid-template-columns: none;
    gap: 0.55rem;
    margin-inline: -0.1rem;
    padding: 0.1rem 0.1rem 0.45rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
  }

  .daily-reward-roadmap {
    grid-auto-flow: row;
    grid-auto-columns: initial;
    grid-template-columns: 1fr;
    overflow: visible;
    padding: 0;
  }

  .daily-reward-roadmap > div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .daily-reward-roadmap .daily-reward-finale {
    grid-template-columns: 1fr;
  }

  .compact-reward-strip span,
  .daily-reward-day {
    min-height: 124px;
    display: grid;
    align-content: start;
    gap: 0.25rem;
    scroll-snap-align: start;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .compact-reward-strip span strong,
  .daily-reward-day strong {
    font-size: 0.92rem;
    line-height: 1.18;
  }

  .multi-club-table article {
    grid-template-columns: 1fr;
  }

  .digest-preference-form {
    display: grid;
  }

  .staff-row-head {
    display: none;
  }

  .staff-row {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    padding: 1rem;
  }

  .staff-row > span {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
  }

  .staff-row > span::before {
    content: attr(data-label);
    color: #f5c542;
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .staff-row > span[data-label="User / Club"] strong,
  .staff-row > span[data-label="Role"] {
    font-size: 1.05rem;
  }

  .stadium-opponent .opponent-actions {
    width: 100%;
    grid-template-columns: repeat(4, minmax(52px, 64px));
    justify-content: center;
    justify-items: center;
    gap: 0.7rem;
    margin-top: 0.45rem;
    min-width: 0;
  }

  .stadium-opponent .opponent-actions > a,
  .stadium-opponent .opponent-actions > form {
    display: grid;
    justify-items: center;
    width: 100%;
    min-width: 0;
  }

  .stadium-opponent .opponent-action {
    width: 58px;
    min-height: 58px;
  }

  .stadium-opponent .challenge-cooldown {
    margin-top: 0.25rem;
    text-align: center;
  }

  .stadium-opponent .challenge-feedback {
    text-align: center;
  }
}

body {
  --theme-bg: #101416;
  --theme-bg-soft: #172023;
  --theme-bg-raised: #202b2f;
  --theme-bg-input: #0d1214;
  --theme-border: rgba(255, 255, 255, 0.12);
  --theme-border-strong: #34444a;
  --theme-text: #f3f7f5;
  --theme-muted: #a9b8b0;
  --theme-accent: #f5c542;
  --theme-accent-2: #ff8a2f;
  --theme-accent-text: #15120a;
  --theme-danger: #ef5350;
  color: var(--theme-text);
  background:
    radial-gradient(circle at 15% -5%, color-mix(in srgb, var(--theme-accent) 14%, transparent), transparent 24rem),
    var(--theme-bg);
}

body[data-theme="red"] {
  --theme-bg: #160d0f;
  --theme-bg-soft: #241216;
  --theme-bg-raised: #321a20;
  --theme-bg-input: #10090b;
  --theme-border: rgba(255, 199, 199, 0.16);
  --theme-border-strong: #5b3036;
  --theme-muted: #d6b9bb;
  --theme-accent: #ff5c68;
  --theme-accent-2: #ffb15c;
  --theme-accent-text: #22090d;
  --theme-danger: #ff4658;
}

body[data-theme="blue"] {
  --theme-bg: #09131f;
  --theme-bg-soft: #101f32;
  --theme-bg-raised: #172b43;
  --theme-bg-input: #07101a;
  --theme-border: rgba(190, 219, 255, 0.16);
  --theme-border-strong: #294a70;
  --theme-muted: #b4c8dd;
  --theme-accent: #64a7ff;
  --theme-accent-2: #68e0cf;
  --theme-accent-text: #07111d;
  --theme-danger: #ff6676;
}

body[data-theme="club"] {
  --theme-bg: color-mix(in srgb, var(--club-primary, #101416) 20%, #101416);
  --theme-bg-soft: color-mix(in srgb, var(--club-primary, #172023) 28%, #172023);
  --theme-bg-raised: color-mix(in srgb, var(--club-primary, #202b2f) 22%, #202b2f);
  --theme-bg-input: color-mix(in srgb, var(--club-primary, #0d1214) 14%, #0d1214);
  --theme-border: color-mix(in srgb, var(--club-secondary, #f5c542) 28%, rgba(255, 255, 255, 0.12));
  --theme-border-strong: color-mix(in srgb, var(--club-secondary, #f5c542) 42%, #34444a);
  --theme-muted: #c7d1ce;
  --theme-accent: var(--club-secondary, #f5c542);
  --theme-accent-2: var(--club-primary, #1f7a4d);
  --theme-accent-text: #101416;
}

.topbar,
.resource-bar,
.panel,
.form-panel,
.messages,
.chat-panel,
.club-switcher-menu,
.game-nav,
.daily-reward-card,
.tutorial-walkthrough-card {
  border-color: var(--theme-border);
  background: var(--theme-bg-soft);
}

.stadium-opponent,
.challenge-row,
.onboarding-card,
.mission-grid article,
.announcement-list article,
.development-list article,
.sponsorship-grid article,
.active-sponsorship,
.supporter-benefit,
.shop-card,
.profile-record,
.moderation-account,
.moderation-club-card,
.staff-ticket,
.ticket-row,
.guide-grid article,
.resource-chip,
.energy-meter,
.compact-reward-strip span,
.daily-reward-day,
.multi-club-table article,
.digest-status-grid span,
.pricing-grid article {
  border-color: var(--theme-border);
  background: color-mix(in srgb, var(--theme-bg-raised) 82%, transparent);
}

button,
.button,
.club-switcher-menu button[aria-current="true"],
.squad-picker-row label:has(input:checked) {
  background: var(--theme-accent);
  color: var(--theme-accent-text);
}

.button.secondary,
.secondary,
.secondary-action,
.mobile-menu-toggle,
.club-switcher-menu button,
.club-switcher-menu a,
.club-switcher-row {
  background: var(--theme-bg-raised);
  color: var(--theme-text);
}

.form-panel input,
.form-panel select,
.form-panel textarea,
.chat-form textarea,
.chat-form input,
.challenge-form select,
.search-form input,
.search-form select,
.rival-sort-controls select,
.cup-create-form input,
.cup-create-form select,
.moderation-actions input,
.admin-account-actions input,
.recruitment-grid select,
.player-stat-grid input,
.gif-search-form input {
  border-color: var(--theme-border);
  background: var(--theme-bg-input);
  color: var(--theme-text);
}

.beta-badge,
.utility-icon-link:hover,
.club-switcher small,
.club-switcher-row small,
.club-switcher-menu small,
.eyebrow,
.staff-nav a,
.game-nav .supporter-link,
.section-tabs a[aria-current="page"],
.section-tabs a:hover,
.squad-selection-counts strong,
.tutorial-heading h2,
.sponsorship-grid h3,
.active-sponsorship h3,
.guide-search span,
.guide-grid article span:first-child,
.daily-reward-card .eyebrow,
.compact-reward-strip span.active small,
.digest-status-grid strong {
  color: var(--theme-accent);
}

.staff-nav,
.section-tabs,
.game-nav,
.squad-picker {
  border-color: var(--theme-border-strong);
}

.staff-nav a,
.status-pill,
.switch-control input:checked + span {
  background: color-mix(in srgb, var(--theme-accent) 18%, transparent);
}

.section-tabs a[aria-current="page"],
.section-tabs a:hover {
  border-bottom-color: var(--theme-accent);
}

.tutorial-progress-track i,
.resource-track i {
  background: linear-gradient(90deg, var(--theme-accent), var(--theme-accent-2));
}

.utility-badge,
.toast-error {
  background: var(--theme-danger);
}
