/* Quiz dos Estúdios — visual próprio, mobile first. */
:root {
  --fundo: #1b1340; --fundo2: #2a1f63; --cartao: #ffffff; --texto: #231a4d; --suave: #6b6591;
  --coral: #ef476f; --azul: #118ab2; --ambar: #ffb703; --verde: #06d6a0; --borda: #e4e0f5;
  --raio: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--texto);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 17px; line-height: 1.45;
  background: radial-gradient(1200px 600px at 10% -10%, var(--fundo2), var(--fundo));
  display: flex; flex-direction: column;
}
.topo { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1rem; color: #fff; }
.topo a { color: #fff; text-decoration: none; font-weight: 700; }
.voltar { background: rgba(255,255,255,.14); padding: .35rem .8rem; border-radius: 999px; font-size: .9rem; }
.marca .logo { font-size: 1.3rem; }
.conteudo { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: .5rem 1rem 2rem; }
.rodape { text-align: center; color: rgba(255,255,255,.6); font-size: .85rem; padding: 1rem; }
.cartao { background: var(--cartao); border-radius: var(--raio); padding: 1.4rem; margin-bottom: 1rem; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.centro { text-align: center; }
h1 { margin: 0 0 .4rem; font-size: 1.6rem; }
h2 { margin: 0 0 .6rem; }
.dica { color: var(--suave); }
.aviso { background: #fff6dd; border-left: 5px solid var(--ambar); padding: .7rem .9rem; border-radius: 10px; text-align: left; }
.aviso.erro { background: #ffe5ec; border-color: var(--coral); }
label { display: block; text-align: left; font-weight: 700; margin: .9rem 0 .3rem; }
.campo { width: 100%; padding: .8rem 1rem; font-size: 1.2rem; border: 2px solid var(--borda); border-radius: 12px; background: #faf9ff; }
.campo:focus { outline: 3px solid var(--azul); border-color: var(--azul); }
.campo.chave { text-transform: uppercase; letter-spacing: .3em; text-align: center; font-weight: 800; }
.botao { display: inline-block; margin-top: 1rem; padding: .75rem 1.4rem; font-size: 1.05rem; font-weight: 800; color: #fff; background: var(--coral); border: 0; border-radius: 12px; cursor: pointer; box-shadow: 0 4px 0 #b8294d; }
.botao:active { transform: translateY(3px); box-shadow: 0 1px 0 #b8294d; }
.botao.grande { width: 100%; font-size: 1.2rem; padding: 1rem; }
.regras { text-align: left; margin: 1rem auto; padding-left: 1.2rem; max-width: 34rem; }
.regras li { margin: .35rem 0; }

/* jogo */
.barra-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.selo { background: var(--fundo2); color: #fff; padding: .25rem .8rem; border-radius: 999px; font-weight: 700; font-size: .9rem; }
.relogio { font-size: 2rem; font-weight: 900; min-width: 3ch; text-align: right; }
.relogio.urgente { color: var(--coral); }
.trilho { height: 10px; background: var(--borda); border-radius: 999px; overflow: hidden; margin-bottom: 1rem; }
.barra { height: 100%; width: 100%; background: linear-gradient(90deg, var(--verde), var(--ambar)); transition: width .2s linear; }
.enunciado { font-size: 1.35rem; white-space: pre-wrap; overflow-wrap: anywhere; }
pre { background: #1e1e2e; color: #f5f5ff; padding: .8rem; border-radius: 10px; overflow-x: auto; font-size: .95rem; white-space: pre; }
.imagem-questao { display: block; max-width: 100%; height: auto; margin: .5rem auto 1rem; border-radius: 12px; }
.alternativas { display: grid; gap: .7rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .alternativas { grid-template-columns: 1fr 1fr; } }
.alt { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 4.2rem; padding: .8rem 1rem; text-align: left; font-size: 1.1rem; font-weight: 700; color: #fff; border: 4px solid transparent; border-radius: 14px; cursor: pointer; }
.alt .forma { font-size: 1.6rem; }
.alt .texto { overflow-wrap: anywhere; }
.alt0 { background: var(--coral); } .alt1 { background: var(--azul); }
.alt2 { background: #d99500; } .alt3 { background: #079f78; }
.alt.marcada { border-color: var(--fundo); box-shadow: 0 0 0 4px #fff inset; transform: scale(1.02); }

/* resultado */
.nota-grande { font-size: 4.5rem; font-weight: 900; color: var(--coral); margin: .3rem 0; }
.placar { display: flex; gap: .6rem; justify-content: center; margin: .6rem 0; }
.placar .p { flex: 1; max-width: 9rem; border-radius: 14px; padding: .6rem; color: #fff; }
.placar strong { display: block; font-size: 1.8rem; }
.placar .ok { background: #079f78; } .placar .ruim { background: var(--coral); } .placar .neutro { background: #8a84b5; }
.item { border-left: 6px solid var(--borda); padding: .4rem .9rem; margin: .8rem 0; border-radius: 6px; background: #faf9ff; break-inside: avoid; }
.item.acertou { border-color: var(--verde); } .item.errou { border-color: var(--coral); } .item.branco { border-color: #8a84b5; }
.item h3 { margin: .2rem 0; } .item small { color: var(--suave); font-weight: 400; margin-left: .4rem; }
.texto-pergunta { white-space: pre-wrap; overflow-wrap: anywhere; }

/* impressão (relatório em PDF pelo navegador) */
.print-only { display: none; }
@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  .no-print { display: none !important; }
  .print-only { display: block; }
  .cartao { box-shadow: none; border: 1px solid #ccc; }
  .conteudo { max-width: none; padding: 0; }
  a { color: #000; text-decoration: none; }
}

/* painel do professor */
.conteudo.largo { max-width: 1000px; }
.estreito { max-width: 460px; margin-left: auto; margin-right: auto; }
.menu { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1rem .6rem; max-width: 1000px; margin: 0 auto; width: 100%; }
.menu a, .menu .link { color: #fff; text-decoration: none; font-weight: 700; padding: .45rem .9rem; border-radius: 999px; background: rgba(255,255,255,.12); border: 0; font-size: 1rem; cursor: pointer; font-family: inherit; }
.menu a.ativo { background: var(--coral); }
.menu .sair { margin-left: auto; }
.aviso.bom { background: #dcfbf1; border-color: var(--verde); }
.linha-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.linha-form .campo { flex: 1 1 12rem; width: auto; }
.campo.pequeno { font-size: 1rem; padding: .5rem .7rem; }
textarea.campo { font-family: ui-monospace, Consolas, monospace; font-size: 1rem; }
.botao.pequeno { margin: 0; padding: .45rem .8rem; font-size: .9rem; box-shadow: none; }
.botao.claro { background: var(--azul); }
.botao.perigo { background: #b8294d; }
.tabela-rolagem { overflow-x: auto; }
.tabela { width: 100%; border-collapse: collapse; }
.tabela th, .tabela td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--borda); vertical-align: middle; }
.tabela th { color: var(--suave); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.acoes { display: flex; gap: .4rem; flex-wrap: wrap; }
.acoes form { margin: 0; }
.grade-cartoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .8rem; margin-top: 1rem; }
.mini { display: block; text-align: center; padding: 1rem; border-radius: 14px; background: #f1eeff; color: var(--texto); text-decoration: none; }
.mini strong { display: block; font-size: 2rem; color: var(--coral); }
code { background: #f1eeff; padding: .1rem .35rem; border-radius: 6px; }

/* questões, quizzes e relatório */
.cabeca { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.cabeca .botao { margin: 0; text-decoration: none; }
a.botao { text-decoration: none; }
.filtros { margin-top: .6rem; }
label.inline { display: inline-flex; gap: .4rem; align-items: center; font-weight: 400; margin: 0; }
.etiqueta { display: inline-block; background: #e9e4ff; color: var(--fundo2); padding: .1rem .6rem; border-radius: 999px; font-size: .85rem; font-weight: 700; }
select.campo { appearance: auto; }
.duas-colunas { display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .duas-colunas { grid-template-columns: 1fr 1fr; } }
.alt-linha { display: flex; gap: .6rem; align-items: center; margin: .4rem 0; }
.alt-linha input[type=radio] { width: 1.5rem; height: 1.5rem; accent-color: var(--verde); flex: none; }
.separado { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--borda); }
.lista-alt { list-style: none; padding: 0; }
.lista-alt li { padding: .3rem 0; }
.lista-escolha { list-style: none; padding: 0; margin: .5rem 0; }
.lista-escolha li { display: flex; gap: .6rem; align-items: center; border-bottom: 1px solid var(--borda); padding: .5rem 0; }
.escolha { display: flex; gap: .7rem; align-items: flex-start; flex: 1; margin: 0; font-weight: 400; cursor: pointer; }
.escolha input { width: 1.4rem; height: 1.4rem; margin-top: .2rem; flex: none; }
.campo.ordem { width: 5rem; flex: none; text-align: center; }
.ativo-filtro { font-weight: 800; color: var(--coral); }
.chave-destaque { display: inline-block; font-size: 3rem; font-weight: 900; letter-spacing: .25em; padding: .4rem 1.2rem; margin: .3rem 0 .8rem; background: var(--fundo); color: var(--ambar); border-radius: 16px; font-family: ui-monospace, Consolas, monospace; }
code.chave { font-weight: 800; letter-spacing: .15em; }
.centralizado { justify-content: center; }
.lista-perguntas { padding-left: 1.4rem; }
.lista-perguntas li { margin: .4rem 0; }
.barra-acoes { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .6rem; }
.barra-acoes a { color: #fff; }
.barra-perc { width: 8rem; height: 1rem; vertical-align: middle; }
.tabela.compacta th, .tabela.compacta td { padding: .4rem .45rem; font-size: .95rem; }
.relatorio-cabeca h1 { margin-bottom: .2rem; }

@media print {
  @page { size: A4; margin: 14mm; }
  .menu, .topo, .rodape, .barra-acoes { display: none !important; }
  body.relatorio { font-size: 10.5pt; }
  body.relatorio .cartao { border: 0; padding: .3rem 0; margin-bottom: .8rem; break-inside: avoid-page; }
  body.relatorio .tabela-rolagem { overflow: visible; }
  body.relatorio .tabela tr { break-inside: avoid; }
  body.relatorio .placar .p { color: #000; background: #fff !important; border: 1px solid #999; }
  .tabela th { color: #000; }
}

/* instalador */
.estreito-largo { max-width: 640px; margin-left: auto; margin-right: auto; }
.requisitos { list-style: none; padding: 0; }
.requisitos li { padding: .3rem 0; }
h3 { margin: 1.2rem 0 0; }
