/* talk2go — identidade profissional (direção Studio): papel claro, tinta marinho, laranja só na marca e na ação. Manrope nos títulos, DM Sans no texto. */
/* Manrope e DM Sans (licença OFL, ver fonts/OFL-*.txt) ficam hospedadas aqui: o app não depende do Google Fonts e funciona sem internet. */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/manrope-400.ttf") format("truetype"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/manrope-600.ttf") format("truetype"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/manrope-700.ttf") format("truetype"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/manrope-800.ttf") format("truetype"); }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/dm-sans-400.ttf") format("truetype"); }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/dm-sans-500.ttf") format("truetype"); }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/dm-sans-600.ttf") format("truetype"); }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/dm-sans-700.ttf") format("truetype"); }

:root {
  --ink: #2b2a4c;
  --ink-soft: #5d5c78;
  --paper: #f6f4ef;     /* papel: fundo do app */
  --paper-2: #ebe8e0;   /* papel mais escuro: realce, trilhas, hover */
  --cream: #faf8f4;
  --white: #ffffff;
  --line: #e2ded5;
  --gold: #ff7a2f;      /* laranja da marca (nome antigo mantido: o JS usa var(--gold-2), var(--rose)...): só marca e ação principal */
  --gold-2: #b84a0e;    /* laranja escuro: texto sobre fundo claro (contraste AA) */
  --navy: #2b2a4c;
  --navy-2: #211f3b;
  --lav: #eeece6;       /* neutro suave: botões e etiquetas secundários */
  --lav-2: #2b2a4c;     /* destaque de texto/bordas: o marinho da marca */
  --sun: #ffc940;
  --sage: #276b58;      /* verde */
  --rose: #c2374b;      /* erro */
  --ok: #17835b;
  --warn: #a86b00;
  --azul: #345b8c;
  --violeta: #66528e;
  --shadow: 0 8px 28px rgba(43, 42, 76, 0.05);
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
  --r-btn: 10px;
  --serif: "Manrope", "Segoe UI", system-ui, sans-serif;  /* títulos */
  --sans: "DM Sans", "Segoe UI", system-ui, sans-serif;   /* texto */
  --tab-h: 68px;
  --glow: rgba(255, 122, 47, 0.28);
  --brand-grad: #2b2a4c;
  --hero-grad: #2b2a4c;
  --hero-shadow: rgba(43, 42, 76, 0.18);
  --bar-grad: #ff7a2f;
}

/* Três padrões de cores, escolhidos em "Minha conta". O padrão é o Sol (as variáveis acima). */
html[data-theme="mar"] {
  --paper: #eaf6f7; --paper-2: #d5eef0; --cream: #f5fbfc; --line: #cfe6e8;
  --gold: #34c3c9; --gold-2: #0b6f78;
  --lav: #e2ecff; --lav-2: #2f56d0; --sun: #ffd166;
  --glow: rgba(52, 195, 201, 0.35);
  --brand-grad: linear-gradient(155deg, #8fe6e6 0%, #6cc4f2 60%, #9aa8f7 130%);
  --hero-grad: linear-gradient(135deg, #0b6f78 0%, #16909b 100%);
  --hero-shadow: rgba(11, 111, 120, 0.28);
  --bar-grad: linear-gradient(90deg, #7fe0e0, #34c3c9);
}
html[data-theme="uva"] {
  --paper: #f6f0ff; --paper-2: #eadfff; --cream: #fbf8ff; --line: #e5daf5;
  --gold: #b08cff; --gold-2: #6b3fd0;
  --lav: #ffe3f0; --lav-2: #b02470; --sun: #ffc940;
  --glow: rgba(176, 140, 255, 0.4);
  --brand-grad: linear-gradient(155deg, #dccbff 0%, #f3aedd 60%, #ffbf98 130%);
  --hero-grad: linear-gradient(135deg, #6b3fd0 0%, #a25bd6 100%);
  --hero-shadow: rgba(107, 63, 208, 0.28);
  --bar-grad: linear-gradient(90deg, #d0b8ff, #b08cff);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, h4 { line-height: 1.2; }
h3 { font-size: 19px; font-weight: 800; margin: 0 0 8px; }
a { color: var(--lav-2); }
button, input, select, textarea { font-family: inherit; }
:focus-visible { outline: 3px solid var(--lav-2); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.app { display: none; min-height: 100vh; }
.app.visible { display: block; min-height: 100vh; }
.hidden { display: none !important; }

/* ---------- Botões ---------- */
.btn {
  border: 0;
  cursor: pointer;
  min-height: 46px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--lav);
  color: var(--lav-2);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover { filter: brightness(0.96); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.gold { background: var(--gold); color: var(--ink); box-shadow: 0 6px 16px var(--glow); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { background: var(--cream); box-shadow: inset 0 0 0 2px var(--paper-2); }
.btn.small { min-height: 36px; padding: 5px 16px; font-size: 14px; white-space: nowrap; }

/* ---------- Campos ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea,
.lib-search, .qbox input:not([type=radio]):not([type=checkbox]):not(.gap-input), .qbox select, .qbox textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  background: var(--white);
  padding: 12px 16px;
  min-height: 48px;
  font-size: 16px; /* 16px evita o zoom automático do iPhone */
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus, .lib-search:focus,
.qbox input:focus, .qbox select:focus, .qbox textarea:focus { border-color: var(--lav-2); outline: 0; }
.lib-search { flex: 1; min-width: 180px; width: auto; }

/* Resposta curta digitada no meio da frase, no lugar de "___" (em vez de um campo separado). */
.qbox input.gap-input, .lesson-block input.gap-input {
  display: inline-block;
  width: auto;
  min-height: 0;
  padding: 0 4px;
  margin: 0 2px;
  border: 0;
  border-bottom: 2px solid var(--line);
  border-radius: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: center;
}
.lesson-block input.gap-input.ok { border-color: #2e9e5b; }
.lesson-block input.gap-input.bad { border-color: #d64545; }
.qbox input.gap-input:focus, .lesson-block input.gap-input:focus { border-color: var(--lav-2); outline: 0; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 0.9fr; background: var(--cream); }
.login-brand {
  position: relative;
  overflow: hidden;
  background: var(--brand-grad);
  color: var(--ink);
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-brand::before, .login-brand::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.login-brand::before { width: 420px; height: 420px; right: -140px; bottom: -120px; }
.login-brand::after { width: 200px; height: 200px; left: -60px; top: 42%; background: rgba(255, 201, 64, 0.35); }
.login-brand > * { position: relative; z-index: 1; }
.login-brand h1 { font-weight: 800; font-size: 52px; line-height: 1.05; margin: 8px 0 16px; }
.logo { display: inline-flex; align-items: center; margin-bottom: 28px; }
.logo img { height: 72px; width: auto; object-fit: contain; }
.login-brand p.lead { max-width: 420px; font-size: 18px; line-height: 1.5; opacity: 0.95; }
.login-panel { padding: 56px; display: flex; flex-direction: column; justify-content: center; max-width: 560px; width: 100%; margin: 0 auto; }
.login-panel h2 { font-size: 32px; font-weight: 800; margin: 0 0 20px; }
.login-panel .hint { color: var(--ink-soft); }

/* ---------- Estrutura: menu lateral, conteúdo e barra de baixo ---------- */
.sidebar {
  background: var(--white);
  color: var(--ink);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 264px;
  z-index: 8;
  overflow: auto;
  box-shadow: 4px 0 24px rgba(43, 42, 76, 0.05);
}
.brand-mark { margin: 0 8px; display: flex; align-items: center; }
.brand-mark img { height: 40px; width: auto; object-fit: contain; }
nav { margin-top: 28px; display: grid; gap: 4px; }
nav button {
  display: flex; align-items: center; gap: 12px;
  text-align: left;
  background: transparent;
  color: var(--ink-soft);
  border: 0;
  border-radius: 14px;
  padding: 11px 14px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
nav button:hover { background: var(--cream); color: var(--ink); }
nav button.active { background: var(--paper-2); color: var(--gold-2); }
.ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sidebar .who { margin-top: auto; font-size: 14px; color: var(--ink-soft); padding: 12px 14px; background: var(--cream); border-radius: var(--r-md); }
.sidebar .who b { color: var(--ink); }
.sidebar .btn { width: 100%; margin-top: 8px; }
.main { padding: 36px 44px 72px; margin-left: 264px; max-width: 1180px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 26px; gap: 16px; flex-wrap: wrap; }
.topbar h2 { font-size: 32px; font-weight: 800; margin: 0; }
.topbar p { margin: 6px 0 0; color: var(--ink-soft); }

/* Trilha no topo (app.js renderCrumbs): "‹" volta; sem espaço, os degraus do meio viram "…" (o JS mede com .fit). */
.crumbs { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; min-width: 0; }
.crumbs:empty { display: none; }
.crumb-back { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); font-size: 24px; font-weight: 800; line-height: 1; padding: 0 0 3px; cursor: pointer; }
.crumb-back:active { transform: scale(.94); }
.crumbs ol { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; min-width: 0; overflow: hidden; font-size: 14px; font-weight: 700; white-space: nowrap; }
.crumbs li { display: flex; align-items: center; min-width: 0; flex: 0 1 auto; }
.crumbs li[hidden] { display: none; }
.crumbs li.more { flex: none; }
.crumbs ol.fit li { flex-shrink: 0; }
.crumbs li + li::before { content: "›"; color: var(--ink-soft); padding: 0 6px; flex: none; font-size: 24px; font-weight: 800; line-height: 1; }
.crumbs li > * { display: block; overflow: hidden; text-overflow: ellipsis; min-width: 1.6em; }
.crumbs li button { border: 0; background: none; padding: 6px 2px; color: var(--ink-soft); font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.crumbs li button:hover { color: var(--ink); }
.crumbs li[aria-current] { flex-shrink: 0; max-width: 60%; }
.crumbs li[aria-current] span { color: var(--ink); }

.tabbar { display: none; }
.sheet-bg { position: fixed; inset: 0; background: rgba(43, 42, 76, .45); z-index: 25; display: flex; align-items: flex-end; }
.sheet { background: var(--white); width: 100%; border-radius: 28px 28px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); max-height: 82vh; overflow: auto; }
.sheet .grip { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 14px; }
.sheet-who { padding: 0 8px 12px; color: var(--ink-soft); }
.sheet-who b { color: var(--ink); font-size: 18px; }
.sheet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sheet-grid button { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 14px; border: 0; border-radius: var(--r-md); background: var(--cream); color: var(--ink); font-size: 15px; font-weight: 700; text-align: left; cursor: pointer; }
.sheet-grid button.active { background: var(--paper-2); color: var(--gold-2); }
.sheet .row { margin-top: 12px; }
.sheet .row .btn { flex: 1; }

/* ---------- Componentes ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 16px; }
.cards { display: grid; gap: 12px; }
.card { background: var(--white); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }
.lesson-block { border: 2px solid var(--line); }
.stat { font-size: 34px; font-weight: 800; margin: 0; }
.muted { color: var(--ink-soft); font-size: 14px; }
.tag {
  display: inline-flex;
  align-items: center;
  align-self: center;
  line-height: 1.2;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--ink-soft);
  background: var(--paper);
}
.tag.ok { color: var(--ok); background: #e2f6ec; }
.tag.warn { color: var(--warn); background: #fff1cc; }
.tag.late { color: var(--rose); background: #fde5e8; }
.tag.gold { color: var(--gold-2); background: var(--paper-2); }

/* Contador sobre uma pílula (ex.: "Agora" na home do aluno: To-do / Desafio / Recados) */
.pill-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--white);
}

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 13px; font-weight: 800; color: var(--ink-soft); padding: 8px 10px; border-bottom: 2px solid var(--line); }
td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }

.lesson-now {
  position: relative;
  overflow: hidden;
  background: var(--hero-grad);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  box-shadow: 0 12px 32px var(--hero-shadow);
}
.lesson-now::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); right: -60px; top: -80px; }
.lesson-now > * { position: relative; z-index: 1; }
.lesson-now h3 { font-size: 26px; font-weight: 800; margin: 0 0 6px; }
.lesson-now p { margin: 0; opacity: 0.92; }

.list-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.stack { display: grid; gap: 14px; align-content: start; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.click-row { cursor: pointer; }
.click-row:hover { background: var(--cream); }

.exercise q { font-size: 20px; font-weight: 800; display: block; margin: 8px 0 16px; }
.feedback { background: var(--lav); border-radius: var(--r-md); padding: 14px 16px; margin-top: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--lav); color: var(--lav-2); display: grid; place-items: center; font-size: 14px; font-weight: 800; }
.modal-bg { position: fixed; inset: 0; background: rgba(43, 42, 76, .45); display: grid; place-items: center; z-index: 20; padding: 20px; }
.modal { max-width: 520px; width: 100%; max-height: 90vh; overflow: auto; }

.modal-h { display: flex; align-items: center; gap: 8px; }
.modal-h h2, .modal-h h3 { margin: 0; }
.help-btn {
  flex: none; width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--paper-2); color: var(--gold-2); font-weight: 800; font-size: 13px; line-height: 1;
  display: grid; place-items: center; padding: 0;
}
.crumbs .help-btn { margin-left: auto; }
.lesson-nav { flex: none; border: 0; background: none; color: var(--ink); font-size: 30px; font-weight: 800; line-height: 1; padding: 0 6px 4px; cursor: pointer; }
.lesson-nav:disabled { opacity: .25; cursor: default; }
.help-panel { background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; margin: 4px 0 16px; }
.help-panel dt { font-weight: 700; color: var(--ink); margin-top: 8px; }
.help-panel dt:first-child { margin-top: 10px; }
.help-panel dd { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; }
.help-panel ul { margin: 8px 0 0; padding-left: 20px; color: var(--ink-soft); font-size: 14px; }
.help-panel li { margin-top: 4px; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 700; max-width: calc(100vw - 32px); text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60;
}
.toast.show { opacity: 1; }

.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-col { background: var(--white); border-radius: var(--r-md); min-height: 120px; padding: 10px; box-shadow: var(--shadow); }
.cal-col.today, .cal-cell.today { outline: 3px solid var(--gold); }
.cal-pill { display: block; width: 100%; text-align: left; background: var(--paper-2); border: 0; border-radius: 10px; padding: 8px 10px; margin-top: 6px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--ink); }
.cal-month-head, .cal-month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-month-head { margin-bottom: 6px; text-align: center; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.cal-cell { background: var(--white); border-radius: 12px; min-height: 72px; padding: 6px; font-size: 12px; }
.cal-dot { background: var(--paper-2); border-radius: 6px; margin-top: 4px; padding: 2px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.type-block h4 { margin: 0 0 8px; font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.type-block { margin-top: 20px; }
.qedit { border: 2px solid rgba(43, 42, 76, 0.22); border-radius: var(--r-md); padding: 14px; margin-bottom: 12px; background: var(--cream); }
.qedit > *:last-child { margin-bottom: 0; }
/* Campos opcionais (imagem, dica, explicação, áudio): escondidos por padrão, abertos por botão no rodapé do bloco. */
.opt-field { border: 1px dashed var(--line); border-radius: var(--r-md); padding: 10px 12px; background: var(--white); }
.opt-foot { margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--line); }
.lesson-video { position: relative; padding-top: 56.25%; border-radius: var(--r-md); overflow: hidden; }
.lesson-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.w-wrong { background: #fde5e8; border-bottom: 2px solid var(--rose); }
.w-missing { background: #fff1cc; border-bottom: 2px dotted var(--warn); }
.pulse { animation: mte-pulse 1.6s ease-in-out infinite; }
@keyframes mte-pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--glow); } 50% { box-shadow: 0 0 0 10px transparent; } }

/* ---------- Perguntas (aula, formulário e modo uma-por-vez) ---------- */
.qbox { border-top: 2px solid var(--line); padding-top: 14px; margin-top: 14px; }
.qbox label {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  margin: 8px 0;
  padding: 14px 16px;
  min-height: 54px;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  background: var(--white);
  cursor: pointer;
  font-weight: 700;
}
.qbox label:hover { border-color: var(--paper-2); background: var(--cream); }
.qbox label:has(input:checked) { border-color: var(--gold); background: var(--paper-2); }
.qbox label input { width: 22px; height: 22px; margin: 0; accent-color: var(--gold); flex: none; }
.qbox .row select { width: auto; flex: 1; }
.order-out { min-height: 60px; border: 2px dashed var(--line); border-radius: var(--r-md); padding: 8px; margin-bottom: 10px; }
.order button { border-radius: 999px; min-height: 44px; font-size: 16px; }

/* Interesses do aluno (chips): toque alterna gosto → evitar → limpar */
.interests .chip { border: 2px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink); padding: 8px 16px; font-size: 15px; font-weight: 700; cursor: pointer; min-height: 40px; }
.interests .chip[data-pref="gosto"] { background: #e2f6ec; border-color: #9fdcbf; color: var(--ok); }
.interests .chip[data-pref="gosto"]::before { content: "✓ "; }
.interests .chip[data-pref="evitar"] { background: #fde5e8; border-color: #f3b3bd; color: var(--rose); text-decoration: line-through; }
.interests .chip[data-pref="evitar"]::before { content: "✕ "; }
.interests input[data-intnew] { padding: 8px 14px; border: 2px solid var(--line); border-radius: 999px; background: var(--white); font-size: 16px; }

/* Níveis do aluno: cabeçalhos que abrem e fecham */
.fold { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 14px 0; min-height: 48px; background: transparent; border: 0; border-bottom: 2px solid var(--line); color: var(--ink); font-size: 16px; font-weight: 700; text-align: left; cursor: pointer; }
.fold:hover { color: var(--gold-2); }
.fold-arrow { font-size: 24px; line-height: 1; vertical-align: -2px; margin-left: 2px; }
.fold.big { font-size: 22px; font-weight: 800; }

.menu-pop { position: absolute; right: 0; top: 100%; margin-top: 6px; background: var(--white); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 8px; display: flex; flex-direction: column; gap: 6px; z-index: 20; min-width: 170px; }
.menu-pop .btn { width: 100%; }

/* Livros: leitor com áudio */
.book-par { min-width: 0; } /* sem isso a linha recolhida (sem quebra) alarga a página */
.book-par.done { border-left: 5px solid var(--ok); }
.book-par.playing { outline: 3px solid var(--gold); background: var(--paper-2); }
.book-play { flex: none; width: 48px; height: 48px; min-height: 0; padding: 0; border-radius: 50%; font-size: 20px; line-height: 1; background: var(--gold); color: var(--ink); box-shadow: 0 4px 12px var(--glow); }
.book-play:disabled { background: var(--paper-2); box-shadow: none; }
.book-text { margin: 0; font-size: 19px; line-height: 1.7; }
.book-foot { justify-content: space-between; flex-wrap: nowrap; margin-top: 12px; }
.book-tools { margin-top: 12px; padding-top: 12px; border-top: 2px dashed var(--line); }
.bw.lit { background: var(--glow); box-shadow: 0 0 0 2px var(--glow); border-radius: 4px; }
.book-speedctl { display: flex; align-items: center; gap: 4px; flex-shrink: 0; margin-left: auto; }
.book-speedctl .btn { min-width: 44px; min-height: 44px; padding: 0; font-size: 22px; line-height: 1; }
.book-speedctl span { min-width: 54px; text-align: center; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--ink-soft); }

/* ---------- Modo uma pergunta por vez (exercícios e formulários) ---------- */
.ex-start { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: var(--cream); border-radius: var(--r-md); padding: 14px 16px; }
.player { position: fixed; inset: 0; z-index: 40; background: var(--cream); display: flex; flex-direction: column; }
.player-top { display: flex; align-items: center; gap: 14px; padding: calc(14px + env(safe-area-inset-top)) 18px 10px; max-width: 700px; width: 100%; margin: 0 auto; }
.player-x { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--white); color: var(--ink-soft); font-size: 20px; cursor: pointer; box-shadow: var(--shadow); }
.pbar { flex: 1; height: 14px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 999px; background: var(--bar-grad); transition: width .4s ease; }
.pcount { flex: none; font-weight: 800; color: var(--ink-soft); font-size: 14px; min-width: 42px; text-align: right; }
.player-stepnav { display: flex; justify-content: space-between; max-width: 700px; width: 100%; margin: 0 auto; padding: 0 18px 8px; gap: 10px; }
.player-stepnav .btn { min-height: 38px; padding: 6px 14px; font-size: 13px; }
.player-media { flex: none; width: 100%; max-width: 640px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) 20px 0; }
.player-media .lesson-video { max-width: 300px; margin: 0 auto; }
#player-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.player-body { flex: 1; overflow: auto; padding: 8px 20px 24px; }
.player-inner { max-width: 640px; margin: 0 auto; }
.player .qbox { border: 0; padding: 0; margin: 0; }
.player .qbox > .muted:first-child { font-weight: 800; font-size: 13px; color: var(--gold-2); text-transform: uppercase; letter-spacing: .06em; }
.player .qbox > p { font-size: 24px; font-weight: 800; line-height: 1.3; margin: 8px 0 18px; }
.player .qbox [data-lessonsend] { display: none; }
.player .qbox textarea { min-height: 160px; }
.player-foot { background: var(--white); box-shadow: 0 -6px 24px rgba(43, 42, 76, 0.07); padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); }
.player-foot-in { max-width: 640px; margin: 0 auto; display: flex; gap: 12px; align-items: center; }
.player-foot .btn.gold { flex: 1; min-height: 54px; font-size: 17px; }
.player-foot .btn.ghost { min-height: 54px; }
.pfb { border-radius: var(--r-md); padding: 16px 18px; margin-top: 16px; font-weight: 700; }
.pfb b { display: block; font-size: 19px; margin-bottom: 2px; }
.pfb.ok { background: #e2f6ec; color: #0f6a49; }
.pfb.no { background: #fde5e8; color: #a52d42; }
.pfb span { font-weight: 600; }
.player-done { text-align: center; padding-top: 24px; }
.score-ring { width: 150px; height: 150px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; font-size: 40px; font-weight: 800; color: var(--ink); background: conic-gradient(var(--gold) calc(var(--p) * 1%), var(--paper-2) 0); position: relative; }
.score-ring::before { content: ""; position: absolute; inset: 14px; background: var(--cream); border-radius: 50%; }
.score-ring span { position: relative; }
.player-done h2 { font-size: 28px; font-weight: 800; margin: 0 0 6px; }
.player-list { text-align: left; margin: 22px 0 0; display: grid; gap: 8px; }
.player-list div { display: flex; gap: 10px; align-items: flex-start; background: var(--white); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow); font-weight: 600; }
.player-list b { flex: none; width: 24px; }
.player-list .yes b { color: var(--ok); }
.player-list .miss b { color: var(--rose); }

/* ---------- Celular e tablet ---------- */
@media (max-width: 900px) {
  .login-wrap, .grid-3, .grid-2, .lesson-now { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 18px 16px calc(var(--tab-h) + 32px + env(safe-area-inset-bottom)); margin-left: 0; }
  .topbar h2 { font-size: 26px; }
  .card { padding: 18px; border-radius: 20px; overflow-x: auto; }
  .lesson-now { padding: 22px; }
  .lesson-now .btn { width: 100%; }
  .login-brand { padding: 28px 24px 56px; }
  .login-brand h1 { font-size: 32px; margin-bottom: 4px; }
  .login-brand p.lead { display: none; }
  .logo { margin-bottom: 14px; }
  .login-panel { padding: 28px 22px 40px; margin-top: -28px; background: var(--cream); border-radius: 28px 28px 0 0; position: relative; max-width: none; }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 9;
    height: calc(var(--tab-h) + env(safe-area-inset-bottom));
    padding: 6px 4px env(safe-area-inset-bottom);
    background: var(--white);
    box-shadow: 0 -4px 22px rgba(43, 42, 76, 0.09);
  }
  .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: transparent; color: var(--ink-soft); font-size: 11px; font-weight: 800; border-radius: 14px; cursor: pointer; padding: 0; }
  .tabbar button .ico { width: 26px; height: 26px; }
  .tabbar button.active { color: var(--gold-2); }
  .tabbar button.active .ico { stroke: var(--gold-2); }
  .modal-bg { align-items: end; padding: 0; }
  .modal { max-width: none; border-radius: 28px 28px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom)); }
  .cal-week { grid-template-columns: 1fr; }
  .cal-col { min-height: 0; }
  .cal-cell { min-height: 52px; padding: 3px; }
  .row .btn { flex: 0 1 auto; }
  .sheet-grid { grid-template-columns: 1fr 1fr; }
  table { font-size: 14px; }
}

/* Escala 1–5: cinco botões lado a lado */
.qbox .row label { flex: 1; min-width: 56px; justify-content: center; margin: 4px 0; }

/* Selects soltos (fora de formulários) */
select { border: 2px solid var(--line); border-radius: 12px; background: var(--white); padding: 8px 12px; color: var(--ink); font-size: 15px; }

/* ---------- Escolha de cores (Minha conta) ---------- */
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.theme-opt { display: grid; gap: 10px; justify-items: center; padding: 14px 8px; border: 3px solid var(--line); border-radius: var(--r-md); background: var(--white); cursor: pointer; font-size: 15px; font-weight: 800; color: var(--ink); }
.theme-opt:hover { border-color: var(--paper-2); }
.theme-opt.on { border-color: var(--gold); background: var(--paper-2); }
.theme-opt .sw { display: flex; }
.theme-opt .sw i { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--white); margin-left: -8px; }
.theme-opt .sw i:first-child { margin-left: 0; }

/* ---------- Escolher arquivo: área grande que também aceita arrastar e soltar ---------- */
.filepick { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 2px dashed var(--line); border-radius: var(--r-md); background: var(--cream); cursor: pointer; transition: border-color .12s, background .12s; }
.filepick:hover, .filepick.drag { border-color: var(--gold); background: var(--paper-2); }
.filepick.has { border-style: solid; border-color: var(--gold); background: var(--paper-2); }
.filepick:has(input:focus-visible) { outline: 3px solid var(--lav-2); outline-offset: 2px; }
.filepick > input[type=file], .qbox .filepick > input[type=file], .field .filepick > input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.fp-ico { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; }
.fp-ico .ico { width: 22px; height: 22px; }
.fp-txt { display: grid; min-width: 0; }
.fp-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-txt small { color: var(--ink-soft); font-size: 13px; }

/* Tarefas dos materiais, passo a passo */
.work-step { padding-top: 8px; }
.work-kicker { font-weight: 800; font-size: 13px; color: var(--gold-2); text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.work-prompt { font-size: 24px; font-weight: 800; line-height: 1.3; margin: 8px 0 18px; }
.work-step textarea, .work-step input:not([type=file]) { width: 100%; border: 2px solid var(--line); border-radius: var(--r-md); background: var(--white); padding: 12px 16px; min-height: 48px; font-size: 16px; color: var(--ink); }
.work-step textarea { min-height: 170px; }
.work-step textarea:focus, .work-step input:focus { border-color: var(--lav-2); outline: 0; }
.pfb.tip { background: var(--lav); color: var(--lav-2); }
.player-list small { font-weight: 600; }

/* Microfone nos campos de recado e teoria */
.voice { margin-top: 8px; }
.voice audio { margin-top: 6px; }
.voice .muted { margin: 6px 0 0; }

/* Cartões de números (frequência, tarefas, nível) lado a lado no celular */
@media (max-width: 900px) {
  .grid-3:has(.stat) { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .grid-3:has(.stat) .card { padding: 14px; }
  .grid-3:has(.stat) .stat { font-size: 26px; }
}

/* Caixas de texto soltas (fora de .field) */
textarea { width: 100%; border: 2px solid var(--line); border-radius: var(--r-md); background: var(--white); padding: 10px 14px; color: var(--ink); font-size: 16px; }
textarea:focus { border-color: var(--lav-2); outline: 0; }

/* Reabrindo a sessão (app instalado): não mostra o login por um instante */
html.restoring #login { visibility: hidden; }
/* Convite para instalar o app */
.nudge { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; background: var(--paper-2); box-shadow: none; }

/* Botão com texto longo (ex.: título de aula): quebra em linhas em vez de estourar o cartão */
.btn.wrap { white-space: normal; max-width: 100%; text-align: center; line-height: 1.25; padding-top: 8px; padding-bottom: 8px; }

/* Leitor de livros: navegação entre parágrafos */
.book-nav { display: flex; gap: 10px; margin-top: 14px; }
.book-nav .btn { flex: 1; min-height: 52px; }

/* Resumo da leitura dos alunos (professora) */
.sum-bar { height: 10px; border-radius: 99px; background: var(--paper-2); overflow: hidden; margin-top: 12px; }
.sum-bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.sum-par { padding: 12px 14px; border-radius: 14px; background: var(--cream); }
.sum-par.done { border-left: 4px solid var(--ok); }

/* ---------- Gramática: slides para projetar (padrão talk2go; js/grammar.js). Tudo em cqw: o slide escala com a largura. ---------- */
.gov { position: fixed; inset: 0; z-index: 1000; background: #09090b; display: flex; flex-direction: column; align-items: center; }
.gov-stage { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; padding: 8px; }
.gov-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; color: #fff; height: 56px; }
.gov-bar .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.gs { --gs-noun: var(--lav-2); --gs-verb: var(--sage); --gs-adj: var(--gold-2); --gs-pron: #2f6fd0; --gs-art: #b02470; --gs-prep: var(--rose); --gs-neg: #c0392b; --gs-place: #0b8f9a; --gs-adv: #8a5a00;
  position: relative; container-type: inline-size; width: min(100%, calc((100vh - 96px) * 4 / 3)); aspect-ratio: 4 / 3; background: #fff; color: #09090b; --ink: #09090b; --ink-soft: #71717a; --line: #e4e4e7; --paper-2: #f4f4f5; --lav: #f4f4f5; --lav-2: #18181b; --cream: #fff; letter-spacing: -.011em;
  border-radius: 1.2cqw; overflow: hidden; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); font-family: var(--sans); font-weight: 500; user-select: none; cursor: pointer; }
.gs { font-family: "Inter", "Segoe UI", system-ui, sans-serif; } /* estilo shadcn/ui (zinc): Inter, bordas finas, cartões e badges */
.gs-bare { height: 100%; position: relative; isolation: isolate; }
/* Imagem de fundo do slide: nítida, sem desfoque; o véu branco só atrás de cada bloco de texto, para a imagem aparecer inteira ao lado. */
.gs-bgimg { position: absolute; z-index: -1; inset: -3cqw -4cqw -4cqw; background: #fff center / contain no-repeat; } /* a imagem cabe inteira (4:3 preenche; 16:9 antiga ganha faixa) */
/* Sem cabeçalho (.gs-bare: padding 3 / 4 / 4 em slide de 100 x 75cqw) o fundo é o slide todo, o mesmo inset acima. A imagem que não é 4:3 ganha faixas brancas (--bar,
   por --ar = largura/altura da imagem, medido em gramFit): o conteúdo do .has-bg fica dentro da imagem, com folga de 1.5cqw, e não sobre a faixa. */
.has-bg { --bar: max(0cqw, calc((75cqw - 100cqw / var(--ar, 1.3333)) / 2)); padding: max(0cqw, calc(var(--bar) - 1.5cqw)) 0 max(0cqw, calc(var(--bar) - 2.5cqw)); }
/* Com ilustração de fundo, a barra do áudio vai para baixo: os rostos ficam na parte de cima da imagem. */
.has-bg > audio, .has-bg > .aud { order: 99; flex: none; height: clamp(32px, 7cqw, 48px); margin: auto 0 0 !important; }
.has-bg > .gs-pbody { flex: 1 0 auto; } /* o texto da pergunta não é espremido por baixo do player: se não couber, a letra encolhe (gramFit) */
.gs-bgimg.swap { animation: gsSwap .8s ease; }
@keyframes gsSwap { from { opacity: .2; } to { opacity: 1; } }
.has-bg .gs-instr, .has-bg .gs-ins, .has-bg .gs-formula, .has-bg .gs-pleft, .has-bg .gs-ref, .has-bg .gs-media > .gs-note { background: rgba(255, 255, 255, .88); border-radius: 1.4cqw; padding: 1.2cqw 2cqw; width: fit-content; max-width: 62cqw; }
.has-bg .gs-pleft { flex: none; padding: 2.2cqw 2.6cqw; }
@media (max-width: 700px) { .has-bg .gs-instr, .has-bg .gs-ins, .has-bg .gs-formula, .has-bg .gs-pleft, .has-bg .gs-ref, .has-bg .gs-media > .gs-note { max-width: 100%; } }
.gs:has(.gs-bare) .gs-head { display: none; }
.gs:has(.gs-bare) .gs-body { top: 0; padding: 3cqw 4cqw 4cqw; }
.gs-head { position: absolute; left: 0; right: 0; top: 0; height: 8.5cqw; background: #fff; border-bottom: .15cqw solid #e4e4e7; display: flex; align-items: center; gap: 1.8cqw; padding: 0 3cqw; color: #09090b; }
.gs-logo { height: 5cqw; display: grid; place-items: center; flex: none; }
.gs-logo img { width: auto; height: 5cqw; object-fit: contain; }
.gs-ht { flex: 1; font-size: 2.6cqw; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.gs-cc { flex: none; border: .15cqw solid #e4e4e7; background: #fff; color: #09090b; border-radius: .8cqw; font: 500 1.4cqw/1.2 "Inter", var(--sans); padding: .8cqw 1.6cqw; cursor: pointer; letter-spacing: 0; box-shadow: 0 .1cqw .2cqw rgba(0, 0, 0, .06); }
.gs-num { position: absolute; right: 2.4cqw; bottom: 1.4cqw; font-size: 1.6cqw; font-weight: 500; color: #a1a1aa; font-variant-numeric: tabular-nums; }
.gs-body { position: absolute; left: 0; right: 0; top: 8.5cqw; bottom: 0; padding: 3cqw 5cqw 5cqw; }
.gs [class^="gr-"] { font-weight: 700; }
.gr-noun { color: var(--gs-noun); } .gr-verb { color: var(--gs-verb); } .gr-adj { color: var(--gs-adj); } .gr-pron { color: var(--gs-pron); }
.gr-art { color: var(--gs-art); } .gr-prep { color: var(--gs-prep); } .gr-neg { color: var(--gs-neg); } .gr-place { color: var(--gs-place); } .gr-adv { color: var(--gs-adv); }
/* abertura */
.gs-open { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 3cqw; }
.gs-sent { font-size: 7cqw; line-height: 1.2; font-weight: 600; }
/* gráfico */
.gs-chart { position: relative; height: 100%; display: flex; flex-direction: column; gap: calc(2.2cqw * var(--f, 1)); }
.gs-title { font-size: calc(2.2cqw * var(--f, 1)); color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.gs-formula { font-size: calc(5.2cqw * var(--f, 1)); font-weight: 700; text-align: center; line-height: 1.15; }
.gs-exs { display: flex; flex-direction: column; gap: 1.3cqw; align-items: center; }
.gs-ex { font-size: calc(4.4cqw * var(--f, 1)); font-weight: 600; line-height: 1.2; }
.gs-lab { font-weight: 700; color: var(--ink-soft); margin-right: 1.4cqw; }
.gs-box { margin-top: auto; background: #fafafa; border: .15cqw solid #e4e4e7; border-radius: 1.2cqw; padding: calc(2cqw * var(--f, 1)) 3cqw; display: grid; gap: calc(.8cqw * var(--f, 1)); font-size: calc(3.4cqw * var(--f, 1)); box-shadow: 0 .1cqw .3cqw rgba(0, 0, 0, .06); }
.gs-brow { display: grid; grid-template-columns: minmax(0, 1fr) 3cqw minmax(0, 1fr); align-items: baseline; gap: 1cqw; }
.gs-brow > span:first-child { text-align: right; font-style: italic; font-weight: 700; }
.gs-brow i { font-style: normal; text-align: center; color: var(--ink-soft); }
.gs-note { font-size: calc(3cqw * var(--f, 1)); color: var(--ink-soft); text-align: center; font-weight: 700; }
.gs-chart:has(.gs-box) .gs-note { margin-top: -.6cqw; }
/* arte (emoji hoje; imageUrl quando houver imagem) */
.gs-art.big { font-size: 20cqw; line-height: 1; }
.gs-art.corner { position: absolute; right: 0; top: -1cqw; font-size: 9cqw; line-height: 1; opacity: .95; }
.gs-img.big { width: 100%; max-width: 32cqw; aspect-ratio: 1; border-radius: 2cqw; object-fit: cover; }
.gs-img.corner { position: absolute; right: 0; top: -1cqw; width: 14cqw; height: 14cqw; border-radius: 1.6cqw; object-fit: cover; }
/* prática */
.gs-prac { height: 100%; display: flex; flex-direction: column; gap: 2cqw; }
.gs-instr { align-self: flex-start; background: #f4f4f5; color: #18181b; border: .12cqw solid #e4e4e7; border-radius: 99px; padding: .5cqw 1.8cqw; font-size: 2.3cqw; font-weight: 600; }
.gs-pbody { flex: 1; display: flex; align-items: center; gap: 3cqw; min-height: 0; }
.gs-pleft { flex: 1; display: flex; flex-direction: column; gap: 3.2cqw; }
.gs-pright { flex: none; width: 32cqw; display: flex; flex-direction: column; align-items: center; gap: 1cqw; text-align: center; }
.gs-pright:has(.gs-pic) { width: 38cqw; }
.gs-pic { width: 100%; height: auto; max-height: 60cqw; object-fit: contain; border-radius: 1.4cqw; border: .15cqw solid #e4e4e7; }
.gs-scene { font-size: 1.9cqw; color: var(--ink-soft); font-style: italic; font-weight: 700; line-height: 1.25; }
.gs-prompt { font-size: calc(4.4cqw * var(--f, 1)); line-height: 1.3; font-weight: 600; }
.gs-prompt.qa { font-size: 4.8cqw; }
.gs-corr { color: var(--gold-2); margin-right: 1.2cqw; }
.gs-blank { display: inline-block; min-width: 13cqw; border-bottom: .55cqw solid var(--ink); text-align: center; color: var(--sage); font-weight: 700; }
.gs-blank.on { border-color: var(--sage); }
.gs-opts { display: flex; flex-wrap: wrap; gap: 1.6cqw; }
.gs-opt { background: #fff; border: .15cqw solid #e4e4e7; border-radius: 1cqw; box-shadow: 0 .1cqw .2cqw rgba(0, 0, 0, .06); padding: 1.1cqw 2.6cqw; font-size: calc(3.2cqw * var(--f, 1)); font-weight: 600; }
.gs-opt.yes { background: var(--sage); border-color: var(--sage); color: #fff; }
.gs-opt.dim { opacity: .35; }
.gs .gs-tnote { align-self: stretch; text-align: left; max-height: 36cqw; background: #fff7e0; border-color: #e0b44c; border-style: dashed; color: #8a5a00; }
.gs-tip { font-size: calc(2.8cqw * var(--f, 1)); line-height: 1.3; font-weight: 600; color: #8a5a00; background: #fff7e0; border: .15cqw dashed #e0b44c; border-radius: 1cqw; padding: 1cqw 1.8cqw; }
.gs-more { font-size: calc(3.4cqw * var(--f, 1)); color: var(--ok); font-weight: 600; line-height: 1.3; }
/* menu "Chapter contents" */
.gs-menu { position: absolute; inset: 8.5cqw 0 0; background: rgba(255, 255, 255, .98); padding: 2.4cqw 5cqw; display: flex; flex-direction: column; gap: .9cqw; overflow: auto; cursor: default; }
.gs-menu h3 { margin: 0 0 .8cqw; font-size: 3cqw; }
.gs-menu button { text-align: left; border: .12cqw solid #e4e4e7; background: #fff; border-radius: 1cqw; padding: .9cqw 1.8cqw; font: 600 2.4cqw var(--sans); color: var(--ink); cursor: pointer; }
.gs-menu button.on { background: #18181b; border-color: #18181b; color: #fff; }
.gs-exs.many { display: grid; grid-template-columns: repeat(2, max-content); justify-content: center; gap: 1.4cqw 8cqw; }
.gs-exs.many .gs-ex { font-size: calc(4cqw * var(--f, 1)); }
.gs-pbody { align-items: flex-start; padding-top: 4cqw; }
.gs-hide { visibility: hidden; }
.gs .gr-hl { display: inline-block; box-shadow: 0 0 0 .4cqw var(--rose); border-radius: 99px; padding: 0 1.1cqw; margin: 0 .3cqw; }
.gs-mk { display: inline-block; width: 4cqw; font-weight: 700; }
.gs-ex.no .gs-mk { color: var(--rose); }
.gs-ex.ok .gs-mk { color: var(--sage); }
.gs-ex.no { opacity: .85; }
.gs-chart.has-art .gs-formula, .gs-chart.has-art .gs-title { padding-right: 11cqw; }
/* Criar aula (regua.js): texto, players e ligar colunas no mesmo slide da Gramática */
.gs-text { font-size: calc(3.2cqw * var(--f, 1)); line-height: 1.35; }
/* Slide de pergunta = página de livro: instrução, player e texto de apoio junto da pergunta. O texto de apoio rola se não couber. */
.gs-ins { font-size: calc(3cqw * var(--f, 1)); color: var(--ink-soft); line-height: 1.3; font-weight: 600; }
.gs-pt { margin-top: .6cqw; font-size: calc(2.4cqw * var(--f, 1)); font-weight: 500; font-style: italic; opacity: .85; }
/* Alfabeto da aula 1 (lessons.js, alphabetHtml): as medidas seguem a largura do próprio quadro, no slide e no cartão do aluno. */
.alpha-wrap { container-type: inline-size; width: 100%; flex: 1; min-height: 0; }
.alpha { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1.2cqw; }
.alpha > div { display: flex; flex-direction: column; align-items: center; gap: .2em; background: #fff; border: .15cqw solid #e4e4e7; border-radius: 1.2cqw; padding: .8cqw .4cqw; line-height: 1.1; text-align: center; }
.alpha b { font-size: max(16px, 4.4cqw); font-weight: 800; }
.alpha .a-e { font-size: max(15px, 3.4cqw); }
.alpha .a-w { font-size: max(10px, 2cqw); font-weight: 600; }
.alpha .a-p { font-size: max(10px, 1.8cqw); font-style: italic; opacity: .75; }
.fitting .gs-ref { max-height: none; overflow: visible; }
.gs-ref { background: #fafafa; border: .15cqw solid #e4e4e7; border-radius: 1.2cqw; padding: 1.4cqw 2.2cqw; font-size: calc(3cqw * var(--f, 1)); line-height: 1.35; max-height: 30cqw; overflow: auto; cursor: auto; user-select: text; }
/* Celular em pé: o slide fica mais alto (3:4) e a letra maior, para ler sem zoom. */
@media (max-width: 700px) {
  .gs { width: 100%; aspect-ratio: 3 / 4; }
  .gs-text, .gs-ref, .gs-ins { font-size: calc(4.2cqw * var(--f, 1)); }
  .gs-ref { max-height: 42cqw; }
  .gs-prompt { font-size: calc(5.4cqw * var(--f, 1)); }
  .gs-opt { font-size: calc(4cqw * var(--f, 1)); }
  .gs-instr { font-size: 3.4cqw; }
  .gs-pbody { flex-direction: column; }
  .gs-pright { width: 100%; }
  .gs-pright:has(.gs-pic) { order: -1; width: 100%; }
}
.gs-media > iframe, .gs-media > video { flex: 1; min-height: 0; width: 100%; border: 0; border-radius: 1.6cqw; background: #000; }
.gs-media > audio { width: 100%; flex: none; }
.gs-media > .aud { width: 100%; flex: none; }
/* Slide de mídia com imagem (ex.: o quadro do alfabeto): o título e o áudio ficam fora da imagem, que ocupa o espaço que sobra, inteira. */
.gs-media.has-bg { padding: 0; }
.gs-media.has-bg > .gs-bgimg { position: static; z-index: auto; inset: auto; flex: 1; min-height: 0; order: 0; border-radius: 1.4cqw; }
/* Player do áudio com cenas: a ilustração se move devagar (zoom e deslize suaves), como câmera parada num quadro vivo; a imagem fica dentro da caixa (overflow) e o movimento não depende de vídeo. */
.gs-media.has-bg > .gs-bgimg[style*="--bgi"] { position: relative; overflow: hidden; background-image: none !important; }
.gs-media.has-bg > .gs-bgimg[style*="--bgi"]::before { content: ""; position: absolute; inset: 0; background: var(--bgi) center / contain no-repeat; transform-origin: 50% 35%; animation: gsKen 18s ease-in-out infinite alternate; }
@keyframes gsKen { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.12) translate(-1.5%, -1%); } }
@media (prefers-reduced-motion: reduce) { .gs-media.has-bg > .gs-bgimg[style*="--bgi"]::before { animation: none; } }
.gs-media.has-bg > .gs-formula, .gs-media.has-bg > .gs-note { order: -2; background: none; padding: 0; width: auto; max-width: none; }
.gs-media.has-bg > .gs-note { order: -1; }
/* Barra de áudio dos slides (regua.js) */
.aud { display: flex; align-items: center; gap: 8px; box-sizing: border-box; height: 40px; padding: 0 12px; border-radius: 99px; background: #f1f3f4; color: #3c4043; font: 500 13px/1 var(--sans); }
.aud button { border: 0; background: none; color: inherit; cursor: pointer; padding: 4px 6px; font: inherit; font-size: 15px; display: grid; place-items: center; }
.aud .aud-t { white-space: nowrap; font-variant-numeric: tabular-nums; }
.aud .aud-s { flex: 1; min-width: 40px; accent-color: #3c4043; }
.aud .aud-v { display: flex; align-items: center; gap: 2px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.aud .aud-v button { font-size: 18px; width: 24px; height: 24px; padding: 0; border-radius: 50%; }
.aud .aud-v button:hover, .aud .aud-p:hover, .aud .aud-m:hover { background: rgba(0, 0, 0, .08); }
.aud .aud-v b { min-width: 34px; text-align: center; font-weight: 600; }
.gs-script > div { break-inside: avoid; margin-bottom: .6cqw; }
.gs-script.two { column-count: 2; column-gap: 4cqw; }
.gs-link { align-self: center; margin-top: 2cqw; background: #18181b; color: #fafafa; border-radius: 1cqw; padding: 1.6cqw 5cqw; font-size: 4cqw; font-weight: 700; text-decoration: none; }
.gs-match { display: grid; grid-template-columns: 1fr 1fr; gap: 1cqw 4cqw; font-size: calc(3.2cqw * var(--f, 1)); font-weight: 600; }
.gs-match .yes { color: var(--sage); }

/* Aula ao vivo (js/live.js): painel da professora ao lado do slide; aviso e tela do aluno. */
.gov.has-side { padding-right: 300px; }
.lv-side { position: absolute; top: 0; right: 0; bottom: 0; width: 300px; background: #1f1c3d; color: #fff; padding: 14px; overflow: auto; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.lv-side .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .35); align-self: flex-start; }
.lv-side p { margin: 0; }
.lv-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 16px; }
.lv-sum { font-size: 15px; font-weight: 800; }
.lv-row { padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .07); }
.lv-row > div { display: flex; justify-content: space-between; gap: 8px; }
.lv-row small { display: block; opacity: .8; margin-top: 3px; word-break: break-word; }
.lv-dot { width: 8px; height: 8px; border-radius: 50%; background: #77748f; display: inline-block; margin-right: 6px; }
.lv-dot.on { background: #3ecf6e; }
.lv-ok { color: #7be495; } .lv-no { color: #ff9a9a; } .lv-wait { opacity: .6; }
.lv-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 30; background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 16px;
  display: flex; gap: 10px 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; box-shadow: 0 8px 30px rgba(0, 0, 0, .3); }
.lv-banner .btn.ghost, .lv-top .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
@media (min-width: 901px) { .lv-banner { left: 280px; } } /* não cobre o Sair da barra lateral (264px) */
@media (max-width: 900px) { .lv-banner { bottom: calc(var(--tab-h) + 10px + env(safe-area-inset-bottom)); } }
.gov.lv-student { overflow: auto; }
.lv-top { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; padding: 10px 14px; color: #fff; flex-wrap: wrap; }
.lv-main { position: relative; flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 8px 12px 20px; }
.lv-student .gs { cursor: default; }
.lv-q { width: min(640px, 100%); }
.lv-res { color: #fff; font-weight: 800; text-align: center; font-size: 17px; }
.lv-res span { display: block; font-weight: 600; opacity: .85; font-size: 15px; }
.lv-wait-msg { color: #fff; font-size: 18px; font-weight: 700; text-align: center; }
.lv-tap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; font-size: 18px; }
/* Aviso de vídeo do YouTube que não toca embutido (ytCheck em lessons.js) */
.yt-warn:not(:empty) { margin-top: 8px; background: var(--paper-2); border: 2px solid var(--gold); border-radius: 12px; padding: 10px 14px; font-size: 14px; line-height: 1.45; }
.yt-warn ul { margin: 4px 0 6px; padding-left: 20px; }
/* Outras versões da música que tocam embutidas (ytAltsHtml em lessons.js) */
.yt-alts { margin-top: 10px; }
.yt-alts-msg { margin: 6px 0 0; font-size: 13px; color: var(--ink-soft); }
.yt-alts-ok { margin: 0; color: var(--ok); }
.yt-warn:has(.yt-alts-ok):not(:has(.yt-caps)) { border-color: var(--ok); }
.yt-caps { margin: 0; }
.yt-cap { font-weight: 700; }
.yt-cap.ok { color: var(--ok); }
.yt-cap.bad { color: var(--warn); }
.yt-alt { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.yt-alt img { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #000; }
.yt-alt-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.yt-alt-t b { font-size: 14px; overflow-wrap: anywhere; }
.yt-alt-b { text-align: right; }
.yt-alt-st { font-size: 13px; font-weight: 700; }
@media (max-width: 520px) { .yt-alt { grid-template-columns: 72px 1fr; } .yt-alt img { width: 72px; } .yt-alt-b { grid-column: 1 / -1; text-align: left; } }

/* Régua da aula (js/regua.js): barra dos 60 minutos, uma cor pastel por skill (fixa nos três temas). */
.sk-warmup { --sk: #ffe2a3; } .sk-listening { --sk: #c4e6ff; } .sk-reading { --sk: #c8efd5; }
.sk-speaking { --sk: #ffd0dc; } .sk-writing { --sk: #e3d9ff; } .sk-wrapup { --sk: #ffdcc2; }
.regua { margin-bottom: 16px; }
.regua-top { justify-content: space-between; align-items: center; margin: 0 0 10px; }
.regua-bar { display: flex; gap: 4px; min-height: 76px; padding: 4px; border-radius: var(--r-md); background: var(--cream); border: 2px dashed var(--line); overflow-x: auto; }
.regua-bar.over { border-color: var(--gold); background: var(--paper-2); }
.regua-seg { min-width: 132px; border: 0; border-radius: var(--r-sm); background: var(--sk); color: var(--ink); font: inherit; cursor: grab;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 8px 10px; text-align: left; overflow: hidden; }
.regua-seg small { color: var(--ink-soft); font-size: 12px; white-space: nowrap; }
.regua-seg-t { font-weight: 800; white-space: nowrap; }
.regua-seg.sel { box-shadow: inset 0 0 0 3px var(--gold); }
.regua-free { min-width: 60px; display: grid; place-items: center; color: var(--ink-soft); font-size: 14px; }
.regua-palette { margin: 0; gap: 8px; }
.regua-chip { border: 2px solid transparent; border-radius: 999px; background: var(--sk); color: var(--ink); font: inherit; font-weight: 700; padding: 8px 14px; cursor: grab; }
.regua-chip:hover, .regua-seg:hover { border-color: var(--ink-soft); }
.regua-chip small { font-weight: 400; color: var(--ink-soft); }
.regua-panel { border-top: 10px solid var(--sk); }
.regua-panel-h { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.regua-dot { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--sk); font-size: 20px; }
.regua-min { display: inline-flex; align-items: center; gap: 6px; }
.regua-mat { border: 2px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 8px; }
.regua-mat.open { border-color: var(--sk); background: var(--cream); }
.regua-mat-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.regua-mat-t { flex: 1; min-width: 140px; }
.regua-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sk); font-weight: 800; font-size: 14px; }
.regua-edit { margin-top: 12px; }
.regua-add { border: 2px solid var(--sk); border-radius: var(--r-md); padding: 14px; margin-top: 8px; background: var(--cream); }
.regua-add-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.regua-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.regua-tile { border: 2px solid var(--line); border-radius: var(--r-md); background: var(--white); color: var(--ink); font: inherit; font-weight: 700; padding: 14px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.regua-tile span { font-size: 28px; }
.regua-tile:hover, .regua-src:hover { border-color: var(--lav-2); }
.regua-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.regua-src { border: 2px solid var(--line); border-radius: var(--r-md); background: var(--white); color: var(--ink); font: inherit; padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.regua-src span { font-size: 28px; }
.regua-src small { color: var(--ink-soft); }
.regua-foot { justify-content: space-between; margin-top: 16px; padding-top: 12px; border-top: 2px solid var(--line); }
.aula-ai-steps { margin-top: 10px; display: grid; gap: 4px; }
.aula-ai-steps .err { color: var(--rose); }
.aula-ai-steps .run { font-weight: 700; }

/* Menu "⋮" / "Apresentar ▾" (regua.js menuHtml): o menu-pop abre embaixo do botão */
.menu-wrap { position: relative; display: inline-block; }

/* Revisar slides (regua.js): o slide como o aluno vê, navegação por parte e a edição daquele slide embaixo */
.rv { max-width: 920px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.rv-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.rv-nav select { width: auto; min-width: 200px; }
.rv-arrows { display: flex; align-items: center; gap: 10px; }
.rv-stage { display: flex; justify-content: center; }
.rv-stage .gs { width: min(100%, 820px, calc((100vh - 220px) * 4 / 3)); cursor: default; user-select: text; box-shadow: var(--shadow); }
.rv-cap { margin: 0; display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.rv-edit { border-top: 6px solid var(--lav); }
.rv-from { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.rv-from .btn { margin-left: auto; }
.rv-tabs { margin: 0 0 12px; gap: 6px; }
.rv-img { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rv-foot { margin: 16px 0 0; padding-top: 12px; border-top: 2px solid var(--line); align-items: center; }
.rv-foot [data-lessonsave] { margin-left: auto; }
.rv-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 12px; }
.rv-thumb { border: 2px solid var(--line); border-radius: var(--r-md); background: var(--white); color: var(--ink); font: inherit; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.rv-thumb:hover { border-color: var(--lav-2); }
.rv-thumb img, .rv-thumb-ico, .rv-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); background: var(--cream); display: grid; place-items: center; font-size: 28px; }
.rv-thumb small { font-weight: 700; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rv-img img, .rv-img .rv-thumb-ico { width: 120px; }

/* Repositório de exercícios (js/games.js): completar com banco, grupos, forca, memória, ordenar */
.gp-text { font-size: 18px; line-height: 2.4; margin: 4px 0 10px; }
.gp-slot { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; min-width: 92px; min-height: 40px; margin: 0 4px;
  border: 2px dashed var(--lav-2); border-radius: 999px; background: var(--white); }
.gp-slot:empty::before { content: "?"; color: var(--ink-soft); font-weight: 800; }
.gp-slot .gp-word { margin: 0; }
.gp-word.ok, .order [data-oword].ok { border-color: #2e9e5b; background: #e6f6ec; cursor: default; }
.gp-word.bad, .order [data-oword].bad { border-color: #d64545; background: #fdeaea; animation: gp-shake .3s; }
.gp-slot.ok { border-style: solid; border-color: #2e9e5b; background: #e6f6ec; }
.gp-slot.ok .gp-word { border-color: #2e9e5b; background: #e6f6ec; cursor: default; }
.gp-slot.bad { border-style: solid; border-color: #d64545; background: #fdeaea; animation: gp-shake .3s; }
.gp-slot.bad .gp-word { border-color: #d64545; background: #fdeaea; }
@keyframes gp-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.gp-bank { display: flex; flex-wrap: wrap; gap: 8px; min-height: 56px; padding: 10px; border-radius: var(--r-md); background: var(--paper-2); margin-bottom: 6px; }
.gp-word { border: 2px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink); font: inherit; font-weight: 700; font-size: 16px;
  min-height: 40px; padding: 4px 16px; cursor: grab; touch-action: manipulation; }
.gp-word:hover { border-color: var(--lav-2); }
.gp-word.sel { border-color: var(--gold); background: var(--paper-2); box-shadow: 0 0 0 3px var(--glow); }
.gr-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.gr-group { border: 2px solid var(--line); border-radius: var(--r-md); background: var(--white); min-height: 120px; display: flex; flex-direction: column; overflow: hidden; }
.gr-h { border: 0; background: var(--lav); color: var(--lav-2); font: inherit; font-weight: 800; padding: 10px; cursor: pointer; }
.gr-h::before { content: "＋ "; }
.gr-in { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; flex: 1; }
.hg { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 6px 0; }
.hg-mask { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.hg-c { width: 34px; height: 44px; border-bottom: 4px solid var(--ink); display: grid; place-items: center; font-size: 26px; font-weight: 900; text-transform: uppercase; }
.hg-c.miss { color: var(--rose); }
.hg-sp { width: 18px; }
.hg-lives { font-size: 20px; letter-spacing: 2px; }
.hg-keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 480px; }
.hg-keys button { width: 40px; height: 44px; border: 2px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); font: inherit; font-weight: 800; font-size: 17px; cursor: pointer; }
.hg-keys button:disabled { opacity: .3; cursor: default; }
.hg-msg, .mem-msg { font-weight: 800; color: var(--ok); text-align: center; min-height: 1em; }
.an { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 6px 0; }
.an-tries { font-weight: 700; color: var(--ink-soft); }
.an-board, .an-pool { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.an-pool { flex-direction: row; flex-wrap: wrap; justify-content: center; max-width: 520px; }
.an-w { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.an-s, .an-t { width: 40px; height: 40px; border: 2px solid var(--ink); border-radius: 10px; background: var(--white); color: var(--ink); font: inherit; font-weight: 900; font-size: 20px; padding: 0; cursor: pointer; }
.an-s.on { background: var(--paper-2); }
.an-s.ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--white)); color: var(--ok); cursor: default; }
.an-s.bad { border-color: var(--rose); background: color-mix(in srgb, var(--rose) 12%, var(--white)); color: var(--rose); }
.an-p { align-self: center; font-size: 26px; font-weight: 900; }
.an-t.used { opacity: .2; pointer-events: none; }
.an-act { display: flex; gap: 10px; }
.an-msg { font-weight: 800; color: var(--ok); text-align: center; min-height: 1em; }
.cw { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 6px 0; }
.cw-now { align-self: stretch; background: var(--paper-2); border-radius: 10px; padding: 10px 14px; font-weight: 700; }
.cw-body { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; width: 100%; }
.cw-grid { display: grid; grid-template-columns: repeat(var(--cw-w), 1fr); width: min(100%, calc(var(--cw-w) * 52px)); gap: 2px; }
.cw-c, .cw-x { aspect-ratio: 1; min-width: 0; }
.cw-x { background: var(--ink); border-radius: 4px; }
.cw-c { position: relative; border: 1px solid var(--line); border-radius: 4px; background: var(--white); color: var(--ink); font: inherit; padding: 0; cursor: pointer; }
.cw-c i { position: absolute; top: 2px; left: 4px; font-style: normal; font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.cw-c b { font-size: 22px; font-weight: 900; }
.cw-c.sel { background: var(--paper-2); }
.cw-c.cur { background: color-mix(in srgb, var(--gold) 30%, var(--white)); box-shadow: inset 0 0 0 2px var(--ink); }
.cw-c.ok { background: color-mix(in srgb, var(--ok) 12%, var(--white)); color: var(--ok); cursor: default; }
.cw-c.bad { background: color-mix(in srgb, var(--rose) 14%, var(--white)); color: var(--rose); }
.cw-lists { display: flex; gap: 14px; flex: 1 1 260px; min-width: 0; }
.cw-list { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cw-list h4 { margin: 0 0 4px; }
.cw-q { text-align: left; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 14px; padding: 6px 8px; cursor: pointer; }
.cw-q.on { background: var(--paper-2); }
.cw-in { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; font-size: 16px; }
.cw-tries { font-weight: 700; color: var(--ink-soft); }
.cw-msg { font-weight: 800; color: var(--ok); text-align: center; min-height: 1em; }
.lc { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 6px 0; }
.lc .cw-now { align-self: stretch; }
.lc-rows { display: flex; flex-direction: column; gap: 12px; width: min(100%, 440px); }
.lc-r { position: relative; display: flex; align-items: center; gap: 8px; }
.lc-row { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: 48px; align-items: center; justify-items: center; border: 0; border-bottom: 4px solid var(--line); border-radius: 10px; background: var(--paper-2); color: var(--ink); font: inherit; font-size: 22px; font-weight: 900; padding: 0 10px; cursor: pointer; }
.lc-r.end .lc-row { background: color-mix(in srgb, var(--gold) 28%, var(--white)); border-bottom-color: var(--gold); }
.lc-b { font-style: normal; min-width: 1.1em; height: 1.2em; line-height: 1.2em; text-align: center; border-bottom: 3px solid var(--ink-soft); }
.lc-r.ok .lc-b { border-bottom-color: transparent; }
.lc-r.ok .lc-row { color: var(--ok); cursor: default; }
.lc-r.bad .lc-row { color: var(--rose); }
.lc-r.cur .lc-row { box-shadow: 0 0 0 2px var(--ink); }
.lc-mv { display: flex; flex-direction: column; gap: 2px; visibility: hidden; }
.lc-mv button { border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--ink); font-size: 11px; line-height: 1; padding: 4px 8px; cursor: pointer; }
.lc[data-ph="2"]:not([data-over]) .lc-r:not(.end) .lc-mv { visibility: visible; }
.lc-r.lk::after { content: "="; position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%); font-size: 16px; font-weight: 900; color: var(--ink-soft); line-height: 1; }
.lc-in { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; font-size: 16px; }
.mem { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 8px; margin: 6px 0; }
.mem-c { aspect-ratio: 4 / 3; min-width: 0; overflow-wrap: anywhere; border: 0; border-radius: var(--r-md); background: var(--brand-grad); color: transparent; font: inherit; font-weight: 800; font-size: 15px; padding: 6px; cursor: pointer; transition: transform .15s; }
.mem-c.s1 { background: var(--lav-2); }
.mem-c.s1.up { background: var(--white); box-shadow: inset 0 0 0 2px var(--lav-2); }
.mem-key { display: flex; gap: 14px; align-items: center; font-size: 13px; font-weight: 700; color: var(--muted, #6b6b80); }
.mem-key i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 5px; vertical-align: -2px; background: var(--brand-grad); }
.mem-key i.s1 { background: var(--lav-2); }
.mem-c span { visibility: hidden; }
.mem-c.up { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 2px var(--lav-2); transform: scale(1.03); }
.mem-c.up span { visibility: visible; }
.mem-c.ok { background: var(--sage); color: #fff; box-shadow: none; }
.mem-c.s0.up { box-shadow: inset 0 0 0 2px var(--gold); }
.mem-c.ok.s0, .mem-c.ok.s1 { background: var(--sage); color: #fff; box-shadow: none; }
.gs .mem-key { font-size: 1.8cqw; }
.order.seq .order-out, .order.seq .order-bank { display: flex; flex-direction: column; align-items: stretch; gap: 6px; counter-reset: seq; }
.order.seq button { border-radius: var(--r-md); text-align: left; justify-content: flex-start; white-space: normal; height: auto; padding: 8px 14px; }
.order.seq .order-out button::before { counter-increment: seq; content: counter(seq) ". "; font-weight: 900; color: var(--gold-2); }
/* no slide do projetor (escala com o slide) */
.gs-game { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: calc(2cqw * var(--f, 1)); }
.gs-gaps { font-size: calc(4cqw * var(--f, 1)); line-height: 1.6; }
.gs-groups { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2cqw; }
.gs-groups > div { border: .35cqw solid var(--line); border-radius: 1.6cqw; padding: 1.4cqw; min-height: 14cqw; display: flex; flex-wrap: wrap; gap: 1cqw; align-content: flex-start; }
.gs-groups b { width: 100%; font-size: calc(3.4cqw * var(--f, 1)); color: var(--lav-2); }
.gs-seq { margin: 0; padding-left: 5cqw; font-size: calc(3.4cqw * var(--f, 1)); line-height: 1.4; display: grid; gap: 1cqw; }
.gs-seq.abc { list-style: upper-alpha; }
.gs .hg { gap: 2cqw; }
.gs .hg-c { width: 5cqw; height: 6.5cqw; border-bottom-width: .6cqw; font-size: 4.6cqw; }
.gs .hg-sp { width: 3cqw; }
.gs .hg-lives { font-size: 3cqw; }
.gs .hg-keys { max-width: none; gap: .8cqw; }
.gs .hg-keys button { width: 5.4cqw; height: 5.4cqw; border-radius: 1cqw; font-size: 2.8cqw; border-width: .3cqw; }
.gs .hg-msg, .gs .mem-msg { font-size: 3cqw; }
.gs .an { gap: 1.6cqw; }
.gs .an-board, .gs .an-pool { gap: 1cqw; }
.gs .an-pool { max-width: none; }
.gs .an-w { gap: .8cqw; }
.gs .an-s, .gs .an-t { width: 5.2cqw; height: 5.2cqw; border-radius: 1.2cqw; border-width: .3cqw; font-size: 2.8cqw; }
.gs .an-p { font-size: 3.4cqw; }
.gs .an-tries, .gs .an-msg { font-size: 2.6cqw; }
.gs .an-act .btn { font-size: 2.4cqw; }
.gs .an-ans { font-weight: 800; }
.gs .cw { gap: 1.4cqw; }
.gs .cw-now { font-size: 2.4cqw; border-radius: 1.2cqw; padding: 1cqw 1.6cqw; }
.gs .cw-body { gap: 2cqw; flex-wrap: nowrap; }
.gs .cw-grid { width: calc(var(--cw-w) * 4.8cqw); max-width: 46%; flex: none; gap: .3cqw; }
.gs .cw-c i { font-size: 1.3cqw; top: .2cqw; left: .4cqw; }
.gs .cw-c b { font-size: 3cqw; }
.gs .cw-q { font-size: 1.9cqw; padding: .6cqw .8cqw; }
.gs .cw-list h4 { font-size: 2.2cqw; }
.gs .cw-tries, .gs .cw-msg { font-size: 2.2cqw; }
.gs .cw-c b { font-size: 2.6cqw; }
.gs .lc { gap: 1.2cqw; }
.gs .lc-rows { width: 52%; gap: 1.1cqw; }
.gs .lc-row { height: 5.6cqw; font-size: 3cqw; border-radius: 1.2cqw; border-bottom-width: .4cqw; }
.gs .lc-mv button { font-size: 1.2cqw; padding: .4cqw .8cqw; }
.gs .lc-r.lk::after { bottom: -1.2cqw; font-size: 1.6cqw; }
.gs .mem { gap: 1.2cqw; }
.gs .mem-c { font-size: 2.6cqw; border-radius: 1.4cqw; }
/* galeria de modelos (editor da aula) */
.tpl-cta { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; border: 2px solid var(--lav-2); border-radius: var(--r-md); background: var(--lav);
  color: var(--ink); font: inherit; padding: 14px 16px; margin-bottom: 12px; cursor: pointer; }
.tpl-cta small { display: block; color: var(--ink-soft); }
.tpl-cta:hover { box-shadow: var(--shadow); }
.tpl-ico { font-size: 30px; line-height: 1; flex: none; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tpl-card { border: 2px solid var(--line); border-radius: var(--r-md); background: var(--white); color: var(--ink); font: inherit; padding: 16px; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px; text-align: left; }
.tpl-card:hover { border-color: var(--lav-2); box-shadow: var(--shadow); }
.tpl-card small { color: var(--ink-soft); line-height: 1.35; }
.tpl-where { margin-top: auto; font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.tpl-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.tpl-opts { gap: 12px; align-items: flex-end; }
.tpl-opts .field { margin-bottom: 8px; }
.tpl-opts input { width: 110px; }
.tpl-ctx { align-items: flex-start; gap: 8px; margin: 4px 0 12px; flex-wrap: nowrap; }
.tpl-ctx input { width: auto; margin-top: 4px; }
.menu-left .menu-pop { left: 0; right: auto; }
/* Exercício vazio: cartões dos tipos de pergunta (lessons.js qtypePickerHtml) */
.qtype-pick { border: 2px dashed var(--line); border-radius: var(--r-md); padding: 14px; margin-bottom: 12px; background: var(--white); }
.qtype-tile { padding: 12px 8px; text-align: center; }
.qtype-tile small { color: var(--ink-soft); font-weight: 600; font-size: 12px; line-height: 1.25; }

/* ======================================================================================================
   Identidade profissional (direção Studio): a mesma estrutura de antes, com a pele nova.
   Fica no fim do arquivo de propósito: ajusta o que as regras acima definem, sem mudar nenhum seletor
   que o JS usa. Para voltar ao visual anterior basta remover este bloco e restaurar o :root.
   ====================================================================================================== */
:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
body { font-weight: 400; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, .topbar h2, .login-brand h1, .login-panel h2, .stat, .lesson-now h3, .player-done h2, .work-prompt,
.player .qbox > p, .fold.big, .exercise q { font-family: var(--serif); letter-spacing: -.03em; }
h3 { font-weight: 700; }
.topbar h2, .login-panel h2, .player-done h2 { font-weight: 700; }
.login-brand h1 { font-weight: 800; letter-spacing: -.045em; }
.stat { font-weight: 700; }

/* Botões: marinho e neutro; o laranja só na ação principal */
.btn { border-radius: var(--r-btn); background: var(--lav); color: var(--ink); font-weight: 700; }
.btn:hover { filter: none; background: var(--paper-2); }
.btn.gold { background: var(--gold); color: var(--ink); box-shadow: none; }
.btn.gold:hover { background: var(--gold); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { background: var(--lav); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.small { min-height: 40px; }
.book-play { border-radius: 50%; }
.book-speedctl .btn { border-radius: var(--r-btn); }

/* Campos */
.field label { font-weight: 600; }
.field input, .field select, .field textarea, .lib-search, textarea, select,
.qbox input:not([type=radio]):not([type=checkbox]):not(.gap-input), .qbox select, .qbox textarea,
.work-step textarea, .work-step input:not([type=file]) { border: 1.5px solid var(--line); border-radius: var(--r-md); }
select { border-radius: var(--r-sm); }
.field input:focus, .field select:focus, .field textarea:focus, .lib-search:focus, textarea:focus,
.qbox input:focus, .qbox select:focus, .qbox textarea:focus, .work-step textarea:focus, .work-step input:focus {
  border-color: var(--ink); box-shadow: 0 0 0 3px rgba(52, 91, 140, .18); }

/* Entrada */
.login-wrap { background: var(--paper); }
.login-brand { background: var(--navy); color: #fff; }
.login-brand::before { background: rgba(255, 255, 255, .05); }
.login-brand::after { display: none; }
.login-brand p.lead { opacity: 1; color: rgba(255, 255, 255, .78); }
.logo img { height: 56px; }
@media (max-width: 900px) { .login-panel { background: var(--paper); } }

/* Menu lateral e navegação */
.sidebar { box-shadow: none; border-right: 1px solid var(--line); }
.brand-mark img { height: 36px; }
nav button { border-radius: var(--r-btn); font-weight: 600; }
nav button:hover { background: var(--lav); }
nav button.active { background: var(--ink); color: #fff; }
.sidebar .who { background: var(--lav); border-radius: var(--r-md); }
.crumb-back { box-shadow: inset 0 0 0 1.5px var(--line); }
.tabbar { box-shadow: 0 -1px 0 var(--line); }
.sheet-grid button.active { background: var(--ink); color: #fff; }

/* Cartões, etiquetas e listas */
.card { border: 1px solid var(--line); box-shadow: var(--shadow); }
.lesson-block { border: 1px solid var(--line); }
.nudge { box-shadow: none; }
.tag { border-radius: var(--r-sm); font-weight: 700; background: var(--lav); }
.tag.ok { background: #e3f1ea; }
.tag.warn { background: #f8ecd0; }
.tag.late { background: #f8e2e5; }
.tag.gold { background: #fde9dc; }
.lesson-now { background: var(--hero-grad); box-shadow: none; }
.lesson-now::after { background: rgba(255, 255, 255, .05); }
.toast { border-radius: var(--r-btn); }
.cal-col.today, .cal-cell.today { outline: 2px solid var(--gold); }

/* Perguntas e modo uma-por-vez */
.qbox { border-top: 1px solid var(--line); }
.qbox label { border: 1.5px solid var(--line); border-radius: var(--r-md); font-weight: 600; }
.qbox label:hover { border-color: var(--ink-soft); background: var(--white); }
.qbox label:has(input:checked) { border-color: var(--ink); background: var(--white); box-shadow: inset 0 0 0 1px var(--ink); }
.qbox label input { accent-color: var(--ink); }
.interests .chip, .order button { border-radius: var(--r-btn); }
.player { background: var(--paper); }
.player-x { box-shadow: inset 0 0 0 1.5px var(--line); }
.pbar { height: 10px; background: var(--line); }
.pbar i { background: var(--gold); }
.player-foot { box-shadow: 0 -1px 0 var(--line); }
.player .qbox > .muted:first-child, .work-kicker { color: var(--ink-soft); letter-spacing: .12em; }
.score-ring::before { background: var(--paper); }
.player-list div { box-shadow: inset 0 0 0 1px var(--line); }
.book-par.playing { background: var(--lav); }

/* Régua da aula: um tom suave por habilidade */
.sk-warmup { --sk: #fde6d6; } .sk-listening { --sk: #e9e5f2; } .sk-reading { --sk: #e2eaf3; }
.sk-speaking { --sk: #e0eee9; } .sk-writing { --sk: #f1e5ea; } .sk-wrapup { --sk: #e6e6ec; }
.regua-bar { border: 1.5px dashed var(--line); }
.regua-seg { border-radius: var(--r-sm); }
.regua-chip { border-radius: var(--r-btn); font-weight: 600; }
.regua-panel { border-top-width: 6px; }
.regua-mat, .regua-tile, .regua-src, .rv-thumb, .tpl-card, .qtype-pick, .regua-add { border-width: 1.5px; }
.tpl-cta { border: 1.5px solid var(--line); background: var(--white); }
.tpl-cta:hover { border-color: var(--ink); }
.gp-slot { border: 2px dashed var(--ink-soft); }
.gp-word { border-width: 1.5px; border-radius: var(--r-btn); font-weight: 600; }
.gp-word:hover { border-color: var(--ink); }
.gr-h { background: var(--lav); color: var(--ink); }
.mem-c.s1 { background: var(--azul); }
.mem-key i.s1 { background: var(--azul); }
.mem-c.s1.up, .mem-c.up { box-shadow: inset 0 0 0 2px var(--ink); }

/* Slides e projetor (gramática, aula, aula ao vivo): mesma pele, escala em cqw como antes */
.gov { background: #17162a; }
.gs { --gs-noun: #2b2a4c; --gs-verb: var(--sage); --gs-adj: var(--gold-2); --gs-pron: var(--azul); --gs-art: #914b66; --gs-prep: var(--rose); --gs-neg: #b3362f; --gs-place: #1f6f78; --gs-adv: #8a5a00;
  --ink: #2b2a4c; --ink-soft: #5d5c78; --line: #e2ded5; --paper-2: #f6f4ef; --lav: #f6f4ef; --lav-2: #2b2a4c; --cream: #faf8f4;
  color: #2b2a4c; font-family: var(--sans); font-weight: 500; letter-spacing: -.005em; border-radius: 1.6cqw; }
.gs-head { border-bottom: .15cqw solid var(--line); color: var(--ink); }
.gs-ht { font-family: var(--serif); font-weight: 700; letter-spacing: -.03em; }
.gs-cc { border: .15cqw solid var(--line); color: var(--ink); border-radius: 1cqw; font: 600 1.4cqw/1.2 var(--sans); box-shadow: none; }
.gs-num { color: #a3a1b3; }
.gs-sent, .gs-formula, .gs-menu h3 { font-family: var(--serif); letter-spacing: -.04em; }
.gs-sent { font-weight: 700; }
.gs-instr { background: var(--paper-2); color: var(--ink); border: .12cqw solid var(--line); border-radius: 1cqw; }
.gs-box, .gs-ref { background: var(--cream); border-color: var(--line); box-shadow: none; }
.gs-opt { border-color: var(--line); border-radius: 1.2cqw; box-shadow: none; }
.gs-opt.yes { background: var(--sage); border-color: var(--sage); }
.gs-menu button { border-color: var(--line); border-radius: 1.2cqw; font-family: var(--sans); }
.gs-menu button.on { background: var(--ink); border-color: var(--ink); }
.gs-link { background: var(--ink); color: #fff; }
.gs .gr-hl { box-shadow: 0 0 0 .4cqw var(--gold); }
.rv-stage .gs { box-shadow: var(--shadow); border: 1px solid var(--line); }
.lv-banner { background: var(--ink); border-radius: var(--r-md); }
/* Capa da aula: foto larga (16:9) ocupando o slide, no lugar do quadrado das ilustrações. */
.gs-img.big.cover { max-width: 100%; aspect-ratio: 16 / 9; }
/* Cabeçalho do slide em duas linhas: 1ª = aula e título (destaque), 2ª = a história, menor (gsHeadHtml em grammar.js). */
.gs-ht { display: flex; flex-direction: column; justify-content: center; gap: .25cqw; min-width: 0; }
.gs-t1 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gs-t2 { font: 500 2cqw/1.2 var(--sans); letter-spacing: -.01em; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Videochamada 1:1 da aula ao vivo (live.js): quadradinho da outra pessoa com a própria imagem no canto. */
#lv-cam { position: fixed; z-index: 1100; right: 12px; top: 64px; width: 220px; border-radius: 14px; overflow: hidden; background: #1f1c3d; box-shadow: 0 8px 30px rgba(0, 0, 0, .4); }
#lv-cam.t { right: auto; left: 12px; top: auto; bottom: 72px; }
#lv-cam video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #1f1c3d; }
#lv-cam .me { position: absolute; right: 6px; top: 6px; width: 64px; border-radius: 8px; border: 2px solid #fff; transform: scaleX(-1); }
#lv-cam { touch-action: none; cursor: grab; }
#lv-cam.min { width: auto; }
#lv-cam.min video { display: none; }
#lv-cam .ctl { display: flex; gap: 6px; justify-content: center; padding: 6px; background: rgba(0, 0, 0, .35); }
#lv-cam .ctl .btn { color: #fff; border-color: rgba(255, 255, 255, .35); }
@media (max-width: 700px) { #lv-cam { width: 150px; } #lv-cam .me { width: 44px; } }

/* Verso das cartas da memória: balão da talk2go nas perguntas, nome nas respostas */
.mem-c { position: relative; }
.mem-c::after { content: ""; position: absolute; inset: 22%; background: rgba(255, 255, 255, .9); -webkit-mask: var(--mem-logo) center / contain no-repeat; mask: var(--mem-logo) center / contain no-repeat; pointer-events: none; }
.mem-c.s0 { --mem-logo: url(../icons/logo/simbolo.svg); }
.mem-c.s1 { --mem-logo: url(../icons/logo/talk2go.svg); }
.mem-c.s1::after { inset: 30% 14%; }
.mem-c.up::after, .mem-c.ok::after { display: none; }

/* badges: último slide da aula e sala de troféus */
.gs-badge-info { max-width: 80cqw; font-size: 2.6cqw; line-height: 1.35; color: var(--ink-soft); text-align: center; }
.gs-badge-info span { display: block; font-weight: 700; }
.gs-badge { height: 22cqw; width: auto; max-width: 30cqw; object-fit: contain; }
.gs-end { flex-direction: row; gap: 5cqw; text-align: left; }
.gs-end .gs-badge { height: 34cqw; max-width: 36cqw; flex: none; }
.gs-endtext { display: flex; flex-direction: column; align-items: flex-start; gap: 2cqw; min-width: 0; }
.gs-end .gs-sent { font-size: 6cqw; }
.gs-end .gs-note { text-align: left; }
.gs-end .gs-badge-info { max-width: none; text-align: left; }
.trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px; margin-top: 12px; }
.trophies figure { margin: 0; text-align: center; }
.trophies img { width: 100%; height: 110px; object-fit: contain; }
.trophies figcaption { font-size: 13px; font-weight: 600; margin-top: 4px; }
.lesson-badge { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.lesson-badge img { height: 120px; width: auto; }

/* Trecho de música (clip.js): vídeo do YouTube com a letra do trecho; o áudio para na palavra que falta. */
.clip { display: flex; flex-direction: column; gap: 12px; margin: 6px 0; }
.clip-vid { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: #000; }
.clip-vid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.clip-poster { position: absolute; inset: 0; width: 100%; border: 0; background: #000 center / cover no-repeat; cursor: pointer; display: grid; place-items: center; }
.clip-poster span { width: 64px; height: 64px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 26px; display: grid; place-items: center; padding-left: 4px; }
.clip-out { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 12px; color: #fff; text-align: center; }
.clip-out p { margin: 0; font-weight: 700; font-size: 15px; }
.clip-credit { margin: 0; font-size: 13px; color: var(--ink-soft); }
.clip-capnote { margin: 0; padding: 8px 12px; border: 2px solid var(--warn); border-radius: var(--r-md); background: var(--paper-2); font-size: 13px; line-height: 1.4; }
.clip-text { font-size: 22px; font-weight: 700; line-height: 1.9; text-align: center; }
.clip-slot { display: inline-block; min-width: 5ch; margin: 0 4px; border-bottom: 4px solid var(--line); text-align: center; color: var(--ink); }
.clip-slot.cur { border-color: var(--gold); }
.clip-slot.ok { border-color: var(--ok); color: var(--ok); }
.clip-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.clip-opts:empty { display: none; }
.clip-opt { min-height: 56px; border: 0; border-radius: var(--r-md); color: #fff; font: inherit; font-weight: 800; font-size: 18px; cursor: pointer; padding: 8px 12px; }
.clip-opt.c0 { background: #e5484d; } .clip-opt.c1 { background: #2fa84f; } .clip-opt.c2 { background: #f08a1c; } .clip-opt.c3 { background: #2f8fe0; }
.clip-opt.bad, .clip-opt:disabled { opacity: .35; cursor: default; }
.clip-bar { text-align: center; }
.clip-msg { margin: 0; text-align: center; font-weight: 700; color: var(--ok); min-height: 1.2em; }
.clip-ed { margin: 6px 0 14px; }
.clip-ed-vid { aspect-ratio: 16 / 9; max-width: 420px; margin-top: 8px; border-radius: var(--r-md); overflow: hidden; background: #000; }
.clip-ed-vid:empty { display: none; }
.clip-ed-vid iframe { width: 100%; height: 100%; border: 0; }
.clip-ed-bar { align-items: center; margin-top: 8px; }
.clip-gaprow { border: 2px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 10px; background: var(--white); }
.clip-gaprow .field button { margin-top: 6px; }
.clip-ed-bar[hidden] { display: none; }

/* Acompanhar (track.js): barra de quantos alunos concluíram um envio. */
.trk-bar { height: 8px; border-radius: 99px; background: var(--paper-2); overflow: hidden; margin-top: 10px; }
.trk-bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.hub-bar { position: sticky; top: 8px; z-index: 5; box-shadow: 0 6px 18px rgba(0, 0, 0, .08); }

/* Aula com avatar (js/avatar.js): a professora-avatar ao lado do slide; o cartão da pergunta aparece ao lado do slide quando a aula espera a resposta. */
.av-side { align-items: center; text-align: center; padding-top: 22px; }
.av-ava { flex: none; width: 112px; height: 112px; border-radius: 50%; background: #2c2956; display: grid; place-items: center; font-size: 58px; border: 4px solid #3b3870; transition: border-color .2s; }
.av-ava.talk { border-color: #ff9a3c; animation: av-pulse 1.1s ease-in-out infinite; }
@keyframes av-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 154, 60, .55); } 50% { box-shadow: 0 0 0 14px rgba(255, 154, 60, 0); } }
.av-cap { width: 100%; text-align: left; font-size: 16px; line-height: 1.45; font-weight: 600; background: rgba(255, 255, 255, .08); border-radius: 14px; padding: 12px 14px; }
.av-pt { width: 100%; text-align: left; font-size: 14px; opacity: .8; }
.av-cap:empty, .av-pt:empty { display: none; }
.av-ctl { display: flex; gap: 8px; justify-content: center; }
.av-prog { width: 100%; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.av-prog i { display: block; height: 100%; width: 0; background: #ff9a3c; transition: width .3s; }
.lv-main.av-asking { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); align-items: start; justify-content: center; gap: 16px; max-width: 1180px; }
.av-asking .gs { width: 100%; }
.av-asking .lv-q { width: 100%; }
.av-row textarea { width: 100%; margin-bottom: 8px; }
.av-row-h { margin-bottom: 8px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
@media (max-width: 900px) { .lv-main.av-asking { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .gov.has-side.av { padding-right: 0; } .av-side { position: static; width: 100%; } }
@media (hover: none) { .gov.av .lv-top .btn.ghost:hover, .gov.av .av-ctl .btn.ghost:hover { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); } } /* no toque o :hover fica preso depois do clique e deixava o botão claro */
/* Player da aula do aluno (js/avatar.js) em qualquer tela, sem a boneca: em cima o título e o botão CC; no meio a legenda (se ligada) e o quadro, que rola; embaixo a barra de controles. */
.gov.av { overflow: hidden; padding-right: 0; }
.gov.av .lv-top { flex: none; flex-wrap: nowrap; padding: 8px 12px; }
.gov.av .lv-top > b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.gov.av .lv-top .row { flex: none; }
.gov.av .av-side { display: contents; }
.gov.av .av-says { display: block; order: 1; width: 100%; max-width: 760px; box-sizing: border-box; padding: 0 12px; }
.gov.av .av-cap, .gov.av .av-pt { font-size: 15px; line-height: 1.35; padding: 0 12px; border-block: 8px solid transparent; margin-bottom: 6px; } /* a borda, e não o padding, para o corte de linhas não deixar a próxima linha aparecer */
.gov.av .av-cap { max-height: calc(5.4em + 16px); overflow-y: auto; } /* a legenda (botão CC) mostra a fala inteira; se for longa, rola */
.gov.av .av-cc { min-width: 56px; padding: 5px 10px; font-weight: 800; }
.gov.av.plain [data-avs=pause], .gov.av.plain [data-avs=again] { display: none; } /* aula sem professora: sem pausa nem "ouvir de novo" */
.gov.av.plain .av-cap { max-height: 28vh; white-space: pre-line; } /* a legenda é o texto do áudio (um turno por linha) */
.gov.av.plain .av-cap:empty, .gov.av.plain .av-pt { display: none; }
.gov.av .lv-top .btn.av-cc[aria-pressed=true], .gov.av .lv-top .btn.av-cc[aria-pressed=true]:hover { background: #ff9a3c; color: #2b2a4c; box-shadow: none; }
.gov.av .lv-main { order: 2; flex: 1 1 0; min-height: 0; overflow-y: auto; justify-content: flex-start; padding: 6px 12px 16px; -webkit-overflow-scrolling: touch; }
.gov.av .lv-main > .gs { flex: none; margin-block: auto; }
.gov.av .gs { box-shadow: none; } /* a sombra do quadro (posicionado) pintava por cima do cartão da pergunta */
.gov.av #av-wait { order: 3; width: 100%; max-width: 760px; box-sizing: border-box; padding: 0 12px 6px; }
.gov.av #av-wait:empty { display: none; }
.gov.av #av-wait:not(:empty) { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gov.av .av-prog { order: 4; flex: none; width: calc(100% - 24px); max-width: 560px; }
.gov.av #av-num { display: none; }
.gov.av .av-ctl { order: 5; flex: none; width: 100%; max-width: 560px; box-sizing: border-box; gap: 10px; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); }
.gov.av .av-ctl .btn { flex: 1; align-self: stretch; min-height: 46px; justify-content: center; }
.gov.av .lv-q .qbox { border-top: 0; padding-top: 0; margin-top: 0; }
@media (min-width: 701px) { .gov.av .lv-main:not(.av-asking) > .gs { width: min(100%, calc((100vh - 190px) * 4 / 3)); } } /* tablet e computador: o quadro 4:3 cabe entre o título e a barra de baixo */
@media (min-width: 901px) { .gov.av .lv-main.av-asking > .gs { width: min(100%, calc((100vh - 230px) * 4 / 3)); } } /* com a pergunta ao lado, o quadro também cabe sem cortar */
/* Até a largura do tablet em pé, a pergunta ocupa a tela toda: o quadro vira uma faixa só com o que a resposta usa (player, texto de apoio, figura) e o cartão da pergunta
   fica logo embaixo. Para ouvir a professora e o quadro de novo, o aluno usa os botões ↺ e ‹ da barra. Em tela larga, quadro e pergunta ficam lado a lado. */
@media (max-width: 900px) {
  .gov.av .lv-main.av-asking { display: flex; flex-direction: column; align-items: stretch; max-width: none; }
  .gov.av .lv-main.av-asking .gs { aspect-ratio: auto; min-height: 0; }
  .gov.av .lv-main.av-asking .gs-head, .gov.av .lv-main.av-asking .gs-bgimg, .gov.av .lv-main.av-asking .gs-instr, .gov.av .lv-main.av-asking .gs-ins,
  .gov.av .lv-main.av-asking .gs-num, .gov.av .lv-main.av-asking .gs-pleft { display: none; }
  .gov.av .lv-main.av-asking .gs-body { position: static; padding: 3cqw 4cqw; }
  .gov.av .lv-main.av-asking .gs-bare, .gov.av .lv-main.av-asking .gs-prac, .gov.av .lv-main.av-asking .gs-pbody { height: auto; padding-top: 0; min-height: 0; }
  .gov.av .lv-main.av-asking .has-bg { padding: 0; }
  .gov.av .lv-main.av-asking .has-bg > audio, .gov.av .lv-main.av-asking .has-bg > .aud { margin: 0 !important; }
  .gov.av .lv-q { flex: none; }
}
/* A boneca (js/avatar.js, avTalkInit): a foto parada e, por cima, o clipe de fala que estiver tocando. */
.av-ava:has(img) { position: relative; overflow: hidden; width: 150px; height: 150px; border-width: 3px; }
.av-ava img, .av-ava video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.av-ava video { opacity: 0; transition: opacity .12s linear; }
.av-ava video.on { opacity: 1; }
.av-ava.talk:has(img) { animation: none; box-shadow: 0 0 0 5px rgba(255, 154, 60, .45); }
/* Boneca nova: o vídeo parado (mexe a cabeça) fica sempre embaixo; o vídeo da fala, com a boca sincronizada, aparece por cima enquanto ela fala. */
.av-ava.d2 { position: relative; overflow: hidden; width: 168px; height: 168px; border-width: 3px; }
.av-ava.d2 video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; transition: none; }
.av-ava.d2 video.av-say { opacity: 0; }
.av-ava.d2 video.av-say.on { opacity: 1; }
.av-ava.d2.talk { animation: none; box-shadow: 0 0 0 5px rgba(255, 154, 60, .45); }

/* Score do aluno: card no Início e linha do tempo de marcos em Progresso. */
.score-card { display: block; width: 100%; margin-top: 16px; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.sc-top { display: flex; align-items: baseline; gap: 12px; }
.sc-num, .sc-big { font-family: var(--serif); font-weight: 800; line-height: 1; color: var(--ink); }
.sc-num { font-size: 44px; }
.sc-big { font-size: 72px; }
.sc-hero { text-align: center; }
.sc-bar { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.sc-bar b { flex: none; color: var(--ink-soft); font-size: 14px; }
.sc-say { margin-top: 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--paper); text-align: left; }
.sc-line { margin-top: 6px; }
.sc-lv { position: relative; padding: 14px 0 0 66px; font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--ink-soft); }
.sc-lv::before { content: ""; position: absolute; left: 21px; top: 0; bottom: 0; width: 8px; background: var(--line); }
.sc-row { position: relative; display: flex; align-items: center; gap: 16px; padding: 14px 0; min-height: 64px; }
.sc-row::before { content: ""; position: absolute; left: 21px; top: -6px; bottom: -6px; width: 8px; border-radius: 4px; background: var(--line); }
.sc-row.on::before { background: var(--bar-grad); }
.sc-row.edge::before { background: linear-gradient(var(--bar-grad) 50%, var(--line) 50%); }
.sc-row.first::before { top: 50%; }
.sc-row.last::before { bottom: 50%; }
.sc-dot { position: relative; z-index: 1; flex: none; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: var(--paper-2); filter: grayscale(1); }
.sc-dot.on { background: var(--bar-grad); filter: none; }
/* Setas ‹ › (CHEV em app.js): ícone em vez do caractere, que ficava minúsculo nos botões. */
.chev { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.btn.small .chev { width: 22px; height: 22px; vertical-align: middle; }
.crumb-back .chev { width: 24px; height: 24px; display: block; margin: auto; }
.crumb-back { padding: 0; }
.lesson-nav .chev { width: 32px; height: 32px; display: block; }
.lesson-nav { padding: 0 4px; }
.muted .chev { width: 20px; height: 20px; vertical-align: middle; }

/* Professora na tela do aluno (mesmo computador) */
.as-student { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; padding: 10px 14px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-md); }
