/* Estilos do módulo Aula ao vivo (prefixo lv-). */
.lv { --lv-c0: #e21b3c; --lv-c1: #1368ce; --lv-c2: #c98a00; --lv-c3: #26890c; }
.lv-mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .12em; }
.lv-lbl { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.lv-live-dot { width: 10px; height: 10px; border-radius: 50%; background: #e5484d; flex: none; box-shadow: 0 0 0 0 rgba(229, 72, 77, .6); animation: lv-pulse 1.8s infinite; }
@keyframes lv-pulse { 0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .55); } 70% { box-shadow: 0 0 0 9px rgba(229, 72, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); } }
.lv-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none; }
.lv-dot.on { background: var(--ok); }
.lv-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.2; }

/* Lista */
.lv-room-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); }
.lv-room-row:hover { text-decoration: none; background: var(--surface-2); border-color: var(--line-2); }
.lv-room-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.lv-room-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-code-form { flex-wrap: nowrap; }
.lv-code-in { text-transform: uppercase; font-family: ui-monospace, Consolas, monospace; letter-spacing: .2em; font-size: 20px; font-weight: 700; text-align: center; }

/* Aluno / projetor */
.lv-viewer { max-width: 1240px; margin: 0 auto; }
.lv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.lv-head-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lv-sub { color: var(--muted); font-size: 13px; }
.lv-head-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lv-demo { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.lv-demo[hidden], .lv-stage[hidden] { display: none; }
.lv-board-col { display: flex; justify-content: center; }
.lv-board-col .board-wrap { max-width: min(640px, calc(100vh - 170px)); }
.lv-ro .board { pointer-events: none; }
.lv-aside { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lv-note { background: var(--brand); color: var(--brand-ink); border-radius: 12px; padding: 14px 16px; font-weight: 700; font-size: 18px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: var(--shadow); }
.lv-moves { max-height: 420px; }
@media (max-width: 860px) {
  .lv-demo { grid-template-columns: minmax(0, 1fr); }
  .lv-board-col .board-wrap { max-width: 560px; }
  .lv-moves { max-height: 200px; }
  .lv-hide-sm { display: none; }
}

/* Exercício */
.lv-q, .lv-res { max-width: 980px; margin: 0 auto; }
.lv-q-top { text-align: center; margin-bottom: 16px; }
.lv-q-n { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lv-q-prompt { font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.25; margin: 6px 0 12px; overflow-wrap: anywhere; }
.lv-q-prompt.sm { font-size: 17px; margin: 0 0 10px; text-align: left; }
.lv-q-count { color: var(--text-2); font-size: 14px; margin-top: 6px; }
.lv-q-body { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lv-q-board { width: 100%; max-width: min(520px, calc(100vh - 290px)); min-width: 240px; }
.lv-q-board.small { max-width: 300px; }
.lv-q-board .board-wrap { max-width: none; }
.lv-q-hint { color: var(--muted); margin: 0; }
.lv-confirm { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; font-size: 17px; }
.lv-confirm[hidden] { display: none; }
.lv-timer { display: flex; align-items: center; gap: 10px; max-width: 520px; margin: 0 auto; }
.lv-timer-bar { flex: 1; height: 10px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.lv-timer-bar i { display: block; height: 100%; width: 100%; background: var(--ok); border-radius: 99px; transition: width .2s linear, background .3s; }
.lv-timer-s { font-family: var(--font-display); font-size: 26px; min-width: 42px; text-align: right; }
.lv-timer.low .lv-timer-bar i { background: var(--bad); }
.lv-timer.low .lv-timer-s { color: var(--bad); }

.lv-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; }
.lv-opt { display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 16px 18px; border: 0; border-radius: 14px; color: #fff; font-size: 20px; font-weight: 700; text-align: left; cursor: pointer; box-shadow: 0 4px 0 rgba(0, 0, 0, .25); font-family: var(--font); overflow-wrap: anywhere; }
.lv-opt span { font-size: 26px; line-height: 1; flex: none; }
button.lv-opt:hover { filter: brightness(1.08); }
button.lv-opt:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
button.lv-opt:disabled { opacity: .45; cursor: default; filter: none; }
.lv-opt.c0, .lv-dist-bar i.c0 { background: var(--lv-c0); }
.lv-opt.c1, .lv-dist-bar i.c1 { background: var(--lv-c1); }
.lv-opt.c2, .lv-dist-bar i.c2 { background: var(--lv-c2); }
.lv-opt.c3, .lv-dist-bar i.c3 { background: var(--lv-c3); }
.lv-opts.static .lv-opt { cursor: default; }
@media (max-width: 560px) { .lv-opts { grid-template-columns: minmax(0, 1fr); } .lv-opt { min-height: 64px; font-size: 18px; } .lv-q-prompt { font-size: 20px; } }
.lv-shape { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: #fff; font-size: 12px; flex: none; }
.lv-shape.c0 { background: var(--lv-c0); } .lv-shape.c1 { background: var(--lv-c1); } .lv-shape.c2 { background: var(--lv-c2); } .lv-shape.c3 { background: var(--lv-c3); }

.lv-sent { text-align: center; padding: 30px 16px; }
.lv-sent .ico { width: 56px; height: 56px; color: var(--ok); }
.lv-sent h2 { margin: 8px 0 4px; }

/* Resultado */
.lv-verdict { text-align: center; border-radius: 16px; padding: 18px; margin-bottom: 18px; }
.lv-verdict h2 { margin: 4px 0; font-size: 28px; }
.lv-verdict p { margin: 0; }
.lv-verdict .ico { width: 44px; height: 44px; }
.lv-verdict.ok { background: var(--ok-bg); color: var(--ok); }
.lv-verdict.bad { background: var(--bad-bg); color: var(--bad); }
.lv-verdict.none, .lv-verdict.wait { background: var(--bg-2); color: var(--text-2); }
.lv-plus { font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.lv-res-main { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
.lv-res-main:has(> .lv-res-info:only-child) { grid-template-columns: minmax(0, 1fr); }
.lv-res-info .lv-q-prompt { font-size: 20px; }
.lv-res-ans { font-size: 18px; margin: 4px 0; }
.lv-res-me { font-size: 16px; }
@media (max-width: 760px) { .lv-res-main { grid-template-columns: minmax(0, 1fr); } .lv-q-board.res { max-width: 360px; margin: 0 auto; } }

.lv-dist { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.lv-dist-row { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; gap: 10px; align-items: center; }
.lv-dist-l { display: flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.lv-dist-row.ok .lv-dist-l { color: var(--ok); }
.lv-dist-bar { height: 14px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.lv-dist-bar i { display: block; height: 100%; min-width: 3px; background: var(--line-2); border-radius: 99px; transition: width .5s ease; }
.lv-dist-row.ok .lv-dist-bar i:not([class]), .lv-dist-row.ok .lv-dist-bar i[class=""] { background: var(--ok); }
.lv-dist-n { font-size: 13px; color: var(--text-2); white-space: nowrap; }

.lv-top, .lv-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.lv-top li, .lv-rank li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: var(--surface-2); }
.lv-top li.me { outline: 2px solid var(--brand-2); }
.lv-top-r { width: 24px; text-align: center; font-weight: 800; color: var(--muted); flex: none; }
.lv-top-n, .lv-rank-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-rank li.off { opacity: .55; }
.lv-rank .pill .ico { width: 12px; height: 12px; }
.lv-roster { max-height: 360px; overflow-y: auto; }

/* Pódio */
.lv-pod-wrap { text-align: center; max-width: 760px; margin: 0 auto; padding: 10px 0 20px; }
.lv-pod-title { font-family: var(--font-display); font-size: 30px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.lv-pod-title .ico { width: 30px; height: 30px; color: var(--brand-2); }
.lv-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; margin-top: 18px; }
.lv-pod-name { font-weight: 800; font-size: 18px; overflow-wrap: anywhere; }
.lv-pod-pts { color: var(--text-2); font-size: 14px; margin-bottom: 6px; }
.lv-pod-block { border-radius: 12px 12px 0 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 34px; color: var(--brand-ink); animation: lv-rise .8s ease both; }
.lv-pod.p1 .lv-pod-block { height: 170px; background: var(--brand); }
.lv-pod.p2 .lv-pod-block { height: 120px; background: #c9ced6; animation-delay: .25s; }
.lv-pod.p3 .lv-pod-block { height: 90px; background: #d9a066; animation-delay: .5s; }
.lv-pod.p1 .lv-pod-name { font-size: 22px; }
@keyframes lv-rise { from { transform: scaleY(0); transform-origin: bottom; opacity: 0; } to { transform: scaleY(1); transform-origin: bottom; opacity: 1; } }
.lv-pod-foot { color: var(--text-2); margin-top: 14px; }

/* Professor */
.lv-host { max-width: 1320px; margin: 0 auto; }
.lv-hostbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.lv-hostbar-l { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 220px; }
.lv-hostbar-r { display: flex; gap: 6px; flex-wrap: wrap; }
.lv-code { display: flex; flex-direction: column; align-items: center; background: var(--text); color: var(--bg); border: 0; border-radius: 12px; padding: 6px 16px; cursor: pointer; }
.lv-code span { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; opacity: .7; }
.lv-code b { font-size: 24px; line-height: 1.1; }
.lv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.lv-left { min-width: 0; display: flex; flex-direction: column; align-items: stretch; }
.lv-host-board { align-self: center; max-width: min(620px, calc(100vh - 230px)); min-width: 280px; }
.lv-host.capturing .lv-host-board .board { box-shadow: 0 0 0 4px var(--brand), 0 6px 24px rgba(0, 0, 0, .18); }
.lv-capture { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.lv-capture[hidden] { display: none; }
.lv-tools, .lv-draw, .lv-seq { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: center; margin-top: 10px; }
.lv-seq { background: var(--info-bg); border-radius: 12px; padding: 8px; }
.lv-seq[hidden] { display: none; }
.lv-free { margin-left: 6px; }
.lv-swatch { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; padding: 0; }
.lv-swatch.on { box-shadow: 0 0 0 2px var(--text); }
.lv-swatch.s-g { background: #15781b; } .lv-swatch.s-r { background: #882020; } .lv-swatch.s-b { background: #003088; } .lv-swatch.s-y { background: #e68f00; }
.lv-draw-tip { width: 100%; text-align: center; }
.lv-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lv-panel .seg { width: 100%; }
.lv-panel .seg button { flex: 1; }
.lv-answer-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lv-answer-row .ico { color: var(--ok); }
.lv-opt-in { display: flex; align-items: center; gap: 8px; }
.lv-radio { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.lv-radio input { width: 18px; height: 18px; accent-color: var(--ok); }
.lv-count-big { display: flex; align-items: baseline; gap: 8px; justify-content: center; margin: 14px 0; }
.lv-count-big b { font-family: var(--font-display); font-size: 48px; line-height: 1; }
.lv-ans { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.lv-ans li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: 14px; padding: 5px 8px; border-radius: 8px; background: var(--surface-2); }
.lv-ans li.ok .ico { color: var(--ok); } .lv-ans li.bad .ico { color: var(--bad); }
.lv-ans li span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-ans-det summary { cursor: pointer; font-weight: 700; font-size: 14px; }
@media (max-width: 1080px) { .lv-grid { grid-template-columns: minmax(0, 1fr); } .lv-host-board { max-width: 560px; width: 100%; } }

/* Tela cheia do professor */
.lv-host:fullscreen { background: var(--bg); padding: 16px; overflow: auto; max-width: none; }
.lv-host:fullscreen .lv-host-board { max-width: min(760px, calc(100vh - 170px)); }

/* Escolher aula do curso */
.lv-pick-items { margin-top: 14px; max-height: 60vh; overflow-y: auto; }
.lv-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.lv-pick { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.lv-pick-board { width: 110px; flex: none; }
.lv-pick-board .board { box-shadow: none; border-radius: 4px; }
.lv-pick-noboard { width: 110px; height: 110px; flex: none; display: grid; place-items: center; font-size: 40px; color: var(--muted); background: var(--surface-2); border-radius: 6px; }
.lv-pick-t { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lv-pick-t p { margin: 0; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }

/* Relatório */
.lv-rep-q { margin-bottom: 14px; }
.lv-rep-q-head { display: flex; gap: 18px; align-items: flex-start; }
.lv-rep-board { width: 180px; flex: none; }
.lv-rep-q-main { flex: 1; min-width: 0; }
.lv-rep-q-main h3 { margin: 4px 0 6px; }
.lv-rep-q details { margin-top: 10px; }
.lv-rep-q summary { cursor: pointer; font-weight: 700; }
.lv-mini-bar { display: inline-block; width: 80px; height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; vertical-align: middle; }
.lv-mini-bar i { display: block; height: 100%; background: var(--ok); }
@media (max-width: 640px) { .lv-rep-q-head { flex-direction: column; } .lv-rep-board { width: 100%; max-width: 260px; } }
@media print { .side, .topbar, [data-print] { display: none !important; } .lv-report details { display: block; } .lv-report details > summary { display: none; } }

/* ── Projetor / TV: tela limpa e letras grandes ── */
.lv-proj { max-width: none; min-height: 100vh; padding: 22px 30px; background: #101114; color: #f3f3f5; --muted: #9da0aa; --text-2: #d0d2d8; --surface-2: #1c1d22; --bg-2: #2a2c33; --line-2: #3a3d46; }
.lv-proj .lv-title { font-size: 30px; }
.lv-proj .lv-sub { font-size: 18px; }
.lv-proj .lv-join-box { display: flex; align-items: center; gap: 14px; background: var(--brand); color: var(--brand-ink); border-radius: 14px; padding: 8px 18px; font-size: 18px; }
.lv-proj .lv-join-box .lv-mono { font-size: 38px; line-height: 1.1; }
.lv-proj .lv-demo { grid-template-columns: minmax(0, 1fr) minmax(300px, 30vw); gap: 30px; }
.lv-proj .lv-board-col .board-wrap { max-width: calc(100vh - 150px); }
.lv-proj .lv-note { font-size: clamp(22px, 2.6vw, 40px); padding: 20px 24px; }
.lv-proj .movelist { font-size: clamp(18px, 1.8vw, 28px); max-height: calc(100vh - 380px); border-color: #2d2f36; }
.lv-proj .movelist .n { background: #1c1d22; font-size: inherit; }
.lv-proj .lv-q-prompt { font-size: clamp(28px, 3.4vw, 54px); }
.lv-proj .lv-q-count { font-size: 24px; }
.lv-proj .lv-timer { max-width: 900px; }
.lv-proj .lv-timer-bar { height: 16px; }
.lv-proj .lv-timer-s { font-size: 44px; min-width: 70px; }
.lv-proj .lv-q-body { flex-direction: row; align-items: flex-start; justify-content: center; gap: 30px; }
.lv-proj .lv-q-board { max-width: calc(100vh - 330px); }
.lv-proj .lv-opts { max-width: 900px; }
.lv-proj .lv-opt { font-size: clamp(22px, 2.2vw, 34px); min-height: 110px; }
.lv-proj .lv-q, .lv-proj .lv-res { max-width: 1500px; }
.lv-proj .lv-res-main { grid-template-columns: minmax(0, calc(100vh - 260px)) minmax(0, 1fr); }
.lv-proj .lv-res-info .lv-q-prompt { font-size: clamp(24px, 2.4vw, 38px); }
.lv-proj .lv-res-ans { font-size: 30px; }
.lv-proj .lv-dist-row { font-size: 24px; }
.lv-proj .lv-dist-bar { height: 26px; }
.lv-proj .lv-dist-n { font-size: 20px; }
.lv-proj .lv-top li { font-size: 22px; padding: 10px 14px; }
.lv-proj .lv-pod-wrap { max-width: 1100px; }
.lv-proj .lv-pod-title { font-size: 50px; }
.lv-proj .lv-pod-name { font-size: 30px; }
.lv-proj .lv-pod.p1 .lv-pod-name { font-size: 38px; }
.lv-proj .lv-pod-pts { font-size: 22px; }
.lv-proj .lv-pod.p1 .lv-pod-block { height: 300px; }
.lv-proj .lv-pod.p2 .lv-pod-block { height: 210px; }
.lv-proj .lv-pod.p3 .lv-pod-block { height: 150px; }
.lv-proj .lv-pod-block { font-size: 60px; }
.lv-proj .lv-pod-foot { font-size: 22px; }
.lv-proj .btn.ghost { color: #f3f3f5; }
.lv-proj .btn.ghost:hover { background: #22242a; }
.lv-proj .pill { font-size: 16px; }
.lv-viewer:fullscreen { background: var(--bg); padding: 18px; overflow: auto; max-width: none; }
.lv-proj:fullscreen { background: #101114; }
@media (max-width: 900px) { .lv-proj .lv-demo, .lv-proj .lv-res-main { grid-template-columns: minmax(0, 1fr); } .lv-proj .lv-q-body { flex-direction: column; align-items: center; } }
.lv [hidden] { display: none !important; }
