:root {
  --bg: #f0e6cf;
  --bg-paper: #f8efd6;
  --bg-card: #fdf6e3;
  --ink: #14110f;
  --ink-soft: #44372a;
  --grass: #1d5b3a;
  --grass-dark: #0f3622;
  --grass-light: #2d8a55;
  --gold: #f4a72b;
  --goal-yellow: #fcc419;
  --whistle-red: #c1272d;
  --chalk: #faf3df;
  --line: #2a221a;
  --muted: #8a7a5e;
  --stamp: #b03030;
  --ze-purple: #6b2d8a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(29,91,58,0.06) 0%, transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(244,167,43,0.08) 0%, transparent 30%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' /%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' /%3E%3C/svg%3E");
}

/* ==== Floating soccer balls background ==== */
.floating-balls {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.ball {
  position: absolute;
  opacity: 0.09;
  animation: float linear infinite;
  user-select: none;
}
.ball:nth-child(1) { left: 5%;  font-size: 36px; animation-duration: 22s; animation-delay: 0s; }
.ball:nth-child(2) { left: 22%; font-size: 28px; animation-duration: 28s; animation-delay: -8s; }
.ball:nth-child(3) { left: 45%; font-size: 44px; animation-duration: 19s; animation-delay: -3s; }
.ball:nth-child(4) { left: 68%; font-size: 32px; animation-duration: 31s; animation-delay: -12s; }
.ball:nth-child(5) { left: 85%; font-size: 38px; animation-duration: 25s; animation-delay: -5s; }
.ball:nth-child(6) { left: 12%; font-size: 24px; animation-duration: 35s; animation-delay: -18s; }
.ball:nth-child(7) { left: 55%; font-size: 30px; animation-duration: 27s; animation-delay: -10s; }
.ball:nth-child(8) { left: 78%; font-size: 26px; animation-duration: 33s; animation-delay: -6s; }
@keyframes float {
  0%   { transform: translateY(110vh) rotate(0deg); }
  100% { transform: translateY(-15vh) rotate(720deg); }
}

/* ==== Tribute bar to Zé Bolão ==== */
.tribute-bar {
  background: var(--ink);
  color: var(--chalk);
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 0.4rem 1rem;
  border-bottom: 2px solid var(--gold);
  font-family: 'DM Sans', sans-serif;
  position: relative;
  z-index: 5;
  overflow: hidden;
}
.tribute-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(244,167,43,0.12) 50%, transparent 100%);
  animation: shine 6s linear infinite;
}
@keyframes shine {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.tribute-bar strong {
  color: var(--goal-yellow);
  font-weight: 700;
  cursor: pointer;
  border-bottom: 1px dotted var(--goal-yellow);
}
.tribute-bar strong:hover {
  color: var(--chalk);
}
.tribute-bar .dove {
  display: inline-block;
  animation: dove-bob 3s ease-in-out infinite;
}
@keyframes dove-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}

/* ==== Header ==== */
header.hero {
  position: relative;
  background: linear-gradient(180deg, var(--grass-dark) 0%, var(--grass) 100%);
  color: var(--chalk);
  overflow: hidden;
  padding: 1.4rem 1.5rem 2.4rem;
  border-bottom: 4px solid var(--ink);
  z-index: 2;
}
header.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, transparent 0, transparent 80px, rgba(255,255,255,0.04) 80px, rgba(255,255,255,0.04) 160px);
  pointer-events: none;
}
header.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 320px;
  height: 320px;
  border: 3px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.hero-stripes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg,
    transparent 0%, transparent 49.5%,
    rgba(255,255,255,0.05) 49.5%, rgba(255,255,255,0.05) 50.5%,
    transparent 50.5%, transparent 100%);
  animation: stripe-pulse 8s ease-in-out infinite;
}
@keyframes stripe-pulse {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}
.hero-inner {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  z-index: 1;
}
.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  user-select: none;
}
.brand-mark {
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  position: relative;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  isolation: isolate; /* gives child z-indexes their own stacking ctx */
}
/* Wobbling yellow shield as a pseudo — image stays still, shield rocks */
.brand-mark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--goal-yellow);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-6deg);
  animation: wobble 4s ease-in-out infinite;
  z-index: 0;
}
.brand-mark .brand-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 25%;
  z-index: 2;
  border: 3px solid var(--ink);
  /* Quality + GPU hints */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
  transform: translateZ(0);
  backface-visibility: hidden;
  filter: contrast(1.04) saturate(1.05);
}
.brand-mark .brand-fallback {
  position: relative;
  z-index: 1;
}
/* ZB badge — sits on top, doesn't rotate */
.brand-mark::after {
  content: "ZB";
  position: absolute;
  bottom: -4px;
  right: -8px;
  background: var(--ze-purple);
  color: var(--chalk);
  font-family: 'Bungee', sans-serif;
  font-size: 0.55rem;
  padding: 0.12rem 0.35rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  letter-spacing: 0.1em;
  transform: rotate(8deg);
  box-shadow: 2px 2px 0 var(--ink);
  z-index: 3;
}
@keyframes wobble {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  25%      { transform: rotate(-2deg) translateY(-3px); }
  50%      { transform: rotate(-6deg) translateY(-5px); }
  75%      { transform: rotate(-9deg) translateY(-2px); }
}
.brand-text h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: 0.04em;
  line-height: 0.95;
}
.brand-text h1 .accent {
  color: var(--goal-yellow);
}
.brand-text .subtitle {
  font-family: 'Bungee', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--goal-yellow);
  margin-top: 0.25rem;
}
.user-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'DM Sans', sans-serif;
}
.user-pill {
  background: var(--chalk);
  color: var(--ink);
  padding: 0.5rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ink);
  overflow: hidden;
  flex-shrink: 0;
}
.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.btn {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  padding: 0.55rem 1.1rem;
  border: 2.5px solid var(--ink);
  border-radius: 6px;
  background: var(--goal-yellow);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  box-shadow: 4px 4px 0 var(--ink);
  text-transform: uppercase;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-grass { background: var(--grass); color: var(--chalk); }
.btn-red   { background: var(--whistle-red); color: var(--chalk); }
.btn-purple{ background: var(--ze-purple); color: var(--chalk); }
.btn-ghost { background: transparent; color: var(--chalk); border-color: var(--chalk); box-shadow: 4px 4px 0 rgba(0,0,0,0.3); }
.btn-ghost:hover { box-shadow: 5px 5px 0 rgba(0,0,0,0.3); }
.btn-sm { font-size: 0.85rem; padding: 0.35rem 0.75rem; box-shadow: 3px 3px 0 var(--ink); }
.btn-sm:hover { box-shadow: 4px 4px 0 var(--ink); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: 2px 2px 0 var(--ink) !important; }

/* ==== Tabs ==== */
nav.tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-paper);
  border-bottom: 3px solid var(--ink);
  padding: 0.6rem 1.5rem;
  box-shadow: 0 6px 0 rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.tabs-left {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
.tab-list {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 0 1 auto;
  min-width: 0;
}
.tab-list::-webkit-scrollbar { display: none; }
.tab-list-center {
  flex: 1 1 auto;
  justify-content: center;
}
.tab-list-right {
  flex: 0 0 auto;
  position: relative;
  padding-left: 0.9rem;
  margin-left: 0.3rem;
}
.tab-list-right::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 26px;
  background: var(--ink);
  opacity: 0.18;
  border-radius: 2px;
}
#bolaoSelectorMount {
  flex: 0 0 auto;
}
.tab {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  padding: 0.5rem 1.1rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: inherit;
}
.tab .tab-icon { font-size: 1.05rem; line-height: 1; }
.tab .tab-label {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.04em;
}
.tab:hover { background: var(--goal-yellow); }
.tab.active {
  background: var(--ink);
  color: var(--goal-yellow);
  box-shadow: 3px 3px 0 var(--gold);
}

/* ==== Main layout ==== */
main {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}
.panel { display: none; }
.panel.active { display: block; animation: fadeUp 0.4s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-sub {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* ==== Group switcher (filtro de contexto — dentro da nav.tabs) ==== */
.group-switcher {
  position: relative;
}
.group-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--grass);
  color: var(--chalk);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  box-shadow: 3px 3px 0 var(--ink);
  white-space: nowrap;
  font-family: inherit;
  font-family: 'Bebas Neue', sans-serif;
}
.group-switcher-btn:hover { background: var(--grass-light); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.group-switcher-icon { font-size: 0.95rem; }
.group-switcher-current {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.group-switcher-btn .cs-arrow {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.05rem;
  color: var(--goal-yellow);
  transition: transform 0.2s ease;
}
.group-switcher.open .cs-arrow { transform: rotate(180deg); }

.group-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  max-width: 90vw;
  background: var(--bg-card);
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  box-shadow: 5px 5px 0 var(--ink);
  z-index: 60;
  padding: 0.3rem;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.group-switcher.open .group-switcher-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.group-switcher-option {
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.1s ease;
}
.group-switcher-option:hover { background: var(--goal-yellow); }
.group-switcher-option.selected {
  background: var(--grass);
  color: var(--chalk);
}
.group-switcher-option.selected:hover { background: var(--grass-light); }

@media (max-width: 720px) {
  .group-switcher-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.92rem;
    box-shadow: 2px 2px 0 var(--ink);
  }
  .group-switcher-current { max-width: 100px; }
}
@media (max-width: 480px) {
  .group-switcher-current { max-width: 80px; }
}

/* ==== Day sections (Grupos panel — cronológico) ==== */
.day-section {
  margin-bottom: 1.5rem;
}
.day-section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-bottom: 2px dashed var(--ink);
  padding-bottom: 0.3rem;
}
.day-section-title.is-today {
  color: var(--whistle-red);
}
.day-section-title .day-count {
  font-family: 'Bungee', sans-serif;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-left: auto;
}
.day-section-list {
  display: grid;
  gap: 0.5rem;
}
.group-inline-badge {
  background: var(--grass);
  color: var(--chalk);
  font-family: 'Bungee', sans-serif;
  font-size: 0.6rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  border: 1px solid var(--ink);
}

/* Resumo dos grupos (colapsável) */
.groups-overview {
  margin-bottom: 1.5rem;
  background: var(--bg-card);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--ink);
  overflow: hidden;
}
.groups-overview > summary {
  padding: 0.7rem 1rem;
  cursor: pointer;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  background: var(--grass);
  color: var(--chalk);
  user-select: none;
}
.groups-overview > summary:hover { background: var(--grass-light); }
.groups-overview[open] > summary { border-bottom: 2px solid var(--ink); }
.groups-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.6rem;
  padding: 0.85rem;
}
.group-mini {
  background: var(--bg-paper);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  font-size: 0.82rem;
}
.group-mini-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 0.3rem;
  border-bottom: 1px dashed var(--muted);
  padding-bottom: 0.2rem;
}
.group-mini-team {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.2rem;
  font-weight: 600;
}

/* ==== Group cards ==== */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}
.group-card {
  background: var(--bg-card);
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  box-shadow: 6px 6px 0 var(--ink);
  overflow: hidden;
  transition: transform 0.2s ease;
}
.group-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.group-header {
  background: var(--grass);
  color: var(--chalk);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--ink);
}
.group-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.06em;
}
.group-badge {
  background: var(--goal-yellow);
  color: var(--ink);
  font-family: 'Bungee', sans-serif;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1.5px solid var(--ink);
  letter-spacing: 0.1em;
}
.group-teams {
  padding: 0.75rem 1rem;
  display: grid;
  gap: 0.4rem;
  border-bottom: 1px dashed var(--ink);
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent 30px, rgba(0,0,0,0.02) 30px, rgba(0,0,0,0.02) 60px);
}
.group-team {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.flag {
  font-size: 1.3rem;
  line-height: 1;
  font-family: 'Noto Color Emoji', 'Segoe UI Emoji', 'Apple Color Emoji', sans-serif;
}
.group-matches {
  padding: 0.5rem;
  display: grid;
  gap: 0.4rem;
}
.match-row {
  display: block;
  padding: 0.55rem 0.7rem;
  background: var(--bg-paper);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.match-row:hover {
  background: var(--goal-yellow);
  transform: translateX(2px);
}
.match-row.predicted {
  background: linear-gradient(135deg, #fff5d6 0%, #f8e6a0 100%);
  border-color: var(--gold);
}
.match-row.has-result {
  border-style: solid;
  border-width: 2px;
}
.match-side {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.match-side.away { justify-content: flex-end; }
.match-side .flag { font-size: 1.1rem; }
.match-score {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  background: var(--ink);
  color: var(--goal-yellow);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.85rem;
  min-width: 48px;
  text-align: center;
  letter-spacing: 0.05em;
}
.match-score.empty { background: transparent; color: var(--muted); border: 1.5px dashed var(--muted); }
.match-row-inner,
.ko-match-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
}
.ko-match-inner { gap: 0.6rem; }

.match-kickoff {
  margin-top: 0.3rem;
  text-align: center;
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* Avatares de quem palpitou — exibido em cada card de jogo */
.bet-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  margin-top: 0.35rem;
}
.bet-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: inline-grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--ink);
  background: var(--bg-card);
  line-height: 1;
  font-family: 'DM Sans', sans-serif;
  user-select: none;
  cursor: default;
}
.bet-dot.is-me {
  outline: 2px solid var(--whistle-red);
  outline-offset: 1px;
}
.bet-dot.more {
  background: var(--ink);
  color: var(--goal-yellow);
  font-size: 0.6rem;
  padding: 0 0.1rem;
  width: auto;
  min-width: 22px;
  border-radius: 999px;
}
.match-row.locked,
.ko-match.locked {
  opacity: 0.65;
  background: linear-gradient(135deg, #ece4cc 0%, #d6cdb0 100%);
  border-style: dashed;
}
.match-row.locked.predicted,
.ko-match.locked.predicted {
  opacity: 1;
  background: linear-gradient(135deg, #f0e2bd 0%, #d8c79a 100%);
}
.lock-tag {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--goal-yellow);
  font-size: 0.65rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  font-family: 'Bungee', sans-serif;
  letter-spacing: 0.05em;
}

.match-row .pred-tag,
.ko-match .pred-tag {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--whistle-red);
  color: var(--chalk);
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  font-family: 'Bungee', sans-serif;
  letter-spacing: 0.05em;
}
.match-row .result-tag,
.ko-match .result-tag {
  position: absolute;
  top: -8px;
  left: -8px;
  background: var(--grass-light);
  color: var(--chalk);
  font-size: 0.6rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  font-family: 'Bungee', sans-serif;
  letter-spacing: 0.05em;
}

/* ==== Bracket ==== */
.bracket-stage { margin-bottom: 2.5rem; }
.stage-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  border-bottom: 3px solid var(--ink);
  padding-bottom: 0.25rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.stage-title .stamp {
  background: var(--stamp);
  color: var(--chalk);
  font-family: 'Bungee', sans-serif;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  transform: rotate(-3deg);
  letter-spacing: 0.1em;
}
.bracket-grid { display: grid; gap: 0.7rem; }
.ko-match {
  display: block;
  background: var(--bg-card);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.ko-match:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); background: #fff8df; }
.ko-match.predicted { background: linear-gradient(135deg, #fff5d6 0%, #f8e6a0 100%); }
.ko-side { font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; gap: 0.4rem; }
.ko-side.away { justify-content: flex-end; }
.ko-vs { font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; color: var(--muted); }

/* ==== Modal ==== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20,17,15,0.7);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}
.modal-backdrop.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-paper);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 8px 8px 0 var(--ink);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: popIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popIn {
  from { transform: scale(0.85) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-header {
  background: var(--grass);
  color: var(--chalk);
  padding: 1rem 1.5rem;
  border-bottom: 2px solid var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 11px 11px 0 0;
}
.modal-header h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
}
.modal-close {
  background: var(--whistle-red);
  color: var(--chalk);
  border: 2px solid var(--ink);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}
.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 2px dashed var(--ink);
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  background: var(--bg-card);
  border-radius: 0 0 11px 11px;
  flex-wrap: wrap;
}

/* ==== Form inputs ==== */
.form-group { margin-bottom: 1.1rem; }
.form-label {
  font-family: 'Bungee', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 0.4rem;
}
.input, .select, .textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  background: var(--chalk);
  color: var(--ink);
  transition: box-shadow 0.15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  box-shadow: 3px 3px 0 var(--goal-yellow);
}
.textarea { min-height: 60px; resize: vertical; }

/* ==== Custom Select ==== */
.custom-select {
  position: relative;
  user-select: none;
  font-family: 'DM Sans', sans-serif;
}
.cs-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--chalk);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: box-shadow 0.15s ease, transform 0.1s ease;
  box-shadow: 3px 3px 0 var(--ink);
  font-family: inherit;
}
.cs-trigger:hover {
  background: #fff8df;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}
.custom-select.open .cs-trigger {
  background: var(--goal-yellow);
  box-shadow: 3px 3px 0 var(--gold);
}
.custom-select.cs-error .cs-trigger {
  border-color: var(--whistle-red);
  background: #ffe1e1;
  box-shadow: 3px 3px 0 var(--whistle-red);
  animation: cs-error-shake 0.4s ease;
}
@keyframes cs-error-shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  50%      { transform: translateX(4px); }
  75%      { transform: translateX(-2px); }
}
.cs-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cs-label.placeholder {
  color: var(--muted);
  font-style: italic;
  font-weight: 500;
}
.cs-arrow {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  color: var(--ink);
  transition: transform 0.2s ease;
  display: inline-block;
  line-height: 1;
}
.custom-select.open .cs-arrow {
  transform: rotate(180deg);
}
.cs-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  box-shadow: 5px 5px 0 var(--ink);
  z-index: 50;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  max-height: 250px;
  overflow-y: auto;
  padding: 0.3rem;
}
.custom-select.open .cs-options {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.cs-option {
  padding: 0.55rem 0.75rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.1s ease, transform 0.1s ease;
  border: 2px solid transparent;
}
.cs-option:hover {
  background: var(--goal-yellow);
  transform: translateX(3px);
}
.cs-option.selected {
  background: var(--grass);
  color: var(--chalk);
  border-color: var(--ink);
}
.cs-option.selected:hover {
  background: var(--grass-light);
  color: var(--chalk);
}

.score-input-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  background: var(--grass-dark);
  color: var(--chalk);
  padding: 1rem;
  border-radius: 10px;
  border: 2px solid var(--ink);
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}
.score-input-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, transparent 0, transparent 4px, rgba(255,255,255,0.03) 4px, rgba(255,255,255,0.03) 8px);
  pointer-events: none;
}
.team-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  position: relative;
}
.team-block .flag { font-size: 2.2rem; }
.team-block .name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  text-align: center;
}
.score-input {
  width: 60px;
  height: 60px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--ink);
  color: var(--goal-yellow);
  border: 2px solid var(--goal-yellow);
  border-radius: 8px;
  margin-top: 0.25rem;
  -moz-appearance: textfield;
}
.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.score-divider {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  color: var(--goal-yellow);
  position: relative;
  z-index: 1;
}

.scorers-section { margin-top: 0.5rem; }
.scorer-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.scorer-input-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.4rem;
  align-items: center;
}
.scorer-team-btn {
  background: var(--bg-card);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  transition: all 0.1s;
  min-width: 90px;
}
.scorer-team-btn.active { background: var(--grass); color: var(--chalk); }
.scorer-input-row .input { padding: 0.45rem 0.6rem; font-size: 0.88rem; }
.scorer-remove {
  background: var(--whistle-red);
  color: var(--chalk);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}
.scorer-add {
  background: var(--gold);
  border: 2px dashed var(--ink);
  border-radius: 6px;
  padding: 0.45rem;
  cursor: pointer;
  width: 100%;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.scorer-add:hover { background: var(--goal-yellow); }

.extras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--muted);
}

/* ==== Login screen ==== */
.login-screen {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
}
.login-card {
  background: var(--bg-card);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 10px 10px 0 var(--ink);
  padding: 2rem;
  max-width: 460px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 2;
}
.login-card::before {
  content: "BOLÃO OFICIAL";
  position: absolute;
  top: 18px;
  right: -14px;
  background: var(--whistle-red);
  color: var(--chalk);
  font-family: 'Bungee', sans-serif;
  font-size: 0.7rem;
  padding: 0.3rem 0.8rem;
  transform: rotate(8deg);
  letter-spacing: 0.1em;
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-shadow: 3px 3px 0 var(--ink);
}
.login-shield {
  width: 150px;
  height: 150px;
  margin: 0 auto 0.5rem;
  position: relative;
  display: grid;
  place-items: center;
  font-size: 3.8rem;
  isolation: isolate;
}
.login-shield::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--goal-yellow);
  border: 4px solid var(--ink);
  border-radius: 50%;
  box-shadow: 5px 5px 0 var(--ink);
  animation: shield-spin 6s ease-in-out infinite;
  z-index: 0;
}
.login-shield .brand-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 25%;
  z-index: 2;
  border: 4px solid var(--ink);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
  transform: translateZ(0);
  backface-visibility: hidden;
  filter: contrast(1.04) saturate(1.05);
}
.login-shield .brand-fallback { position: relative; z-index: 1; }
@keyframes shield-spin {
  0%, 100% { transform: rotate(-5deg) scale(1); }
  25%      { transform: rotate(3deg) scale(1.02); }
  50%      { transform: rotate(-5deg) scale(1); }
  75%      { transform: rotate(-10deg) scale(0.98); }
}
.login-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.6rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}
.login-title .accent { color: var(--whistle-red); }
.login-subtitle {
  font-family: 'Bungee', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}
.login-form .form-group { text-align: left; }
.login-error {
  background: var(--whistle-red);
  color: var(--chalk);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 0.5rem 0.8rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  font-weight: 700;
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  50%      { transform: translateX(6px); }
  75%      { transform: translateX(-4px); }
}
.login-footnote {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--ink);
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Pitch lines decoration around login */
.pitch-deco {
  position: absolute;
  pointer-events: none;
  font-size: 100px;
  opacity: 0.05;
}
.pitch-deco.tl { top: 5%; left: 5%; transform: rotate(-15deg); }
.pitch-deco.br { bottom: 5%; right: 5%; transform: rotate(15deg); }

/* ==== Ranking ==== */
.ranking-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}
.ranking-table th {
  font-family: 'Bungee', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  text-align: left;
  padding: 0.5rem 1rem;
}
.ranking-row {
  background: var(--bg-card);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.15s;
}
.ranking-row:hover { transform: translateX(3px); }
.ranking-row td {
  padding: 0.85rem 1rem;
  font-weight: 600;
}
.ranking-row td:first-child {
  border-left: 2px solid var(--ink);
  border-radius: 10px 0 0 10px;
}
.ranking-row td:last-child {
  border-right: 2px solid var(--ink);
  border-radius: 0 10px 10px 0;
}
.rank-pos {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  width: 60px;
  text-align: center;
}
.rank-pos.gold   { color: var(--goal-yellow); -webkit-text-stroke: 1px var(--ink); }
.rank-pos.silver { color: #c0c0c0; -webkit-text-stroke: 1px var(--ink); }
.rank-pos.bronze { color: #cd7f32; -webkit-text-stroke: 1px var(--ink); }
.rank-pts {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  background: var(--ink);
  color: var(--goal-yellow);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  display: inline-block;
  min-width: 60px;
  text-align: center;
}

/* ==== Metrics info card ==== */
.metrics-info {
  background: var(--bg-card);
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.metrics-info h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.metric-card {
  background: var(--bg-paper);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0.85rem;
  position: relative;
}
.metric-card .icon {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}
.metric-card .label {
  font-family: 'Bungee', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
.metric-card .desc {
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.metric-card .pts {
  position: absolute;
  top: -10px;
  right: -8px;
  background: var(--goal-yellow);
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-family: 'Bungee', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  transform: rotate(4deg);
}
.metric-card.implemented { background: linear-gradient(135deg, #fff5d6 0%, #f8e6a0 100%); }

/* ==== Points rules ==== */
.points-rules {
  background: var(--ink);
  color: var(--chalk);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--whistle-red);
}
.points-rules h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  color: var(--goal-yellow);
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
}
.rule-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.5rem 1.5rem;
}
.rule {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(255,255,255,0.15);
  padding: 0.45rem 0;
  font-size: 0.92rem;
}
.rule .pts-badge {
  font-family: 'JetBrains Mono', monospace;
  background: var(--goal-yellow);
  color: var(--ink);
  padding: 0.05rem 0.45rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

/* ==== Confetti / goal animation ==== */
.confetti-wrap {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}
.confetto {
  position: absolute;
  width: 10px;
  height: 16px;
  background: var(--goal-yellow);
  top: -20px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0%   { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}
.goal-stamp {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg) scale(0);
  background: var(--whistle-red);
  color: var(--chalk);
  font-family: 'Bungee', sans-serif;
  font-size: 4rem;
  padding: 1rem 2.5rem;
  border: 4px solid var(--ink);
  border-radius: 12px;
  box-shadow: 8px 8px 0 var(--ink);
  z-index: 1000;
  pointer-events: none;
  letter-spacing: 0.1em;
  text-align: center;
}
.goal-stamp.show { animation: stamp 1.4s ease-out forwards; }
@keyframes stamp {
  0%   { transform: translate(-50%, -50%) rotate(-12deg) scale(0); opacity: 0; }
  20%  { transform: translate(-50%, -50%) rotate(-12deg) scale(1.18); opacity: 1; }
  35%  { transform: translate(-50%, -50%) rotate(-12deg) scale(1); }
  80%  { transform: translate(-50%, -50%) rotate(-12deg) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) rotate(-12deg) scale(0.8); opacity: 0; }
}

/* ==== Empty state ==== */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}
.empty-state .icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: inline-block;
  animation: spin 4s linear infinite;
}
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* ==== Tooltip ==== */
.info-tag {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  font-family: 'Bungee', sans-serif;
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.4rem;
  letter-spacing: 0.05em;
  border: 1.5px solid var(--ink);
  vertical-align: middle;
}

/* ==== Admin pill ==== */
.admin-pill {
  background: var(--whistle-red);
  color: var(--chalk);
  font-family: 'Bungee', sans-serif;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.4rem;
  letter-spacing: 0.05em;
  border: 1.5px solid var(--ink);
}

/* ==== Kickoff banner (inside modal) ==== */
.kickoff-banner {
  background: var(--grass-dark);
  color: var(--chalk);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  font-family: 'DM Sans', sans-serif;
}
.kickoff-banner.locked {
  background: var(--whistle-red);
}
.kickoff-banner.muted {
  background: var(--bg-card);
  color: var(--ink-soft);
}
.kickoff-banner strong { color: var(--goal-yellow); font-weight: 700; }
.kickoff-banner.muted strong { color: var(--ink); }

input[type="datetime-local"].input {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.is-disabled { opacity: 0.5; pointer-events: none; filter: grayscale(0.4); }
.is-disabled .score-input,
.is-disabled .cs-trigger { cursor: not-allowed; }

/* ==== Others' predictions in modal ==== */
.others-preds {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 2px dashed var(--ink);
}
.others-preds-title {
  font-family: 'Bungee', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 0.6rem;
}
.others-preds-list {
  display: grid;
  gap: 0.4rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.other-pred-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.65rem;
  background: var(--bg-card);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  font-size: 0.85rem;
  box-shadow: 2px 2px 0 var(--ink);
}
.other-pred-row .user-avatar {
  width: 26px;
  height: 26px;
  font-size: 0.7rem;
}
.other-pred-row .dname { font-weight: 700; }
.other-pred-row .other-pred-score {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  background: var(--ink);
  color: var(--goal-yellow);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
}
.other-pred-row .other-pred-first {
  font-size: 0.75rem;
  color: var(--ink-soft);
  background: var(--bg-paper);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1.5px solid var(--ink);
}
.other-pred-row.empty {
  grid-template-columns: auto 1fr auto;
  background: var(--bg-paper);
  opacity: 0.7;
  font-style: italic;
}
.other-pred-row .other-pred-status {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ==== Ranking score chips ==== */
.score-chip {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-right: 0.3rem;
  border: 1.5px solid var(--ink);
}
.score-chip.exact   { background: var(--goal-yellow); color: var(--ink); }
.score-chip.partial { background: var(--gold); color: var(--ink); }
.score-chip.winner  { background: var(--grass-light); color: var(--chalk); }
.score-chip.first   { background: var(--ze-purple); color: var(--chalk); }

.hide-mobile {}
@media (max-width: 720px) {
  .hide-mobile { display: none; }
}

/* ==== My predictions list ==== */
.my-pred-list { display: grid; gap: 0.6rem; }
.pred-card {
  background: var(--bg-card);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.15s;
}
.pred-card:hover { transform: translateX(3px); }
.pred-card-info { font-size: 0.85rem; }
.pred-card-stage {
  font-family: 'Bungee', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.pred-card-teams { font-weight: 700; }
.pred-card-pts {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  background: var(--grass);
  color: var(--chalk);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-size: 0.9rem;
}
.pred-card-pts.zero { background: var(--bg-paper); color: var(--muted); border: 1.5px solid var(--muted); }

/* ==== Admin user table ==== */
.user-admin-card {
  background: var(--bg-card);
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.user-admin-card h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}
.user-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.user-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-paper);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
}
.user-row .uname {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--muted);
}
.user-row .dname { font-weight: 700; }
.user-row-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ==== Bolão Groups (admin) ==== */
.group-list { display: grid; gap: 0.5rem; }
.group-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-paper);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
}
.group-row .dname { font-weight: 700; font-family: 'Bebas Neue', sans-serif; font-size: 1.15rem; letter-spacing: 0.04em; }

.group-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.2rem;
}
.group-checkbox {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s;
}
.group-checkbox:hover { background: var(--goal-yellow); }
.group-checkbox input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--grass); }
.group-checkbox:has(input:checked) {
  background: var(--grass);
  color: var(--chalk);
}

.user-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.3rem;
}
.group-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--grass);
  color: var(--chalk);
  font-family: 'Bungee', sans-serif;
  font-size: 0.62rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.15s;
}
.group-tag:hover { background: var(--whistle-red); }
.group-tag .group-tag-x {
  opacity: 0.7;
  font-size: 0.7rem;
}
.group-tag-add {
  background: var(--bg-paper);
  color: var(--ink-soft);
  border-style: dashed;
}
.group-tag-add:hover { background: var(--goal-yellow); color: var(--ink); }

.user-creator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.user-creator .full { grid-column: 1 / -1; }

.password-display {
  background: var(--ink);
  color: var(--goal-yellow);
  border: 2px solid var(--gold);
  border-radius: 6px;
  padding: 0.7rem 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  text-align: center;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  margin-top: 0.6rem;
  word-break: break-all;
}

/* ==== Zé Bolão tribute modal ==== */
.tribute-modal {
  background: linear-gradient(135deg, var(--ze-purple) 0%, var(--ink) 100%);
  color: var(--chalk);
  text-align: center;
  border-color: var(--gold);
  box-shadow: 8px 8px 0 var(--gold);
}
.tribute-modal .modal-header {
  background: rgba(0,0,0,0.3);
  border-bottom-color: var(--gold);
}
.tribute-modal .modal-footer {
  background: rgba(0,0,0,0.2);
  border-top-color: var(--gold);
}
.tribute-portrait {
  width: 160px;
  height: 160px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--bg-paper);
  border: 4px solid var(--gold);
  display: grid;
  place-items: center;
  font-size: 4.5rem;
  box-shadow: 0 0 0 6px var(--ink), 0 0 30px rgba(252,196,25,0.5);
  position: relative;
  animation: portrait-glow 3s ease-in-out infinite;
  overflow: hidden;
}
.tribute-portrait .tribute-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  z-index: 1;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
  transform: translateZ(0);
  backface-visibility: hidden;
  filter: contrast(1.04) saturate(1.05);
}
.tribute-portrait .tribute-fallback {
  position: relative;
  z-index: 0;
}
@keyframes portrait-glow {
  0%, 100% { box-shadow: 0 0 0 6px var(--ink), 0 0 25px rgba(252,196,25,0.4); }
  50%      { box-shadow: 0 0 0 6px var(--ink), 0 0 40px rgba(252,196,25,0.7); }
}
/* tribute pseudo removido — modal de tributo descontinuado */
@keyframes dove-fly {
  0%, 100% { transform: translateY(0) rotate(-10deg); }
  50%      { transform: translateY(-8px) rotate(10deg); }
}
.tribute-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.8rem;
  letter-spacing: 0.04em;
  color: var(--goal-yellow);
}
.tribute-tag {
  font-family: 'Bungee', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.tribute-text {
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 auto 0.5rem;
  max-width: 380px;
  opacity: 0.95;
}
.tribute-quote {
  font-style: italic;
  font-size: 1.05rem;
  margin: 1.2rem auto 0.5rem;
  max-width: 320px;
  padding: 0.7rem 1rem;
  border-left: 3px solid var(--goal-yellow);
  border-right: 3px solid var(--goal-yellow);
  color: var(--chalk);
}
.tribute-dates {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--gold);
  margin-top: 0.5rem;
  letter-spacing: 0.1em;
}

/* ==== Confetti easter — secret hover ==== */
.brand-mark:hover { animation-duration: 0.5s; cursor: pointer; }

/* ==== Whistle effect on page load ==== */
.kickoff-overlay {
  position: fixed;
  inset: 0;
  background: var(--ink);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  animation: kickoff 1.4s ease forwards;
  pointer-events: none;
}
@keyframes kickoff {
  0%   { opacity: 1; }
  60%  { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}
.kickoff-ball {
  font-size: 4rem;
  animation: kickoff-bounce 1.2s ease-out;
}
@keyframes kickoff-bounce {
  0%   { transform: translateX(-200px) rotate(0); }
  100% { transform: translateX(200px) rotate(720deg); }
}
.kickoff-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  color: var(--goal-yellow);
  letter-spacing: 0.1em;
  animation: kickoff-text-fade 1.2s ease forwards;
}
@keyframes kickoff-text-fade {
  0%   { opacity: 0; transform: translateY(20px); }
  40%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-20px); }
}

/* ==== Footer ==== */
footer.site-foot {
  background: var(--ink);
  color: var(--chalk);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  border-top: 4px solid var(--gold);
  position: relative;
  z-index: 2;
}
footer.site-foot .foot-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  color: var(--goal-yellow);
  letter-spacing: 0.06em;
  cursor: pointer;
}
footer.site-foot .foot-name:hover { text-decoration: underline; }
footer.site-foot .foot-sub {
  opacity: 0.7;
  font-size: 0.75rem;
  margin-top: 0.3rem;
  letter-spacing: 0.1em;
  font-family: 'Bungee', sans-serif;
}

/* ==== Toast ==== */
.toast-stack {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1100;
  display: grid;
  gap: 0.5rem;
}
.toast {
  background: var(--ink);
  color: var(--chalk);
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  border: 2px solid var(--gold);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 4px 4px 0 var(--gold);
  animation: toast-in 0.3s ease, toast-out 0.3s 3s ease forwards;
}
.toast.error { border-color: var(--whistle-red); box-shadow: 4px 4px 0 var(--whistle-red); }
.toast.success { border-color: var(--grass-light); box-shadow: 4px 4px 0 var(--grass-light); }
@keyframes toast-in  { from { transform: translateX(120%); } to { transform: translateX(0); } }
@keyframes toast-out { to   { transform: translateX(120%); opacity: 0; } }

/* ==== Mobile (≤ 720px) ==== */
@media (max-width: 720px) {
  /* Header: mais compacto */
  header.hero { padding: 1rem 1rem 1.5rem; border-bottom-width: 3px; }
  header.hero::after { width: 240px; height: 240px; }
  .hero-inner { gap: 0.6rem; }
  .brand { gap: 0.6rem; }
  .brand-mark { width: 60px; height: 60px; font-size: 1.9rem; }
  .brand-mark::after {
    font-size: 0.5rem;
    padding: 0.1rem 0.3rem;
    bottom: -3px;
    right: -6px;
    border-width: 1.5px;
  }
  .brand-text h1 { font-size: 1.9rem; line-height: 1; }
  .brand-text .subtitle { font-size: 0.62rem; letter-spacing: 0.12em; }
  .user-area { gap: 0.4rem; flex-wrap: wrap; width: 100%; }
  .user-pill {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
    box-shadow: 2px 2px 0 var(--ink);
  }
  .user-avatar { width: 22px; height: 22px; font-size: 0.7rem; }
  .admin-pill { font-size: 0.6rem; padding: 0.1rem 0.4rem; }
  .btn-sm { font-size: 0.78rem; padding: 0.3rem 0.6rem; box-shadow: 2px 2px 0 var(--ink); }

  /* Tabs: compactas — só ícone quando inativo, ícone + label quando ativo */
  nav.tabs {
    padding: 0.5rem 0.6rem;
    flex-direction: column-reverse; /* switcher acima, tabs abaixo */
    align-items: stretch;
    gap: 0.45rem;
  }
  #groupSwitcherMount {
    display: flex;
    justify-content: flex-end;
  }
  .group-switcher-menu { right: 0; left: auto; }
  .tab-list { gap: 0.3rem; justify-content: space-around; }
  .tab {
    font-size: 0.95rem;
    padding: 0.45rem 0.6rem;
    min-width: 42px;
    min-height: 42px;
    justify-content: center;
    gap: 0.25rem;
  }
  .tab .tab-icon { font-size: 1.2rem; }
  .tab:not(.active) .tab-label { display: none; }
  .tab.active {
    padding: 0.45rem 0.85rem;
  }

  /* Main */
  main { padding: 1rem 0.85rem 3rem; }
  .section-title { font-size: 1.55rem; }
  .section-sub { font-size: 0.85rem; margin-bottom: 1rem; }

  /* Group cards */
  .groups-grid { gap: 1rem; }
  .group-card { font-size: 0.9rem; box-shadow: 4px 4px 0 var(--ink); }
  .group-card:hover { box-shadow: 4px 4px 0 var(--ink); transform: none; }
  .group-header { padding: 0.6rem 0.85rem; }
  .group-name { font-size: 1.55rem; }
  .group-badge { font-size: 0.65rem; padding: 0.15rem 0.4rem; }
  .group-teams { padding: 0.6rem 0.85rem; }
  .group-team { font-size: 0.88rem; }
  .group-matches { padding: 0.4rem; gap: 0.45rem; }

  /* Match rows: termos podem ser longos */
  .match-row { padding: 0.5rem 0.6rem; }
  .match-row-inner { gap: 0.35rem; }
  .match-side { font-size: 0.78rem; gap: 0.3rem; min-width: 0; }
  .match-side span:not(.flag) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .match-side .flag { font-size: 1rem; }
  .match-score { font-size: 0.78rem; min-width: 42px; padding: 0.15rem 0.35rem; }
  .match-kickoff { font-size: 0.66rem; margin-top: 0.25rem; }

  /* Knockout */
  .ko-match { padding: 0.6rem 0.7rem; box-shadow: 2px 2px 0 var(--ink); }
  .ko-match:hover { transform: none; box-shadow: 2px 2px 0 var(--ink); }
  .ko-side { font-size: 0.82rem; min-width: 0; }
  .ko-side > span:not(.flag) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Modal */
  .modal-backdrop { padding: 0.5rem; }
  .modal {
    max-width: 100%;
    max-height: 95vh;
    box-shadow: 4px 4px 0 var(--ink);
  }
  .modal-header { padding: 0.7rem 1rem; }
  .modal-header h3 { font-size: 1.25rem; }
  .modal-body { padding: 1rem; }
  .modal-footer { padding: 0.7rem 1rem; gap: 0.4rem; }
  .modal-footer .btn { flex: 1 1 auto; text-align: center; }

  /* Score input area: mais compacto */
  .score-input-row { padding: 0.75rem 0.5rem; gap: 0.4rem; }
  .team-block .name { font-size: 1rem; }
  .team-block .flag { font-size: 1.8rem; }
  .score-input { width: 56px; height: 56px; font-size: 1.5rem; }
  .score-divider { font-size: 1.6rem; }
  .extras-grid { grid-template-columns: 1fr; gap: 0.7rem; }

  /* Kickoff banner */
  .kickoff-banner { padding: 0.55rem 0.75rem; font-size: 0.8rem; }

  /* Custom select */
  .cs-trigger { padding: 0.65rem 0.75rem; font-size: 0.9rem; }
  .cs-option { font-size: 0.88rem; padding: 0.6rem 0.7rem; }

  /* Others' predictions — flex com wrap pra acomodar nomes longos */
  .others-preds-list { max-height: 220px; }
  .other-pred-row,
  .other-pred-row.empty {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    padding: 0.45rem 0.6rem;
    grid-template-columns: none;
  }
  .other-pred-row .user-avatar { flex: 0 0 auto; }
  .other-pred-row .dname {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem;
  }
  .other-pred-row .other-pred-score,
  .other-pred-row .other-pred-first { flex: 0 0 auto; }
  .other-pred-row .other-pred-status {
    flex: 1 1 100%;
    font-size: 0.75rem;
    padding-left: calc(26px + 0.5rem); /* alinhar com nome */
  }

  /* Ranking: layout em cartão */
  .ranking-table thead { display: none; }
  .ranking-table,
  .ranking-table tbody,
  .ranking-row,
  .ranking-row td {
    display: block;
    width: 100%;
  }
  .ranking-table { border-spacing: 0; }
  .ranking-row {
    margin-bottom: 0.6rem;
    border: 2px solid var(--ink);
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    display: grid !important;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.4rem 0.6rem;
    align-items: center;
    box-shadow: 3px 3px 0 var(--ink);
  }
  .ranking-row td { padding: 0; border: none !important; border-radius: 0 !important; }
  .ranking-row td:nth-child(1) { grid-column: 1; grid-row: 1 / 3; }
  .ranking-row td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .ranking-row td:nth-child(5) { grid-column: 3; grid-row: 1 / 3; text-align: right; align-self: center; }
  .ranking-row td:nth-child(3),
  .ranking-row td:nth-child(4) {
    display: block;
    grid-column: 2 / 4;
    grid-row: 2;
    font-size: 0.72rem;
    color: var(--muted);
  }
  .ranking-row td:nth-child(3) { grid-column: 2; }
  .ranking-row td:nth-child(4) { grid-column: 2 / 4; grid-row: 3; }
  .ranking-row .rank-pos { font-size: 1.5rem; width: 50px; }
  .ranking-row .rank-pts { padding: 0.3rem 0.55rem; font-size: 0.95rem; min-width: 50px; }
  .ranking-row .score-chip { font-size: 0.68rem; padding: 0.1rem 0.35rem; margin-right: 0.2rem; }

  /* My predictions */
  .pred-card { grid-template-columns: 1fr auto; padding: 0.65rem 0.8rem; }
  .pred-card-pts { padding: 0.25rem 0.55rem; font-size: 0.82rem; }

  /* Admin user creator */
  .user-creator { grid-template-columns: 1fr; }
  .user-row { grid-template-columns: 1fr; }
  .user-row-actions { justify-content: flex-start; }
  .user-admin-card { padding: 1rem; }
  .user-admin-card h3 { font-size: 1.2rem; }

  /* Metrics */
  .metrics-info { padding: 1rem; }
  .metrics-info h3 { font-size: 1.35rem; }
  .points-rules { padding: 1.1rem; }
  .points-rules h3 { font-size: 1.35rem; }

  /* Goal stamp */
  .goal-stamp { font-size: 2.2rem; padding: 0.7rem 1.5rem; }

  /* Login */
  .login-card { padding: 1.5rem 1.25rem; box-shadow: 5px 5px 0 var(--ink); }
  .login-shield { width: 110px; height: 110px; }
  .login-title { font-size: 2.2rem; }
  .pitch-deco { font-size: 70px; opacity: 0.04; }

  /* Toasts */
  .toast-stack { bottom: 0.75rem; right: 0.75rem; left: 0.75rem; }
  .toast { font-size: 0.85rem; padding: 0.6rem 0.9rem; }
}

/* ============================================================
   Bolão selector — main nav entry point (left side)
   ============================================================ */
.bolao-selector {
  position: relative;
}
.bolao-selector-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--grass);
  color: var(--chalk);
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  padding: 0.45rem 0.9rem 0.45rem 0.7rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: all 0.15s ease;
  position: relative;
  min-width: 200px;
}
.bolao-selector-btn:hover {
  background: var(--grass-light);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}
.bolao-selector.is-managing .bolao-selector-btn {
  background: var(--ze-purple);
  box-shadow: 3px 3px 0 var(--gold);
}
.bolao-icon {
  font-size: 1.3rem;
  line-height: 1;
}
.bolao-selector-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  flex: 1;
  min-width: 0;
}
.bolao-selector-hint {
  font-family: 'Bungee', sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  color: var(--goal-yellow);
  line-height: 1;
  margin-bottom: 2px;
}
.bolao-selector-name {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.bolao-selector-btn .cs-arrow {
  font-size: 0.85rem;
  transition: transform 0.18s ease;
  opacity: 0.9;
}
.bolao-selector.open .cs-arrow {
  transform: rotate(180deg);
}
.bolao-badge {
  background: var(--whistle-red);
  color: var(--chalk);
  font-size: 0.7rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  border-radius: 10px;
  padding: 0.1rem 0.45rem;
  min-width: 18px;
  text-align: center;
  border: 1.5px solid var(--ink);
  line-height: 1.2;
}
.bolao-badge.inline {
  margin-left: auto;
}
.bolao-selector-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 280px;
  max-width: 360px;
  background: var(--bg-card);
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 0.4rem;
  z-index: 50;
  display: none;
  max-height: 70vh;
  overflow-y: auto;
}
.bolao-selector.open .bolao-selector-menu { display: block; }
.bolao-menu-section { display: flex; flex-direction: column; gap: 2px; }
.bolao-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  transition: background 0.12s ease;
}
.bolao-option:hover { background: var(--goal-yellow); }
.bolao-option.selected {
  background: var(--grass);
  color: var(--chalk);
}
.bolao-option.selected:hover { background: var(--grass-light); }
.bolao-option-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bolao-tag-owner {
  background: var(--gold);
  color: var(--ink);
  font-family: 'Bungee', sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  border: 1.5px solid var(--ink);
}
.bolao-option.selected .bolao-tag-owner {
  background: var(--goal-yellow);
}
.bolao-divider {
  height: 1px;
  background: var(--ink);
  opacity: 0.15;
  margin: 0.35rem 0.3rem;
}
.bolao-option.manage {
  background: rgba(107, 45, 138, 0.08);
}
.bolao-option.manage:hover { background: var(--ze-purple); color: var(--chalk); }
.bolao-option.manage.selected {
  background: var(--ze-purple);
  color: var(--chalk);
}

/* ============================================================
   Jogos panel — Grupos / Mata-Mata toggle
   ============================================================ */
.jogos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}
.jogos-context-bolao {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  color: var(--grass);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.jogos-mode-toggle {
  display: inline-flex;
  background: var(--bg-card);
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  padding: 3px;
  box-shadow: 3px 3px 0 var(--ink);
  gap: 2px;
}
.jogos-mode-btn {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.95rem;
  border: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.15s ease;
}
.jogos-mode-btn:hover { background: var(--goal-yellow); }
.jogos-mode-btn.active {
  background: var(--ink);
  color: var(--goal-yellow);
}

/* ============================================================
   v2 additions — Google login, live state, events, bolões/invites
   ============================================================ */

/* Tab badge (invitations count) */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  background: var(--whistle-red);
  color: var(--chalk);
  border-radius: 9px;
  border: 1.5px solid var(--ink);
}

/* Legacy account pill (admins migrating to Google) */
.legacy-pill {
  background: var(--muted);
  color: var(--chalk);
  font-family: 'Bungee', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  border: 1.5px solid var(--ink);
  vertical-align: middle;
}
.admin-pill.mini {
  font-size: 0.55rem;
  padding: 0.05rem 0.3rem;
}

/* Live badge (AO VIVO + minuto) */
.live-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--whistle-red);
  color: var(--chalk);
  font-family: 'Bungee', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  z-index: 2;
}
.live-dot {
  width: 8px;
  height: 8px;
  background: var(--chalk);
  border-radius: 50%;
  display: inline-block;
  animation: live-pulse 1.2s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.match-row.is-live,
.ko-match.is-live {
  border-color: var(--whistle-red);
  box-shadow: 4px 4px 0 var(--whistle-red);
}
.match-score.is-live {
  color: var(--whistle-red);
}

/* Penalty score formatting */
.pen-score {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.85em;
}

/* Match event chips (small row below match info) */
.match-event-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px dashed rgba(20, 17, 15, 0.15);
}
.event-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  background: var(--bg-paper);
  border: 1px solid var(--line);
  font-weight: 600;
}
.event-chip.goal { background: rgba(252, 196, 25, 0.18); }
.event-chip.red  { background: rgba(193, 39, 45, 0.15); color: var(--whistle-red); }

/* Live banner inside match modal */
.live-banner {
  background: var(--ink);
  color: var(--chalk);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1rem;
  box-shadow: 4px 4px 0 var(--whistle-red);
}
.live-banner.finished { box-shadow: 4px 4px 0 var(--gold); }
.live-banner-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Bungee', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.live-banner-min {
  margin-left: auto;
  background: var(--whistle-red);
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  color: var(--chalk);
  font-size: 0.7rem;
}
.live-banner.finished .live-banner-min {
  background: var(--grass);
}
.live-banner-score {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: 'Bebas Neue', sans-serif;
}
.lb-team {
  flex: 1;
  font-size: 1.1rem;
  text-align: right;
}
.lb-team.away { text-align: left; }
.lb-num {
  font-size: 2.4rem;
  line-height: 1;
  color: var(--goal-yellow);
  min-width: 1.5ch;
  text-align: center;
}
.lb-sep {
  color: var(--muted);
  font-size: 1.6rem;
}
.live-banner-pens {
  margin-top: 0.7rem;
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
}
.live-banner-pens .pen-label {
  font-family: 'Bungee', sans-serif;
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.08em;
}
.live-banner-pens strong { color: var(--goal-yellow); font-size: 1.7rem; }

/* Event timeline inside modal */
.event-timeline {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--muted);
}
.event-timeline-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--grass);
}
.event-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.event-row {
  display: grid;
  grid-template-columns: 48px 28px 1fr;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  padding: 0.3rem 0.4rem;
  border-radius: 6px;
  background: var(--bg-paper);
  border: 1px solid rgba(20, 17, 15, 0.08);
}
.event-row.type-yellow_card { background: rgba(252, 196, 25, 0.14); }
.event-row.type-red_card, .event-row.type-second_yellow { background: rgba(193, 39, 45, 0.14); }
.event-row.type-goal, .event-row.type-penalty_goal { background: rgba(29, 91, 58, 0.12); }
.event-row.type-own_goal { background: rgba(107, 45, 138, 0.14); }
.event-row.away .event-text { text-align: left; }
.event-minute {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--ink);
  text-align: right;
}
.event-icon { font-size: 1.1rem; text-align: center; }
.event-text { color: var(--ink-soft); }
.event-team { margin-right: 0.3rem; }

/* Others-preds secret state */
.other-pred-row.secret {
  opacity: 0.85;
}
.other-pred-row.secret .other-pred-status {
  color: var(--gold);
  font-style: italic;
}
.secret-hint {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 600;
  background: rgba(244, 167, 43, 0.15);
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
  border: 1px solid var(--gold);
}

/* Bolões panel */
.invites-card {
  background: linear-gradient(135deg, var(--goal-yellow) 0%, var(--gold) 100%);
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  box-shadow: 4px 4px 0 var(--ink);
}
.invites-card h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
}
.invites-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.invite-row {
  background: var(--bg-card);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.invite-info { flex: 1; min-width: 180px; }
.invite-group { font-weight: 700; font-size: 1rem; }
.invite-by { font-size: 0.78rem; color: var(--muted); margin-top: 0.15rem; }
.invite-inviter { font-weight: 700; }
.invite-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.bolaos-create {
  background: var(--bg-card);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  box-shadow: 4px 4px 0 var(--grass);
}
.bolaos-create h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}
.bolaos-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.bolao-card {
  background: var(--bg-card);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  box-shadow: 3px 3px 0 var(--ink);
}
.bolao-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}
.bolao-card-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}
.bolao-card-meta { font-size: 0.78rem; color: var(--muted); margin-top: 0.1rem; }
.bolao-card-actions { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.bolao-card-members {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--muted);
}
.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  background: var(--bg-paper);
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  padding: 0.15rem 0.5rem 0.15rem 0.15rem;
}
.member-chip > span:first-child,
.member-chip > img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.7rem;
  overflow: hidden;
  object-fit: cover;
}

/* Invite modal */
.invite-results {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 320px;
  overflow-y: auto;
  margin-top: 0.5rem;
}
.invite-result {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  background: var(--bg-paper);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
}
.invite-result-info { flex: 1; }
.invite-result .dname { font-weight: 700; font-size: 0.95rem; }
.invite-result .email-hint { font-size: 0.75rem; color: var(--muted); }

/* Responsiveness */
@media (max-width: 480px) {
  .lb-team { font-size: 0.85rem; }
  .lb-num { font-size: 1.8rem; }
  .event-row { grid-template-columns: 40px 22px 1fr; font-size: 0.8rem; }
  .live-badge { font-size: 0.6rem; padding: 0.15rem 0.4rem; }
  .bolaos-list { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .brand-text h1 { font-size: 1.65rem; }
  .brand-text .subtitle { font-size: 0.58rem; }
  .brand-mark { width: 52px; height: 52px; font-size: 1.6rem; }
  .tab { padding: 0.4rem 0.55rem; min-width: 38px; }
  .tab.active { padding: 0.4rem 0.7rem; }
  .tab .tab-icon { font-size: 1.1rem; }
  .tab .tab-label { font-size: 0.88rem; }
  .group-name { font-size: 1.4rem; }
  .match-side { font-size: 0.74rem; }
  .ko-side { font-size: 0.78rem; }
  .login-title { font-size: 1.9rem; }
}
