/* ==========================================================================
   AVCM — site público
   Sistema visual sobre Bootstrap 5.3. Ideia central: o placar e as linhas
   do campo de voleibol. Verde do pavilhão, amarelo da bola.
   ========================================================================== */

/* ---- Fontes (servidas localmente) ------------------------------------- */
@font-face { font-family: "Saira Condensed"; font-weight: 500; font-display: swap; src: url("../vendor/fonts/saira-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Saira Condensed"; font-weight: 600; font-display: swap; src: url("../vendor/fonts/saira-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Saira Condensed"; font-weight: 700; font-display: swap; src: url("../vendor/fonts/saira-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Saira Condensed"; font-weight: 800; font-display: swap; src: url("../vendor/fonts/saira-condensed-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("../vendor/fonts/public-sans-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 100 900; font-style: italic; font-display: swap; src: url("../vendor/fonts/public-sans-latin-wght-italic.woff2") format("woff2"); }

/* ---- Tokens ----------------------------------------------------------- */
:root {
  --avcm-night: #0d2b22;      /* pavilhão às escuras: cabeçalho, rodapé, faixas */
  --avcm-night-2: #123a2e;
  --avcm-court: #1a7a4c;      /* verde do campo: acções e ligações */
  --avcm-court-dark: #135c39;
  --avcm-ball: #f5c518;       /* amarelo da bola: destaque, vencedor, foco */
  --avcm-ball-ink: #3d2f00;
  --avcm-blue: #2457a6;       /* azul da bola: uso pontual */
  --avcm-paper: #f3f6f4;
  --avcm-surface: #ffffff;
  --avcm-ink: #14201b;
  --avcm-muted: #5b6b64;
  --avcm-rule: #dde5e0;
  --avcm-loss: #b3412f;

  --avcm-display: "Saira Condensed", "Arial Narrow", system-ui, sans-serif;
  --avcm-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --avcm-radius-sm: 4px;
  --avcm-radius: 10px;
  --avcm-radius-lg: 16px;

  /* Bootstrap */
  --bs-body-font-family: var(--avcm-body);
  --bs-body-color: var(--avcm-ink);
  --bs-body-bg: var(--avcm-paper);
  --bs-secondary-color: var(--avcm-muted);
  --bs-border-color: var(--avcm-rule);
  --bs-primary: var(--avcm-court);
  --bs-primary-rgb: 26, 122, 76;
  --bs-link-color: var(--avcm-court);
  --bs-link-color-rgb: 26, 122, 76;
  --bs-link-hover-color: var(--avcm-court-dark);
  --bs-link-hover-color-rgb: 19, 92, 57;
  --bs-border-radius: var(--avcm-radius);
  --bs-focus-ring-color: rgba(245, 197, 24, .55);
}

/* ---- Base ------------------------------------------------------------- */
body {
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "kern";
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .avcm-display {
  font-family: var(--avcm-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5, h6 { font-family: var(--avcm-body); font-weight: 650; }
.lead { font-size: 1.15rem; color: var(--avcm-muted); max-width: 62ch; }
.prose { max-width: 68ch; }
.prose img { max-width: 100%; height: auto; border-radius: var(--avcm-radius); }
.tabular { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--avcm-ball); outline-offset: 2px; }
a { text-underline-offset: .18em; }
.visually-hidden-focusable:focus { position: fixed; z-index: 2000; top: .5rem; left: .5rem; background: var(--avcm-ball); color: var(--avcm-ball-ink); padding: .5rem 1rem; border-radius: var(--avcm-radius-sm); }

/* ---- Botões ----------------------------------------------------------- */
.btn { font-weight: 600; border-radius: var(--avcm-radius-sm); }
.btn-primary {
  --bs-btn-bg: var(--avcm-court); --bs-btn-border-color: var(--avcm-court);
  --bs-btn-hover-bg: var(--avcm-court-dark); --bs-btn-hover-border-color: var(--avcm-court-dark);
  --bs-btn-active-bg: var(--avcm-court-dark); --bs-btn-active-border-color: var(--avcm-court-dark);
  --bs-btn-disabled-bg: var(--avcm-court); --bs-btn-disabled-border-color: var(--avcm-court);
}
.btn-outline-primary {
  --bs-btn-color: var(--avcm-court); --bs-btn-border-color: var(--avcm-court);
  --bs-btn-hover-bg: var(--avcm-court); --bs-btn-hover-border-color: var(--avcm-court);
  --bs-btn-active-bg: var(--avcm-court-dark); --bs-btn-active-border-color: var(--avcm-court-dark);
}
.btn-ball {
  --bs-btn-color: var(--avcm-ball-ink); --bs-btn-bg: var(--avcm-ball); --bs-btn-border-color: var(--avcm-ball);
  --bs-btn-hover-color: var(--avcm-ball-ink); --bs-btn-hover-bg: #ffd43b; --bs-btn-hover-border-color: #ffd43b;
  --bs-btn-active-color: var(--avcm-ball-ink); --bs-btn-active-bg: #e0b30f; --bs-btn-active-border-color: #e0b30f;
}
.btn-line {
  --bs-btn-color: #fff; --bs-btn-border-color: rgba(255,255,255,.55);
  --bs-btn-hover-color: var(--avcm-night); --bs-btn-hover-bg: #fff; --bs-btn-hover-border-color: #fff;
}
.link-arrowless { font-weight: 600; text-decoration: none; }
.link-arrowless:hover { text-decoration: underline; }

/* ---- Cabeçalho -------------------------------------------------------- */
.avcm-header { background: var(--avcm-night); }
.avcm-header .navbar { --bs-navbar-padding-y: .65rem; }
.avcm-brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; }
.avcm-brand img { width: 44px; height: 44px; border-radius: 50%; background: #fff; object-fit: cover; }
.avcm-brand strong { font-family: var(--avcm-display); font-size: 1.6rem; line-height: 1; letter-spacing: .02em; }
.avcm-brand small { display: block; font-size: .78rem; color: rgba(255,255,255,.7); line-height: 1.25; max-width: 15rem; }
.avcm-header .nav-link {
  font-family: var(--avcm-display); font-weight: 600; font-size: 1.1rem;
  color: rgba(255,255,255,.82); padding: .5rem .8rem !important; border-radius: var(--avcm-radius-sm);
}
.avcm-header .nav-link:hover, .avcm-header .nav-link:focus-visible { color: #fff; background: rgba(255,255,255,.07); }
.avcm-header .nav-link.active { color: #fff; box-shadow: inset 0 -3px 0 var(--avcm-ball); }
.avcm-header .dropdown-menu { --bs-dropdown-link-active-bg: var(--avcm-court); border-radius: var(--avcm-radius); }
.avcm-header .navbar-toggler { border-color: rgba(255,255,255,.35); }
.avcm-header .btn-admin { color: rgba(255,255,255,.6); font-size: .9rem; }
.avcm-header .btn-admin:hover { color: #fff; }

/* Linha de campo: a linha branca que separa o cabeçalho do resto */
.court-line { height: 6px; background: var(--avcm-night); border-bottom: 2px solid rgba(255,255,255,.9); position: relative; }
.court-line::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 2px; height: 14px; background: rgba(255,255,255,.9); }

/* ---- Faixa de título das páginas ------------------------------------ */
.page-band {
  background: var(--avcm-night);
  color: #fff;
  padding-block: 2.75rem 2.5rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.page-band::before {
  /* meio-campo: linha de 3 m, linha central e lateral, em traço fino */
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, transparent calc(100% - 2px), rgba(255,255,255,.08) 0) right 18% top 0 / 34% 100% no-repeat,
    linear-gradient(90deg, rgba(255,255,255,.08) 2px, transparent 0) right 0 top 0 / 52% 100% no-repeat;
}
.page-band h1 { color: #fff; margin: 0; }
.page-band p { color: rgba(255,255,255,.75); max-width: 60ch; margin: .6rem 0 0; }
.page-band .breadcrumb { --bs-breadcrumb-divider-color: rgba(255,255,255,.45); --bs-breadcrumb-item-active-color: rgba(255,255,255,.7); margin-bottom: .75rem; font-size: .9rem; }
.page-band .breadcrumb a { color: rgba(255,255,255,.85); }

/* ---- Superfícies ------------------------------------------------------ */
.panel {
  background: var(--avcm-surface);
  border: 1px solid var(--avcm-rule);
  border-radius: var(--avcm-radius);
}
.panel-pad { padding: 1.25rem; }
@media (min-width: 768px) { .panel-pad { padding: 1.75rem; } }
.section { padding-block: 2.5rem; }
@media (min-width: 992px) { .section { padding-block: 3.5rem; } }
.section + .section { padding-top: 0; }
.home-hero + .section { padding-top: 2.5rem; }
@media (min-width: 992px) { .home-hero + .section { padding-top: 3.5rem; } }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.meta { color: var(--avcm-muted); font-size: .9rem; }

/* Números de resumo (uma linha discreta, não cartões) */
.figures { display: flex; flex-wrap: wrap; gap: .25rem 2rem; margin: 0; }
.figures div { display: flex; align-items: baseline; gap: .45rem; }
.figures dt { order: 2; font-weight: 400; color: var(--avcm-muted); font-size: .92rem; }
.figures dd { order: 1; margin: 0; font-family: var(--avcm-display); font-weight: 700; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.page-band .figures dt { color: rgba(255,255,255,.7); }
.page-band .figures { margin-top: 1.5rem; }

/* ---- Filtros ----------------------------------------------------------- */
.filters { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); align-items: end; }
.filters .form-label { font-size: .85rem; font-weight: 600; margin-bottom: .3rem; }
.form-control, .form-select { border-radius: var(--avcm-radius-sm); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--avcm-court); box-shadow: 0 0 0 .2rem rgba(245,197,24,.45); }
.form-check-input:checked { background-color: var(--avcm-court); border-color: var(--avcm-court); }
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .8rem;
  border: 1px solid var(--avcm-rule); border-radius: 999px; background: var(--avcm-surface);
  color: var(--avcm-ink); text-decoration: none; font-size: .9rem; font-weight: 550;
}
.chip:hover { border-color: var(--avcm-court); color: var(--avcm-court); }
.chip.is-active { background: var(--avcm-night); border-color: var(--avcm-night); color: #fff; }

/* ==========================================================================
   Placar — o elemento central do site
   ========================================================================== */
.scoreboard { list-style: none; margin: 0; padding: 0; }
.score-day { margin: 1.75rem 0 .5rem; font-family: var(--avcm-display); font-weight: 700; font-size: 1.25rem; display: flex; align-items: baseline; gap: .6rem; }
.score-day:first-child { margin-top: 0; }
.score-day small { font-family: var(--avcm-body); font-weight: 400; font-size: .85rem; color: var(--avcm-muted); }

.match {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  grid-template-areas: "when teams score" "when meta meta";
  column-gap: 1rem;
  row-gap: .35rem;
  align-items: center;
  background: var(--avcm-surface);
  border: 1px solid var(--avcm-rule);
  border-radius: var(--avcm-radius);
  padding: .85rem 1rem;
  color: var(--avcm-ink);
  text-decoration: none;
  position: relative;
}
a.match:hover { border-color: var(--avcm-court); }
a.match:hover .match-team-name { text-decoration: underline; text-decoration-color: var(--avcm-rule); }
.match-when { grid-area: when; align-self: stretch; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--avcm-rule); padding-right: .75rem; }
.match-when b { font-family: var(--avcm-display); font-size: 1.35rem; line-height: 1; font-variant-numeric: tabular-nums; }
.match-when span { font-size: .78rem; color: var(--avcm-muted); }
.match-teams { grid-area: teams; display: grid; gap: .3rem; min-width: 0; }
.match-team { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.match-team img, .crest {
  width: 28px; height: 28px; border-radius: 50%; object-fit: contain; background: #fff;
  border: 1px solid var(--avcm-rule); flex: 0 0 auto;
}
.crest-fallback { display: inline-grid; place-items: center; font-family: var(--avcm-display); font-weight: 700; font-size: .8rem; color: var(--avcm-night); background: var(--avcm-paper); }
.match-team-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-team.is-winner .match-team-name { font-weight: 750; }
.match-team.is-loser .match-team-name { color: var(--avcm-muted); font-weight: 500; }
.match-score { grid-area: score; display: grid; gap: .3rem; justify-items: end; }
.score-line { display: flex; align-items: center; gap: .25rem; }
.score-sets {
  font-family: var(--avcm-display); font-weight: 800; font-size: 1.35rem; line-height: 1;
  min-width: 1.9rem; height: 1.9rem; display: inline-grid; place-items: center;
  border-radius: var(--avcm-radius-sm); background: var(--avcm-paper); font-variant-numeric: tabular-nums;
}
.is-winner .score-sets { background: var(--avcm-ball); color: var(--avcm-ball-ink); }
.score-parcial {
  font-family: var(--avcm-display); font-weight: 600; font-size: .95rem; color: var(--avcm-muted);
  min-width: 1.6rem; text-align: center; font-variant-numeric: tabular-nums;
}
.score-parcial.won { color: var(--avcm-ink); font-weight: 700; }
.match-vs { font-family: var(--avcm-display); font-weight: 700; color: var(--avcm-muted); font-size: 1.05rem; }
.match-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: .2rem 1rem; font-size: .82rem; color: var(--avcm-muted); }
.match-meta i { margin-right: .25rem; }
.match.is-void { background: repeating-linear-gradient(135deg, var(--avcm-surface) 0 10px, #f8f4f2 10px 20px); }
.tag {
  display: inline-block; padding: .05rem .5rem; border-radius: var(--avcm-radius-sm);
  font-size: .75rem; font-weight: 650; background: var(--avcm-paper); color: var(--avcm-ink);
}
.tag-ball { background: var(--avcm-ball); color: var(--avcm-ball-ink); }
.tag-loss { background: #f6e1dc; color: var(--avcm-loss); }
.tag-court { background: #dcefe5; color: var(--avcm-court-dark); }

.match-wrap { container-type: inline-size; }
.match-wrap + .match-wrap { margin-top: .5rem; }
@container (max-width: 560px) {
  .match { grid-template-columns: 3.6rem 1fr auto; padding: .75rem; column-gap: .7rem; }
  .score-parcial { display: none; }
}

/* Placar grande (detalhe do jogo e destaque da home) */
.bigscore { color: #fff; }
.bigscore-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.bigscore-team { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .6rem; }
.bigscore-team img { width: 88px; height: 88px; border-radius: 50%; background: #fff; object-fit: contain; padding: 6px; }
.bigscore-team .crest-fallback { width: 88px; height: 88px; border-radius: 50%; font-size: 1.6rem; }
.bigscore-team a, .bigscore-team span { color: #fff; font-family: var(--avcm-display); font-weight: 700; font-size: 1.4rem; line-height: 1.1; text-decoration: none; }
.bigscore-result { font-family: var(--avcm-display); font-weight: 800; font-size: clamp(3rem, 9vw, 5.5rem); line-height: 1; font-variant-numeric: tabular-nums; display: flex; gap: .4rem; align-items: center; }
.bigscore-result .won { color: var(--avcm-ball); }
.bigscore-result .sep { color: rgba(255,255,255,.4); font-weight: 500; }
.bigscore-sets { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem; margin-top: 1.25rem; }
.bigscore-sets div { border: 1px solid rgba(255,255,255,.25); border-radius: var(--avcm-radius-sm); padding: .35rem .7rem; text-align: center; min-width: 4.5rem; }
.bigscore-sets small { display: block; font-size: .72rem; color: rgba(255,255,255,.6); }
.bigscore-sets b { font-family: var(--avcm-display); font-size: 1.2rem; font-variant-numeric: tabular-nums; }

/* ---- Tabela de classificação ----------------------------------------- */
.standings { --bs-table-bg: transparent; margin: 0; font-variant-numeric: tabular-nums; }
.standings thead th { font-size: .78rem; font-weight: 650; color: var(--avcm-muted); border-bottom-width: 2px; white-space: nowrap; }
.standings td, .standings th { vertical-align: middle; padding: .7rem .6rem; }
.standings .pos { font-family: var(--avcm-display); font-weight: 800; font-size: 1.25rem; width: 2.5rem; text-align: center; }
.standings .pts { font-family: var(--avcm-display); font-weight: 800; font-size: 1.25rem; }
.standings tr.lead-row .pos { color: var(--avcm-ball-ink); background: var(--avcm-ball); border-radius: var(--avcm-radius-sm); }
.standings tr.is-out td { color: var(--avcm-muted); }
.standings tr.is-out .club-cell { text-decoration: line-through; text-decoration-color: var(--avcm-loss); }
.club-cell { display: flex; align-items: center; gap: .6rem; font-weight: 600; min-width: 10rem; }
.club-cell a { color: inherit; text-decoration: none; }
.club-cell a:hover { text-decoration: underline; }

/* ---- Cartões de conteúdo (notícias, programas, clubes) --------------- */
.tile { display: flex; flex-direction: column; height: 100%; background: var(--avcm-surface); border: 1px solid var(--avcm-rule); border-radius: var(--avcm-radius); overflow: hidden; color: inherit; text-decoration: none; }
a.tile:hover { border-color: var(--avcm-court); }
a.tile:hover .tile-title { text-decoration: underline; text-decoration-thickness: 1px; }
.tile-media { aspect-ratio: 16 / 9; background: var(--avcm-night-2); overflow: hidden; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-media.is-empty { display: grid; place-items: center; color: rgba(255,255,255,.35); font-size: 2.25rem; }
.tile-body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.tile-title { font-family: var(--avcm-display); font-weight: 700; font-size: 1.35rem; line-height: 1.1; margin: 0; }
.tile-text { color: var(--avcm-muted); font-size: .95rem; margin: 0; }

/* Clubes: lista com escudo grande */
.club-card { display: grid; grid-template-columns: 64px 1fr; gap: 1rem; align-items: center; padding: 1rem; height: 100%; }
.club-card img, .club-card .crest-fallback { width: 64px; height: 64px; border-radius: 50%; object-fit: contain; background: #fff; border: 1px solid var(--avcm-rule); }
.club-card h3 { font-size: 1.4rem; margin: 0 0 .15rem; }
.record { display: flex; gap: .9rem; font-size: .88rem; color: var(--avcm-muted); font-variant-numeric: tabular-nums; margin-top: .35rem; }
.record b { color: var(--avcm-ink); font-family: var(--avcm-display); font-size: 1.1rem; margin-right: .15rem; }

/* ---- Home ------------------------------------------------------------- */
.home-hero { background: var(--avcm-night); color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.home-hero .court-svg { position: absolute; z-index: -1; right: -6%; top: 50%; width: min(70rem, 120%); transform: translateY(-50%); opacity: .14; pointer-events: none; }
.home-hero h1 { color: #fff; font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: .98; margin: 0 0 1rem; max-width: 12ch; }
.home-hero p { color: rgba(255,255,255,.78); max-width: 46ch; font-size: 1.08rem; }
.home-hero .match { border-color: transparent; }
.hero-board { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--avcm-radius-lg); padding: 1rem; }
.hero-board h2 { color: #fff; font-size: 1.35rem; margin: .1rem .25rem .85rem; display: flex; justify-content: space-between; align-items: baseline; }
.hero-board h2 a { font-family: var(--avcm-body); font-size: .88rem; font-weight: 600; color: var(--avcm-ball); }
.hero-board .empty { color: rgba(255,255,255,.7); padding: 1rem .25rem; margin: 0; }
.board-subhead { color: rgba(255,255,255,.7); font-family: var(--avcm-body); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 1.1rem .25rem .5rem; }

/* Próximos jogos da home: lista compacta, uma linha por jogo */
.fixture-list { container-type: inline-size; list-style: none; margin: 0; padding: 0; background: var(--avcm-surface); border-radius: var(--avcm-radius); overflow: hidden; }
.fixture-day {
  padding: .45rem 1rem; background: var(--avcm-paper); color: var(--avcm-muted);
  font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.fixture-day:first-letter { text-transform: uppercase; }
.fixture-list li:not(.fixture-day) + li:not(.fixture-day) .fixture { border-top: 1px solid var(--avcm-rule); }
.fixture {
  display: grid; grid-template-columns: 3.1rem minmax(0, 1fr) auto; grid-template-areas: "time teams tags" "time meta meta";
  column-gap: .85rem; row-gap: .2rem; align-items: center;
  padding: .7rem 1rem; color: var(--avcm-ink); text-decoration: none;
}
.fixture:hover { background: #f6faf8; }
.fixture:hover .fixture-name { text-decoration: underline; text-decoration-color: var(--avcm-rule); }
.fixture-time {
  grid-area: time; align-self: stretch; display: grid; place-items: center start;
  font-family: var(--avcm-display); font-weight: 700; font-size: 1.2rem; font-variant-numeric: tabular-nums;
  border-right: 1px solid var(--avcm-rule);
}
.fixture-teams { grid-area: teams; display: grid; gap: .25rem; min-width: 0; }
.fixture-team { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.fixture-name { font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fixture-tags { grid-area: tags; display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }
.fixture-cat { white-space: nowrap; }
.fixture-cat.is-m { background: #e3ebf7; color: var(--avcm-blue); }
.fixture-cat.is-f { background: #f7e6ee; color: #9b2c5c; }
.fixture-meta { grid-area: meta; font-size: .78rem; color: var(--avcm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@container (max-width: 440px) {
  .fixture { grid-template-columns: 2.9rem minmax(0, 1fr); grid-template-areas: "time teams" "time tags" "time meta"; padding: .7rem .85rem; column-gap: .75rem; }
  .fixture-tags { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; margin-top: .15rem; }
}

/* Grandes finais (sénior masculina e feminina) */
.finals-grid { display: grid; gap: .65rem; }
@media (min-width: 576px) { .finals-grid.is-pair { grid-template-columns: 1fr 1fr; } }
.final-card {
  --final-accent: var(--avcm-ball);
  display: flex; flex-direction: column; gap: .85rem; padding: 1rem;
  border-radius: var(--avcm-radius); color: #fff; text-decoration: none;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(245,197,24,.22), transparent 60%),
    linear-gradient(160deg, var(--avcm-night-2), #0a231b);
  border: 1px solid rgba(245,197,24,.55);
  box-shadow: 0 0 0 1px rgba(245,197,24,.12), 0 10px 30px rgba(0,0,0,.25);
  transition: border-color .15s ease, transform .15s ease;
}
.final-card:hover { color: #fff; border-color: var(--final-accent); transform: translateY(-2px); }
.final-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.final-badge {
  display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; border-radius: 999px;
  background: var(--avcm-ball); color: var(--avcm-ball-ink);
  font-family: var(--avcm-display); font-weight: 800; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase;
}
.final-cat { font-family: var(--avcm-display); font-weight: 700; font-size: 1.05rem; color: rgba(255,255,255,.9); text-align: right; }
.final-faceoff { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: .5rem; }
.final-team { display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; min-width: 0; }
.final-team .crest { border: 2px solid rgba(255,255,255,.85); box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.final-team span:not(.crest) { font-weight: 700; font-size: .92rem; line-height: 1.2; overflow-wrap: anywhere; }
.final-when { display: flex; flex-direction: column; align-items: center; padding-top: .6rem; }
.final-when b { font-family: var(--avcm-display); font-weight: 800; font-size: 1.5rem; line-height: 1; color: var(--avcm-ball); white-space: nowrap; }
.final-when small { font-size: .74rem; color: rgba(255,255,255,.7); white-space: nowrap; margin-top: .2rem; }
.final-foot { display: flex; flex-direction: column; gap: .15rem; font-size: .78rem; color: rgba(255,255,255,.7); border-top: 1px solid rgba(255,255,255,.12); padding-top: .6rem; }
.final-foot i { margin-right: .25rem; }
@media (prefers-reduced-motion: reduce) { .final-card { transition: none; } .final-card:hover { transform: none; } }

/* Percurso do atleta (página do atleta): uma linha por passagem por cada equipa */
.career-list { list-style: none; margin: .9rem 0 0; padding: 0; position: relative; }
.career-list::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: var(--avcm-rule); }
.career-list li { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: .75rem; align-items: start; padding: .45rem 0; }
.career-list .crest { position: relative; z-index: 1; background: #fff; border: 2px solid var(--avcm-rule); border-radius: 50%; }
.career-list li.is-current .crest { border-color: var(--avcm-court); box-shadow: 0 0 0 3px #e8f3ed; }
.career-body { min-width: 0; }
.career-body a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.career-years { font-family: var(--avcm-display); font-weight: 700; font-size: 1.05rem; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .1rem; }
.career-list li.is-current .career-years { color: var(--avcm-court-dark); }
.career-years .tag { font-family: var(--avcm-body); }

/* Campeonato a caminho: faixa amarela no topo da home com contagem decrescente */
.event-spotlight { background: var(--avcm-ball); color: var(--avcm-ball-ink); padding-block: 1.25rem; border-bottom: 3px solid var(--avcm-night); }
.spotlight { display: grid; gap: 1rem 2.5rem; align-items: center; }
@media (min-width: 992px) { .spotlight { grid-template-columns: minmax(0, 1fr) auto; } .event-spotlight { padding-block: 1.6rem; } }
/* Com logótipo: no telemóvel o logo fica ao lado da etiqueta e o resto usa a largura toda;
   no computador o logo ocupa a coluna da esquerda, ao lado de todo o texto. */
.spotlight-info { min-width: 0; }
.spotlight-info.has-logo { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .85rem; align-items: center; }
.spotlight-info.has-logo .spotlight-text { display: contents; }
.spotlight-info.has-logo .spotlight-text > * { grid-column: 1 / -1; }
.spotlight-info.has-logo .spotlight-logo { grid-column: 1; grid-row: 1; }
.spotlight-info.has-logo .spotlight-kicker { grid-column: 2; grid-row: 1; margin: 0; }
.spotlight-info.has-logo h2 { margin-top: .7rem; }
.spotlight-logo { width: 52px; height: 52px; object-fit: contain; background: #fff; border-radius: var(--avcm-radius); border: 2px solid var(--avcm-night); padding: .2rem; }
@media (min-width: 992px) {
  .spotlight-info.has-logo { column-gap: 1.25rem; align-items: start; }
  .spotlight-info.has-logo .spotlight-text > * { grid-column: 2; }
  .spotlight-info.has-logo .spotlight-logo { grid-row: 1 / span 5; width: 88px; height: 88px; align-self: center; }
  .spotlight-info.has-logo .spotlight-kicker { margin-bottom: .3rem; }
  .spotlight-info.has-logo h2 { margin-top: 0; }
}
.spotlight-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; margin: 0 0 .3rem; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.spotlight-state { background: var(--avcm-night); color: var(--avcm-ball); padding: .1rem .55rem; border-radius: 999px; }
.event-spotlight h2 { color: var(--avcm-night); font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1; margin: 0 0 .45rem; }
.spotlight-meta { display: flex; flex-wrap: wrap; gap: .2rem 1.25rem; list-style: none; margin: 0; padding: 0; font-weight: 600; font-size: .95rem; }
.spotlight-meta i { margin-right: .3rem; }
.spotlight-desc { margin: .45rem 0 0; max-width: 60ch; font-size: .95rem; }
.spotlight-links { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.25rem; margin-top: .55rem; }
.spotlight-link { position: relative; z-index: 2; font-weight: 700; color: var(--avcm-night); text-underline-offset: .2em; }
.spotlight-link:hover { color: var(--avcm-night); }
/* Na página inicial a faixa inteira (contagem incluída) leva à página do evento. */
.event-spotlight.is-link { position: relative; cursor: pointer; transition: background-color .15s ease; }
.event-spotlight.is-link:hover { background: #ffd43b; }
.spotlight-main { color: inherit; text-decoration: none; }
.spotlight-main::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.spotlight-main:focus-visible { outline: none; }
.event-spotlight.is-link:has(.spotlight-main:focus-visible) { outline: 3px solid var(--avcm-night); outline-offset: -3px; }
.spotlight-cta { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .85rem; border-radius: 999px;
  background: var(--avcm-night); color: var(--avcm-ball); font-weight: 700; font-size: .92rem; }
.event-spotlight.is-link:hover .spotlight-cta .bi { transform: translateX(3px); }
.spotlight-cta .bi { transition: transform .15s ease; }
.event-spotlight h1 { color: var(--avcm-night); font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1; margin: 0 0 .45rem; }

/* Página de um campeonato (evento) */
.tn-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--avcm-rule); }
.tn-head .nav-underline { border-bottom: 0; }
.tn-progress { margin: 0; font-size: .88rem; color: var(--avcm-muted); }
.tn-progress b { font-family: var(--avcm-display); font-size: 1.05rem; color: var(--avcm-ink); }
.tn-filter { max-width: 22rem; }
.tn-live-title { display: flex; align-items: center; gap: .5rem; font-size: 1.3rem; }
.match.is-live { border-color: #ff4d3a; box-shadow: 0 0 0 1px rgba(255,77,58,.25); }
.score-day.is-today { color: var(--avcm-court-dark); }
.match-team.is-pending .match-team-name { color: var(--avcm-muted); font-style: italic; font-weight: 500; }
.match-team-name a { color: inherit; position: relative; z-index: 1; }
.tag-avcm { background: var(--avcm-night); color: var(--avcm-ball); font-size: .66rem; letter-spacing: .04em; }
.tn-groups { display: grid; gap: 1rem; }
@media (min-width: 992px) { .tn-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tn-group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1rem 1rem .25rem; }
.standings tr.is-qualified td.pos { box-shadow: inset 4px 0 0 var(--avcm-court); color: var(--avcm-court-dark); }
.tn-key { display: inline-block; width: 4px; height: 1em; background: var(--avcm-court); vertical-align: -2px; margin-right: .3rem; }
.tn-teams { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .65rem; }
.tn-teams li { display: flex; gap: .75rem; align-items: center; }
.tn-bracket { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(17rem, 1fr); gap: 1rem; overflow-x: auto; padding-bottom: .5rem; align-items: start; }
.tn-round { display: grid; gap: .5rem; }
.tn-round-title { font-size: 1.05rem; font-family: var(--avcm-body); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--avcm-muted); margin: 0 0 .25rem; }
.tn-round .match-wrap + .match-wrap { margin-top: 0; }
@media (max-width: 767.98px) { .tn-bracket { grid-auto-flow: row; grid-auto-columns: auto; } }
.tn-bracket .bk-champion { display: flex; align-items: center; gap: .6rem; padding: .9rem 1rem; border-radius: var(--avcm-radius); background: var(--avcm-surface); border: 1px dashed var(--avcm-rule); color: var(--avcm-muted); font-weight: 600; }
.tn-bracket .bk-champion::before { content: none; }
.tn-bracket .bk-champion .bi { color: var(--avcm-muted); font-size: 1.3rem; }
.tn-bracket .bk-champion.is-known { background: var(--avcm-night); border: 0; color: #fff; font-family: var(--avcm-display); font-size: 1.35rem; }
.tn-bracket .bk-champion.is-known .bi { color: var(--avcm-ball); }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.countdown-unit { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 4.6rem; padding: .55rem .4rem .45rem; background: var(--avcm-night); border-radius: var(--avcm-radius); }
.countdown-unit b { font-family: var(--avcm-display); font-weight: 800; font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1; color: var(--avcm-ball); }
.countdown-unit span { margin-top: .2rem; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.countdown-live { display: none; align-items: center; gap: .55rem; margin: 0; padding: .6rem 1.1rem; border-radius: 999px; background: var(--avcm-night); color: #fff; font-family: var(--avcm-display); font-weight: 700; font-size: 1.35rem; justify-self: start; }
.live-dot { width: .65rem; height: .65rem; border-radius: 50%; background: #ff4d3a; box-shadow: 0 0 0 0 rgba(255,77,58,.6); animation: live-pulse 1.6s ease-out infinite; }
@keyframes live-pulse { to { box-shadow: 0 0 0 .6rem rgba(255,77,58,0); } }
.event-spotlight.is-live .countdown { display: none; }
.event-spotlight.is-live .countdown-live { display: inline-flex; }
@media (min-width: 992px) { .countdown-live { justify-self: end; } }
/* Convite para ativar as notificações (página inicial, telemóvel) */
.push-invite {
  position: fixed; z-index: 1080; left: .75rem; right: .75rem;
  bottom: calc(var(--app-tab-h, 0px) + var(--app-safe-bottom, 0px) + .75rem);
  display: flex; gap: .85rem; align-items: flex-start; padding: 1rem;
  background: var(--avcm-night); color: #fff; border-radius: 18px;
  box-shadow: 0 14px 40px rgba(0,0,0,.35); border: 1px solid rgba(245,197,24,.45);
  animation: app-sheet-up .32s cubic-bezier(.2,.8,.2,1) both;
}
.push-invite[hidden] { display: none; }
.push-invite-icon { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--avcm-ball); color: var(--avcm-ball-ink); font-size: 1.15rem; }
.push-invite-text p { margin: 0; font-size: .9rem; color: rgba(255,255,255,.78); line-height: 1.4; }
.push-invite-text .push-invite-title { font-family: var(--avcm-display); font-weight: 700; font-size: 1.25rem; color: #fff; line-height: 1.1; margin-bottom: .25rem; }
.push-invite-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.push-invite-later { color: rgba(255,255,255,.75); }
.push-invite-later:hover, .push-invite-later:focus { color: #fff; }
@media (min-width: 992px) { .push-invite { left: auto; right: 1.5rem; bottom: 1.5rem; max-width: 26rem; } }
@media (max-width: 991.98px) {
  .event-spotlight { padding-block: 1rem 1.1rem; }
  .spotlight-meta { font-size: .9rem; }
  .countdown-unit { min-width: 0; border-radius: 14px; }
}

.about-grid { display: grid; gap: 2rem; }
@media (min-width: 992px) { .about-grid { grid-template-columns: 5fr 7fr; gap: 4rem; align-items: start; } }
.pillars { display: grid; gap: 1.25rem; }
@media (min-width: 768px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar h3 { font-size: 1.35rem; margin-bottom: .4rem; }
.pillar p { color: var(--avcm-muted); margin: 0; }
.pillar { border-top: 3px solid var(--avcm-court); padding-top: 1rem; }

.photo-grid { display: grid; gap: .5rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .photo-grid { grid-template-columns: repeat(4, 1fr); } .photo-grid > :first-child { grid-column: span 2; grid-row: span 2; } }
.photo-grid a, .photo-grid figure { display: block; position: relative; margin: 0; border-radius: var(--avcm-radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--avcm-night-2); }
.photo-grid > :first-child { aspect-ratio: auto; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-grid figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: .6rem .75rem; color: #fff; font-size: .88rem; font-weight: 600; background: linear-gradient(transparent, rgba(13,43,34,.85)); }

/* ---- Parceiros e rodapé ----------------------------------------------- */
.partners { border-top: 1px solid var(--avcm-rule); background: var(--avcm-surface); }
.partner-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.25rem 2.5rem; list-style: none; padding: 0; margin: 0; }
.partner-logos img { max-height: 56px; max-width: 140px; object-fit: contain; filter: grayscale(1); opacity: .75; }
.partner-logos a:hover img, .partner-logos a:focus-visible img { filter: none; opacity: 1; }
.avcm-footer { background: var(--avcm-night); color: rgba(255,255,255,.75); font-size: .95rem; }
.avcm-footer h2 { color: #fff; font-size: 1.2rem; margin-bottom: .8rem; }
.avcm-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.avcm-footer a:hover { color: #fff; text-decoration: underline; }
.avcm-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.avcm-footer .social a { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; }
.avcm-footer .motto { font-family: var(--avcm-display); font-weight: 700; color: var(--avcm-ball); font-size: 1.1rem; }

/* ---- Estados ---------------------------------------------------------- */
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--avcm-muted); }
.empty-state i { font-size: 2rem; display: block; margin-bottom: .5rem; color: var(--avcm-rule); }
.empty-state p { margin: 0 auto .75rem; max-width: 40ch; }
.pagination { --bs-pagination-active-bg: var(--avcm-court); --bs-pagination-active-border-color: var(--avcm-court); --bs-pagination-color: var(--avcm-court); --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(245,197,24,.45); }
.alert { border-radius: var(--avcm-radius); }

/* Calendário mensal */
.month-cal { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 4px; font-variant-numeric: tabular-nums; }
.month-cal th { font-size: .75rem; color: var(--avcm-muted); text-align: center; font-weight: 600; }
.month-cal td { height: 3rem; text-align: center; vertical-align: middle; border-radius: var(--avcm-radius-sm); }
.month-cal td.is-day { background: var(--avcm-paper); }
.month-cal td.is-today { box-shadow: inset 0 0 0 2px var(--avcm-court); font-weight: 700; }
.month-cal button.has-games {
  width: 100%; height: 100%; border: 0; border-radius: var(--avcm-radius-sm); background: var(--avcm-night); color: #fff;
  font-weight: 700; display: grid; place-items: center; line-height: 1.1; padding: .2rem;
}
.month-cal button.has-games small { font-size: .65rem; font-weight: 500; color: var(--avcm-ball); }
.month-cal button.has-games:hover { background: var(--avcm-court); }

/* Acordeão (FAQ, equipas) */
.accordion { --bs-accordion-active-bg: #e8f3ed; --bs-accordion-active-color: var(--avcm-ink); --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem rgba(245,197,24,.45); --bs-accordion-border-radius: var(--avcm-radius); --bs-accordion-inner-border-radius: var(--avcm-radius); }
.accordion-button { font-weight: 600; }

.nav-underline { --bs-nav-underline-link-active-color: var(--avcm-ink); --bs-nav-link-color: var(--avcm-muted); --bs-nav-link-hover-color: var(--avcm-court); --bs-nav-underline-border-width: 3px; }
.nav-underline .nav-link.active { border-bottom-color: var(--avcm-ball); }
.modal-content { border-radius: var(--avcm-radius-lg); border: 0; }
.modal-header { border-bottom-color: var(--avcm-rule); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Disputa de cada set: barra dividida pelos pontos de cada equipa */
.set-bars { display: grid; gap: .65rem; }
.set-bar { display: grid; grid-template-columns: 3.2rem 2.2rem 1fr 2.2rem; align-items: center; gap: .6rem; font-variant-numeric: tabular-nums; }
.set-bar .label { font-size: .82rem; color: var(--avcm-muted); }
.set-bar .n { font-family: var(--avcm-display); font-weight: 700; font-size: 1.15rem; text-align: center; }
.set-bar .n.won { color: var(--avcm-court-dark); }
.set-bar .track { display: flex; height: .8rem; border-radius: 999px; overflow: hidden; background: var(--avcm-paper); }
.set-bar .home { background: var(--avcm-night); }
.set-bar .away { background: #9fb8ad; }
.legend-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .35rem; vertical-align: baseline; }
.h2h-bar { display: flex; height: .6rem; border-radius: 999px; overflow: hidden; background: var(--avcm-paper); }
.tile .link-arrowless { color: var(--avcm-court); }

/* ==========================================================================
   Telemóvel e tablet (< 992px): o site comporta-se como uma app.
   Barra superior compacta, separadores em baixo, folhas que sobem do fundo.
   O computador (>= 992px) não é afectado por nada abaixo.
   ========================================================================== */

/* Elementos que só existem no telemóvel */
.app-back, .app-actions, .tabbar, .app-sheet, .nav-progress, .app-toast, .m-filter-bar, .m-sheet-head { display: none; }
.offline-state { text-align: center; max-width: 32rem; margin: 2rem auto; }
.offline-state i { font-size: 3rem; color: var(--avcm-court); display: block; margin-bottom: .75rem; }
.offline-state h1 { font-size: 2rem; }
.offline-state p { color: var(--avcm-muted); margin: .75rem 0 1.5rem; }

@keyframes app-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes app-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes app-progress { from { transform: scaleX(0); } to { transform: scaleX(.92); } }
@keyframes app-page-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes app-page-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 991.98px) {
  :root {
    --app-bar-h: 56px;
    --app-tab-h: 64px;
    --app-safe-top: env(safe-area-inset-top, 0px);
    --app-safe-bottom: env(safe-area-inset-bottom, 0px);
    --app-ease: cubic-bezier(.2, .8, .2, 1);
  }
  html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
  body {
    padding-bottom: calc(var(--app-tab-h) + var(--app-safe-bottom));
    touch-action: manipulation;
  }
  .container { padding-inline: max(1rem, env(safe-area-inset-left, 0px)) max(1rem, env(safe-area-inset-right, 0px)); }
  a, button, .btn, summary { -webkit-touch-callout: none; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }
  /* Campos com 16px: o iPhone não faz zoom ao tocar */
  .form-control, .form-select { font-size: 16px; min-height: 46px; }

  /* ---- Nada pode ficar mais largo do que o ecrã ------------------------ */
  /* Sem isto, o Chrome/Samsung Internet alarga a página inteira (e as folhas fixas)
     quando um único elemento transborda. */
  html { overflow-x: hidden; }
  @supports (overflow-x: clip) { html, body { overflow-x: clip; } }
  main, .container, .row > *, .about-grid > *, .pillars > *, .filters > *, .panel, .tile, .match-teams { min-width: 0; }
  .d-grid > *, .d-flex > *, .partner-logos > * { min-width: 0; }
  a[href^="mailto:"], a[href^="http"]:not(.btn):not(.chip) { overflow-wrap: anywhere; }
  h1, h2, h3, h4, p, li, dd, td, th, a, .tile-title, .lead { overflow-wrap: break-word; }
  img, svg, video, canvas { max-width: 100%; }

  /* Conteúdo vindo do editor (notícias, programas, documentos) */
  .prose { overflow-wrap: anywhere; }
  .prose img, .prose video { height: auto !important; }
  .prose iframe, .prose embed, .prose object { max-width: 100%; width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; border: 0; }
  .prose table { display: block; max-width: 100%; width: auto !important; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .prose pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; }
  .prose figure { max-width: 100%; margin-inline: 0; }
  .prose [style*="width"] { max-width: 100% !important; }

  /* ---- Barra superior ------------------------------------------------- */
  .avcm-header {
    position: sticky; top: 0; z-index: 1030;
    padding-top: var(--app-safe-top);
    border-bottom: 2px solid rgba(255,255,255,.9);
    transition: transform .28s var(--app-ease);
  }
  .avcm-header.is-hidden { transform: translateY(calc(-100% - 2px)); }
  .avcm-header .navbar { --bs-navbar-padding-y: 0; }
  .avcm-header .navbar > .container { flex-wrap: nowrap; justify-content: flex-start; gap: .25rem; min-height: var(--app-bar-h); }
  .avcm-header .navbar-toggler, .avcm-header .navbar-collapse { display: none !important; }
  .court-line { display: none; }
  .avcm-brand { gap: .55rem; min-width: 0; }
  .avcm-brand img { width: 34px; height: 34px; }
  .avcm-brand strong { font-size: 1.4rem; }
  .is-app-sub .avcm-brand img { width: 30px; height: 30px; }
  .app-back, .app-icon-btn {
    width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%;
    background: transparent; color: #fff; font-size: 1.3rem; line-height: 1;
    place-items: center; text-decoration: none;
  }
  .app-icon-btn { display: inline-grid; }
  .app-back { margin-left: -.6rem; font-size: 1.45rem; }
  .is-app-sub .app-back { display: inline-grid; }
  .app-back:active, .app-icon-btn:active { background: rgba(255,255,255,.14); }
  .app-actions { display: flex; align-items: center; margin-left: auto; margin-right: -.6rem; }
  .app-icon-btn.d-none { display: none; }

  /* Barra de progresso ao mudar de página */
  .nav-progress {
    display: block; position: fixed; z-index: 2000; left: 0; right: 0; top: var(--app-safe-top); height: 3px;
    background: var(--avcm-ball); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none;
  }
  html.is-navigating .nav-progress { animation: app-progress 6s cubic-bezier(.08, .7, .1, 1) forwards; }

  /* ---- Separadores em baixo ------------------------------------------ */
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; z-index: 1035; left: 0; right: 0; bottom: 0;
    padding: 6px max(.25rem, env(safe-area-inset-left, 0px)) calc(6px + var(--app-safe-bottom)) max(.25rem, env(safe-area-inset-right, 0px));
    background: rgba(13, 43, 34, .96);
    border-top: 1px solid rgba(255,255,255,.08);
  }
  @supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .tabbar { background: rgba(13, 43, 34, .86); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px); }
  }
  .tabbar-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 52px; padding: 0; border: 0; background: none; cursor: pointer;
    color: rgba(255,255,255,.62); text-decoration: none;
    font-size: .72rem; font-weight: 600; letter-spacing: .01em; line-height: 1.1;
  }
  .tabbar-icon {
    width: 58px; height: 30px; border-radius: 999px; display: grid; place-items: center;
    font-size: 1.2rem; transition: background-color .2s ease, transform .12s ease;
  }
  .tabbar-icon .bi + .bi, .tabbar-item.is-active .tabbar-icon .bi:first-child { display: none; }
  .tabbar-item.is-active .tabbar-icon .bi + .bi { display: inline-block; }
  .tabbar-item.is-active { color: #fff; }
  .tabbar-item.is-active .tabbar-icon { background: var(--avcm-ball); color: var(--avcm-ball-ink); }
  .tabbar-item:active .tabbar-icon { transform: scale(.9); }
  .tabbar-item:focus-visible { outline: none; }
  .tabbar-item:focus-visible .tabbar-icon { box-shadow: 0 0 0 3px var(--avcm-ball); }

  /* ---- Folhas que sobem do fundo ("Mais", filtros, modais) ------------- */
  .sheet-grabber, .modal:not(#lightbox) .modal-content::before {
    content: ""; display: block; flex: none; width: 40px; height: 5px; border-radius: 3px;
    background: #c9d3ce; margin: 8px auto 2px;
  }
  .app-sheet {
    display: flex; --bs-offcanvas-height: auto; max-height: 88dvh;
    border: 0 !important; border-radius: 22px 22px 0 0;
    padding-bottom: var(--app-safe-bottom); background: var(--avcm-surface);
    --bs-offcanvas-transition: transform .32s var(--app-ease);
  }
  .app-sheet:focus, .app-sheet:focus-visible { outline: none; }
  .app-sheet .offcanvas-header { padding: .35rem 1.25rem .5rem; }
  .app-sheet .offcanvas-title { font-size: 1.7rem; margin: 0; }
  .app-sheet .offcanvas-body { padding: .25rem 1rem 1rem; overscroll-behavior: contain; }
  .offcanvas-backdrop.show { opacity: .45; }

  .app-grid { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem; }
  .app-grid a {
    display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .6rem .15rem;
    border-radius: 16px; color: var(--avcm-ink); text-decoration: none; text-align: center;
    font-size: .8rem; font-weight: 600; line-height: 1.15;
  }
  .app-grid i {
    width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
    background: #e8f3ed; color: var(--avcm-court-dark); font-size: 1.4rem; transition: transform .12s ease;
  }
  .app-grid a.is-active i { background: var(--avcm-night); color: var(--avcm-ball); }
  .app-grid a:active i { transform: scale(.92); }

  .app-list { list-style: none; margin: 0; padding: 0; background: var(--avcm-paper); border-radius: 16px; overflow: hidden; }
  .app-list li + li { border-top: 1px solid var(--avcm-rule); }
  .app-list a, .app-list button, .app-list summary {
    display: flex; align-items: center; gap: .9rem; width: 100%; min-height: 58px; padding: .7rem 1rem;
    background: none; border: 0; color: var(--avcm-ink); text-decoration: none; text-align: left;
    font-weight: 600; cursor: pointer; list-style: none;
  }
  .app-list summary::-webkit-details-marker { display: none; }
  .app-list a:active, .app-list button:active, .app-list summary:active { background: #e6ece9; }
  .app-list a > i, .app-list button > i, .app-list summary > i { font-size: 1.25rem; width: 1.5rem; text-align: center; color: var(--avcm-court); }
  .app-list small { display: block; font-weight: 400; font-size: .8rem; color: var(--avcm-muted); margin-top: 1px; }
  .app-list a::after, .app-list button::after, .app-list summary::after {
    content: "\f285"; font-family: bootstrap-icons; margin-left: auto; color: #9aa9a2; font-size: .9rem;
  }
  .app-list details[open] summary::after { transform: rotate(90deg); }
  .app-list details p { margin: 0; padding: 0 1rem 1rem 3.4rem; color: var(--avcm-muted); font-size: .92rem; }
  .app-list details p i { margin: 0 .2rem; color: var(--avcm-court); }
  .app-list .app-list-note { margin: 0; padding: 0 1rem .9rem 3.4rem; color: var(--avcm-muted); font-size: .85rem; }
  .app-list .app-list-note i { margin: 0 .1rem; color: var(--avcm-court); }
  .app-sheet-social { display: flex; align-items: center; gap: .5rem; padding: 1rem .25rem .25rem; }
  .app-sheet-social a {
    width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center;
    background: var(--avcm-paper); color: var(--avcm-night); text-decoration: none; font-size: 1.15rem;
  }
  .app-sheet-social span { margin-left: auto; font-family: var(--avcm-display); font-weight: 700; color: var(--avcm-court); }

  /* Modais (contacto, jogos do dia, inscrições) sobem do fundo como folhas */
  .modal:not(#lightbox) .modal-dialog {
    position: absolute; left: 0; right: 0; bottom: 0; margin: 0; width: 100%; max-width: none;
    min-height: 0; height: auto; display: flex; align-items: flex-end;
  }
  .modal:not(#lightbox).fade .modal-dialog { transform: translateY(100%); transition: transform .32s var(--app-ease); }
  .modal:not(#lightbox).show .modal-dialog { transform: none; }
  .modal:not(#lightbox) .modal-content {
    width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0;
    padding-bottom: var(--app-safe-bottom);
  }
  .modal:not(#lightbox) .modal-dialog-scrollable .modal-content { max-height: 92dvh; }
  .modal:not(#lightbox) .modal-header { border-bottom: 0; padding: .35rem 1.25rem .5rem; }
  .modal:not(#lightbox) .modal-footer { border-top: 0; padding: .5rem 1.25rem 1rem; }
  .modal:not(#lightbox) .modal-footer .btn { flex: 1; }
  .modal-backdrop.show { opacity: .45; }
  #lightbox .modal-dialog { margin: 0; min-height: 100dvh; max-width: none; }
  #lightbox .modal-content { padding: var(--app-safe-top) .5rem var(--app-safe-bottom); }
  #lightbox img { max-height: 80dvh !important; }

  /* Filtros (jogos, resultados): botão + folha, criados pelo avcm.js */
  .m-filter-bar {
    display: flex; position: sticky; z-index: 6; top: calc(var(--app-bar-h) + var(--app-safe-top) + 2px);
    align-items: center; gap: .5rem; margin: -1.25rem -1rem 1rem; padding: .6rem 1rem;
    background: rgba(243, 246, 244, .94); border-bottom: 1px solid var(--avcm-rule);
    transition: top .28s var(--app-ease);
  }
  html.app-header-hidden .m-filter-bar { top: 0; }
  @supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .m-filter-bar { background: rgba(243, 246, 244, .9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  }
  .m-filter-btn {
    flex: none; display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: .35rem .95rem;
    border: 1px solid var(--avcm-night); border-radius: 999px; background: var(--avcm-night); color: #fff; font-weight: 600;
  }
  .m-filter-btn .count {
    min-width: 1.35rem; height: 1.35rem; padding: 0 .35rem; border-radius: 999px; display: inline-grid; place-items: center;
    background: var(--avcm-ball); color: var(--avcm-ball-ink); font-size: .75rem; font-weight: 750;
  }
  .m-filter-summary { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; min-width: 0; }
  .m-filter-summary::-webkit-scrollbar { display: none; }
  .m-filter-summary span {
    flex: none; padding: .3rem .7rem; border-radius: 999px; background: var(--avcm-surface);
    border: 1px solid var(--avcm-rule); font-size: .82rem; font-weight: 550; white-space: nowrap;
  }
  .m-filter-summary .is-hint { border: 0; background: none; color: var(--avcm-muted); padding-left: .2rem; }
  form.m-filter-sheet { display: none; }
  form.m-filter-sheet.is-open {
    display: block; position: fixed; z-index: 1056; left: 0; right: 0; bottom: 0; margin: 0 !important;
    max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
    border: 0; border-radius: 22px 22px 0 0; padding: 0 1.25rem calc(1rem + var(--app-safe-bottom));
    box-shadow: 0 -12px 40px rgba(0,0,0,.25); animation: app-sheet-up .32s var(--app-ease);
  }
  .m-sheet-head {
    position: sticky; top: 0; z-index: 2; margin: 0 -1.25rem .5rem; padding: 0 1.25rem .5rem;
    background: var(--avcm-surface); display: flex; flex-direction: column;
  }
  .m-sheet-head > div { display: flex; align-items: center; justify-content: space-between; }
  .m-sheet-head h2 { font-size: 1.7rem; margin: 0; outline: none; }
  .m-backdrop { position: fixed; inset: 0; z-index: 1055; background: rgba(8, 20, 16, .45); animation: app-fade-in .2s ease; }
  .m-filter-sheet .filters { grid-template-columns: 1fr; }
  .m-filter-sheet .vr { display: none !important; }
  .m-filter-sheet .form-check { position: relative; padding: 0; margin: 0; min-height: 0; }
  .m-filter-sheet .form-check-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
  .m-filter-sheet .form-check-label {
    display: inline-flex; align-items: center; min-height: 40px; padding: .35rem 1rem; border-radius: 999px;
    border: 1px solid var(--avcm-rule); background: var(--avcm-surface); font-weight: 600; font-size: .92rem; cursor: pointer;
  }
  .m-filter-sheet .form-check-input:checked + .form-check-label { background: var(--avcm-night); border-color: var(--avcm-night); color: #fff; }
  .m-filter-sheet .form-check-input:focus-visible + .form-check-label { outline: 3px solid var(--avcm-ball); outline-offset: 2px; }
  .m-filter-sheet .fieldset-chips, .m-filter-sheet fieldset .d-flex { gap: .5rem !important; }
  .m-filter-sheet .btn-primary, .m-filter-sheet .btn-outline-secondary { flex: 1; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
  html.has-sheet, html.has-sheet body { overflow: hidden; }

  /* Mensagem breve (sem rede, ligação recuperada, link copiado) */
  .app-toast {
    display: block; position: fixed; z-index: 1090; left: 50%; bottom: calc(var(--app-tab-h) + var(--app-safe-bottom) + 12px);
    max-width: calc(100% - 2rem); padding: .6rem 1.1rem; border-radius: 999px;
    background: var(--avcm-ink); color: #fff; font-size: .9rem; font-weight: 600; text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,.25); opacity: 0; transform: translate(-50%, 16px);
    transition: opacity .2s ease, transform .25s var(--app-ease); pointer-events: none;
  }
  .app-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

  /* ---- Conteúdo -------------------------------------------------------- */
  .section { padding-block: 1.5rem; }
  .home-hero + .section { padding-top: 1.75rem; }
  .section-head { align-items: center; margin-bottom: .85rem; }
  .section-head h2 { font-size: 1.65rem; }

  /* Faixas de título: título grande de app, texto curto */
  .page-band { padding-block: 1.35rem 1.25rem; }
  .page-band::before { background: linear-gradient(90deg, rgba(255,255,255,.1) 2px, transparent 0) right 1.25rem top 0 / 2px 100% no-repeat; }
  .page-band h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
  .page-band p { font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .page-band .breadcrumb { display: none; }
  .page-band .figures { margin-top: .9rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 1.5rem; }
  .page-band .figures::-webkit-scrollbar { display: none; }
  .page-band .figures div { flex: none; }
  .page-band .figures dd { font-size: 1.4rem; }

  /* Toque: resposta imediata, como numa app */
  a.match, a.tile, .club-card, .chip, .photo-grid a { transition: transform .12s ease, background-color .12s ease; }
  a.match:active, a.tile:active { transform: scale(.985); background-color: #f6faf8; }
  .chip:active, .photo-grid a:active { transform: scale(.96); }
  .match { border-radius: 14px; }
  .match-wrap + .match-wrap { margin-top: .45rem; }
  .match-when { min-width: 0; }
  .match-when b, .match-when span { white-space: nowrap; }
  @container (max-width: 560px) {
    .match { grid-template-columns: 3.9rem 1fr auto; }
    .match-when b { font-size: 1.2rem; }
  }
  .avcm-footer li { display: flex; align-items: baseline; gap: .1rem; }
  .avcm-footer li > i { flex: none; }
  .score-day { margin-top: 1.25rem; font-size: 1.15rem; }

  /* Linhas que deslizam na horizontal em vez de quebrar */
  .chip-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: 1rem; margin-inline: -1rem; padding: .1rem 1rem .25rem; }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip-row > * { flex: none; scroll-snap-align: start; }
  .chip { min-height: 38px; }
  /* Listas de valores (Sobre, Início): quebram em várias linhas, nunca alargam a página */
  ul.chip-row { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding: 0; scroll-snap-type: none; }
  ul.chip-row > * { flex: 0 1 auto; max-width: 100%; }
  ul.chip-row .chip { white-space: normal; border-radius: 14px; line-height: 1.35; padding-block: .45rem; }
  .nav-underline { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .nav-underline::-webkit-scrollbar { display: none; }
  .m-rail { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -1rem; padding-inline: .75rem; scroll-padding-inline: 1rem; }
  .m-rail::-webkit-scrollbar { display: none; }
  .m-rail > * { flex: 0 0 84%; max-width: 84%; scroll-snap-align: start; }

  /* Tabela de classificação compacta */
  .standings td, .standings th { padding: .65rem .35rem; }
  .standings .pos { width: 2rem; font-size: 1.1rem; }
  .club-cell { min-width: 0; gap: .5rem; }
  .club-cell a { display: block; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m-hide { display: none !important; }

  /* Home: o campo inteiro por cima do título, sem cortar o texto */
  .home-hero { padding-top: 1.25rem; padding-bottom: 1.75rem; }
  .home-hero .court-svg {
    position: static; display: block; transform: none;
    width: calc(100% - 2rem); height: auto; max-width: 15rem; margin: 0 1rem 1.25rem; opacity: .35;
  }
  .home-hero h1 { font-size: clamp(2.4rem, 11vw, 3.2rem); max-width: none; margin-bottom: .75rem; }
  .home-hero .hero-intro {
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 1rem; margin-bottom: .35rem;
  }
  .home-hero .hero-actions { display: grid !important; grid-template-columns: 1fr; gap: .6rem !important; margin-top: 1.25rem !important; }
  .home-hero .hero-actions .btn { width: 100%; }
  .hero-board { padding: .75rem; border-radius: 18px; }

  /* Rodapé curto: os atalhos já estão nos separadores e em "Mais" */
  .partners .partner-logos { gap: 1rem 1.75rem; }
  .avcm-footer { padding-top: 2rem !important; padding-bottom: 1.25rem !important; }
  .avcm-footer .col-6 { display: none; }
  .avcm-footer hr { margin-block: 1.25rem !important; }

  /* Transições entre páginas (Chrome/Android e Safari recentes; os outros ignoram) */
  @media (prefers-reduced-motion: no-preference) {
    @view-transition { navigation: auto; }
    .avcm-header { view-transition-name: app-bar; }
    .tabbar { view-transition-name: app-tabs; }
    ::view-transition-old(root) { animation: app-page-out .16s ease both; }
    ::view-transition-new(root) { animation: app-page-in .26s var(--app-ease) both; }
  }
}

@media (min-width: 992px) {
  .home-hero .hero-more { display: none; }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .home-hero .hero-actions { grid-template-columns: repeat(2, max-content); }
  .home-hero .hero-actions .btn { width: auto; }
  .app-grid { grid-template-columns: repeat(8, 1fr); }
  .m-rail > * { flex-basis: 46%; max-width: 46%; }
}

/* ---- Classificação: escolha guiada (época → categoria → campeonato) ---- */
.picker { display: grid; gap: 1rem; }
.picker-step { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); align-items: start; gap: .5rem 1rem; }
.picker-step + .picker-step { border-top: 1px solid var(--avcm-rule); padding-top: 1rem; }
.picker-label {
  display: flex; align-items: center; gap: .5rem; margin: .45rem 0 0;
  font-family: var(--avcm-body); font-size: .9rem; font-weight: 700; color: var(--avcm-ink);
}
.picker-num {
  width: 1.5rem; height: 1.5rem; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--avcm-night); color: #fff; font-size: .78rem; font-weight: 700;
}
.picker .chip { display: inline-flex; align-items: center; gap: .35rem; }
.picker-badge {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: .05rem .4rem; border-radius: 999px; background: var(--avcm-ball); color: var(--avcm-ball-ink);
}
.picker-badge.is-muted { background: var(--avcm-paper); color: var(--avcm-muted); }
.chip.is-active .picker-badge.is-muted { background: rgba(255,255,255,.18); color: #fff; }
.picker-hint { margin: .45rem 0 0; color: var(--avcm-muted); font-size: .92rem; }
.picker-single { margin: .45rem 0 0; font-weight: 650; }
.picker-empty { display: flex; align-items: center; gap: 1rem; padding: 1.5rem; }
.picker-empty .bi { font-size: 2rem; color: var(--avcm-court); flex: none; }
.picker-empty p { margin: 0; }
/* Poucas opções por passo: no telemóvel quebram em linhas, todas à vista (sem deslizar). */
.picker .chip-row { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding: 0; scroll-snap-type: none; }
.picker .chip-row > * { flex: 0 1 auto; }
@media (max-width: 767.98px) {
  .picker-step { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .picker-label { margin-top: 0; }
  .picker-hint, .picker-single { margin-top: 0; }
}

.tn-notes { display: flex; gap: .6rem; align-items: flex-start; background: var(--avcm-surface); border: 1px solid var(--avcm-rule); border-left: 3px solid var(--avcm-court); border-radius: var(--avcm-radius-sm); padding: .7rem .9rem; margin: 0 0 1.25rem; color: var(--avcm-ink); font-size: .95rem; }
.tn-notes .bi { color: var(--avcm-court); margin-top: .15rem; }
.tn-notes p { margin: 0; }
.tn-code { display: inline-block; font-family: var(--avcm-display); font-size: .8rem; font-weight: 700; color: var(--avcm-muted); border: 1px solid var(--avcm-rule); border-radius: 4px; padding: 0 5px; line-height: 1.4; vertical-align: 1px; }
