/* Tipos de letra alojados aqui (a política de segurança só deixa carregar de 'self'). Licenças em public/fonts/LICENCAS.txt. */
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/atkinson-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/atkinson-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/atkinson-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/atkinson-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: Lexend; src: url("/fonts/lexend-latin.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2"); font-weight: 500 700; font-style: normal; font-display: swap; }
:root {
  color-scheme: light dark;
  /* Sistema de desenho TIC (2.186.0): marca neutra (marinho e ciano do ícone), cores só para ano e tema. */
  --dark: #0b2540; --accent: #0b2540; --light: #e3ebf1; --input: #ffffff;
  --texto: #0f1f2e; --suave: #4b5b68; --erro: #b3261e; --ok: #1b7a4a; --aviso: #e09f1f; --aviso-txt: #7a4b00;
  --titulo: #0b2540; --erro-txt: #b3261e; --ok-txt: #1b7a4a;
  --fundo: #f4f7f9; --papel: #ffffff; --borda: #d5dee5; --borda-in: #7b8a96; --borda-tab: #cfd9e1;
  --trilho: #e3eaef; --desativado: #eef2f5; --desativado-txt: #4b5b68; --btn-off: #d5dee5;
  --ok-bg: #e3f6ee; --erro-bg: #fdecea; --aviso-bg: #fff4d6; --vf-bg: #eef2f7; --item-bg: #f4f7f9;
  --ponto: #cfd9e1; --linha-tab: #e3eaef; --foco: #0b5fa5;
  --on-color: #ffffff; --on-accent: var(--on-color); --texto-2: var(--suave); --muted: var(--suave);
  --hero-bg: #0b2540; --on-hero: #ffffff; --on-hero-soft: #c4d4e3; --hero-accent: #7dd3fc; --hero-caixa: rgba(255,255,255,.1);
  --xp: #b45f06; --xp-tint: #fbeedd;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Atkinson Hyperlegible", system-ui, "Segoe UI", Roboto, sans-serif; font-size: 17px; line-height: 1.4; color: var(--texto); background: var(--fundo); }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.15; color: var(--titulo); font-family: Lexend, "Atkinson Hyperlegible", system-ui, "Segoe UI", sans-serif; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; }
.escondido { display: none !important; }

/* ---------- entrada ---------- */
.entrada { max-width: 520px; margin: 0 auto; padding: 20px 16px 40px; }
.entrada img.logo { height: 64px; margin: 4px 0 14px; display: block; }
.banner { background: var(--hero-bg); color: var(--on-hero); border-radius: 14px; padding: 18px 20px; }
.banner .k { font-size: 13px; font-weight: bold; letter-spacing: .08em; opacity: .9; }
.banner h1 { color: #fff; font-size: 28px; margin: 4px 0; }
.banner p { margin: 0; font-style: italic; opacity: .95; }
.cartao { background: var(--papel); border: 1px solid var(--borda); border-radius: 14px; padding: 16px; margin-top: 14px; }
.cartao label { display: block; font-weight: bold; color: var(--titulo); margin: 10px 0 4px; }
.cartao input, .cartao select { width: 100%; padding: 11px 12px; border: 2px solid var(--borda-in); border-radius: 10px; background: var(--input); }
.cartao input:focus, .cartao select:focus, textarea:focus, .conceito input:focus { outline: 3px solid var(--foco); border-color: var(--accent); }
.duas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nota { font-size: 14px; color: var(--suave); margin-top: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent); color: var(--on-color); border: 0; border-radius: 10px; padding: 12px 18px; font-weight: bold; cursor: pointer; }
.btn:hover:not(:disabled) { background: var(--dark); }
.btn:disabled { background: var(--btn-off); color: var(--suave); cursor: not-allowed; }
.btn.sec:hover:not(:disabled) { background: var(--light); }
.btn.grande { width: 100%; margin-top: 16px; font-size: 18px; padding: 14px; }
.btn.sec { background: var(--papel); color: var(--titulo); border: 2px solid var(--accent); }
.erro { color: var(--erro-txt); font-weight: bold; margin-top: 10px; min-height: 1.2em; }

/* ---------- aplicação ---------- */
.topo { position: sticky; top: 0; z-index: 5; background: var(--papel); border-bottom: 3px solid var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.topo-in { max-width: 920px; margin: 0 auto; padding: 8px 14px; display: grid; grid-template-columns: auto minmax(200px, 1fr) minmax(0, auto); gap: 14px; align-items: center; }
.topo img { height: 42px; }
.xp-bloco { min-width: 0; }
.xp-linha { flex-wrap: wrap; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; color: var(--suave); }
.xp-linha b { white-space: nowrap; color: var(--titulo); font-size: 17px; }
.nivel { background: var(--light); color: var(--titulo); border-radius: 20px; padding: 1px 10px; font-weight: bold; font-size: 14px; }
.barra { height: 12px; background: var(--trilho); border-radius: 8px; overflow: hidden; margin-top: 3px; }
.barra > div { height: 100%; background: var(--xp); border-radius: 8px; transition: width .5s ease; }
.quem { font-size: 14px; color: var(--suave); text-align: right; display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.estado { font-size: 13px; }
.estado.ok { color: var(--ok-txt); }

.etapas { max-width: 920px; margin: 12px auto 0; padding: 0 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tab { background: var(--papel); border: 2px solid var(--borda-tab); border-radius: 12px; padding: 8px 6px; text-align: center; cursor: pointer; color: var(--titulo); font-weight: bold; }
.tab small { display: block; font-weight: normal; color: var(--suave); font-size: 13px; }
.tab.atual { background: var(--accent); border-color: var(--accent); color: var(--on-color); }
.tab.atual small { color: #e3f6ee; }
.tab.feita { border-color: var(--ok); }
.tab.feita b::after { content: " ✓"; }

main { max-width: 920px; margin: 0 auto; padding: 14px 14px 60px; }
.sub { color: var(--suave); margin: 0 0 12px; }
.aviso-fechada { background: var(--aviso-bg); border: 2px solid var(--aviso); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-weight: bold; }

.pergunta { background: var(--papel); border: 1px solid var(--borda); border-left: 8px solid var(--cor); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.pergunta h3 { font-size: 20px; color: var(--texto); }
.pista { color: var(--suave); font-style: italic; font-size: 15px; margin: 0 0 8px; }
textarea { width: 100%; min-height: 110px; padding: 10px 12px; border: 2px solid var(--borda-in); border-radius: 10px; background: var(--input); resize: vertical; }
textarea:disabled, input:disabled, select:disabled { background: var(--desativado); color: var(--desativado-txt); }
.contador { font-size: 14px; margin-top: 4px; color: var(--suave); }
.contador.ok { color: var(--ok-txt); font-weight: bold; }

.conceito { background: var(--papel); border: 2px solid var(--cor); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.conceito > .cab { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; background: var(--luz); border: 0; cursor: pointer; text-align: left; }
.conceito .num { background: var(--cor); color: var(--on-color); border-radius: 8px; min-width: 30px; text-align: center; padding: 1px 6px; font-weight: bold; }
.conceito .nome { font-weight: bold; font-size: 20px; color: var(--cor-txt, var(--cor)); flex: 1; }
.conceito .sel { font-size: 14px; color: var(--suave); }
.conceito .corpo { padding: 12px 14px 14px; display: none; }
.conceito.aberta .corpo { display: block; }
.conceito.aberta .cab .seta { transform: rotate(90deg); }
.conceito .seta { transition: transform .15s; color: var(--cor); }
.conceito label { font-weight: bold; display: block; margin: 10px 0 4px; }
.conceito input { width: 100%; padding: 9px 12px; border: 2px solid var(--borda-in); border-radius: 10px; background: var(--input); }
.vf { background: var(--vf-bg); border: 2px dashed #7b4fa6; border-radius: 12px; padding: 12px; margin-top: 12px; }
.vf p { font-weight: bold; margin: 0 0 8px; }
.vf .opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.resultado { border-radius: 12px; padding: 12px; margin-top: 12px; }
.resultado.certo { background: var(--ok-bg); border: 2px solid var(--ok); }
.resultado.quase { background: var(--aviso-bg); border: 2px solid var(--aviso); }
.resultado h4 { margin: 0 0 4px; font-size: 19px; }
.modelo { background: var(--papel); border: 1px solid var(--borda-tab); border-radius: 10px; padding: 8px 12px; margin-top: 8px; font-size: 16px; }
.modelo b { color: var(--titulo); }
.fechado-nota { font-size: 14px; color: var(--suave); margin-top: 6px; }

.url-bloco { background: var(--papel); border: 1px solid var(--borda); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.segs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.seg { flex: 1 1 150px; min-width: 140px; border: 2px solid var(--borda-tab); border-radius: 12px; padding: 8px; background: var(--input); }
.seg code { display: block; font-family: "JetBrains Mono", Consolas, "DejaVu Sans Mono", monospace; font-size: 19px; font-weight: bold; color: var(--titulo); word-break: break-all; margin-bottom: 6px; }
.seg select { width: 100%; padding: 8px; border: 2px solid var(--borda-in); border-radius: 8px; }
.seg.certo { border-color: var(--ok); background: var(--ok-bg); }
.seg.errado { border-color: var(--erro); background: var(--erro-bg); }
.seg .fb { font-size: 14px; min-height: 1.3em; margin-top: 4px; }

.fonte { display: grid; grid-template-columns: 1fr 1.6fr 110px; gap: 8px; margin-bottom: 8px; }
.fonte input { padding: 9px 12px; border: 2px solid var(--borda-in); border-radius: 10px; background: var(--input); width: 100%; }
.fonte .data { background: var(--desativado); text-align: center; color: var(--desativado-txt); }
.cab-fonte { font-weight: bold; color: var(--titulo); font-size: 14px; display: grid; grid-template-columns: 1fr 1.6fr 110px; gap: 8px; margin-bottom: 4px; }
.painel-entrega { background: var(--dark); color: #fff; border-radius: 14px; padding: 16px; margin-top: 18px; }
.painel-entrega h3 { color: #fff; }
.painel-entrega ul { list-style: none; padding: 0; margin: 8px 0 12px; }
.painel-entrega li { padding: 2px 0; }
.painel-entrega .btn { background: #fff; color: #135c49; }
.painel-entrega .btn:hover:not(:disabled) { background: #dff5ec; }
.entregue { background: var(--ok-bg); border: 2px solid var(--ok); color: var(--titulo); border-radius: 12px; padding: 10px 14px; margin-top: 10px; font-weight: bold; }

.aviso { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(30px); background: #333; color: #fff; padding: 10px 16px; border-radius: 12px; opacity: 0; transition: all .25s; max-width: 90%; z-index: 20; pointer-events: none; text-align: center; }
.aviso.ver { opacity: 1; transform: translateX(-50%); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .topo-in { grid-template-columns: auto 1fr; }
  .quem { grid-column: 1 / -1; text-align: left; display: flex; justify-content: space-between; }
  .etapas { grid-template-columns: repeat(2, 1fr); }
  .fonte, .cab-fonte { grid-template-columns: 1fr; }
  .cab-fonte { display: none; }
  .banner h1 { font-size: 24px; }
}

/* ---------- painel do professor ---------- */
.prof { max-width: 1100px; margin: 0 auto; padding: 14px; }
.prof header { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.prof header img { height: 48px; }
.prof h1 { font-size: 24px; margin: 0; }
.grelha-prof { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: 14px; }
.caixa { background: var(--papel); border: 1px solid var(--borda); border-radius: 12px; padding: 12px; }
.caixa h3 { font-size: 16px; margin-bottom: 6px; }
.codigo { font-family: "JetBrains Mono", Consolas, "DejaVu Sans Mono", monospace; font-size: 38px; letter-spacing: .12em; font-weight: bold; color: var(--titulo); background: var(--light); border-radius: 10px; text-align: center; padding: 4px 0; }
.caixa .linha { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.caixa input[type=text] { flex: 1; min-width: 100px; padding: 8px 10px; border: 2px solid var(--borda-in); border-radius: 8px; }
.btn.peq { padding: 7px 12px; font-size: 15px; }
.btn.perigo { background: var(--erro); }
.interruptor { display: flex; align-items: center; gap: 8px; margin: 6px 0; cursor: pointer; }
.interruptor input { width: 20px; height: 20px; }
table.alunos { width: 100%; border-collapse: collapse; background: var(--papel); border-radius: 12px; overflow: hidden; font-size: 15px; }
table.alunos th { background: var(--accent); color: var(--on-color); text-align: left; padding: 8px 10px; position: sticky; top: 0; }
table.alunos td { padding: 7px 10px; border-bottom: 1px solid var(--linha-tab); }
table.alunos tr.linha { cursor: pointer; }
table.alunos tr.linha:hover td { background: var(--light); }
.pontos { display: inline-flex; gap: 4px; }
.pontos i { width: 14px; height: 14px; border-radius: 50%; background: var(--ponto); display: inline-block; }
.pontos i.f { background: var(--ok); }
.mini-barra { width: 110px; height: 10px; background: var(--trilho); border-radius: 6px; overflow: hidden; display: inline-block; vertical-align: middle; }
.mini-barra > div { height: 100%; background: var(--accent); }
.etq { border-radius: 10px; padding: 1px 8px; font-size: 13px; font-weight: bold; }
.etq.col { background: var(--erro-bg); color: var(--erro-txt); }
.etq.ent { background: var(--ok-bg); color: var(--titulo); }
/* Etiqueta de comentário do professor ao lado do nome, em Resultados: bem visível quando o aluno ainda não o leu. */
.etq.com-etq { margin-left: 8px; white-space: nowrap; }
/* Selo «Apoio» (2.259.0): programação com apoio, só nas páginas do professor. */
.etq.apoio-etq { margin-left: 6px; white-space: nowrap; display: inline-block; background: var(--input); color: var(--texto); border: 1px dashed var(--borda-tab); font-weight: 600; text-decoration: none; vertical-align: middle; }
a.etq.apoio-etq:hover, a.etq.apoio-etq:focus-visible { border-style: solid; text-decoration: underline; }
.etq.com-etq.com-novo { background: var(--accent); color: var(--on-color); border: 1px solid var(--accent); }
.com-linha { margin-top: 4px; color: var(--texto); font-size: 14px; white-space: normal; }
.etq.com-etq.com-lido { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok); }
.modal-fundo { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-start; justify-content: center; padding: 20px 10px; overflow: auto; z-index: 30; }
.modal { background: var(--papel); border: 1px solid var(--borda-in); border-radius: 14px; max-width: 820px; width: 100%; padding: 16px 18px; }
.modal h2 { margin-bottom: 4px; }
.modal .item { border-left: 5px solid var(--accent); background: var(--item-bg); border-radius: 0 10px 10px 0; padding: 6px 10px; margin: 8px 0; }
.modal .item b { color: var(--titulo); }
.modal .item .txt { white-space: pre-wrap; word-break: break-word; }
.modal .item.vazio .txt { color: var(--suave); font-style: italic; }
.col-flag { color: var(--erro-txt); font-weight: bold; font-size: 14px; }

/* ---------- plataforma ---------- */
.pagina { max-width: 920px; margin: 0 auto; padding: 14px; }
.cab-pag { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cab-pag img { height: 48px; }
a.btn { text-decoration: none; }
.ativs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
a.ativ { display: block; background: var(--papel); border: 2px solid var(--accent); border-radius: 14px; padding: 14px; color: var(--texto); text-decoration: none; }
a.ativ:hover { background: var(--light); }
a.ativ .k { font-size: 13px; font-weight: bold; letter-spacing: .06em; color: var(--titulo); }
a.ativ h3 { margin: 4px 0; font-size: 22px; }
a.ativ p { margin: 0 0 8px; color: var(--suave); font-size: 15px; }
.codigo.peq { font-size: 28px; }
.admin-sec { background: var(--papel); border: 1px solid var(--borda); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.admin-sec h2 { font-size: 20px; }
.admin-sec textarea { min-height: 150px; font-family: "JetBrains Mono", Consolas, "DejaVu Sans Mono", monospace; font-size: 15px; }
.admin-sec select, .admin-sec input[type=text] { padding: 8px 10px; border: 2px solid var(--borda-in); border-radius: 8px; background: var(--input); }
.linha-a { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.tabs-turma { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.tabs-turma .btn.sec.sel { background: var(--accent); color: var(--on-color); }
.resultado-lista { background: var(--input); border: 1px solid var(--borda-tab); border-radius: 10px; padding: 10px 12px; margin-top: 10px; font-size: 15px; }
.resultado-lista .mal { color: var(--erro-txt); }
table.alunos td.sem { color: var(--suave); font-style: italic; }
.item .acoes { margin-top: 6px; }

/* ---------- tema escuro ---------- */
input, textarea, select { color: var(--texto); }
.linha-tema { display: flex; justify-content: flex-end; margin-bottom: 8px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  color-scheme: dark;
  --dark: #12304f; --accent: #7dd3fc; --light: #1b2733; --input: #0e151c;
  --texto: #e8eff5; --suave: #9fb1c0; --erro: #ff8f80; --ok: #5cc7a5; --aviso: #8a6a14; --aviso-txt: #f5c76a;
  --titulo: #bcdcf5; --erro-txt: #ff8f80; --ok-txt: #5cc7a5;
  --fundo: #0b1118; --papel: #121b24; --borda: #243342; --borda-in: #5c7184; --borda-tab: #2d3e4e;
  --trilho: #243342; --desativado: #162029; --desativado-txt: #9fb1c0; --btn-off: #2a394a;
  --ok-bg: #0d2b22; --erro-bg: #2e1513; --aviso-bg: #2b230d; --vf-bg: #1a2230; --item-bg: #0f1820;
  --ponto: #34465a; --linha-tab: #1b2733; --foco: #7dd3fc;
  --on-color: #0b1118; --on-accent: var(--on-color); --texto-2: var(--suave); --muted: var(--suave);
  --hero-bg: #12304f; --on-hero: #e8eff5; --on-hero-soft: #b5c9db; --hero-accent: #7dd3fc; --hero-caixa: rgba(255,255,255,.1);
  --xp: #f5b73b; --xp-tint: #3a2d12;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --dark: #12304f; --accent: #7dd3fc; --light: #1b2733; --input: #0e151c;
  --texto: #e8eff5; --suave: #9fb1c0; --erro: #ff8f80; --ok: #5cc7a5; --aviso: #8a6a14; --aviso-txt: #f5c76a;
  --titulo: #bcdcf5; --erro-txt: #ff8f80; --ok-txt: #5cc7a5;
  --fundo: #0b1118; --papel: #121b24; --borda: #243342; --borda-in: #5c7184; --borda-tab: #2d3e4e;
  --trilho: #243342; --desativado: #162029; --desativado-txt: #9fb1c0; --btn-off: #2a394a;
  --ok-bg: #0d2b22; --erro-bg: #2e1513; --aviso-bg: #2b230d; --vf-bg: #1a2230; --item-bg: #0f1820;
  --ponto: #34465a; --linha-tab: #1b2733; --foco: #7dd3fc;
  --on-color: #0b1118; --on-accent: var(--on-color); --texto-2: var(--suave); --muted: var(--suave);
  --hero-bg: #12304f; --on-hero: #e8eff5; --on-hero-soft: #b5c9db; --hero-accent: #7dd3fc; --hero-caixa: rgba(255,255,255,.1);
  --xp: #f5b73b; --xp-tint: #3a2d12;
}
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .conceito > .cab { background: color-mix(in srgb, var(--cor) 22%, var(--papel)); }
  :root:not([data-theme="light"]) .conceito .nome { --cor-txt: color-mix(in srgb, var(--cor) 55%, #fff); }
  :root:not([data-theme="light"]) img[src$="logo.png"] { background: #fff; border-radius: 8px; padding: 3px 6px; }
  :root:not([data-theme="light"]) .aviso { border: 1px solid var(--borda-in); }
}
:root[data-theme="dark"] .conceito > .cab { background: color-mix(in srgb, var(--cor) 22%, var(--papel)); }
:root[data-theme="dark"] .conceito .nome { --cor-txt: color-mix(in srgb, var(--cor) 55%, #fff); }
:root[data-theme="dark"] img[src$="logo.png"] { background: #fff; border-radius: 8px; padding: 3px 6px; }
:root[data-theme="dark"] .aviso { border: 1px solid var(--borda-in); }

/* importação de alunos */
.importar { border: 1px dashed var(--borda-tab); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.importar .map { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.importar select, .importar input[type="text"] { padding: 6px 8px; border: 2px solid var(--borda-in); border-radius: 8px; background: var(--input); color: inherit; max-width: 100%; }
.importar .previa { font-family: "JetBrains Mono", Consolas, "DejaVu Sans Mono", monospace; font-size: 14px; background: var(--input); border: 1px solid var(--borda-tab); border-radius: 8px; padding: 8px 10px; margin: 8px 0; white-space: pre-wrap; }
.importar .mal { color: var(--erro); font-weight: bold; }
.importar.sobre { border-style: solid; border-color: var(--accent); background: var(--light); }

/* aparência e atividades editáveis */
.banner-aluno { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; margin: 0 0 14px; }
.msg-aluno { font-size: 18px; margin: 0 0 16px; white-space: pre-line; }
.ativ .capa { display: block; width: 100%; height: 130px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; }
.ativ.destaque { border-width: 2px; border-color: var(--accent); }
.lista-ativ { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--borda-tab); }
.lista-ativ .info { flex: 1 1 260px; min-width: 0; }
.lista-ativ .acoes, .cab-ed .acoes { display: flex; gap: 6px; flex-wrap: wrap; }
.capa-mini { width: 72px; height: 48px; border-radius: 8px; background: var(--input); border: 1px solid var(--borda-tab); overflow: hidden; flex: none; }
.capa-mini img, .img-mini { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-mini { width: 120px; height: 60px; border-radius: 8px; }
.etqs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.etq { background: var(--input); border: 1px solid var(--borda-tab); }
.campo { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.campo .rot { font-weight: bold; font-size: 15px; }
.campo input[type="text"], .campo input[type="number"], .campo select { padding: 8px 10px; border: 2px solid var(--borda-in); border-radius: 8px; background: var(--input); color: inherit; max-width: 100%; }
.campo textarea { min-height: 80px; font-family: inherit; }
.bloco-ed { border: 1px solid var(--borda-tab); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.bloco-ed summary { cursor: pointer; }
.cab-ed { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.img-sel { border: 1px dashed var(--borda-tab); border-radius: 10px; padding: 10px; }
.img-sel.sobre { border-style: solid; border-color: var(--accent); background: var(--light); }
.img-previa img { max-width: 100%; max-height: 180px; border-radius: 8px; display: block; margin-bottom: 8px; }
.previa-aluno { max-width: 760px; }

.topo .quem > span:first-child { min-width: 0; max-width: 30ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* atividades do tipo ficha */
.etapas.n { grid-template-columns: repeat(var(--n, 4), 1fr); }
.ficha-campo input[type="text"], .ficha-campo select { width: 100%; padding: 9px 11px; border: 2px solid var(--borda-in); border-radius: 10px; background: var(--input); color: inherit; }
.ficha-campo .opc { font-weight: normal; font-size: 14px; color: var(--suave); }
.exemplo { margin-top: 8px; font-size: 15px; color: var(--suave); }
.exemplo p { margin: 6px 0 0; font-style: italic; }
.tabela-ficha { display: flex; flex-direction: column; gap: 6px; }
.tabela-ficha .lin { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr) auto; gap: 6px; align-items: center; }
.tabela-ficha .cab b { font-size: 14px; color: var(--titulo); }
.nav { justify-content: space-between; margin-top: 16px; }
#impressao { display: none; }
@media (max-width: 700px) { .etapas.n { grid-template-columns: repeat(2, 1fr); } .tabela-ficha .lin { grid-template-columns: 1fr auto; } .tabela-ficha .cab { display: none; } }
@media print {
  #raiz, #aviso { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  #impressao { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 11pt; line-height: 1.35; }
  #impressao h1 { font-size: 20pt; margin: 0 0 4px; }
  #impressao h2 { font-size: 14pt; margin: 16px 0 6px; border-bottom: 1px solid #999; }
  #impressao h3 { font-size: 11pt; margin: 8px 0 2px; }
  #impressao p { margin: 0 0 4px; white-space: pre-line; }
  #impressao .meta { color: #444; }
  #impressao .item { break-inside: avoid; }
  #impressao table { border-collapse: collapse; width: 100%; margin: 4px 0; }
  #impressao th, #impressao td { border: 1px solid #888; padding: 3px 6px; text-align: left; vertical-align: top; }
}

/* plano de aula */
.aula-barra { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
@media (max-width: 640px) { .aula-barra { flex-wrap: wrap; } } /* 2.342.0: no telemóvel, «Modo escuro» saía do ecrã */
.aula-cab { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.aula-cab img { height: 48px; }
.aula-cab h1 { margin: 2px 0; }
.aula-sec { margin: 16px 0; }
.aula-sec h2 { font-size: 20px; border-bottom: 2px solid var(--accent); padding-bottom: 3px; }
.aula-sec p, .aula-sec li { max-width: 80ch; }
.aula-tab { width: 100%; border-collapse: collapse; }
.aula-tab th, .aula-tab td { border: 1px solid var(--borda-tab); padding: 6px 8px; text-align: left; vertical-align: top; }
.aula-tab th { background: var(--light); }
.aula-tab td:nth-child(2) { white-space: nowrap; text-align: right; }
.aula-nota { break-inside: avoid; margin-bottom: 10px; }
.aula-nota h3 { margin: 0 0 2px; font-size: 16px; }
.aula-nota p { margin: 0; white-space: pre-line; }
@media print {
  /* As páginas do professor (plano de aula, soluções, relatório, pauta...) imprimem o próprio #raiz; a regra de cima é para a ficha do aluno, que imprime #impressao. */
  .pagina-aula #raiz { display: block !important; }
  .pagina-aula { background: #fff !important; color: #000 !important; }
  .aula-barra, #aviso { display: none !important; }
  .aula-sec h2 { color: #000; }
}

/* Contexto, instruções e figuras das fichas */
.missao-cartao { background: var(--papel); border: 1px solid var(--borda); border-left: 8px solid var(--accent); border-radius: 12px; padding: 16px 18px; margin: 0 0 16px; }
.missao-cartao h2 { margin: 0 0 8px; font-size: 22px; }
.missao-cartao p { margin: 0 0 10px; }
.roteiro { margin: 6px 0 12px; padding-left: 22px; }
.roteiro li { margin: 4px 0; }
.roteiro span { color: var(--suave); }
.entrega-nota { background: var(--item-bg); border-radius: 8px; padding: 8px 12px; margin: 0; }
.fazer-cartao { background: var(--papel); border: 2px solid var(--accent); border-radius: 12px; padding: 14px 18px; margin: 0 0 18px; }
.fazer-cartao h3 { margin: 0 0 8px; font-size: 20px; color: var(--titulo); }
.passos { margin: 0 0 12px; padding-left: 24px; }
.passos li { margin: 6px 0; padding-left: 4px; }
.passos li::marker { font-weight: 700; color: var(--accent); }
.figura { margin: 12px 0 0; overflow-x: auto; }
.figura img { display: block; max-width: 100%; height: auto; border-radius: 10px; }
@media (max-width: 640px) { .figura img { min-width: 560px; } }
.responde-aqui { margin: 12px 0 0; font-weight: 700; color: var(--titulo); }
.dados-caixa { margin: 4px 0 12px; }
.dados-titulo { font-weight: 700; margin-bottom: 4px; }
.dados-rolar { overflow-x: auto; margin-bottom: 8px; }
.dados-tabela { border-collapse: collapse; min-width: 320px; }
.dados-tabela th, .dados-tabela td { border: 1px solid var(--borda); padding: 6px 12px; text-align: left; }
.dados-tabela th { background: rgba(31,111,91,.12); }
.dados-tabela td:not(:first-child) { text-align: right; }
@media print { .missao-cartao, .fazer-cartao { display: none; } }

/* Estado de visibilidade das atividades por turma */
.selo { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.selo.vis { background: var(--ok-bg); color: var(--ok-txt); }
.selo.esc { background: var(--desativado); color: var(--desativado-txt); }
.selo.agend { background: var(--aviso-bg); color: #8a5a00; }
.item-ativ.estado-esc { opacity: .8; }
.campo-data { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.campo-data input[type="date"] { padding: 6px 8px; border: 2px solid var(--borda-in); border-radius: 8px; background: var(--input); color: inherit; }

/* Página inicial: apresentação, atividades com progresso e informação da disciplina */
.pagina.larga { max-width: 1040px; }
:root { --c-azul: #2a6fb0; --c-verde: #177a5c; --c-roxo: #7b4fa6; }
.cor-azul { --ac: var(--c-azul); }
.cor-verde { --ac: var(--c-verde); }
.cor-roxo { --ac: var(--c-roxo); }
.bloco { margin: 28px 0 0; }
.bloco > h2 { font-size: 26px; }
.lead { font-size: 18px; color: var(--suave); max-width: 760px; margin: 0 0 14px; }
.hero { --ac: var(--accent); position: relative; overflow: hidden; border-radius: 18px; padding: 26px 24px; color: #fff; background: linear-gradient(125deg, color-mix(in srgb, var(--ac) 70%, #000) 0%, var(--ac) 70%, color-mix(in srgb, var(--ac) 70%, #fff) 130%); margin-bottom: 6px; }
.hero > * { position: relative; z-index: 1; }
.hero .k { font-size: 13px; font-weight: bold; letter-spacing: .1em; opacity: .9; }
.hero h1 { color: #fff; font-size: 34px; margin: 6px 0; }
.hero .msg-aluno { margin: 0 0 14px; max-width: 640px; }
.hero .nota { color: rgba(255,255,255,.9); }
.hero-entrada .logo { height: 60px; background: #fff; border-radius: 10px; padding: 6px 10px; margin-bottom: 14px; display: block; }
.hero-entrada .btn.grande { max-width: 420px; background: #fff; color: var(--dark); }
@keyframes flutuar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(18px); } }
.estat { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.estat-item { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); border-radius: 14px; padding: 8px 16px; min-width: 130px; }
.estat-item b { display: block; font-size: 28px; line-height: 1.1; }
.estat-item span { font-size: 14px; opacity: .95; }
/* cartões de atividades */
a.ativ { transition: transform .15s ease, box-shadow .15s ease; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
a.ativ:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
a.ativ .capa { border-radius: 0; margin: 0; height: 120px; }
.ativ-corpo { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 14px; flex: 1; }
.ativ-lado { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 0 0 auto; }
.anel { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--trilho) 0); position: relative; }
.anel::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--papel); }
.anel span { position: relative; font-weight: 700; font-size: 15px; color: var(--titulo); }
.anel.feito { background: var(--ok); }
.etq.novo { background: var(--input); }
.etq.curso { background: var(--aviso-bg); color: #8a5a00; }
/* separadores de ano */
.tabs-ano { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }
.tab-ano { --ac: var(--accent); border: 2px solid var(--ac); background: var(--papel); color: var(--ac); font-weight: 700; font-size: 17px; padding: 8px 22px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s; }
.tab-ano:hover { background: color-mix(in srgb, var(--ac) 14%, var(--papel)); }
.tab-ano.sel { background: var(--ac); color: var(--on-color); }
.painel-ano { --ac: var(--accent); animation: entrar .35s ease both; }
.ano-lema { font-size: 22px; font-weight: 700; color: var(--ac); margin: 0 0 4px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.teu-ano { background: var(--ac); color: var(--on-color); font-size: 13px; padding: 2px 10px; border-radius: 999px; }
.ano-resumo { margin: 0 0 14px; font-size: 17px; }
.semestre { display: flex; gap: 6px; margin: 0 0 6px; }
.seg { flex: var(--g, 1) 1 0; min-width: 0; padding: 10px 12px; border-radius: 12px; color: var(--on-color); display: flex; flex-direction: column; gap: 2px; background: var(--ac); transition: transform .15s; }
.seg:hover { transform: translateY(-2px); }
.seg-2 { background: color-mix(in srgb, var(--ac) 78%, #000); }
.seg-3 { background: color-mix(in srgb, var(--ac) 80%, #fff); color: #10241d; }
.seg b { font-size: 15px; overflow-wrap: anywhere; }
.seg small { opacity: .9; }
.modulos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 12px; align-items: start; }
.modulo { border: 2px solid var(--borda); border-top: 6px solid var(--ac); background: var(--papel); border-radius: 14px; padding: 14px 16px; transition: box-shadow .15s, border-color .15s; }
.modulo:hover { box-shadow: 0 6px 18px rgba(0,0,0,.1); border-color: var(--ac); }
.modulo-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.modulo-n { background: var(--ac); color: var(--on-color); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; }
.modulo-aulas { background: color-mix(in srgb, var(--ac) 14%, var(--papel)); color: var(--titulo); border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: 14px; }
.modulo h3 { font-size: 21px; margin: 4px 0 8px; }
.modulo-corpo { display: none; }
.modulo.aberto .modulo-corpo { display: block; animation: entrar .25s ease both; }
.modulo-corpo h4 { margin: 10px 0 4px; font-size: 15px; color: var(--ac); }
.modulo-corpo ul { margin: 0; padding-left: 20px; }
.modulo-corpo li { margin: 3px 0; }
.modulo-corpo .ticks { list-style: none; padding-left: 0; }
.modulo-corpo .ticks li { padding-left: 24px; position: relative; }
.modulo-corpo .ticks li::before { content: "✓"; position: absolute; left: 2px; color: var(--ac); font-weight: 700; }
.modulo-mais { margin-top: 10px; background: none; border: 2px solid var(--ac); color: var(--ac); font-weight: 700; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.modulo-mais:hover { background: color-mix(in srgb, var(--ac) 14%, var(--papel)); }
/* como trabalhamos */
.como { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.como-item { background: var(--papel); border: 1px solid var(--borda); border-radius: 14px; padding: 14px 16px; transition: transform .15s; }
.como-item:hover { transform: translateY(-3px); }
.como-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--on-color); font-weight: 700; margin-bottom: 6px; }
.como-item h3 { font-size: 19px; }
.como-item p { margin: 0; color: var(--suave); }
.chips-bloco { margin-bottom: 14px; }
.chips-bloco h3 { font-size: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: color-mix(in srgb, var(--accent) 16%, var(--papel)); color: var(--titulo); border: 1px solid var(--borda-tab); border-radius: 999px; padding: 5px 14px; font-weight: 600; }
.chip.suave { background: var(--papel); }
/* aparecer ao deslizar */
.revelar { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.revelar.visto { opacity: 1; transform: none; }
@keyframes entrar { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .hero { padding: 20px 16px; } .hero h1 { font-size: 27px; } .semestre { flex-direction: column; } .seg { flex: none; } }
@media (prefers-reduced-motion: reduce) { .hero::before, .hero::after { animation: none; } .revelar { opacity: 1; transform: none; transition: none; } .painel-ano, .modulo.aberto .modulo-corpo { animation: none; } a.ativ, .seg, .como-item { transition: none; } }
.item-ativ { border: 1px solid var(--borda); border-radius: 12px; padding: 10px 14px; margin: 10px 0; background: var(--papel); }
.item-ativ.estado-vis { border-left: 6px solid var(--ok); }
.item-ativ.estado-agend { border-left: 6px solid var(--aviso); }
.item-ativ.estado-esc { border-left: 6px solid var(--btn-off); }

/* ===== Mais cor: paleta por ano e por tema ===== */
:root {
  --c-azul: #2a6fb0; --c-verde: #177a5c; --c-roxo: #7b4fa6; --c-laranja: #c23d14; --c-amarelo: #996000; --c-teal: #17776c; --c-rosa: #c0346f;
}
.cor-azul { --ac: #2a6fb0; --ac2: #17776c; }
.cor-verde { --ac: #177a5c; --ac2: #996000; }
.cor-roxo { --ac: #7b4fa6; --ac2: #d6457f; }
.cor-laranja { --ac: #c23d14; --ac2: #996000; }
.cor-amarelo { --ac: #996000; --ac2: #c23d14; }
.cor-teal { --ac: #17776c; --ac2: #2a6fb0; }
.cor-rosa { --ac: #c0346f; --ac2: #7b4fa6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cor-azul { --ac: #5b9bd5; } :root:not([data-theme="light"]) .cor-verde { --ac: #4cc0a0; }
  :root:not([data-theme="light"]) .cor-roxo { --ac: #b48ae0; } :root:not([data-theme="light"]) .cor-laranja { --ac: #ff8a65; }
  :root:not([data-theme="light"]) .cor-amarelo { --ac: #f0b84a; } :root:not([data-theme="light"]) .cor-teal { --ac: #4ccfc0; }
  :root:not([data-theme="light"]) .cor-rosa { --ac: #f07aa8; }
}
:root[data-theme="dark"] .cor-azul { --ac: #5b9bd5; } :root[data-theme="dark"] .cor-verde { --ac: #4cc0a0; }
:root[data-theme="dark"] .cor-roxo { --ac: #b48ae0; } :root[data-theme="dark"] .cor-laranja { --ac: #ff8a65; }
:root[data-theme="dark"] .cor-amarelo { --ac: #f0b84a; } :root[data-theme="dark"] .cor-teal { --ac: #4ccfc0; }
:root[data-theme="dark"] .cor-rosa { --ac: #f07aa8; }
/* texto sobre cor forte fica sempre claro */
.seg, .modulo-n, .como-n, .teu-ano, .tab-ano.sel, .tab.atual { color: var(--on-color); }
/* início */
.hero { background: var(--hero-bg); color: var(--on-hero); }
.hero-multi { background: var(--hero-bg); }
.hero-entrada.hero-multi .btn.grande { color: var(--hero-bg); }
.estat-item:nth-child(n) { background: var(--hero-caixa); }
a.ativ { border-color: var(--ac, var(--accent)); border-top-width: 8px; }
a.ativ:hover { background: color-mix(in srgb, var(--ac, var(--accent)) 10%, var(--papel)); }
a.ativ .k { color: var(--ac, var(--titulo)); }
.anel { background: conic-gradient(var(--ac, var(--accent)) calc(var(--p) * 1%), var(--trilho) 0); }
.ativ-lado .etq.novo { background: color-mix(in srgb, var(--ac, var(--accent)) 14%, var(--papel)); }
.seg, .seg-2, .seg-3 { background: var(--ac); color: var(--on-color); }
.modulo { border-top-color: var(--ac); }
.modulo:hover { border-color: var(--ac); }
.modulo-corpo h4, .modulo-mais { color: var(--ac); border-color: var(--ac); }
.modulo-mais { background: none; }
.modulo-n { background: var(--ac); }
.modulo-aulas { background: color-mix(in srgb, var(--ac) 16%, var(--papel)); color: var(--texto); }
.como-item { border-top: 6px solid var(--ac, var(--accent)); }
.como-n { background: var(--ac, var(--accent)); }
.como-item h3 { color: var(--ac, var(--titulo)); }
.chip { background: color-mix(in srgb, var(--ac, var(--accent)) 14%, var(--papel)); border: 2px solid var(--ac, var(--borda-tab)); color: var(--texto); }
.chip.suave { background: color-mix(in srgb, var(--ac, var(--accent)) 14%, var(--papel)); }
/* páginas das atividades, com a cor do ano */
:root.t-azul { --accent: #2a6fb0; --dark: #1a456d; --titulo: #1a456d; --light: #e1ebf4; --input: #ffffff; --item-bg: #f2f6fa; --borda-tab: #d0dfee; --trilho: #e1ebf4; }
:root.t-roxo { --accent: #7b4fa6; --dark: #4c3167; --titulo: #4c3167; --light: #ede6f3; --input: #ffffff; --item-bg: #f7f4fa; --borda-tab: #e2d8eb; --trilho: #ede6f3; }
:root.t-laranja { --accent: #c23d14; --dark: #78260c; --titulo: #78260c; --light: #f6e4de; --input: #ffffff; --item-bg: #fbf3f1; --borda-tab: #f2d4cb; --trilho: #f6e4de; }
:root.t-verde { --accent: #177a5c; --dark: #0f4a39; --titulo: #0f4a39; --light: #e1ece8; --item-bg: #f2f8f6; --borda-tab: #c3d8d1; --trilho: #e1ece8; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]).t-azul { --accent: #5b9bd5; --titulo: #94bee4; --light: #213547; --input: #131f2b; --item-bg: #131f2b; --borda-tab: #263f56; --trilho: #243a4e; }
  :root:not([data-theme="light"]).t-roxo { --accent: #b48ae0; --titulo: #ceb3eb; --light: #32314a; --input: #1c1d2c; --item-bg: #1c1d2c; --borda-tab: #3f3a59; --trilho: #393651; }
  :root:not([data-theme="light"]).t-laranja { --accent: #ff8a65; --titulo: #ffb39b; --light: #413131; --input: #231d20; --item-bg: #231d20; --borda-tab: #543a36; --trilho: #4b3634; }
  :root:not([data-theme="light"]).t-verde { --accent: #4cc0a0; --titulo: #a9e3d1; --light: #173a35; --item-bg: #0f1d1c; --borda-tab: #254743; --trilho: #1f3a37; }
}
:root[data-theme="dark"].t-azul { --accent: #5b9bd5; --titulo: #94bee4; --light: #213547; --input: #131f2b; --item-bg: #131f2b; --borda-tab: #263f56; --trilho: #243a4e; }
:root[data-theme="dark"].t-roxo { --accent: #b48ae0; --titulo: #ceb3eb; --light: #32314a; --input: #1c1d2c; --item-bg: #1c1d2c; --borda-tab: #3f3a59; --trilho: #393651; }
:root[data-theme="dark"].t-laranja { --accent: #ff8a65; --titulo: #ffb39b; --light: #413131; --input: #231d20; --item-bg: #231d20; --borda-tab: #543a36; --trilho: #4b3634; }
:root[data-theme="dark"].t-verde { --accent: #4cc0a0; --titulo: #a9e3d1; --light: #173a35; --item-bg: #0f1d1c; --borda-tab: #254743; --trilho: #1f3a37; }
.barra > div { background: var(--xp); }
/* separadores de etapa, cada um com a sua cor */
.etapas .tab { --tc: var(--et1); border-top: 6px solid var(--tc); }
.etapas .tab:nth-child(5n+2) { --tc: var(--et2); } .etapas .tab:nth-child(5n+3) { --tc: var(--et3); }
.etapas .tab:nth-child(5n+4) { --tc: var(--et4); } .etapas .tab:nth-child(5n+5) { --tc: var(--et5); }
.etapas .tab.atual { background: var(--tc); border-color: var(--tc); color: var(--on-color); }
.etapas .tab.atual small { color: var(--on-color); }
.etapas .tab.feita { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 12%, var(--papel)); }
.etapas .tab.feita.atual { background: var(--tc); }
/* Cores das etapas (2.203.0): com texto branco no tema claro e escuro no escuro, sempre 4,5:1 ou mais. */
:root { --et1: #c2410c; --et2: #a16207; --et3: #0f766e; --et4: #1d4ed8; --et5: #7e22ce; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --et1: #fb923c; --et2: #facc15; --et3: #2dd4bf; --et4: #60a5fa; --et5: #c084fc; } }
:root[data-theme="dark"] { --et1: #fb923c; --et2: #facc15; --et3: #2dd4bf; --et4: #60a5fa; --et5: #c084fc; }
/* perguntas das fichas com barra colorida */
.ficha-campo { --cor: #c23d14; }
.ficha-campo:nth-of-type(5n+2) { --cor: #e09f1f; } .ficha-campo:nth-of-type(5n+3) { --cor: #17776c; }
.ficha-campo:nth-of-type(5n+4) { --cor: #2a6fb0; } .ficha-campo:nth-of-type(5n+5) { --cor: #7b4fa6; }
.missao-cartao { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--papel)), var(--papel) 70%); }
.fazer-cartao { background: color-mix(in srgb, var(--accent) 6%, var(--papel)); }

/* ---------- Matriz de visibilidade por ano ---------- */
.matriz-barra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.matriz-barra input[type=search] { flex: 1 1 200px; min-width: 160px; max-width: 320px; }
.matriz { overflow: auto; max-height: 70vh; border: 1px solid var(--borda-tab); border-radius: 12px; background: var(--papel); }
.matriz:focus-visible { outline: 3px solid var(--ac, #2a6fb0); outline-offset: 2px; }
.matriz-tab { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 14px; }
.matriz-tab th, .matriz-tab td { padding: 6px 8px; border-bottom: 1px solid var(--borda-tab); text-align: center; background: var(--papel); }
.matriz-tab thead th { position: sticky; top: 0; z-index: 2; }
.matriz-tab thead tr:nth-child(2) th { top: 34px; }
.matriz-tab .col-ativ { position: sticky; left: 0; z-index: 3; text-align: left; min-width: 220px; max-width: 320px; font-weight: 600; border-right: 2px solid var(--borda-tab); }
.matriz-tab tbody .col-ativ { z-index: 1; }
.matriz-tab thead .col-ativ { z-index: 4; }
.cab-col { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; }
.matriz-tab input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }
.gr-ano { font-size: 14px; letter-spacing: .02em; color: var(--on-color); }
.gr-ano.a7 { background: var(--y7); color: var(--on-color); } .gr-ano.a8 { background: var(--y8); color: var(--on-color); } .gr-ano.a9 { background: var(--y9); color: var(--on-color); } .gr-ano.ao { background: var(--yo); color: var(--on-color); }
.matriz-tab th.col-ano, .matriz-tab td.cel-ano { border-left: 3px solid var(--borda-tab); }
.matriz-tab .col-ano.a7, .matriz-tab .cel-ano.a7 { border-left-color: var(--y7); } .matriz-tab .col-ano.a8, .matriz-tab .cel-ano.a8 { border-left-color: var(--y8); } .matriz-tab .col-ano.a9, .matriz-tab .cel-ano.a9 { border-left-color: var(--y9); }
.gr-linha th, .gr-linha td { background: var(--input, #f1f5f9); }
.gr-btn { width: 100%; text-align: left; }
.cel.agend { background: var(--aviso-bg, #fff4d6); }
.mini-ag { margin-left: 3px; font-size: 13px; }
.btn.sel[aria-pressed] { outline: 2px solid var(--ac, #2a6fb0); }

/* ---------- Título da atividade e painel do professor ---------- */
.ativ-titulo { max-width: 920px; margin: 14px auto 0; padding: 0 14px; }
.ativ-titulo .k { font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--ac, var(--titulo)); text-transform: uppercase; }
.ativ-titulo h1 { margin: 2px 0 0; font-size: clamp(24px, 4vw, 34px); line-height: 1.2; }
.prof-caixa { max-width: 920px; margin: 12px auto 0; padding: 0 14px; }
.prof-painel { border: 2px dashed #b45309; border-radius: 12px; background: var(--aviso-bg, #fff4d6); color: var(--texto, inherit); padding: 8px 14px; }
.prof-painel summary { cursor: pointer; font-weight: 700; color: var(--titulo); padding: 4px 0; }
.prof-corpo { padding: 4px 2px 8px; }
.prof-corpo h3 { margin: 12px 0 4px; font-size: 16px; }
.prof-aula { border-top: 1px solid var(--borda-tab); margin-top: 10px; padding-top: 4px; }
@media print { .prof-caixa { display: none; } }
.prof-tutorial { margin-bottom: 10px; background: color-mix(in srgb, var(--ac, #2a6fb0) 10%, var(--papel)); border-color: var(--ac, #2a6fb0); }
.prof-tutorial summary { color: var(--titulo); }
/* 2.228.20: o plano e o tutorial mostram-se inteiros (antes ficavam cortados numa caixa com deslocação). */

.prof-corpo, .prof-corpo li, .prof-corpo p, .prof-corpo b { color: var(--texto); }
.prof-corpo h3 { color: var(--titulo); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .selo.agend, :root:not([data-theme="light"]) .etq.curso { color: #f2c46d; } }
:root[data-theme="dark"] .selo.agend, :root[data-theme="dark"] .etq.curso { color: #f2c46d; }

/* Listas das fichas: em ecrãs pequenos cada linha passa a cartão, com o nome de cada coluna */
.tabela-ficha .lin-num, .tabela-ficha .col-rot, .tabela-ficha .rem-txt { display: none; }
.tabela-ficha .cel-l { display: block; min-width: 0; }
@media (max-width: 700px) {
  .tabela-ficha { gap: 12px; }
  .tabela-ficha .lin { display: flex; flex-direction: column; align-items: stretch; gap: 8px; border: 1px solid var(--borda-in); border-radius: 12px; padding: 10px 12px; background: var(--input); }
  .tabela-ficha .lin-num { display: block; font-weight: 700; color: var(--titulo); font-size: 14px; }
  .tabela-ficha .col-rot { display: block; font-size: 14px; font-weight: 700; color: var(--titulo); margin-bottom: 3px; }
  .tabela-ficha .cel-l input { width: 100%; min-height: 44px; font-size: 16px; }
  .tabela-ficha .rem { align-self: flex-end; min-height: 40px; }
  .tabela-ficha .rem-txt { display: inline; }
}

.logo-ligacao { display: inline-flex; align-items: center; border-radius: 8px; flex: none; }
/* Logótipo da plataforma ao lado do do agrupamento (2.299.1), no cabeçalho da página inicial e da Administração. */
img.logo-tic { width: 40px; height: 40px; flex: none; margin-left: 8px; border-radius: 0; }
:root:not(.classico) .cab-marca img.logo-tic { width: 44px; height: 44px; margin-left: 0; border-radius: 0; }
@media (max-width: 520px) { img.logo-tic { width: 32px; height: 32px; } :root:not(.classico) .cab-marca img.logo-tic { width: 34px; height: 34px; } }
.logo-ligacao:focus-visible { outline: 3px solid var(--foco, #2a6fb0); outline-offset: 2px; }

/* ---------- Quiz ---------- */
.quiz { max-width: 900px; margin: 0 auto; padding: 8px 16px 40px; }
.quiz-intro { font-size: 18px; color: var(--suave); margin: 6px 0 12px; }
.quiz-cartao { background: var(--papel); border: 1px solid var(--borda); border-radius: 16px; padding: 18px; margin-top: 12px; }
.quiz-n { font-weight: 700; color: var(--titulo); font-size: 14px; letter-spacing: .03em; text-transform: uppercase; }
.quiz-pergunta { font-size: clamp(22px, 4.5vw, 30px); line-height: 1.25; margin: 6px 0 16px; }
.quiz-opcoes { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 700px) { .quiz-opcoes { grid-template-columns: 1fr 1fr; } }
.quiz-op { display: flex; align-items: center; gap: 12px; text-align: left; min-height: 68px; padding: 10px 14px; border: 3px solid transparent; border-radius: 14px; font: inherit; font-size: 18px; font-weight: 700; color: #fff; cursor: pointer; position: relative; flex-wrap: wrap; }
.quiz-op:disabled { cursor: default; }
.quiz-op.c0, .pv-op.c0 { background: #c8431f; } .quiz-op.c1, .pv-op.c1 { background: #2f5fc2; } .quiz-op.c2, .pv-op.c2 { background: #e09f1f; color: #1a1a1a; } .quiz-op.c3, .pv-op.c3 { background: #1f7f73; } .quiz-op.c4, .pv-op.c4 { background: #8a3fb8; }
.quiz-op:not(:disabled):hover { filter: brightness(1.1); transform: translateY(-1px); }
.quiz-op:focus-visible { outline: 4px solid var(--foco, #2a6fb0); outline-offset: 3px; }
.quiz-letra { flex: none; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.25); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.quiz-op.c2 .quiz-letra { background: rgba(0,0,0,.15); }
.quiz-txt { flex: 1 1 140px; min-width: 0; }
.quiz-marca { flex: 1 0 100%; font-size: 14px; padding-left: 46px; }
.quiz-op.apagada { opacity: .4; }
.quiz-op.certa { border-color: #fff; box-shadow: 0 0 0 4px #177a5c; }
.quiz-op.errada { border-color: #fff; box-shadow: 0 0 0 4px #d6362b; }
.quiz-op.escolhida { box-shadow: 0 0 0 4px var(--foco, #2a6fb0); }
.quiz-feedback { margin-top: 16px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--borda-in); background: var(--item-bg); }
.quiz-feedback.ok { border-color: #177a5c; background: var(--ok-bg); }
.quiz-feedback.ko { border-color: #d6362b; background: var(--erro-bg); }
.quiz-feedback b { font-size: 20px; }
.quiz-feedback p { margin: 6px 0 12px; font-size: 17px; }
.quiz-feedback:focus { outline: none; }
.quiz-pontos { font-size: 56px; font-weight: 800; color: var(--titulo); line-height: 1; }
.quiz-pontos span { font-size: 24px; color: var(--suave); font-weight: 700; }
.quiz-revisao { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; }
.quiz-revisao .btn { width: 100%; text-align: left; white-space: normal; }
.quiz-revisao li.ok .btn { border-color: #177a5c; } .quiz-revisao li.ko .btn { border-color: #d6362b; }
@media (prefers-reduced-motion: reduce) { .quiz-op:not(:disabled):hover { transform: none; } }

/* ---------- Lista de atividades por ano, com ordem ---------- */
.grupo-titulo { margin: 18px 0 4px; padding: 4px 12px; border-radius: 8px; color: var(--on-color); font-size: 16px; display: inline-block; }
.grupo-ativ.a7 .grupo-titulo { background: var(--y7); } .grupo-ativ.a8 .grupo-titulo { background: var(--y8); } .grupo-ativ.a9 .grupo-titulo { background: var(--y9); } .grupo-ativ.ao .grupo-titulo { background: var(--yo); }
.grupo-ativ.ap .grupo-titulo { background: var(--c-amarelo); }
.grupo-ativ.aia .grupo-titulo { background: var(--c-teal); }
.grupo-ativ.ap .info > label.nota { display: block; margin: 4px 0; }
.ordem-n { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 32px; }
.ordem-n .n { font-weight: 800; font-size: 18px; color: var(--titulo); }
.pega { cursor: grab; font-size: 22px; line-height: 1; color: var(--suave); user-select: none; touch-action: none; padding: 2px 4px; }
.lista-ativ.alvo { outline: 3px dashed var(--ac, #2a6fb0); outline-offset: 2px; }

/* Quiz com tempo: barra de contagem decrescente */
.quiz-tempo { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; }
.quiz-tempo b { min-width: 3.5em; text-align: right; font-size: 20px; font-variant-numeric: tabular-nums; }
.quiz-tempo-pista { flex: 1; height: 14px; border-radius: 999px; background: var(--borda); overflow: hidden; }
.quiz-tempo-barra { height: 100%; width: 100%; border-radius: 999px; background: var(--accent, #2a6fb0); transition: background .3s; }
.quiz-tempo-barra.urgente { background: #dc2626; }

/* Quiz ao vivo */
.vivo-grande { font-size: 22px; font-weight: 800; margin: 6px 0; }
.vivo-espera { margin: 14px 0 0; font-weight: 600; opacity: .85; }
.vivo-resultado { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-radius: 14px; font-size: 24px; font-weight: 800; margin: 8px 0 12px; }
.vivo-resultado span { font-size: 20px; }
.vivo-resultado.ok { background: #16a34a; color: #fff; }
.vivo-resultado.ko { background: #dc2626; color: #fff; }
.vivo-rank { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.vivo-rank li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--item-bg); border: 1px solid var(--borda); }
.vivo-rank li.eu { border-color: var(--accent, #2a6fb0); box-shadow: 0 0 0 2px var(--accent, #2a6fb0) inset; }
.vivo-pos { width: 1.8em; font-weight: 800; }
.vivo-nome { flex: 1; font-weight: 600; }
.vivo-aviso { display: flex; flex-direction: column; gap: 2px; margin: 12px 0; padding: 14px 18px; border-radius: 14px; background: #dc2626; color: #fff; text-decoration: none; font-size: 18px; animation: vivo-pulsa 1.6s ease-in-out infinite; }
.vivo-aviso:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }
@keyframes vivo-pulsa { 50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, .25); } }
@media (prefers-reduced-motion: reduce) { .vivo-aviso { animation: none; } }

/* Ecrã do professor no modo ao vivo (para projetar) */
.pv { max-width: 1100px; margin: 0 auto; padding: 16px; }
.pv-cab { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.pv-sala { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.pv-sala span { padding: 6px 12px; border-radius: 999px; background: var(--item-bg); border: 1px solid var(--borda); font-weight: 600; }
.pv-pergunta { font-size: clamp(24px, 4vw, 40px); font-weight: 800; margin: 12px 0; }
.pv-opcoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.pv-op { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 14px; color: #fff; font-size: clamp(18px, 2.4vw, 26px); font-weight: 700; border: 3px solid transparent; }
.pv-op.apagada { opacity: .35; }
.pv-op.certa { border-color: #fff; outline: 4px solid #16a34a; }
.pv-op b { margin-left: auto; font-size: 1.3em; }
.pv-acoes { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.pv-contador { font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pv-rank { font-size: 22px; }
.pv-cab img { height: 56px; width: auto; }
.ativ-vivo { display: flex; flex-direction: column; gap: 8px; }
.ativ-vivo > .btn { align-self: flex-start; }

/* Painel do professor: ecrã mais arrumado */
.mais-opcoes { margin-top: 8px; }
.mais-opcoes > summary { cursor: pointer; font-weight: 600; color: var(--titulo, inherit); padding: 6px 0; }
.mais-opcoes[open] > summary { margin-bottom: 6px; }
@media (max-width: 640px) {
  .prof { padding: 10px; }
  .prof header { flex-wrap: wrap; gap: 8px 10px; }
  .prof header img { height: 34px; }
  .prof header > div:nth-child(2) { flex: 1; min-width: 0; }
  .prof h1 { font-size: 20px; }
  .prof header .nota { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .prof header .quem { width: 100%; display: flex; gap: 8px; flex-wrap: wrap; }
  .prof header .quem .btn { flex: 1; text-align: center; white-space: nowrap; padding: 8px 6px; font-size: 14px; }
  .admin-sec { padding: 12px; }
}

/* Página inicial: atividades por ano e tema */
.tab-n { display: inline-block; margin-left: 8px; min-width: 1.6em; padding: 0 6px; border-radius: 999px; background: rgba(0,0,0,.12); font-size: .85em; font-weight: 700; text-align: center; }
.tab-ano.sel .tab-n { background: rgba(255,255,255,.28); }
.tema-bloco { --ac: var(--accent); border: 2px solid var(--borda); border-left: 8px solid var(--ac); background: var(--papel); border-radius: 14px; padding: 14px 16px; margin-top: 16px; }
.tema-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.tema-cab h3 { margin: 0; font-size: 22px; flex: 1; min-width: 160px; }
.tema-meta { background: color-mix(in srgb, var(--ac) 14%, var(--papel)); color: var(--titulo); border-radius: 999px; padding: 2px 12px; font-weight: 700; font-size: 14px; }
.tema-bloco .ativs { margin: 0; }
.tema-saber { margin-top: 12px; }
.tema-saber > summary { cursor: pointer; font-weight: 600; color: var(--ac); }
.modulo-corpo-aberto h4 { margin: 10px 0 4px; font-size: 15px; color: var(--ac); }
.modulo-corpo-aberto ul { margin: 0 0 6px; padding-left: 20px; }
@media (max-width: 640px) { .tema-bloco { padding: 12px; border-left-width: 6px; } .tema-cab h3 { font-size: 19px; } }

/* ---------- painel do professor: cores por ano e ecrã de atividades da turma ---------- */
:root { --y7: #2a6fb0; --y8: #177a5c; --y9: #7b4fa6; --yo: #5b6b78; --c-turmas: #2a6fb0; --c-ativ: #177a5c; --c-apar: #c0346f; --c-res: #c23d14; --c-alunos: #17776c; --c-mais: #5b6b78; }
:root[data-theme="dark"] { --y7: #5b9bd5; --y8: #4cc0a0; --y9: #b48ae0; --yo: #8aa0b2; --c-turmas: #5b9bd5; --c-ativ: #4cc0a0; --c-apar: #f07aa8; --c-res: #ff8a65; --c-alunos: #4ccfc0; --c-mais: #8aa0b2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --y7: #5b9bd5; --y8: #4cc0a0; --y9: #b48ae0; --yo: #8aa0b2; --c-turmas: #5b9bd5; --c-ativ: #4cc0a0; --c-apar: #f07aa8; --c-res: #ff8a65; --c-alunos: #4ccfc0; --c-mais: #8aa0b2; } }
.ano7 { --ay: var(--y7); } .ano8 { --ay: var(--y8); } .ano9 { --ay: var(--y9); } .ano { --ay: var(--yo); } .anop { --ay: var(--c-amarelo); } .anoia { --ay: var(--c-teal); }
.prof header { padding-bottom: 10px; border-bottom: 3px solid var(--borda); }
.tabs-turma .btn.sec.chip-turma { border-color: var(--ay, var(--borda-in)); color: var(--ay, inherit); font-weight: 700; }
.tabs-turma .btn.sec.chip-turma.sel { background: var(--ay); color: var(--on-color); }
.sep-turmas { --sc: var(--c-turmas) !important; } .sep-atividades { --sc: var(--c-ativ) !important; } .sep-aparencia { --sc: var(--c-apar) !important; }
.sep-resultados { --sc: var(--c-res) !important; } .sep-alunos { --sc: var(--c-alunos) !important; } .sep-mais { --sc: var(--c-mais) !important; }
.sec-ativ { border-top: 5px solid var(--c-ativ); }
.sec-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sec-cab h2 { margin: 0; }
.etq.tema { background: color-mix(in srgb, var(--ay) 18%, var(--papel)); color: var(--titulo); border: 1px solid color-mix(in srgb, var(--ay) 50%, transparent); }
.interruptor.grande { font-weight: 700; margin: 0; }
.arrastando { z-index: 20; box-shadow: 0 10px 28px rgba(0,0,0,.35); opacity: .95; cursor: grabbing; pointer-events: none; }
.alvo-antes { box-shadow: 0 -4px 0 0 var(--ay, #2a6fb0); }
.alvo-fim { box-shadow: 0 4px 0 0 var(--ay, #2a6fb0); }

/* Indicações e slides de apoio */
.guia { margin: 12px 0; border: 2px solid var(--borda); border-left: 8px solid var(--accent); border-radius: 14px; background: var(--papel); padding: 4px 14px 12px; }
.guia > summary { cursor: pointer; font-weight: 800; font-size: 18px; padding: 10px 0; color: var(--titulo); }
.guia-passos { margin: 4px 0 10px; padding-left: 22px; display: grid; gap: 4px; }
.slides { margin: 10px 0 14px; border-radius: 14px; border: 2px solid var(--cor, var(--accent)); background: color-mix(in srgb, var(--cor, var(--accent)) 8%, var(--papel)); overflow: hidden; }
.slides-cab { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; background: var(--cor, var(--accent)); color: var(--on-color); font-size: 14px; }
.slide { padding: 12px 16px 6px; }
.slide h4 { margin: 0 0 6px; font-size: 20px; color: var(--titulo); }
.slide p { margin: 0 0 8px; }
.slide ul { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 4px; }
.slide-fig { display: block; max-width: 100%; margin: 8px auto; background: #fff; border-radius: 10px; padding: 6px; }
.slides-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 14px 12px; }
.slides-pontos { display: flex; gap: 6px; }
.slides-pontos i { width: 9px; height: 9px; border-radius: 50%; background: var(--borda-in); }
.slides-pontos i.atual { background: var(--cor, var(--accent)); transform: scale(1.3); }

/* Imagens anexadas pelos alunos */
.oculto { display: none; }
.anexos { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.anexo { margin: 0; display: grid; gap: 6px; justify-items: start; }
.anexos img { display: block; max-width: 180px; max-height: 140px; border-radius: 8px; border: 1px solid var(--borda, #ccd); object-fit: cover; background: #fff; }
#impressao .anexos img { max-width: 260px; max-height: 200px; }

.prof-limpar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }

.teams-nota { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: rgba(255,255,255,.12); font-size: .95rem; }
.teams-nota ol { margin: 6px 0 0; padding-left: 20px; }
.teams-nota li { margin: 3px 0; }

/* Quiz do aluno em modo jogo: fundo escuro, pergunta ao centro, blocos de cor grandes numerados */
html.jogo body { min-height: 100vh; background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 38%, #14061a) 0%, #14061a 70%); color: #fff; }
html.jogo #raiz { min-height: 100vh; display: flex; flex-direction: column; }
.jogo-topo { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: rgba(0,0,0,.28); flex-wrap: wrap; }
.jogo-topo .logo-ligacao img { height: 34px; }
.jogo-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; background: rgba(255,255,255,.14); font-weight: 800; font-variant-numeric: tabular-nums; }
.jogo-prog { display: inline-block; width: 70px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.2); overflow: hidden; }
.jogo-prog div { height: 100%; background: #5eead4; border-radius: 999px; transition: width .3s; }
.jogo-nome { flex: 1 1 120px; min-width: 0; text-align: center; opacity: .8; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jogo-acoes { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.jogo-main { flex: 1; width: 100%; max-width: 1400px; display: flex; flex-direction: column; justify-content: center; padding: 16px; box-sizing: border-box; }
.jogo .quiz-intro { color: rgba(255,255,255,.8); text-align: center; }
.jogo .quiz-cartao { background: transparent; border: 0; padding: 0; margin-top: 0; text-align: center; }
.jogo .quiz-n { display: inline-block; padding: 6px 16px; border-radius: 999px; background: rgba(0,0,0,.45); color: #fcd34d; font-size: 18px; letter-spacing: .04em; text-transform: none; font-variant-numeric: tabular-nums; }
.jogo .quiz-pergunta { background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 24px 28px; margin: -14px auto 20px; max-width: 1200px; font-size: clamp(22px, 3.4vw, 36px); font-weight: 600; color: #fff; }
.jogo .quiz-opcoes { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.jogo .quiz-op { flex-direction: column; justify-content: center; text-align: center; min-height: clamp(130px, 28vh, 320px); padding: 36px 16px 16px; border: 0; border-radius: 14px; font-size: clamp(20px, 2.6vw, 32px); font-weight: 500; box-shadow: 0 6px 18px rgba(0,0,0,.35), inset 0 2px 0 rgba(255,255,255,.35); transition: transform .12s, filter .12s; }
.jogo .quiz-op.c0 { background: linear-gradient(#bcb600, #6c6a00); color: #fff; }
.jogo .quiz-op.c1 { background: linear-gradient(#bb74ff, #6a1fb8); color: #fff; }
.jogo .quiz-op.c2 { background: linear-gradient(#ff8a2a, #de4806); color: #fff; }
.jogo .quiz-op.c3 { background: linear-gradient(#1fd7c8, #0c8f82); color: #fff; }
.jogo .quiz-op.c4 { background: linear-gradient(#f472b6, #be185d); color: #fff; }
.jogo .quiz-op:not(:disabled):hover { transform: translateY(-3px); filter: brightness(1.08); }
.jogo .quiz-letra { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 8px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.25); font-size: 18px; }
.jogo .quiz-op.c2 .quiz-letra { background: rgba(0,0,0,.28); }
.jogo .quiz-txt { flex: 0 1 auto; }
.jogo .quiz-marca { flex: none; padding: 0; font-size: 16px; font-weight: 700; background: rgba(0,0,0,.35); border-radius: 999px; padding: 4px 12px; }
.jogo .quiz-op.apagada { opacity: .3; }
.jogo .quiz-op.certa { box-shadow: 0 0 0 5px #fff, 0 0 0 9px #22c55e; }
.jogo .quiz-op.errada { box-shadow: 0 0 0 5px #fff, 0 0 0 9px #ef4444; }
.jogo .quiz-op.escolhida { box-shadow: 0 0 0 5px #fff; }
.jogo .quiz-tempo { max-width: 1200px; margin: -8px auto 16px; }
.jogo .quiz-tempo-pista { background: rgba(255,255,255,.18); }
.jogo .quiz-tempo-barra { background: #5eead4; }
.jogo .quiz-tempo-barra.urgente { background: #f87171; }
.jogo .quiz-feedback { background: rgba(0,0,0,.5); color: #fff; max-width: 1200px; margin: 18px auto 0; text-align: left; }
.jogo .quiz-feedback.ok { border-color: #22c55e; } .jogo .quiz-feedback.ko { border-color: #ef4444; }
.jogo .aviso-fechada { color: #fcd34d; }
.jogo .quiz-final { max-width: 760px; margin: 0 auto; text-align: center; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 28px; }
.jogo .quiz-final .linha-a { justify-content: center; }
.jogo .quiz-pontos, .jogo .quiz-pontos span { color: #fcd34d; }
.jogo .quiz-revisao .btn { color: #fff; background: rgba(255,255,255,.1); }
.jogo .quiz-revisao li.ok .btn { border-color: #22c55e; } .jogo .quiz-revisao li.ko .btn { border-color: #ef4444; }
.jogo .btn.sec { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.4); }
.jogo-prof { margin-top: 24px; background: var(--papel); color: var(--texto); border-radius: 14px; padding: 8px 12px; }
.jogo-rodape { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: rgba(0,0,0,.35); }
.jogo-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--acc2, #e09f1f); color: #1a1a1a; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.jogo-aluno { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jogo-turma { margin-left: auto; opacity: .7; }
@media (max-width: 600px) { .jogo-nome { order: 5; flex-basis: 100%; } .jogo .quiz-op { min-height: 90px; padding-top: 30px; } .jogo .quiz-opcoes { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .jogo .quiz-op:not(:disabled):hover { transform: none; } }
.jogo-topo .logo-ligacao img { background: #fff; border-radius: 8px; padding: 3px 6px; }

/* Modo jogo: partes do quiz ao vivo */
.jogo .vivo-rank { max-width: 700px; margin: 8px auto 0; text-align: left; }
.jogo .vivo-rank li { background: rgba(0,0,0,.4); border-color: rgba(255,255,255,.15); color: #fff; }
.jogo .vivo-rank li.eu { border-color: #fcd34d; box-shadow: 0 0 0 2px #fcd34d inset; }
.jogo .vivo-resultado { max-width: 1200px; margin: 14px auto; }
.jogo .quiz-final h2, .jogo .quiz-final h3 { color: #fff; }
.jogo .vivo-espera { color: #fff; text-align: center; }
.jogo h3 { color: #fff; margin: 34px 0 0; text-align: center; }
/* O painel do professor é claro, mesmo no ecrã escuro do jogo. */
.jogo .jogo-prof h3 { color: var(--titulo); margin: 12px 0 4px; text-align: left; }
.jogo .jogo-prof .btn.sec { background: var(--papel); color: var(--titulo); border-color: var(--accent); }
.jogo .vivo-resultado { margin-bottom: 30px; }

/* Quiz ao vivo, ecrã do professor em modo jogo */
html.jogo #raiz.pv { max-width: none; margin: 0; padding: 0; min-height: 100vh; display: flex; flex-direction: column; }
.pj-topo .pj-titulo { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.pj-topo .pj-titulo span { font-size: 14px; opacity: .75; }
.pj-tabs { flex: 1; display: flex; justify-content: center; gap: 6px; }
.pj-tab { background: none; border: 0; color: rgba(255,255,255,.65); font: inherit; font-size: 20px; font-weight: 700; padding: 8px 18px; border-bottom: 4px solid transparent; cursor: pointer; }
.pj-tab.ativo { color: #fff; border-bottom-color: #fff; }
.pj-tab:focus-visible { outline: 3px solid #fcd34d; outline-offset: 2px; }
.pj-corpo { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; padding: 16px; }
.pj-centro { flex: 1; display: flex; align-items: center; justify-content: center; padding: 16px; }
.pj-cartao { max-width: 820px; width: 100%; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 24px; color: #fff; }
.pj-cartao h2 { color: #fff; margin-top: 0; }
.pj-cartao .pv-sala span { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }
.pj-painel { background: color-mix(in srgb, var(--accent) 30%, #1a0722); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.jogo .pj-painel .pv-pergunta { background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 40px 28px; margin: 0; text-align: center; font-size: clamp(22px, 3vw, 38px); font-weight: 600; flex: 0 0 auto; }
.jogo .pv-opcoes { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; flex: 1; }
.jogo .pv-op { position: relative; flex-direction: column; justify-content: center; text-align: center; min-height: 200px; border: 0; border-radius: 14px; font-weight: 500; font-size: clamp(20px, 2.4vw, 32px); box-shadow: 0 6px 18px rgba(0,0,0,.35), inset 0 2px 0 rgba(255,255,255,.35); color: #fff; }
.jogo .pv-op.c0 { background: linear-gradient(#bcb600, #6c6a00); } .jogo .pv-op.c1 { background: linear-gradient(#bb74ff, #6a1fb8); }
.jogo .pv-op.c2 { background: linear-gradient(#ff8a2a, #de4806); } .jogo .pv-op.c3 { background: linear-gradient(#1fd7c8, #0c8f82); }
.jogo .pv-op.c4 { background: linear-gradient(#f472b6, #be185d); }
.jogo .pv-op > span:first-child { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 8px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.25); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.jogo .pv-op b { margin: 0; padding: 2px 14px; border-radius: 999px; background: rgba(0,0,0,.4); font-size: 22px; }
.jogo .pv-op.apagada { opacity: .3; }
.jogo .pv-op.certa { outline: 0; box-shadow: 0 0 0 5px #fff, 0 0 0 9px #22c55e; }
.pj-lado { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pj-num { font-weight: 800; font-size: 20px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.2); }
.pj-alunos { list-style: none; margin: 0; padding: 0; flex: 1; overflow-y: auto; max-height: 50vh; display: grid; gap: 6px; align-content: start; }
.pj-alunos li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; background: rgba(255,255,255,.07); }
.pj-nome { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-estado { flex: none; font-size: 14px; padding: 2px 10px; border-radius: 999px; background: rgba(255,255,255,.14); }
.pj-estado.ok { background: #16a34a; }
.pj-resp { margin: 0; text-align: center; opacity: .9; } .pj-resp b { font-size: 22px; }
.pj-tempo-pista { height: 10px; border-radius: 999px; background: rgba(255,255,255,.18); overflow: hidden; }
.pj-relogio { font-size: 56px; font-weight: 800; text-align: center; color: #fcd34d; font-variant-numeric: tabular-nums; line-height: 1; }
.pj-rodape { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: rgba(0,0,0,.45); }
.pj-q { font-size: 18px; opacity: .9; }
.pj-ir { border: 0; border-radius: 10px; padding: 14px 28px; font: inherit; font-size: 20px; font-weight: 800; color: #fff; background: #e0268f; cursor: pointer; }
.pj-ir:hover:not(:disabled) { filter: brightness(1.12); } .pj-ir:disabled { opacity: .45; cursor: not-allowed; }
.pj-ir:focus-visible { outline: 3px solid #fcd34d; outline-offset: 3px; }
.jogo .pv-rank li { background: rgba(0,0,0,.4); color: #fff; border-color: rgba(255,255,255,.15); }
.jogo .pv-acoes .btn { background: #c81e7f; }
.jogo .pj-ranking h2 { margin: 0; text-align: center; }
.jogo .pj-ranking .vivo-rank { max-width: 800px; width: 100%; margin: 0 auto; }
@media (max-width: 900px) { .pj-corpo { grid-template-columns: 1fr; } .pj-alunos { max-height: 220px; } .pj-tabs { order: 5; flex-basis: 100%; } }
.pj-corpo, .pj-centro { max-width: none; margin: 0; width: 100%; box-sizing: border-box; padding: 16px; }
.jogo .pj-painel .pv-pergunta { padding: 28px; }
.jogo .pv-op { min-height: 150px; }
.jogo .pj-alunos { max-height: 38vh; }

/* Jogo do Gamebox ao vivo (2.337.0): a página do jogo em grande no projetor, a ronda assinalada e o pódio. */
.vj-centro { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 16px; width: 100%; box-sizing: border-box; }
.vj-pag-env { width: 100%; display: flex; justify-content: center; }
.vj-pag { pointer-events: none; }
.vj-pag.grande { width: min(100%, calc((100vh - 150px) * 16 / 9)); }
.vj-pag.peq { width: min(100%, calc(30vh * 16 / 9)); }
.vj-capa { max-width: 520px; margin: 0 auto 14px; }
.vj-alvo { outline: 4px solid #fcd34d; outline-offset: 3px; border-radius: 10px; box-shadow: 0 0 0 9px rgba(252, 211, 77, .35); }
.vj-tempo-rot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 700; margin: 12px 0; }
.vj-escrever { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px; border-radius: 14px; background: rgba(0,0,0,.35); border: 2px dashed rgba(255,255,255,.35); font-size: clamp(18px, 2.2vw, 26px); text-align: center; }
.vj-escrever.revelado { border: 3px solid #22c55e; border-style: solid; }
.vj-codigo { font-size: clamp(34px, 5vw, 64px); letter-spacing: .12em; color: #fcd34d; font-variant-numeric: tabular-nums; }
.vj-conta { font-size: 18px; opacity: .9; }
.vj-entre h3 { margin: 4px 0 8px; }
.vj-entre .vj-podio { gap: 6px; } .vj-entre .vj-degrau { padding: 8px 4px; } .vj-entre .vj-d-nome { font-size: 15px; } .vj-entre .vj-d-pts { font-size: 13px; }
.vj-podio { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 8px auto 0; max-width: 640px; }
.vj-degrau { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding: 10px 6px; border-radius: 12px 12px 0 0; color: #1b1b3a; font-weight: 700; text-align: center; }
.vj-degrau.vj-l1 { background: #fcd34d; min-height: 120px; } .vj-degrau.vj-l2 { background: #e2e8f0; min-height: 90px; } .vj-degrau.vj-l3 { background: #fdba74; min-height: 70px; }
.vj-podio.grande .vj-l1 { min-height: 190px; } .vj-podio.grande .vj-l2 { min-height: 140px; } .vj-podio.grande .vj-l3 { min-height: 105px; }
.vj-d-nome { font-size: clamp(16px, 2vw, 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.vj-d-pts { font-size: 15px; font-weight: 600; } .vj-d-pos { font-size: clamp(22px, 3vw, 36px); font-weight: 800; }
.vj-fim .pj-cartao { max-width: 900px; }
.vj-rel-lista { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.vj-rel-q { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 30%) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.08); }
.vj-rel-q.dificil { box-shadow: inset 4px 0 0 #f87171; }
.vj-rel-txt small { display: block; opacity: .8; font-size: 14px; }
.vj-barra { display: block; height: 14px; border-radius: 999px; background: rgba(255,255,255,.2); overflow: hidden; }
.vj-barra i { display: block; height: 100%; background: #22c55e; border-radius: 999px; }
.vj-rel-tab td.vj-ok { color: #166534; font-weight: 800; } .vj-rel-tab td.vj-ko { color: #b91c1c; font-weight: 800; }
html.jogo:not(.jogo-claro) .vj-rel-tab td.vj-ok { color: #4ade80; } html.jogo:not(.jogo-claro) .vj-rel-tab td.vj-ko { color: #fca5a5; }
@media (max-width: 700px) { .vj-rel-q { grid-template-columns: 1fr; } .vj-pag.peq { width: 100%; } }
.vivo-escrita { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 14px auto; max-width: 640px; }
.vivo-cod { flex: 1 1 220px; min-width: 0; font: inherit; font-size: 28px; font-weight: 800; letter-spacing: .1em; text-align: center; padding: 12px 16px; border-radius: 12px; border: 3px solid #fcd34d; background: #fff; color: #1b1b3a; text-transform: uppercase; }
.vivo-enviar { font-size: 22px; padding: 12px 26px; }
.vivo-certa-txt, .vivo-minha-txt { flex-basis: 100%; text-align: center; font-size: 22px; margin: 4px 0; }
.vivo-certa-txt b { color: #fcd34d; letter-spacing: .08em; }
.vivo-minha-txt.ok b { color: #4ade80; } .vivo-minha-txt.ko b { color: #fca5a5; }
.jogo-claro .vivo-certa-txt b { color: #7c4a00; } .jogo-claro .vivo-minha-txt.ok b { color: #166534; } .jogo-claro .vivo-minha-txt.ko b { color: #b91c1c; }
.jogo-claro .vj-escrever { background: #fff; color: #1b2230; border-color: rgba(0,0,0,.25); } .jogo-claro .vj-codigo { color: #7c4a00; }
.jogo-claro .vj-rel-q { background: rgba(0,0,0,.05); } .jogo-claro .vj-barra { background: rgba(0,0,0,.12); }

/* Elementos gráficos de Missão e Plano (sítios Web): faixa ilustrada, ícones de etapa e de conceito */
.deco-hero { max-width: 1100px; margin: 12px auto 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 12px; padding: 20px 28px; border-radius: 18px; color: #fff; overflow: hidden; background: linear-gradient(120deg, var(--dark, #1f4e79), var(--accent, #2a6fb0) 55%, var(--acc2, #2a9d8f)); box-shadow: 0 6px 18px rgba(0,0,0,.15); }
.deco-plano { background: linear-gradient(120deg, #0f3d3a, #1f6f5b 55%, #3b82f6); }
.deco-kicker { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.2); font-weight: 800; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; }
.deco-frase { margin: 10px 0 14px; font-size: clamp(18px, 2.4vw, 24px); font-weight: 700; line-height: 1.3; }
.deco-passos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.deco-passos li { padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.18); font-weight: 700; font-size: 15px; }
.deco-arte svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 10px rgba(0,0,0,.25)); }
@media (max-width: 700px) { .deco-hero { grid-template-columns: 1fr; padding: 16px; } .deco-arte { max-width: 360px; margin: 0 auto; } }
.tab-ic { display: block; font-size: 24px; line-height: 1.1; }
.deco-h2 { display: flex; align-items: center; gap: 12px; }
.deco-emb { flex: none; width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 26px; background: color-mix(in srgb, var(--accent) 16%, var(--papel)); border: 2px solid var(--accent); }
.deco-conc { margin-right: 8px; font-size: 1.15em; }
@media print { .deco-hero { display: none; } }

/* Ano rápido e turnos no painel */
.sel-ano { font: inherit; font-size: 14px; padding: 2px 6px; border-radius: 8px; border: 2px solid var(--borda-in); background: var(--papel); color: var(--texto); }
.turnos-caixa { background: var(--item-bg); border: 1px solid var(--borda); border-radius: 12px; padding: 10px 14px; margin: 8px 0 12px; }
.turnos-caixa .linha-a { align-items: center; margin: 6px 0 0; }
.etq.turno-T1 { background: #2a6fb0; color: #fff; } .etq.turno-T2 { background: #d6457f; color: #fff; }
.pv-turma { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.jogo .quiz-tempo { margin: 12px auto 14px; }
.jogo .quiz-tempo + .quiz-pergunta { margin-top: 0; }
.matriz-tab .col-sub { background: color-mix(in srgb, var(--accent) 8%, var(--papel)); font-size: 13px; }

/* Quizzes em aspeto claro (opção do utilizador, ver public/jogo.js) */
html.jogo.jogo-claro body { background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 16%, #fff) 0%, #f5f7fb 70%); color: #1b2230; }
.jogo-claro .jogo-topo, .jogo-claro .jogo-rodape { background: rgba(255,255,255,.85); color: #1b2230; box-shadow: 0 1px 6px rgba(0,0,0,.12); }
.jogo-claro .jogo-chip { background: rgba(0,0,0,.07); }
.jogo-claro .jogo-prog { background: rgba(0,0,0,.12); } .jogo-claro .jogo-prog div { background: var(--accent); }
.jogo-claro .jogo-nome, .jogo-claro .jogo-turma, .jogo-claro .pj-q { color: #334155; opacity: 1; }
.jogo-claro .quiz-n { background: #fff; color: #7c4a00; border: 1px solid rgba(0,0,0,.15); }
.jogo-claro .quiz-pergunta, .jogo-claro .pj-painel .pv-pergunta { background: #fff; color: #1b2230; border-color: rgba(0,0,0,.14); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.jogo-claro .quiz-intro, .jogo-claro .vivo-espera, .jogo-claro h3, .jogo-claro .quiz-final h2, .jogo-claro .quiz-final h3 { color: #1b2230; }
.jogo-claro .quiz-feedback { background: #fff; color: #1b2230; }
.jogo-claro .quiz-final, .jogo-claro .pj-cartao { background: #fff; color: #1b2230; border-color: rgba(0,0,0,.14); }
.jogo-claro .pj-cartao h2 { color: #1b2230; }
.jogo-claro .quiz-pontos, .jogo-claro .quiz-pontos span { color: #b45309; }
.jogo-claro .quiz-revisao .btn { background: #f1f5f9; color: #1b2230; }
.jogo-claro .btn.sec { background: #fff; color: var(--titulo, #1b2230); border-color: var(--accent); }
.jogo-claro .quiz-tempo-pista, .jogo-claro .pj-tempo-pista { background: rgba(0,0,0,.12); } .jogo-claro .quiz-tempo-barra { background: var(--accent); }
.jogo-claro .quiz-tempo b { color: #1b2230; }
.jogo-claro .pj-painel { background: color-mix(in srgb, var(--accent) 12%, #fff); }
.jogo-claro .pj-tab { color: #475569; } .jogo-claro .pj-tab.ativo { color: #1b2230; border-bottom-color: var(--accent); }
.jogo-claro .pj-num { border-bottom-color: rgba(0,0,0,.15); }
.jogo-claro .pj-alunos li { background: rgba(0,0,0,.05); } .jogo-claro .pj-estado { background: rgba(0,0,0,.1); } .jogo-claro .pj-estado.ok { background: #16a34a; color: #fff; }
.jogo-claro .pj-resp { color: #1b2230; } .jogo-claro .pj-relogio { color: #b45309; }
.jogo-claro .pv-sala span, .jogo-claro .pj-cartao .pv-sala span { background: #f1f5f9; color: #1b2230; border-color: rgba(0,0,0,.15); }
.jogo-claro .vivo-rank li, .jogo-claro .pv-rank li { background: #fff; color: #1b2230; border-color: rgba(0,0,0,.14); }
.jogo-claro .vivo-rank li.eu { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.jogo-claro .aviso-fechada { color: #b45309; }
.jogo-claro .jogo-topo .logo-ligacao img { background: transparent; padding: 0; }
.jogo-claro .quiz-op.certa, .jogo-claro .pv-op.certa { box-shadow: 0 0 0 5px #fff, 0 0 0 9px #16a34a; }
.jogo-claro .quiz-op.errada { box-shadow: 0 0 0 5px #fff, 0 0 0 9px #dc2626; }
.jogo-claro .pj-rodape { background: rgba(255,255,255,.85); color: #1b2230; box-shadow: 0 -1px 6px rgba(0,0,0,.12); }

/* Sub-turmas T1 e T2 ao lado de cada turma */
.grupo-chips { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; padding: 2px 6px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.chip-turno { font-size: 13px; border-style: dashed; }

/* Clarão verde ou vermelho ao saber se acertou */
.jogo-flash { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #fff; pointer-events: none; animation: jogo-flash 2.2s ease-out forwards; }
.jogo-flash.ok { background: rgba(22, 163, 74, .93); } .jogo-flash.ko { background: rgba(220, 38, 38, .93); }
.jogo-flash-ic { font-size: clamp(110px, 28vw, 260px); line-height: 1; font-weight: 800; }
.jogo-flash-txt { font-size: clamp(30px, 7vw, 64px); font-weight: 800; }
@keyframes jogo-flash { 0% { opacity: 0; transform: scale(.96); } 12% { opacity: 1; transform: scale(1); } 70% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .jogo-flash { animation: jogo-flash-rm 1.6s linear forwards; } @keyframes jogo-flash-rm { 0%, 80% { opacity: 1; } 100% { opacity: 0; } } }
html.jogo.res-ok body { background: radial-gradient(120% 90% at 50% 0%, #15803d 0%, #052e16 75%); }
html.jogo.res-ko body { background: radial-gradient(120% 90% at 50% 0%, #b91c1c 0%, #450a0a 75%); }
html.jogo.jogo-claro.res-ok body { background: radial-gradient(120% 90% at 50% 0%, #bbf7d0 0%, #f0fdf4 75%); }
html.jogo.jogo-claro.res-ko body { background: radial-gradient(120% 90% at 50% 0%, #fecaca 0%, #fef2f2 75%); }
.chip-turno.inativo { opacity: .75; }
.aviso-turnos { margin: 8px 0; padding: 8px 12px; border-radius: 10px; background: #fff7e0; border: 1px solid #e0b84a; color: #5a4300; font-weight: 600; }
:root[data-theme="dark"] .aviso-turnos { background: #3a3014; color: #f5dd9a; border-color: #8a6d1f; }
.seg-semestre { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.seg-semestre .btn.sel { background: var(--accent); color: var(--on-color); }
.seg-semestre .btn.sec.sel, .seg-semestre .btn.sec.sel:hover:not(:disabled) { background: var(--accent); color: var(--on-color); border-color: var(--accent); }

/* Versões (novidades) */
.versoes-data { margin: 18px 0 6px; font-size: 15px; color: var(--suave); letter-spacing: .04em; }
.versao-cartao { background: var(--papel); border: 1px solid var(--borda); border-left: 6px solid var(--accent); border-radius: 12px; padding: 10px 14px; margin: 8px 0; }
.versao-cartao.atual { border-color: var(--ok); border-left-color: var(--ok); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ok) 25%, transparent); }
.versao-cartao h4 { margin: 4px 0; font-size: 18px; } .versao-cartao ul { margin: 4px 0 2px; padding-left: 20px; } .versao-cartao li { margin: 2px 0; }
.versao-cab { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .versao-n { font-variant-numeric: tabular-nums; font-size: 16px; }
.versao-tipo { padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; }
.versao-tipo.t-novo { background: #2a6fb0; } .versao-tipo.t-melhoria { background: #177a5c; } .versao-tipo.t-correcao { background: #b3261e; }

/* Entrada local, demo e utilizadores locais */
.entradas-extra { margin-top: 14px; display: grid; gap: 10px; justify-items: center; }
.entradas-extra .mais-opcoes { text-align: left; max-width: 420px; width: 100%; }
.entrada-local { display: grid; gap: 8px; margin-top: 8px; }
.entrada-local input { font: inherit; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--borda-in); background: var(--papel); color: var(--texto); }
.entrada-local .mal { color: var(--erro); margin: 0; min-height: 1.2em; font-weight: 600; }
.demo-entrada { text-align: center; }
.aviso-demo { margin: 10px auto; max-width: 1100px; padding: 10px 16px; border-radius: 12px; background: #fff7e0; border: 2px solid #e0b84a; color: #5a4300; font-weight: 700; }
:root[data-theme="dark"] .aviso-demo { background: #3a3014; color: #f5dd9a; border-color: #8a6d1f; }
.senhas-novas { margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: #fff7e0; border: 2px solid #e0b84a; color: #3d2f00; }
.senhas-novas pre { margin: 6px 0; white-space: pre-wrap; user-select: all; font-size: 16px; }
:root[data-theme="dark"] .senhas-novas { background: #3a3014; color: #f5dd9a; border-color: #8a6d1f; }

/* Alinhamento: a faixa ilustrada ocupa a mesma largura que os cartões (coluna de 920 px com 14 px de margem) */
.deco-hero { max-width: 892px; width: calc(100% - 28px); box-sizing: border-box; }
.jogo-prof { max-width: 100%; }

/* Acabamentos de alinhamento (auditoria visual) */
.acoes-aluno { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.acoes-aluno .btn { white-space: nowrap; }
table.alunos td { vertical-align: middle; }
@media (max-width: 520px) { .acoes-aluno { flex-direction: column; align-items: stretch; } table.alunos { font-size: 15px; display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; } table.alunos th, table.alunos td { padding: 6px 6px; } }

/* Entrada: opções extra alinhadas com o botão principal e legíveis sobre o fundo colorido */
.hero-entrada .entradas-extra { justify-items: stretch; max-width: 420px; text-align: left; }
.hero-entrada .entradas-extra .mais-opcoes { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); border-radius: 12px; padding: 8px 12px; color: #fff; max-width: none; }
.hero-entrada .entradas-extra .mais-opcoes summary { color: #fff; font-weight: 700; cursor: pointer; }
.hero-entrada .demo-entrada { text-align: left; }
.hero-entrada .demo-entrada .btn { width: 100%; }
.hero-entrada .demo-entrada .nota, .hero-entrada .entrada-local .mal { color: rgba(255,255,255,.92); }
.hero-entrada .entrada-local .mal { background: rgba(0,0,0,.25); border-radius: 8px; padding: 0 6px; }
.hero-entrada .entrada-local .mal:empty { display: none; }
@media (max-width: 520px) { .acoes-aluno .btn { white-space: normal; text-align: center; } table.alunos td:last-child { min-width: 110px; } }

/* Ícone TIC ao lado do título da página principal */
.hero-titulo { display: flex; align-items: center; gap: 14px; margin: 6px 0; }
.hero-titulo h1 { margin: 0; }
.hero-icone { flex: none; width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 3px 10px rgba(0,0,0,.28); }
.hero-lema { margin: 2px 0 6px; font: 700 clamp(19px, 2.6vw, 24px)/1.25 Lexend, system-ui, sans-serif; }
@media (max-width: 640px) { .hero-icone { width: 44px; height: 44px; border-radius: 11px; } .hero-titulo { gap: 10px; } }

.campo-prof { flex: 1 1 260px; min-width: 0; max-width: 460px; font: inherit; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--borda-in); background: var(--input, var(--papel)); color: var(--texto); }
.etq-tu { margin-left: 8px; }

/* Ordem dos temas na página inicial (só para o professor) */
.tema-ordem { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.tema-ordem .btn { min-width: 38px; padding: 6px 10px; }
.tema-pega { cursor: grab; font-size: 24px; line-height: 1; padding: 6px 8px; color: var(--suave); user-select: none; touch-action: none; }
.tema-cab { flex-wrap: wrap; }
.temas-lista .tema-bloco.arrastando { opacity: .85; box-shadow: 0 8px 24px rgba(0,0,0,.25); position: relative; z-index: 3; }
.temas-lista .tema-bloco.alvo-antes { box-shadow: 0 -4px 0 0 var(--accent, #2a6fb0); }
.temas-lista .tema-bloco.alvo-fim { box-shadow: 0 4px 0 0 var(--accent, #2a6fb0); }

/* Cabeçalho da página principal com imagem: imagem, título, mensagem e números num só cartão */
.cabeca-img { background: var(--papel); border: 1px solid var(--borda); border-top: 6px solid var(--ac, var(--accent)); border-radius: 18px; overflow: hidden; margin: 0 0 16px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.cabeca-img .banner-aluno { max-height: none; height: auto; border-radius: 0; margin: 0; object-fit: contain; background: #fff; }
.cabeca-img-corpo { padding: 14px 22px 20px; border-top: 1px solid var(--borda); }
.cabeca-img .k { font-size: 13px; font-weight: 800; letter-spacing: .1em; color: var(--ac, var(--accent)); }
.cabeca-img h1 { margin: 4px 0 6px; font-size: clamp(24px, 3.6vw, 34px); line-height: 1.2; color: var(--titulo); }
.cabeca-img .msg-aluno { margin: 0 0 14px; max-width: 700px; color: var(--texto); }
.cabeca-img .estat-item, .cabeca-img .estat-item:nth-child(n) { background: color-mix(in srgb, var(--ac, var(--accent)) 10%, var(--papel)); border: 1px solid var(--borda); color: var(--texto); }
.cabeca-img .estat-item b { color: var(--titulo); }

/* Entrada com imagem de cabeçalho: botões e opções sobre o cartão claro */
.entrada-clara .btn.grande { max-width: 420px; width: 100%; box-sizing: border-box; margin-top: 4px; }
.entrada-clara .entradas-extra { max-width: 420px; justify-items: stretch; text-align: left; margin-top: 12px; }
.entrada-clara .nota { margin-top: 14px; }
.entrada-clara .demo-entrada { text-align: left; }
.entrada-clara .demo-entrada .btn { width: 100%; }

/* Modo projetor: esconde o que é só do professor */
html.projetor .prof-caixa, html.projetor .jogo-prof, html.projetor .so-prof, html.projetor .aviso-fechada-prof { display: none !important; }
.projetor-saida { position: fixed; right: 14px; bottom: 14px; z-index: 60; opacity: .5; border: 2px solid #fff; border-radius: 999px; padding: 12px 18px; font: inherit; font-size: 16px; font-weight: 700; background: var(--accent, #177a5c); color: var(--on-color); box-shadow: 0 3px 12px rgba(0,0,0,.35); cursor: pointer; transition: opacity .3s; }
.projetor-saida.ativo, .projetor-saida:hover, .projetor-saida:focus-visible { opacity: 1; }
@media print { .projetor-saida { display: none; } }

/* Turma em pausa */
.bloqueio { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; background: radial-gradient(120% 90% at 50% 20%, #dc2626 0%, #991b1b 60%, #7f1d1d 100%); color: #fff; }
.bloqueio-ic { font-size: clamp(80px, 22vw, 160px); line-height: 1; }
.bloqueio-tit { font-size: clamp(36px, 9vw, 84px); font-weight: 900; letter-spacing: .02em; text-transform: uppercase; line-height: 1.05; }
.bloqueio-txt { max-width: 520px; font-size: 20px; margin: 0; opacity: .9; }
.bloqueio-tempo { font-size: clamp(28px, 6vw, 48px); font-weight: 800; color: #fde68a; font-variant-numeric: tabular-nums; min-height: 1.2em; }
html.em-pausa body { overflow: hidden; }

/* Pausa de intervalo no painel */

/* Aviso de versão nova nas páginas de aluno */
.nova-versao { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 250; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; background: #1e3a8a; color: #fff; font-weight: 700; box-shadow: 0 4px 16px rgba(0,0,0,.35); }
html.com-nova-versao .chf-botao, html.com-nova-versao .op-botao { bottom: 96px; }
html.com-nova-versao .chf-painel { bottom: 156px; height: min(540px, calc(100vh - 180px)); }
html.com-nova-versao .op-balao { bottom: 148px; }
.nova-versao button { font: inherit; font-weight: 800; padding: 8px 16px; border-radius: 10px; border: 0; background: #fff; color: #1e3a8a; cursor: pointer; }

/* Resultados: células numa só linha, tabela com deslocação horizontal se for estreita */
.tabela-rolar { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
.tabela-rolar table.alunos { min-width: 920px; }
table.alunos td.nw, table.alunos.tab-res th { white-space: nowrap; }
table.alunos .pct { display: inline-block; min-width: 3.4em; margin-left: 6px; text-align: right; font-variant-numeric: tabular-nums; }
table.alunos td .etq { white-space: nowrap; display: inline-block; }
table.alunos td .nota { white-space: nowrap; }

/* ---------- Resultados da turma inteira (grelha `.rt-*`) e Alunos em fotografias (`.af-*`) ----------
   As três cores de estado (as da avaliação diária, que se distinguem com daltonismo) vêm sempre com um símbolo e texto:
   ◐ a meio (laranja), ✓ entregue ou concluída (verde-azulado), ✓ por avaliar (azul). O texto usa sempre a cor do texto,
   por cima de um fundo quase da cor do papel; a cor viva fica só no filete da esquerda. */
:root { --rt-meio: #c2410c; --rt-feito: #0d9488; --rt-avaliar: #1d4ed8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --rt-meio: #ea580c; --rt-feito: #0ea5a4; --rt-avaliar: #2563eb; } }
:root[data-theme="dark"] { --rt-meio: #ea580c; --rt-feito: #0ea5a4; --rt-avaliar: #2563eb; }
.seg-vista { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.res-cab, .al-cab { margin-bottom: 8px; }
.modal-ativ { margin: 2px 0 4px; font-size: 15px; color: var(--texto); }
/* Com a grelha da turma inteira à vista, a barra da turma não fica presa no topo: a grelha precisa da altura toda do ecrã
   (num navegador sem :has a barra continua presa e `fixarCabRt`, em admin.js, encolhe a caixa da grelha). */
.turma-barra:has(+ .res-turma) { position: static; }
.rt-filtros, .rt-acoes, .af-barra { gap: 8px 14px; }
.rt-filtros label, .rt-acoes label, .af-barra label { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.rt-filtros select, .rt-acoes select, .af-barra select { min-width: 0; max-width: 100%; }
.rt-filtros .interruptor { margin: 0; }
.admin-sec input.rt-procura, .admin-sec input.af-procura { width: 220px; max-width: 100%; min-width: 0; padding: 8px 10px; border: 2px solid var(--borda-in); border-radius: 8px; background: var(--input); color: var(--texto); }
.rt-leg, .rt-filtros-cx { margin: 8px 0; }
.rt-leg > summary, .rt-filtros-cx > summary { display: inline-block; padding: 2px 4px; border-radius: 6px; color: var(--titulo); font-size: 14px; font-weight: 700; cursor: pointer; list-style: none; }
.rt-leg > summary::before, .rt-filtros-cx > summary::before { content: "▸ "; }
.rt-leg[open] > summary::before, .rt-filtros-cx[open] > summary::before { content: "▾ "; }
.rt-leg > summary::-webkit-details-marker, .rt-filtros-cx > summary::-webkit-details-marker { display: none; }
.rt-filtros-cx .rt-filtros { margin: 0; }
/* No computador os filtros estão sempre à vista (sem o título que os recolhe); com muitas colunas, a secção da grelha
   usa a largura do ecrã (a classe `rt-larga` é posta por `fixarCabRt` quando a tabela não cabe na coluna da página). */
@media (min-width: 641px) { .rt-filtros-cx[open] > summary { display: none; } }
@media (min-width: 1160px) { .admin-sec.res-turma.rt-larga { width: min(calc(100vw - 56px), 1900px); margin-left: calc((100% - min(100vw - 56px, 1900px)) / 2); } }
.rt-legenda { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 0; padding: 0; font-size: 14px; color: var(--texto); }
.rt-legenda li { display: inline-flex; align-items: center; gap: 6px; }
/* «A meio»: um círculo meio cheio, desenhado aqui para ficar igual em todos os computadores (o tipo de letra não o tem). */
.rt-s-meio { display: inline-block; flex: none; width: 11px; height: 11px; border: 1.5px solid currentColor; border-radius: 50%; background: linear-gradient(90deg, currentColor 50%, transparent 50%); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rt-amostra { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 34px; min-height: 26px; padding: 2px 8px; border: 1px solid var(--borda-tab); border-radius: 6px; background: var(--papel); color: var(--texto); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rt-pe { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: baseline; margin: 6px 0; }
.rt-pe .nota { margin: 0; }
.rt-pe .rt-conta { font-weight: 700; color: var(--texto); }
.rt-rolar { max-width: 100%; max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); overflow: auto; background: var(--papel); }
.rt-rolar .rt-vazia { padding: 12px; margin: 0; }
.rt-tab { border-collapse: separate; border-spacing: 0; font-size: 14px; }
.rt-tab th, .rt-tab td { border-right: 1px solid var(--linha-tab); border-bottom: 1px solid var(--linha-tab); padding: 6px 8px; background: var(--papel); color: var(--texto); vertical-align: middle; }
.rt-tab .rt-sep { border-left: 2px solid var(--borda-in); }
/* Cabeçalho fixo: a linha dos temas no topo e a das atividades por baixo (o `top` desta é medido em admin.js, `fixarCabRt`);
   a coluna dos alunos fica presa à esquerda. */
.rt-tab thead th { position: sticky; top: 0; z-index: 2; background: var(--light); color: var(--titulo); font-weight: 700; text-align: center; }
.rt-tab th.rt-aluno { position: sticky; left: 0; z-index: 1; min-width: 172px; max-width: 240px; text-align: left; font-weight: 600; box-shadow: inset -2px 0 0 var(--borda-tab); }
.rt-tab thead th.rt-aluno { z-index: 4; vertical-align: bottom; }
.rt-tab thead th.rt-tema { border-top: 5px solid var(--fa, var(--accent)); padding: 5px 8px; text-align: left; }
.rt-tema-in { display: inline-block; position: sticky; left: calc(var(--rt-esq, 172px) + 8px); }
.rt-tema small { font-weight: 600; color: var(--suave); }
.rt-tab thead th.rt-at { width: 96px; min-width: 96px; max-width: 132px; padding: 5px 5px 6px; vertical-align: top; font-size: 13px; }
.rt-at-bot { display: block; width: 100%; padding: 2px; border: 0; border-radius: 6px; background: transparent; color: var(--titulo); font: inherit; font-weight: 700; line-height: 1.25; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.rt-at-bot:hover { background: var(--papel); text-decoration: underline; }
.rt-at-tit { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; line-height: 1.25; }
/* O tipo vem escrito: «Avaliação» a cheio, «Formativa» com contorno e «Ficha de trabalho» só em texto. */
.rt-tipo { display: inline-block; margin-top: 4px; padding: 0 6px; border: 1px solid var(--borda-in); border-radius: 999px; background: var(--papel); color: var(--texto); font-size: 13px; font-weight: 600; line-height: 1.35; }
.rt-tipo.rt-tipo-avaliacao { background: var(--titulo); border-color: var(--titulo); color: var(--papel); }
.rt-tipo.rt-tipo-normal { padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--suave); font-weight: 400; line-height: 1.2; }
.rt-oculta { display: block; font-size: 13px; font-weight: 400; font-style: italic; color: var(--suave); }
.rt-aluno-in { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.rt-nome { flex: 1 1 auto; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.rt-num { color: var(--suave); font-variant-numeric: tabular-nums; }
.rt-aluno .etq.apoio-etq { flex: none; margin: 0; }
.rt-mini { display: none; flex: 1 0 100%; font-size: 13px; font-weight: 400; color: var(--suave); font-variant-numeric: tabular-nums; }
.rt-tab .rt-res { min-width: 58px; padding: 6px 10px; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; background: var(--item-bg); }
.rt-tab thead th.rt-res { background: var(--light); vertical-align: bottom; }
.rt-tab td.rt-c { padding: 0; height: 1px; text-align: center; }
.rt-cel { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 5px; width: 100%; height: 100%; min-height: 36px; padding: 3px 6px; border: 0; background: transparent; color: var(--texto); font: inherit; font-variant-numeric: tabular-nums; line-height: 1.2; }
button.rt-cel { cursor: pointer; }
button.rt-cel:hover { box-shadow: inset 0 0 0 2px var(--tinta, var(--accent)); }
button.rt-cel:focus-visible, .rt-at-bot:focus-visible { outline: 3px solid var(--foco); outline-offset: -3px; }
.rt-t.man { font-weight: 800; }
.rt-tab td.rt-e-meio, .rt-amostra.rt-e-meio { background: color-mix(in srgb, var(--rt-meio) 14%, var(--papel)); box-shadow: inset 4px 0 0 var(--rt-meio); }
.rt-tab td.rt-e-feito, .rt-amostra.rt-e-feito { background: color-mix(in srgb, var(--rt-feito) 14%, var(--papel)); box-shadow: inset 4px 0 0 var(--rt-feito); }
.rt-tab td.rt-e-avaliar, .rt-amostra.rt-e-avaliar { background: color-mix(in srgb, var(--rt-avaliar) 13%, var(--papel)); box-shadow: inset 4px 0 0 var(--rt-avaliar); }
.rt-tab td.rt-e-nada .rt-cel, .rt-amostra.rt-e-nada, .rt-tab td.rt-e-disp .rt-cel, .rt-amostra.rt-e-disp { color: var(--suave); }
.rt-tab td.rt-e-disp .rt-cel, .rt-amostra.rt-e-disp { font-style: italic; }
.rt-tab td.rt-e-fora, .rt-amostra.rt-e-fora { background: repeating-linear-gradient(135deg, var(--item-bg) 0 6px, var(--linha-tab) 6px 7px); }
.rt-tab td.rt-e-feito .rt-t, .rt-tab td.rt-e-prof .rt-t { font-size: 15px; }
.rt-tab tbody tr:hover th.rt-aluno { background: var(--light); }
.rt-tab tfoot th, .rt-tab tfoot td { background: var(--light); border-top: 2px solid var(--borda-in); font-size: 13px; }
.rt-tab tfoot td.rt-sum { padding: 4px 6px; line-height: 1.3; }
.rt-tab tfoot td.rt-sum span, .rt-tab tfoot td.rt-sum b { display: block; white-space: nowrap; }
.rt-tab tfoot td.rt-sum span.rt-sum-vazio { white-space: normal; color: var(--suave); }
.rt-tab tfoot th small { display: block; font-weight: 400; color: var(--suave); }
@media (min-height: 640px) { .rt-tab tfoot th, .rt-tab tfoot td { position: sticky; bottom: 0; z-index: 2; } .rt-tab tfoot th.rt-aluno { z-index: 3; } }
/* No telemóvel a grelha desliza para o lado dentro da sua caixa; as colunas «Feitas» e «Média» passam para baixo do nome. */
@media (max-width: 640px) {
  .rt-tab { font-size: 13px; }
  .rt-tab th.rt-aluno { min-width: 118px; max-width: 132px; padding: 5px 6px; }
  .rt-tema-in { left: calc(var(--rt-esq, 118px) + 6px); }
  .rt-tab thead th.rt-at { width: 86px; min-width: 86px; }
  .rt-tab .rt-res { display: none; }
  .rt-mini { display: block; }
  .rt-tab tfoot .rt-mini { display: inline; }
  .admin-sec input.rt-procura, .admin-sec input.af-procura { width: 100%; }
}
/* Alunos em fotografias: um cartão por aluno, com a fotografia (ou as iniciais), o número num selo e o nome por baixo. */
.af-conta { margin: 4px 0 10px; }
.af-grelha { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--af-w, 136px), 1fr)); gap: 14px; }
.af-grelha.af-tam-p { --af-w: 98px; gap: 10px; }
.af-grelha.af-tam-g { --af-w: 190px; gap: 18px; }
.af-cartao { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 8px 10px; background: var(--papel); border: 2px solid var(--tinta, var(--borda-in)); border-radius: 16px; box-shadow: 3px 3px 0 var(--sombra, transparent); text-align: center; }
.af-cartao:hover, .af-cartao:focus-within { background: var(--light); }
.af-grelha .af-vazia { grid-column: 1 / -1; margin: 0; }
.af-lig { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; color: var(--texto); text-decoration: none; }
.af-lig::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.af-lig:focus-visible { outline: none; }
.af-lig:focus-visible::after { outline: 3px solid var(--foco); outline-offset: 2px; }
.af-foto { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; border: 1px solid var(--borda-tab); border-radius: 10px; background: var(--item-bg); }
.af-foto.vazia { display: flex; align-items: center; justify-content: center; border: 2px dashed var(--borda-in); color: var(--suave); font-family: Lexend, "Atkinson Hyperlegible", system-ui, sans-serif; font-size: 36px; font-weight: 700; letter-spacing: .03em; }
.af-tam-p .af-foto.vazia { font-size: 26px; }
.af-tam-g .af-foto.vazia { font-size: 50px; }
.af-leg { display: block; min-width: 0; }
.af-num { position: absolute; top: 13px; left: 13px; min-width: 28px; height: 28px; padding: 0 6px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--tinta, var(--borda-in)); border-radius: 999px; background: var(--papel); color: var(--texto); font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.af-tam-p .af-num { top: 10px; left: 10px; min-width: 24px; height: 24px; font-size: 13px; }
.af-nome { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; color: var(--titulo); font-size: 15px; font-weight: 700; line-height: 1.25; }
.af-tam-p .af-nome { font-size: 13px; }
.af-tam-g .af-nome { font-size: 17px; }
.af-cartao .etq.apoio-etq { position: relative; z-index: 1; margin: 0; }
@media (max-width: 420px) { .af-grelha { gap: 10px; } .af-grelha.af-tam-m { --af-w: 104px; } .af-grelha.af-tam-g { --af-w: 150px; } }
/* Impressão de uma parte só da página (a grelha dos resultados ou as fotografias): `imprimirSo` em admin.js põe o elemento
   no fim do <body> e só ele se imprime. */
.rt-impressao, .af-impressao { display: none; }
@media print {
  body.rt-a-imprimir > *:not(.rt-impressao), body.af-a-imprimir > *:not(.af-impressao) { display: none !important; }
  body.rt-a-imprimir .rt-impressao, body.af-a-imprimir .af-impressao { display: block !important; color: #000; }
  .rt-impressao h1, .af-impressao h1 { margin: 0 0 2mm; font-size: 15pt; color: #000; }
  .rt-imp-nota, .rt-imp-parte, .af-imp-nota { margin: 0 0 3mm; font-size: 9pt; color: #222; }
  .rt-imp-folha + .rt-imp-folha { break-before: page; }
  .rt-tab.rt-imp { width: 100%; font-size: 8.5pt; border-top: 0.3mm solid #777; border-left: 0.3mm solid #777; }
  .rt-tab.rt-imp th, .rt-tab.rt-imp td { position: static; padding: 1mm 1.2mm; border-color: #777; background: #fff; color: #000; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rt-tab.rt-imp .rt-sep { border-left: 0.5mm solid #333; }
  .rt-tab.rt-imp thead th.rt-at { width: auto; min-width: 0; max-width: none; font-size: 8pt; }
  .rt-tab.rt-imp th.rt-aluno { min-width: 38mm; max-width: 52mm; }
  .rt-tab.rt-imp .rt-res { min-width: 0; }
  .rt-tab.rt-imp .rt-cel { min-height: 0; padding: 0; color: #000; }
  .rt-tab.rt-imp .rt-tipo, .rt-tab.rt-imp .rt-oculta, .rt-tab.rt-imp .rt-res small, .rt-tab.rt-imp tfoot td, .rt-tab.rt-imp tfoot th { font-size: 7.5pt; color: #000; }
  .rt-tab.rt-imp .rt-tipo { background: #fff; border-color: #555; }
  .rt-tab.rt-imp .rt-tipo.rt-tipo-avaliacao { background: #333; border-color: #333; color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rt-tab.rt-imp td.rt-e-meio { background: #fde9dc; box-shadow: inset 1mm 0 0 #c2410c; }
  .rt-tab.rt-imp td.rt-e-feito { background: #dff3f0; box-shadow: inset 1mm 0 0 #0d9488; }
  .rt-tab.rt-imp td.rt-e-avaliar { background: #e1e9fb; box-shadow: inset 1mm 0 0 #1d4ed8; }
  .rt-tab.rt-imp tr { break-inside: avoid; }
  .af-imp-grelha { display: grid; gap: 3mm; }
  .af-imp-grelha.c5 { grid-template-columns: repeat(5, 1fr); }
  .af-imp-grelha.c6 { grid-template-columns: repeat(6, 1fr); }
  .af-imp-cartao { margin: 0; break-inside: avoid; text-align: center; }
  .af-imp-cartao .af-foto { border: 0.3mm solid #777; border-radius: 2mm; }
  .af-imp-cartao .af-foto.vazia { border: 0.3mm dashed #777; color: #444; font-size: 20pt; background: #fff; }
  .af-imp-cartao figcaption { height: 2.5em; margin-top: 1mm; overflow: hidden; font-size: 9pt; font-weight: 700; line-height: 1.2; color: #000; }
}

/* Bloqueio de atividades */
.selo.bloq { background: var(--erro-bg); color: var(--erro-txt); }
.ativ-bloqueio { margin-top: 6px; align-items: center; }

/* Turmas e alunos: painel mais simples */
.seg-semestre { display: inline-flex; gap: 0; border: 2px solid var(--accent); border-radius: 14px; overflow: hidden; }
.seg-semestre .btn.seg-turno { display: flex; flex-direction: column; align-items: center; gap: 0; min-height: 0; padding: 8px 20px; border: 0; border-radius: 0; background: transparent; color: var(--accent); line-height: 1.2; }
.seg-semestre .btn.seg-turno small { font-size: 13px; font-weight: 600; opacity: .85; }
.seg-semestre .btn.seg-turno.sel, .seg-semestre .btn.sec.seg-turno.sel:hover:not(:disabled) { background: var(--accent); color: var(--on-color); }
.sec-turmas .tabs-turma { margin: 14px 0 8px; gap: 10px; }
.tabs-turma .btn.sec.chip-turma { display: flex; flex-direction: column; align-items: center; min-width: 92px; padding: 8px 16px; border-radius: 14px; line-height: 1.2; }
.chip-turma b { font-size: 20px; }
.chip-turma small { font-size: 13px; font-weight: 600; opacity: .85; }
.tabs-turma .btn.sec.chip-turma.chip-nova { border-style: dashed; justify-content: center; color: var(--suave); border-color: var(--borda-in); }
.chip-nova b { font-size: 16px; }
.nova-turma { margin: 4px 0 8px; align-items: center; }
.sec-turmas .turnos-caixa { margin: 10px 0 4px; }
.demo-linha { margin-top: 10px; font-size: 15px; color: var(--suave); }
.turma-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 52px; padding: 0 8px; border-radius: 14px; background: var(--ay, var(--accent)); color: var(--on-color); font-size: 22px; font-weight: 800; }

/* Atividades da turma: botões grandes de iniciar, esconder e bloquear */

/* Post de rede social (Missão: 1 post): cartão que escala com a largura */
.post-cartao { text-align: left; container-type: inline-size; background: #EFE3F8; color: #222; border-radius: 16px; aspect-ratio: 4 / 5; width: 100%; max-width: 520px; box-shadow: 0 2px 10px rgba(80, 48, 111, .25); font-family: Calibri, "Carlito", "Lato", system-ui, sans-serif; line-height: 1.25; }
.post-in { --pf: 3.6cqw; padding: 7cqw 7cqw 6cqw; display: flex; flex-direction: column; gap: 3.6cqw; min-height: 100%; }
.post-in > * { flex-shrink: 0; }
.post-cartao * { box-sizing: border-box; }
.post-factos li, .post-opiniao, .post-titulo { overflow-wrap: anywhere; min-width: 0; }
.post-cab { font-size: 2.6cqw; letter-spacing: .14em; font-weight: 800; color: #50306F; }
.post-titulo { font-size: 7cqw; line-height: 1.12; font-weight: 800; color: #50306F; margin: 0; }
.post-img { border-radius: 4cqw; overflow: hidden; background: #7B4EA3; color: #fff; display: flex; align-items: center; justify-content: center; font-size: var(--pf); font-weight: 700; min-height: 12cqw; flex: 0 0 auto; }
.post-img:not(.com) { aspect-ratio: 16 / 5; }
.post-img.com img { width: 100%; max-height: 38cqw; object-fit: cover; display: block; }
/* A caixa da imagem acompanha o formato da imagem: horizontal larga, quadrada mais pequena e ao centro, vertical alta e ao centro. */
.post-img.com.h { width: 100%; aspect-ratio: var(--r, 1.6); max-height: 38cqw; }
.post-img.com.h img { height: 100%; max-height: none; }
.post-img.com.q { width: 38cqw; aspect-ratio: 1; align-self: center; }
.post-img.com.q img { height: 100%; max-height: none; }
.post-img.com.v { height: 44cqw; width: auto; aspect-ratio: var(--r, .75); align-self: center; }
.post-img.com.v img { height: 100%; width: 100%; max-height: none; }
.post-factos { list-style: none; margin: 0; padding: 3.4cqw 4cqw; background: #fff; border-radius: 4cqw; display: flex; flex-direction: column; gap: 2.6cqw; }
.post-factos li { display: flex; gap: 3cqw; align-items: center; font-size: var(--pf); }
.post-n { flex: 0 0 auto; width: 7.4cqw; height: 7.4cqw; border-radius: 50%; background: #3A6FD8; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 3.6cqw; }
.post-opiniao { background: #fff; border: .6cqw solid #2A9D8F; border-radius: 3.4cqw; padding: 3cqw 3.6cqw; font-size: var(--pf); }
.post-opiniao b { color: #2A9D8F; }
.post-pe { margin-top: auto; display: flex; justify-content: space-between; gap: 3cqw; font-size: 2.7cqw; color: #444; }
.post-f { color: #E09F1F; }
.post-cartao .vazio { color: #8a7a99; font-style: italic; }
.post-cartao .escondido { display: none !important; }
.post-cartao .post-img .vazio { color: #fff; }
.post-previa { margin: 14px 0; padding: 12px; border: 1px dashed var(--borda-in); border-radius: 14px; background: var(--item-bg); }
.post-previa > h3 { margin: 0 0 8px; }
.post-previa .post-cartao { margin: 0 auto; }
.post-previa details { margin: 10px 0 0; }
.palavras-contador { font-size: 14px; color: var(--suave); margin-top: 4px; }
.palavras-contador.ok { color: var(--ok-txt); }
.palavras-contador.mal { color: var(--erro-txt); font-weight: 700; }

/* Galeria dos posts (professor) */
.galeria { max-width: 1400px; margin: 0 auto; padding: 12px 16px 40px; }
.galeria-topo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.galeria-topo h1 { margin: 0; font-size: 26px; }
.galeria-topo .quem { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.galeria-ctrl { align-items: center; gap: 12px 20px; margin: 10px 0; }
.galeria-grelha { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 14px; }
.galeria-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; border: 2px solid transparent; border-radius: 16px; background: none; cursor: pointer; font: inherit; color: inherit; }
.galeria-item:hover, .galeria-item:focus-visible { border-color: var(--accent); background: var(--item-bg); }
.galeria-nome { font-weight: 700; }
.galeria-nome em { font-weight: 400; color: var(--suave); }
.galeria-grande { position: fixed; inset: 0; z-index: 50; background: rgba(15, 10, 25, .93); display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px; }
.galeria-palco { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #fff; }
.galeria-palco .post-cartao { width: min(90vw, calc((100vh - 110px) * .8)); max-width: none; }
.galeria-legenda { font-size: 18px; font-weight: 700; }
.galeria-seta { font-size: 36px; width: 64px; height: 64px; padding: 0; border-radius: 50%; flex: 0 0 auto; }
.galeria-fechar { position: absolute; top: 12px; right: 12px; }
@media (max-width: 640px) { .galeria-seta { width: 44px; height: 44px; font-size: 26px; } .galeria-grande { gap: 4px; padding: 6px; } }
@media print { .post-impressao { margin: 0 auto 10mm; width: 130mm; break-after: page; } .post-impressao .post-cartao { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Python no navegador (atividades de código) */
.py-ex { margin: 8px 0 18px; }
.py-enunciado { white-space: pre-line; background: var(--papel); border: 1px solid var(--borda); border-left: 6px solid var(--accent); border-radius: 12px; padding: 12px 14px; margin: 8px 0 12px; }
.py-barra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
.py-barra .btn.verificar { background: #177a5c; border-color: #177a5c; color: #fff; }
.py-run { margin-left: 4px; }
.py-editor { display: flex; background: #1e1e2e; border-radius: 12px; overflow: hidden; border: 2px solid #3b3b55; min-height: 220px; max-height: 520px; }
.py-editor:focus-within { border-color: var(--accent); }
.py-num { flex: 0 0 auto; min-width: 42px; padding: 10px 8px 10px 6px; text-align: right; color: #6c7086; background: #181825; font: 14px/1.55 "JetBrains Mono", Consolas, Menlo, "DejaVu Sans Mono", monospace; white-space: pre; user-select: none; will-change: transform; }
.py-editor { position: relative; }
.py-num-quadro { overflow: hidden; }
.py-corpo { position: relative; flex: 1 1 auto; overflow: hidden; min-width: 0; }
.py-hl, .py-ta { margin: 0; padding: 10px 12px; border: 0; font: 14px/1.55 "JetBrains Mono", Consolas, Menlo, "DejaVu Sans Mono", monospace; white-space: pre; tab-size: 4; letter-spacing: 0; }
.py-hl { position: absolute; left: 0; top: 0; color: #cdd6f4; pointer-events: none; will-change: transform; }
.py-ta { position: relative; display: block; width: 100%; height: 100%; min-height: 220px; max-height: 520px; resize: none; background: transparent; color: transparent; caret-color: #f5e0dc; overflow: auto; outline: none; -webkit-text-fill-color: transparent; }
.py-ta::selection { background: rgba(137, 180, 250, .35); -webkit-text-fill-color: transparent; }
.py-ta:disabled { opacity: .7; }
.py-hl .py-k { color: #cba6f7; } .py-hl .py-s { color: #a6e3a1; } .py-hl .py-n { color: #fab387; } .py-hl .py-c { color: #8c91ab; font-style: italic; } .py-hl .py-b { color: #89b4fa; } .py-hl .py-f { color: #f9e2af; }
.py-tit { margin: 14px 0 6px; }
.py-saida { margin: 0; padding: 10px 12px; min-height: 90px; max-height: 320px; overflow: auto; background: #11111b; color: #e6e6f0; border-radius: 12px; font: 14px/1.5 "JetBrains Mono", Consolas, Menlo, "DejaVu Sans Mono", monospace; white-space: pre-wrap; word-break: break-word; }
.py-saida .erro { color: #f38ba8; }
.py-entrada { display: flex; gap: 6px; margin-top: 4px; }
.py-entrada-campo { flex: 1; min-width: 0; padding: 6px 8px; border-radius: 8px; border: 2px solid #89b4fa; background: #1e1e2e; color: #fff; font: inherit; }
.py-erro:empty, .py-testes:empty, .py-dicas:empty { display: none; }
.py-erro { margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: var(--erro-bg); color: var(--erro-txt); border: 2px solid #dc2626; }
.py-erro-tit { font-weight: 800; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.py-erro pre { white-space: pre-wrap; font-size: 13px; }
.py-dicas { margin: 10px 0; display: grid; gap: 6px; }
.py-dica { padding: 8px 12px; border-radius: 10px; background: var(--aviso-bg); border: 1px solid #e0b84a; }
.py-testes { margin: 12px 0; display: grid; gap: 6px; }
.py-testes-cab { font-weight: 800; font-size: 17px; padding: 8px 12px; border-radius: 10px; background: var(--erro-bg); color: var(--erro-txt); }
.py-testes-cab.ok { background: var(--ok-bg); color: var(--ok-txt); }
.py-teste { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--borda); background: var(--papel); }
.py-teste.ok { border-left: 6px solid #177a5c; } .py-teste.ko { border-left: 6px solid #dc2626; }
.py-teste-det { margin-top: 4px; font-size: 14px; } .py-teste-det .k { font-weight: 700; } .py-teste-det code { white-space: pre-wrap; }
.py-turtle { margin: 12px 0; }
.py-tela { display: block; width: 100%; max-width: 800px; height: auto; background: #fff; border: 2px solid var(--borda-in); border-radius: 12px; }
.py-turtle .linha-a { margin-top: 6px; }
.py-solucao pre { white-space: pre-wrap; background: var(--item-bg); padding: 8px; border-radius: 8px; }
.py-nav .tab b { font-size: 18px; }
.py-nav .tab small { display: block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .py-editor, .py-ta { min-height: 180px; } .py-hl, .py-ta, .py-num { font-size: 13px; } }
.codigo-ed { font-family: "JetBrains Mono", Consolas, Menlo, "DejaVu Sans Mono", monospace; font-size: 14px; white-space: pre; }
.painel-entrega .nota { color: #dbeafe; }

/* Crédito no fundo de todas as páginas */
.rodape-credito { max-width: 1100px; margin: 28px auto 18px; padding: 12px 16px; text-align: center; font-size: 13px; color: var(--suave); border-top: 1px solid var(--borda); }
html.jogo .rodape-credito { color: rgba(255, 255, 255, .55); border-top-color: rgba(255, 255, 255, .15); }
@media print { .rodape-credito { display: none; } }
.py-motor { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 10px; font-weight: 600; }
.py-motor select { padding: 6px 10px; border: 2px solid var(--borda-in); border-radius: 8px; background: var(--input); color: inherit; font: inherit; }
.py-motor .nota { font-weight: 400; flex: 1 1 260px; }

/* Lições do tutorial de Python */
.py-licao { margin: 8px 0 14px; padding: 12px 16px; border-radius: 14px; background: var(--papel); border: 1px solid var(--borda); border-left: 6px solid #c23d14; }
.py-licao h3 { margin: 0 0 6px; color: #c23d14; }
.py-licao p, .py-licao ul { margin: 8px 0; line-height: 1.5; }
.py-licao code { background: var(--item-bg); padding: 1px 6px; border-radius: 6px; font: 0.92em "JetBrains Mono", Consolas, Menlo, "DejaVu Sans Mono", monospace; }
.py-exemplo { margin: 10px 0; border-radius: 12px; overflow: hidden; background: #1e1e2e; }
.py-exemplo-cod { margin: 0; padding: 10px 14px; color: #cdd6f4; font: 14px/1.55 "JetBrains Mono", Consolas, Menlo, "DejaVu Sans Mono", monospace; white-space: pre; overflow-x: auto; }
.py-exemplo-cod .py-k { color: #cba6f7; } .py-exemplo-cod .py-s { color: #a6e3a1; } .py-exemplo-cod .py-n { color: #fab387; } .py-exemplo-cod .py-c { color: #8c91ab; font-style: italic; } .py-exemplo-cod .py-b { color: #89b4fa; } .py-exemplo-cod .py-f { color: #f9e2af; }
.py-exemplo-btn { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 12px; background: #181825; }

/* Os meus programas */
.py-meus { margin: 14px 0; padding: 10px 14px; border-radius: 14px; background: var(--papel); border: 1px solid var(--borda); border-left: 6px solid #177a5c; }
.py-meus > summary { cursor: pointer; font-weight: 800; font-size: 17px; }
.py-prog-novo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.py-prog-nome { flex: 1 1 200px; min-width: 0; padding: 8px 10px; border: 2px solid var(--borda-in); border-radius: 8px; background: var(--input); color: inherit; font: inherit; }
.py-prog { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--borda); }
.py-prog-info { display: flex; flex-direction: column; min-width: 0; }
.py-prog-btn { display: flex; flex-wrap: wrap; gap: 6px; }

/* Vista dos exercícios (professor) */
.pagina-exercicios .prof { max-width: 1000px; margin: 0 auto; padding: 12px 16px 40px; }
.ex-indice { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 16px; }
.ex-indice a { text-decoration: none; color: inherit; }
.ex-cartao { margin: 16px 0; padding: 14px 16px; border-radius: 14px; background: var(--papel); border: 1px solid var(--borda); border-left: 6px solid #c23d14; break-inside: avoid-page; }
.ex-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ex-cab h2 { margin: 0 8px 0 0; font-size: 20px; }
.ex-caixa { margin: 10px 0; }
.ex-caixa h4 { margin: 0 0 4px; color: var(--suave); text-transform: uppercase; font-size: 13px; letter-spacing: .08em; }
.ex-cod { margin: 0; padding: 10px 12px; border-radius: 10px; background: #1e1e2e; color: #cdd6f4; font: 13.5px/1.5 "JetBrains Mono", Consolas, Menlo, "DejaVu Sans Mono", monospace; white-space: pre-wrap; }
.ex-cod .py-k { color: #cba6f7; } .ex-cod .py-s { color: #a6e3a1; } .ex-cod .py-n { color: #fab387; } .ex-cod .py-c { color: #8c91ab; font-style: italic; } .ex-cod .py-b { color: #89b4fa; } .ex-cod .py-f { color: #f9e2af; }
.ex-tab { width: 100%; border-collapse: collapse; font-size: 14px; }
.ex-tab th, .ex-tab td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--borda); vertical-align: top; }
.ex-tab pre { margin: 0; white-space: pre-wrap; font: 13px/1.4 "JetBrains Mono", Consolas, Menlo, "DejaVu Sans Mono", monospace; }
@media print { .no-print { display: none !important; } .ex-cod { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .ex-cartao { border-left-width: 4px; } }

/* Programação por blocos */
.bl-envolvente { margin: 0 0 8px; }
.bl-editor { border: 2px solid #3b3b55; border-radius: 12px; overflow: hidden; background: #fff; }
.bl-cols { display: flex; min-height: 380px; max-height: 640px; }
.bl-col-paleta { flex: 0 0 230px; display: flex; flex-direction: column; background: #f2f4f9; border-right: 2px solid #d9deea; min-height: 0; }
.bl-paleta { flex: 1 1 auto; overflow-y: auto; padding: 8px; touch-action: pan-y; }
.bl-lixo { flex: 0 0 auto; padding: 8px; font-size: 13px; text-align: center; color: #667; border-top: 2px dashed #c7cde0; }
.bl-lixo-ativo { background: #ffe1e1; color: #b00020; }
.bl-grupo { margin: 0 0 10px; }
.bl-cat { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; color: #334; margin: 6px 0 4px; }
.bl-cat-bola { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.bl-area { position: relative; flex: 1 1 auto; overflow: auto; background: #fafbff; background-image: radial-gradient(#dfe3f0 1px, transparent 1px); background-size: 18px 18px; min-height: 380px; }
.bl-espaco { position: absolute; width: 1px; height: 1px; pointer-events: none; visibility: hidden; }
.bl-dica { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #99a; margin: 0; pointer-events: none; }
.bl-pilha { position: absolute; display: flex; flex-direction: column; align-items: flex-start; min-width: 80px; }
.bl-solta { opacity: .6; outline: 2px dashed #b9bfd6; outline-offset: 4px; border-radius: 10px; }
.bl { --c: #4c97ff; position: relative; box-sizing: border-box; color: #1b2230; font: 600 14px/1.2 system-ui, "Segoe UI", sans-serif; touch-action: none; user-select: none; cursor: grab; }
.bl .bl-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 10px; min-height: 34px; }
.bl-instr, .bl-chapeu { background: var(--c); border-radius: 6px; margin-top: -1px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); }
.bl-instr { border-top-left-radius: 4px; }
.bl-chapeu { border-radius: 18px 18px 6px 6px; padding-top: 6px; }
.bl-valor { display: inline-flex; background: var(--c); border-radius: 16px; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18); }
.bl-valor .bl-linha { padding: 3px 8px; min-height: 26px; }
.bl-bool { display: inline-flex; background: var(--c); clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%); padding: 0 4px; }
.bl-bool .bl-linha { padding: 3px 12px; min-height: 26px; }
.bl-in { display: inline-flex; align-items: center; min-width: 26px; min-height: 22px; border-radius: 12px; background: rgba(255, 255, 255, .92); padding: 0 3px; }
.bl-in-bool { background: rgba(0, 0, 0, .22); border-radius: 4px; min-width: 38px; justify-content: center; clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%); }
.bl-in .bl { margin: 1px 0; }
.bl-vazio { color: #fff; opacity: .7; font-size: 13px; }
.bl-campo { box-sizing: content-box; border: 0; background: transparent; color: #223; font: 700 14px system-ui, sans-serif; text-align: center; min-width: 2ch; padding: 2px 3px; outline: none; cursor: text; }
.bl-nome { background: rgba(255, 255, 255, .92); border-radius: 10px; color: #223; padding: 2px 6px; }
.bl-sel { border: 0; border-radius: 10px; background: rgba(255, 255, 255, .92); color: #223; font: 700 13px system-ui, sans-serif; padding: 3px 4px; cursor: pointer; }
.bl-slot { margin: 0 0 0 16px; padding: 4px 0 4px 0; min-height: 14px; border-left: 14px solid var(--c); background: rgba(255, 255, 255, .12); }
.bl-slot-vazio { min-height: 30px; background: rgba(0, 0, 0, .12); }
.bl-slot .bl { margin-left: 0; }
.bl .bl-slot { margin-left: 0; margin-right: 0; border-left-width: 16px; border-radius: 0; }
.bl-rot-c { padding-top: 2px; padding-bottom: 2px; min-height: 24px; }
.bl-fecho { height: 12px; }
.bl-modelo { margin: 2px 0 6px; cursor: grab; }
.bl-modelo .bl-in, .bl-modelo .bl-campo, .bl-modelo .bl-sel { pointer-events: none; }
.bl-fantasma { position: fixed; z-index: 2000; pointer-events: none; opacity: .92; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); display: flex; flex-direction: column; align-items: flex-start; }
.bl-a-arrastar, .bl-a-arrastar * { cursor: grabbing !important; }
.bl-alvo { outline: 3px solid #ffe14d; outline-offset: 1px; }
.bl-alvo-antes { box-shadow: 0 -5px 0 #ffe14d; }
.bl-alvo-depois { box-shadow: 0 5px 0 #ffe14d; }
.bl-alvo-vazio { outline: 3px solid #ffe14d; }
.bl-ver-py { margin: 8px 0; }
.bl-ver-py summary { cursor: pointer; font-weight: 700; }
.bl-py { max-height: 260px; overflow: auto; }
@media (max-width: 720px) { .bl-cols { flex-direction: column; max-height: none; } .bl-col-paleta { flex: 0 0 auto; border-right: 0; border-bottom: 2px solid #d9deea; max-height: 220px; } .bl-area { min-height: 320px; } }

/* ---------- Criador de apps (/m/apps/) ---------- */
.ap-corpo { display: flex; gap: 14px; align-items: flex-start; margin: 8px 0; }
.ap-esq { flex: 1 1 auto; min-width: 0; }
.ap-dir { flex: 0 0 300px; display: flex; flex-direction: column; align-items: center; gap: 8px; position: sticky; top: 8px; }
.ap-modos { justify-content: center; }
.ap-abas { margin-bottom: 8px; }
.ap-zona.escondido { display: none !important; }
.ap-painel { display: flex; flex-direction: column; gap: 10px; }
.ap-grupo, .ap-props { border: 2px solid #d9deea; border-radius: 12px; padding: 10px 12px; background: #fff; color: #1d2433; }
.ap-grupo h4, .ap-props h4 { margin: 0 0 8px; font-size: 14px; }
.ap-linha { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
.ap-rot { flex: 0 0 120px; font-weight: 700; font-size: 13px; }
.ap-linha input[type="text"], .ap-linha input[type="number"], .ap-linha select { flex: 1 1 140px; min-width: 0; padding: 6px 8px; border: 2px solid #c7cde0; border-radius: 8px; font: inherit; background: #fff; color: #1d2433; }
.ap-nums { display: flex; gap: 6px; flex: 1 1 200px; }
.ap-nums input { width: 30%; flex: 1 1 0; }
.ap-paleta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ap-comps { display: flex; flex-direction: column; gap: 4px; }
.ap-comp-item { text-align: left; padding: 6px 10px; border: 2px solid #d9deea; border-radius: 8px; background: #f7f9fd; color: #1d2433; font: inherit; cursor: pointer; }
.ap-comp-item.sel { border-color: #2a6fb0; background: #e3f0ff; font-weight: 700; }
.ap-cores { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-cor { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #8b93a8; cursor: pointer; padding: 0; background: #fff; }
.ap-cor.sel { outline: 3px solid #2a6fb0; outline-offset: 2px; }
.ap-cor.nenhuma { background: repeating-linear-gradient(45deg, #fff, #fff 4px, #e3e6ee 4px, #e3e6ee 8px); }
.ap-seg { display: flex; gap: 4px; flex-wrap: wrap; }
.ap-emojis { display: flex; flex-wrap: wrap; gap: 4px; max-width: 320px; }
.ap-emoji { font-size: 20px; width: 36px; height: 36px; border: 2px solid #d9deea; border-radius: 8px; background: #fff; cursor: pointer; }
.ap-emoji.sel { border-color: #2a6fb0; background: #e3f0ff; }
/* telemóvel simulado */
.ap-tel { position: relative; width: 280px; height: 520px; border: 10px solid #1d2433; border-radius: 34px; background: #1d2433; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.ap-barra { flex: 0 0 auto; background: #1d2433; color: #fff; font-size: 13px; font-weight: 700; padding: 2px 12px 6px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-ecra { flex: 1 1 auto; position: relative; overflow: hidden; padding: 0; background: #fff; color: #222; border-radius: 12px; }
.ap-ecra.ap-fluxo { display: flex; flex-direction: column; gap: 8px; padding: 10px; overflow-y: auto; }
.ap-ecra.ap-fluxo > .ap-pos, .ap-ecra.ap-fluxo > .ap-item { position: relative !important; }
.ap-pos { position: absolute; }
.ap-c { box-sizing: border-box; width: 100%; font-family: inherit; border-radius: 10px; padding: 8px 10px; word-break: break-word; }
.ap-botao { border: 0; color: #fff; background: #1890ff; font-weight: 700; cursor: pointer; }
.ap-botao:active { filter: brightness(.9); }
.ap-etiqueta { cursor: default; }
.ap-caixa { border: 2px solid #b8c0d4; background: #fff; color: #222; }
.ap-imagem { line-height: 1.1; }
.ap-interruptor { display: flex; align-items: center; gap: 8px; }
.ap-interruptor input { width: 22px; height: 22px; }
.ap-slider-t { display: flex; justify-content: space-between; margin-bottom: 4px; }
.ap-slider input { width: 100%; }
.ap-vazio { position: absolute; left: 8%; right: 8%; top: 30%; color: #5f6b80; text-align: center; font-size: 14px; }
.ap-item { position: absolute; box-sizing: border-box; border: 2px dashed transparent; border-radius: 12px; padding: 2px; cursor: grab; touch-action: none; user-select: none; }
.ap-item:active { cursor: grabbing; }
.ap-item:focus-visible { outline: 3px solid #3f5fe0; outline-offset: 1px; }
.ap-alca { display: none; position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; background: #2a6fb0; border: 2px solid #fff; border-radius: 50%; cursor: ew-resize; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.ap-item.sel .ap-alca { display: block; }
.ap-item > .ap-alca { pointer-events: auto; }
.ap-item > * { pointer-events: none; }
.ap-item:hover { border-color: #9db8dd; }
.ap-item.sel { border-color: #2a6fb0; background: rgba(46, 116, 181, .08); }
.ap-item.ap-escondido { opacity: .4; }
.ap-toast { position: absolute; left: 14px; right: 14px; bottom: 22px; background: rgba(20, 24, 36, .92); color: #fff; padding: 10px 14px; border-radius: 14px; text-align: center; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.ap-toast.ver { opacity: 1; }
.ap-vibra { animation: ap-vibra .45s linear; }
@keyframes ap-vibra { 0%, 100% { transform: translateX(0); } 12% { transform: translateX(-6px) rotate(-1deg); } 25% { transform: translateX(6px) rotate(1deg); } 37% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 62% { transform: translateX(-4px); } 75% { transform: translateX(4px); } 87% { transform: translateX(-2px); } }
@media (prefers-reduced-motion: reduce) { .ap-vibra { animation: none; outline: 4px solid #ff4d4f; } }
@media (max-width: 860px) { .ap-corpo { flex-direction: column; } .ap-dir { flex: 0 0 auto; position: static; width: 100%; } }

/* Lista da turma: zona das atribuídas e caixa das não atribuídas (arrastar de baixo para cima atribui) */
.zona-vazia { padding: 18px 12px; text-align: center; }
.grupo-titulo.nao { background: var(--yo); }

/* Estatísticas (Administração) */
.est-cartoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 10px 0; }
.est-cartao { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--borda); border-left: 6px solid #64748b; border-radius: 12px; background: var(--papel); }
.est-cartao.azul { border-left-color: #2a6fb0; } .est-cartao.verde { border-left-color: #177a5c; } .est-cartao.laranja { border-left-color: #996000; }
.est-valor { font-size: 30px; line-height: 1.1; }
.est-rot { font-weight: 700; font-size: 14px; }
.est-cartao small { color: var(--suave); }
.est-grafico { display: flex; gap: 8px; margin: 8px 0 14px; }
.est-escala { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; font-size: 13px; color: var(--suave); padding: 18px 0 18px; min-width: 24px; }
.est-barras { flex: 1 1 auto; display: flex; align-items: stretch; gap: 3px; height: 190px; border-left: 2px solid var(--borda); border-bottom: 2px solid var(--borda); padding-left: 4px; background: repeating-linear-gradient(to top, transparent 0, transparent calc(50% - 1px), var(--borda) calc(50% - 1px), var(--borda) 50%, transparent 50%); }
.est-barras.est-horas { height: 150px; }
.est-item { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.est-item > small { font-size: 13px; color: var(--suave); white-space: nowrap; height: 16px; line-height: 16px; }
.est-barras { padding-top: 18px; }
.est-col { position: relative; }
.est-num { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 1px; font-size: 12px; line-height: 15px; font-weight: 700; color: var(--texto, inherit); white-space: nowrap; pointer-events: none; }
.est-num.dois { color: var(--suave); font-weight: 600; }
.est-num.escondido { display: none; }
.est-barra { flex: 1 1 auto; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 1px; }
.est-col { display: block; flex: 1 1 0; max-width: 18px; background: #2a6fb0; border-radius: 3px 3px 0 0; }
.est-col.dois { background: #9db8dd; }
.est-horas .est-col { background: #177a5c; max-width: 26px; }
.est-vazio { padding: 22px 14px; text-align: center; color: var(--suave); border: 2px dashed var(--borda); border-radius: 12px; margin: 8px 0 14px; }
.est-leg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; } .est-leg.a { background: #2a6fb0; } .est-leg.b { background: #9db8dd; }
.est-sub { margin: 14px 0 6px; font-size: 15px; }
.est-lista { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 10px; }
.est-ativ { border: 1px solid var(--borda); border-left: 6px solid #177a5c; border-radius: 12px; padding: 10px 14px 12px; background: var(--papel); }
.est-ativ.nao { border-left-color: #94a3b8; }
.est-cab { margin-bottom: 8px; }
.est-ativ h4 { margin: 0 0 4px; font-size: 16px; }
.est-etqs { display: flex; flex-wrap: wrap; gap: 4px; }
.est-dados { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.est-dado { display: flex; flex-direction: column; gap: 1px; }
.est-dado small { color: var(--suave); font-size: 13px; }
.est-dado b { font-size: 17px; }
.est-outras { margin-top: 12px; }
.est-outras > summary { cursor: pointer; font-weight: 700; margin-bottom: 8px; }
.est-prog { display: flex; align-items: center; gap: 8px; }
.est-prog-barra { position: relative; flex: 1 1 auto; height: 10px; border-radius: 5px; background: var(--borda); overflow: hidden; min-width: 50px; }
.est-prog-barra > span { position: absolute; inset: 0 auto 0 0; background: #177a5c; }
@media (max-width: 520px) { .est-lista { grid-template-columns: 1fr; } .est-item > .est-num { display: none; } }
.est-tops { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.est-top-caixa { border: 1px solid var(--borda); border-radius: 12px; padding: 10px 14px 12px; background: var(--papel); }
.est-top-caixa h4 { margin: 0 0 6px; }
.est-top-caixa select { max-width: 100%; }
.est-top { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.est-top li { display: flex; align-items: center; gap: 10px; }
.est-pos { flex: 0 0 30px; text-align: center; font-size: 20px; font-weight: 700; }
.est-top-nome { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.est-top-nome b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.est-top-nome small { color: var(--suave); }
.est-top-barra { display: block; height: 6px; border-radius: 3px; background: var(--borda); position: relative; overflow: hidden; }
.est-top-barra > span { position: absolute; inset: 0 auto 0 0; background: #177a5c; }
.est-top-valor { flex: 0 0 auto; white-space: nowrap; font-size: 14px; }

/* Janela «Atribuir» */
.atr-modal { max-width: 980px; width: 96vw; max-height: 92vh; overflow-y: auto; }
.atr-colunas { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.atr-colunas h3 { margin: 10px 0 6px; font-size: 16px; }
.atr-lista h4 { margin: 8px 0 4px; }
.atr-linha { display: flex; align-items: flex-start; gap: 8px; padding: 5px 4px; border-radius: 8px; cursor: pointer; }
.atr-linha:hover { background: rgba(37, 99, 235, .08); }
.atr-linha input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; }
.atr-linha small { color: var(--suave); }
.atr-alunos { max-height: 260px; overflow-y: auto; border: 1px solid var(--borda); border-radius: 10px; padding: 4px; }
.atr-chips-lista { display: flex; flex-wrap: wrap; gap: 6px; }
.atr-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 2px solid var(--borda); border-radius: 999px; cursor: pointer; font-weight: 700; }
.atr-chip.sel { border-color: #177a5c; background: rgba(23, 122, 92, .12); }
.atr-chip input { width: 16px; height: 16px; }
.atr-resumo { font-weight: 700; margin: 12px 0 8px; }

/* Editor de Python: sugestões, parênteses correspondentes */
.py-envolv { position: relative; }
.py-marca { color: transparent; z-index: 0; }
.py-marca .py-par { border-radius: 3px; box-shadow: 0 0 0 1.5px #a6e3a1; background: rgba(166, 227, 161, .22); }
.py-marca .py-par.erro { box-shadow: 0 0 0 1.5px #f38ba8; background: rgba(243, 139, 168, .25); }
.py-sug { position: absolute; z-index: 30; min-width: 240px; max-width: 360px; background: #1f2335; color: #cdd6f4; border: 1px solid #45475a; border-radius: 8px; box-shadow: 0 8px 22px rgba(0, 0, 0, .45); overflow: hidden; font: 14px/1.4 "JetBrains Mono", Consolas, Menlo, "DejaVu Sans Mono", monospace; }
.py-sug-item { display: flex; align-items: baseline; gap: 12px; padding: 5px 10px; cursor: pointer; white-space: nowrap; }
.py-sug-item.sel { background: #3f5f4e; }
.py-sug-item b { color: #a6e3a1; font-weight: 700; }
.py-sug-k { margin-left: auto; color: #8c91ab; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.py-sug-op { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; cursor: pointer; }
.py-sug-op input { width: 16px; height: 16px; }
.ativ-ord { display: flex; align-items: stretch; gap: 8px; }
.ativ-ord > :last-child { flex: 1 1 auto; min-width: 0; }
.ativ-ord-ctl { display: flex; flex-direction: column; gap: 4px; justify-content: center; align-items: center; }
.ord-pega { font-size: 24px; cursor: grab; touch-action: none; color: var(--suave); padding: 2px 6px; }
.ativ-ord.arrastando { position: relative; }
.ativs.ativs-ord { grid-template-columns: 1fr; }

/* Aviso em ecrã inteiro: o professor iniciou uma atividade */
.anuncio { position: fixed; inset: 0; z-index: 2147483000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; color: #fff; background: linear-gradient(135deg, #177a5c, #2a6fb0); animation: anuncio-entra .35s ease-out; }
.anuncio-ic { font-size: 84px; line-height: 1; }
.anuncio-pre { font-size: clamp(18px, 3.4vw, 28px); font-weight: 700; opacity: .92; }
.anuncio-tit { font-size: clamp(30px, 6.5vw, 64px); font-weight: 800; line-height: 1.15; max-width: 18em; }
.anuncio-txt { max-width: 38em; font-size: clamp(16px, 2.4vw, 22px); margin: 0; opacity: .95; }
.anuncio-abrir { display: inline-block; margin-top: 10px; padding: 16px 34px; border-radius: 16px; background: #fff; color: #14532d; font-size: clamp(20px, 3vw, 28px); font-weight: 800; text-decoration: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.anuncio-abrir:focus-visible { outline: 4px solid #ffe14d; outline-offset: 4px; }
.anuncio-depois { background: transparent; border: 2px solid rgba(255, 255, 255, .8); color: #fff; padding: 10px 22px; border-radius: 12px; font-size: 18px; cursor: pointer; }
html.com-anuncio { overflow: hidden; }
@keyframes anuncio-entra { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .anuncio { animation: none; } }
.anuncio.anuncio-vivo { background: linear-gradient(135deg, #7b4fa6, #c0346f); }
.anuncio.anuncio-vivo .anuncio-abrir { color: #4c1d95; }

/* ---------- Administração: cabeçalho, navegação e Turmas e alunos (2.70) ---------- */
.nav-admin { display: flex; gap: 4px; margin: 0 0 14px; padding: 4px; border-radius: 14px; background: var(--item-bg); border: 1px solid var(--borda); overflow-x: auto; scrollbar-width: thin; }
.nav-btn { flex: 0 0 auto; border: 0; background: transparent; color: var(--titulo); font: inherit; font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.nav-btn:hover { background: var(--light); }
.nav-btn.sel { background: var(--sc, var(--accent)); color: var(--on-color); }
.prof header .versao { opacity: .7; }
@media (max-width: 640px) {
  .prof header .quem { width: auto; flex: 1 1 100%; justify-content: flex-end; }
  .prof header .quem .btn { flex: 0 0 auto; font-size: 13px; padding: 6px 10px; }
  .nav-btn { font-size: 14px; padding: 7px 10px; }
}
/* turmas: botões mais pequenos */
.sec-turmas .tabs-turma { margin: 10px 0 6px; gap: 8px; }
.tabs-turma .btn.sec.chip-turma { min-width: 64px; padding: 6px 12px; border-radius: 12px; }
.chip-turma b { font-size: 18px; }
.chip-turma small { font-size: 13px; }
@media (max-width: 640px) { .seg-semestre .btn.seg-turno { padding: 6px 12px; } .seg-semestre .btn.seg-turno small { font-size: 13px; } }
/* faixa da turma */
.turma-barra { background: var(--papel); border: 1px solid var(--borda); border-left: 8px solid var(--ay, var(--accent)); border-radius: 14px; padding: 12px 14px 0; margin: 0 0 14px; position: sticky; top: 0; z-index: 6; box-shadow: 0 4px 12px rgba(0, 0, 0, .05); }
.turma-barra-cab { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.turma-barra-id { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; }
.turma-barra-id b { font-size: 18px; }
.turma-barra .turma-badge { background: var(--ay, var(--accent)); color: var(--on-color); font-weight: 800; font-size: 20px; border-radius: 12px; padding: 8px 12px; }
.seg-sub { display: flex; gap: 2px; margin-top: 10px; overflow-x: auto; }
.seg-sub-btn { flex: 1 0 auto; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--suave); font: inherit; font-weight: 700; padding: 8px 10px 9px; cursor: pointer; white-space: nowrap; }
.seg-sub-btn:hover { color: var(--titulo); }
.seg-sub-btn.sel { color: var(--titulo); border-bottom-color: var(--ay, var(--accent)); }
.pausa-ativa { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 10px; border-radius: 12px; background: var(--erro-bg); color: var(--erro-txt); font-weight: 700; }
@media (max-width: 640px) { .turma-barra { position: static; } }
/* 2.342.0: com «Na aula» por partes (2.340.3) a barra da turma tem perto de 460 px; presa no topo tapava metade do ecrã num
   portátil (1366 × 768) e no iPad. Só fica presa num ecrã com 1200 px de altura ou mais. */
@media (max-height: 1199px) { .turma-barra { position: static; } }
/* menus «⋯» */
details.menu { position: relative; display: inline-block; }
details.menu > summary { list-style: none; cursor: pointer; user-select: none; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary.menu-btn { min-width: 40px; }
details.menu[open] > summary.menu-btn { background: var(--light); }
.menu-painel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 250px; max-width: min(340px, 92vw); padding: 6px; background: var(--papel); border: 1px solid var(--borda); border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .18); display: flex; flex-direction: column; text-align: left; }
.menu-painel.esq { right: auto; left: 0; }
.menu-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--texto); font: inherit; padding: 9px 10px; border-radius: 8px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.menu-item:hover, .menu-item:focus-visible { background: var(--light); outline: none; }
.menu-item.perigo { color: var(--erro-txt); font-weight: 700; }
.menu-sep { height: 1px; background: var(--borda); margin: 6px 4px; }
.menu-nota { margin: 4px 8px 6px; font-size: 13px; color: var(--suave); white-space: normal; }
.menu-campo { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; font-size: 14px; }
.menu-campo input[type=date], .menu-campo select { padding: 5px 6px; border: 2px solid var(--borda-in); border-radius: 8px; background: var(--input); color: inherit; font: inherit; }
.menu-check { justify-content: flex-start; cursor: pointer; }
.menu-check input { width: 18px; height: 18px; }
/* lista de atividades da turma */
.tl-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tl-cab h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.tl-conta { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--ok-bg); color: var(--ok-txt); }
.tl-cab-acoes { display: flex; gap: 6px; align-items: center; }
.tl-grupo { margin-top: 14px; }
.tl-grupo-tit { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--suave); }
.tl-grupo-tit small { font-size: 13px; padding: 1px 7px; border-radius: 999px; background: var(--item-bg); border: 1px solid var(--borda); }
.tl-lista { display: flex; flex-direction: column; gap: 6px; }
.tl-linha { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--papel); border: 1px solid var(--borda); border-left: 5px solid var(--ay, var(--accent)); border-radius: 10px; }
.tl-linha.est-esc { border-left-color: var(--borda-in); }
/* Escondida dos alunos mas ainda na lista do professor */
.tl-linha.est-oculta { border-left-color: var(--borda-in); background: var(--desativado); color: var(--desativado-txt); }
.tl-linha.est-oculta .tl-titulo, .tl-linha.est-oculta b { color: var(--desativado-txt); }
.tl-linha.est-agend { border-left-color: #f59e0b; }
.tl-linha.bloq { border-left-color: var(--erro); }
.tl-linha .pega { font-size: 20px; color: var(--suave); cursor: grab; touch-action: none; padding: 2px 2px; border-radius: 6px; }
.tl-linha .pega:focus-visible { outline: 3px solid var(--foco); }
.tl-info { flex: 1 1 auto; min-width: 0; }
.tl-titulo { font-weight: 700; color: var(--texto); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; }
.tl-titulo:hover { text-decoration: underline; }
/* Menu junto do título de uma atividade (TP.menuLigacao em comum.js): o título continua a ser uma ligação e, ao clicar, abre um pequeno
   painel por baixo dele (abrir, enviar a solução à turma ou a um aluno, ver a solução). O painel fica no <body>, em posição fixa
   (o sítio é posto por código), para não ser cortado pelos cartões. */
a.lig-menu { cursor: pointer; }
a.lig-menu::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 3px 0 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); opacity: .8; }
a.lig-menu[aria-expanded="true"] { text-decoration: underline; }
a.lig-menu[aria-expanded="true"]::after { transform: translateY(1px) rotate(225deg); }
a.lig-menu:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; border-radius: 4px; }
.lig-painel { position: fixed; left: 8px; top: 8px; right: auto; z-index: 60; min-width: 250px; }
.lig-painel .menu-item { white-space: normal; }
.lig-painel .menu-item:focus-visible { outline: 3px solid var(--foco); outline-offset: -3px; }
.lig-painel .menu-nota { max-width: 300px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--borda); }
.ah-titulo { font-weight: 700; }
a.at-tit { color: var(--texto); text-decoration: none; font-weight: 700; }
a.at-tit:hover { text-decoration: underline; }
/* Cartões da turma: o cartão corta o que sai dele (para o cabeçalho de cor seguir os cantos redondos), e cortava também o menu «⋯».
   Com o menu aberto, o cartão deixa de cortar, o cabeçalho leva os cantos redondos e o painel abre por baixo do cartão, a toda a largura. */
@supports selector(:has(a)) {
  .tc-card:has(details.menu[open]) { overflow: visible; position: relative; }
  .tc-card:has(details.menu[open]) .tc-cab { border-radius: 13px 13px 0 0; }
  .tc-acoes > details.menu { position: static; }
  .tc-acoes > details.menu > .menu-painel { left: 8px; right: auto; top: calc(100% - 6px); }
}
@media print { .lig-painel { display: none; } a.lig-menu::after { display: none; } }
/* Janela «Enviar a resolução aos alunos» (admin-resolucoes.js): a turma, «À turma toda» ou «Só a alguns alunos», «Marcar todos» e
   «Desmarcar todos», e o resumo do que vai ser enviado e a quantos alunos, antes de enviar. */
.rs-turma-linha { font-weight: 700; margin: 4px 0 8px; }
.rs-turma { max-width: 100%; padding: 6px 8px; border: 2px solid var(--borda-in); border-radius: 10px; background: var(--input); color: var(--texto); font: inherit; font-weight: 400; }
.rs-quem { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 6px; }
.rs-quem label, .rs-modo label { cursor: pointer; }
.rs-marcar { gap: 6px; margin: 4px 0; }
.rs-turma-toda { margin: 4px 0; }
.rs-rodape { margin-top: 12px; }
.rs-rodape .rs-bot { margin-bottom: 0; }
/* Num ecrã com altura para isso, o resumo e os botões ficam presos ao fundo da janela (as margens negativas tapam o espaço da janela). */
@media (min-width: 700px) and (min-height: 620px) { .rs-rodape { position: sticky; bottom: -16px; margin: 12px -20px -16px; padding: 10px 20px 16px; background: var(--papel); border-top: 1px solid var(--borda); } }
.rs-resumo { margin: 0; padding: 9px 12px; border: 2px solid var(--tinta, var(--borda-in)); border-radius: 12px; background: var(--item-bg); color: var(--texto); font-weight: 700; box-shadow: 2px 2px 0 var(--sombra, transparent); }
.rs-resumo.vazio { font-weight: 400; border-style: dashed; box-shadow: none; }
.tl-meta { display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; margin-top: 2px; font-size: 13px; color: var(--suave); }
.tl-meta .selo { font-size: 13px; padding: 1px 8px; }
.tl-acoes { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; }
.tl-acoes .btn.peq { padding: 6px 10px; font-size: 14px; }
.tl-iniciar { background: #177a5c; }
.tl-iniciar:hover:not(:disabled) { background: #177a53; }
.tl-aviso { margin: 0 0 6px; padding: 8px 10px; border-radius: 10px; background: var(--aviso-bg); font-size: 14px; }
.tl-vazio { text-align: center; padding: 18px 10px; border: 2px dashed var(--borda); border-radius: 12px; margin-top: 12px; }
.tl-vazio p { margin: 0 0 8px; }
.tl-dica { margin: 12px 0 0; font-size: 13px; }
.tl-zona { border-radius: 12px; transition: background .15s; }
.tl-zona.alvo-soltar { background: rgba(23, 122, 92, .08); outline: 2px dashed #177a5c; outline-offset: 4px; }
.tl-adicionar { margin-top: 16px; padding: 12px; border: 2px dashed var(--borda-in); border-radius: 14px; background: var(--item-bg); }
.tl-adicionar.alvo-soltar { border-color: var(--suave); background: rgba(100, 116, 139, .12); }
.tl-adicionar-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tl-adicionar-cab h3 { margin: 0; font-size: 17px; }
.tl-procura { width: 100%; margin: 4px 0 6px; padding: 8px 10px; border: 2px solid var(--borda-in); border-radius: 10px; background: var(--input); color: inherit; font: inherit; }
.tl-sub { margin: 12px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--suave); }
.tl-sub.prog { color: #b4651b; }
.tl-sub.ia { color: #17776c; }
.tl-linha.arrastando { position: relative; z-index: 20; box-shadow: 0 10px 28px rgba(0, 0, 0, .3); }
.tl-linha.vai-atribuir { outline: 3px solid #177a5c; background: #e6f6ee; }
.tl-linha.vai-atribuir::after { content: "Larga para atribuir"; position: absolute; right: 10px; top: -12px; background: #177a5c; color: #fff; padding: 2px 10px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.grupo-x .tl-linha { border-left-color: #c2410c; }
@media (max-width: 640px) {
  .tl-linha { flex-wrap: wrap; gap: 6px 8px; }
  .tl-info { flex: 1 1 calc(100% - 40px); }
  /* No telemóvel os botões passam para a linha seguinte em vez de encolherem: o texto não se parte e o «⋯» fica no cartão. */
  .tl-acoes { flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-start; min-width: 0; }
  .tl-acoes > .btn, .tl-acoes > details { flex: 0 0 auto; white-space: nowrap; }
  .tl-acoes > .btn.peq, .tl-acoes > details > summary.btn { min-height: 40px; padding: 8px 12px; }
  .tl-acoes > details.menu { margin-left: auto; }
}
.prof header .quem { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.seg-sub-btn .ic { margin-right: 6px; }
@media (max-width: 480px) {
  .seg-sub-btn { flex: 1 1 0; padding: 8px 4px 9px; font-size: 14px; }
  .seg-sub-btn .ic { display: none; }
  .tl-adicionar .tl-linha { flex-wrap: nowrap; }
  .tl-adicionar .tl-info { flex: 1 1 auto; }
  .tl-adicionar .tl-acoes { flex: 0 0 auto; }
}
.selo.todos { background: #e0ecff; color: #1d4ed8; }
:root[data-theme="dark"] .selo.todos { background: #10213f; color: #93b4ff; }
.tl-linha.est-todos { border-left-color: #2a6fb0; }

/* Convite para aderir ao módulo de programação (página inicial do aluno) */
.prog-convite { display: flex; gap: 16px; align-items: flex-start; margin: 12px 0 16px; padding: 18px; border-radius: 16px; background: linear-gradient(135deg, #fff4e6, #ffe8d1); border: 2px solid #f0b37e; color: #3b2410; }
.prog-convite-ic { font-size: 28px; font-weight: 700; line-height: 1; color: var(--accent); }
.prog-convite-corpo { flex: 1 1 auto; min-width: 0; }
.prog-convite h3 { margin: 0 0 6px; font-size: 22px; color: #8a3d00; }
.prog-convite.ia-convite { background: linear-gradient(135deg, #e6fbf8, #d3f3ee); border-color: #5cc5b8; color: #0b3b36; }
.prog-convite.ia-convite h3 { color: #0f6f68; }
.prog-convite p { margin: 0 0 10px; }
.prog-convite-lista { margin: 0 0 14px; padding-left: 20px; }
.prog-convite-lista li { margin: 3px 0; }
.prog-convite-lista span { color: #6b4b2e; }
.prog-convite .btn { background: #996000; font-size: 17px; }
.prog-convite .btn:hover:not(:disabled) { background: #b4651b; }
:root[data-theme="dark"] .prog-convite { background: linear-gradient(135deg, #2b1a08, #3a220b); border-color: #8a5a2b; color: #f3e2cf; }
:root[data-theme="dark"] .prog-convite h3 { color: #ffb469; }
:root[data-theme="dark"] .prog-convite-lista span { color: #d9bfa3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .prog-convite { background: linear-gradient(135deg, #2b1a08, #3a220b); border-color: #8a5a2b; color: #f3e2cf; } :root:not([data-theme="light"]) .prog-convite h3 { color: #ffb469; } :root:not([data-theme="light"]) .prog-convite-lista span { color: #d9bfa3; } }
@media (max-width: 560px) { .prog-convite { flex-direction: column; gap: 6px; padding: 14px; } .prog-convite-ic { font-size: 22px; } }
.prog-sair { margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prog-modo { margin: 8px 0 12px; padding: 10px 12px; border: 2px solid #f0b37e; border-radius: 12px; background: rgba(217, 130, 43, .08); }
.prog-modos { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.prog-modos legend { font-weight: 800; margin-bottom: 6px; padding: 0; }
.prog-op { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border: 2px solid transparent; border-radius: 10px; background: var(--papel); cursor: pointer; }
.prog-op input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.prog-op > span { display: flex; flex-direction: column; gap: 2px; }
.prog-op.ativo { border-color: #996000; box-shadow: 0 0 0 2px rgba(153, 96, 0, .2); }
.prog-aviso { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 14px; }
.prog-modo details { margin-top: 8px; }
.prog-modo summary { cursor: pointer; font-weight: 700; }
.prog-aderiram { margin-top: 6px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }

/* Verificar no meu navegador (programação): admin-verificar.js */
.vf-expl { max-width: 900px; }
.vf-prog { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 24px; margin: 6px 0; font-size: 14px; }
.vf-ok { color: var(--ok-txt); font-weight: 700; }
.vf-barra { width: 220px; }
.vf-resumo { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.vf-c { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.vf-tab td.vf-cel { padding: 3px; text-align: center; }
.vf-b { display: inline-block; min-width: 48px; padding: 4px 8px; border-radius: 8px; border: 2px solid transparent; font: inherit; font-weight: 800; cursor: pointer; }
.vf-b:disabled { cursor: default; }
.vf-b.sel { outline: 3px solid var(--accent); outline-offset: 1px; }
.vf-legenda { margin: 8px 0; }
.vf-legenda summary { cursor: pointer; font-weight: 700; }
.vf-legenda ul { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.vf-legenda .vf-b { cursor: default; margin-right: 6px; }
.vf-det { margin-top: 14px; }
.v-conf { background: #dcf3e3; color: #135c2c; }
.v-falso { background: #fde2e1; color: #9b1c17; border-color: #e5534b; }
.v-passa { background: #e1edff; color: #1d4f91; }
.v-mudou { background: #efe7fb; color: #4a2a86; }
.v-falha { background: #eceff1; color: #45515c; }
.v-pend { background: transparent; color: var(--suave); border: 2px dashed var(--borda-in); }
.v-vazio { background: transparent; color: var(--suave); }
.v-erro { background: #fff1d6; color: #7a4a00; }
:root[data-theme="dark"] .v-conf { background: #123d22; color: #9be3b4; }
:root[data-theme="dark"] .v-falso { background: #4a1412; color: #ffb3ad; }
:root[data-theme="dark"] .v-passa { background: #13294a; color: #a9c9ff; }
:root[data-theme="dark"] .v-falha { background: #24292e; color: #c3ccd5; }
:root[data-theme="dark"] .v-erro { background: #3d2a05; color: #ffd27a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .v-conf { background: #123d22; color: #9be3b4; }
  :root:not([data-theme="light"]) .v-falso { background: #4a1412; color: #ffb3ad; }
  :root:not([data-theme="light"]) .v-passa { background: #13294a; color: #a9c9ff; }
  :root:not([data-theme="light"]) .v-falha { background: #24292e; color: #c3ccd5; }
  :root:not([data-theme="light"]) .v-erro { background: #3d2a05; color: #ffd27a; }
}

/* Relatório do quiz: admin-relatorio.js */
.rl-ctrl { align-items: center; margin: 10px 0; }
.rl-lig { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--accent); text-decoration: underline; cursor: pointer; }
.rl-tab { border-collapse: separate; border-spacing: 0; background: var(--papel); border: 1px solid var(--borda); border-radius: 12px; overflow: hidden; }
.rl-tab th, .rl-tab td { padding: 0; border-bottom: 1px solid var(--borda); text-align: center; }
.rl-tab thead th { padding: 10px 6px; background: var(--papel); font-weight: 800; vertical-align: top; }
.rl-tab th small { display: block; font-weight: 400; color: var(--suave); }
.rl-tab .rl-nome { text-align: left; padding: 10px 14px; min-width: 150px; font-weight: 700; position: sticky; left: 0; background: var(--papel); }
.rl-tab .rl-pts { padding: 10px 12px; white-space: nowrap; min-width: 90px; }
.rl-q { min-width: 58px; }
.rl-qb { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; background: none; border: 0; font: inherit; font-weight: 800; color: inherit; cursor: pointer; }
.rl-qb.sel .rl-pct { outline: 2px solid var(--accent); outline-offset: 2px; }
.rl-pct { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 13px; font-weight: 800; color: #fff; }
.rl-pct.alto { background: #1f9d55; } .rl-pct.medio { background: #e08a00; } .rl-pct.baixo { background: #d62d20; } .rl-pct.nada { background: #8b95a1; }
.rl-c { height: 46px; font-size: 18px; font-weight: 800; }
.rl-c.certa { background: #b4ebd0; color: #11633a; } .rl-c.errada { background: #fcc8cb; color: #b0191f; }
.rl-c.tempo { background: #fde7b3; color: #7a4a00; } .rl-c.vazia { background: #d5d9df; color: #5b6570; }
.rl-det { margin-top: 14px; } .rl-enun { font-size: 18px; font-weight: 700; }
.rl-ops { display: flex; flex-direction: column; gap: 6px; }
.rl-op { display: grid; grid-template-columns: minmax(140px, 40%) 1fr 32px; align-items: center; gap: 10px; }
.rl-op.certa .rl-op-t { font-weight: 800; color: var(--ok-txt); }
.rl-op-b { height: 14px; background: var(--trilho); border-radius: 7px; overflow: hidden; } .rl-op-b > div { height: 100%; background: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rl-c.certa { background: #14442b; color: #9be3b4; } :root:not([data-theme="light"]) .rl-c.errada { background: #5a1a1d; color: #ffb3b6; }
  :root:not([data-theme="light"]) .rl-c.tempo { background: #4a3608; color: #ffd27a; } :root:not([data-theme="light"]) .rl-c.vazia { background: #2b3036; color: #aab3bd; }
}
:root[data-theme="dark"] .rl-c.certa { background: #14442b; color: #9be3b4; } :root[data-theme="dark"] .rl-c.errada { background: #5a1a1d; color: #ffb3b6; }
:root[data-theme="dark"] .rl-c.tempo { background: #4a3608; color: #ffd27a; } :root[data-theme="dark"] .rl-c.vazia { background: #2b3036; color: #aab3bd; }
@media print { .rl-ctrl, .quem, .rl-lig { display: none !important; } .tabela-rolar { overflow: visible; } }

/* Tema sorteado do aluno (ficha) e página dos temas do professor */
.tema-aluno { display: flex; align-items: center; gap: 14px; margin: 12px 0; padding: 14px 18px; border-radius: 14px; border: 2px solid var(--accent); background: var(--light); }
.tema-aluno-ic { font-size: 14px; font-weight: 700; color: var(--accent); }
.tema-aluno-k { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--suave); }
.tema-aluno-v { font-size: 26px; font-weight: 800; color: var(--titulo); }
.tm-grelha { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.tm-tab input[type=text] { width: 100%; min-width: 160px; }
.tm-tab td.sem input { border-color: #e0a94f; }
.tm-rel { margin: 8px 0; }

/* Estatísticas: trabalho de um aluno */
.est-aluno-lig { background: none; border: 0; padding: 0; font: inherit; font-weight: 800; color: var(--titulo); text-decoration: underline dotted; cursor: pointer; text-align: left; }
.est-aluno-lig:hover { color: var(--accent); }
.est-aluno { max-width: 820px; }
.est-aluno-ativ { border-top: 1px solid var(--borda); padding: 10px 0; }
.est-aluno-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; justify-content: space-between; }
.est-aluno-det { margin-top: 8px; }

/* Atividades: ocultar e mostrar os grupos */
.grupos-barra { position: sticky; top: 0; z-index: 5; background: var(--fundo); padding: 8px 0; align-items: center; }
.grupo-alt { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.grupo-ativ.fechado > :not(.grupo-titulo) { display: none; }
/* Filtro por tema dentro de cada ano em Atividades (2.260.0). */
.grupo-temas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 12px; }
.grupo-temas .tema-chip { white-space: nowrap; }
/* Filtro por tipo e vista compacta em Atividades (2.261.0). */
.grupo-temas .tipo-chip { white-space: nowrap; }
.grupo-tipos, .grupo-aulas { margin-top: -6px; }
.vista-ativ { display: inline-flex; gap: 6px; align-items: center; }
.vista-ativ .nota { margin: 0; }
.lista-ativ.compacta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; flex-wrap: nowrap; padding: 6px 12px; margin: 6px 0; }
.lista-ativ.compacta .ordem-n { flex-direction: row; gap: 6px; min-width: 44px; }
.lista-ativ.compacta .ordem-n .n { font-size: 15px; min-width: 18px; text-align: right; }
.lista-ativ.compacta .lc-tit { display: block; font-size: 15px; line-height: 1.3; }
.lista-ativ.compacta .lc-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 3px; }
.lista-ativ.compacta .lc-meta .etq { font-size: 13px; }
.lista-ativ.compacta .lc-num { font-size: 13px; color: var(--suave); }
.lista-ativ.compacta .acoes { flex-wrap: nowrap; align-items: center; }
.lc-menu .menu-painel { min-width: 260px; }
.lc-escolhas { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px 4px; margin-top: 4px; border-top: 1px solid var(--borda-tab); }
.lc-escolhas .sel-ano { width: 100%; }
.lc-escolhas label.nota { display: flex; flex-direction: column; gap: 3px; }
@media (max-width: 640px) {
  .lista-ativ.compacta { grid-template-columns: auto minmax(0, 1fr); }
  .lista-ativ.compacta .acoes { grid-column: 1 / -1; justify-content: flex-end; flex-wrap: wrap; }
}

/* Criador de apps: DESIGN e BLOCOS, como no App Inventor (árvore, componentes, telemóvel, propriedades) */
.ap-abas-g { display: flex; gap: 4px; }
.ap-aba-g { font: inherit; font-weight: 800; letter-spacing: .04em; padding: 12px 22px; border: 0; border-radius: 12px 12px 0 0; background: #eef1f8; color: #44506b; cursor: pointer; }
.ap-aba-g.sel { background: #3f5fe0; color: #fff; }
.ap-ecras { display: flex; align-items: center; gap: 6px; padding-bottom: 6px; }
.ap-ecra-sel { font: inherit; font-weight: 700; padding: 6px 12px; border: 2px solid #3f5fe0; border-radius: 8px; background: #fff; color: #2b3a8f; min-width: 120px; }
.ap-seta { font: inherit; font-size: 18px; font-weight: 800; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: #3f5fe0; cursor: pointer; }
.ap-seta:disabled { color: #b4bccd; cursor: default; }
.ap-seta.mais { font-size: 24px; color: #1d2433; }
.ap-ide { display: grid; gap: 14px; align-items: start; margin: 8px 0; }
.ap-ide[data-aba="ecra"] { grid-template-columns: minmax(190px, 260px) 330px minmax(240px, 1fr); }
.ap-ide[data-aba="blocos"] { grid-template-columns: minmax(0, 1fr) 330px; }
.ap-ide[data-aba="ecra"] .ap-zona-blocos { display: none; }
/* O Python ao lado dos blocos (2.322.0). */
.ap-blocos-com-py { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1280px) { .ap-blocos-com-py.com-py { grid-template-columns: minmax(0, 1fr) minmax(260px, 34%); align-items: start; } }
.ap-py-lado { border: 2px solid var(--tinta, var(--borda-in)); border-radius: 12px; padding: 6px 10px; background: var(--papel); }
.ap-py-lado > summary { cursor: pointer; font-weight: 700; }
.ap-py-lado .nota { margin: 6px 0; }
.ap-py-lado-cod { max-height: 60vh; overflow: auto; margin: 0; font-size: 13px; }
.ap-ide[data-aba="blocos"] .ap-col-esq, .ap-ide[data-aba="blocos"] .ap-col-dir { display: none; }
.ap-ide[data-aba="blocos"] .ap-zona-blocos { order: -1; }
.ap-col-esq, .ap-col-dir { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ap-col-tel { display: flex; flex-direction: column; align-items: center; gap: 8px; position: sticky; top: 8px; }
.ap-nos { display: flex; flex-direction: column; gap: 2px; }
.ap-no { display: flex; align-items: center; gap: 8px; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: #1d2433; font: inherit; cursor: pointer; }
.ap-no.filho { margin-left: 18px; }
.ap-no:hover { background: #eef1f8; }
.ap-no.sel { background: #3f5fe0; color: #fff; font-weight: 700; }
.ap-no-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-cartoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.ap-cartao { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 2px solid #d9deea; border-radius: 10px; background: #f7f9fd; color: #1d2433; font: inherit; font-size: 13px; cursor: pointer; }
.ap-cartao:hover:not(:disabled) { border-color: #3f5fe0; background: #eef2ff; }
.ap-cartao-ic { font-size: 24px; }
@media (max-width: 1100px) { .ap-ide[data-aba] { grid-template-columns: 1fr; } .ap-col-tel { position: static; } .ap-ide[data-aba="blocos"] .ap-zona-blocos { order: 0; } }

/* App partilhada: ecrã inteiro no telemóvel (jogar.js) e janela do QR code */
.jogar { max-width: 460px; margin: 0 auto; padding: 10px 16px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.jogar-topo { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.jogar-tel { width: 100%; display: flex; justify-content: center; }
.jogar-tel .ap-tel { width: min(92vw, 360px); height: min(78vh, 700px); }
.jogar-erro { max-width: 480px; margin: 60px auto; padding: 0 16px; text-align: center; }
.qr-modal { max-width: 420px; text-align: center; }
.qr-modal canvas { width: 240px; height: 240px; image-rendering: pixelated; background: #fff; padding: 12px; border-radius: 12px; border: 2px solid #d9deea; }
.qr-ligacao { display: flex; gap: 6px; }
.qr-ligacao input { flex: 1; min-width: 0; font-size: 13px; }
.ap-pos-campo { display: flex; flex-direction: column; gap: 2px; font-size: 13px; flex: 1 1 0; min-width: 0; }
.ap-pos-campo input { width: 100%; }
.ap-pos-campo input { flex: none !important; width: 100% !important; height: auto !important; min-height: 0 !important; padding: 5px 6px; }

/* Atividade já resolvida: fundo próprio (não depende do verde do 8.º ano) e faixa com ✓ e texto. */
a.ativ.resolvida { background: #e8eef2; border-color: #7a8d99; border-top-width: 2px; }
a.ativ.resolvida:hover { background: #dde6ec; }
a.ativ.resolvida .k, a.ativ.resolvida h3 { color: #3d4f5c; }
.resolvida-faixa { background: #4f6b7a; color: #fff; font-weight: bold; font-size: 14px; letter-spacing: .04em; padding: 6px 14px; }
:root[data-theme="dark"] a.ativ.resolvida { background: #1a2329; border-color: #4f6b7a; }
:root[data-theme="dark"] a.ativ.resolvida:hover { background: #212d34; }
:root[data-theme="dark"] a.ativ.resolvida .k, :root[data-theme="dark"] a.ativ.resolvida h3 { color: #b7c8d2; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) a.ativ.resolvida { background: #1a2329; border-color: #4f6b7a; }
  :root:not([data-theme="light"]) a.ativ.resolvida:hover { background: #212d34; }
  :root:not([data-theme="light"]) a.ativ.resolvida .k, :root:not([data-theme="light"]) a.ativ.resolvida h3 { color: #b7c8d2; }
}

/* Lista da turma: grupo «Já realizadas» (recolhido) */
.tl-grupo.grupo-feitas > summary.tl-grupo-tit { cursor: pointer; list-style: none; opacity: .85; }
.tl-grupo.grupo-feitas > summary.tl-grupo-tit::before { content: "▸ "; }
.tl-grupo.grupo-feitas[open] > summary.tl-grupo-tit::before { content: "▾ "; }
.tl-grupo.grupo-feitas .tl-linha { opacity: .8; }

/* Página do aluno: o que fazer agora, o que já foi dado em aula e o que já está resolvido. */
.parafazer-faixa { background: var(--ac, var(--accent)); color: var(--on-color); font-weight: bold; font-size: 14px; letter-spacing: .04em; padding: 6px 14px; }
a.ativ.parafazer { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac, var(--accent)) 35%, transparent); }
.dada-faixa { background: #fff4d6; color: #8a5a00; font-weight: bold; font-size: 14px; padding: 6px 14px; border-bottom: 1px solid #f0d78c; }
.dada-faixa small { font-weight: normal; }
a.ativ.dada { border-color: #e0a526; border-top-width: 2px; }
:root[data-theme="dark"] .dada-faixa { background: #2b230d; color: #f2c14e; border-bottom-color: #5a4a1a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dada-faixa { background: #2b230d; color: #f2c14e; border-bottom-color: #5a4a1a; } }

/* Marcar como realizadas: janela ao iniciar e sugestão quando todos terminaram */
.dlg-realizadas { border: 2px solid var(--accent); border-radius: 14px; padding: 18px; max-width: min(520px, 92vw); background: var(--papel); color: var(--texto); }
.dlg-realizadas::backdrop { background: rgba(0, 0, 0, .45); }
.dlg-lista { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 14px; }
.dlg-botoes { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-sugestao { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; background: var(--ok-bg); border: 1px solid var(--accent); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
.tl-sugestao p { margin: 0; }
/* As aulas preparam-se no mural (2.343.0): a linha no topo do separador «Atividades» e o selo «Aula de dd/mm», que leva ao mural. */
.tl-ir-mural { margin: 0 0 14px; padding: 10px 14px; border: 2px solid var(--tinta, var(--line)); border-radius: 14px; background: var(--papel); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
button.tl-aula-selo { font: inherit; font-size: 0.85em; cursor: pointer; }
button.tl-aula-selo:hover, button.tl-aula-selo:focus-visible { text-decoration: underline; }
.tc-aula { margin: 4px 0 0; }

/* Painel do professor (página inicial) */
.painel-prof { background: var(--papel); border: 2px solid var(--accent); border-radius: 14px; padding: 14px 16px; margin: 14px 0; }
.pp-topo { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pp-topo h2 { margin: 0; font-size: 20px; }
.pp-grelha { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.pp-turma { border: 1px solid var(--borda-in, #cfd8d3); border-radius: 12px; padding: 10px 12px; background: var(--item-bg, #f7fbf9); }
.pp-turma.pausa { border-color: #b3261e; }
.pp-cab { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.pp-cab b { font-size: 18px; }
.pp-cab span { font-size: 13px; color: var(--suave); }
.pp-turma p { margin: 6px 0 0; font-size: 14px; }
.pp-todos { color: var(--titulo); font-weight: bold; }
.pp-nota { color: var(--suave); font-size: 13px; }
.pp-lista { margin: 4px 0 0; padding-left: 18px; }
.pp-lista li { margin: 2px 0; }
.pp-turma a { color: var(--titulo); font-weight: bold; text-decoration: underline; }

/* Comentário do professor: no topo da atividade do aluno, na página inicial e na janela do aluno em Resultados */
.comentario-prof { max-width: 1100px; margin: 12px auto; padding: 10px 16px; background: #fff8dc; color: #4a3b00; border: 2px solid #e0b100; border-radius: 12px; box-sizing: border-box; font-size: 16px; }
.comentario-prof summary { cursor: pointer; font-weight: bold; }
.comentario-prof.novo { box-shadow: 0 0 0 4px rgba(224, 177, 0, .25); }
.comentario-prof .comentario-txt { white-space: pre-wrap; margin: 8px 0; line-height: 1.4; }
.comentario-prof .btn { margin-top: 4px; }
@media (max-width: 1132px) { .comentario-prof { margin: 12px 16px; } }
@media print { .comentario-prof { display: none; } }
.com-faixa { background: #fff1b8; color: #5c4700; font-weight: bold; font-size: 14px; padding: 6px 14px; border-bottom: 1px solid #ecd27a; }
:root[data-theme="dark"] .com-faixa { background: #3a3110; color: #f6d860; border-bottom-color: #5a4a1a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .com-faixa { background: #3a3110; color: #f6d860; border-bottom-color: #5a4a1a; } }
.com-bloco { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--borda); border-radius: 10px; background: var(--item-bg); }
.com-bloco h3 { margin: 0 0 4px; font-size: 17px; }
.com-bloco .com-texto { width: 100%; box-sizing: border-box; margin: 6px 0; font: inherit; }
.etq.com-etq { margin-left: 6px; }

/* Pauta da turma (admin-pauta.js) */
.pa-ctrl { align-items: center; margin: 10px 0; }
.pa-tab { border-collapse: separate; border-spacing: 0; background: var(--papel); border: 1px solid var(--borda); border-radius: 12px; font-size: 14px; }
.pa-tab th, .pa-tab td { border-bottom: 1px solid var(--borda); padding: 4px; text-align: center; }
.pa-tab .pa-nome { text-align: left; padding: 6px 10px; min-width: 160px; position: sticky; left: 0; background: var(--papel); z-index: 1; font-weight: 700; }
.pa-tab .pa-at { min-width: 84px; max-width: 120px; vertical-align: bottom; font-size: 13px; }
.pa-tab .pa-at .pa-tit { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pa-tab th small { display: block; font-weight: 400; color: var(--suave); font-size: 13px; }
.pa-tab .pa-cfg input, .pa-tab .pa-cfg select { width: 64px; padding: 2px 4px; font-size: 13px; }
.pa-tab .pa-cfg th { font-weight: 400; color: var(--suave); }
.pa-in { width: 64px; padding: 4px; text-align: center; font: inherit; border: 1px solid var(--borda-in); border-radius: 6px; background: var(--input, #fff); color: var(--texto); }
.pa-in::placeholder { color: var(--suave); opacity: 1; }
.pa-c.man .pa-in { font-weight: 800; border-color: var(--accent); }
.pa-c.sem .pa-in::placeholder { opacity: .6; }
.pa-imp { display: none; }
.pa-med { min-width: 60px; font-size: 15px; }
.pa-rod td, .pa-rod th { color: var(--suave); font-weight: 700; }
/* Cor de cada aluno pela média (pintarMedia): fundo claro na linha toda, com símbolo para não depender só da cor. */
.pa-tab { --pa-neg: #fde2e2; --pa-perto: #ffe8cc; --pa-pos: #e3f5e1; }
.pa-legenda { --pa-neg: #fde2e2; --pa-perto: #ffe8cc; --pa-pos: #e3f5e1; font-size: 13px; color: var(--suave); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pa-tab, :root:not([data-theme="light"]) .pa-legenda { --pa-neg: #4a2326; --pa-perto: #4a3519; --pa-pos: #1f3d24; } }
:root[data-theme="dark"] .pa-tab, :root[data-theme="dark"] .pa-legenda { --pa-neg: #4a2326; --pa-perto: #4a3519; --pa-pos: #1f3d24; }
@media print { .pa-tab, .pa-legenda { --pa-neg: #fde2e2 !important; --pa-perto: #ffe8cc !important; --pa-pos: #e3f5e1 !important; } }
.pa-tab tr.pa-neg > *, .pa-cor.pa-neg { background: var(--pa-neg); }
.pa-tab tr.pa-perto > *, .pa-cor.pa-perto { background: var(--pa-perto); }
.pa-tab tr.pa-pos > *, .pa-cor.pa-pos { background: var(--pa-pos); }
.pa-cor { display: inline-block; padding: 1px 8px; border-radius: 6px; color: var(--texto); }
.pa-tab tr.pa-neg .pa-niv b::before { content: "▼ "; }
.pa-tab tr.pa-perto .pa-niv b::before { content: "≈ "; }
.pa-tab tr.pa-pos .pa-niv b::before { content: "✓ "; }
/* Média de 1 a 5 quase a subir de nota: amarelo forte com contorno, diferente das cores das linhas, e ▲ (não só a cor). */
.pa-tab, .pa-legenda { --pa-quase: #fff176; --pa-quase-borda: #b38f00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pa-tab, :root:not([data-theme="light"]) .pa-legenda { --pa-quase: #5c4d00; --pa-quase-borda: #e6c200; } }
:root[data-theme="dark"] .pa-tab, :root[data-theme="dark"] .pa-legenda { --pa-quase: #5c4d00; --pa-quase-borda: #e6c200; }
@media print { .pa-tab, .pa-legenda { --pa-quase: #fff176 !important; --pa-quase-borda: #b38f00 !important; } }
.pa-tab tr > td.pa-quase, .pa-cor.pa-quase { background: var(--pa-quase); box-shadow: inset 0 0 0 2px var(--pa-quase-borda); }
.pa-tab td.pa-quase b::after { content: " ▲"; }
.pa-m5 b { font-variant-numeric: tabular-nums; }
@media print { .pa-tab tr > *, .pa-cor { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.pa-niveis { margin: 14px 0; align-items: center; }
/* Atividades externas (Teams, papel...) e comportamento e atitudes na pauta */
.pa-tab th.pa-ext { background: color-mix(in srgb, var(--accent) 10%, var(--papel)); }
.pa-ext-bot { display: flex; gap: 4px; justify-content: center; margin-top: 4px; }
.pa-ext-bot .btn { padding: 2px 6px; font-size: 13px; }
.pa-comp { font: inherit; font-size: 13px; padding: 3px; border: 1px solid var(--borda-in); border-radius: 6px; background: var(--input, #fff); color: var(--texto); max-width: 150px; }
.pa-comp-peso input { width: 60px; }
.pa-dlg .pa-campo { display: block; margin: 8px 0; }
.pa-ia-tab { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 14px; }
.pa-ia-tab th, .pa-ia-tab td { border-bottom: 1px solid var(--linha, #ddd); padding: 4px 6px; text-align: left; }
.pa-dlg .pa-campo input[type="text"] { width: 100%; box-sizing: border-box; }
.pa-dlg .pa-campo input[type="number"] { width: 90px; }
.pa-colar, .pa-pedido-manual { width: 100%; box-sizing: border-box; font-family: monospace; margin: 6px 0; }
.pa-copia-estado:empty { display: none; }
.pa-copia-estado.ok { color: var(--ok-txt); font-weight: bold; }
.pa-pct { width: 48px; padding: 2px 4px; text-align: center; font: inherit; font-size: 13px; border: 1px solid var(--borda-in); border-radius: 6px; background: var(--input, #fff); color: var(--texto); }
.pa-tab .pa-cfg th small { display: block; font-size: 13px; }
.pa-total { color: var(--ok, #2e7d32); white-space: nowrap; }
.pa-total.erro { color: var(--erro-txt, #b3261e); }
.pa-tab .pa-int { min-width: 92px; font-size: 13px; }
.pa-inter { max-width: 120px; }
.pa-copiar-final { display: block; margin: 4px auto 0; padding: 1px 6px; font-size: 13px; }
.pa-tab .pa-desc { min-width: 160px; max-width: 240px; text-align: left; font-size: 13px; }
.pa-desc-bot { all: unset; cursor: pointer; display: block; padding: 4px 6px; border-radius: 6px; white-space: normal; line-height: 1.3; }
.pa-desc-bot:hover, .pa-desc-bot:focus-visible { background: color-mix(in srgb, var(--accent) 12%, transparent); outline: 2px solid var(--accent); }
.pa-desc-bot.vazia { color: var(--suave); }
.pa-tab .pa-ci { min-width: 84px; white-space: nowrap; }
.pa-ci-sel { max-width: 52px; }
.pa-obs-bot { all: unset; cursor: pointer; margin-left: 4px; padding: 2px 4px; border-radius: 6px; opacity: .45; }
.pa-obs-bot.tem { opacity: 1; background: color-mix(in srgb, var(--accent) 16%, transparent); }
.pa-obs-bot:focus-visible { outline: 2px solid var(--accent); }
.pa-tab .pa-desc-ia { background: color-mix(in srgb, var(--aviso) 8%, transparent); }
.pa-dlg .pa-meu { background: var(--item-bg, transparent); border: 1px solid var(--borda); border-radius: 8px; padding: 8px 10px; margin: 6px 0; white-space: pre-wrap; max-height: 9em; overflow: auto; }
.pa-ia-linha { gap: 8px; margin: 8px 0 4px; }
.pa-ia-linha .pa-ind { flex: 1; min-width: 200px; padding: 6px; font: inherit; border: 1px solid var(--borda-in); border-radius: 6px; background: var(--input, #fff); color: var(--texto); }
.pa-dlg .aviso-ia { background: color-mix(in srgb, var(--aviso) 16%, var(--papel)); padding: 6px 10px; border-radius: 8px; }
.pa-desc-txt { font-family: inherit; }
.pa-desc-imp { white-space: pre-wrap; }
.pa-niveis input { width: 60px; }
@media print {
  .pa-ctrl, .pa-niveis, .pa-ajuda, .pa-cfg, .prof header .quem { display: none !important; }
  .pa-in, .pa-comp, .pa-ext-bot, .pa-copiar-final, .pa-pct, .pa-desc-bot, .pa-obs-bot { display: none; }
  .pa-imp { display: inline; }
  .pa-c.man .pa-imp { font-weight: 800; }
  .pa-tab { font-size: 13px; border-radius: 0; }
  .tabela-rolar { overflow: visible !important; }
}

/* Aviso de privacidade e contacto em Dados e privacidade */
.privacidade { max-width: 860px; }
.privacidade .aula-sec li { margin: 4px 0; line-height: 1.45; }
.privacidade header .logo-ligacao img { height: 44px; }
.rodape-credito a { color: inherit; text-decoration: underline; margin-left: 4px; white-space: nowrap; }
.dados-contacto { flex: 1 1 320px; min-width: 0; }
.pa-tab .pa-at.fora { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(128, 128, 128, .08) 6px 12px); }
.pa-tab .pa-at.fora small { color: var(--aviso-txt); font-weight: 700; }

/* Separador Programação (admin-prog.js) */
.pg-ctrl { align-items: center; margin-bottom: 10px; }
.pg-tab th small { display: block; font-weight: 400; font-size: 13px; opacity: .8; }
.pg-tab .pg-at { min-width: 110px; max-width: 160px; font-size: 13px; }
.pg-c { text-align: center; }
.pg-c.vazio { color: var(--suave); }
.pg-btn { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 6px; border-radius: 8px; min-width: 70px; }
.pg-btn:hover, .pg-btn:focus-visible { background: var(--light); outline: 2px solid var(--accent); }
.pg-btn .mini-barra { width: 64px; }
.pg-c.cheio b { color: var(--ok-txt); }
.pg-rod { font-size: 13px; color: var(--suave); text-align: center; }
.pa-c.avaliar .pa-in { border-color: #e0a526; background: #fff8dc; }
.pa-c.avaliar .pa-in::placeholder { color: #8a5a00; font-size: 13px; }
:root[data-theme="dark"] .pa-c.avaliar .pa-in { background: #2b230d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pa-c.avaliar .pa-in { background: #2b230d; } }
.pa-tab .pa-falta { color: var(--aviso-txt); font-weight: 700; }
.pa-tab .pa-falta.ok { color: var(--ok-txt); }
.pa-in { width: 76px; }

/* Alunos ligados agora (cabeçalho da Administração e painel do professor) */
.on-menu .menu-painel { min-width: 280px; max-width: min(420px, 90vw); max-height: 70vh; overflow: auto; }
.on-tit { font-weight: 700; margin: 0 0 8px; }
.on-grupo { margin: 6px 0 10px; }
.on-grupo ul { margin: 4px 0 0; padding-left: 18px; }
.on-grupo li { margin: 2px 0; }
.on-grupo li.fundo { opacity: .65; }
.on-grupo small, .on-tit small { color: var(--suave); font-weight: 400; }
/* Estatísticas: os meus alunos ou os convidados */
.est-grupo { display: inline-flex; border: 2px solid var(--accent); border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.est-grupo button { border: 0; background: transparent; color: var(--accent); font: inherit; font-weight: 700; padding: 8px 18px; cursor: pointer; }
.est-grupo button.sel { background: var(--accent); color: var(--on-color); }
.est-grupo button:last-child.sel { background: #d97706; }
.est-grupo button:focus-visible { outline: 3px solid #2a6fb0; outline-offset: -3px; }
.on-conv { border-left: 4px solid #d97706; padding-left: 8px; }
.on-conv > b { color: #b45309; }
.etq-conv { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #fef3c7; color: #92400e; border: 1px solid #f59e0b; vertical-align: 1px; }
.etq-conv.prof { background: #ede9fe; color: #5b21b6; border-color: #8b5cf6; }
:root[data-theme="dark"] .on-conv > b { color: #fbbf24; }
.pp-on { color: var(--ok-txt); font-weight: 700; font-size: 14px; }
.pp-cab .pp-on { font-size: 13px; }
.pg-tab .pg-oculta { color: #ffd27a; font-weight: 700; }

/* Desafios interativos (motor jogo, public/m/jogo/app.js) */
.jg { max-width: 900px; margin: 0 auto; padding: 0 16px 40px; }
.jg-intro { font-size: 17px; }
.jg-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.jg-tab { min-width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--borda-in); background: var(--papel); color: var(--texto); font-weight: 800; cursor: pointer; }
.jg-tab.sel { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.jg-tab.ok { background: #d8f3e6; border-color: #177a5c; color: #11633a; }
.jg-tab.ko { background: #fde2e1; border-color: #b3261e; color: #8f1f16; }
.jg-tab.meio { background: #fff4d6; border-color: #e0a526; }
.jg-desafio { background: var(--papel); border: 1px solid var(--borda); border-radius: 14px; padding: 16px 18px; }
.jg-tipo { font-size: 13px; font-weight: 800; letter-spacing: .05em; color: var(--suave); text-transform: uppercase; }
.jg-desafio h2 { margin: 4px 0 6px; }
.jg-enun { margin: 0 0 12px; }
.jg-ordenar { list-style: decimal; padding-left: 28px; margin: 0; }
.jg-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 6px 0; border: 2px solid var(--borda-in); border-radius: 10px; background: var(--item-bg); }
.jg-item .jg-txt { flex: 1; }
.jg-pega { cursor: grab; font-size: 18px; color: var(--suave); touch-action: none; }
.jg-setas { display: flex; gap: 4px; }
.jg-item.arrastando { opacity: .6; }
.jg-item.alvo-antes { box-shadow: 0 -3px 0 var(--accent); }
.jg-par { display: grid; grid-template-columns: minmax(120px, 1fr) auto minmax(160px, 1.4fr); gap: 10px; align-items: center; padding: 8px 10px; margin: 6px 0; border: 2px solid var(--borda-in); border-radius: 10px; background: var(--item-bg); }
.jg-par select, .jg-lacuna { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--borda-in); background: var(--input, #fff); color: var(--texto); max-width: 100%; }
.jg-par > * { min-width: 0; }
.jg-par select { width: 100%; text-overflow: ellipsis; }
.jg-cartao { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 10px; margin: 6px 0; border: 2px solid var(--borda-in); border-radius: 10px; background: var(--item-bg); }
.jg-cartao .jg-txt { flex: 1 1 220px; }
.jg-grupos { display: flex; flex-wrap: wrap; gap: 6px; }
.jg-g { border: 2px solid var(--borda-in); background: var(--papel); color: var(--texto); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.jg-g.sel { background: var(--accent); border-color: var(--accent); color: var(--on-color); font-weight: 700; }
.jg-lacunas { font-size: 17px; line-height: 2.2; }
.jg-lacuna { margin: 0 4px; }
/* Imagens grandes nos cartões dos desafios (desenhos da biblioteca dos jogos): por cima do texto, sempre em fundo claro. */
.jg-img { display: block; width: 96px; height: 96px; object-fit: contain; background: #fff; border-radius: 12px; padding: 6px; box-sizing: border-box; }
.jg-associar.com-img .jg-esq { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.jg-associar.com-img .jg-esq b { font-size: 18px; }
.jg-classificar.com-img { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.jg-classificar.com-img .jg-cartao { flex-direction: column; text-align: center; margin: 0; }
.jg-classificar.com-img .jg-txt { flex: none; font-size: 18px; font-weight: 700; }
.jg-classificar.com-img .jg-grupos { justify-content: center; }
@media (max-width: 480px) { .jg-img { width: 76px; height: 76px; } }
.jg-item.certo, .jg-par.certo, .jg-cartao.certo, .jg-lacuna.certo { border-color: #177a5c; background: #e3f6ee; }
.jg-item.errado, .jg-par.errado, .jg-cartao.errado, .jg-lacuna.errado { border-color: #b3261e; background: #fdecea; }
:root[data-theme="dark"] .jg-item.certo, :root[data-theme="dark"] .jg-par.certo, :root[data-theme="dark"] .jg-cartao.certo, :root[data-theme="dark"] .jg-lacuna.certo { background: #0d2b22; }
:root[data-theme="dark"] .jg-item.errado, :root[data-theme="dark"] .jg-par.errado, :root[data-theme="dark"] .jg-cartao.errado, :root[data-theme="dark"] .jg-lacuna.errado { background: #2e1513; }
.jg-res { font-weight: 800; margin: 12px 0 6px; }
.jg-res.ok { color: var(--ok-txt); } .jg-res.ko { color: var(--erro-txt); }
.jg-sol, .jg-expl { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--item-bg); border-left: 5px solid var(--accent); }
.jg-sol ol, .jg-sol ul { margin: 6px 0 0; }
.jg-botoes { margin-top: 14px; }
.jg-fim { font-size: 18px; font-weight: 800; text-align: center; margin: 16px 0; }
@media (max-width: 600px) { .jg-par { grid-template-columns: minmax(0, 1fr); } .jg-seta { display: none; } }

/* Banco de atividades (admin-banco.js) */
.bc-filtros { align-items: center; margin-top: 8px; }
.bc-grupo { border-left: 6px solid var(--ac, var(--accent)); }
.bc-grupo h3 small { color: var(--suave); font-weight: 400; }
.bc-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.bc-cartao { border: 1px solid var(--borda); border-radius: 12px; padding: 10px 12px; background: var(--papel); display: flex; flex-direction: column; gap: 4px; }
.bc-cartao.no-sep { border-color: #177a5c; box-shadow: inset 4px 0 0 #177a5c; }
.bc-cartao h4 { margin: 2px 0; font-size: 16px; }
.bc-cartao .nota { margin: 0; font-size: 13px; }
.bc-cab { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bc-ano { font-size: 13px; font-weight: 800; color: var(--on-color); border-radius: 999px; padding: 2px 9px; background: var(--yo); }
.bc-ano.a7 { background: var(--y7); } .bc-ano.a8 { background: var(--y8); } .bc-ano.a9 { background: var(--y9); }
.bc-acoes { margin-top: auto; padding-top: 6px; gap: 6px; }
.bc-acoes .sel-ano { max-width: 100%; }

/* Mini-folha de cálculo (motor folha, public/m/folha/app.js) */
.fl { max-width: 1000px; margin: 0 auto; padding: 0 16px 40px; }
.fl-largo { max-width: 1000px; margin: 8px auto; padding: 0 16px; }
.fl-ex { background: var(--papel); border: 1px solid var(--borda); border-radius: 14px; padding: 16px 18px; }
.fl-ex h2 { margin: 4px 0 6px; }
.fl-enun { margin: 0 0 8px; white-space: pre-line; }
.fl-objetivos { list-style: none; padding: 0; margin: 6px 0 10px; }
.fl-objetivos li { padding: 4px 8px; margin: 3px 0; border-radius: 8px; background: var(--item-bg); }
.fl-objetivos li.ok { background: #e3f6ee; color: #11633a; font-weight: 700; }
.fl-objetivos li.ko { background: #fdecea; color: #8f1f16; font-weight: 700; }
.fl-dicas { margin: 6px 0; }
.fl-barra { display: flex; align-items: center; gap: 0; border: 1px solid var(--borda-in); border-radius: 8px 8px 0 0; background: var(--papel); }
.fl-nome { min-width: 70px; padding: 6px 8px; font-weight: 800; border-right: 1px solid var(--borda-in); font-family: ui-monospace, Consolas, monospace; }
.fl-fx { padding: 6px 8px; color: var(--suave); font-style: italic; border-right: 1px solid var(--borda-in); }
.fl-barra input { flex: 1; border: 0; padding: 6px 8px; font: 15px ui-monospace, Consolas, monospace; background: transparent; color: var(--texto); min-width: 0; }
.fl-barra input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.fl-rolar { overflow: auto; max-width: 100%; border: 1px solid var(--borda-in); border-top: 0; border-radius: 0 0 8px 8px; }
.fl-grelha { border-collapse: collapse; font: 14px "Atkinson Hyperlegible", system-ui, sans-serif; user-select: none; outline: none; background: #fff; color: #1b1b1b; }
.fl-grelha th { background: #eef1f4; color: #444; font-weight: 600; border: 1px solid #d0d6dc; padding: 3px 6px; min-width: 32px; position: sticky; top: 0; }
.fl-grelha tbody th { left: 0; position: sticky; z-index: 1; }
.fl-grelha .fl-canto { z-index: 2; left: 0; }
.fl-grelha td { border: 1px solid #dde2e7; min-width: 92px; max-width: 160px; height: 26px; padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; cursor: cell; }
.fl-grelha td.fixa { background: #f4f6f8; color: #333; font-weight: 600; }
.fl-grelha td.num { text-align: right; }
.fl-grelha td.formula { color: #0b4f8a; }
.fl-grelha td.erro { color: var(--erro-txt); font-weight: 700; }
.fl-grelha td.intervalo { background: #dbeafe; }
.fl-grelha td.sel { outline: 2px solid #1f6f43; outline-offset: -2px; background: #fff; }
.fl-grelha td.errada { box-shadow: inset 0 0 0 2px #b3261e; background: #fdecea; }
.fl-grelha .fl-in { width: 100%; border: 0; outline: none; font: inherit; padding: 0; background: #fff; color: #111; }
.fl-alca { position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; background: #1f6f43; border: 1px solid #fff; cursor: crosshair; z-index: 3; touch-action: none; }
.fl-ajuda { margin-top: 8px; }
:root[data-theme="dark"] .fl-grelha { filter: brightness(.92); }
/* Solução da mini folha de cálculo (professor) */
.sol-folha { overflow-x: auto; margin: 8px 0; }
.sol-folha table { border-collapse: collapse; font-size: 14px; }
.sol-folha th, .sol-folha td { border: 1px solid var(--borda, #ccd); padding: 3px 8px; text-align: left; white-space: nowrap; }
.sol-folha th { background: var(--fundo2, #eef1f6); font-weight: 600; text-align: center; }
.sol-folha td.sol-cel { background: #e6f6ea; }
html[data-theme="dark"] .sol-folha td.sol-cel { background: #1f3b28; }
.jg-tab.fechado { opacity: .55; }
.fl-pontos { margin: 6px 0; }
.dados-rolar.alta { max-height: 340px; overflow-y: auto; }
.dados-rolar.alta thead th { position: sticky; top: 0; background: var(--papel); box-shadow: inset 0 -1px 0 var(--borda); }
/* Planificação (Administração e página para imprimir) */
.pl-barra { display: flex; gap: 2px; margin-top: 8px; border-radius: 8px; overflow: hidden; }
.pl-seg { background: var(--ac, #8a9a95); color: var(--on-color); font-size: 13px; font-weight: 600; padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex-basis: 0; }
.cor-cinza { --ac: #6b7c77; }
.cor-livre { --ac: #b8c4c0; }
.pl-seg.cor-livre { color: #1d2b27; }
.pl-mod { border-left: 6px solid var(--ac, var(--borda)); }
.pl-duas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 24px; }
.pl-duas h4, .pl-extra h4 { margin: 8px 0 2px; }
.pl-duas ul { margin: 0 0 6px; padding-left: 20px; }
.pl-rolar { overflow-x: auto; margin: 10px 0; }
.pl-tabela { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 14px; }
.pl-tabela th, .pl-tabela td { border: 1px solid var(--borda); padding: 6px 8px; text-align: left; vertical-align: top; }
.pl-tabela th { background: rgba(31,111,91,.10); }
.pl-tabela td.pl-n { text-align: center; font-weight: 700; color: var(--ac, inherit); width: 3em; }
.pl-at { display: block; margin: 2px 0; }
.pl-at.falta { color: #a33; }
.pl-abrir { text-decoration: none; }
.pl-extra { border-top: 1px solid var(--borda); padding-top: 4px; }
@media print { .pl-tabela tr { break-inside: avoid; } .pl-mod { break-inside: auto; } .pl-rolar { overflow: visible; } .pl-tabela { min-width: 0; font-size: 13px; } .pl-seg { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.jogar-inst { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.jogar-inst details { width: 100%; }
.jogar-inst [hidden] { display: none; }
.pl-seg { text-align: center; }
.pl-ordem { list-style: none; margin: 10px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pl-ord { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--borda); border-radius: 8px; background: var(--papel); }
.pl-ord .pega { cursor: grab; font-size: 18px; color: #6b7c77; touch-action: none; }
.pl-ord.arrastando { opacity: .85; box-shadow: 0 4px 14px rgba(0,0,0,.15); position: relative; z-index: 2; }
.pl-ord.alvo-antes { border-top: 3px solid var(--ac, #1f6f5b); }
.pl-ord.alvo-fim { border-bottom: 3px solid var(--ac, #1f6f5b); }
.pl-ponto { width: 14px; height: 14px; border-radius: 4px; background: var(--ac, #8a9a95); flex: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pl-ord-nome { flex: 1; min-width: 0; }
.pl-ord-bt { display: flex; gap: 4px; }
/* Opinião do aluno numa atividade em teste (public/opiniao.js) */
.op-botao { position: fixed; left: 14px; bottom: 14px; z-index: 50; border: 0; border-radius: 999px; padding: 10px 16px; font: inherit; font-weight: 700; background: #6a3fb5; color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.25); cursor: pointer; }
.op-fundo { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.op-caixa { background: var(--papel, #fff); color: var(--texto, #1d2b27); border-radius: 14px; padding: 18px; width: min(460px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.op-caixa h2 { margin: 0 0 6px; }
.op-caixa textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 8px; border-radius: 8px; border: 1px solid var(--borda-in, #b9d3c9); margin: 8px 0; background: var(--input, #fff); color: inherit; }
.op-grupo { border: 1px solid var(--borda, #d5e5de); border-radius: 10px; margin: 8px 0; padding: 6px 10px; }
.op-grupo legend { font-weight: 700; padding: 0 4px; }
.op-op { display: inline-flex; align-items: center; gap: 4px; margin: 4px 12px 4px 0; cursor: pointer; }
html.projetor .op-botao, html.projetor .op-balao { display: none; }
.op-balao { position: fixed; left: 14px; bottom: 66px; z-index: 50; max-width: min(320px, calc(100vw - 28px)); background: var(--papel); color: var(--texto); border: 2px solid #6a3fb5; border-radius: 14px; padding: 12px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 8px; }
@media print { .op-botao, .op-balao, .op-fundo { display: none !important; } }
.selo.piloto { background: #efe7fb; color: #4b2a87; }
:root[data-theme="dark"] .selo.piloto { background: #2b1d47; color: #d9c8ff; }
.op-resumo h3 { margin: 6px 0; }
.op-linha { display: grid; grid-template-columns: 7.5em 1fr 2em; align-items: center; gap: 8px; margin: 4px 0; }
.op-trilho { background: rgba(127,127,127,.15); border-radius: 6px; height: 14px; overflow: hidden; }
.op-barra { display: block; height: 100%; border-radius: 6px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.op-barra.v { background: #2a9d6a; } .op-barra.a { background: #e0a020; } .op-barra.r { background: #d0453a; }
.op-coments { list-style: none; padding: 0; } .op-coments li { border-top: 1px solid var(--borda); padding: 6px 0; } .op-coments p { margin: 2px 0; }
.op-caixa { --papel: #fff; --texto: #1d2b27; background: #fff; color: #1d2b27; }
.op-caixa .btn.sec { background: #fff; color: #1f6f5b; border: 2px solid #1f6f5b; }
.op-caixa .nota { color: var(--suave); }
.nota-marcas { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.nota-marcas .btn.sel { background: var(--accent, #1f6f5b); color: var(--on-color); }
.dlg-nota textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 8px; border-radius: 8px; border: 1px solid var(--borda-in); background: var(--input, #fff); color: var(--texto); }
.nota-aula .etq { margin-right: 4px; }
.nota-marcas .btn.sec.sel, .nota-marcas .btn.sec[aria-pressed="true"] { background: #1f6f5b; color: #fff; border-color: #1f6f5b; }
/* «Aula de hoje» no topo da lista da turma (public/admin-turma.js) */
.ah-cartao { border: 1px solid var(--borda); border-left: 6px solid var(--ac, #1f6f5b); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; background: var(--papel); }
.ah-cartao > summary { cursor: pointer; font-weight: 800; font-size: 1.05em; }
.ah-cartao > summary small { font-weight: 500; color: var(--texto-2); }
.ah-cartao h3 { margin: 8px 0 4px; }
.ah-cartao p { margin: 4px 0; }
.ah-lista { margin: 6px 0; padding-left: 18px; }
.ah-ativ { margin: 4px 0; }
.ah-ex { margin: 6px 0 10px; }
.ah-ex .ex-onde-lista { margin-top: 4px; }
.ah-acoes select { max-width: 100%; }
.qz-aud.com-avisos { border-left-color: #d0453a; } .qz-avisos { margin: 6px 0; padding-left: 18px; } .qz-avisos li { margin: 2px 0; }
/* «O que tens por fazer» na página inicial do aluno (porFazer em public/home.js) */
.pf-cartao { background: var(--papel); border: 1px solid var(--borda); border-left: 6px solid #6a3fb5; border-radius: 14px; padding: 12px 16px; margin: 14px 0; }
.pf-cartao h2 { margin: 0 0 8px; font-size: 1.15em; }
.pf-cartao h2 small { font-weight: 500; color: var(--texto-2); }
.pf-emdia { border-left-color: #2a9d6a; }
.pf-emdia p { margin: 0; font-weight: 700; }
.pf-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pf-item a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--borda); text-decoration: none; color: inherit; background: var(--item-bg, transparent); }
.pf-item a:hover, .pf-item a:focus-visible { border-color: #6a3fb5; }
.pf-ico { font-size: 1.3em; width: 1.6em; text-align: center; flex: none; }
.pf-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pf-txt b { overflow-wrap: anywhere; }
.pf-txt small { color: var(--texto-2); }
.pf-seta { font-size: 1.6em; color: #6a3fb5; flex: none; }
.pf-com a { border-color: #6a3fb5; background: rgba(106,63,181,.06); }
.pf-dada a { border-color: #d98f00; background: rgba(217,143,0,.07); }
.ano-op { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; cursor: pointer; }
.ano-op span { display: flex; flex-direction: column; } .ano-op small { color: var(--texto-2); }
.ano-grupo { border: 1px solid var(--borda); border-radius: 10px; padding: 6px 12px; margin: 8px 0; }
.ano-confirmar { border-left-color: #d0453a; }
.ano-feito { border-left-color: #2a9d6a; }

/* Estatísticas, últimos acessos */
.ac-filtros { flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.ac-procura input { min-width: 240px; }
.ac-tab { width: 100%; border-collapse: collapse; }
.ac-tab th, .ac-tab td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--borda-tab); vertical-align: top; }
.ac-quando { white-space: nowrap; }
.ac-quando b, .ac-quando small { display: block; }
.ac-quando small { color: var(--suave); font-size: .78rem; }
.ac-nunca td { color: var(--suave); }
@media (max-width: 600px) { .ac-procura input { min-width: 0; width: 100%; } .ac-procura { flex: 1 1 100%; } }

/* Fichas: figura de um passo (captura de ecrã com as marcas de onde carregar) */
.passo-fig { margin: 10px 0 14px; max-width: 760px; }
.passo-fig img { display: block; width: 100%; height: auto; border: 1px solid var(--borda); border-radius: 10px; background: #fff; }
.passo-fig figcaption { font-size: .9rem; color: var(--suave); margin-top: 6px; line-height: 1.45; }
@media print { .passo-fig { break-inside: avoid; max-width: 120mm; } }
/* Capturas animadas (public/m/ficha/demo.js): marcas numeradas, cursor, clique, balão com o que fazer */
.fa-palco { position: relative; border: 1px solid var(--borda); border-radius: 10px; overflow: hidden; background: #fff; user-select: none; }
.fa-img { position: relative; }
.fa-palco img { display: block; width: 100%; height: auto; border: 0; border-radius: 0; }
.fa-marca { position: absolute; box-sizing: border-box; border: 3px solid #e11d48; border-radius: 8px; background: transparent; padding: 0; cursor: pointer; transition: opacity .3s, box-shadow .3s, background-color .3s; }
.fa-marca:focus-visible { outline: 3px solid #2a6fb0; outline-offset: 2px; }
.fa-num { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 4px; box-sizing: border-box; border-radius: 11px; background: #e11d48; color: #fff; font: 700 13px/1 system-ui, sans-serif; }
.fa-marca .fa-num { position: absolute; top: -11px; left: -11px; border: 2px solid #fff; }
.fa.a-tocar .fa-marca { opacity: .35; }
.fa.a-tocar .fa-marca.feita { opacity: .6; }
.fa .fa-marca.ativa { opacity: 1; background: rgba(225, 29, 72, .12); animation: fa-pulsar 1.1s ease-in-out infinite; }
@keyframes fa-pulsar { 0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, .55); } 50% { box-shadow: 0 0 0 8px rgba(225, 29, 72, 0); } }
.fa-cursor { position: absolute; width: 30px; height: 30px; margin: -3px 0 0 -5px; opacity: 0; pointer-events: none; z-index: 3; transition: left .85s cubic-bezier(.45, .05, .25, 1), top .85s cubic-bezier(.45, .05, .25, 1), opacity .3s, transform .15s; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.fa-cursor svg { width: 100%; height: 100%; display: block; }
.fa-cursor.ver { opacity: 1; }
.fa-cursor.prime { transform: scale(.82); }
.fa-onda { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 3px solid #e11d48; opacity: 0; pointer-events: none; z-index: 2; }
.fa-onda.bate { animation: fa-onda .6s ease-out; }
.fa-onda.bate2 { animation: fa-onda .45s ease-out 2; }
@keyframes fa-onda { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(3); } }
.fa-fantasma { position: absolute; box-sizing: border-box; border: 2px dashed #e11d48; border-radius: 8px; background: rgba(225, 29, 72, .15); opacity: 0; pointer-events: none; transition: left 1s ease-in-out, top 1s ease-in-out, opacity .2s; }
.fa-fantasma.ver { opacity: 1; }
.fa-balao { --tx: -50%; --ty: calc(-100% - 14px); position: absolute; z-index: 4; max-width: min(320px, 70%); padding: 8px 11px; border-radius: 10px; background: #111827; color: #fff; font-size: .92rem; line-height: 1.4; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); transform: translate(var(--tx), var(--ty)); opacity: 0; pointer-events: none; transition: opacity .25s; }
.fa-balao.ver { opacity: 1; }
.fa-linha { display: block; margin-top: 4px; }
.fa { container-type: inline-size; }
/* Em ecrãs estreitos o balão passa para baixo da imagem, para não tapar a captura. */
@container (max-width: 560px) {
  .fa-balao { position: static; transform: none; max-width: none; border-radius: 0; box-shadow: none; display: none; }
  .fa-balao.ver { display: block; }
}
.fa-balao.baixo { --ty: 14px; }
.fa-balao.dir { --tx: -92%; }
.fa-balao.esq { --tx: -8%; }
.fa-balao b { color: #fda4af; }
.fa-escreve { background: #fff; color: #111; border-radius: 4px; padding: 1px 5px; }
.fa-escreve::after { content: "▏"; animation: fa-piscar .8s steps(1) infinite; }
@keyframes fa-piscar { 50% { opacity: 0; } }
.fa.pausa .fa-marca.ativa, .fa.pausa .fa-escreve::after { animation-play-state: paused; }
.fa-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.fa-ampliar { font-size: .9rem; margin-left: auto; }
.fa-lista { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.fa-item { display: flex; gap: 8px; align-items: flex-start; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 8px; padding: 5px 6px; font: inherit; font-size: .92rem; color: var(--texto); cursor: pointer; line-height: 1.4; }
.fa-item .fa-num { flex: none; margin-top: 1px; }
.fa-item:hover, .fa-lista li.ativa .fa-item { background: var(--light); }
.fa-lista li.ativa .fa-item { font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .fa-cursor, .fa-fantasma { transition: none; } .fa .fa-marca.ativa { animation: none; } }
@media print {
  .fa-ctrl, .fa-cursor, .fa-onda, .fa-balao, .fa-fantasma { display: none !important; }
  .fa-marca { opacity: 1 !important; animation: none !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .fa-num { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .fa-item { padding: 1px 0; }
}
/* Editor das marcas animadas (public/admin-marcas.js) */
.mc-dlg { max-width: min(1200px, 96vw); width: 96vw; }
.mc-corpo { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr); gap: 14px; align-items: start; margin: 10px 0; }
@media (max-width: 760px) { .mc-corpo { grid-template-columns: 1fr; } }
.mc-area { border: 1px solid var(--borda); border-radius: 8px; overflow: hidden; cursor: crosshair; touch-action: none; user-select: none; background: #fff; }
.mc-area img { display: block; width: 100%; height: auto; pointer-events: none; }
.mc-camada { position: absolute; inset: 0; }
.mc-marca { position: absolute; box-sizing: border-box; border: 3px solid #e11d48; border-radius: 6px; cursor: move; background: rgba(225, 29, 72, .06); }
.mc-marca.sel { border-color: #2a6fb0; background: rgba(37, 99, 235, .12); }
.mc-marca .fa-num { position: absolute; top: -11px; left: -11px; border: 2px solid #fff; }
.mc-marca.sel .fa-num { background: #2a6fb0; }
.mc-canto { position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; border-radius: 50%; background: #2a6fb0; border: 2px solid #fff; cursor: nwse-resize; }
.mc-destino { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 3px dashed #e11d48; pointer-events: none; }
.mc-lista { display: flex; flex-direction: column; gap: 8px; max-height: 70vh; overflow: auto; }
.mc-item { border: 1px solid var(--borda); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.mc-item.sel { border-color: #2a6fb0; box-shadow: 0 0 0 2px rgba(37, 99, 235, .25); }
.mc-cab { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mc-cab select { flex: 1; min-width: 120px; }
.mc-item textarea, .mc-item input[type=text], .mc-cab select { font: inherit; padding: 6px 8px; border: 2px solid var(--borda-in); border-radius: 8px; background: var(--input); color: inherit; box-sizing: border-box; width: 100%; }
.mc-previa:not(:empty) { margin-top: 12px; border-top: 1px solid var(--borda); padding-top: 12px; }
.fig-mini { max-height: 54px; max-width: 120px; border: 1px solid var(--borda); border-radius: 6px; }
.fig-marcas { align-items: center; }
/* Fallback de cópia para a área de transferência, fora do ecrã */
.docs-ficha { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
@media print { .docs-ficha { display: none; } }
/* Pedidos aos colegas (public/admin-pedidos.js) */
.pd-grelha { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 14px; }
.pd-form .campo input, .pd-form .campo select, .pd-form textarea, .pd-modelo input, .pd-modelo textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 7px 9px; border: 2px solid var(--borda-in); border-radius: 8px; background: var(--input); color: inherit; }
.pd-lista { display: flex; flex-direction: column; gap: 10px; }
.pd-item { border: 1px solid var(--borda); border-left: 5px solid #9ca3af; border-radius: 10px; padding: 10px 12px; }
.pd-item.est-enviado { border-left-color: #2a6fb0; }
.pd-item.est-respondeu { border-left-color: #d97706; }
.pd-item.est-validado, .pd-item.est-concluído { border-left-color: #16a34a; }
.pd-cab { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.pd-cab > div:first-child { flex: 1; min-width: 200px; }
.pd-estado { font-size: .8rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--light); }
.pd-acoes { display: flex; gap: 6px; }
.pd-enviar { margin-top: 8px; }
.pd-email { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--borda); }
.pd-texto { white-space: pre-wrap; font: inherit; background: var(--item-bg); border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.copia-oculta { position: fixed; left: -9999px; top: 0; }

/* Convidados (Administração) */
.cv-ate { display: inline-flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--suave); }
.cv-tab { width: 100%; border-collapse: collapse; }
.cv-tab th, .cv-tab td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--borda-tab); vertical-align: middle; }
.cv-tab tr.cv-fim td { color: var(--suave); text-decoration: line-through; }
.cv-acoes { white-space: nowrap; }
.cv-acoes .btn { margin: 2px; }
.cv-trab td { background: var(--item-bg); }
.cv-cartoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 10px; }
.cv-cartao { border: 2px dashed var(--borda); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.cv-cartao code { font-size: 1.05rem; font-weight: bold; }
.cv-copiar { align-self: flex-start; margin-top: 4px; }
.cv-imprimir { display: none; }
@media print {
  .cv-imprimir { display: block; }
  .cv-cartoes { grid-template-columns: 1fr 1fr; }
  .cv-cartao { break-inside: avoid; border-color: #000; color: #000; }
  .cv-copiar { display: none; }
}
.aviso-convidado { font-weight: 600; }
.aviso-convidado p { margin: 0 0 6px; }
.aviso-convidado .linha-a { align-items: center; }
.ativ-leitor .linha-a { margin-top: 6px; }
.cv-grelha { border-collapse: collapse; font-size: .88rem; }
.cv-grelha th, .cv-grelha td { border: 1px solid var(--borda-tab); padding: 5px 7px; text-align: center; white-space: nowrap; }
.cv-grelha thead th { vertical-align: bottom; max-width: 120px; white-space: normal; font-size: .78rem; line-height: 1.2; }
.cv-grelha thead th span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cv-grelha .cv-nome { text-align: left; position: sticky; left: 0; background: var(--papel); z-index: 1; }
.cv-grelha .cv-nome small { color: var(--suave); }
.cv-v.alto { background: var(--ok-bg); }
.cv-v.medio { background: var(--aviso-bg); }
.cv-v.baixo { background: var(--erro-bg); }
.cv-v.feito { color: var(--suave); }
.cv-v.vazio { color: var(--suave); }
.cv-ver { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 10px; }
.cv-ver-op { display: inline-flex; align-items: center; gap: 6px; }
.cv-ver-tit { margin: 10px 0 0; }
.cv-grupo { margin: 8px 0; border: 1px solid var(--borda-tab); border-radius: 10px; padding: 6px 10px; }
.cv-grupo summary { cursor: pointer; }
.cv-ativs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 12px; margin: 8px 0; }
.cv-ativs small { color: var(--suave); }
.exemplo.por-abrir summary { color: var(--suave); }
.exemplo.por-abrir summary::marker { content: ""; }
.etq.ex-etq { background: var(--aviso-bg); color: var(--texto); margin-left: 4px; }
.pa-ex { display: block; font-size: 13px; color: var(--suave); line-height: 1.1; }

/* Exercícios dos planos de aula por onde se fazem (TP.ondeExercicio): verde na plataforma, azul explicar na aula. */
.onde-legenda { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
/* As mesmas três cores em todo o lado: etiquetas, listas, barras e legenda da «Aula de hoje». */
.onde-etq { display: inline-block; font-size: 13px; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 1px solid #94a3b8; background: #94a3b8; color: #1e293b; white-space: nowrap; }
.onde-etq.onde-plataforma { background: #177a5c; border-color: #177a5c; color: #fff; }
.onde-etq.onde-aula { background: #2a6fb0; border-color: #2a6fb0; color: #fff; }
.ex-onde-lista { padding-left: 0; list-style: none; margin: 6px 0; }
.ex-onde { margin: 6px 0; padding: 6px 10px; border-left: 4px solid #94a3b8; border-radius: 6px; background: rgba(127, 127, 127, 0.06); }
.ex-onde.onde-plataforma { border-left-color: #177a5c; background: rgba(23, 122, 92, 0.09); }
.ex-onde.onde-aula { border-left-color: #2a6fb0; background: rgba(37, 99, 235, 0.09); }
tr.onde-plataforma td:first-child { border-left: 4px solid #177a5c; }
tr.onde-aula td:first-child { border-left: 4px solid #2a6fb0; }
tr.onde-fora td:first-child { border-left: 4px solid #94a3b8; }
@media print { .onde-etq, .ex-onde, tr.onde-plataforma td, tr.onde-aula td { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Plano de aula ao lado da lista de atividades da turma («📋 Plano ao lado», public/admin-turma.js). */
.prof:has(.pl-lado-grid) { max-width: 1600px; }
.pl-lado-grid { display: grid; grid-template-columns: minmax(300px, 38%) 1fr; gap: 14px; align-items: start; }
.pl-lado { position: sticky; top: 8px; max-height: calc(100vh - 16px); overflow: auto; margin: 0; }
.pl-lado-dir { min-width: 0; }
.pl-lado-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.pl-lado-cab h3 { margin: 2px 0; }
.pl-lado-cab .k { font-size: 13px; letter-spacing: 0.05em; color: var(--suave); font-weight: 700; }
.pl-lado-aula h4 { margin: 14px 0 4px; }
.pl-lado details { margin: 6px 0; }
.pl-lado details summary { cursor: pointer; font-weight: 700; }
.tl-plano.sel { outline: 2px solid var(--ok); }
.tl-topo { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-bottom: 6px; }
.tl-com-plano .tl-linha { flex-wrap: wrap; }
@media (max-width: 900px) {
  .pl-lado-grid { grid-template-columns: 1fr; }
  .pl-lado { position: static; max-height: none; }
}

/* Chat dos alunos (/chat/) e do professor (admin-chat.html), public/chat/vista.js. */
.ch-pagina { max-width: 900px; }
.ch-cartao { display: flex; flex-direction: column; gap: 8px; }
.ch-salas { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-sala { border: 2px solid var(--borda); background: var(--papel); color: var(--texto); border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.ch-sala.sel { border-color: var(--accent); background: var(--accent); color: var(--on-color); }
.ch-on { font-weight: 400; font-size: 13px; }
.ch-porler { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: var(--erro); color: #fff; font-size: 13px; font-weight: 800; text-align: center; }
.ch-privada { color: var(--suave); }
.ch-ligar { display: flex; flex-direction: column; gap: 4px; padding: 8px; margin-bottom: 8px; border: 1px solid var(--borda); border-radius: 10px; font-size: 14px; }
.ch-int { font-weight: 400; }
.ch-regras-intro { font-weight: 700; }
.ch-grupo { margin-top: 10px; font-weight: 800; font-size: 13px; color: var(--suave); }
.ch-nova { display: flex; gap: 4px; margin-top: 6px; }
.ch-nova input { min-width: 0; flex: 1; }
.ch-estado { margin: 0; min-height: 1em; font-size: 14px; }
.ch-infr { color: var(--erro); font-weight: 700; }
.ch-lista { height: min(60vh, 560px); overflow-y: auto; border: 1px solid var(--borda); border-radius: 12px; padding: 10px; background: var(--fundo, rgba(127, 127, 127, 0.05)); display: flex; flex-direction: column; gap: 6px; }
.ch-dia { align-self: center; font-size: 13px; color: var(--suave); margin: 6px 0; }
.ch-vazio { align-self: center; }
.ch-msg { position: relative; max-width: 80%; align-self: flex-start; background: var(--papel); border: 1px solid var(--borda); border-radius: 12px; padding: 6px 10px; }
.ch-msg.meu { align-self: flex-end; background: #dbeafe; border-color: #93c5fd; color: #1e293b; }
.ch-msg.prof { border: 2px solid var(--accent); background: #ecfdf5; color: #14352c; }
.ch-msg.bloq { border: 2px dashed var(--erro); background: var(--erro-bg); color: #5b1a14; }
.ch-msg.apag { opacity: 0.75; }
.ch-cab { font-size: 13px; }
.ch-cab small { color: var(--suave); }
.ch-msg.meu .ch-cab small, .ch-msg.prof .ch-cab small, .ch-msg.bloq .ch-cab small { color: #475569; }
.ch-texto { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ch-apagada { margin: 2px 0 0; font-style: italic; color: var(--suave); }
.ch-aviso { align-self: stretch; max-width: none; background: #fff4d6; border: 2px solid var(--aviso); color: #5a3d00; font-weight: 700; text-align: center; }
.ch-aviso.sis { background: var(--item-bg); border-color: var(--borda); color: var(--texto); font-weight: 400; }
.ch-aviso small { font-weight: 400; color: #6b5a2e; }
.ch-reac { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 4px; }
.ch-r { border: 1px solid var(--borda); background: var(--papel); color: var(--texto); border-radius: 999px; padding: 0 8px; font: inherit; font-size: 13px; cursor: pointer; }
.ch-r.eu { border-color: var(--accent); background: #dcf3e8; color: #0f5a46; }
.ch-reagir { display: inline-block; position: relative; }
.ch-reagir summary { list-style: none; cursor: pointer; font-size: 13px; opacity: 0.7; padding: 0 4px; }
.ch-reagir summary::-webkit-details-marker { display: none; }
.ch-emojis { position: absolute; bottom: 100%; left: 0; z-index: 5; display: flex; gap: 2px; background: var(--papel); border: 1px solid var(--borda); border-radius: 999px; padding: 2px 6px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15); }
.ch-emoji { border: 0; background: none; font-size: 20px; cursor: pointer; padding: 2px; }
.ch-escrever { display: flex; gap: 6px; align-items: center; }
.ch-campo { flex: 1; min-width: 0; padding: 10px 12px; border: 2px solid var(--borda); border-radius: 10px; font: inherit; background: var(--papel); color: var(--texto); }
.ch-escrever.bloqueado .ch-campo { background: var(--erro-bg); }
.ch-conta { color: var(--suave); }
.ch-regras ul { padding-left: 20px; }
.ch-regras li { margin: 6px 0; }
.ch-etq-bloq { background: var(--erro-bg); color: var(--erro); margin-left: 4px; }
.ch-etq-apag { margin-left: 4px; }
.ch-acoes { position: absolute; top: 2px; right: 2px; }
.ch-prof { display: grid; grid-template-columns: 220px 1fr; gap: 12px; align-items: start; }
.ch-salas-prof { flex-direction: column; flex-wrap: nowrap; }
.ch-salas-prof .ch-sala { text-align: left; border-radius: 10px; }
.ch-salas-din { display: flex; flex-direction: column; gap: 6px; }
.ch-sug { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.ch-sug-item { text-align: left; border: 1px solid var(--borda); border-radius: 10px; padding: 6px 10px; background: var(--papel); color: var(--texto); font: inherit; cursor: pointer; }
.ch-sug-item:hover, .ch-sug-item:focus-visible { border-color: var(--accent); }
.ch-sug-item small { color: var(--suave, #64748b); }
.ch-todas { margin-top: 8px; }
.ch-principal { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ch-cab-sala { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ch-cab-sala h2 { margin: 0; }
.ch-lista-prof .ch-msg { padding-right: 52px; }
.ch-acoes .menu > summary { padding: 2px 8px; min-height: 0; }
.ch-reg-b td { background: var(--erro-bg); }
.ch-reg-a td { background: #fff4d6; }
@media (max-width: 720px) { .ch-prof { grid-template-columns: 1fr; } .ch-salas-prof, .ch-salas-din { flex-direction: row; flex-wrap: wrap; } .ch-msg { max-width: 92%; } }

/* Chat de apoio no canto inferior direito das páginas dos alunos (public/chat/flutuante.js). */
.chf-botao { position: fixed; right: 16px; bottom: 16px; z-index: 55; display: flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 12px 16px; font: inherit; font-weight: 800; font-size: 16px; background: var(--accent, #177a5c); color: var(--on-color); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); cursor: pointer; }
.chf-botao[hidden] { display: none; }
/* Na vista do professor como aluno (modo projetor), o botão «Mostrar o painel do professor» ocupa o canto: o do chat sobe. */
html.projetor .chf-botao { bottom: 84px; }
a.chf-botao { text-decoration: none; }
.chf-botao.tem { animation: chf-pulso 1.6s ease-in-out 3; }
@keyframes chf-pulso { 50% { transform: scale(1.08); } }
.chf-badge { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--erro); color: #fff; font-size: 13px; text-align: center; border: 2px solid #fff; }
.chf-badge[hidden] { display: none; }
.chf-painel { position: fixed; right: 16px; bottom: 76px; z-index: 56; width: min(380px, calc(100vw - 32px)); height: min(540px, calc(100vh - 100px)); display: flex; flex-direction: column; background: var(--papel); color: var(--texto); border: 1px solid var(--borda); border-radius: 16px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); overflow: hidden; }
.chf-painel[hidden] { display: none; }
.chf-cab { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--borda); }
.chf-cab b { flex: 1; }
.chf-corpo { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px; overflow: auto; }
.chf-lista { flex: 1; height: auto; min-height: 120px; }
.chf-salas .ch-sala { padding: 4px 10px; font-size: 14px; }
.chf-salas[hidden] { display: none; }
.chf-regras ul { padding-left: 18px; font-size: 14px; }
.chf-regras h3 { margin: 0 0 6px; }
.chf-msg { padding: 8px; }
@media (max-width: 600px) {
  .chf-rot { display: none; }
  .chf-painel { right: 8px; left: 8px; bottom: 72px; width: auto; height: calc(100vh - 90px); }
}
@media print { .chf-botao, .chf-painel { display: none !important; } }

/* Conta para a avaliação? (peso da pauta; 0 = treino): cartões da página inicial e faixa no topo da atividade. */
.avalia-etq { display: inline-block; margin-top: 6px; padding: 1px 8px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #dbeafe; color: #1e3a8a; border: 1px solid #93c5fd; }
.avalia-etq.treino { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
.avalia-faixa { max-width: 1100px; margin: 8px auto 0; padding: 6px 12px; border-radius: 10px; font-size: 14px; font-weight: 700; background: #dbeafe; color: #1e3a8a; border: 1px solid #93c5fd; }
.avalia-faixa.treino { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
html.jogo .avalia-faixa { margin: 8px 12px 0; }
@media print { .avalia-faixa { display: none; } }
.selo.treino { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }

/* «Aula de hoje»: a aula de 2 tempos; em cada tempo, uma barra com um pedaço por exercício (largura = minutos, cor = onde se faz). */
.ah-tempo-bloco { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--borda); border-radius: 12px; background: var(--papel); }
.ah-tempo-bloco h3 { margin: 0 0 6px; font-size: 17px; }
.ah-tempo-nome { font-weight: 400; color: var(--suave); }
.ah-tempo { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; }
.ah-min { flex: none; font-size: 13px; color: var(--suave); }
.ah-barra { flex: 1; display: flex; gap: 2px; height: 28px; border-radius: 8px; overflow: hidden; }
.ah-barra.vazia { align-items: center; padding: 0 8px; font-size: 13px; color: var(--suave); background: rgba(127, 127, 127, 0.1); }
.ah-seg { flex-basis: 0; min-width: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 700; line-height: 28px; padding: 0 6px; color: #fff; background: #94a3b8; }
.ah-seg.ah-livre { background: transparent; color: var(--suave); font-weight: 400; border: 1px dashed var(--borda); border-radius: 0 8px 8px 0; line-height: 26px; }
.ah-legenda { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0 0; font-size: 13px; }
.ah-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.ah-cor { display: inline-block; width: 22px; height: 14px; border-radius: 4px; }
/* As mesmas cores nas barras e na legenda. */
.ah-seg.onde-plataforma, .ah-cor.onde-plataforma { background: #177a5c; }
.ah-seg.onde-aula, .ah-cor.onde-aula { background: #2a6fb0; }
.ah-seg.onde-fora, .ah-cor.onde-fora { background: #94a3b8; }
.ah-seg.onde-fora { color: #1e293b; }
.ah-ex.dentro .ex-onde { opacity: 0.75; }
.ah-tempo-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ah-tempo-topo h3 { margin-bottom: 6px; }
.ah-saltados { margin: 6px 0; }

/* Chat do professor numa janela por cima da página (TP.janelaChat em comum.js) */
.chat-janela { position: fixed; right: 16px; bottom: 76px; z-index: 950; width: min(760px, calc(100vw - 32px)); height: min(calc(100vh - 100px), 900px); display: flex; flex-direction: column; background: var(--papel); color: var(--texto); border: 2px solid var(--accent); border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); overflow: hidden; }
.chat-janela-cab { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--borda, #ddd); }
.chat-janela-cab b { flex: 1; }
.chat-janela iframe { flex: 1; width: 100%; border: 0; background: var(--fundo, var(--papel)); }
@media (max-width: 600px) { .chat-janela { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; } }
body.chat-embutido .prof { padding-top: 8px; }
body.chat-embutido .rodape-credito { display: none; }
@media print { .chat-janela { display: none; } }

/* Chat do professor: turmas no topo (só as do semestre em vista), alunos da turma à esquerda */
.ch-turmas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--borda); }
.ch-sems { display: inline-flex; border: 1px solid var(--borda); border-radius: 999px; overflow: hidden; margin-right: 6px; }
.ch-sem { border: 0; background: transparent; color: var(--texto); font: inherit; font-size: 13px; padding: 4px 10px; cursor: pointer; }
.ch-sem.sel { background: var(--accent); color: var(--on-color); }
.ch-turma { border: 1px solid var(--borda); border-radius: 999px; background: var(--papel); color: var(--texto); font: inherit; font-weight: 700; padding: 5px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ch-turma.sel { background: var(--accent); border-color: var(--accent); color: var(--on-color); }
.ch-turma.off { opacity: .6; }
.ch-sala.ch-toda { font-weight: 700; }
.ch-sala.ch-aluno { font-weight: 400; }
.ch-sala.ch-aluno.tem { font-weight: 600; }
.ch-sala.ch-aluno small { color: var(--suave, #64748b); }
.ch-salas-din { max-height: 60vh; overflow-y: auto; }

/* Mensagem nova no chat: o botão do canto pisca enquanto houver mensagens por ler (TP.avisoChat) */
.chf-botao.piscar { animation: chf-piscar 1.1s ease-in-out infinite; }
@keyframes chf-piscar { 0%, 100% { box-shadow: 0 4px 16px rgba(0, 0, 0, .3); } 50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, .45), 0 4px 16px rgba(0, 0, 0, .3); background: #dc2626; } }
@media (prefers-reduced-motion: reduce) { .chf-botao.piscar { animation: none; background: #dc2626; outline: 4px solid rgba(239, 68, 68, .45); } }

/* Novidades para os alunos: popup de public/bloqueio.js */
.novidades-fundo { position: fixed; inset: 0; z-index: 2147482000; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.novidades { width: min(560px, 100%); max-height: min(86vh, 760px); display: flex; flex-direction: column; background: var(--papel); color: var(--texto); border-radius: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); overflow: hidden; animation: anuncio-entra .3s ease-out; }
.novidades-cab { padding: 14px 18px; font-size: 22px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #f59e0b, #c0346f); }
.novidades-lista { padding: 6px 18px; overflow-y: auto; }
.novidade { padding: 12px 0; border-bottom: 1px solid var(--borda); }
.novidade:last-child { border-bottom: 0; }
.novidade h3 { margin: 0; font-size: 19px; }
.novidade-data { font-size: 13px; color: var(--suave, #64748b); margin: 2px 0 6px; }
.novidade-txt { margin: 0; white-space: pre-line; line-height: 1.5; }
.novidade.vista { opacity: .75; }
.novidades-pe { padding: 12px 18px; display: flex; justify-content: flex-end; border-top: 1px solid var(--borda); }
@media (prefers-reduced-motion: reduce) { .novidades { animation: none; } }
@media print { .novidades-fundo { display: none; } }
/* Página «Novidades para os alunos» (public/admin-novidades.js) */
.nv-para { border: 0; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.nv-turmas { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 6px 0 0 4px; }
.nv-turmas.escondido { display: none; }
.nv-item { padding: 12px 0; border-bottom: 1px solid var(--borda); }
.nv-item:last-child { border-bottom: 0; }
.nv-item h3 { margin: 0 0 2px; }
.nv-item.acabou { opacity: .65; }
.nv-txt { white-space: pre-line; margin: 6px 0; }
.nv-vistas { font-weight: 700; margin: 4px 0 8px; }

/* Chat desligado para os alunos: aviso no topo do chat do professor e no botão da Administração */
.ch-off-aviso { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; font-weight: 700; }
.btn.chat-off { border-color: #dc2626; color: #b91c1c; }
/* Pedido de partilha explícita e ecrã visto pelo professor. */
.ecra-aluno { position: fixed; top: 8px; left: 8px; right: 8px; z-index: 2147483100; padding: 14px; background: var(--papel); color: var(--texto); border: 3px solid var(--accent); border-radius: 12px; box-shadow: 0 4px 18px #0005; }
.ecra-aluno p { margin: 8px 0; }
.ecra-aluno button { margin: 4px 8px 0 0; }
.ecra-prof { position: fixed; inset: 12px; z-index: 2147483100; background: var(--papel); color: var(--texto); border: 2px solid var(--accent); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; overflow: auto; box-shadow: 0 0 0 20px #0008; }
.ecra-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ecra-cab h2 { margin: 0; }
.ecra-prof img { flex: 1; min-height: 0; max-width: 100%; object-fit: contain; background: #111; }
.ecra-prof img[hidden] { display: none; }
.on-lista .btn { margin-left: 8px; }
@media print { .ecra-prof, .ecra-aluno { display: none; } }

/* Preparação escolhida pelo professor e tempos em lote. */
.aula-planeada { border-top: 4px solid var(--accent); }
.aula-planeada > summary { cursor: pointer; font-weight: 700; }
.aula-planeada > summary .ap-titulo { font-size: 1.15rem; margin-right: 12px; }
.aula-planeada[open] > summary { margin-bottom: 16px; }
.ap-objetivo { font-size: 1.15rem; font-weight: 650; }
.ap-editor { margin-top: 16px; border-top: 1px solid var(--borda); padding-top: 12px; }
.ap-editor form { display: grid; gap: 12px; padding-top: 12px; }
.ap-editor textarea { display: block; width: 100%; font: inherit; }
.ap-escolhas, .qt-lista { max-height: 280px; overflow: auto; display: grid; gap: 8px; padding: 8px; border: 1px solid var(--borda); border-radius: 8px; }
.ap-escolhas label, .qt-quiz { display: flex; align-items: start; gap: 10px; padding: 8px; cursor: pointer; }
.qt-quiz small { display: block; color: var(--muted, #666); }
.qt { scroll-margin-top: 20px; }
.qt .linha-a { margin: 12px 0; }
.ap-atividades li { padding: 12px 0; }
.ap-sugestoes { margin: 16px 0; padding: 12px; background: var(--papel); border: 1px solid var(--borda); border-radius: 10px; }
/* A ajuda destaca a conversa privada, mantém contexto e deixa espaço para escrever. */
.chf-painel { width: min(440px, calc(100vw - 32px)); height: min(650px, calc(100dvh - 100px)); border-radius: 18px; border: 2px solid var(--accent); }
.chf-painel.amplo { width: min(700px, calc(100vw - 32px)); }
.chf-cab { padding: 12px; background: var(--accent); color: var(--on-color); }
.chf-cab b { font-size: 1.05rem; }
.chf-contexto { padding: 8px 10px; background: var(--fundo); border-radius: 8px; font-size: .85rem; }
.chf-atalhos { display: flex; gap: 6px; flex-wrap: wrap; }
.chf-atalhos[hidden], .chf-contexto[hidden] { display: none; }
.chf-atalhos button { font-size: .78rem; padding: 5px 8px; }
.chf-ligacao { margin: 0; font-size: .78rem; color: var(--muted, #666); }
.ch-escrever { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.ch-escrever .ch-campo { width: 100%; min-height: 64px; max-height: 160px; resize: vertical; font: inherit; border-radius: 10px; padding: 10px; }
.ch-rodape-escrita { display: flex; align-items: center; gap: 8px; }
.ch-rodape-escrita button { margin-left: auto; }
.ch-dica { font-size: .75rem; color: var(--muted, #666); }
.ch-contexto { display: block; margin: 6px 0; font-size: .82rem; }
.ch-texto { white-space: pre-wrap; }
.ch-inbox { padding: 14px; border: 1px solid var(--borda); border-radius: 12px; margin-bottom: 12px; background: var(--papel); }
.ch-inbox h2 { font-size: 1rem; margin: 0; }
.ch-pendentes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ch-principal { min-height: 450px; }
.ch-lista-prof { height: min(55dvh, 650px); }
@media (max-width: 600px) {
 .chf-painel, .chf-painel.amplo { left: 8px; right: 8px; width: auto; bottom: 72px; height: calc(100dvh - 90px); }
 .ch-dica { display: none; }
 .ap-editor .linha-a { align-items: stretch; }
 .qt-quiz { padding: 6px 0; }
}

/* A janela reserva o espaço central às mensagens; as listas têm rolagem própria. */
.ch-inbox > summary, .ch-gestao > summary { cursor: pointer; font-weight: 700; }
.ch-inbox:not([open]) { padding: 8px 12px; }
.ch-gestao { border: 1px solid var(--borda); border-radius: 10px; padding: 8px 12px; }
.ch-gestao-conteudo { max-height: 45dvh; overflow: auto; }
.chat-janela iframe { min-height: 0; }
.chat-embutido { height: 100dvh; overflow: hidden; margin: 0; }
.chat-embutido #raiz { height: 100dvh; box-sizing: border-box; max-width: none; padding: 8px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 6px; }
.chat-embutido .ch-inbox { max-height: 100px; overflow: auto; margin: 0; padding: 6px 10px; }
.chat-embutido .ch-prof-cartao { display: flex; flex-direction: column; min-height: 0; margin: 0; padding: 10px; }
.chat-embutido .ch-prof { flex: 1; min-height: 0; grid-template-columns: minmax(140px, 26%) minmax(0, 1fr); align-items: stretch; gap: 10px; }
.chat-embutido .ch-principal { min-height: 0; overflow: hidden; }
.chat-embutido .ch-lista-prof { flex: 1; min-height: 0; height: auto; }
.chat-embutido .ch-salas-prof { overflow: auto; min-height: 0; display: flex; flex-direction: column; flex-wrap: nowrap; }
.chat-embutido .ch-salas-din { flex-direction: column; flex-wrap: nowrap; }
.chat-embutido .ch-turmas { flex-wrap: nowrap; flex-shrink: 0; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; }
.chat-embutido .ch-turmas > * { flex-shrink: 0; }
.chat-embutido .ch-cab-sala { gap: 6px; flex-shrink: 0; }
.chat-embutido .ch-cab-sala h2 { font-size: 1rem; }
.chat-embutido .ch-cab-sala .nota { font-size: .75rem; }
.chat-embutido .ch-escrever { flex-shrink: 0; }
.chat-embutido .ch-escrever .ch-campo { min-height: 40px; height: 44px; max-height: 80px; padding: 6px 8px; }
.chat-embutido .ch-dica { display: none; }
.chat-embutido .ch-sala { padding: 6px 8px; font-size: .85rem; }
.chat-embutido .ch-grupo { font-size: .75rem; }
.chat-embutido .ch-gestao { position: relative; padding: 6px 10px; }
.chat-embutido .ch-gestao[open] .ch-gestao-conteudo { position: absolute; bottom: 100%; left: 0; right: 0; max-height: 70dvh; background: var(--papel); border: 1px solid var(--borda); box-shadow: 0 -4px 16px #0002; z-index: 5; }
@media (max-width: 480px) {
 .chat-embutido .ch-prof { grid-template-columns: 115px minmax(0, 1fr); gap: 6px; }
 .chat-embutido .ch-cab-sala .nota { display: none; }
 .chat-embutido .ch-rodape-escrita { gap: 4px; }
}

.acomp-prof { width: auto; height: auto; margin: 0; max-width: none; max-height: none; }
.acomp-prof:not([open]) { display: none; }
.acomp-prof::backdrop { background: #0006; }
.acomp-corpo { overflow: auto; flex: 1; min-height: 0; }
.acomp-corpo .txt { white-space: pre-wrap; overflow-wrap: anywhere; }

.ap-ano > summary { cursor: pointer; font-weight: 700; padding: 8px; }
.ap-tipo { border: 1px solid var(--borda); border-radius: 8px; margin: 8px; padding: 6px; }
.ap-tipo legend { font-weight: 700; padding: 0 6px; }
.ap-ordem { padding-left: 28px; }
.ap-ordem li { margin: 8px 0; }
.ap-ordem li > span { margin-right: 12px; }
.ia-tipo > h4 { margin: 18px 0 8px; color: var(--accent); }

.bc-atribuir { width: min(760px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto; border: 2px solid var(--accent); border-radius: 12px; padding: 20px; background: var(--papel); color: var(--texto); }
.bc-atribuir::backdrop { background: #0007; }
.bc-semestres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.bc-semestres fieldset { border: 1px solid var(--borda); border-radius: 8px; max-height: 45dvh; overflow: auto; }
.bc-semestres legend { font-weight: 700; }
.bc-atribuicoes { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; align-items: center; }
.bc-atribuicoes p { width: 100%; margin: 0; }
@media (max-width: 500px) { .bc-semestres { grid-template-columns: 1fr; } }
/* Modo demo só pelo endereço /demo: ligação no cartão Turmas e página da demonstração (public/demo.js). */
.demo-ligacao { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: 8px; font-size: .92em; }
.demo-pagina { max-width: 640px; }
.demo-pagina header .logo-ligacao img { height: 44px; }
/* Aviso de mensagem nova no chat (TP.notificarChat em public/comum.js): janela no canto, por cima do botão do chat.
   As mensagens do professor são vermelhas, maiores e só fecham quando o aluno carrega nelas. */
.chat-notif { position: fixed; right: 16px; bottom: 80px; z-index: 70; width: min(360px, calc(100vw - 32px)); padding: 12px 14px; border-radius: 14px; background: var(--papel); color: var(--texto); border: 2px solid var(--accent, #177a5c); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); animation: chat-notif-entra .25s ease-out; }
.chat-notif.insc-notif { right: auto; left: 16px; border-color: var(--y8, #177a5c); }
.chat-notif-cab { display: flex; align-items: center; gap: 8px; }
.chat-notif-cab b { flex: 1; }
.chat-notif-cab small { opacity: .8; }
.chat-notif-x { border: 0; background: transparent; color: inherit; font: inherit; font-size: 16px; cursor: pointer; padding: 2px 6px; }
.chat-notif-txt { margin: 6px 0 8px; overflow-wrap: anywhere; }
.chat-notif-acoes { display: flex; justify-content: flex-end; }
.chat-notif.prof { background: #b91c1c; color: #fff; border-color: #7f1d1d; width: min(420px, calc(100vw - 32px)); font-size: 1.08rem; box-shadow: 0 0 0 6px rgba(239, 68, 68, .35), 0 12px 34px rgba(0, 0, 0, .4); animation: chat-notif-entra .25s ease-out, chat-notif-prof 1.4s ease-in-out .3s 4; }
.chat-notif.prof .btn { background: #fff; color: #b91c1c; border-color: #fff; font-weight: 800; }
@keyframes chat-notif-entra { from { opacity: 0; transform: translateY(12px); } }
@keyframes chat-notif-prof { 50% { box-shadow: 0 0 0 12px rgba(239, 68, 68, .2), 0 12px 34px rgba(0, 0, 0, .4); } }
.chf-botao.prof { background: var(--erro); color: var(--on-color); }
html.com-nova-versao .chat-notif { bottom: 160px; }
html.projetor .chat-notif { bottom: 148px; }
@media (prefers-reduced-motion: reduce) { .chat-notif, .chat-notif.prof { animation: none; } }
@media print { .chat-notif { display: none !important; } }
/* Correção com IA (proposta para o professor, lib/ia.js): na janela do aluno em Resultados e na pauta. */
.ia-bloco { margin: 10px 0; padding: 10px 12px; border: 1px dashed #7b4fa6; border-radius: 12px; background: rgba(124, 58, 237, .06); }
.ia-bloco h3 { margin: 0 0 4px; font-size: 1rem; }
.ia-prop { margin-top: 6px; padding: 6px 10px; border-left: 4px solid #7b4fa6; border-radius: 6px; background: rgba(124, 58, 237, .07); font-size: 14px; }
.ia-prop.velha { opacity: .65; border-left-color: var(--suave); }
.pa-ia { display: block; margin: 2px auto 0; padding: 0 6px; border: 1px solid #7b4fa6; border-radius: 999px; background: transparent; color: #7b4fa6; font: inherit; font-size: 13px; cursor: pointer; }
:root[data-theme="dark"] .pa-ia { color: #c4b5fd; border-color: #c4b5fd; }
@media print { .pa-ia { display: none; } }
/* Pauta: quadro dos níveis com a menção qualitativa e os intervalos (pa-niveis em public/admin-pauta.js). */
.pa-mencoes { border-collapse: collapse; margin: 6px 0 10px; font-size: 14px; }
.pa-mencoes th, .pa-mencoes td { border: 1px solid var(--borda); padding: 4px 10px; text-align: left; }
.pa-mencoes td:first-child, .pa-mencoes th:first-child { text-align: center; }

/* Avaliação de todas as turmas (admin-avaliacao.js): cartões, distribuição dos níveis (vermelho, cinzento, azul) e tabelas. */
.av-cartoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.av-cartao { background: var(--papel); border: 1px solid var(--borda); border-radius: 10px; padding: 10px 12px; }
.av-k { font-size: 13px; color: var(--suave); }
.av-v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.av-s { font-size: 13px; color: var(--suave); }
.av-sec { margin: 22px 0; }
.av-sec h2 { font-size: 18px; margin: 0 0 8px; }
.av-graf { --av-n1: #9e2222; --av-n2: #e8645e; --av-n3: #cfcdc7; --av-n4: #5598e7; --av-n5: #104281; --av-t1: #fff; --av-t2: #232323; --av-t3: #232323; --av-t4: #232323; --av-t5: #fff;
  position: relative; background: var(--papel); border: 1px solid var(--borda); border-radius: 10px; padding: 12px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .av-graf { --av-n1: #f28b87; --av-n2: #c4423e; --av-n3: #454540; --av-n4: #3a7bd0; --av-n5: #a9cdf6; --av-t1: #111; --av-t2: #fff; --av-t3: #eee; --av-t4: #fff; --av-t5: #111; } }
:root[data-theme="dark"] .av-graf { --av-n1: #f28b87; --av-n2: #c4423e; --av-n3: #454540; --av-n4: #3a7bd0; --av-n5: #a9cdf6; --av-t1: #111; --av-t2: #fff; --av-t3: #eee; --av-t4: #fff; --av-t5: #111; }
.av-legenda { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; margin-bottom: 10px; color: var(--texto); }
.av-legenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.av-linha { display: grid; grid-template-columns: 56px 1fr 46px; align-items: center; gap: 8px; margin: 6px 0; }
.av-rot { font-weight: 600; font-size: 14px; }
.av-fim { font-size: 13px; color: var(--suave); text-align: right; font-variant-numeric: tabular-nums; }
.av-barra { display: flex; gap: 2px; height: 24px; }
.av-seg { min-width: 3px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; cursor: default; }
.av-seg:first-child { border-radius: 4px 0 0 4px; } .av-seg:last-child { border-radius: 0 4px 4px 0; } .av-seg:only-child { border-radius: 4px; }
.av-seg:hover, .av-seg:focus-visible { outline: 2px solid var(--texto); outline-offset: 1px; }
.av-n1 { background: var(--av-n1); color: var(--av-t1); } .av-n2 { background: var(--av-n2); color: var(--av-t2); } .av-n3 { background: var(--av-n3); color: var(--av-t3); }
.av-n4 { background: var(--av-n4); color: var(--av-t4); } .av-n5 { background: var(--av-n5); color: var(--av-t5); }
.av-tip { position: absolute; width: 220px; transform: translateY(-100%); background: var(--papel); color: var(--texto); border: 1px solid var(--borda); border-radius: 8px; padding: 6px 8px; font-size: 13px; box-shadow: 0 4px 14px rgba(0,0,0,.18); pointer-events: none; z-index: 5; }
.av-tab { border-collapse: collapse; font-size: 13px; width: 100%; }
.av-tab th, .av-tab td { border-bottom: 1px solid var(--linha-tab); padding: 5px 8px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.av-tab th[scope="row"], .av-tab thead th:first-child { text-align: left; }
.av-tab thead th { font-size: 13px; color: var(--suave); }
.av-tab tr.av-sub > * { background: var(--item-bg); font-weight: 600; }
.av-tab tr.av-total > * { background: var(--light); font-weight: 700; }
.av-tab tr.av-neg > * { background: var(--erro-bg); }
.av-tab td.av-quase { background: var(--aviso-bg); font-weight: 700; }
.av-alerta { color: var(--erro-txt); font-weight: 600; }
.av-temacel { min-width: 90px; }
.av-mini-fundo { display: inline-block; width: 50px; height: 6px; background: var(--trilho); border-radius: 3px; margin-right: 6px; vertical-align: middle; overflow: hidden; }
.av-mini { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; }
@media print { .av-graf { --av-n1: #9e2222 !important; --av-n2: #e8645e !important; --av-n3: #cfcdc7 !important; --av-n4: #5598e7 !important; --av-n5: #104281 !important; --av-t1: #fff !important; --av-t2: #232323 !important; --av-t3: #232323 !important; --av-t4: #232323 !important; --av-t5: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; } .av-tip { display: none; } }
@media (max-width: 640px) { .av-linha { grid-template-columns: 44px 1fr 40px; } .av-v { font-size: 22px; } }

/* Autoavaliação: página do aluno (/autoavaliacao/) e colunas da pauta. */
.au-sec { background: var(--papel); border: 1px solid var(--borda); border-radius: 12px; padding: 12px 16px; margin: 14px 0; }
.au-sec h2 { font-size: 1.1em; margin: 0 0 6px; }
.au-tab { border-collapse: collapse; width: 100%; font-size: 14px; }
.au-tab th, .au-tab td { border-bottom: 1px solid var(--linha-tab); padding: 6px 8px; text-align: left; vertical-align: top; }
.au-tab th small { display: block; font-weight: 400; color: var(--suave); }
.au-tab tr.au-nao td { color: var(--erro-txt); }
.au-nivel { border: 0; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.au-nivel legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.au-op { display: flex; flex-direction: column; align-items: center; min-width: 92px; padding: 8px 6px; border: 2px solid var(--borda); border-radius: 10px; cursor: pointer; background: var(--item-bg); }
.au-op:has(input:checked) { border-color: var(--accent); background: var(--light); }
.au-op input { margin: 0 0 4px; }
.au-op b { font-size: 20px; }
.au-op small { font-size: 13px; color: var(--suave); text-align: center; }
.au-rot { display: block; font-weight: 600; margin-top: 8px; }
.au-just { width: 100%; box-sizing: border-box; font: inherit; padding: 8px; border: 1px solid var(--borda-in); border-radius: 8px; background: var(--input); color: var(--texto); }
.au-res { font-weight: 700; margin: 8px 0; }
.au-ok { background: var(--ok-bg); border: 1px solid var(--ok); border-radius: 10px; padding: 8px 12px; }
.pf-cartao.pf-auto { border-left-color: var(--accent); }
.pa-tab th.pa-auto.aberta { box-shadow: inset 0 -3px 0 var(--accent); }
.pa-auto-est { display: block; font-weight: 400; }
.pa-auto-bot { border: 1px solid var(--borda-in); background: var(--item-bg); color: var(--texto); border-radius: 6px; padding: 2px 6px; cursor: pointer; font: inherit; white-space: nowrap; }
.pa-auto-bot small { color: var(--suave); }
.pa-auto-just { white-space: pre-wrap; margin: 8px 0; padding: 8px 12px; border-left: 4px solid var(--borda-in); background: var(--item-bg); }
@media print { .pa-auto-bot { display: none; } .pa-auto-est, th.pa-auto .pa-ext-bot { display: none; } }
@media (max-width: 640px) { .au-op { min-width: 0; flex: 1 1 30%; } }

/* Notas do Wayground: ligar cada nome ao aluno da turma. */
.pa-wg-lista { max-height: 50vh; overflow: auto; }
.pa-wg td, .pa-wg th { text-align: left; }
.pa-wg select { max-width: 220px; }
.pa-wg tr.pa-wg-falta td:first-child { box-shadow: inset 4px 0 0 var(--aviso); }
.pa-wg tr.pa-wg-rep > td { background: var(--erro-bg); }

/* Autoavaliação: descrição de cada nível; pauta: momentos fechados e diferença da autoavaliação. */
.au-nivel { align-items: stretch; }
.au-op { flex: 1 1 150px; max-width: 220px; justify-content: flex-start; }
.au-desc { display: block; font-size: 13px; line-height: 1.3; margin-top: 6px; color: var(--texto); text-align: center; }
.pa-tab th.pa-fechada { background: var(--item-bg); box-shadow: inset 0 -3px 0 var(--suave); }
.pa-fecho { display: block; margin-top: 4px; }
.pa-fecho-est { display: block; font-weight: 400; }
.pa-auto-dif { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 6px; font-size: 13px; font-weight: 700; }
.pa-auto-dif.acima { background: var(--aviso-bg); color: var(--texto); box-shadow: inset 0 0 0 1px var(--aviso); }
.pa-auto-dif.abaixo { background: var(--light); color: var(--texto); box-shadow: inset 0 0 0 1px var(--accent); }
.pa-rub { border: 1px solid var(--borda); border-radius: 8px; margin: 8px 0; padding: 6px 10px; }
.pa-rub label { display: block; margin: 4px 0; }
.pa-rub textarea { width: 100%; box-sizing: border-box; }
@media print { .pa-fecho button, .pa-auto-dif { display: none; } }
@media (max-width: 640px) { .au-op { max-width: none; flex-basis: 100%; flex-direction: row; gap: 8px; align-items: center; } .au-desc { text-align: left; margin-top: 0; } }
.turma-auto { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.turma-auto-selo { text-decoration: none; background: var(--aviso-bg); color: var(--texto); border: 1px solid var(--aviso); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.turma-auto-selo.ok { background: var(--ok-bg); border-color: var(--ok); }
/* Folha do conselho de turma (admin-conselho.js). */
.cs-estado { padding: 6px 10px; border-radius: 8px; background: var(--aviso-bg); }
.cs-estado.fechada { background: var(--ok-bg); }
.cs-resumo { font-weight: 600; }
.cs-tab { border-collapse: collapse; width: 100%; font-size: 13px; }
.cs-tab th, .cs-tab td { border: 1px solid var(--borda-tab); padding: 5px 7px; text-align: left; vertical-align: top; }
.cs-tab thead th { background: var(--item-bg); }
.cs-tab td small { display: block; color: var(--suave); }
.cs-tab td.cs-desc { min-width: 260px; }
.cs-tab tr.cs-neg > * { background: var(--erro-bg); }
@media print { @page { size: landscape; } .cs-tab { font-size: 13px; } .cs-tab tr { break-inside: avoid; } .pa-ctrl { display: none; } }
.au-erro { background: var(--erro-bg); color: var(--erro-txt); border: 1px solid var(--erro); border-radius: 8px; padding: 8px 12px; font-weight: 600; }

/* Escala de desempenho de 1 a 5 (TP.barraEscala em comum.js): gradiente do vermelho ao verde, marca na média e o número.
   --esc-h é o tom (0 vermelho, 30 laranja, 60 amarelo, 90 verde-claro, 120 verde). */
.esc { --esc-h: 60; display: grid; grid-template-columns: minmax(70px, 1fr) auto; align-items: center; gap: 2px 8px; min-width: 120px; }
.esc-barra { position: relative; height: 10px; border-radius: 6px; background: linear-gradient(90deg, hsl(0 72% 48%), hsl(30 85% 50%), hsl(55 90% 48%), hsl(90 60% 45%), hsl(125 55% 36%)); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.esc-marca { position: absolute; top: -4px; width: 4px; height: 18px; margin-left: -2px; border-radius: 2px; background: var(--texto); box-shadow: 0 0 0 2px var(--papel); }
.esc-num { font-weight: 800; font-variant-numeric: tabular-nums; }
.esc-rot { grid-column: 1 / -1; font-size: 13px; color: var(--suave); }
.esc-sem .esc-txt { font-size: 13px; color: var(--suave); font-style: italic; }
.esc.grande { grid-template-columns: 1fr auto; gap: 6px 12px; }
.esc.grande .esc-barra { height: 18px; border-radius: 9px; }
.esc.grande .esc-marca { top: -5px; height: 28px; width: 6px; margin-left: -3px; }
.esc.grande .esc-num { font-size: 28px; }
.esc.grande .esc-rot { font-size: 15px; color: var(--texto); font-weight: 600; }
.esc-escala { display: flex; justify-content: space-between; font-size: 13px; color: var(--suave); grid-column: 1; }
/* Linha da pauta com o tom do aluno (claro no modo claro, escuro no escuro). */
.pa-tab tr.esc-linha > * { background: hsl(var(--esc-h) 75% 91%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pa-tab tr.esc-linha > * { background: hsl(var(--esc-h) 40% 18%); } }
:root[data-theme="dark"] .pa-tab tr.esc-linha > * { background: hsl(var(--esc-h) 40% 18%); }
@media print { .pa-tab tr.esc-linha > * { background: hsl(var(--esc-h) 75% 91%) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; } .esc-barra { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.pa-legenda .esc { display: inline-grid; vertical-align: middle; width: 220px; }
.cartao-esc { background: var(--papel); border: 1px solid var(--borda); border-left: 6px solid hsl(var(--esc-h, 60) 60% 42%); border-radius: 14px; padding: 12px 16px; margin: 14px 0; }
.cartao-esc h2 { margin: 0 0 8px; font-size: 1.15em; }
.pa-tab td.pa-quase .esc-num::after { content: " ▲"; }
.pa-tab td.pa-m5 { min-width: 140px; }
/* Grupos da lista da turma que se minimizam pelo título. */
.tl-grupo.tl-min > summary.tl-grupo-tit { cursor: pointer; list-style: none; }
.tl-grupo.tl-min > summary.tl-grupo-tit::-webkit-details-marker { display: none; }
.tl-grupo.tl-min > summary.tl-grupo-tit::before { content: "▸"; }
.tl-grupo.tl-min[open] > summary.tl-grupo-tit::before { content: "▾"; }
.tl-grupo.tl-min:not([open]) { margin-bottom: 6px; }
.menu-auto { border-top: 1px solid var(--borda); padding-top: 4px; margin-top: 4px; }

/* Pauta mais legível (2.179.1): secções de colunas, cabeçalhos curtos, botões pequenos e iguais, separadores e texto cortado. */
.pa-tab thead th { vertical-align: bottom; font-size: 13px; line-height: 1.25; padding: 6px 6px; }
.pa-tab thead th small { font-size: 13px; line-height: 1.25; }
.pa-tab thead .btn, .pa-tab thead .btn.peq { font-size: 13px; padding: 1px 7px; min-height: 0; line-height: 1.5; border-radius: 6px; border-width: 1px; margin: 2px 1px 0; box-shadow: none; }
.pa-tab .pa-ext-bot { gap: 2px; margin-top: 3px; flex-wrap: wrap; }
.pa-tab .pa-fecho { margin-top: 3px; }
.pa-tab .pa-fecho-est { font-size: 13px; }
.pa-tab tr.pa-grupos th { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 5px 8px; border-bottom: 2px solid var(--borda); color: var(--titulo); }
.pa-tab tr.pa-grupos th.pa-g-at { background: var(--item-bg); }
.pa-tab tr.pa-grupos th.pa-g-i1 { background: color-mix(in srgb, #2a6fb0 12%, var(--papel)); }
.pa-tab tr.pa-grupos th.pa-g-i2 { background: color-mix(in srgb, #7b4fa6 12%, var(--papel)); }
.pa-tab tr.pa-grupos th.pa-g-f { background: color-mix(in srgb, var(--accent) 14%, var(--papel)); }
.pa-tab tr.pa-grupos th.fechado { color: var(--suave); }
.pa-tab .pa-sep { border-left: 2px solid var(--borda-in); }
.pa-tab tbody td { vertical-align: middle; }
.pa-tab .pa-in { width: 64px; }
.pa-tab .pa-at { min-width: 80px; max-width: 110px; }
.pa-tab .pa-int { min-width: 80px; }
.pa-tab .pa-inter { max-width: 96px; font-size: 13px; }
.pa-tab .pa-desc { min-width: 150px; max-width: 200px; }
.pa-tab .pa-desc-bot { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; }
.pa-tab .pa-nome { min-width: 150px; max-width: 200px; }
.pa-tab tbody .pa-nome { font-size: 13.5px; }
.pa-tab .pa-auto-est { font-size: 13px; color: var(--suave); }
@media print { .pa-tab .pa-desc-bot { -webkit-line-clamp: unset; } .pa-tab thead .btn { display: none; } }
.pa-tab td.pa-niv { white-space: nowrap; }
.pa-tab td.pa-niv b { font-size: 13px; }
/* Autoavaliações da turma (admin-autoaval.js). */
.au-lista { display: grid; gap: 10px; margin: 12px 0; }
.au-cartao { background: var(--papel); border: 1px solid var(--borda); border-radius: 12px; padding: 10px 14px; break-inside: avoid; }
.au-cartao.falta { opacity: .75; border-style: dashed; }
.au-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.au-nums { font-variant-numeric: tabular-nums; }
.pa-auto-dif.igual { background: var(--item-bg); color: var(--texto); box-shadow: inset 0 0 0 1px var(--borda-in); }
.au-cartao .pa-auto-just { margin: 8px 0 4px; }
.tl-escondidas { margin: 8px 0; }
/* Mudar de turma nas páginas da pauta. */
.troca-turma { display: inline-flex; align-items: center; gap: 4px; }
.troca-turma-sel { font: inherit; font-size: 14px; font-weight: 700; padding: 4px 6px; border: 1px solid var(--borda-in); border-radius: 8px; background: var(--input); color: var(--texto); }
@media print { .troca-turma { display: none; } }
.pa-tab .pa-peso-todas { display: block; font-size: 13px; font-weight: 400; color: var(--suave); margin-top: 3px; }
@media print { .pa-peso-todas { display: none !important; } }
.pa-vistas-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 8px; }
.pa-vistas .btn { font-size: 13px; }
@media print { .pa-vistas-barra { display: none; } }
/* Pauta: nota de 1 a 5 que o professor pode mudar (por extenso), menção ao lado e comportamento do semestre pela média das intercalares. */
.pa-tab .pa-nota-sel { max-width: 170px; }
.pa-tab .pa-nota-sel.man { font-weight: 800; border-color: var(--accent); }
.pa-tab .pa-comp.pa-comp-media { font-style: italic; }
.pa-tab td.pa-menc { white-space: nowrap; }
.pa-tab td.pa-menc b { font-size: 13px; }
/* Ficha do aluno na pauta (public/admin-ficha-aluno.js): resumo, atividades por tema, intercalares e final; uma página por aluno ao imprimir. */
.fal-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; margin-top: 8px; }
.fal-nav .fal-alunos { max-width: min(360px, 100%); flex: 1 1 200px; }
.fal-ficha { margin: 12px 0 24px; }
.fal-cab h2 { margin: 0; font-size: 24px; }
.fal-resumo { margin: 12px 0; padding: 14px; border: 1px solid var(--borda); border-radius: 12px; background: var(--papel); }
.fal-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.fal-num { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 10px; border-radius: 10px; background: var(--item-bg); color: var(--texto); }
.fal-num > small:first-child { color: var(--suave); font-size: 13px; }
.fal-num b { font-size: 20px; }
.fal-num .fal-sel { width: 100%; max-width: 100%; font-size: 14px; }
.fal-num small { overflow-wrap: anywhere; }
.fal-sec { margin: 18px 0; padding-top: 4px; }
.fal-sec h2 { font-size: 19px; border-bottom: 2px solid var(--accent); padding-bottom: 3px; margin-bottom: 8px; }
.fal-sec h3 { font-size: 15px; margin: 14px 0 4px; }
/* Trabalhos nas apps na ficha do aluno (2.379.2). */
.fal-ap-grelha { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.fal-ap-cartao { display: flex; flex-direction: column; border: 1px solid var(--borda); border-radius: 12px; background: var(--papel); overflow: hidden; min-width: 0; }
.fal-ap-abrir *, .po-ver-cx * { pointer-events: none; }
.fal-ap-cartao { cursor: pointer; }
.fal-at-ver { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--accent); text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.fal-at-ver:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }
.fal-folha { margin-top: 8px; }
.fal-quiz { margin: 6px 0 0; padding-left: 26px; }
.fal-q-op { padding: 3px 8px; border-radius: 8px; margin: 3px 0; }
.fal-q-op.certa { background: var(--ok-bg); color: var(--ok-txt); }
.fal-q-op.escolhida.ko { background: #fee2e2; color: #7f1d1d; }
.fal-q-etq { font-size: 13px; }
.fal-cod { margin: 6px 0 0; padding: 10px 12px; border-radius: 8px; background: #0f172a; color: #e2e8f0; font: 13px/1.5 "JetBrains Mono", monospace; white-space: pre; overflow: auto; max-height: 420px; }
.fal-codigo { margin-top: 6px; }
.fal-codigo .ex-res-bl { max-height: 440px; overflow: auto; }
.fal-fl-tab { border-collapse: collapse; font-size: 13px; background: #ffffff; color: #1f2937; }
.fal-fl-tab th { background: #e8f3ec; color: #14402a; font-weight: 700; padding: 2px 6px; border: 1px solid #c8d1d9; min-width: 28px; text-align: center; }
.fal-fl-tab td { border: 1px solid #c8d1d9; padding: 3px 6px; min-width: 64px; max-width: 160px; vertical-align: top; overflow-wrap: anywhere; }
.fal-fl-tab td.fixa { background: #f1f5f9; color: #475569; }
.fal-fl-tab td.alvo { outline: 2px dashed #1d4ed8; outline-offset: -3px; }
.fal-fl-tab td.fal-rg-verm { background: #fecaca; } .fal-fl-tab td.fal-rg-amar { background: #fef08a; } .fal-fl-tab td.fal-rg-verd { background: #bbf7d0; }
.fal-fl-f { display: block; font: 11px/1.3 "JetBrains Mono", monospace; color: #1d4ed8; }
.fal-resp-item { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--borda); border-radius: 10px; }
.fal-resp-item .txt { white-space: pre-wrap; margin-top: 4px; }
.fal-resp-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.fal-resp-imgs img { max-width: 240px; max-height: 180px; border-radius: 8px; border: 1px solid var(--borda); }
.fal-ap-abrir, .po-ver-cx { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: inherit; font: inherit; color: inherit; }
.fal-ap-abrir:focus-visible, .po-ver-cx:focus-visible { outline: 3px solid var(--foco); outline-offset: -3px; }
.fal-ap-ver-txt { position: absolute; right: 8px; bottom: 8px; padding: 3px 10px; border-radius: 999px; background: var(--hero-bg); color: var(--on-hero); font-size: 13px; font-weight: 600; opacity: 0; transition: opacity .15s; }
.fal-ap-abrir:hover .fal-ap-ver-txt, .fal-ap-abrir:focus-visible .fal-ap-ver-txt, .po-ver-cx:hover .fal-ap-ver-txt, .po-ver-cx:focus-visible .fal-ap-ver-txt { opacity: 1; }
@media (hover: none) { .fal-ap-ver-txt { opacity: 1; } }
.ent-dlg-trab { width: min(1100px, 96vw); max-height: 94vh; overflow: auto; }
.ent-dlg-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ent-dlg-cab h2 { margin: 0; overflow-wrap: anywhere; }
.ent-dlg-acoes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ent-3d { min-height: 360px; }
.fal-ap-txt { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px 0; min-width: 0; }
.fal-ap-txt .etq { align-self: flex-start; }
.fal-ap-tit { overflow-wrap: anywhere; }
.fal-ap-estado.entregue { background: var(--ok-bg); color: var(--ok-txt); }
.fal-ap-acoes { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px 10px; margin-top: auto; }
.fal-ap-lista { margin: 4px 0; padding-left: 20px; }
.fal-ap-lista li { margin: 3px 0; }
.fal-ap-ver-ent { margin-top: 4px; }
.fal-fechada h2 { border-bottom-color: var(--borda-in); }
.fal-tab { width: 100%; border-collapse: collapse; }
.fal-tab th, .fal-tab td { border: 1px solid var(--borda-tab); padding: 6px 8px; text-align: left; vertical-align: top; }
.fal-tab thead th { background: var(--light); }
.fal-tab tr.fal-tema th { background: var(--item-bg); font-weight: 800; }
.fal-tab td:nth-child(2) { white-space: nowrap; }
.fal-tab tr.fal-avaliar td:nth-child(3) { color: var(--erro-txt); font-weight: 700; }
.fal-tab tr.fal-sem td:nth-child(3), .fal-tab tr.fal-zero td:nth-child(3) { color: var(--suave); font-style: italic; }
.fal-linhas { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; }
.fal-campo { display: flex; flex-direction: column; gap: 3px; min-width: 160px; }
.fal-campo.fal-largo { flex: 1 1 260px; }
.fal-obs { font: inherit; padding: 5px 8px; border: 1px solid var(--borda-in); border-radius: 6px; background: var(--input, #fff); color: var(--texto); width: 100%; box-sizing: border-box; }
.fal-desc-txt { font: inherit; width: 100%; box-sizing: border-box; padding: 8px; border: 1px solid var(--borda-in); border-radius: 8px; background: var(--input, #fff); color: var(--texto); }
.fal-desc { white-space: pre-wrap; margin: 4px 0; }
.fal-ia { margin-top: 8px; padding: 8px 12px; border-left: 4px solid var(--accent); background: var(--item-bg); border-radius: 6px; }
.fal-ia p { white-space: pre-wrap; margin: 4px 0 8px; }
.fal-val { font-weight: 700; }
.fal-impressao { display: none; }
.fal-tab .fal-nota-c { white-space: nowrap; }
.fal-tab .fal-in { width: 72px; text-align: center; }
.fal-tab tr.fal-man td:nth-child(4) { font-weight: 700; }
@media print {
  body.fal-a-imprimir.pagina-aula #raiz { display: none !important; }
  body.fal-a-imprimir .fal-impressao { display: block !important; }
  .fal-impressao .fal-ficha { break-after: page; margin: 0; }
  .fal-impressao .fal-ficha:last-child { break-after: auto; }
  .fal-ctrl { display: none !important; }
  .fal-sec, .fal-resumo { break-inside: avoid-page; }
}
@media (max-width: 640px) { .fal-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pa-nome-lig { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.pa-nome-lig:hover, .pa-nome-lig:focus-visible { color: var(--accent); text-decoration-style: solid; }
@media print { .pa-nome-lig { text-decoration: none; } }
/* Lista da turma: bloco «Atividades extra» (IA e programação), minimizado por defeito, com os grupos de cada tipo lá dentro. */
.tl-extra { border-left: 4px solid var(--borda-in); padding-left: 8px; }
.tl-extra > .tl-grupo { margin-left: 4px; }
.tl-extra-barra { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 4px 0 8px; }
.tl-extra-ver { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
/* O aluno vê só a barra e a marca (sem número): a barra ocupa a largura toda. */
.esc.esc-so-barra { grid-template-columns: 1fr; }

/* ===== Novo desenho, fase 2: área do aluno (2.187.0) =====
   Uma só moldura por cartão, sem filetes de cor nem saltos; a cor diz o ano ou o tema, e o estado diz-se com palavras. */
a.ativ, a.ativ.destaque { border: 1px solid var(--borda); border-radius: 16px; background: var(--papel); }
a.ativ.destaque { border: 2px solid var(--ac, var(--accent)); }
a.ativ:hover { transform: none; background: var(--papel); border-color: var(--borda-in); box-shadow: 0 1px 2px rgba(15,31,46,.06), 0 8px 24px rgba(15,31,46,.08); }
a.ativ.destaque:hover { border-color: var(--ac, var(--accent)); }
a.ativ:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }
a.ativ.resolvida, a.ativ.resolvida:hover { background: var(--light); border: 1px solid var(--borda); }
a.ativ.resolvida .k, a.ativ.resolvida h3 { color: var(--suave); }
a.ativ.dada { border: 2px solid var(--aviso); }
.tema-bloco { border: 0; border-top: 1px solid var(--borda); border-radius: 0; background: transparent; padding: 18px 0 0; margin-top: 26px; }
@media (max-width: 640px) { .tema-bloco { padding: 16px 0 0; border-left-width: 0; } }
.como-item { border: 1px solid var(--borda); transition: none; }
.como-item:hover { transform: none; }
.como-item h3 { color: var(--titulo); }
.como-n { background: var(--accent); color: var(--on-color); }
.chip, .chip.suave { background: var(--light); border: 1px solid var(--borda-in); color: var(--texto); }
.avalia-etq, .avalia-faixa { background: var(--light); color: var(--texto); border: 1px solid var(--borda-in); }
.avalia-etq.treino, .avalia-faixa.treino { background: var(--aviso-bg); color: var(--texto); border-color: var(--aviso); }
.cabeca-img { border-top: 1px solid var(--borda); }
/* «O que tens por fazer»: um ponto diz o estado e o texto repete-o */
.pf-cartao, .pf-cartao.pf-auto, .pf-emdia { border: 1px solid var(--borda); border-radius: 16px; }
.pf-item a:hover, .pf-item a:focus-visible { border-color: var(--borda-in); }
.pf-seta { color: var(--suave); }
.pf-com a { border-color: var(--link); background: var(--light); }
.pf-dada a { border-color: var(--aviso); background: var(--aviso-bg); }
.pf-ico { width: 12px; height: 12px; margin: 0 6px; border-radius: 50%; flex: none; text-align: initial; font-size: 0; background: var(--borda-in); }
.pf-ico-com { background: var(--link); } .pf-ico-dada { background: var(--aviso); } .pf-ico-meio { background: var(--xp); }
/* Fichas e missões: perguntas sem cores rotativas (as etapas voltaram a ter cor na 2.203.0) */
.pergunta { border: 1px solid var(--borda); }
.missao-cartao { background: var(--papel); border: 1px solid var(--borda); }
.fazer-cartao { background: var(--light); border: 1px solid var(--borda-in); }
.guia { border: 1px solid var(--borda); }
/* Quizzes: seguem o tema do site, sem fundo em gradiente roxo */
html.jogo body { background: var(--fundo); color: var(--texto); }
html.jogo.jogo-claro body { background: var(--fundo); color: var(--texto); }
.jogo-nome { margin: 0; font-family: inherit; font-size: inherit; line-height: inherit; color: inherit; letter-spacing: 0; }
html.jogo.jogo-claro .rodape-credito { color: var(--suave); border-top-color: var(--borda); }
/* O botão flutuante de ajuda deixa de tapar o fim das páginas em ecrãs estreitos */
@media (max-width: 760px) { body { padding-bottom: 72px; } }

/* ===== Novo desenho, fase 3: Administração (2.188.0) =====
   Navegação que não corta, uma só cor de marca nos separadores, tabelas neutras, botões de linha discretos e cartões sem filetes. */
.nav-admin { flex-wrap: wrap; overflow: visible; }
.nav-btn.sel { background: var(--accent); color: var(--on-color); }
.seg-sub-btn .ic:empty { display: none; }
table.alunos th { background: var(--light); color: var(--titulo); border-bottom: 2px solid var(--borda-in); }
.tl-acoes .btn.sec { background: transparent; border-color: transparent; color: var(--texto); }
.tl-acoes .btn.sec:hover:not(:disabled) { background: var(--light); border-color: var(--borda-in); }
.tl-iniciar, .tl-iniciar:hover:not(:disabled) { background: var(--light); color: var(--titulo); border: 1px solid var(--borda-in); }
.tl-iniciar:hover:not(:disabled) { background: var(--borda-tab); }
.est-cartao, .est-cartao.azul, .est-cartao.verde, .est-cartao.laranja { border-left: 1px solid var(--borda); }
.est-ativ, .est-ativ.nao { border-left: 1px solid var(--borda); }
.versao-cartao, .versao-cartao.atual { border-left: 1px solid var(--borda); }
.versao-cartao.atual { border-color: var(--ok); }
.turma-barra { border-left: 1px solid var(--borda); }
.modal .item { border-left: 3px solid var(--borda-in); }

/* Painéis claros dentro do tema escuro (editor de aplicações): o texto de apoio não herda a cor do tema */
.ap-grupo .nota, .ap-props .nota { color: #4b5b68; }
/* O seletor «Ver:» da pauta usa a classe .seg, que é também a dos segmentos da página inicial: ficava em coluna. */
.pa-vistas.seg { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; flex: none; min-width: 0; padding: 0; background: transparent; color: inherit; }
.pa-vistas.seg:hover { transform: none; }

/* Cartões que ainda tinham filete grosso de cor só por decoração (convidados, quizzes, exercícios, programação, pedidos, aula de hoje, secções da Administração e página de entrada). Ficam os que dizem algo: estado das linhas, resultado dos testes, ano e tema. */
.ex-cartao, .py-licao, .py-meus, .py-enunciado, .jg-sol, .jg-expl, .ah-cartao, .pd-item { border: 1px solid var(--borda); border-left: 1px solid var(--borda); }
.jg-sol, .jg-expl { background: var(--item-bg); }
.sec-ativ { border-top: 1px solid var(--borda); }
.modulo { border: 1px solid var(--borda); }
.modulo:hover { border-color: var(--borda-in); }
.aula-planeada { border-top: 1px solid var(--borda); }

/* Fase 4: ligações sobre o fundo marinho da página de entrada (a cor por defeito do navegador tinha 1,65:1) */
.hero-entrada a:not(.btn) { color: #fff; text-decoration: underline; }
.hero-entrada a:not(.btn):focus-visible { outline: 3px solid var(--xp, #7dd3fc); outline-offset: 2px; }

/* Ícones SVG nos botões (acrescentados por comum.js pelo texto do botão) */
svg.ico { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.2em; margin-right: 0.4em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chf-botao svg.ico { margin-right: 0.35em; }
@media print { svg.ico { display: none; } }

/* Pauta: ordenar e agrupar colunas, e trabalhos substituídos por uma «nota minha» */
.pa-ord { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; max-height: 45vh; overflow: auto; }
.pa-ord-li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--borda); border-radius: 10px; background: var(--papel); }
.pa-ord-li.ext { border-style: dashed; }
.pa-ord-li.arrastando { position: relative; z-index: 20; box-shadow: 0 8px 22px rgba(0, 0, 0, .3); }
.pa-ord-li .pega { cursor: grab; touch-action: none; font-size: 20px; color: var(--suave); }
.pa-ord-tit { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pa-ord-pct { font-variant-numeric: tabular-nums; }
.pa-ord-nome { font: inherit; padding: 6px 10px; border-radius: 10px; border: 2px solid var(--borda-in); background: var(--papel); color: var(--texto); }
td.pa-c.pa-subst { background: var(--desativado); }
td.pa-c.pa-subst .pa-in { text-decoration: line-through; color: var(--desativado-txt); }

/* Frase sob a escala de desempenho do aluno */
.esc-frase, .cartao-esc .esc-frase { margin: 10px 0 0; font-weight: 600; line-height: 1.45; }

/* Quem pede menos movimento no sistema não vê animações nem transições (2.186.0). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Fotografias dos alunos na pauta (admin-retratos.js) */
.pa-tab th.pa-nome.com-retrato .pa-nome-lig { display: block; }
.pa-retrato { display: block; width: 72px; height: 90px; object-fit: cover; border-radius: 6px; margin-top: 4px; border: 1px solid var(--borda-tab); background: var(--item-bg); }
button.pa-retrato.vazio { font-size: 12px; color: var(--texto); cursor: pointer; opacity: .55; padding: 0; }
button.pa-retrato.vazio:hover, button.pa-retrato.vazio:focus-visible { opacity: 1; }
@media print { button.pa-retrato.vazio { display: none; } }
.ret-dlg { width: min(1100px, 96vw); max-width: 96vw; }
.ret-zona { border: 2px dashed var(--borda-tab); border-radius: 10px; padding: 10px; margin: 8px 0; }
.ret-zona input[type=file], .ret-fich-bot input[type=file] { display: none; }
.ret-grelha { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
@media (max-width: 760px) { .ret-grelha { grid-template-columns: 1fr; } }
.ret-palco { position: relative; display: inline-block; max-width: 100%; touch-action: none; user-select: none; }
.ret-tela { display: block; max-width: 100%; height: auto; cursor: crosshair; border-radius: 6px; }
.ret-camada { position: absolute; inset: 0; pointer-events: none; }
.ret-caixa { position: absolute; border: 2px solid var(--accent); background: rgba(37, 99, 235, .12); border-radius: 4px; box-sizing: border-box; }
.ret-caixa.rasto { border-style: dashed; }
.ret-caixa span { position: absolute; top: 2px; left: 2px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 0 4px; border-radius: 3px; }
.ret-lista { max-height: 60vh; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.ret-al { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; }
.ret-al:hover { background: var(--item-bg); }
.ret-al.alvo { border-color: var(--accent); background: rgba(37, 99, 235, .08); }
.ret-al.novo .ret-nome::after { content: " (nova)"; color: var(--accent); font-size: 11px; }
.ret-n { width: 22px; text-align: right; font-size: 12px; color: var(--texto); }
.ret-mini { width: 36px; height: 44px; object-fit: cover; border-radius: 4px; flex: none; }
.ret-mini.vazio { display: inline-flex; align-items: center; justify-content: center; background: var(--item-bg); color: var(--texto); }
.ret-nome { flex: 1; font-size: 13.5px; }
.fal-cab.com-retrato { display: flex; align-items: center; gap: 14px; }
.fal-retrato, .prof header img.fal-retrato { width: 112px; height: 140px; object-fit: cover; border-radius: 8px; border: 1px solid var(--borda-tab); flex: none; }
@media (max-width: 640px) { .prof header img.fal-retrato { width: 88px; height: 110px; } }
.ret-caixa.solta { border-color: var(--texto); border-style: dashed; background: transparent; }
.ret-caixa.solta span { background: var(--texto); color: var(--papel); }
.ret-caixa.duvida { border-color: #b45309; background: rgba(245, 158, 11, .18); }
.ret-caixa.duvida span { background: #b45309; color: #fff; }
.ret-caixa.sel { outline: 3px solid var(--accent); outline-offset: 2px; }
.ret-al.duvida .ret-nome::after { content: " (a confirmar)"; color: #b45309; font-size: 11px; }
.ret-pags { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.ret-sel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.ret-sel:empty { display: none; }
.ret-sel .pa-campo { margin: 0; }
.pa-retrato-bot { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 6px; }
.pa-retrato-bot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pa-retrato-palco { display: flex; justify-content: center; padding: 8px 0; }
.pa-retrato-grande { max-width: min(320px, 80vw); max-height: 60vh; border-radius: 10px; border: 1px solid var(--borda-tab); }
.pa-num { color: var(--texto); opacity: .7; font-weight: 600; }
.pa-al-ord { list-style: none; padding: 0; margin: 8px 0; max-height: 60vh; overflow: auto; }
.pa-al-ord li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.pa-al-num { width: 3.2em; text-align: center; font: inherit; font-weight: 700; padding: 3px 4px; border: 1px solid var(--borda-in); border-radius: 6px; background: var(--input, #fff); color: var(--texto); }
.pa-al-num.erro { border-color: var(--erro); outline: 2px solid var(--erro); }
.pa-num-erro.erro { color: var(--erro-txt); font-weight: 700; margin-top: 4px; min-height: 0; }
.pa-al-nome { flex: 1; min-width: 160px; }
.pa-auto-trabs { display: flex; flex-direction: column; gap: 4px; max-height: 55vh; overflow: auto; margin: 8px 0; }
.pa-auto-trab { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.pa-auto-trab span { flex: 1; }
.pa-auto-trab.sem-peso { opacity: .6; }
/* Instalar a aplicação (2.205.0), na página inicial */
.instalar-cartao { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; border: 1px solid var(--borda); border-radius: 16px; background: var(--papel); padding: 12px 16px; margin: 12px 0; }
.instalar-cartao[hidden] { display: none; }
.instalar-txt { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; }
.instalar-txt span { color: var(--suave); font-size: 14px; }
.instalar-bot { display: flex; gap: 8px; flex-wrap: wrap; }
@media print { .instalar-cartao { display: none; } }

/* ---------- aviso com contagem decrescente (public/bloqueio.js; cor do fundo escolhida pelo professor, texto preto ou branco pelo contraste) ---------- */
.contagem { position: fixed; inset: 0; z-index: 2147483100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; font-family: inherit; }
.contagem-pre { font-size: clamp(16px, 2.6vw, 22px); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.contagem-txt { font-size: clamp(26px, 5.5vw, 56px); font-weight: 800; line-height: 1.15; max-width: 18em; overflow-wrap: anywhere; }
.contagem-num { font-size: clamp(72px, 22vw, 240px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.contagem-fim { font-size: clamp(22px, 4vw, 40px); font-weight: 800; min-height: 1.2em; }
.contagem-mini { margin-top: 8px; font: inherit; font-size: 16px; font-weight: 700; padding: 10px 20px; border-radius: 999px; border: 2px solid currentColor; background: transparent; color: inherit; cursor: pointer; }
.contagem-mini:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.contagem.reduzida { inset: auto 16px 16px auto; padding: 10px 16px; gap: 2px; border-radius: 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, .3); cursor: pointer; max-width: min(320px, calc(100vw - 32px)); }
.contagem.reduzida .contagem-pre, .contagem.reduzida .contagem-mini, .contagem.reduzida .contagem-fim { display: none; }
.contagem.reduzida .contagem-txt { font-size: 14px; font-weight: 700; }
.contagem.reduzida .contagem-num { font-size: 34px; }
@media print { .contagem { display: none; } }
/* Mensagem do professor em ecrã inteiro (2.349.0) */
.msg-ecra { position: fixed; inset: 0; z-index: 2147483200; display: flex; align-items: center; justify-content: center; padding: 20px; background: #0b2540; color: #ffffff; font-family: inherit; overflow: auto; }
.msg-ecra-caixa { max-width: 52em; width: 100%; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.msg-ecra-tit { margin: 0; font-size: clamp(18px, 3vw, 26px); text-transform: uppercase; letter-spacing: .06em; color: #7dd3fc; }
.msg-ecra-de { margin: 0; font-size: 16px; color: #dbeafe; }
.msg-ecra-txt { margin: 8px 0; font-size: clamp(24px, 4.6vw, 48px); font-weight: 800; line-height: 1.25; white-space: pre-line; overflow-wrap: anywhere; }
.msg-ecra-pe { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 10px; }
.msg-ecra-pe .btn { font-size: 18px; padding: 12px 26px; min-height: 48px; }
.msg-ecra .msg-ecra-ok { background: #7dd3fc; color: #0b2540; border-color: #7dd3fc; }
.msg-ecra .msg-ecra-resp { background: transparent; color: #ffffff; border-color: #ffffff; }
.msg-ecra .btn:focus-visible { outline: 3px solid #ffffff; outline-offset: 3px; }
@media print { .msg-ecra { display: none; } }
.nm-dlg { max-width: 560px; width: calc(100vw - 32px); }
.nm-dlg h2 { margin-top: 0; }
.nm-texto { width: 100%; box-sizing: border-box; font: inherit; }
.nm-conta { display: block; text-align: right; color: var(--suave); }
.nm-chat-rot { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; }
.nm-estado.ok { color: var(--ok-txt); }
.nm-acoes { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.cont-cores { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cont-cor { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--borda-tab); padding: 0; cursor: pointer; }
.cont-cor.sel { outline: 3px solid var(--accent); outline-offset: 2px; }
.cont-cores input[type="color"] { width: 40px; height: 30px; padding: 0; border: 1px solid var(--borda-tab); border-radius: 6px; background: none; }
.contagem-ativa { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.contagem-ativa .cont-amostra { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--borda-tab); display: inline-block; }
/* Opções do pedido das descritivas (painelOpc em public/admin-pauta.js) */
.pa-opc { border: 1px solid var(--borda-tab); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.pa-opc > summary { cursor: pointer; font-weight: 700; }
.pa-opc-grelha { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 12px; margin: 10px 0 6px; }
.pa-opc-campo { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.pa-opc-campo input, .pa-opc-campo select { font: inherit; font-size: 14px; }
.pa-opc-extra { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--borda-tab); border-radius: 8px; background: var(--item-bg); color: var(--texto); }

/* ---------- avaliação diária (public/admin-diaria.js) ---------- */
/* Negativo, Positivo e Bom: laranja, azul e verde-azulado (testados para daltonismo nos dois temas; sempre com a palavra ou a letra) */
:root { --dn-neg: #c2410c; --dn-pos: #1d4ed8; --dn-bom: #0d9488; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --dn-neg: #ea580c; --dn-pos: #2563eb; --dn-bom: #0ea5a4; } }
:root[data-theme="dark"] { --dn-neg: #ea580c; --dn-pos: #2563eb; --dn-bom: #0ea5a4; }
.dn-barra { align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.dn-dia { font: inherit; font-size: 15px; padding: 5px 8px; border: 1px solid var(--borda-tab); border-radius: 8px; background: var(--item-bg); color: var(--texto); }
.dn-grelha { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 12px 0; }
.dn-cartao { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border: 1px solid var(--borda-tab); border-radius: 12px; background: var(--item-bg); text-align: center; }
.dn-cartao.dn-com-neg { border-color: var(--dn-neg); }
.dn-cartao.dn-com-pos { border-color: var(--dn-pos); }
.dn-cartao.dn-com-bom { border-color: var(--dn-bom); }
.dn-foto { width: 96px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--borda-tab); }
.dn-foto.vazia { display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; color: var(--suave); background: var(--fundo, transparent); }
.dn-nome { font-weight: 700; font-size: 14px; line-height: 1.25; min-height: 2.5em; }
.dn-niveis { display: flex; gap: 4px; width: 100%; }
.dn-niv { flex: 1; font: inherit; font-size: 13px; font-weight: 700; padding: 8px 2px; border-radius: 8px; border: 2px solid var(--c); background: transparent; color: var(--texto); cursor: pointer; }
.dn-niv.dn-neg { --c: var(--dn-neg); } .dn-niv.dn-pos { --c: var(--dn-pos); } .dn-niv.dn-bom { --c: var(--dn-bom); }
.dn-niv.sel { background: color-mix(in srgb, var(--c) 22%, var(--papel)); border-width: 3px; box-shadow: inset 0 -4px 0 var(--c); }
.dn-niv:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.dn-media { font-size: 13px; }
@media print { .dn-barra, .dn-niv:not(.sel) { display: none; } }

/* ---------- grupos de botões com cor (pauta e barra da turma): cada grupo é um menu que abre ao clicar ---------- */
:root { --g-azul: #1d4ed8; --g-verde: #15803d; --g-roxo: #7e22ce; --g-laranja: #c2410c; --g-cinza: #4b5b68; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --g-azul: #60a5fa; --g-verde: #4ade80; --g-roxo: #c084fc; --g-laranja: #fb923c; --g-cinza: #9fb1c0; } }
:root[data-theme="dark"] { --g-azul: #60a5fa; --g-verde: #4ade80; --g-roxo: #c084fc; --g-laranja: #fb923c; --g-cinza: #9fb1c0; }
details.grupo-bot.g-azul { --g: var(--g-azul); } details.grupo-bot.g-verde { --g: var(--g-verde); } details.grupo-bot.g-roxo { --g: var(--g-roxo); }
details.grupo-bot.g-laranja { --g: var(--g-laranja); } details.grupo-bot.g-cinza { --g: var(--g-cinza); }
details.grupo-bot > summary.menu-btn { border: 2px solid var(--g); color: var(--texto); font-weight: 700; display: inline-flex; align-items: center; gap: 7px; }
details.grupo-bot > summary.menu-btn::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--g); flex: none; }
details.grupo-bot > summary.menu-btn::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 2px; }
details.grupo-bot[open] > summary.menu-btn, details.grupo-bot > summary.menu-btn:hover { background: color-mix(in srgb, var(--g) 16%, var(--papel)); color: var(--texto); }
details.grupo-bot > .menu-painel { border-top: 4px solid var(--g); min-width: 280px; }
.grupo-lista { display: flex; flex-direction: column; gap: 4px; }
.grupo-lista > .btn { display: flex; width: 100%; justify-content: flex-start; text-align: left; white-space: normal; }
.grupo-lista > .interruptor { padding: 6px 8px; }
.grupo-lista > .menu-item { white-space: normal; }
.pa-ctrl { gap: 8px; align-items: center; }
/* barra da turma: os menus juntos por tipo, com o nome do grupo pequeno por cima */
.tb-grupos { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; align-items: flex-end; }
.tb-grupo { display: flex; flex-direction: column; gap: 3px; padding: 4px 8px 6px; border: 1px solid var(--borda-tab); border-left: 4px solid var(--g); border-radius: 10px; }
.tb-grupo.g-laranja { --g: var(--g-laranja); } .tb-grupo.g-roxo { --g: var(--g-roxo); } .tb-grupo.g-azul { --g: var(--g-azul); }
.tb-grupo-tit { font-size: 13px; font-weight: 700; color: var(--suave); }
.tb-grupo-itens { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---------- faixa da avaliação diária (TP.faixaAulas em public/comum.js): um quadrado por aula, letra por baixo ---------- */
.sem-vista { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fd-bloco { margin-top: 12px; }
.fd-tit { font-size: 13px; font-weight: 700; color: var(--suave); margin-bottom: 6px; }
.fd-faixa { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.fd-aula { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 26px; cursor: default; }
.fd-q { display: block; width: 24px; height: 24px; border-radius: 4px; background: var(--c); }
.fd-q.fd-neg { --c: var(--dn-neg); } .fd-q.fd-pos { --c: var(--dn-pos); } .fd-q.fd-bom { --c: var(--dn-bom); }
.fd-q.fd-mini { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
.fd-letra { font-size: 13px; font-weight: 700; color: var(--texto); line-height: 1; }
.fd-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 13px; color: var(--suave); }
.fd-frase { margin: 8px 0 0; font-size: 14px; }
.dn-cartao .fd-bloco { margin-top: 2px; }
.dn-cartao .fd-tit { display: none; }
.dn-cartao .fd-faixa { justify-content: center; }
.dn-leg { margin: 0 0 4px; }
@media print { .fd-q { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.dn-cartao .fd-aula { width: 22px; } .dn-cartao .fd-q { width: 20px; height: 20px; }

/* ---------- aviso da avaliação diária ao aluno (public/bloqueio.js, `diaria`): no canto inferior esquerdo, longe do chat ---------- */
.aviso-diaria, .aviso-avaliacao, .aviso-resolucao, .aviso-edicao { position: fixed; left: 16px; bottom: 16px; z-index: 240; width: min(380px, calc(100vw - 32px)); padding: 14px 16px; border-radius: 12px; border: 1px solid var(--borda); background: var(--papel); color: var(--texto); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.aviso-diaria-topo { display: flex; align-items: center; gap: 10px; }
.aviso-diaria-topo .fd-q { flex: none; }
.aviso-diaria-txt { margin: 8px 0 10px; color: var(--texto); }
.aviso-diaria-pe { display: flex; gap: 8px; flex-wrap: wrap; }
html.com-nova-versao .aviso-diaria, html.com-nova-versao .aviso-avaliacao, html.com-nova-versao .aviso-resolucao, html.com-nova-versao .aviso-edicao { bottom: 84px; }
@media print { .aviso-diaria, .aviso-avaliacao, .aviso-resolucao, .aviso-edicao, .vr-dlg { display: none; } }

/* ---------- vários exemplos numa pergunta da ficha (`caixaExemplo` em public/m/ficha/app.js) ---------- */
.exemplos-varios { display: grid; gap: 10px; }
.exemplos-varios > .nota { margin: 0; }
.exemplo-item { border-top: 1px solid var(--borda); padding-top: 8px; }
.exemplo-item:first-of-type { border-top: 0; padding-top: 0; }
.exemplo-n { display: block; margin-bottom: 4px; font-size: 13px; color: var(--muted); }

/* Imagens do chat (enviadas pelo professor) */
.ch-img-bot { display: block; margin: 6px 0 2px; padding: 0; border: 1px solid var(--borda); border-radius: 8px; background: none; cursor: zoom-in; max-width: 100%; }
.ch-img { display: block; max-width: min(100%, 320px); max-height: 240px; border-radius: 8px; object-fit: contain; }
.ch-img-janela { max-width: min(96vw, 1100px); max-height: 92vh; padding: 12px; border: 0; border-radius: 12px; background: var(--papel); color: var(--texto); }
.ch-img-janela::backdrop { background: rgba(0, 0, 0, 0.7); }
.ch-img-janela img { display: block; max-width: 100%; max-height: 76vh; margin: 0 auto; object-fit: contain; }
.ch-img-janela p { margin: 8px 0 0; white-space: pre-wrap; }
.ch-img-barra { display: flex; justify-content: flex-end; margin-top: 6px; }

/* Chat do professor no telemóvel (2.217.3): uma só coluna; turmas e alunos numa fila que desliza para o lado, a conversa com a largura toda. */
.chat-janela iframe { width: 1px; min-width: 100%; }
@media (max-width: 720px) {
  body:not(.chat-embutido) .ch-prof { grid-template-columns: minmax(0, 1fr); }
  body:not(.chat-embutido) .ch-salas-prof { flex-direction: column; flex-wrap: nowrap; min-width: 0; }
  body:not(.chat-embutido) .ch-salas-din { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; max-height: none; padding-bottom: 4px; }
  body:not(.chat-embutido) .ch-salas-din > * { flex-shrink: 0; }
  body:not(.chat-embutido) .ch-salas-din .ch-sala { white-space: nowrap; }
  body:not(.chat-embutido) .ch-salas-din .ch-grupo, body:not(.chat-embutido) .ch-salas-din .nota { display: none; }
  body:not(.chat-embutido) .ch-turmas { flex-wrap: nowrap; overflow-x: auto; }
  body:not(.chat-embutido) .ch-turmas > * { flex-shrink: 0; }
  body:not(.chat-embutido) .ch-lista-prof { height: min(52dvh, 520px); }
  body:not(.chat-embutido) .ch-lista-prof .ch-msg { padding-right: 10px; max-width: 100%; }
  body:not(.chat-embutido) .ch-prof-cartao, body:not(.chat-embutido) .ch-principal { min-width: 0; }
  body:not(.chat-embutido) #raiz { overflow-x: hidden; }
}

/* Calendário de aulas do professor (admin-calendario.html) */
.cal-barra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.cal-barra select { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--borda); background: var(--papel); color: var(--texto); }
.cal-vazio ol { margin: 6px 0 12px 1.2em; padding: 0; }
.cal-vazio li { margin: 4px 0; }
.cal-resumo { margin: 0 0 12px; }
.cal-resumo h2 { font-size: 18px; margin: 0 0 6px; }
.cal-res-ano { margin: 4px 0; }
.cal-res-ano ul { margin: 2px 0 6px 1.2em; padding: 0; }
.cal-res-ano.atras > b { color: var(--aviso-txt); }
.cal-ok { color: var(--ok, #15803d); font-weight: 700; }
.cal-envolv { border: 1px solid var(--borda); border-radius: 12px; background: var(--papel); }
/* Cabeçalho fixo ao descer (2.228.9): no computador a caixa não tem deslocamento próprio, por isso o cabeçalho prende-se
   ao topo da página; no telemóvel (a tabela é mais larga do que o ecrã) a caixa desliza nos dois sentidos, com altura
   limitada, e o cabeçalho fica fixo dentro dela. Os «top» de cada linha vêm de fixarCabecalho em admin-calendario.js. */
@media (max-width: 799px) { .cal-envolv { overflow: auto; max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); } }
.cal-tab thead th { box-shadow: inset 0 -1px 0 var(--borda-tab, var(--borda)); }
.cal-tab { border-collapse: collapse; width: 100%; min-width: 760px; table-layout: fixed; font-size: 14px; }
.cal-tab th, .cal-tab td { border: 1px solid var(--borda-tab, var(--borda)); padding: 0; text-align: center; vertical-align: top; }
.cal-tab thead th { position: sticky; top: 0; background: var(--light); color: var(--titulo); padding: 4px 6px; font-weight: 700; z-index: 3; }
.cal-tab thead tr.cal-cab2 th { font-weight: 600; }
.cal-tab thead tr.cal-cab3 th { font-weight: 400; font-size: 13px; }
.cal-tab th.cal-sem { width: 118px; }
.cal-tab tbody th.cal-sem { background: var(--item-bg, var(--light)); color: var(--titulo); padding: 6px 4px; font-size: 13px; vertical-align: middle; }
.cal-titulo-imp { display: none; }
.cal-cel { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; width: 100%; min-height: 48px; padding: 5px 4px; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; text-align: center; }
.cal-cel:hover, .cal-cel:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal-cel.cal-nota { min-height: 30px; font-size: 13px; white-space: pre-wrap; color: var(--suave, var(--texto)); }
.cal-data { font-size: 13px; }
.cal-rot { font-size: 13px; white-space: pre-wrap; }
.cal-atras { font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 999px; border: 1px solid currentColor; color: #9a3412; background: #fff7ed; }
.cal-tab td.cal-com-cor, .cal-tab td.cal-com-cor .cal-cel { color: #1a1a1a; }
.cal-fora { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--borda) 6px 7px); }
.cal-faixa td { background: #fff2cc; color: #1a1a1a; font-weight: 700; padding: 6px; }
.cal-l1 td, .cal-l1 th { border-top: 2px solid var(--borda); }
.cal-tab tbody tr.cal-semana-hoje th.cal-sem { background: var(--accent); color: var(--on-color); }
.cal-dia-hoje { box-shadow: inset 0 0 0 3px var(--accent); }
.cal-hoje-etq { display: block; font-size: 12px; font-weight: 700; margin-top: 2px; }
.cal-piscar th.cal-sem, .cal-piscar td { outline: 3px solid var(--accent); outline-offset: -3px; }
.cal-janela { border: 2px solid var(--accent); border-radius: 14px; padding: 18px; width: min(560px, 94vw); max-height: 90vh; overflow: auto; background: var(--papel); color: var(--texto); }
.cal-janela:has(.cal-assist) { width: min(900px, 96vw); }
.cal-janela::backdrop { background: rgba(0, 0, 0, .45); }
.cal-janela h2 { margin: 0 0 10px; font-size: 20px; }
.cal-janela h3 { margin: 14px 0 6px; font-size: 16px; }
.cal-lbl { display: block; font-weight: 700; margin: 8px 0 4px; }
.cal-texto { display: block; width: 100%; box-sizing: border-box; font: inherit; margin-top: 4px; }
.cal-paleta { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-cor { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 8px; border: 1px solid var(--borda); background: var(--papel); color: var(--texto); font: inherit; font-size: 13px; cursor: pointer; }
.cal-cor.sel { border: 2px solid var(--accent); font-weight: 700; }
.cal-amostra { width: 18px; height: 18px; border-radius: 4px; border: 1px solid #8a8a8a; background: transparent; }
.cal-cor.sem .cal-amostra { background: repeating-linear-gradient(135deg, transparent 0 4px, #8a8a8a 4px 5px); }
.cal-botoes { margin-top: 14px; }
.cal-grelha2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 12px; }
.cal-grelha2 label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: 14px; }
.cal-assist input, .cal-assist select { font: inherit; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--borda); background: var(--papel); color: var(--texto); }
.cal-tab-edit { border-collapse: collapse; width: 100%; margin: 6px 0; font-size: 14px; }
.cal-tab-edit th, .cal-tab-edit td { border-bottom: 1px solid var(--borda); padding: 3px 4px; text-align: left; }
.cal-tab-edit input[type="text"] { width: 100%; box-sizing: border-box; }
.cal-ev-envolv { max-height: 320px; overflow: auto; }
.cal-ev-feriado td:first-child, .cal-ev-semAulas td:first-child { box-shadow: inset 4px 0 0 #e8a3a3; }
.cal-ev-interrupcao td:first-child { box-shadow: inset 4px 0 0 #e6c45c; }
@media (max-width: 640px) {
  .cal-barra .btn { flex: 1 1 auto; }
}
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  .pagina-calendario header.aula-topo, .pagina-calendario .cal-barra, .pagina-calendario .cal-resumo, .pagina-calendario .rodape-credito, .pagina-calendario .btn-voltar { display: none !important; }
  .pagina-calendario .prof { max-width: none; padding: 0; margin: 0; }
  .cal-envolv { overflow: visible; max-height: none; border: 0; border-radius: 0; }
  .cal-tab { min-width: 0; font-size: 8pt; }
  .cal-tab th, .cal-tab td { border: 1px solid #888 !important; color: #000 !important; }
  .cal-tab thead { display: table-header-group; }
  .cal-tab thead th { position: static; background: #d9e2f3 !important; }
  .cal-tab tbody th.cal-sem, .cal-semana-hoje th.cal-sem { background: #f2f2f2 !important; }
  .cal-tab tr { break-inside: avoid; }
  .cal-cel { min-height: 0; padding: 2px; }
  .cal-cel.cal-nota { min-height: 14px; }
  .cal-titulo-imp { display: table-caption; caption-side: top; text-align: left; font-weight: 700; font-size: 13pt; padding: 0 0 4px; }
  .cal-hoje-etq, .cal-atras { display: none; }
  .cal-dia-hoje { box-shadow: none; }
  .cal-cel:hover, .cal-cel:focus, .cal-cel:focus-visible { outline: none !important; }
  .cal-tab, .cal-tab * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.cal-extra { font-size: 12px; font-weight: 700; white-space: pre-wrap; }
.cal-plano { font-size: 12px; font-style: italic; color: var(--suave); white-space: pre-wrap; line-height: 1.25; }
.cal-tab td.cal-com-cor .cal-plano { color: #33414d; }
.cal-t-falta .cal-rot { font-weight: 700; }
.cal-falta-caixa { margin: 12px 0 0; padding: 8px 10px; border: 1px solid var(--borda); border-radius: 10px; }
.cal-falta-caixa summary { cursor: pointer; font-weight: 700; }
.cal-falta-caixa .linha-a { flex-wrap: wrap; gap: 6px; align-items: center; }
.cal-motivo { font: inherit; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--borda); background: var(--papel); color: var(--texto); }
.cal-janela:has(.cal-plano-janela) { width: min(760px, 96vw); }
.cal-plano-texto { display: block; width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; line-height: 1.5; margin: 6px 0; }
.cal-plano-para, .cal-plano-desde { font: inherit; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--borda); background: var(--papel); color: var(--texto); }
.cal-plano-desde { width: 70px; }
@media print { .cal-plano { color: #333 !important; } }
.cal-mun, .cal-mun-nome, .cal-mun-dia { font: inherit; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--borda); background: var(--papel); color: var(--texto); }
.cal-mun-outro { flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 8px; }
.cal-mun-dia { width: 80px; }
.cal-assist section { margin-bottom: 6px; }

/* Apresentação das aulas (/apresentacao/): diapositivos 16:9, sempre claros (como no PowerPoint), com o verde do Excel. */
.pagina-apresentacao { --ap-verde: #107c41; --ap-verde-esc: #0b5a2f; --ap-verde-claro: #e7f4ec; --ap-tinta: #13202b; --ap-suave: #4a5a66; --ap-borda: #d4dde3; }
.ap-topo { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 1280px; margin: 10px auto 8px; padding: 0 16px; }
.ap-topo-tit { display: flex; flex-direction: column; }
.ap-topo-tit .k { font-size: 12px; letter-spacing: .08em; color: var(--suave); }
.ap-topo-bot { display: flex; gap: 6px; flex-wrap: wrap; }
.ap-palco-env { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.ap-palco-env:fullscreen { max-width: none; padding: 2vh 2vw; background: #0d1b26; display: flex; flex-direction: column; justify-content: center; }
.ap-palco-env:fullscreen .ap-palco { width: min(96vw, calc((96vh - 60px) * 16 / 9)); margin: 0 auto; }
.ap-palco { container-type: inline-size; aspect-ratio: 16 / 9; width: 100%; max-height: calc(100vh - 150px); max-width: calc((100vh - 150px) * 16 / 9); margin: 0 auto; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); background: #fff; color: var(--ap-tinta); cursor: pointer; position: relative; }
.ap-dia { position: absolute; inset: 0; display: flex; flex-direction: column; font-size: 2.1cqw; line-height: 1.35; background: #fff; color: var(--ap-tinta); }
.ap-deco { position: absolute; right: -9cqw; top: -9cqw; width: 22cqw; height: 22cqw; border-radius: 50%; background: var(--ap-verde-claro); pointer-events: none; }
.ap-deco::after { content: ""; position: absolute; left: 4cqw; bottom: 4cqw; width: 5cqw; height: 5cqw; border-radius: 50%; border: .5cqw solid var(--ap-verde); opacity: .35; }
.ap-corpo { position: relative; flex: 1; padding: 3.2cqw 4.5cqw 1cqw; display: flex; flex-direction: column; gap: 1.2cqw; min-height: 0; }
.ap-titulo { display: flex; align-items: center; gap: 1.4cqw; border-bottom: .35cqw solid var(--ap-verde); padding-bottom: .8cqw; margin-right: 12cqw; }
.ap-titulo h2 { margin: 0; font-size: 3.4cqw; line-height: 1.15; color: var(--ap-verde-esc); }
.ap-titulo-ico { display: inline-flex; width: 4.4cqw; height: 4.4cqw; border-radius: 1.1cqw; background: var(--ap-verde); color: #fff; align-items: center; justify-content: center; flex: 0 0 auto; }
.ap-titulo-ico .ap-ico { width: 2.8cqw; height: 2.8cqw; }
.ap-sub { margin: 0; color: var(--ap-suave); font-size: 1.9cqw; }
.ap-nota { margin: auto 0 0; font-size: 1.6cqw; color: var(--ap-suave); border-left: .4cqw solid var(--ap-borda); padding-left: 1cqw; }
.ap-rodape { display: flex; justify-content: space-between; padding: .8cqw 4.5cqw; font-size: 1.25cqw; color: var(--ap-suave); border-top: 1px solid var(--ap-borda); background: #f7faf8; }
/* capa */
.ap-capa { position: relative; flex: 1; display: flex; align-items: center; background: var(--ap-verde); color: #fff; overflow: hidden; }
.ap-capa-deco { position: absolute; right: -4cqw; bottom: -6cqw; width: 55cqw; opacity: .22; }
.ap-grelha { width: 100%; height: auto; }
.ap-grelha line { stroke: #fff; stroke-width: .8; }
.ap-grelha .ap-grelha-sel { fill: none; stroke: #fff; stroke-width: 2.4; }
.ap-capa-txt { position: relative; padding: 0 7cqw; }
.ap-capa:has(.ap-capa-fotos) .ap-capa-txt { max-width: 50cqw; padding: 0 0 0 5cqw; }
.ap-capa:has(.ap-capa-fotos) h1 { font-size: 5.6cqw; }
.ap-capa:has(.ap-capa-fotos) .ap-capa-kicker { font-size: 1.4cqw; }
.ap-capa:has(.ap-capa-fotos) .ap-capa-sub { font-size: 2.6cqw; }
.ap-capa-fotos { position: absolute; right: 2cqw; top: 50%; translate: 0 -50%; display: flex; align-items: center; }
.ap-capa-fotos img { height: 33cqw; width: auto; border-radius: 2.4cqw; box-shadow: 0 1.2cqw 3cqw rgba(0, 0, 0, .35); margin-left: -6cqw; }
.ap-capa-fotos img:nth-child(1) { rotate: -8deg; margin-left: 0; }
.ap-capa-fotos img:nth-child(2) { height: 38cqw; position: relative; z-index: 1; }
.ap-capa-fotos img:nth-child(3) { rotate: 8deg; }
.ap-galeria { flex: 1; min-height: 0; display: flex; justify-content: center; align-items: flex-start; gap: 2.2cqw; }
.ap-gal-item { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .6cqw; flex: 0 1 17cqw; min-width: 0; }
.ap-gal-item img { height: 29cqw; width: auto; max-width: 100%; object-fit: contain; border-radius: 1.6cqw; box-shadow: 0 .5cqw 1.6cqw rgba(19, 32, 43, .22); }
.ap-gal-item figcaption { font-size: 1.45cqw; line-height: 1.2; text-align: center; font-weight: 600; color: var(--ap-tinta); }
.ap-galeria.n6 { gap: 1.4cqw; } .ap-galeria.n6 .ap-gal-item { flex-basis: 14.5cqw; } .ap-galeria.n6 .ap-gal-item img { height: 26cqw; }
.ap-galeria-dia .ap-sub { margin: 0; }
.apr-imagem { flex: 1; min-height: 0; display: grid; grid-template-columns: 62fr 38fr; gap: 2.4cqw; align-items: start; }
.apr-imagem-fig { margin: 0; min-width: 0; }
.apr-imagem-larga { grid-template-columns: 1fr; gap: 2cqw; }
.apr-imagem-larga .apr-imagem-fig img { max-height: 15cqw; width: 100%; object-position: center top; }
.apr-imagem-larga .apr-imagem-pontos { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4cqw 3cqw; }
.apr-imagem-fig img { display: block; width: 100%; max-height: 36cqw; object-fit: contain; object-position: left top; border: .2cqw solid var(--ap-borda); border-radius: 1.2cqw; box-shadow: 0 .5cqw 1.6cqw rgba(19, 32, 43, .18); background: #fff; }
.apr-imagem-pontos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.5cqw; font-size: 1.85cqw; line-height: 1.3; }
.apr-imagem-pontos li { display: flex; gap: 1cqw; align-items: flex-start; }
.apr-imagem-pontos .ap-num { flex: 0 0 auto; width: 3cqw; height: 3cqw; border-radius: 50%; background: var(--ap-verde); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.6cqw; }
.ap-fim-imgs { display: flex; justify-content: center; gap: 1.6cqw; }
.ap-fim-imgs img { height: 17cqw; width: auto; border-radius: 1.2cqw; box-shadow: 0 .5cqw 1.4cqw rgba(19, 32, 43, .22); }
.ap-fim-fotos .ap-fim-icone { display: none; }
.ap-fim-fotos h2 { font-size: 3.6cqw; }
.ap-fim-fotos ul { font-size: 2cqw; gap: .8cqw; }
.ap-capa-icone { width: 8cqw; height: 8cqw; border-radius: 2cqw; background: #fff; color: var(--ap-verde); display: flex; align-items: center; justify-content: center; margin-bottom: 2cqw; }
.ap-capa-icone .ap-ico { width: 5cqw; height: 5cqw; }
.ap-capa-kicker { margin: 0; font-size: 1.8cqw; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.ap-capa h1 { margin: .4cqw 0; font-size: 7.5cqw; line-height: 1.05; color: #fff; }
.ap-capa-sub { margin: 0; font-size: 3.2cqw; }
.ap-t-capa .ap-rodape { background: var(--ap-verde-esc); color: #fff; border-top: 0; }
/* listas e passos */
.ap-lista ul, .ap-fim ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.4cqw; font-size: 2.3cqw; }
.ap-lista li { display: flex; gap: 1.4cqw; align-items: flex-start; }
.ap-marca { flex: 0 0 auto; width: 1.4cqw; height: 1.4cqw; margin-top: .9cqw; border-radius: .35cqw; background: var(--ap-verde); transform: rotate(45deg); }
ol.ap-passos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.1cqw; font-size: 2.2cqw; }
ol.ap-passos > li { display: flex; gap: 1.6cqw; align-items: center; background: #f5f9f6; border: 1px solid var(--ap-borda); border-radius: 1cqw; padding: .9cqw 1.4cqw; }
.ap-num { flex: 0 0 auto; width: 3.6cqw; height: 3.6cqw; border-radius: 50%; background: var(--ap-verde); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
/* comparar */
.ap-comparar { display: grid; gap: 2cqw; grid-template-columns: repeat(2, 1fr); flex: 1; align-content: start; }
.ap-comparar.n3, .ap-comparar.n4 { grid-template-columns: repeat(2, 1fr); }
.ap-comparar.n4 { gap: 1.4cqw; }
.ap-col { border-radius: 1.2cqw; padding: 1.6cqw 2cqw; border: .3cqw solid; background: #fff; }
.ap-col h3 { margin: 0 0 .8cqw; font-size: 2.6cqw; }
.ap-col ul { margin: 0; padding-left: 2.4cqw; font-size: 2cqw; display: flex; flex-direction: column; gap: .6cqw; }
.ap-comparar.n4 .ap-col h3 { font-size: 2.2cqw; }
.ap-comparar.n4 .ap-col ul { font-size: 1.75cqw; }
.ap-c-azul { border-color: #1d6fb8; background: #eef5fc; } .ap-c-azul h3 { color: #155a96; }
.ap-c-verde { border-color: #107c41; background: #e9f6ee; } .ap-c-verde h3 { color: #0b5a2f; }
.ap-c-laranja { border-color: #c2410c; background: #fdf1ea; } .ap-c-laranja h3 { color: #9a330a; }
.ap-c-roxo { border-color: #7c3aed; background: #f3eefe; } .ap-c-roxo h3 { color: #5b21b6; }
/* função */
.ap-sintaxe { margin: 0; font-family: "JetBrains Mono", monospace; font-size: 2.6cqw; background: #13202b; color: #e6f4ea; padding: 1.2cqw 1.8cqw; border-radius: 1cqw; white-space: pre-wrap; }
.ap-partes { display: flex; flex-direction: column; gap: .8cqw; font-size: 2cqw; }
.ap-parte { display: flex; gap: 1.4cqw; align-items: baseline; }
.ap-parte code { flex: 0 0 auto; font-family: "JetBrains Mono", monospace; background: var(--ap-verde-claro); color: var(--ap-verde-esc); padding: .2cqw .9cqw; border-radius: .6cqw; font-weight: 700; }
.ap-exemplo { border: .3cqw dashed var(--ap-verde); border-radius: 1.2cqw; padding: 1.2cqw 1.6cqw; background: #fbfdfb; }
.ap-exemplo-rot { display: inline-block; font-size: 1.4cqw; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ap-verde-esc); margin-right: 1cqw; }
.ap-exemplo code { font-family: "JetBrains Mono", monospace; font-size: 2.2cqw; font-weight: 700; }
.ap-exemplo p { margin: .6cqw 0 0; font-size: 1.9cqw; }
/* folha de cálculo simulada */
.ap-folha-dia { gap: .9cqw; }
.ap-excel { flex: 0 0 auto; border: 1px solid #b8c4cc; border-radius: .8cqw; overflow: hidden; background: #fff; font-family: "Segoe UI", Arial, sans-serif; }
.ap-barra-f { display: flex; align-items: center; gap: 1cqw; padding: .5cqw .8cqw; border-bottom: 1px solid #c8d2d9; background: #f3f6f8; font-size: 1.6cqw; }
.ap-caixa-nome { min-width: 6cqw; padding: .2cqw .6cqw; border: 1px solid #c8d2d9; background: #fff; font-weight: 700; text-align: center; }
.ap-fx { font-style: italic; color: #5d6b75; font-weight: 700; }
.ap-formula { flex: 1; padding: .2cqw .6cqw; border: 1px solid #c8d2d9; background: #fff; font-family: "JetBrains Mono", monospace; min-height: 2.2cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-grelha-env { overflow: hidden; }
.ap-folha { border-collapse: collapse; table-layout: fixed; font-size: 1.55cqw; }
.ap-col-num { width: 3.6cqw; }
.ap-folha th { background: #eef1f3; color: #44525c; font-weight: 600; border: 1px solid #d6dde2; padding: .15cqw .4cqw; text-align: center; }
.ap-folha th.ap-cab-sel { background: #d3ecdc; color: var(--ap-verde-esc); border-bottom: .25cqw solid var(--ap-verde); }
.ap-folha th.ap-filtrada { color: #1d6fb8; }
.ap-folha td { position: relative; border: 1px solid #e1e6ea; padding: .1cqw .5cqw; height: 2.35cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-folha td.ap-num-cel { text-align: right; }
.ap-folha td.ap-cab-dados { font-weight: 700; background: #f5f9f6; }
.ap-folha td.ap-dest { background: #e3f0fb; }
.ap-folha td.ap-dt { border-top: .25cqw solid #1d6fb8; } .ap-folha td.ap-db { border-bottom: .25cqw solid #1d6fb8; }
.ap-folha td.ap-dl { border-left: .25cqw solid #1d6fb8; } .ap-folha td.ap-dr { border-right: .25cqw solid #1d6fb8; }
.ap-folha td.ap-tf-cab { background: #107c41; color: #fff; font-weight: 700; }
.ap-folha td.ap-tf-cab .ap-v::after { content: " ▾"; font-size: .8em; opacity: .9; }
.ap-folha td.ap-tf-par { background: #e7f4ec; } .ap-folha td.ap-tf-impar { background: #fff; }
.ap-folha td.ap-sel { box-shadow: inset 0 0 0 .3cqw var(--ap-verde); }
.ap-folha td.ap-novo .ap-v { font-weight: 800; color: var(--ap-verde-esc); }
.ap-v { position: relative; }
.ap-f-verm { background: #fbd5d5; color: #8a1c1c; } .ap-f-verde { background: #d4efdd; color: #0b5a2f; } .ap-f-amar { background: #fdf0c2; color: #6b4e00; }
.ap-esc1 { background: #f8c9c4; } .ap-esc2 { background: #fbe0c2; } .ap-esc3 { background: #fdf3c4; } .ap-esc4 { background: #ddf0c9; } .ap-esc5 { background: #bfe5c8; }
.ap-barra { position: absolute; left: .3cqw; top: .45cqw; bottom: .45cqw; background: linear-gradient(90deg, #6fa8dc, #cfe2f3); border-radius: .2cqw; }
.ap-separadores { display: flex; gap: .3cqw; padding: .4cqw .8cqw; background: #f3f6f8; border-top: 1px solid #c8d2d9; font-size: 1.4cqw; }
.ap-sep { padding: .2cqw 1.4cqw; color: #4a5a66; }
.ap-estado { margin-left: auto; padding: .2cqw 1cqw; color: #1f2d38; background: #fff7d6; border: 1px solid #e3c65a; border-radius: .4cqw; font-weight: 600; }
.ap-sep.sel { background: #fff; color: var(--ap-verde-esc); font-weight: 700; border-bottom: .3cqw solid var(--ap-verde); }
.ap-passo { display: flex; gap: 1.2cqw; align-items: center; background: #fff8e1; border: 1px solid #f0d78a; border-radius: 1cqw; padding: .8cqw 1.4cqw; font-size: 1.9cqw; }
.ap-passo-n { flex: 0 0 auto; font-weight: 800; color: #6b4e00; background: #fde7a6; border-radius: 999px; padding: .1cqw 1cqw; }
/* gráficos */
.ap-graf-lado { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.4cqw; align-items: center; flex: 1; min-height: 0; }
.ap-graf { min-height: 0; }
.ap-svg { width: 100%; height: auto; max-height: 34cqw; display: block; }
.ap-svg text { font-family: inherit; }
.ap-g-fatia { fill: #fff; font-size: 15px; font-weight: 800; }
.ap-g-leg { fill: #13202b; font-size: 14px; }
.ap-g-eixo { stroke: #6b7a85; stroke-width: 1.5; }
.ap-g-grelha { stroke: #e3e8ec; stroke-width: 1; }
.ap-g-esc { fill: #4a5a66; font-size: 12px; }
.ap-g-val { fill: #13202b; font-size: 14px; font-weight: 800; }
.ap-g-rot { fill: #13202b; font-size: 14px; font-weight: 700; }
.ap-g-eixo-t { fill: #4a5a66; font-size: 13px; font-weight: 700; }
.ap-graf-txt { margin: 0; font-size: 2cqw; background: #f5f9f6; border-left: .5cqw solid var(--ap-verde); padding: 1.2cqw 1.6cqw; border-radius: .6cqw; }
/* tabela dinâmica */
.ap-din { display: grid; grid-template-columns: 1fr 1.5fr; gap: 2.4cqw; align-items: start; }
.ap-din-campos { border: 1px solid var(--ap-borda); border-radius: 1cqw; padding: 1cqw; background: #f7faf8; display: grid; grid-template-columns: 1fr 1fr; gap: .8cqw; }
.ap-din-tit { grid-column: 1 / -1; margin: 0; font-size: 1.5cqw; font-weight: 800; color: var(--ap-suave); text-transform: uppercase; letter-spacing: .05em; }
.ap-din-zona { border: 1px dashed #b8c4cc; border-radius: .8cqw; padding: .6cqw; min-height: 6cqw; font-size: 1.4cqw; color: var(--ap-suave); display: flex; flex-direction: column; gap: .5cqw; background: #fff; }
.ap-din-zona.com { border-style: solid; border-color: var(--ap-verde); }
.ap-chip { background: var(--ap-verde); color: #fff; border-radius: .6cqw; padding: .3cqw .7cqw; font-weight: 700; font-size: 1.5cqw; }
.ap-din-tab { border-collapse: collapse; font-size: 1.9cqw; width: 100%; }
.ap-din-tab th { background: #d3ecdc; color: var(--ap-verde-esc); text-align: left; padding: .6cqw 1cqw; border-bottom: .25cqw solid var(--ap-verde); }
.ap-din-tab td { padding: .5cqw 1cqw; border-bottom: 1px solid var(--ap-borda); }
.ap-din-tab td:not(:first-child), .ap-din-tab th:not(:first-child) { text-align: right; }
.ap-din-tab tr.tot td { font-weight: 800; border-top: .25cqw solid var(--ap-verde); }
/* fim */
.ap-fim { align-items: center; justify-content: center; text-align: center; border-bottom: 1.2cqw solid var(--ap-verde-claro); }
.ap-fim-icone { width: 8cqw; height: 8cqw; border-radius: 50%; background: var(--ap-verde); color: #fff; display: flex; align-items: center; justify-content: center; }
.ap-fim-icone .ap-ico { width: 5cqw; height: 5cqw; }
.ap-fim h2 { margin: 0; font-size: 4.2cqw; color: var(--ap-verde-esc); }
.ap-fim ul { text-align: left; }
.ap-fim li::before { content: "✓ "; color: var(--ap-verde); font-weight: 800; }
/* navegação */
.ap-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px auto 0; max-width: calc((100vh - 150px) * 16 / 9); }
.ap-palco-env:fullscreen .ap-nav { max-width: none; width: min(96vw, calc((96vh - 60px) * 16 / 9)); }
.ap-pontos { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ap-ponto { width: 12px; height: 12px; border-radius: 50%; border: 0; padding: 0; background: var(--borda); cursor: pointer; }
.ap-ponto.sel { background: #107c41; transform: scale(1.3); }
.ap-dica { text-align: center; margin: 8px 16px 20px; }
.ap-impressao { display: none; }
@media (max-width: 640px) {
  .ap-palco { max-height: none; max-width: none; }
  .ap-nav { max-width: none; }
}
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  .pagina-apresentacao #raiz, .pagina-apresentacao .rodape-credito, .pagina-apresentacao .chf-botao { display: none !important; }
  .ap-impressao { display: block; }
  .ap-imp-pag { break-after: page; width: 270mm; max-width: none; max-height: none; box-shadow: none; border: 1px solid #ccc; }
  .ap-impressao, .ap-impressao * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.ap-ligacao-caixa { max-width: 1100px; margin: 8px auto 0; padding: 0 16px; }
.ap-sintaxe, .ap-parte code, .ap-exemplo code, .ap-formula { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
.ap-folha td, .ap-folha th, .ap-din-tab td, .ap-din-tab th { border-radius: 0; }
/* Chat: menu «Mensagens recentes» (public/chat/vista.js, recentes) */
.ch-topo-menus { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin: 0 0 10px; }
.ch-recentes { position: relative; }
.ch-recentes > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--borda); background: var(--papel); color: var(--titulo); }
.ch-recentes > summary::-webkit-details-marker { display: none; }
.ch-recentes > summary::after { content: "▾"; font-size: 12px; }
.ch-recentes[open] > summary { border-color: var(--accent); }
.ch-rec-lista { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; width: min(420px, calc(100vw - 32px)); max-height: 60vh; overflow: auto; background: var(--papel); border: 1px solid var(--borda); border-radius: 12px; box-shadow: 0 8px 28px rgba(0, 0, 0, .18); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.ch-rec { display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; color: var(--texto); background: transparent; border: 0; border-radius: 8px; padding: 7px 9px; cursor: pointer; }
.ch-rec:hover, .ch-rec:focus-visible { background: var(--item-bg); }
.ch-rec.nova { background: color-mix(in srgb, var(--accent) 10%, var(--papel)); }
.ch-rec.prof .ch-rec-cab b { color: var(--erro); }
.ch-rec-cab { display: flex; gap: 4px; align-items: baseline; font-size: 14px; }
.ch-rec-sala { color: var(--suave); }
.ch-rec-hora { margin-left: auto; color: var(--suave); font-size: 13px; white-space: nowrap; }
.ch-rec-txt { font-size: 14px; color: var(--texto); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Menus da Administração com cores suaves, uma por secção (2.221.0): fundo claro do tom, texto escuro do mesmo tom
   (4,5:1 ou mais) e, na secção aberta, o tom mais forte com contorno. */
.nav-admin .sep-turmas { --nh: #2563eb; } .nav-admin .sep-atividades { --nh: #16a34a; } .nav-admin .sep-programacao { --nh: #7c3aed; }
.nav-admin .sep-banco { --nh: #d97706; } .nav-admin .sep-planificacao { --nh: #0d9488; } .nav-admin .sep-calendario { --nh: #db2777; }
.nav-admin .sep-aparencia { --nh: #c026d3; } .nav-admin .sep-professores { --nh: #4f46e5; } .nav-admin .sep-estatisticas { --nh: #ea580c; }
.nav-admin .sep-dados { --nh: #0891b2; } .nav-admin .sep-versoes { --nh: #64748b; }
.seg-sub .sep-atividades { --nh: #16a34a; } .seg-sub .sep-resultados { --nh: #2563eb; } .seg-sub .sep-alunos { --nh: #d97706; } .seg-sub .sep-mais { --nh: #64748b; }
.nav-admin .nav-btn { background: color-mix(in srgb, var(--nh, #64748b) 11%, var(--papel)); color: color-mix(in srgb, var(--nh, #64748b) 72%, #000); border: 1px solid color-mix(in srgb, var(--nh, #64748b) 22%, var(--papel)); }
.nav-admin .nav-btn:hover { background: color-mix(in srgb, var(--nh, #64748b) 20%, var(--papel)); }
.nav-admin .nav-btn.sel { background: color-mix(in srgb, var(--nh, #64748b) 26%, var(--papel)); color: color-mix(in srgb, var(--nh, #64748b) 62%, #000); border-color: var(--nh, #64748b); box-shadow: inset 0 -3px 0 var(--nh, #64748b); }
.seg-sub .seg-sub-btn { border-radius: 10px 10px 0 0; background: color-mix(in srgb, var(--nh, #64748b) 8%, var(--papel)); color: color-mix(in srgb, var(--nh, #64748b) 70%, #000); }
.seg-sub .seg-sub-btn.sel { background: color-mix(in srgb, var(--nh, #64748b) 20%, var(--papel)); color: color-mix(in srgb, var(--nh, #64748b) 60%, #000); border-bottom-color: var(--nh, #64748b); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav-admin .nav-btn { background: color-mix(in srgb, var(--nh, #64748b) 16%, var(--papel)); color: color-mix(in srgb, var(--nh, #64748b) 40%, #fff); border-color: color-mix(in srgb, var(--nh, #64748b) 30%, var(--papel)); }
  :root:not([data-theme="light"]) .nav-admin .nav-btn.sel { background: color-mix(in srgb, var(--nh, #64748b) 34%, var(--papel)); color: #fff; border-color: var(--nh, #64748b); }
  :root:not([data-theme="light"]) .seg-sub .seg-sub-btn { background: color-mix(in srgb, var(--nh, #64748b) 12%, var(--papel)); color: color-mix(in srgb, var(--nh, #64748b) 40%, #fff); }
  :root:not([data-theme="light"]) .seg-sub .seg-sub-btn.sel { background: color-mix(in srgb, var(--nh, #64748b) 28%, var(--papel)); color: #fff; }
}
:root[data-theme="dark"] .nav-admin .nav-btn { background: color-mix(in srgb, var(--nh, #64748b) 16%, var(--papel)); color: color-mix(in srgb, var(--nh, #64748b) 40%, #fff); border-color: color-mix(in srgb, var(--nh, #64748b) 30%, var(--papel)); }
:root[data-theme="dark"] .nav-admin .nav-btn.sel { background: color-mix(in srgb, var(--nh, #64748b) 34%, var(--papel)); color: #fff; border-color: var(--nh, #64748b); }
:root[data-theme="dark"] .seg-sub .seg-sub-btn { background: color-mix(in srgb, var(--nh, #64748b) 12%, var(--papel)); color: color-mix(in srgb, var(--nh, #64748b) 40%, #fff); }
:root[data-theme="dark"] .seg-sub .seg-sub-btn.sel { background: color-mix(in srgb, var(--nh, #64748b) 28%, var(--papel)); color: #fff; }
.nav-admin a.nav-btn { text-decoration: none; }
.ap-folha td.ap-filtro .ap-v::after { content: " ▾"; color: #107c41; font-weight: 800; }
.ap-f-azul { background: #dbe9fa; color: #123f73; }
.ap-f-txtverm { color: #b91c1c; font-weight: 700; }
.ap-folha-dia { padding-top: 2.6cqw; gap: .7cqw; }
.ap-folha-dia .ap-titulo h2 { font-size: 3cqw; }
.ap-folha-dia .ap-sub { font-size: 1.7cqw; }
.ap-folha-dia .ap-nota { font-size: 1.35cqw; margin-top: 0; }
.ap-folha-dia .ap-passo { font-size: 1.75cqw; padding: .6cqw 1.2cqw; }
.ap-compacta .ap-folha { font-size: 1.4cqw; }
.ap-compacta .ap-folha td { height: 2.05cqw; }
.ap-compacta .ap-barra-f { padding: .3cqw .8cqw; }

/* Aviso do enunciado em PDF no topo de cada etapa das fichas de Excel (2.228.0) */
.enunciado-aviso { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: #fff4d6; border: 2px solid #e0a800; color: #3d2c00; }
.enunciado-aviso p { margin: 0; flex: 1 1 260px; font-size: 15px; }
.enunciado-aviso .btn { flex: 0 0 auto; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .enunciado-aviso { background: #3a2f0b; border-color: #c99a1a; color: #fbeec4; } }
:root[data-theme="dark"] .enunciado-aviso { background: #3a2f0b; border-color: #c99a1a; color: #fbeec4; }

/* Menção da intercalar com cor própria (2.228.7): a célula NS, ST ou SB pinta-se pela menção, por cima da cor da linha
   (que é a da nota final). Fundo claro e filete à esquerda; o texto continua a dizer a menção (nunca só a cor). */
:root { --int-ns: #b42318; --int-ns-bg: #fde4e1; --int-st: #a15c07; --int-st-bg: #fdf0c8; --int-sb: #067647; --int-sb-bg: #d7f5e3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --int-ns: #f97066; --int-ns-bg: #4a1714; --int-st: #fdb022; --int-st-bg: #43320a; --int-sb: #47cd89; --int-sb-bg: #0f3b26; } }
:root[data-theme="dark"] { --int-ns: #f97066; --int-ns-bg: #4a1714; --int-st: #fdb022; --int-st-bg: #43320a; --int-sb: #47cd89; --int-sb-bg: #0f3b26; }
.pa-tab tr > td.pa-int.pa-int-ns, :root .pa-tab tr.esc-linha > td.pa-int.pa-int-ns, :root:not([data-theme="light"]) .pa-tab tr.esc-linha > td.pa-int.pa-int-ns { background: var(--int-ns-bg); box-shadow: inset 4px 0 0 var(--int-ns); }
.pa-tab tr > td.pa-int.pa-int-st, :root .pa-tab tr.esc-linha > td.pa-int.pa-int-st, :root:not([data-theme="light"]) .pa-tab tr.esc-linha > td.pa-int.pa-int-st { background: var(--int-st-bg); box-shadow: inset 4px 0 0 var(--int-st); }
.pa-tab tr > td.pa-int.pa-int-sb, :root .pa-tab tr.esc-linha > td.pa-int.pa-int-sb, :root:not([data-theme="light"]) .pa-tab tr.esc-linha > td.pa-int.pa-int-sb { background: var(--int-sb-bg); box-shadow: inset 4px 0 0 var(--int-sb); }
.pa-int-amostra { display: inline-block; padding: 1px 8px; border-radius: 6px; font-weight: 700; color: var(--texto); }
.pa-int-amostra.pa-int-ns { background: var(--int-ns-bg); box-shadow: inset 4px 0 0 var(--int-ns); }
.pa-int-amostra.pa-int-st { background: var(--int-st-bg); box-shadow: inset 4px 0 0 var(--int-st); }
.pa-int-amostra.pa-int-sb { background: var(--int-sb-bg); box-shadow: inset 4px 0 0 var(--int-sb); }
@media print { .pa-tab tr > td.pa-int.pa-int-ns { background: #fde4e1 !important; } .pa-tab tr > td.pa-int.pa-int-st { background: #fdf0c8 !important; } .pa-tab tr > td.pa-int.pa-int-sb { background: #d7f5e3 !important; } .pa-tab td.pa-int.pa-int-ns, .pa-tab td.pa-int.pa-int-st, .pa-tab td.pa-int.pa-int-sb, .pa-int-amostra { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Pauta com cabeçalho fixo (2.228.10): a tabela desliza dentro de uma caixa da altura do ecrã; as linhas `tr.pa-fixa`
   (grupos e nomes das colunas) ficam no topo e a coluna dos alunos à esquerda. Os «top» vêm de fixarCabecalho em
   admin-pauta.js. O fundo base vai com :where() para as cores próprias dos cabeçalhos continuarem a mandar. */
.pa-rolar { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); overflow: auto; }
.pa-tab thead tr.pa-fixa th { position: sticky; z-index: 2; box-shadow: inset 0 -1px 0 var(--borda); }
.pa-tab thead tr.pa-fixa th.pa-nome { left: 0; z-index: 3; }
:where(.pa-tab thead tr.pa-fixa) th { background-color: var(--papel); }
@media print {
  .pa-rolar { max-height: none; overflow: visible; }
  .pa-tab thead tr.pa-fixa th { position: static; box-shadow: none; }
}

/* Cabeçalhos da pauta arrumados (2.228.12): título, uma linha curta e o estado; as ações num só menu «⋯» por coluna. */
.pa-tab thead .pa-cab { display: flex; align-items: flex-end; gap: 4px; justify-content: center; text-align: center; }
.pa-tab thead .pa-cab-txt { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.pa-tab thead .pa-cab .pa-tit { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 700; }
.pa-tab thead .pa-cab .pa-sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pa-tab thead .pa-cab .pa-falta, .pa-tab thead .pa-cab .pa-auto-est, .pa-tab thead .pa-cab .pa-fecho-est { display: inline-block; margin-top: 2px; padding: 0 6px; border-radius: 999px; border: 1px solid currentColor; font-size: 12px; line-height: 18px; white-space: nowrap; }
.pa-tab thead .pa-cab .pa-auto-est.aberta { color: var(--ok-txt); font-weight: 700; }
.pa-tab thead .pa-cab-menu { flex: 0 0 auto; }
.pa-tab thead .pa-cab-menu > summary.menu-btn { min-width: 0; padding: 0 6px; line-height: 1.4; font-size: 15px; letter-spacing: 1px; }
.pa-tab thead .pa-cab-menu .menu-painel { font-size: 14px; font-weight: 400; min-width: 220px; }
.pa-tab thead th:has(details.menu[open]) { z-index: 6; }
@media print { .pa-tab thead .pa-cab-menu { display: none; } }
.pa-tab thead .pa-at .pa-cab .pa-tit { -webkit-line-clamp: 3; }

/* Fotografias da turma com a escala (2.228.13, galeriaEscala em public/admin-pauta.js). */
dialog.pa-gal-dlg { width: min(1100px, 96vw); max-width: 96vw; }
.pa-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 10px 0; max-height: 70vh; overflow: auto; padding: 2px; }
.pa-gal-cartao { margin: 0; border: 1px solid var(--borda); border-radius: 12px; padding: 8px; background: var(--papel); display: flex; flex-direction: column; gap: 6px; }
.pa-gal-ver { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; }
.pa-gal-foto { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; background: var(--item-bg); }
.pa-gal-foto.vazia { display: flex; align-items: center; justify-content: center; color: var(--suave); font-size: 13px; border: 1px dashed var(--borda); }
.pa-gal-cartao figcaption { display: flex; flex-direction: column; gap: 4px; }
.pa-gal-nome { font-size: 14px; line-height: 1.25; }
@media print {
  body.pa-a-imprimir-gal > *:not(dialog.pa-gal-dlg) { display: none !important; }
  body.pa-a-imprimir-gal dialog.pa-gal-dlg { position: static; width: auto; max-width: none; border: 0; box-shadow: none; }
  body.pa-a-imprimir-gal dialog.pa-gal-dlg::backdrop { display: none; }
  body.pa-a-imprimir-gal .pa-gal { max-height: none; overflow: visible; grid-template-columns: repeat(5, 1fr); }
  body.pa-a-imprimir-gal .pa-gal-cartao { break-inside: avoid; }
  body.pa-a-imprimir-gal .dlg-botoes, body.pa-a-imprimir-gal .pa-gal-dlg .linha-a { display: none; }
}
/* A turma toda no ecrã (2.228.14): a janela ocupa a altura do ecrã e os cartões encolhem (--gal-w, calculado em galeriaEscala). */
dialog.pa-gal-dlg[open] { display: flex; flex-direction: column; height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); }
dialog.pa-gal-dlg .pa-gal { flex: 1 1 auto; min-height: 0; max-height: none; }
.pa-gal.tudo { grid-template-columns: repeat(auto-fill, var(--gal-w, 150px)); justify-content: center; gap: 8px; align-content: start; }
.pa-gal.tudo .pa-gal-cartao { padding: 5px; gap: 3px; border-radius: 10px; }
.pa-gal.tudo .pa-gal-nome { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pa-gal .esc { min-width: 0; grid-template-columns: minmax(28px, 1fr) auto; gap: 2px 5px; }
.pa-gal.tudo .esc-num { font-size: 13px; }
.pa-gal.tudo .esc-rot { font-size: 12px; }
@media print { dialog.pa-gal-dlg[open] { height: auto; max-height: none; display: block; } }
/* Ficha do aluno: outros elementos de avaliação (2.228.16). */
.fal-el-tab input.fal-el-tit { width: 100%; min-width: 160px; }
.fal-el-tab input.fal-el-niv, .fal-el-tab input.fal-el-peso { width: 5.5em; }
.fal-el-tab td:last-child { white-space: nowrap; }
@media print { .fal-el-novo, .fal-el-apagar { display: none; } }

/* Quiz: perguntas que valem mais (2.228.17). Cores próprias (âmbar claro com texto castanho, 8:1) nos dois temas. */
.quiz-valor { display: inline-block; margin-left: 10px; padding: 2px 10px; border-radius: 999px; background: #fde68a; color: #78350f; font-size: 14px; font-weight: 800; letter-spacing: 0; text-transform: none; vertical-align: middle; }
.quiz-valor-aviso { font-weight: 700; }

/* Planta da sala (2.228.23, public/admin-planta.js): duas áreas (mesas do centro e computadores) onde se arrastam as fotografias.
   2.228.28: sala ao alto 3 × 5 (altura até 92 % do ecrã), o quadro em baixo, fotografias quadradas com o nome por baixo
   (12 % da largura: cabem 10 numa coluna), áreas que se minimizam e a janela do aluno. */
.pl-zonas { display: grid; grid-template-columns: 1fr; gap: 18px; margin: 12px 0; }
.pl-zona { border: 1px solid var(--borda-tab); border-radius: 12px; padding: 12px; background: var(--item-bg); min-width: 0; }
.pl-zona.min { padding-block: 8px; }
.pl-zona.min .pl-zona-cab { margin-bottom: 0; }
.pl-zona-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.pl-zona-cab h2 { margin: 0; font-size: 18px; flex: 1 1 auto; }
.pl-ver { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.pl-ver-bot { font: inherit; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--borda-in); background: var(--item-bg); color: var(--texto); cursor: pointer; }
.pl-ver-bot.sel { background: var(--accent); border-color: var(--accent); color: var(--on-color); }
.pl-ver-bot:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pl-sala { position: relative; container-type: inline-size; aspect-ratio: 3 / 5; width: min(100%, calc(92vh * 3 / 5)); margin-inline: auto; border: 2px solid var(--texto); border-radius: 6px; background-color: var(--papel, #fff);
  background-image: radial-gradient(circle, var(--borda-tab) 1px, transparent 1.5px); background-size: 24px 24px; overflow: hidden; touch-action: none; }
.pl-sala.sobre { outline: 3px solid var(--accent); outline-offset: 2px; }
/* O quadro (a frente da sala) fica em baixo. */
.pl-frente { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); padding: 2px 12px; font-size: 13px; color: var(--suave);
  border: 1px solid var(--borda-tab); border-bottom: 0; border-radius: 6px 6px 0 0; background: var(--item-bg); white-space: nowrap; }
.pl-fila { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; min-height: 60px; padding: 8px; border: 1px dashed var(--borda-tab); border-radius: 8px; }
.pl-aluno { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; width: 92px; padding: 3px; border: 1px solid var(--borda-tab);
  border-radius: 8px; background: var(--item-bg); color: var(--texto); font: inherit; cursor: grab; touch-action: none; user-select: none; }
.pl-aluno:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; z-index: 2; }
.pl-foto { width: 76px; height: 95px; object-fit: cover; border-radius: 6px; pointer-events: none; }
.pl-foto.vazia { display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; color: var(--suave); background: var(--fundo, transparent); border: 1px solid var(--borda-tab); }
.pl-nome { font-size: 14px; line-height: 1.15; text-align: center; overflow-wrap: anywhere; pointer-events: none; }
@media (max-width: 640px) { .pl-aluno { width: 64px; } .pl-foto { width: 50px; height: 62px; } .pl-nome { font-size: 13px; } }
/* Avaliação diária de hoje: um quadradinho no canto da ficha, com a cor do nível. */
.pl-dia.fd-q { position: absolute; top: 3px; right: 3px; width: 14px; height: 14px; border-radius: 3px; border: 2px solid var(--papel); pointer-events: none; }
/* Na sala (e durante o arrasto, que guarda a classe na-sala): fotografia quadrada e o nome por cima da parte de baixo. */
.pl-aluno.na-sala { position: absolute; transform: translate(-50%, -50%); z-index: 1; width: clamp(40px, 12cqw, 110px); padding: 2px; gap: 1px; box-shadow: 0 1px 3px rgb(0 0 0 / 0.18); }
.pl-aluno.na-sala .pl-foto { width: 100%; height: auto; aspect-ratio: 1; object-position: 50% 20%; }
/* 2.228.30: o nome volta para baixo da fotografia (por cima tapava a cara); fotografia e nome cabem 10 numa coluna. */
.pl-aluno.na-sala .pl-nome { max-width: 100%; font-size: 13px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Durante o arrasto o aluno vai para o <body> com posição fixa (2.228.26; dentro da sala o container-type desviava-a). */
.pl-aluno.a-voar { position: fixed !important; transform: none !important; z-index: 1000; pointer-events: none; cursor: grabbing; box-shadow: 0 6px 18px rgb(0 0 0 / 0.3); }
/* Mesa do professor: um tampo castanho-claro com o nome por baixo, mais larga do que os alunos. */
.pl-aluno.pl-mesa { width: 120px; }
.pl-aluno.pl-mesa.na-sala { width: clamp(90px, 32cqw, 260px); }
.pl-mesa-tampo { display: block; width: 100%; aspect-ratio: 4 / 1; border-radius: 4px; background: var(--mesa-bg, #d9b98a); border: 1px solid var(--mesa-borda, #8a6a3d); pointer-events: none; }
/* Janela do aluno. */
.pl-dlg { width: min(640px, 94vw); padding: 0; border: 1px solid var(--borda-tab); border-radius: 14px; background: var(--papel); color: var(--texto); }
.pl-dlg::backdrop { background: rgb(0 0 0 / 0.45); }
.pl-dlg-corpo { display: flex; flex-wrap: wrap; gap: 16px; padding: 16px; }
.pl-dlg-foto { width: 220px; max-width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; border: 1px solid var(--borda-tab); }
.pl-dlg-foto.vazia { display: flex; align-items: center; justify-content: center; font-size: 56px; font-weight: 700; color: var(--suave); background: var(--fundo); }
.pl-dlg-info { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.pl-dlg-info h2 { margin: 0; font-size: 20px; }
.pl-dlg-info h3 { margin: 4px 0 0; font-size: 15px; }
@media print {
  .pl-fila, .pl-zona-cab button, .pl-ajuda, .pl-ver, .pl-zona.min { display: none !important; }
  .pl-zonas { grid-template-columns: 1fr; }
  .pl-zona { break-inside: avoid; border: 0; padding: 0; }
  .pl-zona + .pl-zona { break-before: page; }
  .pl-sala { background-image: none; }
}

/* Aluno de teste (2.229.0): barra fixa no fundo, por cima de tudo, também durante a pausa */
.teste-barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100000; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; padding: 8px 12px; background: var(--c-marca, #0b2540); color: var(--on-color); font-size: 14px; box-shadow: 0 -2px 10px rgba(0,0,0,.3); }
.teste-barra .teste-info { font-weight: 700; margin-right: 6px; }
.teste-bot { font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 8px; border: 1px solid currentColor; background: transparent; color: inherit; cursor: pointer; }
.teste-bot:hover, .teste-bot:focus-visible { background: rgba(255,255,255,.18); }
.teste-bot.sair { background: #fff; color: #0b2540; font-weight: 700; }
html.com-barra-teste body { padding-bottom: 56px; }
@media print { .teste-barra { display: none; } }

/* Simuladores e avaliações do professor, por ano e por tipo de conteúdo (2.229.1). */
.nav-admin .sep-simuladores { --nh: #0891b2; } .nav-admin .sep-formativos { --nh: #15803d; } .nav-admin .sep-avaliacoes { --nh: #be123c; }
.rec-anos { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.rec-ano.y7 { --rec-cor: var(--y7); } .rec-ano.y8 { --rec-cor: var(--y8); } .rec-ano.y9 { --rec-cor: var(--y9); }
.rec-ano.sel { background: var(--rec-cor); border-color: var(--rec-cor); color: var(--on-color); }
.rec-tipo { margin: 18px 0 8px; font-size: 16px; }
.rec-grelha { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.rec-cartao { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--borda-tab); border-radius: 12px; background: var(--item-bg); }
.rec-cartao h4 { margin: 0; font-size: 15px; }
.rec-cartao .nota { margin: 0; }
.rec-acoes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }

/* 2.229.3: o ano escolhido mantém-se legível com o rato por cima, etiquetas e estado de atribuição nos cartões, filtros. */
.rec-ano.sel, .rec-ano.sel:hover:not(:disabled), .rec-ano.sel:focus-visible { background: var(--rec-cor); border-color: var(--rec-cor); color: var(--on-color); }
.rec-filtros { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.rec-filtros input, .rec-filtros select { font: inherit; padding: 8px 10px; border: 1px solid var(--borda-tab); border-radius: 8px; background: var(--papel); color: var(--texto); }
.rec-pesquisa { flex: 1 1 200px; min-width: 0; }
.rec-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rec-chip { font-size: 13px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--borda-tab); color: var(--suave); background: var(--papel); }
.rec-estado { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.rec-estado li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.rec-estado li span { font-weight: 600; }
p.rec-estado { margin: 0; }
.btn.peq { vertical-align: middle; }

/* Formatação condicional na mini-folha (2.229.4) */
.fl-regras { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--borda); border-radius: 12px; }
.fl-regras h3 { margin: 0 0 4px; font-size: 16px; }
.fl-regras select, .fl-regras input { font: inherit; padding: 6px 8px; border: 1px solid var(--borda); border-radius: 8px; background: var(--papel); color: var(--texto); }
.fl-regras-lista { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fl-regras-lista li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fl-amostra { display: inline-block; min-width: 34px; padding: 2px 8px; border-radius: 6px; text-align: center; font-weight: 700; }

.jg-tab.jg-tab-larga { min-width: 0; height: auto; min-height: 40px; padding: 6px 12px; text-align: left; font-size: 14px; }

/* Critérios de avaliação, dificuldade e tempo previsto na mini-folha */
.fl-criterios { border: 1px solid var(--borda-in); border-radius: 12px; background: var(--papel); padding: 12px 16px; margin: 12px 0; max-width: 960px; }
.fl-criterios h2 { font-size: 17px; margin: 0 0 6px; }
.fl-criterios ul { margin: 0 0 8px; padding-left: 20px; }
.fl-pontos-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.fl-chip { display: inline-flex; flex-direction: column; border: 1px solid var(--borda-in); border-radius: 10px; padding: 4px 10px; min-width: 110px; }
.fl-chip small { color: var(--texto-2, var(--texto)); font-size: 13px; }
.fl-resumo, .fl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 8px 0; font-size: 15px; }
.fl-meta { margin: 4px 0 8px; }
.fl-dif { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; }
.fl-dif b { margin-left: 6px; font-size: 14px; }
.fl-dif-seg { display: inline-block; width: 18px; height: 10px; border-radius: 3px; border: 1px solid var(--borda-in); background: transparent; }
.fl-dif-seg.on { border-color: transparent; }
.fl-dif-seg.on.d1 { background: #2f9e6f; } .fl-dif-seg.on.d2 { background: #6aa84f; } .fl-dif-seg.on.d3 { background: #d99a1c; } .fl-dif-seg.on.d4 { background: #e0701f; } .fl-dif-seg.on.d5 { background: #c2352b; }
.fl-plano { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.fl-plano li { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px; align-items: center; gap: 10px; padding: 3px 0; border-top: 1px solid var(--borda-in); font-size: 14px; }
.fl-plano-tempo { text-align: right; font-weight: 700; }
@media (max-width: 560px) { .fl-plano li { grid-template-columns: 1fr; } .fl-plano-tempo { text-align: left; } }

/* Barra de desempenho deslocável (professor): arrastar, setas do teclado ou escrever o número */
.esc-ed { grid-template-columns: minmax(90px, 1fr) auto; align-items: center; }
.esc-ed .esc-ed-barra { touch-action: none; cursor: pointer; }
.esc-pega { position: absolute; top: 50%; width: 22px; height: 30px; margin: -15px 0 0 -11px; padding: 0; border-radius: 8px; border: 3px solid var(--texto); background: var(--papel); cursor: grab; box-shadow: 2px 2px 0 var(--texto); }
.esc-pega:active { cursor: grabbing; }
.esc-pega:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.esc-pega:disabled { opacity: .5; cursor: not-allowed; }
.esc.grande.esc-ed .esc-pega { height: 38px; margin-top: -19px; }
.esc-ed-num { width: 4.4em; font: inherit; font-weight: 800; font-variant-numeric: tabular-nums; text-align: center; padding: 4px 6px; border: 2px solid var(--borda-in); border-radius: 8px; background: var(--papel); color: var(--texto); }
.esc.grande .esc-ed-num { font-size: 22px; }
.esc-ed.man .esc-ed-num { border-color: var(--accent); }
.esc-ed-repor { grid-column: 1 / -1; justify-self: start; }

/* «Experimenta no Excel online»: convite e imagem do Excel por baixo do enunciado da mini-folha */
.fl-testar { border: 2px dashed var(--accent); border-radius: 12px; background: color-mix(in srgb, var(--accent) 6%, var(--papel)); padding: 10px 14px; margin: 10px 0; max-width: 900px; }
.fl-testar h3 { margin: 0 0 4px; font-size: 16px; }
.fl-testar p { margin: 0 0 8px; }
.fl-opcional { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 1px 10px; border-radius: 999px; border: 2px solid var(--accent); font-size: 13px; font-weight: 700; color: var(--texto); background: var(--papel); }
.fl-testar .fl-opcional-nota { font-size: 14px; color: var(--suave); }
.fl-figura { margin: 6px 0 0; }
.fl-figura img { display: block; max-width: 100%; height: auto; border: 1px solid var(--borda-in); border-radius: 8px; background: #fff; }
.fl-figura figcaption { font-size: 14px; color: var(--suave); margin-top: 4px; }

/* ======================================================================================================================
   Aspeto novo (2.231.0): contornos escuros, sombras duras, mais cor e botões grandes. Está ligado por defeito; a classe
   `classico` no <html> (rodapé: «Usar o aspeto clássico», `tp-aspeto` em localStorage) volta ao desenho anterior.
   ====================================================================================================================== */
:root:not(.classico) { --tinta: #1b1b3a; --sombra: #1b1b3a; --hero-novo: #1d4ed8; }
@media (prefers-color-scheme: light) { :root:not(.classico):not([data-theme="dark"]) { --fundo: #fff8ec; } }
:root:not(.classico)[data-theme="light"] { --fundo: #fff8ec; }
@media (prefers-color-scheme: dark) { :root:not(.classico):not([data-theme="light"]) { --tinta: #c9d4e0; --sombra: #000; --hero-novo: #12304f; } }
:root:not(.classico)[data-theme="dark"] { --tinta: #c9d4e0; --sombra: #000; --hero-novo: #12304f; }

/* Botões: contorno, sombra dura e um «afundar» ao carregar. */
:root:not(.classico) .btn:not(.seg-turno):not(.menu-btn) { border: 3px solid var(--tinta); border-radius: 14px; box-shadow: 3px 3px 0 var(--sombra); font-family: Lexend, "Atkinson Hyperlegible", system-ui, sans-serif; font-weight: 700; transition: transform .08s ease, box-shadow .08s ease, background .12s; }
:root:not(.classico) .btn.peq:not(.seg-turno):not(.menu-btn) { border-width: 2px; border-radius: 12px; box-shadow: 2px 2px 0 var(--sombra); }
:root:not(.classico) .btn:not(.seg-turno):not(.menu-btn):hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--sombra); }
:root:not(.classico) .btn:not(.seg-turno):not(.menu-btn):active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--sombra); }
:root:not(.classico) .btn:disabled { box-shadow: none; border-color: var(--borda-in); }
@media (prefers-reduced-motion: reduce) { :root:not(.classico) .btn { transition: none; } :root:not(.classico) .btn:hover:not(:disabled), :root:not(.classico) .btn:active:not(:disabled) { transform: none; } }

/* Cartões e blocos: moldura escura e sombra dura. */
:root:not(.classico) .cartao, :root:not(.classico) .pf-cartao, :root:not(.classico) .cartao-esc, :root:not(.classico) .modulo, :root:not(.classico) .cabeca-img { border: 2px solid var(--tinta); border-radius: 20px; box-shadow: 4px 4px 0 var(--sombra); }
:root:not(.classico) .pf-cartao { border-left: 8px solid var(--tinta); }
:root:not(.classico) .pf-cartao.pf-auto { border-left-color: var(--tinta); }
:root:not(.classico) .tema-bloco { border: 2px solid var(--tinta); border-left: 10px solid var(--ac); border-radius: 20px; box-shadow: 4px 4px 0 var(--sombra); }
:root:not(.classico) .modulo { border-top: 8px solid var(--ac); }
:root:not(.classico) .modulo:hover { box-shadow: 6px 6px 0 var(--sombra); transform: translate(-1px, -1px); }
:root:not(.classico) .admin-sec { border: 2px solid var(--tinta); border-radius: 18px; box-shadow: 4px 4px 0 var(--sombra); }

/* Cabeçalho da página inicial e da Administração. */
:root:not(.classico) .topo { border-bottom: 3px solid var(--tinta); box-shadow: none; }

/* Faixa de boas-vindas: azul vivo, formas de cor e números em caixas claras. */
:root:not(.classico) .hero { background: var(--hero-novo); border: 3px solid var(--tinta); border-radius: 28px; box-shadow: 6px 6px 0 var(--sombra); padding: 30px 28px; }
:root:not(.classico) .hero::before { content: ""; position: absolute; right: -50px; top: -60px; width: 210px; height: 210px; border-radius: 50%; background: rgba(255, 255, 255, .16); z-index: 0; }
:root:not(.classico) .hero::after { content: ""; position: absolute; right: 120px; bottom: -70px; width: 140px; height: 140px; border-radius: 50%; background: #f59e0b; z-index: 0; }
:root:not(.classico) .hero h1 { font-size: 40px; font-weight: 800; }
:root:not(.classico) .hero .k { display: inline-block; background: #fff; color: #1b1b3a; border-radius: 999px; padding: 3px 14px; opacity: 1; }
:root:not(.classico) .hero .estat-item { background: #fff; color: #1b1b3a; border: 2px solid var(--tinta); border-radius: 18px; }
:root:not(.classico) .hero .estat-item b { color: #1b1b3a; }
@media (prefers-color-scheme: dark) { :root:not(.classico):not([data-theme="light"]) .hero .estat-item { background: #1e3a5a; color: var(--on-hero); } :root:not(.classico):not([data-theme="light"]) .hero .estat-item b { color: var(--on-hero); } :root:not(.classico):not([data-theme="light"]) .hero .k { background: #e8eff5; } }
:root:not(.classico)[data-theme="dark"] .hero .estat-item { background: #1e3a5a; color: var(--on-hero); }
:root:not(.classico)[data-theme="dark"] .hero .estat-item b { color: var(--on-hero); }
:root:not(.classico)[data-theme="dark"] .hero .k { background: #e8eff5; }
:root:not(.classico) .cabeca-img-corpo .estat-item { border: 2px solid var(--tinta); }

/* Anos: pastilhas grandes, a escolhida enche-se com a cor do ano. */
:root:not(.classico) .tab-ano { border: 3px solid var(--tinta); border-radius: 16px; background: color-mix(in srgb, var(--ac) 16%, var(--papel)); color: var(--titulo); font-family: Lexend, "Atkinson Hyperlegible", system-ui, sans-serif; padding: 10px 24px; }
:root:not(.classico) .tab-ano:hover { background: color-mix(in srgb, var(--ac) 28%, var(--papel)); }
:root:not(.classico) .tab-ano.sel { background: var(--ac); color: var(--on-color); box-shadow: 4px 4px 0 var(--sombra); }

/* Barra de navegação em baixo, só no telemóvel. */
.nav-baixo { display: none; }
@media (max-width: 700px) {
  :root:not(.classico) .nav-baixo { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--papel); border-top: 3px solid var(--tinta); padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); }
  :root:not(.classico) .nav-baixo-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 48px; padding: 6px 4px; border: 2px solid var(--tinta); border-radius: 14px; background: color-mix(in srgb, var(--accent) 10%, var(--papel)); color: var(--titulo); font-family: Lexend, "Atkinson Hyperlegible", system-ui, sans-serif; font-weight: 700; font-size: 12px; cursor: pointer; }
  :root:not(.classico) .nav-baixo-item svg { width: 22px; height: 22px; }
  :root:not(.classico) .nav-baixo-item.atual { background: var(--tinta); color: var(--papel); }
  :root:not(.classico) .nav-baixo-item:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }
  :root:not(.classico).com-nav-baixo body { padding-bottom: 86px; }
  :root:not(.classico).com-nav-baixo .chf-botao { bottom: 96px; }
  :root:not(.classico).com-nav-baixo.com-nova-versao .chf-botao { bottom: 160px; }
  :root:not(.classico).com-nav-baixo .rodape-credito { padding-bottom: 8px; }
}

/* Administração: separadores com contorno e sombra, e secções com moldura. */
:root:not(.classico) .nav-admin { border: 2px solid var(--tinta); border-radius: 18px; background: var(--papel); box-shadow: 4px 4px 0 var(--sombra); padding: 6px; }
:root:not(.classico) .nav-admin .nav-btn { border-width: 2px; border-radius: 12px; font-family: Lexend, "Atkinson Hyperlegible", system-ui, sans-serif; }
:root:not(.classico) .nav-admin .nav-btn.sel { border-color: var(--tinta); box-shadow: 2px 2px 0 var(--sombra); }
:root:not(.classico) .turma-barra { border: 2px solid var(--tinta); border-left: 10px solid var(--ay, var(--accent)); border-radius: 18px; box-shadow: 4px 4px 0 var(--sombra); }

/* Interruptor do aspeto, no rodapé. */
.aspeto-bot { background: none; border: 0; padding: 0; margin-left: 6px; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.aspeto-bot:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }
@media print { .nav-baixo, .aspeto-bot { display: none !important; } }

/* Nome do aluno como ligação para a ficha (2.231.1): parece texto, sublinha ao passar o rato ou com o teclado. */
a.nome-ficha { color: inherit; font-weight: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
a.nome-ficha:hover, a.nome-ficha:focus-visible { text-decoration: underline; color: var(--accent); }

/* Aspeto novo, fase 2 (2.231.1): as páginas das atividades e as tabelas da Administração com o mesmo contorno, raio e sombra dos cartões da fase 1. */
:root:not(.classico) .caixa,
:root:not(.classico) .missao-cartao,
:root:not(.classico) .fl-criterios,
:root:not(.classico) .fl-testar,
:root:not(.classico) .painel-entrega { border: 2px solid var(--tinta); border-radius: 20px; box-shadow: 4px 4px 0 var(--sombra); }
:root:not(.classico) .etapas .tab { border: 2px solid var(--tinta); border-top: 6px solid var(--tc); border-radius: 16px; box-shadow: 3px 3px 0 var(--sombra); }
:root:not(.classico) .etapas .tab[aria-selected="true"], :root:not(.classico) .etapas .tab.ativo { box-shadow: 1px 1px 0 var(--sombra); transform: translate(2px, 2px); }
:root:not(.classico) .tabela-rolar { border: 2px solid var(--tinta); border-radius: 16px; }

/* Lista de atividades da turma: divisão «Aula de hoje» a azul claro (a aula do plano do professor) e a data em que cada atividade foi adicionada. */
.tl-ordem { margin-left: 12px; font-size: 14px; }
.tl-ordem select { font: inherit; padding: 4px 8px; border-radius: 8px; border: 2px solid var(--borda-in); background: var(--papel); color: var(--texto); }
.tl-hoje { background: #e3f1ff; color: #0b2540; border: 2px solid #1d4ed8; border-radius: 16px; padding: 10px 14px 12px; margin: 0 0 14px; }
.tl-hoje h3 { margin: 0 0 8px; font-size: 18px; display: flex; align-items: center; gap: 8px; color: #0b2540; }
.tl-hoje h3 small { background: #1d4ed8; color: #fff; border-radius: 999px; padding: 1px 9px; font-size: 13px; }
.tl-hoje .nota { color: #1e3a5f; margin: 0; }
.tl-hoje .tl-linha { background: #fff; color: #1b1b3a; }
.tl-hoje-obj { margin: 0 0 8px; font-weight: 600; }
.tl-hoje-topo { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.tl-hoje-data input { font: inherit; padding: 5px 8px; border-radius: 8px; border: 2px solid var(--borda-in); background: #fff; color: #1b1b3a; }
.tl-hoje-escolher { margin-top: 10px; border-top: 1px solid #1d4ed8; padding-top: 8px; }
.tl-hoje-escolher h4 { margin: 0 0 6px; font-size: 15px; }
.tl-hoje-filtros { display: flex; gap: 10px; flex-wrap: wrap; }
.tl-hoje-sel { display: flex; flex-direction: column; font-size: 13px; gap: 2px; }
.tl-hoje-sel select { font: inherit; padding: 5px 8px; border-radius: 8px; border: 2px solid var(--borda-in); background: #fff; color: #1b1b3a; max-width: 100%; }
.tl-hoje-opcoes { list-style: none; margin: 8px 0 0; padding: 0; max-height: 260px; overflow: auto; display: grid; gap: 4px; }
.tl-hoje-opcoes li { display: flex; gap: 8px; align-items: center; justify-content: space-between; background: #fff; color: #1b1b3a; border-radius: 10px; padding: 4px 8px; }
.tl-hoje-item { display: flex; gap: 8px; align-items: stretch; margin-bottom: 6px; }
.tl-hoje-item .tl-linha { flex: 1; margin: 0; }
.tl-adicionada { font-size: 13px; color: var(--suave); white-space: nowrap; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tl-hoje { background: #12304f; color: #e6f2ff; border-color: #7dd3fc; } :root:not([data-theme="light"]) .tl-hoje h3 { color: #e6f2ff; } :root:not([data-theme="light"]) .tl-hoje .nota { color: #bcd8f2; } :root:not([data-theme="light"]) .tl-hoje h3 small { background: #7dd3fc; color: #0b2540; } :root:not([data-theme="light"]) .tl-hoje .tl-linha { background: var(--papel); color: var(--texto); } }
:root[data-theme="dark"] .tl-hoje { background: #12304f; color: #e6f2ff; border-color: #7dd3fc; }
:root[data-theme="dark"] .tl-hoje h3 { color: #e6f2ff; }
:root[data-theme="dark"] .tl-hoje .nota { color: #bcd8f2; }
:root[data-theme="dark"] .tl-hoje h3 small { background: #7dd3fc; color: #0b2540; }
:root[data-theme="dark"] .tl-hoje .tl-linha { background: var(--papel); color: var(--texto); }
@media print { .tl-hoje { border-color: #000; background: #fff; } }

/* «Aula de hoje» na página inicial do aluno (2.231.3): a azul claro, à frente de tudo. */
.pf-hoje { background: #e3f1ff; border-color: #1d4ed8; color: #0b2540; }
.pf-hoje h2, .pf-hoje .pf-txt b { color: #0b2540; }
.pf-hoje .pf-txt small { color: #1e3a5f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pf-hoje { background: #12304f; border-color: #7dd3fc; color: #e6f2ff; } :root:not([data-theme="light"]) .pf-hoje h2, :root:not([data-theme="light"]) .pf-hoje .pf-txt b { color: #e6f2ff; } :root:not([data-theme="light"]) .pf-hoje .pf-txt small { color: #bcd8f2; } }
:root[data-theme="dark"] .pf-hoje { background: #12304f; border-color: #7dd3fc; color: #e6f2ff; }
:root[data-theme="dark"] .pf-hoje h2, :root[data-theme="dark"] .pf-hoje .pf-txt b { color: #e6f2ff; }
:root[data-theme="dark"] .pf-hoje .pf-txt small { color: #bcd8f2; }

/* Aspeto novo, fase 3 (2.232.0): a página inicial do aluno à maneira da maqueta. */
.cab-nav { display: none; }
@media (min-width: 701px) {
  :root:not(.classico) .cab-nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1; justify-content: center; }
  :root:not(.classico) .cab-nav-item { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 700; cursor: pointer; color: #1b1b3a; }
  :root:not(.classico) .cab-nav-item svg { width: 20px; height: 20px; }
  :root:not(.classico) .cab-nav-item.cn-inicio { background: #1b1b3a; color: #fff; }
  :root:not(.classico) .cab-nav-item.cn-ativ { background: #dbe6ff; }
  :root:not(.classico) .cab-nav-item.cn-desemp { background: #d3f3e6; }
  :root:not(.classico) .cab-nav-item:hover { border-color: #1b1b3a; }
  :root:not(.classico) .cab-nav-item:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }
  /* O Chat e as Novidades já existentes ganham as cores dos separadores da maqueta. */
  :root:not(.classico) .cab-pag .quem a[href="/chat/"] { background: #ffe4d2; color: #1b1b3a; }
}
@media (prefers-color-scheme: dark) { :root:not(.classico):not([data-theme="light"]) .cab-nav-item.cn-inicio { background: #e6f2ff; color: #0b2540; } :root:not(.classico):not([data-theme="light"]) .cab-nav-item.cn-ativ { background: #1e3a5f; color: #e6f2ff; } :root:not(.classico):not([data-theme="light"]) .cab-nav-item.cn-desemp { background: #0f3b2e; color: #d3f3e6; } }
:root:not(.classico)[data-theme="dark"] .cab-nav-item.cn-inicio { background: #e6f2ff; color: #0b2540; }
:root:not(.classico)[data-theme="dark"] .cab-nav-item.cn-ativ { background: #1e3a5f; color: #e6f2ff; }
:root:not(.classico)[data-theme="dark"] .cab-nav-item.cn-desemp { background: #0f3b2e; color: #d3f3e6; }

/* Bloco azul: texto e botões à esquerda, números à direita, formas de cor por trás. */
:root:not(.classico) .hero:not(.hero-entrada) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; align-items: center; }
:root:not(.classico) .hero:not(.hero-entrada) > .k, :root:not(.classico) .hero:not(.hero-entrada) > .hero-titulo, :root:not(.classico) .hero:not(.hero-entrada) > .msg-aluno, :root:not(.classico) .hero:not(.hero-entrada) > .hero-cta { grid-column: 1; }
:root:not(.classico) .hero:not(.hero-entrada) > .estat { grid-column: 2; grid-row: 1 / span 4; flex-direction: column; align-self: center; margin: 0; }
:root:not(.classico) .hero .estat-item { background: #fff; color: #1b1b3a; border: 3px solid var(--tinta); border-radius: 18px; min-width: 220px; padding: 10px 18px; }
:root:not(.classico) .hero .estat-item b { font-size: 34px; }
:root:not(.classico) .hero-quadrado { position: absolute; left: 52%; top: -10px; width: 56px; height: 56px; border-radius: 14px; background: #5fc46a; transform: rotate(18deg); z-index: 0; }
:root:not(.classico) .hero::after { content: ""; position: absolute; right: 18%; bottom: -70px; width: 150px; height: 150px; border-radius: 50%; background: #f59e0b; z-index: 0; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
:root:not(.classico) .hero-continuar { background: #f59e0b; color: #1b1b3a; }
:root:not(.classico) .hero-continuar::after { content: "→"; margin-left: 8px; font-weight: 900; }
:root:not(.classico) .hero-desempenho { background: transparent; color: #fff; border-color: #fff; box-shadow: none; }
@media (max-width: 760px) { :root:not(.classico) .hero:not(.hero-entrada) { grid-template-columns: minmax(0, 1fr); } :root:not(.classico) .hero:not(.hero-entrada) > .estat { grid-column: 1; grid-row: auto; flex-direction: row; margin-top: 12px; } :root:not(.classico) .hero .estat-item { min-width: 0; flex: 1; } :root:not(.classico) .hero-quadrado { left: auto; right: 14px; top: -14px; } }

/* «O que tens por fazer»: cartões com a faixa colorida do tema e a barra de progresso. */
.pf-tema { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 1px 10px; border-radius: 999px; background: #047857; color: #fff; margin-bottom: 2px; }
.pf-tema-1 .pf-tema { background: #6d28d9; } .pf-tema-2 .pf-tema { background: #1d4ed8; } .pf-tema-3 .pf-tema { background: #c2410c; } .pf-tema-4 .pf-tema { background: #0f766e; }
.pf-barra { display: block; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--tinta, #1b1b3a) 12%, transparent); overflow: hidden; margin-top: 4px; max-width: 320px; }
.pf-barra i { display: block; height: 100%; background: #047857; }
@media print { .cab-nav, .hero-quadrado { display: none; } }
:root:not(.classico) .hero:not(.hero-entrada) > .k { justify-self: start; align-self: end; }
:root:not(.classico) .hero .hero-desempenho { border-color: #fff; box-shadow: none; background: transparent; color: #fff; }
@media (min-width: 701px) { :root:not(.classico) .cab-pag .quem { margin-left: auto; } }

/* Aspeto novo, fase 4 (2.232.1): o mesmo contorno, raio e sombra em todo o lado (Administração, pautas, janelas, menus, formulários, tabelas). */
:root:not(.classico) input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),
:root:not(.classico) select,
:root:not(.classico) textarea { border: 2px solid var(--tinta); border-radius: 12px; }
:root:not(.classico) input:focus-visible, :root:not(.classico) select:focus-visible, :root:not(.classico) textarea:focus-visible { outline: 3px solid var(--foco); outline-offset: 1px; }
:root:not(.classico) .modal, :root:not(.classico) dialog { border: 3px solid var(--tinta); border-radius: 22px; box-shadow: 6px 6px 0 var(--sombra); }
:root:not(.classico) dialog::backdrop { background: rgba(27, 27, 58, .55); }
:root:not(.classico) .menu-painel { border: 2px solid var(--tinta); border-radius: 16px; box-shadow: 4px 4px 0 var(--sombra); }
:root:not(.classico) .menu-item { border-radius: 10px; }
:root:not(.classico) .selo, :root:not(.classico) .etq { border: 2px solid var(--tinta); }
:root:not(.classico) .tl-linha { border: 2px solid var(--tinta); border-radius: 16px; box-shadow: 3px 3px 0 var(--sombra); }
:root:not(.classico) .rec-cartao, :root:not(.classico) .au-cartao, :root:not(.classico) .dn-cartao, :root:not(.classico) .ex-cartao, :root:not(.classico) .av-cartao,
:root:not(.classico) .est-caixa, :root:not(.classico) .galeria-item { border: 2px solid var(--tinta); border-radius: 20px; box-shadow: 4px 4px 0 var(--sombra); }
:root:not(.classico) .mini-barra { border: 2px solid var(--tinta); height: 12px; border-radius: 999px; }
/* Tabelas: cabeçalho a cor de tinta, como a barra do desenho; o contorno fica na caixa. */
:root:not(.classico) table.alunos, :root:not(.classico) .pa-tab, :root:not(.classico) .av-tab { border-radius: 16px; }
:root:not(.classico) table.alunos th { background: var(--tinta); color: var(--papel); }
:root:not(.classico) .tabela-rolar { box-shadow: 4px 4px 0 var(--sombra); }
/* Cabeçalhos das páginas: linha grossa por baixo, como o cabeçalho do desenho. */
:root:not(.classico) .cab-pag, :root:not(.classico) header.aula-topo { border-bottom: 3px solid var(--tinta); padding-bottom: 12px; }
:root:not(.classico) .rodape-credito { border-top: 3px solid var(--tinta); }
:root:not(.classico) hr { border: 0; border-top: 3px solid var(--tinta); }
@media print { :root:not(.classico) .tl-linha, :root:not(.classico) .rec-cartao, :root:not(.classico) .au-cartao, :root:not(.classico) .dn-cartao, :root:not(.classico) .tabela-rolar { box-shadow: none; } }
:root:not(.classico) .est-cartao, :root:not(.classico) .est-dado, :root:not(.classico) .est-grafico, :root:not(.classico) .est-lista > * { border: 2px solid var(--tinta); border-radius: 18px; }
:root:not(.classico) .est-cartao { box-shadow: 3px 3px 0 var(--sombra); }
/* Estatísticas (2.252.1): o texto e a barra de progresso dos dados de cada atividade ficam dentro do contorno, sem tocar na linha. */
:root:not(.classico) .est-dado { padding: 8px 12px; min-width: 0; background: var(--papel); }
.est-dado small, .est-dado b { overflow-wrap: anywhere; }
.est-dado .est-prog { min-width: 0; }
.est-dado .est-prog > b { flex: 0 0 auto; font-size: 15px; }
@media (max-width: 400px) { .est-dados { gap: 8px; } :root:not(.classico) .est-dado { padding: 6px 9px; } }
:root:not(.classico) .tb-grupo { border: 2px solid var(--tinta); border-radius: 16px; }
:root:not(.classico) .seg-sub-btn { border: 2px solid var(--tinta); border-bottom-width: 2px; border-radius: 14px 14px 0 0; margin-right: 4px; }
:root:not(.classico) .pa-mencoes, :root:not(.classico) .pa-mencoes th, :root:not(.classico) .pa-mencoes td { border-color: var(--tinta); }
:root:not(.classico) table.alunos td { border-bottom-color: color-mix(in srgb, var(--tinta) 35%, transparent); }
/* Quizzes e atividades dos alunos: o mesmo contorno e sombra dos outros cartões. */
:root:not(.classico) .quiz-cartao, :root:not(.classico) .jg-cartao, :root:not(.classico) .conceito, :root:not(.classico) .etapa-cartao { border: 2px solid var(--tinta); border-radius: 22px; box-shadow: 5px 5px 0 var(--sombra); }
:root:not(.classico) .quiz-opcao, :root:not(.classico) .quiz-op { border: 2px solid var(--tinta); border-radius: 16px; }
:root:not(.classico) .pf-item a { border: 2px solid var(--tinta); border-radius: 16px; }
:root:not(.classico) .ap-sugestoes, :root:not(.classico) .avalia-faixa, :root:not(.classico) .aviso-demo { border: 2px solid var(--tinta); border-radius: 14px; }
:root:not(.classico) .tl-grupo-tit small, :root:not(.classico) .tabs-ano .n { border: 2px solid var(--tinta); }
/* «Aula de hoje»: cada atividade ocupa a largura toda e os botões passam para baixo do título quando falta espaço; «Tirar da aula» fica pequeno, ao fundo. */
.tl-hoje-item { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin-bottom: 12px; }
.tl-hoje-item .tl-linha { flex-wrap: wrap; margin: 0; }
.tl-hoje-item .tl-info { flex: 1 1 260px; }
.tl-hoje-item .tl-acoes { flex-wrap: wrap; }
.tl-hoje-item > .btn { align-self: flex-end; }
.tl-hoje-ordem { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.tl-hoje-pega { margin-right: auto; display: inline-flex; gap: 6px; align-items: center; cursor: grab; padding: 4px 8px; border-radius: 8px; color: var(--suave); touch-action: none; }
.tl-hoje-pega:focus-visible { outline: 3px solid var(--accent); }
.tl-hoje-n { font-size: 13px; font-weight: 600; color: var(--texto); }
.tl-hoje-item.arrastando { opacity: .85; position: relative; z-index: 2; }

/* Página inicial: o bloco do tema com margem interior e os cartões das atividades com contorno forte e a faixa da cor do ano (como no desenho). */
:root:not(.classico) .tema-bloco { padding: 18px 20px 20px; border-left: 2px solid var(--tinta); background: var(--papel); }
:root:not(.classico) a.ativ, :root:not(.classico) a.ativ.destaque, :root:not(.classico) a.ativ.resolvida, :root:not(.classico) a.ativ.dada { border: 2px solid var(--tinta); border-top: 8px solid var(--ac, var(--accent)); border-radius: 20px; box-shadow: 3px 3px 0 var(--sombra); }
:root:not(.classico) a.ativ:hover { border-color: var(--tinta); border-top-color: var(--ac, var(--accent)); box-shadow: 1px 1px 0 var(--sombra); transform: translate(2px, 2px); }
/* O professor com «Jogar ao vivo»: o cartão e o botão formam uma só caixa e as alturas acompanham a linha. */
:root:not(.classico) .ativ-vivo { border: 2px solid var(--tinta); border-top: 8px solid var(--ac, var(--accent)); border-radius: 20px; box-shadow: 3px 3px 0 var(--sombra); background: var(--papel); height: 100%; gap: 0; padding-bottom: 14px; }
:root:not(.classico) .ativ-vivo > a.ativ { flex: 1 1 auto; border: 0; box-shadow: none; border-radius: 18px 18px 0 0; background: transparent; }
:root:not(.classico) .ativ-vivo > a.ativ:hover { transform: none; box-shadow: none; }
:root:not(.classico) .ativ-vivo > .btn, :root:not(.classico) .ativ-vivo > .linha-a { margin: 0 16px; }
:root:not(.classico) .ativs { align-items: stretch; }
@media (max-width: 640px) { :root:not(.classico) .tema-bloco { padding: 16px 14px 16px; } }
:root:not(.classico) .como-item { border: 2px solid var(--tinta); border-radius: 18px; box-shadow: 3px 3px 0 var(--sombra); }

/* ===== Aspeto novo, fase 5 (2.233.0): a página inicial do aluno como no desenho ===== */
.cab-pag .cab-in { display: block; }
:root:not(.classico) .cab-pag { background: var(--papel); border-bottom: 3px solid var(--tinta); margin: 0; padding: 0; }
:root:not(.classico) .cab-pag .cab-in { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
:root:not(.classico) .cab-marca { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--texto); max-width: 330px; }
:root:not(.classico) .cab-marca img { height: 46px; width: auto; border-radius: 10px; }
:root:not(.classico) .cab-marca span { font-weight: 800; font-size: 17px; line-height: 1.15; }
:root:not(.classico) .cab-pag .quem { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
:root:not(.classico) .cab-nav-item { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 700; cursor: pointer; color: #1b1b3a; text-decoration: none; }
:root:not(.classico) .cab-nav-item svg { width: 20px; height: 20px; }
:root:not(.classico) .cab-nav-item.cn-chat { background: #ffe4d2; }
:root:not(.classico) .cab-nav-item.cn-nov { background: #e9ddff; }
:root:not(.classico) .cab-nav-item.cn-admin { background: transparent; border-color: var(--tinta); color: var(--texto); }
:root:not(.classico) .cab-nav-n { background: #c2410c; color: #fff; border-radius: 999px; min-width: 20px; height: 20px; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
@media (prefers-color-scheme: dark) { :root:not(.classico):not([data-theme="light"]) .cab-nav-item.cn-chat { background: #4a2a1a; color: #ffe4d2; } :root:not(.classico):not([data-theme="light"]) .cab-nav-item.cn-nov { background: #3a2a63; color: #e9ddff; } }
:root:not(.classico)[data-theme="dark"] .cab-nav-item.cn-chat { background: #4a2a1a; color: #ffe4d2; }
:root:not(.classico)[data-theme="dark"] .cab-nav-item.cn-nov { background: #3a2a63; color: #e9ddff; }
/* O avatar: um círculo com a inicial; o menu tem o nome, o modo escuro e Sair. */
:root:not(.classico) .avatar-menu > summary.menu-btn { width: 46px; height: 46px; min-width: 46px; padding: 0; border-radius: 50%; background: #c2410c; border: 3px solid var(--tinta); display: inline-flex; align-items: center; justify-content: center; }
:root:not(.classico) .avatar-menu .avatar { color: #fff; font-weight: 800; font-size: 18px; }
:root:not(.classico) .avatar-menu .menu-painel { display: grid; gap: 8px; min-width: 220px; }
/* Telemóvel: os separadores Início, Atividades e Desempenho estão na barra de baixo; no cabeçalho ficam só o Chat e as Novidades. */
@media (max-width: 700px) {
  :root:not(.classico) .cab-nav { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; order: 3; justify-content: flex-start; }
  :root:not(.classico) .cab-nav .cn-inicio, :root:not(.classico) .cab-nav .cn-ativ, :root:not(.classico) .cab-nav .cn-desemp, :root:not(.classico) .cab-nav .cn-3d { display: none; }
  :root:not(.classico) .cab-marca span { font-size: 14px; }
}

/* «O que tens por fazer»: cartões com faixa da cor do tema, dificuldade, tempo, barra e botão. */
.fam-verde { --fa: #047857; --fb: #d3f3e6; } .fam-roxo { --fa: #6d28d9; --fb: #e9ddff; } .fam-azul { --fa: #1d4ed8; --fb: #dbe6ff; }
.fam-laranja { --fa: #c2410c; --fb: #ffe4d2; } .fam-teal { --fa: #0f766e; --fb: #d5f3f0; }
/* 2.297.1: famílias só de um tema, com a cor do logótipo da app (Poster vermelho, Gamebox roxo-azulado; nunca cor-de-rosa). */
.fam-vermelho { --fa: #b91c1c; --fb: #fee2e2; } .fam-violeta { --fa: #5b34d6; --fb: #e6e0ff; }
.pf-sec { margin: 30px 0 26px; }
.pf-sec > h2 { font-size: 28px; margin: 0 0 14px; }
.pf-sec > h2 small { font-weight: 500; font-size: 16px; color: var(--suave); }
.pf-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 22px; }
.pf-card { display: flex; flex-direction: column; border: 3px solid var(--tinta); border-radius: 22px; background: var(--papel); box-shadow: 6px 6px 0 var(--fa); overflow: hidden; text-decoration: none; color: var(--texto); }
.pf-card:hover, .pf-card:focus-visible { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--fa); }
.pf-card:focus-visible { outline: 3px solid var(--foco); outline-offset: 3px; }
.pf-card-cab { background: var(--fa); color: #fff; padding: 11px 18px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.pf-card-etq { background: #fff; color: #1b1b3a; border-radius: 999px; padding: 1px 12px; font-size: 12px; font-weight: 800; }
.pf-card-corpo { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.pf-card-corpo h3 { margin: 0; font-size: 21px; line-height: 1.2; }
.pf-dif { display: flex; align-items: center; gap: 10px; font-size: 14px; flex-wrap: wrap; }
.pf-dif-seg-g { display: inline-flex; gap: 3px; }
.pf-dif-seg { width: 22px; height: 10px; border-radius: 4px; border: 2px solid var(--tinta); box-sizing: border-box; background: transparent; }
.pf-dif-seg.on { background: #047857; } .pf-dif-seg.on.d3 { background: #d99a1c; } .pf-dif-seg.on.d4, .pf-dif-seg.on.d5 { background: #ea580c; }
.pf-tempo { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--texto); }
.pf-tempo svg { width: 18px; height: 18px; flex: none; }
.pf-card .pf-barra { display: block; height: 14px; max-width: none; border: 2px solid var(--tinta); border-radius: 999px; background: color-mix(in srgb, var(--fa) 18%, var(--papel)); overflow: hidden; margin: 2px 0 4px; }
.pf-card .pf-barra i { background: var(--fa); }
.pf-cta { margin-top: auto; background: var(--fa); color: #fff; text-align: center; border: 3px solid var(--tinta); border-radius: 14px; padding: 12px; font-weight: 800; font-size: 17px; box-shadow: 0 3px 0 var(--tinta); }

/* «Escolhe o teu caminho»: os temas como cartões coloridos (carregar abre a lista de atividades). */
:root:not(.classico) .temas-lista.em-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.tema-card { --tc: #1b1b3a; background: var(--fb); color: var(--tc); border: 3px solid var(--tinta); border-radius: 26px; box-shadow: 6px 6px 0 var(--sombra); padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.tema-card.aberto { grid-column: 1 / -1; }
.tema-card-cab { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; padding: 0; }
.tema-card-cab:focus-visible { outline: 3px solid var(--foco); outline-offset: 4px; border-radius: 12px; }
.tema-card-icone { width: 64px; height: 64px; flex: none; border-radius: 18px; background: var(--fa); color: #fff; display: grid; place-items: center; border: 3px solid var(--tinta); }
.tema-card-icone svg { width: 30px; height: 30px; }
.tema-card-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tema-card-txt h3 { margin: 0; font-size: 26px; line-height: 1.15; color: inherit; }
.tema-card-txt small { font-size: 16px; }
.tema-card-seta { font-size: 24px; transition: transform .15s; }
.tema-card.aberto .tema-card-seta { transform: rotate(180deg); }
.tema-barra { display: block; height: 16px; border-radius: 999px; border: 2px solid var(--tinta); background: #fff; overflow: hidden; }
.tema-barra i { display: block; height: 100%; background: var(--fa); }
.tema-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tema-chip { border: 2px solid var(--tinta); border-radius: 999px; padding: 2px 16px; background: #fff; font-size: 15px; color: #1b1b3a; }
.tema-card-lista { display: none; }
.tema-card.aberto .tema-card-lista { display: block; }
.tema-card .tema-saber, .tema-card .nota { color: var(--tc); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tema-card { --tc: var(--texto); background: color-mix(in srgb, var(--fa) 22%, var(--papel)); } :root:not([data-theme="light"]) .tema-barra, :root:not([data-theme="light"]) .tema-chip { background: var(--papel); color: var(--texto); } }
:root[data-theme="dark"] .tema-card { --tc: var(--texto); background: color-mix(in srgb, var(--fa) 22%, var(--papel)); }
:root[data-theme="dark"] .tema-barra, :root[data-theme="dark"] .tema-chip { background: var(--papel); color: var(--texto); }
@media (max-width: 760px) { :root:not(.classico) .temas-lista.em-cards { grid-template-columns: minmax(0, 1fr); } .tema-card { padding: 18px 16px; } }

/* «O meu desempenho»: o texto à esquerda e a barra à direita. */
@media (min-width: 761px) {
  :root:not(.classico) .cartao-esc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); column-gap: 36px; align-items: center; }
  :root:not(.classico) .cartao-esc > h2, :root:not(.classico) .cartao-esc > p, :root:not(.classico) .cartao-esc > ol { grid-column: 1; }
  :root:not(.classico) .cartao-esc > .esc, :root:not(.classico) .cartao-esc > .esc-so-barra, :root:not(.classico) .cartao-esc > div { grid-column: 2; grid-row: 1 / span 4; }
}
@media print { .cab-pag { border-bottom: 1px solid #000; } .pf-card, .tema-card { box-shadow: none; } }

/* Capturas do Excel online: lado a lado e com altura limitada, para se verem inteiras sem ocupar o ecrã todo. */
.fl-testar { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.fl-testar > h3, .fl-testar > p { flex: 1 1 100%; margin: 0; }
.fl-figura { flex: 0 1 auto; max-width: 100%; margin: 0; }
.fl-figura img, .passo-fig img { display: block; max-height: 380px; width: auto; max-width: 100%; border: 2px solid var(--tinta, var(--borda)); border-radius: 12px; }
.fl-figura figcaption { max-width: 420px; font-size: 13px; }

/* ===== Aspeto novo, fase 6 (2.233.0): a página da atividade (folha de cálculo) como no desenho ===== */
:root:not(.classico) .topo.topo-novo { background: var(--fa, #047857); color: #fff; border-bottom: 3px solid var(--tinta); position: static; }
.topo-novo .topo-in { display: flex; align-items: center; gap: 18px; max-width: 1180px; margin: 0 auto; padding: 14px 20px; flex-wrap: wrap; }
.topo-voltar { background: #fff !important; color: #1b1b3a !important; border: 3px solid var(--tinta) !important; flex: none; }
.topo-titulo { flex: 1 1 260px; min-width: 0; }
.topo-titulo small { display: block; font-weight: 700; font-size: 14px; color: #fff; }
.topo-titulo h1 { margin: 0; font-size: clamp(22px, 3vw, 30px); line-height: 1.15; color: #fff; }
.topo-novo .xp-bloco { flex: 0 1 300px; min-width: 220px; margin-left: auto; }
.topo-novo .xp-linha { display: flex; justify-content: space-between; gap: 10px; color: #fff; font-size: 14px; }
.topo-novo .xp-linha b, .topo-novo .xp-linha .nivel { color: #fff; background: transparent; padding: 0; }
.topo-novo .barra { height: 16px; border: 3px solid var(--tinta); border-radius: 999px; background: #fff; overflow: hidden; margin-top: 4px; }
.topo-novo .barra > div { height: 100%; background: #f59e0b; }
.topo-novo .quem { color: #fff; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fam-verde.topo-novo, .fam-roxo.topo-novo, .fam-azul.topo-novo, .fam-laranja.topo-novo, .fam-teal.topo-novo, .fam-vermelho.topo-novo, .fam-violeta.topo-novo { background: var(--fa); }

main.fl { max-width: 1180px; margin: 0 auto; padding: 24px 20px 40px; }
:root:not(.classico) .fl-criterios { padding: 0; overflow: hidden; max-width: none; margin: 0 0 22px; background: var(--papel); box-shadow: 6px 6px 0 var(--sombra); }
.fl-crit-cab { background: #f59e0b; color: #1b1b3a; display: flex; align-items: center; gap: 10px; padding: 14px 24px; border-bottom: 3px solid var(--tinta); }
.fl-crit-cab svg { width: 26px; height: 26px; flex: none; }
.fl-crit-cab h2 { margin: 0; font-size: 24px; color: #1b1b3a; }
.fl-crit-corpo { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; padding: 22px 24px; }
.fl-crit-corpo ul { margin: 0; padding-left: 22px; display: grid; gap: 10px; align-content: start; }
.fl-crit-tit { margin: 0 0 8px; font-weight: 800; font-size: 14px; }
.fl-pontos-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.fl-chip { display: flex; flex-direction: column; min-width: 112px; padding: 6px 14px; border: 3px solid var(--tinta); border-radius: 14px; background: #d3f3e6; color: #1b1b3a; }
.fl-chip small { font-size: 12px; } .fl-chip b { font-size: 20px; }
.fl-chip-1 { background: #e9f5c8; } .fl-chip-2 { background: #fff0c2; } .fl-chip-3 { background: #ffd9c4; }
.fl-crit-lado .fl-resumo { display: grid; gap: 10px; margin-top: 16px; }
.fl-resumo svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }
@media (max-width: 900px) { .fl-crit-corpo { grid-template-columns: minmax(0, 1fr); } }

/* As partes como cartões: feita (verde com visto), a atual (laranja), por fazer (branco). */
:root:not(.classico) .jg-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 0 0 22px; }
:root:not(.classico) .jg-tab.jg-tab-larga { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border: 3px solid var(--tinta); border-radius: 18px; background: var(--papel); color: var(--texto); cursor: pointer; font: inherit; }
.jg-tab-n { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 3px solid var(--tinta); display: grid; place-items: center; font-weight: 800; }
.jg-tab-n svg { width: 18px; height: 18px; }
.jg-tab-txt { display: flex; flex-direction: column; min-width: 0; }
.jg-tab-txt b { font-size: 16px; }
.jg-tab-meta { font-size: 13px; opacity: .85; }
:root:not(.classico) .jg-tab.ok { background: #d3f3e6; color: #1b1b3a; }
:root:not(.classico) .jg-tab.ok .jg-tab-n { background: #047857; border-color: #047857; color: #fff; }
:root:not(.classico) .jg-tab.sel { background: #f59e0b; color: #1b1b3a; box-shadow: 4px 4px 0 var(--sombra); }
:root:not(.classico) .jg-tab.sel .jg-tab-n { background: #1b1b3a; border-color: #1b1b3a; color: #fff; }

/* O exercício em duas colunas: o enunciado à esquerda e a folha com a barra de fórmulas à direita. */
.fl-ex2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 24px; align-items: start; }
.fl-col-a, .fl-col-b { border: 3px solid var(--tinta); border-radius: 24px; background: var(--papel); box-shadow: 6px 6px 0 var(--sombra); }
.fl-col-a { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.fl-col-a .jg-tipo { color: #047857; font-weight: 700; font-size: 14px; margin: 0; }
.fl-col-a h2 { margin: 0; font-size: 26px; }
.fl-col-b { overflow: hidden; }
.fl-col-b > * { margin-left: 0; margin-right: 0; }
.fl-col-b .fl-barra { background: #d3f3e6; color: #1b1b3a; border-bottom: 3px solid var(--tinta); padding: 12px 16px; margin: 0; display: flex; align-items: center; gap: 12px; }
.fl-col-b .fl-nome { border: 3px solid var(--tinta); border-radius: 10px; background: #fff; padding: 2px 12px; font-family: var(--mono, ui-monospace, monospace); font-weight: 700; min-width: 64px; text-align: center; }
.fl-col-b .fl-fx { color: #047857; font-style: italic; font-weight: 800; }
.fl-col-b .fl-barra input { flex: 1; min-width: 0; border: 0 !important; background: transparent; font-family: var(--mono, ui-monospace, monospace); color: #1b1b3a; }
.fl-col-b .fl-rolar { margin: 0; }
.fl-col-b > .nota, .fl-col-b > details, .fl-col-b > .fl-regras { margin: 12px 16px; }
.fl-verificar { background: #047857; color: #fff; }
.fl-vale { background: #fff; color: #1b1b3a; border-radius: 999px; padding: 0 10px; font-size: 13px; margin-left: 8px; }
.fl-col-a .fl-objetivos { list-style: none; padding: 0; display: grid; gap: 8px; }
@media (max-width: 980px) { .fl-ex2 { grid-template-columns: minmax(0, 1fr); } }
@media print { .topo-novo { background: #fff !important; color: #000; } .fl-col-a, .fl-col-b, .fl-criterios { box-shadow: none; } }
:root:not(.classico) .fl-ex.fl-ex2 { border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 0; margin: 0; }
.fl-col-a h2 { color: var(--texto); }
.fl-col-b .fl-rolar { overflow-x: auto; }
.fl-col-b .fl-grelha { width: 100%; }

/* Folha de cálculo: ajuda de utilização (2.234.0) */
.fl-como { margin: 8px 0; background: var(--papel, #fff); border: 2px solid var(--tinta, #1b1b3a); border-radius: 14px; padding: 8px 14px; }
.fl-como summary { cursor: pointer; font-weight: 700; }
.fl-como ol { margin: 8px 0 4px; padding-left: 20px; display: grid; gap: 6px; }

/* Folha de cálculo: células a preencher, balão de ajuda e modo escuro (2.235.0) */
.fl-rolar { position: relative; }
.fl-grelha td.alvo { outline: 2px dashed #1d4ed8; outline-offset: -2px; background-color: #eaf1ff; }
.fl-grelha td.alvo-regra { outline: 2px dotted #b45309; outline-offset: -2px; background-color: #fff4dc; }
.fl-grelha td.alvo.sel, .fl-grelha td.alvo-regra.sel { outline-style: solid; }
.fl-grelha td.intervalo, .fl-grelha td.alvo.intervalo, .fl-grelha td.alvo-regra.intervalo, .fl-grelha td.fixa.intervalo { background-color: #b9d4ff; color: #0b1f4d; box-shadow: inset 0 0 0 1px #1d4ed8; }
.fl-grelha td.intervalo.sel { background-color: #fff; box-shadow: none; }
.fl-alvos { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 8px 0 0; color: var(--texto); }
.fl-alvo-amostra { display: inline-block; width: 16px; height: 16px; border: 2px dashed #7db0ff; background: #eaf1ff; border-radius: 3px; vertical-align: -3px; }
.fl-alvo-amostra.regra { border: 2px dotted #e0a23a; background: #fff4dc; }
.fl-balao { position: absolute; z-index: 5; max-width: min(320px, 90%); display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 3px solid #1b1b3a; border-radius: 12px; background: #fff3c4; color: #1b1b3a; font: 600 14px/1.35 "Atkinson Hyperlegible", system-ui, sans-serif; box-shadow: 3px 3px 0 #1b1b3a; }
.fl-balao::after { content: ""; position: absolute; left: 22px; bottom: -11px; width: 16px; height: 16px; background: #fff3c4; border-right: 3px solid #1b1b3a; border-bottom: 3px solid #1b1b3a; transform: rotate(45deg); }
.fl-balao.abaixo::after { bottom: auto; top: -11px; border: 0; border-left: 3px solid #1b1b3a; border-top: 3px solid #1b1b3a; }
.fl-balao-x { border: 0; background: transparent; color: #1b1b3a; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; }
/* modo escuro: os cartões coloridos mantêm texto escuro e as caixas usam o papel do tema */
.fl-como { background: var(--papel); color: var(--texto); }
.fl-como summary { color: var(--texto); }
.fl-chip small { color: #3d3d5c; }
.fl-chip { color: #1b1b3a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .fl-alvo-amostra { border-color: #7db0ff; }
}

/* Folha de cálculo: passo a passo das formativas (2.236.0) */
.fl-passos { margin: 10px 0; background: var(--papel); color: var(--texto); border: 3px solid #047857; border-radius: 14px; padding: 8px 14px; }
.fl-passos summary { cursor: pointer; font-weight: 800; color: var(--texto); }
.fl-passos ol { margin: 8px 0 4px; padding-left: 22px; display: grid; gap: 8px; }
.fl-passos li::marker { font-weight: 800; color: #047857; }

/* Folha de cálculo: exemplo antes de começar e painel da direita fixo ao deslizar (2.237.0) */
.fl-exemplo { background: #fff3c4; color: #1b1b3a; border: 3px solid #1b1b3a; border-radius: 14px; padding: 10px 14px; box-shadow: 3px 3px 0 #1b1b3a; }
.fl-exemplo b { display: block; margin-bottom: 4px; }
.fl-exemplo p { margin: 0; line-height: 1.45; }
@media (min-width: 981px) {
  .fl-ex2 { align-items: start; }
  .fl-col-b { position: sticky; top: 12px; align-self: start; max-height: calc(100vh - 24px); overflow-y: auto; }
}

/* Avisos da avaliação (2.238.0): lembrete de 10 em 10 minutos e aviso de nota nas atividades vão para o topo, sem tapar o trabalho */
.aviso-lembrete, .aviso-avaliacao.no-topo, .aviso-resolucao.no-topo { position: fixed; top: 12px; bottom: auto; left: 50%; transform: translateX(-50%); z-index: 240; width: min(520px, calc(100vw - 24px)); padding: 12px 16px; border-radius: 14px; border: 3px solid var(--tinta, #1b1b3a); background: var(--papel); color: var(--texto); box-shadow: 4px 4px 0 var(--tinta, #1b1b3a); }
.aviso-lembrete-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.aviso-lembrete-x { border: 0; background: transparent; color: var(--texto); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.aviso-lembrete .esc { margin: 4px 0; }
@media print { .aviso-lembrete { display: none; } }

/* Modelador 3D no cabeçalho da página inicial (2.242.0). */
:root:not(.classico) .cab-nav-item.cn-3d { background: #fde8c4; }
:root:not(.classico)[data-theme="dark"] .cab-nav-item.cn-3d { background: #4a3510; color: #fde8c4; }
@media (prefers-color-scheme: dark) { :root:not(.classico):not([data-theme="light"]) .cab-nav-item.cn-3d { background: #4a3510; color: #fde8c4; } }
/* Construtor de sítios Web no cabeçalho da página inicial (2.266.0). */
:root:not(.classico) .cab-nav-item.cn-sitios { background: #d3f0df; }
:root:not(.classico)[data-theme="dark"] .cab-nav-item.cn-sitios { background: #123d29; color: #d3f0df; }
@media (prefers-color-scheme: dark) { :root:not(.classico):not([data-theme="light"]) .cab-nav-item.cn-sitios { background: #123d29; color: #d3f0df; } }

/* Lista da turma (2.243.0): aula atual, aula anterior, outras aulas e atribuídas sem aula, por cima das atividades por tema. */
.tl-aula { margin: 0 0 14px; }
.tl-anterior { border: 2px solid var(--tinta, #1b1b3a); border-radius: 16px; padding: 12px 14px; background: var(--papel, #fff); }
.tl-anterior h3, .tl-temas-tit { margin: 0 0 8px; font-size: 1.05rem; }
.tl-anterior h3 small { font-weight: 400; margin-left: 8px; color: var(--muted, #555); }
.tl-temas-tit { margin-top: 18px; }
.tl-aula-antiga { margin: 8px 0 12px; }
.tl-aula-antiga h4 { margin: 0 0 6px; font-size: 0.98rem; }
.tl-aula-antiga h4 small { font-weight: 400; color: var(--muted, #555); }
.tl-linha.tl-curta { padding-top: 6px; padding-bottom: 6px; opacity: 0.85; }
.tl-linha.tl-curta .tl-titulo { font-weight: 700; }
.selo.aula { background: transparent; border: 1.5px solid var(--g-azul); color: var(--g-azul); }

/* Página do aluno (2.244.0): aula anterior e outras aulas, por baixo da aula atual. */
.pf-outras > summary { cursor: pointer; font-size: 1.05rem; }
.pf-outras .pf-outra { margin-top: 12px; }
.pf-outras .pf-outra h3 { margin: 0 0 6px; font-size: 1rem; }
.pf-anterior h2 small, .pf-outras h3 small { font-weight: 400; color: var(--muted, #555); }

/* Telemóvel (2.244.1): o menu «online» ocupa a largura do ecrã em vez de sair pela esquerda, e o chat abre por cima da página, em ecrã inteiro. */
@media (max-width: 700px) {
  .on-menu .menu-painel { position: fixed; left: 8px; right: 8px; top: 64px; min-width: 0; max-width: none; max-height: calc(100dvh - 90px); z-index: 960; }
  .chat-janela { left: 0; right: 0; top: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100dvh; border-radius: 0; border: 0; overflow: hidden; z-index: 970; }
  .chat-janela iframe { max-width: 100vw; }
}

/* Separadores da turma (Atividades, Resultados, Alunos, Mais) no aspeto novo (2.246.0): ficavam colados à linha de baixo da faixa
   da turma, com o contorno cortado. Passam a ter espaço por baixo e os quatro cantos redondos. */
:root:not(.classico) .turma-barra { padding-bottom: 12px; }
:root:not(.classico) .seg-sub { gap: 6px; padding: 2px 4px 5px 2px; }
:root:not(.classico) .seg-sub .seg-sub-btn { flex: 1 1 auto; }
@media (max-width: 640px) { :root:not(.classico) .seg-sub { gap: 4px; } :root:not(.classico) .seg-sub .seg-sub-btn { padding: 8px 6px; font-size: 13px; } }
:root:not(.classico) .seg-sub .seg-sub-btn { border-radius: 12px; }

/* Criador de apps (2.250.0): ajuda, explicação e critérios como nas fichas de Excel. */
.ap-criterios { margin: 12px 0 18px; }
.ap-meta { margin: 2px 0 6px; }
.ap-passos, .ap-como { max-width: 960px; }
.ap-ajuda-cartao { margin: 10px 0; max-width: 960px; padding: 10px 14px; border: 2px solid var(--tinta, #1b1b3a); border-radius: 14px; background: #fff7e0; color: #1b1b3a; box-shadow: 3px 3px 0 var(--sombra, rgba(0,0,0,.2)); }
.ap-ajuda-cartao p { margin: 6px 0 8px; }
.ap-expl { margin: 10px 0; max-width: 960px; padding: 10px 14px; border: 2px solid #047857; border-radius: 14px; background: #e7f8ef; color: #12372a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ap-ajuda-cartao { background: #3a2f12; color: #fbecc4; } :root:not([data-theme="light"]) .ap-expl { background: #0f2e22; color: #c9f2dd; } }
:root[data-theme="dark"] .ap-ajuda-cartao { background: #3a2f12; color: #fbecc4; }
:root[data-theme="dark"] .ap-expl { background: #0f2e22; color: #c9f2dd; }
@media (max-width: 700px) { .ap-criterios .fl-crit-corpo { grid-template-columns: 1fr; gap: 14px; } }

/* Apps (2.251.0): desafios fechados, pontos, selos e demonstração animada. */
.py-nav .tab.fechada { opacity: .55; cursor: not-allowed; }
.py-nav .tab.fechada small::before { content: "Fechado · "; font-weight: 700; }
.ap-pts { margin-left: auto; }
.ap-pts-ok { color: #047857; }
:root[data-theme="dark"] .ap-pts-ok { color: #6ee7b7; }
.ap-ajuda-custo { font-weight: 700; }
.ap-seguinte { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; padding: 10px 14px; max-width: 960px; border: 2px solid #047857; border-radius: 14px; background: #e7f8ef; color: #12372a; }
:root[data-theme="dark"] .ap-seguinte { background: #0f2e22; color: #c9f2dd; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ap-seguinte { background: #0f2e22; color: #c9f2dd; } :root:not([data-theme="light"]) .ap-pts-ok { color: #6ee7b7; } }
.ap-selos-sec { margin: 0 0 16px; max-width: 960px; }
.ap-selos-sec h2 { font-size: 18px; margin: 0 0 4px; }
.ap-nota-media { margin: 0 0 6px; font-weight: 700; }
.ap-selos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ap-selo { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 2px solid var(--borda-in, #ccd); border-radius: 999px; background: var(--papel); color: var(--texto); opacity: .7; }
.ap-selo.ganho { opacity: 1; border-color: var(--tinta, #1b1b3a); box-shadow: 2px 2px 0 var(--sombra, rgba(0,0,0,.2)); }
.ap-selo-txt { display: flex; flex-direction: column; line-height: 1.15; }
.ap-selo-txt small { font-size: 13px; }
.ap-selo-med { width: 34px; height: 34px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; color: #1b1b3a; background: #e5e7eb; border: 3px dashed #9ca3af; }
.ap-selo.ganho .ap-selo-med, .ap-selo-med.grande { border-style: solid; border-color: #1b1b3a; }
.ap-selo.ganho .m0, .ap-selo-med.grande.m0 { background: #fde68a; } .ap-selo.ganho .m1, .ap-selo-med.grande.m1 { background: #a7f3d0; }
.ap-selo.ganho .m2, .ap-selo-med.grande.m2 { background: #bfdbfe; } .ap-selo.ganho .m3, .ap-selo-med.grande.m3 { background: #ddd6fe; }
.ap-selo.ganho .m4, .ap-selo-med.grande.m4 { background: #fecaca; } .ap-selo.ganho .m5, .ap-selo-med.grande.m5 { background: #fed7aa; }
.ap-selo-med.grande { width: 96px; height: 96px; font-size: 40px; border-width: 4px; }
.ap-selo-novo { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; background: rgba(15, 23, 42, .55); }
.ap-selo-novo-caixa { background: var(--papel); color: var(--texto); border: 3px solid var(--tinta, #1b1b3a); border-radius: 24px; padding: 24px 32px; text-align: center; box-shadow: 6px 6px 0 var(--sombra, rgba(0,0,0,.25)); display: grid; justify-items: center; gap: 6px; }
.ap-selo-novo-caixa h2 { margin: 6px 0 0; }
.ap-selo-novo-caixa p { margin: 0 0 8px; font-size: 20px; font-weight: 700; }
@media (prefers-reduced-motion: no-preference) { .ap-selo-novo-caixa { animation: apSelo .5s ease-out; } @keyframes apSelo { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } } }
.ap-demo-cursor { position: fixed; z-index: 9100; left: 50%; top: 50%; width: 26px; height: 26px; pointer-events: none; background: #1b1b3a; clip-path: polygon(0 0, 0 78%, 22% 60%, 38% 96%, 52% 90%, 37% 55%, 66% 55%); filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 1px #fff); }
@media (prefers-reduced-motion: no-preference) { .ap-demo-cursor { transition: left .7s ease-in-out, top .7s ease-in-out; } .ap-demo-balao { transition: left .7s ease-in-out, top .7s ease-in-out; } }
.ap-demo-cursor.clique::after { content: ""; position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%; border: 3px solid #f59e0b; animation: apOnda .4s ease-out; }
@keyframes apOnda { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.ap-demo-balao { position: fixed; z-index: 9100; left: 50%; top: 50%; max-width: 280px; padding: 6px 10px; border-radius: 10px; background: #1b1b3a; color: #fff; font-size: 14px; font-weight: 700; pointer-events: none; }
.ap-demo { position: fixed; z-index: 9050; right: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px)); max-height: 60vh; overflow: auto; padding: 12px 16px; background: var(--papel); color: var(--texto); border: 3px solid var(--tinta, #1b1b3a); border-radius: 18px; box-shadow: 5px 5px 0 var(--sombra, rgba(0,0,0,.25)); }
.ap-demo-cab { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.ap-demo h3 { margin: 6px 0 4px; font-size: 18px; }
.ap-demo p { margin: 0 0 8px; }
html.ap-em-demo .ap-ide { pointer-events: none; }

/* Galeria das apps (2.251.0) */
.gal-barra { margin: 8px 0 16px; align-items: center; }
.gal-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.gal-app { margin: 0; padding: 10px; border: 2px solid var(--borda-in, #ccd); border-radius: 18px; background: var(--papel); display: grid; gap: 8px; justify-items: center; }
.gal-app.ok { border-color: #047857; }
.gal-app figcaption { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 6px; }
.gal-app .selo.ok { background: #d1fae5; color: #064e3b; }
.gal-ap { position: fixed; inset: 0; z-index: 9000; background: var(--fundo, #fff8ec); color: var(--texto); display: grid; grid-template-rows: auto 1fr auto; justify-items: center; padding: 16px; gap: 10px; }
.gal-ap-cab { display: flex; gap: 16px; align-items: baseline; }
.gal-ap-cab h2 { margin: 0; font-size: 32px; }
.gal-ap-tel { display: grid; place-items: center; transform-origin: top center; }
@media (min-height: 800px) { .gal-ap-tel { transform: scale(1.25); } }

/* Painel da turma para o projetor (2.251.0) */
.pt-numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 12px 0 20px; }
.pt-cartao-num { display: grid; justify-items: center; padding: 16px; border: 3px solid var(--tinta, #1b1b3a); border-radius: 20px; background: var(--papel); color: var(--texto); box-shadow: 4px 4px 0 var(--sombra, rgba(0,0,0,.2)); }
.pt-num { font-size: clamp(36px, 6vw, 72px); line-height: 1; font-variant-numeric: tabular-nums; }
.pt-cartao-num span { font-size: 18px; font-weight: 700; }
.pt-grelha { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 900px) { .pt-grelha { grid-template-columns: 1fr; } }
.pt-sec { margin: 0 0 18px; padding: 14px 18px; border: 2px solid var(--borda-in, #ccd); border-radius: 18px; background: var(--papel); color: var(--texto); }
.pt-sec h2 { margin: 0 0 10px; font-size: 22px; }
.pt-sec-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pt-ativs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pt-ativ-cab { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 17px; }
.pt-barra { height: 14px; border-radius: 7px; background: color-mix(in srgb, var(--texto) 12%, transparent); overflow: hidden; margin: 4px 0; }
.pt-barra-in { display: block; height: 100%; width: 0; border-radius: 7px; background: #059669; }
@media (prefers-reduced-motion: no-preference) { .pt-barra-in { transition: width 1.2s ease-out; } }
.pt-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 17px; }
.pt-feed li { padding: 6px 10px; border-left: 4px solid #f59e0b; background: color-mix(in srgb, #f59e0b 10%, transparent); border-radius: 6px; }
.pt-feed-quem { font-weight: 800; }
.pt-feed-quando { color: var(--texto-2, var(--texto)); }
.pt-selos-ativ { margin-bottom: 10px; }
.pt-alunos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 18px; }
.pt-alunos li { display: grid; grid-template-columns: minmax(0, 7em) 1fr auto; align-items: center; gap: 8px; }
.pt-alunos.anon li { grid-template-columns: 1fr auto; }
.pt-al-nome { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-al-pts { font-variant-numeric: tabular-nums; font-size: 14px; }
.pt-alunos .pt-barra-in { background: #2563eb; }

/* Apresentação: app num telemóvel e fluxogramas (2.251.1). Prefixo apr- para não chocar com o criador de apps (.ap-*). */
.apr-app-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 24cqw 1fr; gap: 3cqw; align-items: start; }
.apr-tel { width: 22cqw; border: .6cqw solid #1b1b3a; border-radius: 2.6cqw; background: #1b1b3a; overflow: hidden; box-shadow: .6cqw .6cqw 0 rgba(0,0,0,.15); }
.apr-tel-barra { background: #1b1b3a; color: #fff; font-size: 1.3cqw; padding: .4cqw 1cqw; font-weight: 700; }
.apr-tel-ecra { position: relative; background: #fff; min-height: 26cqw; padding: 1.4cqw; display: flex; flex-direction: column; gap: 1cqw; border-radius: 0 0 1.8cqw 1.8cqw; }
.apr-comp { position: relative; font-size: 1.7cqw; border-radius: .8cqw; padding: .7cqw 1cqw; text-align: center; transition: background .4s, transform .2s; color: #1b1b3a; }
.apr-comp-etiqueta { font-weight: 700; font-size: 2.2cqw; min-height: 3cqw; }
.apr-comp-botao { background: #1890ff; color: #fff; font-weight: 700; }
.apr-comp-caixa { border: .2cqw solid #9ca3af; text-align: left; background: #fff; }
.apr-comp-caixa .vazio { color: #6b7280; }
.apr-comp-imagem { font-size: 4cqw; padding: 0; }
.apr-comp-interruptor, .apr-comp-slider { display: flex; align-items: center; gap: 1cqw; text-align: left; }
.apr-int { width: 4cqw; height: 2.2cqw; border-radius: 2cqw; background: #d1d5db; position: relative; flex: none; }
.apr-int::after { content: ""; position: absolute; left: .3cqw; top: .3cqw; width: 1.6cqw; height: 1.6cqw; border-radius: 50%; background: #fff; transition: left .3s; }
.apr-int.lig { background: #52c41a; } .apr-int.lig::after { left: 2.1cqw; }
.apr-sld { flex: 1; height: .8cqw; background: #e5e7eb; border-radius: .4cqw; overflow: hidden; } .apr-sld-b { display: block; height: 100%; width: 50%; background: #1890ff; transition: width .4s; }
.apr-comp.destaque { outline: .4cqw solid #f59e0b; outline-offset: .3cqw; }
.apr-comp.tocado { transform: scale(.95); }
.apr-toque { position: absolute; left: 50%; top: 50%; width: 3cqw; height: 3cqw; margin: -1.5cqw 0 0 -1.5cqw; border-radius: 50%; border: .4cqw solid #f59e0b; animation: aprToque 1s ease-out infinite; }
@keyframes aprToque { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .apr-toque { animation: none; } }
.apr-toast { position: absolute; left: 1cqw; right: 1cqw; bottom: 1.2cqw; background: #1b1b3a; color: #fff; font-size: 1.5cqw; padding: .7cqw 1cqw; border-radius: .8cqw; text-align: center; }
.apr-blocos { display: flex; flex-direction: column; gap: .5cqw; min-width: 0; }
.apr-blocos-tit { margin: 0; font-size: 1.3cqw; font-weight: 800; letter-spacing: .1cqw; color: var(--ap-suave); }
.apr-bloco { font-size: 1.75cqw; padding: .6cqw 1.2cqw; border-radius: .7cqw; border-left: 1cqw solid; background: #f3f4f6; color: #1b1b3a; transition: background .3s; }
.apr-bloco.niv-1 { margin-left: 3cqw; } .apr-bloco.niv-2 { margin-left: 6cqw; }
.apr-bloco.cat-evento { border-color: #d99a00; background: #fff4d6; } .apr-bloco.cat-comp { border-color: #4c97ff; background: #e6f0ff; }
.apr-bloco.cat-var { border-color: #ff8c1a; background: #ffeedd; } .apr-bloco.cat-conta { border-color: #59c059; background: #e6f6e6; }
.apr-bloco.cat-decisao { border-color: #b7791f; background: #fdf3dd; } .apr-bloco.cat-telemovel { border-color: #b05fe0; background: #f3e8fc; }
.apr-bloco.destaque { outline: .35cqw solid #f59e0b; box-shadow: 0 0 0 .6cqw rgba(245, 158, 11, .2); }
.apr-bloco.erro { outline: .35cqw solid #c2410c; background: #fde2d8; }
.apr-bloco.erro::after { content: "  ← erro"; color: #b42318; font-weight: 800; }
.apr-vars { margin-top: .8cqw; display: flex; flex-wrap: wrap; gap: .8cqw; align-items: center; font-size: 1.7cqw; }
.apr-vars-tit { font-weight: 700; color: var(--ap-suave); }
.apr-var { padding: .3cqw 1cqw; border: .25cqw dashed #ff8c1a; border-radius: .7cqw; background: #fff7ed; font-weight: 800; font-family: "JetBrains Mono", monospace; }
.apr-app-lado { margin: 0; padding-left: 2.4cqw; font-size: 2cqw; display: flex; flex-direction: column; gap: 1cqw; }
.apr-app-txt { margin: 0; font-size: 2cqw; font-weight: 700; color: var(--ap-verde-esc); min-height: 2.8cqw; }
.apr-fl { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: .3cqw; }
.apr-fl-no { padding: .7cqw 2cqw; border: .3cqw solid #1d6fb8; background: #eef5fc; border-radius: .8cqw; font-size: 1.8cqw; text-align: center; max-width: 40cqw; }
.apr-fl-inicio, .apr-fl-fim { border-radius: 4cqw; border-color: #107c41; background: #e9f6ee; font-weight: 700; }
.apr-fl-seta { width: .3cqw; height: 1.6cqw; background: #6b7280; position: relative; }
.apr-fl-seta::after { content: ""; position: absolute; left: -.6cqw; bottom: -.4cqw; border: .75cqw solid transparent; border-top-color: #6b7280; border-bottom: 0; }
.apr-fl-dec { display: flex; flex-direction: column; align-items: center; gap: .8cqw; }
.apr-fl-losango { width: 24cqw; height: 8cqw; display: grid; place-items: center; background: #fde9b8; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); font-size: 1.6cqw; font-weight: 700; text-align: center; padding: 0 5cqw; line-height: 1.15; }
.apr-fl-ramos { display: grid; grid-template-columns: 1fr 1fr; gap: 3cqw; }
.apr-fl-ramo { display: flex; flex-direction: column; align-items: center; gap: .6cqw; }
.apr-fl-ramo > b { font-size: 1.6cqw; padding: .1cqw 1cqw; border-radius: 1cqw; }
.apr-fl-ramo.sim > b { background: #d1fae5; color: #065f46; } .apr-fl-ramo.nao > b { background: #fde2d8; color: #9a330a; }

/* Apps (2.251.2): o meu algoritmo, ajudantes, 3 antes de mim, rever na apresentação */
.ap-alg { margin: 10px 0; max-width: 960px; padding: 10px 14px; border: 2px solid var(--tinta, #1b1b3a); border-radius: 14px; background: var(--papel); color: var(--texto); }
.ap-alg h3 { margin: 0 0 4px; font-size: 17px; }
.ap-alg textarea { width: 100%; font-size: 16px; }
.ap-alg-conta { display: block; margin-top: 4px; font-size: 14px; font-weight: 700; color: #9a330a; }
.ap-alg-conta.ok { color: #047857; }
.ap-alg.por-fazer { border-color: #b45309; background: #fef3c7; color: #1b1b3a; box-shadow: 0 0 0 3px #fbbf24; }
.ap-alg-passo { display: none; margin: 0 0 6px; }
.ap-alg.por-fazer .ap-alg-passo { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #92400e; color: #fff; font-size: 14px; font-weight: 700; }
.ap-alg.por-fazer textarea { border: 2px solid #b45309; background: #fff; color: #1b1b3a; }
:root[data-theme="dark"] .ap-alg.por-fazer { background: #422006; color: #fef3c7; border-color: #f59e0b; }
:root[data-theme="dark"] .ap-alg.por-fazer .ap-alg-conta { color: #fde68a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ap-alg.por-fazer { background: #422006; color: #fef3c7; border-color: #f59e0b; } }
:root[data-theme="dark"] .ap-alg-conta { color: #fdba74; } :root[data-theme="dark"] .ap-alg-conta.ok { color: #6ee7b7; }
.ap-ajudantes { margin: 8px 0 0; }
.ap-rever-linha { margin: 4px 0 8px; font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ap-tres-lista { list-style: none; padding: 0; display: grid; gap: 10px; font-size: 17px; }
.ap-tres-lista input { width: 20px; height: 20px; vertical-align: -4px; }

/* 2.251.5: escondidas bem à vista na lista da turma (também dentro da «Aula atual» e no tema escuro) e o quadro «O que os alunos veem agora». */
:root .tl .tl-linha.est-oculta { background: var(--desativado); color: var(--desativado-txt); border-style: dashed; box-shadow: none; }
:root .tl .tl-linha.est-oculta .tl-titulo { color: var(--desativado-txt); }
:root .tl .tl-linha.est-oculta .selo.esc { background: var(--papel); color: var(--texto); border: 2px dashed var(--desativado-txt); font-weight: 700; }
.tl-veem { margin: 10px 0 14px; padding: 10px 14px; border: 2px solid #047857; border-radius: 16px; background: color-mix(in srgb, #047857 7%, var(--papel)); color: var(--texto); }
.tl-veem > summary { cursor: pointer; font-weight: 800; font-size: 17px; }
.tl-veem > summary small { font-weight: 600; color: var(--suave); }
.tl-veem-lista { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; gap: 6px; }
.tl-veem-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 6px 10px; border-radius: 10px; background: var(--papel); border: 1px solid var(--borda); }
.tl-veem-tit { font-weight: 700; flex: 1 1 240px; color: var(--texto); }
.tl-veem-est { font-size: 13px; color: var(--suave); }
.tl-veem-item.bloq .tl-veem-est { color: var(--texto); font-weight: 700; }
.tl-veem-acoes { display: flex; gap: 6px; }

/* 2.251.6: «Todas as atividades» por tema e, dentro de cada tema, por tipo (formativas, avaliação, fichas de trabalho). */
.tl-tema-sec { margin: 16px 0 8px; padding: 8px 12px 4px; border: 2px solid var(--borda); border-radius: 16px; }
.tl-tema-sec-tit { margin: 0 0 6px; font-size: 18px; color: var(--texto); }
.tl-tema-sec-tit small { font-weight: 600; color: var(--suave); font-size: 14px; }
.tl-tipo > summary { border-left: 6px solid var(--tt, var(--accent)); padding-left: 8px; }
.tl-tipo-formativa { --tt: #047857; }
.tl-tipo-avaliacao { --tt: #b45309; }
.tl-tipo-normal { --tt: #1d4ed8; }

/* 2.251.7: o painel da demonstração das apps muda de canto para não tapar o cursor nem o sítio para onde vai. */
.ap-demo.esq { right: auto; left: 16px; }
.ap-demo.cima { bottom: auto; top: 70px; }
.ap-demo { width: min(380px, calc(100vw - 32px)); }
.ap-demo-cab { display: flex; align-items: center; gap: 8px; }
.ap-demo-cab .ap-demo-cont { margin-left: auto; }
.ap-demo.min > :not(.ap-demo-cab) { display: none; }
/* A demonstração põe a área das apps à vista por baixo do cabeçalho fixo. */
.ap-ide-env { scroll-margin-top: 76px; }

/* 2.251.8: ordem das turmas (cartão Turmas da Administração). */
.ot-caixa { margin: 10px 0; padding: 10px 14px; border: 2px dashed var(--borda); border-radius: 14px; }
.ot-lista { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; max-width: 460px; }
.ot-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--papel); border: 1px solid var(--borda); }
.ot-nome { flex: 1; }
.ot-pega { cursor: grab; padding: 2px 8px; color: var(--suave); touch-action: none; }
.ot-pega:focus-visible { outline: 3px solid var(--accent); }
.ot-item.arrastando { opacity: .85; position: relative; z-index: 2; }

/* Chat do professor embutido no telemóvel (2.251.11): dentro da janela (iframe) também passa a uma só coluna, com as turmas e os alunos
   numa fila que desliza para o lado e a conversa por baixo, com a largura toda. A classe chat-estreito (admin-chat.js, pela largura da
   página de fora) cobre o Safari do iPhone, que às vezes dá ao iframe a largura do conteúdo e não deixa a media query funcionar. */
@media (max-width: 720px) { html:has(body.chat-embutido) { overflow-x: hidden; } }
.chat-embutido.chat-estreito, .chat-embutido.chat-estreito #raiz { max-width: 100vw; overflow-x: hidden; }
@media (max-width: 720px) {
  .chat-embutido .ch-prof { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 6px; }
  .chat-embutido .ch-salas-prof { flex-direction: column; min-width: 0; overflow: visible; }
  .chat-embutido .ch-salas-din { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; max-height: none; padding-bottom: 4px; }
  .chat-embutido .ch-salas-din > * { flex-shrink: 0; }
  .chat-embutido .ch-salas-din .ch-sala { white-space: nowrap; }
  .chat-embutido .ch-salas-din .ch-grupo, .chat-embutido .ch-salas-din .nota { display: none; }
  .chat-embutido .ch-prof-cartao, .chat-embutido .ch-principal { min-width: 0; }
  .chat-embutido .ch-lista-prof .ch-msg { max-width: 100%; }
  .chat-embutido #raiz { overflow-x: hidden; padding: 6px; }
}
.chat-embutido.chat-estreito .ch-prof { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 6px; }
.chat-embutido.chat-estreito .ch-salas-prof { flex-direction: column; min-width: 0; overflow: visible; }
.chat-embutido.chat-estreito .ch-salas-din { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; max-height: none; padding-bottom: 4px; }
.chat-embutido.chat-estreito .ch-salas-din > * { flex-shrink: 0; }
.chat-embutido.chat-estreito .ch-salas-din .ch-sala { white-space: nowrap; }
.chat-embutido.chat-estreito .ch-salas-din .ch-grupo, .chat-embutido.chat-estreito .ch-salas-din .nota { display: none; }
.chat-embutido.chat-estreito .ch-prof-cartao, .chat-embutido.chat-estreito .ch-principal { min-width: 0; }
.chat-embutido.chat-estreito .ch-lista-prof .ch-msg { max-width: 100%; }

/* ---------- Criador de apps: página do aluno (2.255.0) ----------
   A coluna do desafio (objetivo, «O que fazer», o que o Verificar confere, com vistos ao vivo, e os botões) fica ao lado do criador,
   sempre à vista no computador; por cima, um mapa compacto dos desafios agrupados pelos selos. Ícones de traço em vez de emoji. */
html.pagina-apps main#main { max-width: min(1560px, calc(100vw - 32px)); }
.ap-sobre { margin: 4px 0 12px; border: 2px solid var(--borda, #d5dee5); border-radius: 14px; padding: 8px 14px; background: var(--papel); }
.ap-sobre > summary { cursor: pointer; font-weight: 800; }
.ap-sobre[open] > summary { margin-bottom: 8px; }
.ap-sobre .sub { margin: 0 0 10px; }
/* mapa dos desafios */
.ap-mapa { margin: 0 0 14px; padding: 10px 14px 12px; border: 2px solid var(--tinta, #1b1b3a); border-radius: 16px; background: var(--papel); }
.ap-mapa-cab { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 8px; }
.ap-mapa-cab h2 { margin: 0; font-size: 1.05rem; }
.ap-nota-media { font-weight: 700; color: var(--suave); font-size: 0.92rem; }
.ap-m-grupos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.ap-m-grupo { display: grid; gap: 5px; }
.ap-m-nome { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 0.86rem; }
.ap-m-nome small { color: var(--suave); font-weight: 600; }
.ap-m-nome .ap-selo-med { width: 22px; height: 22px; border-width: 2px; font-size: 0.75rem; }
.ap-m-grupo.ganho .ap-selo-med { border-style: solid; border-color: #1b1b3a; }
.ap-m-grupo.ganho .m0 { background: #fde68a; } .ap-m-grupo.ganho .m1 { background: #a7f3d0; } .ap-m-grupo.ganho .m2 { background: #bfdbfe; }
.ap-m-grupo.ganho .m3 { background: #ddd6fe; } .ap-m-grupo.ganho .m4 { background: #fecaca; } .ap-m-grupo.ganho .m5 { background: #fed7aa; }
.ap-m-bts { display: flex; flex-wrap: wrap; gap: 5px; }
.ap-m-bt { appearance: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--borda-in, #7b8a96); background: var(--papel); color: var(--texto); font: inherit; font-weight: 800; font-size: 0.9rem; cursor: pointer; display: grid; place-items: center; padding: 0; }
.ap-m-bt:hover:not(.fechada), .ap-m-bt:focus-visible { border-color: var(--tinta, #1b1b3a); }
.ap-m-bt.feita { background: #11633a; border-color: #11633a; color: #fff; }
.ap-m-bt.atual { outline: 3px solid #e0b400; outline-offset: 2px; border-color: var(--tinta, #1b1b3a); }
.ap-m-bt.atual:not(.feita) { background: #fff8d6; color: #3a2f00; }
.ap-m-bt.fechada { border-style: dashed; opacity: 0.5; cursor: not-allowed; }
/* coluna do desafio e criador */
.ap-ex { margin-top: 0; }
.ap-lay { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.ap-d-col { display: grid; gap: 10px; align-content: start; min-width: 0; padding: 14px; border: 2px solid var(--tinta, #1b1b3a); border-radius: 16px; background: var(--papel); color: var(--texto); }
.ap-d-cri { min-width: 0; }
@media (min-width: 1180px) {
  .ap-lay { grid-template-columns: clamp(300px, 26vw, 380px) minmax(0, 1fr); }
  .ap-d-col { position: sticky; top: 74px; max-height: calc(100vh - 86px); overflow: auto; scrollbar-width: thin; }
  .ap-ide[data-aba="ecra"] { grid-template-columns: minmax(170px, 230px) 300px minmax(220px, 1fr); }
  .ap-ide[data-aba="blocos"] { grid-template-columns: minmax(0, 1fr) 300px; }
}
.ap-d-kick { margin: 0; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--suave); }
.ap-d-kick .opc { text-transform: none; }
.ap-d-tit { margin: 0; font-size: 1.35rem; line-height: 1.2; }
.ap-d-col .ap-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 0.86rem; }
.ap-d-obj { margin: 0; font-size: 1.02rem; line-height: 1.45; padding: 8px 12px; border-radius: 12px; background: var(--item-bg); border-left: 5px solid var(--accent); }
.ap-aprende { border: 2px solid var(--borda, #d5dee5); border-radius: 12px; padding: 6px 12px; }
.ap-aprende > summary { cursor: pointer; font-weight: 800; }
.ap-aprende .py-licao { margin: 6px 0 2px; padding: 0; border: 0; background: transparent; }
.ap-d-col .fl-passos { margin: 0; padding: 8px 12px; }
.ap-d-col .fl-passos ol { gap: 6px; font-size: 0.95rem; line-height: 1.4; }
.ap-confere { border: 2px solid var(--borda, #d5dee5); border-radius: 12px; padding: 8px 12px; }
.ap-confere.tudo { border-color: #11633a; }
.ap-confere h3 { margin: 0 0 6px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--suave); }
.ap-confere ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ap-cf-item { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; align-items: center; font-size: 0.92rem; line-height: 1.3; }
.ap-cf-visto { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--borda-in, #7b8a96); display: grid; place-items: center; }
.ap-cf-item.ok .ap-cf-visto { background: #11633a; border-color: #11633a; }
.ap-cf-item.ok .ap-cf-visto::before { content: "✓"; color: #fff; font-weight: 800; font-size: 0.72rem; line-height: 1; }
.ap-cf-item.ok .ap-cf-txt { color: var(--ok-txt, #11633a); font-weight: 700; }
.ap-cf-oc { margin: 6px 0 0; font-size: 0.82rem; color: var(--suave); }
.ap-d-acoes { display: grid; gap: 8px; }
.ap-d-acoes > .btn, .ap-d-acoes2 .btn { margin: 0; justify-content: center; }
.ap-d-acoes > .btn.verificar { width: 100%; background: #047857; border-color: #047857; color: #fff; font-size: 1.05rem; }
.ap-d-acoes2 { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-d-acoes2 .btn { flex: 1 1 120px; }
@keyframes ap-pronto { 0%, 100% { box-shadow: 0 0 0 0 rgba(4, 120, 87, 0.55); } 50% { box-shadow: 0 0 0 8px rgba(4, 120, 87, 0); } }
.ap-d-acoes > .btn.verificar.ap-pronto { animation: ap-pronto 1.4s ease-out 3; }
@media (prefers-reduced-motion: reduce) { .ap-d-acoes > .btn.verificar.ap-pronto { animation: none; outline: 3px solid #e0b400; outline-offset: 2px; } }
.ap-d-col .py-testes, .ap-d-col .py-dicas { margin: 0; }
.ap-d-col .py-testes:empty, .ap-d-col .py-dicas:empty { display: none; }
.ap-mais { border-top: 2px dashed var(--borda, #d5dee5); padding-top: 8px; }
.ap-mais > summary { cursor: pointer; font-weight: 700; color: var(--suave); }
.ap-mais-in { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ap-mais-in .btn { margin: 0; }
.ap-d-col .ap-como { margin: 0; }
.ap-d-col .ap-rever-linha { margin: 6px 0 0; }
/* barra de cima do criador (antes .ap-topo, que é também o nome de uma classe das apresentações) */
.ap-ide-topo { display: flex; align-items: stretch; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; border-bottom: 2px solid #d9deea; margin: 0 0 12px; }
.ap-aba-g { display: inline-flex; align-items: center; gap: 8px; }
.ap-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* ícones dos componentes, cada tipo com a sua cor */
.ap-cartao-ic, .ap-no-ic { display: grid; place-items: center; border-radius: 10px; color: var(--cti, #3f5fe0); background: color-mix(in srgb, var(--cti, #3f5fe0) 14%, #fff); }
.ap-cartao-ic { width: 40px; height: 40px; }
.ap-cartao-ic .ap-ico { width: 26px; height: 26px; }
.ap-no-ic { width: 26px; height: 26px; border-radius: 7px; flex: none; }
.ap-no-ic .ap-ico { width: 17px; height: 17px; }
.ap-no.sel .ap-no-ic { background: #fff; }
[data-tipo="etiqueta"] { --cti: #7b3fc4; } [data-tipo="botao"] { --cti: #1f6fd0; } [data-tipo="caixa"] { --cti: #0f766e; }
[data-tipo="imagem"] { --cti: #c2410c; } [data-tipo="interruptor"] { --cti: #15803d; } [data-tipo="slider"] { --cti: #b45309; } [data-tipo="ecra"] { --cti: #1d2433; }
.ap-cartao { gap: 6px; }
.ap-ex { scroll-margin-top: 70px; }

/* ---------- Resoluções de programação enviadas aos alunos (2.256.0) ---------- */
/* página do professor (admin-exercicios.html) */
.ex-lista-prog { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.ex-lista-prog li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border: 2px solid var(--borda, #d5dee5); border-radius: 12px; background: var(--papel); }
.ex-prog-lig { font-weight: 800; font-size: 1.05rem; margin-right: auto; }
.ex-cab .ex-enviar { margin-left: auto; }
.ex-res { margin: 10px 0; border: 2px solid var(--borda, #d5dee5); border-radius: 12px; padding: 8px 12px; }
.ex-res > summary, .res-prof > summary { cursor: pointer; font-weight: 800; }
.ex-res-app { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 10px; }
.ex-res-tel { display: grid; gap: 8px; justify-items: center; }
.ex-res-bl { min-width: 0; margin-top: 8px; }
.ex-res-bl .bl-col-paleta, .ex-res-bl .bl-lixo { display: none; }
.ex-res-bl .bl-cols { min-height: 220px; }
@media (max-width: 760px) { .ex-res-app { grid-template-columns: minmax(0, 1fr); } }
@media print { .ex-res-app { grid-template-columns: minmax(0, 1fr); } }
/* janela de envio */
.rs-dlg { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 32px); border: 3px solid var(--tinta, #1b1b3a); border-radius: 18px; padding: 16px 20px; background: var(--papel); color: var(--texto); }
.rs-dlg h2 { margin: 0 0 6px; }
.rs-dlg h3 { margin: 14px 0 6px; font-size: 1rem; }
.rs-lista { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; max-height: 220px; overflow: auto; }
.rs-lista li { padding: 3px 6px; border-radius: 8px; }
.rs-lista li:nth-child(odd) { background: var(--item-bg); }
.rs-ja { display: block; margin-left: 26px; color: var(--suave); }
.rs-modo { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 4px; }
.rs-partes { list-style: none; margin: 4px 0; padding: 6px 8px; border: 2px solid var(--borda, #d5dee5); border-radius: 10px; max-height: 240px; overflow: auto; display: grid; gap: 2px; }
.rs-partes.cod code { white-space: pre; font: 0.88rem "JetBrains Mono", Consolas, monospace; }
.rs-n { display: inline-block; min-width: 2.2em; text-align: right; margin-right: 8px; color: var(--suave); font: 0.8rem "JetBrains Mono", Consolas, monospace; }
.rs-estado { margin: 10px 0 0; font-weight: 700; min-height: 1.2em; }
.rs-estado.ok { color: var(--ok-txt, #11633a); } .rs-estado.erro { color: var(--erro-txt, #b3261e); }
.rs-bot { margin-top: 12px; }
/* página do aluno */
.res-prof { margin: 10px 0; padding: 8px 14px; border: 3px solid #7b3fc4; border-radius: 14px; background: color-mix(in srgb, #7b3fc4 7%, var(--papel)); color: var(--texto); }
.res-prof > summary small { font-weight: 600; color: var(--suave); }
.res-nota { margin: 6px 0; font-size: 0.92rem; }
.res-cod { counter-reset: none; padding: 8px 0; }
.res-linha, .res-salto { display: flex; white-space: pre; }
.res-n { flex: none; width: 2.6em; padding-right: 10px; text-align: right; color: #8a94a6; user-select: none; }
.res-salto { color: #8a94a6; }
.res-prof .ex-res-bl .bl-col-paleta, .res-prof .ex-res-bl .bl-lixo { display: none; }
.tab.tem-res, .ap-m-bt.tem-res, .jg-tab.tem-res { position: relative; }
.tab.tem-res::after, .ap-m-bt.tem-res::after, .jg-tab.tem-res::after { content: ""; position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; background: #7b3fc4; border: 2px solid var(--papel); }
.res-prof .ex-res-app { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.res-prof .ap-tel { width: 200px; height: 360px; border-width: 8px; border-radius: 26px; }
.res-prof .ex-res-bl { width: 100%; }
.res-prof .ex-res-bl .bl-cols { min-height: 160px; }

/* ---------- Programação com apoio (2.257.0): passo a passo, caixa «Agora» e encaixe guiado ---------- */
.gu-caixa { margin: 0 0 10px; padding: 10px 14px; border: 3px solid #b45309; border-radius: 14px; background: #fff7e0; color: #3b2a07; }
.gu-caixa .gu-tit { margin: 0; font-weight: 800; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: #92400e; }
.gu-caixa .gu-txt { margin: 4px 0 8px; font-size: 1.2rem; font-weight: 700; line-height: 1.35; }
.gu-caixa.gu-pronto { border-color: #15803d; background: #ecfdf3; color: #0f3d22; }
.gu-caixa.gu-pronto .gu-tit { color: #166534; }
.gu-bts { display: flex; flex-wrap: wrap; gap: 8px; }
.gu-bts:empty { display: none; }
.gu-passos { margin: 10px 0; padding: 12px 16px; border: 3px solid var(--tinta, #1b1b3a); border-radius: 16px; background: var(--papel); color: var(--texto); }
.gu-passo-n { margin: 0; font-weight: 800; font-size: .9rem; color: var(--suave); }
.gu-passo { margin: 6px 0 10px; font-size: 1.25rem; font-weight: 700; line-height: 1.4; }
.gu-certo, .gu-quase { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; padding: 12px 16px; border-radius: 14px; font-size: 1.15rem; }
.gu-certo { border: 3px solid #15803d; background: #ecfdf3; color: #0f3d22; }
.gu-quase { border: 3px solid #1d4ed8; background: #eff6ff; color: #172554; }
.bl-guia-pal { border-radius: 8px; box-shadow: 0 0 0 4px #f59e0b, 0 0 0 9px rgba(245, 158, 11, .35); }
.bl-sombra { margin: 2px 0; border-radius: 8px; outline: 3px dashed #b45309; outline-offset: 2px; opacity: .55; pointer-events: none; }
.bl-sombra * { pointer-events: none; }
.bl-sombra.solta { position: absolute; }
.bl-in .bl-sombra { display: inline-block; margin: 0 2px; }
.bl-guia-campo { outline: 4px solid #f59e0b !important; outline-offset: 1px; }
.bl-guia-tirar { outline: 4px dashed #b91c1c; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .bl-sombra { transition: opacity .2s; } }
html.guia .bl-editor .bl { font-size: 1.08rem; }
html.guia .bl-paleta .bl-modelo { margin-bottom: 8px; }
html.guia .bl-ver-py, html.guia .avalia-faixa, html.guia .xp-linha > b, html.guia .ap-meta, html.guia .ap-sobre, html.guia .ap-pts, html.guia .ap-nota-media { display: none !important; }
html.guia .py-enunciado, html.guia .ap-d-obj { font-size: 1.2rem; font-weight: 600; }
.ap-blocos-guia { display: flex; flex-direction: column; min-width: 0; }
/* página do professor */
.apo-explica { margin: 10px 0 14px; padding: 10px 16px; border: 2px solid var(--borda, #d5dee5); border-radius: 14px; background: var(--item-bg); }
.apo-explica ul { margin: 6px 0 0; padding-left: 20px; }
.apo-tab td, .apo-tab th { vertical-align: middle; }
.apo-tab th small { font-weight: 500; color: var(--suave); }
.apo-linha.com td:first-child { font-weight: 700; }
.apo-cel { text-align: center; }
.apo-at input { width: 22px; height: 22px; }

/* ---------- Ajuda para os professores (2.258.0) ---------- */
.nav-admin .sep-ajuda { --nh: #4f46e5; }
.aj-aviso { margin: 10px 0; padding: 8px 14px; border-radius: 12px; background: var(--item-bg); font-weight: 700; }
.aj-novo { margin: 12px 0; padding: 10px 16px; border: 2px solid var(--borda, #d5dee5); border-radius: 14px; background: var(--papel); }
.aj-novo h2, .aj-grupo h2 { margin: 4px 0 8px; font-size: 1.15rem; }
.aj-novo ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.aj-ver { font-weight: 700; white-space: nowrap; }
.aj-procura { display: flex; align-items: center; gap: 8px; margin: 14px 0; font-weight: 700; }
.aj-procura input { flex: 1; max-width: 420px; }
.aj-grupo { margin: 16px 0; }
.aj-guia { margin: 8px 0; padding: 8px 16px; border: 2px solid var(--borda, #d5dee5); border-radius: 14px; background: var(--papel); scroll-margin-top: 12px; }
.aj-guia > summary { cursor: pointer; padding: 4px 0; font-weight: 800; font-size: 1.05rem; }
.aj-guia[open] > summary { margin-bottom: 4px; }
.aj-resumo { margin: 4px 0 8px; color: var(--suave); }
.aj-passos { margin: 0 0 10px; padding-left: 22px; display: grid; gap: 6px; line-height: 1.45; }
.aj-fig { margin: 8px 0; }
.aj-fig img { display: block; max-width: 100%; height: auto; border: 2px solid var(--borda, #d5dee5); border-radius: 10px; }
.aj-fig figcaption { margin-top: 4px; font-size: .9rem; color: var(--suave); }
.aj-pags code { font-size: .85rem; }

/* Ajudas sempre à vista (2.262.0). Nas apps, a coluna do desafio desliza: o Verificar e as três ajudas ficam presos ao fundo dela. */
@media (min-width: 1180px) {
  .ap-d-col > .ap-d-acoes { position: sticky; bottom: -14px; z-index: 3; margin: 0 -14px; padding: 10px 14px 14px; background: var(--papel); border-top: 2px solid var(--borda, #d5dee5); }
}
.ap-d-acoes2 .btn { flex: 1 1 96px; padding: 8px 6px; font-size: 0.92rem; line-height: 1.15; }
/* Blocos: «Preciso de mais ajuda», «Ver como se faz» e a demonstração */
.py-barra .bl-pts { margin-left: auto; font-size: 0.9rem; }
html.bl-em-demo .bl-envolvente { pointer-events: none; }
html.bl-em-demo .bl-envolvente .bl-area { outline: 3px dashed #f59e0b; outline-offset: 2px; }
.bl-demo .linha-a { display: flex; flex-wrap: wrap; gap: 6px; }
/* Atividades com apoio: etiqueta só nas páginas do professor (2.262.0) */
.etq.etq-apoio, .pg-apoio { background: #ede9fe; color: #4c1d95; }
.pg-apoio { display: inline-block; border-radius: 8px; padding: 0 6px; font-weight: 700; }
.prof-apoio { margin: 8px auto; max-width: 892px; box-sizing: border-box; padding: 8px 12px; border: 2px dashed #6d28d9; border-radius: 12px; background: #ede9fe; color: #2e1065; font-size: 0.95rem; }
:root[data-theme="dark"] .etq.etq-apoio, :root[data-theme="dark"] .pg-apoio, :root[data-theme="dark"] .prof-apoio { background: #2e1065; color: #ede9fe; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .etq.etq-apoio, :root:not([data-theme="light"]) .pg-apoio, :root:not([data-theme="light"]) .prof-apoio { background: #2e1065; color: #ede9fe; } }

/* Cores dos temas e dos tipos em Atividades (2.263.0): tom claro com texto escuro do mesmo tom; o escolhido fica com o tom forte
   e letras claras, também com o rato por cima (antes o texto ficava escuro sobre escuro). Pares de cores com 4,5:1 ou mais. */
.cc-azul { --cc-bg: #dbe6ff; --cc-tx: #1e3a8a; --cc-forte: #b9cdfc; }
.cc-verde { --cc-bg: #d3f3e6; --cc-tx: #065f46; --cc-forte: #a7e3c9; }
.cc-roxo { --cc-bg: #ece3ff; --cc-tx: #4c1d95; --cc-forte: #d2bdfc; }
.cc-laranja { --cc-bg: #ffe6d1; --cc-tx: #7c2d12; --cc-forte: #fcc999; }
.cc-rosa { --cc-bg: #fde2ef; --cc-tx: #831843; --cc-forte: #f9bdd8; }
.cc-teal { --cc-bg: #ccf2f0; --cc-tx: #115e59; --cc-forte: #99e2dd; }
.cc-amarelo { --cc-bg: #fdf1c3; --cc-tx: #713f12; --cc-forte: #f6dd84; }
.cc-cinza { --cc-bg: #eef1f6; --cc-tx: #1f2937; --cc-forte: #d5dbe5; }
.cc-terra { --cc-bg: #efe4d8; --cc-tx: #5c3b1e; --cc-forte: #dcc5ab; }
:root[data-theme="dark"] .cc-azul { --cc-bg: #1c2c52; --cc-tx: #dbe6ff; --cc-forte: #2a4078; }
:root[data-theme="dark"] .cc-verde { --cc-bg: #0f3b2e; --cc-tx: #c9f2df; --cc-forte: #175a46; }
:root[data-theme="dark"] .cc-roxo { --cc-bg: #2e1a55; --cc-tx: #e6dcff; --cc-forte: #432a78; }
:root[data-theme="dark"] .cc-laranja { --cc-bg: #4a2410; --cc-tx: #ffe0c7; --cc-forte: #6b3519; }
:root[data-theme="dark"] .cc-rosa { --cc-bg: #4a1530; --cc-tx: #fddbeb; --cc-forte: #6b2147; }
:root[data-theme="dark"] .cc-teal { --cc-bg: #0f3a38; --cc-tx: #c8f1ee; --cc-forte: #175855; }
:root[data-theme="dark"] .cc-amarelo { --cc-bg: #3f300b; --cc-tx: #fbeebf; --cc-forte: #5c4612; }
:root[data-theme="dark"] .cc-cinza { --cc-bg: #263040; --cc-tx: #e5e9f0; --cc-forte: #364257; }
:root[data-theme="dark"] .cc-terra { --cc-bg: #3a2a1c; --cc-tx: #f0e2d2; --cc-forte: #56402b; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cc-azul { --cc-bg: #1c2c52; --cc-tx: #dbe6ff; --cc-forte: #2a4078; }
  :root:not([data-theme="light"]) .cc-verde { --cc-bg: #0f3b2e; --cc-tx: #c9f2df; --cc-forte: #175a46; }
  :root:not([data-theme="light"]) .cc-roxo { --cc-bg: #2e1a55; --cc-tx: #e6dcff; --cc-forte: #432a78; }
  :root:not([data-theme="light"]) .cc-laranja { --cc-bg: #4a2410; --cc-tx: #ffe0c7; --cc-forte: #6b3519; }
  :root:not([data-theme="light"]) .cc-rosa { --cc-bg: #4a1530; --cc-tx: #fddbeb; --cc-forte: #6b2147; }
  :root:not([data-theme="light"]) .cc-teal { --cc-bg: #0f3a38; --cc-tx: #c8f1ee; --cc-forte: #175855; }
  :root:not([data-theme="light"]) .cc-amarelo { --cc-bg: #3f300b; --cc-tx: #fbeebf; --cc-forte: #5c4612; }
  :root:not([data-theme="light"]) .cc-cinza { --cc-bg: #263040; --cc-tx: #e5e9f0; --cc-forte: #364257; }
  :root:not([data-theme="light"]) .cc-terra { --cc-bg: #3a2a1c; --cc-tx: #f0e2d2; --cc-forte: #56402b; }
}
:root .grupo-temas .btn.tema-chip, :root .grupo-temas .btn.tipo-chip { background: var(--cc-bg); color: var(--cc-tx); }
:root .grupo-temas .btn.tema-chip:hover:not(:disabled), :root .grupo-temas .btn.tipo-chip:hover:not(:disabled),
:root .grupo-temas .btn.tema-chip:focus-visible, :root .grupo-temas .btn.tipo-chip:focus-visible { background: var(--cc-forte); color: var(--cc-tx); }
:root .grupo-temas .btn.tema-chip[aria-pressed="true"], :root .grupo-temas .btn.tipo-chip[aria-pressed="true"],
:root .grupo-temas .btn.tema-chip[aria-pressed="true"]:hover:not(:disabled), :root .grupo-temas .btn.tipo-chip[aria-pressed="true"]:hover:not(:disabled) { background: var(--cc-tx); color: var(--cc-bg); }
:root .etqs .etq.cc { background: var(--cc-bg); color: var(--cc-tx); }

/* 2.265.0: «Aula extra», as atividades que ficam fora das aulas planeadas (por exemplo, a Folha de cálculo do 9.º ano). */
.etq.etq-extra { background: transparent; color: var(--texto); border: 2px dashed var(--suave); }
.tl-tipo-extra { --tt: var(--suave); }
.tl-tipo-extra > summary { border-left-style: dashed; }
.tl-extra-nota { margin: 4px 0 8px; }
.grupo-temas .aula-chip { white-space: nowrap; }
:root .grupo-temas .btn.aula-chip { background: var(--cc-bg); color: var(--cc-tx); }
:root .grupo-temas .btn.aula-chip:hover:not(:disabled), :root .grupo-temas .btn.aula-chip:focus-visible { background: var(--cc-forte); color: var(--cc-tx); }
:root .grupo-temas .btn.aula-chip[aria-pressed="true"], :root .grupo-temas .btn.aula-chip[aria-pressed="true"]:hover:not(:disabled) { background: var(--cc-tx); color: var(--cc-bg); }

/* 2.268.0: filtros de Atividades com uma cor por filtro (Tema laranja, Aulas rosa, Tipo amarelo; nenhuma igual às dos anos).
   A opção escolhida fica com a cor viva (--cc-viva); as outras ficam no tom claro. No telemóvel cada filtro ocupa uma só linha, que desliza. */
.cc-laranja { --cc-viva: #c2410c; --cc-viva-tx: #ffffff; }
.cc-rosa { --cc-viva: #be185d; --cc-viva-tx: #ffffff; }
.cc-amarelo { --cc-viva: #facc15; --cc-viva-tx: #1f1300; }
:root[data-theme="dark"] .cc-laranja { --cc-viva: #fb923c; --cc-viva-tx: #1f0f04; }
:root[data-theme="dark"] .cc-rosa { --cc-viva: #f472b6; --cc-viva-tx: #2b0a1a; }
:root[data-theme="dark"] .cc-amarelo { --cc-viva: #facc15; --cc-viva-tx: #1f1300; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cc-laranja { --cc-viva: #fb923c; --cc-viva-tx: #1f0f04; }
  :root:not([data-theme="light"]) .cc-rosa { --cc-viva: #f472b6; --cc-viva-tx: #2b0a1a; }
  :root:not([data-theme="light"]) .cc-amarelo { --cc-viva: #facc15; --cc-viva-tx: #1f1300; }
}
:root .grupo-temas .btn.tema-chip[aria-pressed="true"], :root .grupo-temas .btn.tipo-chip[aria-pressed="true"], :root .grupo-temas .btn.aula-chip[aria-pressed="true"],
:root .grupo-temas .btn.tema-chip[aria-pressed="true"]:hover:not(:disabled), :root .grupo-temas .btn.tipo-chip[aria-pressed="true"]:hover:not(:disabled), :root .grupo-temas .btn.aula-chip[aria-pressed="true"]:hover:not(:disabled),
:root .grupo-temas .btn.tema-chip[aria-pressed="true"]:focus-visible, :root .grupo-temas .btn.tipo-chip[aria-pressed="true"]:focus-visible, :root .grupo-temas .btn.aula-chip[aria-pressed="true"]:focus-visible { background: var(--cc-viva, var(--cc-tx)); color: var(--cc-viva-tx, var(--cc-bg)); }
.grupo-temas .filtro-rot { flex: none; min-width: 52px; margin: 0; font-weight: 700; color: var(--cc-tx); border-left: 6px solid var(--cc-viva, var(--cc-tx)); padding-left: 8px; }
:root .etq.etq-extra.cc { background: var(--cc-bg); color: var(--cc-tx); border: 0; }
@media (max-width: 700px) {
  .grupo-temas { flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 6px; scrollbar-width: thin; }
  .grupo-temas > * { flex: none; }
  .grupo-tipos, .grupo-aulas { margin-top: 0; }
}

/* 2.268.0: a turma em cartões, como o aluno a vê (public/admin-turma.js, emCartoes): um cartão por tema (as classes tema-card e fam-<cor>
   da página inicial) e, dentro, um cartão por atividade com os botões do professor. */
.tl-vista { display: inline-flex; gap: 6px; align-items: center; }
.tc-zona { display: flex; flex-direction: column; gap: 18px; }
.tc-temas { display: flex; flex-direction: column; gap: 18px; margin-top: 6px; }
.tc-tema.tema-card { padding: 16px 18px; gap: 10px; }
.tc-tema .tema-card-icone { width: 48px; height: 48px; border-radius: 14px; }
.tc-tema .tema-card-icone svg { width: 24px; height: 24px; }
.tc-tema .tema-card-txt h3 { font-size: 21px; }
.tc-tema .tema-card-txt small { font-size: 15px; }
.tc-tema.tc-vazio { opacity: 0.92; }
.tc-tema .tema-card-lista { margin-top: 4px; }
.tc-parte { margin: 14px 0 0; }
.tc-parte-tit { margin: 0 0 8px; font-size: 16px; font-weight: 800; color: var(--tc); }
.tc-parte-tit small { font-weight: 700; opacity: 0.8; }
details.tc-fora > summary { cursor: pointer; list-style-position: inside; }
.tc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tc-card { display: flex; flex-direction: column; border: 2px solid var(--tinta, #1b1b3a); border-radius: 16px; background: var(--papel); color: var(--texto); overflow: hidden; box-shadow: 3px 3px 0 var(--fa); }
.tc-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--fa); color: #ffffff; padding: 7px 12px; font-size: 13.5px; font-weight: 700; }
.tc-estado { background: #ffffff; color: #1b1b3a; border-radius: 999px; padding: 1px 10px; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.tc-corpo { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; flex: 1; }
.tc-tit { margin: 0; font-size: 17px; line-height: 1.25; }
.tc-titulo { color: var(--texto); text-decoration: none; overflow-wrap: anywhere; }
.tc-titulo:hover { text-decoration: underline; }
.tc-notas { margin: 0; font-size: 13.5px; color: var(--suave); }
.tc-acoes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: auto; padding-top: 4px; }
.tc-acoes .btn { white-space: nowrap; }
/* Escondidas e fora da turma: a cinzento e a tracejado, para se ver logo que os alunos não as têm. */
.tc-card.est-oculta, .tc-card.est-esc { border-style: dashed; box-shadow: none; background: color-mix(in srgb, var(--papel) 82%, var(--suave)); }
.tc-card.est-oculta .tc-cab, .tc-card.est-esc .tc-cab { background: #5b6b78; }
.tc-card.bloq .tc-estado, .tc-card.est-agend .tc-estado { background: #fde68a; color: #422006; }
.tc-dica { margin-top: 4px; }
@media (max-width: 640px) { .tc-cards { grid-template-columns: minmax(0, 1fr); } .tc-tema.tema-card { padding: 14px 12px; } }
@media print { .tl-vista { display: none; } .tc-card { box-shadow: none; } }

/* Dispensar um aluno de atividades (2.275.0, página «Alunos com apoio» e pauta). */
.apo-disp-lista { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; min-height: 0; overflow: auto; padding: 4px; -webkit-overflow-scrolling: touch; }
.apo-disp-item { display: flex; align-items: flex-start; gap: 10px; font-size: 16px; padding: 9px 6px; border-radius: 8px; cursor: pointer; } .apo-disp-item:hover { background: var(--light); } .apo-disp-item input { flex: 0 0 auto; width: 22px; height: 22px; margin: 1px 0 0; } .apo-disp-item span { min-width: 0; overflow-wrap: anywhere; }
.apo-disp-item small { color: var(--suave); }
.apo-disp.com { font-weight: 700; }
.pa-tab td.pa-disp::after { content: " disp."; font-size: 11px; color: var(--suave); }

/* Menu da Administração em dois níveis (2.276.0): sem uma cor por secção; áreas em cartões, como os das turmas. */
.nav-admin.nav-admin2 { display: block; padding: 0; border: 0; background: transparent; box-shadow: none; overflow: visible; margin: 0 0 16px; }
:root:not(.classico) .nav-admin.nav-admin2 { border: 0; background: transparent; box-shadow: none; padding: 0; }
.nav-admin2 .nav-n1 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.nav-admin2 .nav-btn.nav-area, :root:not(.classico) .nav-admin2 .nav-btn.nav-area { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 14px; border: 2px solid var(--tinta, var(--borda)); border-radius: 16px; background: var(--papel); color: var(--titulo); box-shadow: 3px 3px 0 var(--sombra, transparent); cursor: pointer; text-decoration: none; min-width: 0; }
.nav-admin2 .nav-area-rot { font-size: 16px; font-weight: 800; line-height: 1.2; }
.nav-admin2 .nav-area-sub { font-size: 13px; font-weight: 500; color: var(--muted, var(--texto)); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.nav-admin2 .nav-btn.nav-area:hover { background: var(--light); }
.nav-admin2 .nav-btn.nav-area.sel, :root:not(.classico) .nav-admin2 .nav-btn.nav-area.sel, :root[data-theme="dark"] .nav-admin2 .nav-btn.nav-area.sel { background: var(--tinta, var(--accent)); color: var(--papel); border-color: var(--tinta, var(--accent)); box-shadow: 3px 3px 0 var(--sombra, transparent); }
.nav-admin2 .nav-btn.nav-area.sel .nav-area-sub { color: var(--papel); opacity: .85; }
.nav-admin2 .nav-n2 { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding: 6px; border: 2px solid var(--tinta, var(--borda)); border-radius: 14px; background: var(--papel); }
.nav-admin2 .nav-btn.nav-sec, :root:not(.classico) .nav-admin2 .nav-btn.nav-sec, :root[data-theme="dark"] .nav-admin2 .nav-btn.nav-sec { background: transparent; color: var(--titulo); border: 2px solid transparent; border-radius: 10px; padding: 7px 14px; font-size: 15px; font-weight: 700; box-shadow: none; }
.nav-admin2 .nav-btn.nav-sec:hover { background: var(--light); }
.nav-admin2 .nav-btn.nav-sec.sel, :root:not(.classico) .nav-admin2 .nav-btn.nav-sec.sel, :root[data-theme="dark"] .nav-admin2 .nav-btn.nav-sec.sel { background: var(--light); border-color: var(--tinta, var(--accent)); color: var(--titulo); box-shadow: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav-admin2 .nav-btn.nav-area { background: var(--papel); color: var(--titulo); border-color: var(--tinta, var(--borda)); }
  :root:not([data-theme="light"]) .nav-admin2 .nav-btn.nav-area.sel { background: var(--tinta, var(--accent)); color: var(--papel); border-color: var(--tinta, var(--accent)); }
  :root:not([data-theme="light"]) .nav-admin2 .nav-btn.nav-sec { background: transparent; color: var(--titulo); border-color: transparent; }
  :root:not([data-theme="light"]) .nav-admin2 .nav-btn.nav-sec.sel { background: var(--light); color: var(--titulo); border-color: var(--tinta, var(--accent)); }
}
@media (max-width: 900px) { .nav-admin2 .nav-area-sub { display: none; } .nav-admin2 .nav-btn.nav-area { padding: 9px 10px; align-items: center; } .nav-admin2 .nav-area-rot { font-size: 15px; } }
@media (max-width: 560px) { .nav-admin2 .nav-n1 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .nav-admin2 .nav-n2 { flex-wrap: nowrap; overflow-x: auto; } .nav-admin2 .nav-btn.nav-sec { flex: 0 0 auto; padding: 7px 10px; } }
@media print { .nav-admin2 { display: none; } }
.apo-cel-disp { white-space: nowrap; } .apo-cel-disp .apo-ver-como { margin-left: 6px; }
dialog.apo-disp-dlg[open] { display: flex; flex-direction: column; gap: 8px; width: min(560px, calc(100vw - 24px)); max-height: min(86dvh, 720px); padding: 16px; overflow: hidden; }
.apo-disp-tit { margin: 0; font-size: 19px; } .apo-disp-dlg > .nota { margin: 0; }
.apo-disp-fim { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 0 0 auto; padding-top: 8px; border-top: 1px solid var(--borda); }
/* Cabeçalho do aluno (2.276.3): o botão do Excel não tinha cor (ficava invisível no tema escuro) e, com sete botões, o menu partia-se
   ao centro, desalinhado. Agora o menu tem a sua linha, alinhada à esquerda, e todos os botões têm fundo. */
:root:not(.classico) .cab-nav-item.cn-excel { background: #d5efdd; }
:root:not(.classico)[data-theme="dark"] .cab-nav-item.cn-excel { background: #14402a; color: #d5efdd; }
@media (prefers-color-scheme: dark) { :root:not(.classico):not([data-theme="light"]) .cab-nav-item.cn-excel { background: #14402a; color: #d5efdd; } }
@media (min-width: 701px) {
  :root:not(.classico) .cab-pag .cab-nav { order: 3; flex: 1 1 100%; width: 100%; justify-content: flex-start; gap: 8px; }
  :root:not(.classico) .cab-pag .cab-nav-item { min-height: 40px; padding: 6px 14px; white-space: nowrap; }
  :root:not(.classico) .cab-pag .cab-in .quem { margin-left: auto; }
}

/* Resolução de Excel enviada pelo professor (2.278.0) */
.res-folha { border-collapse: collapse; margin: 8px 0; max-width: 100%; }
.res-folha th, .res-folha td { border: 2px solid var(--borda, #d5dee5); padding: 6px 12px; text-align: left; }
.res-folha thead th { font-size: 0.86rem; }
.res-folha tbody th { font-weight: 800; white-space: nowrap; }
.res-folha code { font: 1rem "JetBrains Mono", Consolas, monospace; overflow-wrap: anywhere; }
.res-regras { margin: 4px 0 8px; padding-left: 20px; }
.res-expl { margin: 8px 0 4px; }

/* Simuladores atribuídos às turmas (2.279.0) */
.pf-sim-desc { margin: 0; font-size: 0.95rem; color: var(--suave); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pf-sims-fixos > h2 { font-size: 22px; }
.tl-sims-lista { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.tl-sim { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px; border: 2px solid var(--borda); border-radius: 12px; background: var(--papel); }
.tl-sim.fixa { border-color: var(--tinta, var(--texto)); }
.tl-sim-tit { font-weight: 800; color: var(--texto); }
.tl-sim-acoes { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.rec-sim-dlg { max-width: min(640px, 94vw); }
.rec-sim-tab { width: 100%; margin: 8px 0 12px; }
.rec-sim-tab th[scope=row] { text-align: left; }

/* Criador de apps (2.283.0): imagens a sério, formas, barra de progresso, estilos de botão, temas, seletor de imagens e tutorial. */
.ap-ecra { background-size: cover; background-position: center; }
.ap-imagem.ap-com-img { line-height: 0; padding: 0; }
.ap-img-el { display: block; width: 100%; height: auto; max-height: 100%; object-fit: contain; pointer-events: none; }
.ap-forma { padding: 0; min-height: 8px; border-radius: 14px; }
.ap-forma-ret { border-radius: 0; }
.ap-forma-circulo { border-radius: 50%; aspect-ratio: 1; height: auto !important; }
.ap-progresso { display: block; }
.ap-prog { height: 14px; border-radius: 99px; background: rgba(0, 0, 0, 0.14); overflow: hidden; margin-top: 4px; }
.ap-prog i { display: block; height: 100%; border-radius: 99px; transition: width 0.25s; }
.ap-botao.ap-bt-pilula { border-radius: 99px; }
.ap-botao.ap-bt-quadrado { border-radius: 0; }
.ap-botao.ap-bt-contorno { border: 3px solid; }
.ap-ecra.ap-tema-fundo.ap-tema-oceano { background-image: linear-gradient(180deg, #1e63d6, #1648b0 45%, #0b1e4a); }
.ap-ecra.ap-tema-fundo.ap-tema-doce { background-image: linear-gradient(135deg, #c9287a, #7c3aed 60%, #1d4ed8); }
.ap-ecra.ap-tema-fundo.ap-tema-floresta { background-image: linear-gradient(160deg, #0b3d2e, #15803d 60%, #3f7d0a); }
.ap-ecra.ap-tema-fundo.ap-tema-por-do-sol { background-image: linear-gradient(160deg, #2a1458, #c2410c 60%, #b45309); }
.ap-ecra.ap-tema-fundo.ap-tema-noite { background-image: radial-gradient(circle at 50% 25%, #2a3a8a, #141a3c 60%, #0a0e24); }
.ap-ecra.ap-tema-fundo.ap-tema-neon { background-image: linear-gradient(135deg, #141a3c, #6d28d9 55%, #c81e6e); }
.ap-ecra[class*="ap-tema-"] .ap-botao { box-shadow: 0 4px 0 rgba(0, 0, 0, 0.28); border-radius: 14px; font-family: "Lexend", system-ui, sans-serif; }
.ap-ecra[class*="ap-tema-"] .ap-botao.ap-bt-pilula { border-radius: 99px; }
.ap-ecra[class*="ap-tema-"] .ap-botao.ap-bt-quadrado { border-radius: 0; }
.ap-ecra[class*="ap-tema-"] .ap-botao.ap-bt-contorno { box-shadow: none; }
.ap-ecra[class*="ap-tema-"] .ap-caixa { border-radius: 12px; }
.ap-img-bts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ap-img-mini { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #1e2a5a; border: 2px solid var(--tinta, #1b1b3a); }
.ap-tut-linha { margin: 0 0 8px; }
.ap-dlg { width: min(1080px, 96vw); max-height: 92vh; padding: 0; border-radius: 18px; border: 3px solid var(--tinta, #1b1b3a); background: var(--papel, #fff); color: var(--texto); }
.ap-dlg::backdrop { background: rgba(11, 16, 48, 0.6); }
.ap-dlg-in { display: grid; grid-template-rows: auto auto 1fr; gap: 10px; padding: 14px 16px 16px; max-height: 92vh; box-sizing: border-box; }
.ap-tut .ap-dlg-in { grid-template-rows: auto 1fr auto; }
.ap-dlg-cab { display: flex; gap: 10px; align-items: center; }
.ap-dlg-cab h2 { margin: 0 auto 0 0; font-size: 20px; }
.ap-bib-cats { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ap-bib-cat { padding: 4px 12px; border-radius: 99px; border: 2px solid var(--tinta, #1b1b3a); background: #fff; color: #1b1b3a; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.ap-bib-cat[aria-pressed="true"] { background: #ffd23f; }
.ap-bib-q { flex: 1 1 180px; min-width: 150px; }
.ap-bib-grelha { overflow: auto; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); align-content: start; min-height: 240px; padding: 4px; }
.ap-bib-grelha.largas { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.ap-bib-item { display: grid; gap: 4px; padding: 6px; border-radius: 12px; border: 2px solid var(--borda); background: #1e2a5a; color: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.ap-bib-item:hover, .ap-bib-item:focus-visible { border-color: #ffd23f; outline: 0; }
.ap-bib-item img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.ap-bib-grelha.largas .ap-bib-item img { aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.ap-bib-item span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ap-tut-grelha { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); min-height: 0; overflow: auto; }
@media (min-width: 860px) { .ap-tut-grelha { grid-template-columns: 230px minmax(0, 1fr); } }
.ap-tut-indice { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
@media (max-width: 859px) { .ap-tut-indice { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 6px; } }
.ap-tut-ind { width: 100%; text-align: left; padding: 6px 10px; border-radius: 10px; border: 2px solid transparent; background: #e8eef7; color: #1b1b3a; font: inherit; font-size: 14px; cursor: pointer; }
.ap-tut-ind[aria-current="step"] { background: #ffd23f; border-color: #1b1b3a; font-weight: 700; }
.ap-tut-tit { margin: 0 0 10px; font-size: 22px; }
.ap-tut-duas { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 760px) { .ap-tut-duas { grid-template-columns: auto minmax(0, 1fr); } }
.ap-tut-fig { margin: 0; display: grid; gap: 6px; justify-items: center; }
.ap-tut-fig .ap-tel { width: 230px; height: 420px; border-width: 8px; border-radius: 28px; }
.ap-tut-fig figcaption { font-size: 13px; color: var(--muted); text-align: center; max-width: 240px; }
.ap-tut-lista { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 16px; }
.ap-tut-blocos { margin-top: 12px; }
.ap-tut-blocos ol { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; justify-items: start; }
.ap-tut-bl { padding: 5px 12px; border-radius: 8px; color: #fff; font-weight: 700; font-size: 14px; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35); }
.ap-tut-bl.dentro { margin-left: 22px; }
.ap-tut-barra { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.ap-progresso .ap-slider-t b, .ap-slider .ap-slider-t b { flex: 0 0 auto; white-space: nowrap; margin-left: 8px; }
.ap-progresso .ap-slider-t span { min-width: 0; }
.ap-ecra.ap-tema-fundo .ap-vazio { color: #ffffff; }
.ap-progresso .ap-slider-t span, .ap-slider .ap-slider-t span { text-align: left; }

:root[data-theme="dark"] .v-mudou { background: #2f1f55; color: #d8c6ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .v-mudou { background: #2f1f55; color: #d8c6ff; } }

/* Sons das criações dos alunos (public/jogos/audio.js, 2.285.0): gravar a voz ou enviar um áudio, nos jogos e no stop motion. */
.ca-som { display: grid; gap: 6px; margin: 8px 0; padding: 8px 10px; border: 2px dashed #9aa7bd; border-radius: 12px; }
.ca-rot { font-weight: 700; font-size: 13px; }
.ca-leitor { width: 100%; height: 36px; }
.ca-bts { display: flex; flex-wrap: wrap; gap: 6px; }
.ca-estado { margin: 0; font-size: 13px; font-weight: 600; }
.ca-a-gravar { color: #b3261e; }
.ca-a-gravar::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #d92d20; margin-right: 6px; vertical-align: -1px; }

/* Nome das apps (2.292.0): o subtítulo por baixo ou ao lado do nome. */
.app-logo { width: 1.25em; height: 1.25em; margin-right: 0.35em; vertical-align: -0.28em; }
.app-sub { display: inline-block; margin-left: 0.6em; font-size: 0.5em; font-weight: 600; opacity: 0.8; vertical-align: middle; }

/* Contas das apps (admin-inscricoes): pedidos de conta sem conta Microsoft e contas aprovadas. */
.ins-interruptor { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; }
.ins-interruptor input { width: 22px; height: 22px; }
.ins-codigo-linha, .ins-opcoes, .ins-bloco { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 8px 0; }
.ins-rot { font-weight: 700; }
.ins-codigo { font-family: "JetBrains Mono", monospace; min-width: 14ch; }
.ins-apps { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; }
.ins-app-op { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ins-ocupado { color: var(--suave); }
.ins-tab tr.ins-fora td { color: var(--suave); }
.ins-etq-bloq { margin-left: 6px; }
.ins-criadas, .ins-nova-senha { border-left: 6px solid var(--accent); }
.ins-nova-senha { padding: 8px 12px; margin: 0 0 10px; background: var(--item-bg); border-radius: 10px; }
.ins-senha-nova { font-size: 1.1rem; font-weight: 700; }
.ins-criadas-lista { margin: 0 0 10px; padding-left: 20px; }
.ins-criadas-lista li { margin-bottom: 6px; }

/* ===== Página inicial mais gráfica: ilustrações (public/arte.js), «As tuas ferramentas», temas com faixa de cor =====
   Tudo sob :root:not(.classico); no aspeto clássico as ilustrações não aparecem e as ferramentas ficam em cartões simples. */
.hero-arte, .ativ-simb, .pf-card-simb { display: none; }
.arte-simb, .arte-cena { display: block; width: 100%; height: auto; overflow: visible; }
/* Saudação: texto | ilustração | números; pontinhos claros no fundo azul. */
:root:not(.classico) .hero:not(.hero-entrada) { grid-template-columns: minmax(0, 1fr) auto auto; background-image: radial-gradient(rgba(255, 255, 255, .13) 2px, transparent 2.5px); background-size: 22px 22px; }
:root:not(.classico) .hero:not(.hero-entrada) > .estat { grid-column: 3; }
:root:not(.classico) .hero:not(.hero-entrada) .hero-arte { display: block; grid-column: 2; grid-row: 1 / span 4; width: 262px; align-self: center; }
:root:not(.classico) .hero:not(.hero-entrada) .hero-icone { display: none; }
:root:not(.classico) .hero:not(.hero-entrada)::after { right: 30%; }
@media (max-width: 1000px) { :root:not(.classico) .hero:not(.hero-entrada) .hero-arte { width: 190px; } }
@media (max-width: 760px) {
  :root:not(.classico) .hero:not(.hero-entrada) { grid-template-columns: minmax(0, 1fr); }
  :root:not(.classico) .hero:not(.hero-entrada) > .estat { grid-column: 1; }
  :root:not(.classico) .hero:not(.hero-entrada) .hero-arte { grid-column: 1; grid-row: 1; justify-self: end; width: 168px; margin: -8px -4px 2px 0; }
  :root:not(.classico) .hero:not(.hero-entrada) > .k { grid-row: 1; align-self: start; }
  :root:not(.classico) .hero:not(.hero-entrada) .hero-quadrado { display: none; }
}

/* Títulos das secções da página inicial: um traço grosso de cor por baixo. */
:root:not(.classico) .ferr-sec > h2::after, :root:not(.classico) .pf-sec > h2::after, :root:not(.classico) #atividades > h2::after { content: ""; display: block; width: 76px; height: 9px; margin-top: 6px; border-radius: 999px; border: 2px solid var(--tinta); background: #f59e0b; }
:root:not(.classico) .ferr-sec > h2::after { background: #e5383b; }
:root:not(.classico) .pf-sims > h2::after { background: #2dd4bf; }
:root:not(.classico) #atividades > h2::after { background: #a78bfa; }
:root:not(.classico) #atividades > h2 { font-size: 28px; margin-bottom: 14px; }
:root:not(.classico) .tab-ano.sel { box-shadow: 3px 3px 0 var(--sombra); }

/* «As tuas ferramentas»: um cartão por app, com a sua cor (--fc viva, --fcb clara) e o seu símbolo. */
.ferr-sec { margin: 30px 0 26px; }
.ferr-sec > h2 { font-size: 28px; margin: 0 0 6px; }
.ferr-lema { margin: 0 0 14px; color: var(--suave); }
.ferr-grelha { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 14px; }
.ferr-card { --fc: #60a5fa; --fcb: #dbeafe; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 14px 16px; border: 2px solid var(--borda); border-radius: 18px; background: var(--fcb); color: #1b1b3a; text-decoration: none; min-width: 0; }
.ferr-card b { font-family: Lexend, "Atkinson Hyperlegible", system-ui, sans-serif; font-size: 17px; line-height: 1.15; }
.ferr-card small { font-size: 14px; line-height: 1.25; }
.ferr-card:focus-visible { outline: 3px solid var(--foco); outline-offset: 3px; }
.ferr-simb { width: 64px; height: 64px; padding: 8px; box-sizing: border-box; border-radius: 18px; background: var(--fc); border: 3px solid #1b1b3a; margin-bottom: 8px; }
.ferr-design { --fc: #e5383b; --fcb: #fee2e2; } .ferr-jogos { --fc: #a78bfa; --fcb: #ebe3ff; } .ferr-sitios { --fc: #2dd4bf; --fcb: #d2f5ef; }
.ferr-applab { --fc: #fb923c; --fcb: #ffe6d0; } .ferr-stopmotion { --fc: #facc15; --fcb: #fff3c4; } .ferr-video { --fc: #818cf8; --fcb: #e0e7ff; } .ferr-modelador { --fc: #2dd4bf; --fcb: #ccfbf1; } .ferr-excel { --fc: #4ade80; --fcb: #d9f7e3; }
:root:not(.classico) .ferr-card { border: 3px solid var(--tinta); border-radius: 22px; box-shadow: 5px 5px 0 var(--sombra); transition: transform .08s ease, box-shadow .08s ease; }
:root:not(.classico) .ferr-card:hover, :root:not(.classico) .ferr-card:focus-visible { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--sombra); }
:root:not(.classico) .ferr-simb { transform: rotate(-5deg); box-shadow: 3px 3px 0 #1b1b3a; }
:root:not(.classico) .ferr-card:nth-child(even) .ferr-simb { transform: rotate(4deg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ferr-card { background: color-mix(in srgb, var(--fc) 24%, var(--papel)); color: var(--texto); } }
:root[data-theme="dark"] .ferr-card { background: color-mix(in srgb, var(--fc) 24%, var(--papel)); color: var(--texto); }
@media (max-width: 420px) { .ferr-grelha { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ferr-outra { --fc: #94a3b8; --fcb: #e7ecf2; }
.ferr-card .ferr-fixa { margin-top: 4px; font-size: 12.5px; font-weight: 700; }
/* As cinco apps levam o logótipo (public/apps/logos/<slug>-icone.svg, que já traz o seu quadrado e contorno). */
.ferr-logo { display: block; width: 64px; height: 64px; margin-bottom: 8px; }
:root:not(.classico) .ferr-logo { transform: rotate(-5deg); filter: drop-shadow(3px 3px 0 #1b1b3a); }
:root:not(.classico) .ferr-card:nth-child(even) .ferr-logo { transform: rotate(4deg); }
.ferr-card .ferr-lema-app { font-weight: 700; }
.ferr-card .ferr-frase { margin-top: 4px; font-size: 13.5px; }
/* «As apps» na página de entrada: os mesmos cartões, mais largos (levam também a descrição). */
.apps-sec { margin-top: 26px; }
.apps-grelha { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
@media (max-width: 420px) { .apps-grelha { grid-template-columns: repeat(2, minmax(0, 1fr)); } .apps-grelha .ferr-card b { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { :root:not(.classico) .ferr-card { transition: none; } :root:not(.classico) .ferr-card:hover, :root:not(.classico) .ferr-card:focus-visible { transform: none; } }

/* Cartões «por fazer»: o símbolo do tipo de atividade na faixa do tema. */
:root:not(.classico) .pf-card-simb { display: block; flex: none; width: 34px; height: 34px; margin: -6px 0; }
:root:not(.classico) .pf-card-tema { flex: 1; min-width: 0; }
:root:not(.classico) .pf-card-cab { background-image: radial-gradient(rgba(255, 255, 255, .16) 1.5px, transparent 2px); background-size: 14px 14px; }

/* Cartões dos temas (só na página inicial): faixa da cor do tema com o símbolo, o nome e a contagem a branco. */
:root:not(.classico) .temas-lista.em-cards .tema-card { padding: 0 0 20px; gap: 0; overflow: hidden; }
:root:not(.classico) .temas-lista.em-cards .tema-card-cab { padding: 16px 20px; background-color: var(--fa); background-image: radial-gradient(rgba(255, 255, 255, .16) 1.5px, transparent 2px); background-size: 14px 14px; color: #fff; border-bottom: 3px solid var(--tinta); }
:root:not(.classico) .temas-lista.em-cards .tema-card-cab:focus-visible { outline: 3px solid #fff; outline-offset: -7px; border-radius: 0; }
:root:not(.classico) .temas-lista.em-cards .tema-card-icone { width: 68px; height: 68px; background: #fff; color: var(--fa); border-color: #1b1b3a; box-shadow: 3px 3px 0 #1b1b3a; transform: rotate(-4deg); }
:root:not(.classico) .temas-lista.em-cards .tema-card-icone.com-arte { background: var(--fb); padding: 8px; box-sizing: border-box; display: block; }
:root:not(.classico) .temas-lista.em-cards .tema-card-icone.com-arte svg { width: 100%; height: 100%; }
:root:not(.classico) .temas-lista.em-cards .tema-card-txt h3 { color: #fff; font-size: 24px; }
:root:not(.classico) .temas-lista.em-cards .tema-barra { margin: 18px 20px 0; height: 18px; }
:root:not(.classico) .temas-lista.em-cards .tema-chips { margin: 12px 20px 0; }
:root:not(.classico) .temas-lista.em-cards .tema-card-lista { margin: 16px 20px 0; }
@media (max-width: 760px) { :root:not(.classico) .temas-lista.em-cards .tema-card-cab { padding: 14px; gap: 12px; } :root:not(.classico) .temas-lista.em-cards .tema-card-icone { width: 56px; height: 56px; } :root:not(.classico) .temas-lista.em-cards .tema-card-txt h3 { font-size: 21px; } :root:not(.classico) .temas-lista.em-cards .tema-barra, :root:not(.classico) .temas-lista.em-cards .tema-chips, :root:not(.classico) .temas-lista.em-cards .tema-card-lista { margin-left: 14px; margin-right: 14px; } }

/* Cartões das atividades: o símbolo do tipo (quiz, tarefa, missão, folha...) num quadradinho da cor do ano, ao lado do ano. */
:root:not(.classico) a.ativ .k { display: flex; align-items: center; gap: 8px; }
:root:not(.classico) .ativ-simb { display: block; flex: none; width: 38px; height: 38px; padding: 4px; box-sizing: border-box; border-radius: 11px; border: 2px solid #1b1b3a; background: color-mix(in srgb, var(--ac, var(--accent)) 30%, #fff); transform: rotate(-4deg); }

/* Entradas (uma vez, ao abrir a página; nada em ciclo), só para quem não pediu menos movimento. */
@media (prefers-reduced-motion: no-preference) {
  :root:not(.classico) .hero-arte .ha-p { transform-box: fill-box; transform-origin: center; animation: ha-entra .55s cubic-bezier(.2, .9, .3, 1.25) both; }
  :root:not(.classico) .hero-arte .ha-p2 { animation-name: ha-voa; animation-duration: .8s; animation-delay: .25s; }
  :root:not(.classico) .hero-arte .ha-p3 { animation-delay: .15s; }
  :root:not(.classico) .hero-arte .ha-p4 { animation-delay: .3s; }
  :root:not(.classico) .hero-arte .ha-p5 { animation-delay: .45s; }
  :root:not(.classico) .ferr-card { animation: ferr-entra .4s ease-out both; }
  :root:not(.classico) .ferr-card:nth-child(2) { animation-delay: .05s; } :root:not(.classico) .ferr-card:nth-child(3) { animation-delay: .1s; }
  :root:not(.classico) .ferr-card:nth-child(4) { animation-delay: .15s; } :root:not(.classico) .ferr-card:nth-child(5) { animation-delay: .2s; }
  :root:not(.classico) .ferr-card:nth-child(6) { animation-delay: .25s; } :root:not(.classico) .ferr-card:nth-child(n+7) { animation-delay: .3s; }
}
@keyframes ha-entra { from { opacity: 0; scale: .6; } to { opacity: 1; scale: 1; } }
@keyframes ha-voa { from { opacity: 0; translate: -70px 60px; } to { opacity: 1; translate: 0 0; } }
@keyframes ferr-entra { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@media print { .hero-arte, .ferr-sec { display: none; } }

/* Logótipos dos temas (TP.logoTema: os das apps em public/apps/logos/ e os de public/logos/, que já trazem a sua moldura de cor). */
.logo-tema { display: block; flex: none; width: 40px; height: 40px; }
.modulo-logo { width: 44px; height: 44px; margin-right: 10px; }
.modulo-cab .modulo-aulas { margin-left: auto; }
.tema-cab-logo { width: 38px; height: 38px; }
.pf-card-logo { width: 32px; height: 32px; margin: -5px 0; }
.tema-card-icone.com-logo { background: none; border: 0; padding: 0; display: block; }
.tema-card-icone.com-logo .logo-tema { width: 100%; height: 100%; }
:root:not(.classico) .temas-lista.em-cards .tema-card-icone.com-logo { background: none; border: 0; box-shadow: none; padding: 0; filter: drop-shadow(3px 3px 0 #1b1b3a); }

/* Visita guiada para os professores (public/admin-visita.html, estilos próprios em visita.css): a entrada no menu da Administração,
   o convite da primeira vez e o cartão no topo da Ajuda. */
.nav-admin2 .nav-n1 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
@media (max-width: 1100px) { .nav-admin2 .nav-n1 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.vg-convite { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; padding: 10px 14px; border: 2px solid var(--tinta, var(--borda)); border-radius: 14px; background: var(--aviso-bg); color: var(--texto); }
.vg-convite p { margin: 0; flex: 1 1 260px; }
.aj-visita { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 12px 0; padding: 12px 16px; border: 2px solid var(--tinta, var(--borda)); border-radius: 14px; background: var(--papel); box-shadow: 3px 3px 0 var(--sombra, transparent); }
.aj-visita h2 { margin: 0 0 2px; font-size: 1.15rem; }
.aj-visita p { margin: 0; color: var(--suave); }
.aj-visita > div { flex: 1 1 280px; min-width: 0; }
/* Os menus «Intervalo» e «Contagem» são os primeiros da barra da turma: o painel abre para a direita, para não sair do ecrã pela esquerda. */
.tb-grupo-itens > details.pausa-menu > .menu-painel, .tb-grupo-itens > details.cont-menu > .menu-painel { right: auto; left: 0; }
/* Com seis entradas na primeira linha, o subtítulo de cada área pode ocupar duas linhas em vez de ser cortado. */
@media (min-width: 901px) { .nav-admin2 .nav-area-sub { white-space: normal; } }
/* Área «Apps» da Administração (2.300.0): um cartão por app, com o logótipo, as ações e a ligação da página de entrada. */
.apps-grelha { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.apps-cab { display: flex; align-items: center; gap: 12px; }
.apps-logo { width: 64px; height: 64px; flex: none; }
.apps-nome { margin: 0; font-size: 21px; line-height: 1.15; }
.apps-lema { margin: 2px 0 0; font-weight: 700; color: var(--texto); }
.apps-entrada { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--borda-tab); }
.apps-end-linha { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.apps-end { flex: 1 1 150px; min-width: 0; font-size: 14px; }
.apps-contas { margin-top: 18px; padding-top: 14px; border-top: 2px solid var(--borda-tab); }
.apps-contas h3 { margin: 0 0 4px; }

/* Grupos ao acaso da turma (2.302.0, admin-grupos.js) */
.gr-regras-cx h2 { margin-top: 0; }
.gr-reg-nova { flex-wrap: wrap; gap: 8px; align-items: center; }
.gr-reg-lista { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.gr-reg-lista li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; }
.gr-acoes { flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.gr-envolv { background: var(--papel, var(--bg)); }
.gr-envolv:fullscreen { padding: 24px; overflow: auto; }
.gr-palco { position: relative; min-height: 340px; padding: 6px 0 20px; }
.gr-a-sortear { overflow: hidden; }
.gr-grelha { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.gr-grupo { border: 2px solid var(--tinta, var(--line)); border-radius: 18px; padding: 10px 12px 12px; background: var(--card-bg, var(--bg)); transition: opacity .35s, transform .35s; }
.gr-por-revelar { opacity: .25; transform: scale(.97); }
.gr-grupo-tit { margin: 0 0 8px; font-size: 1.05rem; }
.gr-membros { display: flex; flex-wrap: wrap; gap: 10px; }
.gr-ficha { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 96px; padding: 6px; border: 2px solid transparent; border-radius: 14px; background: none; color: inherit; font: inherit; cursor: pointer; }
.gr-ficha:hover, .gr-ficha:focus-visible { border-color: var(--accent); }
.gr-escolhida { border-color: var(--accent); background: var(--accent-bg, rgba(125, 211, 252, .2)); }
.gr-foto { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--tinta, var(--line)); background: var(--line); }
.gr-foto.vazia { display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.4rem; }
.gr-nome { font-size: 13px; font-weight: 600; text-align: center; line-height: 1.2; }
.gr-escondida { visibility: hidden; }
.gr-voo { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.gr-a-voar { position: absolute; left: 0; top: 0; will-change: transform; }
.gr-a-voar.gr-pousar { transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.gr-vazio { padding: 30px 0; }
@media print { .gr-regras-cx, .gr-acoes, .gr-dica, .gr-proj-barra, .gr-passo, .aula-topo .quem { display: none !important; } .gr-grupo { break-inside: avoid; } }
/* Grupos: escolher, sem grupo e arrastar (2.304.0) */
.gr-grupo-cab { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.gr-grupo-cab .gr-grupo-tit { margin: 0; }
.gr-grupo-n { opacity: .8; }
.gr-esc-rot { margin-left: auto; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.gr-marcado { outline: 3px dashed var(--accent); outline-offset: 2px; }
.gr-maior { border-style: dashed; }
.gr-sem { margin-top: 16px; border: 2px dashed var(--line); border-radius: 18px; padding: 10px 12px 12px; }
.gr-ficha { touch-action: none; user-select: none; -webkit-user-select: none; }
.gr-ficha .gr-foto { -webkit-user-drag: none; pointer-events: none; }
.gr-a-arrastar { opacity: .3; }
body.gr-arrastando, body.gr-arrastando * { cursor: grabbing !important; }
.gr-fantasma { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; background: var(--papel, #fff); border-color: var(--accent); box-shadow: 0 10px 26px rgba(0, 0, 0, .3); }
.gr-fantasma.cheio { border-color: #c2410c; }
.gr-fantasma.proibido { border-color: #b91c1c; }
.gr-fantasma-nota { font-size: 12px; font-weight: 700; text-align: center; max-width: 140px; }
.gr-fantasma-nota:empty { display: none; }
.gr-fantasma-nota { padding: 2px 6px; border-radius: 8px; background: #ecfdf5; color: #14532d; }
.gr-fantasma.cheio .gr-fantasma-nota { background: #fff7ed; color: #9a3412; }
.gr-fantasma.proibido .gr-fantasma-nota { background: #fef2f2; color: #991b1b; }
.gr-alvo-ok { background: rgba(22, 163, 74, .14); border-color: #15803d; }
.gr-alvo-cheio { background: rgba(234, 88, 12, .14); border-color: #c2410c; }
.gr-alvo-proibido { background: rgba(220, 38, 38, .14); border-color: #b91c1c; }
.gr-dlg { max-width: 460px; }
@media print { .gr-esc-rot, .gr-sem .btn { display: none !important; } }

/* Painel da turma: uma atividade e separador novo (2.305.0) */
.pt-sub { margin: 2px 0 0; opacity: .85; }
.pt-ativ-rot { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.pt-ativ-sel { max-width: 320px; }
.pt-desafios .pt-ativs { columns: 2 320px; column-gap: 24px; }
.pt-desafios .pt-ativs li { break-inside: avoid; }

/* Contas da escola nas apps (2.306.0) */
.ins-esc-apps { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 8px 0 14px; }
.ins-esc-procura { width: min(100%, 360px); margin: 4px 0 10px; }
tr.ins-esc-pessoa.bloq td { opacity: .75; }
.ins-esc-bloq { color: var(--erro-txt, #b91c1c); font-weight: 700; }

/* Cabeçalho da página inicial (2.306.2): alinhado com o conteúdo da página (a mesma largura e margem de .pagina.larga) e com o
   botão do modo claro ou escuro à vista ao lado do avatar. */
:root:not(.classico) .cab-pag .cab-in { max-width: 1040px; padding: 12px 14px; }
:root:not(.classico) .cab-pag .cab-in .quem { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* Grupos: um grupo de cada vez e «Mostrar aos alunos» (2.307.0) */
.gr-passo { position: sticky; top: 8px; z-index: 6; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; padding: 10px 12px; border: 2px solid var(--tinta, var(--line)); border-radius: 16px; background: var(--papel, var(--bg)); box-shadow: var(--sombra, none); }
.gr-passo-conta { font-weight: 700; margin-right: auto; }
.gr-a-revelar { outline: 4px solid var(--accent); outline-offset: 3px; }
.gr-proj-barra { display: none; }
html.gr-projetar body { background: var(--papel, var(--bg)); }
html.gr-projetar .gr-proj-barra { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin: 0 0 12px; }
html.gr-projetar .aula-topo .quem, html.gr-projetar .gr-regras-cx, html.gr-projetar .gr-acoes, html.gr-projetar .gr-dica, html.gr-projetar .gr-esc-rot, html.gr-projetar .rodape-credito, html.gr-projetar .chf-botao { display: none !important; }
html.gr-projetar #raiz { max-width: none; padding: 16px 24px; }
html.gr-projetar .aula-topo h1 { font-size: 2rem; }
html.gr-projetar .gr-grelha { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
html.gr-projetar .gr-grupo-tit { font-size: 1.4rem; }
html.gr-projetar .gr-ficha { width: 116px; }
html.gr-projetar .gr-foto { width: 96px; height: 96px; }
html.gr-projetar .gr-nome { font-size: 16px; }
@media (prefers-reduced-motion: reduce) { .gr-a-voar.gr-pousar, .gr-grupo { transition: none; } }

/* Painel da turma num só ecrã (2.308.0, admin-painelunico.js) */
header.aula-topo.pt-u-topo, .pt-u-topo { display: grid; grid-template-columns: minmax(240px, 1fr) auto minmax(0, auto); align-items: center; gap: 12px; margin: 0; padding: 0 0 6px; }
.pt-u-tit h1 { margin: 0; font-size: clamp(18px, 1.9vw, 30px); line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pt-u-tit .k { white-space: nowrap; }
.pt-u-tit .pt-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-u-cmd { max-width: 34vw; }
.pt-u-tit .pt-sub { font-size: 13px; }
.pt-u-cmd .btn { padding: 4px 10px; font-size: 13px; }
.pt-u-mais-menu { display: grid; gap: 6px; padding: 6px; }
.pt-u-cmd { flex-wrap: wrap; justify-content: flex-end; gap: 6px; font-size: 13px; }
.pt-u-cmd .pt-ativ-sel { max-width: 200px; }
.pt-numeros.pt-u-kpis { display: flex; flex-wrap: nowrap; justify-content: center; gap: 8px; margin: 0; }
.pt-u-kpi { display: flex; flex-direction: row; align-items: center; gap: 6px; padding: 3px 10px; white-space: nowrap; border-radius: 16px; box-shadow: 3px 3px 0 var(--sombra, rgba(0,0,0,.2)); }
.pt-u-kpi .pt-num { font-size: clamp(18px, 1.8vw, 34px); }
.pt-u-kpi span { font-size: 13px; }
.pt-u-kpi > svg { width: clamp(18px, 1.8vw, 28px); height: auto; flex: none; }
.pt-u-ic { color: #059669; }
.pt-u-kpi-alunos .pt-u-ic { color: #2563eb; }
.pt-u-corpo { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 30%); gap: 12px; min-height: 0; }
.pt-u-esq, .pt-u-bloco { border: 2px solid var(--tinta, #1b1b3a); border-radius: 18px; background: var(--papel); color: var(--texto); padding: 8px 12px; }
.pt-u-esq { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
.pt-u-h { margin: 0 0 4px; font-size: 17px; }
.pt-u-caixa { min-height: 0; height: 100%; overflow: hidden; }
.pt-u-grelha { display: grid; gap: 8px; height: 100%; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pt-u-al { container-type: size; min-height: 0; min-width: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 2%; padding: 5% 6%; border: 2px solid var(--tinta, #1b1b3a); border-radius: 14px; background: var(--papel); }
.pt-u-al-cab { display: flex; align-items: center; gap: 5cqw; min-width: 0; }
.pt-u-av { position: relative; flex: none; display: grid; place-items: center; width: 26cqh; height: 26cqh; border-radius: 50%; background: #dbeafe; color: #1e3a8a; border: 2px solid var(--tinta, #1b1b3a); font-weight: 800; font-size: 10cqh; }
.pt-u-av-med { position: absolute; right: -24%; bottom: -30%; width: 55%; height: auto; }
.pt-u-al-nome { font-weight: 800; font-size: clamp(10px, min(15cqh, 11cqw), 34px); line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-u-lugar { margin-left: auto; flex: none; font-weight: 900; font-size: clamp(10px, min(13cqh, 10cqw), 30px); line-height: 1; padding: .15em .4em; border-radius: 999px; background: var(--tinta, #1b1b3a); color: var(--papel, #fff); }
.pt-u-estrelas { display: flex; gap: 3cqw; }
.pt-u-estrelas svg { height: 21cqh; width: auto; }
.pt-u-estrela polygon { fill: color-mix(in srgb, var(--texto) 15%, transparent); stroke: color-mix(in srgb, var(--texto) 30%, transparent); stroke-width: 1.2; stroke-linejoin: round; }
.pt-u-estrela.cheia polygon { fill: #f5b301; stroke: #92400e; }
.pt-u-barra { display: block; height: 7px; border-radius: 4px; background: color-mix(in srgb, var(--texto) 12%, transparent); overflow: hidden; }
.pt-u-al .pt-u-barra { height: 6cqh; min-height: 5px; }
.pt-u-barra-in { display: block; height: 100%; width: 0; border-radius: inherit; background: #2563eb; }
@media (prefers-reduced-motion: no-preference) { .pt-u-barra-in { transition: width 1.2s ease-out; } .pt-u-anel-v { transition: stroke-dashoffset 1.2s ease-out; } }
.pt-u-al-pe { display: flex; align-items: center; justify-content: space-between; gap: 4cqw; min-width: 0; }
.pt-u-pts { font-size: clamp(11px, 17cqh, 44px); font-variant-numeric: tabular-nums; line-height: 1; }
.pt-u-meds { display: flex; align-items: center; gap: 1cqw; min-width: 0; }
.pt-u-meds svg { height: 18cqh; width: auto; }
.pt-u-meds small { font-size: 9cqh; font-weight: 700; }
.pt-u-al.top1 { border: 4px solid #f5b301; background: color-mix(in srgb, #f5b301 14%, var(--papel)); }
.pt-u-al.top2 { border: 4px solid #a8b3c2; background: color-mix(in srgb, #a8b3c2 18%, var(--papel)); }
.pt-u-al.top3 { border: 4px solid #c26a2d; background: color-mix(in srgb, #c26a2d 12%, var(--papel)); }
@media (prefers-reduced-motion: no-preference) { .pt-u-al.novo, .pt-u-feed li.novo { animation: pt-u-brilho 2.4s ease-out 1; } }
@keyframes pt-u-brilho { 0% { box-shadow: 0 0 0 0 rgba(245, 179, 1, .9); } 100% { box-shadow: 0 0 0 14px rgba(245, 179, 1, 0); } }
.pt-u-dir { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.pt-u-bloco { display: flex; flex-direction: column; min-height: 0; flex: none; overflow: hidden; }
.pt-u-selos { flex: 0 1 auto; }
.pt-u-prog { flex: 1.2 1 0; min-height: 150px; }
.pt-u-conq { min-height: 110px; }
.pt-u-conq { flex: 1 1 0; }
.pt-u-cort { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.pt-u-podio { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 6px; }
.pt-u-deg { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; gap: 0 4px; min-width: 0; }
.pt-u-pod-med { width: 22px; height: auto; grid-row: 1; }
.pt-u-pod-txt { display: grid; min-width: 0; line-height: 1.15; }
.pt-u-pod-nome { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-u-pod-pts { font-size: 12px; }
.pt-u-pod-coluna { grid-column: 1 / -1; display: grid; place-items: center; margin-top: 3px; border: 2px solid var(--tinta, #1b1b3a); border-radius: 8px 8px 0 0; font-weight: 800; font-size: 13px; color: #1b1b3a; }
.pt-u-deg.d1 .pt-u-pod-coluna { height: 30px; background: #f5b301; }
.pt-u-deg.d2 .pt-u-pod-coluna { height: 22px; background: #cbd5e1; }
.pt-u-deg.d3 .pt-u-pod-coluna { height: 16px; background: #e9a26b; font-size: 11px; }
.pt-u-cort-cols { display: flex; }
.pt-ativs.pt-u-cols { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 70px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; align-items: stretch; }
.pt-u-col { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; justify-items: center; min-width: 0; }
.pt-u-col-n { font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pt-u-col-b { width: 100%; max-width: 26px; display: flex; align-items: flex-end; border-radius: 5px 5px 0 0; background: color-mix(in srgb, var(--texto) 10%, transparent); }
.pt-u-col-b i { display: block; width: 100%; height: 0; border-radius: 5px 5px 0 0; background: #2563eb; }
.pt-u-col.cheio .pt-u-col-b i { background: #059669; }
@media (prefers-reduced-motion: no-preference) { .pt-u-col-b i { transition: height 1.2s ease-out; } }
.pt-u-col-k { font-size: 11px; opacity: .85; }
.pt-u-prog-cab { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pt-u-anel { width: 72px; height: 72px; flex: none; }
.pt-u-anel-f { stroke: color-mix(in srgb, var(--texto) 12%, transparent); }
.pt-u-anel-v { stroke: #059669; }
.pt-u-anel-t { fill: var(--texto); }
.pt-u-leg { margin: 0; font-size: 13px; opacity: .85; }
.pt-ativs.pt-u-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
.pt-u-lista li { display: grid; grid-template-columns: minmax(0, 1fr) 32% auto; align-items: center; gap: 8px; font-size: 14px; }
.pt-u-li-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-u-li-n { font-variant-numeric: tabular-nums; font-weight: 700; }
.pt-u-lista li.cheio .pt-u-barra-in { background: #059669; }
.pt-u-dir li[hidden] { display: none !important; }
li.pt-u-mais { display: block !important; font-size: 13px; opacity: .8; }
.pt-u-selos-l { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 2px 8px; }
.pt-u-selos-l li { display: flex; align-items: center; gap: 5px; font-size: 13px; min-width: 0; }
.pt-u-selos-l li:not(.ganho) { opacity: .6; }
.pt-u-selos-l svg { width: 18px; height: auto; flex: none; }
.pt-u-selo-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-u-feed { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.pt-u-feed li { display: flex; align-items: center; gap: 6px; font-size: 14px; padding: 3px 6px; border-radius: 8px; }
.pt-u-feed li > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-u-feed li small { flex: none; opacity: .8; }
.pt-u-feed svg { width: 18px; height: 18px; flex: none; }
.pt-u-feed li.novo { background: color-mix(in srgb, #f5b301 18%, transparent); }
@media (max-width: 1199px) {
  header.aula-topo.pt-u-topo { grid-template-columns: minmax(0, 1fr) auto; }
  .pt-u-cmd { grid-column: 1 / -1; max-width: none; }
}
@media (min-width: 761px) and (min-height: 500px) {
  html.pt-unico-pag body { overflow: hidden; }
  html.pt-unico-pag #raiz.prof { max-width: none; padding: 8px 14px; }
  html.pt-unico-pag .rodape-credito, html.pt-unico-pag .chf-botao { display: none !important; }
  .pt-u { display: grid; grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - 16px); }
}
@media (max-width: 760px), (max-height: 499px) {
  .pt-u-topo, header.aula-topo.pt-u-topo { grid-template-columns: 1fr; flex-wrap: wrap; }
  .pt-u-corpo { grid-template-columns: 1fr; }
  .pt-u-al { aspect-ratio: 1.25; }
  .pt-u-caixa, .pt-u-cort, .pt-u-bloco { overflow: visible; }
  .pt-numeros.pt-u-kpis { flex-wrap: wrap; justify-content: flex-start; }
  .pt-u-prog, .pt-u-conq, .pt-u-selos { flex: none; }
  .pt-u-cort-cols { height: 160px; }
}
@media print { .pt-u-cmd { display: none !important; } }

/* O bloco a ser arrastado nas ajudas (2.309.0): «Põe por mim», o bloco marcado e «Ver como se faz» */
@media (prefers-reduced-motion: no-preference) {
  .bl-fantasma.bl-voo { transition: transform .9s cubic-bezier(.3, .7, .3, 1); }
  .bl-fantasma.ap-demo-bloco { transition: left .7s ease-in-out, top .7s ease-in-out; }
}
.bl-fantasma.ap-demo-bloco { z-index: 9050; }
.bl-pilha.ap-demo-levado { opacity: .3; }

/* Grupos: grupo novo vazio (2.310.0) */
.gr-vazio-g { border-style: dashed; }
.gr-largar-aqui { margin: 0; flex: 1; min-height: 110px; display: grid; place-items: center; border: 2px dashed color-mix(in srgb, var(--texto) 30%, transparent); border-radius: 12px; opacity: .8; text-align: center; }
@media print { .gr-vazio-g { display: none !important; } }

/* Solução do professor em «O que tens por fazer» (2.312.0) */
.pf-sol-ex { margin: 4px 0 6px; font-size: .92em; color: var(--suave); }

/* Novidades das apps (2.312.0): janela com o logótipo e o que se faz em cada app */
.ferr-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ferr-cab h2 { margin: 0; }
dialog.apps-nov { width: min(980px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow: auto; padding: 0; border: 3px solid var(--tinta, #1b1b3a); border-radius: 22px; background: var(--papel); color: var(--texto); box-shadow: 6px 6px 0 var(--tinta, #1b1b3a); }
dialog.apps-nov::backdrop { background: rgba(11, 18, 40, .62); }
.apps-nov-cab { position: relative; padding: 22px 56px 14px 24px; background: linear-gradient(120deg, #fff1d6, #e0f2fe); color: #1b1b3a; border-bottom: 3px solid var(--tinta, #1b1b3a); }
.apps-nov-cab h2 { margin: 0 0 6px; font-size: clamp(20px, 3vw, 28px); }
.apps-nov-cab p { margin: 0; max-width: 60ch; }
.apps-nov-x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #1b1b3a; background: #fff; color: #1b1b3a; font-size: 24px; line-height: 1; cursor: pointer; }
.apps-nov-grelha { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; padding: 18px 20px; }
.apps-nov-cartao { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 2px solid var(--tinta, #1b1b3a); border-radius: 16px; background: var(--fcb, var(--papel)); color: #1b1b3a; box-shadow: 3px 3px 0 var(--tinta, #1b1b3a); animation: apps-nov-entra .45s ease both; animation-delay: calc(var(--i, 0) * 80ms); }
.apps-nov-logo { flex: none; width: 60px; height: 60px; }
.apps-nov-txt h3 { margin: 0 0 6px; display: flex; flex-direction: column; font-size: 20px; }
.apps-nov-txt h3 small { font-size: 14px; font-weight: 600; color: #374151; }
.apps-nov-txt ul { margin: 0 0 10px; padding-left: 18px; }
.apps-nov-txt li { margin: 2px 0; }
.apps-nov-pede { margin: 0; font-size: 14px; color: #374151; }
.apps-nov-pe { display: flex; justify-content: flex-end; padding: 0 20px 18px; }
@keyframes apps-nov-entra { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .apps-nov-cartao { animation: none; } }
.apps-nov-txt li.apps-nov-novo { margin-top: 6px; list-style: none; margin-left: -18px; padding: 4px 8px; border: 2px dashed currentColor; border-radius: 10px; background: rgba(255, 255, 255, .55); }

/* Aviso das línguas (2.327.0) */
dialog.ling-nov { width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow: auto; padding: 0; border: 3px solid var(--tinta, #1b1b3a); border-radius: 22px; background: var(--papel); color: var(--texto); box-shadow: 6px 6px 0 var(--tinta, #1b1b3a); }
dialog.ling-nov::backdrop { background: rgba(11, 18, 40, .62); }
.ling-nov-cab { position: relative; padding: 22px 56px 14px 24px; background: linear-gradient(120deg, #e0f2fe, #fef3c7); color: #1b1b3a; border-bottom: 3px solid var(--tinta, #1b1b3a); }
.ling-nov-cab h2 { margin: 0 0 6px; font-size: clamp(20px, 3vw, 28px); }
.ling-nov-cab p { margin: 0; max-width: 62ch; }
.ling-nov-grelha { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding: 18px 20px 8px; }
.ling-nov-bt { position: relative; overflow: hidden; display: flex; flex-direction: row; align-items: stretch; gap: 0; padding: 0; min-height: 118px; border: 2px solid var(--tinta, #1b1b3a); border-radius: 16px; background: #fff; color: #1b1b3a; box-shadow: 3px 3px 0 var(--tinta, #1b1b3a); cursor: pointer; text-align: left; font: inherit; }
.ling-nov-bt:hover, .ling-nov-bt:focus-visible { background: #e0f2fe; }
.ling-nov-bt.atual { border-width: 3px; box-shadow: 0 0 0 3px #0b2540, 3px 3px 0 var(--tinta, #1b1b3a); }
.ling-nov-ola { font-size: 22px; }
.ling-nov-nome { font-weight: 700; }
.ling-nov-bt small { font-size: 13px; color: #374151; }
.ling-nov-nota { margin: 6px 20px 12px; font-size: 14px; color: var(--texto-2, #4b5563); }
/* 2.330.0: as cores da bandeira em riscas à esquerda (a versão D da maqueta), sem animação; a língua em uso tem a faixa mais larga. */
.ling-nov-riscas { flex: none; width: 22px; display: flex; flex-direction: column; border-right: 2px solid var(--tinta, #1b1b3a); }
.ling-nov-riscas i { flex: 1; }
.ling-nov-txt { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 12px; min-width: 0; }
.ling-nov-ola { font-size: 24px; }
.ling-nov-bt.atual .ling-nov-riscas { width: 38px; }
.ling-nov-agora { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; background: #fff; color: #1b1b3a; border: 2px solid var(--tinta, #1b1b3a); border-radius: 999px; padding: 0 8px; }
/* Nos botões do topo da página inicial, a bandeira em riscas pequenas antes do nome. */
.hero-ling { display: inline-flex; align-items: center; gap: 6px; }
.hero-ling-cor { display: inline-flex; flex-direction: column; width: 18px; height: 13px; border-radius: 3px; overflow: hidden; border: 1px solid rgba(0, 0, 0, .45); flex: none; }
.hero-ling-cor i { flex: 1; }


/* Applab: separador PYTHON (2.313.0) */
.ap-ide[data-aba="python"] { grid-template-columns: minmax(0, 1fr) 330px; }
.ap-ide[data-aba="python"] .ap-col-esq, .ap-ide[data-aba="python"] .ap-col-dir, .ap-ide[data-aba="python"] .ap-zona-blocos { display: none; }
.ap-ide:not([data-aba="python"]) .ap-zona-python { display: none; }
.ap-ide[data-aba="python"] .ap-zona-python { order: -1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ap-ide[data-aba="blocos"] .ap-zona-python { display: none; }
.ap-py-nota { margin: 0; }
.ap-py-ver { max-height: 70vh; overflow: auto; margin: 0; }
.ap-py-erro { margin: 0; color: var(--c-erro, #b42318); font-weight: 600; min-height: 1.2em; }
.ap-py-ajuda code { font-size: .9em; }
.ap-py-ajuda li { margin: 4px 0; }
@media (max-width: 1100px) { .ap-ide[data-aba="python"] { grid-template-columns: 1fr; } }
.p3-video-tela { display: block; width: 100%; height: auto; border: 2px solid var(--tinta, #1b1b3a); border-radius: 10px; background: #000; }
/* Tema do grupo na ficha e simuladores da aula (2.318.0). */
.tema-aluno-grupo { font-size: 14px; margin-top: 2px; opacity: .85; }
.tl-hoje-sims { margin: 10px 0 4px; }
.tl-hoje-sims h4 { margin: 0 0 6px; }
.tl-hoje-sims-lista { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 6px; }
.tl-hoje-sim { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; }
.tl-hoje-sim a { font-weight: 700; }

/* Simuladores e ferramentas de cada tempo da planificação (2.318.2). */
.pl-sims { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; }
.pl-sim small { color: var(--muted); }
.ah-sims { margin: 4px 0; }
.ah-sim { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* Apresentação: um filme de stop motion a passar (2.318.4). */
.ap-anim { flex: 1; min-height: 0; display: grid; grid-template-columns: 62fr 38fr; gap: 2.4cqw; align-items: start; }
.ap-anim-fig { margin: 0; min-width: 0; }
.ap-anim-tela { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: .2cqw solid var(--ap-borda); border-radius: 1.2cqw; box-shadow: 0 .5cqw 1.6cqw rgba(19, 32, 43, .18); background: #fff; }
.ap-anim-info { margin: .8cqw 0 0; font-size: 1.4cqw; color: var(--ap-suave, #475569); }
.ap-anim-lado { display: flex; flex-direction: column; gap: 1cqw; font-size: 1.7cqw; }
.ap-anim-bots { display: flex; flex-wrap: wrap; gap: .8cqw; }
.ap-anim .btn { font-size: 1.5cqw; padding: .6cqw 1.2cqw; min-height: 0; }
.ap-anim .btn.sel { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.ap-anim-rot { margin: .6cqw 0 0; font-weight: 700; }
.ap-anim-pontos { margin: .6cqw 0 0; padding-left: 2cqw; line-height: 1.35; display: flex; flex-direction: column; gap: .6cqw; }
.ap-capa-fotos.paisagem { flex-direction: column; right: 4cqw; }
.ap-capa-fotos.paisagem img, .ap-capa-fotos.paisagem img:nth-child(2) { height: auto; width: 30cqw; margin: -4cqw 0 0; }
.ap-capa-fotos.paisagem img:nth-child(1) { margin-top: 0; rotate: -5deg; }
.ap-capa-fotos.paisagem img:nth-child(2) { translate: -6cqw 0; rotate: 3deg; }
.ap-capa-fotos.paisagem img:nth-child(3) { rotate: -2deg; }
/* Galeria com imagens deitadas (16:9), em grelha (2.318.4). */
.ap-galeria.paisagem { flex: 0 0 auto; align-self: center; display: grid; grid-template-columns: repeat(3, 25cqw); justify-content: center; gap: 1.2cqw 2cqw; align-items: start; }
.ap-galeria.paisagem.n4 { grid-template-columns: repeat(2, 24cqw); }
.ap-galeria.paisagem.n3 { grid-template-columns: repeat(3, 28.5cqw); }
.ap-galeria.paisagem .ap-gal-item, .ap-galeria.paisagem.n6 .ap-gal-item { flex: none; }
.ap-galeria.paisagem .ap-gal-item img, .ap-galeria.paisagem.n6 .ap-gal-item img { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 1.2cqw; }

/* Grupos: o tema de cada grupo (2.319.0) */
.gr-tema-cx { margin: 0 0 10px; align-items: center; gap: 10px; flex-wrap: wrap; }
.gr-tema-ativ { max-width: 100%; }
.gr-tema-rot { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: .9rem; }
.gr-tema-rot span { font-weight: 700; color: var(--muted); }
.gr-tema-in { flex: 1; min-width: 0; }
.gr-tema { margin: 0 0 10px; font-weight: 700; font-size: 1.1rem; line-height: 1.25; }
.gr-tema-misto { color: var(--muted); font-weight: 400; font-style: italic; }
.gr-proj-ativ { display: none; }
html.gr-projetar .gr-proj-ativ { display: block; margin: 0 0 12px; font-size: 1.5rem; font-weight: 700; text-align: center; }
html.gr-projetar .gr-tema { font-size: clamp(1.2rem, 2.2vw, 2rem); }
html.gr-projetar .gr-tema-cx { display: none; }
.gr-por-revelar .gr-tema, .gr-por-revelar .gr-tema-rot { visibility: hidden; }
@media print { .gr-tema-cx { display: none !important; } .gr-proj-ativ { display: block; font-weight: 700; } }

/* Grupos da turma na página inicial do aluno (2.320.0) */
:root:not(.classico) .cab-nav-item.cn-grupos { background: #fde7c8; }
:root:not(.classico)[data-theme="dark"] .cab-nav-item.cn-grupos { background: #4a2c0a; color: #fde7c8; }
@media (prefers-color-scheme: dark) { :root:not(.classico):not([data-theme="light"]) .cab-nav-item.cn-grupos { background: #4a2c0a; color: #fde7c8; } }
.pf-grupos-ativ { margin: 0 0 10px; color: var(--muted); }
.pf-grupos-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.pf-grupo { background: var(--papel, var(--card-bg, #fff)); border: 2px solid var(--borda, #c9d4e0); border-radius: 16px; padding: 12px 14px; }
:root:not(.classico) .pf-grupo { border-color: var(--tinta); box-shadow: 3px 3px 0 var(--tinta); }
.pf-grupo.meu { border-width: 3px; border-color: #c2410c; background: #fff4e6; color: #1b1b3a; }
[data-theme="dark"] .pf-grupo.meu { background: #3a2208; color: #fde7c8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pf-grupo.meu { background: #3a2208; color: #fde7c8; } }
.pf-grupo-cab { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.pf-grupo-etq { font-size: .8rem; font-weight: 700; background: #c2410c; color: #fff; border-radius: 999px; padding: 2px 10px; }
.pf-grupo-tema { margin: 0 0 6px; font-weight: 700; }
.pf-grupo-membros { margin: 0; padding-left: 18px; }
.pf-grupo-membros li { margin: 2px 0; }
@media (max-width: 700px) { :root:not(.classico) .cab-nav .cn-grupos { display: none; } }

/* Montra da turma (2.322.0, public/admin-montra.js): os trabalhos dos alunos nas apps, para projetar. */
.mt-barra { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 12px 0 16px; }
.mt-filtros { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-filtro[aria-pressed="true"] { background: var(--tinta, var(--accent)); color: var(--papel); border-color: var(--tinta, var(--accent)); }
.mt-nomes-rot { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; }
.mt-apresentar { margin-left: auto; }
.mt-grelha { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mt-cartao { display: grid; gap: 8px; align-content: start; padding: 10px; border: 2px solid var(--tinta, var(--borda-in)); border-radius: 16px; background: var(--papel); color: var(--texto); box-shadow: 3px 3px 0 var(--sombra, transparent); }
.mt-ver { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 10px; }
.mt-ver:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }
.mt-img { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: #f1f5f9; position: relative; }
.mt-img .jg-mini, .mt-img .ds-folha { width: 100%; }
.mt-img-design { background: #e2e8f0; }
.mt-img-design > * { max-height: 100%; max-width: 100%; }
.mt-img-logo img { width: 40%; height: auto; }
.mt-txt { display: grid; gap: 2px; min-width: 0; }
.mt-tipo { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--suave); }
.mt-titulo { font-size: 16px; overflow-wrap: anywhere; }
.mt-autor { font-size: 14px; }
.mt-cartao .mt-abrir { justify-self: start; }
html.mt-a-apresentar body { overflow: hidden; }
.mt-palco { position: fixed; inset: 0; z-index: 70; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; padding: 16px 20px; background: #0b1020; color: #f8fafc; }
.mt-p-cab { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.mt-p-tit { margin: 0; font-size: clamp(22px, 3.4vw, 40px); }
.mt-p-sub { margin: 2px 0 0; color: #cbd5e1; font-size: 16px; }
.mt-p-bts { display: flex; gap: 8px; }
.mt-p-corpo { display: grid; place-items: center; min-height: 0; overflow: auto; gap: 12px; }
.mt-p-corpo .nota { color: #cbd5e1; }
.mt-p-corpo .sm-leitor { width: min(100%, calc((100dvh - 200px) * 16 / 9)); }
.mt-grande-img { width: min(100%, calc((100dvh - 200px) * 16 / 9)); display: grid; gap: 10px; justify-items: center; }
.mt-grande-img .mt-img { background: #1e293b; }
.mt-p-abrir { display: flex; justify-content: center; }

/* O logótipo da app na barra de cima de cada app (2.322.0, TP.marcaApp). */
.app-marca { display: inline-flex; align-items: center; gap: 6px; font: 700 17px/1 Lexend, system-ui, sans-serif; white-space: nowrap; }
.app-marca-img { width: 28px; height: 28px; flex: none; }
@media (max-width: 700px) { .app-marca b { display: none; } }

/* Nas apps de ecrã inteiro (Flipbook, Clipbox), os avisos do canto sobem acima da fita e da linha do tempo, sem tapar a barra de cima (2.322.0). */
html.sm-aberto .aviso-diaria, html.sm-aberto .aviso-avaliacao, html.sm-aberto .aviso-resolucao { bottom: 200px; }
html.vb-aberto .aviso-diaria, html.vb-aberto .aviso-avaliacao, html.vb-aberto .aviso-resolucao { bottom: 300px; }
@media (max-width: 900px) { html.sm-aberto .aviso-diaria, html.sm-aberto .aviso-avaliacao, html.sm-aberto .aviso-resolucao { bottom: 16px; } }

/* Menu da Administração no telemóvel (2.322.1): os botões das áreas ajustam-se ao texto e passam à linha seguinte,
   em vez de uma grelha de 4 colunas onde «Atividades» e «Visita guiada» não cabiam (a regra de 1100 px ganhava à de 560 px). */
@media (max-width: 600px) {
  .nav-admin2 .nav-n1 { display: flex; flex-wrap: wrap; gap: 8px; }
  .nav-admin2 .nav-btn.nav-area, :root:not(.classico) .nav-admin2 .nav-btn.nav-area { flex: 1 1 auto; align-items: center; text-align: center; padding: 8px 12px; border-radius: 14px; }
  .nav-admin2 .nav-area-rot { font-size: 15px; white-space: nowrap; }
}

/* Apresentações com mais cor (2.323.0): listas em cartões com uma cor por linha e o diapositivo «Pergunta rápida». */
.ap-lista ul { gap: 1cqw; }
.ap-lista li { --li: #107c41; --li-bg: #eef7f1; background: var(--li-bg); border-left: .6cqw solid var(--li); border-radius: 1cqw; padding: .7cqw 1.4cqw .7cqw 1.2cqw; }
.ap-lista li .ap-marca { background: var(--li); margin-top: .8cqw; }
.ap-lista li.ap-li1 { --li: #1d6fb8; --li-bg: #eef4fb; }
.ap-lista li.ap-li2 { --li: #c2410c; --li-bg: #fdf2eb; }
.ap-lista li.ap-li3 { --li: #7c3aed; --li-bg: #f4effe; }
.ap-lista li.ap-li4 { --li: #0f766e; --li-bg: #ebf7f5; }
.ap-lista ul.ap-muitos { font-size: 2cqw; gap: .7cqw; }
.ap-lista ul.ap-muitos li { padding: .5cqw 1.2cqw .5cqw 1cqw; }
ol.ap-passos > li:nth-child(5n+2) .ap-num { background: #1d6fb8; }
ol.ap-passos > li:nth-child(5n+3) .ap-num { background: #c2410c; }
ol.ap-passos > li:nth-child(5n+4) .ap-num { background: #7c3aed; }
ol.ap-passos > li:nth-child(5n+5) .ap-num { background: #0f766e; }
.ap-perg-dia { gap: 1.6cqw; }
.ap-perg { margin: 0; font-size: 3cqw; font-weight: 700; line-height: 1.25; color: var(--ap-tinta); }
.ap-ops { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4cqw; }
.ap-ops.n2 { grid-template-columns: 1fr 1fr; }
.ap-op { --op: #b42318; display: flex; align-items: center; gap: 1.4cqw; min-height: 8cqw; padding: 1cqw 1.6cqw; border: .3cqw solid var(--op); border-radius: 1.4cqw; background: #fff; color: var(--ap-tinta); font: inherit; font-size: 2.2cqw; font-weight: 600; text-align: left; cursor: pointer; box-shadow: 0 .5cqw 0 var(--op); transition: transform .12s, box-shadow .12s, opacity .2s; }
.ap-op:hover { transform: translateY(-.2cqw); }
.ap-op:focus-visible { outline: .4cqw solid #13202b; outline-offset: .3cqw; }
.ap-op1 { --op: #1d4ed8; } .ap-op2 { --op: #8a4b00; } .ap-op3 { --op: #0f7a3d; }
.ap-op-letra { flex: 0 0 auto; width: 4.6cqw; height: 4.6cqw; border-radius: 1cqw; background: var(--op); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 2.4cqw; }
.ap-op-txt { flex: 1; }
.ap-op.certa { background: #e7f6ec; border-color: #0f7a3d; box-shadow: 0 .5cqw 0 #0f7a3d; }
.ap-op.errada { opacity: .45; box-shadow: none; }
.ap-op.errada.escolhida { opacity: .8; border-style: dashed; }
.ap-op-ok { flex: 0 0 auto; width: 4cqw; height: 4cqw; border-radius: 50%; background: #0f7a3d; color: #fff; display: flex; align-items: center; justify-content: center; }
.ap-op-ok .ap-ico { width: 2.6cqw; height: 2.6cqw; }
.ap-perg-pe { margin: 0; font-size: 1.9cqw; color: var(--ap-suave); }
.ap-perg-pe.ap-perg-expl { color: var(--ap-tinta); background: #fff8e1; border: .25cqw solid #e0b000; border-radius: 1.2cqw; padding: 1cqw 1.6cqw; font-size: 2cqw; }
@media (prefers-reduced-motion: reduce) { .ap-op { transition: none; } .ap-op:hover { transform: none; } }
.ap-mcompacta .ap-folha { font-size: 1.25cqw; }
.ap-mcompacta .ap-folha td { height: 1.75cqw; }
.ap-mcompacta .ap-sub { font-size: 1.7cqw; }
ol.ap-passos:has(> li:nth-child(6)) { font-size: 1.85cqw; gap: .6cqw; }
ol.ap-passos:has(> li:nth-child(6)) > li { padding: .5cqw 1.2cqw; }
ol.ap-passos:has(> li:nth-child(6)) .ap-num { width: 3cqw; height: 3cqw; }
.ap-mcompacta .ap-folha td, .ap-mcompacta .ap-folha th { line-height: 1.15; padding-top: 0; padding-bottom: 0; }
.ap-mcompacta .ap-separadores { padding-top: .2cqw; padding-bottom: .2cqw; }

/* Apresentações com a cor do tema da aula (2.325.0): `cor` em cada apresentação, classe `ap-cor-<cor>` no body. As cores principais têm
   4,5:1 ou mais com o branco; a clara é o fundo dos destaques. */
.pagina-apresentacao.ap-cor-laranja { --ap-verde: #c2410c; --ap-verde-esc: #9a3412; --ap-verde-claro: #ffedd5; }
.pagina-apresentacao.ap-cor-teal { --ap-verde: #0f766e; --ap-verde-esc: #115e59; --ap-verde-claro: #d5f3f0; }
.pagina-apresentacao.ap-cor-azul { --ap-verde: #1d4ed8; --ap-verde-esc: #1e3a8a; --ap-verde-claro: #dbe6ff; }
.pagina-apresentacao.ap-cor-vermelho { --ap-verde: #b91c1c; --ap-verde-esc: #7f1d1d; --ap-verde-claro: #fee2e2; }
.pagina-apresentacao.ap-cor-violeta { --ap-verde: #5b34d6; --ap-verde-esc: #3f1f9e; --ap-verde-claro: #e6e0ff; }
.pagina-apresentacao.ap-cor-roxo { --ap-verde: #6d28d9; --ap-verde-esc: #4c1d95; --ap-verde-claro: #ede4ff; }
.pagina-apresentacao.ap-cor-verde { --ap-verde: #047857; --ap-verde-esc: #065f46; --ap-verde-claro: #d3f3e6; }

/* Escolha da língua (2.326.0, public/i18n.js): no rodapé e no cabeçalho da página inicial e das páginas de entrada das apps. */
label.i18n-caixa { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border: 2px solid var(--tinta, #1b1b3a); border-radius: 999px; background: var(--papel, #fff); color: var(--tinta, #1b1b3a); font-weight: 700; cursor: pointer; vertical-align: middle; }
label.i18n-cab { margin-right: 6px; }
svg.i18n-globo { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
select.i18n-lingua { font: inherit; font-size: 14px; font-weight: 700; padding: 3px 2px; border: 0; background: transparent; color: inherit; cursor: pointer; max-width: 8.5em; }
select.i18n-lingua:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 6px; }
:root:not(.classico) select.i18n-lingua, select.i18n-lingua { border: 0; box-shadow: none; background: transparent; min-height: 0; }

/* Versão pública no rodapé da página inicial (2.328.0) */
.rodape-credito .versao-pub { display: inline-block; margin-left: 4px; padding: 1px 8px; border: 1px solid var(--borda); border-radius: 999px; font-weight: 600; white-space: nowrap; }

/* Línguas e versão por baixo do nome da escola (2.328.1) */
.hero-linguas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 6px 0 10px; font-size: 14px; position: relative; z-index: 1; }
.hero-versao { display: inline-block; padding: 2px 10px; border-radius: 999px; border: 2px solid currentColor; font-weight: 700; white-space: nowrap; }
.hero-ling-rot { font-weight: 600; }
.hero-ling-lista { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.hero-ling { font: inherit; font-size: 14px; padding: 3px 10px; border-radius: 999px; border: 2px solid currentColor; background: transparent; color: inherit; cursor: pointer; }
.hero-ling:hover, .hero-ling:focus-visible { background: rgba(255, 255, 255, .22); }
.hero-ling.atual { background: #fff; color: #0b2540; border-color: #fff; font-weight: 700; }
.cabeca-img .hero-ling.atual { background: var(--tinta, #1b1b3a); color: var(--papel, #fff); border-color: var(--tinta, #1b1b3a); }

/* 2.328.2: janela das línguas no modo escuro (o cabeçalho claro com o título em azul-claro não se lia). */
.ling-nov-cab h2 { color: #0b2540; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ling-nov-cab { background: linear-gradient(120deg, #0c2a44, #2e2a10); color: #f1f5f9; }
  :root:not([data-theme="light"]) .ling-nov-cab h2 { color: #fff; }
  :root:not([data-theme="light"]) .ling-nov-bt { background: #1e293b; color: #f1f5f9; }
  :root:not([data-theme="light"]) .ling-nov-bt small { color: #cbd5e1; }
  :root:not([data-theme="light"]) .ling-nov-bt:hover, :root:not([data-theme="light"]) .ling-nov-bt:focus-visible { background: #243b55; }
  :root:not([data-theme="light"]) .ling-nov-bt.atual { box-shadow: 0 0 0 3px #7dd3fc, 3px 3px 0 var(--tinta, #1b1b3a); }
  :root:not([data-theme="light"]) .ling-nov-agora { background: #0f172a; color: #f1f5f9; }
}
:root[data-theme="dark"] .ling-nov-cab { background: linear-gradient(120deg, #0c2a44, #2e2a10); color: #f1f5f9; }
:root[data-theme="dark"] .ling-nov-cab h2 { color: #fff; }
:root[data-theme="dark"] .ling-nov-bt { background: #1e293b; color: #f1f5f9; }
:root[data-theme="dark"] .ling-nov-bt small { color: #cbd5e1; }
:root[data-theme="dark"] .ling-nov-bt:hover, :root[data-theme="dark"] .ling-nov-bt:focus-visible { background: #243b55; }
:root[data-theme="dark"] .ling-nov-bt.atual { box-shadow: 0 0 0 3px #7dd3fc, 3px 3px 0 var(--tinta, #1b1b3a); }
:root[data-theme="dark"] .ling-nov-agora { background: #0f172a; color: #f1f5f9; }

/* 2.328.2: cabeçalho da página inicial no telemóvel: o logótipo TIC do tamanho do do agrupamento e os botões numa linha,
   alinhados à esquerda, com Teams, Email e o modo claro/escuro só com o ícone (o nome fica no aria-label e no title). */
@media (max-width: 700px) {
  :root:not(.classico) .cab-marca { max-width: none; flex: 1 1 100%; }
  :root:not(.classico) .cab-marca img { height: 44px; }
  :root:not(.classico) .cab-marca img.logo-tic { width: 44px; height: 44px; }
  :root:not(.classico) .cab-pag .cab-in .quem { width: 100%; margin-left: 0; justify-content: flex-start; gap: 6px; flex-wrap: nowrap; }
  :root:not(.classico) .cab-pag .quem .cab-teams, :root:not(.classico) .cab-pag .quem .cab-mail, :root:not(.classico) .cab-pag .quem .cab-tema { font-size: 0; width: 44px; height: 44px; min-width: 44px; padding: 0; justify-content: center; gap: 0; flex: none; }
  :root:not(.classico) .cab-pag .quem .cab-teams svg.ico, :root:not(.classico) .cab-pag .quem .cab-mail svg.ico { width: 20px; height: 20px; margin: 0; }
  :root:not(.classico) .cab-pag .quem .cab-tema::before { content: ""; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset -6px -3px 0 0 currentColor; }
  :root:not(.classico) .cab-pag .quem label.i18n-caixa { flex: 0 1 auto; min-width: 0; }
  :root:not(.classico) .cab-pag .quem label.i18n-caixa select { min-width: 0; max-width: 120px; }
  :root:not(.classico) .cab-pag .quem .avatar-menu { margin-left: auto; flex: none; }
  :root:not(.classico) .cab-pag .quem .avatar-menu > summary.menu-btn { width: 44px; height: 44px; min-width: 44px; }
}
/* 2.328.2: no telemóvel a ilustração da saudação não tapa o nome por cima; e o seletor de língua encolhe em ecrãs de 360 px. */
@media (max-width: 760px) { :root:not(.classico) .hero:not(.hero-entrada) > .k { max-width: calc(100% - 176px); } }
@media (max-width: 380px) { :root:not(.classico) .cab-pag .quem label.i18n-caixa select { max-width: 92px; } :root:not(.classico) .cab-pag .cab-in .quem { gap: 4px; } }

/* Mural da turma (2.329.0): cores das reações (claro e escuro), vista do professor (.mu-*) e do aluno (.mural-*). */
:root { --mu-gostei: #047857; --mu-percebi: #1d4ed8; --mu-duvida: #c2410c; --mu-dificil: #6d28d9; --mu-hoje: #1d4ed8; --mu-hoje-bg: #e8f0ff; --mu-duv-bg: #ffe4d2; --mu-sel-bg: #dbe6ff; --mu-esc-bg: #fff7ed; --mu-esc: #9a3412; --mu-aviso-bg: #fffbeb; --mu-aviso: #78350f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --mu-gostei: #5cc7a5; --mu-percebi: #8fb4ff; --mu-duvida: #fdba74; --mu-dificil: #c4b5fd; --mu-hoje: #8fb4ff; --mu-hoje-bg: #13233a; --mu-duv-bg: #3a2414; --mu-sel-bg: #1c2f52; --mu-esc-bg: #2a1d12; --mu-esc: #fdba74; --mu-aviso-bg: #2b2410; --mu-aviso: #fcd34d; } }
:root[data-theme="dark"] { --mu-gostei: #5cc7a5; --mu-percebi: #8fb4ff; --mu-duvida: #fdba74; --mu-dificil: #c4b5fd; --mu-hoje: #8fb4ff; --mu-hoje-bg: #13233a; --mu-duv-bg: #3a2414; --mu-sel-bg: #1c2f52; --mu-esc-bg: #2a1d12; --mu-esc: #fdba74; --mu-aviso-bg: #2b2410; --mu-aviso: #fcd34d; }
svg.mu-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mu-ico-gostei { color: var(--mu-gostei); } .mu-ico-percebi { color: var(--mu-percebi); } .mu-ico-duvida { color: var(--mu-duvida); } .mu-ico-dificil { color: var(--mu-dificil); }
/* Professor */
.mu-sec { padding: 0; background: none; border: 0; box-shadow: none; }
.mu-ir-ativ { margin: 0 0 14px; padding: 10px 14px; border: 2px solid var(--tinta, var(--line)); border-radius: 14px; background: var(--papel, var(--card-bg, #fff)); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.mu-grelha { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.mu-col { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.mu-lado { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.mu-lista { display: flex; flex-direction: column; gap: 20px; }
.mu-novo { display: flex; flex-direction: column; gap: 12px; }
.mu-novo-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.mu-novo-cab h2 { margin: 0; }
.mu-novo-cab .mu-novo-fechar { margin-left: auto; }
.mu-novo-fechado { margin: 0 0 14px; }
.mu-novo-abrir { font-size: 1.05rem; }
.mu-novo input, .mu-novo textarea, .mu-novo select { max-width: 100%; min-width: 0; box-sizing: border-box; }
.mu-novo .mu-campos > label { min-width: 0; }
.mu-campos { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 12px; }
.mu-campos label, .mu-c-txt { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.mu-texto { width: 100%; box-sizing: border-box; resize: vertical; font: inherit; }
.mu-rot { font-weight: 700; font-size: 14px; }
.mu-nesta { display: flex; flex-direction: column; gap: 8px; }
.mu-itens, .mu-at, .mu-fut { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mu-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 2px solid var(--borda); border-radius: 14px; }
.mu-item-t { flex: 1; min-width: 140px; font-weight: 600; }
.mu-item-lig input { flex: 1 1 160px; min-width: 0; }
.mu-juntar { display: flex; flex-wrap: wrap; gap: 8px; }
.mu-juntar select { max-width: 100%; }
.mu-pe { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-top: 12px; border-top: 2px dashed var(--borda); }
.mu-quando-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mu-quando { display: inline-flex; border: 2px solid var(--tinta, var(--texto)); border-radius: 999px; overflow: hidden; }
.mu-quando-bt { min-height: 40px; padding: 0 14px; border: 0; background: var(--papel); color: var(--texto); font: inherit; font-weight: 600; cursor: pointer; }
.mu-quando-bt + .mu-quando-bt { border-left: 2px solid var(--tinta, var(--texto)); }
.mu-quando-bt.sel { background: var(--tinta, var(--texto)); color: var(--papel); }
.mu-pub label { font-weight: 600; font-size: 14px; }
.mu-chk { display: inline-flex; align-items: center; gap: 8px; }
.mu-esp { flex: 1; }
.mu-post { display: flex; flex-direction: column; gap: 10px; }
.mu-post.mu-hoje { border-color: var(--mu-hoje); }
.mu-post-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; }
.mu-etqs, .mu-post-ac { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mu-estado, .mu-fix { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 13px; border: 2px solid var(--borda-in); }
.mu-e-hoje { background: var(--mu-hoje); color: var(--papel); border-color: var(--mu-hoje); }
.mu-post-tit { margin: 0; font-size: 22px; }
.mu-post-txt { margin: 0; white-space: pre-line; line-height: 1.55; max-width: 75ch; }
.mu-at li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mu-reac { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-top: 2px solid var(--borda); border-bottom: 2px solid var(--borda); }
.mu-r { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 2px solid var(--borda); border-radius: 999px; font-size: 14px; }
.mu-r.forte { border-color: var(--mu-duvida); background: var(--mu-duv-bg); }
.mu-quem { flex-basis: 100%; font-size: 14px; }
.mu-quem ul { margin: 6px 0 0; padding-left: 18px; }
.mu-coms { display: flex; flex-direction: column; gap: 12px; }
.mu-coms h4 { margin: 0; }
.mu-com { display: flex; gap: 10px; align-items: flex-start; }
.mu-com.prof { margin-left: 44px; }
.mu-av, .mural-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; background: var(--mu-sel-bg); color: var(--texto); }
.mu-com.prof .mu-av, .mural-com.prof .mural-av { background: var(--tinta, var(--texto)); color: var(--papel); }
.mu-com-c { flex: 1; min-width: 0; }
.mu-com-t { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.mu-com-esc { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 2px dashed var(--mu-esc); border-radius: 14px; background: var(--mu-esc-bg); color: var(--texto); }
.mu-com-esc p { margin: 0; }
.mu-com-ac, .mu-mod-bts { display: flex; flex-wrap: wrap; gap: 8px; }
.mu-mod { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 2px solid var(--mu-esc); border-radius: 14px; background: var(--mu-aviso-bg); }
.mu-mots { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.mu-mot { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.mu-resp-linha { display: flex; gap: 8px; }
.mu-resp { flex: 1; min-width: 0; }
.mu-lado h3 { margin: 0 0 8px; font-size: 17px; }
.mu-fut li { display: flex; gap: 8px; align-items: center; }
.mu-fut-bt { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 2px solid var(--tinta, var(--borda-in)); border-radius: 14px; background: var(--papel); color: var(--texto); font: inherit; cursor: pointer; }
.mu-fut li.rasc .mu-fut-bt { border-style: dashed; }
.mu-fut-bt small { color: var(--mu-hoje); font-weight: 700; }
.mu-duvidas.tem { border-color: var(--mu-duvida); }
.mu-duvidas ul, .mu-sil { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mu-duvidas li, .mu-sil li { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.mu-n { display: inline-flex; min-width: 24px; justify-content: center; padding: 0 6px; border-radius: 999px; background: var(--mu-duv-bg); color: var(--texto); font-size: 13px; }
@media (max-width: 640px) { .mu-campos { grid-template-columns: minmax(0, 1fr); } .mu-com.prof { margin-left: 20px; } }
/* Aluno */
.mural-al { display: flex; flex-direction: column; gap: 16px; margin: 22px 0; }
.mural-titulo { margin: 0; font-size: 26px; }
.mural-post { border: 3px solid var(--tinta, var(--borda-in)); border-radius: 22px; background: var(--papel); box-shadow: 5px 5px 0 var(--sombra, transparent); overflow: hidden; }
.mural-cab { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; border-bottom: 2px solid var(--borda); }
.mural-post.hoje .mural-cab { background: var(--mu-hoje-bg); }
.mural-etq { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 13px; background: var(--mu-hoje); color: var(--papel); }
.mural-fix { font-size: 13px; font-weight: 700; color: var(--suave); }
.mural-tit { margin: 0; font-size: 22px; line-height: 1.2; }
.mural-txt { margin: 0; white-space: pre-line; line-height: 1.55; }
.mural-quem { color: var(--suave); }
.mural-sec { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; border-bottom: 2px solid var(--borda); }
.mural-sec:last-child { border-bottom: 0; }
.mural-sec h3 { margin: 0; font-size: 16px; }
.mural-itens { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mural-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--tinta, var(--borda-in)); border-radius: 14px; text-decoration: none; color: var(--texto); background: var(--papel); min-height: 44px; }
.mural-item:hover { background: var(--mu-sel-bg); }
.mural-item-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mural-item-t small { color: var(--suave); }
.mural-barra { display: block; margin-top: 4px; height: 8px; border-radius: 999px; background: var(--borda); overflow: hidden; }
.mural-barra i { display: block; height: 100%; background: var(--mu-gostei); }
.mural-est { flex: none; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 2px solid var(--borda-in); }
.mural-est.est-feita { border-color: var(--mu-gostei); color: var(--mu-gostei); }
.mural-est.est-meio { border-color: var(--mu-percebi); color: var(--mu-percebi); }
.mural-est.est-por { border-color: var(--mu-duvida); color: var(--mu-duvida); }
.mural-reac { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mural-r { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 6px 10px; border: 2px solid var(--borda-in); border-radius: 14px; background: var(--papel); color: var(--texto); font: inherit; font-weight: 600; cursor: pointer; }
.mural-r small { color: var(--suave); font-weight: 500; }
.mural-r.sel { border-color: var(--mu-percebi); background: var(--mu-sel-bg); box-shadow: 2px 2px 0 var(--mu-percebi); }
.mural-r-duvida.sel { border-color: var(--mu-duvida); background: var(--mu-duv-bg); box-shadow: 2px 2px 0 var(--mu-duvida); }
@media (max-width: 620px) { .mural-reac { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mural-coms { gap: 12px; }
.mural-com { display: flex; gap: 10px; align-items: flex-start; }
.mural-com.prof { margin-left: 30px; }
.mural-com-c { flex: 1; min-width: 0; }
.mural-com-c p { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.mural-com-c small { color: var(--suave); }
.mural-apagar { border: 0; background: none; color: var(--suave); text-decoration: underline; padding: 4px 0; font: inherit; font-size: 13px; cursor: pointer; }
.mural-com-rot { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.mural-com-txt { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; resize: vertical; }
.mural-nota { margin: 0; font-size: 14px; color: var(--suave); }
.mural-com-bts { display: flex; flex-wrap: wrap; gap: 8px; }
.mural-aviso { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 14px; border: 2px solid var(--mu-esc); border-radius: 16px; background: var(--mu-aviso-bg); color: var(--mu-aviso); }
.mural-aviso p { margin: 0; flex: 1 1 240px; }
.mural-antes { display: flex; flex-direction: column; gap: 10px; }
.mural-antes h3 { margin: 6px 0 0; }
.mural-ant > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 12px 14px; border: 2px solid var(--tinta, var(--borda-in)); border-radius: 16px; background: var(--papel); list-style: none; }
.mural-ant > summary::-webkit-details-marker { display: none; }
.mural-ant > summary .mural-etq { background: var(--borda); color: var(--texto); }
.mural-ant > summary small { color: var(--suave); }
.mural-ant[open] > summary { margin-bottom: 10px; }
.mu-sec label.mu-chk { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
.mu-sec label.mu-chk input { width: auto; margin: 0; }
.mu-sec textarea.mu-texto, .mural-al textarea.mural-com-txt { font-family: inherit; }
.mu-juntar select { width: auto; flex: 1 1 240px; min-width: 0; }
.mu-pub input { width: auto; }
.mu-sec label.mu-mot { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-weight: 500; }
.mu-sec label.mu-mot input { width: auto; margin: 0; }

/* Mensagem do professor ao aluno numa janela ao centro (2.332.0, notificarChat em comum.js). */
dialog.msg-prof { width: min(560px, calc(100vw - 32px)); padding: 0; border: 3px solid #7f1d1d; border-radius: 22px; background: #fff7f7; color: #1b1b3a; box-shadow: 0 0 0 8px rgba(239, 68, 68, .28), 0 24px 60px rgba(0, 0, 0, .45); }
dialog.msg-prof::backdrop { background: rgba(15, 10, 30, .55); }
.msg-prof-cab { display: flex; align-items: center; gap: 14px; padding: 18px 22px; background: #b91c1c; color: #fff; border-radius: 18px 18px 0 0; }
.msg-prof-cab h2 { margin: 0; font-size: 1.45rem; color: #fff; }
.msg-prof-cab small { display: block; opacity: .92; font-weight: 600; }
.msg-prof-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: #b91c1c; flex: none; }
.msg-prof-ico svg { width: 30px; height: 30px; }
.msg-prof-txt { margin: 0; padding: 22px 22px 6px; font-size: 1.25rem; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; max-height: 50vh; overflow: auto; }
.msg-prof-nota { margin: 6px 22px 0; color: #7f1d1d; font-weight: 600; }
.msg-prof-acoes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding: 18px 22px 22px; }
.msg-prof-acoes .msg-prof-ver { background: #b91c1c; color: #fff; border-color: #7f1d1d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) dialog.msg-prof { background: #2a1214; color: #fde8e8; border-color: #f87171; } :root:not([data-theme="light"]) .msg-prof-nota { color: #fca5a5; } }
:root[data-theme="dark"] dialog.msg-prof { background: #2a1214; color: #fde8e8; border-color: #f87171; }
:root[data-theme="dark"] .msg-prof-nota { color: #fca5a5; }
@media (prefers-reduced-motion: no-preference) { dialog.msg-prof[open] { animation: msg-prof-entra .3s ease-out; } }
@keyframes msg-prof-entra { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
/* ---------- Entregar os trabalhos das apps e avaliar por critérios (2.333.0) ---------- */
/* Janela «Entregar ao professor» das apps (public/entregar.js) */
.ent-dlg { max-width: min(560px, calc(100vw - 32px)); width: 100%; border: 2px solid var(--tinta, var(--borda)); border-radius: 16px; padding: 20px; background: var(--papel); color: var(--texto); }
.ent-dlg::backdrop { background: rgba(10, 15, 30, 0.55); }
.ent-dlg h2 { margin: 0 0 10px; font-size: 1.25rem; }
.ent-lista { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; max-height: 50vh; overflow: auto; }
.ent-op label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--borda); border-radius: 10px; cursor: pointer; }
.ent-op label:hover { background: var(--item-bg); }
.ent-op input { margin-top: 4px; flex: none; }
.ent-op.fechada label { cursor: default; opacity: 0.7; }
.ent-op-txt { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.ent-acoes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.ent-estado { min-height: 1.4em; margin: 8px 0 0; font-weight: 600; }
/* O campo da ficha onde se entrega (public/m/ficha/app.js) */
.cri-campo { display: grid; gap: 10px; }
.cri-entregue { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px; border: 2px solid var(--ok, var(--borda)); border-radius: 12px; background: var(--ok-bg, var(--item-bg)); color: var(--ok-txt, var(--texto)); }
.cri-logo { width: 44px; height: 44px; flex: none; }
.cri-info { display: grid; gap: 2px; flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.cri-tit { font-size: 1.05rem; }
.cri-lista { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 6px; }
.cri-lista li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* A cópia congelada que o professor vê (public/admin-entrega.js) */
.ent-vista { display: grid; gap: 10px; margin: 8px 0 4px; }
.ent-cab { margin: 0; overflow-wrap: anywhere; }
.ent-paginas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ent-paginas.alto { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.ent-pag { margin: 0; display: grid; gap: 4px; }
.ent-pag figcaption { font-size: 13px; color: var(--muted); }
.ent-folha { container-type: inline-size; border: 1px solid var(--borda); border-radius: 6px; overflow: hidden; }
.ent-folha .ds-folha { width: 100%; }
.ent-mini-jogo { border: 1px solid var(--borda); border-radius: 6px; overflow: hidden; aspect-ratio: 16 / 9; container-type: inline-size; }
.ent-mini-jogo .jg-mini { width: 100%; height: 100%; }
.ent-jogo:empty { display: none; }
.ent-jogo { min-height: 320px; }
.ent-sitio { max-height: 70vh; overflow: auto; border: 1px solid var(--borda); border-radius: 8px; container-type: inline-size; }
.ent-video-tela { width: 100%; max-width: 720px; display: block; border-radius: 8px; background: #000; }
.ent-app { display: grid; gap: 8px; justify-items: start; }
/* A grelha de critérios × níveis (public/admin-criterios.js) */
.rb-bloco { display: grid; gap: 12px; }
.rb-tit { margin: 6px 0 0; }
.rb-entregas { display: grid; gap: 8px; }
.rb-entrega { border: 1px solid var(--borda); border-radius: 10px; padding: 8px 12px; background: var(--papel); }
.rb-entrega > summary { cursor: pointer; font-weight: 700; overflow-wrap: anywhere; }
.rb-grelha { display: grid; gap: 12px; }
.rb-crit { border: 1px solid var(--borda); border-radius: 12px; padding: 10px 12px; background: var(--papel); }
.rb-crit-tit { margin: 0 0 8px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font-size: 1rem; }
.rb-peso { color: var(--muted); font-weight: 600; }
.rb-niveis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.rb-nivel { font: inherit; text-align: left; display: grid; align-content: start; gap: 2px; padding: 8px; border: 2px solid var(--borda); border-radius: 10px; background: var(--papel); color: var(--texto); cursor: pointer; min-width: 0; overflow-wrap: anywhere; }
.rb-nivel:hover:not(:disabled) { border-color: var(--accent); }
.rb-nivel:focus-visible { outline: 3px solid var(--foco, var(--accent)); outline-offset: 2px; }
.rb-nivel.sel, .rb-nivel.sel:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.rb-num { font-size: 1.2rem; line-height: 1; }
.rb-men { font-weight: 700; font-size: 13px; }
.rb-desc { font-size: 13px; line-height: 1.35; }
.rb-nota { margin: 0; font-size: 1.05rem; }
.rb-com-rot { display: grid; gap: 4px; }
.rb-com { width: 100%; min-height: 70px; }
.rb-bloco.sujo .rb-guardar { box-shadow: 0 0 0 3px var(--aviso, #f59e0b); }
.ed-rub-soma.erro { color: var(--erro-txt, #b91c1c); font-weight: 700; }
@media (max-width: 760px) { .rb-niveis { grid-template-columns: 1fr; } .rb-nivel { grid-template-columns: auto auto 1fr; align-items: baseline; column-gap: 8px; } }
/* A página da turma (admin-rubrica.html) */
.rb-pagina { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.rb-lado { position: sticky; top: 8px; display: grid; gap: 8px; max-height: calc(100vh - 16px); overflow: auto; }
.rb-alunos { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rb-al-bt { font: inherit; width: 100%; text-align: left; display: grid; gap: 1px; padding: 7px 10px; border: 1px solid var(--borda); border-radius: 8px; background: var(--papel); color: var(--texto); cursor: pointer; }
.rb-al-bt:hover { border-color: var(--accent); }
.rb-al-bt.sel, .rb-al-bt.sel:hover { border: 2px solid var(--accent); background: var(--accent); color: var(--on-accent); }
.rb-al-bt.sel .rb-al-est, .rb-al-bt.sel.feito .rb-al-est { color: var(--on-accent); }
.rb-al-bt.feito .rb-al-est { color: var(--ok-txt, var(--texto)); font-weight: 700; }
.rb-al-est { color: var(--muted); }
.rb-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 8px; }
.rb-nome { margin: 0; font-size: 1.2rem; text-align: center; flex: 1 1 200px; }
.rb-dlg { width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 2px solid var(--tinta, var(--borda)); border-radius: 16px; padding: 16px; background: var(--fundo, var(--papel)); color: var(--texto); }
.rb-dlg::backdrop { background: rgba(10, 15, 30, 0.55); }
.rb-dlg-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.rb-dlg-cab h2 { margin: 0; font-size: 1.2rem; }
.rb-modal { margin: 8px 0 14px; padding-top: 4px; }
@media (max-width: 860px) { .rb-pagina { grid-template-columns: 1fr; } .rb-lado { position: static; max-height: 240px; } }
/* O que o aluno vê na ficha (public/m/ficha/app.js) */

section.rb-aluno { border: 2px solid var(--borda); border-radius: 14px; padding: 12px 16px; margin: 12px 0; background: var(--papel); }
section.rb-aluno.avaliado { border-color: var(--accent); }
section.rb-aluno h3 { margin: 0 0 4px; }
.rb-al-lista { display: grid; gap: 6px; margin-top: 8px; }
.rb-al-crit { border: 1px solid var(--borda); border-radius: 10px; padding: 6px 10px; }
.rb-al-crit > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-weight: 700; }
.rb-al-n { padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 14px; }
.rb-al-niveis { margin: 8px 0 4px; padding-left: 0; list-style: none; display: grid; gap: 4px; }
.rb-al-niveis li { padding: 4px 8px; border-radius: 8px; overflow-wrap: anywhere; }
.rb-al-niveis li.sel { outline: 2px solid var(--accent); font-weight: 600; }
.rb-al-teu { font-weight: 700; }

/* ---------- Miniaturas dos trabalhos das apps (2.334.0, public/miniaturas.js) ---------- */
.pfm { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; background: var(--item-bg); border-radius: 12px 12px 0 0; }
.pfm > .pfm-logo { width: 56px; height: 56px; opacity: .55; }
.pfm .pfm-in { position: absolute; top: 0; left: 0; transform-origin: 0 0; pointer-events: none; }
.pfm .pfm-moldura { min-height: 160px; background: #d1d5db; }
.pfm .pfm-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pfm .pfm-cor { position: absolute; inset: 0; }
.pfm .ds-cartao-mini.pfm-ds { height: 100%; width: 100%; padding: 8px; border: 0; }
.pfm .jg-mini { width: 100%; height: 100%; border: 0; border-radius: 0; }
.pfm-apps { background: #e7eefc; }
.pfm .pfm-caber { width: max-content; }
.pfm canvas.m3-mini-cena { width: 78%; height: auto; max-height: 100%; aspect-ratio: 1; }
.pfm-3d { background: #eef4fb; }
.pfm table.pfm-folha { border-collapse: collapse; background: #ffffff; color: #1f2937; font-size: 11px; width: 92%; table-layout: fixed; }
.pfm table.pfm-folha th, .pfm table.pfm-folha td { border: 1px solid #c8d1d9; padding: 2px 4px; height: 22px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pfm table.pfm-folha th { background: #e8f3ec; color: #14402a; font-weight: 700; width: 12%; }
.pfm-excel { background: #d5efdd; }

/* ---------- Portefólio do aluno (2.334.0, /portefolio/) ---------- */
.po-pagina .prof { max-width: 1180px; }
.po-barra { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: 12px 0 6px; }
.po-filtros { display: flex; flex-wrap: wrap; gap: 6px; }
.po-filtro[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.po-barra-dir { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.po-barra-dir select { padding: 8px 10px; border: 2px solid var(--borda-in); border-radius: 10px; background: var(--input); color: var(--texto); }
.po-so { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.po-grelha { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.po-cartao { display: flex; flex-direction: column; background: var(--papel); border: 2px solid var(--borda); border-radius: 14px; min-width: 0; }
.po-cartao.po-escolhido { border-color: var(--ok); }
.po-corpo { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; flex: 1; min-width: 0; }
.po-app { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; font-weight: 700; color: var(--suave); }
.po-tit { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.po-info { margin: 0; font-size: 14px; color: var(--suave); }
.po-selos { display: flex; flex-wrap: wrap; gap: 4px; }
.po-selos:empty { display: none; }
.po-acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; padding-top: 4px; }
.po-mostrar { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.po-mostrar input, .po-so input { width: 20px; height: 20px; }
.po-entregas { margin-top: 20px; }
.po-ent-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.po-entrega { border: 1px solid var(--borda); border-radius: 12px; padding: 10px 12px; background: var(--item-bg); }
.po-entrega p { margin: 0 0 4px; }
.po-ent-cab { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.po-crit ul { margin: 6px 0 0; padding-left: 18px; }
.po-nivel { font-weight: 700; }
.po-com { margin: 6px 0 0; padding: 8px 10px; border-left: 4px solid var(--accent); background: var(--papel); border-radius: 0 8px 8px 0; }
.po-impressao { display: none; }
@media (max-width: 520px) { .po-grelha { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; } .po-tit { font-size: 16px; } }
@media print {
  body.po-a-imprimir #raiz > * { display: none !important; }
  body.po-a-imprimir #raiz > .po-impressao { display: block !important; color: #000; }
  body.po-a-imprimir .chf-botao, body.po-a-imprimir .rodape, body.po-a-imprimir .rodape-credito, body.po-a-imprimir .nav-baixo { display: none !important; }
  .po-impressao h1 { font-size: 22pt; margin: 0 0 4pt; color: #000; }
  .po-imp-sec { break-inside: auto; margin-top: 14pt; }
  .po-imp-sec h2 { font-size: 15pt; color: #000; border-bottom: 1.5pt solid #000; padding-bottom: 2pt; }
  .po-imp-grelha { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10pt; }
  .po-imp-item { margin: 0; break-inside: avoid; border: 1pt solid #888; border-radius: 6pt; overflow: hidden; }
  .po-imp-item figcaption { padding: 4pt 6pt; font-size: 10pt; }
  .po-imp-item .pfm { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* ---------- «Os meus ficheiros» (2.334.0, public/ficheiros.js) ---------- */
dialog.fx-dlg { width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 2px solid var(--borda-in); border-radius: 16px; background: var(--papel); color: var(--texto); }
dialog.fx-dlg::backdrop { background: rgba(11, 37, 64, .45); }
.fx-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--borda); }
.fx-cab h2 { margin: 0; font-size: 20px; }
.fx-corpo { padding: 12px 16px 16px; overflow: auto; max-height: calc(100vh - 150px); }
.fx-barra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.fx-barra input[type=search] { flex: 1 1 200px; min-width: 0; padding: 8px 10px; border: 2px solid var(--borda-in); border-radius: 10px; background: var(--input); color: var(--texto); }
.fx-filtro[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.fx-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.fx-item { display: flex; flex-direction: column; border: 2px solid var(--borda); border-radius: 12px; overflow: hidden; background: var(--item-bg); min-width: 0; }
.fx-usar { all: unset; cursor: pointer; display: block; aspect-ratio: 4 / 3; background: #ffffff; }
.fx-usar:focus-visible { outline: 3px solid var(--foco); outline-offset: -3px; }
.fx-usar img { width: 100%; height: 100%; object-fit: contain; display: block; }
.fx-som { display: grid; place-items: center; height: 100%; padding: 6px; color: #0b2540; }
.fx-som svg { width: 42px; height: 42px; }
.fx-info { padding: 6px 8px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fx-info b { overflow-wrap: anywhere; }
.fx-info .fx-onde { color: var(--suave); }
.fx-acoes { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 8px 8px; }
.fx-acoes audio { width: 100%; height: 32px; }
.fx-vazio { padding: 10px 0; }
.fx-estado { min-height: 1.4em; margin: 8px 0 0; }
.fx-meus-bt { white-space: nowrap; }

/* ---------- Modelos da turma (2.334.0, public/modelos-turma.js) ---------- */
.mdt-sec { margin: 0 0 18px; }
.mdt-sec h2 { display: flex; align-items: center; gap: 8px; }
.mdt-lista { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.mdt-modelo { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; width: 100%; height: 100%; background: var(--papel); color: var(--texto); border: 2px solid var(--borda-in); border-radius: 14px; overflow: hidden; }
.mdt-modelo:hover, .mdt-modelo:focus-visible { border-color: var(--accent); outline: 3px solid var(--foco); outline-offset: 1px; }
.mdt-corpo { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px 10px; }
.mdt-corpo b { font-size: 16px; overflow-wrap: anywhere; }
.mdt-corpo small { color: var(--suave); }
.mdt-selo { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #fde7c8; color: #5a3204; border: 1px solid #c98a2b; }
.mdt-usar { font-weight: 700; color: var(--accent); }
.apps-modelos { margin-top: 22px; }
.apm-lista { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.apm-cartao { display: flex; flex-direction: column; border: 2px solid var(--borda); border-radius: 14px; background: var(--papel); min-width: 0; }
.apm-corpo { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.apm-corpo h3 { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.apm-turmas { margin: 0; font-size: 14px; color: var(--suave); }
.apm-acoes { display: flex; flex-wrap: wrap; gap: 6px; }
dialog.apm-dlg { width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 32px); border: 2px solid var(--borda-in); border-radius: 16px; background: var(--papel); color: var(--texto); padding: 16px; }
dialog.apm-dlg::backdrop { background: rgba(11, 37, 64, .45); }
.apm-dlg label.apm-rot { display: block; font-weight: 700; margin: 10px 0 4px; }
.apm-dlg select, .apm-dlg input[type=text] { width: 100%; padding: 9px 10px; border: 2px solid var(--borda-in); border-radius: 10px; background: var(--input); color: var(--texto); }
.apm-turmas-cx { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.apm-turmas-cx label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; }
.apm-dlg .apm-rodape { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* Portefólio no cabeçalho da página inicial (2.334.0): com fundo nos dois temas, como os outros botões de .cab-nav. */
:root:not(.classico) .cab-nav-item.cn-portefolio { background: #e6e0fb; }
:root:not(.classico)[data-theme="dark"] .cab-nav-item.cn-portefolio { background: #2e2459; color: #e6e0fb; }
@media (prefers-color-scheme: dark) { :root:not(.classico):not([data-theme="light"]) .cab-nav-item.cn-portefolio { background: #2e2459; color: #e6e0fb; } }

/* Barra de baixo com o Portefólio (2.334.0): até seis botões, o nome cabe sempre no botão. */
@media (max-width: 700px) {
  :root:not(.classico) .nav-baixo { gap: 4px; padding-left: 6px; padding-right: 6px; }
  :root:not(.classico) .nav-baixo-item { font-size: 11px; padding: 6px 2px; min-width: 0; }
  :root:not(.classico) .nav-baixo-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.apm-turmas-cx input, .apm-dlg .po-so input { width: 20px; height: 20px; }
/* Applab 2.335.0: lista no ecrã, tela de desenho com figuras e a faixa dos componentes que não se veem (relógio, memória, acelerómetro). */
[data-tipo="listagem"] { --cti: #6741d9; } [data-tipo="tela"] { --cti: #c2410c; } [data-tipo="figura"] { --cti: #b45309; }
[data-tipo="relogio"] { --cti: #0b7285; } [data-tipo="memoria"] { --cti: #a61e4d; } [data-tipo="acelerometro"] { --cti: #4d7c0f; }
.ap-listagem { display: flex; flex-direction: column; padding: 4px; border-radius: 10px; overflow: hidden; box-sizing: border-box; }
.ap-lista-tit { font-weight: 700; padding: 2px 6px 4px; }
.ap-lista-itens { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.ap-lista-itens li + li { border-top: 1px solid rgba(0, 0, 0, .12); }
.ap-lista-item { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: transparent; border: 0; padding: 8px 6px; cursor: pointer; border-radius: 6px; }
.ap-lista-item:hover { background: rgba(0, 0, 0, .06); }
.ap-lista-item.sel { background: rgba(24, 144, 255, .18); font-weight: 700; }
.ap-lista-item:focus-visible { outline: 2px solid #1d4ed8; outline-offset: -2px; }
.ap-lista-vazia { padding: 8px 6px; opacity: .7; font-style: italic; }
.ap-tela { padding: 0; line-height: 0; }
.ap-tela-cv { display: block; width: 100%; height: auto; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); touch-action: none; cursor: crosshair; }
.ap-desenhar .ap-tela-cv { cursor: inherit; }
.ap-invis { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 5px 6px 3px; background: #1d2433; color: #fff; font-size: 12px; }
.ap-invis[hidden] { display: none; }
.ap-invis-rot { opacity: .8; }
.ap-invis-c { font: inherit; font-size: 12px; color: #fff; background: #2f3a52; border: 1px solid #56627d; border-radius: 99px; padding: 2px 8px; cursor: pointer; }
.ap-invis-c.sel { background: #2a6fb0; border-color: #9db8dd; }
.ap-invis-c:focus-visible, .ap-abanar:focus-visible { outline: 2px solid #9db8dd; outline-offset: 1px; }
.ap-abanar { font: inherit; font-size: 13px; font-weight: 700; color: #1d2433; background: #ffd666; border: 0; border-radius: 99px; padding: 4px 12px; cursor: pointer; margin: 0 auto; }
.ap-itens { width: 100%; font: inherit; min-height: 4.5em; resize: vertical; box-sizing: border-box; }

/* Que perguntas foram mais difíceis (2.337.0): no Gamebox («Partilhar») e nos trabalhos dos alunos. */
.jg-dificeis { margin: 14px 0; }
.jg-dif-lista { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.jg-dif { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 28%) auto; align-items: center; gap: 4px 12px; padding: 8px 10px; border: 2px solid var(--borda); border-radius: 10px; background: var(--papel); }
.jg-dif.dificil { border-color: var(--erro); }
.jg-dif-txt { font-weight: 600; min-width: 0; overflow-wrap: anywhere; } .jg-dif-txt small { font-weight: 400; color: var(--suave); }
.jg-dif-barra { display: block; height: 12px; border-radius: 999px; background: var(--trilho); overflow: hidden; }
.jg-dif-barra i { display: block; height: 100%; border-radius: 999px; background: #15803d; }
.jg-dif.dificil .jg-dif-barra i { background: #dc2626; }
.jg-dif-n { font-size: 14px; white-space: nowrap; }
.jg-dif-turmas { grid-column: 1 / -1; font-size: 13px; }
@media (max-width: 640px) { .jg-dif { grid-template-columns: 1fr; } .jg-dif-n { white-space: normal; } }

/* Temas recolhidos quando a turma tem mural e selo da aula nos cartões (2.340.2). */
details.temas-recolhidos { margin: 18px 0; border: 2px solid var(--tinta, var(--line)); border-radius: 18px; background: var(--papel); }
details.temas-recolhidos > summary { cursor: pointer; padding: 14px 18px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; list-style: none; }
details.temas-recolhidos > summary::-webkit-details-marker { display: none; }
details.temas-recolhidos > summary::after { content: "▾"; margin-left: auto; transition: transform .2s; }
details.temas-recolhidos[open] > summary::after { transform: rotate(180deg); }
.temas-rec-tit { font-weight: 700; font-size: 1.15rem; }
details.temas-recolhidos > summary small { color: var(--muted); }
details.temas-recolhidos > .bloco { margin: 0; border: 0; box-shadow: none; }
.ativ-aula { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #e6eefc; color: #1e3a8a; }
:root[data-theme="dark"] .ativ-aula { background: #1e2a4a; color: #c7d6ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ativ-aula { background: #1e2a4a; color: #c7d6ff; } }
@media (prefers-reduced-motion: reduce) { details.temas-recolhidos > summary::after { transition: none; } }

/* «Na aula» por partes, cada uma com a sua cor (2.340.3); o título de cada grupo da barra da turma leva um ponto da cor do grupo. */
.tb-sub.s-verde { --s: var(--g-verde); } .tb-sub.s-azul { --s: var(--g-azul); } .tb-sub.s-laranja { --s: var(--g-laranja); } .tb-sub.s-roxo { --s: var(--g-roxo); }
.tb-grupo-itens:has(> .tb-sub) { flex-direction: column; align-items: stretch; gap: 8px; }
.tb-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding-left: 10px; border-left: 4px solid var(--s); }
.tb-sub-tit { flex: 0 0 auto; min-width: 13.2em; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--s); }
.tb-sub-itens { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tb-grupo-tit::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: var(--g); vertical-align: 0; }
@media (max-width: 640px) { .tb-sub-tit { min-width: 0; flex-basis: 100%; } }
.tb-sub-itens > details > .menu-painel { right: auto; left: 0; }

/* Linhas da lista da turma em ecrãs médios (iPad, 641 a 1100 px; 2.341.1): o título nunca fica espremido; os botões passam para a linha de baixo. */
.tl-linha { flex-wrap: wrap; }
.tl-linha > .tl-info { flex: 1 1 280px; min-width: min(280px, 100%); }
.tl-linha > .tl-acoes { flex-wrap: wrap; justify-content: flex-end; max-width: 100%; }
.tl-adicionar .tl-linha > .tl-info { min-width: 0; }
.mu-at-lig { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.mu-at-lig:hover b, .mu-at-lig:focus-visible b { color: var(--accent); }
/* Opções de cada atividade no mural do professor (2.341.2). */
.mu-at-li > .mu-at-mais { margin-left: auto; }
.mu-at-opc { flex: 1 1 100%; margin-top: 4px; }
.mu-at-opc[hidden] { display: none; }
.mu-at-opc .tl-linha { margin: 0; }
/* Botão redondo «+» das opções de cada atividade do mural (2.341.3). */
button.mu-at-mais { margin-left: auto; width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%; border: 2px solid var(--tinta, #1b1b3a); background: #dbeafe; color: #1d4ed8; cursor: pointer; box-shadow: 2px 2px 0 var(--sombra, rgba(0,0,0,.25)); transition: transform .15s; }
button.mu-at-mais:hover { background: #bfdbfe; }
button.mu-at-mais.aberto { background: #1d4ed8; color: #fff; }
button.mu-at-mais:focus-visible { outline: 3px solid var(--foco, #f59e0b); outline-offset: 2px; }
button.mu-at-mais:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--sombra, rgba(0,0,0,.25)); }
.mu-at-mais-ico { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
@media (pointer: coarse) { button.mu-at-mais { width: 40px; height: 40px; } }
:root[data-theme="dark"] button.mu-at-mais { background: #1e3a8a; color: #dbeafe; } :root[data-theme="dark"] button.mu-at-mais.aberto { background: #93c5fd; color: #0b2540; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) button.mu-at-mais { background: #1e3a8a; color: #dbeafe; } :root:not([data-theme="light"]) button.mu-at-mais.aberto { background: #93c5fd; color: #0b2540; } }
@media (prefers-reduced-motion: reduce) { button.mu-at-mais { transition: none; } }
/* Toque (2.342.0): no telemóvel e no iPad (ponteiro grosso), os botões, os separadores, os menus e os campos têm 40 px ou mais
   de altura, e as amostras de cor 40 px de lado. Regras gerais, sem !important: o que tem medidas próprias de propósito (o
   cabeçalho da pauta) continua como está. O teste «Apps no telemóvel e no iPad» confere-o. */
@media (pointer: coarse) {
  .btn, summary.btn, .seg-sub-btn, .aspeto-bot, .hero-ling, .cab-nav-item, .menu-item, select,
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]):not([type=file]),
  summary.tl-grupo-tit, summary.tc-parte-tit, .ap-seta { min-height: 40px; }
  summary.tl-grupo-tit, summary.tc-parte-tit { display: flex; align-items: center; }
  .ap-cor { width: 40px; height: 40px; }
  .ap-seta { min-width: 40px; }
  summary:not([class]) { padding-block: 9px; }
  .nav-area, summary.tl-veem-tit-cab { min-height: 40px; }
  :root:not(.classico) .i18n-caixa select.i18n-lingua, .i18n-caixa select.i18n-lingua { min-height: 40px; }
}
/* Applab (2.342.0): no telemóvel, os separadores DESIGN, BLOCOS e PYTHON repartem a largura em vez de o último ficar cortado. */
@media (max-width: 520px) { .ap-abas-g > .ap-aba-g { flex: 1 1 0; min-width: 0; justify-content: center; padding: 12px 8px; letter-spacing: 0; } }
/* 2.342.0: no telemóvel, os menus para juntar um simulador à turma não passam da largura do cartão. */
select.tl-sim-novo, select.tl-hoje-sim-novo { max-width: 100%; }
.tl-sims-juntar { min-width: 0; max-width: 100%; }
.tl-sims-juntar > label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
select.tl-sim-novo, select.tl-hoje-sim-novo { min-width: 0; width: auto; flex: 0 1 auto; }
/* 2.346.0: o selo «Aula de dd/mm» (abre o Mural) é um botão: com ponteiro grosso tem 40 px de altura, como os outros alvos de toque. */
@media (pointer: coarse) { button.selo.aula { min-height: 40px; display: inline-flex; align-items: center; } }

/* Versões dos trabalhos do Poster e do Gamebox (2.345.0): a janela com a lista à esquerda e as páginas da versão escolhida. */
.vr-dlg { width: min(980px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 16px; border: 3px solid var(--tinta, #1b1b3a); border-radius: 16px; background: var(--papel); color: var(--texto); box-shadow: 4px 4px 0 var(--tinta, #1b1b3a); overflow: auto; }
.vr-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vr-topo h2 { margin: 0; font-size: 22px; }
.vr-nota { margin: 6px 0 12px; }
.vr-corpo { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 14px; align-items: start; }
.vr-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 62vh; overflow: auto; }
.vr-ver { display: grid; gap: 2px; width: 100%; text-align: left; padding: 8px 10px; border: 2px solid var(--borda); border-radius: 10px; background: var(--papel); color: var(--texto); font: inherit; cursor: pointer; }
.vr-ver:hover, .vr-ver:focus-visible { border-color: var(--tinta, #1b1b3a); }
.vr-item.sel .vr-ver { border-color: var(--tinta, #1b1b3a); background: var(--item-bg); box-shadow: 2px 2px 0 var(--tinta, #1b1b3a); }
.vr-quando { font-weight: 700; }
.vr-quem { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vr-motivo { color: var(--suave); }
.vr-prof { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #1d4ed8; color: #fff; font-size: 12px; font-weight: 700; }
.vr-do-prof .vr-ver { border-left: 6px solid #1d4ed8; }
.vr-prev h3 { margin: 0 0 4px; }
.vr-paginas { list-style: none; margin: 10px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.vr-pag { display: grid; gap: 4px; }
.vr-pag > :first-child { width: 100%; border: 1px solid var(--borda); border-radius: 8px; overflow: hidden; pointer-events: none; }
.vr-pag-n { font-size: 13px; color: var(--suave); }
.vr-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
@media (max-width: 700px) { .vr-corpo { grid-template-columns: 1fr; } .vr-lista { max-height: 34vh; } .vr-paginas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Aluno de teste: porque aparece cada atividade (2.350.0) */
.via-etq { display: block; margin: 4px 0; padding: 4px 8px; border-radius: 8px; font-size: 13px; line-height: 1.35; background: #fff4d6; color: #5c3d00; border: 1px dashed #b7791f; }
.via-etq.via-aluno, .via-etq.via-todos, .via-etq.via-adesao { background: #fdecea; color: #7a1d16; border-color: #b3261e; }
:root[data-theme="dark"] .via-etq { background: #2b230d; color: #f5d78a; }
:root[data-theme="dark"] .via-etq.via-aluno, :root[data-theme="dark"] .via-etq.via-todos, :root[data-theme="dark"] .via-etq.via-adesao { background: #2e1513; color: #ffb4a9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .via-etq { background: #2b230d; color: #f5d78a; } :root:not([data-theme="light"]) .via-etq.via-aluno, :root:not([data-theme="light"]) .via-etq.via-todos, :root:not([data-theme="light"]) .via-etq.via-adesao { background: #2e1513; color: #ffb4a9; } }

/* Jogos para descontrair (2.351.0): o botão do cabeçalho. */
:root:not(.classico) .cab-nav-item.cn-pausa { background: #ffe1c7; }
:root:not(.classico)[data-theme="dark"] .cab-nav-item.cn-pausa { background: #4a2a10; color: #ffe1c7; }
@media (prefers-color-scheme: dark) { :root:not(.classico):not([data-theme="light"]) .cab-nav-item.cn-pausa { background: #4a2a10; color: #ffe1c7; } }
.pausa-jogos .menu-nota b { font-weight: 700; }

/* Jogos para descontrair na página inicial e na janela das novidades (2.352.0). */
.jogos-banner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 18px; margin: 18px 0; padding: 16px 18px; border: 3px solid var(--tinta, #1b1b3a); border-radius: 22px; background: linear-gradient(120deg, #fde68a, #c7f9e5 55%, #dbeafe); color: #1b1b3a; box-shadow: 5px 5px 0 var(--tinta, #1b1b3a); text-decoration: none; }
.jogos-banner:hover, .jogos-banner:focus-visible { transform: translate(-1px, -1px); box-shadow: 7px 7px 0 var(--tinta, #1b1b3a); }
.jogos-banner-minis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.jogos-banner-minis img, .ling-nov-jogos-minis img { width: 100%; height: auto; aspect-ratio: 4 / 3; border: 2px solid var(--tinta, #1b1b3a); border-radius: 12px; background: #fff; }
.jogos-banner-minis img:nth-child(odd) { transform: rotate(-3deg); }
.jogos-banner-minis img:nth-child(even) { transform: rotate(2deg); }
.jogos-banner-txt { display: flex; flex-direction: column; gap: 4px; }
.jogos-banner-k { align-self: flex-start; padding: 2px 10px; border-radius: 999px; background: #1b1b3a; color: #fff; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.jogos-banner-tit { font-size: clamp(22px, 3vw, 30px); line-height: 1.1; }
.jogos-banner-desc { font-size: 15px; }
.jogos-banner-estado { font-size: 14px; font-weight: 700; color: #065f46; }
.jogos-banner.fechado .jogos-banner-estado { color: #9a3412; }
.jogos-banner-mod { font-size: 13px; }
.pz-adm-reg-info { display: grid; gap: 3px; justify-items: start; }
.pz-adm-ee { white-space: nowrap; }
.pz-adm-ee.sem { color: var(--erro-txt, #b3261e); }
.pz-adm-reg-h { margin: 16px 0 6px; }
.pp-al-hora { font-weight: 700; color: var(--erro-txt, #b3261e); }
.jogos-registo { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin: 0 0 18px; padding: 14px 18px;
  border-radius: 16px; border: 2px solid var(--tinta, var(--borda)); box-shadow: 3px 3px 0 var(--tinta, transparent); background: #fff4c7; color: #1b1b3a; font-size: 16px; }
.jogos-registo-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jogos-registo-tit { font-size: 18px; }
.jogos-registo-lig { flex: 0 0 auto; }
:root[data-theme="dark"] .jogos-registo { background: #3a3110; color: #fff4c7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .jogos-registo { background: #3a3110; color: #fff4c7; } }
.ins-info-jogos { display: inline-flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.ins-etq-ee { font-size: 12px; }
.ling-nov-jogos-mod { margin: 6px 0 0; font-size: 14px; }
.jogos-banner-cta { align-self: flex-start; margin-top: 6px; padding: 8px 18px; border: 2px solid #1b1b3a; border-radius: 999px; background: #1b1b3a; color: #fff; font-weight: 700; }
@media (max-width: 640px) { .jogos-banner { grid-template-columns: 1fr; } .jogos-banner-minis { grid-template-columns: repeat(4, 1fr); } }
@media (prefers-reduced-motion: reduce) { .jogos-banner:hover, .jogos-banner:focus-visible { transform: none; } .jogos-banner-minis img { transform: none !important; } }
.ling-nov-jogos { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 14px; align-items: center; margin: 6px 20px 4px; padding: 14px; border: 2px solid var(--tinta, #1b1b3a); border-radius: 16px; background: #fef3c7; color: #1b1b3a; }
.ling-nov-jogos-minis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ling-nov-jogos h3 { margin: 0 0 4px; font-size: 19px; }
.ling-nov-jogos p { margin: 0 0 6px; }
.ling-nov-jogos-regra b { color: #9a3412; }
@media (max-width: 560px) { .ling-nov-jogos { grid-template-columns: 1fr; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .jogos-banner { background: linear-gradient(120deg, #3b2f0b, #0f3b2e 55%, #13284a); color: #f1f5f9; }
  :root:not([data-theme="light"]) .jogos-banner-k, :root:not([data-theme="light"]) .jogos-banner-cta { background: #f1f5f9; color: #0f172a; border-color: #f1f5f9; }
  :root:not([data-theme="light"]) .jogos-banner-estado { color: #6ee7b7; }
  :root:not([data-theme="light"]) .jogos-banner.fechado .jogos-banner-estado { color: #fdba74; }
  :root:not([data-theme="light"]) .ling-nov-jogos { background: #2e2a10; color: #f1f5f9; }
  :root:not([data-theme="light"]) .ling-nov-jogos-regra b { color: #fdba74; }
}
:root[data-theme="dark"] .jogos-banner { background: linear-gradient(120deg, #3b2f0b, #0f3b2e 55%, #13284a); color: #f1f5f9; }
:root[data-theme="dark"] .jogos-banner-k, :root[data-theme="dark"] .jogos-banner-cta { background: #f1f5f9; color: #0f172a; border-color: #f1f5f9; }
:root[data-theme="dark"] .jogos-banner-estado { color: #6ee7b7; }
:root[data-theme="dark"] .jogos-banner.fechado .jogos-banner-estado { color: #fdba74; }
:root[data-theme="dark"] .ling-nov-jogos { background: #2e2a10; color: #f1f5f9; }
:root[data-theme="dark"] .ling-nov-jogos-regra b { color: #fdba74; }

/* Separador «Jogos» da Administração (2.352.0). */
.pz-adm-tab td.pz-adm-cel { vertical-align: top; }
.pz-adm-livre.ligado { border-color: var(--ok); }
.pz-adm-livre-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.pz-adm-com-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 8px 0; }
.pz-adm-com-linha input { width: 20px; height: 20px; }
.pz-adm-livre-est { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 700; color: var(--ok); }
.pz-adm-livre-url { flex: 1 1 220px; min-width: 0; max-width: 100%; }
.pz-adm-cel .pz-adm-est { display: block; font-weight: 700; color: var(--ok); }
.pz-adm-cel.fechado .pz-adm-est { color: var(--erro); }
.pz-adm-cel .pz-adm-bts { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.pz-adm-cel.vazio { color: var(--suave); }
.pz-adm-des { display: block; color: var(--suave); }
.pz-adm-cat h3 { margin: 14px 0 6px; }
.pz-adm-grelha { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pz-adm-jogo { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 2px solid var(--tinta, #1b1b3a); border-radius: 14px; background: var(--papel); }
.pz-adm-jogo img { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 10px; border: 1px solid var(--borda, #cbd5e1); background: #fff; }
.pz-adm-jogo small { color: var(--suave); }
.pz-adm-jogo.off { opacity: .6; border-style: dashed; }
.pz-adm-lig { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.pz-adm-filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0; }
.pz-adm-filtros select, .pz-adm-filtros input { max-width: 100%; }
.pz-adm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 10px 0; }
.pz-adm-kpi { padding: 12px; border: 2px solid var(--tinta, #1b1b3a); border-radius: 14px; background: var(--papel); }
.pz-adm-kpi b { display: block; font-size: 24px; }
.pz-adm-kpi span { color: var(--suave); font-size: 14px; }
.pz-adm-graf { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.pz-adm-barras { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow: auto; }
.pz-adm-barras li { display: grid; grid-template-columns: minmax(90px, 9em) minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 14px; }
.pz-adm-b-barra { height: 14px; border-radius: 4px; background: var(--borda, #e2e8f0); overflow: hidden; }
.pz-adm-b-barra i { display: block; height: 100%; border-radius: 4px; background: #2563eb; }
.pz-adm-dias .pz-adm-b-barra i { background: #0d9488; }
.pz-adm-b-val { color: var(--texto); white-space: nowrap; }
.pz-adm-al tr.pz-adm-nunca td { color: var(--suave); }

/* Painel dos jogos da turma, para o projetor (2.353.0). */
.pp { display: flex; flex-direction: column; gap: 14px; }
.pp-topo { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.pp-tit h1 { margin: 2px 0; }
.pp-tit h1 small { font-size: .55em; font-weight: 600; color: var(--suave); }
.pp-estado { display: inline-block; padding: 3px 12px; border-radius: 999px; background: #dcfce7; color: #14532d; font-weight: 700; font-size: 14px; }
.pp-estado.fechado { background: #fee2e2; color: #7f1d1d; }
.pp-kpis { display: flex; flex-wrap: wrap; gap: 10px; flex: 1 1 320px; }
.pp-kpi { flex: 1 1 120px; padding: 8px 12px; border: 2px solid var(--tinta, #1b1b3a); border-radius: 14px; background: var(--papel); }
.pp-kpi b { display: block; font-size: clamp(22px, 3vw, 34px); line-height: 1.1; }
.pp-kpi span { font-size: 14px; color: var(--suave); }
.pp-k-agora { background: #e0f2fe; color: #0b2540; }
.pp-k-agora span { color: #1e3a5f; }
.pp-cmd { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pp-mais-opc { display: flex; flex-direction: column; gap: 6px; padding: 6px 8px; }
.pp-corpo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 16px; align-items: start; }
.pp-grelha { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pp-al { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px; border: 2px solid var(--borda); border-radius: 14px; background: var(--papel); }
.pp-al.agora { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .25); }
.pp-al-av { flex: 0 0 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: #e2e8f0; color: #0f172a; font-weight: 800; font-size: 18px; }
.pp-al-mini { flex: 0 0 64px; width: 64px; height: 48px; border-radius: 10px; border: 1px solid var(--borda); background: #fff; }
.pp-al-txt { display: flex; flex-direction: column; min-width: 0; }
.pp-al-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-al-est { font-size: 13px; color: var(--suave); }
.pp-al-est.agora { color: var(--ok); font-weight: 700; }
.pp-al-est.vazio { opacity: .8; }
.pp-al-tempo { font-size: 12px; color: var(--suave); }
.pp-ponto { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; background: #16a34a; vertical-align: middle; }
@media (prefers-reduced-motion: no-preference) { .pp-ponto { animation: pp-pulso 1.6s ease-in-out infinite; } }
@keyframes pp-pulso { 50% { opacity: .35; } }
.pp-al-selo { position: absolute; top: -8px; right: 8px; padding: 1px 8px; border-radius: 999px; background: #fef3c7; color: #78350f; border: 1px solid #f59e0b; font-size: 12px; font-weight: 700; }
.pp-dir { display: flex; flex-direction: column; gap: 14px; }
.pp-sec { padding: 12px 14px; border: 2px solid var(--tinta, #1b1b3a); border-radius: 16px; background: var(--papel); }
.pp-sec h2 { margin: 0 0 8px; font-size: 18px; }
.pp-des-cx { display: flex; align-items: center; gap: 14px; }
.pp-anel-cx { position: relative; flex: 0 0 110px; width: 110px; height: 110px; }
.pp-anel { width: 100%; height: 100%; }
.pp-anel-fundo { fill: none; stroke: var(--borda, #e2e8f0); stroke-width: 10; }
.pp-anel-cheio { fill: none; stroke: #f59e0b; stroke-width: 10; stroke-linecap: round; }
.pp-anel-n { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.pp-anel-n b { font-size: 28px; line-height: 1; }
.pp-anel-n small { color: var(--suave); }
.pp-des-txt { display: flex; flex-direction: column; gap: 4px; }
.pp-des-mini, .pp-mini { width: 64px; height: 48px; border-radius: 8px; border: 1px solid var(--borda); background: #fff; }
.pp-des-txt small { color: var(--suave); }
.pp-mais { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pp-mais li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; }
.pp-mais .pp-mini { grid-row: 1 / 3; }
.pp-mais-txt { display: flex; flex-direction: column; min-width: 0; }
.pp-mais-txt small { color: var(--suave); font-size: 12px; }
.pp-mais-n { font-size: 13px; white-space: nowrap; }
.pp-barra { grid-column: 2 / 4; height: 10px; border-radius: 5px; background: var(--borda, #e2e8f0); overflow: hidden; }
.pp-barra i { display: block; height: 100%; background: #2563eb; border-radius: 5px; }
.pp-agora { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pp-agora li { display: flex; align-items: center; gap: 8px; }
.pp-agora small { margin-left: auto; color: var(--suave); }
.pp-agora .pp-mini { width: 40px; height: 30px; }
@media (max-width: 860px) { .pp-corpo { grid-template-columns: 1fr; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pp-estado { background: #14532d; color: #dcfce7; }
  :root:not([data-theme="light"]) .pp-estado.fechado { background: #7f1d1d; color: #fee2e2; }
  :root:not([data-theme="light"]) .pp-k-agora { background: #0c2a44; color: #f1f5f9; }
  :root:not([data-theme="light"]) .pp-k-agora span { color: #cbd5e1; }
  :root:not([data-theme="light"]) .pp-al-av { background: #334155; color: #f1f5f9; }
  :root:not([data-theme="light"]) .pp-al-selo { background: #3b2f0b; color: #fde68a; }
}
:root[data-theme="dark"] .pp-estado { background: #14532d; color: #dcfce7; }
:root[data-theme="dark"] .pp-estado.fechado { background: #7f1d1d; color: #fee2e2; }
:root[data-theme="dark"] .pp-k-agora { background: #0c2a44; color: #f1f5f9; }
:root[data-theme="dark"] .pp-k-agora span { color: #cbd5e1; }
:root[data-theme="dark"] .pp-al-av { background: #334155; color: #f1f5f9; }
:root[data-theme="dark"] .pp-al-selo { background: #3b2f0b; color: #fde68a; }

/* 2.356.0: no tema escuro o botão principal é claro (--accent) com texto escuro; com o rato por cima ficava com o fundo escuro
   (--dark) e o texto escuro. Fica um tom mais claro do mesmo azul. Mesma especificidade da regra geral, para as variantes ganharem. */
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .btn:hover:not(:disabled) { background: #bae6fd; } }
:where(:root[data-theme="dark"]) .btn:hover:not(:disabled) { background: #bae6fd; }

/* Grupos 2.361.0: nome de cada grupo, gerir (nome, ordem, apagar), sortear temas e publicar no mural. */
.gr-grupo-nome { display: block; font-size: .92rem; font-weight: 700; color: var(--accent-tx, #1d4ed8); margin-top: 2px; overflow-wrap: anywhere; }
[data-theme="dark"] .gr-grupo-nome { color: #93c5fd; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gr-grupo-nome { color: #93c5fd; } }
html.gr-projetar .gr-grupo-nome { font-size: 1.15rem; }
.gr-gerir { display: flex; gap: 6px; align-items: center; margin: 0 0 8px; }
.gr-nome-in { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 14px; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: inherit; }
.gr-a-rodar { opacity: .75; }
.gr-nome-novo { animation: gr-pisca 1s ease 1; }
@keyframes gr-pisca { 0% { background: #fde68a; color: #1b1b3a; } 100% { background: transparent; } }
.gr-temas-cx { margin: 0 0 12px; }
.gr-temas-cx > summary { cursor: pointer; list-style: none; }
.gr-temas-cx > summary h2 { display: inline; margin: 0; font-size: 1.1rem; }
.gr-temas-cx > summary::before { content: "▸ "; }
.gr-temas-cx[open] > summary::before { content: "▾ "; }
.gr-temas-cx label { display: block; margin: 8px 0; }
.gr-temas-txt { width: 100%; box-sizing: border-box; font: inherit; min-height: 120px; }
.gr-temas-modo { max-width: 100%; }
.gr-mural-dlg { width: min(640px, 94vw); }
.gr-mural-rot { display: block; margin: 10px 0; font-weight: 600; }
.gr-mural-rot input, .gr-mural-rot textarea { display: block; width: 100%; box-sizing: border-box; font: inherit; font-weight: 400; margin-top: 4px; }
.pf-grupo-nome { font-weight: 700; color: #9a3412; }
[data-theme="dark"] .pf-grupo-nome { color: #fdba74; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pf-grupo-nome { color: #fdba74; } }
.pf-grupo.meu .pf-grupo-nome { color: inherit; }
html.gr-projetar .gr-gerir, html.gr-projetar .gr-temas-cx { display: none !important; }
@media print { .gr-gerir, .gr-temas-cx { display: none !important; } }

/* «Abrir e fechar por turma» no telemóvel (2.362.0): cada turma é um cartão, com os turnos um por baixo do outro e os botões numa linha. */
.pz-adm-tnome .pz-adm-tn { font-weight: 800; }
:root .pz-adm-turmas table.pz-adm-tab tbody th.pz-adm-tnome { position: static; background: var(--fundo); color: var(--titulo); width: 1%; white-space: nowrap; vertical-align: top; }
@media (max-width: 640px) {
  .pz-adm-turmas .tabela-rolar { overflow: visible; }
  .pz-adm-tab, .pz-adm-tab tbody, .pz-adm-tab tr, .pz-adm-tab th, .pz-adm-tab td { display: block; width: auto; }
  .pz-adm-turmas .tabela-rolar table.pz-adm-tab { min-width: 0; border-radius: 0; overflow: visible; background: transparent; }
  .pz-adm-tab thead { display: none; }
  .pz-adm-tab tr { margin: 0 0 12px; border: 2px solid var(--tinta, var(--borda)); border-radius: 14px; overflow: hidden; background: var(--papel); }
  :root .pz-adm-turmas table.pz-adm-tab tbody th.pz-adm-tnome { width: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; background: var(--fundo); color: var(--titulo); font-size: 1.05rem; text-align: left; border: 0; }
  .pz-adm-tab td.pz-adm-cel { padding: 8px 12px 10px; border: 0; border-top: 1px solid var(--borda); }
  .pz-adm-tab td.pz-adm-cel::before { content: attr(data-rot); display: block; font-size: 13px; font-weight: 700; color: var(--suave); text-transform: uppercase; letter-spacing: .03em; }
  .pz-adm-cel .pz-adm-bts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .pz-adm-cel .pz-adm-bts .btn, .pz-adm-cel > .pz-adm-abrir { width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; padding: 6px 4px; font-size: 14px; white-space: nowrap; justify-content: center; }
  .pz-adm-cel > .pz-adm-abrir { margin: 4px 0; }
  .pz-adm-turmas .rec-acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .pz-adm-turmas .rec-acoes .btn { width: 100%; white-space: normal; font-size: 14px; }
}

/* Quem jogou sem conta (2.362.0). */
.pz-adm-anon-grelha { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 10px 0 14px; }
.pz-adm-anon-res h3 { margin: 0 0 6px; font-size: 1rem; }
.pz-adm-anon-tab td { font-size: 14px; vertical-align: top; }
.pz-adm-ip { font-family: var(--mono, monospace); white-space: nowrap; }
.pz-adm-anon .sec-cab select { max-width: 100%; }
.est-v { display: block; color: var(--suave); font-size: 13px; }

/* Sorteio de temas por aluno (2.364.3) */
.gr-sorteio { margin: 0 0 14px; }
.gr-sort-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 10px; }
.gr-sort-tit { margin: 0; font-size: 1.25rem; flex: 1 1 auto; }
.gr-sort-nome { min-width: 0; max-width: 100%; width: 16rem; }
.gr-sort-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 8px; }
.gr-sort-al { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; padding: 6px 10px; border: 2px solid var(--tinta, var(--line)); border-radius: 14px; background: var(--papel, var(--card-bg, transparent)); min-width: 0; }
.gr-sort-al .gr-ficha { flex: 0 0 auto; }
.gr-sort-tema { font-weight: 700; overflow-wrap: break-word; word-break: normal; }
html.gr-projetar .gr-sort-nome-rot, html.gr-projetar .gr-sort-apagar { display: none; }
html.gr-projetar .gr-sort-tit { font-size: 1.8rem; }
html.gr-projetar .gr-sort-tema { font-size: 1.25rem; }
@media print { .gr-sort-nome-rot, .gr-sort-apagar { display: none; } }

/* Orientações do tema na ficha (2.365.0) */
.tema-aluno > div { flex: 1 1 auto; min-width: 0; }
.tema-guia { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--papel, #fff); border: 1px solid var(--linha, #cbd5e1); }
.tema-guia > summary { cursor: pointer; font-weight: 800; color: var(--titulo); }
.tema-guia-disc { font-size: 14px; color: var(--suave); margin: 6px 0 0; }
.tema-guia-sec h3 { font-size: 15px; margin: 12px 0 4px; color: var(--titulo); }
.tema-guia-sec p { margin: 4px 0; }
.tema-guia-perg { font-size: 17px; font-weight: 700; }
.tema-guia-msg { font-style: italic; }
.tema-guia-lista { margin: 4px 0; padding-left: 20px; }
.tema-guia-lista li { margin: 3px 0; }
.gr-temas-disc-rot select { max-width: 100%; }

/* Conjuntos de grupos (2.366.0) */
.gr-conj { margin: 0 0 14px; }
.gr-conj h2 { margin-top: 0; }
.gr-conj-rot { display: flex; align-items: center; gap: 8px; flex: 1 1 320px; flex-wrap: wrap; font-weight: 700; }
.gr-conj-nome { flex: 1 1 220px; min-width: 0; max-width: 100%; font-size: 1.05rem; }
.gr-conj-novo-nome { flex: 1 1 220px; min-width: 0; max-width: 100%; }
.gr-conj-sub { font-size: 1rem; margin: 14px 0 6px; }
.gr-conj-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gr-conj-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--borda); border-radius: 10px; }
.gr-conj-item-nome { font-weight: 700; flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.gr-conj-tit { text-align: center; margin: 0 0 12px; font-size: 1.6rem; color: var(--titulo); }
html.gr-projetar .gr-conj { display: none !important; }
html.gr-projetar .gr-conj-tit { font-size: 2.2rem; }
@media print { .gr-conj { display: none !important; } }
.gr-sort-ficha { margin-top: 12px; flex-wrap: wrap; }
.gr-sort-ficha select { max-width: 100%; }
html.gr-projetar .gr-sort-ficha { display: none !important; }
@media print { .gr-sort-ficha { display: none !important; } }

/* Temas de cada aluno: revelar e trocar (2.368.0) */
.gr-sort-temas { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; flex: 1 1 160px; }
button.gr-sort-tema, span.gr-sort-tema { font: inherit; font-weight: 700; color: var(--titulo); background: var(--light, #eef4fb); border: 2px solid var(--accent); border-radius: 14px; padding: 8px 14px; min-height: 40px; line-height: 1.25; text-align: center; cursor: grab; touch-action: none; max-width: 100%; min-width: 0; flex: 1 1 auto; overflow-wrap: break-word; word-break: normal; hyphens: manual; }
span.gr-sort-tema.oculto { cursor: default; min-width: 64px; text-align: center; border-style: dashed; color: var(--suave); }
.gr-sort-tema.dois { border-color: #c2410c; }
.gr-sort-tema.gr-sort-sel { background: var(--accent); color: var(--on-color); }
.gr-sort-tema.gr-a-arrastar { opacity: .35; }
.gr-tema-fantasma { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; box-shadow: 0 8px 22px rgba(0, 0, 0, .3); }
.gr-sort-sem { color: var(--suave); font-style: italic; }
.gr-sort-al.gr-sort-dois { border-color: #c2410c; }
.gr-sort-al.gr-sort-pode { cursor: pointer; border-style: dashed; }
.gr-sort-al.gr-sort-alvo, .gr-sort-al.gr-sort-pode:hover { border-color: var(--accent); border-style: solid; box-shadow: 0 0 0 3px var(--accent); }
.gr-sort-al.gr-sort-vez { box-shadow: 0 0 0 4px var(--accent); transform: scale(1.03); transition: transform .2s; }
.gr-sort-aviso { font-weight: 700; color: #c2410c; margin: 4px 0; }
:root[data-theme="dark"] .gr-sort-aviso, :root[data-theme="dark"] .gr-sort-tema.dois, :root[data-theme="dark"] .gr-sort-al.gr-sort-dois { color: #fdba74; border-color: #fb923c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gr-sort-aviso { color: #fdba74; } :root:not([data-theme="light"]) .gr-sort-tema.dois, :root:not([data-theme="light"]) .gr-sort-al.gr-sort-dois { border-color: #fb923c; } }
.gr-sort-lixo { margin-top: 12px; padding: 14px; border: 2px dashed var(--borda-in, #7b8a96); border-radius: 14px; text-align: center; color: var(--suave); }
.gr-sort-lixo.ativo { border-color: #b91c1c; color: #b91c1c; }
.gr-sort-lixo.gr-sort-alvo { background: #fee2e2; color: #7f1d1d; border-style: solid; }
.gr-sort-passo { margin: 0 0 10px; }
html.gr-projetar .gr-sort-dica, html.gr-projetar .gr-sort-lixo:not(.ativo) { display: none; }
@media print { .gr-sort-lixo, .gr-sort-dica, .gr-sort-passo { display: none !important; } }
:root[data-theme="dark"] .gr-sort-lixo.ativo { color: #fca5a5; border-color: #f87171; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gr-sort-lixo.ativo { color: #fca5a5; border-color: #f87171; } }

/* Revelar o tema de um aluno em grande (2.369.0) */
.gr-show { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; background: rgba(10, 18, 30, .55); cursor: pointer; animation: gr-show-entra .3s ease; }
.gr-show.a-sair { background: transparent; transition: background .6s; }
.gr-show-cartao { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 28px 36px; max-width: min(92vw, 620px); border-radius: 28px; border: 3px solid var(--tinta, #1b1b3a); background: var(--papel); box-shadow: 0 18px 50px rgba(0, 0, 0, .35); transition: transform .65s cubic-bezier(.5, 0, .3, 1), opacity .65s; animation: gr-show-cresce .45s cubic-bezier(.2, 1.4, .4, 1); }
.gr-show-foto { width: min(42vw, 220px); height: min(42vw, 220px); border-radius: 50%; object-fit: cover; border: 4px solid var(--accent); }
span.gr-show-foto.vazia { display: grid; place-items: center; font-size: 4rem; font-weight: 800; background: var(--light); color: var(--titulo); }
.gr-show-nome { font-size: clamp(1.4rem, 4vw, 2.2rem); font-weight: 800; color: var(--titulo); text-align: center; }
.gr-show-tema { font-size: clamp(1.5rem, 5vw, 2.8rem); font-weight: 800; text-align: center; color: var(--accent); min-height: 1.3em; overflow-wrap: anywhere; }
.gr-show-tema.gr-a-rodar { opacity: .7; filter: blur(.5px); }
.gr-show-certo { animation: gr-show-certo .6s ease; }
.gr-sort-acabou { box-shadow: 0 0 0 4px var(--accent); }
@keyframes gr-show-entra { from { background: transparent; } }
@keyframes gr-show-cresce { from { transform: scale(.4); opacity: 0; } }
@keyframes gr-show-certo { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@media print { .gr-show { display: none !important; } }

/* Cabeça do conjunto por cima dos grupos (2.370.0) */
.gr-conj-cab { margin: 0 0 14px; padding: 12px 14px; border: 2px solid var(--accent); border-radius: 16px; background: var(--papel); }
.gr-conj-cab .gr-conj-tit { margin: 0 0 8px; text-align: left; }
.gr-conj-cab-ed { flex-wrap: wrap; align-items: center; }
.gr-conj-cab-rot { display: flex; align-items: center; gap: 8px; flex: 1 1 340px; min-width: 0; flex-wrap: wrap; font-weight: 700; }
.gr-conj-cab-nome { flex: 1 1 220px; min-width: 0; max-width: 100%; font-size: 1.05rem; }
html.gr-projetar .gr-conj-cab { border: 0; background: transparent; padding: 0; }
html.gr-projetar .gr-conj-cab-ed { display: none; }
html.gr-projetar .gr-conj-cab .gr-conj-tit { text-align: center; }
@media print { .gr-conj-cab-ed { display: none !important; } .gr-conj-cab { border: 0; padding: 0; } }

/* Página «Grupos» arrumada (2.371.0): barra de cima e painéis recolhíveis */
.gr-topo { display: grid; gap: 12px; margin: 12px 0 14px; }
.gr-topo-conj { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.gr-topo-rot { display: flex; flex-direction: column; gap: 4px; flex: 1 1 320px; min-width: 0; }
.gr-topo-k { font-size: .8rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--suave); }
.gr-topo .gr-conj-nome { font-size: 1.2rem; font-weight: 700; width: 100%; max-width: 100%; min-width: 0; }
.gr-topo .gr-acoes { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0; }
.gr-topo .gr-tam { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 100%; }
.gr-topo .gr-tam select { max-width: 100%; }
.gr-acoes2 { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; border-top: 1px solid var(--borda); }
.gr-acoes2 .perigo { margin-left: auto; }
.gr-aviso-jun { margin: 0; padding: 8px 12px; border-radius: 10px; background: #fff7ed; color: #9a3412; font-weight: 700; }
:root[data-theme="dark"] .gr-aviso-jun { background: #431407; color: #fed7aa; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gr-aviso-jun { background: #431407; color: #fed7aa; } }
.gr-paineis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 12px; align-items: start; margin: 0 0 14px; }
.gr-paineis > .gr-painel { margin: 0; }
.gr-painel > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; min-height: 40px; }
.gr-painel > summary::-webkit-details-marker { display: none; }
.gr-painel > summary::before { content: "▸"; font-weight: 800; color: var(--accent); }
.gr-painel[open] > summary::before { content: "▾"; }
.gr-painel > summary h2 { display: inline; margin: 0; font-size: 1.1rem; }
.gr-painel-resumo { color: var(--suave); font-size: .92rem; }
.gr-painel[open] { grid-column: 1 / -1; }
.gr-painel > :not(summary) { margin-top: 10px; }
.gr-paineis .gr-temas-cx, .gr-paineis .gr-conj { margin: 0; }
.gr-paineis .gr-temas-cx > summary::before { content: "▸ "; }
.gr-paineis .gr-temas-cx[open] > summary::before { content: "▾ "; }
.gr-reg-bloco { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--borda); margin-top: 10px; }
.gr-reg-bloco h3 { margin: 0 0 8px; font-size: 1rem; }
.gr-reg-bloco.jun { border-left: 6px solid #15803d; }
.gr-reg-bloco.nao { border-left: 6px solid #b91c1c; }
.gr-reg-nova select { max-width: 100%; min-width: 0; }
.gr-reg-lista li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gr-reg-txt { flex: 1 1 200px; min-width: 0; }
.gr-reg-etq { font-size: .8rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.gr-reg-etq.jun { background: #dcfce7; color: #14532d; }
.gr-reg-etq.nao { background: #fee2e2; color: #7f1d1d; }
html.gr-projetar .gr-topo, html.gr-projetar .gr-paineis { display: none !important; }
@media print { .gr-topo, .gr-paineis { display: none !important; } }
.gr-reg-bloco .gr-reg-nova { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gr-reg-bloco .gr-reg-nova select { flex: 1 1 200px; width: auto; }
.gr-reg-bloco .gr-reg-nova > span { flex: 0 0 auto; font-weight: 700; }
.gr-reg-bloco .gr-reg-nova > button { flex: 0 0 auto; }
.gr-painel { padding-top: 10px; padding-bottom: 10px; }
.gr-topo-conj { align-items: center; }
.gr-topo-conj > .btn { align-self: flex-end; }

/* Área «Apps»: a turma antes das apps e as ações de cada app no seu cartão (2.372.0) */
.apps-turma { margin: 12px 0 16px; padding: 14px 16px; border: 2px solid var(--accent); border-radius: 16px; background: var(--papel); }
.apps-turma h3 { margin: 0 0 8px; }
.apps-turma-esc { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 6px; }
.apps-turma-esc label { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.apps-turma-esc select { max-width: 100%; }
.apps-na-turma { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--light, #eef4fb); }
.apps-poster-pub-rot { display: flex; gap: 8px; align-items: flex-start; }
/* Trabalhos dos alunos: o título por baixo da barra e as opções de cada app separadas */
.p3-topo { display: block; }
.p3-topo .aula-barra { flex-wrap: wrap; }
.p3-topo h1 { margin: 6px 0 0; overflow-wrap: anywhere; }
.p3-turma-acoes { margin: 10px 0; }
.p3-apps-opc { display: grid; gap: 8px; margin: 0 0 12px; }
.p3-app-opc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; border: 1px solid var(--borda); border-radius: 12px; }
.p3-app-opc > b { min-width: 6em; }
.p3-app-opc .p3-filtro { margin: 0; }
.gr-conj-escolha { max-width: 100%; min-width: 0; align-self: flex-end; }
.gr-topo-conj > .gr-conj-criar { align-self: flex-end; }

/* Todos os conjuntos de grupos à vista (2.374.0) */
.gr-conj-grelha { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; margin: 8px 0 12px; }
.gr-conj-cartao { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 2px solid var(--borda); border-radius: 14px; background: var(--papel); min-width: 0; }
.gr-conj-cartao.atual { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.gr-conj-cab2 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.gr-conj-cartao h3 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; flex: 1 1 auto; }
.gr-conj-aberto { font-size: .78rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--on-color); }
.gr-conj-datas, .gr-conj-info, .gr-conj-sorteio { margin: 0; font-size: .9rem; }
.gr-conj-datas { color: var(--suave); }
.gr-conj-temas { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.gr-conj-temas li { font-size: .82rem; padding: 2px 8px; border-radius: 999px; background: var(--light, #eef4fb); color: var(--titulo); overflow-wrap: anywhere; }
.gr-conj-temas li.mais { font-weight: 800; }
.gr-conj-bts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
html.gr-projetar .gr-conj { display: none !important; }

/* Imagem da aula no mural (2.375.0): o logótipo da app ou do tema, um infográfico ou uma imagem da biblioteca. */
.mu-capa { margin: 10px 0; border: 2px solid var(--borda, #cbd5e1); border-radius: 14px; padding: 8px 12px; }
.mu-capa > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; flex-wrap: wrap; min-height: 40px; }
.mu-capa-atual { height: 40px; max-width: 72px; object-fit: contain; border-radius: 8px; }
.mu-capa-corpo { margin-top: 8px; }
.mu-capa-tit { margin: 10px 0 6px; font-weight: 700; font-size: 14px; }
.mu-capa-grupo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mu-capa-op { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; min-height: 44px; min-width: 64px; padding: 6px; border: 2px solid var(--borda, #cbd5e1); border-radius: 12px; background: var(--papel, #ffffff); color: var(--texto, #111827); cursor: pointer; font: inherit; }
.mu-capa-op.sel { border-color: var(--tinta, #1b1b3a); box-shadow: 0 0 0 3px var(--accent, #2563eb); }
.mu-capa-op img { height: 40px; width: auto; }
.mu-capa-infos .mu-capa-op img { height: 62px; border-radius: 6px; }
.mu-capa-op small { font-size: 12px; }
.mu-capa-txt { padding: 6px 4px; font-weight: 600; }
.mu-bib-dlg { width: min(860px, 96vw); max-height: 90vh; }
.mu-bib-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mu-bib-q { width: 100%; margin: 8px 0; }
.mu-bib-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.mu-bib-cat { border: 2px solid var(--borda, #cbd5e1); border-radius: 999px; padding: 6px 12px; background: var(--papel, #fff); color: var(--texto, #111827); font: inherit; cursor: pointer; min-height: 40px; }
.mu-bib-cat.sel { background: var(--tinta, #1b1b3a); color: var(--on-color, #fff); }
.mu-bib-grelha { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 56vh; overflow: auto; }
.mu-bib-item { aspect-ratio: 1; border: 2px solid var(--borda, #cbd5e1); border-radius: 10px; background: #ffffff; padding: 4px; cursor: pointer; }
.mu-bib-item img { width: 100%; height: 100%; object-fit: contain; }
.mu-capa-fig, .mural-capa { margin: 8px 0 10px; border-radius: 14px; overflow: hidden; }
.mu-capa-fig img, .mural-capa img { display: block; width: 100%; max-height: 260px; object-fit: contain; }
.mu-capa-fig.mu-capa-app img, .mu-capa-fig.mu-capa-tema img, .mural-capa-app img, .mural-capa-tema img { width: 96px; height: 96px; }
.mu-capa-fig.mu-capa-lib img, .mural-capa-lib img { object-fit: cover; background: #ffffff; }
.mural-capa-info img, .mu-capa-fig.mu-capa-info img { max-width: 560px; border-radius: 14px; }

/* Grupos (2.376.0): o banco com todos os temas, para os dar à mão (arrastar para um aluno, ou carregar no tema e depois no aluno). */
.gr-banco { margin: 8px 0 12px; border: 2px dashed var(--borda, #cbd5e1); border-radius: 14px; padding: 8px 12px; background: var(--papel, #ffffff); }
.gr-banco > summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.gr-banco-lista { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 2px; }
.gr-banco-grupo { margin-top: 10px; }
.gr-banco-disc { margin: 0 0 4px; font-size: 15px; }
.gr-banco-fonte-rot { margin: 6px 0; }
.gr-banco-fonte { max-width: 100%; }
.gr-banco-tema { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border: 2px solid var(--tinta, #1b1b3a); border-radius: 999px; background: #fef3c7; color: #1b1b3a; font: inherit; font-weight: 600; cursor: grab; touch-action: none; text-align: left; }
.gr-banco-tema.usado { background: var(--papel, #ffffff); color: var(--texto, #1b1b3a); border-style: dashed; font-weight: 500; }
.gr-banco-tema.gr-sort-sel { box-shadow: 0 0 0 3px var(--accent, #2563eb); }
.gr-banco-tema.gr-a-arrastar { opacity: 0.4; }
.gr-banco-n { font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--tinta, #1b1b3a); color: var(--on-color, #ffffff); }
html[data-theme="dark"] .gr-banco-tema:not(.usado) { background: #fde68a; color: #1b1b3a; }
@media print { .gr-banco { display: none; } }

/* 2.376.3: destaque das apps na página de entrada (a par do dos jogos). */
.apps-banner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 18px; margin: 18px 0; padding: 16px 18px; border: 3px solid var(--tinta, #1b1b3a); border-radius: 22px; background: linear-gradient(120deg, #fecaca, #ede9fe 50%, #cffafe); color: #1b1b3a; box-shadow: 5px 5px 0 var(--tinta, #1b1b3a); }
.apps-banner-logos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.apps-banner-app { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 2px solid var(--tinta, #1b1b3a); border-radius: 14px; background: #fff; color: #1b1b3a; text-decoration: none; font-size: 15px; }
.apps-banner-app:nth-child(odd) { transform: rotate(-2deg); }
.apps-banner-app:nth-child(even) { transform: rotate(2deg); }
.apps-banner-app:hover, .apps-banner-app:focus-visible { transform: translate(-1px, -2px); box-shadow: 3px 3px 0 var(--tinta, #1b1b3a); }
.apps-banner-app img { width: 56px; height: 56px; }
.apps-banner-txt { display: flex; flex-direction: column; gap: 4px; }
.apps-banner-nomes { font-size: 14px; font-weight: 700; color: #5b21b6; }
.apps-banner-cta { text-decoration: none; }
@media (max-width: 640px) { .apps-banner { grid-template-columns: 1fr; } .apps-banner-logos { grid-template-columns: repeat(3, 1fr); } }
@media (prefers-reduced-motion: reduce) { .apps-banner-app { transform: none !important; } }
:root[data-theme="dark"] .apps-banner { background: linear-gradient(120deg, #3f1515, #2e1065 50%, #083344); color: #f1f5f9; }
:root[data-theme="dark"] .apps-banner .jogos-banner-k, :root[data-theme="dark"] .apps-banner-cta { background: #f1f5f9; color: #0f172a; border-color: #f1f5f9; }
:root[data-theme="dark"] .apps-banner-nomes { color: #c4b5fd; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .apps-banner { background: linear-gradient(120deg, #3f1515, #2e1065 50%, #083344); color: #f1f5f9; }
  :root:not([data-theme="light"]) .apps-banner .jogos-banner-k, :root:not([data-theme="light"]) .apps-banner-cta { background: #f1f5f9; color: #0f172a; border-color: #f1f5f9; }
  :root:not([data-theme="light"]) .apps-banner-nomes { color: #c4b5fd; }
}

/* 2.377.0: barra para formatar só as palavras escolhidas (public/texto-rico.js), no Poster, no Gamebox e no Clipbox. */
.rico-caixa { display: grid; gap: 4px; margin: 4px 0 8px; }
.rico-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.rico-bt { min-width: 34px; min-height: 34px; padding: 2px 8px; border: 2px solid var(--tinta, #1b1b3a); border-radius: 8px; background: var(--papel, #fff); color: inherit; font: inherit; font-size: 15px; cursor: pointer; }
.rico-bt:hover { filter: brightness(0.95); }
.rico-bt[aria-pressed="true"] { background: var(--tinta, #1b1b3a); color: var(--papel, #fff); }
.rico-bt:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.rico-ln { font-weight: 800; }
.rico-li { font-style: italic; font-family: Georgia, serif; }
.rico-lu { text-decoration: underline; }
.rico-cores { display: inline-flex; flex-wrap: wrap; gap: 3px; margin: 0 4px; }
.rico-cor { min-width: 24px; width: 24px; min-height: 24px; height: 24px; padding: 0; border-radius: 50%; }
.rico-dica { color: var(--muted, #555); font-size: 13px; }
.rico-dica.rico-dica-ver { color: #b45309; font-weight: 700; }
.ds-rico-rot { font-weight: 700; margin-right: 6px; }
.ds-barra-el .rico-barra { display: inline-flex; }
@media (pointer: coarse) { .rico-bt { min-height: 40px; min-width: 40px; } .rico-cor { width: 32px; min-width: 32px; height: 32px; min-height: 32px; } }

/* Mural: para quem é a aula (2.381.0) */
.mu-para { display: grid; gap: 8px; margin: 10px 0; }
.mu-para-lista { display: grid; gap: 8px; padding: 10px 12px; border: 1px dashed var(--borda); border-radius: 12px; }
.mu-para-ac { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mu-para-al { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 12px; max-height: 260px; overflow: auto; }
.mu-para-al label { display: flex; gap: 6px; align-items: center; min-height: 32px; cursor: pointer; }
.mu-so-alguns { background: #ede9fe; color: #4c1d95; }
:root[data-theme="dark"] .mu-so-alguns { background: #2e1065; color: #ddd6fe; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mu-so-alguns { background: #2e1065; color: #ddd6fe; } }
/* Mural: noutras turmas, publicação curta, tirada aos alunos (2.382.0) */
.mu-outras { display: grid; gap: 8px; margin: 10px 0; }
.mu-outras-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mu-outra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--borda); border-radius: 10px; }
.mu-outras-op { display: grid; gap: 4px; }
.mu-tirada { background: #fee2e2; color: #7f1d1d; } .mu-rapida { background: #e0f2fe; color: #0c4a6e; } .mu-grupo { background: #fef3c7; color: #78350f; }
:root[data-theme="dark"] .mu-tirada { background: #450a0a; color: #fecaca; } :root[data-theme="dark"] .mu-rapida { background: #082f49; color: #bae6fd; } :root[data-theme="dark"] .mu-grupo { background: #451a03; color: #fde68a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mu-tirada { background: #450a0a; color: #fecaca; } :root:not([data-theme="light"]) .mu-rapida { background: #082f49; color: #bae6fd; } :root:not([data-theme="light"]) .mu-grupo { background: #451a03; color: #fde68a; } }
/* Atividades num só separador (2.382.0) */
.cat .sec-cab { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; }
.cat-filtros { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 10px 0 14px; }
.cat-f { display: inline-flex; gap: 6px; align-items: center; }
.cat-q { min-width: 180px; }
.cat-grupo { margin: 16px 0; }
.cat-grupo-tit { margin: 0 0 6px; font-size: 16px; }
.cat-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cat-item { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--borda); border-radius: 12px; background: var(--papel); }
.cat-info { flex: 1 1 320px; min-width: 0; display: grid; gap: 4px; }
.cat-tit { font-weight: 700; color: var(--tinta, inherit); text-underline-offset: 3px; }
.cat-onde { margin: 0; }
.cat-ac { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cat-pub { width: min(720px, 96vw); }
.cat-pub-campo { display: grid; gap: 4px; margin: 8px 0; }
.cat-pub-turmas { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; max-height: 46vh; overflow: auto; }
.cat-pub-linha { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 6px 8px; border: 1px solid var(--borda); border-radius: 10px; }
.cat-pub-linha label { display: inline-flex; gap: 6px; align-items: center; min-width: 120px; }
.tl-nova-cab { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.tl-nova-ac { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tl-nova-esc { margin-top: 12px; }
.tl-nova-esc-lista { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.tl-nova-esc-lista li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Painel dos jogos de todas as turmas (2.382.6): um cartão por turma (e semestre), a barra de quem jogou hoje e quem está a jogar. */
.pp-turmas { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.pp-tur { display: grid; gap: 6px; padding: 10px 12px; border: 2px solid var(--borda); border-radius: 14px; background: var(--papel); }
.pp-tur.agora { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .25); }
.pp-tur.fechado { border-style: dashed; }
.pp-tur-lig { font-size: 20px; color: var(--texto); text-decoration: none; }
.pp-tur-lig:hover, .pp-tur-lig:focus-visible { text-decoration: underline; }
.pp-tur-lig small { font-size: 13px; color: var(--suave); }
.pp-tur-agora { font-weight: 700; }
.pp-tur .pp-barra { grid-column: auto; }
.pp-tur-n { color: var(--suave); }
.pp-tur-fech { justify-self: start; padding: 2px 8px; border-radius: 999px; background: #fee2e2; color: #7f1d1d; font-size: 13px; font-weight: 700; }
:root[data-theme="dark"] .pp-tur-fech { background: #450a0a; color: #fecaca; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pp-tur-fech { background: #450a0a; color: #fecaca; } }
.pp-sub { margin: 4px 0 8px; font-size: 18px; }
.pp-turno { max-width: 100%; }

/* «Nova aula» do mural (2.382.8): secções numeradas, a janela «Juntar à aula» com separadores e a lista de alunos legível. */
.mu-passo { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 2px solid var(--borda); border-radius: 16px; min-width: 0; }
.mu-passo-tit { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.05rem; }
.mu-passo-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tinta, #1b1b3a); color: var(--papel, #fff); font-size: 15px; flex: none; }
.mu-novo .mu-campos > label, .mu-novo .mu-c-txt { min-width: 0; }
.mu-novo input[type="date"], .mu-novo input[type="time"] { width: 100%; min-width: 0; max-width: 100%; display: block; }
.mu-novo input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.mu-juntar { display: flex; flex-wrap: wrap; gap: 8px; }
.mu-escolher-apoio { border-color: #6d28d9; }
.mu-aviso-apoio { display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #ede9fe; color: #2e1065; }
.mu-aviso-apoio p { margin: 0; }
.mu-aviso-apoio-bt { justify-self: start; }
:root[data-theme="dark"] .mu-aviso-apoio { background: #2e1065; color: #ede9fe; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mu-aviso-apoio { background: #2e1065; color: #ede9fe; } }
/* Para quem: cada aluno numa linha, a caixa à esquerda e o nome a seguir. */
.mu-para-al { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); max-height: 340px; gap: 6px; }
.mu-para-al label.mu-para-linha { display: flex; flex-direction: row; justify-content: flex-start; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; min-height: 44px; border: 2px solid var(--borda); border-radius: 12px; font-weight: 500; }
.mu-para-linha.sel { border-color: #2563eb; background: #eff6ff; }
:root[data-theme="dark"] .mu-para-linha.sel { background: #172554; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mu-para-linha.sel { background: #172554; } }
.mu-para-linha input { flex: none; width: 20px; height: 20px; margin: 0; }
.mu-para-num { flex: none; min-width: 1.6em; color: var(--suave); font-variant-numeric: tabular-nums; }
.mu-para-nome { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.mu-para-linha .apoio-etq { flex: none; }
/* A janela «Juntar à aula». */
dialog.mu-esc { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 3px solid var(--tinta, #1b1b3a); border-radius: 20px; background: var(--papel, #fff); color: var(--texto); display: flex; flex-direction: column; }
dialog.mu-esc:not([open]) { display: none; }
.mu-esc-cab { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; }
.mu-esc-cab h2 { margin: 0; flex: 1; }
.mu-esc-abas { display: flex; gap: 6px; padding: 6px 16px 0; border-bottom: 2px solid var(--borda); overflow-x: auto; }
.mu-esc-aba { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; min-height: 44px; border: 2px solid transparent; border-bottom: 0; border-radius: 12px 12px 0 0; background: none; color: var(--texto); font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.mu-esc-aba.sel { border-color: var(--borda); background: var(--papel, #fff); margin-bottom: -2px; }
.mu-esc-aba-apoio { color: #5b21b6; }
:root[data-theme="dark"] .mu-esc-aba-apoio { color: #c4b5fd; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mu-esc-aba-apoio { color: #c4b5fd; } }
.mu-esc-aba-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #2563eb; color: #fff; font-size: 13px; }
.mu-esc-corpo { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px; overflow: auto; flex: 1 1 auto; min-height: 0; }
.mu-esc-explica { padding: 10px 12px; border-radius: 12px; background: #ede9fe; color: #2e1065; }
:root[data-theme="dark"] .mu-esc-explica { background: #2e1065; color: #ede9fe; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mu-esc-explica { background: #2e1065; color: #ede9fe; } }
.mu-esc-filtros { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mu-esc-q { flex: 1 1 220px; min-width: 0; }
.mu-esc-tema { max-width: 100%; }
.mu-esc-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.mu-esc-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 10px 12px; border: 2px solid var(--borda); border-radius: 14px; background: var(--papel, #fff); color: var(--texto); font: inherit; text-align: left; cursor: pointer; }
.mu-esc-item:hover { border-color: #2563eb; }
.mu-esc-item.sel { border-color: #2563eb; background: #eff6ff; }
:root[data-theme="dark"] .mu-esc-item.sel { background: #172554; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mu-esc-item.sel { background: #172554; } }
.mu-esc-item.apoio { border-left: 6px solid #7c3aed; }
.mu-esc-visto { flex: none; width: 22px; height: 22px; border: 2px solid var(--borda); border-radius: 6px; }
.mu-esc-item.sel .mu-esc-visto { border-color: #2563eb; background: #2563eb; box-shadow: inset 0 0 0 3px var(--papel, #fff); }
.mu-esc-txt { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.mu-esc-txt b { overflow-wrap: anywhere; }
.mu-esc-txt small { color: var(--suave); }
.mu-esc-vazio { padding: 10px 0; }
.mu-esc-pe { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; border-top: 2px solid var(--borda); }
.mu-esc-n { flex: 1; color: var(--suave); }
@media (max-width: 560px) { .mu-esc-lista { grid-template-columns: minmax(0, 1fr); } .mu-esc-ok { width: 100%; } .mu-para-al { grid-template-columns: minmax(0, 1fr); } .mu-passo { padding: 10px; } }

/* Filtro dos alunos com apoio no catálogo de atividades (2.383.2). */
.cat-apoio { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 12px; }
.cat-apoio-rot { font-weight: 700; }
.cat-apoio-bt { min-height: 40px; padding: 6px 14px; border: 2px solid var(--borda); border-radius: 999px; background: var(--papel, #fff); color: var(--texto); font: inherit; font-weight: 600; cursor: pointer; }
.cat-apoio-bt.cat-apoio-so { border-color: #7c3aed; color: #5b21b6; }
.cat-apoio-bt.sel { background: #1b1b3a; border-color: #1b1b3a; color: #fff; }
.cat-apoio-bt.cat-apoio-so.sel { background: #5b21b6; border-color: #5b21b6; color: #fff; }
:root[data-theme="dark"] .cat-apoio-bt.cat-apoio-so:not(.sel) { color: #c4b5fd; }
:root[data-theme="dark"] .cat-apoio-bt.sel:not(.cat-apoio-so) { background: #e2e8f0; border-color: #e2e8f0; color: #0b1020; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cat-apoio-bt.cat-apoio-so:not(.sel) { color: #c4b5fd; } :root:not([data-theme="light"]) .cat-apoio-bt.sel:not(.cat-apoio-so) { background: #e2e8f0; border-color: #e2e8f0; color: #0b1020; } }
.cat-apoio-nota { flex-basis: 100%; margin: 0; }
/* Janela «Instalar a aplicação» e avisos de convites dos jogos (Web Push): dialog.inst-nov (public/home.js) e div.push-caixa
   (TPInstalar.avisos.caixa em public/comum.js), também na página dos jogos. Só cores de tokens, por isso servem os dois temas. */
dialog.inst-nov { width: min(820px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow: auto; padding: 0; border: 3px solid var(--tinta, #1b1b3a); border-radius: 22px; background: var(--papel); color: var(--texto); box-shadow: 6px 6px 0 var(--tinta, #1b1b3a); }
dialog.inst-nov::backdrop { background: rgba(11, 18, 40, .62); }
.inst-nov-grelha { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; padding: 18px 20px 6px; }
.inst-nov-sec { position: relative; border: 2px solid var(--borda); border-radius: 16px; padding: 12px 14px; background: var(--papel); }
.inst-nov-sec.atual { border-color: var(--tinta, var(--accent)); box-shadow: 3px 3px 0 var(--tinta, #1b1b3a); }
.inst-nov-sec h3 { margin: 0 0 8px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.inst-nov-este { display: inline-block; margin-bottom: 6px; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--on-color, #fff); font-size: 13px; font-weight: 700; }
.inst-nov-passos { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.inst-nov-passo { display: flex; align-items: center; gap: 10px; }
.inst-nov-ico { flex: none; width: 28px; height: 28px; color: var(--accent); }
.inst-nov-avisos { margin: 8px 20px 6px; }
.inst-nov-pe { gap: 10px; flex-wrap: wrap; padding-top: 12px; }
.push-caixa { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.push-caixa .push-nota { flex: 1 1 100%; margin: 0; font-size: 14px; color: var(--suave); }
.push-estado { font-weight: 700; color: var(--ok); }
.pz-push { margin-top: 12px; }
@media (max-width: 560px) { .inst-nov-grelha { padding: 14px 12px 4px; } .inst-nov-avisos { margin: 8px 12px; } .inst-nov-pe .btn { flex: 1 1 auto; } }

/* Janela «Ativar os avisos de convites» depois de instalar a plataforma (2.385.1, avisosAppJanela em public/home.js) */
dialog.inst-nov.avisos-app { width: min(520px, calc(100vw - 24px)); }
.avisos-app-corpo { padding: 16px 20px 4px; }
.avisos-app-corpo p { margin: 0 0 10px; }
.avisos-app-nota { color: var(--texto2, inherit); font-size: .95em; }
.avisos-app-est:empty { display: none; }
.avisos-app-est { font-weight: 600; }

/* Infográficos da «Imagem da aula» no mural (2.386.0): maiores, para se lerem antes de escolher */
.mu-capa-grupo.mu-capa-infos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 12px; align-items: stretch; }
.mu-capa-infos .mu-capa-op { width: 100%; padding: 8px; }
.mu-capa-infos .mu-capa-op img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 10px; }

/* Mural: outras turmas com caixas (2.386.0, outrasTurmas em public/admin-mural.js) */
.mu-outras { margin-top: 12px; display: grid; gap: 8px; }
.mu-outras-cx { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mu-outra-cx { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 12px; border: 2px solid var(--borda, #cbd5e1); border-radius: 999px; background: var(--papel, #ffffff); color: var(--texto, #111827); font-weight: 700; cursor: pointer; }
.mu-outra-cx.sel { border-color: var(--tinta, #1b1b3a); background: color-mix(in srgb, var(--accent, #2563eb) 18%, var(--papel, #ffffff)); }
.mu-outra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mu-outra-nome { min-width: 4em; }

/* Grupos numa aula do mural (2.386.0) */
.mu-grupos-esc { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-top: 10px; }
.mu-c-grupos { display: grid; gap: 4px; font-weight: 700; }
.mural-grupos-lista { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.mural-grupo { border: 2px solid var(--borda, #cbd5e1); border-radius: 12px; padding: 8px 10px; display: grid; gap: 2px; background: var(--papel, #ffffff); }
.mural-grupo.meu { border-color: var(--tinta, #1b1b3a); background: color-mix(in srgb, var(--accent, #2563eb) 12%, var(--papel, #ffffff)); }
.mural-grupo-etq { font-size: 12px; font-weight: 700; color: var(--accent, #2563eb); }
.mural-grupo-al { font-size: 14px; }

/* Sugestões dos jogadores, na área «Jogos» (2.396.0) */
.pz-adm-sug-lista { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.pz-adm-sug-it { border: 2px solid var(--borda, #ccc); border-radius: 12px; padding: 8px 12px; background: var(--papel); }
.pz-adm-sug-it.nova { border-color: var(--tinta, #1b1b3a); box-shadow: 3px 3px 0 var(--tinta, #1b1b3a); }
.pz-adm-sug-cab { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.pz-adm-sug-txt { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pz-adm-sug-it .pz-barra { justify-content: flex-start; gap: 8px; padding: 0; }

/* Aspeto «Vidro» (2.398.0): opcional, por cima do aspeto novo (html.vidro, tp-aspeto = vidro). Ideia original do professor
   a partir dos efeitos de «vidro líquido»: fundo de cor suave, superfícies translúcidas com brilho na borda, desfoque só no
   que flutua (cabeçalhos, menus, janelas), botões que incham com uma mola e uma gota de luz onde se toca (vidro.js em comum.js).
   O texto fica sempre sobre vidro quase opaco (contraste igual ao aspeto novo); sem backdrop-filter, as superfícies ficam opacas;
   com «reduzir o movimento», nada se mexe. Os palcos dos jogos, os sítios, os designs e as folhas dos alunos não mudam. */
:root.vidro {
  --vd-vidro: rgba(255, 255, 255, .74); --vd-vidro-forte: rgba(255, 255, 255, .84); --vd-borda: rgba(255, 255, 255, .9);
  --vd-aresta: rgba(120, 140, 200, .28); --vd-brilho: rgba(255, 255, 255, .95); --vd-sombra: 0 10px 30px rgba(40, 50, 110, .14), 0 2px 6px rgba(40, 50, 110, .08);
  --vd-f1: #c9dcff; --vd-f2: #ffd9ec; --vd-f3: #d4f5e6; --vd-f4: #fff0c2; --vd-base: #eef2fb; --vd-gota: rgba(255, 255, 255, .85);
  --vd-mola: cubic-bezier(.34, 1.56, .64, 1);
}
:root.vidro[data-theme="dark"] {
  --vd-vidro: rgba(24, 32, 48, .72); --vd-vidro-forte: rgba(22, 30, 46, .86); --vd-borda: rgba(170, 190, 255, .22);
  --vd-aresta: rgba(0, 0, 0, .4); --vd-brilho: rgba(200, 215, 255, .28); --vd-sombra: 0 12px 34px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .3);
  --vd-f1: #1c2c5c; --vd-f2: #3d1a3a; --vd-f3: #123a2e; --vd-f4: #3a2f10; --vd-base: #0b1020; --vd-gota: rgba(190, 210, 255, .35);
}
@media (prefers-color-scheme: dark) { :root.vidro:not([data-theme="light"]) {
  --vd-vidro: rgba(24, 32, 48, .72); --vd-vidro-forte: rgba(22, 30, 46, .86); --vd-borda: rgba(170, 190, 255, .22);
  --vd-aresta: rgba(0, 0, 0, .4); --vd-brilho: rgba(200, 215, 255, .28); --vd-sombra: 0 12px 34px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .3);
  --vd-f1: #1c2c5c; --vd-f2: #3d1a3a; --vd-f3: #123a2e; --vd-f4: #3a2f10; --vd-base: #0b1020; --vd-gota: rgba(190, 210, 255, .35);
} }
/* O fundo: manchas de cor paradas, para o vidro ter alguma coisa por trás. */
html:root.vidro.vidro.vidro:not(.jogo):not(.pz-a-jogar) body {
  background-color: var(--vd-base);
  background-image: radial-gradient(40vmax 34vmax at 8% 6%, var(--vd-f1), transparent 70%), radial-gradient(36vmax 30vmax at 92% 18%, var(--vd-f2), transparent 70%),
    radial-gradient(42vmax 34vmax at 80% 92%, var(--vd-f3), transparent 70%), radial-gradient(34vmax 28vmax at 12% 86%, var(--vd-f4), transparent 70%);
  background-attachment: fixed;
}
/* Superfícies de vidro (sem desfoque: são muitas e o fundo é suave). */
html:root.vidro.vidro.vidro :is(.cartao, .pf-cartao, .pf-card, .tema-card, .cartao-esc, .modulo, .tema-bloco, .cabeca-img, .admin-sec, .ativ, .pz-cartao, .ferr-card,
  .jogos-banner, .apps-banner, .rec-cartao, .tc-card, .tl-linha, .mural-post, .mu-post, .est-cartao, .pz-dist, .pz-favs, .pz-cat, .jogos-registo, .pz-desafio, .pz-aviso-moderacao) {
  background-color: var(--vd-vidro); background-image: linear-gradient(160deg, var(--vd-brilho) 0%, transparent 38%);
  border: 1px solid var(--vd-borda); border-radius: 22px;
  box-shadow: inset 0 1px 0 var(--vd-brilho), inset 0 -1px 0 var(--vd-aresta), var(--vd-sombra);
}
/* O que flutua: desfoque verdadeiro por trás. */
html:root.vidro.vidro.vidro :is(.cab-pag, header.aula-topo, .nav-admin, .turma-barra, .menu-painel, dialog, .modal, .pz-indice, .nav-baixo, .chf-botao, .aviso-demo) {
  background-color: var(--vd-vidro-forte); background-image: linear-gradient(170deg, var(--vd-brilho) 0%, transparent 45%);
  border: 1px solid var(--vd-borda);
  box-shadow: inset 0 1px 0 var(--vd-brilho), inset 0 -1px 0 var(--vd-aresta), var(--vd-sombra);
  -webkit-backdrop-filter: blur(18px) saturate(1.7); backdrop-filter: blur(18px) saturate(1.7);
}
html:root.vidro.vidro.vidro dialog::backdrop { background: rgba(20, 28, 60, .28); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
/* Botões: pastilhas de vidro que incham sob o ponteiro, com mola. */
html:root.vidro.vidro.vidro :is(.btn, summary.btn, .seg-sub-btn, .cab-nav-item, .nav-btn, .pz-ind, .tab-ano) {
  border-radius: 999px; border: 1px solid var(--vd-borda);
  box-shadow: inset 0 1px 0 var(--vd-brilho), inset 0 -2px 4px var(--vd-aresta), 0 4px 12px rgba(40, 50, 110, .12);
  transition: transform .45s var(--vd-mola), box-shadow .3s ease, background-color .2s ease;
}
html:root.vidro.vidro.vidro .btn:not(.sec):not(.peq) { background-image: linear-gradient(180deg, rgba(255, 255, 255, .35), transparent 55%); }
@media (hover: hover) { html:root.vidro.vidro.vidro :is(.btn, summary.btn, .seg-sub-btn, .cab-nav-item, .nav-btn, .pz-ind, .tab-ano):hover:not(:disabled) { transform: scale(1.045); box-shadow: inset 0 1px 0 var(--vd-brilho), inset 0 -2px 4px var(--vd-aresta), 0 8px 20px rgba(40, 50, 110, .18); } }
html:root.vidro.vidro.vidro :is(.btn, summary.btn, .seg-sub-btn, .cab-nav-item, .nav-btn, .pz-ind, .tab-ano):active:not(:disabled) { transform: scale(.96); transition-duration: .12s; }
/* Cartões que se levantam um pouco (só com rato). */
@media (hover: hover) { html:root.vidro.vidro.vidro :is(.pz-cartao, .pf-card, .ferr-card, .ativ, .tc-card):hover { transform: translateY(-3px) scale(1.01); transition: transform .45s var(--vd-mola); } }
/* A gota de luz onde se toca (vidro.js). */
.vd-gota { position: fixed; z-index: 2147483000; pointer-events: none; border-radius: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  background: radial-gradient(circle, var(--vd-gota) 0%, transparent 70%); transform: scale(0); opacity: .9; animation: vd-gota .6s var(--vd-mola) forwards; }
@keyframes vd-gota { to { transform: scale(18); opacity: 0; } }
/* Sem desfoque no navegador: vidro opaco, para o texto se ler sempre. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html:root.vidro.vidro.vidro :is(.cab-pag, header.aula-topo, .nav-admin, .turma-barra, .menu-painel, dialog, .modal, .pz-indice, .nav-baixo, .chf-botao, .aviso-demo) { background-color: var(--papel); }
}
@media (prefers-reduced-motion: reduce) {
  html:root.vidro.vidro.vidro :is(.btn, summary.btn, .seg-sub-btn, .cab-nav-item, .nav-btn, .pz-ind, .tab-ano, .pz-cartao, .pf-card, .ferr-card, .ativ, .tc-card) { transition: none !important; transform: none !important; }
  .vd-gota { display: none; }
}
:root.reduz .vd-gota { display: none; }
@media print { html:root.vidro.vidro.vidro body { background: #fff !important; } html:root.vidro.vidro.vidro * { backdrop-filter: none !important; box-shadow: none !important; } }
.aspeto-sel { font: inherit; font-size: inherit; margin-left: 4px; padding: 2px 6px; border-radius: 8px; border: 1px solid var(--borda-in); background: var(--papel); color: var(--texto); }
@media print { .aspeto-rot { display: none !important; } }
html:root.vidro.vidro.vidro :is(.cab-pag, header.aula-topo, .nav-admin, .turma-barra, .pz-indice, .aviso-demo) { border-radius: 20px; }
html:root.vidro.vidro.vidro .btn.sec { box-shadow: inset 0 1px 0 var(--vd-brilho), inset 0 -2px 4px var(--vd-aresta), 0 4px 12px rgba(40, 50, 110, .12); }
