html, body { width: 100%; height: 100%; overflow: hidden; background: transparent; }
body.fundo { background: #000; }
#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; color: var(--white); }
body.fundo #stage { background-color: var(--ink); }
.view { position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.view.on { opacity: 1; }

/* ---------- topo */
.topbar { position: absolute; left: 60px; right: 60px; top: 26px; height: 110px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.topbar .comp { font-weight: 700; font-size: 26px; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); }
.topbar .title { font-size: 74px; text-align: center; }
.topbar .title span { color: var(--lime); }
.scoreline { display: flex; align-items: center; justify-content: flex-end; gap: 16px; font-weight: 800; font-size: 34px; text-transform: uppercase; }
.scoreline img { height: 52px; }
.scoreline .num { font-size: 58px; font-style: italic; font-weight: 900; color: var(--lime); min-width: 120px; text-align: center; }

/* ---------- campos */
.boards { position: absolute; left: 60px; right: 60px; top: 160px; height: 760px; display: grid; grid-template-columns: 1fr 1.08fr 1fr; gap: 40px; }
.board-wrap { display: flex; flex-direction: column; gap: 10px; }
.board-head { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 30px; text-transform: uppercase; }
.board-head img { height: 40px; }
.board-head .formation { margin-left: auto; font-style: italic; font-weight: 900; font-size: 34px; color: var(--lime); }
.board-wrap .board { flex: 1; }
.board-wrap.selecao .board { border-color: var(--lime); }
.board-wrap.selecao .board-head { color: var(--lime); justify-content: center; font-style: italic; font-weight: 900; font-size: 34px; }
.coachline { font-weight: 800; font-size: 24px; text-transform: uppercase; letter-spacing: .03em; color: var(--chalk); }
.coachline b { color: var(--lime); }

.pl { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; font-weight: 800; font-size: 22px; text-transform: uppercase; white-space: nowrap; transition: all .4s ease; }
.pl .th { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: rgba(255,255,255,.08); border: 2px solid rgba(244,244,236,.55); display: grid; place-items: center; }
.pl .th img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pl .th img.crest-fallback { object-fit: contain; padding: 7px; }
.pl .nm { padding: 0 6px; border-radius: 4px; }
.pl.win .th { border-color: var(--lime); box-shadow: 0 0 12px rgba(187,206,0,.5); }
.pl.lose .th { filter: grayscale(1); }
.pl.win { color: var(--lime); text-shadow: 0 0 10px rgba(187,206,0,.45); }
.pl.lose { opacity: .32; }
.pl.lose .nm { text-decoration: line-through; text-decoration-thickness: 2px; }
.pl.live .nm { background: var(--lime); color: var(--ink); text-shadow: none; }
.pl.live .th { border-color: var(--lime); border-width: 3px; }
.sel { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; animation: pop .5s ease both; }
.sel .ph { width: 58px; height: 58px; border-radius: 50%; overflow: hidden; background: rgba(255,255,255,.08); border: 2px solid var(--lime); display: grid; place-items: center; }
.sel .ph img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.sel .ph img.crest-fallback { object-fit: contain; padding: 8px; }
.sel .nm { font-weight: 800; font-size: 20px; text-transform: uppercase; display: flex; align-items: center; gap: 5px; }
.sel .nm img { height: 18px; }
.sel.pending .ph { border-style: dashed; border-color: rgba(244,244,236,.35); }
.sel.pending .nm { opacity: .4; }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.4); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

/* ---------- duelo */
.duel-label { position: absolute; top: 150px; left: 0; right: 0; text-align: center; font-size: 82px; color: var(--lime); }
.duel-count { position: absolute; top: 110px; left: 0; right: 0; text-align: center; font-weight: 700; font-size: 26px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.duel-side { position: absolute; top: 250px; width: 760px; height: 700px; }
.duel-side.home { left: 70px; } .duel-side.away { right: 70px; }
.duel-side .cut { position: absolute; bottom: 150px; left: 50%; transform: translateX(-50%); height: 520px; max-width: 640px; object-fit: contain; filter: drop-shadow(0 20px 30px rgba(0,0,0,.55)); transition: all .5s ease; }
.duel-side .cut.crest-fallback { height: 300px; bottom: 260px; opacity: .9; }
.duel-side .cut.no-photo { display: block; width: 300px; height: 380px; border-radius: 160px 160px 20px 20px; background: rgba(255,255,255,.08); }
.duel-side .name { position: absolute; bottom: 70px; left: 0; right: 0; text-align: center; font-size: 96px; text-shadow: 0 6px 24px rgba(0,0,0,.7); }
.duel-side .team { position: absolute; bottom: 30px; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 10px; font-weight: 800; font-size: 28px; text-transform: uppercase; color: var(--chalk); }
.duel-side .team img { height: 34px; }
.duel-side .votes { position: absolute; top: -6px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; }
.vote { font-weight: 800; font-size: 24px; text-transform: uppercase; padding: 6px 16px; border-radius: 999px; border: 2px solid rgba(255,255,255,.3); color: rgba(255,255,255,.5); transition: all .25s ease; }
.vote.on { background: var(--lime); border-color: var(--lime); color: var(--ink); transform: scale(1.08); }
.duel-side.lose .cut { filter: grayscale(1) brightness(.55); }
.duel-side.lose .name { opacity: .4; }
.stamp { position: absolute; top: 120px; left: 50%; transform: translateX(-50%) rotate(-8deg) scale(0); background: var(--lime); color: var(--ink); font-size: 64px; padding: 6px 30px; border-radius: 6px; transition: transform .35s cubic-bezier(.2,1.6,.4,1); }
.duel-side.win .stamp { transform: translateX(-50%) rotate(-8deg) scale(1); }
.vs { position: absolute; left: 50%; top: 520px; width: 230px; height: 230px; transform: translate(-50%, -50%); }
.vs i { position: absolute; left: 50%; top: 50%; width: 40px; height: 250px; background: var(--white); border-radius: 6px; box-shadow: 0 0 0 4px rgba(0,0,0,.15); }
.vs i:first-child { transform: translate(-50%, -50%) rotate(35deg); }
.vs i:last-child { transform: translate(-50%, -50%) rotate(-35deg); background: var(--lime); }
.duel-note { position: absolute; top: 760px; left: 50%; transform: translateX(-50%); width: 520px; text-align: center; font-weight: 800; font-size: 26px; text-transform: uppercase; line-height: 1.1; color: var(--chalk); }
.duel-note b { color: var(--lime); display: block; font-size: 30px; font-style: italic; }
.duel-score { position: absolute; top: 34px; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 18px; font-weight: 800; font-size: 30px; text-transform: uppercase; }
.duel-score img { height: 40px; } .duel-score .num { font-weight: 900; font-style: italic; font-size: 48px; color: var(--lime); }

/* ---------- seleção final */
.final-title { position: absolute; top: 40px; left: 0; right: 0; text-align: center; font-size: 86px; }
.final-title span { color: var(--lime); }
.final-sub { position: absolute; top: 140px; left: 0; right: 0; text-align: center; font-weight: 700; font-size: 30px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.final-board { position: absolute; left: 50%; top: 200px; width: 1180px; height: 720px; transform: translateX(-50%); }
.final-board .board { position: absolute; inset: 0; border-color: var(--lime); }
.final-board .sel .ph { width: 84px; height: 84px; }
.final-board .sel .nm { font-size: 26px; }
.final-side { position: absolute; top: 420px; width: 300px; text-align: center; }
.final-side.home { left: 60px; } .final-side.away { right: 60px; }
.final-side img { height: 120px; }
.final-side .n { font-weight: 900; font-style: italic; font-size: 140px; color: var(--lime); line-height: 1; }
.final-side .t { font-weight: 800; font-size: 34px; text-transform: uppercase; }

/* ---------- rodapé com as marcas */
.footer { position: absolute; left: 0; right: 0; bottom: 26px; display: flex; justify-content: center; }
.footer .brand-lockup { font-size: 52px; color: var(--white); background: rgba(11,15,16,.72); padding: 14px 34px; border-radius: 14px; border: 1.5px solid rgba(187,206,0,.35); }
.empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 40px; color: var(--muted); }

.preview-bar { position: fixed; left: 0; right: 0; top: 0; z-index: 50; background: rgba(14,19,20,.92); color: #dfe6e7; font: 14px/1.4 'Barlow Condensed', system-ui, sans-serif; padding: 8px 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-bottom: 2px solid var(--lime, #BBCE00); }
.preview-bar code { background: #000; padding: 2px 6px; border-radius: 4px; color: #BBCE00; }
.preview-bar button { background: #BBCE00; border: 0; border-radius: 6px; padding: 4px 10px; font-weight: 700; cursor: pointer; }
.empty-live { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 96px; color: #fff; text-transform: uppercase; }
.empty-live small { font-size: 34px; color: #9aa6a8; font-style: normal; margin-top: 10px; text-transform: none; }
