/* =========================================================
   Modo jogo — Qadras
   Usa os mesmos tokens do app (verde/claro, radius 22, shadow-1).
   Nada de tema proprio: o modo jogo e uma tela do app, nao um app a parte.
   ========================================================= */

/* ── Card da partida na home ──────────────────────────────
   Ocupa a vaga do antigo pulso de disponibilidade e segue a
   mesma caixa: margin 22/16, min-height 68, radius 22. */
.game-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 68px;
  margin: 22px 16px 0;
  padding: 11px 13px;
  overflow: hidden;
  border: 1px solid var(--pq-line);
  border-radius: 22px;
  background: var(--pq-panel);
  box-shadow: var(--pq-shadow-1);
  color: var(--pq-ink);
  text-decoration: none;
}

.game-card:active {
  transform: translateY(1px);
}

.game-card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--pq-brand);
  color: #fff;
}

.game-card__icon .ic {
  width: 20px;
  height: 20px;
}

.game-card__info {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.game-card__label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--pq-brand-strong);
  font-size: 9.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.game-card__title {
  overflow: hidden;
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-card__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  margin-top: 2px;
  color: var(--pq-muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-card__countdown {
  flex-shrink: 0;
  text-align: right;
  font-size: 17px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.game-card__countdown small {
  display: block;
  margin-top: 2px;
  color: var(--pq-muted);
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.game-card__chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--pq-brand-strong);
}

/* Em andamento: unica variante preenchida, para chamar atencao sem sair da marca */
.game-card--live {
  border-color: transparent;
  background: linear-gradient(135deg, var(--pq-brand-strong), var(--pq-brand));
  color: #fff;
}

.game-card--live .game-card__icon {
  background: rgba(255, 255, 255, .22);
}

.game-card--live .game-card__label,
.game-card--live .game-card__countdown small {
  color: rgba(255, 255, 255, .82);
}

.game-card--live .game-card__meta {
  color: rgba(255, 255, 255, .88);
}

.game-card__dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: currentColor;
  animation: gameCardDot 1.4s ease-in-out infinite;
}

.game-card__score {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.game-card__progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, .25);
}

.game-card__progress span {
  display: block;
  height: 100%;
  background: #fff;
  transition: width 1s linear;
}

/* Proxima partida: laranja = ainda vai acontecer. Verde fica reservado ao ao-vivo.
   Alfas mais altos que os do verde: o laranja e mais claro e .game-card__meta tem 9.5px. */
.game-card--next {
  border-color: transparent;
  background: linear-gradient(135deg, var(--pq-amber-strong, #9a3412), var(--pq-amber, #ea580c));
  color: #fff;
}

.game-card--next .game-card__icon {
  background: rgba(255, 255, 255, .22);
}

.game-card--next .game-card__label,
.game-card--next .game-card__countdown small {
  color: rgba(255, 255, 255, .88);
}

.game-card--next .game-card__meta {
  color: rgba(255, 255, 255, .92);
}

/* Encerrada: neutra, so convida a avaliar */
.game-card--done .game-card__icon {
  background: var(--pq-signal);
  color: var(--pq-brand-deep);
}

.game-card--done .game-card__label {
  color: var(--pq-muted);
}

@keyframes gameCardDot {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

@media (prefers-reduced-motion: reduce) {
  .game-card__dot { animation: none; }
}

/* ── Tela do jogo ─────────────────────────────────────────
   Pagina normal dentro da rota (nao e overlay fixo). */
.game-page {
  padding-bottom: 24px;
  background: var(--pq-app-bg);
}

.game-hero {
  position: relative;
  height: 190px;
  overflow: hidden;
  background: #dce5dd;
}

.game-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-hero__overlay {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 30px 16px 14px;
  background: linear-gradient(to top, rgba(9, 40, 25, .88), rgba(9, 40, 25, 0));
  color: #fff;
}

.game-hero__title {
  overflow: hidden;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-hero__sub {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  margin-top: 3px;
  font-size: 11px;
  opacity: .9;
}

.game-hero__sub .ic {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.game-hero__sub span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Passos da partida — vive dentro de .game-content, que ja tem padding lateral */
.game-phase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 14px 0 0;
}

/* Indicador de etapa, nao botao.

   Antes era pilula com borda, fundo e raio 999px — copia visual exata de
   .game-tabs__tab, que E clicavel. As duas fileiras ficavam empilhadas na
   mesma tela: tres pilulas que navegam em cima de tres que nao fazem nada.
   Agora e ponto + rotulo com uma linha ligando, que e vocabulario de
   progresso e ninguem tenta apertar. */
.game-phase__step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 2px 0;
  background: none;
  color: var(--pq-muted);
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* A linha que liga uma etapa a outra. */
.game-phase__step:not(:last-child)::after {
  position: absolute;
  top: 8px;
  left: calc(50% + 12px);
  width: calc(100% - 24px);
  height: 2px;
  border-radius: 2px;
  background: var(--pq-line);
  content: '';
}

.game-phase__step.done:not(:last-child)::after {
  background: var(--pq-brand);
}

.game-phase__step i {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border: 2px solid var(--pq-line-strong, #ccd5cb);
  border-radius: 50%;
  background: var(--pq-panel);
}

.game-phase__step.done { color: var(--pq-brand-deep); }

.game-phase__step.done i {
  border-color: var(--pq-brand);
  background: var(--pq-brand);
}

.game-phase__step.active { color: var(--pq-brand-strong); }

.game-phase__step.active i {
  border-color: var(--pq-brand);
  background: var(--pq-brand);
  box-shadow: 0 0 0 4px var(--pq-signal-soft);
}

.game-content {
  padding: 0 16px;
}

.game-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 0 10px;
  font-size: 13.5px;
  font-weight: 900;
}

.game-section-title span {
  color: var(--pq-muted);
  font-size: 10px;
  font-weight: 700;
}

/* Contagem regressiva */
.game-countdown {
  margin-top: 16px;
  padding: 20px 16px;
  border: 1px solid var(--pq-line);
  border-radius: 22px;
  background: var(--pq-panel);
  box-shadow: var(--pq-shadow-1);
  text-align: center;
}

.game-countdown__label {
  color: var(--pq-brand-strong);
  font-size: 9.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.game-countdown__time {
  margin-top: 6px;
  color: var(--pq-ink);
  font-size: 44px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.game-countdown__unit {
  margin-top: 4px;
  color: var(--pq-muted);
  font-size: 11px;
  font-weight: 700;
}

/* Grade de informacoes */
.game-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.game-info-item {
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid var(--pq-line);
  border-radius: 18px;
  background: var(--pq-panel);
}

.game-info-item__label {
  color: var(--pq-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.game-info-item__value {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
}

.game-info-item__value .ic {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--pq-brand-strong);
}

.game-info-item__value span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Botoes */
.game-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.game-actions > .game-btn:only-child {
  grid-column: 1 / -1;
}

.game-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 850;
  cursor: pointer;
}

.game-btn .ic {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.game-btn:active {
  transform: translateY(1px);
}

.game-btn--primary {
  background: var(--pq-brand-strong);
  color: #fff;
}

.game-btn--outline {
  border-color: var(--pq-line);
  background: var(--pq-panel);
  color: var(--pq-brand-deep);
}

.game-btn--danger {
  background: #e85d75;
  color: #fff;
}

.game-btn[disabled] {
  opacity: .55;
}

/* Jogadores */
.game-players {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-player {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid var(--pq-line);
  border-radius: 18px;
  background: var(--pq-panel);
}

.game-player__avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--pq-signal-soft);
  color: var(--pq-brand-deep);
  font-size: 13px;
  font-weight: 900;
}

.game-player__info {
  min-width: 0;
}

.game-player__name {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-player__meta {
  display: flex;
  gap: 6px;
  overflow: hidden;
  margin-top: 2px;
  color: var(--pq-muted);
  font-size: 9.5px;
  white-space: nowrap;
}

.game-player__badge {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--pq-signal-soft);
  color: var(--pq-brand-deep);
  font-size: 8.5px;
  font-weight: 900;
  text-transform: uppercase;
}

/* Times */
.game-teams {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.game-team-card {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--pq-line);
  border-radius: 18px;
  background: var(--pq-panel);
}

.game-team-card__header {
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 2px solid var(--pq-line);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.game-team-card__header.team-a {
  border-bottom-color: var(--pq-brand);
  color: var(--pq-brand-deep);
}

.game-team-card__header.team-b {
  border-bottom-color: var(--pq-team-b);
  color: var(--pq-team-b);
}

.game-team-card__player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  font-size: 11.5px;
  font-weight: 700;
}

.game-team-card__player > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-team-card__position {
  flex-shrink: 0;
  color: var(--pq-muted);
  font-size: 9px;
  font-weight: 700;
}

.game-team-card__empty {
  padding: 4px 0;
  color: var(--pq-muted);
  font-size: 10.5px;
}

/* Sortear times */
.game-shuffle {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin-top: 10px;
  padding: 11px 13px;
  border: 1px dashed var(--pq-line-strong, #ccd5cb);
  border-radius: 22px;
  background: var(--pq-signal-soft);
  color: var(--pq-ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.game-shuffle:active {
  transform: translateY(1px);
}

.game-shuffle__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--pq-brand);
  color: #fff;
}

.game-shuffle__icon .ic {
  width: 20px;
  height: 20px;
}

.game-shuffle > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.game-shuffle strong {
  font-size: 12.5px;
  font-weight: 900;
}

.game-shuffle small {
  margin-top: 2px;
  color: var(--pq-muted);
  font-size: 9.5px;
}

.game-shuffle > .ic {
  width: 18px;
  height: 18px;
  color: var(--pq-brand-strong);
}

/* Placar */
.game-scoreboard {
  margin-top: 16px;
  padding: 18px 16px;
  border: 1px solid transparent;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--pq-brand-deep), var(--pq-brand-strong));
  color: #fff;
  text-align: center;
}

.game-scoreboard__live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  font-size: 8.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.game-scoreboard__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: gameCardDot 1.4s ease-in-out infinite;
}

.game-scoreboard__timer {
  margin-top: 8px;
  font-size: 40px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.game-scoreboard__half {
  margin-top: 3px;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  opacity: .8;
}

.game-scoreboard__scores {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .18);
}

.game-scoreboard__team {
  min-width: 0;
}

.game-scoreboard__team-name {
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: .85;
}

.game-scoreboard__team-score {
  margin-top: 2px;
  font-size: 38px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.game-scoreboard__divider {
  font-size: 18px;
  font-weight: 700;
  opacity: .55;
}

/* Botoes de gol */
.game-score-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.game-score-btn {
  display: flex;
  min-width: 0;
  min-height: 60px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid var(--pq-line);
  border-radius: 18px;
  background: var(--pq-panel);
  font-family: inherit;
  cursor: pointer;
}

.game-score-btn b {
  font-size: 17px;
  font-weight: 900;
}

.game-score-btn small {
  overflow: hidden;
  max-width: 100%;
  padding: 0 8px;
  color: var(--pq-muted);
  font-size: 9.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-score-btn:active {
  transform: translateY(1px);
}

.game-score-btn--a {
  border-color: var(--pq-signal);
  background: var(--pq-signal-soft);
}

.game-score-btn--a b {
  color: var(--pq-brand-deep);
}

.game-score-btn--b {
  border-color: #f5e2b8;
  background: #fdf6e6;
}

.game-score-btn--b b {
  color: #8a6008;
}

/* Eventos */
.game-events {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-event {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid var(--pq-line);
  border-radius: 16px;
  background: var(--pq-panel);
  font-size: 11.5px;
  font-weight: 700;
}

.game-event__icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--pq-muted);
}

.game-event__icon.goal-a { color: var(--pq-brand); }
.game-event__icon.goal-b { color: var(--pq-gold, #e4a11b); }
.game-event__icon.yellow { color: #e4a11b; }
.game-event__icon.red { color: #e85d75; }

.game-empty {
  padding: 14px;
  border: 1px dashed var(--pq-line-strong, #ccd5cb);
  border-radius: 16px;
  color: var(--pq-muted);
  font-size: 11px;
  text-align: center;
}

/* Resultado */
.game-result {
  margin-top: 16px;
  padding: 22px 16px;
  border: 1px solid var(--pq-line);
  border-radius: 22px;
  background: var(--pq-panel);
  box-shadow: var(--pq-shadow-1);
  text-align: center;
}

.game-result__winner {
  color: var(--pq-brand-strong);
  font-size: 9.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.game-result__score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 42px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.game-result__score .team-a { color: var(--pq-brand-deep); }
.game-result__score .team-b { color: #8a6008; }

.game-result__x {
  color: var(--pq-muted);
  font-size: 22px;
  font-weight: 700;
}

.game-result__mvp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--pq-signal-soft);
  color: var(--pq-brand-deep);
  font-size: 11px;
  font-weight: 850;
}

.game-result__mvp .ic {
  width: 15px;
  height: 15px;
}

/* Avaliacao */
.game-rating {
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid var(--pq-line);
  border-radius: 22px;
  background: var(--pq-panel);
}

.game-rating__title {
  font-size: 12.5px;
  font-weight: 900;
}

.game-rating__sub {
  margin-top: 2px;
  color: var(--pq-muted);
  font-size: 10px;
}

.game-rating__stars {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.game-rating__star {
  border: none;
  background: none;
  color: var(--pq-line-strong, #ccd5cb);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.game-rating__star.active {
  color: var(--pq-gold, #e4a11b);
}

/* Fotos */
.game-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.game-photo-item {
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 16px;
  background: var(--pq-surface-2, #f3f5f1);
}

.game-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-photo-add {
  display: grid;
  place-items: center;
  border: 1px dashed var(--pq-line-strong, #ccd5cb);
  background: var(--pq-panel);
  color: var(--pq-brand-strong);
  cursor: pointer;
}

.game-photo-add .ic {
  width: 22px;
  height: 22px;
}

/* ── Abas da partida ────────────────────────────────────── */
.game-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 14px 16px 0;
}

.game-tabs__tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 7px 6px;
  border: 1px solid var(--pq-line);
  border-radius: 999px;
  background: var(--pq-panel);
  color: var(--pq-muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.game-tabs__tab .ic {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.game-tabs__tab:active { transform: translateY(1px); }

.game-tabs__tab.is-active {
  border-color: transparent;
  background: var(--pq-brand);
  color: #fff;
}

.game-tabpanel[hidden] { display: none; }

/* ── Relogio grande (aba Cronometro) ────────────────────── */
.game-bigclock {
  margin-top: 12px;
  padding: 18px 16px 20px;
  border: 1px solid var(--pq-line);
  border-radius: 22px;
  background: var(--pq-panel);
  box-shadow: var(--pq-shadow-1);
  text-align: center;
}

.game-bigclock__label {
  color: var(--pq-brand-strong);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Anel de progresso. conic-gradient e nao SVG: e a mesma tecnica do donut
   do financeiro do gerente, dirigida por variavel CSS, e nao precisa de
   viewBox nem de calcular circunferencia. */
.game-bigclock__dial {
  position: relative;
  display: grid;
  width: min(170px, 46vw);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  margin: 14px auto 0;
  /* Trilho em mint, nao na linha cinza: a 0% um anel cinza-claro sumia e
     parecia so um circulo vazio de enfeite. */
  background: conic-gradient(
    var(--pq-brand) calc(var(--game-progress, 0) * 1%),
    var(--pq-signal) 0
  );
  transition: background .3s linear;
}

.game-bigclock__face {
  display: grid;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  align-content: center;
  border-radius: 50%;
  background: var(--pq-panel);
}

/* Ultimos 60s: o anel inteiro avisa, nao so o numero. */
.game-page.is-ending .game-bigclock__dial {
  background: conic-gradient(
    var(--pq-amber, #ea580c) calc(var(--game-progress, 0) * 1%),
    var(--pq-signal) 0
  );
}

.game-bigclock__value {
  color: var(--pq-ink);
  font-size: clamp(34px, 11vw, 44px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: .95;
}

.game-bigclock__unit {
  margin-top: 6px;
  color: var(--pq-muted);
  font-size: 12px;
  font-weight: 700;
}

/* Ultimos 5 minutos: sobre fundo claro o realce e o ambar da marca */
.game-page.is-ending .game-bigclock__value { color: var(--pq-amber, #ea580c); }

/* Placar compacto abaixo do relogio — so em campo */
.game-clock-score {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid var(--pq-line);
  border-radius: 22px;
  background: var(--pq-panel);
  text-align: center;
}

.game-page:not([data-phase="during-game"]) .game-clock-score { display: none; }

.game-clock-score__team { min-width: 0; }

.game-clock-score__team span {
  display: block;
  overflow: hidden;
  color: var(--pq-muted);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-clock-score__team b {
  display: block;
  margin-top: 2px;
  font-size: 34px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.game-clock-score__team b.team-a { color: var(--pq-brand-deep); }
.game-clock-score__team b.team-b { color: var(--pq-team-b); }

.game-clock-score em {
  color: var(--pq-muted);
  font-size: 18px;
  font-style: normal;
}

/* A aba Times comeca direto num card, sem titulo antes — precisa do respiro */
.game-tabpanel[data-game-panel="times"] { padding-top: 16px; }

/* ── Modo placar (paisagem) ─────────────────────────────────
   Sem plugin de orientacao: instalar um obrigaria rebuild nativo e nova
   submissao de loja por uma tela cosmetica, e nao resolveria a build web.
   screen.orientation.lock() so funciona dentro de fullscreen no Chromium e
   e sempre recusado no iOS/WKWebView — entao a rotacao real e feita por CSS.

   O pulo do gato esta na media query: se o lock funcionar, ou se a pessoa
   girar o aparelho na mao, (orientation: portrait) deixa de casar e a
   rotacao se desliga sozinha. Um CSS so cobre os dois caminhos. */
.game-tv {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow: hidden;
  background: linear-gradient(135deg, var(--pq-brand-deep), var(--pq-brand-strong));
  color: #fff;
}

.game-tv[hidden] { display: none; }

.game-tv__stage {
  display: grid;
  width: 100%;
  height: 100%;
  align-content: center;
  justify-items: center;
  gap: clamp(10px, 3vmin, 28px);
  padding: clamp(12px, 4vmin, 32px);
  text-align: center;
}

@media (orientation: portrait) {
  .game-tv__stage {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vh;
    height: 100vw;
    width: 100dvh;
    height: 100dvw;
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center center;
  }
}

.game-tv__close {
  /* fixed, e nao absolute: o palco rotacionado cria contexto de empilhamento
     com transform, e o botao precisa ficar sempre no canto real da tela. */
  position: fixed;
  top: max(14px, env(safe-area-inset-top, 0px));
  right: 14px;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .34);
  color: #fff;
  cursor: pointer;
}

.game-tv__close .ic { width: 22px; height: 22px; }

.game-tv__timer {
  font-size: clamp(72px, 32vmin, 220px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: .95;
}

.game-page.is-ending .game-tv__timer { color: #ffd88a; }

.game-tv__scores {
  display: flex;
  align-items: center;
  gap: clamp(18px, 7vmin, 72px);
}

.game-tv__team {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
}

.game-tv__team small {
  font-size: clamp(11px, 2.6vmin, 22px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  opacity: .8;
}

.game-tv__team b {
  font-size: clamp(52px, 21vmin, 150px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.game-tv__scores em {
  font-size: clamp(20px, 5vmin, 52px);
  font-style: normal;
  opacity: .5;
}

body.is-tv-open { overflow: hidden; }

/* Este botao vive DENTRO de .game-actions, que ja e grid de 2 colunas.
   A regra anterior (width:100% + margin-top:10px) empurrava so ele 10px
   para baixo e desalinhava a dupla. O grid ja resolve largura e altura. */

/* ── Chips (duracao da rodada, quantidade de times) ─────── */
.game-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.game-chip {
  min-width: 0;
  flex: 1 1 auto;
  padding: 9px 10px;
  border: 1px solid var(--pq-line);
  border-radius: 999px;
  background: var(--pq-panel);
  color: var(--pq-ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.game-chip.is-on {
  border-color: transparent;
  background: var(--pq-brand);
  color: #fff;
}

.game-chip:active { transform: translateY(1px); }

/* ── Controles do cronometro ────────────────────────────── */
.game-clock-actions {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

/* ── Teclado do placar ──────────────────────────────────── */
.game-scorepad {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 16px 14px;
  border: 1px solid var(--pq-line);
  border-radius: 22px;
  background: var(--pq-panel);
  box-shadow: var(--pq-shadow-1);
  text-align: center;
}

.game-scorepad__side { min-width: 0; }

.game-scorepad__name {
  overflow: hidden;
  color: var(--pq-muted);
  font-size: 10.5px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-scorepad__value {
  margin: 2px 0 10px;
  font-size: 46px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.game-scorepad__value.team-a { color: var(--pq-brand-deep); }
.game-scorepad__value.team-b { color: var(--pq-team-b); }

.game-scorepad__btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* 46px de alvo: e para acertar de primeira com a mao suada, no meio do jogo */
.game-scorepad__btn {
  min-height: 46px;
  border: 1px solid var(--pq-line);
  border-radius: 14px;
  background: var(--pq-surface-2, #f3f5f1);
  color: var(--pq-ink);
  font-family: inherit;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.game-scorepad__btn.is-plus {
  border-color: transparent;
  background: var(--pq-brand);
  color: #fff;
}

/* O + pega a cor do proprio time: dois botoes verdes iguais comandando
   placares diferentes e um convite a errar no meio do jogo. */
.game-scorepad__btn.is-plus.team-b { background: var(--pq-team-b); }

.game-scorepad__btn:active { transform: translateY(1px); }

.game-scorepad > em {
  color: var(--pq-muted);
  font-size: 18px;
  font-style: normal;
}

/* ── Nota de rodape (tempo de quadra) ───────────────────── */
.game-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--pq-muted);
  font-size: 11px;
  text-align: center;
}

.game-note .ic { width: 13px; height: 13px; flex-shrink: 0; }
.game-note b { color: var(--pq-ink); font-weight: 850; }

/* ── Atalho para a aba de operacao ──────────────────────── */
.game-jump {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid var(--pq-line);
  border-radius: 22px;
  background: var(--pq-panel);
  color: var(--pq-ink);
  text-decoration: none;
}

.game-jump__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pq-brand);
  color: #fff;
}

.game-jump__icon .ic { width: 20px; height: 20px; }
.game-jump > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.game-jump strong { font-size: 12.5px; font-weight: 900; }
.game-jump small { margin-top: 2px; color: var(--pq-muted); font-size: 9.5px; }
.game-jump > .ic { width: 18px; height: 18px; color: var(--pq-brand-strong); }

/* ── Fila de times ──────────────────────────────────────── */
.game-queue {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-queue__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid var(--pq-line);
  border-left: 4px solid var(--pq-line-strong, #ccd5cb);
  border-radius: 16px;
  background: var(--pq-panel);
}

.game-queue__pos {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pq-surface-2, #f3f5f1);
  color: var(--pq-muted);
  font-size: 11px;
  font-weight: 900;
}

.game-queue__info { display: flex; min-width: 0; flex-direction: column; }
.game-queue__info strong { font-size: 12.5px; font-weight: 900; }

.game-queue__info small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--pq-muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-queue__next {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--pq-signal-soft);
  color: var(--pq-brand-deep);
  font-size: 8.5px;
  font-weight: 900;
  text-transform: uppercase;
}

/* ── Cores dos times (ate 6) — todas ja existentes na paleta ── */
[data-team-accent="0"] { --team-color: var(--pq-brand); }
[data-team-accent="1"] { --team-color: var(--pq-gold, #e4a11b); }
[data-team-accent="2"] { --team-color: var(--pq-blue, #2563eb); }
[data-team-accent="3"] { --team-color: var(--pq-rose, #e85d75); }
[data-team-accent="4"] { --team-color: var(--pq-brand-deep); }
[data-team-accent="5"] { --team-color: var(--pq-ink-soft, #315742); }

.game-team-card__header[data-team-accent] {
  border-bottom-color: var(--team-color);
  color: var(--team-color);
}

.game-queue__item[data-team-accent] { border-left-color: var(--team-color); }

/* ── Fatos da partida (lista, nao cards) ────────────────── */
.game-facts {
  margin-top: 16px;
  padding: 4px 16px;
  border: 1px solid var(--pq-line);
  border-radius: 22px;
  background: var(--pq-panel);
}

.game-facts > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  border-bottom: 1px solid var(--pq-line);
}

.game-facts > div:last-child { border-bottom: 0; }

.game-facts dt {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--pq-muted);
  font-size: 12px;
  font-weight: 700;
}

.game-facts dt .ic {
  width: 15px;
  height: 15px;
  color: var(--pq-brand-strong);
}

.game-facts dd {
  overflow: hidden;
  margin: 0;
  font-size: 12.5px;
  font-weight: 850;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Montagem dos times num bloco so, para a aba nao parecer tres ilhas soltas */
.game-teams-setup {
  margin-top: 4px;
  padding: 14px;
  border: 1px solid var(--pq-line);
  border-radius: 22px;
  background: var(--pq-panel);
}

.game-teams-setup .game-section-title { margin: 0 0 10px; }
.game-teams-setup .game-shuffle { margin-top: 12px; background: var(--pq-signal-soft); }

/* Estado vazio dos times. Antes eram dois cartoes dizendo "Aguardando
   sorteio..." com um vazio enorme embaixo — dois nadas ocupando o dobro do
   espaco. Um bloco so, com o numero de confirmados, da contexto ao botao
   de sortear logo acima. */
.game-teams-empty {
  display: grid;
  padding: 30px 20px;
  border: 1px dashed var(--pq-line);
  border-radius: 22px;
  background: var(--pq-panel);
  justify-items: center;
  text-align: center;
}

.game-teams-empty[hidden] { display: none; }

.game-teams-empty__icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  margin-bottom: 12px;
  background: var(--pq-signal-soft);
  color: var(--pq-brand-strong);
}

.game-teams-empty__icon .ic { width: 24px; height: 24px; }

.game-teams-empty strong {
  font-size: 15px;
  font-weight: 800;
}

.game-teams-empty small {
  margin-top: 4px;
  color: var(--pq-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

/* ── Controles dentro do Modo placar ───────────────────────────────────── */

.game-tv__controls {
  display: flex;
  gap: clamp(8px, 2vmin, 16px);
}

.game-tv__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: clamp(9px, 1.8vmin, 15px) clamp(16px, 3.4vmin, 30px);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-family: inherit;
  font-size: clamp(12px, 2.2vmin, 19px);
  font-weight: 800;
  cursor: pointer;
}

.game-tv__btn--ghost { background: none; }
.game-tv__btn:active { transform: translateY(1px); }
.game-tv__btn .ic { width: 1.1em; height: 1.1em; }

/* O numero e a area de arraste. touch-action: none entrega o gesto vertical
   ao pointermove — sem isso o navegador rola a pagina e o handler nunca
   recebe o movimento. */
.game-tv__team b[data-score-drag] {
  padding: 0 clamp(8px, 2vmin, 20px);
  border-radius: 18px;
  cursor: ns-resize;
  touch-action: none;
  transition: background .15s ease, transform .15s ease;
  user-select: none;
}

.game-tv__team b.is-dragging {
  background: rgba(255, 255, 255, .16);
  transform: scale(1.04);
}

.game-tv__hint {
  margin-top: 2px;
  font-size: clamp(9px, 1.5vmin, 13px);
  font-style: normal;
  font-weight: 700;
  letter-spacing: .08em;
  opacity: .45;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  .game-tv__team b[data-score-drag] { transition: none; }
}
