/*
 * Retrospectiva do ano: stories em tela cheia (views/internal/retrospectives).
 *
 * Cada tela é um campo de cor chapada (tema) com um desenho de quadra no
 * fundo (arte) e um bloco de texto no meio. Só as cores da marca: grafite,
 * creme e limão. O escuro leva os números em limão; o claro leva listas,
 * gráficos e frases. As artes são três: linhas de quadra, rede e trajetória
 * da bola.
 */

.retro {
  --retro-ink: #1e1e1e;
  --retro-cream: #fcfae6;
  --retro-lime: #edff00;

  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  background: #000;
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  touch-action: manipulation;
}

/* Coluna do story: a tela toda no celular, um "telefone" centralizado em telas largas. */
.retro-stage {
  position: relative;
  height: 100%;
  max-width: 30rem;
  margin-inline: auto;
  overflow: hidden;
  container-type: inline-size;
  background: var(--retro-ink);
  --chrome: var(--retro-cream);
}

@media (min-width: 640px) {
  .retro-stage {
    height: calc(100% - 2rem);
    margin-block: 1rem;
    border-radius: 1.5rem;
  }
}

.retro-stage[data-theme="cream"] {
  --chrome: var(--retro-ink);
}

/* ── Temas ─────────────────────────────────────────────────────────────── */

.retro-theme-ink {
  --bg: var(--retro-ink);
  --fg: var(--retro-cream);
  --accent: var(--retro-lime);
  --on-accent: var(--retro-ink);
  --number: var(--retro-lime);
  --art: var(--retro-cream);
  --art-alt: var(--retro-lime);
}

/* No claro o limão não tem contraste como texto: número e arte em grafite,
   limão só em blocos (etiqueta, coluna em destaque, fita da rede). */
.retro-theme-cream {
  --bg: var(--retro-cream);
  --fg: var(--retro-ink);
  --accent: var(--retro-lime);
  --on-accent: var(--retro-ink);
  --number: var(--retro-ink);
  --art: var(--retro-ink);
  --art-alt: var(--retro-ink);
}

/* Só no cartão-resumo: nenhuma tela usa o limão como fundo. */
.retro-theme-lime {
  --bg: var(--retro-lime);
  --fg: var(--retro-ink);
  --accent: var(--retro-ink);
  --on-accent: var(--retro-cream);
  --number: var(--retro-ink);
  --art: var(--retro-ink);
  --art-alt: var(--retro-cream);
}

.retro-theme-night {
  --bg: #0b0b0b;
  --fg: var(--retro-cream);
  --accent: var(--retro-lime);
  --on-accent: var(--retro-ink);
  --number: var(--retro-lime);
  --art: var(--retro-cream);
  --art-alt: var(--retro-lime);
}

[class*="retro-theme-"] {
  --muted: color-mix(in srgb, var(--fg) 72%, transparent);
  --line: color-mix(in srgb, var(--fg) 18%, transparent);
}

/* ── Telas ─────────────────────────────────────────────────────────────── */

.retro-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.retro-slide.is-active {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* O texto fica entre a casca do topo e a arte de baixo. É o único dono do padding da tela. */
.retro-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 0;
  padding: calc(env(safe-area-inset-top) + 5.5rem) 1.5rem calc(env(safe-area-inset-bottom) + 6.5rem);
  text-align: center;
}

.retro-body--top {
  justify-content: flex-start;
}

.retro-kicker {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--muted);
  text-wrap: balance;
}

.retro-title {
  font-size: clamp(2rem, 9.5cqw, 2.9rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.retro-title--small {
  font-size: clamp(1.6rem, 7.5cqw, 2.2rem);
}

.retro-number {
  font-size: clamp(5.5rem, 34cqw, 10.5rem);
  font-weight: 800;
  line-height: 0.84;
  letter-spacing: -0.05em;
  color: var(--number);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.retro-number-prefix {
  margin-right: 0.1em;
  font-size: 0.5em;
  font-weight: 700;
  letter-spacing: 0;
  vertical-align: 0.32em;
}

/* Números longos (calorias, MMR) cabem na largura sem quebrar. */
.retro-number--long {
  font-size: clamp(3.25rem, 18.5cqw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.retro-unit {
  font-size: clamp(1.35rem, 6cqw, 1.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.retro-note {
  max-width: 21rem;
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--muted);
  text-wrap: balance;
}

.retro-note strong {
  font-weight: 700;
  color: var(--fg);
}

.retro-fineprint {
  max-width: 19rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
  text-wrap: balance;
}

/* Etiqueta: texto sobre um bloco de cor, como rótulo de placar. */
.retro-mark {
  padding: 0.04em 0.28em;
  background: var(--fg);
  color: var(--bg);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.retro-mark--accent {
  background: var(--accent);
  color: var(--on-accent);
}

.retro-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.retro-chip {
  padding: 0.4rem 0.8rem;
  border: 1.5px solid var(--fg);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
}

/* ── Casca: barras de progresso, marca e controles ─────────────────────── */

.retro-chrome {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  padding: calc(env(safe-area-inset-top) + 0.75rem) 1rem 0;
  color: var(--chrome);
  pointer-events: none;
  transition: color 0.3s ease;
}

.retro-bars {
  display: flex;
  gap: 3px;
}

.retro-bar {
  flex: 1;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: color-mix(in srgb, var(--chrome) 26%, transparent);
}

.retro-bar > i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--chrome);
  transform: scaleX(0);
  transform-origin: left center;
}

.retro-bar.is-done > i {
  transform: scaleX(1);
}

.retro-bar.is-running > i {
  animation: retro-bar-fill linear forwards;
  animation-duration: var(--retro-bar-ms, 6000ms);
}

.retro-stage.is-paused .retro-bar.is-running > i {
  animation-play-state: paused;
}

@keyframes retro-bar-fill {
  to {
    transform: scaleX(1);
  }
}

.retro-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.retro-top-actions {
  display: flex;
  align-items: center;
}

.retro-brand {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.4rem;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--chrome) 22%, transparent);
}

/* Alvo de toque de 44 px com o ícone sozinho, sem círculo nem fundo. */
.retro-control {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  color: inherit;
  pointer-events: auto;
}

.retro-control .material-symbols-outlined {
  font-size: 1.6rem;
}

.retro-control:focus-visible,
.retro-action:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 0.5rem;
}

/* ── Arte de fundo ─────────────────────────────────────────────────────── */

.retro-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.retro-art > * {
  position: absolute;
}

/* Rede: a malha com a fita por cima. */
.retro-art--net .retro-art-a {
  right: 0;
  bottom: 0;
  left: 0;
  height: 19%;
  background-image:
    linear-gradient(var(--art) 2px, transparent 2px),
    linear-gradient(90deg, var(--art) 2px, transparent 2px);
  background-size: 22px 22px;
  background-position: center top;
  opacity: 0.55;
}

.retro-art--net .retro-art-b {
  right: 0;
  bottom: 19%;
  left: 0;
  height: 12px;
  background: var(--art);
}

.retro-art--net .retro-art-c {
  bottom: 0;
  left: 50%;
  width: 12px;
  height: 19%;
  margin-left: -6px;
  background: var(--retro-lime);
}

.retro-theme-cream .retro-art--net .retro-art-c {
  box-shadow: -2px 0 var(--art), 2px 0 var(--art);
}

/* Quadra: as linhas vistas do fundo, em perspectiva. */
.retro-art--court .retro-art-a {
  right: -8%;
  bottom: -2%;
  left: -8%;
  height: 30%;
}

.retro-art--court svg,
.retro-art--bounce svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* As linhas da quadra são faixas preenchidas, não traços: assim afinam com a distância. */
.retro-art--court svg {
  overflow: hidden;
}

.retro-court-surface {
  fill: var(--art);
  fill-opacity: 0.04;
}

.retro-court-far {
  fill: var(--art);
  fill-opacity: 0.62;
}

.retro-court-near {
  fill: var(--art);
}

.retro-court-mesh {
  fill: none;
  stroke: var(--art);
  stroke-opacity: 0.25;
  stroke-width: 0.5;
}

.retro-court-posts {
  fill: none;
  stroke: var(--art);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.retro-art--court .retro-art-alt {
  fill: var(--art-alt);
}

/* Trajetória: a bola quicando de um lado ao outro. */
.retro-art--bounce .retro-art-a {
  right: -6%;
  bottom: 2%;
  left: -6%;
  height: 26%;
}

.retro-art--bounce .retro-art-b {
  top: 11%;
  right: -4%;
  left: 46%;
  height: 9%;
  transform: scaleX(-1);
}

.retro-art--bounce path {
  fill: none;
  stroke: var(--art);
  stroke-width: 3;
  stroke-dasharray: 2 13;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  animation: retro-dash 3.5s linear infinite;
}

.retro-art--bounce line {
  stroke: var(--art-alt);
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
}

.retro-art--bounce circle {
  fill: var(--art);
}

@keyframes retro-dash {
  to {
    stroke-dashoffset: -30;
  }
}

/* Marcas de quique, placar e bola: desenhos no tamanho da tela, presos embaixo. */
.retro-art--marks .retro-art-a,
.retro-art--scoreboard .retro-art-a,
.retro-art--ball .retro-art-a {
  inset: 0;
}

.retro-art--marks svg,
.retro-art--scoreboard svg,
.retro-art--ball svg {
  width: 100%;
  height: 100%;
  overflow: visible; /* a linha do chão passa da borda; quem corta é a .retro-art */
}

.retro-art-line {
  fill: none;
  stroke: var(--art);
  stroke-width: 3;
}

.retro-art-line--bold {
  stroke-width: 4;
}

.retro-art-dots {
  stroke-dasharray: 2 11;
  stroke-linecap: round;
  opacity: 0.8;
  animation: retro-dash 3.5s linear infinite;
}

.retro-art-shade {
  fill: var(--art);
  opacity: 0.5;
}

.retro-art-solid {
  fill: var(--art);
}

.retro-art-faint {
  fill: var(--art);
  opacity: 0.25;
}

.retro-art-accent {
  fill: var(--art-alt);
}

/* ── Peças das telas ───────────────────────────────────────────────────── */

.retro-tibi {
  width: min(60cqw, 15rem);
  height: auto;
  -webkit-user-drag: none;
}

.retro-split {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 1rem;
  width: 100%;
}

.retro-split-number {
  font-size: clamp(4rem, 24cqw, 7rem);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.retro-split-number--accent {
  color: var(--number);
}

.retro-split-label {
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}

.retro-split-divider {
  align-self: center;
  font-size: 2rem;
  font-weight: 300;
  color: var(--muted);
}

/* Barra de aproveitamento: a parte vencida em destaque. */
.retro-meter {
  width: 100%;
  max-width: 20rem;
  height: 0.6rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.retro-meter > i {
  display: block;
  width: var(--value, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

/* Gráfico de colunas (meses, dias da semana). */
.retro-columns {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  align-items: end;
  gap: 0.35rem;
  width: 100%;
  max-width: 22rem;
  height: 9.5rem;
}

.retro-column {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.retro-column > i {
  display: block;
  width: 100%;
  height: max(var(--value, 0%), 3px);
  border-radius: 0.3rem 0.3rem 0 0;
  background: var(--fg);
  transform-origin: 50% 100%;
}

.retro-column.is-best > i {
  background: var(--accent);
}

/* No claro, o limão ganha contorno para destacar do fundo. */
.retro-theme-cream .retro-column.is-best > i {
  box-shadow: inset 0 0 0 2px var(--fg);
}

.retro-column > span {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  color: var(--muted);
}

.retro-column.is-best > span {
  color: var(--fg);
}

/* Lista numerada (top adversários, clubes). */
.retro-list {
  display: flex;
  width: 100%;
  max-width: 22rem;
  flex-direction: column;
  gap: 0.6rem;
  text-align: left;
}

.retro-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.retro-rank {
  width: 1.4rem;
  flex: none;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.retro-avatar {
  width: 3rem;
  height: 3rem;
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  background: var(--line);
  object-fit: cover;
}

.retro-avatar--large {
  width: 5.25rem;
  height: 5.25rem;
  border: 2px solid var(--fg);
}

/* Fileira de rostos sobrepostos (antes da lista de adversários). */
.retro-faces {
  display: flex;
  justify-content: center;
}

.retro-faces .retro-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border: 3px solid var(--bg);
}

.retro-faces .retro-avatar + .retro-avatar {
  margin-left: -0.9rem;
}

.retro-row-text {
  min-width: 0;
  flex: 1;
}

.retro-row-name {
  overflow: hidden;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retro-row-detail {
  font-size: 0.85rem;
  line-height: 1.25;
  color: var(--muted);
}

/* Cartão de confronto: moldura em volta do duelo. */
.retro-versus {
  width: 100%;
  max-width: 22rem;
  padding: 1.25rem 0.5rem 1.1rem;
  border: 2px solid var(--fg);
  border-radius: 1.1rem;
}

/* Duelo: dois lados e o placar no meio. */
.retro-duel {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}

.retro-duel-side {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.retro-duel-name {
  max-width: 100%;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retro-duel-score {
  font-size: clamp(2.6rem, 13cqw, 3.75rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--number);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Súmula da partida do ano: um placar de quadra, sempre claro com a linha
   do vencedor em grafite, seja qual for o tema da tela. */
.retro-scoreboard {
  width: 100%;
  max-width: 22rem;
  overflow: hidden;
  border: 2px solid var(--retro-ink);
  border-radius: 0.9rem;
  background: var(--retro-cream);
  color: var(--retro-ink);
  text-align: left;
}

.retro-scoreboard-head,
.retro-scoreboard-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-top: 2px solid var(--retro-ink);
}

.retro-scoreboard-head {
  padding-block: 0.5rem;
  border-top: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--retro-ink) 72%, transparent);
}

.retro-scoreboard-row.is-winner {
  background: var(--retro-ink);
  color: var(--retro-cream);
}

.retro-scoreboard-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retro-scoreboard-head .retro-scoreboard-name {
  font-size: inherit;
  font-weight: inherit;
}

/* O ponto limão marca quem venceu a partida. */
.retro-scoreboard-row.is-winner .retro-scoreboard-name::before {
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-right: 0.45em;
  border-radius: 50%;
  background: var(--retro-lime);
  content: "";
}

/* Um set por coluna; o set perdido fica apagado, o vencido em destaque. */
.retro-scoreboard-sets {
  display: flex;
  flex: none;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.retro-scoreboard-sets > span {
  width: 2.1rem;
  text-align: center;
  opacity: 0.45;
}

.retro-scoreboard-sets > .is-won {
  opacity: 1;
}

.retro-scoreboard-row.is-winner .retro-scoreboard-sets > .is-won {
  color: var(--retro-lime);
}

.retro-scoreboard-head .retro-scoreboard-sets {
  font-size: inherit;
  font-weight: 700;
}

.retro-scoreboard-head .retro-scoreboard-sets > span {
  opacity: 1;
}

/* Fatos em linha: número à esquerda, texto à direita. */
.retro-facts {
  display: flex;
  width: 100%;
  max-width: 21rem;
  flex-direction: column;
  text-align: left;
}

.retro-fact {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.7rem 0;
}

.retro-fact + .retro-fact {
  border-top: 1.5px solid var(--line);
}

.retro-fact-number {
  min-width: 3.4rem;
  flex: none;
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--number);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.retro-fact-text {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
}

/* Estante: troféus e conquistas na mesma grade de três, cada um num quadro igual. */
.retro-shelf {
  display: flex;
  max-width: 16.5rem;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.retro-shelf-item {
  width: 5rem;
  height: 5rem;
  overflow: hidden;
  border: 1.5px solid var(--line);
  border-radius: 0.9rem;
  background: color-mix(in srgb, var(--fg) 6%, transparent);
}

.retro-shelf-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.retro-shelf-item--trophy img {
  padding: 0.4rem;
  object-fit: contain;
}

/* Emblema do estilo de jogo. Sem a arte, fica o selo tipográfico. */
.retro-emblem {
  width: min(70cqw, 18rem);
  aspect-ratio: 1;
  object-fit: contain;
}

.retro-emblem--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--accent);
  border-radius: 50%;
  outline: 2px dashed var(--line);
  outline-offset: 0.6rem;
}

.retro-emblem--placeholder .material-symbols-outlined {
  font-size: min(26cqw, 6.5rem);
  color: var(--accent);
}

/* ── Cartão-resumo ─────────────────────────────────────────────────────── */

.retro-cards {
  display: flex;
  width: 100%;
  gap: 0.9rem;
  overflow-x: auto;
  padding-inline: 14%;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.retro-cards::-webkit-scrollbar {
  display: none;
}

.retro-card {
  width: 72%;
  aspect-ratio: 9 / 16;
  flex: none;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--bg);
  color: var(--fg);
  text-align: left;
  scroll-snap-align: center;
  container-type: inline-size;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 14%, transparent);
}

/* As medidas seguem a imagem de 1080 px de largura: 1cqw = 10,8 px. */
.retro-card-inner {
  display: flex;
  height: 100%;
  flex-direction: column;
  padding: 9.5cqw 8.9cqw 7cqw;
}

.retro-card-kicker {
  font-size: 4.3cqw;
  font-weight: 600;
  color: var(--muted);
}

.retro-card-year {
  margin: 1cqw 0 0 -1cqw;
  font-size: 31.5cqw;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--number);
  font-variant-numeric: tabular-nums;
}

.retro-card-name {
  margin-top: 3cqw;
  overflow: hidden;
  font-size: 12.2cqw;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retro-card-style {
  align-self: flex-start;
  margin-top: 3cqw;
  font-size: 5.6cqw;
  font-weight: 700;
  line-height: 1.5;
}

.retro-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5cqw 3cqw;
  margin-top: auto;
}

.retro-card-stat b {
  display: block;
  font-size: 17.6cqw;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--number);
  font-variant-numeric: tabular-nums;
}

.retro-card-stat span {
  display: block;
  margin-top: 1.5cqw;
  font-size: 4.1cqw;
  font-weight: 600;
  line-height: 1.2;
  color: var(--muted);
}

.retro-card-lines {
  display: flex;
  flex-direction: column;
  gap: 1.5cqw;
  margin-top: 5cqw;
  padding-top: 4cqw;
  border-top: 1.5px solid var(--line);
  font-size: 4.3cqw;
  line-height: 1.3;
  color: var(--muted);
}

.retro-card-lines p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retro-card-lines b {
  font-weight: 800;
  color: var(--fg);
}

.retro-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 5cqw;
  font-size: 3.7cqw;
  font-weight: 600;
  color: var(--muted);
}

.retro-card-footer img {
  width: 8.1cqw;
  height: 8.1cqw;
  border-radius: 1.8cqw;
}

.retro-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}

.retro-dots > i {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.2s ease;
}

.retro-dots > i.is-active {
  background: var(--fg);
}

.retro-actions {
  display: flex;
  width: 100%;
  max-width: 20rem;
  flex-direction: column;
  gap: 0.5rem;
}

.retro-action {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.retro-action--ghost {
  background: transparent;
  color: var(--fg);
  font-weight: 600;
}

/* A tela do cartão rola quando a altura é curta; as outras nunca rolam. */
.retro-body--scroll {
  justify-content: flex-start;
  overflow-y: auto;
  padding-inline: 0;
  padding-bottom: calc(env(safe-area-inset-bottom) + 1.5rem);
}

.retro-body--scroll > :not(.retro-cards) {
  padding-inline: 1.5rem;
}

.retro-body--scroll > :first-child {
  margin-top: auto;
}

.retro-body--scroll > :last-child {
  margin-bottom: auto;
}

/* ── Telas baixas ───────────────────────────────────────────────────────── */

/* Em celulares de tela curta, a arte encolhe e os enfeites de cima somem,
   para nunca passar por cima do texto. */
@media (max-height: 720px) {
  .retro-body {
    gap: 0.6rem;
    padding-top: calc(env(safe-area-inset-top) + 4.75rem);
    padding-bottom: calc(env(safe-area-inset-bottom) + 5rem);
  }

  .retro-tibi {
    width: min(38cqw, 9.5rem);
  }

  .retro-number {
    font-size: clamp(4.5rem, 28cqw, 8rem);
  }

  .retro-columns {
    height: 7rem;
  }

  .retro-emblem {
    width: min(46cqw, 11.5rem);
  }

  .retro-art--net .retro-art-a,
  .retro-art--net .retro-art-c {
    height: 11%;
  }

  .retro-art--net .retro-art-b {
    bottom: 11%;
  }

  .retro-art--court .retro-art-a {
    height: 16%;
  }

  /* Só a metade de cá aparece: sem o piso, que ficaria cortado reto no topo. */
  .retro-court-surface {
    display: none;
  }

  .retro-art--bounce .retro-art-a {
    height: 15%;
  }

  .retro-art--bounce .retro-art-b {
    display: none;
  }

  .retro-art--marks svg,
  .retro-art--scoreboard svg,
  .retro-art--ball svg {
    transform: scale(0.72);
    transform-origin: 50% 100%;
  }
}

/* ── Entrada dos elementos ─────────────────────────────────────────────── */

.retro-stage.is-animated [data-retro-in] {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .retro-art * {
    animation: none !important;
  }

  .retro-slide,
  .retro-slide.is-active {
    transition: none;
  }
}

/* ── Banner da tela inicial ────────────────────────────────────────────── */

.retro-banner {
  position: relative;
  display: flex;
  min-height: 9.5rem;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  overflow: hidden;
  padding: 1.1rem 1.25rem;
  border-radius: 1rem;
  background: #edff00;
  color: #1e1e1e;
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  isolation: isolate;
}

.retro-banner-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.retro-banner-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.7;
}

.retro-banner-year {
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.retro-banner-title {
  max-width: 13rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.retro-banner-cta {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: #1e1e1e;
  color: #fcfae6;
  font-size: 0.9rem;
  font-weight: 700;
}

/* Arcos de quadra saindo do canto, como na abertura do story. */
.retro-banner-art {
  position: absolute;
  right: -3.5rem;
  bottom: -3.5rem;
  z-index: -1;
  width: 13rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #1e1e1e 0 8.5px, transparent 9.5px 20px, #1e1e1e 21px);
  opacity: 0.9;
}
