/* ==========================================================================
   PlacarLocal · estilos (mobile first)
   ========================================================================== */
:root {
  --bg: #ffffff;
  --surface: #f5f6f8;
  --surface-2: #eceef2;
  --line: #eaecf0;
  --line-2: #d9dde3;
  --text: #0f1419;
  --muted: #667085;
  --soft: #98a2b3;
  --brand: #0a7c4a;
  --brand-ink: #075c37;
  --brand-soft: #e7f5ee;
  --live: #e1141f;
  --live-soft: #fdecec;
  --gold: #f2b705;
  --hl: #fff7db;
  --appbar-h: 56px;
  --ad-bottom-h: 60px;   /* banner fixo do rodapé */
  --ad-top-h: 120px;     /* banner do topo: o dobro do rodapé */
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --maxw: 820px;
}
@media (min-width: 768px) {
  :root { --ad-bottom-h: 72px; --ad-top-h: 144px; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--appbar-h) + 50px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--ad-bottom-h) + var(--safe-b));
  -webkit-tap-highlight-color: transparent;
  font-feature-settings: 'cv11', 'ss01';
}
body.is-admin { padding-bottom: 24px; }
body.is-admin .ad-bottom { display: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; }
.muted { color: var(--muted); }
[role="link"] { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- barra superior ---------- */
.appbar {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line);
  padding-top: var(--safe-t);
}
.appbar-in { max-width: var(--maxw); margin: 0 auto; height: var(--appbar-h); display: flex; align-items: center; gap: 2px; padding: 0 6px; }
.iconbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--text); text-decoration: none; flex: none; }
.iconbtn:active { background: var(--surface); }
.iconbtn[disabled] { opacity: .28; cursor: default; }
.iconbtn.on { color: var(--brand); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 18px; letter-spacing: -.02em; margin-right: auto; padding: 0 4px; }
.logo { width: 36px; height: 36px; border-radius: 10px; background: #0d1424; display: block; flex: none; }
.brand b { color: #d99a06; font-weight: 800; margin-left: .18em; }
@media (hover: hover) { .iconbtn:hover { background: var(--surface); } }

.view { max-width: var(--maxw); margin: 0 auto; min-height: 60vh; }

/* ---------- cabeçalho de página ---------- */
.pagehead { padding: 16px 16px 14px; }
.pagehead h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.pagehead p { margin: 6px 0 0; font-size: 14px; }
.pagehead.nohead { padding-top: 12px; padding-bottom: 12px; }
.pagehead.nohead .datebar { margin-top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ent-row { display: flex; align-items: center; gap: 14px; }
.ent-info { flex: 1; min-width: 0; }
.ent-row h1 { font-size: 21px; overflow-wrap: anywhere; }
.ent-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; font-size: 26px; flex: none; }
.sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; margin-top: 5px; }
.sub .sep { color: var(--soft); }
.team-link { color: var(--text); width: fit-content; }
.facts { display: flex; gap: 8px; overflow-x: auto; margin: 14px -16px 0; padding: 0 16px; scrollbar-width: none; }
.facts::-webkit-scrollbar { display: none; }
.facts span { background: var(--surface); border-radius: 10px; padding: 7px 11px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.facts small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.crumb { font-size: 13px; margin-bottom: 4px; }
.plink { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
@media (hover: hover) { .plink:hover { text-decoration-color: currentColor; } }

/* ---------- banners ---------- */
.ad { position: relative; overflow: hidden; background: var(--surface-2); }
.ad-link { display: block; width: 100%; height: 100%; text-decoration: none; color: inherit; }
.ad img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-gen {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px;
  background: linear-gradient(115deg, var(--c, #0a7c4a), color-mix(in srgb, var(--c, #0a7c4a) 62%, #000));
  color: #fff;
}
.ad-gen.ad-empty { background: repeating-linear-gradient(135deg, #f1f3f6 0 12px, #e9ecf0 12px 24px); color: var(--muted); justify-content: center; text-align: center; }
.ad-text { display: flex; flex-direction: column; min-width: 0; }
.ad-text strong { font-size: 17px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.ad-text span { font-size: 13px; opacity: .92; margin-top: 2px; }
.ad-cta { flex: none; background: #fff; color: var(--c, #0a7c4a); font-weight: 700; font-size: 12.5px; padding: 7px 12px; border-radius: 999px; }
.ad-label { position: absolute; top: 5px; right: 6px; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .9); background: rgba(0, 0, 0, .28); padding: 1px 5px; border-radius: 4px; pointer-events: none; }
.ad-empty + .ad-label, .ad-link:has(.ad-empty) + .ad-label { color: var(--muted); background: rgba(255, 255, 255, .7); }

/* banner do topo: logo abaixo do nome da página, com o dobro da altura do fixo */
.ad-top { height: var(--ad-top-h); margin: 0 0 6px; }
.ad-top .ad-text strong { font-size: 21px; }
.ad-top .ad-text span { font-size: 14px; }
@media (min-width: 768px) { .ad-top { margin: 0 16px 8px; border-radius: 14px; } }

/* banner fixo do rodapé: ocupa toda a largura da tela */
.ad-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--ad-bottom-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: #101418; box-shadow: 0 -4px 16px rgba(0, 0, 0, .10);
}
.ad-bottom .ad-gen { padding: 0 14px; }
.ad-bottom .ad-text strong { font-size: 15px; }
.ad-bottom .ad-text span { font-size: 12px; }
.ad-bottom .ad-cta { padding: 6px 11px; font-size: 12px; }

/* ---------- calendário ---------- */
.datebar { position: relative; display: flex; align-items: center; gap: 4px; background: var(--surface); border-radius: 14px; padding: 4px; margin-top: 12px; }
.pad-x { padding: 12px 16px 4px; }
.pad-x .datebar { margin-top: 0; }
.dnav { width: 44px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.dnav:not([disabled]):active, .dcur:active { background: #fff; }
.dnav[disabled] { opacity: .25; cursor: default; }
.dcur { flex: 1; height: 42px; border-radius: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; }
.dcur svg:first-child { color: var(--brand); }
.dmenu { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: min(300px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(15, 20, 25, .16); max-height: min(420px, 60vh); overflow: auto; z-index: 40; display: none; padding: 6px; }
.datebar.open .dmenu { display: block; }
.dopt { display: flex; justify-content: space-between; width: 100%; padding: 11px 12px; border-radius: 9px; font-size: 14.5px; }
.dopt span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.dopt.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.dopt.on span:last-child { color: var(--brand-ink); }
@media (hover: hover) { .dnav:not([disabled]):hover, .dcur:hover { background: #fff; } .dopt:hover { background: var(--surface); } }

/* ---------- filtros ---------- */
.chips { display: flex; gap: 8px; padding: 10px 16px 6px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { padding: 8px 14px; border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 13.5px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.chip.on { background: var(--text); color: #fff; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); }

/* ---------- títulos de seção ---------- */
.sec-title { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 18px 16px 8px; }
.sec-title svg { width: 15px; height: 15px; color: var(--gold); }
.hint { margin: 0 16px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: 12px; color: var(--muted); font-size: 13.5px; }
.rhead { display: flex; align-items: center; gap: 8px; padding: 20px 16px 8px; font-weight: 800; font-size: 14px; }
.rhead small { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.ghead { background: var(--surface); padding: 8px 16px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .03em; }

/* ---------- ícone do esporte + balão ---------- */
.sport { position: relative; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); display: inline-grid; place-items: center; font-size: 18px; line-height: 1; flex: none; cursor: help; user-select: none; }
.sport.sm { width: 24px; height: 24px; font-size: 13px; }
.sport .tip {
  position: absolute; bottom: calc(100% + 9px); left: -4px; background: #11161c; color: #fff; font-size: 12px; font-weight: 600;
  padding: 6px 9px; border-radius: 8px; white-space: nowrap; opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity .15s, transform .15s; z-index: 30; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); font-family: inherit;
}
.sport .tip::after { content: ''; position: absolute; top: 100%; left: 15px; border: 6px solid transparent; border-top-color: #11161c; }
.sport.sm .tip::after { left: 10px; }
.sport.show .tip { opacity: 1; transform: none; }
@media (hover: hover) { .sport:hover .tip { opacity: 1; transform: none; } }

/* ---------- bandeiras ---------- */
.flag { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); flex: none; display: inline-block; }
.flag.lg { width: 54px; height: 38px; border-radius: 5px; }

/* ---------- linhas de campeonato ---------- */
.list { border-top: 1px solid var(--line); }
.crow { display: flex; align-items: center; gap: 12px; padding: 12px 6px 12px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.crow:active, .grow:active, .trow:active, .prow:active, .lp:active { background: var(--surface); }
.cinfo { flex: 1; min-width: 0; }
.cname { font-weight: 700; font-size: 15.5px; line-height: 1.25; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cregion { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-top: 3px; min-width: 0; }
.cregion span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmeta { display: flex; align-items: center; gap: 8px; flex: none; }
.cnt { min-width: 16px; text-align: right; font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sec-title.plain { color: var(--muted); font-size: 11.5px; padding: 16px 16px 6px; }
.sec-title .n { color: var(--soft); font-weight: 700; }
.more-note { padding: 10px 16px; font-size: 12.5px; color: var(--muted); }
/* celular e app: linha compacta, nome em uma linha, fonte ~20% menor */
@media (max-width: 767px) {
  .crow { gap: 10px; padding: 8px 2px 8px 12px; }
  .crow .sport { width: 28px; height: 28px; font-size: 15px; }
  .crow .cname { font-size: 12.5px; }
  .crow .cregion { font-size: 9.5px; margin-top: 2px; gap: 5px; }
  .crow .flag { width: 16px; height: 11px; }
  .crow .star { width: 36px; height: 36px; }
  .crow .star svg { width: 18px; height: 18px; }
}
.star { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #b5bcc7; flex: none; }
.star.on { color: var(--gold); }
.star:active { transform: scale(.9); }
@media (hover: hover) { .crow:hover, .grow:hover, .trow:hover, .prow:hover, .lp:hover:not(.static) { background: #fafbfc; } .star:hover { color: var(--gold); } }

/* ---------- AO VIVO ---------- */
.live-pill { display: inline-flex; align-items: center; gap: 4px; background: var(--live); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .05em; padding: 3px 6px; border-radius: 5px; line-height: 1; white-space: nowrap; }
.live-pill i { width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .live-pill i { animation: none; } }
.live-pill.num { font-size: 11.5px; letter-spacing: 0; padding: 3px 6px 3px 5px; gap: 4px; font-variant-numeric: tabular-nums; }

/* ---------- página do anunciante (sem banners) ---------- */
body.no-ads { padding-bottom: 0; }
body.no-ads .ad-bottom { display: none; }
.adv-head { padding-bottom: 12px; }
.adv-head .crumb { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.adv-art {
  display: block; position: relative; overflow: hidden; text-decoration: none; color: inherit; background: #0d1424;
  height: calc(100vh - var(--appbar-h) - var(--safe-t) - 86px);
  height: calc(100svh - var(--appbar-h) - var(--safe-t) - 86px);
  min-height: 380px;
}
.adv-art > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adv-gen { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #fff; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 45%, color-mix(in srgb, var(--c) 45%, #000)); }
.adv-gen i { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .12); animation: adv-float 9s ease-in-out infinite; }
.adv-gen .b1 { width: 60vw; height: 60vw; max-width: 340px; max-height: 340px; top: -8%; left: -18%; }
.adv-gen .b2 { width: 44vw; height: 44vw; max-width: 260px; max-height: 260px; bottom: 6%; right: -12%; animation-delay: -3s; }
.adv-gen .b3 { width: 22vw; height: 22vw; max-width: 130px; max-height: 130px; bottom: 30%; left: 12%; animation-delay: -6s; }
.adv-gen-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; max-width: 420px; animation: adv-in .7s ease-out both; }
.adv-mono { width: 92px; height: 92px; border-radius: 26px; background: #fff; color: var(--c); display: grid; place-items: center; font-size: 36px; font-weight: 800; letter-spacing: -.02em; box-shadow: 0 14px 40px rgba(0, 0, 0, .25); }
.adv-gen strong { font-size: 32px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
.adv-txt { font-size: 17px; opacity: .92; text-wrap: balance; }
.adv-cta { margin-top: 8px; background: #fff; color: var(--c); font-weight: 800; font-size: 15px; padding: 12px 22px; border-radius: 999px; animation: adv-pulse 2.4s ease-in-out infinite; }
@keyframes adv-float { 50% { transform: translate(14px, -18px) scale(1.06); } }
@keyframes adv-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes adv-pulse { 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .adv-gen i, .adv-gen-in, .adv-cta { animation: none; } }
@media (min-width: 768px) { .adv-art { max-width: 520px; margin: 0 auto 24px; border-radius: 18px; } }

fieldset.dest { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 6px; margin: 0; display: grid; gap: 4px; }
fieldset.dest legend { font-size: 13px; font-weight: 700; padding: 0 4px; }
.ad-prev .ad-link { pointer-events: none; }

/* ---------- busca ---------- */
.searchbox { display: flex; align-items: center; gap: 8px; margin-top: 12px; background: var(--surface); border-radius: 14px; padding: 0 6px 0 12px; height: 48px; color: var(--muted); }
.searchbox:focus-within { box-shadow: 0 0 0 2px var(--brand); background: #fff; }
.searchbox input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 16px; color: var(--text); height: 100%; outline: none; }
.searchbox input::-webkit-search-cancel-button { display: none; }
.sclear { width: 36px; height: 36px; border-radius: 10px; font-size: 22px; line-height: 1; color: var(--muted); flex: none; }
#searchResults .hint { margin-top: 8px; }

/* ---------- linhas de jogo ---------- */
.grow { display: grid; grid-template-columns: 62px 1fr auto 42px; align-items: center; gap: 6px; padding: 9px 2px 9px 10px; border-bottom: 1px solid var(--line); background: #fff; }
.gstat { font-size: 12px; color: var(--muted); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.gtime { font-weight: 600; color: var(--text); font-size: 13px; }
.lmin { color: var(--live); font-weight: 800; font-size: 12.5px; }
.gteams { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gchamp { font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gt { display: flex; align-items: center; gap: 8px; font-size: 14.5px; line-height: 22px; min-width: 0; }
.gt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gt.win { font-weight: 700; }
.gscore { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-weight: 800; font-size: 15px; line-height: 22px; min-width: 22px; font-variant-numeric: tabular-nums; }
.gscore b { min-height: 22px; }
.gscore sup { font-size: 10px; color: var(--muted); margin-left: 2px; }
.grow.live .gscore { color: var(--live); }
.crest { flex: none; display: inline-block; vertical-align: middle; object-fit: contain; }
.crest.ph { border-radius: 6px; background: var(--surface-2); }

/* ---------- abas ---------- */
.tabs { display: flex; gap: 2px; overflow-x: auto; padding: 0 8px; border-bottom: 1px solid var(--line); position: sticky; top: calc(var(--appbar-h) + var(--safe-t)); background: #fff; z-index: 20; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 13px 10px 11px; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tab.on { color: var(--text); border-bottom-color: var(--brand); }

/* ---------- vazio ---------- */
.empty { padding: 36px 24px; text-align: center; color: var(--muted); }
.empty-t { font-weight: 700; color: var(--text); font-size: 15px; }
.empty p { margin: 6px 0 14px; font-size: 14px; }
.empty .btn { margin-top: 10px; }

/* ---------- cabeçalho da partida ---------- */
.match-head { padding: 12px 12px 16px; }
.mh-top { display: flex; align-items: center; gap: 8px; padding: 0 0 0 4px; }
.mh-champ { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; }
.mh-champ span { min-width: 0; display: flex; flex-direction: column; }
.mh-champ b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-champ small { font-size: 12px; color: var(--muted); }
.mh-body { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 6px; margin-top: 14px; }
.mh-team { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; font-weight: 700; font-size: 14.5px; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
.mh-team .star { width: 34px; height: 34px; margin-top: -4px; }
.mh-score { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 2px; min-width: 104px; }
.mh-date { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mh-num { font-size: 38px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; display: flex; gap: 8px; }
.mh-num span { color: var(--soft); font-weight: 600; }
.mh-num.live { color: var(--live); }
.mh-pens, .mh-parts { font-size: 12px; color: var(--muted); font-weight: 600; text-align: center; }
.mh-status { font-size: 12.5px; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: .03em; }
.mh-status.live { color: var(--live); }
.mh-min { font-size: 14px; }

/* ---------- sumário ---------- */
.period { display: flex; justify-content: space-between; background: var(--surface); padding: 9px 16px; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.period.cur { color: var(--live); }
.ev { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.ev.away { flex-direction: row-reverse; text-align: right; }
.ev-min { width: 34px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; font-size: 13.5px; }
.ev.away .ev-min { text-align: right; }
.ev-ic { width: 22px; display: grid; place-items: center; flex: none; font-size: 16px; }
.ev-score { background: var(--text); color: #fff; font-weight: 800; font-size: 12px; padding: 3px 7px; border-radius: 6px; flex: none; font-variant-numeric: tabular-nums; }
.ev-txt { min-width: 0; font-weight: 600; }
.ev-txt small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.ev-none { padding: 12px 16px; color: var(--soft); font-size: 13.5px; border-bottom: 1px solid var(--line); }
.cardi { display: inline-block; width: 11px; height: 15px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.cardi.y { background: #f6c700; }
.cardi.r { background: var(--live); }
.cardi.sm { width: 8px; height: 11px; }
.susp { font-size: 11px; font-weight: 800; background: var(--text); color: #fff; padding: 2px 4px; border-radius: 4px; }

/* ---------- ficha / informações ---------- */
.sheet { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--line); }
.sheet > div { padding: 11px 16px; border-bottom: 1px solid var(--line); min-width: 0; }
.sheet > div:nth-child(odd) { border-right: 1px solid var(--line); }
.sheet dt { font-size: 12px; color: var(--muted); }
.sheet dd { margin: 2px 0 0; font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; padding: 0 16px; }
.tile { background: var(--surface); border-radius: 14px; padding: 12px 8px; text-align: center; }
.tile b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile span { font-size: 12px; color: var(--muted); font-weight: 600; }
.photo { position: relative; flex: none; }
.photo .avatar { width: 84px; height: 84px; }
.photo-num { position: absolute; right: -4px; bottom: -2px; background: var(--text); color: #fff; font-weight: 800; font-size: 12px; min-width: 26px; height: 26px; border-radius: 13px; display: grid; place-items: center; padding: 0 6px; border: 2px solid #fff; }
.avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-block; overflow: hidden; background: var(--surface); }
.avatar.ph { width: 38px; height: 38px; }

/* ---------- formações ---------- */
.lineups { display: grid; grid-template-columns: 1fr 1fr; }
.lcol { min-width: 0; }
.lcol + .lcol { border-left: 1px solid var(--line); }
.lhead { display: flex; align-items: center; gap: 8px; padding: 12px; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--line); min-width: 0; }
.lhead span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsec { font-size: 11px; text-transform: uppercase; color: var(--muted); padding: 12px 12px 4px; font-weight: 800; letter-spacing: .05em; background: #fff; }
.lp { display: flex; align-items: center; gap: 7px; padding: 8px 10px 8px 8px; font-size: 13.5px; min-width: 0; }
.lp.static { cursor: default; }
.lp .num { width: 22px; text-align: center; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; font-size: 12.5px; }
.lp .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.lp .pos { font-size: 10px; color: var(--soft); font-weight: 700; flex: none; }
.mks { display: inline-flex; gap: 3px; align-items: center; flex: none; font-size: 11px; }
.mk.up { color: #16a34a; font-weight: 700; font-size: 10px; }
.mk.down { color: var(--live); font-weight: 700; font-size: 10px; }
@media (max-width: 380px) { .lp .pos { display: none; } }

/* ---------- tabela de classificação ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.table th { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; padding: 10px 5px; text-align: center; border-bottom: 1px solid var(--line); background: #fff; }
.table td { padding: 9px 5px; text-align: center; border-bottom: 1px solid var(--line); }
.table th:first-child, .table td:first-child { padding-left: 12px; width: 34px; }
.table .tm { text-align: left; width: 100%; max-width: 0; }
.tm-in { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tm-in span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.table .pts { font-weight: 800; padding-right: 12px; }
.table tbody tr:active { background: var(--surface); }
.table tr.hl td { background: var(--hl); }
.posn { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-weight: 700; font-size: 12px; background: var(--surface); }
.posn.q { background: var(--brand); color: #fff; }
i.posn.q { width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; }
.table td.lastf { white-space: nowrap; }
.lastf i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; font-style: normal; font-size: 10px; font-weight: 800; color: #fff; margin: 0 1px; }
.f-V { background: #16a34a; } .f-E { background: #98a2b3; } .f-D { background: var(--live); }
.legend { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 400px) { .hide-xs { display: none; } }
@media (max-width: 560px) { .hide-sm { display: none; } }

/* ---------- chaves (mata-mata) ---------- */
.bracket { display: flex; gap: 14px; overflow-x: auto; padding: 14px 16px 6px; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; }
.bcol { flex: 0 0 min(230px, 78vw); display: flex; flex-direction: column; scroll-snap-align: start; }
.bcol h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 10px; }
.bgames { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 12px; }
.bm { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }
.bm.live { border-color: var(--live); }
.bm-meta { font-size: 11px; color: var(--muted); padding: 6px 10px; background: var(--surface); display: flex; align-items: center; gap: 6px; font-weight: 600; }
.bm.live .bm-meta { color: var(--live); }
.bm-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 13.5px; min-width: 0; }
.bm-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-row b { font-variant-numeric: tabular-nums; }
.bm-row b sup { font-size: 9px; color: var(--muted); }
.bm-row + .bm-row { border-top: 1px solid var(--line); }
.bm-row.win { font-weight: 700; }
.bm-row.hl { background: var(--hl); }

/* ---------- times / atletas ---------- */
.trow, .prow { display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.prow.static { cursor: default; padding-right: 16px; }
.tinfo, .pinfo { flex: 1; min-width: 0; }
.tn, .pn { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts, .ps { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pnum { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 24px; text-align: right; }
.infobar { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; font-size: 13px; color: var(--muted); }

/* ---------- botões e formulários (área do organizador) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line-2); background: #fff; font-weight: 650; font-size: 14px; text-decoration: none; color: var(--text); white-space: nowrap; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.danger { color: var(--live); border-color: #f3c3c6; }
.btn.live { background: var(--live); border-color: var(--live); color: #fff; }
.btn.sm { height: 34px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn.on { background: var(--text); border-color: var(--text); color: #fff; }
.btn:active { transform: translateY(1px); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 8px; }
.note { background: var(--brand-soft); color: var(--brand-ink); border-radius: 12px; padding: 12px 14px; margin: 0 16px 12px; font-size: 13.5px; }
.note.warn { background: #fff6e5; color: #8a5a00; }
.box { border: 1px solid var(--line); border-radius: 14px; margin: 0 16px 14px; overflow: hidden; background: #fff; }
.box-t { padding: 14px 16px 0; font-weight: 800; font-size: 15px; }
.arow { display: flex; align-items: center; gap: 12px; padding: 11px 12px 11px 14px; border-bottom: 1px solid var(--line); }
.arow:last-child { border-bottom: 0; }
.arow .ainfo { flex: 1; min-width: 0; }
.arow .at { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arow .as { font-size: 12.5px; color: var(--muted); }
.arow .acts { display: flex; gap: 6px; flex: none; }
.ibtn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); display: grid; place-items: center; background: #fff; color: var(--text); }
.ibtn.danger { color: var(--live); border-color: #f3c3c6; }
.form { display: grid; gap: 14px; padding: 16px; }
.field label, .flabel { display: block; font-size: 12.5px; font-weight: 650; color: #475467; margin-bottom: 6px; }
.field input:not([type=checkbox]):not([type=color]):not([type=file]), .field select, .field textarea {
  width: 100%; height: 46px; border: 1px solid var(--line-2); border-radius: 11px; padding: 0 12px; font: inherit; font-size: 15px; background: #fff; color: var(--text);
}
.field textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field .help { font-size: 12px; color: var(--muted); margin-top: 5px; }
.field input[type=color] { width: 100%; height: 46px; border: 1px solid var(--line-2); border-radius: 11px; padding: 4px; background: #fff; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.form .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.subform { display: grid; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface); }
.imgfield { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.imgfield .prev { width: 56px; height: 56px; border-radius: 10px; background: var(--surface); display: grid; place-items: center; overflow: hidden; flex: none; border: 1px solid var(--line); color: var(--soft); font-size: 11px; }
.imgfield .prev img { width: 100%; height: 100%; object-fit: contain; }
.imgfield input[type=text] { flex: 1; min-width: 160px; }
.filebtn { position: relative; overflow: hidden; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.score-edit { display: grid; grid-template-columns: 1fr 70px 70px; gap: 8px; align-items: center; }
.score-edit input { text-align: center; width: 100%; height: 42px; border: 1px solid var(--line-2); border-radius: 10px; font: inherit; font-size: 16px; font-weight: 700; background: #fff; }
.score-edit input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.score-edit .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.mini-head { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 14px 12px; font-weight: 700; flex-wrap: wrap; text-align: center; }
.mini-head .sc { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.ad-prev { height: 60px; border-radius: 10px; overflow: hidden; position: relative; }
.ad-prev.top { height: 120px; }
@media (max-width: 420px) { .row3 { grid-template-columns: 1fr 1fr; } .arow .acts .btn.sm { padding: 0 9px; } }

/* ---------- provas, grupos e eliminatória dupla ---------- */
.rname { font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.rsub { font-size: 12.5px; color: var(--muted); }
.rlead { font-size: 12.5px; color: var(--text); margin-top: 2px; }
.race-head { padding: 14px 4px 0; display: flex; flex-direction: column; gap: 10px; }
.race-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.race-facts { display: flex; gap: 8px; flex-wrap: wrap; }
.race-facts span { background: var(--surface); border-radius: 10px; padding: 7px 11px; font-size: 13px; font-weight: 600; }
.race-facts small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.tm-in.two span { display: flex; flex-direction: column; min-width: 0; }
.tm-in.two b, .tm-in.two small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-in.two small { color: var(--muted); font-size: 11.5px; font-weight: 500; }
.tag-ev { font-size: 10.5px; font-weight: 800; background: var(--text); color: #fff; padding: 2px 5px; border-radius: 4px; }
.note.phase { margin: 12px 16px 0; background: var(--surface); color: var(--text); font-weight: 600; font-size: 13px; }
.bside { display: flex; flex-direction: column; gap: 3px; padding: 18px 16px 0; }
.bside-t { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; display: inline-flex; align-items: center; gap: 8px; }
.bside-t::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--brand); }
.bside-t.L::before { background: #f59e0b; }
.bside-t.G::before { background: var(--gold); }
.bside small { color: var(--muted); font-size: 12.5px; }
.bm-num { font-weight: 800; color: var(--text); margin-right: 2px; }

.res-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.res-row { display: grid; grid-template-columns: 40px 1fr 96px; gap: 4px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.res-row .num { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.res-row .nm { display: flex; flex-direction: column; min-width: 0; }
.res-row .nm b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-row .nm small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-row input:not([type=checkbox]) { height: 40px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 8px; font: inherit; font-size: 15px; font-weight: 700; text-align: center; width: 100%; font-variant-numeric: tabular-nums; }
.res-row .check { grid-column: 2 / 4; }
.check.sm { font-size: 12.5px; font-weight: 500; color: var(--muted); gap: 6px; }
.check.sm input { width: 16px; height: 16px; }

/* ---------- confirmação ---------- */
.modal { position: fixed; inset: 0; z-index: 90; background: rgba(15, 20, 25, .45); display: grid; place-items: center; padding: 16px; }
.modal-box { background: #fff; border-radius: 16px; padding: 20px; width: min(380px, 100%); box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.modal-box p { margin: 0 0 18px; font-size: 15px; font-weight: 600; line-height: 1.45; }
.modal-acts { display: flex; gap: 8px; justify-content: flex-end; }
.btn.danger-solid { background: var(--live); border-color: var(--live); color: #fff; }

/* ---------- aviso flutuante ---------- */
#toast { position: fixed; left: 50%; bottom: calc(var(--ad-bottom-h) + var(--safe-b) + 14px); transform: translate(-50%, 20px); background: #11161c; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; z-index: 80; max-width: calc(100vw - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
body.is-admin #toast { bottom: 20px; }

/* ---------- desktop ---------- */
@media (min-width: 768px) {
  .pagehead { padding: 22px 16px 16px; }
  .pagehead h1 { font-size: 28px; }
  .ent-row h1 { font-size: 26px; }
  .mh-num { font-size: 46px; }
  .view { border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-height: calc(100vh - var(--appbar-h)); }
}
