/* ==========================================================================
   Plataforma Hugo — Área do aluno
   Tema escuro imersivo, estilo área de membros premium.
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #0c0d11;
  --surface: #15171e;
  --surface-2: #1c1f28;
  --border: #262a36;
  --border-strong: #333849;
  --ink: #f1f3f8;
  --muted: #9aa2b5;
  /* --faint era #6b7284 e reprovava a WCAG AA em TODO texto pequeno que usa
     ela: 4,04:1 sobre --bg, 3,72:1 sobre --surface e 3,42:1 sobre --surface-2,
     contra os 4,5:1 que texto abaixo de 18,66px exige. Isso ficou visível
     quando as prateleiras chegaram, porque a linha "1/5 aulas concluídas · 20%"
     e o "0/3 aulas" do cartão são exatamente esta cor — a informação de
     progresso do aluno era a menos legível da tela. #838b9e é o primeiro cinza
     que passa nos TRÊS fundos (pior caso 4,82:1) e continua mais apagado que
     --muted, então a hierarquia de leitura não muda. */
  --faint: #838b9e;

  /* Acento harmonizado com a paleta nova do painel (css/tokens.css) */
  --primary: oklch(0.585 0.215 277);
  --primary-bright: oklch(0.72 0.15 277);
  --primary-strong: oklch(0.52 0.24 277);
  --success: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;

  --radius: 14px;
  --radius-sm: 9px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14.5px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary-bright); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.015em; }
p { margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- primitivas ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 570;
  font-size: 13.5px;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background 0.15s, border-color 0.15s, transform 0.06s;
}
.btn:active { transform: translateY(1px); }
.btn.lg { padding: 13px 18px; font-size: 14.5px; border-radius: 11px; }
.btn.sm { padding: 7px 12px; font-size: 12.5px; }
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 4px 18px rgba(99, 102, 241, 0.35); }
.btn.primary:hover { background: var(--primary-strong); }
.btn.ghost { background: var(--surface-2); color: var(--ink); border-color: var(--border-strong); }
.btn.ghost:hover { background: #232734; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
/* ALCANCE DO POLEGAR — os dois controles do topo da área do aluno mediam 36px
   (sair) e 32px (a foto), abaixo dos 44px mínimos, na mesma tela onde o aluno
   passa o dia. Em vez de inflar o desenho (o que empurraria o cabeçalho e
   arrastaria o selo da câmera junto), a área de TOQUE cresce por baixo, sem
   pixel visível: 44x44 centrado no botão. Medido antes de escolher isto — a
   folga entre os dois é de 10px e os dois retângulos de 44px ficam colados sem
   se invadir (290-334 e 334-378 em 390px), então nenhum dedo acerta o vizinho. */
.icon-btn, .avatar-button { position: relative; }
.icon-btn::after, .avatar-button::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 44px; height: 44px;
  transform: translate(-50%, -50%);
}
.field { display: grid; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 550; color: var(--muted); }
.field input, textarea.input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, textarea.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2); }
.field input::placeholder, textarea.input::placeholder { color: var(--faint); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 620;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}
.badge.green { background: rgba(52, 211, 153, 0.12); color: var(--success); border-color: transparent; }
.badge.indigo { background: rgba(129, 140, 248, 0.14); color: var(--primary-bright); border-color: transparent; }

.toast {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  max-width: 400px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #f1f3f8;
  color: #14161c;
  font-size: 13.5px;
  font-weight: 550;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.2s;
}
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--danger); color: #fff; }

/* ---------- login ---------- */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(720px 420px at 20% -5%, rgba(99, 102, 241, 0.22), transparent 60%),
    radial-gradient(600px 380px at 90% 10%, rgba(139, 92, 246, 0.12), transparent 55%),
    var(--bg);
}
.login-card {
  width: min(420px, 100%);
  padding: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}
.login-eyebrow { margin: 18px 0 4px; color: var(--primary-bright); font-size: 12px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.login-card h1 { font-size: 26px; }
.login-sub { margin-top: 6px; color: var(--muted); }
.login-form { display: grid; gap: 14px; margin: 24px 0 4px; }
.login-alt { display: inline-block; margin-top: 16px; font-weight: 550; font-size: 13.5px; }
.login-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.login-links .login-alt { margin-top: 16px; }
.brand-mark {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: #fff;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}
.brand-mark .icon { width: 24px; height: 24px; }
.brand-mark.small { width: 38px; height: 38px; border-radius: 11px; }
.brand-mark.small .icon { width: 20px; height: 20px; }

/* ---------- estrutura ---------- */
.student-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 66px;
  padding: 0 max(20px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(12, 13, 17, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; }
.sidebar-brand strong { display: block; font-size: 15px; }
.sidebar-brand span { display: block; font-size: 11.5px; color: var(--muted); }
.header-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), oklch(0.72 0.16 300));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex: none;
}
.user-name { font-size: 13.5px; font-weight: 550; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Perfil (Fase 4): a foto no topo é um botão de trocar imagem. */
.avatar-button { position: relative; border: 0; padding: 0; background: none; cursor: pointer; flex: none; border-radius: 50%; }
.avatar.has-photo { background-size: cover; background-position: center; }
.avatar-camera {
  position: absolute; right: -3px; bottom: -3px;
  width: 16px; height: 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-2, #1b1d26);
  border: 1px solid var(--border);
  color: var(--muted);
}
.avatar-camera .icon { width: 9px; height: 9px; }
.avatar-button:hover .avatar-camera { color: var(--primary-bright); }
.avatar-img { object-fit: cover; width: 32px; height: 32px; border-radius: 50%; flex: none; }
.avatar.sm, .avatar-img.sm { width: 26px; height: 26px; font-size: 11px; }
.student-main { width: min(1180px, calc(100% - 40px)); margin: 36px auto 80px; }

/* ---------- biblioteca: prateleiras estilo Hotmart ----------
   Uma fileira por CURSO, um cartão de capa em RETRATO por MÓDULO, com rolagem
   horizontal DENTRO da fileira (a página nunca rola de lado) e setas só no
   desktop. O curso não comprado usa os mesmos cartões, esmaecidos e com
   cadeado — é vitrine de venda dentro da área de membros. */
#library h1 { font-size: clamp(26px, 4vw, 34px); }
.library-sub { margin: 6px 0 22px; color: var(--muted); }
.progress-track { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), #a78bfa); }

/* Continue de onde parou */
.continue-card { margin: 0 0 30px; }
.continue-go {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px;
  text-align: left;
  border: 1px solid rgba(129, 140, 248, 0.28);
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(99, 102, 241, 0.16), rgba(139, 92, 246, 0.06)), var(--surface);
  color: var(--ink);
  transition: border-color 0.16s, transform 0.06s;
}
.continue-go:hover { border-color: var(--primary); }
.continue-go:active { transform: translateY(1px); }
.continue-thumb {
  position: relative;
  flex: 0 0 auto;
  display: block;
  width: 148px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
}
.continue-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.continue-text { display: grid; gap: 5px; flex: 1; min-width: 0; }
.continue-eyebrow { color: var(--primary-bright); font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.continue-text strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.continue-lesson { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.continue-card .progress-track { display: block; width: 100%; max-width: 420px; }
.continue-card .progress-fill { display: block; }
.continue-percent { color: var(--faint); font-size: 12px; }

/* Prateleiras */
.course-shelves { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; }
.shelf { min-width: 0; }
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.shelf-head-text { min-width: 0; }
.shelf-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.shelf-head-text h2 { margin-top: 2px; font-size: 19px; }
.shelf-meta { margin-top: 3px; color: var(--faint); font-size: 12.5px; }
.shelf-locked .shelf-eyebrow { color: var(--warn); }
.shelf-head-actions { display: flex; align-items: center; gap: 8px; }
.shelf-head-actions .btn { min-height: 44px; }
.shelf-arrows { display: none; gap: 6px; }
.shelf.has-overflow .shelf-arrows { display: flex; }
.rail-arrow {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
}
.rail-arrow:hover:not(:disabled) { background: var(--surface-2); }
.rail-arrow:disabled { opacity: 0.34; cursor: not-allowed; }
/* Sem mouse não há seta: a fileira rola no dedo. */
@media (hover: none) { .shelf-arrows { display: none !important; } }

.shelf-rail {
  display: flex;
  gap: 14px;
  padding: 2px 2px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.shelf-rail.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.shelf-empty { color: var(--faint); font-size: 13px; }

.cover-card { flex: 0 0 152px; display: grid; gap: 7px; scroll-snap-align: start; cursor: pointer; }
.cover-card .cover-art {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  transition: border-color 0.16s;
}
.cover-card .cover-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 38px;
  font-weight: 760;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.92);
}
/* Duas linhas SEMPRE reservadas: sem isso o "0/3 aulas" de um cartão de título
   curto sobe e fica desalinhado do vizinho de título longo. */
.cover-card h3 { font-size: 13.5px; font-weight: 600; line-height: 1.35; min-height: 2.7em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cover-card small { color: var(--faint); font-size: 11.5px; display: block; overflow: hidden; text-overflow: ellipsis; }
.cover-card:hover .cover-art { border-color: var(--primary); }
.cover-card:focus-visible { outline: 2px solid var(--primary-bright); outline-offset: 3px; border-radius: 12px; }
.cover-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 11, 15, 0.4); opacity: 0; transition: opacity 0.18s; }
.cover-play .icon { box-sizing: content-box; width: 18px; height: 18px; padding: 12px; margin-left: 2px; border-radius: 50%; background: rgba(255, 255, 255, 0.94); color: #14161c; }
.cover-card:hover .cover-play, .continue-go:hover .cover-play { opacity: 1; }
.cover-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0, 0, 0, 0.5); }
.cover-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #a78bfa); }
/* Bloqueado é bloqueado também no olho: capa esmaecida e cadeado por cima. */
.cover-card.locked-course .cover-art img, .cover-card.locked-module .cover-art img,
.cover-card.locked-course .cover-initials, .cover-card.locked-module .cover-initials { filter: grayscale(0.7) brightness(0.5); }
.cover-lock { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.cover-lock .icon { box-sizing: content-box; width: 18px; height: 18px; padding: 11px; border-radius: 50%; background: rgba(12, 13, 17, 0.7); border: 1px solid rgba(255, 255, 255, 0.2); }
.cover-card.locked-module small { color: var(--warn); }
.course-shelves .empty { grid-column: 1 / -1; }
.empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 56px 24px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
}
.empty strong { color: var(--ink); font-size: 15px; }

/* ---------- sala do curso ---------- */
.room-topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.room-topbar .back { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border: 1px solid var(--border-strong); border-radius: 99px; background: var(--surface); color: var(--muted); font-weight: 550; font-size: 13px; }
.room-topbar .back:hover { color: var(--ink); background: var(--surface-2); }
.room-topbar h1 { font-size: clamp(19px, 3vw, 24px); flex: 1; min-width: 200px; }
.room-progress { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.room-progress .progress-track { width: 130px; }

.room-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }

/* player e conteúdo da aula */
.lesson-stage { display: grid; gap: 20px; min-width: 0; }
/* Aulas gravadas na VERTICAL (9/16). O limite é a ALTURA da janela, não a
   largura da coluna: sem o max-width derivado da altura, um 9/16 em coluna
   larga viraria um player gigante que não cabe na tela. */
.player-shell {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 420px; /* fallback para navegador sem `svh`: a linha abaixo cai inteira */
  max-width: min(100%, calc(78svh * 9 / 16));
  margin-inline: auto;
}
.lesson-player { display: block; width: 100%; aspect-ratio: 9 / 16; background: #000; }
.player-message {
  aspect-ratio: 9 / 16;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background: linear-gradient(135deg, #14161e, #1a1626);
  color: var(--muted);
}
.lesson-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lesson-head-info { display: grid; gap: 5px; min-width: 0; }
.lesson-head-info .lesson-module { color: var(--primary-bright); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.lesson-head h2 { font-size: 21px; }
.lesson-head-info .desc { color: var(--muted); }
/* Capa do módulo no cabeçalho da aula (Onda 4 / Fase 5). O seletor com `~`
   é de propósito: sem capa, NADA muda no cabeçalho que já existia. */
.lesson-head-cover {
  flex: 0 0 auto;
  width: 64px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.lesson-head-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* A base em 55% mantém capa e texto na MESMA linha em painel estreito (o
   preview do editor tem ~440px): sem ela a miniatura quebrava sozinha para
   uma linha só dela. */
.lesson-head-cover ~ .lesson-head-info { flex: 1 1 55%; }
.complete-lesson { flex: none; }
.complete-lesson.done { background: rgba(52, 211, 153, 0.12); color: var(--success); border-color: transparent; box-shadow: none; }
.lesson-nav { display: flex; justify-content: space-between; gap: 10px; }

/* Aula de contato sem vídeo (22/10/2026): cartão no lugar do player. */
.contact-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 34px 22px;
  text-align: center;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
}
.contact-panel.is-whatsapp { border-color: rgba(37, 211, 102, 0.45); background: linear-gradient(160deg, rgba(37, 211, 102, 0.16), rgba(37, 211, 102, 0.03)), var(--surface); }
.contact-panel > .contact-wa-icon { width: 56px; height: 56px; color: #25d366; }
.contact-eyebrow { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.contact-panel.is-whatsapp .contact-eyebrow { color: #4ade80; }
.contact-panel h3 { margin: 0; font-size: 21px; line-height: 1.25; max-width: 28ch; }
.contact-text { margin: 0; color: #c9cede; max-width: 40ch; }
.contact-btn { margin-top: 6px; padding: 14px 22px; font-size: 16px; font-weight: 750; text-decoration: none !important; }
.contact-panel.is-whatsapp .contact-btn { background: #25d366; color: #052e16 !important; border: 0; box-shadow: 0 10px 26px rgba(37, 211, 102, 0.3); }
.contact-btn .contact-wa-icon { width: 20px; height: 20px; }
@media (max-width: 560px) { .contact-btn { width: 100%; } }

/* Fim do vídeo + próximo passo (22/10/2026). A oferta usa um acento quente,
   de propósito diferente do índigo da navegação: comprar não pode parecer
   "mais um botão" da sala. */
.end-screen {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 20px;
  text-align: center;
  background: rgba(8, 9, 13, 0.9);
  backdrop-filter: blur(6px);
  animation: end-in 0.25s ease-out;
}
@keyframes end-in { from { opacity: 0; } to { opacity: 1; } }
.end-screen h3 { margin: 0; font-size: 20px; line-height: 1.25; max-width: 30ch; }
.end-eyebrow { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--success); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.end-eyebrow .icon { width: 15px; height: 15px; }
.end-label { margin: 0; color: var(--muted); font-size: 13px; }
.end-sub { margin: 0; color: #c9cede; font-size: 14px; max-width: 32ch; }
.end-cover { width: 96px; height: 128px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border-strong); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); }
.end-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); font-size: 12px; }
.end-auto .end-count { background: none; min-width: 0; margin: 0; height: auto; font-weight: 700; color: var(--ink); }
.end-auto { margin: 0; color: var(--muted); font-size: 12px; }
.end-stay { margin-top: 4px; padding: 6px 10px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.end-price, .next-step-price { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 6px; }
.end-price strong { font-size: 22px; color: var(--ink); }
.end-price span, .next-step-price span { color: var(--muted); font-size: 13px; }
.end-buy, .next-step-btn, .next-step-nav {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #1a1206 !important;
  border: 0;
  font-weight: 750;
  box-shadow: 0 10px 26px rgba(249, 115, 22, 0.35);
  text-decoration: none !important;
}
.end-buy { padding: 14px 22px; font-size: 16px; animation: end-pulse 1.8s ease-in-out infinite; }
@keyframes end-pulse { 50% { transform: scale(1.04); box-shadow: 0 12px 34px rgba(249, 115, 22, 0.55); } }
@media (prefers-reduced-motion: reduce) { .end-screen, .end-buy { animation: none; } }

/* Preço âncora riscado ("de R$ 597 por R$ 197"). */
.price-from { color: #f87171; font-size: 15px; font-weight: 600; }
.price-por { color: var(--muted); font-style: normal; font-size: 13px; }

/* Faixa de oferta que sobe durante a aula. */
.flash-offer {
  position: fixed;
  z-index: 120;
  right: 16px;
  bottom: 16px;
  width: min(340px, calc(100vw - 32px));
  display: grid;
  gap: 6px;
  padding: 18px 18px 16px;
  text-align: center;
  border-radius: 16px;
  border: 2px solid #f59e0b;
  background: linear-gradient(160deg, #3b1d06, #1a1206 70%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6), 0 0 0 6px rgba(245, 158, 11, 0.15);
  animation: flash-in 0.45s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes flash-in { from { transform: translateY(120%); opacity: 0; } to { transform: none; opacity: 1; } }
.flash-offer p { margin: 0; }
.flash-close { position: absolute; top: 6px; right: 8px; width: 30px; height: 30px; border: 0; background: none; color: var(--muted); font-size: 22px; cursor: pointer; }
.flash-tag { color: #fbbf24; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.flash-title { font-weight: 700; font-size: 15px; }
.flash-price s { color: #f87171; font-size: 16px; }
.flash-price strong { font-size: 30px; color: #fff; }
.flash-timer { color: #fde68a; font-size: 13px; }
.flash-timer span { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 15px; }
.flash-go { margin-top: 4px; justify-content: center; }
@media (max-width: 560px) { .flash-offer { left: 12px; right: 12px; bottom: 12px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .flash-offer { animation: none; } }

/* Banner grande do próximo passo no topo da aula sem vídeo. */
.next-step-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 22px;
  text-align: center;
  border-radius: var(--radius);
  border: 1px solid rgba(245, 158, 11, 0.5);
  background: linear-gradient(160deg, rgba(245, 158, 11, 0.2), rgba(249, 115, 22, 0.05)), var(--surface);
}
/* Arte da oferta GRANDE (pedido do MAESTRO): ocupa a largura toda do banner,
   sem corte; a janela da aula 2 fica mais larga e mostra a arte inteira. */
.next-step-hero { padding: 14px 14px 26px; }
.next-step-hero .hero-art { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5); margin-bottom: 6px; }
.flash-offer { width: min(400px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; }
.flash-art { display: block; width: 100%; height: auto; max-height: 52vh; object-fit: contain; border-radius: 10px; }
@media (max-width: 560px) { .flash-offer { width: auto; } .flash-art { max-height: 45vh; } }
.next-step-hero h3 { margin: 0; font-size: 21px; line-height: 1.25; max-width: 30ch; }
.next-step-hero .end-eyebrow { color: #fbbf24; }
@media (max-width: 560px) { .next-step-hero .end-buy { width: 100%; } }

/* 13/11/2026 — botão da Jornada embaixo da aula: grande, largura toda,
   pulsando ("a pessoa não pode falar que não viu"). */
.hero-buy { width: min(100%, 520px); justify-content: center; padding: 20px 24px; font-size: 19px; border-radius: 14px; }
.hero-buy, .offer-modal-buy { white-space: normal; text-align: center; line-height: 1.25; max-width: 100%; box-sizing: border-box; }
.offer-modal-card { box-sizing: border-box; }
.offer-pix { margin: -4px 0 0; color: #86efac; font-size: 14px; }
.offer-pix strong { font-size: 17px; color: #bbf7d0; }

/* Pop-up do fim da aula. */
body.offer-modal-open { overflow: hidden; }
.offer-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(5, 6, 10, 0.82);
  backdrop-filter: blur(6px);
  animation: end-in 0.25s ease-out;
}
.offer-modal-card {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 20px 20px;
  text-align: center;
  border-radius: 20px;
  border: 2px solid #f59e0b;
  background: linear-gradient(160deg, #3b1d06, #14100a 70%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7), 0 0 0 8px rgba(245, 158, 11, 0.14);
  animation: flash-in 0.45s cubic-bezier(.2, 1.4, .4, 1);
}
.offer-modal-card h3 { margin: 0; font-size: 22px; line-height: 1.25; }
.offer-modal-card .end-eyebrow { color: #fbbf24; }
.offer-modal-art { display: block; width: 100%; max-height: 38vh; object-fit: contain; border-radius: 12px; }
.offer-modal-buy { width: 100%; justify-content: center; padding: 18px 20px; font-size: 18px; border-radius: 14px; margin-top: 4px; }
.offer-modal-close { position: absolute; top: 6px; right: 8px; width: 34px; height: 34px; border: 0; background: none; color: var(--muted); font-size: 26px; cursor: pointer; }
.offer-modal-next { margin-top: 2px; padding: 8px 12px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .offer-modal, .offer-modal-card { animation: none; } }

.next-step-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(249, 115, 22, 0.06)), var(--surface);
  color: var(--ink);
  text-decoration: none !important;
}
.next-step-card:hover { border-color: #f59e0b; }
.next-step-cover { flex: none; width: 54px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.next-step-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.next-step-info { display: grid; gap: 3px; flex: 1; min-width: 0; }
.next-step-eyebrow { color: #fbbf24; font-size: 11px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; }
.next-step-info strong { font-size: 15px; line-height: 1.3; }
.next-step-price { justify-content: flex-start; }
.next-step-price strong { font-size: 14px; }
.next-step-btn { flex: none; }
@media (max-width: 560px) {
  .next-step-card { flex-wrap: wrap; }
  .next-step-btn { width: 100%; justify-content: center; }
}
/* Aula de guia em PDF (05/11/2026): capa e botões no lugar do player. */
.doc-panel { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: 24px; align-items: center; padding: 22px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: linear-gradient(160deg, var(--surface-2), var(--surface)); }
.doc-cover { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45); }
.doc-info { display: grid; gap: 10px; min-width: 0; }
.doc-info h3 { margin: 0; font-size: 22px; line-height: 1.25; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.doc-btn { padding: 13px 20px; font-size: 15px; font-weight: 700; text-decoration: none !important; }
.doc-meta { margin: 0; color: var(--faint); font-size: 12px; }
.doc-parts { white-space: normal; }
.doc-parts h4 { margin: 0 0 10px; font-size: 15px; color: var(--ink); }
.doc-parts ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 22px; }
.doc-parts li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
@media (max-width: 640px) {
  .doc-panel { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 20px 16px; }
  /* No celular os botões vêm antes da capa: é o que o aluno procura. */
  .doc-info { order: -1; width: 100%; }
  .doc-cover { width: min(140px, 45%); }
  .doc-actions { justify-content: center; }
  .doc-btn { flex: 1 1 100%; justify-content: center; }
  .doc-parts ol { grid-template-columns: minmax(0, 1fr); }
}
.lesson-body-text { color: #c9cede; white-space: pre-wrap; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.lesson-extras { display: flex; flex-wrap: wrap; gap: 10px; }
.material-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 550;
  text-decoration: none !important;
}
.material-btn:hover { background: var(--surface-2); }
.material-btn .icon { color: var(--primary-bright); width: 16px; height: 16px; }

/* certificado */
.certificate-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(99, 102, 241, 0.18), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(129, 140, 248, 0.35);
}
.certificate-panel .cert-info { display: flex; align-items: center; gap: 14px; }
.certificate-panel .cert-info .icon { width: 26px; height: 26px; color: var(--primary-bright); }
.certificate-panel strong { display: block; }
.certificate-panel p { color: var(--muted); font-size: 13px; }

/* comentários */
.lesson-comments { display: grid; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.lesson-comments h3 { font-size: 16px; }
.comment-form { display: grid; gap: 10px; }
.comment-form textarea { min-height: 84px; resize: vertical; }
.comment-form .btn { justify-self: end; }
.comment-list { display: grid; gap: 10px; }
.student-comment { display: grid; gap: 10px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.student-comment header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.student-comment header strong { font-size: 13.5px; }
.student-comment header small { color: var(--faint); font-size: 12px; }
.student-comment p { color: #c9cede; white-space: pre-wrap; font-size: 13.5px; }
/* Fase 4: fio da conversa — avatar, resposta aninhada e coração do autor. */
.comment-main { display: flex; align-items: flex-start; gap: 10px; }
.comment-main-body { display: grid; gap: 5px; min-width: 0; }
.author-badge {
  padding: 1.5px 8px;
  border-radius: 99px;
  background: rgba(129, 140, 248, 0.14);
  color: var(--primary-bright);
  font-size: 11px;
  font-weight: 700;
}
.author-like { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; color: #f472b6; font-size: 12px; font-weight: 600; }
.author-like .icon { width: 13px; height: 13px; fill: currentColor; }
.comment-replies { display: grid; gap: 10px; margin-left: 20px; padding-left: 14px; border-left: 2px solid var(--border); }
.comment-reply { display: flex; align-items: flex-start; gap: 9px; }
.comment-reply-body { display: grid; gap: 4px; min-width: 0; }
.comment-reply-body p { color: #c9cede; white-space: pre-wrap; font-size: 13px; }

/* currículo lateral */
.curriculum {
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 106px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.curriculum-head { padding: 15px 17px; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.module-group { border-bottom: 1px solid var(--border); }
.module-group:last-child { border-bottom: 0; }
.module-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 17px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-weight: 600;
  font-size: 13.5px;
}
.module-toggle:hover { background: var(--surface-2); }
.module-toggle .module-meta { display: block; color: var(--faint); font-size: 11.5px; font-weight: 500; }
/* Capa do módulo no currículo (Onda 4 / Fase 5): só existe quando há imagem
   (própria do módulo ou herdada do curso). Módulo sem capa nenhuma nem cria
   este nó — a linha continua idêntica à de antes desta fase. */
.module-cover {
  flex: 0 0 auto;
  width: 52px;
  height: 34px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.module-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.module-toggle > div { flex: 1; min-width: 0; }
.module-toggle .chev { transition: transform 0.18s; color: var(--faint); }
.module-group.open .module-toggle .chev { transform: rotate(180deg); }
.module-group.locked .module-toggle { color: var(--faint); cursor: default; }
.locked-note { padding: 0 17px 13px 17px; color: var(--faint); font-size: 12.5px; }
.module-lessons { display: none; padding: 2px 8px 10px; }
.module-group.open .module-lessons { display: grid; gap: 2px; }
.lesson-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 13px;
  transition: background 0.12s, color 0.12s;
}
.lesson-button:hover { background: var(--surface-2); color: var(--ink); }
.lesson-button.active { background: rgba(99, 102, 241, 0.15); color: var(--ink); }
.lesson-button.active .lesson-state { color: var(--primary-bright); }
.lesson-state {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  color: var(--faint);
  flex: none;
}
.lesson-state .icon { width: 12px; height: 12px; }
.lesson-button.done .lesson-state { background: var(--success); border-color: var(--success); color: #0c221a; }
.lesson-button span.title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- responsivo ---------- */
@media (max-width: 960px) {
  .room-layout { grid-template-columns: 1fr; }
  .curriculum { position: static; max-height: none; order: 2; }
  .lesson-stage { order: 1; }
}
@media (max-width: 620px) {
  .student-header { padding: 0 16px; }
  .student-main { width: calc(100% - 28px); margin-top: 24px; }
  .user-name { display: none; }
  /* Prateleiras no celular: cartão mais estreito (cabem dois e meio na tela,
     o que já mostra que a fileira rola), botão da linha ocupando a largura e
     alvo de toque acima de 44px. A rolagem lateral continua sendo só a da
     fileira — a página não rola de lado. */
  .course-shelves { gap: 26px; }
  .cover-card { flex: 0 0 128px; }
  .shelf-head { align-items: flex-start; }
  .shelf-head-actions { width: 100%; }
  .shelf-head-actions .btn { flex: 1; }
  /* Nada de seta em tela estreita: a fileira se rola no dedo e o botão da
     linha usa a largura toda. */
  .shelf-arrows { display: none !important; }
  /* Miniatura deitada e BAIXA: em retrato ela comia a primeira dobra inteira. */
  .continue-go { flex-direction: column; align-items: stretch; }
  .continue-thumb { width: 100%; aspect-ratio: auto; height: 112px; }
  .room-topbar h1 { min-width: 0; width: 100%; order: 3; }
  .room-progress { width: 100%; justify-content: space-between; order: 4; }
  .room-progress .progress-track { flex: 1; width: auto; }
  .lesson-head { flex-direction: column; }
  /* Em coluna o eixo principal é a ALTURA: a base de 55% da linha acima não
     pode virar altura. Volta para auto. */
  .lesson-head-cover ~ .lesson-head-info { flex: 0 0 auto; }
  .complete-lesson { width: 100%; }
  .certificate-panel { flex-direction: column; align-items: stretch; text-align: center; }
  .certificate-panel .cert-info { flex-direction: column; }
  .login-card { padding: 28px 22px; }
}

/* Primeiro acesso por link */
.login-hint { margin: -4px 0 2px; font-size: 12px; color: var(--muted); }

/* Aula 1 → próxima aula (14/11/2026): cartão grande e calmo logo abaixo do
   vídeo, para quem quer ir direto ao "vídeo mais importante". */
.next-lesson-cta {
  display: flex; align-items: center; gap: 14px; width: 100%; margin: 14px 0 6px;
  padding: 16px 18px; border-radius: 16px; cursor: pointer; text-align: left; font: inherit; color: var(--ink);
  border: 1px solid color-mix(in oklch, var(--primary) 55%, transparent);
  background: linear-gradient(135deg, color-mix(in oklch, var(--primary) 26%, transparent), color-mix(in oklch, var(--primary) 8%, transparent));
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.18);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.next-lesson-cta:hover { transform: translateY(-1px); border-color: var(--primary-bright); }
.next-lesson-cta:focus-visible { outline: 2px solid var(--primary-bright); outline-offset: 3px; }
.next-lesson-icon {
  flex: 0 0 auto; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}
.next-lesson-icon svg { width: 22px; height: 22px; }
.next-lesson-info { flex: 1 1 auto; display: grid; gap: 3px; min-width: 0; }
.next-lesson-eyebrow { color: var(--primary-bright); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.next-lesson-info strong { font-size: 18px; line-height: 1.25; }
.next-lesson-go { flex: 0 0 auto; color: var(--primary-bright); }
.next-lesson-go svg { width: 22px; height: 22px; }

/* Barra de compra fixa no pé da tela (lessons.offer_sticky, 14/11/2026). */
.sticky-buy {
  position: fixed; z-index: 110; left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(12, 10, 8, 0.94); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.5);
}
.sticky-buy-inner { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 16px; }
.sticky-buy-price { margin: 0; display: grid; gap: 2px; flex: 0 0 auto; }
.sticky-buy-price strong { font-size: 24px; color: #fff; line-height: 1.1; }
.sticky-buy-price span { color: #86efac; font-size: 13px; }
.sticky-buy-go { flex: 1 1 auto; justify-content: center; padding: 18px 20px; font-size: 18px; border-radius: 14px; white-space: normal; text-align: center; line-height: 1.2; }
body.has-sticky-buy { padding-bottom: 120px; }
@media (max-width: 560px) {
  .sticky-buy-inner { flex-direction: column; align-items: stretch; gap: 8px; }
  .sticky-buy-price { grid-auto-flow: column; justify-content: center; align-items: baseline; gap: 8px; }
  .sticky-buy-price strong { font-size: 20px; }
  .sticky-buy-go { padding: 16px 18px; font-size: 17px; }
  body.has-sticky-buy { padding-bottom: 150px; }
}

/* Pop-up do fim da aula principal → próxima aula (14/11/2026). */
.next-lesson-modal .offer-modal-card {
  border-color: var(--primary);
  background: linear-gradient(160deg, color-mix(in oklch, var(--primary) 30%, #0d0c14), #0d0c14 70%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7), 0 0 0 8px rgba(99, 102, 241, 0.16);
}
.next-lesson-modal .offer-modal-card .end-eyebrow { color: #86efac; }
.next-lesson-modal-label { margin: 6px 0 -4px; color: var(--primary-bright); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.next-lesson-modal h3 { font-size: 26px; line-height: 1.15; }
.next-lesson-modal-go { width: 100%; justify-content: center; padding: 18px 20px; font-size: 18px; border-radius: 14px; }

/* Metodo 10K (26/11/2026): logo propria da escola dentro do quadrado da marca. */
.brand-mark:has(.brand-logo) { background: none; padding: 0; overflow: hidden; box-shadow: none; }
.brand-mark .brand-logo { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
