/* =============================================================
   ÁGORA — Humanas em rede
   Verde-floresta #2F5233 · terracota #C1642E · ouro #D9A441
   Títulos: Bricolage Grotesque · Texto: Atkinson Hyperlegible
   (fonte criada para leitores com baixa visão)
   ============================================================= */
html { font-size: var(--escala-texto, 17px); }
:root {
  /* paleta tirada da arte de capa */
  --petroleo: #123243; --petroleo-900: #0B2331; --petroleo-700: #1E4D63; --petroleo-100: #DCE6EA;
  --terra: #C1642E; --terra-700: #9E4E20; --terra-100: #F6E3D5;
  --ouro: #C9963C; --ouro-100: #F5E9CE;
  --verde: #2F5233; --verde-900: #1E3822; --verde-700: #3E6B44; --verde-100: #E0E9DD; --verde-50: #EFF3EC;
  --tinta: #17242B; --tinta-2: #46575F; --tinta-3: #6E7F87;
  --fundo: #F2EFE7; --papel: #FFFDF9; --linha: #DED8CA; --linha-2: #C7BEAC;
  --erro: #A3312A; --erro-100: #F7E2DF; --ok: #2E7D32; --ok-100: #E2F1E3;
  --raio: 4px; --raio-g: 6px;
  --sombra: 0 1px 2px rgba(18,50,67,.05), 0 6px 18px rgba(18,50,67,.05);
  --sombra-g: 0 16px 46px rgba(11,35,49,.22);
  --fonte: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --titulo: "Fraunces", "Bricolage Grotesque", Georgia, serif;
  --pos-0: #123243; --pos-1: #C1642E; --pos-2: #C9963C; --pos-3: #2F5233;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { padding-bottom: env(safe-area-inset-bottom); margin: 0; font-family: var(--fonte); font-size: 1rem; line-height: 1.55; color: var(--tinta); background: var(--fundo); }
/* textura dos rabiscos de Humanas, quase imperceptível, atrás de tudo */
body.pagina-aluno::before, body.pagina-prof::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--fundo) url("../assets/padrao.webp") center / cover no-repeat fixed;
  opacity: .3; filter: blur(1.6px); }
h1, h2, h3 { font-family: var(--titulo); line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.005em; font-variation-settings: "SOFT" 20, "WONK" 1; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.35rem); font-weight: 600; }
h2 { font-size: 1.32rem; font-weight: 600; }
h3 { font-size: 1.08rem; font-weight: 600; }
.rotulo, .cartao-item-tipo, .item-tipo, .carimbo-rotulo, .rotulo-lateral, .secao-dica strong {
  text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 700; }
p { margin: 0 0 .8em; }
a { color: var(--petroleo-700); text-underline-offset: 3px; }
a:hover { color: var(--terra-700); }
img { max-width: 100%; height: auto; }
code { background: var(--verde-50); padding: .1em .35em; border-radius: 4px; font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--linha); margin: 1rem 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ouro); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sub { color: var(--tinta-3); font-size: .93rem; }
.lead { font-size: 1.12rem; color: var(--tinta-2); }
.vazio { color: var(--tinta-3); text-align: center; padding: 1.5rem 1rem; }
.vazio.grande { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio-g); padding: 2.5rem 1.5rem 2rem; position: relative; }
.vazio.grande::before { content: ""; display: block; width: 46px; height: 3px; margin: 0 auto 1.2rem; background: var(--terra); box-shadow: 0 6px 0 0 var(--ouro); }
.vazio.grande::after { content: "“Educação não é privilégio.” — Anísio Teixeira";
  display: block; margin: 1.6rem auto 0; padding-top: 1rem; border-top: 1px solid var(--linha); max-width: 34ch;
  font-family: var(--titulo); font-style: italic; font-size: 1.02rem; color: var(--tinta-2); }
.certo { color: var(--ok); font-weight: 700; }
.errado { color: var(--erro); font-weight: 700; }
.perigo { color: var(--erro) !important; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.rotulo { display: block; font-weight: 700; font-size: .9rem; color: var(--tinta-2); margin-bottom: .35rem; }
.ajuda { font-size: .9rem; color: var(--tinta-3); }
.erro-caixa { background: var(--erro-100); color: var(--erro); padding: .8rem 1rem; border-radius: var(--raio); }
.erro-texto { color: var(--erro); min-height: 1.2em; font-size: .92rem; margin: 0; }
.aviso-suave { background: var(--ouro-100); border-left: 4px solid var(--ouro); padding: .7rem 1rem; border-radius: 0 var(--raio) var(--raio) 0; }
.caixa-texto { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.bloco { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio-g); padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; }
.bloco > h2:first-child { padding-bottom: .4rem; border-bottom: 1px solid var(--linha); }
.perigo-zona { border-color: #E9B7B2; }
.grade-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .25rem 1rem; }
.linha-botoes { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.linha-botoes.fim { justify-content: flex-end; margin-top: 1rem; }
.linha-titulo { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; margin: 1.6rem 0 .8rem; }
.linha-titulo h2 { margin: 0; }
.linha-titulo .btn { margin-left: auto; }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 700; font-size: .95rem;
  padding: .6rem 1.15rem; border-radius: var(--raio); border: 1.5px solid var(--terra); background: var(--terra); color: #fff; cursor: pointer;
  text-decoration: none; transition: background .15s, transform .1s, border-color .15s; min-height: 42px; }
.btn:hover { background: var(--terra-700); border-color: var(--terra-700); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-sec { background: var(--papel); color: var(--petroleo); border-color: var(--linha-2); }
.btn-sec:hover { background: var(--petroleo-100); color: var(--petroleo-900); border-color: var(--petroleo-700); }
.btn-fantasma { background: transparent; border-color: transparent; color: var(--tinta-2); }
.btn-fantasma:hover { background: var(--petroleo-100); border-color: transparent; color: var(--tinta); }
.btn-perigo { background: var(--erro); border-color: var(--erro); }
.btn-perigo:hover { background: #8C1D17; border-color: #8C1D17; }
.btn-claro { background: var(--papel); border-color: #fff; color: var(--verde-900); }
.btn-claro:hover { background: var(--verde-50); color: var(--verde-900); border-color: var(--verde-50); }
.btn-escuro { background: var(--petroleo); border-color: var(--petroleo); }
.btn-escuro:hover { background: var(--petroleo-900); border-color: var(--petroleo-900); }
.btn-grande { padding: .8rem 1.6rem; font-size: 1.05rem; min-height: 50px; }
.btn.largo { width: 100%; }
.btn-icone { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent;
  color: var(--tinta-2); font-size: 1rem; cursor: pointer; flex: none; }
.btn-icone:hover { background: var(--petroleo-100); color: var(--tinta); }
.btn-icone:disabled { opacity: .35; cursor: default; }
.btn-link { background: none; border: 0; padding: .15rem .2rem; font: inherit; font-size: .93rem; color: var(--petroleo-700); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn-link:hover { color: var(--terra-700); }
.btn-acao { background: none; border: 1px solid transparent; border-radius: 999px; padding: .3rem .7rem; font: inherit; font-size: .9rem; color: var(--tinta-2); cursor: pointer; }
.btn-acao:hover { background: var(--petroleo-100); }
.btn-acao.ativo { color: var(--terra-700); font-weight: 700; background: var(--terra-100); }
.btn-acao:disabled { opacity: .5; cursor: default; }
.voltar { display: inline-block; margin-bottom: .6rem; text-decoration: none; font-weight: 700; }

/* ---------- Formulários ---------- */
input, select, textarea {
  font: inherit; font-size: 16px; /* 16px evita o zoom automático do Safari no iPhone */ color: var(--tinta); background: var(--papel); border: 1.5px solid var(--linha-2); border-radius: var(--raio);
  padding: .55rem .75rem; width: 100%; min-height: 44px; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--petroleo); box-shadow: 0 0 0 3px rgba(18,50,67,.15); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--terra); flex: none; margin: 0; }
.campo { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; }
.campo > span { font-weight: 700; font-size: .92rem; color: var(--tinta-2); }
.campo small { color: var(--tinta-3); font-size: .85rem; }
.campo.inline { flex-direction: row; align-items: center; gap: .6rem; }
.campo.inline input, .campo.inline select { width: auto; }
.campo-check { display: flex; gap: .6rem; align-items: center; margin: .5rem 0 .9rem; cursor: pointer; }
.form-campos { display: flex; flex-direction: column; }

/* ---------- Avisos e modais ---------- */
#toasts { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: .5rem; width: min(92vw, 440px); pointer-events: none; }
.toast { background: var(--verde-900); color: #fff; padding: .75rem 1rem; border-radius: var(--raio); box-shadow: var(--sombra-g); animation: entra .25s ease-out; transition: opacity .3s, transform .3s; }
.toast.erro { background: var(--erro); }
.toast.sai { opacity: 0; transform: translateY(8px); }
@keyframes entra { from { opacity: 0; transform: translateY(10px); } }
.modal-fundo { position: fixed; inset: 0; background: rgba(20,30,24,.55); z-index: 900; display: grid; place-items: center; padding: 1rem; animation: aparece .15s; }
@keyframes aparece { from { opacity: 0; } }
.modal { background: var(--papel); border-radius: var(--raio-g); box-shadow: var(--sombra-g); width: min(100%, 520px); max-height: 92vh; display: flex; flex-direction: column; }
.modal.largo { width: min(100%, 860px); }
.modal-topo { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem .6rem; border-bottom: 1px solid var(--linha); }
.modal-topo h2 { margin: 0; flex: 1; font-size: 1.2rem; }
.modal-corpo { padding: 1rem 1.25rem; overflow-y: auto; }
.modal-acoes { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; padding: .8rem 1.25rem 1rem; border-top: 1px solid var(--linha); }

/* ---------- Entrada ---------- */
.sem-config { max-width: 640px; margin: 2rem auto; background: var(--ouro-100); border: 2px solid var(--ouro); padding: 1.5rem; border-radius: var(--raio-g); }
.entrada { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; }
.entrada-marca { background: var(--verde); color: #EAF0E6; padding: clamp(2rem, 6vw, 5rem); display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.entrada-marca::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px; background: repeating-linear-gradient(90deg, var(--terra) 0 40px, var(--ouro) 40px 60px); }
.entrada-marca h1 { font-size: clamp(3.2rem, 9vw, 6.5rem); color: #fff; margin: .2em 0 0; letter-spacing: -.03em; }
.marca-sub { font-family: var(--titulo); font-size: 1.3rem; color: var(--ouro); margin: 0 0 1.4rem; }
.entrada-texto { max-width: 34ch; font-size: 1.1rem; opacity: .9; }
.colunata { display: flex; gap: 12px; align-items: flex-end; height: 58px; }
.colunata i { width: 14px; height: 100%; background: linear-gradient(90deg, rgba(255,255,255,.35), rgba(255,255,255,.12)); border-radius: 3px 3px 0 0; }
.colunata i:nth-child(odd) { height: 80%; }
.entrada-cartoes { display: flex; flex-direction: column; justify-content: center; gap: 1rem; padding: clamp(1.5rem, 5vw, 4rem); }
.cartao-entrada { background: var(--papel); border-radius: var(--raio-g); box-shadow: var(--sombra); padding: 1.8rem; border: 1px solid var(--linha); border-top: 5px solid var(--terra); }
.cartao-entrada.prof { border-top-color: var(--petroleo); }
.cartao-entrada .btn-grande { width: 100%; margin: .4rem 0 .6rem; }
.input-codigo { font-family: var(--titulo); font-size: 1.8rem; font-weight: 600; letter-spacing: .3em; text-align: center; text-transform: uppercase; padding: .5rem; }
.entrada-prof { text-align: center; color: var(--tinta-2); }

/* ---------- Capa das telas de entrada ---------- */
body.pagina-entrada { background: var(--papel); }
.entrada.com-capa { position: relative; overflow: hidden; min-height: 100vh; min-height: 100dvh; min-height: 100dvh;
  display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr; place-items: center; place-content: center;
  padding: 1.5rem 1rem; }
/* a arte cobre a tela inteira, bem clareada: fica só como textura de fundo */
.capa { position: absolute; inset: 0; z-index: 0; line-height: 0; }
.capa picture { display: block; height: 100%; }
.capa img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.capa::after { content: ""; position: absolute; inset: 0; background: rgba(242,239,231,.82); }
.entrada.com-capa .entrada-cartoes { grid-area: 1 / 1; position: relative; z-index: 1; width: min(100%, 440px); margin: 0 auto; justify-self: center; padding: 0; gap: .7rem; align-items: center; text-align: center; }
.entrada.com-capa .cartao-entrada { width: 100%; text-align: left; }
.entrada.com-capa .cartao-entrada h2, .entrada.com-capa .cartao-entrada > .sub { text-align: center; }
.entrada.com-capa .linha-botoes { justify-content: center; }
.entrada.com-capa .cartao-entrada { padding: 1.5rem 1.6rem; box-shadow: 0 16px 44px rgba(11,35,49,.18); border-top-width: 5px; }
.frase-anisio { position: relative; z-index: 1; max-width: 32ch; margin: 1.2rem auto 0; text-align: center;
  font-family: var(--titulo); font-style: italic; font-size: 1rem; color: var(--tinta-2); }
.frase-anisio small { display: block; font-style: normal; font-family: var(--fonte); font-size: .8rem;
  text-transform: uppercase; letter-spacing: .12em; margin-top: .4rem; color: var(--tinta-3); }
.entrada.com-capa .cartao-entrada h2 { margin-bottom: .2rem; }
.entrada.com-capa .entrada-prof { margin: 0; font-size: .95rem; }

/* ---------- Topo (aluno) ---------- */
.topo { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 1rem; padding: .6rem clamp(1rem, 3vw, 2rem); background: var(--petroleo); color: #fff; flex-wrap: wrap; border-bottom: 3px solid var(--terra); }
.topo-marca { display: flex; align-items: baseline; gap: .5rem; color: #fff; text-decoration: none; font-family: var(--titulo); font-weight: 800; font-size: 1.35rem; }
.topo-marca small { font-family: var(--fonte); font-weight: 400; font-size: .9rem; opacity: .8; }
.topo-marca:hover { color: var(--ouro-100); }
.abas-aluno { display: flex; gap: .25rem; margin: 0 auto; }
.abas-aluno a { color: #DCE6D8; text-decoration: none; padding: .45rem .9rem; border-radius: 999px; font-weight: 700; }
.abas-aluno a:hover { background: rgba(255,255,255,.1); color: #fff; }
.abas-aluno a.ativo { background: var(--fundo); color: var(--petroleo); }
.topo-acoes { display: flex; align-items: center; gap: .8rem; }
.topo .btn-link { color: var(--petroleo-100); }
.letra-controle { display: flex; gap: .15rem; }
.letra-controle button { width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.35); background: none; color: #fff; border-radius: var(--raio); cursor: pointer; font-family: var(--titulo); font-weight: 600; }
.letra-controle button:hover { background: rgba(255,255,255,.14); }
.xp { background: var(--ouro); color: var(--petroleo-900); font-weight: 700; padding: .2rem .7rem; border-radius: var(--raio); font-size: .92rem; }
body.travado .abas-aluno, body.travado .topo-marca { pointer-events: none; opacity: .5; }
.vista-aluno { max-width: 980px; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 4rem; }

/* ---------- Faixas ---------- */
.faixa { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .75rem clamp(1rem, 3vw, 2rem); color: #fff; }
.faixa > span { flex: 1; min-width: 200px; }
.faixa.ao-vivo { background: var(--terra); }
.faixa.aviso { background: var(--ouro-100); color: var(--tinta); border-bottom: 2px solid var(--ouro); }
.faixa.direcionado { background: var(--verde-900); }
.painel .faixa { border-radius: var(--raio); margin-bottom: .8rem; }
.pulso-ponto { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--papel); flex: none !important; min-width: 0 !important; box-shadow: 0 0 0 0 rgba(255,255,255,.7); animation: pulso 1.6s infinite; }
.cartao-encontro .pulso-ponto, .encontro-card .pulso-ponto { background: var(--terra); }
@keyframes pulso { 70% { box-shadow: 0 0 0 10px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }

/* ---------- Painel do professor ---------- */
.painel { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; min-height: 100dvh; }
.lateral { background: var(--petroleo-900); color: #DCE6D8; padding: 1.2rem 1rem; display: flex; flex-direction: column; gap: 1.2rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.lateral-topo { display: flex; justify-content: space-between; align-items: flex-start; }
.lateral .marca { display: flex; flex-direction: column; margin: 0; }
.lateral .marca-nome { font-family: var(--titulo); font-weight: 800; font-size: 1.7rem; color: #fff; }
.lateral .marca-sub { font-size: .95rem; margin: 0; }
.rotulo-lateral.com-acao { display: flex; justify-content: space-between; align-items: center; gap: .5rem; opacity: 1; }
.rotulo-lateral.com-acao span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rotulo-lateral.com-acao .btn-link { color: var(--ouro); text-transform: none; letter-spacing: 0; }
.rotulo-lateral { font-size: .8rem; font-weight: 700; letter-spacing: .06em; opacity: .7; margin: 0 0 .4rem; }
.seletor-escola { border-bottom: 1px solid rgba(255,255,255,.15); padding-bottom: .8rem; }
.seletor-escola select { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.28); }
.seletor-escola select option { color: var(--tinta); }
.lista-turmas { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.turma-bt { width: 100%; text-align: left; background: none; border: 0; color: inherit; font: inherit; padding: .5rem .7rem; border-radius: var(--raio); cursor: pointer; display: flex; flex-direction: column; }
.turma-bt small { opacity: .7; font-size: .82rem; }
.turma-bt:hover { background: rgba(255,255,255,.08); }
.turma-bt.ativa { background: var(--petroleo-700); color: #fff; box-shadow: inset 4px 0 0 var(--terra); }
.lateral .btn-sec { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.lateral .btn-sec:hover { background: rgba(255,255,255,.1); }
.nav-lateral { display: flex; flex-direction: column; gap: .15rem; }
.nav-lateral hr { border-top-color: rgba(255,255,255,.15); width: 100%; }
.nav-item { background: none; border: 0; color: inherit; font: inherit; font-weight: 700; text-align: left; padding: .55rem .8rem; border-radius: var(--raio); cursor: pointer; }
.nav-item:hover { background: rgba(255,255,255,.08); }
.nav-item.ativo { background: var(--fundo); color: var(--petroleo-900); }
.lateral-pe { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: .5rem; border-top: 1px solid rgba(255,255,255,.15); padding-top: .8rem; }
.lateral-pe .btn-link { color: var(--ouro); }
.principal { min-width: 0; }
.vista { max-width: 1100px; margin: 0 auto; padding: 1.8rem clamp(1rem, 3vw, 2.5rem) 4rem; }
.so-celular { display: none !important; }
.barra-celular { align-items: center; gap: .6rem; padding: .6rem 1rem; background: var(--petroleo); color: #fff; position: sticky; top: 0; z-index: 40; }
.barra-celular .btn-icone { color: #fff; }
.boas-vindas { max-width: 560px; margin: 10vh auto; text-align: center; }
.cabeca-vista { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
.cabeca-vista h1 { margin-bottom: .2rem; }
.cabeca-turma { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.carimbo { background: var(--papel); border: 2px dashed var(--terra); border-radius: var(--raio-g); padding: .7rem 1.2rem; text-align: center; }
.carimbo-rotulo { display: block; font-size: .8rem; font-weight: 700; color: var(--terra-700); }
.carimbo-codigo { display: block; font-family: var(--titulo); font-weight: 600; font-size: 2.2rem; letter-spacing: .18em; color: var(--petroleo-900); line-height: 1.1; }
.carimbo-acoes { display: flex; gap: .4rem; justify-content: center; }
.projecao { text-align: center; padding: 1rem 0 2rem; }
.projecao .carimbo-codigo { font-size: clamp(3.5rem, 14vw, 8rem); margin: 1rem 0; }
.projecao .url { font-size: 1.5rem; font-weight: 700; color: var(--terra-700); }
.codigo-inline { font-family: var(--titulo); letter-spacing: .12em; }
.comandos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.comando { display: flex; gap: .8rem; align-items: center; text-align: left; background: var(--papel); border: 1.5px solid var(--linha); border-radius: var(--raio-g); padding: .9rem 1rem; font: inherit; color: inherit; cursor: pointer; transition: border-color .15s, transform .1s; }
.comando:hover { border-color: var(--terra); transform: translateY(-1px); }
.comando strong { display: block; }
.comando small { color: var(--tinta-3); }
.comando-icone { font-size: 1.5rem; width: 46px; height: 46px; display: grid; place-items: center; background: var(--petroleo-100); border-radius: var(--raio); flex: none; }
.grade-alunos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .6rem; }
.aluno-cartao { width: 100%; display: flex; align-items: center; gap: .7rem; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: .6rem .8rem; font: inherit; color: inherit; text-align: left; cursor: pointer; opacity: .7; }
.aluno-cartao.on { opacity: 1; border-color: var(--verde-100); box-shadow: var(--sombra); }
.aluno-cartao:hover { border-color: var(--verde); }
.status-ponto { width: 10px; height: 10px; border-radius: 50%; background: var(--linha-2); flex: none; }
.aluno-cartao.on .status-ponto { background: #3BA55C; box-shadow: 0 0 0 3px rgba(59,165,92,.2); }
.aluno-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.aluno-info small { color: var(--tinta-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aluno-info .progresso { color: var(--terra-700); font-weight: 700; }
.aluno-pontos { font-family: var(--titulo); font-weight: 600; color: var(--petroleo); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.chip { background: var(--papel); border: 1.5px solid var(--linha-2); border-radius: 999px; padding: .35rem .9rem; font: inherit; font-size: .9rem; cursor: pointer; color: var(--tinta-2); }
.chip:hover { border-color: var(--verde); }
.chip.ativo { background: var(--petroleo); border-color: var(--petroleo); color: #fff; }
.lista-itens { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.item-prof { display: flex; align-items: center; gap: .6rem; background: var(--papel); border: 1px solid var(--linha); border-left: 5px solid var(--cor-tipo, var(--verde)); border-radius: var(--raio); padding: .4rem .6rem; }
.item-linha { flex: 1; min-width: 0; display: flex; align-items: center; gap: .8rem; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; padding: .3rem; }
.item-linha.estatico { cursor: default; }
.item-icone { font-size: 1.4rem; flex: none; }
.item-texto { display: flex; flex-direction: column; min-width: 0; }
.item-texto small { color: var(--tinta-3); }
.item-tipo { display: inline-block; font-weight: 700; font-size: .9rem; color: var(--cor-tipo, var(--verde)); margin: 0 0 .3rem; }
.t-aula { --cor-tipo: #123243; } .t-atividade { --cor-tipo: #1E4D63; } .t-desafio { --cor-tipo: #C1642E; } .t-jogo { --cor-tipo: #7A5A86; }
.t-debate { --cor-tipo: #C9963C; } .t-mapa { --cor-tipo: #2F5233; } .t-encontro { --cor-tipo: #A3312A; }
.interruptor { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; font-size: .88rem; font-weight: 700; color: var(--tinta-2); position: relative; }
.interruptor input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.trilho { width: 40px; height: 22px; border-radius: 999px; background: var(--linha-2); position: relative; transition: background .15s; flex: none; }
.trilho::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--papel); transition: transform .15s; }
.interruptor input:checked + .trilho { background: var(--verde); }
.interruptor input:checked + .trilho::after { transform: translateX(18px); }
.interruptor input:focus-visible + .trilho { outline: 3px solid var(--ouro); outline-offset: 2px; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; font-weight: 800; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { background: var(--verde-50); }
.menu-lista { position: absolute; right: 0; top: 100%; z-index: 20; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); box-shadow: var(--sombra-g); min-width: 230px; padding: .3rem; display: flex; flex-direction: column; }
.menu-op { background: none; border: 0; font: inherit; text-align: left; padding: .55rem .8rem; border-radius: 8px; cursor: pointer; color: var(--tinta); }
.menu-op:hover { background: var(--verde-50); }
.grade-tipos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .7rem; }
.tipo-opcao { display: flex; flex-direction: column; gap: .2rem; align-items: flex-start; text-align: left; background: var(--papel); border: 2px solid var(--linha); border-top: 6px solid var(--cor-tipo); border-radius: var(--raio-g); padding: 1rem; font: inherit; color: inherit; cursor: pointer; }
.tipo-opcao:hover { border-color: var(--cor-tipo); }
.tipo-opcao small { color: var(--tinta-3); font-size: .85rem; }
.tipo-icone { font-size: 1.8rem; }
.tabela-caixa { overflow-x: auto; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); }
.tabela { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tabela th, .tabela td { padding: .6rem .8rem; border-bottom: 1px solid var(--linha); text-align: left; vertical-align: top; }
.tabela th { background: var(--petroleo-100); font-weight: 700; white-space: nowrap; }
.tabela th.num, .tabela td.num { text-align: right; }
.tabela tbody tr:hover { background: var(--papel); }
.acoes-td { display: flex; gap: .4rem; flex-wrap: wrap; }
.selo-atraso { display: inline-block; margin-left: .4rem; background: var(--ouro-100); color: #7A5A12; font-size: .75rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; }
.faltam { margin-top: .8rem; color: var(--tinta-2); }
.lista-simples { list-style: none; padding: 0; margin: 0; }
.lista-simples li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--linha); flex-wrap: wrap; }
.previa { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: .7rem 1rem; margin: 1rem 0; }
.previa summary { cursor: pointer; font-weight: 700; color: var(--verde-700); }
.previa[open] summary { margin-bottom: .8rem; }
.previa li.certo { font-weight: 700; }
.correcao .corr-q { border-bottom: 1px solid var(--linha); padding: .8rem 0; }
.corr-enun { margin-bottom: .4rem; }
.corr-enun span p { display: inline; }
.resp-aluno { background: var(--verde-50); border-left: 4px solid var(--verde); padding: .6rem .8rem; border-radius: 0 var(--raio) var(--raio) 0; white-space: pre-wrap; margin: .4rem 0; }

/* ---------- Editor ---------- */
.editor-tipo { display: flex; flex-direction: column; font-weight: 700; color: var(--cor-tipo); margin-bottom: 1rem; }
.editor-tipo small { font-weight: 400; color: var(--tinta-3); }
.questoes-ed { display: flex; flex-direction: column; gap: .8rem; margin-bottom: 1rem; }
.q-ed { border: 1.5px solid var(--linha); border-radius: var(--raio); padding: .8rem; background: var(--papel); display: flex; flex-direction: column; gap: .5rem; }
.q-topo { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.q-tipo { font-size: .85rem; color: var(--tinta-3); margin-right: auto; }
.pontos { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; }
.pontos input { width: 70px; min-height: 34px; padding: .2rem .4rem; }
.opcoes-ed { display: flex; flex-direction: column; gap: .4rem; }
.opcao-ed { display: flex; align-items: center; gap: .5rem; }
.vf-ed { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.marcadores-ed { list-style: none; padding: 0; margin: .5rem 0; }
.marcadores-ed li { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; border-bottom: 1px solid var(--linha); }
.marcadores-ed li span { flex: 1; }
.contagem { color: var(--verde-700) !important; font-weight: 700; }

/* ---------- Aluno: início ---------- */
.saudacao { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.saudacao h1 { margin-bottom: .1rem; }
.placar-aluno { display: flex; gap: .6rem; }
.placar-aluno div { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio-g); padding: .6rem 1.1rem; text-align: center; min-width: 96px; }
.placar-aluno strong { display: block; font-family: var(--titulo); font-size: 1.8rem; font-weight: 600; color: var(--petroleo); line-height: 1.1; }
.placar-aluno small { color: var(--tinta-3); }
.encontros-proximos { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.2rem; }
.encontro-card { display: flex; gap: .8rem; align-items: center; background: var(--papel); border: 1.5px solid var(--linha); border-radius: var(--raio-g); padding: .8rem 1rem; text-decoration: none; color: inherit; }
.encontro-card small { display: block; color: var(--tinta-3); }
.encontro-card.ao-vivo { border-color: var(--terra); background: var(--terra-100); }
.encontro-card.ao-vivo small { color: var(--terra-700); font-weight: 700; }
.cartoes-itens { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; }
.cartao-item { height: 100%; display: flex; flex-direction: column; gap: .35rem; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio-g); padding: 1rem 1.1rem 1rem 1.25rem; text-decoration: none; color: inherit; position: relative; overflow: hidden; transition: transform .12s, box-shadow .12s; }
.cartao-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--cor-tipo); }
.cartao-item strong { font-weight: 600; }
.cartao-item:hover { transform: translateY(-2px); box-shadow: var(--sombra); color: inherit; }
.cartao-item strong { font-family: var(--titulo); font-size: 1.12rem; line-height: 1.25; }
.cartao-item-tipo { font-size: .85rem; font-weight: 700; color: var(--cor-tipo); }
.cartao-item-desc { color: var(--tinta-2); font-size: .92rem; }
.cartao-item-pe { margin-top: auto; padding-top: .4rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.cartao-item-pe small { color: var(--tinta-3); }
.tag { display: inline-block; font-size: .8rem; font-weight: 700; padding: .12rem .6rem; border-radius: 999px; background: var(--verde-50); color: var(--tinta-2); }
.tag-feito { background: var(--ok-100); color: var(--ok); }
.tag-novo { background: var(--terra-100); color: var(--terra-700); }
.tag-alerta { background: var(--erro-100); color: var(--erro); }
.titulo-item { margin-bottom: .4rem; }
.item-corpo { margin-top: 1rem; }

/* ---------- Aula ---------- */
.bloco-aula { display: flex; flex-direction: column; gap: 1.2rem; }
.video, iframe.video { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: var(--raio-g); overflow: hidden; background: #000; border: 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embutido { display: flex; flex-direction: column; gap: .3rem; align-items: flex-end; }
.embutido iframe { width: 100%; height: min(75vh, 640px); border: 1px solid var(--linha); border-radius: var(--raio-g); background: var(--papel); }
.texto-rico { overflow-wrap: anywhere; }
.texto-rico h2, .texto-rico h3, .texto-rico h4 { margin-top: 1.1em; }
.texto-rico blockquote { margin: .8em 0; padding: .6em 1em; border-left: 4px solid var(--terra); background: var(--terra-100); border-radius: 0 var(--raio) var(--raio) 0; }
.texto-rico ul { padding-left: 1.3em; }
.texto-rico > :last-child { margin-bottom: 0; }
.leitura, .bloco-aula > .texto-rico { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio-g); padding: clamp(1rem, 3vw, 2rem); font-size: 1.05rem; max-width: 72ch; }
.lead-aula { font-size: 1.1rem; color: var(--tinta-2); margin-bottom: 1rem; }

/* ---------- Anexos ---------- */
.anexos { list-style: none; padding: 0; margin: .6rem 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.anexos li { display: inline-flex; align-items: center; gap: .3rem; background: var(--verde-50); border: 1px solid var(--verde-100); border-radius: 999px; padding: .2rem .4rem .2rem .8rem; }
.anexos a, .link-arquivo { font-size: .92rem; color: var(--verde-900); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: .1rem .3rem .1rem 0; }
.anexos a:hover, .link-arquivo:hover { text-decoration: underline; }
.anexos.editavel li span { font-size: .9rem; }
.anexos-editor { margin: .3rem 0 1rem; }

/* ---------- Questões ---------- */
.questoes { display: flex; flex-direction: column; gap: 1rem; }
.questao { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio-g); padding: 1.1rem 1.2rem; margin: 0; min-width: 0; }
.questao.q-certa { border-left: 5px solid var(--ok); }
.questao.q-errada { border-left: 5px solid var(--erro); }
.enunciado { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: .6rem; }
.q-num { flex: none; width: 32px; height: 32px; border-radius: var(--raio); display: grid; place-items: center; background: var(--petroleo); color: #fff; font-weight: 600; font-family: var(--titulo); }
.alternativas { display: flex; flex-direction: column; gap: .4rem; margin-top: .6rem; }
.alternativas.vf { flex-direction: row; flex-wrap: wrap; }
.alternativa { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border: 1.5px solid var(--linha); border-radius: var(--raio); cursor: pointer; transition: border-color .12s, background .12s; }
.alternativa:hover { border-color: var(--verde-700); }
.alternativa:has(input:checked) { border-color: var(--verde); background: var(--verde-50); }
.letra-op { font-weight: 800; font-family: var(--titulo); color: var(--verde-700); }
.resultado { text-align: center; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio-g); padding: 1.5rem; margin-bottom: 1.2rem; }
.resultado-num { font-family: var(--titulo); font-size: 3.6rem; font-weight: 600; color: var(--petroleo); line-height: 1; margin: 0 0 .4rem; }
.resultado-num small { font-size: 1.1rem; color: var(--tinta-3); font-weight: 500; }
.feedback { text-align: left; margin: 1rem 0 0; padding: .8rem 1rem; background: var(--ouro-100); border-left: 4px solid var(--ouro); border-radius: 0 var(--raio) var(--raio) 0; }

/* ---------- Desafio ---------- */
.intro-desafio { background: var(--papel); border: 1px solid var(--linha); border-top: 6px solid var(--terra); border-radius: var(--raio-g); padding: 1.6rem; text-align: center; }
.desafio { background: var(--papel); border-radius: var(--raio-g); border: 1px solid var(--linha); padding: 1.3rem; }
.desafio-topo { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--tinta-2); }
.segundos { font-family: var(--titulo); font-size: 1.8rem; font-weight: 800; color: var(--terra); }
.cronometro { height: 8px; background: var(--terra-100); border-radius: 999px; overflow: hidden; margin: .5rem 0 1rem; }
.cronometro span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--terra), var(--ouro)); transition: width .2s linear; }
.opcoes-desafio { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .6rem; margin-top: 1rem; }
.opcao-desafio { font: inherit; font-weight: 700; text-align: left; padding: 1rem; border-radius: var(--raio-g); border: 2px solid var(--linha); background: var(--papel); cursor: pointer; min-height: 64px; }
.opcao-desafio:hover { border-color: var(--terra); background: var(--terra-100); }
.opcao-desafio:nth-child(4n+1) { border-left: 6px solid var(--pos-0); } .opcao-desafio:nth-child(4n+2) { border-left: 6px solid var(--pos-1); }
.opcao-desafio:nth-child(4n+3) { border-left: 6px solid var(--pos-2); } .opcao-desafio:nth-child(4n+4) { border-left: 6px solid var(--pos-3); }

/* ---------- Ranking ---------- */
.ranking { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-direction: column; gap: .4rem; }
.ranking li { display: flex; align-items: center; gap: .8rem; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: .5rem .9rem; }
.ranking .pos { font-family: var(--titulo); font-weight: 800; width: 2ch; text-align: center; color: var(--tinta-3); }
.ranking .rk-nome { flex: 1; }
.ranking .rk-pts { font-family: var(--titulo); font-weight: 600; color: var(--petroleo); }
.ranking li.eu { border: 2px solid var(--verde); background: var(--verde-50); }
.ranking li.p1 .pos { color: #B8892A; } .ranking li.p2 .pos { color: #7D8A8F; } .ranking li.p3 .pos { color: var(--terra); }
.ranking li.p1 { background: var(--ouro-100); }

/* ---------- Encontro ---------- */
.cartao-encontro { background: var(--papel); border: 1px solid var(--linha); border-top: 6px solid var(--t-enc, #B3453A); border-radius: var(--raio-g); padding: 1.4rem; }
.cartao-encontro.ao-vivo { background: var(--terra-100); border-color: var(--terra); }
.encontro-estado { display: flex; align-items: center; gap: .6rem; font-family: var(--titulo); font-weight: 800; font-size: 1.25rem; }

.escolha-turmas { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.turma-opcao { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; background: var(--papel); border: 1.5px solid var(--linha); border-left: 5px solid var(--terra); border-radius: var(--raio); padding: .7rem .9rem; font: inherit; text-align: left; cursor: pointer; }
.turma-opcao:hover { border-color: var(--verde); }
.turma-opcao small { color: var(--tinta-3); }
.escola-nome { font-weight: 700; color: var(--verde-700); margin: .2rem 0 0; }
/* Entrada em grupo: cada integrante marca o próprio nome na chamada */
.escolha-integrantes input[type=search] { width: 100%; padding: .6rem .8rem; border: 1.5px solid var(--linha); border-radius: var(--raio); font: inherit; margin: .4rem 0; }
.escolha-integrantes textarea { width: 100%; font: inherit; padding: .6rem; border: 1.5px solid var(--linha); border-radius: var(--raio); }
.lista-chamada { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow: auto; border: 1px solid var(--linha); border-radius: var(--raio); background: var(--papel); }
.lista-chamada li + li { border-top: 1px solid var(--linha); }
.lista-chamada li.marcado { background: var(--verde-100); }
.chamada-nome { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; cursor: pointer; }
.chamada-nome input { width: 1.25rem; height: 1.25rem; accent-color: var(--verde); flex: none; }
.chamada-num { font-variant-numeric: tabular-nums; color: var(--tinta-3); font-size: .85rem; min-width: 1.6rem; }
.escolha-integrantes details { margin-top: .6rem; } .escolha-integrantes summary { cursor: pointer; color: var(--petroleo-700); font-weight: 700; }

.texto-modulo { white-space: pre-wrap; font-family: var(--fonte); font-size: .93rem; background: var(--fundo); padding: 1rem; border-radius: var(--raio); max-height: 60vh; overflow: auto; }
.modulo-caixa { margin: 1rem 0; }
.modulo-frame { width: 100%; height: min(80vh, 760px); height: min(80dvh, 760px); border: 1px solid var(--linha);
  border-radius: var(--raio-g); background: var(--papel); display: block; }
/* iOS não rola o conteúdo de um iframe: a rolagem precisa ficar no envoltório */
.modulo-caixa { -webkit-overflow-scrolling: touch; overflow: auto; border-radius: var(--raio-g); }
.modulo-caixa.cheia { position: fixed; inset: 0; z-index: 9000; background: var(--papel); border-radius: 0; padding: 0; margin: 0; }
.modulo-caixa.cheia .modulo-frame { height: 100dvh; border: 0; border-radius: 0; }
.modulo-caixa.cheia .sair-cheia { display: inline-flex; }
.sair-cheia { display: none; position: fixed; right: max(12px, env(safe-area-inset-right)); top: max(12px, env(safe-area-inset-top));
  z-index: 9001; align-items: center; gap: .3rem; }
.codigo-bloco { background: var(--petroleo-900); color: #E7EEF1; padding: 1rem; border-radius: var(--raio); overflow-x: auto; font-size: .85rem; line-height: 1.5; white-space: pre-wrap; }
.item-prof.arquivado { opacity: .62; }
.item-prof.arquivado .item-texto strong { text-decoration: line-through; text-decoration-thickness: 1px; }

/* ---------- Novo cabeçalho e menu ---------- */
.marca-linha { display: flex; align-items: center; gap: .6rem; }
.marca-logo { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--papel); flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.barra-topo { position: sticky; top: 0; z-index: 35; display: flex; align-items: center; gap: .8rem;
  background: var(--papel); border-bottom: 1px solid var(--linha); padding: .5rem clamp(.8rem, 2vw, 1.4rem); }
.busca { flex: 1; display: flex; align-items: center; gap: .5rem; background: var(--fundo); border: 1px solid var(--linha);
  border-radius: 999px; padding: .1rem .9rem; max-width: 560px; }
.busca input { border: 0; background: none; padding: .5rem 0; min-height: 38px; }
.busca input:focus { outline: none; box-shadow: none; }
.topo-perfil { display: flex; align-items: center; gap: .55rem; margin-left: auto; }
.topo-perfil .btn-icone { width: 40px; height: 40px; padding: 0; }
.topo-nome { display: none; flex-direction: column; line-height: 1.2; }
.topo-nome small { color: var(--tinta-3); font-size: .78rem; }
@media (min-width: 720px) { .topo-nome { display: flex; } }
.resultados-busca { position: absolute; z-index: 60; left: 50%; transform: translateX(-50%); top: 3.4rem;
  width: min(560px, 92vw); background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio-g);
  box-shadow: var(--sombra-g); padding: .4rem; max-height: 60vh; overflow: auto; }
.res-item { display: flex; flex-direction: column; width: 100%; text-align: left; background: none; border: 0;
  font: inherit; padding: .5rem .7rem; border-radius: var(--raio); cursor: pointer; }
.res-item:hover { background: var(--petroleo-100); }
.res-item small { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--tinta-3); }
.nav-item { display: flex; align-items: center; gap: .6rem; }
.nav-ic { width: 1.3em; text-align: center; }

.nav-item.apoio { color: var(--ouro); }
.apoio-cartao { border-left: 5px solid var(--ouro); }
.chave-pix { font-family: var(--titulo); font-size: 1.15rem; background: var(--fundo); border: 1px dashed var(--linha-2);
  border-radius: var(--raio); padding: .7rem 1rem; word-break: break-all; }
.qr-pix { display: block; width: 190px; margin: 1rem 0; border: 1px solid var(--linha); border-radius: var(--raio); background: var(--papel); }
.apoio-entrada { font-size: .88rem; color: var(--tinta-3); }

/* ---------- Planejamento ---------- */
.lista-planos { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.plano { display: flex; align-items: center; gap: .8rem; background: var(--papel); border: 1px solid var(--linha);
  border-left: 4px solid var(--verde); border-radius: var(--raio); padding: .7rem .9rem; }
.plano-ic { font-size: 1.5rem; flex: none; }
.plano-corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.plano-corpo strong { font-family: var(--titulo); font-weight: 600; }
.plano-corpo small { color: var(--tinta-3); }

/* ---------- Banco de questões ---------- */
.filtros-banco { display: grid; grid-template-columns: 2fr repeat(4, minmax(120px, 1fr)); gap: .5rem; margin-bottom: 1rem; }
@media (max-width: 800px) { .filtros-banco { grid-template-columns: 1fr 1fr; } }
.barra-usar { background: var(--ouro-100); border-radius: var(--raio); padding: .5rem .8rem; margin-bottom: .8rem; }
.lista-questoes { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.q-banco { display: flex; gap: .7rem; align-items: flex-start; background: var(--papel); border: 1px solid var(--linha);
  border-left: 4px solid var(--petroleo); border-radius: var(--raio); padding: .7rem .9rem; }
.q-banco .q-corpo { flex: 1; min-width: 0; }
.q-meta { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-bottom: .3rem; }
.q-banco .q-acoes { display: flex; flex-direction: column; gap: .2rem; flex: none; }

/* ---------- Início ---------- */
.hero { display: flex; align-items: center; gap: 1.2rem; background: linear-gradient(120deg, var(--petroleo), var(--petroleo-700));
  color: #fff; border-radius: var(--raio-g); padding: 1.4rem 1.6rem; margin-bottom: 1.1rem; }
.hero h1 { color: #fff; margin-bottom: .2rem; }
.hero p { margin: 0; opacity: .92; }
.hero-frase { font-family: var(--titulo); font-style: italic; margin-top: .5rem !important; opacity: .8 !important; font-size: .95rem; }
.hero-logo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: var(--papel); margin-left: auto; flex: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.25); }
@media (max-width: 620px) { .hero-logo { width: 64px; height: 64px; } .hero { padding: 1.1rem; } }
.acoes-rapidas { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: .6rem; margin-bottom: 1.4rem; }
.acao { display: flex; flex-direction: column; align-items: center; gap: .35rem; background: var(--papel);
  border: 1px solid var(--linha); border-radius: 10px; padding: .8rem .5rem; font: inherit; font-size: .85rem;
  font-weight: 700; color: var(--tinta-2); cursor: pointer; text-align: center; }
.acao:hover { border-color: var(--cor-acao); color: var(--cor-acao); }
.acao-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; font-size: 1.3rem;
  background: color-mix(in srgb, var(--cor-acao) 12%, var(--papel)); }
.colunas-inicio { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.2rem; align-items: start; }
@media (max-width: 1000px) { .colunas-inicio { grid-template-columns: 1fr; } }
.coluna-lado .bloco { padding: 1rem 1.1rem; }
.coluna-lado h3 { margin-bottom: .6rem; }
.lista-lado { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.lista-lado li { display: flex; gap: .7rem; align-items: center; }
.lista-lado strong { display: block; font-weight: 600; }
.lista-lado small { color: var(--tinta-3); font-size: .82rem; }
.data-bolha { flex: none; width: 46px; text-align: center; background: var(--petroleo-100); color: var(--petroleo);
  border-radius: 8px; padding: .25rem 0; font-family: var(--titulo); font-weight: 600; line-height: 1.1; }
.data-bolha small { display: block; font-size: .66rem; text-transform: uppercase; color: var(--tinta-3); font-family: var(--fonte); }

/* ---------- Visão geral ---------- */
.resumo-geral { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.4rem; }
.resumo-num { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: .7rem 1rem; text-align: center; }
.resumo-num strong { display: block; font-family: var(--titulo); font-size: 1.9rem; font-weight: 600; line-height: 1; color: var(--petroleo); }
.resumo-num small { color: var(--tinta-3); font-size: .85rem; }
.resumo-num.alerta { border-top-color: var(--terra); }
.resumo-num.alerta strong { color: var(--terra-700); }
.grade-turmas { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .9rem; }
.turma-cartao { height: 100%; display: flex; flex-direction: column; gap: .8rem; background: var(--papel);
  border: 1px solid var(--linha); border-top: 4px solid var(--cor-turma, var(--petroleo)); border-radius: 10px;
  padding: 1rem 1.1rem .9rem; box-shadow: var(--sombra); }
.tc-topo { display: flex; align-items: center; gap: .7rem; }
.tc-sigla { flex: none; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 1.4rem;
  background: color-mix(in srgb, var(--cor-turma) 12%, var(--papel)); }
.tc-id { min-width: 0; }
.tc-id h2 { margin: 0; font-size: 1.16rem; line-height: 1.2; }
.tc-id p { margin: 0; font-size: .85rem; color: var(--tinta-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-id small { display: block; font-size: .78rem; color: var(--tinta-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-numeros { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.tn { display: flex; align-items: center; gap: .45rem; background: var(--fundo); border-radius: 8px; padding: .4rem .55rem; }
.tn-emoji { font-size: 1rem; line-height: 1; }
.tn-valor { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.tn-valor strong { font-family: var(--titulo); font-weight: 600; font-size: 1.05rem; color: var(--tinta); }
.tn-valor small { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--tinta-3); }
.tn.on { background: var(--ok-100); } .tn.on strong { color: var(--ok); }
.tn.alerta { background: var(--terra-100); } .tn.alerta strong { color: var(--terra-700); }
.turma-linha { margin: 0; font-size: .85rem; color: var(--tinta-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-abrir { margin-top: auto; width: 100%; min-height: 44px; font: inherit; font-weight: 700; font-size: .98rem; cursor: pointer;
  color: var(--tinta); background: color-mix(in srgb, var(--cor-turma) 12%, var(--papel));
  border: 1.5px solid color-mix(in srgb, var(--cor-turma) 45%, var(--papel)); border-radius: 8px; }
.tc-abrir:hover { background: color-mix(in srgb, var(--cor-turma) 20%, var(--papel)); border-color: var(--cor-turma); color: var(--tinta); }
.tc-pe { display: flex; align-items: center; justify-content: space-between; gap: .4rem; border-top: 1px solid var(--linha); padding-top: .55rem; }
.tc-codigo { font-family: var(--titulo); letter-spacing: .08em; font-size: .9rem; color: var(--tinta-2); }
.atalhos-gerais { display: flex; flex-wrap: wrap; gap: .5rem; border-top: 1px solid var(--linha); padding-top: 1rem; }
.tipo-opcao.ativo { border-color: var(--terra); background: var(--terra-100); }
.previa-doc { max-height: 60vh; overflow-y: auto; background: var(--papel); border: 1px solid var(--linha); padding: 1.2rem; }
.previa-doc table { width: 100%; border-collapse: collapse; }
.previa-doc td, .previa-doc th { border: 1px solid var(--linha); padding: .3rem .5rem; }

/* ---------- Caderneta ---------- */
.q-ed .pontos input { width: 64px; }
.grade-tipos .tipo-opcao strong { font-family: var(--titulo); }
.bloco-caderneta { background: var(--verde-50); border: 1px solid var(--verde-100); border-radius: var(--raio); padding: .8rem 1rem; margin: .5rem 0 1rem; }
.bloco-caderneta small { color: var(--tinta-3); display: block; }
.sit { font-weight: 700; }
.sit.aprovado { color: var(--ok); }
.sit.recuperacao { color: var(--terra-700); }
.sit.reprovado { color: var(--erro); }
.sit.sem { color: var(--tinta-3); }
.barra-caderneta { margin: 1rem 0; }
.tabela-caixa.caderneta { max-height: 70vh; overflow: auto; }
.planilha { font-size: .92rem; }
.planilha th, .planilha td { padding: .35rem .5rem; }
.planilha thead th { position: sticky; top: 0; z-index: 3; background: var(--verde-50); vertical-align: bottom; }
.planilha th.col-nome { position: sticky; left: 0; z-index: 4; min-width: 190px; }
.planilha tbody th { position: sticky; left: 0; z-index: 2; background: var(--papel); font-weight: 400; text-align: left; }
.planilha .col-atv { min-width: 96px; }
.planilha .col-atv button { display: flex; flex-direction: column; gap: 0; text-align: center; width: 100%; text-decoration: none; }
.planilha .col-atv small { color: var(--tinta-3); font-weight: 400; }
.planilha .nome-aluno { text-decoration: none; color: inherit; text-align: left; }
.planilha .nome-aluno:hover { color: var(--verde-700); text-decoration: underline; }
.planilha input { width: 72px; min-height: 34px; padding: .2rem .3rem; text-align: center; border-color: var(--linha); }
.planilha input:hover { border-color: var(--verde-700); }
.planilha input.acima-do-valor { border-color: var(--erro); background: var(--erro-100); }
.planilha td.total { font-weight: 700; background: var(--papel); }
.planilha .nota-final { font-family: var(--titulo); font-weight: 800; }
.planilha .nota-final.acima { color: var(--ok); background: var(--ok-100); }
.planilha .nota-final.abaixo { color: var(--erro); background: var(--erro-100); }
.planilha tfoot th, .planilha tfoot td { background: var(--verde-50); font-weight: 700; border-top: 2px solid var(--verde); position: sticky; bottom: 0; }

.canva-caixa { position: relative; }
.canva-ajuda { margin-top: .6rem; }
.canva-ajuda p:last-of-type { margin-bottom: .6rem; }

.leitor-relatorio { margin: 1rem 0; }
.situacao-linha { align-items: center; margin-bottom: .8rem; }
.parecer .linha-botoes { gap: .5rem; }
.btn-aprovado { background: var(--ok); border-color: var(--ok); }
.btn-aprovado:hover { background: #24632a; border-color: #24632a; }
.btn-ressalva { background: var(--ouro); border-color: var(--ouro); color: var(--petroleo-900); }
.btn-ressalva:hover { background: #b5852f; border-color: #b5852f; color: var(--petroleo-900); }

.escolha-modo { display: flex; gap: .4rem; margin-bottom: .9rem; }
.escolha-modo .modo { flex: 1; font: inherit; font-weight: 700; padding: .55rem .6rem; border: 1.5px solid var(--linha-2);
  background: var(--papel); color: var(--tinta-2); border-radius: var(--raio); cursor: pointer; }
.escolha-modo .modo.ativo { background: var(--petroleo); border-color: var(--petroleo); color: #fff; }
.faixa.grupo { background: var(--verde); }
.aluno-info .integrantes { color: var(--tinta-3); font-style: italic; }

/* ---------- Modo prova e progresso ---------- */
.faixa.prova { background: var(--petroleo-900); }
.prova-contador { flex: none !important; min-width: 0 !important; background: rgba(255,255,255,.14); padding: .15rem .6rem; border-radius: 999px; font-size: .85rem; }
.cronometro-prova { position: sticky; top: 4.2rem; z-index: 30; display: inline-flex; align-items: center; gap: .3rem;
  background: var(--petroleo); color: #fff; padding: .35rem .9rem; border-radius: 999px; font-family: var(--titulo); font-size: 1.1rem; margin-bottom: .8rem; }
.cronometro-prova.acabando { background: var(--erro); animation: pulso 1.2s infinite; }
.bloco-prova { background: var(--petroleo-100); border: 1px solid var(--linha); border-radius: var(--raio); padding: .8rem 1rem; margin: .5rem 0 1rem; }
.bloco-prova small { color: var(--tinta-3); display: block; margin-bottom: .3rem; }
.prova-extras { border-top: 1px dashed var(--linha-2); margin-top: .6rem; padding-top: .6rem; }
.alerta-saida { color: var(--erro) !important; font-weight: 700; }
.selo-novo { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: .4rem;
  border-radius: 999px; background: var(--terra); color: #fff; font-size: .72rem; font-weight: 700; }
.prog-lista { list-style: none; padding: 0; margin: 0 0 1.4rem; display: flex; flex-direction: column; gap: .4rem; }
.prog-item { display: flex; align-items: center; justify-content: space-between; gap: .8rem; background: var(--papel);
  border: 1px solid var(--linha); border-left: 4px solid var(--cor-tipo, var(--petroleo)); border-radius: var(--raio); padding: .5rem .8rem; }
.prog-nome { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; min-width: 0; }
.prog-nome strong { display: block; font-weight: 400; }
.prog-nome small { color: var(--tinta-3); }
.prog-nome:hover strong { color: var(--petroleo-700); text-decoration: underline; }

/* ---------- Biblioteca: estante ---------- */
.estante { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem 1.1rem; align-items: end; padding: .5rem .2rem 0; }
.estante-tabua { height: 14px; border-radius: 3px; margin: -2px 0 2rem; background: linear-gradient(180deg, #C6A77D, #9B7B52);
  box-shadow: 0 6px 14px rgba(27,36,32,.18); }
.livro { position: relative; display: flex; align-items: stretch; height: 215px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; text-align: left; transition: transform .12s; }
.livro:hover { transform: translateY(-4px); }
.livro-lombada { width: 16px; flex: none; border-radius: 6px 0 0 6px; background: color-mix(in srgb, var(--cor-livro) 80%, #000);
  box-shadow: inset -3px 0 6px rgba(0,0,0,.25); }
.livro-capa { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; gap: .3rem; padding: .8rem .7rem;
  border-radius: 0 6px 6px 0; color: #fff; background: var(--cor-livro, var(--petroleo)); box-shadow: 2px 3px 10px rgba(27,36,32,.22);
  overflow: hidden; }
.livro.com-capa .livro-capa { padding: 0; background: var(--papel); }
.livro.com-capa .livro-capa img { width: 100%; height: 100%; object-fit: cover; display: block; }
.livro-etiqueta { position: absolute; left: 0; right: 0; bottom: 0; padding: .35rem .5rem; font-size: .76rem; line-height: 1.2;
  background: linear-gradient(180deg, rgba(11,35,49,0), rgba(11,35,49,.82) 45%); color: #fff;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.livro-capa strong { font-family: var(--titulo); font-size: 1rem; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.livro-capa small { font-size: .82rem; opacity: .85; }
.livro-genero { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; opacity: .8; }
.livro-ano { margin-top: auto; font-size: .78rem; opacity: .8; border-top: 1px solid rgba(255,255,255,.35); padding-top: .3rem; }
.obra { background: var(--papel); border: 1px solid var(--linha); border-top: 5px solid var(--cor-livro); border-radius: var(--raio-g); padding: 1.2rem 1.4rem; margin-bottom: 1.2rem; }
.obra-cabeca { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.obra-cabeca h1 { margin: .1rem 0 .2rem; }
.leitura-obra { margin-top: 1rem; }
.leitor { width: 100%; height: min(78vh, 780px); border: 1px solid var(--linha); border-radius: var(--raio); background: var(--papel); }
.comentario.do-prof { border-left: 4px solid var(--verde); }
.comentario .avatar { width: 26px; height: 26px; font-size: .7rem; display: inline-grid; vertical-align: middle; margin-right: .4rem; }

/* ---------- Perfil do professor ---------- */
.perfil-bt { display: flex; align-items: center; gap: .5rem; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: .2rem; border-radius: var(--raio); min-width: 0; }
.perfil-bt:hover { background: rgba(255,255,255,.1); }
.perfil-nome { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perfil-foto { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid rgba(255,255,255,.5); }
.perfil-foto.vazia { display: grid; place-items: center; background: var(--terra); color: #fff; font-weight: 700; font-size: .8rem; }
.perfil-foto.vazia.grande { width: 110px; height: 110px; font-size: 1.6rem; }
.perfil-previa { display: grid; place-items: center; margin-bottom: .8rem; }
.perfil-previa img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 3px solid var(--linha); }
.perfil-editor { text-align: center; margin-bottom: 1rem; }
.perfil-editor .linha-botoes { justify-content: center; }

/* ---------- Ciência em Ação ---------- */
.proj-grade { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .9rem; }
.proj-cartao { height: 100%; display: flex; flex-direction: column; gap: .4rem; background: var(--papel); border: 1px solid var(--linha); border-left: 6px solid var(--linha-2); border-radius: var(--raio-g); padding: 1rem 1.1rem; }
.proj-cartao.meu { border-left-color: var(--terra); }
.proj-cartao h3 { margin: .3rem 0 0; font-size: 1.1rem; }
.proj-cartao .linha-botoes { margin-top: auto; padding-top: .5rem; }
.proj-barra { height: 8px; border-radius: 999px; background: var(--verde-100); overflow: hidden; margin: .2rem 0; }
.proj-barra span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--verde), var(--ouro)); transition: width .3s; }
.proj-cabeca { margin-bottom: 1rem; }
.proj-titulo { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.proj-titulo h1 { margin: .2rem 0 .1rem; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.abas-proj { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: 1rem; border-bottom: 2px solid var(--linha); }
.aba-proj { background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; font: inherit; font-weight: 700; color: var(--tinta-2); padding: .55rem .9rem; cursor: pointer; border-radius: 8px 8px 0 0; }
.aba-proj:hover { background: var(--verde-50); }
.aba-proj.ativo { color: var(--petroleo); border-bottom-color: var(--terra); }
.proj-corpo { padding-top: 1.2rem; }
.proj-aviso { background: var(--verde-50); border-left: 5px solid var(--verde); border-radius: 0 var(--raio) var(--raio) 0; padding: .8rem 1rem; margin-bottom: 1.2rem; }
.proj-aviso p:last-child { margin-bottom: 0; }
.salvo { min-height: 1.2em; text-align: right; font-size: .85rem; }
.secao-pre { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio-g); padding: 1rem 1.2rem; margin-bottom: .9rem; }
.secao-pre.com-comentario { border-left: 5px solid var(--ouro); }
.secao-pre h3 { display: flex; align-items: center; gap: .6rem; margin-bottom: .3rem; }
.secao-num { font-family: var(--titulo); font-size: 1.6rem; font-weight: 600; color: var(--terra); line-height: 1; min-width: 1.6em; }
.secao-dica { color: var(--tinta-3); font-size: .92rem; margin-bottom: .5rem; }
.secao-pre textarea { background: var(--papel); }
.secao-pre textarea[readonly] { background: var(--fundo); color: var(--tinta-2); }
.comentario-prof { background: var(--ouro-100); border-radius: var(--raio); padding: .7rem .9rem; margin-top: .7rem; }
.comentario-prof small { color: #7A5A12; }
.faixa.comentario { background: var(--ouro); color: var(--verde-900); }
.faixa.comentario .btn-claro { border-color: var(--verde-900); }
.faixa-comentarios { display: flex; flex-direction: column; gap: .2rem; background: var(--ouro-100); border-left: 5px solid var(--ouro); border-radius: 0 var(--raio) var(--raio) 0; padding: .8rem 1rem; margin-bottom: 1rem; }
.faixa-comentarios small { color: #7A5A12; }
.comentario-area { margin-top: .7rem; }
.comentario-prof.resolvido { background: var(--ok-100); opacity: .85; }
.com-topo { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .3rem; }
.comentario-prof .btn-sec { margin-top: .5rem; }
.galeria { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; }
.g-item { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio-g); overflow: hidden; display: flex; flex-direction: column; }
.g-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; cursor: zoom-in; display: block; }
.g-item .video { border-radius: 0; }
.g-pe { padding: .6rem .8rem; display: flex; flex-direction: column; gap: .2rem; }
.g-pe p { margin: 0; font-size: .95rem; }
.diario { display: flex; flex-direction: column; gap: .8rem; margin-top: 1.2rem; }
.registro { display: flex; gap: 1rem; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio-g); padding: 1rem 1.2rem; }
.reg-data { flex: none; width: 5.5rem; font-family: var(--titulo); color: var(--terra-700); }
.reg-corpo { min-width: 0; flex: 1; }
.reg-corpo h3 { margin-bottom: .3rem; }
@media (max-width: 640px) { .registro { flex-direction: column; gap: .3rem; } .reg-data { width: auto; } }

/* ---------- Mural ---------- */
.compositor { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio-g); padding: 1rem; margin-bottom: 1.2rem; box-shadow: var(--sombra); }
.compositor textarea { border-color: var(--linha); }
.feed { display: flex; flex-direction: column; gap: .9rem; }
.post { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio-g); padding: 1rem 1.1rem .5rem; }
.post.do-prof { border-left: 5px solid var(--verde); }
.post.fixado { border: 2px solid var(--ouro); background: var(--papel); }
.post-topo { display: flex; gap: .7rem; align-items: center; margin-bottom: .6rem; }
.post-autor { display: flex; flex-direction: column; }
.post-autor small { color: var(--tinta-3); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--terra-100); color: var(--terra-700); font-weight: 800; font-size: .88rem; flex: none; }
.do-prof .avatar { background: var(--verde); color: #fff; }
.selo { display: inline-block; margin-left: .4rem; background: var(--verde); color: #fff; font-size: .72rem; font-weight: 700; padding: .05rem .5rem; border-radius: 999px; vertical-align: middle; }
.post-acoes { display: flex; flex-wrap: wrap; gap: .2rem; border-top: 1px solid var(--linha); margin-top: .6rem; padding-top: .3rem; }
.comentarios { border-top: 1px dashed var(--linha); padding: .7rem 0 .4rem; }
.com-lista { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .6rem; }
.comentario { background: var(--fundo); padding: .45rem .7rem; border-radius: var(--raio); font-size: .95rem; }
.comentario small { color: var(--tinta-3); }
.com-form { display: flex; gap: .5rem; }

/* ---------- Debate ---------- */
.segmentado { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .7rem; }
.seg { font: inherit; font-weight: 700; padding: .45rem 1rem; border-radius: 999px; border: 2px solid var(--cor-pos); background: var(--papel); color: var(--cor-pos); cursor: pointer; }
.seg.ativo { background: var(--cor-pos); color: #fff; }
.pos-0 { --cor-pos: var(--pos-0); } .pos-1 { --cor-pos: var(--pos-1); } .pos-2 { --cor-pos: var(--pos-2); } .pos-3 { --cor-pos: var(--pos-3); }
.respondendo { font-size: .92rem; background: var(--verde-50); padding: .4rem .7rem; border-radius: var(--raio); margin-bottom: .5rem; }
.placar-debate { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--linha); margin: .4rem 0; }
.placar-debate span { background: var(--cor-pos); transition: width .4s; }
.legenda-placar { display: flex; flex-wrap: wrap; gap: 1rem; font-weight: 700; font-size: .92rem; }
.legenda-placar span { color: var(--cor-pos); display: inline-flex; align-items: center; gap: .35rem; }
.bolinha-pos { width: 10px; height: 10px; border-radius: 50%; background: var(--cor-pos); display: inline-block; }
.colunas-debate { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }
.coluna-debate { background: color-mix(in srgb, var(--cor-pos) 6%, var(--papel)); border-top: 5px solid var(--cor-pos); border-radius: var(--raio-g); padding: .9rem; }
.coluna-debate h3 { color: var(--cor-pos); }
.argumento { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: .7rem .8rem; margin-bottom: .6rem; }
.argumento.destaque { border: 2px solid var(--ouro); box-shadow: 0 0 0 4px var(--ouro-100); }
.argumento.resposta { margin: .6rem 0 0 .6rem; border-left: 3px solid var(--linha-2); background: var(--papel); }
.arg-topo { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .3rem; }
.arg-topo small { color: var(--tinta-3); }
.arg-topo .tag.pos-0, .arg-topo .tag.pos-1, .arg-topo .tag.pos-2, .arg-topo .tag.pos-3 { background: var(--cor-pos); color: #fff; }
.destaque-tag { background: var(--ouro-100) !important; color: #7A5A12 !important; }
.arg-acoes { display: flex; flex-wrap: wrap; gap: .15rem; }

/* ---------- Mapa ---------- */
.mapa-caixa { height: min(62vh, 540px); border-radius: var(--raio-g); overflow: hidden; border: 1px solid var(--linha); background: var(--verde-50); z-index: 0; }
.mapa-caixa.pequeno { height: 340px; }
.mapa-barra { display: flex; gap: .5rem; margin-bottom: .6rem; }
.popup-mapa { font-family: var(--fonte); font-size: .95rem; max-width: 260px; }
.popup-mapa p { margin: .3rem 0; }
.instrucao { background: var(--terra-100); border-left: 5px solid var(--terra); padding: .8rem 1rem; border-radius: 0 var(--raio) var(--raio) 0; margin-bottom: .8rem; }
.instrucao small { display: block; color: var(--terra-700); margin-top: .2rem; }
.legenda-mapa { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .9rem; margin: .6rem 0; }
.legenda-mapa span { display: inline-flex; align-items: center; gap: .35rem; }
.bolinha { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--linha-2); }
.pins-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; }
.pins-lista h3 { grid-column: 1 / -1; margin: .8rem 0 0; }
.pins-lista > .sub { grid-column: 1 / -1; }
.pin { background: var(--papel); border: 1px solid var(--linha); border-left: 5px solid; border-radius: var(--raio); padding: .6rem .8rem; }
.pin p { margin: .3rem 0; font-size: .95rem; }
.pin-topo { display: flex; flex-direction: column; }
.pin-topo small { color: var(--tinta-3); }

/* ---------- Jogos ---------- */
.jogo { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio-g); padding: 1.2rem; }
.jogo-ajuda { color: var(--tinta-2); }
.jogo-info { font-weight: 700; color: var(--verde-700); }
.memoria { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.carta { position: relative; min-height: 110px; border-radius: var(--raio); border: 0; cursor: pointer; font: inherit; padding: .6rem; color: #fff;
  background: var(--verde) repeating-linear-gradient(45deg, transparent 0 10px, rgba(255,255,255,.06) 10px 20px); transition: transform .2s; }
.carta.b { background-color: var(--terra); }
.carta .frente { visibility: hidden; font-size: .92rem; line-height: 1.3; }
.carta.aberta, .carta.ok { background: var(--papel); color: var(--tinta); box-shadow: inset 0 0 0 3px var(--verde); }
.carta.b.aberta, .carta.b.ok { box-shadow: inset 0 0 0 3px var(--terra); }
.carta.aberta .frente, .carta.ok .frente { visibility: visible; }
.carta.ok { background: var(--ok-100); cursor: default; }
.carta:hover:not(.aberta):not(.ok) { transform: translateY(-2px); }
.forca-palavra { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; margin: 1rem 0; }
.letra { width: 2.1rem; height: 2.6rem; border-bottom: 3px solid var(--verde); display: grid; place-items: center; font-family: var(--titulo); font-size: 1.5rem; font-weight: 800; }
.letra.espaco { border-bottom-color: transparent; width: 1rem; }
.vidas { text-align: center; font-size: 1.2rem; }
.dica { text-align: center; color: var(--tinta-2); font-style: italic; }
.teclado { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; max-width: 560px; margin: 0 auto; }
.tecla { width: 2.5rem; height: 2.7rem; font: inherit; font-weight: 700; border: 1.5px solid var(--linha-2); border-radius: 8px; background: var(--papel); cursor: pointer; }
.tecla:hover:not(:disabled) { border-color: var(--verde); }
.tecla.certa { background: var(--ok-100); border-color: var(--ok); color: var(--ok); }
.tecla.errada { background: var(--erro-100); border-color: var(--erro); color: var(--erro); }
.linha-tempo { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-direction: column; gap: .4rem; counter-reset: lt; }
.linha-tempo li { display: flex; align-items: center; gap: .7rem; background: var(--papel); border: 1.5px solid var(--linha); border-radius: var(--raio); padding: .5rem .7rem; cursor: grab; }
.linha-tempo li.arrastando { opacity: .5; border-style: dashed; }
.linha-tempo li.ok { border-color: var(--ok); background: var(--ok-100); cursor: default; }
.linha-tempo li.erro { border-color: var(--erro); background: var(--erro-100); cursor: default; }
.lt-ano { font-family: var(--titulo); font-weight: 800; min-width: 5ch; }
.lt-texto { flex: 1; }
.lt-acoes { display: flex; }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .entrada { grid-template-columns: 1fr; }
  .capa img { object-position: 50% 40%; }
  .entrada-marca { padding: 2rem 1.5rem 2.6rem; }
  .entrada-marca h1 { font-size: 3.4rem; }
  .painel { grid-template-columns: 1fr; }
  .so-celular { display: flex !important; }
  .lateral { position: fixed; inset: 0 auto 0 0; width: min(86vw, 300px); z-index: 200; transform: translateX(-105%); transition: transform .2s; box-shadow: var(--sombra-g); }
  .lateral.aberta { transform: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .abas-aluno { order: 3; width: 100%; justify-content: space-between; margin: 0; }
  .abas-aluno a { flex: 1; text-align: center; padding: .4rem .5rem; }
  .topo-acoes { margin-left: auto; }
  .modal-fundo { padding: 0; align-items: end; }
  .modal, .modal.largo { width: 100%; max-height: 94vh; border-radius: var(--raio-g) var(--raio-g) 0 0; }
  .com-form { flex-direction: column; }
  .carimbo-codigo { font-size: 1.8rem; }
  .memoria { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .topo, .lateral, .faixa, .btn, .barra-celular { display: none !important; }
  .painel { display: block; }
}

/* ---------- Sala ao vivo ---------- */
.vivo-cabeca { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.vivo-grade { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .vivo-grade { grid-template-columns: 1fr; } }
.video-caixa { position: relative; }
.video-frame { width: 100%; height: min(58vh, 520px); height: min(58dvh, 520px); border: 1px solid var(--linha); border-radius: var(--raio-g); background: #000; }
.palco-emoji { position: relative; height: 0; }
.emoji-voando { position: absolute; bottom: 0; font-size: 2rem; animation: sobe-emoji 3s ease-out forwards; pointer-events: none; }
@keyframes sobe-emoji { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-220px) scale(1.4); opacity: 0; } }
.reacoes { gap: .35rem; }
.bt-emoji { font-size: 1.35rem; background: var(--papel); border: 1.5px solid var(--linha); border-radius: 999px; width: 46px; height: 46px; cursor: pointer; }
.bt-emoji:hover { border-color: var(--terra); transform: scale(1.08); }
.lista-presenca { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .35rem; max-height: 240px; overflow: auto; }
.lista-presenca li { display: flex; gap: .5rem; align-items: center; padding: .25rem 0; }
.lista-presenca li.fora { opacity: .5; }
.lista-presenca li.dentro strong::before { content: "● "; color: var(--ok); }
.chat-bloco { display: flex; flex-direction: column; }
.chat-lista { max-height: 300px; overflow: auto; display: flex; flex-direction: column; gap: .5rem; margin-bottom: .5rem; }
.chat-msg { display: flex; gap: .5rem; align-items: flex-start; }
.chat-msg.do-prof .chat-texto { background: var(--petroleo-100); }
.chat-msg.aviso-mao .chat-texto { background: var(--ouro-100); font-style: italic; }
.chat-quem { margin: 0; font-size: .8rem; color: var(--tinta-3); }
.chat-texto { margin: 0; background: var(--fundo); border-radius: 0 10px 10px 10px; padding: .4rem .7rem; }
.painel-prof { border-left: 4px solid var(--terra); margin-top: 1rem; }
.faixa.vivo { background: var(--erro); }
.video-caixa video.video-frame { object-fit: cover; }
.video-caixa .oculto { display: none; }
.comando.destaque { border-color: var(--erro); }
.comando.destaque .comando-icone { background: var(--erro-100, #F7E2DF); }

/* ---------- tela de TV da sala ao vivo ---------- */
.tv { position: relative; background: #0B1418; border: 1px solid var(--linha); border-radius: 14px;
  overflow: hidden; aspect-ratio: 16 / 9; display: grid; place-items: center;
  box-shadow: inset 0 0 60px rgba(0,0,0,.55), 0 10px 30px -20px rgba(11,35,49,.8); }
.tv video.video-frame { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; border-radius: 0; background: #000; }
.tv-desligada { text-align: center; color: #9DB2BD; padding: 1.5rem; }
.tv-desligada span { font-size: 2.6rem; display: block; margin-bottom: .4rem; }
.tv-desligada p { margin: 0 0 .3rem; }
.tv-desligada .sub { color: #6E7F87; max-width: 38ch; margin: 0 auto; }
.tv-toque { position: absolute; inset: auto auto 16px 50%; transform: translateX(-50%); font: inherit; font-weight: 700;
  background: var(--terra); color: #fff; border: 0; border-radius: 999px; padding: .7rem 1.4rem; cursor: pointer; }
.tv.ligada::after { content: "AO VIVO"; position: absolute; top: 10px; left: 12px; background: var(--erro); color: #fff;
  font-size: .68rem; letter-spacing: .12em; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.grade-video { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .6rem; }
.grade-video.vazia { grid-template-columns: 1fr; }
.tv .tv-nome { position: absolute; left: 10px; bottom: 8px; background: rgba(11,20,24,.72); color: #fff;
  font-size: .78rem; padding: 3px 9px; border-radius: 999px; }
.tv.eu { outline: 2px solid var(--terra); outline-offset: -2px; }
.tv-avatar { display: none; position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%;
  background: var(--petroleo); color: #fff; font-family: var(--titulo); font-size: 1.6rem;
  align-items: center; justify-content: center; }
.tv.so-audio .tv-avatar { display: flex; }
.tv.so-audio video { opacity: 0; }

/* ---------- Leituras e fontes (Ciência em Ação) ---------- */
.ficha-fonte { background: var(--papel); border: 1px solid var(--linha); border-left: 4px solid var(--petroleo);
  border-radius: 0 var(--raio-g) var(--raio-g) 0; padding: 1rem 1.2rem; margin-bottom: .7rem; }
.ff-topo { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .5rem; }
.ff-topo h4 { margin: 0 0 .15rem; }
.ff-ic { font-size: 1.5rem; line-height: 1; flex: none; }
.ff-topo .tag { margin-left: auto; flex: none; }
.cit-fonte { font-family: var(--titulo); font-style: italic; color: var(--tinta-2);
  border-left: 3px solid var(--terra); margin: .5rem 0; padding-left: .9rem; }
.grade-video.unica { grid-template-columns: 1fr; }
.video-frame.jitsi { width: 100%; height: min(62vh, 560px); height: min(62dvh, 560px); border: 1px solid var(--linha); border-radius: 14px; background: #0B1418; display: block; }

/* ---------- Sala do Meet com chamada automática ---------- */
.meet-caixa { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
  background: var(--papel); border: 1px solid var(--linha); border-left: 5px solid var(--petroleo);
  border-radius: 0 var(--raio-g) var(--raio-g) 0; padding: 1.1rem 1.3rem; }
.meet-caixa.dentro { border-left-color: var(--erro); }
.meet-caixa .meet-ic { font-size: 2rem; line-height: 1; }
.meet-caixa h3 { margin: 0 0 .2rem; }
.meet-caixa .linha-botoes { margin-left: auto; margin-top: 0; }
.versao-rodape { position: fixed; right: 8px; bottom: 6px; z-index: 5; margin: 0;
  font-size: .68rem; color: var(--tinta-3); opacity: .55; pointer-events: none; }
.total-correcao { font-weight: 800; font-size: 1.05rem; color: var(--verde-700); margin-top: 1rem; }
