:root {
  --blue-dark: #080f30;
  --blue-main: #0d3f98;
  --blue-studio: #1468d8;
  --blue-light: #39c6ff;
  --ice-white: #f6f9ff;
  --lilli-gold: #e3b44d;
  --amber: #f08a3c;
  --steel: #7d91ba;
  --ink: #060b24;
  --muted: #aab8d8;
  --panel: rgba(10, 31, 84, 0.78);
  --panel-strong: rgba(23, 91, 190, 0.34);
  --line: rgba(122, 202, 255, 0.22);
  --danger: #d95d63;
  --success: #4fd1a5;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ice-white);
  background:
    linear-gradient(90deg, rgba(240, 138, 60, 0.22), transparent 24%, transparent 72%, rgba(57, 198, 255, 0.14)),
    linear-gradient(180deg, #060b24 0%, #0b1742 42%, #112f78 100%);
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(57, 198, 255, 0.13) 8% 8.5%, transparent 8.5% 15%),
    repeating-linear-gradient(90deg, transparent 0 96px, rgba(246, 249, 255, 0.035) 96px 98px);
  opacity: 0.72;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
li,
td,
th,
small,
span,
strong {
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

.sr-only {
  width: 1px;
  height: 1px;
  position: absolute;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header,
.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0;
  font-size: 1.15rem;
  min-width: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(57, 198, 255, 0.4));
}

.site-nav,
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.mobile-nav-toggle {
  display: none;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid rgba(57, 198, 255, 0.3);
  border-radius: 6px;
  color: var(--ice-white);
  background: rgba(57, 198, 255, 0.12);
  font-weight: 800;
  cursor: pointer;
}

.site-nav a,
.admin-tabs a {
  padding: 9px 12px;
  border-radius: 6px;
  color: rgba(243, 247, 255, 0.86);
  border: 1px solid transparent;
  white-space: nowrap;
}

.site-nav a:hover,
.admin-tabs a:hover,
.nav-cta {
  background: rgba(57, 198, 255, 0.12);
  border-color: rgba(57, 198, 255, 0.3);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 48px;
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 34px;
  align-items: center;
  border-top: 1px solid rgba(57, 198, 255, 0.24);
  border-bottom: 1px solid rgba(227, 180, 77, 0.24);
}

.hero h1,
.dashboard-head h1,
.auth-layout h1 {
  margin: 0;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.92;
  letter-spacing: 0;
  text-shadow: 0 0 34px rgba(57, 198, 255, 0.22);
}

.hero p,
.dashboard-head p,
.auth-layout p {
  color: rgba(243, 247, 255, 0.8);
  max-width: 650px;
  font-size: 1.1rem;
}

.eyebrow {
  text-transform: uppercase;
  color: var(--blue-light);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-shadow: 0 0 18px rgba(57, 198, 255, 0.35);
}

.hero-actions,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-heading > * {
  min-width: 0;
}

.panel-heading > a,
.form-card > .text-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
}

.button {
  border: 0;
  border-radius: 6px;
  padding: 12px 16px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ice-white);
  background: rgba(246, 249, 255, 0.11);
  cursor: pointer;
}

.button.primary {
  background: linear-gradient(135deg, #39c6ff, #0d55c8);
  box-shadow: 0 12px 34px rgba(77, 180, 255, 0.2);
}

.button.ghost {
  border: 1px solid var(--line);
}

.button.danger {
  background: rgba(217, 93, 99, 0.24);
  border: 1px solid rgba(217, 93, 99, 0.5);
}

.button.small {
  padding: 8px 11px;
  min-height: 34px;
  font-size: 0.9rem;
}

.button.icon-button {
  width: 36px;
  min-width: 36px;
  padding: 8px;
}

.button:disabled,
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.studio-panel,
.panel,
.stat,
.market-card,
.lineup-card {
  background:
    linear-gradient(180deg, rgba(23, 91, 190, 0.2), rgba(8, 15, 48, 0.72)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(246, 249, 255, 0.08);
}

.studio-panel {
  padding: 24px;
  min-height: 320px;
  display: grid;
  gap: 16px;
  align-content: center;
  position: relative;
  overflow: hidden;
}

.studio-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(57, 198, 255, 0.18), transparent),
    linear-gradient(0deg, rgba(240, 138, 60, 0.18), transparent 42%);
  transform: skewX(-14deg) translateX(-24%);
}

.studio-panel > * {
  position: relative;
}

.ticker,
.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--ink);
  background: linear-gradient(135deg, #ffe18a, var(--lilli-gold));
  font-weight: 800;
  font-size: 0.82rem;
}

.badge.warning {
  background: #ffcc66;
}

.score-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel {
  padding: 22px;
  margin-bottom: 18px;
}

.panel-heading {
  border-bottom: 1px solid rgba(57, 198, 255, 0.18);
  margin-bottom: 16px;
  padding-bottom: 12px;
}

.panel h2 {
  margin-top: 0;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

.text-link {
  color: var(--blue-light);
  font-weight: 800;
}

.stat .text-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
}

.text-link:hover {
  color: #ffe18a;
}

.ranking-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.ranking-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(243, 247, 255, 0.08);
  min-width: 0;
}

.ranking-list small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.ranking-team {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ranking-team img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(57, 198, 255, 0.26);
  background: rgba(246, 249, 255, 0.08);
  flex: 0 0 auto;
}

.league-dashboard-callout,
.league-actions,
.share-actions,
.inline-search,
.admin-filter-bar,
.inline-select-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.league-dashboard-callout {
  justify-content: space-between;
}

.league-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.league-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(57, 198, 255, 0.18);
  border-radius: 8px;
  background: rgba(246, 249, 255, 0.07);
  min-width: 0;
}

.league-logo {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(57, 198, 255, 0.28);
  background: rgba(4, 10, 32, 0.42);
}

.league-card-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.league-card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.league-card h3 {
  margin: 0;
}

.league-actions form,
.share-actions form {
  margin: 0;
}

.invite-panel {
  max-width: 100%;
}

.invite-actions {
  align-items: stretch;
  margin-top: 16px;
}

.invite-actions .button {
  min-height: 44px;
}

.instagram-share {
  border-color: rgba(214, 70, 139, 0.42);
  color: #fff;
  background: linear-gradient(135deg, #6d1d72 0%, #a52469 48%, #c93d52 100%);
  box-shadow: 0 10px 24px rgba(165, 36, 105, 0.22);
}

.instagram-share:hover {
  border-color: rgba(246, 249, 255, 0.28);
  filter: brightness(1.04);
}

.invite-code-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 225, 138, 0.24);
  border-radius: 8px;
  background: rgba(255, 225, 138, 0.07);
}

.invite-code-box span {
  color: var(--muted);
  font-size: 0.9rem;
}

.invite-code-box strong {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--ink);
  background: linear-gradient(135deg, #ffe18a, var(--lilli-gold));
  letter-spacing: 0.08em;
}

.invite-code-box input {
  width: 100%;
  min-width: 0;
}

.league-score-block {
  display: grid;
  gap: 3px;
  justify-items: end;
  text-align: right;
  white-space: nowrap;
}

.league-score-block small {
  color: var(--muted);
  font-size: 0.84rem;
}

.admin-filter-bar {
  align-items: end;
}

.admin-filter-bar label,
.inline-search label,
.inline-select-form label {
  min-width: min(220px, 100%);
}

.inline-search input {
  min-width: min(280px, 100%);
}

.inline-select-form select {
  min-width: 130px;
}

.pagination {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.top-player-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.top-player-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(57, 198, 255, 0.16);
  border-radius: 6px;
  background: rgba(246, 249, 255, 0.07);
}

.top-player-score {
  white-space: nowrap;
  color: #ffe18a;
  font-weight: 900;
}

.auth-layout {
  min-height: min(620px, calc(100vh - 170px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 34px;
  align-items: center;
}

.form-card,
.form-grid {
  display: grid;
  gap: 14px;
}

.form-card {
  align-content: start;
}

label {
  display: grid;
  gap: 7px;
  color: rgba(243, 247, 255, 0.88);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--ice-white);
  background: rgba(4, 10, 32, 0.76);
  outline: none;
  min-width: 0;
}

input[type="file"] {
  min-height: 46px;
  padding: 9px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(57, 198, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(57, 198, 255, 0.12);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.large-editor {
  min-height: 340px;
}

.flash {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  background: rgba(77, 180, 255, 0.18);
  border: 1px solid rgba(77, 180, 255, 0.38);
}

.flash.success {
  background: rgba(79, 209, 165, 0.16);
  border-color: rgba(79, 209, 165, 0.42);
}

.flash.error {
  background: rgba(217, 93, 99, 0.18);
  border-color: rgba(217, 93, 99, 0.42);
}

.dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 28px 0;
  min-width: 0;
}

.team-avatar {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.small-avatar {
  width: 54px;
  height: 54px;
  margin-bottom: 8px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat {
  padding: 18px;
}

.stat span {
  color: var(--muted);
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 1.5rem;
}

.guest-grid,
.market-grid,
.lineup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.guest-card {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  align-items: center;
}

.guest-card.compact {
  grid-template-columns: 56px 1fr;
}

.guest-photo {
  width: 68px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(57, 198, 255, 0.42), rgba(227, 180, 77, 0.46));
  color: var(--ice-white);
  font-weight: 900;
}

.compact .guest-photo {
  width: 56px;
  height: 56px;
}

.guest-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guest-info {
  min-width: 0;
}

.guest-info strong,
.guest-info small {
  display: block;
}

.guest-info small {
  color: var(--muted);
}

.super-star {
  color: #ffe18a;
  text-shadow: 0 0 12px rgba(255, 225, 138, 0.58);
  white-space: nowrap;
}

.inline-toggle-form {
  margin: 0;
}

.super-toggle {
  width: max-content;
  max-width: 100%;
  border: 1px solid rgba(57, 198, 255, 0.28);
  border-radius: 999px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(243, 247, 255, 0.82);
  background: rgba(246, 249, 255, 0.07);
  cursor: pointer;
}

.super-toggle span {
  color: #ffe18a;
  font-size: 1rem;
  line-height: 1;
}

.super-toggle.is-on {
  color: var(--ink);
  background: linear-gradient(135deg, #ffe18a, var(--lilli-gold));
  border-color: rgba(255, 225, 138, 0.72);
  font-weight: 900;
}

.price {
  margin-top: 6px;
  display: block;
}

.lilli {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ffe08a;
  font-weight: 900;
}

.lilli img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.market-card {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.market-filter-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(57, 198, 255, 0.18);
  border-radius: 8px;
  background: rgba(4, 10, 32, 0.36);
}

.market-search-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) auto;
  gap: 10px;
  align-items: end;
}

.quick-filters,
.letter-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.quick-filters button,
.letter-filter button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 11px;
  border: 1px solid rgba(57, 198, 255, 0.18);
  border-radius: 999px;
  color: rgba(243, 247, 255, 0.84);
  background: rgba(246, 249, 255, 0.07);
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.letter-filter button {
  min-width: 42px;
  padding: 8px 10px;
}

.quick-filters button:hover,
.letter-filter button:hover,
.quick-filters button.is-active,
.letter-filter button.is-active {
  color: var(--ink);
  border-color: rgba(255, 225, 138, 0.72);
  background: linear-gradient(135deg, #ffe18a, var(--lilli-gold));
}

.filter-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.frequency {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.frequency strong {
  color: var(--blue-light);
}

.heat-dots {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  margin-top: 4px;
}

.heat-dots span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 1px solid rgba(227, 180, 77, 0.52);
  background: rgba(246, 249, 255, 0.12);
}

.heat-dots span.is-on {
  background: #ffe18a;
  box-shadow: 0 0 12px rgba(255, 225, 138, 0.35);
}

.lineup-card {
  padding: 12px;
  cursor: pointer;
  position: relative;
}

.lineup-card input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.lineup-card.is-starter {
  border-color: rgba(216, 163, 58, 0.72);
  box-shadow: 0 0 0 2px rgba(216, 163, 58, 0.2);
}

.lineup-role {
  margin-top: 10px;
  display: block;
  color: var(--muted);
}

.is-starter .lineup-role {
  color: #ffe08a;
}

.jolly-card {
  margin: 18px 0;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(255, 225, 138, 0.46);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 225, 138, 0.14), rgba(13, 63, 152, 0.18)),
    rgba(4, 10, 32, 0.6);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.jolly-card img {
  width: 132px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 999px;
  border: 2px solid rgba(255, 225, 138, 0.68);
  box-shadow: 0 0 24px rgba(255, 225, 138, 0.24);
}

.jolly-card h2 {
  margin: 2px 0 8px;
}

.jolly-card p {
  margin: 0 0 8px;
  color: rgba(243, 247, 255, 0.84);
}

.jolly-status {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid rgba(246, 249, 255, 0.16);
  border-radius: 8px;
  background: rgba(4, 10, 32, 0.38);
}

.jolly-status strong {
  font-size: 0.98rem;
}

.jolly-status span,
.jolly-status small {
  color: rgba(243, 247, 255, 0.78);
}

.jolly-status.is-active {
  border-color: rgba(79, 209, 165, 0.48);
  background: linear-gradient(135deg, rgba(79, 209, 165, 0.18), rgba(4, 10, 32, 0.34));
}

.jolly-status.is-active strong {
  color: #a8f0d1;
}

.jolly-status.is-spent {
  border-color: rgba(217, 93, 99, 0.5);
  background: linear-gradient(135deg, rgba(217, 93, 99, 0.2), rgba(4, 10, 32, 0.38));
}

.jolly-status.is-spent strong {
  color: #ffb4bb;
}

.jolly-status.is-available {
  border-color: rgba(255, 225, 138, 0.5);
  background: linear-gradient(135deg, rgba(255, 225, 138, 0.16), rgba(4, 10, 32, 0.34));
}

.jolly-status.is-available strong {
  color: #ffe18a;
}

.jolly-toggle {
  margin-top: 10px;
  min-height: 44px;
  position: relative;
  display: inline-flex;
  width: fit-content;
  grid-auto-flow: column;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 225, 138, 0.38);
  border-radius: 999px;
  background: rgba(246, 249, 255, 0.08);
  cursor: pointer;
}

.jolly-toggle input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.jolly-toggle span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.jolly-toggle span::before {
  content: "";
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 225, 138, 0.72);
  border-radius: 999px;
  background: rgba(4, 10, 32, 0.56);
  box-shadow: inset 0 0 0 3px rgba(4, 10, 32, 0.72);
}

.jolly-toggle input:checked + span::before {
  background: #ffe18a;
}

.jolly-toggle input:focus-visible + span::before {
  box-shadow: 0 0 0 3px rgba(57, 198, 255, 0.3);
}

.jolly-toggle input:disabled + span {
  opacity: 0.58;
}

.jolly-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.panel-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.switch-row {
  margin: 18px 0;
  min-height: 44px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(57, 198, 255, 0.2);
  border-radius: 8px;
  background: rgba(246, 249, 255, 0.06);
  cursor: pointer;
}

.switch-row input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch-row span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.switch-row span::before {
  content: "";
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border: 2px solid rgba(57, 198, 255, 0.55);
  border-radius: 6px;
  background: rgba(4, 10, 32, 0.58);
  box-shadow: inset 0 0 0 3px rgba(4, 10, 32, 0.72);
}

.switch-row input:checked + span::before {
  background: #ffe18a;
  border-color: rgba(255, 225, 138, 0.8);
}

.switch-row input:focus-visible + span::before {
  box-shadow: 0 0 0 3px rgba(57, 198, 255, 0.3);
}

.prose {
  line-height: 1.7;
}

.admin-tabs {
  justify-content: flex-start;
  margin-bottom: 18px;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--blue-light);
  white-space: nowrap;
}

.table-wrap .button.small {
  white-space: nowrap;
}

.fake-user-row td {
  background: rgba(255, 225, 138, 0.06);
}

.user-created-at strong,
.user-created-at small {
  display: block;
  white-space: nowrap;
}

.user-created-at small {
  margin-top: 4px;
  color: var(--muted);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-group {
  display: grid;
  gap: 10px;
}

.setting-note {
  padding: 14px;
  border: 1px solid rgba(57, 198, 255, 0.18);
  border-radius: 6px;
  background: rgba(246, 249, 255, 0.07);
}

.setting-note p {
  margin: 6px 0 0;
  color: var(--muted);
}

.stacked-actions {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.month-picker {
  min-width: min(260px, 100%);
}

code {
  max-width: 100%;
  display: inline-block;
  padding: 2px 5px;
  color: #ffe18a;
  background: rgba(4, 10, 32, 0.64);
  border-radius: 4px;
  overflow-wrap: anywhere;
}

.guest-inputs {
  display: grid;
  gap: 8px;
}

.episode-guests-list {
  display: block;
  min-width: 220px;
  max-width: 420px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.episode-guest-selects {
  display: grid;
  gap: 10px;
}

.episode-guest-select-row {
  display: grid;
  gap: 10px;
  max-width: 720px;
  padding: 12px;
  border: 1px solid rgba(106, 203, 255, 0.18);
  border-radius: 8px;
  background: rgba(4, 10, 32, 0.24);
}

.episode-new-guest-fields {
  padding-top: 2px;
}

.bonus-grid {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 100px minmax(180px, 1.4fr);
  gap: 8px;
}

.bonus-manager {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(200px, 1fr) 110px minmax(220px, 1.2fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.points-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 5px 9px;
  border-radius: 999px;
  font-weight: 800;
}

.points-pill.positive {
  color: #17370d;
  background: #a8f08c;
}

.points-pill.negative {
  color: #431218;
  background: #ff9da5;
}

.admin-episode-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}

.site-footer {
  color: var(--muted);
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 1;
}

.footer-meta,
.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.footer-meta {
  max-width: 720px;
}

.footer-lilli,
.footer-lilli .lilli {
  display: inline-flex;
  align-items: center;
}

.footer-lilli {
  gap: 5px;
}

.footer-disclaimer {
  flex-basis: 100%;
  max-width: 760px;
  font-size: 0.78rem;
  line-height: 1.45;
  opacity: 0.78;
}

.footer-links {
  justify-content: flex-end;
}

.footer-links a,
.footer-link-button {
  color: rgba(243, 247, 255, 0.82);
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(57, 198, 255, 0.42);
  text-underline-offset: 4px;
}

.footer-links a:hover,
.footer-link-button:hover {
  color: #ffe18a;
}

.instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.instagram-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  flex: 0 0 auto;
}

.legal-page {
  display: grid;
  gap: 18px;
}

.legal-page .panel {
  margin-bottom: 0;
}

.legal-page h2 {
  margin-bottom: 6px;
}

.legal-list {
  display: grid;
  gap: 10px;
  padding-left: 20px;
}

.legal-table-wrap {
  margin-top: 12px;
}

.legal-table {
  min-width: 680px;
}

.site-popup {
  position: fixed;
  inset: 0;
  z-index: 24;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 7, 24, 0.72);
  backdrop-filter: blur(12px);
}

.site-popup-card {
  width: min(560px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  overflow: auto;
  position: relative;
  padding: 26px;
  border: 1px solid rgba(57, 198, 255, 0.36);
  border-radius: 8px;
  color: var(--ice-white);
  background:
    linear-gradient(135deg, rgba(8, 15, 48, 0.98), rgba(13, 63, 152, 0.94)),
    var(--panel);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
}

.site-popup-card h2 {
  margin: 4px 0 12px;
}

.site-popup-card .button {
  margin-top: 12px;
}

.icon-close {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: inherit;
  background: rgba(246, 249, 255, 0.1);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.icon-close:hover {
  background: rgba(246, 249, 255, 0.18);
}

.site-popup-card .icon-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.rule-editor-list {
  display: grid;
  gap: 14px;
}

.rule-editor {
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.rule-editor:hover {
  border-color: rgba(57, 198, 255, 0.42);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.18);
}

.rule-editor-preview {
  cursor: text;
}

.rule-editor-preview:focus {
  outline: 3px solid rgba(57, 198, 255, 0.18);
  outline-offset: 4px;
  border-radius: 6px;
}

.rule-editor-form {
  display: grid;
  gap: 12px;
}

.rule-editor-form textarea {
  min-height: 220px;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 26;
  width: min(1180px, calc(100% - 24px));
  transform: translateX(-50%);
  display: grid;
  gap: 14px;
  padding: 20px;
  color: #141927;
  background: #f8fbff;
  border: 1px solid rgba(13, 63, 152, 0.18);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.cookie-close {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #111827;
  background: transparent;
}

.cookie-banner-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 24px;
  align-items: center;
  padding-right: 44px;
}

.cookie-banner h2,
.cookie-banner p {
  margin: 0;
}

.cookie-banner .eyebrow {
  margin-bottom: 4px;
  font-size: 0.78rem;
  color: var(--blue-main);
  text-shadow: none;
}

.cookie-banner-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.cookie-banner-copy p {
  color: #333a4b;
}

.cookie-banner-copy strong {
  color: #111827;
}

.cookie-banner-actions {
  display: grid;
  gap: 10px;
}

.cookie-options,
.cookie-buttons {
  display: grid;
  gap: 9px;
}

.cookie-buttons {
  align-content: center;
}

.cookie-buttons .button {
  width: 100%;
  color: #111827;
  background: #ffffff;
  border: 2px solid rgba(65, 117, 240, 0.82);
  font-weight: 900;
}

.cookie-buttons .button.primary {
  color: #ffffff;
  background: #4175f0;
  border-color: #4175f0;
  box-shadow: none;
}

.cookie-detail-toggle {
  text-align: center;
  font-size: 0.9rem;
  color: var(--blue-main);
  text-decoration-color: rgba(13, 63, 152, 0.35);
}

.cookie-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 6px;
  background: #ffffff;
  font-weight: 500;
}

.cookie-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cookie-option small {
  display: block;
  color: #576174;
  margin-top: 2px;
  line-height: 1.35;
}

.cookie-option.is-locked {
  background: #f2f6ff;
}

.cookie-switch {
  width: 54px;
  height: 30px;
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #d8deea;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08);
}

.cookie-switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.22);
  transition: transform 0.18s ease;
}

.cookie-option input:checked + .cookie-switch,
.cookie-switch.is-on {
  background: #4175f0;
}

.cookie-option input:checked + .cookie-switch::after,
.cookie-switch.is-on::after {
  transform: translateX(24px);
}

.cookie-options .text-link {
  color: var(--blue-main);
  justify-self: start;
}

@media (max-width: 820px) {
  .site-footer,
  .dashboard-head,
  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    width: min(100% - 20px, 1180px);
    padding: 12px 0;
    align-items: center;
    flex-direction: row;
    gap: 10px;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

	  .hero,
	  .auth-layout,
	  .grid.two,
	  .league-grid,
	  .stats-grid,
	  .form-row,
	  .bonus-manager,
	  .admin-episode-grid {
	    grid-template-columns: 1fr;
  }

  .admin-tabs {
    width: 100%;
    justify-content: flex-start;
  }

  .site-nav {
    display: none;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(57, 198, 255, 0.2);
    border-radius: 8px;
    background: rgba(6, 11, 36, 0.88);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a,
  .admin-tabs a {
    min-height: 44px;
    padding: 10px 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .nav-cta {
    background: rgba(57, 198, 255, 0.18);
  }

  .button.small {
    min-height: 42px;
  }

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

  .jolly-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .jolly-card img {
    width: 96px;
  }

  .market-search-row,
  .filter-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: auto;
    padding: 22px 0;
  }

  .hero h1,
  .dashboard-head h1,
  .auth-layout h1 {
    font-size: 44px;
  }

	  .panel {
	    padding: 16px;
	  }

	  .league-card {
	    grid-template-columns: 68px minmax(0, 1fr);
	  }

	  .league-logo {
	    width: 68px;
	    height: 68px;
	  }

	  .league-dashboard-callout,
	  .admin-filter-bar {
	    align-items: stretch;
	    flex-direction: column;
	  }

	  .league-score-block {
	    justify-items: start;
	    text-align: left;
	  }
	
	  .top-player-list li {
	    grid-template-columns: 1fr;
	  }

  .table-wrap {
    margin: 0 -16px;
    padding: 0 16px;
  }

  table {
    min-width: 660px;
  }

  .legal-table {
    min-width: 620px;
  }

  .cookie-banner {
    align-items: stretch;
    bottom: 10px;
    width: min(100% - 20px, 1080px);
  }

  .cookie-banner-main {
    grid-template-columns: 1fr;
    padding-right: 36px;
  }
}

@media (max-width: 640px) {
  .public-league-wrap {
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .public-league-table {
    min-width: 0;
  }

  .public-league-table thead {
    display: none;
  }

  .public-league-table,
  .public-league-table tbody,
  .public-league-table tr,
  .public-league-table td {
    display: block;
    width: 100%;
  }

  .public-league-table tr {
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(57, 198, 255, 0.18);
    border-radius: 8px;
    background: rgba(246, 249, 255, 0.06);
  }

  .public-league-table td {
    padding: 8px 0;
    border-bottom: 1px solid rgba(57, 198, 255, 0.12);
  }

  .public-league-table td:last-child {
    border-bottom: 0;
  }

  .public-league-table td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--blue-light);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .public-league-table .ranking-team {
    align-items: center;
  }

  .public-league-table .button,
  .public-league-table .badge {
    width: 100%;
  }

  .legal-page {
    gap: 12px;
  }

  .legal-page .panel {
    padding: 14px;
  }

  .legal-page h2 {
    font-size: 1.16rem;
  }

  .legal-list {
    padding-left: 16px;
  }

  .legal-table-wrap {
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .legal-table {
    min-width: 0;
  }

  .legal-table thead {
    display: none;
  }

  .legal-table,
  .legal-table tbody,
  .legal-table tr,
  .legal-table td {
    display: block;
    width: 100%;
  }

  .legal-table tr {
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(57, 198, 255, 0.18);
    border-radius: 6px;
    background: rgba(246, 249, 255, 0.06);
  }

  .legal-table td {
    padding: 8px 0;
    border-bottom: 1px solid rgba(57, 198, 255, 0.12);
  }

  .legal-table td:last-child {
    border-bottom: 0;
  }

  .legal-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--blue-light);
    font-weight: 900;
    font-size: 0.78rem;
    text-transform: uppercase;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 8px;
  }

  .brand {
    font-size: 1rem;
  }

  .hero h1,
  .dashboard-head h1,
  .auth-layout h1 {
    font-size: 36px;
  }

  .button {
    width: 100%;
  }

  .site-nav a,
  .admin-tabs a {
    white-space: normal;
  }

  .guest-grid,
  .market-grid,
  .lineup-grid {
    grid-template-columns: 1fr;
  }

  .ranking-list li {
    align-items: flex-start;
    gap: 10px;
  }

  .ranking-list li > strong,
  .league-score-block {
    flex: 0 0 auto;
  }

  .jolly-card {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .jolly-card img {
    width: 128px;
  }

  .footer-links {
    justify-content: flex-start;
    width: 100%;
    gap: 8px;
  }

  .footer-links a,
  .footer-link-button {
    min-height: 42px;
    padding: 10px 11px;
    border: 1px solid rgba(57, 198, 255, 0.18);
    border-radius: 6px;
    text-decoration: none;
    background: rgba(246, 249, 255, 0.06);
  }

  .cookie-banner {
    padding: 16px;
  }

  .site-popup-card {
    padding: 22px 16px 16px;
  }

  .cookie-buttons,
  .market-search-row,
  .filter-groups {
    grid-template-columns: 1fr;
  }
}
