/* AMIGO SECRETO • AO VIVO — tema "régie de transmissão" */
:root {
  --bg: #0a0b0f;
  --panel: #12141b;
  --panel2: #191c25;
  --line: #262a36;
  --text: #eef0f5;
  --muted: #8b91a3;
  --red: #ff2d3d;
  --red-d: #b3121f;
  --green: #1fd16b;
  --amber: #ffb020;
  --blue: #3aa0ff;
  --violet: #a66bff;
  --r: 14px;
  --font: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
a { color: var(--blue); }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.15; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { line-height: 1.45; margin: .4em 0; }
code { font-family: var(--mono); background: var(--panel2); padding: 1px 6px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.err { color: var(--red); }
.hint { color: var(--muted); font-size: .85rem; margin: -2px 0 10px; }
.kicker, .lbl { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.lbl { display: block; margin: 8px 0 6px; }

/* ---------- Tally / chips ---------- */
.tally { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #3a3f4d; flex: none; }
.tally.live { background: var(--red); box-shadow: 0 0 0 3px rgba(255, 45, 61, .2), 0 0 14px var(--red); animation: pulse 1.6s infinite; }
.tally.pv { background: var(--green); box-shadow: 0 0 10px var(--green); }
@keyframes pulse { 50% { opacity: .55; } }
.chip { display: inline-block; font-family: var(--mono); font-size: .66rem; font-weight: 700; letter-spacing: .12em; padding: 3px 7px; border-radius: 5px; vertical-align: middle; }
.chip.pgm { background: var(--red); color: #fff; }
.chip.pv { background: var(--green); color: #04220f; }
.chip.off { background: #3a3f4d; color: #dfe2ea; }

/* ---------- Form & botões ---------- */
label { display: block; font-size: .9rem; color: #c9cdd8; margin-bottom: 12px; }
label.inline { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
input, select, textarea {
  width: 100%; display: block; margin-top: 6px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; outline: none;
}
label.inline input { width: 80px; margin: 0; }
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 45, 61, .18); }
input:disabled, textarea:disabled { opacity: .6; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600;
  padding: 11px 16px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  cursor: pointer; text-decoration: none; transition: transform .08s, filter .15s; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 6px 20px rgba(255, 45, 61, .25); }
.btn.danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn.ghost { background: transparent; }
.btn.small { padding: 7px 12px; font-size: .88rem; border-radius: 9px; }
.btn.big { width: 100%; padding: 15px; font-size: 1.05rem; }
.btn.full { width: 100%; }
.link { background: none; border: 0; color: var(--blue); font: inherit; font-size: .85rem; cursor: pointer; padding: 4px; }
.link.danger { color: #ff6b77; }
.row { display: flex; align-items: center; gap: 10px; }
.row.end { justify-content: flex-end; margin-top: 12px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.row.gap { gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.row > input, .row > select { margin-top: 0; }
.stack { display: grid; gap: 10px; }
.stack input, .stack textarea { margin-top: 0; }

/* ---------- Layout ---------- */
.boot { min-height: 60vh; display: grid; place-content: center; grid-auto-flow: column; gap: 10px; align-items: center; color: var(--muted); font-family: var(--mono); letter-spacing: .1em; }
.page { padding: calc(20px + var(--safe-t)) 16px 40px; margin: 0 auto; max-width: 760px; }
.page.narrow { max-width: 460px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; }
.card.subtle { background: transparent; border-style: dashed; color: #c9cdd8; font-size: .92rem; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 10px 0; font-size: .92rem; }
.brand { display: flex; align-items: center; gap: 14px; margin: 18px 0 14px; }
.brand .tally { width: 18px; height: 18px; }
.brand h1 { font-size: 1.75rem; margin: 2px 0 0; }
.brand em { font-style: normal; color: var(--red); }
.bars, .slate .bars {
  height: 10px; border-radius: 6px; margin-bottom: 16px;
  background: linear-gradient(90deg, #c0c0c0 0 14.28%, #c0c000 0 28.56%, #00c0c0 0 42.84%, #00c000 0 57.12%, #c000c0 0 71.4%, #c00000 0 85.68%, #0000c0 0);
  opacity: .85;
}
.avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; margin-bottom: 14px; }
.av-opt { margin: 0; position: relative; }
.av-opt input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.av-opt span { display: grid; place-items: center; height: 44px; font-size: 1.45rem; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); cursor: pointer; }
.av-opt input:checked + span { border-color: var(--red); background: rgba(255, 45, 61, .14); box-shadow: 0 0 0 2px rgba(255, 45, 61, .35); }

/* ---------- App shell ---------- */
.app { min-height: 100vh; padding-bottom: calc(76px + var(--safe-b)); }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(10px + var(--safe-t)) 14px 10px; background: rgba(10, 11, 15, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.tb-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.tb-sub { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.cod-chip { font-family: var(--mono); font-size: .75rem; background: var(--panel2); border: 1px solid var(--line); color: var(--text); padding: 7px 10px; border-radius: 20px; cursor: pointer; white-space: nowrap; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
.offline-bar { display: none; background: var(--amber); color: #2a1a00; text-align: center; font-size: .82rem; padding: 5px; font-weight: 600; }
body.offline .offline-bar { display: block; }
main#view { padding: 14px 14px 20px; max-width: 680px; margin: 0 auto; }
.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(14, 15, 20, .97); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + var(--safe-b)); backdrop-filter: blur(10px);
}
.tabs a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: .68rem; padding: 4px 0; border-radius: 10px; }
.tabs a .ic { font-size: 1.3rem; filter: grayscale(.7); }
.tabs a.on { color: var(--text); background: var(--panel2); }
.tabs a.on .ic { filter: none; }
.badge { position: absolute; top: 0; right: calc(50% - 22px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: .65rem; display: none; place-items: center; font-family: var(--mono); }
.badge.on { display: grid; }

/* ---------- Mural ---------- */
.mural-actions { display: flex; gap: 10px; margin-bottom: 14px; }
.mural-actions .btn { flex: 1; }
.live-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px; border-radius: var(--r); background: linear-gradient(90deg, rgba(255, 45, 61, .22), rgba(255, 45, 61, .05)); border: 1px solid rgba(255, 45, 61, .5); }
.live-banner > div { flex: 1; display: grid; font-size: .9rem; }
.scorestrip { display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px 10px; margin-bottom: 4px; scrollbar-width: none; align-items: center; }
.scorestrip .sc { white-space: nowrap; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 5px 10px; font-size: .82rem; }
.scorestrip .sc b { font-family: var(--mono); color: var(--amber); }
.scorestrip .sc em { font-style: normal; font-family: var(--mono); color: var(--green); margin-left: 4px; }
.feed { display: grid; gap: 12px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.post { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--r); padding: 12px 14px; }
.post.k-pis { border-left-color: var(--violet); }
.post.k-mis { border-left-color: var(--amber); }
.post.needs { box-shadow: 0 0 0 2px var(--green); }
.post header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: .86rem; }
.post .kind { font-family: var(--mono); font-size: .62rem; font-weight: 700; letter-spacing: .12em; padding: 2px 6px; border-radius: 4px; background: rgba(58, 160, 255, .16); color: var(--blue); }
.post.k-pis .kind { background: rgba(166, 107, 255, .16); color: var(--violet); }
.post.k-mis .kind { background: rgba(255, 176, 32, .16); color: var(--amber); }
.post .cod { font-family: var(--mono); font-weight: 700; }
.post time { margin-left: auto; color: var(--muted); font-size: .75rem; font-family: var(--mono); }
.post .body { white-space: pre-wrap; word-wrap: break-word; margin: 8px 0 6px; font-size: 1rem; }
.post .mtag { margin-top: 8px; font-size: .86rem; }
.post .mtag em { font-style: normal; font-family: var(--mono); color: var(--amber); margin: 0 6px; }
.post .mtag .ok { color: var(--green); }
.post .mtag .wait { color: var(--muted); }
.post .photo { margin: 8px 0; border-radius: 10px; overflow: hidden; background: var(--panel2); min-height: 60px; display: grid; place-items: center; color: var(--muted); font-size: .8rem; }
.post .photo img { width: 100%; display: block; max-height: 460px; object-fit: cover; }
.post .confirm { margin: 6px 0; }
.post footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.reacts { display: flex; flex-wrap: wrap; gap: 5px; }
.react { display: inline-flex; align-items: center; gap: 3px; background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 18px; padding: 3px 8px; font-size: .9rem; cursor: pointer; font-family: inherit; }
.react span { font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.react.on { border-color: var(--red); background: rgba(255, 45, 61, .14); }
.react.on span { color: var(--text); }

/* ---------- Slate / revelação do amigo ---------- */
.slate { background: #050608; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 14px; }
.slate .bars { height: 120px; border-radius: 8px; margin: 0 0 12px; }
.slate-txt { display: grid; gap: 4px; text-align: center; font-family: var(--mono); }
.slate-txt b { letter-spacing: .14em; }
.slate-txt span { color: var(--muted); font-size: .85rem; }
.people { display: flex; flex-wrap: wrap; gap: 8px; }
.person { display: inline-flex; align-items: center; gap: 6px; background: var(--panel2); border-radius: 20px; padding: 5px 10px 5px 6px; font-size: .88rem; }
.person .av { font-size: 1.1rem; }
.cut-stage { position: relative; overflow: hidden; min-height: 380px; display: grid; place-content: center; justify-items: center; text-align: center; gap: 14px; padding: 24px; border-radius: var(--r); background: radial-gradient(ellipse at center, #1a1d26, #050608); border: 1px solid var(--line); }
.cut-label { font-family: var(--mono); font-size: .75rem; letter-spacing: .16em; display: inline-flex; align-items: center; gap: 8px; color: var(--green); }
.cut-label.pgm { color: var(--red); }
.cut-stage.playing { background: #000; }
.noise { position: absolute; inset: 0; background: repeating-radial-gradient(circle at 17% 32%, #fff 0, #000 1px, #777 2px, #111 3px); background-size: 7px 7px; animation: noise .12s steps(3) infinite; opacity: .55; }
@keyframes noise { 0% { background-position: 0 0; } 33% { background-position: -3px 2px; } 66% { background-position: 2px -3px; } }
.wipe { position: absolute; inset: 0; background: var(--red); transform: translateX(-100%); animation: wipe 1.4s cubic-bezier(.7, 0, .3, 1) forwards; }
@keyframes wipe { 0%, 45% { transform: translateX(-100%); } 70% { transform: translateX(0); } 100% { transform: translateX(100%); } }
.reveal-av { font-size: 5rem; animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); }
.reveal-name { font-size: 2.2rem; font-weight: 700; animation: pop .7s .1s both cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.card.friend, .card.santa { background: linear-gradient(135deg, rgba(255, 45, 61, .14), var(--panel) 60%); border-color: rgba(255, 45, 61, .4); }
.card.santa { background: linear-gradient(135deg, rgba(31, 209, 107, .16), var(--panel) 60%); border-color: rgba(31, 209, 107, .45); }
.av-big { font-size: 2.8rem; width: 64px; height: 64px; display: grid; place-items: center; background: var(--panel2); border-radius: 16px; flex: none; }
.card .row h2 { margin: 0; }
blockquote { margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid var(--amber); background: var(--panel2); border-radius: 0 10px 10px 0; font-style: italic; white-space: pre-wrap; }
.wishlist { margin: 6px 0 12px; padding-left: 20px; }
.wishlist li { margin: 7px 0; }
.wishlist.edit li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wishlist.edit { padding-left: 0; list-style: none; }
.wishlist.edit li { border-bottom: 1px solid var(--line); padding-bottom: 7px; }

/* ---------- Talkback ---------- */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 10px; }
.seg button { position: relative; font: inherit; font-size: .88rem; font-weight: 600; background: none; border: 0; color: var(--muted); padding: 10px 4px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--panel2); color: var(--text); }
.dot { display: none; width: 8px; height: 8px; border-radius: 50%; background: var(--red); position: absolute; top: 7px; right: 8px; }
.dot.on { display: block; }
.thread-info { font-size: .86rem; color: #c9cdd8; padding: 4px 4px 10px; }
.msgs { display: flex; flex-direction: column; gap: 8px; min-height: 45vh; max-height: calc(100vh - 330px); overflow-y: auto; padding: 10px; background: #07080b; border: 1px solid var(--line); border-radius: var(--r); }
.msg { max-width: 82%; align-self: flex-start; background: var(--panel2); border-radius: 14px 14px 14px 4px; padding: 8px 12px; }
.msg.mine { align-self: flex-end; background: var(--red-d); border-radius: 14px 14px 4px 14px; }
.msg p { margin: 0; white-space: pre-wrap; word-wrap: break-word; }
.msg .who { font-family: var(--mono); font-size: .68rem; color: var(--amber); letter-spacing: .06em; }
.msg time { display: block; text-align: right; font-size: .66rem; color: rgba(255, 255, 255, .55); margin-top: 2px; font-family: var(--mono); }
.sendbar { position: sticky; bottom: calc(76px + var(--safe-b)); display: flex; gap: 8px; margin-top: 10px; background: var(--bg); padding: 6px 0; }
.sendbar input { margin: 0; }

/* ---------- Missões / Eu ---------- */
.mission .pts { font-family: var(--mono); color: var(--amber); font-weight: 700; white-space: nowrap; }
.mission.sent { border-color: rgba(58, 160, 255, .45); }
.mission.done { border-color: rgba(31, 209, 107, .55); background: linear-gradient(135deg, rgba(31, 209, 107, .1), var(--panel) 60%); }
.mission .status { font-size: .9rem; margin-top: 6px; }
.card.me { display: flex; gap: 14px; align-items: center; }
.card.me h2 { margin: 2px 0 4px; }
.cod { font-family: var(--mono); color: var(--amber); }
.cod-big { font-family: var(--mono); font-size: 1.8rem; font-weight: 700; color: var(--amber); text-align: center; padding: 18px; background: #050608; border-radius: 12px; margin: 6px 0 10px; }

/* ---------- Modal & toasts ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .65); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.modal { width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + var(--safe-b)); animation: up .2s ease-out; }
@media (min-width: 640px) { .modal-wrap { align-items: center; } .modal { border-radius: 18px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.to-fixed { background: var(--panel2); padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-size: .92rem; }
.brief { background: rgba(255, 176, 32, .1); border: 1px solid rgba(255, 176, 32, .35); padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-size: .9rem; }
.photo-row { display: flex; align-items: center; gap: 10px; }
.photo-row label { margin: 0; }
.photo-prev { display: flex; align-items: center; gap: 8px; }
.photo-prev img { height: 64px; border-radius: 8px; }
.ask-input { margin: 8px 0; }
#toasts { position: fixed; left: 0; right: 0; bottom: calc(86px + var(--safe-b)); z-index: 60; display: grid; justify-items: center; gap: 6px; pointer-events: none; padding: 0 14px; }
.toast { background: #222634; color: var(--text); border: 1px solid var(--line); padding: 10px 14px; border-radius: 12px; font-size: .9rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); animation: up .2s; max-width: 480px; }
.toast.ok { border-color: rgba(31, 209, 107, .6); }
.toast.err { border-color: var(--red); }
.toast.out { opacity: 0; transition: opacity .4s; }

/* ---------- Organizador ---------- */
.admin { max-width: 820px; }
.adm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.adm-head h1 { font-size: 1.5rem; }
.code-big { font-family: var(--mono); font-size: 2.4rem; font-weight: 700; letter-spacing: .2em; color: var(--amber); }
.count { font-family: var(--mono); font-size: .9rem; color: var(--muted); }
.list { list-style: none; padding: 0; margin: 10px 0 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.list li > div { flex: 1; }
.list li.paused { opacity: .55; }
.people-list .nm { flex: 1; }
.people-list .av { font-size: 1.3rem; }
.flags i { font-style: normal; filter: grayscale(1); opacity: .3; margin: 0 1px; }
.flags i.on { filter: none; opacity: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip-btn { font: inherit; font-size: .82rem; background: rgba(255, 176, 32, .1); border: 1px solid rgba(255, 176, 32, .35); color: var(--amber); border-radius: 20px; padding: 6px 11px; cursor: pointer; }
#exForm select { flex: 1; min-width: 130px; margin: 0; }
.rv-now { background: #050608; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 8px 0 12px; font-size: 1.05rem; }
.rv-ctrl { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-bottom: 12px; }
#admReveal { border-color: rgba(255, 45, 61, .45); }

/* =====================================================================
   TELÃO
   ===================================================================== */
body.telao-body { overflow: hidden; }
.telao { height: 100vh; width: 100vw; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; background: radial-gradient(ellipse at 50% -20%, #1b1020, var(--bg) 60%); }
.tl-top { display: flex; align-items: center; gap: 2vw; padding: 1.4vh 2vw; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .35); }
.onair { display: flex; align-items: center; gap: 10px; background: var(--red); color: #fff; font-family: var(--mono); font-weight: 700; letter-spacing: .16em; padding: .6vh 1vw; border-radius: 6px; font-size: clamp(12px, 1.2vw, 22px); }
.onair .tally { background: #fff; box-shadow: 0 0 12px #fff; }
.tl-title { font-weight: 700; font-size: clamp(16px, 1.8vw, 34px); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-count { font-family: var(--mono); color: var(--amber); font-size: clamp(12px, 1.2vw, 22px); letter-spacing: .08em; text-transform: uppercase; }
.tl-tc { font-family: var(--mono); font-size: clamp(14px, 1.5vw, 28px); background: #000; padding: .4vh .8vw; border-radius: 6px; border: 1px solid var(--line); color: var(--green); }
.tl-btn { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; font-size: 1.1rem; cursor: pointer; padding: 4px 9px; }
.tl-main { position: relative; overflow: hidden; min-height: 0; }
.tl-grid { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 24vw; gap: 1.6vw; padding: 2vh 2vw; }
.tl-feed { columns: 3 18vw; column-gap: 1.2vw; overflow: hidden; }
.tl-post { break-inside: avoid; margin-bottom: 1.2vw; }
.tl-post .post { font-size: clamp(13px, 1.05vw, 22px); }
.tl-post .post .body { font-size: clamp(15px, 1.3vw, 28px); }
.tl-post .post .photo img { max-height: 28vh; }
.tl-post.fresh .post { animation: fresh 1.8s ease-out; }
@keyframes fresh { 0% { box-shadow: 0 0 0 4px var(--red), 0 0 40px var(--red); transform: scale(1.03); } 100% { box-shadow: none; transform: none; } }
.tl-empty { height: 100%; display: grid; place-items: center; }
.tl-empty .slate { width: min(640px, 80%); }
.tl-side { display: grid; gap: 1.2vw; align-content: start; }
.tl-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.4vw; font-size: clamp(12px, 1vw, 20px); }
.tl-box-h { font-family: var(--mono); font-size: .75em; letter-spacing: .16em; color: var(--muted); margin-bottom: .8em; }
.tl-code { font-family: var(--mono); font-size: clamp(28px, 3.6vw, 72px); font-weight: 700; letter-spacing: .14em; color: var(--amber); line-height: 1.1; }
.tl-score { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.tl-score li { counter-increment: s; display: flex; justify-content: space-between; gap: 8px; padding: .35em 0; border-bottom: 1px solid var(--line); font-family: var(--mono); }
.tl-score li::before { content: counter(s) 'º'; color: var(--amber); width: 2.2em; }
.tl-score li span { flex: 1; }
.tl-score li b { color: var(--green); }
.tl-box.status .chip { font-size: .9em; margin-bottom: .5em; }
.tl-ticker { min-width: 0; overflow: hidden; display: flex; align-items: stretch; background: #000; border-top: 2px solid var(--red); font-size: clamp(14px, 1.3vw, 26px); height: clamp(40px, 5vh, 70px); }
.tk-label { display: flex; align-items: center; background: var(--red); color: #fff; font-family: var(--mono); font-weight: 700; letter-spacing: .14em; padding: 0 1.4vw; font-size: .8em; }
.tk-viewport { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; }
.tk-track { display: flex; white-space: nowrap; animation: tick var(--dur, 30s) linear infinite; }
.tk-run { display: flex; align-items: center; gap: 1.5vw; padding-right: 1.5vw; }
.tk-run i { color: var(--red); font-style: normal; font-size: .7em; }
.tk-run .hl { color: var(--amber); font-family: var(--mono); font-weight: 700; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Tela de espera */
.standby { position: absolute; inset: 0; display: grid; place-items: center; }
.bars.full { position: absolute; inset: 0; height: auto; border-radius: 0; margin: 0; opacity: .9; }
.standby-card { position: relative; display: grid; justify-items: center; gap: 1.4vh; background: rgba(0, 0, 0, .88); padding: 4vh 5vw; border-radius: 18px; text-align: center; font-family: var(--mono); }
.standby-card b { font-size: clamp(22px, 3.4vw, 64px); letter-spacing: .1em; }
.standby-card span:last-child { color: var(--muted); font-size: clamp(14px, 1.4vw, 26px); }
.standby-card .tally { width: 22px; height: 22px; }

/* Palco da revelação */
.stage { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 1.6vh; padding: 3vh 4vw; }
.st-count { position: absolute; top: 2.4vh; right: 2.4vw; font-family: var(--mono); color: var(--muted); font-size: clamp(14px, 1.4vw, 28px); }
.st-cod { transition: all .7s cubic-bezier(.6, 0, .2, 1); }
.st-cod .lbl { font-size: clamp(12px, 1.1vw, 20px); color: var(--amber); }
.st-cod .cod { font-size: clamp(40px, 7vw, 150px); font-weight: 700; line-height: 1; color: var(--amber); animation: glitch 1.2s steps(2) infinite; }
.st-cod .q { font-size: clamp(18px, 2vw, 40px); color: var(--muted); margin-top: 1vh; }
@keyframes glitch { 0%, 100% { text-shadow: 3px 0 var(--red), -3px 0 var(--blue); } 50% { text-shadow: -2px 0 var(--red), 2px 0 var(--blue); } }
.st-giver, .st-recv { display: flex; align-items: center; gap: 1.6vw; }
.st-giver .av, .st-recv .av { font-size: clamp(40px, 6vw, 130px); }
.st-giver .nm, .st-recv .nm { font-size: clamp(36px, 5.6vw, 120px); font-weight: 700; line-height: 1; }
.st-recv .nm { color: var(--red); }
.st-mid { font-family: var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); font-size: clamp(16px, 1.8vw, 34px); }
.st-verse { max-width: 70vw; font-size: clamp(16px, 1.8vw, 34px); margin: 1vh 0 0; }
.st-verse.empty { display: none; }
.st-chain { position: absolute; bottom: 2vh; left: 2vw; right: 2vw; display: flex; flex-wrap: wrap; justify-content: center; gap: .6vw 1.4vw; color: var(--muted); font-size: clamp(11px, .95vw, 18px); }
.st-giver, .st-mid, .st-recv, .st-verse { transition: opacity .8s, transform .8s cubic-bezier(.2, 1.4, .4, 1); }
.stage[data-step="0"] .st-giver, .stage[data-step="0"] .st-mid, .stage[data-step="0"] .st-recv, .stage[data-step="0"] .st-verse,
.stage[data-step="1"] .st-mid, .stage[data-step="1"] .st-recv, .stage[data-step="1"] .st-verse,
.stage[data-step="2"] .st-verse { opacity: 0; transform: scale(.6); }
.stage:not([data-step="0"]) .st-cod .q { display: none; }
.stage:not([data-step="0"]) .st-cod .cod { font-size: clamp(22px, 2.6vw, 52px); animation: none; text-shadow: none; }
.stage[data-step="0"] .st-giver, .stage[data-step="0"] .st-mid, .stage[data-step="0"] .st-recv, .stage[data-step="0"] .st-verse { position: absolute; }
.stage[data-step="1"] .st-mid, .stage[data-step="1"] .st-recv, .stage[data-step="1"] .st-verse { position: absolute; }
.stage[data-step="2"] .st-verse { position: absolute; }
.wipe-bar { position: absolute; inset: 0; z-index: 5; background: var(--red); animation: wipe 1.2s cubic-bezier(.7, 0, .3, 1) forwards; pointer-events: none; }

/* Placar final */
.final { height: 100%; display: grid; grid-template-columns: 1.6fr 1fr; gap: 2vw; padding: 2.4vh 2.4vw; overflow: hidden; font-size: clamp(13px, 1.05vw, 22px); }
.final h2 { font-size: 2em; }
.final h3 { font-size: 1.3em; }
.podium { display: grid; grid-template-columns: 1fr 1.2fr 1fr; align-items: end; gap: 1vw; margin: 2vh 0 3vh; }
.pd { display: grid; justify-items: center; gap: .3em; text-align: center; }
.pd .av { font-size: 3em; }
.pd b { font-size: 1.3em; }
.pd em { font-style: normal; font-family: var(--mono); color: var(--green); }
.pd .step { width: 100%; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px 10px 0 0; font-family: var(--mono); font-size: 2em; font-weight: 700; color: var(--amber); padding: 1vh 0; }
.pd.p1 { order: 2; } .pd.p1 .step { height: 16vh; background: linear-gradient(var(--red), var(--red-d)); color: #fff; }
.pd.p2 { order: 1; } .pd.p2 .step { height: 11vh; }
.pd.p3 { order: 3; } .pd.p3 .step { height: 8vh; }
.awards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4vw; margin-bottom: 2vh; }
.awards > div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2vw; }
.fin-hl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1vw; }
.fin-hl .post .photo { display: none; }
.fin-right { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.4vw; overflow: hidden; }
.fin-chain { margin: 0; padding-left: 1.6em; columns: 1; }
.fin-chain li { padding: .3em 0; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) {
  body.telao-body { overflow: auto; }
  .telao { height: auto; min-height: 100vh; overflow: visible; }
  .tl-grid, .final { grid-template-columns: 1fr; }
  .tl-feed { columns: 1; }
  .stage { position: relative; min-height: 70vh; }
}
