/* Vila Remate Digital: percurso por jornadas, mapa da vila, folhas e estados vivos.
   Fundo branco e os laranjas do logotipo RD, como no resto do site. */

:root {
  --ink: #1a1a1a;
  --ink-2: #4a4a4a;
  --ink-3: #7a7a7a;
  --papel: #ffffff;
  --suave: #f7f5f3;
  --cartao: #ffffff;
  --linha: rgba(26, 26, 26, 0.1);
  --laranja: #e85d1c;
  --laranja-escuro: #c44a12;
  --laranja-texto: #b8430f;
  --amarelo: #f4a024;
  --gradiente: linear-gradient(135deg, #c44a12 0%, #e85d1c 55%, #f4a024 100%);
  --relva: #4f8a2f;
  --relva-2: #5e9b3a;
  --ardosia: #2f3b34;
  --giz: #f1efe6;
  --cimento: #bcb6aa;
  --asfalto: #4f5154;
  --letra: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --letra-camisola: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --letra-giz: "Caveat", "Comic Sans MS", cursive;
  --barra: 62px;
  --topo: 60px;
  --coluna: 560px;
  --subida: 0;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topo) + env(safe-area-inset-top));
}

html.com-folha {
  overflow: hidden;
}

::selection {
  background: rgba(232, 93, 28, 0.18);
  color: var(--ink);
}

body.vila-corpo {
  margin: 0;
  min-height: 100vh;
  background: var(--papel);
  color: var(--ink);
  font-family: var(--letra);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--barra) + env(safe-area-inset-bottom));
}

img,
svg {
  display: block;
  max-width: 100%;
}

.manto img,
.destaque__media img,
.peca img {
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--laranja);
  outline-offset: 2px;
}

.saltar {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--laranja-escuro);
  color: #fff;
  font-weight: 600;
}

.saltar:focus {
  top: 12px;
}

/* Kicker laranja, como nos cartões da página inicial. */
.kicker {
  margin: 0;
  color: var(--laranja-texto);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ───────────── topo ───────────── */

.vila-topo {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: calc(var(--topo) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  background: var(--papel);
  border-bottom: 1px solid var(--linha);
  color: var(--ink);
}

.vila-topo__marca {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.vila-topo__marca img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  transform: scale(1.04);
}

.vila-topo__menu {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--linha);
  border-radius: 0;
  background: var(--papel);
  color: var(--ink);
  font: 600 0.92rem var(--letra);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.vila-topo__menu:hover {
  border-color: rgba(232, 93, 28, 0.45);
  color: var(--laranja-texto);
}

/* ───────────── entrada: a vila vista de cima ───────────── */

.vila {
  max-width: var(--coluna);
  margin: 0 auto;
}

.entrada {
  display: flex;
  flex-direction: column;
  padding: 0 0 8px;
}

.entrada__texto {
  padding: 30px 22px 6px;
  text-align: center;
}

.entrada__mapa {
  padding: 4px 4px 0;
}

.entrada__titulo {
  margin: 10px 0 0;
  font-family: var(--letra-camisola);
  font-weight: 900;
  font-size: clamp(3rem, 15vw, 5.2rem);
  line-height: 0.86;
  text-transform: uppercase;
  color: var(--ink);
}

.entrada__lede {
  margin: 14px auto 0;
  max-width: 34ch;
  font-size: 1.02rem;
  color: var(--ink-2);
}

.entrada__texto .acoes {
  justify-content: center;
}

.entrada__vivo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  font-size: 0.86rem;
  color: var(--ink-3);
}

/* Selo de transmissão: a vila está ligada aos dados de cá fora. */
.ao-vivo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 7px;
  background: var(--laranja-escuro);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ao-vivo::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: pisca 1.6s steps(2, end) infinite;
}

@keyframes pisca {
  0% { opacity: 1; }
  100% { opacity: 0.25; }
}

/* Etiquetas do mapa e placas das cenas: o cartão da marca, em ponto pequeno. */
.etiqueta,
.placa {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px 5px 8px;
  border: 1px solid var(--linha);
  border-left: 3px solid var(--laranja);
  background: #fff;
  color: var(--ink);
  font-family: var(--letra);
  font-weight: 600;
  font-size: 11px;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(26, 26, 26, 0.12);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.etiqueta {
  min-height: 28px;
  transform: translate(-50%, -100%);
}

.etiqueta--e {
  transform: translate(-16%, -100%);
}

.etiqueta--d {
  transform: translate(-84%, -100%);
}

.etiqueta:hover,
.etiqueta:focus-visible,
.edificio:hover .placa,
.edificio:focus-visible .placa,
.edificio.is-aberto .placa {
  background: var(--laranja-escuro);
  border-color: var(--laranja-escuro);
  color: #fff;
}

.etiqueta__novo {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--laranja);
  animation: pulsa-laranja 2s ease-out infinite;
}

@keyframes pulsa-laranja {
  0% { box-shadow: 0 0 0 0 rgba(232, 93, 28, 0.5); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(232, 93, 28, 0); }
}

/* ───────────── jornadas (capítulos) ───────────── */

.percurso {
  position: relative;
}

.capitulo {
  padding: 0;
}

/* Legenda curta por cima da cena: a vila e a avenida ficam à vista. */
.capitulo__texto {
  position: absolute;
  z-index: 3;
  left: 12px;
  bottom: 16px;
  width: min(78%, 260px);
  padding: 12px 12px 10px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--linha);
  border-left: 3px solid var(--laranja);
  box-shadow: 0 8px 22px rgba(26, 26, 26, 0.12);
}

.capitulo__vivo {
  margin: 8px 0 0;
  font-size: 0.86rem;
  color: var(--ink-2);
}

.capitulo__vivo .ao-vivo {
  margin-left: 4px;
  vertical-align: 1px;
}

.capitulo__cabeca {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}

/* Emblema da jornada: o círculo do logotipo, com o anel branco. */
.capitulo__num {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 0;
  border-radius: 50%;
  background: var(--gradiente);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  outline: 1.5px solid rgba(255, 255, 255, 0.85);
  outline-offset: -4px;
  box-shadow: 0 2px 8px rgba(196, 74, 18, 0.35);
}

.capitulo__titulo {
  margin: 0;
  font-weight: 600;
  font-size: clamp(1.2rem, 5vw, 1.45rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.capitulo__lede {
  margin: 8px 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ink-2);
}

.capitulo__texto .cartao {
  padding: 12px;
}

.capitulo__texto .cartao__mantos {
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.capitulo__texto .botao {
  min-height: 42px;
  padding: 0 14px;
  font-size: 0.9rem;
}

.capitulo__texto .acoes {
  flex-direction: column;
  align-items: stretch;
}

.capitulo__texto .kicker {
  font-size: 0.64rem;
  line-height: 1.3;
}

/* Cartão de dados reais, no formato dos cartões da página inicial. */
.cartao {
  max-width: 100%;
  margin: 14px 0 4px;
  padding: 16px 18px 14px;
  border: 1px solid var(--linha);
  border-left: 3px solid var(--laranja);
  background: var(--cartao);
}

.cartao__topo {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 10px;
  color: var(--laranja-texto);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cartao__topo span:last-child {
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 0.78rem;
}

.cartao__titulo {
  margin: 0;
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.cartao__meta,
.cartao__linha {
  margin: 3px 0 0;
  font-size: 0.86rem;
  color: var(--ink-3);
}

.cartao__linha strong {
  color: var(--ink);
}

.cartao__estado {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--linha);
  font-size: 0.84rem;
  color: var(--ink-2);
}

.cartao__estado::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-3);
}

.capitulo[data-estado~="novo"] .cartao__estado::before {
  background: var(--laranja);
  animation: pulsa-laranja 2s ease-out infinite;
}

.subida__barra {
  display: block;
  height: 8px;
  background: var(--suave);
  overflow: hidden;
}

.subida__cheio {
  display: block;
  height: 100%;
  background: var(--gradiente);
  transform-origin: left center;
  transform: scaleX(max(0.04, var(--subida)));
}

.subida__fim {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.cartao__mantos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.cartao__mantos img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--suave);
}

.cartao__lista {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cartao__lista li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: 0.9rem;
}

.cartao__lista li + li {
  border-top: 1px solid var(--linha);
}

.cartao__lista li span:first-child {
  font-weight: 600;
  white-space: nowrap;
}

.cartao__lista li span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.cartao__golo {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 12px;
  align-items: center;
}

.cartao__golo img {
  width: 104px;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #222;
}

.cartao__golo strong {
  display: block;
  font-weight: 600;
  line-height: 1.2;
}

.cartao__golo span span {
  font-size: 0.86rem;
  color: var(--ink-3);
}

/* ───────────── cenas ───────────── */

.quarteirao {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 390 / var(--alto);
}

.quarteirao__cena {
  width: 100%;
  height: 100%;
}

/* As cenas encostam umas às outras; a avenida continua na ligação. */
.capitulo .quarteirao {
  overflow: hidden;
}

/* Grão de tinta por cima do desenho provisório. */
.capitulo .quarteirao::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .2 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E");
}

.cena-letra {
  font-family: var(--letra-camisola);
  font-weight: 900;
}

.cena-giz {
  font-family: var(--letra-giz);
  font-weight: 600;
}

/* Estados vindos dos dados (num capítulo, ou espelhados no mapa). */
[data-estado]:not([data-estado~="novo"]) .so-novo,
[data-estado~="novo"] .so-calmo,
[data-estado~="ausente"] .so-presente,
[data-estado]:not([data-estado~="ausente"]) .so-ausente {
  display: none;
}

/* ───────────── edifícios ───────────── */

.edificio {
  position: absolute;
  z-index: 2;
  display: block;
  border-radius: 0;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.edificio:focus-visible {
  outline: 2px dashed var(--laranja);
  outline-offset: -2px;
}

.edificio:active .placa {
  transform: translateY(1px);
}

.placa__novo {
  position: absolute;
  top: -11px;
  right: -8px;
  padding: 2px 7px 3px;
  background: var(--laranja-escuro);
  color: #fff;
  font-family: var(--letra);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
}

/* Sobreposições HTML na cena: ecrã gigante e ardósia. */
.sobre {
  position: absolute;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.ecra img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
}

.ecra__golo {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--letra-camisola);
  font-weight: 900;
  font-size: 8cqw;
  color: #fff;
  text-shadow: 0 2px 0 var(--laranja-escuro), 0 0 12px rgba(0, 0, 0, 0.6);
}

.ecra__nome {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.4cqw 1.6cqw;
  background: rgba(20, 20, 20, 0.78);
  color: #fff;
  font-weight: 600;
  font-size: 2.6cqw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ardosia {
  padding: 1.6cqw 2.2cqw;
  color: var(--giz);
  font-family: var(--letra-giz);
  font-weight: 600;
  line-height: 1.15;
}

.ardosia__titulo {
  margin: 0 0 0.6cqw;
  font-size: 3.6cqw;
  text-decoration: underline wavy rgba(241, 239, 230, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ardosia__lista {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 2.9cqw;
}

.ardosia__lista li {
  display: flex;
  gap: 1.2cqw;
  white-space: nowrap;
}

.ardosia__lista li span:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ardosia.tem-recorde::after {
  content: "Novo recorde!";
  position: absolute;
  right: 1.4cqw;
  bottom: 0.8cqw;
  color: var(--amarelo);
  font-size: 3.2cqw;
  transform: rotate(-6deg);
}

/* ───────────── animações ambiente ───────────── */

.anima {
  transform-box: fill-box;
  animation-play-state: paused;
}

.quarteirao.is-vivo .anima {
  animation-play-state: running;
}

.anima-bandeira {
  transform-origin: top center;
  animation: bandeira 1.6s ease-in-out infinite alternate;
}

.anima-bandeira:nth-of-type(odd) {
  animation-delay: -0.8s;
}

.anima-cao {
  animation: cao 16s linear infinite;
}

.anima-toques {
  animation: toques 0.5s cubic-bezier(0.3, 0, 0.7, 1) infinite alternate;
}

.anima-fumo {
  animation: fumo 3.2s ease-out infinite;
}

.anima-roupa {
  transform-origin: top center;
  animation: roupa 2.8s ease-in-out infinite alternate;
}

.anima-roupa:nth-of-type(2n) {
  animation-delay: -1.3s;
}

.anima-arcada {
  animation: arcada 0.9s steps(2, end) infinite;
}

.anima-arcada--b {
  animation-duration: 1.3s;
}

.anima-mat {
  animation: mat 0.6s ease-in-out infinite alternate;
}

.anima-mat--b {
  animation-delay: -0.3s;
}

.anima-relva {
  animation: relva 14s linear infinite alternate;
}

.anima-holofote {
  animation: holofote 2.6s ease-in-out infinite alternate;
}

[data-estado~="novo"] .quarteirao.is-vivo .ecra__golo {
  animation: golo 1.4s ease-in-out infinite alternate;
}

@keyframes bandeira {
  from { transform: skewX(-10deg); }
  to { transform: skewX(10deg); }
}

@keyframes cao {
  0% { transform: translateX(0); opacity: 0; }
  4% { opacity: 1; }
  40% { transform: translateX(118px); opacity: 1; }
  44%, 100% { transform: translateX(118px); opacity: 0; }
}

@keyframes toques {
  from { transform: translateY(0); }
  to { transform: translateY(-12px); }
}

@keyframes fumo {
  from { transform: translateY(0); opacity: 0.8; }
  to { transform: translateY(-14px); opacity: 0; }
}

@keyframes roupa {
  from { transform: rotate(-5deg); }
  to { transform: rotate(5deg); }
}

@keyframes arcada {
  0% { opacity: 1; }
  100% { opacity: 0.35; }
}

@keyframes mat {
  from { transform: translateY(-2px); }
  to { transform: translateY(3px); }
}

@keyframes relva {
  from { transform: translate(0, 0); }
  to { transform: translate(78px, 45px); }
}

@keyframes holofote {
  from { opacity: 0.35; }
  to { opacity: 0.75; }
}

@keyframes golo {
  from { transform: scale(0.94); }
  to { transform: scale(1.06); }
}

/* ───────────── rodapé ───────────── */

.vila-rodape {
  max-width: var(--coluna);
  margin: 0 auto;
  padding: 28px 22px 36px;
  border-top: 1px solid var(--linha);
  color: var(--ink-3);
  font-size: 0.9rem;
  text-align: center;
}

.vila-rodape ul {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

.vila-rodape a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.vila-rodape a:hover {
  color: var(--laranja-texto);
}

.vila-rodape p {
  margin: 0;
}

/* ───────────── mini-mapa (barra fixa) ───────────── */

.vila-barra {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--papel);
  border-top: 1px solid var(--linha);
  box-shadow: 0 -4px 16px rgba(26, 26, 26, 0.06);
}

/* Fio da subida de divisão: enche à medida que se desce. */
.vila-barra::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradiente);
  transform-origin: left center;
  transform: scaleX(var(--subida));
}

.vila-barra ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--coluna);
  margin: 0 auto;
  padding: 0 max(4px, env(safe-area-inset-left)) 0 max(4px, env(safe-area-inset-right));
  list-style: none;
}

.vila-barra a {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  height: var(--barra);
  color: var(--ink-3);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease;
}

.vila-barra svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vila-barra a[aria-current] {
  color: var(--laranja-texto);
}

/* Índice das jornadas (ecrãs largos). */
.indice {
  display: none;
}

/* ───────────── folha (bottom sheet) ───────────── */

dialog.folha {
  position: fixed;
  inset: auto 0 0 0;
  width: 100%;
  max-width: var(--coluna);
  max-height: calc(100dvh - var(--topo) - env(safe-area-inset-top) - 18px);
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 14px 14px 0 0;
  background: var(--papel);
  color: var(--ink);
  overflow: hidden;
  z-index: 50;
  box-shadow: 0 -20px 60px -30px rgba(26, 26, 26, 0.5);
}

dialog.folha[open] {
  display: flex;
  flex-direction: column;
  animation: sobe 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}

dialog.folha.a-arrastar {
  transition: none;
}

dialog.folha:not(.a-arrastar) {
  transition: transform 0.2s ease;
}

dialog.folha::backdrop {
  background: rgba(26, 26, 26, 0.35);
}

@keyframes sobe {
  from { transform: translateY(40%); opacity: 0.4; }
  to { transform: translateY(0); opacity: 1; }
}

.folha__pega {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  height: 26px;
  display: grid;
  place-items: center;
  cursor: grab;
  touch-action: none;
}

.folha__pega span {
  width: 44px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.folha__fechar {
  position: absolute;
  top: 14px;
  right: 12px;
  z-index: 3;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font: 600 0.88rem var(--letra);
  cursor: pointer;
}

.folha__corpo {
  flex: 1 1 auto;
  min-height: 0; /* para o flex não cortar o topo e mostrar o meio */
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 20px calc(28px + env(safe-area-inset-bottom));
  overflow-anchor: none;
}

.folha__cabeca {
  margin: 0 -20px 20px;
  padding: 34px 20px 20px;
  color: #fff;
  background: var(--ink);
}

.folha__cabeca--estadio {
  background: repeating-linear-gradient(90deg, var(--relva) 0 36px, var(--relva-2) 36px 72px);
  border-bottom: 4px solid #fff;
}

.folha__cabeca--autocarro {
  background: var(--asfalto);
  border-bottom: 4px dashed var(--amarelo);
}

.folha__cabeca--rouparia {
  background: #8f887b;
  border-bottom: 4px solid var(--laranja);
}

.folha__cabeca--sala {
  background: var(--ardosia);
  border-bottom: 6px solid #8a5a32;
}

.folha__cabeca--sala .folha__titulo,
.folha__cabeca--sala .folha__local {
  color: var(--giz);
}

.folha__cabeca--imprensa {
  background: #e9e4d6;
  color: var(--ink);
  border-bottom: 3px double var(--ink);
}

.folha__cabeca--imprensa ~ * .folha__fechar,
dialog.folha[data-tema="imprensa"] .folha__fechar {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
}

dialog.folha[data-tema="imprensa"] .folha__pega span {
  background: rgba(43, 37, 32, 0.45);
}

.folha__cabeca--administrativo {
  background: #6b6f73;
  border-bottom: 4px solid var(--cimento);
}

.folha__local {
  margin: 0 96px 8px 0;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
}

.folha__titulo {
  margin: 0;
  font-family: var(--letra-camisola);
  font-weight: 900;
  font-size: clamp(2.2rem, 10vw, 3rem);
  line-height: 0.92;
}

.folha__lede {
  margin: 10px 0 0;
  max-width: 44ch;
  font-size: 1rem;
}

.folha__sub {
  margin: 26px 0 10px;
  font-family: var(--letra-camisola);
  font-weight: 900;
  font-size: 1.45rem;
  line-height: 1;
}

.folha__texto {
  margin: 0 0 14px;
  max-width: 60ch;
  color: var(--ink-2);
}

.ligacao {
  color: var(--laranja-escuro);
  font-weight: 600;
}

.vazio {
  padding: 16px;
  border: 2px dashed var(--linha);
  border-radius: 0;
  color: var(--ink-2);
}

/* Botões: dizem o que fazem. */
.acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
}

.acoes--fim {
  margin-top: 26px;
}

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 0;
  background: linear-gradient(135deg, var(--laranja-escuro) 0%, var(--laranja) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.botao:hover {
  filter: brightness(1.06);
}

.botao--linha {
  background: var(--papel);
  color: var(--ink);
  border-color: var(--linha);
}

.botao--linha:hover {
  filter: none;
  border-color: rgba(232, 93, 28, 0.45);
  color: var(--laranja-texto);
}

.botao--texto {
  border-color: transparent;
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
  padding: 0 8px;
}

.botao--texto:hover {
  background: transparent;
  border-color: transparent;
  color: var(--laranja-escuro);
}

.botao--grande {
  min-height: 56px;
  padding: 0 34px;
  font-size: 1.15rem;
}

/* Vídeo: miniatura primeiro, leitor só ao tocar. */
.video {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #111;
  cursor: pointer;
}

.video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video__play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 9px 16px;
  background: var(--laranja-escuro);
  color: #fff;
  font: 600 1rem var(--letra);
}

.video:hover .video__play {
  background: var(--laranja-escuro);
}

.video__frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 0;
  background: #000;
}

.destaque {
  display: grid;
  gap: 12px;
}

.destaque__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0;
}

.destaque__marca {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--laranja-escuro);
}

.destaque__titulo {
  margin: 2px 0 4px;
  font-family: var(--letra-camisola);
  font-weight: 900;
  font-size: 2rem;
  line-height: 0.95;
}

.destaque__meta {
  margin: 0;
  color: var(--ink-2);
}

/* Listas: linhas de marcação, não cartões. */
.lista {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lista > li + li {
  border-top: 2px dashed var(--linha);
}

.linha {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  text-decoration: none;
}

.linha__img {
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 0;
  background: #ddd;
}

.linha__texto {
  display: grid;
  min-width: 0;
}

.linha__titulo {
  font-weight: 700;
}

.linha__meta {
  font-size: 0.86rem;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.linha__data {
  font-family: var(--letra-camisola);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--relva);
  white-space: nowrap;
}

.linha:hover .linha__titulo,
.bilhete:hover .bilhete__titulo,
.noticia:hover .noticia__titulo {
  color: var(--laranja-escuro);
}

/* On Tour: bilhetes de jogo. */
.lista--bilhetes > li + li {
  border-top: 0;
}

.lista--bilhetes {
  display: grid;
  gap: 10px;
}

.bilhete {
  display: grid;
  grid-template-columns: 78px 1fr;
  text-decoration: none;
  border: 1px solid var(--linha);
  border-radius: 0;
  overflow: hidden;
  background: #fff;
}

.bilhete__data {
  display: grid;
  place-items: center;
  padding: 8px;
  background: var(--amarelo);
  border-right: 1px dashed rgba(26, 26, 26, 0.35);
  font-family: var(--letra-camisola);
  font-weight: 900;
  font-size: 1.05rem;
  line-height: 1;
  text-align: center;
}

.bilhete__texto {
  display: grid;
  padding: 9px 12px;
}

.bilhete__titulo {
  font-weight: 700;
}

.bilhete__meta {
  font-size: 0.86rem;
  color: var(--ink-2);
}

.peca img {
  width: 100%;
  border-radius: 0;
}

.peca {
  margin: 0 0 14px;
}

/* Rouparia: mantos no estendal. */
.estendal {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px 14px;
  margin: 8px 0 0;
  padding: 18px 0 0;
  list-style: none;
  background: linear-gradient(var(--ink), var(--ink)) top / 100% 2px no-repeat;
}

.manto {
  position: relative;
  display: grid;
  gap: 2px;
  text-decoration: none;
}

.manto__mola {
  position: absolute;
  top: -24px;
  left: 50%;
  width: 10px;
  height: 20px;
  margin-left: -5px;
  border-radius: 2px;
  background: #c79a5a;
  border: 1.5px solid var(--ink);
}

.manto img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0;
  background: #eee;
  transform-origin: top center;
  transition: transform 0.25s ease;
}

.manto:hover img {
  transform: rotate(-2deg);
}

.manto__clube {
  margin-top: 6px;
  font-family: var(--letra-camisola);
  font-weight: 900;
  font-size: 1.2rem;
  line-height: 1;
}

.manto__nome {
  font-size: 0.86rem;
  color: var(--ink-2);
}

.manto__preco {
  font-weight: 700;
}

/* Sala de convívio: quadro de ardósia. */
.contexto__nome {
  margin: 0 0 6px;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.jogo {
  padding: 18px 0 20px;
}

.jogo + .jogo {
  border-top: 2px dashed var(--linha);
}

.jogo__nome {
  margin: 0;
  font-family: var(--letra-camisola);
  font-weight: 900;
  font-size: 1.9rem;
  line-height: 1;
}

.jogo__desc {
  margin: 4px 0 12px;
  color: var(--ink-2);
}

.quadro {
  margin: 0;
  padding: 12px 16px;
  list-style: none;
  border: 6px solid #8a5a32;
  border-radius: 6px;
  background: var(--ardosia);
  color: var(--giz);
  font-family: var(--letra-giz);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.25;
}

.quadro__linha {
  display: grid;
  grid-template-columns: 2.4em 1fr auto;
  gap: 8px;
}

.quadro__nome {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quadro__pts {
  font-family: var(--letra-camisola);
  font-weight: 700;
  font-size: 1.05rem;
  align-self: center;
}

.quadro__vazio {
  opacity: 0.85;
}

.quadro__recorde {
  color: var(--amarelo);
  transform: rotate(-2deg);
  font-size: 1.45rem;
}

/* Imprensa: recortes de jornal. */
.noticia {
  display: grid;
  gap: 1px;
  padding: 12px 0;
  text-decoration: none;
}

.noticia__tipo {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--laranja-escuro);
}

.noticia__titulo {
  font-family: var(--letra-camisola);
  font-weight: 900;
  font-size: 1.35rem;
  line-height: 1.05;
}

.noticia__meta {
  font-size: 0.86rem;
  color: var(--ink-2);
}

/* Ficha de golo. */
.ficha {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
  margin: 18px 0;
}

.ficha div {
  padding-top: 6px;
  border-top: 2px solid var(--ink);
}

.ficha dt {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
}

.ficha dd {
  margin: 0;
  font-weight: 700;
}

.bloco {
  margin-top: 8px;
}

.redes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.redes a {
  font-weight: 600;
}

/* ───────────── menu em texto ───────────── */

dialog.menu {
  width: min(420px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  margin: 12px 12px auto auto;
  padding: 22px 22px 24px;
  border: 1px solid var(--linha);
  border-left: 3px solid var(--laranja);
  background: var(--papel);
  color: var(--ink);
  box-shadow: 0 18px 40px -16px rgba(26, 26, 26, 0.35);
}

dialog.menu::backdrop {
  background: rgba(26, 26, 26, 0.35);
}

.menu__fechar {
  float: right;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--linha);
  background: var(--papel);
  color: var(--ink);
  font: 600 0.88rem var(--letra);
  cursor: pointer;
}

.menu__fechar:hover {
  border-color: rgba(232, 93, 28, 0.45);
  color: var(--laranja-texto);
}

.menu__titulo {
  margin: 4px 0 14px;
  font-family: var(--letra-camisola);
  font-weight: 900;
  font-size: 1.9rem;
  line-height: 1;
  text-transform: uppercase;
}

.menu__lista {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.menu__lista li + li {
  border-top: 1px solid var(--linha);
}

.menu__lista a {
  display: block;
  padding: 11px 2px;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}

.menu__lista a:hover {
  color: var(--laranja-texto);
}

/* ───────────── ecrãs largos: texto ao lado da cena, índice e painel lateral ───────────── */

@media (min-width: 1000px) {
  body.vila-corpo {
    padding-bottom: 0;
  }

  .vila {
    max-width: 1240px;
    padding: 0 170px 0 40px;
  }

  .entrada {
    display: grid;
    grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: 40px;
    min-height: calc(100vh - var(--topo));
    padding: 0 0 40px;
  }

  .entrada__texto {
    padding: 0;
    text-align: left;
  }

  .entrada__lede {
    margin-left: 0;
  }

  .entrada__texto .acoes {
    justify-content: flex-start;
  }

  .entrada__titulo {
    font-size: clamp(4.4rem, 7vw, 6.6rem);
  }

  /* Em ecrãs largos o percurso continua a ser uma avenida vertical contínua. */
  .percurso {
    max-width: 560px;
    margin: 0 auto;
  }


  .vila-barra {
    display: none;
  }

  .indice {
    position: fixed;
    top: 50%;
    right: 24px;
    z-index: 35;
    display: block;
    width: 150px;
    transform: translateY(-50%);
    border: 1px solid var(--linha);
    background: var(--papel);
  }

  .indice::before {
    content: "Jornadas";
    display: block;
    padding: 10px 14px 6px;
    color: var(--laranja-texto);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .indice ol {
    margin: 0;
    padding: 0 0 6px;
    list-style: none;
  }

  .indice a {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 12px 6px 11px;
    border-left: 3px solid transparent;
    color: var(--ink-3);
    font-size: 0.86rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease;
  }

  .indice a span {
    font-size: 0.72rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }

  .indice a:hover {
    color: var(--ink);
  }

  .indice a[aria-current] {
    border-left-color: var(--laranja);
    color: var(--ink);
    font-weight: 600;
  }

  .indice a[aria-current] span {
    color: var(--laranja-texto);
  }

  .vila-rodape {
    max-width: 1100px;
  }

  dialog.folha {
    inset: 0 0 0 auto;
    width: min(540px, 46vw);
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border-radius: 0;
    border-left: 3px solid var(--laranja);
    box-shadow: -20px 0 60px -30px rgba(26, 26, 26, 0.5);
  }

  dialog.folha[open] {
    animation: entra 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
  }

  .folha__pega {
    display: none;
  }
}

@keyframes entra {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ───────────── movimento reduzido ───────────── */

@media (prefers-reduced-motion: reduce) {
  .anima,
  .ecra__golo,
  .ao-vivo::before,
  .etiqueta__novo,
  .cartao__estado::before,
  dialog.folha[open] {
    animation: none !important;
  }

  .placa,
  .etiqueta,
  .manto img,
  dialog.folha {
    transition: none !important;
  }
}
