/* ===========================
   WC 2026 — Design B
   Teenage Engineering inspired
   Monochrome + Orange
   =========================== */

/* --- FIFA WC2026 Font --- */
@font-face {
  font-family: 'FWC 2026';
  src: url("/assets/FWC2026-UltraCondensedBlack-6b6c8e3f.woff2") format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* --- Custom Properties --- */
:root {
  --color-bg: #f0eded;
  --color-surface: #ffffff;
  --color-surface-alt: #f8f6f5;
  --color-text: #1a1a1a;
  --color-text-secondary: #8a8785;
  --color-fancy-grey: #3e3e3e;
  --color-border: #d9d5d2;
  --color-border-light: #e8e5e2;
  /* --color-accent: #ff6b00; */
  --color-accent: #fc430b;
  /* --color-accent-hover: #e85e00; */
  --color-accent-hover: #e63a0a;
  --color-correct: #2d8a4e;
  --color-correct-bg: #edf7f0;
  --color-wrong: #c4342d;
  --color-wrong-bg: #fdf0ef;
  --color-dark-green: #02362c;
  --color-alt-green: #011f18;
  --color-banker-bg: #fff5eb;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'FWC 2026', 'Barlow Condensed', 'Montserrat', sans-serif;
  --transition: 180ms ease;
  --ls-tight: 0.5px;
  --ls-normal: 1px;
  --ls-wide: 2px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100dvh;
  display: flex;
  flex-direction: column;

  max-width: 1800px;
  margin: 0 auto;
}

/* --- Flag images --- */
.flag {
  display: inline-block;
  vertical-align: middle;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

.flag:first-child { margin-right: 4px; }
.flag:last-child { margin-left: 4px; }

.flag-placeholder {
  background: var(--color-border);
  border-radius: 2px;
}

/* --- Layout --- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--color-fancy-grey);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-accent-hover);
  box-shadow: var(--shadow-md);
  /* transform: translateY(-1px); */
}

.btn-outline {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

.btn-small {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-google {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 14px 28px;
  font-size: 15px;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.btn-google:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* --- Focus styles --- */
.btn:focus-visible,
.nav-pill:focus-visible,
.leagues-chevron:focus-visible,
.carousel-prev:focus-visible,
.carousel-back:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.segment:has(input:focus-visible) {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.banker-toggle:has(input:focus-visible) {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Flash messages --- */
.flash {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: flashIn 0.3s ease;
}

.flash-notice {
  background: var(--color-correct-bg);
  color: var(--color-correct);
  border: 1px solid var(--color-correct);
}

.flash-alert {
  background: var(--color-wrong-bg);
  color: var(--color-wrong);
  border: 1px solid var(--color-wrong);
}

@keyframes flashIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================
   NAV BAR
   ============================ */

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px clamp(16px, 4vw, 48px);
  flex-shrink: 0;
  position: relative;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo {
  height: 44px;
  width: auto;
}

/* Logo doubles as the home link, top-left (modern convention). */
.nav-logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 8px;
  cursor: pointer;
  color: var(--color-fancy-grey); /* inline SVG logo inherits this via currentColor */
  transition: opacity var(--transition);
}

/* Inline SVG logo — height matches .nav-logo; width scales by viewBox ratio. */
.nav-logo-svg {
  height: 44px;
  width: auto;
  display: block;
}

.nav-logo-link:hover {
  opacity: 0.85;
}

.nav-logo-link-active {
  cursor: default;
}

.nav-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-surface-alt);
}

.nav-avatar-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background: var(--color-dark-green);
  position: relative;
  overflow: hidden;
}

/* Photo overlays the initial-letter fallback; if it errors it is removed,
   revealing the letter beneath. */
.nav-avatar-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.nav-avatar-clickable {
  cursor: pointer;
  transition: opacity var(--transition);
}

.nav-avatar-clickable:hover {
  opacity: 0.8;
}

/* Avatar dropdown (nickname + log out) on the far right of the nav bar. */
.nav-avatar-menu {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 100;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.nav-dropdown[hidden] {
  display: none;
}

/* button_to renders a <form>; collapse it so the inner button lays out flat. */
.nav-dropdown form {
  margin: 0;
  display: contents;
}

.nav-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: none;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--transition);
}

.nav-dropdown-item:hover {
  background: var(--color-surface-alt);
}

.nav-dropdown-item-logout {
  color: var(--color-accent);
}

/* Grouped sub-section within the dropdown (e.g. Mini league → create/join),
   set off with hairline dividers above and below. */
.nav-dropdown-section {
  display: flex;
  flex-direction: column;
  margin: 6px 0;
  padding: 6px 0;
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

.nav-dropdown-label {
  padding: 4px 12px;
  font-family: var(--font);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.nav-nickname-hint {
  font-family: var(--font);
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: -12px 0 4px;
  line-height: 1.4;
}

.nav-pills-desktop {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
}

.nav-mobile-menu {
  display: none;
  gap: 8px;
  width: 100%;
  padding: 8px 0;
  justify-content: space-between;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 20px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #ffffff;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.nav-pill:hover {
  color: var(--color-text-secondary);
}

.nav-pill-accent {
  background: linear-gradient(164deg, #ff8c3a, var(--color-accent) 50%);
  border-color: #ff8c3a;
  color: #ffffff;
}

.nav-pill-accent:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.nav-pill-active {
  border-color: var(--color-dark-green);
  background: var(--color-dark-green);
  color: #fff;
}

.nav-pill-accent.nav-pill-active {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

/* Mini-leagues toggle pill: accent orange in "MINI LEAGUES" state, flips to
   dark-green in the "LEADERBOARD" (back) state so the two read distinctly. */
.nav-pill-leagues {
  background: linear-gradient(164deg, #ff8c3a, var(--color-accent) 50%);
  border-color: #ff8c3a;
  color: #ffffff;
  /* Background is a gradient and can't smoothly transition to the solid hover/
     active states — animating it causes a flicker. Only transition the
     properties that can animate. */
  transition: border-color var(--transition), filter var(--transition);
}

.nav-pill-leagues:hover {
  filter: brightness(1.08);
  border-color: var(--color-accent);
  color: #ffffff;
}

.nav-pill-leagues.is-leagues {
  background: var(--color-dark-green);
  border-color: var(--color-dark-green);
  color: #ffffff;
}

.nav-pill-leagues.is-leagues:hover {
  background: var(--color-dark-green);
  border-color: var(--color-dark-green);
  filter: brightness(1.2);
}

.nav-pill-small {
  padding: 4px 12px;
  font-size: 10px;
}

/* ============================
   CAROUSEL
   ============================ */

.carousel {
  position: relative;
  flex: 1;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  padding: 0 clamp(16px, 4vw, 48px) clamp(12px, 2vw, 24px);
}

.carousel-viewport {
  flex: 1;
  overflow: hidden;
  container-type: inline-size;
}

.carousel-track {
  --card-gap: 16px;
  display: flex;
  gap: var(--card-gap);
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.carousel-track.carousel-pos-1 {
  transform: translateX(calc(-50cqi - var(--card-gap) / 2));
}

.carousel-track.carousel-pos-1.carousel-pos-2 {
  transform: translateX(calc(-100cqi - var(--card-gap)));
}

.carousel-card {
  flex: 0 0 calc(50cqi - var(--card-gap) / 2);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  transition: flex-basis 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-info-half {
  user-select: none;
}

.card-info-half .card-info-content {
  justify-content: space-between;
  height: 100%;
}

.card-info-half .card-info-main {
  align-items: center;
  text-align: center;
}

.card-info-half .card-info-title {
  font-size: clamp(56px, 20cqi, 110px);
  max-width: 5ch;
  word-spacing: 100vw;
}

.card-info-half .card-info-date,
.card-info-half .card-info-hosts,
.card-info-half .card-info-cities,
.card-info-half .card-info-goat {
  display: none;
}

.card-info-half .card-info-actions {
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 280px;
}

.card-info-half .card-info-actions .card-info-btn {
  padding: clamp(10px, 1.5cqi, 14px) clamp(16px, 4cqi, 24px);
  font-size: clamp(13px, 2.2cqi, 16px);
  width: 100%;
  text-align: center;
}

.card-info-half .kickoff-countdown {
  gap: clamp(8px, 2cqi, 16px);
}

.card-info-half .kickoff-value {
  font-size: clamp(24px, 5cqi, 40px);
}

.card-info-half .kickoff-label {
  font-size: clamp(9px, 1cqi, 11px);
}

.card-info-half .kickoff-next-match {
  font-size: clamp(9px, 1.2cqi, 12px);
}

.carousel-card-header {
  padding: 24px 24px 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--color-border-light);
}

.carousel-card-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-dark-green);
  line-height: 1;
}


.carousel-card-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px 24px;
  min-height: 0;
}

.carousel-card-scroll[data-leaderboard-target="scroll"] {
  padding: 0;
}

/* ============================
   LEADERBOARD DRILL-IN (card 2)
   ============================ */
/* The card header holds one visible row at a time (global vs league mode);
   each row spans the full header width. */
.lb-drill-headrow:not([hidden]) {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.lb-drill-headrow .carousel-card-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* League mode header: league name + revolving chevron, clustered on the left
   so the code chip can sit at the far right. */
.lb-drill-league {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.lb-switcher-arrow {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color var(--transition);
}

.lb-switcher-arrow:hover {
  color: var(--color-text);
}

/* Each panel takes over the card's remaining space and lays out its own
   scroll region, just like the old single-leaderboard card did. */
.lb-switcher-panel:not([hidden]) {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Empty state when the player is in no leagues. */
.lb-drill-empty:not([hidden]) {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 24px;
}

.lb-drill-empty-title {
  font-weight: 800;
  font-size: 16px;
  color: var(--color-text);
}

.lb-drill-empty-sub {
  color: var(--color-text-secondary);
  font-size: 13px;
  margin-bottom: 8px;
}

.lb-drill-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* Back chevron (inside info card) */
.carousel-prev {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: color var(--transition);
}

.carousel-prev:hover {
  color: var(--color-text);
}

.carousel-back {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: opacity var(--transition);
}

.carousel-back:hover {
  color: #fff;
}

/* ============================
   CARD 1 — INFO (compact)
   ============================ */

.card-info {
  position: relative;
  overflow: hidden;
  justify-content: center;
  padding: clamp(20px, 4cqi, 48px) clamp(16px, 3cqi, 24px);
  background-color: var(--color-dark-green);
  background-image: url('https://cdn.prod.website-files.com/689fd0a66c26ce8fe1446c25/695e1d07ef9f21833f9ca4b7_home-mx-bg-element.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
}

.card-info-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity 120ms ease;
}

.card-info-content.is-fading {
  opacity: 0;
}

.card-info-header {
  text-align: center;
}

.card-info-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 0;
}

.card-info-badge {
  font-size: clamp(10px, 1.2cqi, 13px);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.card-info-goat {
  height: clamp(40px, 8cqi, 100px);
  width: auto;
  margin: clamp(8px, 2cqi, 24px) 0;
  opacity: 0.4;
}

.card-info-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 14cqi, 160px);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -2px;
  color: #62857e;
  margin-bottom: clamp(12px, 2cqi, 24px);
  text-align: center;
}

.card-info-hosts {
  display: flex;
  gap: 8px;
  margin-bottom: clamp(12px, 2cqi, 24px);
  flex-wrap: wrap;
}

.card-info-hosts span {
  font-size: clamp(10px, 1.2cqi, 13px);
  font-weight: 700;
  letter-spacing: var(--ls-normal);
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
}

.card-info-cities {
  max-width: 100%;
  transition: max-width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-info-cities p {
  font-size: clamp(10px, 1.2cqi, 13px);
  font-weight: 500;
  letter-spacing: var(--ls-tight);
  line-height: 1.8;
  color: var(--color-text-secondary);
  text-transform: uppercase;
}

.card-info-date {
  margin-bottom: 16px;
  font-size: clamp(11px, 1.4cqi, 14px);
  font-weight: 700;
  letter-spacing: var(--ls-normal);
  color: var(--color-accent);
  text-transform: uppercase;
}

.card-info-blob {
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,0,0.12), transparent 70%);
  pointer-events: none;
}

/* --- Info Card Action Buttons --- */
.card-info-actions {
  display: flex;
  gap: clamp(8px, 1.5cqi, 16px);
  justify-content: center;
  padding-top: clamp(8px, 1.5cqi, 16px);
  position: relative;
  z-index: 1;
}

.card-info-btn {
  font-family: var(--font-display);
  font-size: clamp(14px, 2cqi, 20px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: clamp(10px, 1.5cqi, 16px) clamp(20px, 5cqi, 48px);
  border-radius: 999px;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  border: 2px solid transparent;
}

.card-info-btn:active {
  transform: scale(0.97);
}

.card-info-btn-filled {
  background: #fff;
  color: var(--color-dark-green);
  border-color: #fff;
  border-top-left-radius: 0;
}

.card-info-btn-filled:hover {
  opacity: 0.9;
}

.card-info-btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  border-bottom-right-radius: 0;
}

.card-info-btn-outline:hover {
  border-color: #fff;
}

/* --- Kickoff Countdown --- */
.kickoff-next-match {
  font-size: clamp(11px, 1.4cqi, 14px);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  margin-bottom: 12px;
}

.kickoff-countdown {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3cqi, 32px);
  position: relative;
  z-index: 1;
}

.kickoff-segment {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
}

.kickoff-value {
  font-family: var(--font-display);
  font-size: clamp(28px, 6cqi, 56px);
  font-weight: 900;
  line-height: 1;
  color: rgba(255, 255, 255, 0.9);
  font-variant-numeric: tabular-nums;
}

.kickoff-label {
  font-family: var(--font);
  font-size: clamp(10px, 1.2cqi, 13px);
  font-weight: 600;
  letter-spacing: var(--ls-tight);
  text-transform: capitalize;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

/* ============================
   CARD 2 — LEADERBOARD ROWS
   ============================ */

.lb-rows {
  display: flex;
  flex-direction: column;
}

.lb-row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: end;
  gap: 12px;
  padding: 14px 24px 14px 12px;
  border-bottom: 1px solid var(--color-border-light);
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

.lb-row-1st {
  font-size: 150%;
}

.lb-row-2nd,
.lb-row-3rd {
  font-size: 120%;
}

.lb-row:last-child {
  border-bottom: none;
}

.lb-row-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 0 2px 2px 0;
}

.lb-row-1st .lb-row-bar { background: var(--color-accent); }
.lb-row-2nd .lb-row-bar { background: var(--color-correct); }
.lb-row-3rd .lb-row-bar { background: var(--color-dark-green); }

.lb-row-me {
  background: rgba(255, 107, 0, 0.04);
}
.lb-row-me .lb-row-name {
  color: var(--color-accent);
}

.lb-row-rank {
  font-weight: 800;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
  text-align: center;
  align-self: center;
}

.lb-row-rank-top {
  color: var(--color-text);
}

.lb-row-name {
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  align-self: center;
}

.lb-row-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 4px;
  min-width: 48px;
}

/* Toggle views: both stat views are always laid out (stacked in the same grid
   cell); a `show-rounds` class on the .lb-rows container flips which is shown.
   The hidden one keeps its space via visibility so rows don't jump. */
.lb-rows .lb-row-stat-alt {
  visibility: hidden;
}

.lb-rows.show-rounds .lb-row-stat-default {
  visibility: hidden;
}

.lb-rows.show-rounds .lb-row-stat-alt {
  visibility: visible;
}

.lb-row-stat-value {
  font-weight: 400;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.lb-row-stat-points .lb-row-stat-value {
  font-weight: 800;
  font-size: 24px;
}

.lb-row-stat-label {
  font-size: 8px;
  /* font-weight: 600; */
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--ls-tight);
  line-height: 1;
}

.lb-row-points-top {
  color: var(--color-accent);
}
/* Toggle cell — stacks both views in same space */
.lb-row-toggle-cell {
  display: grid;
  align-items: end;
  align-self: end;
}

.lb-row-toggle-cell > * {
  grid-area: 1 / 1;
}

/* Block-by-block points (alt view) */
.lb-row-blocks {
  display: flex;
  align-items: center;
  gap: 3px;
}

.lb-block-pt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #fff;
}

.lb-block-pos { background: var(--color-correct); }
.lb-block-neg { background: var(--color-wrong); }
.lb-block-zero { background: var(--color-text-secondary); }

.lb-row-pinned {
  /* margin-top: 8px; */
  padding-top: 14px;
}

.lb-row-pinned .lb-row-name {
  color: var(--color-accent);
}

.lb-load-more {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  background: none;
  /* border: 1px solid var(--color-border); */
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--ls-tight);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.lb-load-more:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

/* ============================
   CARD 3 — SCORECARD
   ============================ */

/* --- Green Summary Header (results state) --- */
.scorecard-header {
  background: var(--color-dark-green);
  color: #fff;
  padding: 14px 16px;
  flex-shrink: 0;
}

.scorecard-header-date {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: var(--ls-tight);
  line-height: 1.1;
}

.scorecard-header-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.85;
}

.scorecard-goat {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

/* --- Two-half layout --- */
.scorecard-halves {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.scorecard-half {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.scorecard-half + .scorecard-half {
  border-top: 1px solid var(--color-border);
}

.scorecard-half-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 0;
  flex-shrink: 0;
}

.scorecard-divider-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--ls-normal);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.scorecard-half-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.scorecard-half-empty {
  color: var(--color-text-secondary);
  font-size: 13px;
  text-align: center;
  padding: 24px 0;
}

/* --- Scroll area (upcoming-only state) --- */
.scorecard-scroll {
  padding: 12px 16px 16px;
}

/* --- Empty state --- */
.scorecard-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  font-size: 14px;
  text-align: center;
  padding: 48px 24px;
}

/* --- Footer action bar --- */
.scorecard-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-top: 1px solid var(--color-border-light);
  gap: 12px;
}

.scorecard-footer-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: var(--ls-normal);
  text-transform: uppercase;
  color: var(--color-accent);
  padding: 0;
}

.scorecard-footer-btn:hover {
  color: var(--color-accent-hover);
}

/* --- Scorecard Card (shared component) --- */
.sc-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  /* Fill the flex parent (.carousel-card). flex:1 works whether the card's size
     comes from height (desktop) or min-height (mobile = 100dvh per section), so the
     footer always sits at the bottom of the screen. height:100% alone collapses
     against a parent that only has min-height. */
  flex: 1;
  min-height: 0;
  height: 100%;
}

.carousel-card .sc-card {
  background: none;
  border: none;
  border-radius: 0;
}

.sc-card-header {
  padding: 24px 24px 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--color-border-light);
}

.sc-card-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-dark-green);
  line-height: 1;
}

.sc-card-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sc-card-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 24px;
  overflow-y: auto;
  container-type: inline-size;
}

.sc-card-section + .sc-card-section {
  border-top: 1px solid var(--color-border-light);
}

.sc-card-section .sc-grid {
  flex: 1;
  grid-template-rows: 1fr 1fr;
  align-content: space-evenly;
}

/* Variant 2: Compact 3-col (5+ tiles) */
.sc-card-section .sc-grid:has(> :nth-child(5)) {
  grid-template-columns: repeat(3, 1fr);
}

.sc-card-section .sc-grid:has(> :nth-child(5)) > .sc-tile {
  padding: 20px 12px;
}

.sc-card-section .sc-grid:has(> :nth-child(5)) .sc-tile-teams {
  padding: 4px 0;
  gap: 4px;
}

.sc-card-section .sc-grid:has(> :nth-child(5)) .sc-tile-team {
  font-size: 12px;
}

.sc-card-section .sc-grid:has(> :nth-child(5)) .sc-tile-team .flag {
  width: 20px;
}

.sc-card-section .sc-grid:has(> :nth-child(5)) .sc-tile-score {
  font-size: 20px;
}

.sc-card-section .sc-grid:has(> :nth-child(5)) .sc-tile-time {
  display: none;
}

.sc-card-section .sc-grid:has(> :nth-child(5)) .sc-tile-vs {
  display: block;
}

.sc-card-section .sc-grid:has(> :nth-child(5)) .sc-tile-footer {
  font-size: 11px;
}

/* Variant 3: Expanded single-column */
.sc-card-section.sc-card-section-expanded .sc-grid {
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  align-content: start;
  gap: 8px;
}

.sc-card-section-expanded .sc-tile {
  flex-direction: row;
  align-items: center;
  max-height: none;
  padding: 20px 12px; 
  gap: 12px;
}

.sc-card-section-expanded .sc-tile-teams {
  flex: none;
  width: 70%;
  padding: 0;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.sc-card-section-expanded .sc-tile-team {
  flex: 1;
  min-width: 0;
  flex-direction: row;
  gap: 8px;
  font-size: 14px;
}

.sc-card-section-expanded .sc-tile-center {
  flex-shrink: 0;
  min-width: 64px;
  text-align: center;
}

.sc-card-section-expanded .sc-tile-team:first-child {
  flex-direction: row-reverse;
  text-align: right;
}

.sc-card-section-expanded .sc-tile-team:last-child {
  text-align: left;
}

.sc-card-section-expanded .sc-tile-team-name {
  display: none;
}

.sc-card-section-expanded .sc-tile-team-full {
  display: block;
  white-space: normal;
  word-break: break-word;
  line-height: 1.3;
}

.sc-card-section-expanded .sc-tile-time {
  display: inline;
  font-size: 18px;
  font-weight: 700;
}

.sc-card-section-expanded .sc-tile-score {
  font-size: 20px;
}

.sc-card-section-expanded .sc-tile-vs {
  display: none;
}

.sc-card-section-expanded .sc-tile-stage {
  display: block;
}

.sc-card-section-expanded .sc-tile-footer {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
  flex: 1;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}

.sc-card-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.sc-card-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.sc-card-expand-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  transition: all var(--transition);
}

.sc-card-expand-btn:hover {
  color: var(--color-text);
  background: var(--color-surface-alt);
}

.sc-card-collapse-icon {
  display: none;
}

.sc-card-section-expanded .sc-card-expand-icon {
  display: none;
}

.sc-card-section-expanded .sc-card-collapse-icon {
  display: inline;
}

/* Collapsed section */
.sc-card-section-collapsed {
  flex: 0 0 auto;
  overflow: hidden;
  padding-top: 8px;
  padding-bottom: 8px;
}

.sc-card-section-collapsed .sc-grid {
  display: none;
}

/* Expanded section takes all remaining space */
.sc-card-section-expanded {
  flex: 1;
  overflow-y: auto;
}

.sc-card-empty {
  color: var(--color-text-secondary);
  font-size: 14px;
  text-align: center;
  padding: 48px 0;
}

.sc-card-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--color-border-light);
  gap: 12px;
}

.sc-card-footer-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: var(--ls-normal);
  text-transform: uppercase;
  color: var(--color-text);
  padding: 0;
}

.sc-card-footer-btn:hover {
  color: var(--color-accent);
}

.sc-card-footer-btn:disabled {
  color: var(--color-text-secondary);
  opacity: 0.5;
  cursor: default;
}

.sc-card-footer-btn:disabled:hover {
  color: var(--color-text-secondary);
}

.sc-card-footer-btn-accent {
  color: var(--color-accent);
}

@keyframes pulse {
  0%, 100% { transform: rotate(0deg);  }
  50% { transform: rotate(2deg); }
}

.sc-card:has(.sc-card-section:hover) .sc-card-footer-btn-accent {
  animation: pulse 1.5s ease-in-out infinite;
}

/* --- Tile Grid --- */
.sc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  height: 100%;
}

/* --- Scorecard Tile --- */
.sc-tile {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  padding: 12px;
  min-height: 0;
  min-width: 0;
  max-height: 144px;
  overflow: hidden;
  background: var(--color-surface);
}

/* Teams: flags on each side of the score, names below flags */
.sc-tile-teams {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
  padding: 16px 0;
}

.sc-tile-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
}

.sc-tile-team .flag {
  width: 32px;
  height: auto;
}

.sc-tile-team-name {
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  line-height: 1.2;
}

.sc-tile-team-full {
  display: none;
  text-align: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  line-height: 1.2;
}

.sc-tile-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.sc-tile-stage {
  display: none;
  font-size: 11px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.sc-tile-venue {
  font-size: 9px;
  line-height: 1.1;
  color: var(--color-text-secondary);
  opacity: 0.75;
  text-align: center;
  margin-bottom: 2px;
}

.sc-tile-score {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  line-height: 1.2;
}

.sc-tile-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.sc-tile-vs {
  display: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
}

/* Footer: pick left, points right */
.sc-tile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border-light);
  font-size: 12px;
  color: var(--color-text-secondary);
}

.sc-tile-pick {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-tile-pick-icon {
  font-weight: 900;
}

.sc-tile-pick-correct {
  color: var(--color-correct);
}

.sc-tile-pick-wrong {
  color: var(--color-wrong);
}

.sc-tile-pick-empty {
  color: var(--color-text-secondary);
  font-style: italic;
  font-size: 11px;
}

.sc-tile-pick-short {
  display: none;
}

.sc-tile-pick strong {
  color: var(--color-text);
  font-weight: 700;
}

.sc-tile-pick em {
  font-style: italic;
}

.sc-tile-footer-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sc-tile-goat-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--color-accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
  white-space: nowrap;
}

.sc-tile-goat-badge img {
  width: 14px;
  height: 14px;
}

.sc-tile-points {
  font-weight: 800;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  line-height: 1;
}

.sc-tile-points-pos { color: var(--color-correct); }
.sc-tile-points-neg { color: var(--color-wrong); }
.sc-tile-points-zero { color: var(--color-text-secondary); }

/* --- Tile state treatments --- */
.sc-tile-correct {
  background: var(--color-correct-bg);
  border-color: rgba(45, 138, 78, 0.2);
}

.sc-tile-banker-correct {
  background: var(--color-correct-bg);
  border-color: rgba(45, 138, 78, 0.2);
}

.sc-tile-wrong {
  background: var(--color-wrong-bg);
  border-color: rgba(196, 52, 45, 0.15);
}

.sc-tile-banker-wrong {
  background: var(--color-wrong-bg);
  border-color: rgba(196, 52, 45, 0.15);
}

.sc-tile-missed {
  opacity: 0.5;
}

.sc-tile-banker {
  background: var(--color-banker-bg);
  border-color: rgba(255, 107, 0, 0.15);
}

/* --- Shared banker-goat styles (used in predictions form & reveal) --- */
.banker-goat {
  transition: filter var(--transition), transform var(--transition);
  filter: grayscale(1) opacity(0.35);
}

.banker-goat-active {
  filter: none;
}

.banker-goat-inline {
  vertical-align: text-bottom;
  margin-left: 4px;
}

.no-matches {
  font-size: 13px;
  color: var(--color-text-secondary);
  font-style: italic;
}

/* ============================
   MAIN VIEW (dashboard)
   ============================ */

.main-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-bg);
}

/* ============================
   COMING SOON (pre-launch gate) — reuses card-info styling
   ============================ */

/* The card-info background extends across the whole body in this view. */
body.body-coming-soon {
  background-color: var(--color-dark-green);
  background-image: url('https://cdn.prod.website-files.com/689fd0a66c26ce8fe1446c25/695e1d07ef9f21833f9ca4b7_home-mx-bg-element.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #fff;
}

/* Emblem uses the dark-green tone on coming-soon only (inline SVG = currentColor). */
body.body-coming-soon .nav-logo-link {
  color: var(--color-accent-hover); /* #011f18 */
}

.coming-soon-view {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow-y: auto; /* safety: actions stay reachable if content can't fit */
  container-type: inline-size;
}

.coming-soon-card {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(20px, 4vw, 48px);
}

/* Coming-soon spacing is proportional to viewport height so the action button is
   never pushed out of view (the shared .card-info-main uses a fixed 5rem padding). */
.coming-soon-card .card-info-main {
  padding: clamp(1rem, 5vh, 4rem) 0;
  flex: 0 1 auto; /* don't greedily grow; let the action button keep its space */
}

.coming-soon-card .card-info-goat {
  margin: clamp(6px, 2vh, 24px) 0;
}

/* Title scales with width (cqi) but is also capped by height so a wide, short
   window can't blow it up past the viewport. */
.coming-soon-card .card-info-title {
  font-size: min(clamp(40px, 14cqi, 140px), 16vh);
  margin-bottom: clamp(8px, 1.5vh, 20px);
}

.coming-soon-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 12px;
}

.coming-soon-tagline {
  font-size: clamp(14px, 2cqi, 18px);
  opacity: 0.85;
  margin: 8px 0 16px;
}

.coming-soon-signedin {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.9;
}

/* ============================
   LEAGUES VIEW
   ============================ */

.leagues-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-bg);
}


.leagues-track {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.league-carousel-card {
  flex: 0 0 calc(50% - var(--card-gap) / 2);
}

.leagues-chevron {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: opacity var(--transition);
}

.leagues-chevron:hover {
  color: var(--color-text);
}

.leagues-chevron-left { left: 12px; }
.leagues-chevron-right { right: 12px; }

.league-card-code {
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  /* color: var(--color-accent); */
  color: var(--color-text-secondary);
  letter-spacing: var(--ls-wide);
  cursor: pointer;
  transition: opacity var(--transition);
}

.league-card-code:hover {
  opacity: 0.7;
  color: var(--color-accent);
}

/* Right-hand cluster in the league header: prize gift + code. */
.lb-drill-headmeta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-right: -5px;
}

.lb-prize-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: var(--color-banker-bg);
  border: none;
  border-radius: 4px;
  color: var(--color-accent);
  cursor: pointer;
  transition: transform var(--transition);
}

.lb-prize-btn:hover {
  transform: scale(1.15);
}

.lb-prize-btn-empty {
  color: var(--color-border);
  background: var(--color-surface-alt);
}

.lb-prize-btn[hidden] {
  display: none;
}

.prize-dialog-text {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  white-space: pre-wrap;
  margin-bottom: 24px;
}

.prize-dialog-empty {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  font-style: italic;
  margin-bottom: 24px;
}

.prize-dialog-input {
  resize: vertical;
  min-height: 96px;
  white-space: pre-wrap;
}

/* ============================
   RULES VIEW
   ============================ */

.rules-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-bg);
}

.rules-card-wrap {
  flex: 1;
  padding: 0 48px 24px;
  overflow: hidden;
  display: flex;
  min-width: 0;
}

.card-rules {
  flex: 1;
}

.card-rules .carousel-card-scroll {
  overflow: hidden;
  overflow-y: auto;
}

.rules-content {
  columns: 2;
  column-gap: 48px;
}

.rules-section {
  margin-bottom: 32px;
  break-inside: avoid;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-border-light);
}

.rules-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.rules-section h3 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: var(--ls-normal);
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rules-section-number {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.rules-section p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 8px;
}

.rules-section p:last-child {
  margin-bottom: 0;
}

/* --- Points Strip (replaces table) --- */
.rules-points-strip {
  display: flex;
  gap: 6px;
  margin-top: 14px;
}

/* Inline UI examples shown within the rules text — static replicas of real
   components (same classes for identical styling, JS hooks stripped). */
.rules-example {
  display: flex;
  justify-content: center;
  margin: 14px 0;
}

/* The avatar dropdown is normally position:absolute + hidden; show it in-flow here. */
.rules-dropdown-static {
  position: static;
  display: flex;
  min-width: 180px;
}

/* Frame the mini-league header replica like a little card so it reads as a header
   sample rather than a full-width bar. */
.rules-example .lb-drill-headrow {
  flex: 0 1 auto;
  width: 100%;
  max-width: 400px;
  padding: 12px 16px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
}

/* Title in the replica shouldn't shrink to nothing. */
.rules-example .lb-drill-headrow .carousel-card-title {
  font-size: 22px;
}

.rules-points-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  transition: all var(--transition);
}

.rules-points-item-final {
  background: var(--color-text);
  border-color: var(--color-text);
}

.rules-points-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  color: var(--color-accent);
}

.rules-points-item-final .rules-points-value {
  color: var(--color-accent);
}

.rules-points-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-tight);
  color: var(--color-text-secondary);
}

.rules-points-item-final .rules-points-label {
  color: rgba(255, 255, 255, 0.7);
}

/* --- Banker Section --- */
.rules-section-banker {
  background: var(--color-banker-bg);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 20px;
  margin-left: -4px;
  margin-right: -4px;
}

.rules-goat-icon {
  vertical-align: text-bottom;
  margin-left: 4px;
}

.rules-banker-outcomes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
}

.rules-banker-outcome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
}

.rules-banker-outcome strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.rules-banker-outcome span {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.rules-banker-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
  line-height: 1;
}

.rules-banker-outcome-correct .rules-banker-icon {
  background: var(--color-correct-bg);
  color: var(--color-correct);
  border: 1px solid var(--color-correct);
}

.rules-banker-outcome-wrong .rules-banker-icon {
  background: var(--color-wrong-bg);
  color: var(--color-wrong);
  border: 1px solid var(--color-wrong);
}

.rules-note {
  font-size: 13px;
  color: var(--color-text-secondary);
  font-style: italic;
  margin-top: 4px;
}

/* ============================
   LOGIN
   ============================ */

/* Full-screen brand hero — same dark-green + MX background treatment as the
   dashboard's .card-info card, so the front door matches the app it opens. */
.login-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
  color: #fff;
  background-color: var(--color-dark-green);
  background-image: url('https://cdn.prod.website-files.com/689fd0a66c26ce8fe1446c25/695e1d07ef9f21833f9ca4b7_home-mx-bg-element.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.login-hero {
  text-align: center;
  padding: 48px 32px;
  max-width: 520px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-flags {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.hero-art {
  display: block;
  max-width: 280px;
  padding-right: 32px;
  height: auto;
  margin: 0 auto 16px;
  opacity: 0.85;
  filter: drop-shadow(0 12px 32px rgba(0,0,0,0.25));
  pointer-events: none;
}

.hero-flag {
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: transform 0.3s ease;
}

.hero-flag:hover { transform: scale(1.1) rotate(-2deg); }
.hero-flag:nth-child(2) { transform: scale(1.1); }
.hero-flag:nth-child(2):hover { transform: scale(1.2) rotate(2deg); }

/* Headline — mirrors .card-info-title (display font, teal, tight tracking) */
.login-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 18vw, 120px);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -2px;
  text-transform: uppercase;
  color: #62857e;
  margin-bottom: 16px;
}

/* Date line — mirrors .card-info-date */
.login-date {
  font-size: clamp(11px, 1.4cqi, 14px);
  font-weight: 700;
  letter-spacing: var(--ls-normal);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 60px;
}

/* White CTA on green — mirrors .card-info-btn-filled */
.login-submit-btn {
  padding: 14px 40px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
  background: #fff;
  color: var(--color-dark-green);
}

.login-submit-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.login-note {
  margin-top: 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.login-rules-link {
  display: inline-block;
  margin-top: 60px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color var(--transition);
}

.login-rules-link:hover {
  color: #fff;
}

.login-rules-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* ============================
   MESSAGES
   ============================ */

.msg {
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-top: 16px;
  text-align: center;
}

.msg-error {
  background: var(--color-wrong-bg);
  color: var(--color-wrong);
}

.msg-success {
  background: var(--color-correct-bg);
  color: var(--color-correct);
}

.msg-info {
  background: #fff5eb;
  color: var(--color-accent);
}

/* ============================
   PREDICTIONS
   ============================ */

.predictions-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.view-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: var(--ls-normal);
  text-transform: uppercase;
  color: var(--color-text);
}

.countdown {
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--color-accent);
  letter-spacing: var(--ls-normal);
}

.countdown-expired {
  color: var(--color-wrong);
}

.prediction-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.prediction-card.prediction-banker {
  background: var(--color-banker-bg);
  border-color: var(--color-accent);
}

.prediction-kickoff {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--ls-tight);
  margin-bottom: 10px;
}

/* --- Segmented Control --- */
.segmented-control {
  display: flex;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg);
}

.segment {
  flex: 1;
  position: relative;
  cursor: pointer;
  transition: all var(--transition);
}

.segment + .segment {
  border-left: 1px solid var(--color-border);
}

.segment input[type='radio'] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.segment-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.segment:hover {
  background: rgba(2,54,44,0.05);
}

.segment.selected {
  background: var(--color-dark-green);
  color: white;
}

.segment.selected .segment-label {
  color: white;
}

.segment.selected .flag {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.3);
}

.segment-draw .segment-label {
  font-size: 12px;
}

.segment:has(input:disabled) {
  cursor: default;
  opacity: 0.7;
}

.segment:has(input:disabled):hover {
  background: transparent;
}

.segment.selected:has(input:disabled) {
  background: var(--color-dark-green);
  opacity: 0.7;
}

/* --- Banker Toggle --- */
.banker-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  margin-left: -10px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 12px;
  color: var(--color-text-secondary);
  user-select: none;
}

.banker-toggle input[type='checkbox'] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.banker-toggle:hover .banker-goat {
  transform: scale(1.15);
}

.banker-text {
  font-weight: 600;
}

.predictions-dialog-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  align-items: center;
}

.predictions-submit {
  flex: 1;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius);
}

/* ============================
   PREDICTIONS DIALOG
   ============================ */

.predictions-dialog {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  background: var(--color-surface);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  max-width: 540px;
  width: calc(100% - 32px);
  max-height: 85dvh;
  margin: auto;
  position: fixed;
  inset: 0;
  height: fit-content;
  overflow: hidden;
}

.predictions-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.predictions-dialog-content {
  padding: 28px 32px 32px;
  overflow-y: auto;
  max-height: 85dvh;
}

.predictions-dialog-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.predictions-dialog-title,
.reveal-dialog-title {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: var(--ls-normal);
  text-transform: uppercase;
}

.reveal-dialog-title {
  margin-bottom: 12px;
}

.reveal-dialog-content {
  padding: 28px 32px 32px;
  overflow-y: auto;
  max-height: 85dvh;
}

.predictions-dialog-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--color-text-secondary);
}

.predictions-dialog-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 200px;
}

.predictions-dialog-check {
  font-size: 48px;
  color: var(--color-correct);
}

.predictions-dialog-message {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
}

/* ============================
   REVEAL
   ============================ */

.reveal-card {
  position: relative;
  overflow: hidden;
  border: 2px dashed var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  background: transparent;
}

.reveal-card-pending > * {
  opacity: 0;
}

.reveal-card-pending {
  animation: revealCardIn 0.4s ease forwards;
}

.reveal-emoji {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 64px;
  opacity: 0;
  pointer-events: none;
  line-height: 1;
}

.reveal-card-pending .reveal-emoji {
  animation: revealEmojiBurst 1.4s ease forwards;
  animation-delay: inherit;
}

@keyframes revealCardIn {
  0% {
    background: transparent;
    border-style: dashed;
    border-color: var(--color-border-light);
  }
  100% {
    background: var(--reveal-bg, var(--color-surface));
    border-style: solid;
    border-color: var(--reveal-border, var(--color-border));
  }
}

.reveal-card-pending > * {
  animation: revealContentIn 0.3s ease forwards;
  animation-delay: inherit;
}

@keyframes revealContentIn {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes revealEmojiBurst {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  20% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0.9;
  }
  50% {
    transform: translate(-50%, -50%) scale(2.2);
    opacity: 0.85;
  }
  100% {
    transform: translate(-50%, -50%) scale(3.5);
    opacity: 0;
  }
}

.reveal-correct {
  --reveal-bg: var(--color-correct-bg);
  --reveal-border: var(--color-correct);
}

.reveal-wrong {
  --reveal-bg: var(--color-wrong-bg);
  --reveal-border: var(--color-wrong);
}

.reveal-banker-correct {
  --reveal-bg: var(--color-banker-bg);
  --reveal-border: var(--color-accent);
}

.reveal-banker-wrong {
  --reveal-bg: var(--color-wrong-bg);
  --reveal-border: var(--color-wrong);
}

.reveal-missed {
  --reveal-bg: var(--color-bg);
  --reveal-border: var(--color-border);
  color: var(--color-text-secondary);
}

.reveal-card:not(.reveal-card-pending) {
  background: var(--reveal-bg, var(--color-surface));
  border-style: solid;
  border-color: var(--reveal-border, var(--color-border));
}

.reveal-card:not(.reveal-card-pending) > * {
  opacity: 1;
}

.reveal-banker-correct:not(.reveal-card-pending) {
  box-shadow: 0 0 0 2px var(--color-accent), 0 0 20px rgba(255,107,0,0.12);
}

.reveal-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.reveal-team {
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.reveal-vs {
  font-size: 11px;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  font-weight: 600;
}

.reveal-score {
  text-align: center;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 2px;
  margin: 4px 0;
}

.reveal-cards {
  text-align: center;
  font-size: 11px;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}

.reveal-pick {
  text-align: center;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.reveal-banker-badge {
  display: inline-block;
  background: var(--color-accent);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
}

.reveal-points {
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  margin-top: 8px;
  color: var(--color-accent);
}

.reveal-card.reveal-wrong .reveal-points,
.reveal-card.reveal-banker-wrong .reveal-points {
  color: var(--color-wrong);
}

.reveal-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-surface);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin: 20px 0 16px;
  animation: revealFadeIn 0.4s ease forwards;
}

.reveal-total-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}

.reveal-total-value {
  font-size: 28px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--color-accent);
}

.total-positive { color: var(--color-correct); }
.total-negative { color: var(--color-wrong); }

/* ============================
   GROUPS (full page + mini)
   ============================ */

.groups-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-bg);
}

/* Schedule view — section headings + knockout bracket list */
/* Top-level section heading — outranks the per-group/round card titles. */
.schedule-section-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
  color: var(--color-dark-green);
  margin: 28px 0 14px;
}
.schedule-section-title:first-child { margin-top: 0; }

/* Third-place ranking framed as a card so it reads distinct from the group tables. */
.third-place-card .schedule-note {
  margin: 0 0 12px;
}

/* Accessible visually-hidden text (announced by screen readers, off-screen visually). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Unresolved knockout slot ("2A", "W74", "RU101") — a muted chip, not a fake flag. */
.slot-chip {
  display: inline-block;
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: var(--ls-tight);
  color: var(--color-text-secondary);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
  padding: 2px 7px;
}

/* Qualifying-position marker — a non-colour cue alongside the row highlight. */
.group-qual-dot {
  color: var(--color-accent);
  font-size: 8px;
  vertical-align: middle;
  margin-left: 3px;
}

.schedule-knockout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 24px;
}

/* Knockout matches within a round — responsive grid (1 col mobile, 2-3 on wide). */
.ko-round-matches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}

.ko-round-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ko-match {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px 14px;
}

.ko-match-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
  min-height: 14px; /* reserve the row so cards stay level when venue is blank */
}

.ko-match-venue {
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ko-match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.ko-team-home { text-align: right; }
.ko-team-away { text-align: left; }
.ko-team { min-width: 0; overflow-wrap: anywhere; }

.ko-match-score {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Unplayed match: the "v" is a quiet placeholder, not a bold score. */
.ko-match-score-tbd {
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--ls-normal);
  color: var(--color-text-secondary);
}

.ko-pens {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.schedule-note {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin: -4px 0 12px;
}

.third-place-table { margin-bottom: 8px; }

/* Admin third-place slot assignment */
.admin-third-row {
  grid-template-columns: 1fr auto;
  gap: 12px;
}
.admin-third-slot {
  font-weight: 700;
  color: var(--color-text-secondary);
}
.admin-third-select {
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 13px;
  min-width: 180px;
}

.groups-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 48px 24px;
}

.groups-list {
  display: grid;
  gap: 24px;
}

@media (min-width: 640px) {
  .groups-list {
    grid-template-columns: 1fr 1fr;
  }
}

.group-full {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
}

.group-full-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: var(--ls-normal);
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 10px;
}

.group-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.group-table th {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  text-align: center;
  padding: 4px 6px;
  border-bottom: 2px solid var(--color-border);
}

.group-table th:nth-child(2) { text-align: left; }

.group-table td {
  text-align: center;
  padding: 6px 6px;
  border-bottom: 1px solid var(--color-border-light);
  font-variant-numeric: tabular-nums;
}

.group-table tbody tr:last-child td { border-bottom: none; }

.group-pos {
  font-weight: 700;
  color: var(--color-text-secondary);
  width: 24px;
}

.group-team {
  text-align: left !important;
  font-weight: 600;
}

.group-pts-col {
  font-weight: 800;
  color: var(--color-accent);
}

.group-row-qualified {
  background: var(--color-banker-bg);
}
/* Left accent bar on the position cell — a visible, non-colour-only "qualifying" cue
   (paired with the .group-qual-dot marker in the cell). */
.group-row-qualified .group-pos {
  box-shadow: inset 3px 0 0 var(--color-accent);
  font-weight: 700;
}

/* Group mini (sidebar/card) */
.group-mini {
  margin-bottom: 12px;
}

.group-mini-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: var(--ls-tight);
  margin-bottom: 4px;
}

.group-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 12px;
}

.group-mini-row + .group-mini-row {
  border-top: 1px solid var(--color-border-light);
}

.group-mini-qualified .group-mini-team { font-weight: 700; }

.group-mini-team {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.group-mini-pts {
  font-weight: 700;
  color: var(--color-accent);
  min-width: 20px;
  text-align: right;
}

/* ============================
   FIXTURES PAGE
   ============================ */

.fixtures-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  margin-bottom: 24px;
}

.fixtures-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-bg);
}

.fixtures-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 48px 24px;
}

.fixtures-block {
  margin-bottom: 28px;
}

.fixtures-block-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
}

.fixtures-block-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0;
  padding-bottom: 0;
}

.fixtures-block-status {
  font-size: 13px;
  font-weight: 600;
}

.fixtures-block-done {
  color: var(--color-correct);
}

.fixture-row {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 6px;
  box-shadow: var(--shadow);
}

.fixture-row-main {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.fixture-home {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
}

.fixture-away {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
}

.fixture-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  padding: 0 12px;
}

.fixture-center-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
}

.fixture-center-score {
  color: var(--color-accent);
  font-weight: 800;
}

.fixture-stage {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.fixture-venue {
  font-size: 10px;
  color: var(--color-text-secondary);
  opacity: 0.65;
  text-align: center;
  margin-top: 4px;
}

/* ============================
   ADMIN
   ============================ */

.admin-results {
  overflow-y: auto;
  height: 100dvh;
}

.admin-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  scroll-margin-top: 16px;
}

.admin-block-current { border-color: var(--color-accent); }
.admin-block-closed { opacity: 0.72; }

.admin-block-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.admin-block-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-block-meta {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.admin-block-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  padding: 2px 6px;
  border-radius: 4px;
}
.admin-block-badge-current { background: var(--color-accent); color: #fff; }
.admin-block-badge-closed  { background: var(--color-border); color: var(--color-text-secondary); }
.admin-block-badge-future  { background: transparent; color: var(--color-text-secondary); border: 1px solid var(--color-border); }

.admin-block-matches {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-match {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.admin-match-home { text-align: right; font-size: 14px; font-weight: 600; }
.admin-match-away { text-align: left;  font-size: 14px; font-weight: 600; }

.admin-match-scores {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-match-dash { color: var(--color-text-secondary); }

.admin-score-input {
  width: 48px;
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  text-align: center;
}

.admin-match-pens {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 2px 0 6px;
}

.admin-match-pens-label {
  font-size: 10px;
  color: var(--color-text-secondary);
  margin-right: 4px;
}

.admin-pen-input {
  width: 38px;
  padding: 3px 6px;
  font-size: 12px;
}

.admin-match-cards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 2px 0 6px;
}

.admin-match-cards-label { font-size: 12px; }
.admin-match-cards-label-red { margin-left: 8px; }

/* "API" tag on auto-filled fixtures + colour-coded audit-log actions. */
.admin-api-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: 4px;
  padding: 1px 4px;
  vertical-align: middle;
}

.score-log-table td { font-size: 12px; }

.score-log-action {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-tight);
}
.score-log-action-score_applied { color: var(--color-correct); }
.score-log-action-skipped_manual,
.score-log-action-unchanged { color: var(--color-text-secondary); }
.score-log-action-unmatched,
.score-log-action-error { color: var(--color-wrong); }

.admin-card-input {
  width: 34px;
  padding: 3px 5px;
  font-size: 12px;
}

.admin-block-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

/* ============================
   LEAGUE DIALOG
   ============================ */

.league-dialog {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  background: var(--color-surface);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  max-width: 380px;
  width: calc(100% - 32px);
  margin: auto;
  position: fixed;
  inset: 0;
  height: fit-content;
}

.league-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.league-dialog-content {
  padding: 32px;
}

.league-dialog-title {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: var(--ls-normal);
  text-transform: uppercase;
  margin-bottom: 24px;
}

/* League-created confirmation — prominent, copyable share code. */
.league-created-content {
  text-align: center;
}

.league-created-sub {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.league-created-code {
  display: inline-block;
  font-family: monospace;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--color-accent);
  background: var(--color-surface-alt);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 14px 20px;
  cursor: pointer;
  transition: opacity var(--transition);
}

.league-created-code:hover {
  opacity: 0.8;
}

.league-created-hint {
  font-size: 11px;
  color: var(--color-text-secondary);
  margin: 10px 0 20px;
}

.league-dialog-form:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.league-dialog-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 15px;
  background: var(--color-surface-alt);
  color: var(--color-text);
  transition: border-color var(--transition);
}

.league-dialog-input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.league-dialog-input-code {
  text-transform: uppercase;
  font-family: monospace;
  font-size: 18px;
  letter-spacing: 4px;
  text-align: center;
}

.league-dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ============================
   SIDEBAR COMPAT (for card 3)
   ============================ */

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-section-header h3 {
  margin-bottom: 0;
}

.sidebar-section-header + * {
  margin-top: 10px;
}

/* ============================
   SIMPLE VIEW
   ============================ */

.simple-view {
  flex: 1;
  overflow-y: auto;
  padding: 0 clamp(16px, 4vw, 48px) 48px;
}

.simple-section {
  margin-bottom: 32px;
}

.simple-section-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  height: calc(100dvh - 96px);
}

.simple-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.simple-panel-leaderboard {
  display: flex;
  flex-direction: column;
}

.simple-panel-leaderboard > [data-simple-leagues-target] {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.simple-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--color-border-light);
}

.simple-panel-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--color-dark-green);
  line-height: 1;
}

.simple-panel-link {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
  color: var(--color-text);
  text-decoration: none;
}

.simple-panel-link:hover {
  color: var(--color-accent);
}

.simple-panel-link-back {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--color-dark-green);
  text-decoration: none;
}

.simple-panel-link-back:hover {
  color: var(--color-accent);
}

.simple-panel-body {
  padding: 16px 24px;
}

.simple-league-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--color-border-light);
}

.simple-league-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
}

.simple-league-arrow {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 28px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  transition: color var(--transition);
}

.simple-league-arrow:hover {
  color: var(--color-text);
}

.simple-fixtures-toggle {
  margin-top: 16px;
  width: 100%;
  border: none;
}

.simple-groups .groups-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* ============================
   MOBILE
   ============================ */

@media (max-width: 767px) {
  body {
    overflow: hidden;
    height: 100dvh;
  }

  .nav-bar {
    padding: 8px 16px;
    gap: 8px;
  }

  /* Mobile header is just logo (top-left, in .nav-left) + hamburger (right). */
  .nav-pills-desktop,
  .nav-avatar-menu {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  /* Full-width sheet dropping from under the header — no rounded corners. */
  .nav-mobile-menu:not([hidden]) {
    display: flex;
  }

  .nav-mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 200;
    flex-direction: column;
    width: 100%;
    padding: 8px;
    background: var(--color-surface);
    border: none;
    border-top: 1px solid var(--color-border);
    border-radius: 0;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  }

  .nav-mobile-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 12px;
    border-bottom: 1px solid var(--color-border-light);
    margin-bottom: 6px;
  }

  .nav-mobile-avatar {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .nav-mobile-name {
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-mobile-links {
    display: flex;
    flex-direction: column;
  }

  .nav-mobile-section {
    display: flex;
    flex-direction: column;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--color-border-light);
  }

  .nav-mobile-section-label {
    padding: 4px 12px;
    font-family: var(--font);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: var(--ls-tight);
    text-transform: uppercase;
    color: var(--color-text-secondary);
  }

  /* button_to renders a <form>; collapse it so the button lays out flat. */
  .nav-mobile-menu form {
    margin: 0;
    display: contents;
  }

  .nav-mobile-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: 11px 12px;
    border: none;
    border-radius: 8px;
    background: none;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: var(--ls-tight);
    text-transform: uppercase;
    color: var(--color-text);
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition);
  }

  .nav-mobile-link:hover,
  .nav-mobile-link:active {
    background: var(--color-surface-alt);
  }

  .nav-mobile-link-active {
    color: var(--color-accent);
  }

  .nav-mobile-link-logout {
    color: var(--color-accent);
  }

  .main-view,
  .leagues-view {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .carousel {
    flex: 1;
    padding: 0;
    overflow: hidden;
  }

  .carousel-viewport {
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .carousel-prev,
  .carousel-back,
  .leagues-chevron { display: none; }

  .carousel-track {
    flex-direction: column;
    transform: none !important;
    gap: 0;
    height: auto;
  }

  .carousel-card {
    flex: none;
    min-height: calc(100dvh - 60px);
    scroll-snap-align: start;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .carousel-card + .carousel-card {
    border-top: none;
  }

  .carousel-card-scroll {
    max-height: none;
    overflow-y: auto;
  }

  .card-info {
    padding: 32px 20px;
  }

  .card-info-title {
    font-size: clamp(48px, 18cqi, 102px);
  }

  .card-info-cities {
    max-width: none;
    margin-inline: 0;
  }

  body:has(.rules-view) {
    overflow: auto;
    height: auto;
  }

  .rules-view {
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .rules-card-wrap {
    padding: 0;
    overflow: visible;
    flex: none;
  }

  .card-rules {
    border-radius: 0;
    border-left: none;
    border-right: none;
    overflow: visible;
    min-height: auto;
    max-width: 100vw;
  }

  .card-rules .carousel-card-scroll {
    overflow: visible;
    padding: 16px 20px 24px;
  }

  .rules-content {
    columns: 1;
  }

  .rules-section p,
  .rules-section li {
    font-size: 13px;
  }

  .rules-section-banker {
    margin-left: 0;
    margin-right: 0;
    padding: 16px;
  }

  .rules-points-strip {
    gap: 4px;
  }

  .rules-points-item {
    padding: 10px 2px;
  }

  .rules-points-value {
    font-size: 20px;
  }

  .rules-points-label {
    font-size: 9px;
  }

  .rules-banker-outcome {
    padding: 8px 12px;
    gap: 10px;
  }

  .rules-banker-outcome strong,
  .rules-banker-outcome span {
    font-size: 12px;
  }

  .rules-banker-icon {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .league-carousel-card {
    flex: 0 0 auto;
  }

  .container {
    padding: 16px;
  }

  .login-hero {
    padding: 32px 20px;
  }

  .hero-art {
    max-width: 200px;
  }

  .hero-flag {
    width: 56px;
  }

  .reveal-team {
    font-size: 13px;
  }

  .segment-label {
    padding: 8px 6px;
    font-size: 12px;
  }

  body:has(.fixtures-view) {
    overflow: auto;
    height: auto;
  }

  .fixtures-view {
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .fixtures-scroll {
    padding: 0 16px 24px;
    overflow: visible;
  }

  .fixtures-block-title-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .fixture-home,
  .fixture-away {
    font-size: 12px;
  }

  .fixture-center-value {
    font-size: 15px;
  }

  .fixture-row {
    padding: 10px;
  }

  .predictions-dialog {
    max-width: none;
    width: 100%;
    max-height: 100dvh;
    border-radius: 0;
    inset: 0;
    margin: 0;
  }

  .predictions-dialog-content {
    max-height: 100dvh;
    padding: 20px 16px 24px;
  }

  body:has(.groups-view) {
    overflow: auto;
    height: auto;
  }

  .groups-view {
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .groups-scroll {
    padding: 0 16px 24px;
    overflow: visible;
  }

  .group-table .group-col-g,
  .group-table .group-col-gd,
  .group-table .group-col-cards {
    display: none;
  }

  .sc-tile-team {
    font-size: 11px;
    letter-spacing: 0.02em;
  }

  .sc-tile-team .flag {
    width: 20px;
  }

  .sc-tile {
    padding: 8px;
    max-height: none;
  }

  .sc-tile-teams {
    padding: 8px 0;
  }

  .sc-card-section .sc-grid:has(> :nth-child(5)) {
    grid-template-columns: 1fr 1fr;
  }

  .sc-tile-footer {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sc-tile-pick-full {
    display: none;
  }

  .sc-tile-pick-short {
    display: inline;
    padding-right: 2px;
  }

  .sc-tile-goat-label {
    display: none;
  }

  .sc-tile-time {
    display: none;
  }

  .sc-tile-vs {
    display: block;
  }

  .sc-card-expand-btn {
    display: none;
  }

  .simple-section-top {
    grid-template-columns: 1fr;
    height: auto;
  }
}

