:root {
  --fundo: #05060f;
  --texto: #e5e7eb;
  --texto-suave: #94a3b8;
  --vidro: rgba(255, 255, 255, 0.06);
  --vidro-opaco: rgba(17, 24, 45, 0.62);
  --vidro-borda: rgba(255, 255, 255, 0.12);
  --acento: #60a5fa;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
  background: var(--fundo);
  color: var(--texto);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--fundo);
}

:root {
  --bolinha: 90px;
  --topo-aula: calc(58px + env(safe-area-inset-top));
  --suave: cubic-bezier(0.2, 0.8, 0.2, 1);
  --giz: #f8fafc;
  --giz-suave: rgba(248, 250, 252, 0.55);
  --giz-amarelo: #fde68a;
  --giz-verde: #86efac;
  --papel: #fdf6e3;
  --tinta: #1c1917;
  --tinta-suave: #57534e;
  --moldura: 10px;
  --roteiro-largura: 268px;
  --roteiro-recolhido: 64px;
  --roteiro-folga: 14px;
}

#orb {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  overflow: hidden;
  z-index: 0;
  cursor: pointer;
}

body.modo-aula #orb {
  top: var(--topo-aula);
  left: 18px;
  width: var(--bolinha);
  height: var(--bolinha);
  border-radius: 50%;
  z-index: 4;
}

#orb-aro {
  position: fixed;
  top: var(--topo-aula);
  left: 18px;
  width: var(--bolinha);
  height: var(--bolinha);
  border-radius: 50%;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.72);
  transition: opacity 0.35s var(--suave), transform 0.35s var(--suave);
  box-shadow: 0 0 0 1px rgba(103, 232, 249, 0.25), 0 0 28px rgba(103, 232, 249, 0.25), 0 10px 30px rgba(0, 0, 0, 0.5);
}

body.modo-aula #orb-aro {
  opacity: 1;
  transform: none;
}

#orb-aro.animando {
  will-change: transform, opacity;
}

body.modo-aula .status {
  opacity: 0;
  pointer-events: none;
}

body.modo-aula .cards {
  left: auto;
  right: 34px;
  top: calc(var(--topo-aula) + 74px);
  bottom: auto;
  width: min(360px, calc(100vw - 60px));
  max-height: min(60vh, calc(100vh - var(--topo-aula) - 240px));
  z-index: 5;
}

.topo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  z-index: 2;
}

.espaco {
  flex: 1;
}

.conexao {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  transition: background-color 0.4s, box-shadow 0.4s;
}

.conexao.online {
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
}

.chip {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--vidro-opaco);
  border: 1px solid var(--vidro-borda);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.controle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--texto-suave);
  cursor: pointer;
  user-select: none;
}

.controle input {
  accent-color: var(--acento);
}

.seletor {
  background: var(--vidro-opaco);
  color: var(--texto);
  border: 1px solid var(--vidro-borda);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 14px;
}

.seletor option {
  background: #0f172a;
}

.icone {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--vidro-borda);
  background: var(--vidro-opaco);
  color: var(--texto);
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.15s, background-color 0.2s;
  display: grid;
  place-items: center;
}

.icone:hover {
  background: rgba(45, 58, 92, 0.78);
}

.icone:active {
  transform: scale(0.92);
}

.palco {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  pointer-events: none;
}

.palco > * {
  pointer-events: auto;
}

.card {
  position: absolute;
  top: 6%;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 90vw);
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(8, 20, 45, 0.55);
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.15), inset 0 0 20px rgba(34, 211, 238, 0.05);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1;
}

.card[hidden] {
  display: none;
}

.card-titulo {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #67e8f9;
}

.card a {
  color: var(--texto);
  font-size: 13px;
  text-decoration: none;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card a:hover {
  color: #67e8f9;
}

.login {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse 420px 560px at 50% 50%, rgba(5, 6, 15, 0.82), rgba(5, 6, 15, 0.35) 70%, rgba(5, 6, 15, 0.2));
}

.login[hidden] {
  display: none;
}

.login-cena {
  width: min(380px, 88vw);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  animation: surgir 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  padding: 36px 30px 28px;
  border-radius: 24px;
  background: rgba(5, 8, 20, 0.72);
  backdrop-filter: blur(22px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

@keyframes surgir {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.login-marca {
  margin: 0;
  text-align: center;
  font-weight: 200;
  font-size: clamp(38px, 7vw, 54px);
  letter-spacing: 0.42em;
  padding-left: 0.42em;
  color: #f1f8ff;
  text-shadow: 0 0 30px rgba(103, 232, 249, 0.45), 0 0 80px rgba(103, 232, 249, 0.2);
}

.login-sub {
  margin: 6px 0 38px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(226, 232, 240, 0.55);
}

.login-campos {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.login-linha {
  display: flex;
  gap: 18px;
  align-items: flex-end;
}

.login-linha[hidden] {
  display: none;
}

.linha {
  position: relative;
  flex: 1;
  display: block;
}

.linha.curta {
  flex: 0 0 84px;
}

.linha input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  color: #f1f8ff;
  font-size: 16px;
  padding: 10px 2px 8px;
  outline: none;
  transition: border-color 0.3s;
  -moz-appearance: textfield;
}

.linha input::-webkit-outer-spin-button,
.linha input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.linha input:-webkit-autofill {
  -webkit-text-fill-color: #f1f8ff;
  -webkit-box-shadow: 0 0 0 1000px #05060f inset;
  transition: background-color 9999s;
}

.linha span {
  position: absolute;
  left: 2px;
  top: 10px;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: rgba(148, 163, 184, 0.7);
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.linha::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #67e8f9, transparent);
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 0 12px rgba(103, 232, 249, 0.6);
}

.linha input:focus ~ span,
.linha input:not(:placeholder-shown) ~ span {
  top: -12px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(103, 232, 249, 0.85);
}

.linha:focus-within::after {
  transform: scaleX(1);
}

.genero {
  flex: 1;
  display: flex;
  gap: 6px;
  padding-bottom: 6px;
}

.genero-opcao {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: transparent;
  color: rgba(226, 232, 240, 0.6);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s;
}

.genero-opcao:hover {
  border-color: rgba(148, 163, 184, 0.45);
  color: #f1f8ff;
}

.genero-opcao.ativo {
  border-color: rgba(241, 248, 255, 0.5);
  color: #f1f8ff;
  background: rgba(255, 255, 255, 0.04);
}

.orbe {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.orbe.rosa { background: #f472b6; box-shadow: 0 0 10px #f472b6; }
.orbe.azul { background: #60a5fa; box-shadow: 0 0 10px #60a5fa; }
.orbe.ciano { background: #67e8f9; box-shadow: 0 0 10px #67e8f9; }

.login-erro {
  min-height: 18px;
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: #fda4af;
  text-align: center;
}

.login-entrar {
  position: relative;
  margin-top: 10px;
  height: 50px;
  border-radius: 999px;
  border: 1px solid rgba(241, 248, 255, 0.22);
  background: rgba(255, 255, 255, 0.03);
  color: #f1f8ff;
  font-size: 14px;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s, background 0.3s, transform 0.15s;
}

.login-entrar i {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(103, 232, 249, 0.25), transparent);
  transform: translateX(-100%);
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.login-entrar:hover {
  border-color: rgba(103, 232, 249, 0.7);
  background: rgba(103, 232, 249, 0.06);
}

.login-entrar:hover i {
  transform: translateX(100%);
}

.login-entrar:active {
  transform: scale(0.985);
}

.login-entrar:disabled {
  opacity: 0.5;
  cursor: wait;
}

.login-rodape {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.4);
}

.link {
  background: none;
  border: none;
  color: rgba(148, 163, 184, 0.75);
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 4px 2px;
  transition: color 0.2s;
}

.link:hover {
  color: #f1f8ff;
}

.botao {
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(34, 211, 238, 0.5);
  background: rgba(34, 211, 238, 0.18);
  color: #e0faff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}


.cards {
  position: fixed;
  left: 16px;
  top: calc(70px + env(safe-area-inset-top));
  bottom: 100px;
  width: min(400px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  z-index: 2;
  pointer-events: none;
  padding: 6px;
}

.card-tela {
  pointer-events: auto;
  position: relative;
  background: linear-gradient(180deg, #fff8dc 0%, #fdeeb6 100%);
  color: var(--tinta);
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 2px 0 rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(12px) rotate(1deg);
  transition: opacity 0.35s, transform 0.45s var(--suave);
}

.card-tela::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 92px;
  height: 22px;
  transform: translateX(-50%) rotate(-1.5deg);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.card-tela.visivel {
  opacity: 1;
  transform: rotate(0.4deg);
}

.card-tela header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 14px 6px 18px;
  border-bottom: 2px dashed rgba(28, 25, 23, 0.14);
}

.card-tela header .card-titulo {
  flex: 1;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--tinta);
  line-height: 1.05;
}

.card-corpo {
  padding: 12px 18px 16px;
  font-size: 17px;
  line-height: 1.55;
  word-break: break-word;
  margin: 0;
  max-height: 46vh;
  overflow-y: auto;
  color: var(--tinta);
}

.card-corpo p {
  margin: 0 0 10px;
}

.card-corpo p:last-child,
.card-corpo ul:last-child,
.card-corpo ol:last-child {
  margin-bottom: 0;
}

.card-corpo ul,
.card-corpo ol {
  margin: 0 0 10px;
  padding-left: 26px;
}

.card-corpo li {
  margin: 4px 0;
}

.card-corpo li::marker {
  color: #b45309;
  font-weight: 700;
}

.card-corpo strong {
  color: #92400e;
}

.card-corpo code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.92em;
  background: rgba(28, 25, 23, 0.07);
  padding: 1px 6px;
  border-radius: 6px;
}

.card-tela.codigo .card-corpo {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 14px;
  white-space: pre-wrap;
}

.mini {
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: #a5f3fc;
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
}

.mini:hover {
  background: rgba(34, 211, 238, 0.22);
}

.card-tela .mini {
  min-height: 36px;
  padding: 4px 14px;
  border-radius: 999px;
  border: 2px solid rgba(28, 25, 23, 0.25);
  background: rgba(255, 255, 255, 0.5);
  color: var(--tinta);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.card-tela .mini:hover {
  background: #fff;
}

.card-tela .mini:active {
  transform: scale(0.96);
}

.card-tela .mini-fechar {
  min-width: 36px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}


.diagrama {
  position: fixed;
  top: var(--topo-aula);
  left: calc(18px + var(--bolinha) + 18px);
  right: 18px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  padding: var(--moldura);
  border-radius: 22px;
  background: linear-gradient(135deg, #b8834a 0%, #8a5a2e 40%, #6b4221 75%, #5a371b 100%);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -2px 0 rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.4s, transform 0.45s var(--suave);
  contain: layout style;
  z-index: 3;
}

.diagrama.animando {
  will-change: transform, opacity;
}

body.com-roteiro .diagrama {
  right: calc(18px + var(--roteiro-largura) + var(--roteiro-folga));
}

body.com-roteiro.roteiro-recolhido .diagrama {
  right: calc(18px + var(--roteiro-recolhido) + var(--roteiro-folga));
}

body.com-roteiro.modo-aula .cards {
  right: calc(34px + var(--roteiro-largura) + var(--roteiro-folga));
}

body.com-roteiro.modo-aula.roteiro-recolhido .cards {
  right: calc(34px + var(--roteiro-recolhido) + var(--roteiro-folga));
}

.diagrama::before {
  content: "";
  position: absolute;
  inset: var(--moldura);
  border-radius: 14px;
  background:
    radial-gradient(ellipse 60% 40% at 18% 12%, rgba(255, 255, 255, 0.07), transparent 70%),
    radial-gradient(ellipse 50% 50% at 85% 95%, rgba(255, 255, 255, 0.05), transparent 65%),
    radial-gradient(ellipse 30% 20% at 60% 50%, rgba(255, 255, 255, 0.025), transparent 70%),
    linear-gradient(160deg, #22443c 0%, #183530 50%, #122a27 100%);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.diagrama > * {
  position: relative;
  z-index: 1;
}

.diagrama[hidden] {
  display: none;
}

.diagrama.visivel {
  opacity: 1;
  transform: none;
}

.diagrama header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px 6px 24px;
}

.diagrama-titulo {
  flex: 1;
  margin: 0;
  min-height: 1em;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  color: var(--giz-amarelo);
  text-shadow: 0 0 14px rgba(253, 230, 138, 0.35);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diagrama-fechar,
.diagrama-seta,
.fc-seta {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(248, 250, 252, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: var(--giz);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
}

.diagrama-fechar:hover,
.diagrama-seta:hover,
.fc-seta:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--giz);
}

.diagrama-fechar:active,
.diagrama-seta:active,
.fc-seta:active:not(:disabled) {
  transform: scale(0.92);
}

.diagrama-fechar:focus-visible,
.diagrama-seta:focus-visible,
.diagrama-ponto:focus-visible,
.questao-alternativa:focus-visible,
.diagrama-parte:focus-visible,
.fc-seta:focus-visible,
.fc-cartao:focus-visible,
.fc-julgar-botao:focus-visible,
.fc-de-novo:focus-visible,
.ck-caixa:focus-visible,
.tabela th:focus-visible,
.tabela td:focus-visible,
.roteiro-alternar:focus-visible {
  outline: 3px solid var(--giz-amarelo);
  outline-offset: 3px;
}

.diagrama-area {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 6px 22px 16px;
  display: flex;
  align-items: safe center;
  justify-content: safe center;
  overflow: auto;
}

.diagrama-area svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}


.lousa-svg {
  --cor: #f8fafc;
  --cor-texto: #f8fafc;
  --cor-destaque: #fde68a;
}

.lousa-svg .forma {
  fill: none;
  stroke: var(--cor);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.35));
}

.lousa-svg .forma.preenchida {
  fill: var(--cor);
  fill-opacity: 0.1;
}

.lousa-svg .forma.preenchida.pintada {
  fill-opacity: 0.88;
  stroke: #fffdf5;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.lousa-svg .ponto {
  fill: var(--cor-texto);
  stroke: var(--cor);
  stroke-width: 2.5;
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 0 6px var(--cor));
}

.lousa-svg .ponto.arrastavel {
  cursor: grab;
  touch-action: none;
  fill: var(--cor-destaque);
  stroke: #fff;
}

.lousa-svg .ponto.agarrado {
  cursor: grabbing;
  filter: drop-shadow(0 0 12px var(--cor-destaque));
}

.lousa-svg .texto {
  fill: var(--cor-texto);
  font-family: "Patrick Hand", "Caveat", cursive;
  font-size: 22px;
  paint-order: stroke;
  stroke: rgba(10, 30, 26, 0.75);
  stroke-width: 4px;
}

.lousa-svg .formula {
  fill: var(--cor-texto);
  font-family: "Caveat", "Patrick Hand", cursive;
  font-size: 36px;
  font-weight: 700;
  paint-order: stroke;
  stroke: rgba(10, 30, 26, 0.75);
  stroke-width: 5px;
}

.lousa-svg .texto,
.lousa-svg .formula {
  --cor: var(--cor-texto);
  fill: var(--cor);
}

.lousa-svg .eixo {
  stroke: rgba(248, 250, 252, 0.45);
  stroke-width: 2;
  fill: none;
}

.lousa-svg .rotulo {
  fill: rgba(248, 250, 252, 0.85);
  font-family: "Patrick Hand", cursive;
  font-size: 14px;
}

.lousa-svg .rotulo.valor {
  font-size: 16px;
  font-weight: 700;
  fill: var(--giz-amarelo);
}

.lousa-svg .barra-grafico {
  fill: var(--cor);
  fill-opacity: 0.55;
  stroke: var(--cor);
  stroke-width: 2.5;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.lousa-svg .barra-grafico.pintada {
  fill-opacity: 0.88;
}

.lousa-svg .forma,
.lousa-svg .ponto,
.lousa-svg .barra-grafico,
.lousa-svg .texto,
.lousa-svg .formula {
  transform-box: fill-box;
  transform-origin: center;
}

.diagrama-area .lousa-svg .destacado {
  --cor: var(--cor-destaque);
  filter: drop-shadow(0 0 8px var(--cor-destaque)) drop-shadow(0 0 20px rgba(253, 230, 138, 0.65));
  animation: pulsar-destaque 1.2s ease-in-out infinite;
  will-change: opacity;
}

.diagrama-area .lousa-svg .pintada.destacado {
  stroke: #fffdf5;
  stroke-width: 6;
}

.lousa-cursor {
  pointer-events: none;
  transition: opacity 0.4s;
}

.cursor-nucleo {
  fill: #fff;
  filter: drop-shadow(0 0 6px #fde68a) drop-shadow(0 0 14px #fde68a);
}

.cursor-halo {
  fill: rgba(253, 230, 138, 0.12);
  stroke: #fde68a;
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0.6;
}

.lousa-cursor.chegou .cursor-halo {
  animation: pulsar-cursor 1.1s ease-out infinite;
  will-change: transform, opacity;
}

@keyframes pulsar-cursor {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.8); opacity: 0; }
}

.lousa-controles {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  pointer-events: none;
}

.lousa-controles:empty {
  display: none;
}

.lousa-slider {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 6px 18px;
  border-radius: 999px;
  background: rgba(10, 30, 26, 0.85);
  border: 2px solid rgba(253, 230, 138, 0.45);
  color: var(--giz);
  font-family: "Patrick Hand", cursive;
  font-size: 19px;
}

.lousa-slider input[type="range"] {
  width: min(240px, 40vw);
  accent-color: #fde68a;
  height: 36px;
  cursor: pointer;
}

.lousa-slider output {
  min-width: 2.5em;
  text-align: right;
  color: var(--giz-amarelo);
  font-weight: 700;
}

.diagrama-area svg .forma,
.diagrama-area svg .ponto,
.diagrama-area svg .barra-grafico,
.diagrama-area svg .texto,
.diagrama-area svg .formula {
  transition: opacity 0.3s, stroke-width 0.3s;
}

.diagrama-area svg .destacado {
  filter: drop-shadow(0 0 8px #fde68a) drop-shadow(0 0 18px rgba(253, 230, 138, 0.7));
  animation: pulsar-destaque 1.2s ease-in-out infinite;
  will-change: opacity;
}

@keyframes pulsar-destaque {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.imagem-aula {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  border: 6px solid #fffaf0;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: scale(0.98) rotate(-0.6deg);
  transition: opacity 0.6s, transform 0.6s var(--suave);
}

.imagem-aula.pronta {
  opacity: 1;
  transform: rotate(-0.6deg);
}

.imagem-gerando {
  height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--giz-suave);
  font-family: "Patrick Hand", cursive;
  font-size: 22px;
}

.imagem-pulso {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(248, 250, 252, 0.25);
  border-top-color: var(--giz-amarelo);
  animation: girar 1.1s linear infinite;
}

@keyframes girar {
  to { transform: rotate(360deg); }
}


.quadro {
  list-style: none;
  margin: auto;
  width: min(100%, 880px);
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.quadro li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 14px 22px 14px 16px;
  border-radius: 18px;
  border: 2px dashed transparent;
  font-family: "Patrick Hand", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(22px, 2.3vw, 30px);
  line-height: 1.3;
  color: var(--giz);
  contain: layout style;
  transition: border-color 0.4s, background-color 0.4s;
}

.quadro li::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.quadro li.atual::before {
  opacity: 1;
}

.quadro-numero {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2.5px solid rgba(248, 250, 252, 0.3);
  color: rgba(248, 250, 252, 0.4);
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  transition: border-color 0.4s var(--suave), color 0.4s var(--suave), background-color 0.4s var(--suave), transform 0.4s var(--suave);
}

.quadro-texto {
  padding-top: 6px;
  opacity: 0;
  transform: translateX(10px);
  clip-path: inset(0 100% 0 0);
  transition: opacity 0.5s var(--suave), transform 0.5s var(--suave), clip-path 0.8s var(--suave);
}

.quadro li.revelado .quadro-texto {
  opacity: 1;
  transform: none;
  clip-path: inset(0 -6% 0 0);
}

.quadro li.revelado .quadro-numero {
  border-color: var(--giz-amarelo);
  color: var(--giz-amarelo);
  background: rgba(253, 230, 138, 0.12);
}

.quadro li.atual {
  background-color: rgba(253, 230, 138, 0.08);
  border-color: rgba(253, 230, 138, 0.6);
}

.quadro li.atual .quadro-numero {
  background: var(--giz-amarelo);
  color: var(--tinta);
  border-color: var(--giz-amarelo);
  box-shadow: 0 0 18px rgba(253, 230, 138, 0.5);
}


.diagrama.prova .diagrama-area {
  align-items: flex-start;
  padding-top: 22px;
}

.questao {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 22px 32px 26px;
  border-radius: 6px;
  background: linear-gradient(180deg, #fffaf0 0%, #fbf1dc 100%);
  color: var(--tinta);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  transform: rotate(-0.4deg);
  animation: surgir-questao 0.5s var(--suave);
}

.questao::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  width: 130px;
  height: 30px;
  transform: translateX(-50%) rotate(1.5deg);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@keyframes surgir-questao {
  from { opacity: 0; transform: translateY(16px) rotate(-0.4deg); }
  to { opacity: 1; transform: rotate(-0.4deg); }
}

.questao-cabecalho {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.questao-numero {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tinta);
  color: var(--giz-amarelo);
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 32px;
  line-height: 1;
}

.questao-rotulo {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 32px;
  color: var(--tinta-suave);
}

.questao-enunciado {
  margin: 0;
  font-family: "Patrick Hand", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.questao-alternativas {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.questao-alternativas.curtas {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.questao-alternativa {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  border-radius: 16px;
  border: 2px solid rgba(28, 25, 23, 0.2);
  background: rgba(255, 255, 255, 0.6);
  color: var(--tinta);
  font-family: "Patrick Hand", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(28, 25, 23, 0.18);
  transition: background 0.2s, border-color 0.2s, transform 0.12s, box-shadow 0.12s;
}

.questao-alternativa:hover {
  background: #fff;
}

.questao-alternativa:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(28, 25, 23, 0.18);
}

.questao-alternativa.escolhida {
  background: #dbeafe;
  border-color: #2563eb;
  box-shadow: 0 4px 0 #1d4ed8;
}

.questao-letra {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid var(--tinta);
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
}

.questao-alternativa.escolhida .questao-letra {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.questao-resposta {
  margin: 24px 0 0;
  padding-top: 14px;
  border-top: 2px dashed rgba(28, 25, 23, 0.2);
  font-family: "Patrick Hand", cursive;
  font-size: 21px;
  color: var(--tinta-suave);
}


.diagrama-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 16px 12px;
}

.diagrama-nav[hidden] {
  display: none;
}

.diagrama-miniaturas {
  flex: 1;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.diagrama-ponto {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(248, 250, 252, 0.45);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.25s;
}

.diagrama-ponto::after {
  content: "";
  position: absolute;
  inset: -15px;
}

.diagrama-ponto:hover {
  border-color: var(--giz);
}

.diagrama-ponto.ativo {
  background: var(--giz-amarelo);
  border-color: var(--giz-amarelo);
  box-shadow: 0 0 12px rgba(253, 230, 138, 0.7);
}

.diagrama-legenda {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 22px 12px;
}

.diagrama-legenda:empty {
  display: none;
}

.diagrama-parte {
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 2px solid rgba(248, 250, 252, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: var(--giz);
  font-family: "Patrick Hand", cursive;
  font-size: 19px;
  cursor: pointer;
  transition: all 0.25s;
}

.diagrama-parte:hover,
.diagrama-parte.ativo {
  background: rgba(253, 230, 138, 0.18);
  border-color: var(--giz-amarelo);
  color: var(--giz-amarelo);
}


.confete {
  position: absolute;
  inset: var(--moldura);
  overflow: hidden;
  pointer-events: none;
  z-index: 6;
  border-radius: 14px;
}

.confete i {
  position: absolute;
  top: -16px;
  left: var(--x);
  width: 10px;
  height: 16px;
  border-radius: 2px;
  background: var(--cor);
  opacity: 0.95;
  animation: cair 1.9s var(--atraso) cubic-bezier(0.3, 0.6, 0.4, 1) forwards;
}

@keyframes cair {
  to { transform: translateY(110vh) rotate(var(--giro)); opacity: 0.15; }
}


.roteiro {
  position: fixed;
  top: var(--topo-aula);
  right: 18px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  width: var(--roteiro-largura);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fffaf0 0%, #f6ebd0 100%);
  color: var(--tinta);
  border-radius: 14px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.4s, transform 0.45s var(--suave);
  contain: layout style;
  z-index: 4;
}

.roteiro.animando {
  will-change: transform, opacity;
}

.roteiro[hidden] {
  display: none;
}

.roteiro.visivel {
  opacity: 1;
  transform: none;
}

.roteiro::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 84px;
  height: 26px;
  transform: translateX(-50%);
  border-radius: 8px 8px 12px 12px;
  background: linear-gradient(180deg, #9ca3af 0%, #4b5563 55%, #374151 100%);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.roteiro:not(.aberto) {
  width: var(--roteiro-recolhido);
  bottom: auto;
}

.roteiro-cabecalho {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 10px 10px 14px;
  cursor: pointer;
  user-select: none;
}

.roteiro:not(.aberto) .roteiro-cabecalho {
  flex-direction: column;
  gap: 12px;
  padding: 26px 6px 12px;
}

.roteiro-icone-atual {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--giz-amarelo);
  box-shadow: 0 3px 0 rgba(28, 25, 23, 0.2);
  font-size: 21px;
  line-height: 1;
}

.roteiro-texto {
  flex: 1;
  min-width: 0;
}

.roteiro:not(.aberto) .roteiro-texto {
  display: none;
}

.roteiro-titulo {
  margin: 0;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 25px;
  line-height: 1;
  white-space: nowrap;
}

.roteiro-objetivo {
  margin: 3px 0 0;
  font-family: "Patrick Hand", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.2;
  color: var(--tinta-suave);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roteiro-contador {
  flex: none;
  display: none;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  white-space: nowrap;
}

.roteiro:not(.aberto) .roteiro-contador {
  display: block;
}

.roteiro-replanejo {
  position: absolute;
  top: 88px;
  right: 12px;
  padding: 3px 12px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.1;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45);
  animation: replanejo-surgir 0.4s var(--suave);
  pointer-events: none;
  z-index: 1;
}

.roteiro-replanejo[hidden],
.roteiro:not(.aberto) .roteiro-replanejo {
  display: none;
}

@keyframes replanejo-surgir {
  from { opacity: 0; transform: translateY(-8px) scale(0.9); }
  to { opacity: 1; transform: none; }
}

.roteiro-corpo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(37, 99, 235, 0.14);
  opacity: 0;
  pointer-events: none;
}

.roteiro.replanejado .roteiro-corpo::before {
  animation: replanejo-piscar 1.4s var(--suave);
}

@keyframes replanejo-piscar {
  0% { opacity: 0; }
  18% { opacity: 1; }
  100% { opacity: 0; }
}

.roteiro-alternar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(28, 25, 23, 0.25);
  background: rgba(255, 255, 255, 0.5);
  color: var(--tinta);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding-bottom: 3px;
  transition: transform 0.35s var(--suave), background 0.2s;
}

.roteiro-alternar:hover {
  background: #fff;
}

.roteiro:not(.aberto) .roteiro-alternar {
  transform: rotate(180deg);
}

.roteiro-corpo {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 12px 14px;
  border-top: 2px dashed rgba(28, 25, 23, 0.14);
}

.roteiro:not(.aberto) .roteiro-corpo {
  display: none;
}

.roteiro-etapas {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.roteiro-etapa {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 8px;
  border-radius: 12px;
  border: 2px dashed transparent;
  font-family: "Patrick Hand", "Segoe UI", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.2;
  animation: etapa-surgir 0.35s var(--suave) both;
  animation-delay: calc(var(--i) * 55ms);
}

@keyframes etapa-surgir {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: none; }
}

.roteiro-marca {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid rgba(28, 25, 23, 0.3);
  background: rgba(255, 255, 255, 0.6);
  font-size: 17px;
  line-height: 1;
  transition: background 0.3s, border-color 0.3s;
}

.roteiro-aura {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 10px solid rgba(245, 158, 11, 0.55);
  opacity: 0;
  transform: scale(1);
  pointer-events: none;
}

.roteiro-etapa-texto {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.roteiro-etapa-titulo {
  color: var(--tinta);
}

.roteiro-etapa-tipo {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tinta-suave);
}

.roteiro-etapa.feita,
.roteiro-etapa.refeita {
  opacity: 0.85;
}

.roteiro-etapa.feita .roteiro-marca,
.roteiro-etapa.refeita .roteiro-marca {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.roteiro-etapa.feita .roteiro-etapa-titulo,
.roteiro-etapa.refeita .roteiro-etapa-titulo,
.roteiro-etapa.pulada .roteiro-etapa-titulo {
  color: var(--tinta-suave);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(22, 163, 74, 0.8);
}

.roteiro-etapa.pulada {
  opacity: 0.55;
}

.roteiro-etapa.pulada .roteiro-marca {
  border-style: dashed;
}

.roteiro-etapa.pulada .roteiro-etapa-titulo {
  text-decoration-color: rgba(28, 25, 23, 0.4);
}

.roteiro-refeita {
  margin-left: auto;
  color: #16a34a;
  font-size: 20px;
  font-weight: 700;
}

.roteiro-etapa.pendente {
  opacity: 0.5;
}

.roteiro-etapa.atual {
  background: #fef3c7;
  border-color: #d97706;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.roteiro-etapa.atual .roteiro-etapa-titulo {
  font-size: 19px;
}

.roteiro-etapa.atual .roteiro-marca {
  background: #f59e0b;
  border-color: #f59e0b;
}

.roteiro-etapa.atual .roteiro-aura {
  animation: pulsar-marca 1.8s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes pulsar-marca {
  0%, 100% { opacity: 0; transform: scale(1); }
  12% { opacity: 1; }
  60% { opacity: 0; transform: scale(1.62); }
}

.roteiro-rodape {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 12px;
  border-top: 2px dashed rgba(28, 25, 23, 0.14);
}

.roteiro:not(.aberto) .roteiro-rodape {
  padding: 8px 10px 10px;
}

.roteiro-progresso {
  flex: 1;
  height: 10px;
  border-radius: 5px;
  background: rgba(28, 25, 23, 0.12);
  overflow: hidden;
}

.roteiro-progresso i {
  display: block;
  height: 100%;
  width: 100%;
  background: #16a34a;
  border-radius: 5px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.6s var(--suave);
}

.roteiro-contador-rodape {
  flex: none;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  white-space: nowrap;
}

.roteiro:not(.aberto) .roteiro-contador-rodape {
  display: none;
}


.painel {
  width: 100%;
  max-width: 1000px;
  margin: auto;
  font-family: "Patrick Hand", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.3;
  color: var(--giz);
}

.lt-evento,
.comp-linha,
.tabela tr,
.ck-passo,
.reta-ponto,
.mapa-ramo,
.mapa-centro {
  animation: revelar-painel 0.55s var(--suave) both;
  animation-delay: calc(var(--i) * 280ms);
}

.painel.sem-revelacao .lt-evento,
.painel.sem-revelacao .comp-linha,
.painel.sem-revelacao .tabela tr,
.painel.sem-revelacao .ck-passo,
.painel.sem-revelacao .reta-ponto,
.painel.sem-revelacao .mapa-ramo,
.painel.sem-revelacao .mapa-centro {
  animation: none;
}

@keyframes revelar-painel {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}


.linha-tempo {
  list-style: none;
  margin: auto;
  padding: 26px 4px 8px;
  display: flex;
  align-items: flex-start;
  max-width: 1100px;
}

.lt-evento {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.lt-evento::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 2px;
  background: rgba(248, 250, 252, 0.55);
}

.lt-evento:first-child::before {
  left: 50%;
}

.lt-evento:last-child::before {
  right: 50%;
}

.lt-ponto {
  position: relative;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--giz-amarelo);
  color: var(--tinta);
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  box-shadow: 0 0 0 6px #183530, 0 0 20px rgba(253, 230, 138, 0.45);
}

.lt-texto {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 8px;
}

.lt-quando {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 1.2em;
  line-height: 1;
  color: var(--giz-amarelo);
}

.lt-oque {
  font-size: 0.92em;
  line-height: 1.25;
}

.linha-tempo.vertical {
  flex-direction: column;
  align-items: stretch;
  padding: 8px 0;
  max-width: 900px;
}

.linha-tempo.vertical .lt-evento {
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  text-align: left;
  padding-bottom: 26px;
}

.linha-tempo.vertical .lt-evento::before {
  top: 24px;
  bottom: -4px;
  left: 22px;
  right: auto;
  width: 4px;
  height: auto;
}

.linha-tempo.vertical .lt-evento:last-child::before {
  display: none;
}

.linha-tempo.vertical .lt-texto {
  padding: 8px 0 0;
  gap: 2px;
}


.comparacao {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comp-linha {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 14px;
}

.comp-linha:not(.cabecalho):nth-child(odd) {
  background: rgba(255, 255, 255, 0.055);
}

.comp-celula {
  padding: 12px 18px;
  line-height: 1.3;
  word-break: break-word;
}

.comp-celula.lado-direito {
  border-left: 3px dashed rgba(248, 250, 252, 0.35);
}

.comp-linha.cabecalho {
  border-radius: 0;
  border-bottom: 3px solid rgba(248, 250, 252, 0.4);
  margin-bottom: 6px;
}

.comp-linha.cabecalho .comp-celula {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 1.45em;
  line-height: 1.05;
  text-align: center;
  padding-bottom: 8px;
}

.comp-linha.cabecalho .lado-esquerdo {
  color: var(--giz-amarelo);
}

.comp-linha.cabecalho .lado-direito {
  color: var(--giz-verde);
}

.comp-linha.inteira {
  grid-template-columns: 1fr;
}

.comp-linha.inteira .comp-celula {
  text-align: center;
  color: var(--giz-suave);
  font-size: 0.9em;
}


.tabela-caixa {
  overflow-x: auto;
}

.tabela {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.tabela th,
.tabela td {
  padding: 14px 18px;
  text-align: center;
  line-height: 1.25;
  cursor: pointer;
  border-bottom: 2px solid rgba(248, 250, 252, 0.12);
  transition: background 0.25s, color 0.25s, opacity 0.25s;
}

.tabela th:first-child,
.tabela td:first-child {
  text-align: left;
}

.tabela th {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 1.35em;
  line-height: 1.05;
  color: var(--giz-amarelo);
  border-bottom: 3px solid rgba(248, 250, 252, 0.4);
}

.tabela tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.055);
}

.tabela th:hover,
.tabela td:hover {
  background: rgba(255, 255, 255, 0.1);
}

.tabela.com-destaque th:not(.destacada):not(:first-child),
.tabela.com-destaque td:not(.destacada):not(:first-child) {
  opacity: 0.45;
}

.tabela td.destacada {
  background: rgba(253, 230, 138, 0.18);
  color: #fff;
  box-shadow: inset 3px 0 0 rgba(253, 230, 138, 0.5), inset -3px 0 0 rgba(253, 230, 138, 0.5);
}

.tabela th.destacada {
  background: var(--giz-amarelo);
  color: var(--tinta);
  border-radius: 14px 14px 0 0;
  border-bottom-color: var(--giz-amarelo);
}

.tabela tbody tr:last-child td.destacada {
  border-radius: 0 0 14px 14px;
}

.tabela-dica {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.75em;
  color: var(--giz-suave);
}


.checklist-caixa {
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ck-passo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 18px 10px 12px;
  border-radius: 18px;
  border: 2px dashed transparent;
  cursor: pointer;
  user-select: none;
  contain: layout style;
  transition: background-color 0.3s, border-color 0.3s;
}

.ck-passo:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.ck-passo::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  border: 2px solid rgba(134, 239, 172, 0.6);
  background: rgba(134, 239, 172, 0.14);
  opacity: 0;
  pointer-events: none;
}

.ck-caixa {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  border: 3px solid rgba(248, 250, 252, 0.6);
  background: rgba(255, 255, 255, 0.04);
  color: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.ck-marca {
  font-size: 34px;
  line-height: 1;
  font-weight: 700;
  transform: scale(0.4);
  transition: transform 0.3s var(--suave);
}

.ck-passo.marcado .ck-caixa {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
  box-shadow: 0 0 18px rgba(22, 163, 74, 0.45);
}

.ck-passo.marcado .ck-marca {
  transform: none;
}

.ck-texto {
  line-height: 1.3;
  transition: color 0.3s;
}

.ck-passo.marcado .ck-texto {
  color: var(--giz-suave);
}

.ck-passo.pulso {
  animation: pulso-passo 0.7s var(--suave);
  will-change: transform;
}

.ck-passo.pulso::before {
  animation: pulso-aura 0.7s var(--suave);
  will-change: opacity;
}

@keyframes pulso-passo {
  30% { transform: scale(1.02); }
}

@keyframes pulso-aura {
  0%, 100% { opacity: 0; }
  30% { opacity: 1; }
}

.ck-progresso {
  text-align: right;
  padding: 0 20px;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 1.15em;
  color: var(--giz-amarelo);
}

.checklist-caixa.completo .ck-progresso {
  color: var(--giz-verde);
}


.flashcards {
  max-width: 780px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  outline: none;
}

.flashcards:focus-visible .fc-cartao {
  outline: 3px solid var(--giz-amarelo);
  outline-offset: 6px;
}

.fc-palco {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 44vh;
  perspective: 1400px;
}

.fc-cartao {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  border-radius: 18px;
  transform-style: preserve-3d;
  transition: transform 0.6s var(--suave);
}

.fc-cartao.virado {
  transform: rotateY(180deg);
}

.fc-cartao.entrando {
  animation: fc-entrar 0.45s var(--suave);
}

@keyframes fc-entrar {
  from { opacity: 0; transform: translateX(46px); }
}

.fc-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 18px;
  display: grid;
  place-items: center;
  padding: 30px 40px;
  text-align: center;
  color: var(--tinta);
  font-size: clamp(30px, 3.6vw, 50px);
  line-height: 1.2;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.fc-frente {
  background: linear-gradient(180deg, #fffaf0 0%, #fbf1dc 100%);
}

.fc-verso {
  background: linear-gradient(180deg, #fff8dc 0%, #fdeeb6 100%);
  transform: rotateY(180deg);
}

.fc-verso::before {
  content: "resposta";
  position: absolute;
  top: 12px;
  left: 22px;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 22px;
  color: var(--tinta-suave);
}

.fc-texto {
  word-break: break-word;
}

.fc-canto {
  position: absolute;
  right: 22px;
  bottom: 12px;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 20px;
  color: var(--tinta-suave);
}

.fc-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.fc-seta:disabled {
  opacity: 0.3;
  cursor: default;
}

.fc-contador {
  min-width: 3ch;
  text-align: center;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 32px;
  line-height: 1;
  color: var(--giz-amarelo);
}

.fc-rodape {
  display: grid;
  place-items: center;
  min-height: 66px;
}

.fc-dica,
.fc-julgar {
  grid-area: 1 / 1;
}

.fc-dica {
  margin: 0;
  text-align: center;
  font-size: 0.8em;
  color: var(--giz-suave);
  transition: opacity 0.25s;
}

.flashcards.virado .fc-dica {
  opacity: 0;
  visibility: hidden;
}

.fc-julgar {
  display: flex;
  gap: 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s var(--suave), visibility 0.3s;
}

.flashcards.virado .fc-julgar {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.fc-julgar-botao,
.fc-de-novo {
  min-width: 170px;
  min-height: 60px;
  padding: 10px 28px;
  border-radius: 18px;
  border: 3px solid;
  font-family: "Patrick Hand", "Segoe UI", system-ui, sans-serif;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.12s, box-shadow 0.12s, filter 0.2s;
}

.fc-julgar-botao:hover,
.fc-de-novo:hover {
  filter: brightness(1.05);
}

.fc-julgar-botao:active,
.fc-de-novo:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.fc-julgar-botao.nao {
  background: #fecaca;
  border-color: #ef4444;
  color: #7f1d1d;
}

.fc-julgar-botao.sim {
  background: #bbf7d0;
  border-color: #16a34a;
  color: #14532d;
}

.fc-de-novo {
  background: var(--giz-amarelo);
  border-color: #d97706;
  color: var(--tinta);
}

.fc-fim {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 30px 0;
  text-align: center;
}

.flashcards.concluido .fc-fim {
  display: flex;
}

.flashcards.concluido .fc-palco,
.flashcards.concluido .fc-nav,
.flashcards.concluido .fc-rodape {
  display: none;
}

.fc-fim-texto {
  margin: 0;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: clamp(32px, 3.4vw, 46px);
  line-height: 1.1;
  color: var(--giz-amarelo);
}


.reta-caixa {
  width: 100%;
}

.diagrama-area .reta {
  width: 100%;
  height: auto;
  max-height: 100%;
  overflow: visible;
}

.reta-eixo {
  fill: none;
  stroke: var(--giz);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reta-tick {
  stroke: rgba(248, 250, 252, 0.7);
  stroke-width: 3;
  stroke-linecap: round;
}

.reta-tick-rotulo {
  fill: var(--giz-suave);
  font-family: "Patrick Hand", "Segoe UI", system-ui, sans-serif;
  font-size: 24px;
}

.reta-ponto {
  transform-box: fill-box;
  transform-origin: center bottom;
}

.reta-guia {
  stroke: rgba(253, 230, 138, 0.5);
  stroke-width: 2;
  stroke-dasharray: 4 6;
}

.reta-marca {
  fill: var(--giz-amarelo);
  stroke: #183530;
  stroke-width: 4;
  filter: drop-shadow(0 0 8px rgba(253, 230, 138, 0.55));
}

.reta-rotulo {
  fill: var(--giz-amarelo);
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 34px;
}


.mapa-caixa {
  width: 100%;
  height: 100%;
  display: flex;
}

.diagrama-area .mapa {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mapa-ligacao {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  opacity: 0.85;
}

.mapa-ramo,
.mapa-centro {
  transform-box: fill-box;
  transform-origin: center;
}

.mapa-no {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  border: 4px solid var(--cor);
  background: #1b3a34;
  color: var(--giz);
  font-family: "Patrick Hand", "Segoe UI", system-ui, sans-serif;
  font-size: 24px;
  line-height: 1.1;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.mapa-no.centro {
  background: var(--cor);
  color: var(--tinta);
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 38px;
  line-height: 1;
}


@media (max-width: 900px) {
  :root {
    --bolinha: 56px;
    --topo-aula: calc(58px + env(safe-area-inset-top));
    --moldura: 6px;
  }

  body.modo-aula #orb,
  #orb-aro {
    left: 14px;
    top: calc(var(--topo-aula) + 8px);
  }

  body.modo-aula .cards {
    left: 12px;
    right: 12px;
    top: auto;
    width: auto;
    bottom: calc(84px + env(safe-area-inset-bottom));
    max-height: 42vh;
  }

  .diagrama {
    left: 0;
    right: 0;
    top: var(--topo-aula);
    bottom: calc(74px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    transform: translateY(24px);
  }

  .diagrama::before {
    border-radius: 12px 12px 0 0;
  }

  .diagrama header {
    min-height: 64px;
    padding: 8px 10px 4px calc(var(--bolinha) + 26px);
  }

  .diagrama-titulo {
    font-size: clamp(24px, 6vw, 32px);
    white-space: normal;
    line-height: 1.05;
  }

  .diagrama-fechar,
  .diagrama-seta {
    width: 44px;
    height: 44px;
    font-size: 26px;
  }

  .diagrama-area {
    padding: 10px 10px 10px;
    align-items: flex-start;
  }

  .diagrama-area svg {
    height: auto;
    max-height: 100%;
    aspect-ratio: 4 / 3;
  }

  .diagrama.prova .diagrama-area {
    padding-top: 22px;
  }

  .lousa-controles {
    left: 10px;
    right: 10px;
    bottom: 8px;
  }

  .lousa-slider input[type="range"] {
    width: 44vw;
  }

  .quadro {
    gap: 10px;
    padding: 0;
    margin: 0 auto;
  }

  .quadro li {
    gap: 12px;
    padding: 10px 12px;
    font-size: 22px;
    border-radius: 14px;
  }

  .quadro-numero {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .quadro-texto {
    padding-top: 5px;
  }

  .questao {
    padding: 20px 16px 20px;
    transform: none;
  }

  @keyframes surgir-questao {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
  }

  .questao-numero,
  .questao-rotulo {
    font-size: 28px;
  }

  .questao-numero {
    width: 46px;
    height: 46px;
  }

  .questao-enunciado {
    font-size: 23px;
  }

  .questao-alternativa {
    font-size: 20px;
    min-height: 56px;
    padding: 8px 14px;
    gap: 12px;
  }

  .questao-letra {
    width: 38px;
    height: 38px;
    font-size: 21px;
  }

  .diagrama-legenda {
    padding: 0 10px 10px;
  }

  .diagrama-parte {
    font-size: 17px;
  }

  .card-tela header .card-titulo {
    font-size: 23px;
  }

  .card-corpo {
    font-size: 16px;
  }

  .roteiro,
  .roteiro:not(.aberto) {
    top: var(--topo-aula);
    left: calc(14px + var(--bolinha) + 10px);
    right: 10px;
    bottom: auto;
    width: auto;
    max-height: calc(100vh - var(--topo-aula) - 120px);
    border-radius: 12px;
    transform: translateY(-10px);
  }

  .roteiro.visivel {
    transform: none;
  }

  .roteiro::before {
    display: none;
  }

  .roteiro-cabecalho,
  .roteiro:not(.aberto) .roteiro-cabecalho {
    flex-direction: row;
    gap: 8px;
    min-height: 50px;
    padding: 6px 8px 6px 8px;
  }

  .roteiro:not(.aberto) .roteiro-texto {
    display: block;
  }

  .roteiro-titulo {
    display: none;
  }

  .roteiro-objetivo {
    margin: 0;
    font-size: 16px;
    color: var(--tinta);
  }

  .roteiro-icone-atual {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .roteiro-contador,
  .roteiro:not(.aberto) .roteiro-contador {
    display: block;
    font-size: 21px;
  }

  .roteiro-alternar {
    width: 36px;
    height: 36px;
    transform: rotate(-90deg);
  }

  .roteiro:not(.aberto) .roteiro-alternar {
    transform: rotate(90deg);
  }

  .roteiro-replanejo,
  .roteiro:not(.aberto) .roteiro-replanejo {
    display: block;
    top: 52px;
    right: 14px;
  }

  .roteiro .roteiro-replanejo[hidden] {
    display: none;
  }

  .roteiro-corpo {
    padding: 6px 8px 10px;
  }

  .roteiro-etapa {
    font-size: 17px;
  }

  .roteiro-rodape,
  .roteiro:not(.aberto) .roteiro-rodape {
    padding: 0;
    border-top: 0;
  }

  .roteiro-progresso {
    height: 5px;
    border-radius: 0 0 12px 12px;
  }

  .roteiro-contador-rodape {
    display: none;
  }

  body.com-roteiro .diagrama,
  body.com-roteiro.roteiro-recolhido .diagrama {
    right: 0;
    top: calc(var(--topo-aula) + 62px);
  }

  body.com-roteiro .diagrama header {
    padding-left: 18px;
  }

  .painel {
    margin: 0 auto;
  }

  .reta-caixa,
  .flashcards {
    margin: auto;
  }

  body.com-roteiro.modo-aula .cards,
  body.com-roteiro.modo-aula.roteiro-recolhido .cards {
    right: 12px;
  }

  .painel {
    font-size: 21px;
  }

  .linha-tempo {
    flex-direction: column;
    align-items: stretch;
    padding: 4px 0;
  }

  .linha-tempo .lt-evento {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    text-align: left;
    padding-bottom: 22px;
  }

  .linha-tempo .lt-evento::before {
    top: 24px;
    bottom: -4px;
    left: 20px;
    right: auto;
    width: 4px;
    height: auto;
  }

  .linha-tempo .lt-evento:last-child::before {
    display: none;
  }

  .lt-ponto {
    width: 44px;
    height: 44px;
    font-size: 23px;
    box-shadow: 0 0 0 4px #183530, 0 0 16px rgba(253, 230, 138, 0.45);
  }

  .linha-tempo .lt-texto {
    padding: 6px 0 0;
    gap: 2px;
  }

  .comp-celula {
    padding: 10px 10px;
    font-size: 19px;
  }

  .comp-linha.cabecalho .comp-celula {
    font-size: 26px;
  }

  .tabela th,
  .tabela td {
    padding: 10px 8px;
    font-size: 18px;
  }

  .tabela th {
    font-size: 23px;
  }

  .checklist {
    padding: 0;
    gap: 8px;
  }

  .ck-passo {
    gap: 12px;
    padding: 8px 10px;
    border-radius: 14px;
  }

  .ck-caixa {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .ck-marca {
    font-size: 30px;
  }

  .fc-palco {
    aspect-ratio: 4 / 3;
    max-height: 40vh;
  }

  .fc-face {
    padding: 24px 22px;
    font-size: clamp(28px, 8vw, 38px);
  }

  .fc-julgar-botao,
  .fc-de-novo {
    min-width: 140px;
    min-height: 56px;
    font-size: 23px;
  }

  .fc-seta {
    width: 44px;
    height: 44px;
    font-size: 26px;
  }

  .diagrama-area .reta,
  .diagrama-area .mapa {
    aspect-ratio: auto;
    height: auto;
    max-height: 100%;
  }

  .mapa-caixa {
    height: auto;
    align-self: flex-start;
  }

  .mapa-no {
    font-size: 22px;
  }

  .mapa-no.centro {
    font-size: 34px;
  }
}


@media (prefers-reduced-motion: reduce) {
  .roteiro,
  .roteiro-etapa,
  .roteiro-alternar,
  .roteiro-progresso i,
  .roteiro-replanejo,
  .roteiro.replanejado .roteiro-corpo::before,
  .roteiro-etapa.atual .roteiro-aura,
  .ck-passo.pulso::before,
  .lt-evento,
  .comp-linha,
  .tabela tr,
  .ck-passo,
  .ck-passo.pulso,
  .reta-ponto,
  .mapa-ramo,
  .mapa-centro,
  .fc-cartao,
  .fc-cartao.entrando,
  .fc-julgar,
  .fc-dica,
  .ck-marca {
    animation: none;
    transition: none;
  }
  .diagrama,
  .card-tela,
  .quadro li,
  .quadro-numero,
  .quadro-texto,
  .questao,
  .questao-alternativa,
  .imagem-aula,
  .quadro li::before,
  #orb-aro {
    transition: none;
    animation: none;
  }

  .diagrama-area .lousa-svg .destacado,
  .diagrama-area svg .destacado,
  .lousa-cursor.chegou .cursor-halo,
  .imagem-pulso {
    animation: none;
  }

  .quadro-texto {
    clip-path: none;
    transform: none;
  }

  .confete {
    display: none;
  }
}

.parcial {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(80vw, 560px);
  text-align: center;
  font-size: 18px;
  color: var(--texto);
  opacity: 0.85;
  pointer-events: none;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.status {
  position: absolute;
  bottom: 9%;
  left: 50%;
  transform: translateX(-50%);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #67e8f9;
  opacity: 0.8;
  pointer-events: none;
  white-space: nowrap;
}

.transcricao {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  padding: calc(70px + env(safe-area-inset-top)) 16px 100px;
  overflow-y: auto;
  background: rgba(5, 6, 15, 0.92);
  border-left: 1px solid var(--vidro-borda);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  content-visibility: auto;
  contain-intrinsic-size: auto 420px auto 100vh;
  z-index: 1;
}

.transcricao.aberto {
  transform: translateX(0);
}

.bolha {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.bolha img {
  display: block;
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 6px;
}

.bolha.aluno {
  align-self: flex-end;
  background: rgba(96, 165, 250, 0.22);
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-bottom-right-radius: 4px;
}

.bolha.prof {
  align-self: flex-start;
  background: var(--vidro);
  border: 1px solid var(--vidro-borda);
  border-bottom-left-radius: 4px;
}

.feedback {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--texto-suave);
  opacity: 0.35;
  transition: opacity 0.2s;
}

.bolha.prof:hover .feedback {
  opacity: 1;
}

.feedback button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 6px;
}

.feedback button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.rodape {
  padding: 10px 14px calc(14px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

.previa {
  max-height: 110px;
  border-radius: 12px;
  border: 1px solid var(--vidro-borda);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.barra {
  width: min(640px, 100%);
  display: flex;
  align-items: center;
  gap: 8px;
}

.campo {
  flex: 1;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--vidro-borda);
  background: var(--vidro-opaco);
  color: var(--texto);
  font-size: 15px;
  outline: none;
}

.campo:focus {
  border-color: var(--acento);
}

.aviso-versao {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 249, 0.4);
  background: rgba(8, 20, 45, 0.92);
  color: #a5f3fc;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 0.3s, transform 0.3s var(--suave);
  z-index: 9;
}

.aviso-versao.visivel {
  opacity: 1;
  transform: translate(-50%, 0);
}

#perf-hud {
  position: fixed;
  top: 8px;
  left: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #86efac;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre;
  pointer-events: none;
  contain: strict;
  width: 290px;
  height: 92px;
  z-index: 99;
}

@media (max-width: 600px) {
  .controle span {
    display: none;
  }

  .status {
    font-size: 12px;
  }
}
