:root {
  --bg: #FBF8F1; --card: #FFFDF8; --surface: #F4EFE6; --borda: #E2D9C8;
  --texto: #2B2B2B; --suave: #5C564E; --mudo: #786F64;
  --verde: #1F4A39; --verde2: #2F6B51; --verdeClaro: #E3ECE5;
  --terra: #B8472F; --terraClaro: #F6E3DC; --ouro: #C79A3B;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--texto); font-family: Inter, system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; }
button, input { font: inherit; }


/* impede selecionar, copiar, arrastar e o menu de toque longo */
.travado, .travado * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.travado input { -webkit-user-select: text; user-select: text; }
@media print { body * { display: none !important; } body::after { content: 'Impressão desativada.'; } }

.pagina { max-width: 680px; margin: 0 auto; padding: 24px 18px 120px; }
.marca-topo { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.selo { width: 52px; height: 40px; border-radius: 9px; background: var(--verde); color: var(--bg); display: flex; align-items: center; justify-content: center; }
.selo svg { width: 22px; height: 22px; }
.selo-nome { font-family: Cormorant, serif; font-weight: 700; color: var(--verde); font-size: 22px; line-height: .95; }
.friso { height: 12px; margin: 10px 0 22px; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='12'><path d='M0 11.3H16M.7 11.3V.7H11.3V8H4.7V4.3H8' fill='none' stroke='%231F4A39' stroke-width='1.4' opacity='.55'/></svg>") repeat-x; }

h1 { font-family: Cormorant, serif; font-weight: 700; color: var(--verde); font-size: 38px; line-height: 1.05; margin: 0; }
.linha-fina { color: var(--suave); margin: 8px 0 0; line-height: 1.45; }
.cartao { background: var(--card); border: 1px solid var(--borda); border-radius: 18px; padding: 20px; }
.cartao + .cartao { margin-top: 14px; }
.rotulo { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--mudo); }
.lista { margin: 10px 0 0; padding-left: 20px; color: var(--suave); line-height: 1.55; }
.lista strong { color: var(--texto); }

.campo { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.campo label { font-size: 14px; font-weight: 600; }
.campo input { height: 50px; border-radius: 12px; border: 1px solid var(--borda); background: #fff; padding: 0 14px; font-size: 16px; color: var(--texto); }
.campo input:focus { outline: 2px solid var(--verde2); border-color: transparent; }
.dica { font-size: 13px; color: var(--mudo); }
.erro { color: var(--terra); font-size: 14px; font-weight: 600; margin-top: 12px; min-height: 1em; }

.botao { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--verde); color: var(--bg); font-weight: 600; font-size: 17px; cursor: pointer; }
.botao:disabled { opacity: .45; cursor: default; }
.botao.largo { width: 100%; margin-top: 18px; }
.botao.claro { background: transparent; color: var(--verde); border: 1.5px solid var(--verde); }
.botao.terra { background: var(--terra); }
.link { background: none; border: 0; color: var(--verde); font-weight: 600; text-decoration: underline; cursor: pointer; padding: 8px 4px; font-size: 15px; }

/* barra do topo da prova */
.topo { position: sticky; top: 0; z-index: 5; background: rgba(251, 248, 241, .96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--borda); }
.topo-dentro { max-width: 680px; margin: 0 auto; padding: 12px 18px; display: flex; flex-direction: column; gap: 8px; }
.topo-linha { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--suave); }
.topo-linha strong { color: var(--texto); }
.trilho { height: 6px; border-radius: 3px; background: #E9E2D5; overflow: hidden; }
.trilho > div { height: 100%; background: var(--verde2); transition: width .3s; }

.parte { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--terra); margin: 22px 0 8px; }
.enunciado { font-size: 19px; line-height: 1.5; margin: 0 0 18px; }
.num { font-family: Cormorant, serif; font-weight: 700; color: var(--verde); font-size: 30px; margin-right: 4px; }
.alternativas { display: flex; flex-direction: column; gap: 10px; }
.alt { display: flex; align-items: flex-start; gap: 14px; width: 100%; text-align: left; padding: 15px 16px; min-height: 60px; border-radius: 16px; border: 1.5px solid var(--borda); background: var(--card); color: var(--texto); font-size: 16px; line-height: 1.4; cursor: pointer; transition: border-color .15s, background .15s; }
.alt:hover { border-color: var(--verde2); }
.alt .letra { flex: 0 0 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--borda); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--suave); }
.alt.marcada { border-color: var(--verde); background: var(--verdeClaro); }
.alt.marcada .letra { background: var(--verde); border-color: var(--verde); color: #fff; }

.rodape { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(251, 248, 241, .97); border-top: 1px solid var(--borda); padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); z-index: 5; }
.rodape-dentro { max-width: 680px; margin: 0 auto; display: flex; gap: 10px; }
.rodape .botao { flex: 1; padding: 0 12px; }

.mapa { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; margin-top: 22px; }
.bolha { aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--borda); background: var(--card); color: var(--suave); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }
.bolha.feita { background: var(--verdeClaro); border-color: var(--verde2); color: var(--verde); }
.bolha.atual { outline: 2px solid var(--verde); outline-offset: 1px; }

.revisao { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.rev { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--borda); background: var(--card); cursor: pointer; font-size: 15px; color: var(--texto); }
.rev .resp { font-weight: 700; color: var(--verde); }
.rev.vazia { border-color: var(--terra); background: var(--terraClaro); }
.rev.vazia .resp { color: var(--terra); }

.nota { font-family: Cormorant, serif; font-weight: 700; font-size: 88px; line-height: 1; color: var(--verde); margin: 10px 0 0; }
.nota small { font-size: 34px; color: var(--mudo); }
.situacao { display: inline-block; margin-top: 12px; padding: 8px 18px; border-radius: 999px; font-weight: 700; }
.situacao.ok { background: var(--verdeClaro); color: var(--verde); }
.situacao.nao { background: var(--terraClaro); color: var(--terra); }
.centro { text-align: center; }

/* marca d'água com o nome do aluno: desencoraja print e fotos */
#marca { position: fixed; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; opacity: .07; }
#marca span { position: absolute; white-space: nowrap; font-size: 15px; font-weight: 700; color: #000; transform: rotate(-24deg); }

#cortina { position: fixed; inset: 0; z-index: 40; background: rgba(31, 74, 57, .97); display: flex; align-items: center; justify-content: center; padding: 24px; }
#cortina[hidden] { display: none; }
.cortina-caixa { max-width: 420px; background: var(--bg); border-radius: 20px; padding: 26px; text-align: center; }
.cortina-titulo { font-family: Cormorant, serif; font-weight: 700; font-size: 28px; color: var(--verde); }
.cortina-caixa p { color: var(--suave); line-height: 1.5; }
.cortina-conta { font-weight: 700; color: var(--terra) !important; }

.modal-fundo { position: fixed; inset: 0; z-index: 30; background: rgba(20, 30, 25, .45); display: flex; align-items: flex-end; justify-content: center; }
.modal { width: 100%; max-width: 520px; background: var(--bg); border-radius: 22px 22px 0 0; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); }
@media (min-width: 640px) { .modal-fundo { align-items: center; } .modal { border-radius: 22px; } }
.modal h2 { font-family: Cormorant, serif; color: var(--verde); font-size: 30px; margin: 0 0 8px; }
.modal p { color: var(--suave); line-height: 1.5; margin: 0 0 6px; }
.modal .acoes { display: flex; gap: 10px; margin-top: 18px; }
.modal .acoes .botao { flex: 1; }

/* afirmações / itens que vêm antes das alternativas */
.itens { list-style: none; margin: -4px 0 20px; padding: 14px 16px; border-radius: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; font-size: 16px; line-height: 1.45; color: var(--texto); }
.mapa.curto { grid-template-columns: repeat(10, minmax(0, 1fr)); }

/* lista de provas na página inicial */
.nivel { font-family: Cormorant, serif; font-weight: 700; color: var(--verde); font-size: 28px; margin: 30px 0 4px; }
.provas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
@media (max-width: 560px) { .provas { grid-template-columns: 1fr; } }
.prova-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--borda); background: var(--card); color: var(--texto); text-decoration: none; transition: border-color .15s; }
.prova-card:hover { border-color: var(--verde2); }
.prova-card strong { font-size: 16px; }
.prova-card span { font-size: 13px; color: var(--mudo); }
