:root {
  --purple: #37003c;
  --pink: #e90052;
  --green: #00ff85;
  --red: #e74c3c;
  --grey: #f4f4f6;
  --text: #2c2c2c;
  --border: #e8e8ec;
  --muted: #8a8a92;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--grey);
  color: var(--text);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}
/* Animated on .container (the main content area) rather than body. .bottom-nav is a DOM
   child of body too, so animating body's own opacity dragged the fixed bottom nav along
   with it on every single page navigation, making it visibly flicker each time — even
   though it's the same nav bar on both pages and shouldn't be fading at all. Kept short
   and fade-only (no delay before navigating, no fade-out) — just enough to take the harsh
   edge off a fresh page appearing, without adding a perceptible pause first.
 */
.container {
  animation: page-fade-in 0.1s ease;
}
@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

a, button, input[type=submit] {
  transition: color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
}
button:active, .btn:active, .btn-sm:active {
  transform: scale(0.97);
}

nav {
  background: var(--purple);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

nav .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
}
nav .brand span { color: var(--green); }
.brand-logo {
  height: 44px;
  width: auto;
  display: block;
}
.brand-wordmark {
  height: 29px;
  width: auto;
  display: block;
}

nav .links a, nav .links button {
  color: white;
  text-decoration: none;
  margin-left: 18px;
  font-size: 0.95rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s ease;
}
nav .links a:hover, nav .links button:hover { color: var(--green); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: white;
  display: block;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 680px) {
  nav { position: relative; }
  .nav-toggle { display: flex; }
  nav .links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--purple);
    padding: 0 24px;
    z-index: 20;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.25s ease;
  }
  nav .links.open {
    max-height: 600px;
    opacity: 1;
    padding: 10px 24px 16px;
    pointer-events: auto;
  }
  nav .links a, nav .links button {
    margin-left: 0;
    padding: 10px 0;
    width: 100%;
    text-align: left;
  }
  nav .links form.inline { width: 100%; }
  nav .links form.inline button { width: 100%; text-align: left; }
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

h1 { font-size: 1.4rem; margin: 0 0 4px; line-height: 1.3; }
h2 { font-size: 1.05rem; margin: 28px 0 0; }
.subtitle { color: var(--muted); font-size: 0.88rem; margin: 0 0 20px; line-height: 1.6; }

.card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.flash {
  background: #fff2e0;
  border-left: 4px solid var(--pink);
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}
.error {
  background: #fde8e8;
  border-left: 4px solid #c0392b;
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

/* ---- Fixture row: two stacked lines, fixed-width columns so everything lines up ---- */
.fixture-row {
  padding: 14px 10px;
  border-bottom: 1px solid var(--border);
  border-left: 4px solid transparent;
  border-radius: 6px;
}
.fixture-row:last-child { border-bottom: none; }

/* Row status: green once a prediction is saved, red if the deadline passed with nothing entered */
.fixture-row.entered {
  border-left-color: var(--green);
  background: rgba(0,255,133,0.05);
}
.fixture-row.missed {
  border-left-color: var(--red);
  background: rgba(231,76,60,0.05);
}

.fixture-main {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
}

.team {
  flex: 1 1 0;
  min-width: 0;
  font-weight: 600;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.team.home { text-align: right; }
.team.away { text-align: left; }

/* Stacked side used on the predict page: team name on top, crest + score box in a row below */
/* Each side is a 2x2 grid: label sits directly above the score box, sharing that box's
   own column — the crest lives in its own adjacent column so it never shifts what the
   label/box pair is centered against. */
:root { --score-box-col: 76px; }

.side {
  --crest-col: auto;
  display: grid;
  grid-template-columns: var(--crest-col) var(--score-box-col);
  align-items: center;
  column-gap: 8px;
  row-gap: 6px;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
}
.side.home {
  grid-template-areas:
    ". label"
    "crest box";
}
.side.away {
  grid-template-columns: var(--score-box-col) var(--crest-col);
  grid-template-areas:
    "label ."
    "box crest";
}

.crest {
  grid-area: crest;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 0.54rem;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.team-label {
  grid-area: label;
  justify-self: center;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-align: center;
  line-height: 1.2;
  width: 100%;
  overflow-wrap: break-word;
}

.score-sep {
  color: #ccc;
  font-weight: 700;
  font-size: 1.05rem;
  flex: 0 0 auto;
}
.score-cell {
  grid-area: box;
  justify-self: center;
  position: relative;
  display: inline-flex;
  align-items: center;
}
.score-cell input {
  width: 46px;
  height: 42px;
  padding: 0;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0;
}
.score-cell input:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(233,0,82,0.12);
}
.score-cell input:disabled {
  background: var(--grey);
  color: var(--muted);
  border-color: var(--border);
}

.score-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.score-inputs input {
  width: 42px;
  height: 40px;
  padding: 0;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0;
}
.score-inputs input:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(233,0,82,0.12);
}
.score-inputs input:disabled {
  background: var(--grey);
  color: var(--muted);
  border-color: var(--border);
}
.score-inputs span {
  color: #ccc;
  font-weight: 700;
}

.fixture-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.74rem;
  color: var(--muted);
}

.kickoff-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  color: #555;
  font-weight: 700;
  white-space: nowrap;
}
.kickoff-time svg { flex: 0 0 auto; opacity: 0.6; }

.deadline-value {
  font-weight: 700;
  color: var(--text);
}

.fixture-result {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--text);
  font-size: 0.8rem;
  white-space: nowrap;
}

.status-pill {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
}
.status-pill.to-predict { background: #ffe0e6; color: var(--pink); }
.status-pill.missed-week { background: #fde8e8; color: var(--red); }
.status-pill.postponed { background: #fff3cd; color: #8a6d1a; }
.status-pill.cancelled { background: #f1f1f3; color: var(--muted); text-decoration: line-through; }

.fixture-status-note {
  font-size: 0.76rem;
  color: var(--muted);
  margin: 4px 0 0;
  font-style: italic;
}

.fixture-status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.fixture-manage {
  margin-top: 8px;
}
.fixture-manage summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--purple);
  list-style: none;
}
.fixture-manage summary::-webkit-details-marker { display: none; }
.fixture-manage summary::before { content: '⚙ '; }
.fixture-manage-body {
  margin-top: 10px;
  padding: 12px;
  background: var(--grey);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.manage-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.manage-form-row select,
.manage-form-row input[type=text],
.manage-form-row input[type=datetime-local] {
  flex: 1;
  min-width: 140px;
  margin-bottom: 0;
  padding: 7px 9px;
  font-size: 0.82rem;
}
.btn-danger { background: var(--red); }

.total-badge {
  background: var(--purple);
  color: white;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.missed-text {
  color: var(--red);
  font-weight: 700;
}

.history-gw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
}

/* ---- "N fixtures to predict" banner ---- */
.info-banner {
  background: #fdece0;
  border-left: 4px solid var(--pink);
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 0.88rem;
}
.info-banner strong { color: var(--pink); }

.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 1.5rem; }

.gw-heading {
  font-size: 1.15rem;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.save-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 8px 0 0;
}

.deadline-note {
  font-size: 0.84rem;
  color: var(--muted);
  text-align: center;
  margin: 14px 0 18px;
}

/* ---- Scoring rules + row-status legend ---- */
.legend-card h3 {
  font-size: 0.95rem;
  margin: 0 0 14px;
}
.legend-points {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.legend-points .legend-item {
  flex: 1 1 140px;
}
.legend-points .points-badge {
  display: inline-block;
  margin-bottom: 6px;
}
.legend-points p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}
.legend-divider {
  border-top: 1px solid var(--border);
  margin: 18px 0;
}
.legend-status {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.legend-status .legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}
.legend-line {
  display: inline-block;
  width: 22px;
  height: 3px;
  border-radius: 2px;
  flex: 0 0 auto;
}
.legend-line.red { background: var(--red); }
.legend-line.green { background: var(--green); }
.legend-line.grey { background: var(--border); }

.points-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
}
.points-3, .points-exact { background: var(--green); color: var(--purple); }
.points-1, .points-correct { background: #ffe08a; color: #6b5100; }
.points-0 { background: var(--grey); color: var(--muted); }

button, .btn {
  background: var(--pink);
  color: white;
  border: none;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  line-height: 1.2;
}
button:hover, .btn:hover { opacity: 0.9; }
.btn-secondary { background: var(--purple); }
.btn-sm {
  padding: 5px 14px;
  font-size: 0.76rem;
  border-radius: 6px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 8px;
}
.pagination-status {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}
.pagination-disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

form.inline { display: inline; }

input[type=text], input[type=email], input[type=password], input[type=datetime-local], input[type=number] {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 14px;
}
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus,
input[type=datetime-local]:focus, input[type=number]:focus {
  outline: none;
  border-color: var(--pink);
}
label { font-size: 0.82rem; color: #555; font-weight: 600; display: block; margin-bottom: 5px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
th { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.3px; }
tr.me { background: #f3fef8; box-shadow: inset 4px 0 0 var(--green); }
.rank { color: var(--muted); width: 28px; }

/* ---- League table extras: scoring legend, player avatars, points pill, callout ---- */
.scoring-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 20px;
}
.legend-col {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 160px;
}
.legend-col strong { font-size: 0.88rem; display: block; }
.legend-col p { margin: 2px 0 0; font-size: 0.8rem; color: var(--muted); }
.legend-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid currentColor;
}
.legend-icon.exact { color: var(--green); }
.legend-icon.correct { color: #f5a623; }
.legend-icon.none { color: var(--muted); }
.legend-divider-v {
  width: 1px;
  align-self: stretch;
  background: var(--border);
}
@media (max-width: 560px) {
  .legend-divider-v { display: none; }
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.player-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--purple);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.trophy-icon {
  color: #d4a017;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}
.trend svg { flex: 0 0 auto; }
.trend-up { color: var(--green); }
.trend-down { color: var(--red); }
.trend-same { color: var(--muted); font-weight: 700; }

.points-pill {
  display: inline-block;
  min-width: 30px;
  text-align: center;
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: 800;
  background: var(--grey);
  color: var(--text);
}
.points-pill.me {
  background: #d9fbe7;
  color: #0a7a3c;
}

.callout-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f5f1fb;
}
.callout-icon {
  flex: 0 0 auto;
  color: var(--purple);
}
.callout-card strong { font-size: 0.95rem; display: block; }
.callout-card p { margin: 2px 0 0; font-size: 0.85rem; color: var(--muted); }

/* ---- Private leagues ---- */
.league-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.league-name { font-size: 1rem; }

.invite-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.invite-card strong { font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; }
.invite-code {
  font-family: monospace;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--purple);
  background: var(--grey);
  padding: 8px 16px;
  border-radius: 8px;
  margin-top: 4px;
  display: inline-block;
}
.invite-code-inline {
  font-family: monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--muted);
}
.invite-link {
  font-family: monospace;
  font-size: 0.76rem;
  color: var(--muted);
  word-break: break-all;
  margin: 4px 0 0;
  max-width: 320px;
}

.league-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---- Dashboard ---- */
.get-started-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 14px;
}
.get-started-grid form {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
@media (max-width: 560px) {
  .get-started-grid { grid-template-columns: 1fr; }
}

.dashboard-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.dashboard-links a {
  font-weight: 600;
  color: var(--purple);
  text-decoration: none;
}
.dashboard-links a:hover { text-decoration: underline; }

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  margin-bottom: 4px;
}
.toggle-row input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: var(--pink);
  cursor: pointer;
}

/* ---- Dashboard hero ---- */
.dashboard-hero {
  background: linear-gradient(135deg, var(--purple), #55006b);
  color: white;
  border-radius: 14px;
  padding: 24px 22px;
  margin-bottom: 18px;
}
.dashboard-hero .greeting { font-size: 0.92rem; opacity: 0.85; margin: 0 0 4px; }
.dashboard-hero h1 {
  color: white;
  margin: 0 0 4px;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dashboard-hero .hero-sub { opacity: 0.85; font-size: 0.86rem; margin: 0 0 16px; }
.dashboard-hero .progress-track {
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
  margin-bottom: 6px;
}
.dashboard-hero .progress-fill {
  background: var(--green);
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}
.dashboard-hero .progress-fill.progress-fill-alt { background: #ffd166; }
.dashboard-hero .progress-label { font-size: 0.76rem; opacity: 0.85; margin: 0 0 14px; }
.dashboard-hero .countdown-label { font-size: 0.82rem; opacity: 0.9; margin: 0 0 16px; }
.dashboard-hero .countdown { font-weight: 800; }
.dashboard-hero .hero-cta { display: inline-block; }

/* ---- Quick stats ---- */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 640px) {
  .quick-stats { grid-template-columns: 1fr; }
}
.stat-card {
  background: white;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.stat-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--text); }
.stat-value.latest-score { font-size: 1rem; text-transform: uppercase; }
.stat-note { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.stat-note.result-good { color: #0a7a3c; font-weight: 700; }
.stat-note.result-bad { color: var(--red); font-weight: 700; }
.stat-link {
  display: block;
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--purple);
  text-decoration: none;
}
.stat-link:hover { text-decoration: underline; }

/* ---- This week's fixtures list ---- */
.fixture-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.fixture-list-item:last-child { border-bottom: none; }
.fixture-list-teams {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crest-sm { width: 22px; height: 22px; font-size: 0.5rem; }
.fixture-done { color: #0a7a3c; font-weight: 700; font-size: 0.78rem; white-space: nowrap; }
.fixture-predict-link { color: var(--pink); font-weight: 700; font-size: 0.78rem; text-decoration: none; white-space: nowrap; }
.fixture-predict-link:hover { text-decoration: underline; }

/* ---- Compact league rows on the dashboard ---- */
.league-row-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.league-row-compact:last-child { border-bottom: none; }
.league-row-compact a { color: var(--purple); font-weight: 600; text-decoration: none; font-size: 0.82rem; }

/* ---- Bottom nav (mobile) ---- */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--border);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  z-index: 40;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 4px 4px;
}
.bottom-nav a svg { width: 20px; height: 20px; }
.bottom-nav a.active { color: var(--pink); }

@media (max-width: 680px) {
  .bottom-nav { display: flex; justify-content: space-around; }
  body { padding-bottom: 62px; }
}

/* ---- Results auto-sync status ---- */
.sync-status-card {
  display: flex;
  align-items: center;
  gap: 14px;
}
.sync-status-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
}
.sync-status-dot.ok { background: var(--green); }
.sync-status-dot.warn { background: var(--red); }
.sync-status-dot.off { background: var(--muted); }
.sync-status-card code {
  background: var(--grey);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
}

.push-preview {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fafafa;
  max-width: 340px;
}
.push-preview strong { font-size: 0.9rem; display: block; margin-bottom: 4px; }
.push-preview p { margin: 0; font-size: 0.82rem; color: var(--muted); }

.locked-badge {
  background: var(--grey);
  color: var(--muted);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: middle;
}

/* ---- Gameweek switcher / tab navigation: horizontal pill row ---- */
.gw-nav, .tab-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.gw-nav::-webkit-scrollbar, .tab-nav::-webkit-scrollbar { display: none; }
.gw-nav a, .tab-nav a {
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--purple);
  font-size: 0.82rem;
  font-weight: 600;
  background: white;
  border: 1.5px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.gw-nav a.current, .tab-nav a.current {
  background: var(--purple);
  border-color: var(--purple);
  color: white;
}

@media (max-width: 380px) {
  :root { --score-box-col: 64px; }
  .team { font-size: 0.85rem; }
  .team-label { font-size: 0.58rem; }
  .crest { width: 26px; height: 26px; font-size: 0.5rem; }
  .score-cell input { width: 40px; height: 38px; font-size: 0.95rem; }
  .fixture-main { gap: 8px; }
  .score-inputs input { width: 36px; height: 36px; font-size: 0.9rem; }
  .card { padding: 16px; }
}
