/* ---------- Base ---------- */
* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fundo); color: var(--texto); font: 17px/1.6 var(--fonte); overflow-x: clip; }
h1, h2, h3 { font-family: var(--fonte-titulo); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(26px, 5vw, 34px); }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--lilas); outline-offset: 2px; border-radius: 8px; }
svg { flex: none; }
.pular { position: absolute; left: -999px; top: 8px; background: var(--roxo); color: var(--roxo-texto); padding: 10px 14px; border-radius: 10px; z-index: 50; }
.pular:focus { left: 8px; }
.oculto-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Estrutura ---------- */
.casca { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
.coluna { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(16px + env(safe-area-inset-top)) 20px 8px; max-width: 980px; margin: 0 auto; }
main { padding: 8px 20px 24px; max-width: 980px; margin: 0 auto; outline: none; }
.lateral { display: none; }

@media (min-width: 900px) {
  .casca { grid-template-columns: 248px minmax(0, 1fr); }
  .lateral { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; padding: 22px 14px; background: var(--cartao); border-right: 1px solid var(--linha); }
  .marca { display: flex; align-items: center; gap: 10px; font: 600 19px var(--fonte-titulo); padding: 0 8px; }
  .marca img { border-radius: 10px; }
  .lateral nav { display: flex; flex-direction: column; gap: 4px; }
  .lateral nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 9px; color: var(--texto-suave); text-decoration: none; font-weight: 700; }
  .lateral nav a:hover { background: var(--cartao-2); color: var(--texto); }
  .lateral nav a[aria-current=page] { background: var(--lavanda); color: var(--roxo); }
  .lateral nav svg { width: 22px; height: 22px; }
  .coluna { padding-bottom: 32px; }
  .inferior { display: none !important; }
  .topo { padding-top: 26px; }
}

/* ---------- Navegação inferior ---------- */
.inferior { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--cartao); border-top: 1px solid var(--linha); }
.inferior a, .inferior button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; border: 0; background: none; border-radius: 10px; color: var(--texto-suave); font-size: 12.5px; font-weight: 800; text-decoration: none; }
.inferior svg { width: 24px; height: 24px; }
.inferior [aria-current=page] { color: var(--roxo); background: var(--lavanda); }
.inferior .central span.bola { width: 50px; height: 50px; margin-top: -24px; border-radius: 12px; display: grid; place-items: center; background: var(--roxo); color: var(--roxo-texto); box-shadow: 0 4px 0 color-mix(in srgb, var(--roxo) 55%, #000); }
.inferior .central[aria-current=page] { background: none; }
nav svg, .icone-btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Folha "Mais" ---------- */
.folha { position: fixed; inset: 0; z-index: 40; }
.folha-fundo { position: absolute; inset: 0; background: rgb(23 20 42 / .45); }
.folha-painel { position: absolute; left: 0; right: 0; bottom: 0; background: var(--cartao); border-radius: 12px 16px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); animation: subir .25s ease-out; }
.folha-alca { width: 44px; height: 5px; border-radius: 9px; background: var(--linha); margin: 0 auto 14px; }
.folha-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.folha-grade a { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; border-radius: 12px; background: var(--cartao-2); color: var(--texto); text-decoration: none; font-weight: 800; }
.folha-grade svg { width: 24px; height: 24px; color: var(--roxo); }
@keyframes subir { from { transform: translateY(40px); opacity: 0; } }

/* ---------- Componentes ---------- */
.icone-btn { width: 46px; height: 46px; border-radius: 10px; border: 0; background: var(--cartao); box-shadow: var(--sombra); display: grid; place-items: center; color: var(--roxo); }
.icone-btn svg { width: 22px; height: 22px; }
.cartao { background: var(--cartao); border-radius: var(--raio); padding: 20px; box-shadow: var(--sombra); }
.cartao + .cartao { margin-top: 16px; }
.grade { display: grid; gap: 16px; }
.grade-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grade-n { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.secao { margin-top: 26px; }
.secao > h2 { margin-bottom: 12px; }
.suave { color: var(--texto-suave); }
.peq { font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--roxo); color: var(--roxo-texto); font-weight: 800; text-decoration: none; box-shadow: 0 4px 0 color-mix(in srgb, var(--roxo) 55%, #000); transition: transform .1s; }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 color-mix(in srgb, var(--roxo) 55%, #000); }
.btn.claro { background: var(--lavanda); color: var(--roxo); box-shadow: 0 3px 0 var(--linha); }
.btn.contorno { background: transparent; color: var(--texto); box-shadow: none; border: 2px solid var(--linha); }
.btn.perigo { background: var(--pessego); color: var(--pessego-forte); box-shadow: 0 3px 0 var(--linha); }
.btn.largo { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.linha-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.linha-btns .btn { flex: 1 1 150px; }
.etiqueta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 99px; background: var(--lavanda); color: var(--roxo); }
.etiqueta.menta { background: var(--menta); color: var(--menta-forte); }
.etiqueta.azul { background: var(--azul); color: var(--azul-forte); }
.etiqueta.pessego { background: var(--pessego); color: var(--pessego-forte); }
.barra { height: 12px; border-radius: 99px; background: var(--lavanda); overflow: hidden; }
.barra i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--lilas), var(--menta-forte)); transition: width .6s ease; }

label.campo { display: block; font-weight: 800; margin: 16px 0 6px; }
input[type=text], input[type=number], input[type=date], select, textarea { width: 100%; min-height: 50px; padding: 12px 14px; font-size: 16px; background: var(--cartao); border: 2px solid var(--linha); border-radius: var(--raio-p); }
input:focus, select:focus, textarea:focus { border-color: var(--lilas); outline: none; }
.dica { font-size: 14px; color: var(--texto-suave); margin-top: 6px; }

/* ---------- Mascote ---------- */
.mascote-balao { display: flex; align-items: center; gap: 14px; }
.mascote-balao svg.lumi { width: 92px; height: 92px; }
.balao { position: relative; flex: 1; background: var(--cartao-2); border-radius: 12px; padding: 12px 16px; font-weight: 700; }
.balao::before { content: ''; position: absolute; left: -8px; top: 50%; width: 16px; height: 16px; background: inherit; transform: translateY(-50%) rotate(45deg); border-radius: 3px; }
.lumi-flutua { animation: flutua 5s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes flutua { 50% { transform: translateY(-4px); } }

/* ---------- Painel inicial ---------- */
.ola { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); background: linear-gradient(135deg, var(--lavanda), var(--azul)); border-radius: 16px; padding: 22px; }
.ola h2 { font-size: clamp(24px, 4.5vw, 30px); }
.numeros { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
.numero { background: var(--cartao); border-radius: 12px; padding: 14px 16px; box-shadow: var(--sombra); }
.numero b { display: block; font: 600 clamp(24px, 6vw, 30px)/1.1 var(--fonte-titulo); }
.numero span { font-size: 14px; color: var(--texto-suave); font-weight: 700; }
.vazio { text-align: center; padding: 26px 18px; }
.vazio svg.lumi { width: 110px; height: 110px; margin: 0 auto 8px; display: block; }
.vazio p { max-width: 42ch; margin: 6px auto 0; }

/* ---------- Matérias ---------- */
.materia { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; background: var(--cartao); box-shadow: var(--sombra); }
.materia .cor { width: 46px; height: 46px; border-radius: 10px; flex: none; display: grid; place-items: center; font: 600 20px var(--fonte-titulo); color: #25243D; }
.materia .info { flex: 1; }
.materia .info b { display: block; font-size: 17px; line-height: 1.3; }
.materia .acoes { display: flex; gap: 6px; }
.materia .acoes button { width: 44px; height: 44px; border: 0; border-radius: 9px; background: var(--cartao-2); color: var(--texto-suave); display: grid; place-items: center; }
.materia .acoes svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cores { display: flex; flex-wrap: wrap; gap: 10px; }
.cores label { position: relative; }
.cores input { position: absolute; opacity: 0; }
.cores span { display: block; width: 44px; height: 44px; border-radius: 10px; border: 3px solid transparent; }
.cores input:checked + span { border-color: var(--roxo); }
.cores input:focus-visible + span { outline: 3px solid var(--lilas); outline-offset: 2px; }

/* ---------- Em construção ---------- */
.etapa-futura { border: 2px dashed var(--linha); background: transparent; box-shadow: none; }
/* Lista com bolinhas. O texto fica num bloco normal (não flex), para negrito e texto
   seguirem na mesma linha e quebrarem juntos, sem sobrepor. */
.lista-recursos { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.lista-recursos li { position: relative; padding-left: 22px; line-height: 1.55; overflow-wrap: anywhere; }
.lista-recursos li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 10px; height: 10px; border-radius: 50%; background: var(--lilas); }

/* ---------- Foco ---------- */
.foco-tela { display: grid; gap: 18px; justify-items: center; text-align: center; }
.relogio { position: relative; width: min(300px, 78vw); aspect-ratio: 1; }
.relogio svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.relogio .tempo { position: absolute; inset: 0; display: grid; place-content: center; gap: 4px; }
.relogio .tempo b { font: 600 clamp(46px, 14vw, 64px)/1 var(--fonte-titulo); font-variant-numeric: tabular-nums; }
.segmentos { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.segmentos button { min-height: 46px; min-width: 76px; padding: 0 14px; border-radius: 10px; border: 2px solid var(--linha); background: var(--cartao); font-weight: 800; }
.segmentos button[aria-pressed=true] { border-color: var(--roxo); color: var(--roxo); background: var(--lavanda); }
body.focando .inferior, body.focando .lateral, body.focando .topo .icone-btn { display: none !important; }
body.focando .casca { grid-template-columns: minmax(0, 1fr); }
body.focando .coluna { padding-bottom: 24px; }

/* ---------- Gráfico simples ---------- */
.barras-dias { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; height: 150px; margin-top: 14px; }
.barras-dias div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; font-size: 12.5px; color: var(--texto-suave); font-weight: 700; }
.barras-dias i { display: block; width: 100%; max-width: 38px; border-radius: 10px 10px 4px 4px; background: var(--lilas); min-height: 4px; }
.barras-dias .hoje i { background: var(--roxo); }

/* ---------- Aviso, modal, confete ---------- */
.aviso { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translate(-50%, -120px); max-width: 92vw; padding: 12px 20px; border-radius: 99px; background: var(--roxo); color: var(--roxo-texto); font-weight: 800; z-index: 60; transition: transform .3s ease; pointer-events: none; text-align: center; }
.aviso.mostrar { transform: translate(-50%, 0); }
.modal { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; padding: 18px; background: rgb(23 20 42 / .5); }
.modal .cartao { width: 100%; max-width: 440px; max-height: 90vh; overflow: auto; }
.modal .cartao.centro { text-align: center; }
#confete { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
#confete i { position: absolute; top: -20px; width: 12px; height: 12px; border-radius: 50%; animation: cair 2.4s ease-in forwards; }
@keyframes cair { to { transform: translateY(110vh) rotate(300deg); opacity: .2; } }

/* Respeita quem prefere menos movimento (no sistema ou no Perfil) */
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
body.menos-movimento *, body.menos-movimento *::before { animation: none !important; transition: none !important; }

/* Ajustes */
.folha-grade svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.grade-2 > .cartao + .cartao, .grade > .cartao + .cartao { margin-top: 0; }
.modal svg.lumi { width: 120px; height: 120px; display: block; margin: 0 auto 6px; }
.aviso { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Padronização e telas pequenas ---------- */
:root { --esp: 16px; --esp-g: 24px; }
body { overflow-wrap: break-word; }
h1, h2, h3 { overflow-wrap: anywhere; hyphens: auto; }
.cartao { padding: clamp(16px, 4vw, 22px); }
.secao { margin-top: var(--esp-g); }
.grade-2, .grade-n, .grade, .numeros { gap: var(--esp); }
.cartao h2 + p, .cartao h2 + .lista-recursos { margin-top: 10px; }
.numero { display: flex; flex-direction: column; justify-content: center; min-height: 84px; }
.numero span { line-height: 1.35; }
.materia .info span { display: block; line-height: 1.4; }
.inferior a, .inferior button { line-height: 1.15; text-align: center; padding: 4px 2px; }
.inferior .central { justify-content: flex-end; }
.inferior .central span.bola { margin-top: -18px; margin-bottom: 2px; }
/* Conteúdo nunca fica escondido atrás da barra inferior */
.coluna { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.modal .cartao { max-height: calc(100dvh - 36px); }
@media (max-width: 420px) {
  body { font-size: 16px; }
  .topo, main { padding-left: 16px; padding-right: 16px; }
  .ola { padding: 18px; border-radius: 14px; }
  .mascote-balao svg.lumi { width: 68px; height: 68px; }
  .balao { padding: 10px 14px; font-size: 15px; }
  .linha-btns .btn { flex-basis: 100%; }
  .numeros { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .numero { padding: 12px; min-height: 76px; }
  .numero b { font-size: 22px; }
  .numero span { font-size: 13px; }
  .inferior { padding-left: 4px; padding-right: 4px; }
  .inferior a, .inferior button { font-size: 11.5px; }
}
@media (max-width: 340px) {
  .mascote-balao { flex-direction: column; align-items: flex-start; }
  .balao::before { display: none; }
  .materia { flex-wrap: wrap; }
  .materia .acoes { width: 100%; justify-content: flex-end; }
}
@media (min-width: 600px) and (max-width: 899px) { /* tablets */
  main, .topo { max-width: 760px; }
}
@media (max-width: 420px) { .btn { padding: 0 14px; text-align: center; line-height: 1.2; } }

/* ---------- Campo de busca com lista (instituição e curso) ---------- */
.busca { position: relative; }
.busca-lista { list-style: none; margin: 6px 0 0; padding: 6px; border-radius: var(--raio-p); background: var(--cartao); border: 2px solid var(--linha); max-height: 260px; overflow-y: auto; }
.busca-lista button { display: block; width: 100%; text-align: left; min-height: 46px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; line-height: 1.3; }
.busca-lista button:hover, .busca-lista button:focus-visible { background: var(--lavanda); }
.busca-lista .manual { color: var(--roxo); font-weight: 800; border-top: 1px solid var(--linha); border-radius: 0 0 10px 10px; }
.busca-escolhido { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 50px; padding: 8px 8px 8px 14px; border-radius: var(--raio-p); background: var(--lavanda); font-weight: 800; }
.busca-escolhido button { flex: none; min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--cartao); color: var(--roxo); font-weight: 800; }
.opcoes { display: flex; flex-wrap: wrap; gap: 8px; }
.opcoes label { position: relative; }
.opcoes input { position: absolute; opacity: 0; }
.opcoes span { display: inline-flex; align-items: center; min-height: 46px; padding: 0 16px; border-radius: 10px; border: 2px solid var(--linha); background: var(--cartao); font-weight: 800; cursor: pointer; }
.opcoes input:checked + span { border-color: var(--roxo); background: var(--lavanda); color: var(--roxo); }
.opcoes input:focus-visible + span { outline: 3px solid var(--lilas); outline-offset: 2px; }
.duas-col { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.boas-vindas { max-width: 640px; margin: 0 auto; }
.passos { display: flex; gap: 6px; margin: 4px 0 18px; }
.passos i { flex: 1; height: 6px; border-radius: 9px; background: var(--lavanda); }
.passos i.on { background: var(--roxo); }
.resumo-acad { display: grid; gap: 8px; margin-top: 12px; }
.resumo-acad div { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--linha); }
.resumo-acad div span:first-child { color: var(--texto-suave); font-weight: 700; }
.resumo-acad div span:last-child { font-weight: 800; text-align: right; }
body.onboarding .inferior, body.onboarding .lateral, body.onboarding .topo .icone-btn { display: none !important; }
body.onboarding .casca { grid-template-columns: minmax(0, 1fr); }
.campo { display: block; font-weight: 800; margin: 16px 0 6px; }
.aviso:not(.mostrar) { visibility: hidden; opacity: 0; }

/* ---------- Conta ---------- */
input[type=email], input[type=password], input[type=search] { width: 100%; min-height: 50px; padding: 12px 14px; font-size: 16px; background: var(--cartao); border: 2px solid var(--linha); border-radius: var(--raio-p); }
.msg-form { margin-top: 14px; padding: 12px 14px; border-radius: 9px; font-weight: 700; }
.msg-form.erro { background: var(--pessego); color: var(--pessego-forte); }
.msg-form.ok { background: var(--menta); color: var(--menta-forte); }
.links-conta { display: grid; gap: 4px; margin-top: 14px; }
.links-conta button { min-height: 44px; border: 0; background: none; color: var(--roxo); font-weight: 800; text-align: center; }
.sinc { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 99px; }
.sinc::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.sinc.ok { background: var(--menta); color: var(--menta-forte); }
.sinc.enviando { background: var(--azul); color: var(--azul-forte); }
.sinc.offline, .sinc.erro { background: var(--pessego); color: var(--pessego-forte); }

/* ---------- Central de materiais ---------- */
.btn-grande { min-height: 58px; font-size: 18px; margin-top: 14px; }
.painel-envio { margin-top: 14px; }
.opcoes-envio { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; margin-top: 14px; }
.opcao-envio { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 112px; padding: 14px 10px; border-radius: 12px; border: 2px solid var(--linha); background: var(--cartao-2); text-align: center; color: var(--texto); cursor: pointer; }
.opcao-envio:hover, .opcao-envio:focus-within { border-color: var(--lilas); }
.opcao-envio b { font-size: 16px; line-height: 1.25; }
.opcao-envio small { color: var(--texto-suave); font-size: 13px; line-height: 1.3; }
.opcao-envio input, input.cobre { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.op-ico, .tipo-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 9px; font: 700 12px/1 var(--fonte); letter-spacing: .02em; background: var(--lavanda); color: var(--roxo); flex: none; }
.tipo-ico.pdf { background: #fde2e2; color: #b4433f; } .tipo-ico.imagem { background: var(--menta); color: var(--menta-forte); }
.tipo-ico.apresentacao { background: var(--pessego); color: var(--pessego-forte); } .tipo-ico.documento { background: var(--azul); color: var(--azul-forte); }
.soltar { margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 24px 16px; border: 2px dashed var(--lilas); border-radius: 14px; background: var(--cartao); }
.soltar.ativo { background: var(--lavanda); border-color: var(--roxo); }
.soltar-ico { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--lavanda); color: var(--roxo); font-size: 26px; }
@media (max-width: 899px) { .so-pc { display: none; } .soltar { border-style: solid; border-color: var(--linha); } }

.envio { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; padding: 12px; border-radius: 12px; background: var(--cartao-2); }
.envio-info { flex: 1 1 200px; display: grid; gap: 4px; }
.envio-info b { overflow-wrap: anywhere; line-height: 1.3; }
.envio-status { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.envio.ok .envio-status { color: var(--menta-forte); }
.envio.erro .envio-status, .envio.recusado .envio-status { color: var(--pessego-forte); }
.envio-erro { font-size: 14px; color: var(--pessego-forte); font-weight: 700; }
.envio-acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.btn.mini { min-height: 44px; padding: 0 14px; font-size: 14px; }
.girando { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--lavanda); border-top-color: var(--roxo); animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
body.menos-movimento .girando { animation: none; border-color: var(--roxo); }

.filtros { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .filtros { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); } }
.material { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 14px; border: 0; border-radius: 12px; background: var(--cartao); box-shadow: var(--sombra); color: var(--texto); }
.material:hover { outline: 2px solid var(--lavanda); }
.material-info { display: grid; gap: 4px; flex: 1; }
.material-info b { font-size: 16.5px; line-height: 1.3; overflow-wrap: anywhere; }
.material-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Janelas grandes (material, aula, quiz) ---------- */
.modal .cartao.largo { max-width: 760px; padding: 0; display: flex; flex-direction: column; }
.janela-topo { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; background: var(--cartao); border-bottom: 1px solid var(--linha); }
.janela-topo h2 { font-size: 20px; }
.janela-topo .icone-btn { box-shadow: none; background: var(--cartao-2); font-size: 18px; }
.janela-corpo { padding: 16px 18px 22px; }
.modal .cartao:not(.largo) .janela-topo { margin: -20px -20px 12px; }
.info-mat { margin-top: 8px; }
.grade-acoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 8px; margin-top: 10px; }
.acao { min-height: 52px; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--linha); background: var(--cartao-2); font-weight: 800; color: var(--roxo); line-height: 1.25; }
.acao.principal { background: var(--roxo); color: var(--roxo-texto); border-color: var(--roxo); }
.acao[disabled] { opacity: .45; cursor: not-allowed; }
.visualizador { margin-top: 8px; }
.previa-img { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 9px; }
.pdf-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 800; }
.pdf-pagina { margin-top: 10px; border-radius: 9px; overflow: hidden; border: 1px solid var(--linha); background: #fff; }
.pdf-pagina canvas { display: block; }
details.pagina { border: 1px solid var(--linha); border-radius: 9px; margin-top: 8px; background: var(--cartao); }
details.pagina summary { cursor: pointer; padding: 12px 14px; font-weight: 800; min-height: 44px; }
.texto-extraido { padding: 0 14px 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; max-height: 50vh; overflow-y: auto; }
.carregador { height: 8px; border-radius: 9px; background: var(--lavanda); overflow: hidden; margin-top: 18px; }
.carregador i { display: block; width: 40%; height: 100%; border-radius: 9px; background: var(--roxo); animation: vaivem 1.4s ease-in-out infinite; }
@keyframes vaivem { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* ---------- Aula, resumo, mapa, flashcards, quiz, chat ---------- */
.bloco { margin-top: 18px; }
.bloco h3 { margin-bottom: 8px; }
.bloco p + p { margin-top: 8px; }
.bloco.destaque { background: var(--lavanda); border-radius: 12px; padding: 14px 16px; }
.conceito { border-left: 4px solid var(--lilas); padding-left: 14px; }
.conceito .btn { margin-top: 12px; }
.exemplo { margin-top: 10px; background: var(--menta); border-radius: 9px; padding: 10px 14px; }
.outro-jeito { margin-top: 10px; background: var(--azul); border-radius: 9px; padding: 12px 14px; }
.outro-jeito p + p { margin-top: 6px; }
dl.termos { display: grid; gap: 4px 14px; grid-template-columns: minmax(0, 1fr); margin: 0; }
dl.termos dt { font-weight: 800; margin-top: 8px; }
dl.termos dd { margin: 0; color: var(--texto-suave); }
details.exercicio { border-radius: 9px; background: var(--cartao-2); margin-top: 8px; }
details.exercicio summary { padding: 12px 14px; cursor: pointer; font-weight: 700; }
details.exercicio p { padding: 0 14px 12px; }
.complementar { margin-top: 18px; border: 2px dashed var(--azul-forte); border-radius: 10px; padding: 12px 14px; }
.complementar p { margin-top: 8px; }
.mapa { margin-top: 8px; }
.mapa-centro { display: inline-block; padding: 10px 18px; border-radius: 12px; background: var(--roxo); color: var(--roxo-texto); font-weight: 800; }
.mapa ul { list-style: none; margin: 0; padding-left: 18px; border-left: 2px solid var(--linha); }
.mapa-ramos { margin-top: 10px !important; margin-left: 18px !important; }
.mapa li { margin: 8px 0; position: relative; }
.mapa li::before { content: ''; position: absolute; left: -18px; top: 22px; width: 14px; height: 2px; background: var(--linha); }
.mapa .no { display: inline-grid; gap: 2px; padding: 8px 12px; border-radius: 9px; background: color-mix(in srgb, var(--cor) 55%, var(--cartao)); color: var(--texto); }
.mapa .no small { color: var(--texto-suave); font-size: 13.5px; }
.carta { position: relative; display: grid; width: 100%; min-height: 220px; margin-top: 8px; border: 0; border-radius: 14px; background: var(--lavanda); padding: 22px; font: 600 20px/1.35 var(--fonte-titulo); color: var(--texto); place-items: center; text-align: center; }
.carta .verso { display: none; font: 700 17px/1.5 var(--fonte); }
.carta.virada { background: var(--menta); }
.carta.virada .frente { display: none; } .carta.virada .verso { display: block; }
.quiz fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.questao legend { display: grid; gap: 6px; font-weight: 800; margin-bottom: 8px; }
.questao .enunciado { font-size: 17px; line-height: 1.45; }
.alternativa { display: flex; align-items: flex-start; gap: 10px; min-height: 48px; padding: 10px 14px; margin-top: 8px; border: 2px solid var(--linha); border-radius: 10px; cursor: pointer; }
.alternativa input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--roxo); flex: none; }
.alternativa:has(input:checked) { border-color: var(--roxo); background: var(--lavanda); }
.quiz textarea { width: 100%; min-height: 110px; padding: 12px 14px; font-size: 16px; border: 2px solid var(--linha); border-radius: 10px; background: var(--cartao); }
.correcao { margin-top: 10px; padding: 12px 14px; border-radius: 9px; }
.correcao.certo { background: var(--menta); } .correcao.errado { background: var(--pessego); } .correcao.meio { background: var(--azul); }
.resultado { text-align: center; margin-top: 10px; }
.resultado svg.lumi { width: 96px; height: 96px; margin: 0 auto; display: block; }
.resultado .lista-recursos { text-align: left; }
.chat { display: flex; flex-direction: column; gap: 10px; min-height: 200px; max-height: 55vh; overflow-y: auto; padding: 4px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.eu { align-self: flex-end; background: var(--roxo); color: var(--roxo-texto); border-bottom-right-radius: 6px; }
.msg.prof { align-self: flex-start; background: var(--cartao-2); border-bottom-left-radius: 6px; }
.msg.erro { background: var(--pessego); color: var(--pessego-forte); }
.msg.pensando { color: var(--texto-suave); font-style: italic; }
.chat-envio { display: flex; gap: 8px; margin-top: 12px; }
.chat-envio input { flex: 1; }
.opcoes-envio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opcoes-envio > :last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 420px) { .opcao-envio { min-height: 100px; padding: 12px 8px; } .opcao-envio b { font-size: 15px; } }
@media (min-width: 900px) { .opcoes-envio { grid-template-columns: repeat(5, minmax(0, 1fr)); } .opcoes-envio > :last-child:nth-child(odd) { grid-column: auto; } }
.aviso-ia, .aviso-ia-envio { background: var(--azul); color: var(--texto); border-radius: 9px; padding: 10px 12px; margin-top: 10px; }
