/* ChalkLeague Duolingo-style PWA Stylesheet (shared tokens loaded from /tokens.css) */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* Sticky Top Masthead */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #FFFFFF;
  color: var(--ink);
  border-bottom: 1px solid #E5E5E5;
  box-shadow: none;
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 60px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  min-width: 0;
  text-decoration: none;
  color: var(--chalk);
  flex-shrink: 1;
}

.brand-mark {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.brand-sub {
  font-size: 11.5px;
  color: var(--chalk-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desktop-tabs {
  display: none;
  align-items: center;
  gap: 4px;
  background: rgba(251, 248, 241, 0.08);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--slate-line);
}

.dtab-btn {
  border: 0;
  background: transparent;
  color: var(--chalk);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  padding: 9px 16px;
  min-height: 40px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dtab-btn:hover {
  background: rgba(251, 248, 241, 0.12);
}

.dtab-btn.active {
  background: var(--surface);
  color: var(--ink);
}

.topbar-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.desktop-club-links {
  display: none;
  align-items: center;
  gap: 4px;
}

.desktop-club-links a {
  color: var(--chalk-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 10px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
}

.desktop-club-links a:hover {
  color: var(--chalk);
  background: rgba(251, 248, 241, 0.09);
}

.fairplay-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(60, 201, 137, 0.14);
  color: var(--chalk);
  border: 1px solid rgba(60, 201, 137, 0.55);
  white-space: nowrap;
  font-variant-numeric: lining-nums tabular-nums;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--promo-bright);
  flex-shrink: 0;
}

.pwa-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1.5px solid #E5E5E5;
  background: transparent;
  color: var(--chalk);
  cursor: pointer;
}

.pwa-mobile-drawer {
  background: #FFFFFF;
  border-top: 1px solid var(--slate-line);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: max-height 0.24s ease, opacity 0.2s ease, transform 0.2s ease;
}

.pwa-mobile-drawer.open {
  max-height: 360px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.pwa-drawer-links {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pwa-drawer-links > a {
  color: var(--chalk);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 11px 12px;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-radius: 10px;
}

.pwa-drawer-links > a:hover {
  background: rgba(251, 248, 241, 0.08);
}

.pwa-drawer-meta {
  display: flex;
  gap: 12px;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid var(--slate-line);
}

.pwa-drawer-meta a {
  color: var(--chalk-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
}

/* Shell & Responsive Cockpit */
.app-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 14px 96px;
}

.main-content {
  min-height: calc(100dvh - 160px);
}

.cockpit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.cockpit-primary {
  min-width: 0;
}

.desktop-only-rail {
  display: none;
}

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

.card-chalk {
  background: radial-gradient(circle at 92% 0%, rgba(234, 184, 84, 0.16), transparent 44%), linear-gradient(155deg, var(--slate-2) 0%, var(--slate) 100%);
  color: var(--chalk);
  border-color: var(--slate-line);
  box-shadow: var(--shadow-lg);
}

.ssr-hero-title {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.18;
  margin: 10px 0 8px;
  color: var(--chalk);
}

.ssr-hero-copy {
  margin: 0 0 10px;
  color: var(--chalk);
  font-size: 15px;
}

.ssr-hero-meta {
  margin: 0 0 14px;
  color: var(--chalk-muted);
  font-size: 13.5px;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
}

.muted-text {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

/* Matchup Hero (Compact on mobile so Q1 input sits above fold!) */
.matchup-hero {
  padding: 14px 16px;
}

.matchup-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.div-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--gold-text);
  background: rgba(234, 184, 84, 0.14);
  border: 1px solid rgba(234, 184, 84, 0.45);
  padding: 4px 10px;
  border-radius: 999px;
}

.card:not(.card-chalk) .div-badge {
  color: var(--brass);
  background: var(--brass-bg);
  border-color: #E5A400;
}

.matchup-date {
  font-size: 12px;
  color: var(--chalk-muted);
  font-weight: 600;
}

.card:not(.card-chalk) .matchup-date {
  color: var(--ink-soft);
}

.versus-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.player-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.player-box.right {
  text-align: right;
  align-items: flex-end;
}

.player-role {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.55px;
  color: var(--chalk-muted);
  font-variant-numeric: lining-nums tabular-nums;
}

.player-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--chalk);
  line-height: 1.2;
}

.player-meta {
  font-size: 12px;
  color: var(--chalk-muted);
  font-variant-numeric: lining-nums tabular-nums;
}

.vs-chip {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.9px;
  color: var(--ink);
  background: var(--brass-bright);
  padding: 4px 9px;
  border-radius: 999px;
}

/* Mobile collapsible 1-row Opponent Scouting summary inside hero */
.hero-scout-inline {
  margin-top: 12px;
}

.hero-scout-toggle {
  width: 100%;
  min-height: 44px;
  border: 1.5px solid #E5E5E5;
  border-radius: 10px;
  background: #FFFFFF;
  color: var(--chalk);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.hero-scout-summary-tag {
  color: var(--gold-text);
  font-weight: 800;
  font-variant-numeric: lining-nums tabular-nums;
}

.hero-scout-body {
  display: none;
  margin-top: 10px;
}

.hero-scout-body.open {
  display: block;
}

.scout-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
}

.scout-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.65px;
  color: var(--ink);
}

.card-chalk .scout-title {
  color: var(--chalk);
}

.scout-hint {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 600;
}

.card-chalk .scout-hint {
  color: var(--gold-text);
}

.scout-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.scout-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scout-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.scout-cat {
  font-weight: 600;
  color: var(--ink);
}

.card-chalk .scout-cat {
  color: var(--chalk);
}

.scout-right-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.scout-tag {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  padding: 2px 7px;
  border-radius: 6px;
}

.scout-tag.weak {
  background: var(--releg-bg);
  color: var(--releg);
}

.scout-tag.strong {
  background: var(--promo-bg);
  color: var(--promo);
}

.scout-tag.mid {
  background: var(--brass-bg);
  color: var(--brass);
}

.scout-pct {
  font-weight: 800;
  font-variant-numeric: lining-nums tabular-nums;
}

.scout-pct.weak { color: var(--releg); }
.scout-pct.strong { color: var(--promo); }
.scout-pct.mid { color: var(--brass); }

.card-chalk .scout-pct.weak { color: var(--releg); }
.card-chalk .scout-pct.strong { color: var(--promo-text); }
.card-chalk .scout-pct.mid { color: var(--gold-text); }

/* Contrast-hardened GPU bar tracks (>= 3.2:1 against #102026) */
.bar-track {
  height: 7px;
  background: #F7F7F7;
  border-radius: 999px;
  overflow: hidden;
}

.card-chalk .bar-track {
  background: #F0F0F0;
  border: 1px solid #E5E5E5;
  height: 8px;
}

.bar-fill {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  transform-origin: left center;
  transition: transform 0.24s ease;
}

.bar-fill.weak { background: var(--releg); }
.bar-fill.mid { background: var(--brass-fill); }
.bar-fill.strong { background: var(--promo); }

.card-chalk .bar-fill.weak { background: var(--releg-bright); }
.card-chalk .bar-fill.mid { background: var(--brass-bright); }
.card-chalk .bar-fill.strong { background: var(--promo-bright); }

/* Step Switcher */
.step-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  padding: 5px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.step-btn {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 8px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.step-btn.active {
  background: var(--surface);
  color: var(--chalk);
  box-shadow: 0 2px 6px rgba(16, 32, 38, 0.18);
}

.step-pill-count {
  font-size: 11.5px;
  font-weight: 800;
  font-variant-numeric: lining-nums tabular-nums;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 32, 38, 0.1);
}

.panel-hidden {
  display: none !important;
}

.rival-group-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.55px;
  margin: 10px 0 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rival-group-label.targets {
  color: var(--releg);
  margin-top: 2px;
}

.rival-group-label.strengths {
  color: var(--promo);
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.rival-all-cats {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
}

.rival-all-cats summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.mobile-only-analytics {
  display: block;
}

@media (min-width: 960px) {
  .mobile-only-analytics {
    display: none;
  }
}

.step-btn.active .step-pill-count {
  background: var(--brass-bright);
  color: var(--ink);
}

/* Question Cards */
.q-card {
  position: relative;
  overflow: hidden;
  border-color: var(--border);
  transition: border-color 0.16s ease;
}

.q-card.is-open {
  border-color: #E5E5E5;
}

.q-card.is-answered {
  border-color: var(--promo);
}

.q-timer-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border-soft);
}

.q-timer-fill {
  height: 100%;
  width: 100%;
  background: var(--promo);
  transform-origin: left center;
  transition: transform 0.45s linear, background-color 0.2s ease;
}

.q-timer-fill.warn { background: var(--brass-fill); }
.q-timer-fill.low { background: var(--releg); }

.q-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.q-left-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.q-num {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--surface);
  color: var(--chalk);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 13.5px;
  font-variant-numeric: lining-nums tabular-nums;
  flex-shrink: 0;
}

.q-cat {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.diff-dots {
  display: inline-flex;
  gap: 3px;
  margin-left: 2px;
}

.diff-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #F0F0F0;
}

.diff-dot.on {
  background: var(--brass-fill);
}

.timer-badge {
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: lining-nums tabular-nums;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--ink);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.timer-badge.running {
  background: var(--brass-bg);
  color: var(--brass);
  border-color: #E5A400;
}

.timer-badge.done {
  background: var(--promo-bg);
  color: var(--promo);
  border-color: #E5E5E5;
}

.q-prompt {
  font-size: 15.5px;
  line-height: 1.55;
  margin: 0 0 11px;
  color: var(--ink);
}

.q-reveal-btn {
  width: 100%;
  min-height: 48px;
  border: 1.5px dashed #E5E5E5;
  background: var(--surface-alt);
  color: var(--ink);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 12px 14px;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.q-reveal-btn:hover {
  background: #F7F7F7;
  border-color: var(--border);
}

.q-input {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid #E5E5E5;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: var(--font-ui);
  font-size: 16px;
  color: var(--ink);
  background: #FFFFFF;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.q-input::placeholder {
  color: #777777;
}

.q-input:focus {
  outline: none;
  border-color: var(--border);
  box-shadow: 0 0 0 3px rgba(16, 32, 38, 0.14);
}

/* Sticky Guard Budget Dock */
.guard-budget {
  position: sticky;
  top: 66px;
  z-index: 25;
  background: var(--surface);
  color: var(--chalk);
  border: 1px solid var(--slate-line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-lg);
}

.guard-budget-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.guard-budget-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.65px;
  color: var(--chalk);
}

.guard-total {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 800;
  color: var(--gold-text);
  font-variant-numeric: lining-nums tabular-nums;
}

.guard-total.complete {
  color: var(--promo-text);
}

.guard-meter-track {
  height: 7px;
  border-radius: 999px;
  background: #F0F0F0;
  border: 1px solid #E5E5E5;
  overflow: hidden;
  margin-bottom: 9px;
}

.guard-meter-fill {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--brass-bright);
  transform-origin: left center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.guard-meter-fill.complete {
  background: var(--promo-bright);
}

.guard-chips-status {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  font-size: 12px;
  font-variant-numeric: lining-nums tabular-nums;
}

.budget-slot {
  text-align: center;
  padding: 6px 4px;
  border-radius: 8px;
  background: transparent;
  color: var(--chalk);
  border: 1.5px solid #E5E5E5;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.budget-slot.ok {
  background: var(--promo-bright);
  color: #FFFFFF;
  border-color: var(--promo-bright);
  font-weight: 800;
}

.budget-slot.over {
  background: #FF4B4B;
  color: #FFFFFF;
  border-color: #EA2B2B;
  font-weight: 800;
}

.guard-dock-cta {
  margin-top: 10px;
}

.guard-dock-cta[hidden] {
  display: none;
}

.btn-brass {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--brass-bright);
  color: #3C3C3C;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  padding: 11px 16px;
  transition: transform 0.1s ease, background-color 0.15s ease;
}

.btn-brass:hover {
  background: #FFC800;
}

.btn-brass:active {
  transform: scale(0.98);
}

/* Tactile 1-Thumb Guard Weight Cards */
.guard-card-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 6px;
}

.opp-rate-pill {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  font-variant-numeric: lining-nums tabular-nums;
}

.opp-rate-pill.weak {
  background: var(--releg-bg);
  color: var(--releg);
}

.opp-rate-pill.strong {
  background: var(--promo-bg);
  color: var(--promo);
}

.opp-rate-pill.mid {
  background: var(--brass-bg);
  color: var(--brass);
}

.guard-snippet {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0 0 11px;
}

.guard-btn-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.guard-pick {
  min-height: 50px;
  border-radius: var(--radius-sm);
  border: 1.5px solid #E5E5E5;
  background: var(--surface-alt);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: lining-nums tabular-nums;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.05;
  transition: transform 0.1s ease, background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.guard-pick-sub {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  margin-top: 3px;
  opacity: 0.85;
}

.guard-pick:active {
  transform: scale(0.96);
}

.guard-pick.selected {
  background: var(--surface);
  color: var(--chalk);
  border-color: var(--border);
  box-shadow: 0 3px 9px rgba(16, 32, 38, 0.22);
}

.guard-pick.selected.w3 {
  background: var(--brass-fill);
  border-color: #E5E5E5;
  color: #FFFFFF;
}

.guard-pick.selected.w1 {
  background: #F0F0F0;
  border-color: #E5E5E5;
  color: #FFFFFF;
}

.guard-pick.selected.w0 {
  background: #F0F0F0;
  border-color: #E5E5E5;
  color: #FFFFFF;
}

/* Primary & Secondary Actions */
.cta-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.btn-primary {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--cta-bg, #2C6600);
  color: #FFFFFF;
  font-family: var(--font-ui);
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 12px 16px;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover:not(:disabled) {
  background: var(--cta-hover, #357A00);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

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

.btn-secondary {
  width: 100%;
  min-height: 46px;
  border: 1.5px solid #E5E5E5;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 10px 14px;
  margin-bottom: 10px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
  background: var(--surface-alt);
  border-color: var(--border);
}

.card-chalk .btn-secondary {
  background: #FFFFFF;
  color: #1899D6;
  border-color: #E5E5E5;
}

.card-chalk .btn-secondary:hover {
  background: #F7F7F7;
  border-color: #84D8FF;
}

.cta-stack .btn-secondary {
  margin-bottom: 0;
}

/* Scoreboard Hero & Unified Share Module */
.scoreboard-hero {
  text-align: center;
  padding: 20px 16px;
}

.outcome-banner {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.outcome-banner.W {
  background: var(--promo-bright);
  color: #FFFFFF;
}

.outcome-banner.D {
  background: var(--brass-bright);
  color: #3C3C3C;
}

.outcome-banner.L {
  background: #FF4B4B;
  color: #FFFFFF;
}

.score-digits {
  font-family: var(--font-ui);
  font-size: 46px;
  font-weight: 900;
  letter-spacing: -0.8px;
  line-height: 1.05;
  margin: 4px 0;
  font-variant-numeric: lining-nums tabular-nums;
}

.score-names {
  font-size: 14px;
  color: var(--chalk-muted);
  margin-bottom: 14px;
}

.result-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--slate-line);
}

.kpi-val {
  font-family: var(--font-ui);
  font-size: 21px;
  font-weight: 800;
  color: var(--chalk);
  font-variant-numeric: lining-nums tabular-nums;
}

.kpi-lbl {
  font-size: 11px;
  color: var(--chalk-muted);
  text-transform: uppercase;
  letter-spacing: 0.45px;
  margin-top: 2px;
}

@keyframes tilePop {
  0% { opacity: 0; transform: translateY(6px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.share-module {
  background: var(--surface);
  color: var(--chalk);
  border: 1px solid var(--slate-line);
}

.share-visual {
  background: rgba(11, 23, 28, 0.55);
  color: var(--chalk);
  border-radius: 12px;
  padding: 13px;
  border: 1px solid var(--slate-line);
  margin: 8px 0 10px;
}

.share-visual-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--gold-text);
  margin-bottom: 9px;
  font-variant-numeric: lining-nums tabular-nums;
}

.share-tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.share-tile {
  border-radius: 8px;
  padding: 8px 4px;
  text-align: center;
  animation: tilePop 0.28s ease both;
}

.share-tile.hit {
  background: var(--promo-bright);
  border: 1px solid var(--promo-bright);
  color: #FFFFFF;
}

.share-tile.miss {
  background: transparent;
  border: 1.5px solid #E5E5E5;
  color: var(--chalk);
}

.share-tile-q {
  font-size: 10.5px;
  font-weight: 800;
  opacity: 0.9;
}

.share-tile-pts {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 900;
  margin: 2px 0;
  font-variant-numeric: lining-nums tabular-nums;
}

.share-tile-g {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--gold-text);
}

.share-tile.hit .share-tile-g {
  color: var(--promo-ink-dark);
}

.share-legend {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--chalk-muted);
}

.share-details {
  margin: 0 0 12px;
}

.share-details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-text);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.share-box-dark {
  background: #FFFFFF;
  border: 1px solid var(--slate-line);
  border-radius: 10px;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--chalk);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 6px 0 0;
}

.breakdown-card {
  border-left: 4px solid var(--border);
}

.breakdown-card.correct {
  border-left-color: var(--promo);
}

.breakdown-card.wrong {
  border-left-color: var(--releg);
}

.breakdown-answers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 14px;
  margin-bottom: 6px;
}

.ans-tag {
  font-weight: 700;
}

.ans-tag.ok { color: var(--promo); }
.ans-tag.no { color: var(--releg); }

.breakdown-expl {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.breakdown-sources {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 8px 0 0;
  padding-top: 7px;
  border-top: 1px solid var(--border-soft);
}

.guard-delta-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.delta-pill.earned { color: var(--promo); }
.delta-pill.blocked { color: var(--brass); }

/* Division Standings Table */
.league-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.league-chip {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1.5px solid #E5E5E5;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.league-chip.active {
  background: var(--surface);
  color: var(--chalk);
  border-color: var(--border);
}

.zone-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -1px;
}

.legend-dot.promo { background: var(--promo); }
.legend-dot.releg { background: var(--releg); }

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: lining-nums tabular-nums;
}

.standings-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.55px;
  color: var(--ink-soft);
  padding: 8px 5px;
  border-bottom: 2px solid var(--border);
}

.standings-table th.num,
.standings-table td.num {
  text-align: right;
}

.standings-table .col-desk-only {
  display: none;
}

.standings-table td {
  padding: 10px 5px;
  border-bottom: 1px solid var(--border-soft);
}

.standings-table tbody tr.clickable {
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.standings-table tbody tr.clickable:hover {
  background: #F7F7F7;
}

.standings-table tbody tr.is-selected {
  background: #F7F7F7;
}

.standings-table tr.is-you td {
  background: var(--brass-bg);
  font-weight: 700;
}

.standings-table tr.zone-promotion td:first-child {
  box-shadow: inset 4px 0 0 var(--promo);
}

.standings-table tr.zone-relegation td:first-child {
  box-shadow: inset 4px 0 0 var(--releg);
}

.standings-table tr.cut-after td {
  border-bottom: 2px dashed #E5E5E5;
}

.rank-num {
  font-weight: 800;
  width: 28px;
  padding-left: 9px !important;
}

.player-cell {
  font-weight: 600;
}

.you-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--surface);
  color: var(--chalk);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 5px;
}

.pts-cell {
  font-weight: 800;
  color: var(--ink);
}

/* Last-5 Form Dots */
.form-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.form-dot {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.form-dot.W { background: var(--promo-bg); color: var(--promo); }
.form-dot.D { background: var(--brass-bg); color: var(--brass); }
.form-dot.L { background: var(--releg-bg); color: var(--releg); }

/* Mobile Inline Rival Drawer */
.rival-drawer {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-lg);
}

.rival-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.rival-close-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

/* Scouting Tab, Radar & Sparkline */
.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.integrity-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--promo-bright);
  color: #FFFFFF;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat-tile {
  background: rgba(251, 248, 241, 0.06);
  border: 1px solid var(--slate-line);
  border-radius: 10px;
  padding: 11px 8px;
  text-align: center;
}

.stat-tile-num {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 800;
  color: var(--chalk);
  font-variant-numeric: lining-nums tabular-nums;
}

.stat-tile-lbl {
  font-size: 11px;
  color: var(--chalk-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 2px;
}

.radar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0 12px;
}

.radar-caption {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 0 0 6px;
}

.cat-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.sparkline-svg {
  width: 100%;
  height: auto;
  display: block;
}

.sparkline-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-top: 6px;
}

/* Season 1 Matchday Calendar Widget */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin: 10px 0 12px;
  font-variant-numeric: lining-nums tabular-nums;
}

.cal-day-hdr {
  text-align: center;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.cal-cell {
  text-align: center;
  padding: 6px 2px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-alt);
  color: var(--ink);
  border: 1px solid var(--border-soft);
}

.cal-cell.done {
  background: var(--promo-bg);
  color: var(--promo);
  border-color: #E5E5E5;
}

.cal-cell.today {
  background: var(--surface);
  color: var(--gold-text);
  border-color: var(--border);
  font-weight: 800;
}

/* Desktop Rail Helpers */
.rail-card-title {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 0 0 8px;
}

.guard-ref-pills {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  margin: 10px 0 12px;
}

.guard-ref-chip {
  text-align: center;
  padding: 7px 2px;
  border-radius: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 14px;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink);
}

.guard-ref-chip.hi {
  background: var(--brass-bg);
  border-color: #E5A400;
  color: var(--brass);
}

.rail-link-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rail-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--ink);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
}

.rail-link:hover {
  border-color: var(--border);
  background: #F7F7F7;
}

/* PWA Footer */
.pwa-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  padding: 18px 8px 10px;
  border-top: 1px solid var(--border);
  margin-top: 18px;
  font-size: 13.5px;
}

.pwa-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 700;
  min-height: 44px;
  min-width: 44px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pwa-footer a:hover {
  color: var(--ink);
}

/* Bottom Mobile Navigation */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface);
  border-top: 1.5px solid var(--border);
  padding: 4px 10px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 18px rgba(16, 32, 38, 0.09);
}

.nav-btn {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-ui);
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  border-radius: 10px;
  position: relative;
}

.nav-btn.active {
  color: var(--ink);
  background: var(--brass-bg);
}

.nav-btn.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24%;
  right: 24%;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--brass-fill);
}

.nav-icon {
  display: inline-flex;
}

.nav-label {
  font-size: 12px;
  font-weight: 700;
}

/* Toast Notification (Bottom-anchored on BOTH mobile & desktop; NEVER overlaps scoreboard!) */
.toast {
  position: fixed;
  left: 50%;
  top: auto;
  bottom: 82px;
  transform: translate(-50%, 14px);
  background: var(--surface);
  color: var(--chalk);
  border: 1.5px solid var(--brass-bright);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
  max-width: calc(100vw - 28px);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Desktop Breakpoint (>= 960px): True 1200px 2-Column League Cockpit */
@media (min-width: 960px) {
  .topbar-inner {
    padding: 10px 24px;
  }

  .desktop-tabs,
  .desktop-club-links {
    display: inline-flex;
  }

  .pwa-menu-btn,
  .pwa-mobile-drawer,
  .bottom-nav,
  .hero-scout-inline {
    display: none !important;
  }

  .app-shell {
    padding: 22px 24px 48px;
  }

  .cockpit-grid {
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr);
    gap: 24px;
  }

  .desktop-only-rail {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 82px;
  }

  .matchup-hero {
    padding: 20px 22px;
  }

  .player-name {
    font-size: 21px;
  }

  .guard-card-head {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .standings-table .col-desk-only {
    display: table-cell;
  }

  .cat-list {
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
  }

  .toast {
    top: auto;
    bottom: 28px;
  }
}

/* ACQ-05 Rival Invite Card & Static Fallback Rookie Open Signup Form */
.rival-invite-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rival-invite-box code {
  display: block;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  word-break: break-all;
}

.rookie-signup-form {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rookie-signup-head {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold-text);
}

.rookie-rival-pill {
  margin: 0;
  font-size: 13px;
  color: var(--promo-text);
}

.rookie-signup-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.rookie-signup-grid input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1.5px solid #E5E5E5;
  background: #FFFFFF;
  color: var(--chalk);
  font-size: 15px;
}

.rookie-signup-grid input::placeholder {
  color: #777777;
}

.rookie-signup-status {
  margin: 0;
  font-size: 13px;
  color: var(--chalk-soft);
}

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

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Duolingo layer: chunky 3D tiles, feather green, playful rounded HUD
   ========================================================================== */
html, body { background: #FFFFFF; font-family: var(--font-ui); color: #3C3C3C; }
body { font-weight: 600; }
h1, h2, h3, .ssr-hero-title, .rail-card-title { font-family: var(--font-display); font-weight: 900; letter-spacing: -0.01em; color: #3C3C3C; }

.topbar { background: #FFFFFF; border-bottom: 1px solid #E5E5E5; box-shadow: none; color: #3C3C3C; }
.topbar-inner { min-height: 64px; }
.brand-mark { width: 40px; height: 40px; }
.brand-mark svg { width: 40px; height: 40px; }
.brand-name { font-family: var(--font-display); font-weight: 900; font-size: 21px; color: #58CC02; letter-spacing: -0.02em; }
.brand-sub { color: #AFAFAF; font-weight: 800; font-size: 12px; }

.desktop-tabs { gap: 6px; }
.dtab-btn {
  font-family: var(--font-ui); font-weight: 800; font-size: 14px; letter-spacing: 0.03em; text-transform: uppercase;
  color: #777777; background: #FFFFFF; border: 2px solid transparent; border-radius: 14px; padding: 9px 14px; min-height: 44px; cursor: pointer;
}
.dtab-btn:hover { background: #F7F7F7; color: #4B4B4B; }
.dtab-btn.active { color: #1899D6; background: #DDF4FF; border: 2px solid #84D8FF; }

.desktop-club-links a { color: #777777; font-weight: 800; text-decoration: none; }
.desktop-club-links a:hover { color: #1CB0F6; }

.duo-hud { display: inline-flex; align-items: center; gap: 8px; }
.hud-pill, .fairplay-pill {
  display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 4px 11px;
  border-radius: 999px; border: 2px solid #E5E5E5; background: #FFFFFF;
  font-weight: 900; font-size: 14px; white-space: nowrap; line-height: 1;
}
.streak-pill { color: #FF9600; }
.league-badge { color: #1899D6; }
.fairplay-pill { color: #58A700; }
.fairplay-pill .pulse-dot { background: #58CC02; box-shadow: 0 0 0 3px #D7FFB8; }

.pwa-menu-btn { color: #777777; background: #FFFFFF; border: 2px solid #E5E5E5; border-bottom-width: 4px; border-radius: 14px; }
.pwa-menu-btn:active { transform: translateY(2px); border-bottom-width: 2px; }
.pwa-mobile-drawer { background: #FFFFFF; border-bottom: 2px solid #E5E5E5; }
.pwa-drawer-links a { color: #4B4B4B; font-weight: 800; border-radius: 14px; }
.pwa-drawer-links a:hover { background: #F7F7F7; color: #1CB0F6; }

/* Cards */
.card { background: #FFFFFF; border: 2px solid #E5E5E5; border-radius: 16px; box-shadow: none; color: #3C3C3C; }
.card-chalk, .matchup-hero, .scoreboard-hero { background: #FFFFFF; color: #3C3C3C; border: 2px solid #E5E5E5; }
.duo-welcome { text-align: center; padding: 28px 20px 24px; }
.duo-welcome .ssr-hero-title { font-size: clamp(28px, 6vw, 44px); line-height: 1.1; margin: 12px auto 10px; max-width: 16ch; }
.duo-welcome .ssr-hero-copy { color: #777777; font-size: 18px; line-height: 1.5; max-width: 34ch; margin: 0 auto 8px; font-weight: 700; }
.duo-welcome .ssr-hero-meta { color: #AFAFAF; font-weight: 800; font-size: 14px; margin: 0 auto 18px; }
.duo-welcome .cta-stack { max-width: 360px; margin: 0 auto; }
.div-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: #DDF4FF; color: #0E5A8A; border: 2px solid #84D8FF; font-weight: 900; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
}
.matchup-date { color: #AFAFAF; font-weight: 800; }
.player-name { color: #3C3C3C; font-weight: 900; }
.player-role, .player-meta { color: #777777; font-weight: 700; }
.vs-chip { background: #FFC800; color: #FFFFFF; border-radius: 999px; font-weight: 900; box-shadow: 0 3px 0 #E5A400; text-shadow: 0 1px 0 #E5A400; }
.hero-scout-toggle { background: #F7F7F7; color: #4B4B4B; border: 2px solid #E5E5E5; border-radius: 14px; font-weight: 800; }

/* Chunky 3D buttons */
.btn-primary, .btn-secondary, .btn-brass {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 20px; width: 100%;
  font-family: var(--font-ui); font-weight: 800; font-size: 15px; letter-spacing: 0.03em; text-transform: uppercase;
  border-radius: 16px; cursor: pointer; text-decoration: none; text-align: center; line-height: 1.2;
  transition: transform 80ms ease, box-shadow 80ms ease, filter 120ms ease;
}
.btn-primary {
  background: var(--cta-bg); color: #FFFFFF; border: 2px solid var(--cta-bg); border-bottom: 4px solid var(--cta-lip);
}
.btn-primary:hover:not(:disabled) { background: var(--cta-hover); border-color: var(--cta-hover); color: #FFFFFF; filter: none; }
.btn-primary:focus-visible { outline: 3px solid #1CB0F6; outline-offset: 2px; }
.btn-primary:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; margin-bottom: 2px; }
.btn-primary:disabled, .btn-primary[disabled] { background: #E5E5E5; border-color: #E5E5E5; border-bottom-color: #CECECE; color: #595959; opacity: 1; cursor: not-allowed; transform: none; }
.btn-secondary {
  background: #FFFFFF; color: #1CB0F6; border: 2px solid #E5E5E5; border-bottom: 4px solid #E5E5E5;
}
.btn-secondary:hover { background: #F7F7F7; }
.btn-secondary:active { transform: translateY(2px); border-bottom-width: 2px; margin-bottom: 2px; }
.btn-brass { background: #FF9600; color: #FFFFFF; border: 2px solid #FF9600; border-bottom: 4px solid #CD7900; }
.btn-brass:active { transform: translateY(2px); border-bottom-width: 2px; margin-bottom: 2px; }
.cta-stack { display: grid; gap: 12px; }

/* Progress + feedback */
.duo-progress-row { display: flex; align-items: center; gap: 12px; margin: 4px 2px 12px; }
.duo-progress, .progress-track {
  position: relative; flex: 1; height: 16px; background: #E5E5E5; border-radius: 999px; overflow: hidden;
}
.progress-fill {
  position: relative; height: 100%; background: #58CC02; border-radius: 999px; transition: width 400ms cubic-bezier(.2,.9,.3,1.2);
}
.progress-fill::after {
  content: ""; position: absolute; left: 8px; right: 8px; top: 3px; height: 4px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.25));
}
.duo-progress-row .streak-pill { font-weight: 900; color: #FF9600; font-size: 15px; white-space: nowrap; }
.duo-feedback {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 14px; border-radius: 16px;
  font-weight: 900; font-size: 15px; animation: duo-slide-up 320ms cubic-bezier(.2,.9,.3,1.2);
}
.duo-feedback-badge {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px;
  color: #FFFFFF; font-size: 17px; font-weight: 900;
}
.duo-feedback.is-correct { background: #D7FFB8; color: #58A700; }
.duo-feedback.is-correct .duo-feedback-badge { background: #58CC02; box-shadow: 0 3px 0 #58A700; }
.duo-feedback.is-pending { background: #DDF4FF; color: #1899D6; }
.duo-feedback.is-pending .duo-feedback-badge { background: #1CB0F6; box-shadow: 0 3px 0 #1899D6; }
.duo-feedback.is-wrong { background: #FFDFE0; color: #EA2B2B; }
.duo-feedback.is-wrong .duo-feedback-badge { background: #FF4B4B; box-shadow: 0 3px 0 #EA2B2B; }
@keyframes duo-slide-up { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Step switcher as segmented tiles */
.step-switcher { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: transparent; border: 0; padding: 0; margin-bottom: 14px; }
.step-btn {
  font-family: var(--font-ui); font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; font-size: 14px;
  background: #FFFFFF; color: #777777; border: 2px solid #E5E5E5; border-bottom-width: 4px; border-radius: 14px; min-height: 48px; cursor: pointer;
}
.step-btn.active { background: #DDF4FF; color: #1899D6; border-color: #84D8FF; border-bottom-color: #1CB0F6; }
.step-pill-count { background: #FFFFFF; color: inherit; border-radius: 999px; padding: 1px 8px; border: 2px solid currentColor; font-size: 12px; }
.step-btn.active .step-pill-count { background: #FFFFFF; color: #1899D6; border-color: #1899D6; }
.league-chip.active { background: #DDF4FF; color: #1899D6; border-color: #84D8FF; border-bottom: 3px solid #1CB0F6; }

/* Question cards */
.q-card { border-radius: 16px; border: 2px solid #E5E5E5; border-bottom-width: 4px; }
.q-card.is-open { border-color: #84D8FF; border-bottom-color: #1CB0F6; }
.q-card.is-answered { border-color: #A5ED6E; border-bottom-color: #58CC02; background: #FFFFFF; }
.q-num { background: var(--cta-bg); color: #FFFFFF; border-radius: 10px; font-weight: 900; box-shadow: 0 2px 0 var(--cta-lip); }
.q-cat { color: #777777; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; font-size: 12px; }
.q-prompt { font-size: 19px; line-height: 1.45; font-weight: 800; color: #3C3C3C; }
.q-input {
  font-family: var(--font-ui); font-weight: 700; font-size: 17px; color: #3C3C3C;
  background: #F7F7F7; border: 2px solid #E5E5E5; border-radius: 14px; min-height: 52px; padding: 12px 14px; width: 100%;
}
.q-input:focus { outline: none; border-color: #1CB0F6; background: #FFFFFF; box-shadow: 0 0 0 3px #DDF4FF; }
.q-reveal-btn, .answer-tile {
  font-family: var(--font-ui); font-weight: 800; font-size: 15px; color: #1899D6; width: 100%; min-height: 52px; cursor: pointer;
  background: #FFFFFF; border: 2px solid #E5E5E5; border-bottom: 4px solid #E5E5E5; border-radius: 14px;
}
.q-reveal-btn:hover { background: #F7F7F7; }
.q-reveal-btn:active { transform: translateY(2px); border-bottom-width: 2px; }
.timer-badge { border-radius: 999px; font-weight: 900; background: #F7F7F7; color: #777777; border: 2px solid #E5E5E5; }
.timer-badge.running { background: #FFF5D3; color: #CD7900; border-color: #FFC800; }
.timer-badge.done { background: #D7FFB8; color: #58A700; border-color: #58CC02; }
.q-timer-strip { background: #E5E5E5; border-radius: 999px; height: 8px; overflow: hidden; }
.q-timer-fill { background: #58CC02; }
.q-timer-fill.warn { background: #FFC800; }
.q-timer-fill.low { background: #FF4B4B; }
.diff-dot { background: #E5E5E5; }
.diff-dot.on { background: #FFC800; }

/* Guard picks: chunky tactile tiles */
.guard-btn-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.guard-pick {
  font-family: var(--font-ui); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 62px; padding: 6px 4px; cursor: pointer;
  background: #FFFFFF; color: #4B4B4B; font-weight: 900; font-size: 22px; line-height: 1.1;
  border: 2px solid #E5E5E5; border-bottom: 4px solid #E5E5E5; border-radius: 14px;
  transition: transform 80ms ease;
}
.guard-pick:hover { background: #F7F7F7; }
.guard-pick:active { transform: translateY(2px); border-bottom-width: 2px; }
.guard-pick-sub { font-size: 10px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #AFAFAF; }
.guard-pick.selected { background: #DDF4FF; color: #1899D6; border-color: #84D8FF; border-bottom-color: #1CB0F6; }
.guard-pick.selected .guard-pick-sub { color: #1899D6; }
.guard-pick.selected.w0 { background: #F7F7F7; color: #777777; border-color: #CECECE; border-bottom-color: #AFAFAF; }
.guard-pick.selected.w0 .guard-pick-sub { color: #777777; }
.guard-pick.selected.w2 { background: #D7FFB8; color: #58A700; border-color: #A5ED6E; border-bottom-color: #58CC02; }
.guard-pick.selected.w2 .guard-pick-sub { color: #58A700; }
.guard-pick.selected.w3 { background: #FFF5D3; color: #CD7900; border-color: #FFC800; border-bottom-color: #E5A400; }
.guard-pick.selected.w3 .guard-pick-sub { color: #CD7900; }
.guard-budget { background: #FFFFFF; border: 2px solid #E5E5E5; border-radius: 16px; box-shadow: none; color: #3C3C3C; }
.guard-meter-track { background: #E5E5E5; border-radius: 999px; height: 14px; overflow: hidden; }
.guard-meter-fill { background: #1CB0F6; border-radius: 999px; }
.guard-meter-fill.complete { background: #58CC02; }
.budget-slot { background: #F7F7F7; border: 2px solid #E5E5E5; border-radius: 12px; color: #777777; font-weight: 800; }
.budget-slot.ok { background: #D7FFB8; border-color: #58CC02; color: #58A700; }
.budget-slot.over { background: #FFDFE0; border-color: #FF4B4B; color: #EA2B2B; }
.guard-total.complete { color: #58A700; }

/* Division table: promotion + relegation zones */
.standings-table { border-collapse: separate; border-spacing: 0; }
.standings-table th { color: #AFAFAF; font-weight: 900; text-transform: uppercase; letter-spacing: 0.05em; font-size: 12px; background: #FFFFFF; }
.standings-table td { border-bottom: 2px solid #F0F0F0; font-weight: 800; color: #4B4B4B; }
.standings-table tr.zone-promotion td { background: #F1FFE6; }
.standings-table tr.zone-promotion td:first-child { box-shadow: inset 4px 0 0 #58CC02; color: #58A700; }
.standings-table tr.zone-relegation td { background: #FFF1F1; }
.standings-table tr.zone-relegation td:first-child { box-shadow: inset 4px 0 0 #FF4B4B; color: #EA2B2B; }
.standings-table tr.is-you td { background: #DDF4FF; color: #1899D6; }
.standings-table tr.cut-after td { border-bottom: 2px dashed #AFAFAF; }
.legend-dot.promo { background: #58CC02; }
.legend-dot.releg { background: #FF4B4B; }
.you-tag { background: #1CB0F6; color: #FFFFFF; border-radius: 999px; font-weight: 900; }

/* Results */
.share-tile { border-radius: 14px; border: 2px solid #E5E5E5; border-bottom-width: 4px; }
.share-tile.hit { background: #D7FFB8; border-color: #58CC02; color: #58A700; }
.share-tile.miss { background: #FFDFE0; border-color: #FF4B4B; color: #EA2B2B; }
.stat-tile, .kpi-val { color: #3C3C3C; }
.stat-tile { background: #FFFFFF; border: 2px solid #E5E5E5; border-radius: 16px; }

/* Bottom nav */
.bottom-nav { background: #FFFFFF; border-top: 2px solid #E5E5E5; box-shadow: none; }
.nav-btn { color: #AFAFAF; font-weight: 900; font-family: var(--font-ui); border: 2px solid transparent; border-radius: 14px; }
.nav-btn.active { color: #1899D6; background: #DDF4FF; border-color: #84D8FF; }
.pwa-footer a { color: #AFAFAF; font-weight: 800; }
.pwa-footer a:hover { color: #1CB0F6; }
.toast { background: #3C3C3C; color: #FFFFFF; border-radius: 16px; font-weight: 800; }

@media (max-width: 959px) {
  .desktop-club-links { display: none; }
  .league-badge, .fairplay-pill { display: none; }
}
@media (max-width: 380px) {
  .brand-sub { display: none; }
}
.desktop-tabs { background: transparent; border: 0; padding: 0; box-shadow: none; }
.dtab-btn { white-space: nowrap; font-size: 13px; padding: 8px 12px; }
.brand-lockup { flex-shrink: 0; }
.brand-copy { min-width: 0; }
@media (min-width: 960px) and (max-width: 1359px) {
  .desktop-club-links { display: none; }
}
@media (min-width: 1360px) {
  .topbar-inner { max-width: 1360px; }
}

/* API / Auth Status Banner & Guest Sample Preview Chrome */
.api-status-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 2px solid #84D8FF;
  background: #DDF4FF;
  color: #1477A8;
  font-size: 14px;
  font-weight: 800;
}
.api-status-banner[hidden] { display: none !important; }
.api-status-banner.is-success {
  border-color: #58CC02;
  background: #D7FFB8;
  color: #2E6B00;
}
.api-status-banner.is-error {
  border-color: #FF4B4B;
  background: #FFDFE0;
  color: #B01E28;
}
.api-status-banner .banner-retry-btn {
  border: 2px solid currentColor;
  background: #FFFFFF;
  color: inherit;
  border-radius: 10px;
  padding: 6px 12px;
  min-height: 36px;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.preview-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 14px;
  border: 2px solid #84D8FF;
  background: #F4FBFF;
  color: #1477A8;
  font-size: 13px;
  font-weight: 800;
}
.preview-ribbon-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: #1899D6;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.preview-ribbon-text {
  flex: 1;
  min-width: 180px;
  color: #3C3C3C;
  font-weight: 700;
}
.rookie-signup-card {
  margin-top: 14px;
}
.rookie-signup-card .rookie-signup-form {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.rookie-signup-status.is-ok { color: #2E6B00; font-weight: 800; }
.rookie-signup-status.is-err { color: #B01E28; font-weight: 800; }
