/* ===================== CODE BLUE: TAMPONAMENTO — TV ===================== */
@font-face { font-family: 'Inter'; src: url(fonts/inter-400.woff2) format('woff2'); font-weight: 400; font-display: block; }
@font-face { font-family: 'Inter'; src: url(fonts/inter-500.woff2) format('woff2'); font-weight: 500; font-display: block; }
@font-face { font-family: 'Inter'; src: url(fonts/inter-600.woff2) format('woff2'); font-weight: 600; font-display: block; }
@font-face { font-family: 'Inter'; src: url(fonts/inter-700.woff2) format('woff2'); font-weight: 700 900; font-display: block; }
@font-face { font-family: 'Mono'; src: url(fonts/JetBrainsMono.ttf) format('truetype'); font-weight: 100 900; font-display: block; }

:root {
  --bg: #04070b; --painel: #0a1017; --painel2: #0e1620; --borda: #1b2633; --tx: #e8eef5; --mut: #8696a9; --fraco: #4b5a6c;
  --ecg: #3ef07a; --art: #ff4d5e; --spo: #2fd3ff; --pvc: #fbbf24; --fr: #e5e7eb; --ok: #34d399; --perigo: #ff3b4e; --alerta: #fbbf24;
  --azul: #60a5fa;
}
* { box-sizing: border-box; }
/* tudo em rem: 16 px em 1920×1080; escala junto com a tela (cabe em 1366×768 e com zoom do Windows) */
html { font-size: min(0.8333vw, 1.4815vh); }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--tx); font-family: 'Inter', system-ui, sans-serif; overflow: hidden; }
body { -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
.num, .mono { font-family: 'Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
#app { position: fixed; inset: 0; }
.tela { position: absolute; inset: 0; display: none; }
.tela.on { display: flex; }

.bt { border: 1px solid var(--borda); background: #111a25; border-radius: .7rem; padding: .7rem 1.2rem; font-weight: 600; font-size: 1.05rem; transition: transform .1s, background .2s; white-space: nowrap; }
.bt:hover { background: #172333; }
.bt:active { transform: scale(.97); }
.bt.pri { background: linear-gradient(180deg, #ff5468, #d81f3a); border-color: #ff6b7d; color: #fff; box-shadow: 0 .4rem 1.6rem #ff2a4a40; }
.bt.alerta { background: #3a2a06; border-color: #b7860b; color: #fde68a; }
.bt.sec.on { background: #1e3a5f; border-color: var(--azul); }
.bt.fraco { color: var(--mut); }
.bt.grande { font-size: 1.6rem; padding: 1.1rem 2.6rem; border-radius: 1rem; font-weight: 800; letter-spacing: .04em; }
kbd { font-family: 'Mono', monospace; font-size: .75em; border: 1px solid #334155; border-radius: .3rem; padding: 0 .3rem; color: var(--mut); margin-left: .3rem; }
.selo { display: inline-block; font-family: 'Mono', monospace; font-weight: 700; letter-spacing: .12em; font-size: 1.05rem; color: #ff8a98; border: 1px solid #ff4d5e66; background: #ff4d5e14; padding: .35rem .8rem; border-radius: .5rem; }

/* ===================== LOBBY ===================== */
#tLobby { padding: 2.4rem 2.8rem; gap: 2.6rem; background: radial-gradient(1200px 700px at 15% 20%, #1a0a10 0%, transparent 60%), radial-gradient(900px 600px at 90% 90%, #06121d 0%, transparent 60%), var(--bg); }
.lobby-esq { width: 40%; display: flex; flex-direction: column; gap: 1.8rem; min-height: 0; }
.marca h1 { margin: 0; font-weight: 900; font-size: 5.2rem; letter-spacing: -.02em; line-height: .95; color: #fff; }
.marca h1 span { display: block; font-size: 2.35rem; letter-spacing: .32em; color: var(--art); font-weight: 800; margin-top: .5rem; }
.marca .sub { margin: .9rem 0 0; color: var(--mut); font-size: 1.25rem; }
.marca-ecg { width: 15rem; height: 2.6rem; margin-bottom: .6rem; }
.marca-ecg svg { width: 100%; height: 100%; }
.marca-ecg path { fill: none; stroke: var(--ecg); stroke-width: 2.4; stroke-linejoin: round; }
.marca-ecg path.base { opacity: .45; }
/* traço sempre inteiro; só um brilho percorre (o print nunca pega um quadro vazio) */
.marca-ecg path.luz { filter: drop-shadow(0 0 4px #3ef07a); stroke-width: 3; stroke-dasharray: 70 400; animation: varre 2.4s linear infinite; }
@keyframes varre { from { stroke-dashoffset: 70; } to { stroke-dashoffset: -400; } }
@keyframes tracar { from { stroke-dashoffset: 420; } to { stroke-dashoffset: 0; } }
.qr-card { display: flex; gap: 1.8rem; align-items: center; background: var(--painel); border: 1px solid var(--borda); border-radius: 1.4rem; padding: 1.4rem; }
#qr { width: 17rem; height: 17rem; background: #fff; border-radius: .9rem; padding: .8rem; flex: none; }
#qr svg, #qr img { width: 100%; height: 100%; display: block; }
.qr-info .rot { color: var(--mut); font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.qr-info .url { font-family: 'Mono', monospace; font-size: 1.15rem; margin-top: .4rem; word-break: break-all; color: #cfe3ff; }
.qr-info .cod { font-family: 'Mono', monospace; font-size: 4.4rem; font-weight: 800; letter-spacing: .14em; color: #fff; line-height: 1; margin-top: .3rem; }
.passos { margin: 0; padding-left: 1.6rem; color: #c7d2df; font-size: 1.3rem; line-height: 1.9; }
.passos b { color: #fff; }
.pap { display: inline-block; background: #121c28; border: 1px solid var(--borda); border-radius: .5rem; padding: 0 .5rem; font-size: 1.1rem; line-height: 1.6; }

.lobby-dir { flex: 1; display: flex; flex-direction: column; gap: 1.2rem; min-width: 0; min-height: 0; }
.lobby-topo { display: flex; justify-content: space-between; align-items: center; font-size: 1.5rem; color: var(--mut); }
.lobby-topo b { color: #fff; font-family: 'Mono', monospace; }
.ctrl-times { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; }
.ctrl-times button { width: 2.4rem; height: 2.4rem; border-radius: .5rem; border: 1px solid var(--borda); background: #111a25; font-size: 1.4rem; line-height: 1; }
.lobby-times { flex: 1; min-height: 0; display: grid; gap: 1rem; grid-auto-rows: 1fr; }
.lt { background: var(--painel); border: 1px solid var(--borda); border-top: .35rem solid var(--cor); border-radius: 1rem; padding: 1rem 1.1rem; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.lt-cab { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .6rem; }
.lt-nome { font-weight: 800; font-size: 1.55rem; color: var(--cor); }
.lt-n { font-family: 'Mono', monospace; color: var(--mut); font-size: 1.1rem; }
.lt-papeis { display: flex; gap: .4rem; margin-bottom: .6rem; font-size: .95rem; color: var(--mut); }
.lt-papeis span { background: #101823; border-radius: .4rem; padding: .1rem .45rem; }
.lt-papeis span.falta { color: #fca5a5; border: 1px dashed #7f1d1d; }
.lt ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; align-content: flex-start; overflow: hidden; }
.lt li { background: #111b27; border: 1px solid #1f2b3a; border-radius: 2rem; padding: .25rem .7rem; font-size: 1.1rem; white-space: nowrap; display: flex; gap: .3rem; align-items: center; animation: entra .4s ease-out; }
.lt li.off { opacity: .4; }
.lt li .x { margin-left: .2rem; color: var(--fraco); font-size: .9rem; border: 0; background: none; padding: 0 .1rem; }
.lt-vazio { color: var(--fraco); font-size: 1.05rem; font-style: italic; }
@keyframes entra { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.lobby-acoes { display: flex; gap: .8rem; justify-content: flex-end; align-items: center; }
.lobby-acoes .bt.pri { font-size: 1.4rem; padding: 1rem 2rem; }
.sem-time { color: var(--mut); font-size: 1.05rem; }

/* ===================== BRIEFING ===================== */
#tBriefing { flex-direction: column; padding: 2.6rem 3.4rem 2.2rem; gap: 1.4rem; background: radial-gradient(1000px 600px at 80% 10%, #1a0a10, transparent 60%), var(--bg); }
.brf-topo { display: flex; align-items: center; gap: 1.4rem; }
.brf-dica { color: var(--mut); font-size: 1.1rem; }
#tBriefing h2 { margin: 0; font-size: 4rem; font-weight: 900; letter-spacing: -.01em; }
.brf-corpo { display: flex; gap: 2.6rem; flex: 1; min-height: 0; }
.brf-texto { flex: 1.35; display: flex; flex-direction: column; gap: 1.2rem; }
.vinheta { margin: 0; font-size: 2.05rem; line-height: 1.45; color: #e9eef5; }
.exadm { margin: 0; font-size: 1.6rem; color: #b9c6d6; }
.missao { margin-top: auto; background: #0f1a12; border: 1px solid #1f5130; border-radius: 1rem; padding: 1rem 1.4rem; display: flex; gap: 1.2rem; align-items: center; }
.missao span { font-family: 'Mono', monospace; color: var(--ecg); letter-spacing: .16em; font-weight: 700; }
.missao b { font-size: 1.6rem; }
.brf-vitais { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-content: start; }
.vt { background: #05090e; border: 1px solid var(--borda); border-radius: 1rem; padding: 1rem 1.3rem; }
.vt .r { font-family: 'Mono', monospace; font-size: 1rem; letter-spacing: .12em; font-weight: 700; }
.vt .v { font-family: 'Mono', monospace; font-size: 3.6rem; font-weight: 700; line-height: 1.1; }
.vt .u { font-size: 1rem; color: var(--mut); }
.vt.obs { grid-column: span 2; font-size: 1.2rem; color: var(--mut); }
.brf-papeis { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.brf-papeis div { background: var(--painel); border: 1px solid var(--borda); border-radius: .8rem; padding: .7rem 1rem; color: var(--mut); font-size: 1.1rem; line-height: 1.35; }
.brf-papeis b { color: #fff; display: block; font-size: 1.25rem; }
#btIniciar { align-self: center; }

/* ===================== JOGO ===================== */
#tJogo { flex-direction: column; }
.barra { height: 4.4rem; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 1.2rem; gap: 1rem; background: #070b10; border-bottom: 1px solid var(--borda); }
.barra-esq, .barra-dir { display: flex; align-items: center; gap: .7rem; }
.barra-esq { min-width: 0; }
.logo-mini { font-weight: 900; letter-spacing: .08em; color: var(--art); font-size: 1.3rem; }
.barra-caso { font-size: 1.25rem; color: #cbd5e1; font-weight: 600; white-space: nowrap; }
.barra-meio { display: flex; align-items: center; gap: 1.2rem; flex: 1; min-width: 0; justify-content: center; }
.relogio { font-family: 'Mono', monospace; font-size: 2.3rem; font-weight: 700; color: #fff; }
.ticker { font-size: 1.15rem; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 36rem; }
.barra .bt { padding: .55rem .9rem; font-size: 1rem; }

.leitos { flex: 1; min-height: 0; display: grid; gap: .7rem; padding: .7rem; }
.leito { position: relative; background: #03060a; border: 1px solid #16202c; border-radius: .9rem; display: grid; grid-template-rows: auto 1fr auto; min-height: 0; min-width: 0; overflow: hidden; }
.leito::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: .3rem; background: var(--cor); }
.l-cab { display: flex; align-items: center; gap: .6rem; padding: .65rem .9rem .35rem; min-width: 0; }
.l-num { font-family: 'Mono', monospace; color: var(--mut); font-size: .95rem; }
.l-nome { font-weight: 800; font-size: 1.45rem; color: var(--cor); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-memb { color: var(--fraco); font-size: .95rem; white-space: nowrap; }
.l-status { margin-left: auto; font-family: 'Mono', monospace; font-weight: 700; font-size: .95rem; letter-spacing: .08em; padding: .2rem .6rem; border-radius: .4rem; white-space: nowrap; }
.st-vivo { color: var(--ecg); background: #3ef07a14; border: 1px solid #3ef07a44; }
.st-critico { color: var(--alerta); background: #fbbf2418; border: 1px solid #fbbf2466; animation: piscaSuave 1s infinite; }
.st-aesp { color: #fff; background: var(--perigo); animation: pisca .5s steps(2) infinite; }
.st-assistolia { color: #9ca3af; background: #1f2937; }
.st-salvo, .st-cc { color: #04130b; background: var(--ok); }
@keyframes pisca { 50% { opacity: .35; } }
@keyframes piscaSuave { 50% { opacity: .6; } }

.l-corpo { display: grid; grid-template-columns: 25% minmax(0,1fr) 24%; grid-template-rows: minmax(0,38fr) minmax(0,62fr); grid-template-areas: 'hz ondas nums' 'pac pac nums'; min-height: 0; }
.l-corpo > .l-coracao { grid-area: hz; } .l-corpo > .l-ondas { grid-area: ondas; } .l-corpo > .l-num-col { grid-area: nums; } .l-corpo > .pac { grid-area: pac; min-height: 0; border-top: 1px solid #101820; padding: .15rem .3rem 0; }
.l-corpo > * { min-width: 0; }
.l-coracao { position: relative; min-height: 0; display: flex; align-items: center; justify-content: center; padding: .2rem; }
.l-coracao { flex-direction: column; justify-content: flex-start; }
.l-coracao .hz { width: 100%; flex: 1 1 auto; min-height: 0; }
.l-coracao .coracao { width: 100%; height: 100%; }

.paciente { width: 100%; height: 100%; display: block; overflow: hidden; transition: filter .6s, opacity .6s; }
.paciente.apagado, .paciente .apagado { filter: grayscale(1) brightness(.55); }
.paciente .boneco .bc { transform-box: fill-box; transform-origin: 50% 100%; }
.paciente .bc.pula { animation: pula .55s cubic-bezier(.3,1.6,.5,1); }
@keyframes pula { 30% { transform: translateY(-7px); } 60% { transform: translateY(0); } 75% { transform: translateY(-2px); } }
.paciente .balao { animation: balao 2.6s ease forwards; }
@keyframes balao { 0% { opacity: 0; transform: translateY(4px); } 10%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.boneco-svg { display: inline-block; height: 1.6em; width: auto; vertical-align: -0.35em; overflow: visible; }
.l-coracao .rotulo-derrame { flex: none; white-space: nowrap; line-height: 1.1; font-size: .8rem; color: #e8a0a8; font-family: 'Mono', monospace; letter-spacing: .04em; }
.l-ondas { position: relative; min-height: 0; border-left: 1px solid #101820; border-right: 1px solid #101820; }
.l-ondas canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.l-ondas .canal { position: absolute; left: .4rem; font-family: 'Mono', monospace; font-size: .8rem; font-weight: 700; letter-spacing: .06em; }
.l-num-col { display: grid; grid-template-rows: 1.2fr 1.4fr 1fr 1fr; min-height: 0; padding: .1rem .7rem .1rem .7rem; overflow: hidden; }
.nm { display: flex; flex-direction: column; justify-content: center; min-height: 0; border-bottom: 1px solid #0f1720; }
.nm:last-child { border-bottom: 0; }
.nm .r { font-family: 'Mono', monospace; font-size: .8rem; font-weight: 700; letter-spacing: .08em; display: flex; justify-content: space-between; }
.nm .v { font-family: 'Mono', monospace; font-weight: 700; line-height: 1; white-space: nowrap; }
.nm.fc { color: var(--ecg); } .nm.fc .v { font-size: 3.3rem; }
.nm.pa { color: var(--art); } .nm.pa .v { font-size: 2.15rem; } .nm.pa .m { display: block; font-size: 1.05rem; opacity: .85; margin-top: .15rem; }
.nm.sp { color: var(--spo); } .nm.sp .v { font-size: 2.2rem; }
.nm.pv { color: var(--pvc); } .nm.pv .v { font-size: 1.8rem; }
.nm .v.alarme { animation: pisca .6s steps(2) infinite; }

.l-pe { padding: .35rem .8rem .6rem; display: flex; flex-direction: column; gap: .3rem; border-top: 1px solid #0f1720; min-width: 0; }
.l-chips { display: flex; gap: .35rem; flex-wrap: nowrap; overflow: hidden; align-items: center; }
.chip { font-size: .85rem; padding: .12rem .45rem; border-radius: .35rem; background: #0f1823; border: 1px solid #1d2a3a; color: #9fb0c4; white-space: nowrap; }
.chip.on { color: #d7fbe8; border-color: #1f6f4a; background: #0c2a1d; }
.chip.ruim { color: #fecaca; border-color: #7f1d1d; background: #2a0c10; }
.chip.cc { color: #e0f2fe; border-color: #0369a1; background: #082f49; }
.barra-prog { flex: 1; min-width: 4rem; height: .55rem; background: #101a26; border-radius: 1rem; overflow: hidden; }
.barra-prog i { display: block; height: 100%; background: linear-gradient(90deg, #0ea5e9, #34d399); width: 0; transition: width .3s linear; }
.l-log { font-size: .98rem; line-height: 1.3; color: #c3cfdc; min-height: 2.6em; }
.l-log div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-log div b { color: #fff; font-weight: 700; }
.l-log .bom { color: #a7f3d0; } .l-log .alerta { color: #fde68a; } .l-log .perigo { color: #fecaca; } .l-log .info { color: #c3cfdc; }
.l-log div:nth-child(2) { opacity: .6; }

/* faixas sobre o leito */
.l-faixa { position: absolute; left: 0; right: 0; top: 2.75rem; text-align: center; font-weight: 900; font-size: 1.45rem; letter-spacing: .05em; padding: .2rem .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; display: none; }
.leito.aesp .l-faixa { display: block; background: #ff1f3dcc; color: #fff; animation: pisca .7s steps(2) infinite; }
.leito.assistolia .l-faixa { display: block; background: #111827e6; color: #9ca3af; }
.leito.salvo .l-faixa, .leito.cc .l-faixa { display: block; background: #059669e0; color: #fff; }
.leito.assistolia .l-corpo { filter: grayscale(1) brightness(.6); }
.leito.critico { border-color: #6b4b0b; }
.leito.aesp { border-color: var(--perigo); box-shadow: inset 0 0 3rem #ff1f3d30; }
.leito .l-st { position: absolute; top: 3.2rem; left: 33%; font-family: 'Mono', monospace; font-weight: 800; font-size: 1rem; background: #ff1f3d; color: #fff; padding: .2rem .5rem; border-radius: .3rem; display: none; animation: pisca .4s steps(2) infinite; }
.leito.st .l-st { display: block; }
.leito .l-pop { position: absolute; left: .5rem; right: .5rem; bottom: .35rem; max-width: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; font-size: 1.02rem; line-height: 1.3; box-shadow: 0 .4rem 1.2rem #0009; padding: .4rem .8rem; border-radius: .5rem; opacity: 0; transform: translateY(.4rem); transition: opacity .25s, transform .25s; pointer-events: none; }
.leito .l-pop.on { opacity: 1; transform: none; }
.l-pop.bom { background: #065f46; color: #ecfdf5; } .l-pop.perigo { background: #b91c1c; color: #fff; } .l-pop.alerta { background: #92400e; color: #fffbeb; } .l-pop.info { background: #1e3a5f; color: #e0f2fe; }
.leito.vazio-time { opacity: .45; }
.leito.clicavel { cursor: pointer; }

/* painel central (6ª célula) */
.central { background: var(--painel); border: 1px solid var(--borda); border-radius: .9rem; padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .8rem; min-height: 0; overflow: hidden; }
.central h4 { margin: 0; font-size: 1rem; letter-spacing: .14em; color: var(--mut); font-family: 'Mono', monospace; }
.central .feed { -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: .35rem; font-size: 1.02rem; }
.central .feed div { flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.central .feed i { font-style: normal; font-weight: 800; }
.central .qrm { display: flex; gap: .9rem; align-items: center; color: var(--mut); font-size: .95rem; }
.central .qrm .q { width: 6.5rem; height: 6.5rem; background: #fff; border-radius: .4rem; padding: .3rem; flex: none; }
.central .qrm .q svg { width: 100%; height: 100%; }
.central .qrm b { color: #fff; font-family: 'Mono', monospace; font-size: 1.6rem; display: block; }
.central .placar { display: flex; flex-direction: column; gap: .3rem; }
.central .placar div { display: flex; justify-content: space-between; font-size: 1.05rem; }
.central .placar span:last-child { font-family: 'Mono', monospace; }

.pausa-tv { position: absolute; inset: 4.4rem 0 0 0; background: #02040899; backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; }
.pausa-tv.on { display: flex; }
.pausa-tv div { text-align: center; background: #0b1220; border: 2px solid var(--azul); border-radius: 1.4rem; padding: 2rem 4rem; }
.pausa-tv b { display: block; font-size: 4rem; letter-spacing: .1em; }
.pausa-tv span { font-size: 1.6rem; color: var(--mut); }
.dilema-tv { position: absolute; left: 50%; top: 5.2rem; transform: translateX(-50%); display: none; z-index: 5; background: #2a1d02f2; border: 2px solid #f59e0b; border-radius: 1rem; padding: .9rem 1.6rem; text-align: center; box-shadow: 0 1rem 3rem #000a; }
.dilema-tv.on { display: block; animation: entra .3s; }
.dilema-tv b { font-size: 1.8rem; color: #fde68a; }
.dilema-tv .seg { font-family: 'Mono', monospace; font-size: 2rem; color: #fff; margin-left: 1rem; }
.dilema-tv p { margin: .3rem 0 0; font-size: 1.2rem; color: #fef3c7; }
.dilema-tv .votos { display: flex; gap: .5rem; justify-content: center; margin-top: .5rem; }
.dilema-tv .votos span { font-size: .95rem; padding: .15rem .5rem; border-radius: .4rem; background: #0006; }

/* ===================== RESULTADO ===================== */
#tResultado { flex-direction: column; padding: 2.4rem 3rem 2rem; gap: 1.4rem; }
.res-topo { display: flex; align-items: center; gap: 1.4rem; }
.res-topo h2 { margin: 0; font-size: 3.2rem; font-weight: 900; }
.res-corpo { flex: 1; display: flex; gap: 2rem; min-height: 0; }
.res-times { flex: 1.15; display: flex; flex-direction: column; gap: .7rem; min-height: 0; }
.rt { display: grid; grid-template-columns: 1.4rem 1fr 10rem 7rem 8rem; align-items: center; gap: 1rem; background: var(--painel); border: 1px solid var(--borda); border-radius: .9rem; padding: .8rem 1.1rem; font-size: 1.3rem; }
.rt .cor { width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--cor); }
.rt .nome { font-weight: 800; color: var(--cor); font-size: 1.5rem; }
.rt .nome small { display: block; color: var(--mut); font-weight: 500; font-size: 1rem; margin-top: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt .desf { font-weight: 800; font-family: 'Mono', monospace; font-size: 1.1rem; }
.rt .tempo { font-family: 'Mono', monospace; color: var(--mut); }
.rt .pts { font-family: 'Mono', monospace; font-weight: 800; font-size: 1.6rem; text-align: right; }
.res-licoes { flex: 1; background: #0b1410; border: 1px solid #1f5130; border-radius: 1.2rem; padding: 1.4rem 1.8rem; min-height: 0; overflow: hidden; }
.res-licoes h3 { margin: 0 0 1rem; font-size: 1.5rem; color: var(--ecg); letter-spacing: .02em; }
.res-licoes ol { margin: 0; padding-left: 1.6rem; display: flex; flex-direction: column; gap: .9rem; font-size: 1.45rem; line-height: 1.38; }
#btProximo { align-self: flex-end; }

/* ===================== DEBRIEF ===================== */
#tDebrief { flex-direction: column; padding: 1.4rem 2.4rem 1.2rem; gap: 1rem; }
.abas { display: flex; gap: .6rem; }
.abas button { border: 1px solid var(--borda); background: #0c131c; border-radius: .8rem; padding: .8rem 1.4rem; font-size: 1.3rem; font-weight: 700; color: var(--mut); }
.abas button.on { background: #1b2a3c; color: #fff; border-color: var(--azul); }
.aba-conteudo { flex: 1; min-height: 0; position: relative; }
.dica-teclas { position: absolute; right: 2.4rem; top: 2rem; color: var(--fraco); font-size: 1rem; }

/* pódio */
.podio-wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; height: 100%; }
.podio { display: flex; align-items: flex-end; justify-content: center; gap: 1.2rem; padding-top: 1rem; height: 100%; }
.pd { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 13rem; }
.pd .nome { font-weight: 900; font-size: 2rem; color: var(--cor); text-align: center; }
.pd .pts { font-family: 'Mono', monospace; font-size: 1.6rem; margin: .2rem 0 .6rem; }
.pd .bloco { width: 100%; border-radius: 1rem 1rem 0 0; background: linear-gradient(180deg, var(--cor), #0000 140%); display: flex; align-items: flex-start; justify-content: center; font-size: 4rem; font-weight: 900; color: #0009; padding-top: .8rem; animation: sobe .9s cubic-bezier(.2,.9,.3,1.2) both; transform-origin: bottom; }
.pd .med { display: flex; gap: .3rem; font-size: 1.6rem; margin-bottom: .4rem; min-height: 2rem; }
@keyframes sobe { from { transform: scaleY(0); } }
.podio-lado { display: flex; flex-direction: column; gap: 1rem; min-height: 0; }
.cartao { background: var(--painel); border: 1px solid var(--borda); border-radius: 1rem; padding: 1rem 1.3rem; }
.cartao h3 { margin: 0 0 .7rem; font-size: 1.3rem; color: var(--mut); letter-spacing: .06em; }
.mvp div, .resto div { display: flex; justify-content: space-between; font-size: 1.3rem; padding: .25rem 0; border-bottom: 1px solid #111b27; }
.mvp div span:last-child, .resto div span:last-child { font-family: 'Mono', monospace; }
.medlist { display: flex; flex-direction: column; gap: .4rem; font-size: 1.15rem; }
.medlist b { color: #fff; }

/* curva P-V */
.curva-wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; height: 100%; }
.curva-graf { background: #05090e; border: 1px solid var(--borda); border-radius: 1rem; padding: 1rem; display: flex; flex-direction: column; min-height: 0; }
.curva-graf svg { flex: 1; min-height: 0; width: 100%; }
.curva-ctrl { display: flex; align-items: center; gap: 1rem; font-size: 1.2rem; padding: .6rem .4rem 0; }
.curva-ctrl input[type=range] { flex: 1; accent-color: #f59e0b; height: 2rem; }
.curva-ctrl .tog { border: 1px solid var(--borda); background: #0f1823; border-radius: .6rem; padding: .4rem .9rem; font-weight: 700; }
.curva-ctrl .tog.on { border-color: #f59e0b; color: #fde68a; }
.curva-txt { display: flex; flex-direction: column; gap: .9rem; font-size: 1.35rem; line-height: 1.4; min-height: 0; }
.curva-txt .cx { background: var(--painel); border: 1px solid var(--borda); border-radius: .9rem; padding: .9rem 1.1rem; }
.curva-txt .cx b { color: #fff; }
.curva-txt .cx.agudo { border-left: .35rem solid var(--art); }
.curva-txt .cx.cron { border-left: .35rem solid var(--spo); }
.curva-txt .cx.dren { border-left: .35rem solid var(--ok); }
.leitura { font-family: 'Mono', monospace; font-size: 1.3rem; }

/* diagnóstico */
.diag-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; gap: 1rem; height: 100%; }
.dg { background: var(--painel); border: 1px solid var(--borda); border-radius: 1rem; padding: 1.1rem 1.2rem; overflow: hidden; }
.dg h4 { margin: 0 0 .6rem; font-size: 1.45rem; color: #fff; }
.dg p { margin: 0; font-size: 1.18rem; line-height: 1.42; color: #c3cfdc; }
.dg:nth-child(1) { border-top: .3rem solid var(--art); } .dg:nth-child(2) { border-top: .3rem solid var(--pvc); } .dg:nth-child(3) { border-top: .3rem solid var(--art); } .dg:nth-child(4) { border-top: .3rem solid #a78bfa; }
.dg:nth-child(5) { border-top: .3rem solid var(--pvc); } .dg:nth-child(6) { border-top: .3rem solid var(--ecg); } .dg:nth-child(7) { border-top: .3rem solid var(--spo); } .dg:nth-child(8) { border-top: .3rem solid #a78bfa; }

/* erros & condutas */
.erros-wrap { display: grid; grid-template-columns: 1fr 1.45fr; grid-template-rows: auto 1fr; gap: 1rem; height: 100%; }
.erros-sala { grid-row: span 2; display: flex; flex-direction: column; gap: .7rem; }
.eb { display: grid; grid-template-columns: 1fr 9rem 3rem; align-items: center; gap: .7rem; font-size: 1.2rem; }
.eb .b { height: 1.1rem; background: #111b27; border-radius: 1rem; overflow: hidden; }
.eb .b i { display: block; height: 100%; border-radius: 1rem; }
.eb .n { font-family: 'Mono', monospace; text-align: right; font-weight: 700; }
.tab-conduta { width: 100%; border-collapse: collapse; font-size: 1.18rem; }
.tab-conduta td { padding: .5rem .6rem; border-bottom: 1px solid #142030; vertical-align: top; line-height: 1.35; }
.tab-conduta td:first-child { color: #fff; font-weight: 700; width: 36%; }
.evitar { color: #fecaca; font-size: 1.15rem; margin-top: .6rem; }
.prova li { font-size: 1.15rem; line-height: 1.4; margin-bottom: .35rem; }
.prova { margin: 0; padding-left: 1.3rem; }

/* painel do apresentador */
.painel { position: absolute; right: 1rem; top: 5.2rem; width: 30rem; background: #0b1220f5; border: 1px solid var(--azul); border-radius: 1rem; padding: 1rem; display: none; z-index: 8; box-shadow: 0 1rem 3rem #000c; }
.painel.on { display: block; }
.painel h4 { margin: 0 0 .6rem; font-size: 1.3rem; }
.painel .g { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-bottom: .7rem; }
.painel .g button { border: 1px solid var(--borda); background: #111a25; border-radius: .5rem; padding: .5rem; font-size: 1rem; text-align: left; }
.painel .sec-t { color: var(--mut); font-size: .9rem; margin: .3rem 0; letter-spacing: .1em; }

.toast-tv { position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%); background: #111a25; border: 1px solid var(--borda); padding: .8rem 1.4rem; border-radius: .8rem; font-size: 1.2rem; display: none; z-index: 9; }
.toast-tv.on { display: block; }

/* bonequinhos no lobby e no pódio */
.lt li .boneco-svg { height: 2.3em; margin: -.45em .2rem -.35em -.2rem; vertical-align: -0.75em; }
.lt li.chega { animation: chega .7s cubic-bezier(.3,1.5,.5,1); }
@keyframes chega { 0% { opacity: 0; transform: translateY(-1.2rem) scale(.7); } 100% { opacity: 1; transform: none; } }
.mvp-boneco { display: flex; align-items: center; gap: .8rem; padding: .3rem 0 .6rem; font-size: 1.4rem; border: 0 !important; }
.mvp-boneco .boneco-svg { height: 4.6rem; animation: flutuaMvp 2.4s ease-in-out infinite; }
@keyframes flutuaMvp { 50% { transform: translateY(-.3rem); } }

/* evento novo no leito: a própria linha do log acende (sem sobrepor nada) */
.l-log div.novo { opacity: 1; color: #fff; font-weight: 700; border-radius: .35rem; padding: 0 .4rem; margin: 0 -.4rem; animation: novoLog .35s ease-out; }
.l-log div.novo.bom { background: #065f46; } .l-log div.novo.perigo { background: #b91c1c; } .l-log div.novo.alerta { background: #92400e; } .l-log div.novo.info { background: #1e3a5f; }
.l-log div.novo b { color: #fff; }
@keyframes novoLog { from { transform: translateY(.3rem); opacity: 0; } }
/* modo B: nome acima do boneco dirigido pelo aluno */
.paciente .nome-boneco text { font: 700 6.2px Inter, sans-serif; fill: #fff; }
.paciente .nome-boneco rect { fill: #05080ddd; stroke: #ffffff30; stroke-width: .4; }
.paciente .nome-boneco rect.ativo { fill: #0369a1; stroke: #7dd3fc; }
.paciente .nome-boneco line { stroke: #ffffff80; stroke-width: .5; }
#btLivre.on, #btAlterna.on { border-color: var(--ecg); color: #eafff1; }

/* H (teste geral 03/12): nova partida na mesma sala, discreto no canto do debrief */
/* RCP (03/12): embaixo ela cobria o cartão de medalhas em 1366×768 (lista cheia) e disputava o canto com o MENU flutuante;
   foi para a faixa das abas, no vão entre as abas e a dica "troca de aba" (livre em 1366 e 1920) */
#tDebrief .nova-partida { position: absolute; right: 13rem; top: 1.4rem; bottom: auto; font-size: 1rem; padding: .5rem 1rem; opacity: .85; z-index: 3; }
/* H: aviso de "jogo aberto em outra aba" (a aba antiga para de reconectar) */
#avisoSubst { position: fixed; inset: 0; z-index: 9999; background: rgba(4, 8, 12, .88); display: flex; align-items: center; justify-content: center; }
#avisoSubst .cx { display: flex; flex-direction: column; gap: 1.2rem; align-items: center; text-align: center; padding: 2.4rem 3rem; background: #0e1a24; border: 3px solid #ff4d5e; max-width: 46rem; }
#avisoSubst b { font-size: 2rem; color: #ff8a98; letter-spacing: .04em; }
#avisoSubst span { font-size: 1.7rem; line-height: 1.4; color: #c7d2df; }

/* R (03/12): eco REAL por alguns segundos no painel do leito (por cima do coração, sem mexer no layout) */
.l-corpo > .l-eco-real { grid-column: hz-start / ondas-end; grid-row: hz-start / ondas-end; position: relative; z-index: 3; min-height: 0; min-width: 0; background: #000; overflow: hidden; border: 2px solid #fef3c7; }
.l-eco-real video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.l-eco-real span { position: absolute; left: .3rem; top: .3rem; padding: .1rem .4rem; background: rgba(0,0,0,.75); color: #fef3c7; font-family: 'Mono', monospace; font-size: .9rem; line-height: 1.2; }
.l-eco-real span small { display: block; color: #a8b4c2; font-size: .72rem; }
/* R (03/12): miniaturas de exame real na aba Diagnóstico + tela cheia */
.dg.com-real { display: flex; flex-direction: column; }
.dg.com-real p { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.dg-reais { flex: none; display: flex; gap: .5rem; margin-top: .5rem; }
.dg-real { position: relative; flex: 1 1 0; min-width: 0; height: 6.2rem; padding: 0; border: 2px solid var(--borda); border-radius: .4rem; background: #000; cursor: zoom-in; overflow: hidden; }
.dg-real img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dg-real i { position: absolute; left: 50%; top: 40%; width: 0; height: 0; transform: translate(-35%, -50%); border-style: solid; border-width: .8rem 0 .8rem 1.35rem; border-color: transparent transparent transparent #fef3c7; filter: drop-shadow(0 0 3px #000); }
.dg-real span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.75); color: #fef3c7; font-size: .85rem; line-height: 1.2; padding: .1rem .3rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dg-real:hover, .dg-real:focus-visible { border-color: #fef3c7; }
#reaisLb { position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,.94); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
#reaisLb figure { margin: 0; max-width: 94vw; max-height: 94vh; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
#reaisLb img, #reaisLb video { display: block; max-width: 94vw; max-height: calc(94vh - 5rem); min-height: 50vh; object-fit: contain; background: #000; }
#reaisLb img { min-height: 0; background: #fff; }
#reaisLb figcaption { color: #e8eef5; font-size: 1.5rem; text-align: center; line-height: 1.3; }
#reaisLb figcaption small { display: block; color: #9fb0c3; font-size: 1rem; margin-top: .2rem; }
/* R (03/12, sobra do teste geral): apelido de 16 letras largas não estoura mais o cartão do time (reticências) */
.lt li { max-width: 100%; min-width: 0; box-sizing: border-box; }
.lt li .lt-nick { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
