/* ============================================================
   ESTUDO GUIADO — BACKGROUND DINÂMICO
   Malha de gradientes fluidos (pêssego → magenta → violeta → azul
   elétrico) com massas de cor à deriva, fitas de luz e parallax de
   ponteiro.

   NOTAS DE PERFORMANCE (o que mantém isso a 60fps):
   - Zero `filter: blur()`. Os gradientes radiais já têm queda suave;
     blur em elementos do tamanho da viewport é o que mais custa e
     recalcula a cada frame da animação.
   - Zero `mix-blend-mode`. Composição alfa normal, sem readback.
   - Só 3 camadas de parallax (não uma por blob) — 3 layers de
     compositor em vez de 8.
   - Animações PAUSADAS enquanto a seção não está ativa, senão elas
     queimam GPU no site inteiro.
   - Só `transform`/`opacity` animam: nada dispara layout ou paint.
   ============================================================ */

#guiado-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
  contain: strict;

  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.45s ease,
    visibility 0s linear 0.45s;

  /* Base: a malha de cor da referência */
  background:
    radial-gradient(115% 80% at 6% 2%, #ffd9b2 0%, rgba(255, 217, 178, 0) 44%),
    radial-gradient(95% 75% at -6% 42%, #e98cf2 0%, rgba(233, 140, 242, 0) 58%),
    radial-gradient(120% 105% at 104% 68%, #0b5cff 0%, rgba(11, 92, 255, 0) 62%),
    radial-gradient(90% 70% at 88% 8%, #3f7bff 0%, rgba(63, 123, 255, 0) 55%),
    linear-gradient(135deg, #8a45e6 0%, #5a28e2 34%, #3b1fd8 60%, #2440f0 100%);
}

body.body-estudo-guiado-bg #guiado-bg {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

/* ── Camadas de parallax ──────────────────────────────────────
   --gx / --gy vêm do ponteiro (-1..1, via guiado-bg.js).
   Sem `transition`: o easing já é feito no JS. Ter os dois
   empilhados era o que dava a sensação de arrasto.            */
.guiado-layer {
  position: absolute;
  inset: -10%;
  transform: translate3d(
    calc(var(--gx, 0) * var(--depth, 0) * 1px),
    calc(var(--gy, 0) * var(--depth, 0) * 1px),
    0
  );
}

/* ── Massas de cor ────────────────────────────────────────────
   Gradientes `closest-side` com vários stops: a queda suave imita
   um blur pesado sem pagar por ele.                            */
.guiado-blob,
.guiado-streak {
  position: absolute;
  border-radius: 50%;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  animation-play-state: paused;
}

body.body-estudo-guiado-bg .guiado-blob,
body.body-estudo-guiado-bg .guiado-streak {
  animation-play-state: running;
}

/* Pêssego quente — canto superior esquerdo */
.guiado-blob.b1 {
  width: 72vw;
  height: 72vw;
  top: -26%;
  left: -20%;
  background: radial-gradient(
    closest-side,
    rgba(255, 223, 188, 0.9) 0%,
    rgba(255, 208, 168, 0.52) 34%,
    rgba(255, 193, 152, 0.18) 60%,
    rgba(255, 185, 145, 0) 78%
  );
  animation-name: guiadoDrift1;
  animation-duration: 26s;
}

/* Magenta/rosa — flanco esquerdo */
.guiado-blob.b2 {
  width: 66vw;
  height: 66vw;
  top: 18%;
  left: -26%;
  background: radial-gradient(
    closest-side,
    rgba(236, 132, 248, 0.82) 0%,
    rgba(216, 112, 244, 0.45) 36%,
    rgba(190, 96, 240, 0.15) 62%,
    rgba(180, 90, 240, 0) 80%
  );
  animation-name: guiadoDrift2;
  animation-duration: 32s;
}

/* Azul elétrico — domina a direita */
.guiado-blob.b3 {
  width: 88vw;
  height: 88vw;
  top: 6%;
  right: -30%;
  background: radial-gradient(
    closest-side,
    rgba(26, 112, 255, 0.95) 0%,
    rgba(22, 96, 255, 0.6) 34%,
    rgba(20, 80, 250, 0.2) 62%,
    rgba(20, 74, 245, 0) 80%
  );
  animation-name: guiadoDrift3;
  animation-duration: 30s;
}

/* Violeta — massa central que "respira" */
.guiado-blob.b4 {
  width: 80vw;
  height: 80vw;
  bottom: -34%;
  left: 16%;
  background: radial-gradient(
    closest-side,
    rgba(150, 88, 255, 0.72) 0%,
    rgba(134, 74, 250, 0.4) 36%,
    rgba(120, 62, 242, 0.13) 62%,
    rgba(115, 58, 240, 0) 80%
  );
  animation-name: guiadoDrift4;
  animation-duration: 38s;
}

/* Azul claro — brilho inferior direito */
.guiado-blob.b5 {
  width: 52vw;
  height: 52vw;
  bottom: -8%;
  right: 0%;
  background: radial-gradient(
    closest-side,
    rgba(112, 178, 255, 0.7) 0%,
    rgba(88, 158, 255, 0.38) 36%,
    rgba(70, 140, 255, 0.12) 62%,
    rgba(64, 134, 255, 0) 80%
  );
  animation-name: guiadoDrift5;
  animation-duration: 22s;
}

@keyframes guiadoDrift1 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(6vw, 5vh, 0) scale(1.16); }
  100% { transform: translate3d(-4vw, 8vh, 0) scale(0.94); }
}
@keyframes guiadoDrift2 {
  0%   { transform: translate3d(0, 0, 0) scale(1.05); }
  50%  { transform: translate3d(8vw, -6vh, 0) scale(0.9); }
  100% { transform: translate3d(3vw, 6vh, 0) scale(1.14); }
}
@keyframes guiadoDrift3 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-7vw, 6vh, 0) scale(1.12); }
  100% { transform: translate3d(-2vw, -6vh, 0) scale(0.95); }
}
@keyframes guiadoDrift4 {
  0%   { transform: translate3d(0, 0, 0) scale(0.96); }
  50%  { transform: translate3d(-6vw, -8vh, 0) scale(1.16); }
  100% { transform: translate3d(7vw, -3vh, 0) scale(1.02); }
}
@keyframes guiadoDrift5 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-5vw, -6vh, 0) scale(1.2); }
  100% { transform: translate3d(4vw, 3vh, 0) scale(0.92); }
}

/* ── Fitas de luz ─────────────────────────────────────────────
   Elipses achatadas com gradiente branco: a mesma dobra sedosa da
   referência, mas sem borda + blur (que custava caro).          */
.guiado-streak.s1 {
  width: 130vw;
  height: 30vh;
  top: 14%;
  left: -16%;
  background: radial-gradient(
    closest-side,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 250, 255, 0.16) 42%,
    rgba(255, 245, 255, 0) 72%
  );
  animation-name: guiadoRibbon1;
  animation-duration: 24s;
}

.guiado-streak.s2 {
  width: 145vw;
  height: 44vh;
  top: 44%;
  left: -24%;
  background: radial-gradient(
    closest-side,
    rgba(255, 236, 255, 0.34) 0%,
    rgba(248, 226, 255, 0.11) 44%,
    rgba(244, 220, 255, 0) 74%
  );
  animation-name: guiadoRibbon2;
  animation-duration: 34s;
}

.guiado-streak.s3 {
  width: 120vw;
  height: 24vh;
  bottom: 4%;
  left: -22%;
  background: radial-gradient(
    closest-side,
    rgba(216, 232, 255, 0.4) 0%,
    rgba(200, 222, 255, 0.12) 44%,
    rgba(196, 218, 255, 0) 74%
  );
  animation-name: guiadoRibbon3;
  animation-duration: 28s;
}

@keyframes guiadoRibbon1 {
  0%   { transform: rotate(-7deg) translate3d(0, 0, 0) scaleY(1); opacity: 0.45; }
  50%  { transform: rotate(-2deg) translate3d(3vw, -3vh, 0) scaleY(1.3); opacity: 0.95; }
  100% { transform: rotate(3deg) translate3d(-2vw, 4vh, 0) scaleY(0.82); opacity: 0.6; }
}
@keyframes guiadoRibbon2 {
  0%   { transform: rotate(5deg) translate3d(0, 0, 0) scaleY(1); opacity: 0.4; }
  50%  { transform: rotate(-4deg) translate3d(-4vw, 4vh, 0) scaleY(0.78); opacity: 0.9; }
  100% { transform: rotate(2deg) translate3d(2vw, -3vh, 0) scaleY(1.24); opacity: 0.55; }
}
@keyframes guiadoRibbon3 {
  0%   { transform: rotate(8deg) translate3d(0, 0, 0); opacity: 0.4; }
  50%  { transform: rotate(3deg) translate3d(4vw, -2vh, 0); opacity: 0.85; }
  100% { transform: rotate(-4deg) translate3d(-3vw, 2vh, 0); opacity: 0.5; }
}

/* Vinheta — estática, pintada uma vez, aprofunda as bordas */
#guiado-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    72% 58% at 50% 42%,
    rgba(0, 0, 0, 0) 0%,
    rgba(23, 8, 66, 0.44) 100%
  );
}

/* ============================================================
   HERO — "O que você precisa estudar hoje?"
   ============================================================ */

#guiado-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 6rem 0 4rem;
}

.guiado-hero-title {
  font-family: 'Caprasimo', cursive;
  font-weight: 400;
  color: #ffffff;
  font-size: clamp(2.3rem, 6.6vw, 5rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 16ch;
  text-shadow:
    0 2px 26px rgba(40, 12, 110, 0.42),
    0 1px 3px rgba(30, 8, 90, 0.32);
}

/* Revelação palavra a palavra ao entrar na seção */
.guiado-hero-title .w {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 0.45em, 0);
}

#section-estudo-guiado.active .guiado-hero-title .w {
  animation: guiadoWordIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.guiado-hero-title .w:nth-child(1) { animation-delay: 0.12s; }
.guiado-hero-title .w:nth-child(2) { animation-delay: 0.19s; }
.guiado-hero-title .w:nth-child(3) { animation-delay: 0.26s; }
.guiado-hero-title .w:nth-child(4) { animation-delay: 0.33s; }
.guiado-hero-title .w:nth-child(5) { animation-delay: 0.40s; }
.guiado-hero-title .w:nth-child(6) { animation-delay: 0.47s; }

@keyframes guiadoWordIn {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Os orbs padrão do body brigam com a malha — escondidos aqui.
   Precisa de !important: `body.body-dashboard-bg .orb` também usa. */
body.body-estudo-guiado-bg .orb {
  opacity: 0 !important;
  transition: opacity 0.5s ease;
}

/* ── Acessibilidade: sem movimento ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #guiado-bg,
  body.body-estudo-guiado-bg #guiado-bg {
    transition: opacity 0.2s linear, visibility 0s;
  }
  .guiado-layer {
    transform: none;
  }
  body.body-estudo-guiado-bg .guiado-blob,
  body.body-estudo-guiado-bg .guiado-streak {
    animation: none !important;
  }
  .guiado-hero-title .w,
  #section-estudo-guiado.active .guiado-hero-title .w {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
  .guiado-spinner { animation-duration: 1.8s; }
  .guiado-btn-primary:hover { transform: none; }
}

/* ============================================================
   CAMADA 1 — CADASTRO DE PROVA (etapa 2)

   O fundo em malha já carrega a identidade; os controles aqui são
   vidro sobre ela. Nada de sombra pesada — o visual é suave.

   Por que quase tudo é branco/alfa em vez de cor do tema: esta
   seção roda sobre a malha roxa em light E dark, então seguir as
   variáveis de tema deixaria o texto ilegível no modo claro.
   ============================================================ */

/* O hero centraliza; cada estado é uma coluna dentro dele.

   justify-content: center (herdado) CORTA o topo quando o conteúdo é mais
   alto que a viewport — o formulário de cadastro fica com o cabeçalho
   inacessível, sem scroll possível. `margin: auto 0` no filho centraliza
   quando sobra espaço e simplesmente empilha quando não sobra. */
#guiado-hero {
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.5rem;
}

.guiado-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  margin: auto 0;
}

.guiado-view.hidden { display: none; }

.guiado-sub {
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  font-weight: 500;
  max-width: 34ch;
  line-height: 1.5;
  text-shadow: 0 1px 12px rgba(40, 12, 110, 0.35);
}

/* ── Botões ─────────────────────────────────────────────── */
.guiado-btn-primary {
  background: #ffffff;
  color: #3b1fd8;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.9rem 2.1rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease;
  box-shadow: 0 4px 18px rgba(30, 8, 90, 0.22);
}

.guiado-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(30, 8, 90, 0.3); }
.guiado-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.guiado-btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: background 0.18s ease;
}

.guiado-btn-ghost:hover { background: rgba(255, 255, 255, 0.24); }

.guiado-link {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  margin-left: 0.6rem;
  padding: 0;
}

.guiado-link:hover { color: #ffffff; }

/* ── Cartão de vidro ────────────────────────────────────── */
.guiado-card {
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  padding: 2rem;
  width: 100%;
  max-width: 560px;
  align-items: stretch;
  text-align: left;
  box-shadow: 0 12px 44px rgba(24, 6, 74, 0.26);
}

.guiado-card-head { display: flex; flex-direction: column; gap: 0.35rem; }

.guiado-card-title {
  font-family: 'Caprasimo', cursive;
  font-weight: 400;
  color: #ffffff;
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  line-height: 1.15;
}

.guiado-card-sub {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-weight: 500;
}

.guiado-card-foot {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  align-items: center;
  padding-top: 0.5rem;
}

/* ── Campos ─────────────────────────────────────────────── */
.guiado-field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border: none;
  padding: 0;
  margin: 0;
}

.guiado-label {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0;
}

.guiado-input {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  width: 100%;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.guiado-input::placeholder { color: rgba(255, 255, 255, 0.5); font-weight: 500; }
.guiado-input:focus { border-color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.2); }
.guiado-input-sm { padding: 0.6rem 0.85rem; font-size: 0.85rem; }

.guiado-input:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Chips (disciplina, tempo) ──────────────────────────── */
.guiado-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.guiado-chip {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  padding: 0.6rem 1.15rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.guiado-chip:hover { background: rgba(255, 255, 255, 0.2); }

.guiado-chip.is-active {
  background: #ffffff;
  color: #3b1fd8;
  border-color: #ffffff;
}

/* ── Lista de tópicos ───────────────────────────────────── */
.guiado-topicos {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 0.4rem;
}

.guiado-topico {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.65rem 0.8rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.guiado-topico { align-items: center; cursor: default; }
.guiado-topico:hover { background: rgba(255, 255, 255, 0.15); }
.guiado-topico.is-checked { background: rgba(255, 255, 255, 0.19); border-color: rgba(255, 255, 255, 0.35); }
.guiado-topico input { accent-color: #ffffff; width: 1.05rem; height: 1.05rem; margin-top: 0.15rem; cursor: pointer; flex-shrink: 0; }

/* Lixeira da matéria — tira o conteúdo do estudo. */
.guiado-topico-excluir {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}
.guiado-topico-excluir:hover { background: rgba(248, 113, 113, 0.22); color: #fca5a5; }
.guiado-topico-excluir .material-symbols-outlined { font-size: 1.15rem; }

.guiado-topico-txt { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }

.guiado-topico-nome {
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
}

/* Contagem de subtópicos = sinal de tamanho, não de pendência.
   Nunca mostrar aqui quantos itens estão atrasados. */
.guiado-topico-meta {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
  font-weight: 600;
}

.guiado-topico-peso {
  margin-left: auto;
  flex-shrink: 0;
  align-self: center;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.guiado-custom-row { display: flex; gap: 0.5rem; align-items: center; }
.guiado-custom-row .guiado-input { flex: 1; }

/* ── Erro ───────────────────────────────────────────────── */
.guiado-erro {
  background: rgba(255, 82, 110, 0.22);
  border: 1px solid rgba(255, 140, 160, 0.5);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  color: #ffffff;
  font-size: 0.83rem;
  font-weight: 600;
}

.guiado-erro.hidden { display: none; }

/* ── TELA A: o resumo do dia ────────────────────────────── */

/* Uma linha só, grande, sem nada para decidir. O peso visual fica no que
   vai ser estudado — não no botão, não em números de progresso. */
.guiado-conteudo-rotulo {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.guiado-hoje {
  font-family: 'Caprasimo', cursive;
  font-weight: 400;
  color: #ffffff;
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  /* Linhas mais largas e com mais respiro vertical: um título longo (dois
     conteúdos somados, p. ex.) não deve empilhar-se em muitas linhas
     espremidas — ele corre na horizontal e quebra em poucas linhas. */
  line-height: 1.22;
  max-width: min(30ch, 92vw);
  text-align: center;
  text-shadow: 0 2px 26px rgba(40, 12, 110, 0.42), 0 1px 3px rgba(30, 8, 90, 0.32);
}

.guiado-hoje-rotulo { display: block; opacity: 0.75; font-size: 0.62em; }
.guiado-temas { display: block; }

/* Na trilha o rótulo é o título inteiro — não a etiqueta de outra frase.
   Encolhê-lo para 0.62em faria "Sua trilha" parecer legenda do que vem
   depois, quando é ele que nomeia a tela. */
.guiado-hoje-trilha {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  max-width: 22ch;
}

.guiado-hoje-trilha .guiado-hoje-rotulo { font-size: 1em; opacity: 0.96; }

.guiado-meta {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Discreto de propósito: é uma saída, não um convite. Se competir com
   "Começar", vira decisão aberta — que é o que a tela existe para evitar. */
.guiado-link-sutil {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  transition: color 0.16s ease;
}

.guiado-link-sutil:hover { color: rgba(255, 255, 255, 0.95); }
.guiado-link-sutil:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; border-radius: 6px; }

/* "Quero estudar outro": deixou de ser um link discreto. Agora é uma pílula
   contornada, claramente clicável, que leva o aluno de volta à trilha para
   escolher outro estudo — visível sem disputar o peso do "Começar" branco. */
.guiado-btn-trocar {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.7rem;
  padding: 0.72rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.guiado-btn-trocar:hover { background: rgba(255, 255, 255, 0.22); border-color: #ffffff; transform: translateY(-2px); }
.guiado-btn-trocar:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
.guiado-btn-trocar .material-symbols-outlined { font-size: 19px; }
@media (prefers-reduced-motion: reduce) {
  .guiado-btn-trocar:hover { transform: none; }
}

/* Encerrar o estudo: uma saída, mas que precisa ser ACHADA. O link sublinhado
   sumia no fundo; aqui vira uma pílula avermelhada — visível como "sair/parar"
   sem roubar o peso da ação primária branca. */
.guiado-btn-encerrar {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.4rem;
  padding: 0.72rem 1.6rem;
  border-radius: 999px;
  cursor: pointer;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 800;
  background: rgba(255, 82, 110, 0.24);
  border: 1.5px solid rgba(255, 140, 160, 0.62);
  box-shadow: 0 6px 20px rgba(120, 12, 40, 0.28);
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.guiado-btn-encerrar:hover {
  background: rgba(255, 82, 110, 0.38);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(120, 12, 40, 0.36);
}

.guiado-btn-encerrar:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
.guiado-btn-encerrar .material-symbols-outlined { font-size: 19px; }

/* Entrada em cascata, igual ao hero — mantém a continuidade da seção. */
#section-estudo-guiado.active #guiado-sessao:not(.hidden) > *,
#section-estudo-guiado.active #guiado-estudando:not(.hidden) > * {
  opacity: 0;
  animation: guiadoWordIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#section-estudo-guiado.active #guiado-sessao:not(.hidden) > *:nth-child(1),
#section-estudo-guiado.active #guiado-estudando:not(.hidden) > *:nth-child(1) { animation-delay: 0.06s; }
#section-estudo-guiado.active #guiado-sessao:not(.hidden) > *:nth-child(2),
#section-estudo-guiado.active #guiado-estudando:not(.hidden) > *:nth-child(2) { animation-delay: 0.14s; }
#section-estudo-guiado.active #guiado-sessao:not(.hidden) > *:nth-child(3),
#section-estudo-guiado.active #guiado-estudando:not(.hidden) > *:nth-child(3) { animation-delay: 0.22s; }
#section-estudo-guiado.active #guiado-sessao:not(.hidden) > *:nth-child(4),
#section-estudo-guiado.active #guiado-estudando:not(.hidden) > *:nth-child(4) { animation-delay: 0.30s; }
#section-estudo-guiado.active #guiado-sessao:not(.hidden) > *:nth-child(5),
#section-estudo-guiado.active #guiado-estudando:not(.hidden) > *:nth-child(5) { animation-delay: 0.36s; }

/* ============================================================
   ENTRADA DAS TELAS DE LISTA
   "Ver minha trilha", "Histórico de estudos" e "Histórico de
   resumos": ao abrir, o título e os controles sobem em cascata e
   cada bola/cartão da lista entra um a um.
   ============================================================ */

/* Topo de cada tela (título, subtítulo, lista, botões). */
#section-estudo-guiado.active #guiado-trilha:not(.hidden) > *,
#section-estudo-guiado.active #guiado-historico:not(.hidden) > *,
#section-estudo-guiado.active #guiado-resumos-hist:not(.hidden) > * {
  opacity: 0;
  animation: guiadoWordIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
#section-estudo-guiado.active #guiado-trilha:not(.hidden) > *:nth-child(1),
#section-estudo-guiado.active #guiado-historico:not(.hidden) > *:nth-child(1),
#section-estudo-guiado.active #guiado-resumos-hist:not(.hidden) > *:nth-child(1) { animation-delay: 0.04s; }
#section-estudo-guiado.active #guiado-trilha:not(.hidden) > *:nth-child(2),
#section-estudo-guiado.active #guiado-historico:not(.hidden) > *:nth-child(2),
#section-estudo-guiado.active #guiado-resumos-hist:not(.hidden) > *:nth-child(2) { animation-delay: 0.11s; }
#section-estudo-guiado.active #guiado-trilha:not(.hidden) > *:nth-child(3),
#section-estudo-guiado.active #guiado-historico:not(.hidden) > *:nth-child(3),
#section-estudo-guiado.active #guiado-resumos-hist:not(.hidden) > *:nth-child(3) { animation-delay: 0.18s; }
#section-estudo-guiado.active #guiado-trilha:not(.hidden) > *:nth-child(4),
#section-estudo-guiado.active #guiado-historico:not(.hidden) > *:nth-child(4),
#section-estudo-guiado.active #guiado-resumos-hist:not(.hidden) > *:nth-child(4) { animation-delay: 0.25s; }

/* Os itens de dentro das listas entram um a um. */
@keyframes guiadoItemIn {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

#guiado-trilha:not(.hidden) .guiado-bola,
#guiado-historico:not(.hidden) .guiado-hist-item,
#guiado-resumos-hist:not(.hidden) .guiado-resumo {
  animation: guiadoItemIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#guiado-trilha:not(.hidden) .guiado-bola:nth-child(1),
#guiado-historico:not(.hidden) .guiado-hist-item:nth-child(1),
#guiado-resumos-hist:not(.hidden) .guiado-resumo:nth-child(1) { animation-delay: 0.10s; }
#guiado-trilha:not(.hidden) .guiado-bola:nth-child(2),
#guiado-historico:not(.hidden) .guiado-hist-item:nth-child(2),
#guiado-resumos-hist:not(.hidden) .guiado-resumo:nth-child(2) { animation-delay: 0.16s; }
#guiado-trilha:not(.hidden) .guiado-bola:nth-child(3),
#guiado-historico:not(.hidden) .guiado-hist-item:nth-child(3),
#guiado-resumos-hist:not(.hidden) .guiado-resumo:nth-child(3) { animation-delay: 0.22s; }
#guiado-trilha:not(.hidden) .guiado-bola:nth-child(4),
#guiado-historico:not(.hidden) .guiado-hist-item:nth-child(4),
#guiado-resumos-hist:not(.hidden) .guiado-resumo:nth-child(4) { animation-delay: 0.28s; }
#guiado-trilha:not(.hidden) .guiado-bola:nth-child(5),
#guiado-historico:not(.hidden) .guiado-hist-item:nth-child(5),
#guiado-resumos-hist:not(.hidden) .guiado-resumo:nth-child(5) { animation-delay: 0.34s; }
#guiado-trilha:not(.hidden) .guiado-bola:nth-child(6),
#guiado-historico:not(.hidden) .guiado-hist-item:nth-child(6),
#guiado-resumos-hist:not(.hidden) .guiado-resumo:nth-child(6) { animation-delay: 0.40s; }
#guiado-trilha:not(.hidden) .guiado-bola:nth-child(7),
#guiado-historico:not(.hidden) .guiado-hist-item:nth-child(7),
#guiado-resumos-hist:not(.hidden) .guiado-resumo:nth-child(7) { animation-delay: 0.46s; }
#guiado-trilha:not(.hidden) .guiado-bola:nth-child(n+8),
#guiado-historico:not(.hidden) .guiado-hist-item:nth-child(n+8),
#guiado-resumos-hist:not(.hidden) .guiado-resumo:nth-child(n+8) { animation-delay: 0.52s; }

@media (prefers-reduced-motion: reduce) {
  #section-estudo-guiado.active #guiado-trilha:not(.hidden) > *,
  #section-estudo-guiado.active #guiado-historico:not(.hidden) > *,
  #section-estudo-guiado.active #guiado-resumos-hist:not(.hidden) > *,
  #guiado-trilha:not(.hidden) .guiado-bola,
  #guiado-historico:not(.hidden) .guiado-hist-item,
  #guiado-resumos-hist:not(.hidden) .guiado-resumo {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   HOME — os dois caminhos de entrada

   Os dois botões têm exatamente o mesmo peso visual de propósito:
   não existe caminho "certo", e destacar um empurraria o aluno para
   uma decisão que só ele pode tomar.
   ============================================================ */

.guiado-escolhas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 720px;
}

/* Com uma única escolha (só "Montar trilha"), ela fica centrada e um pouco
   mais larga, sem esticar para a linha inteira. */
.guiado-escolhas-solo { max-width: 420px; }
.guiado-escolhas-solo .guiado-escolha { flex: 0 1 380px; max-width: 420px; align-items: center; text-align: center; }
.guiado-escolhas-solo .guiado-escolha .guiado-escolha-icone { align-self: center; }

.guiado-escolha {
  flex: 1 1 260px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 1.5rem 1.4rem;
  border-radius: 24px;
  text-align: left;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 12px 40px rgba(24, 6, 74, 0.22);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.2s ease, border-color 0.2s ease;
}

.guiado-escolha:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.42);
}

.guiado-escolha:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }

.guiado-escolha-icone {
  font-size: 30px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 0.5rem;
  margin-bottom: 0.2rem;
}

.guiado-escolha-titulo {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.guiado-escolha-sub {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
}

.guiado-tempo-unidade {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.guiado-tempo-eq {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-variant-numeric: tabular-nums;
}

/* ── Seus ciclos ────────────────────────────────────────────
   A tela onde o tempo do dia é definido. Tudo aqui é editável
   de propósito: a recomendação 40/60 é sugestão, e sugestão que
   não se pode contrariar é imposição. */

/* A recomendação, sempre à vista — mas visualmente uma dica,
   não um aviso de erro. */
.guiado-pomo-dica {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-radius: 16px;
  text-align: left;
  background: rgba(255, 190, 45, 0.22);
  border: 1px solid rgba(255, 190, 45, 0.70);
  box-shadow: 0 0 0 1px rgba(255, 190, 45, 0.18), 0 4px 14px rgba(255, 170, 30, 0.14);
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.82rem;
  line-height: 1.5;
}

.guiado-pomo-dica b { color: #ffcf5c; font-weight: 800; }
.guiado-pomo-dica .material-symbols-outlined { font-size: 20px; color: #ffce4d; flex-shrink: 0; }

.guiado-chip-pomo,
.guiado-chip-col { display: inline-flex; flex-direction: column; align-items: center; gap: 0.1rem; line-height: 1.15; }
.guiado-chip-sub { font-size: 0.68rem; font-weight: 700; opacity: 0.72; font-variant-numeric: tabular-nums; }

.guiado-pomo-campos { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.guiado-pomo-campo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.82rem;
  font-weight: 700;
}

/* Teoria e prática ganham a mesma cor que têm na lista de blocos:
   o campo e o bloco que ele gera têm que se reconhecer. */
.guiado-pomo-campo i { font-style: normal; font-weight: 600; opacity: 0.66; }
.guiado-pomo-campo.is-teoria > span:first-child { color: #a9c8ff; }
.guiado-pomo-campo.is-pratica > span:first-child { color: #ffc08a; }

/* Interruptor: a LILA cria os exercícios da prática, ou não. */
.guiado-switch-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}
.guiado-switch-txt { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.guiado-switch-titulo { color: #ffffff; font-size: 0.9rem; font-weight: 700; line-height: 1.2; }
.guiado-switch-sub { color: rgba(255, 255, 255, 0.58); font-size: 0.74rem; font-weight: 600; line-height: 1.35; }

.guiado-switch { position: relative; flex-shrink: 0; width: 46px; height: 26px; }
.guiado-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.guiado-switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  transition: background 0.18s ease;
}
.guiado-switch-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.18s ease;
}
.guiado-switch input:checked + .guiado-switch-slider { background: #34d399; }
.guiado-switch input:checked + .guiado-switch-slider::before { transform: translateX(20px); }
.guiado-switch input:focus-visible + .guiado-switch-slider { box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.4); }
@media (prefers-reduced-motion: reduce) {
  .guiado-switch-slider, .guiado-switch-slider::before { transition: none; }
}

.guiado-pomo-num {
  width: 4.6rem;
  padding: 0.45rem 0.5rem;
  font-size: 0.98rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.guiado-pomo-ciclos {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 0.4rem;
}

.guiado-pomo-ciclo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.7rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-left: 4px solid transparent;
}

/* Teoria e prática são blocos diferentes e se veem como tais:
   ler e treinar não são a mesma coisa dentro do ciclo. */
.guiado-pomo-ciclo.is-teoria { border-left-color: #6ea8ff; }
.guiado-pomo-ciclo.is-pratica { border-left-color: #ff9d52; }
.guiado-pomo-ciclo.is-pausa { border-left-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.05); }
.guiado-pomo-ciclo .material-symbols-outlined { font-size: 19px; color: rgba(255, 255, 255, 0.75); }
.guiado-pomo-ciclo.is-teoria .material-symbols-outlined { color: #a9c8ff; }
.guiado-pomo-ciclo.is-pratica .material-symbols-outlined { color: #ffc08a; }

.guiado-pomo-ciclo-nome {
  flex: 1;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
}

.guiado-pomo-ciclo.is-pausa .guiado-pomo-ciclo-nome { color: rgba(255, 255, 255, 0.72); font-weight: 600; }

/* O painel do total: o tempo do dia e a divisão real, ao vivo. */
.guiado-pomo-total {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.5;
}

/* Divisão longe do recomendado (ou tempo fora dos limites): avisa,
   não corrige sozinho — quem estuda decide. */
.guiado-pomo-total.is-fora { color: #ffd08a; }

/* ── Atalhos da home ────────────────────────────────────────
   O que já está configurado mora aqui: acessível quando o aluno
   vem buscar, sem se impor a cada entrada na seção. */
.guiado-home-atalhos { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.guiado-home-atalhos.hidden { display: none; }
.guiado-home-atalhos .guiado-btn-ghost { display: inline-flex; align-items: center; gap: 0.4rem; }
.guiado-home-atalhos .material-symbols-outlined { font-size: 18px; }

/* Realce de "Continuar meu estudo": aparece só quando o aluno formalizou ou
   começou um estudo HOJE. Vira um pílula branca cheia (como a ação primária)
   com um halo pulsante suave — o convite óbvio de "volte de onde parou". No
   dia seguinte, sem estudo do dia, o realce some e o botão volta a ser ghost. */
.guiado-btn-ghost.is-destaque {
  background: #ffffff;
  color: #3b1fd8;
  border-color: transparent;
  font-weight: 800;
  box-shadow: 0 4px 18px rgba(30, 8, 90, 0.22), 0 0 0 0 rgba(255, 255, 255, 0.55);
  animation: guiado-destaque-pulso 2.4s ease-in-out infinite;
}
.guiado-btn-ghost.is-destaque:hover { background: #ffffff; }

@keyframes guiado-destaque-pulso {
  0%, 100% { box-shadow: 0 4px 18px rgba(30, 8, 90, 0.22), 0 0 0 0 rgba(255, 255, 255, 0.5); }
  50%      { box-shadow: 0 4px 18px rgba(30, 8, 90, 0.22), 0 0 0 7px rgba(255, 255, 255, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .guiado-btn-ghost.is-destaque { animation: none; }
}

/* ============================================================
   CRONÔMETRO DA SESSÃO

   Posição fixa e fora das telas: o relógio não pertence a uma
   delas — continua contando enquanto o aluno navega, e é ele
   que bloqueia o Pomodoro do Lab enquanto anda.
   ============================================================ */
.guiado-timer {
  position: fixed;
  top: 84px;
  right: 16px;
  left: auto;
  transform: none;
  z-index: 60;
  text-align: left;
}

.guiado-timer.hidden { display: none; }

/* ---- Recolhido: só o relógio no canto superior direito ---- */
.guiado-timer-chip {
  display: none;   /* aparece só no estado recolhido (regra abaixo) */
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem 0.5rem 0.75rem;
  border-radius: 999px;
  background: rgba(20, 5, 62, 0.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 12px 32px rgba(24, 6, 74, 0.42);
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
}

.guiado-timer-chip:hover { transform: translateY(-1px); background: rgba(30, 10, 80, 0.85); }
.guiado-timer-chip:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.guiado-timer-chip-icone { font-size: 22px; color: #ffc85c; }
.guiado-timer-mini { font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

.guiado-timer.is-collapsed .guiado-timer-chip { display: inline-flex; }
.guiado-timer.is-collapsed .guiado-timer-corpo { display: none; }

/* Clique no chip: um aperto rápido, para o toque não ficar seco. */
.guiado-timer-chip:active { transform: scale(0.94); }

/* ── Chamando de volta ────────────────────────────────────────
   O bloco de foco terminou enquanto o aluno estava em OUTRA seção da
   plataforma. O relógio fica visível no canto de qualquer tela; aqui ele
   pulsa em âmbar para ser notado, e tocar nele leva de volta ao estudo. */
.guiado-timer.is-atencao .guiado-timer-chip,
.guiado-timer.is-atencao .guiado-timer-corpo {
  border-color: rgba(255, 200, 92, 0.85);
  animation: guiado-timer-atencao 1.6s ease-in-out infinite;
}

.guiado-timer.is-atencao .guiado-timer-chip-icone { color: #ffd08a; }

@keyframes guiado-timer-atencao {
  0%, 100% { box-shadow: 0 12px 32px rgba(24, 6, 74, 0.42), 0 0 0 0 rgba(255, 200, 92, 0.55); }
  50%      { box-shadow: 0 12px 32px rgba(24, 6, 74, 0.42), 0 0 0 9px rgba(255, 200, 92, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .guiado-timer.is-atencao .guiado-timer-chip,
  .guiado-timer.is-atencao .guiado-timer-corpo { animation: none; }
}

/* ---- Abrir/fechar o painel: entrada com "pop", saída suave ---- */
@keyframes guiadoTimerPop {
  0%   { opacity: 0; transform: translateY(-10px) scale(0.94); }
  55%  { opacity: 1; transform: translateY(0) scale(1.015); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes guiadoTimerOut {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-8px) scale(0.95); }
}
.guiado-timer.is-abrindo .guiado-timer-corpo {
  animation: guiadoTimerPop 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: top right;
}
.guiado-timer.is-fechando .guiado-timer-corpo {
  animation: guiadoTimerOut 0.2s ease both;
  transform-origin: top right;
}

/* ---- As funcionalidades sobem em sequência quando o painel aparece ---- */
@keyframes guiadoTimerSobe {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.guiado-timer.is-abrindo .guiado-timer-linha,
.guiado-timer.is-abrindo .guiado-timer-trilho,
.guiado-timer.is-abrindo .guiado-timer-controle {
  animation: guiadoTimerSobe 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.guiado-timer.is-abrindo .guiado-timer-linha { animation-delay: 0.05s; }
.guiado-timer.is-abrindo .guiado-timer-trilho { animation-delay: 0.09s; }
.guiado-timer.is-abrindo .guiado-timer-controle:nth-child(1) { animation-delay: 0.13s; }
.guiado-timer.is-abrindo .guiado-timer-controle:nth-child(2) { animation-delay: 0.17s; }
.guiado-timer.is-abrindo .guiado-timer-controle:nth-child(3) { animation-delay: 0.21s; }

/* ---- Expandido: o painel de controles ---- */
.guiado-timer-corpo {
  width: min(340px, calc(100vw - 2rem));
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.95rem 1.05rem;
  border-radius: 22px;
  background: rgba(20, 5, 62, 0.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 18px 44px rgba(24, 6, 74, 0.5);
}

/* Os controles em lista: ícone + nome + descrição, um por linha. */
.guiado-timer-controles { display: flex; flex-direction: column; gap: 0.4rem; }

.guiado-timer-controle {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.12s ease;
}

.guiado-timer-controle:hover { background: rgba(255, 255, 255, 0.18); }
.guiado-timer-controle:active { transform: scale(0.97); }
.guiado-timer-controle:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.guiado-timer-controle .material-symbols-outlined { font-size: 22px; flex-shrink: 0; }
.guiado-timer-controle-txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.guiado-timer-controle-nome { font-weight: 800; font-size: 0.9rem; }
.guiado-timer-controle-desc { font-size: 0.74rem; font-weight: 600; color: rgba(255, 255, 255, 0.7); }
.guiado-timer-controle.is-parar { border-color: rgba(255, 140, 160, 0.42); background: rgba(255, 82, 110, 0.2); }
.guiado-timer-controle.is-parar:hover { background: rgba(255, 82, 110, 0.34); }

/* Pular descanso: mesmo botão de controle, com um azul de "seguir em frente"
   para não se confundir com o vermelho de Parar. */
.guiado-timer-controle.is-pular { border-color: rgba(143, 192, 255, 0.42); background: rgba(105, 160, 255, 0.16); }
.guiado-timer-controle.is-pular:hover { background: rgba(105, 160, 255, 0.28); }
.guiado-timer-controle.is-pular .material-symbols-outlined { color: #8fc0ff; }

/* Terminei o conteúdo: encerra a teoria antes da hora. Verde de "concluído",
   distinto do azul de "seguir em frente" e do vermelho de Parar. */
.guiado-timer-controle.is-concluir { border-color: rgba(120, 224, 168, 0.42); background: rgba(88, 208, 148, 0.16); }
.guiado-timer-controle.is-concluir:hover { background: rgba(88, 208, 148, 0.28); }
.guiado-timer-controle.is-concluir .material-symbols-outlined { color: #78e0a8; }
.guiado-timer-controle.hidden { display: none; }

.guiado-timer-linha { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.guiado-timer-info { display: flex; align-items: baseline; gap: 0.65rem; min-width: 0; }

.guiado-timer-fase {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a9c8ff;  /* estudo (teoria) — a mesma cor do bloco na lista de ciclos */
  white-space: nowrap;
}

/* Cada fase tem a sua cor: o aluno tem que saber sem ler se agora é
   teoria, exercício ou descanso. */
.guiado-timer-fase.is-pratica { color: #ffc07a; }
.guiado-timer-fase.is-pausa { color: #8fc0ff; }

.guiado-timer-relogio {
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.guiado-timer-acoes { display: flex; gap: 0.4rem; flex-shrink: 0; }

.guiado-timer-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.guiado-timer-btn:hover { background: rgba(255, 255, 255, 0.26); transform: scale(1.08); }
.guiado-timer-btn:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.guiado-timer-btn .material-symbols-outlined { font-size: 19px; }
.guiado-timer-btn.is-parar { background: rgba(255, 82, 110, 0.28); border-color: rgba(255, 140, 160, 0.45); }
.guiado-timer-btn.is-parar:hover { background: rgba(255, 82, 110, 0.45); }

.guiado-timer-trilho {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

#guiado-timer-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff9d52 0%, #ffc85c 100%);
  transition: width 0.9s linear;
}

/* ============================================================
   FOLHA EM BRANCO — o despejo de memória entre foco e pausa
   ============================================================ */
.guiado-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  /* `safe center` centraliza quando cabe e cai para o topo (rolável) quando o
     conteúdo é mais alto que a tela — sem isso, um card alto (muitas matérias)
     ficava cortado em cima e embaixo, sem como rolar até ele. */
  align-items: safe center;
  justify-content: center;
  overflow-y: auto;
  padding: 1.2rem;
  background: rgba(12, 3, 38, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.guiado-overlay.hidden { display: none; }

/* O papel + a nota do "porquê", lado a lado. Numa tela estreita a nota sobe
   para cima do papel (a ordem no DOM já garante isso ao quebrar a linha). */
.guiado-folha-conjunto {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  width: 100%;
  max-width: 960px;
  max-height: calc(100dvh - 2.4rem);
  overflow-y: auto;
  flex-wrap: wrap;
}

.guiado-folha-conjunto .guiado-folha-card {
  flex: 1 1 520px;
  width: auto;
  margin: 0;
}

.guiado-folha-nota {
  flex: 0 1 250px;
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.25rem 1.3rem;
  border-radius: 22px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 14px 42px rgba(24, 6, 74, 0.32);
}

.guiado-folha-nota .material-symbols-outlined { font-size: 27px; color: #ffd08a; }

.guiado-folha-nota-titulo {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.95);
}

.guiado-folha-nota-txt {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

/* Empilhado: a nota vira uma faixa horizontal acima do papel. */
@media (max-width: 680px) {
  .guiado-folha-conjunto { flex-direction: column; flex-wrap: nowrap; align-items: stretch; max-width: 660px; }
  .guiado-folha-conjunto .guiado-folha-card { flex: 0 0 auto; width: 100%; max-height: none; overflow: visible; }
  .guiado-folha-nota { flex: 0 0 auto; width: 100%; flex-direction: row; align-items: flex-start; flex-wrap: wrap; }
  .guiado-folha-nota-titulo { flex: 1 1 auto; align-self: center; }
}

/* Papel de verdade: creme, com margem vermelha e um leve
   desalinho. Escrever numa caixa de formulário e escrever numa
   folha não são o mesmo gesto para quem acabou de estudar. */
.guiado-folha-card {
  position: relative;
  width: 100%;
  max-width: 660px;
  max-height: calc(100dvh - 2.4rem);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  text-align: left;
  padding: 2rem 2.2rem 1.4rem 3.2rem;
  border-radius: 3px 14px 3px 14px;
  color: #2c2a24;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 60%),
    #fbf6e9;
  border: 1px solid rgba(120, 96, 60, 0.3);
  box-shadow:
    0 26px 70px rgba(8, 2, 30, 0.55),
    inset 0 0 70px rgba(196, 166, 116, 0.16);
  transform: rotate(-0.35deg);
}

/* A margem — a linha vermelha da folha de fichário. */
.guiado-folha-card::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 2.5rem;
  width: 1px;
  background: rgba(206, 88, 88, 0.42);
  pointer-events: none;
}

.guiado-folha-titulo {
  font-family: 'Caveat', 'Playwrite US Trad', cursive;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.2;
  color: #1f2a3d;
}

.guiado-folha-sub {
  font-family: 'Caveat', 'Playwrite US Trad', cursive;
  font-size: 1.12rem;
  line-height: 1.35;
  color: rgba(60, 52, 40, 0.72);
}

/* A área de escrita tem a própria pauta: as linhas acompanham o
   texto ao rolar (`background-attachment: local`), então o que se
   escreve fica sempre SOBRE a linha, não à deriva dela. */
.guiado-folha-txt {
  width: 100%;
  min-height: 306px;
  padding: 0;
  margin: 0.2rem 0 0;
  border: 0;
  outline: none;
  resize: vertical;
  font-family: 'Caveat', 'Playwrite US Trad', cursive;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 34px;
  color: #1c2b45;
  background-color: transparent;
  background-image: repeating-linear-gradient(
    180deg, transparent 0 33px, rgba(86, 122, 178, 0.3) 33px 34px);
  background-attachment: local;
}

.guiado-folha-txt::placeholder { color: rgba(60, 52, 40, 0.38); }
.guiado-folha-txt:focus { outline: none; }

.guiado-folha-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding-top: 0.4rem;
}

.guiado-folha-medidas {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.guiado-folha-contagem {
  font-family: 'Caveat', 'Playwrite US Trad', cursive;
  font-size: 1.05rem;
  color: rgba(60, 52, 40, 0.6);
}

/* Cronômetro do resumo: discreto, mas deixa claro que o tempo escrevendo
   está sendo somado ao foco do dia. */
.guiado-folha-cronometro {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: rgba(60, 52, 40, 0.55);
  background: rgba(60, 52, 40, 0.06);
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
}
.guiado-folha-cronometro .material-symbols-outlined {
  font-size: 16px;
}

/* ============================================================
   MEUS RESUMOS — as folhas já escritas

   Canto inferior esquerdo: fora do caminho durante o foco,
   à mão quando o aluno quer reler o que ele mesmo escreveu.
   ============================================================ */
.guiado-resumos-btn {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 240;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  color: #2c2a24;
  background: linear-gradient(180deg, #fdfaf0 0%, #f2e9d2 100%);
  border: 1px solid rgba(120, 96, 60, 0.34);
  box-shadow: 0 10px 26px rgba(8, 2, 30, 0.42);
  font-size: 0.8rem;
  font-weight: 800;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.guiado-resumos-btn.hidden { display: none; }
.guiado-resumos-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(8, 2, 30, 0.5); }
.guiado-resumos-btn:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
.guiado-resumos-btn .material-symbols-outlined { font-size: 19px; color: #7a5c2a; }

.guiado-resumos-qtd {
  min-width: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: rgba(122, 92, 42, 0.16);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.guiado-resumos {
  position: fixed;
  left: 1rem;
  bottom: 4.2rem;
  z-index: 245;
  width: min(400px, calc(100vw - 2rem));
  max-height: min(60vh, 520px);
  display: flex;
  flex-direction: column;
  text-align: left;
  border-radius: 20px;
  background: rgba(16, 4, 52, 0.9);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 50px rgba(10, 2, 34, 0.55);
  animation: guiadoResumosIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.guiado-resumos.hidden { display: none; }

@keyframes guiadoResumosIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.guiado-resumos-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.guiado-resumos-titulo {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
}

.guiado-resumos-titulo .material-symbols-outlined { font-size: 18px; }

.guiado-resumos-lista {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.9rem;
}

/* Cada resumo é a folha em miniatura: mesmo papel, mesma letra. */
.guiado-resumo {
  padding: 0.75rem 0.9rem;
  border-radius: 4px 12px 4px 12px;
  color: #2c2a24;
  background: #fbf6e9;
  border: 1px solid rgba(120, 96, 60, 0.3);
  box-shadow: 0 6px 16px rgba(8, 2, 30, 0.3);
}

.guiado-resumo-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(60, 52, 40, 0.6);
}

.guiado-resumo-disc { color: #7a5c2a; text-transform: uppercase; letter-spacing: 0.04em; }

/* Salvar um resumo: leva a folha ao histórico de resumos. Some no lugar do
   selo "salvo" assim que o aluno guarda. */
.guiado-resumo-salvar {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  align-self: center;
  padding: 0.26rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 96, 60, 0.4);
  background: rgba(255, 255, 255, 0.5);
  color: #7a5c2a;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.guiado-resumo-salvar:hover { background: #7a5c2a; color: #fff; border-color: #7a5c2a; }
.guiado-resumo-salvar:focus-visible { outline: 2px solid #ffc08a; outline-offset: 2px; }
.guiado-resumo-salvar .material-symbols-outlined { font-size: 16px; }

.guiado-resumo-salvo {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  margin-left: auto;
  align-self: center;
  color: #2e7d5b;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.guiado-resumo-salvo .material-symbols-outlined { font-size: 16px; }

.guiado-resumo-txt {
  font-family: 'Caveat', 'Playwrite US Trad', cursive;
  font-size: 1.15rem;
  line-height: 1.45;
  color: #1c2b45;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Resumo no histórico: folha que abre ao toque ────────────────
   Fechada, mostra só um trecho e um leve levantar da borda ao passar
   o mouse. Aberta (is-expandida), vira a folha de papel inteira — pauta,
   margem vermelha e a letra maior, o mesmo desenho da folha em branco. */
.guiado-resumo-hist {
  position: relative;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.guiado-resumo-hist:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(8, 2, 30, 0.42); }
.guiado-resumo-hist:focus-visible { outline: 2px solid #ffc08a; outline-offset: 3px; }

/* A lixeira, discreta no canto da folha até o hover. */
.guiado-resumo-excluir {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  align-self: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(120, 96, 60, 0.28);
  background: rgba(255, 255, 255, 0.4);
  color: #9a5b4a;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.guiado-resumo-excluir:hover { background: rgba(206, 88, 88, 0.16); color: #b23b3b; }
.guiado-resumo-excluir .material-symbols-outlined { font-size: 17px; }

/* Fechada: no máximo umas quatro linhas, com um esmaecer no rodapé. */
.guiado-resumo-hist .guiado-resumo-txt {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Aberta: a folha de papel inteira. */
.guiado-resumo-hist.is-expandida {
  padding: 1.6rem 1.8rem 1.4rem 2.8rem;
  border-radius: 3px 14px 3px 14px;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 60%),
    #fbf6e9;
  box-shadow:
    0 22px 60px rgba(8, 2, 30, 0.5),
    inset 0 0 60px rgba(196, 166, 116, 0.16);
  transform: rotate(-0.35deg);
}

.guiado-resumo-hist.is-expandida:hover { transform: rotate(-0.35deg) translateY(-2px); }

/* A margem vermelha da folha de fichário, só quando aberta. */
.guiado-resumo-hist.is-expandida::before {
  content: '';
  position: absolute;
  top: 0.4rem;
  bottom: 0.4rem;
  left: 2rem;
  width: 1px;
  background: rgba(206, 88, 88, 0.42);
  pointer-events: none;
}

.guiado-resumo-hist.is-expandida .guiado-resumo-txt {
  display: block;
  -webkit-line-clamp: none;
  overflow: visible;
  margin-top: 0.3rem;
  font-size: 1.5rem;
  line-height: 34px;
  background-image: repeating-linear-gradient(
    180deg, transparent 0 33px, rgba(86, 122, 178, 0.3) 33px 34px);
}

@media (max-width: 560px) {
  .guiado-timer { top: 66px; right: 10px; }
  .guiado-timer-corpo { padding: 0.8rem 0.9rem; }
  .guiado-timer-relogio { font-size: 1.3rem; }
  .guiado-folha-card { padding: 1.4rem 1.2rem 1rem 2.3rem; }
  .guiado-folha-card::before { left: 1.7rem; }
  .guiado-folha-titulo { font-size: 1.5rem; }
  .guiado-folha-txt { min-height: 204px; font-size: 1.35rem; }
  .guiado-resumos-btn .guiado-resumos-rotulo { display: none; }
  .guiado-resumos { bottom: 4rem; max-height: 56vh; }
}

@media (prefers-reduced-motion: reduce) {
  .guiado-resumos { animation: none; }
  #guiado-timer-fill { transition: none; }
  .guiado-timer-btn:hover, .guiado-resumos-btn:hover { transform: none; }
  .guiado-timer.is-abrindo .guiado-timer-corpo,
  .guiado-timer.is-fechando .guiado-timer-corpo,
  .guiado-timer.is-abrindo .guiado-timer-linha,
  .guiado-timer.is-abrindo .guiado-timer-trilho,
  .guiado-timer.is-abrindo .guiado-timer-controle { animation: none; }
  .guiado-timer-chip:active, .guiado-timer-controle:active { transform: none; }
}

/* ============================================================
   TRILHA — uma bola por conteúdo

   As bolas ficam numa linha que quebra: a ordem de leitura É a
   ordem de estudo, então nada de posicionamento livre — arrastar
   bolas pela tela criaria uma ordem que o motor não tem como ler.
   ============================================================ */

/* ── Progresso da trilha: quanto dela já foi concluído ────── */
.guiado-trilha-progresso {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 460px;
  margin: 0.2rem auto 0.4rem;
}
.guiado-trilha-progresso.hidden { display: none; }
.guiado-trilha-progresso-trilho {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}
.guiado-trilha-progresso-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #6ee7b7 0%, #34d399 100%);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.guiado-trilha-progresso.is-completa .guiado-trilha-progresso-fill {
  background: linear-gradient(90deg, #34d399 0%, #10b981 100%);
}
.guiado-trilha-progresso-txt {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
}
.guiado-trilha-progresso.is-completa .guiado-trilha-progresso-txt { color: #6ee7b7; }

/* Barra da meta diária de tempo — verde, igual à do dashboard. */
.guiado-trilha-tempo .guiado-trilha-progresso-fill {
  background: linear-gradient(90deg, #6ee7b7 0%, #34d399 100%);
}
.guiado-trilha-tempo.is-completa .guiado-trilha-progresso-fill {
  background: linear-gradient(90deg, #34d399 0%, #10b981 100%);
}
.guiado-trilha-tempo.is-completa .guiado-trilha-progresso-txt { color: #6ee7b7; }

@media (prefers-reduced-motion: reduce) {
  .guiado-trilha-progresso-fill { transition: none; }
}

.guiado-trilha-bolas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 1.4rem;
  width: 100%;
  max-width: 860px;
}

/* Grandes porque carregam três informações (nome, tempo, divisão) mais um
   botão de ação: o texto tem que caber sem encolher a ponto de virar
   legenda. */
.guiado-bola {
  position: relative;
  width: 196px;
  height: 196px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 1.4rem 1.2rem;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 10px 32px rgba(24, 6, 74, 0.28);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.2s ease, border-color 0.2s ease,
              box-shadow 0.2s ease;
}

.guiado-bola:hover { transform: translateY(-4px) scale(1.03); background: rgba(255, 255, 255, 0.24); }
.guiado-bola:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }

/* Arrastável: a bola já configurada pode ser puxada para reordenar a trilha
   (mouse e toque). `touch-action: none` deixa o gesto virar arrasto, não rolagem. */
.guiado-bola.is-pronta { cursor: grab; touch-action: none; }
/* Feedback do arrasto por `filter`/`box-shadow`/anel — nunca por transform ou
   opacity: essas duas são controladas pela animação de entrada (fill `both`), e
   uma declaração normal perderia para ela. `filter` e `box-shadow` não são
   tocados pelo keyframe, então aparecem sempre. */
.guiado-bola.is-dragging {
  cursor: grabbing;
  z-index: 6;
  pointer-events: none;
  filter: brightness(1.12);
  box-shadow: 0 20px 48px rgba(10, 2, 40, 0.55), 0 0 0 3px rgba(255, 255, 255, 0.55);
}

/* Modo reordenar (ligado no início do arrasto): desliga a animação de ENTRADA
   das bolas para destravar o `transform`. Só assim a arrastada pode "levantar"
   e as demais podem deslizar via FLIP em vez de saltar seco. */
.guiado-trilha-bolas.is-reordenando .guiado-bola { animation: none !important; }
.guiado-trilha-bolas.is-reordenando .guiado-bola.is-dragging {
  transform: scale(1.09) rotate(-2deg);
}
@media (prefers-reduced-motion: reduce) {
  .guiado-trilha-bolas.is-reordenando .guiado-bola.is-dragging { transform: none; }
}

/* ── Bola configurada: ganha cor ──────────────────────────
   Vidro translúcido = ainda por configurar. Cor sólida = pronta.
   A diferença é de MATERIAL, não só de tom: dá para ver de longe
   quantas bolas da trilha já estão de pé sem ler nada. O tom vem
   da posição (tom-1..tom-6), então vizinhas nunca se repetem. */
.guiado-bola.is-pronta {
  background: linear-gradient(150deg, var(--bola-a) 0%, var(--bola-b) 100%);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 14px 38px var(--bola-sombra, rgba(24, 6, 74, 0.42));
}

.guiado-bola.is-pronta:hover {
  background: linear-gradient(150deg, var(--bola-a) 0%, var(--bola-b) 100%);
  filter: brightness(1.08);
}

/* Bola concluída: um anel verde e o selo de check no topo. A bola mantém a
   cor da posição — o verde é só a moldura de "feito", para não perder de vista
   qual conteúdo é. O botão de estudar continua ali: repetir é permitido. */
.guiado-bola.is-concluida {
  border-color: rgba(110, 231, 183, 0.9);
  box-shadow: 0 14px 38px var(--bola-sombra, rgba(24, 6, 74, 0.42)),
              0 0 0 3px rgba(52, 211, 153, 0.65);
}
.guiado-bola-check {
  position: absolute;
  top: -10px;
  right: -6px;
  font-size: 30px;
  color: #34d399;
  background: #06281d;
  border-radius: 50%;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(6, 40, 29, 0.5);
  z-index: 3;
}

.guiado-bola.tom-1 { --bola-a: #7c5cff; --bola-b: #4d2bd6; --bola-sombra: rgba(77, 43, 214, 0.45); }
.guiado-bola.tom-2 { --bola-a: #ff8f6b; --bola-b: #e8532f; --bola-sombra: rgba(232, 83, 47, 0.42); }
.guiado-bola.tom-3 { --bola-a: #3fc8b4; --bola-b: #10917f; --bola-sombra: rgba(16, 145, 127, 0.42); }
.guiado-bola.tom-4 { --bola-a: #63a8ff; --bola-b: #2a63d8; --bola-sombra: rgba(42, 99, 216, 0.42); }
.guiado-bola.tom-5 { --bola-a: #ff87c2; --bola-b: #d63d8e; --bola-sombra: rgba(214, 61, 142, 0.42); }
.guiado-bola.tom-6 { --bola-a: #ffc85c; --bola-b: #e09312; --bola-sombra: rgba(224, 147, 18, 0.42); }

.guiado-bola-ordem {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
}

.guiado-bola-nome {
  color: #ffffff;
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1.2;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.guiado-bola-meta {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
}

/* Bola adicionada mas ainda sem configuração: tracejada e vazia,
   para não passar por conteúdo pronto. */
.guiado-bola.is-rascunho {
  background: rgba(255, 255, 255, 0.06);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: none;
}

.guiado-bola.is-rascunho .guiado-bola-nome { color: rgba(255, 255, 255, 0.82); font-weight: 700; }

/* A bola de adicionar */
.guiado-bola.is-add {
  background: rgba(255, 255, 255, 0.09);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: none;
  color: rgba(255, 255, 255, 0.9);
}

.guiado-bola.is-add .material-symbols-outlined { font-size: 44px; }
.guiado-bola.is-add:hover { background: rgba(255, 255, 255, 0.18); }

/* Ações na borda da bola — estudar agora e remover rascunho. */
.guiado-bola-acao {
  position: absolute;
  bottom: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(24, 6, 74, 0.45);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.guiado-bola-acao:hover { background: rgba(24, 6, 74, 0.75); transform: scale(1.1); }
.guiado-bola-acao .material-symbols-outlined { font-size: 19px; }
.guiado-bola-acao.is-estudar { left: 50%; transform: translateX(-50%); }
.guiado-bola-acao.is-estudar:hover { transform: translateX(-50%) scale(1.1); }
.guiado-bola-acao.is-remover { right: 18px; bottom: 18px; }
.guiado-bola-acao.is-excluir { right: 18px; bottom: 18px; }
.guiado-bola-acao.is-excluir:hover { background: rgba(190, 18, 60, 0.85); border-color: rgba(255, 255, 255, 0.55); }

.guiado-trilha-acoes { display: flex; gap: 0.75rem; align-items: center; justify-content: center; flex-wrap: wrap; }

@media (max-width: 560px) {
  .guiado-bola { width: 152px; height: 152px; padding: 1rem 0.85rem; }
  .guiado-bola-nome { font-size: 0.92rem; }
  .guiado-bola-meta { font-size: 0.68rem; }
  .guiado-escolha { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .guiado-escolha:hover, .guiado-bola:hover { transform: none; }
  .guiado-bola-acao:hover { transform: none; }
  .guiado-bola-acao.is-estudar:hover { transform: translateX(-50%); }
}

/* ── Spinner ────────────────────────────────────────────── */
.guiado-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  animation: guiadoSpin 0.7s linear infinite;
}

@keyframes guiadoSpin { to { transform: rotate(360deg); } }

/* Foco visível para teclado (o outline padrão some sobre o vidro) */
.guiado-btn-primary:focus-visible,
.guiado-btn-ghost:focus-visible,
.guiado-chip:focus-visible,
.guiado-topico:focus-within,
.guiado-input:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

@media (max-width: 560px) {
  .guiado-card { padding: 1.4rem; border-radius: 22px; }
  .guiado-card-foot { flex-direction: column-reverse; align-items: stretch; }
  .guiado-card-foot button { width: 100%; }
}

/* ============================================================
   EXERCÍCIOS — o item da sessão

   O material aqui vem das folhas que o próprio aluno escreveu.
   Ordem obrigatória na tela: pergunta -> confiança -> resposta
   -> feedback. A resposta nunca divide espaço com a pergunta.
   ============================================================ */

#guiado-item { gap: 1rem; }

/* Progresso simples e sempre visível: a posição dentro DESTA
   bateria, nunca um total de pendências. */
.guiado-progresso {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 560px;
}

.guiado-progresso-trilho {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

#guiado-progresso-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff9d52 0%, #ffc85c 100%);
  transition: width 0.3s ease;
}

.guiado-progresso-txt {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.76rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.guiado-item-card { gap: 1.15rem; width: 100%; max-width: 620px; text-align: left; }

.guiado-item-topico {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.guiado-item-pergunta {
  color: #ffffff;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.4;
}

.guiado-passo { display: flex; flex-direction: column; gap: 0.7rem; }
.guiado-passo.hidden { display: none; }

.guiado-confianca { display: flex; gap: 0.4rem; }

.guiado-conf-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.6rem 0.2rem 0.5rem;
  border-radius: 14px;
  cursor: pointer;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
  transition: background 0.16s ease, transform 0.16s ease;
}

.guiado-conf-btn:hover { background: rgba(255, 255, 255, 0.24); transform: translateY(-2px); }
.guiado-conf-num { font-size: 1.05rem; font-weight: 800; line-height: 1; }
.guiado-conf-lbl { font-size: 0.55rem; font-weight: 700; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.04em; }

.guiado-alternativas { display: flex; flex-direction: column; gap: 0.45rem; }
.guiado-alternativas.hidden { display: none; }

.guiado-alt {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  transition: background 0.16s ease;
}

.guiado-alt:hover:not(:disabled) { background: rgba(255, 255, 255, 0.2); }
.guiado-alt:disabled { cursor: default; }

.guiado-alt-letra {
  flex-shrink: 0;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.78rem;
  font-weight: 800;
}

.guiado-alt.is-certa { background: rgba(52, 211, 153, 0.3); border-color: rgba(52, 211, 153, 0.75); }
.guiado-alt.is-certa .guiado-alt-letra { background: rgba(52, 211, 153, 0.85); color: #06281c; }
.guiado-alt.is-errada { background: rgba(255, 99, 132, 0.28); border-color: rgba(255, 130, 155, 0.75); }
.guiado-alt.is-errada .guiado-alt-letra { background: rgba(255, 130, 155, 0.9); color: #3d0512; }

/* ── Bolinhas de navegação entre as questões ─────────────────────────
   No canto esquerdo do painel de prática. Uma bolinha por questão, com o
   estado (atual, acertada, errada, pendente). Levam o aluno a pular para uma
   questão à frente ou reler uma já feita. */
#guiado-item { position: relative; }

.guiado-item-bolas {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 80%;
  overflow-y: auto;
  padding: 0.15rem;
  z-index: 2;
}

.guiado-item-bolas.hidden { display: none; }

.guiado-item-bola {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.guiado-item-bola:hover { background: rgba(255, 255, 255, 0.24); transform: scale(1.08); }
.guiado-item-bola.is-pendente { opacity: 0.7; }
.guiado-item-bola.is-certa {
  background: rgba(52, 211, 153, 0.32);
  border-color: rgba(52, 211, 153, 0.75);
}
.guiado-item-bola.is-errada {
  background: rgba(255, 99, 132, 0.3);
  border-color: rgba(255, 130, 155, 0.75);
}
.guiado-item-bola.is-atual {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
  transform: scale(1.12);
}

/* ── Quantos exercícios por matéria (na prontidão) ──────────────────── */
.guiado-qtd-materias {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin: 0.25rem 0 1.1rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  text-align: left;
  animation: guiado-rise 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.14s;
}

/* ── Estilo dos exercícios (fechadas / abertas / flashcards) ──────────
   Chips grandes de liga/desliga, no mesmo tom do seletor de quantidade. */
.guiado-estilos {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin: 0 0 1.1rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  text-align: left;
  animation: guiado-rise 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.16s;
}

.guiado-estilos-lista {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.55rem;
}

.guiado-estilo-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.7rem 0.8rem;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}
.guiado-estilo-chip:hover { background: rgba(255, 255, 255, 0.1); }
.guiado-estilo-chip:active { transform: scale(0.98); }
.guiado-estilo-chip .material-symbols-outlined { font-size: 20px; color: rgba(255, 255, 255, 0.65); }
.guiado-estilo-nome { font-size: 0.9rem; font-weight: 800; }
.guiado-estilo-desc { font-size: 0.72rem; font-weight: 600; color: rgba(255, 255, 255, 0.6); line-height: 1.2; }

/* Ligado: destaque em verde-água, igual ao "concluído" do cronômetro. */
.guiado-estilo-chip.is-on {
  background: rgba(88, 208, 148, 0.16);
  border-color: rgba(120, 224, 168, 0.55);
}
.guiado-estilo-chip.is-on .material-symbols-outlined { color: #78e0a8; }
.guiado-estilo-chip:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }

/* Cartões compactos numa grade: cada matéria ocupa pouco, o contador fica
   colado ao nome, e a lista rola por dentro quando há muitas matérias — assim
   o título e os botões da prontidão nunca ficam cortados fora da tela. */
.guiado-qtd-lista {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 0.55rem;
  max-height: min(42vh, 340px);
  overflow-y: auto;
  padding: 0.1rem 0.3rem 0.1rem 0.1rem;
  margin: -0.1rem;
}

/* Barra de rolagem discreta, no tom do painel. */
.guiado-qtd-lista::-webkit-scrollbar { width: 8px; }
.guiado-qtd-lista::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.24);
  border-radius: 999px;
}

.guiado-qtd-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.6rem 0.7rem;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  animation: guiado-qtd-card-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.guiado-qtd-card:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.28); }

.guiado-qtd-nome {
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  /* Nome em até duas linhas; nomes longos ("Bioquímica e biologia molecular")
     não empurram o contador nem quebram o cartão. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.05em;
}

.guiado-qtd-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.guiado-qtd-btn {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.guiado-qtd-btn:hover { background: rgba(255, 255, 255, 0.28); transform: scale(1.08); }
.guiado-qtd-btn:active { transform: scale(0.94); }

.guiado-qtd-valor {
  min-width: 1.5ch;
  text-align: center;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.guiado-qtd-rodape {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.guiado-qtd-total {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.85rem;
  font-weight: 600;
}

.guiado-qtd-teto {
  color: #ffd7a8;
  font-size: 0.8rem;
  font-weight: 600;
}

.guiado-qtd-teto.hidden { display: none; }

/* Entrada da prontidão: título, subtítulo, seletor e botões sobem em cascata,
   para a tela não "aparecer seca". */
@keyframes guiado-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes guiado-qtd-card-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.guiado-prontidao-card .guiado-card-title { animation: guiado-rise 0.42s cubic-bezier(0.22, 1, 0.36, 1) both; }
.guiado-prontidao-card .guiado-card-sub { animation: guiado-rise 0.42s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: 0.07s; }
.guiado-prontidao-card .guiado-prontidao-botoes { animation: guiado-rise 0.42s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  .guiado-qtd-materias,
  .guiado-qtd-card,
  .guiado-prontidao-card .guiado-card-title,
  .guiado-prontidao-card .guiado-card-sub,
  .guiado-prontidao-card .guiado-prontidao-botoes { animation: none; }
}

.guiado-resposta-texto {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 0.92rem;
  line-height: 1.5;
}

.guiado-resposta-texto.hidden { display: none; }

.guiado-autoavaliacao { display: flex; flex-direction: column; gap: 0.6rem; }
.guiado-autoavaliacao.hidden { display: none; }
.guiado-autoavaliacao-btns { display: flex; gap: 0.6rem; }

.guiado-btn-acertei, .guiado-btn-errei {
  flex: 1;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 800;
  transition: transform 0.16s ease;
}

.guiado-btn-acertei { background: rgba(52, 211, 153, 0.9); color: #06281c; }
.guiado-btn-errei { background: rgba(255, 255, 255, 0.16); color: #fff; border-color: rgba(255, 255, 255, 0.32); }
.guiado-btn-acertei:hover, .guiado-btn-errei:hover { transform: translateY(-2px); }

.guiado-feedback-titulo { font-size: 1rem; font-weight: 800; color: #fff; }
.guiado-feedback-titulo.is-certo { color: #6ee7b7; }
.guiado-feedback-titulo.is-errado { color: #ffb3c4; }

.guiado-feedback-explicacao {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* ============================================================
   PRONTIDÃO — "aprender mais ou partir para os exercícios?"

   Os dois caminhos têm o mesmo peso visual: só o aluno sabe se
   o conteúdo entrou, e destacar um lado empurraria a resposta.
   ============================================================ */
/* Sem caixa: as frases e as perguntas flutuam direto sobre o fundo
   desfocado do overlay. Sem fundo, sem borda, sem sombra — só o conteúdo,
   maior, ocupando o espaço que o card antes emoldurava. */
.guiado-prontidao-card {
  width: 100%;
  max-width: 820px;
  text-align: left;
  gap: 1.6rem;
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.guiado-prontidao-card .guiado-card-title {
  font-size: clamp(2rem, 5.2vw, 3.3rem);
  line-height: 1.1;
}

.guiado-prontidao-card .guiado-card-sub {
  font-size: clamp(0.98rem, 2.4vw, 1.2rem);
  line-height: 1.45;
  max-width: 62ch;
}

.guiado-prontidao-botoes { display: flex; gap: 1rem; flex-wrap: wrap; }

.guiado-prontidao-btn {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1.4rem 1.5rem;
  border-radius: 20px;
  cursor: pointer;
  text-align: left;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.26);
  transition: background 0.16s ease, transform 0.16s ease;
}

.guiado-prontidao-btn:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-2px); }
.guiado-prontidao-btn .material-symbols-outlined { font-size: 26px; }
.guiado-prontidao-btn.is-mais .material-symbols-outlined { color: #a9c8ff; }
.guiado-prontidao-btn.is-pronto .material-symbols-outlined { color: #ffc08a; }
.guiado-prontidao-btn-titulo { font-size: 1.12rem; font-weight: 800; line-height: 1.25; }
.guiado-prontidao-btn-sub { font-size: 0.85rem; font-weight: 600; color: rgba(255, 255, 255, 0.68); }

.guiado-prontidao-tempo {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.guiado-prontidao-tempo.hidden { display: none; }
.guiado-prontidao-livre { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

/* ============================================================
   FECHAMENTO — o painel de desempenho

   Números concretos, nunca "parabéns!". Cada quadro diz o que
   aconteceu e, embaixo, o que aquilo significa.
   ============================================================ */
/* O placar da prática: um anel que se preenche com a pontuação e, ao lado,
   quantas saíram certas. É o primeiro número que o aluno vê no fechamento. */
.guiado-fim-score {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  width: 100%;
  max-width: 720px;
  padding: 1.1rem 1.3rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.guiado-fim-score.hidden { display: none; }

.guiado-fim-score-anel {
  --score: 0;
  position: relative;
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  /* Número empilhado e centrado no miolo do anel: "75" grande, "/100" pequeno
     logo abaixo — assim nada transborda o furo do donut, que era o problema. */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background:
    radial-gradient(closest-side, rgba(20, 8, 54, 0.72) 70%, transparent 71%),
    conic-gradient(#6ee7b7 calc(var(--score) * 1%), rgba(255, 255, 255, 0.16) 0);
}

.guiado-fim-score-valor {
  color: #ffffff;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.guiado-fim-score-max {
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.guiado-fim-score-txt { display: flex; flex-direction: column; gap: 0.2rem; }

.guiado-fim-score-rotulo {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
}

.guiado-fim-score-sub {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 600;
}

.guiado-fim-numeros {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.7rem;
  width: 100%;
  max-width: 720px;
}

.guiado-fim-num {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  text-align: left;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-left-width: 4px;
}

.guiado-fim-num.is-tempo { border-left-color: #a9c8ff; }
.guiado-fim-num.is-acertos { border-left-color: #6ee7b7; }
.guiado-fim-num.is-erros { border-left-color: #ffb3c4; }
.guiado-fim-num.is-notas { border-left-color: #ffc08a; }
.guiado-fim-num.is-score { border-left-color: #c4b5fd; }

.guiado-fim-valor {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.guiado-fim-rotulo {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.guiado-fim-sub {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
}

.guiado-fim-bloco {
  width: 100%;
  max-width: 720px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Resumo da trilha inteira no fim: destacado com uma borda verde suave, para
   ler como "você fechou a trilha" e não se confundir com o estudo isolado. */
.guiado-fim-trilha {
  gap: 0.8rem;
  padding: 1.1rem 1.2rem;
  border-radius: 20px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.32);
}
.guiado-fim-trilha .guiado-fim-titulo { color: #6ee7b7; }
.guiado-fim-trilha-sub {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.45;
}
.guiado-fim-trilha-numeros { max-width: 100%; }

.guiado-fim-bloco.hidden { display: none; }

.guiado-fim-titulo {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.guiado-fim-lista {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 0.3rem;
}

/* O aviso de que resumo não salvo é descartado, acima do recap do fechamento. */
.guiado-fim-anotacoes-hint {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
  line-height: 1.5;
  margin: -0.1rem 0 0.2rem;
}

.guiado-fim-erro {
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 99, 132, 0.12);
  border: 1px solid rgba(255, 130, 155, 0.32);
}

.guiado-fim-erro-pergunta { color: #ffffff; font-size: 0.86rem; font-weight: 700; line-height: 1.45; }
.guiado-fim-erro-resposta { color: rgba(255, 255, 255, 0.72); font-size: 0.82rem; line-height: 1.5; margin-top: 0.2rem; }

.guiado-fim-acoes { display: flex; gap: 0.7rem; flex-wrap: wrap; justify-content: center; }

/* ── Histórico ────────────────────────────────────────────── */
.guiado-historico-lista { width: 100%; max-width: 620px; max-height: 60vh; }

/* ── Métricas do histórico ───────────────────────────────────────
   O retrato de tudo que o aluno já fez no Estudo Guiado, no topo da lista:
   matérias, tempo total, estudos concluídos e aproveitamento. */
.guiado-hist-metricas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.guiado-hist-metrica {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 0.9rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.guiado-hist-metrica-valor {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.guiado-hist-metrica-rotulo {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
}

.guiado-hist-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  text-align: left;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.guiado-hist-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.guiado-hist-disc { color: #ffffff; font-size: 0.92rem; font-weight: 800; }
.guiado-hist-data { margin-left: auto; color: rgba(255, 255, 255, 0.6); font-size: 0.74rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.guiado-hist-meta { color: rgba(255, 255, 255, 0.74); font-size: 0.78rem; font-weight: 600; line-height: 1.45; }

/* Selo de estado: concluído (verde) x não concluído (âmbar). É o que faz o
   histórico distinguir de relance o que terminou do que ficou pela metade. */
.guiado-hist-status {
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.guiado-hist-status.is-concluida { color: #8ff0c0; background: rgba(52, 211, 153, 0.16); border-color: rgba(52, 211, 153, 0.4); }
.guiado-hist-status.is-pendente { color: #ffcf8f; background: rgba(255, 176, 90, 0.16); border-color: rgba(255, 176, 90, 0.42); }

/* Uma barra âmbar à esquerda reforça o "não concluído" sem depender só da cor
   do selo (daltonismo). */
.guiado-hist-item.is-aberto { border-left: 3px solid rgba(255, 176, 90, 0.7); }

.guiado-hist-acoes { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.35rem; }
.guiado-hist-continuar { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.guiado-hist-continuar .material-symbols-outlined { font-size: 18px; }
.guiado-hist-item .guiado-link-sutil { margin-left: auto; }

@media (max-width: 560px) {
  .guiado-conf-btn { padding: 0.65rem 0.1rem 0.45rem; }
  .guiado-conf-lbl { font-size: 0.48rem; }
  .guiado-autoavaliacao-btns { flex-direction: column; }
  .guiado-prontidao-btn { flex-basis: 100%; }
  .guiado-fim-valor { font-size: 1.3rem; }

}

/* Sem espaço à esquerda quando o painel fica estreito (o card mede 620px + a
   coluna precisa de folga dos dois lados): as bolinhas viram uma faixa
   horizontal rolável no topo, em vez de uma coluna sobre o card. */
@media (max-width: 760px) {
  .guiado-item-bolas {
    position: static;
    transform: none;
    flex-direction: row;
    max-height: none;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    order: -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  #guiado-progresso-fill { transition: none; }
  .guiado-conf-btn:hover, .guiado-btn-acertei:hover,
  .guiado-btn-errei:hover, .guiado-prontidao-btn:hover { transform: none; }
  .guiado-item-bola:hover, .guiado-qtd-btn:hover { transform: none; }
}

/* ============================================================
   FEYNMAN — explicar e ser avaliado

   O aluno ensina o conceito de volta com as próprias palavras;
   a IA avalia e devolve a versão bem explicada. Aprender
   explicando é o centro do exercício.
   ============================================================ */
.guiado-explicar-txt {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  line-height: 1.55;
  font-weight: 500;
}

.guiado-explicar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

/* Ações da explicação: o mic (responder por áudio) ao lado do enviar. */
.guiado-explicar-acoes {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.guiado-explicar-mic {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}
.guiado-explicar-mic:hover { background: rgba(255, 255, 255, 0.16); }
.guiado-explicar-mic:active { transform: scale(0.97); }
.guiado-explicar-mic:disabled { opacity: 0.6; cursor: default; }
.guiado-explicar-mic .material-symbols-outlined { font-size: 19px; }

/* Gravando: vermelho pulsante para deixar claro que o microfone está aberto. */
.guiado-explicar-mic.is-gravando {
  background: rgba(255, 82, 110, 0.2);
  border-color: rgba(255, 140, 160, 0.55);
  animation: guiado-mic-pulsar 1.3s ease-in-out infinite;
}
.guiado-explicar-mic.is-gravando .material-symbols-outlined { color: #ff8ca0; }

@keyframes guiado-mic-pulsar {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 82, 110, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(255, 82, 110, 0); }
}

.guiado-explicar-audio-status {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
}

@media (prefers-reduced-motion: reduce) {
  .guiado-explicar-mic.is-gravando { animation: none; }
}

/* A avaliação: nota (no título do feedback), resumo e listas. */
.guiado-feynman-aval {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.guiado-feynman-aval.hidden { display: none; }

.guiado-feynman-resumo-txt {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
  line-height: 1.55;
}

.guiado-feynman-listas { display: flex; flex-direction: column; gap: 0.3rem; }

.guiado-feynman-lbl {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.guiado-feynman-lbl.is-bom { color: #6ee7b7; }
.guiado-feynman-lbl.is-falta { color: #ffb3c4; }

/* Onde o erro nasceu: um aviso destacado no topo da avaliação, tingido pela
   origem — âmbar quando o tropeço veio dos resumos, rosa quando foi da
   explicação, vermelho quando foram os dois. */
.guiado-feynman-origem {
  margin: 0;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border-left: 3px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.85rem;
  line-height: 1.5;
  font-weight: 600;
}

.guiado-feynman-origem.hidden { display: none; }
.guiado-feynman-origem.is-resumo { border-left-color: #ffce8a; background: rgba(255, 179, 0, 0.13); }
.guiado-feynman-origem.is-explicacao { border-left-color: #ffb3c4; background: rgba(255, 90, 130, 0.13); }
.guiado-feynman-origem.is-ambos { border-left-color: #ff8a8a; background: rgba(220, 60, 60, 0.16); }

.guiado-feynman-listas ul {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.guiado-feynman-listas li {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  line-height: 1.5;
}

/* A explicação-modelo: como o conceito se explica bem. É o que o
   aluno leva de aprendizado, então ganha destaque próprio. */
.guiado-feynman-modelo {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(105, 170, 255, 0.12);
  border: 1px solid rgba(105, 170, 255, 0.34);
}

.guiado-feynman-modelo.hidden { display: none; }

.guiado-feynman-modelo-rotulo {
  color: #a9c8ff;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#guiado-feynman-modelo-txt {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  line-height: 1.55;
}
