/* ── QUINIELA 2026 ─────────────────────────────────────────
   Mobile-first sports pool. Delete /quiniela/ after Jul 19 2026.
   UI/UX: bottom nav on mobile, 44px+ touch targets, vibrant dark.
──────────────────────────────────────────────────────────── */

:root {
  --bg:      #06060a;
  --bg2:     #0d0d14;
  --bg3:     #14141e;
  --bg4:     #1c1c28;
  --fg:      #f0ede6;
  --gold:    #c9992a;
  --gold2:   #7a5c14;
  --gold3:   rgba(201,153,42,.12);
  --muted:   #2a2830;
  --muted2:  #3d3a4a;
  --soft:    #78748a;
  --green:   #22c55e;
  --green2:  rgba(34,197,94,.12);
  --red:     #ef4444;
  --red2:    rgba(239,68,68,.12);
  --blue:    #60a5fa;
  --blue2:   rgba(96,165,250,.12);
  --pitch:   #16a34a;
  --r:       10px;
  --r-lg:    16px;
  --nav-h:   56px;
  --head-h:  52px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Syne', sans-serif;
  min-height: 100dvh;
  overflow-x: hidden;
  touch-action: manipulation;
  overscroll-behavior: contain;
}

/* ── HEADER ──────────────────────────────────────────────── */
.q-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: var(--head-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--muted);
  position: sticky;
  top: 0;
  z-index: 100;
}

.q-back {
  font-family: 'Syne Mono', monospace;
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--soft);
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 0;
  transition: color .2s;
}
.q-back:hover { color: var(--gold); }

.q-header h1 {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: .06em;
  white-space: nowrap;
}

.q-player-badge {
  font-family: 'Syne Mono', monospace;
  font-size: 10px;
  color: var(--bg);
  background: var(--gold);
  padding: 5px 11px;
  border-radius: 20px;
  font-weight: 700;
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 26px;
  display: flex;
  align-items: center;
}

/* ── TOP NAV (desktop) ───────────────────────────────────── */
.q-nav {
  display: flex;
  background: var(--bg2);
  border-bottom: 1px solid var(--muted);
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: var(--head-h);
  z-index: 99;
}
.q-nav::-webkit-scrollbar { display: none; }

.q-tab-btn {
  flex: 1;
  min-width: 64px;
  min-height: 44px;
  padding: 0 6px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--soft);
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.q-tab-btn:hover { color: var(--fg); }
.q-tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ── MOBILE: BOTTOM NAV ──────────────────────────────────── */
@media (max-width: 640px) {
  .q-nav {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    z-index: 200;
    border-top: 1px solid var(--muted);
    border-bottom: none;
    height: calc(var(--nav-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    overflow: visible;
  }
  .q-tab-btn {
    flex-direction: column;
    gap: 3px;
    font-size: 9px;
    min-height: var(--nav-h);
    border-bottom: none;
    border-top: 2px solid transparent;
    padding-top: 6px;
  }
  .q-tab-btn.active { border-top-color: var(--gold); border-bottom-color: transparent; }
  .q-tab-btn .tab-icon { font-size: 18px; line-height: 1; }
}

/* ── MAIN CONTAINER ──────────────────────────────────────── */
#q-app {
  min-height: calc(100dvh - var(--head-h) - var(--nav-h));
  animation: fadeIn .2s ease-out;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  #q-app { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); }
}

.q-section { max-width: 680px; margin: 0 auto; padding: 20px 16px; }

/* ── TYPOGRAPHY ──────────────────────────────────────────── */
.q-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.q-section-header h2 { font-size: 18px; font-weight: 800; }

.q-badge {
  font-family: 'Syne Mono', monospace;
  font-size: 10px;
  background: var(--bg3);
  color: var(--soft);
  border: 1px solid var(--muted);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.q-desc { color: var(--soft); font-size: 13px; line-height: 1.6; margin-bottom: 20px; }
.q-muted { color: var(--soft); font-size: 12px; }
.q-empty { text-align: center; color: var(--soft); padding: 48px 20px; font-size: 14px; line-height: 1.7; }

.q-info {
  background: var(--blue2);
  border: 1px solid rgba(96,165,250,.25);
  border-radius: var(--r);
  padding: 11px 14px;
  font-size: 13px;
  color: var(--blue);
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ── LIVE SYNC ───────────────────────────────────────────── */
.q-live-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.25);
  border-radius: var(--r);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--green);
  flex-wrap: wrap;
}
.q-live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
.q-live-bar .q-sync-time { color: rgba(34,197,94,.6); flex: 1; text-align: right; }
.q-info-callout {
  background: var(--bg3);
  border: 1px solid var(--muted);
  border-radius: var(--r);
  padding: 11px 14px;
  font-size: 12px;
  color: var(--soft);
  margin-bottom: 16px;
}
.q-api-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}
.q-api-row .q-text-in { flex: 1; font-family: 'Syne Mono', monospace; font-size: 12px; }
.q-api-status {
  margin-top: 10px;
  font-size: 11px;
  color: var(--green);
  font-family: 'Syne Mono', monospace;
}

/* ── NEWS TICKER ─────────────────────────────────────────── */
.q-ticker {
  background: var(--bg2);
  border: 1px solid var(--muted);
  border-left: 3px solid var(--gold);
  border-radius: var(--r);
  padding: 12px 16px;
  margin-bottom: 16px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
.q-ticker-label {
  font-family: 'Syne Mono', monospace;
  font-size: 9px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .12em;
  flex-shrink: 0;
  font-weight: 700;
}
.q-ticker-text {
  font-size: 13px;
  color: var(--fg);
  line-height: 1.4;
  opacity: 1;
  transition: opacity .3s ease;
}
.q-ticker-text.fade { opacity: 0; }

/* ── TOURNAMENT STATS ────────────────────────────────────── */
.q-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.q-stat-card {
  background: var(--bg2);
  border: 1px solid var(--muted);
  border-radius: var(--r);
  padding: 12px 10px;
  text-align: center;
}
.q-stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.q-stat-label {
  font-family: 'Syne Mono', monospace;
  font-size: 9px;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: 4px;
}

/* ── COUNTDOWN ───────────────────────────────────────────── */
.q-countdown {
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
  border: 1px solid var(--muted);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.q-countdown-icon { font-size: 22px; flex-shrink: 0; }
.q-countdown-info { flex: 1; min-width: 0; }
.q-countdown-match {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.q-countdown-when {
  font-family: 'Syne Mono', monospace;
  font-size: 11px;
  color: var(--gold);
  margin-top: 2px;
}
.q-countdown-time {
  font-family: 'Syne Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
  flex-shrink: 0;
  text-align: right;
}

/* ── STANDINGS TABLE ─────────────────────────────────────── */
.q-table { display: flex; flex-direction: column; gap: 6px; }

.q-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--muted);
  border-radius: var(--r);
  padding: 13px 14px;
  transition: border-color .2s, background .15s;
  min-height: 52px;
  cursor: pointer;
}
.q-row:active { background: var(--bg3); }
.q-row.is-me {
  border-color: var(--gold2);
  background: var(--gold3);
}
.q-row:nth-child(1) { border-color: rgba(255,215,0,.3); }
.q-row:nth-child(2) { border-color: rgba(192,192,192,.25); }
.q-row:nth-child(3) { border-color: rgba(205,127,50,.25); }

.q-rank {
  font-family: 'Syne Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--soft);
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.q-pname { flex: 1; font-size: 14px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-pts { font-size: 18px; font-weight: 800; color: var(--gold); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.q-pts small { font-size: 10px; color: var(--soft); font-weight: 400; margin-left: 1px; }
.q-pred-count { font-family: 'Syne Mono', monospace; font-size: 10px; color: var(--soft); flex-shrink: 0; }
.q-view-arrow { font-size: 12px; color: var(--muted2); flex-shrink: 0; }

.q-hint {
  text-align: center;
  font-family: 'Syne Mono', monospace;
  font-size: 10px;
  color: var(--soft);
  margin-top: 14px;
  line-height: 1.8;
  letter-spacing: .04em;
}

/* ── PLAYER DETAIL VIEW ──────────────────────────────────── */
.q-back-btn {
  background: none;
  border: 1px solid var(--muted);
  border-radius: 20px;
  color: var(--soft);
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  cursor: pointer;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  touch-action: manipulation;
}
.q-back-btn:active { background: var(--bg3); }
.q-player-detail-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.q-player-detail-hdr h2 { font-size: 22px; font-weight: 800; }
.q-player-total { font-size: 28px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.q-player-total small { font-size: 12px; color: var(--soft); font-weight: 400; }

.q-specials-card {
  background: var(--bg2);
  border: 1px solid var(--muted);
  border-radius: var(--r);
  padding: 12px 14px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.q-spec-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.q-spec-row span:first-child { color: var(--soft); font-size: 11px; width: 90px; flex-shrink: 0; }
.q-spec-row span:nth-child(2) { flex: 1; font-weight: 700; }

.q-detail-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 0;
  border-bottom: 1px solid var(--muted);
  font-size: 12px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.q-detail-row:last-child { border-bottom: none; }
.q-detail-teams { flex: 1; font-size: 11px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-detail-teams b { color: var(--fg); font-weight: 600; }
.q-detail-pred { font-family: 'Syne Mono', monospace; font-size: 13px; font-weight: 700; color: var(--fg); flex-shrink: 0; min-width: 28px; text-align: center; }
.q-detail-res { font-family: 'Syne Mono', monospace; font-size: 11px; color: var(--soft); flex-shrink: 0; }
.q-detail-row.exact .q-detail-pred { color: var(--gold); }
.q-detail-row.diff  .q-detail-pred { color: var(--green); }
.q-detail-row.win   .q-detail-pred { color: var(--blue); }
.q-detail-row.zero  .q-detail-pred { color: var(--red); opacity: .7; }

/* ── MATCH ODDS BAR ──────────────────────────────────────── */
.q-odds { margin-top: 10px; }
.q-odds-bar {
  display: flex;
  height: 5px;
  border-radius: 3px;
  overflow: hidden;
  gap: 1px;
}
.q-odds-home { background: #3b82f6; transition: width .4s ease-out; }
.q-odds-draw { background: var(--muted2); transition: width .4s ease-out; }
.q-odds-away { background: #f59e0b; transition: width .4s ease-out; }
.q-odds-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--soft);
  margin-top: 4px;
  font-family: 'Syne Mono', monospace;
}
.q-odds-labels span:first-child { color: #3b82f6; }
.q-odds-labels span:last-child  { color: #f59e0b; }

/* ── NEWS LINK ───────────────────────────────────────────── */
.q-news-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg2);
  border: 1px solid var(--muted);
  border-radius: var(--r);
  padding: 13px 16px;
  text-decoration: none;
  color: var(--fg);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
  min-height: 48px;
  transition: border-color .2s;
}
.q-news-link:hover { border-color: var(--gold); }
.q-news-link span { color: var(--soft); font-size: 16px; }

/* ── SCORING LEGEND ──────────────────────────────────────── */
.q-scoring-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  font-family: 'Syne Mono', monospace;
  font-size: 10px;
  letter-spacing: .04em;
}
.leg { display: flex; align-items: center; gap: 4px; }
.leg-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.leg-dot.exact  { background: var(--gold); }
.leg-dot.diff   { background: var(--green); }
.leg-dot.win    { background: var(--blue); }
.leg-dot.wrong  { background: var(--muted2); }

/* ── MATCHDAY ────────────────────────────────────────────── */
.q-phase-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.q-phase-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: 'Syne Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.q-phase-pill-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.q-phase-pill[data-md="1"] { background: rgba(59,130,246,.12); color: #3b82f6; }
.q-phase-pill[data-md="1"] .q-phase-pill-dot { background: #3b82f6; }
.q-phase-pill[data-md="2"] { background: rgba(245,158,11,.12); color: #f59e0b; }
.q-phase-pill[data-md="2"] .q-phase-pill-dot { background: #f59e0b; }
.q-phase-pill[data-md="3"] { background: rgba(239,68,68,.12); color: #ef4444; }
.q-phase-pill[data-md="3"] .q-phase-pill-dot { background: #ef4444; }

.q-matchday {
  margin-bottom: 32px;
  border-left: 3px solid var(--muted);
  padding-left: 14px;
}
.q-matchday[data-md="1"] { border-left-color: #3b82f6; }
.q-matchday[data-md="2"] { border-left-color: #f59e0b; }
.q-matchday[data-md="3"] { border-left-color: #ef4444; }

.q-matchday-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.q-md-label-group { flex-shrink: 0; }
.q-matchday-hdr h3 {
  font-family: 'Syne Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: .12em;
  white-space: nowrap;
}
.q-matchday[data-md="1"] .q-matchday-hdr h3 { color: #3b82f6; }
.q-matchday[data-md="2"] .q-matchday-hdr h3 { color: #f59e0b; }
.q-matchday[data-md="3"] .q-matchday-hdr h3 { color: #ef4444; }
.q-md-desc {
  font-size: 9px;
  color: var(--soft);
  margin-top: 2px;
  display: block;
  font-family: 'Syne', sans-serif;
  font-style: italic;
  font-weight: 400;
  white-space: nowrap;
}
.q-matchday[data-md="3"] .q-md-desc { color: #ef4444; opacity: .8; }

.q-md-bar { flex: 1; height: 2px; background: var(--muted); border-radius: 2px; overflow: hidden; }
.q-md-fill { height: 100%; background: var(--gold); transition: width .5s ease-out; }
.q-matchday[data-md="1"] .q-md-fill { background: #3b82f6; }
.q-matchday[data-md="2"] .q-md-fill { background: #f59e0b; }
.q-matchday[data-md="3"] .q-md-fill { background: #ef4444; }
.q-md-pct {
  font-family: 'Syne Mono', monospace;
  font-size: 10px;
  color: var(--soft);
  flex-shrink: 0;
}

.q-date-divider {
  font-family: 'Syne Mono', monospace;
  font-size: 10px;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 14px 0 8px;
  padding-left: 2px;
}

/* ── MATCH CARD ──────────────────────────────────────────── */
.q-match-card {
  background: var(--bg2);
  border: 1px solid var(--muted);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  margin-bottom: 8px;
  transition: border-color .2s, transform .15s;
}
.q-match-card:active { transform: scale(.99); }
.q-match-card.locked { opacity: .65; }

.q-match-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.q-group-badge {
  font-family: 'Syne Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  background: var(--gold2);
  color: var(--gold);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: .08em;
}
.q-match-time { font-family: 'Syne Mono', monospace; font-size: 10px; color: var(--soft); flex: 1; }
.q-lock-icon { font-size: 11px; }

/* POINTS BADGE */
.q-pts-badge {
  font-family: 'Syne Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}
.q-pts-badge.exact { background: var(--gold3); color: var(--gold); border: 1px solid var(--gold2); }
.q-pts-badge.diff  { background: var(--green2); color: var(--green); }
.q-pts-badge.win   { background: var(--blue2); color: var(--blue); }
.q-pts-badge.zero  { background: rgba(120,116,138,.1); color: var(--soft); }

/* ── TEAMS + STEPPER ROW ─────────────────────────────────── */
.q-match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
}
.q-team-home {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}
.q-team-away {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}
.q-flag { font-size: 20px; line-height: 1; flex-shrink: 0; }
.q-tname {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.q-team-home .q-tname { text-align: right; }

/* ── STEPPER COMPONENT ───────────────────────────────────── */
.q-score-pair {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.q-stepper {
  display: flex;
  align-items: center;
  background: var(--bg3);
  border: 1px solid var(--muted);
  border-radius: 10px;
  overflow: hidden;
  height: 52px;
}
.q-step-btn {
  min-width: 44px;
  height: 100%;
  background: none;
  border: none;
  color: var(--soft);
  font-size: 20px;
  font-family: 'Syne', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  flex-shrink: 0;
}
.q-step-btn:active { background: var(--muted); color: var(--fg); }
.q-step-btn:hover { color: var(--gold); }
.q-step-val {
  min-width: 36px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  user-select: none;
  line-height: 1;
}
.q-score-sep { font-size: 18px; font-weight: 800; color: var(--soft); padding: 0 2px; }

/* LOCKED SCORE DISPLAY */
.q-score-locked {
  display: flex;
  align-items: center;
  gap: 4px;
}
.q-score-locked-val {
  min-width: 36px;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

/* RESULT DISPLAY */
.q-actual-result {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--muted);
  font-family: 'Syne Mono', monospace;
  font-size: 11px;
  color: var(--green);
  text-align: center;
  letter-spacing: .05em;
}

/* ── SPECIALS ────────────────────────────────────────────── */
.q-special-cards { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.q-special-card {
  background: var(--bg2);
  border: 1px solid var(--muted);
  border-radius: var(--r-lg);
  padding: 18px;
  transition: border-color .2s;
}
.q-special-card.correct { border-color: rgba(34,197,94,.4); background: var(--green2); }
.q-special-card.wrong   { border-color: rgba(239,68,68,.4); background: var(--red2); }

.q-special-label {
  font-family: 'Syne Mono', monospace;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--soft);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.q-special-pts { color: var(--gold); font-size: 12px; font-weight: 700; }
.q-special-pick { font-size: 18px; font-weight: 700; }
.q-special-verdict {
  margin-top: 10px;
  font-size: 12px;
  color: var(--soft);
  padding-top: 10px;
  border-top: 1px solid var(--muted);
}

/* ── INPUTS ──────────────────────────────────────────────── */
input[type="text"],
input[type="number"],
select,
.q-text-in,
.q-select {
  background: var(--bg3);
  border: 1px solid var(--muted);
  color: var(--fg);
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  padding: 13px 14px;
  border-radius: var(--r);
  width: 100%;
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
  appearance: none;
  min-height: 48px;
}
input:focus, select:focus { border-color: var(--gold); }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.q-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  background: var(--gold);
  color: var(--bg);
  border: none;
  border-radius: var(--r);
  padding: 0 20px;
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .2s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.q-btn:active { transform: scale(.97); opacity: .9; }
.q-btn.secondary {
  background: var(--bg3);
  color: var(--fg);
  border: 1px solid var(--muted);
}
.q-btn.secondary:hover { border-color: var(--gold); }
.q-btn.danger { background: var(--red); color: #fff; }
.q-btn.sm { min-height: 44px; font-size: 12px; }
.q-btn.xs { min-height: 36px; font-size: 11px; width: auto; padding: 0 12px; display: inline-flex; }

/* ── LOADING SCREEN ──────────────────────────────────────── */
.q-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: calc(100dvh - var(--head-h) - var(--nav-h));
  color: var(--soft);
  font-size: 14px;
  font-family: 'Syne Mono', monospace;
  letter-spacing: .08em;
}
.q-loading-ball {
  font-size: 40px;
  animation: spin 1.5s linear infinite;
}

/* ── LOGIN ───────────────────────────────────────────────── */
.q-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - var(--head-h) - var(--nav-h));
  padding: 24px 16px;
}
.q-login-card {
  background: var(--bg2);
  border: 1px solid var(--muted);
  border-radius: var(--r-lg);
  padding: 40px 28px;
  width: 100%;
  max-width: 340px;
  text-align: center;
}
.q-ball {
  font-size: 52px;
  margin-bottom: 14px;
  display: block;
  animation: spin 5s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.q-login-card h2 { font-size: 24px; font-weight: 800; color: var(--gold); margin-bottom: 5px; }
.q-subtitle { color: var(--soft); font-size: 12px; margin-bottom: 28px; font-family: 'Syne Mono', monospace; letter-spacing: .07em; line-height: 1.6; }
#login-form { display: flex; flex-direction: column; gap: 12px; }
.q-login-note {
  margin-top: 16px;
  font-size: 11px;
  color: var(--soft);
  line-height: 1.7;
  font-family: 'Syne Mono', monospace;
}
.q-login-err {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--red2);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: var(--r);
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

/* ── RESULTS TAB ─────────────────────────────────────────── */
.q-awards-block {
  background: var(--bg2);
  border: 1px solid var(--muted);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 24px;
}
.q-awards-block h3 { font-size: 14px; font-weight: 800; margin-bottom: 16px; }
.q-award-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.q-award-row label {
  font-family: 'Syne Mono', monospace;
  font-size: 11px;
  color: var(--soft);
  width: 120px;
  flex-shrink: 0;
  letter-spacing: .06em;
}
.q-select.sm { min-height: 44px; padding: 10px 12px; font-size: 13px; }
.q-text-in.sm { min-height: 44px; padding: 10px 12px; font-size: 13px; }

.q-result-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--muted);
  flex-wrap: wrap;
}
.q-result-row.future { opacity: .45; }
.q-result-matchlabel {
  flex: 1;
  font-size: 12px;
  min-width: 180px;
  line-height: 1.4;
}
.q-result-date {
  font-family: 'Syne Mono', monospace;
  font-size: 10px;
  color: var(--soft);
  white-space: nowrap;
}
.q-res-in {
  width: 52px !important;
  min-height: 44px !important;
  padding: 6px 4px !important;
  text-align: center;
  font-size: 16px !important;
  font-weight: 700;
  border-radius: 8px !important;
}
.q-res-sep { color: var(--soft); font-size: 14px; }

.q-results-header { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.q-results-header h3 { font-size: 14px; font-weight: 800; }

/* ── POOL / INVITE ───────────────────────────────────────── */
.q-invite-url {
  font-family: 'Syne Mono', monospace;
  font-size: 13px;
  background: var(--bg3);
  border: 1px solid var(--muted);
  border-radius: var(--r);
  padding: 13px 14px;
  color: var(--gold);
  letter-spacing: .04em;
  word-break: break-all;
  margin-top: 4px;
}
.q-pool-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.q-pool-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg3);
  border-radius: var(--r);
  min-height: 44px;
}
.q-pool-name { flex: 1; font-size: 13px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.q-pool-picks { font-family: 'Syne Mono', monospace; font-size: 11px; color: var(--soft); flex-shrink: 0; }

/* ── SHARE ───────────────────────────────────────────────── */
.q-instructions {
  background: var(--bg2);
  border: 1px solid var(--muted);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 14px;
}
.q-instructions h3 { font-size: 13px; font-weight: 800; margin-bottom: 12px; }
.q-steps { list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 10px; }
.q-step {
  counter-increment: s;
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--soft);
  line-height: 1.5;
  align-items: flex-start;
}
.q-step::before {
  content: counter(s);
  font-family: 'Syne Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  background: var(--gold);
  color: var(--bg);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.q-share-block {
  background: var(--bg2);
  border: 1px solid var(--muted);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 12px;
}
.q-share-block h3 { font-size: 14px; font-weight: 800; margin-bottom: 6px; }
.q-share-block p { font-size: 13px; color: var(--soft); line-height: 1.6; margin-bottom: 14px; }
.q-share-block.danger-zone { border-color: rgba(239,68,68,.2); }

.q-imported-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.q-imported-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg3);
  border-radius: var(--r);
  min-height: 48px;
}
.q-imported-name { flex: 1; font-weight: 700; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.q-imported-count { font-family: 'Syne Mono', monospace; font-size: 11px; color: var(--soft); flex-shrink: 0; }

/* ── TOAST ───────────────────────────────────────────────── */
.q-toast {
  position: fixed;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--fg);
  color: var(--bg);
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
  z-index: 999;
  white-space: nowrap;
  pointer-events: none;
  max-width: calc(100vw - 32px);
  text-overflow: ellipsis;
  overflow: hidden;
}
.q-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 641px) {
  .q-toast { bottom: 28px; }
}

/* ── MOBILE TWEAKS ───────────────────────────────────────── */
@media (max-width: 480px) {
  .q-flag { font-size: 16px; }
  .q-tname { font-size: 10px; }
  .q-step-val { font-size: 20px; min-width: 30px; }
  .q-step-btn { min-width: 40px; }
  .q-stats-row { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .q-stat-num { font-size: 18px; }
  .q-award-row label { width: 100%; }
  .q-result-matchlabel { min-width: 100%; }
  .q-section { padding: 16px 12px; }
}
