/* =========================================================
   Foca.ai: linha "Vidro" (aprovada pelo Kauê em 21/10, protótipo em docs/nova-linha/).
   Carrega por ÚLTIMO, por cima da base do Limpo. É o único visual do app desde 22/10.
   Regras da linha: fundo com luz suave (nunca roxo), superfícies de vidro com reflexo fino na borda de cima,
   o azul é a única cor de ação, verde-água só em detalhe, números grandes, cantos generosos, sem emoji na interface.
   ========================================================= */

/* ---------- tokens ---------- */
:root {
  --papel: #eef1f6;
  --folha: rgb(255 255 255 / .72);
  --folha-2: rgb(13 26 51 / .045);
  --folha-solida: #ffffff;
  --vidro: linear-gradient(180deg, rgb(255 255 255 / .74), rgb(255 255 255 / .5));
  --borda-luz: rgb(255 255 255 / .95); --borda-meio: rgb(255 255 255 / .35); --borda-fim: rgb(255 255 255 / .6);
  --seg-ativo: #ffffff;
  --hover: rgb(13 26 51 / .05);
  --linha: rgb(13 26 51 / .08);
  --linha-forte: rgb(13 26 51 / .14);
  --vidro-borda: rgb(255 255 255 / .75);
  --brilho: rgb(255 255 255 / .9);
  --tinta: #0d1a33; --tinta-2: #3d4860; --tinta-3: #69738a; --tinta-4: #98a1b3;
  --marinho: #0b2556; --marinho-2: #2356f6;
  --acento: #2356f6; --acento-forte: #1a45d6; --acento-claro: rgb(35 86 246 / .09);
  --faisca: #14bfae;
  --lavanda: rgb(35 86 246 / .08); --marca-claro: rgb(35 86 246 / .08);
  --botao: #2356f6; --botao-texto: #ffffff;
  --botao-gradiente: linear-gradient(180deg, #4b78ff, #2356f6);
  --gradiente: linear-gradient(180deg, #4b78ff, #2356f6);
  --gradiente-acento: linear-gradient(90deg, #2356f6, #14bfae);
  --certo: #13915f; --certo-fundo: rgb(19 145 95 / .1); --certo-linha: rgb(19 145 95 / .3);
  --errado: #c8322b; --errado-fundo: rgb(200 50 43 / .08); --errado-linha: rgb(200 50 43 / .28);
  --ouro: #8a5a00; --aviso: #b54708;
  --azul-fundo: rgb(35 86 246 / .08); --azul: #2356f6;
  --verde-fundo: rgb(20 191 174 / .1); --verde: #0d8f82;
  --laranja-fundo: rgb(240 134 43 / .1); --laranja: #b54708;
  --roxo-fundo: rgb(35 86 246 / .08); --roxo: #2356f6;
  --sombra: 0 1px 2px rgb(13 26 51 / .05), 0 14px 34px -20px rgb(13 26 51 / .3);
  --sombra-forte: 0 24px 56px -24px rgb(13 26 51 / .45);
  --fundo-app:
    linear-gradient(180deg, #f6f7fa, #eef1f6);
  --luz-1: rgb(64 110 255 / .26); --luz-2: rgb(20 191 174 / .2); --luz-3: rgb(120 160 255 / .14);
  --nav-fundo: rgb(255 255 255 / .72);
  --ind-fundo: rgb(255 255 255 / .9);
  --barra-navegador: #f1f3f8;
  --abertura-fundo: radial-gradient(70vmax 45vmax at 50% 42%, rgb(64 110 255 / .3) 0%, rgb(64 110 255 / 0) 62%), radial-gradient(50vmax 35vmax at 85% 95%, rgb(20 191 174 / .14), transparent 70%), linear-gradient(180deg, #f6f7fa, #e9edf5);
  --abertura-texto: #0d1a33; --abertura-ai: #0f9f91; --abertura-frase: rgb(13 26 51 / .55);
  --titulo: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
  --sans: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
  --raio: 20px;
  --raio-p: 14px;
  /* desfoque só onde há conteúdo passando por baixo (barra de baixo e do topo no celular). Nos cartões ele não muda
     nada (atrás deles é o fundo liso) e travava placas de vídeo simples no computador: fica desligado. */
  --desfoque: none;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --papel: #05070b;
  --folha: rgb(255 255 255 / .055);
  --folha-2: rgb(255 255 255 / .06);
  --folha-solida: #151d29;
  --vidro: linear-gradient(180deg, rgb(255 255 255 / .075), rgb(255 255 255 / .025));
  --borda-luz: rgb(255 255 255 / .22); --borda-meio: rgb(255 255 255 / .04); --borda-fim: rgb(255 255 255 / .08);
  --seg-ativo: rgb(255 255 255 / .12);
  --hover: rgb(255 255 255 / .06);
  --linha: rgb(255 255 255 / .08);
  --linha-forte: rgb(255 255 255 / .14);
  --vidro-borda: rgb(255 255 255 / .09);
  --brilho: rgb(255 255 255 / .14);
  --tinta: #f2f4f7; --tinta-2: #b9c0cc; --tinta-3: #8a93a2; --tinta-4: #5f6876;
  --marinho: #e8edf7; --marinho-2: #8fb0ff;
  --acento: #6a92ff; --acento-forte: #8fb0ff; --acento-claro: rgb(106 146 255 / .14);
  --faisca: #3ad9c6;
  --lavanda: rgb(106 146 255 / .12); --marca-claro: rgb(106 146 255 / .12);
  --botao: #4f7dff; --botao-texto: #ffffff;
  --botao-gradiente: linear-gradient(180deg, #6a92ff, #3f6cf0);
  --gradiente: linear-gradient(180deg, #6a92ff, #3f6cf0);
  --gradiente-acento: linear-gradient(90deg, #5a85ff, #3ad9c6);
  --certo: #47cd89; --certo-fundo: rgb(71 205 137 / .12); --certo-linha: rgb(71 205 137 / .3);
  --errado: #f97066; --errado-fundo: rgb(249 112 102 / .12); --errado-linha: rgb(249 112 102 / .3);
  --ouro: #e2b355; --aviso: #f5a524;
  --azul-fundo: rgb(106 146 255 / .12); --azul: #8fb0ff;
  --verde-fundo: rgb(58 217 198 / .12); --verde: #5ee3d2;
  --laranja-fundo: rgb(245 165 36 / .12); --laranja: #ffb35c;
  --roxo-fundo: rgb(106 146 255 / .12); --roxo: #8fb0ff;
  --sombra: 0 18px 40px -22px rgb(0 0 0 / .9);
  --sombra-forte: 0 28px 60px -24px rgb(0 0 0 / .95);
  --fundo-app:
    linear-gradient(180deg, #182230 0%, #05070b 62%);
  --luz-1: rgb(64 110 255 / .2); --luz-2: rgb(30 170 160 / .06); --luz-3: rgb(255 255 255 / 0);
  --nav-fundo: rgb(28 36 50 / .78);
  --ind-fundo: rgb(255 255 255 / .12);
  --barra-navegador: #172130;
  --abertura-fundo: radial-gradient(70vmax 45vmax at 50% 42%, rgb(27 71 201 / .9) 0%, rgb(27 71 201 / 0) 60%), linear-gradient(180deg, #0d1626, #05070b);
  --abertura-texto: #ffffff; --abertura-ai: #3ad9c6; --abertura-frase: rgb(255 255 255 / .62);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --papel: #05070b;
  --folha: rgb(255 255 255 / .055);
  --folha-2: rgb(255 255 255 / .06);
  --folha-solida: #151d29;
  --vidro: linear-gradient(180deg, rgb(255 255 255 / .075), rgb(255 255 255 / .025));
  --borda-luz: rgb(255 255 255 / .22); --borda-meio: rgb(255 255 255 / .04); --borda-fim: rgb(255 255 255 / .08);
  --seg-ativo: rgb(255 255 255 / .12);
  --hover: rgb(255 255 255 / .06);
  --linha: rgb(255 255 255 / .08);
  --linha-forte: rgb(255 255 255 / .14);
  --vidro-borda: rgb(255 255 255 / .09);
  --brilho: rgb(255 255 255 / .14);
  --tinta: #f2f4f7; --tinta-2: #b9c0cc; --tinta-3: #8a93a2; --tinta-4: #5f6876;
  --marinho: #e8edf7; --marinho-2: #8fb0ff;
  --acento: #6a92ff; --acento-forte: #8fb0ff; --acento-claro: rgb(106 146 255 / .14);
  --faisca: #3ad9c6;
  --lavanda: rgb(106 146 255 / .12); --marca-claro: rgb(106 146 255 / .12);
  --botao: #4f7dff; --botao-texto: #ffffff;
  --botao-gradiente: linear-gradient(180deg, #6a92ff, #3f6cf0);
  --gradiente: linear-gradient(180deg, #6a92ff, #3f6cf0);
  --gradiente-acento: linear-gradient(90deg, #5a85ff, #3ad9c6);
  --certo: #47cd89; --certo-fundo: rgb(71 205 137 / .12); --certo-linha: rgb(71 205 137 / .3);
  --errado: #f97066; --errado-fundo: rgb(249 112 102 / .12); --errado-linha: rgb(249 112 102 / .3);
  --ouro: #e2b355; --aviso: #f5a524;
  --azul-fundo: rgb(106 146 255 / .12); --azul: #8fb0ff;
  --verde-fundo: rgb(58 217 198 / .12); --verde: #5ee3d2;
  --laranja-fundo: rgb(245 165 36 / .12); --laranja: #ffb35c;
  --roxo-fundo: rgb(106 146 255 / .12); --roxo: #8fb0ff;
  --sombra: 0 18px 40px -22px rgb(0 0 0 / .9);
  --sombra-forte: 0 28px 60px -24px rgb(0 0 0 / .95);
  --fundo-app:
    linear-gradient(180deg, #182230 0%, #05070b 62%);
  --luz-1: rgb(64 110 255 / .2); --luz-2: rgb(30 170 160 / .06); --luz-3: rgb(255 255 255 / 0);
  --nav-fundo: rgb(28 36 50 / .78);
  --ind-fundo: rgb(255 255 255 / .12);
  --barra-navegador: #172130;
  --abertura-fundo: radial-gradient(70vmax 45vmax at 50% 42%, rgb(27 71 201 / .9) 0%, rgb(27 71 201 / 0) 60%), linear-gradient(180deg, #0d1626, #05070b);
  --abertura-texto: #ffffff; --abertura-ai: #3ad9c6; --abertura-frase: rgb(255 255 255 / .62);
  color-scheme: dark;
}

/* ---------- base ---------- */
html { background: var(--papel); }
/* o fundo com luz é uma camada fixa (não repinta ao rolar) */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--fundo-app); }
body { background: none; font-family: var(--sans); font-size: 15px; letter-spacing: -.003em; }
.app { background: none; }
h1, h2, h3 { font-family: var(--titulo); letter-spacing: -.025em; }
::selection { background: color-mix(in srgb, var(--acento) 22%, transparent); }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; border-radius: 10px; }
* { scrollbar-color: var(--linha-forte) transparent; }
input, textarea { caret-color: var(--acento); }
.rotulo { color: var(--tinta-3); font-weight: 500; font-size: .76rem; }

/* ---------- vidro: as superfícies principais ---------- */
.cartao, .cartao-metas, .acao, .banner-osce, .banners, .nivel-card, .lista, .resultado, .questao, .tour-card,
.oferta, .aviso-plano, .banner-material, .folha-rosto, .agenda, .progresso-semana, .desempenho-resumo, .nav-plano, .nav-curso,
.dica-mascote, .form-prova, .peca-editor, .oab-cartao {
  background: var(--vidro);
  border: 1px solid transparent;
  border-radius: var(--raio);
  box-shadow: var(--sombra), inset 0 1px 0 var(--brilho);
  -webkit-backdrop-filter: var(--desfoque); backdrop-filter: var(--desfoque);
}
/* a borda que reflete luz (igual ao protótipo) */
.cartao::after, .cartao-metas::after, .acao::after, .banners::after, .nivel-card::after, .lista::after, .questao::after, .aviso-plano::after,
.oferta::after, .banner-material::after, .folha-rosto::after, .agenda::after, .progresso-semana::after, .desempenho-resumo::after, .resultado::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 0;
  background: linear-gradient(150deg, var(--borda-luz), var(--borda-meio) 38%, var(--borda-meio) 62%, var(--borda-fim));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
}
.cartao, .cartao-metas, .acao, .banners, .nivel-card, .lista, .questao, .aviso-plano, .oferta, .banner-material, .folha-rosto, .agenda, .progresso-semana, .desempenho-resumo, .resultado { position: relative; }
.banners .banner-osce, .lista .linha { background: none; border: 0; box-shadow: none; }
.modal-aceite .cartao::after, .cartao .cartao::after, .lista .cartao::after { display: none; }
/* listas dentro de cartões não ganham um segundo vidro */
.cartao .cartao, .cartao .lista, .lista .cartao { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ---------- botões ---------- */
.btn-primario {
  background: var(--botao-gradiente); color: var(--botao-texto); border: 0; border-radius: 999px; font-weight: 600;
  box-shadow: 0 10px 22px -12px var(--botao), inset 0 1px 0 rgb(255 255 255 / .3);
}
@media (hover: hover) and (pointer: fine) { .btn-primario:hover:not(:disabled) { filter: brightness(1.06); background: var(--botao-gradiente); } }
.btn-secundario {
  background: var(--folha); color: var(--tinta); border: 1px solid var(--linha-forte); border-radius: 999px; font-weight: 600;
  -webkit-backdrop-filter: var(--desfoque); backdrop-filter: var(--desfoque);
}
@media (hover: hover) and (pointer: fine) { .btn-secundario:hover:not(:disabled) { background: var(--hover); border-color: var(--linha-forte); } }
.btn-texto { color: var(--acento); }
.btn-icone { border-radius: 999px; }
.segmentado { background: var(--folha-2); border-radius: 999px; padding: 4px; }
.segmentado button { border-radius: 999px; }
.segmentado button[aria-checked="true"], .segmentado button[aria-selected="true"] { background: var(--seg-ativo); color: var(--tinta); box-shadow: 0 1px 3px rgb(0 0 0 / .12), inset 0 1px 0 var(--brilho); }

/* campos */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea, select {
  background: var(--folha); border-color: var(--linha-forte); border-radius: var(--raio-p);
}
input:not([type="checkbox"]):not([type="radio"]):focus, textarea:focus, select:focus { border-color: var(--acento); box-shadow: 0 0 0 4px var(--acento-claro); outline: none; }

/* selos e etiquetas */
.selo { border-radius: 999px; padding: 2px 9px; background: var(--folha-2); border-color: transparent; }
.selo.premium, .selo.unlimited { background: color-mix(in srgb, var(--ouro) 12%, transparent); border-color: transparent; color: var(--ouro); }

/* ---------- moldura do computador: menu de vidro à esquerda, conteúdo direto sobre o fundo ---------- */
@media (min-width: 921px) {
  .nav { margin: 12px 0 12px 12px; height: calc(100vh - 24px); top: 12px; border-radius: 26px; padding: 16px 12px;
    background: var(--nav-fundo); border: 1px solid var(--vidro-borda); box-shadow: var(--sombra), inset 0 1px 0 var(--brilho);
    -webkit-backdrop-filter: var(--desfoque); backdrop-filter: var(--desfoque); }
  .nav-item { border-radius: 12px; padding: 9px 12px; }
  .nav-item[aria-current="page"] { background: var(--ind-fundo); color: var(--tinta); box-shadow: inset 0 1px 0 var(--brilho), 0 4px 14px -8px rgb(0 0 0 / .3); }
  .nav-item[aria-current="page"]::before { display: none; }
  .nav-item[aria-current="page"] svg { color: var(--acento); }
  .palco { margin: 0; background: none; border: 0; border-radius: 0; min-height: 100vh; overflow: visible; }
  .barra { background: color-mix(in srgb, var(--barra-navegador) 90%, transparent); border-bottom: 0; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0 28px; }
  .conteudo { padding: 12px 32px 64px; }
}

/* ---------- celular: barra de baixo flutuante, de vidro ---------- */
@media (max-width: 920px) {
  .barra { background: color-mix(in srgb, var(--barra-navegador) 70%, transparent); border-bottom: 0; -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); }
  .nav {
    left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); height: 66px; padding: 6px; border-radius: 33px;
    border: 0; background: var(--nav-fundo);
    -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2);
    box-shadow: 0 20px 44px -18px rgb(13 26 51 / .45), inset 0 1px 1px var(--brilho), inset 0 0 0 .5px var(--vidro-borda);
  }
  .nav-item { border-radius: 27px; padding: 6px 2px; color: var(--tinta-2); transition: background .35s cubic-bezier(.22, 1, .36, 1), color .25s; }
  .nav-item[aria-current="page"] { background: var(--ind-fundo); color: var(--acento); box-shadow: inset 0 1px 1px var(--brilho), 0 4px 12px -6px rgb(0 0 0 / .3); }
  .nav-item[aria-current="page"] svg { color: var(--acento); background: none; }
  .conteudo { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .compositor-area { bottom: calc(86px + env(safe-area-inset-bottom)); }
}

/* ---------- avatar: a Foca num círculo colorido ---------- */
.avatar.avatar-foca { overflow: hidden; padding: 0; border: 0; background: var(--av, #dbe6ff); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .35), 0 4px 12px -6px rgb(13 26 51 / .4); }
.avatar.avatar-foca img { width: 100%; height: 100%; object-fit: cover; display: block; transform: translateY(6%) scale(1.05); }
.avatar.avatar-foca::after { display: none; }
.avatar-foca[data-cor="azul"] { --av: linear-gradient(160deg, #cfdcff, #9fb8ff); }
.avatar-foca[data-cor="menta"] { --av: linear-gradient(160deg, #cff6ee, #8de3d3); }
.avatar-foca[data-cor="ceu"] { --av: linear-gradient(160deg, #d6efff, #9cd2f7); }
.avatar-foca[data-cor="areia"] { --av: linear-gradient(160deg, #f6ecd9, #e7cfa3); }
.avatar-foca[data-cor="coral"] { --av: linear-gradient(160deg, #ffe0d6, #ffb49c); }
.avatar-foca[data-cor="grafite"] { --av: linear-gradient(160deg, #3b4657, #1b2230); }
.plano-premium .avatar.avatar-foca, .plano-unlimited .avatar.avatar-foca { background: var(--av); box-shadow: 0 0 0 2px var(--papel), 0 0 0 3.5px var(--acento); }
#perfil-avatar { cursor: pointer; }
#perfil-avatar::before { content: ""; position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; z-index: 1;
  background: var(--folha-solida) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232356f6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16z'/%3E%3C/svg%3E") center / 12px no-repeat;
  box-shadow: 0 2px 6px rgb(0 0 0 / .2); }
#perfil-avatar { overflow: visible; }
#perfil-avatar img { border-radius: 50%; }

/* escolha do avatar */
.escolha-avatar .cartao { max-width: 420px; width: 100%; display: flex; flex-direction: column; gap: 14px; text-align: center; background: var(--folha-solida); }
.escolha-avatar h2 { font-size: 1.2rem; }
.avatar-previa { display: flex; justify-content: center; }
.avatar-previa .avatar { width: 88px; height: 88px; }
.avatar-poses { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.avatar-poses button { border: 0; background: none; padding: 3px; border-radius: 50%; display: grid; place-items: center; }
.avatar-poses .avatar { width: 100%; aspect-ratio: 1; height: auto; }
.avatar-poses button[aria-checked="true"] { box-shadow: 0 0 0 2.5px var(--acento); }
.avatar-cores { display: flex; justify-content: center; gap: 10px; }
.avatar-cores button { border: 0; background: none; padding: 3px; border-radius: 50%; }
.avatar-cores i { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--av); }
.avatar-cores i[data-cor="azul"] { --av: linear-gradient(160deg, #cfdcff, #9fb8ff); }
.avatar-cores i[data-cor="menta"] { --av: linear-gradient(160deg, #cff6ee, #8de3d3); }
.avatar-cores i[data-cor="ceu"] { --av: linear-gradient(160deg, #d6efff, #9cd2f7); }
.avatar-cores i[data-cor="areia"] { --av: linear-gradient(160deg, #f6ecd9, #e7cfa3); }
.avatar-cores i[data-cor="coral"] { --av: linear-gradient(160deg, #ffe0d6, #ffb49c); }
.avatar-cores i[data-cor="grafite"] { --av: linear-gradient(160deg, #3b4657, #1b2230); }
.avatar-cores button[aria-checked="true"] { box-shadow: 0 0 0 2.5px var(--acento); }
.avatar-botoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.escolha-avatar.saindo { animation: sumir .2s ease forwards; }
@keyframes sumir { to { opacity: 0; } }

/* ---------- abertura ---------- */
.abertura { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; color: var(--abertura-texto); background: var(--abertura-fundo); }
.abertura-grupo { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.abertura img { width: 220px; height: auto; margin-bottom: -6px; opacity: 0; transform: translateY(18px) scale(.86); filter: blur(10px); animation: ab-foca .75s cubic-bezier(.16, 1, .3, 1) .05s forwards; }
.abertura-nome { font-family: "Onest", "Segoe UI", system-ui, sans-serif; font-size: 2rem; font-weight: 700; letter-spacing: -.04em; display: flex; overflow: hidden; line-height: 1.15; }
.abertura-nome span { display: inline-block; transform: translateY(105%); animation: ab-sobe .6s cubic-bezier(.16, 1, .3, 1) forwards; animation-delay: calc(.35s + var(--i) * .035s); }
.abertura-nome .ai { color: var(--abertura-ai); }
.abertura-frase { font-family: "Onest", "Segoe UI", system-ui, sans-serif; font-size: .95rem; color: var(--abertura-frase); opacity: 0; transform: translateY(6px); animation: ab-frase .5s cubic-bezier(.16, 1, .3, 1) .72s forwards; }
.abertura.saindo { animation: ab-sai .7s cubic-bezier(.7, 0, .2, 1) forwards; }
.abertura.saindo .abertura-grupo { animation: ab-grupo .45s cubic-bezier(.7, 0, .2, 1) forwards; }
@keyframes ab-foca { to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes ab-sobe { to { transform: translateY(0); } }
@keyframes ab-frase { to { opacity: 1; transform: none; } }
@keyframes ab-sai { to { clip-path: inset(0 0 100% 0 round 0 0 40px 40px); } }
@keyframes ab-grupo { to { transform: translateY(-40px) scale(.94); opacity: 0; } }
/* o app entra em cascata logo depois */
.app-entrando .tela:not([hidden]) > * { animation: app-entra .65s cubic-bezier(.16, 1, .3, 1) both; }
.app-entrando .tela:not([hidden]) > *:nth-child(2) { animation-delay: .06s; }
.app-entrando .tela:not([hidden]) > *:nth-child(3) { animation-delay: .12s; }
.app-entrando .tela:not([hidden]) > *:nth-child(4) { animation-delay: .18s; }
.app-entrando .tela:not([hidden]) > *:nth-child(n+5) { animation-delay: .24s; }
@keyframes app-entra { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }

/* ---------- janelas por cima (presente, tutorial, novidades, checkout, avisos): vidro mais sólido ---------- */
.modal-aceite { background: rgb(5 9 18 / .55); }
.modal-aceite .cartao, .ck-janela, .tour-card, .paleta {
  background: var(--folha-solida); border: 1px solid var(--vidro-borda); border-radius: 26px; box-shadow: var(--sombra-forte), inset 0 1px 0 var(--brilho);
}
.toast-foca { background: var(--folha-solida); color: var(--tinta); border: 1px solid var(--vidro-borda); border-radius: 999px; box-shadow: var(--sombra-forte); }

@media (prefers-reduced-motion: reduce) {
  .abertura, .abertura *, .app-entrando .tela > * { animation-duration: .01ms !important; animation-delay: 0ms !important; }
}
/* celular fraco ou economia de energia: vidro sem desfoque (mesma cara, mais leve) */
@media (prefers-reduced-transparency: reduce) {
  :root { --desfoque: none; }
  .nav, .barra { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: var(--folha-solida) !important; }
}

/* =========================================================
   Telas
   ========================================================= */

/* ---------- Início: igual ao protótipo aprovado (docs/nova-linha/foca-nova-linha.html) ---------- */
/* cabeçalho: data, saudação, foguinho e avatar numa linha */
#tela-inicio .ola { display: flex; flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; text-align: left !important; gap: 10px; margin: 0 0 18px !important; padding: 2px 2px 0; }
#tela-inicio .ola-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start !important; text-align: left !important; }
#tela-inicio .ola-data { font-size: .8rem; color: var(--tinta-3); font-weight: 500; }
#tela-inicio .ola h1 { margin: 2px 0 0; font-size: 1.62rem !important; font-weight: 700 !important; letter-spacing: -.035em !important; line-height: 1.1 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
#tela-inicio .sequencia { align-self: center !important; flex: none; height: 36px; padding: 0 12px 0 10px; gap: 6px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--tinta); font-variant-numeric: tabular-nums;
  background: var(--vidro); border: 0; box-shadow: var(--sombra), inset 0 1px 0 var(--brilho); }
#tela-inicio .sequencia::before { width: 17px !important; height: 17px !important; background: var(--acao-icone, var(--acento)) !important; opacity: 1 !important; filter: none !important; animation: none !important; }
#tela-inicio .sequencia.ativa::before { background: linear-gradient(180deg, #fde047 0%, #fb923c 50%, #ea580c 100%) !important; }
.ola-avatar { flex: none; border: 0; background: none; padding: 0; border-radius: 50%; cursor: pointer; }
.ola-avatar .avatar { width: 40px; height: 40px; }
@media (min-width: 921px) { .ola-avatar { display: none; } }
/* no celular, o Início não tem a barra do topo (o avatar já está no cabeçalho, como no protótipo) */
@media (max-width: 920px) {
  body:has(#tela-inicio:not([hidden])) .barra { display: none; }
  body:has(#tela-inicio:not([hidden])) .conteudo { padding-top: calc(14px + env(safe-area-inset-top)); }
}

/* blocos do Início: 14px entre eles */
#tela-inicio .inicio-principal { display: flex; flex-direction: column; gap: 14px; }
#tela-inicio .inicio-principal > * { margin: 0 !important; }

/* metas */
#tela-inicio .cartao-metas { padding: 20px !important; border-radius: 28px !important; }
.metas-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.metas-titulo { margin: 0 !important; font-size: 1.05rem !important; font-weight: 650 !important; letter-spacing: -.015em; color: var(--tinta) !important; }
.metas-sub { margin: 0 !important; font-size: .85rem !important; color: var(--tinta-2) !important; font-variant-numeric: tabular-nums; }
/* barra em 3 partes (uma por meta) */
.metas-barra { height: 6px !important; margin: 14px 0 6px !important; border-radius: 6px !important; background: var(--linha) !important;
  -webkit-mask: linear-gradient(90deg, #000 calc(33.333% - 3px), transparent 0 calc(33.333% + 3px), #000 0 calc(66.666% - 3px), transparent 0 calc(66.666% + 3px), #000 0);
  mask: linear-gradient(90deg, #000 calc(33.333% - 3px), transparent 0 calc(33.333% + 3px), #000 0 calc(66.666% - 3px), transparent 0 calc(66.666% + 3px), #000 0); }
.metas-barra span { background: var(--acento) !important; border-radius: 0 !important; transition: width .6s cubic-bezier(.22, 1, .36, 1) !important; }
.metas-lista { margin: 0 !important; gap: 0 !important; }
.metas-lista li { padding: 0 !important; border-top: 1px solid var(--linha) !important; gap: 12px !important; text-decoration: none !important; }
.metas-lista li:first-child { border-top: 0 !important; }
.metas-lista li::before { content: "" !important; flex: none; width: 24px !important; height: 24px !important; border-radius: 50% !important; border: 1.6px solid var(--tinta-3) !important; background: none !important; font-size: 0 !important; transition: background .25s, border-color .25s; }
.metas-lista li.feito::before { border-color: var(--certo) !important;
  background: var(--certo) url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27white%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27m6 12.5 4 4 8-9%27/%3E%3C/svg%3E") center / 14px no-repeat !important; }
.metas-lista li button { flex: 1; display: flex !important; align-items: center; gap: 12px; padding: 12px 2px !important; text-align: left; color: var(--tinta); }
.metas-lista li button::after { display: none !important; }
.meta-nome { flex: 1; min-width: 0; font-size: .95rem; font-weight: 500; }
.meta-destino { flex: none; font-size: .78rem; font-weight: 600; color: var(--acento); }
.metas-lista li.feito .meta-nome { color: var(--tinta-3); }

/* nível e próxima prova, lado a lado */
.inicio-dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#tela-inicio .nivel-card, #tela-inicio .prova-card { display: flex !important; flex-direction: column; align-items: flex-start !important; gap: 0 !important; padding: 20px !important; border-radius: 28px !important; text-align: left; position: relative; overflow: visible; color: var(--tinta); font: inherit; min-height: 150px; }
.inicio-dupla .rot, .continuar-meio .t1 { font-size: .8rem; color: var(--tinta-2); font-weight: 500; }
.nivel-numero, .prova-dias { font-size: 2.5rem; font-weight: 700; letter-spacing: -.045em; line-height: 1; margin: 10px 0 4px; font-variant-numeric: tabular-nums; color: var(--tinta); }
.nivel-numero small, .prova-dias small { font-size: 1rem; font-weight: 600; color: var(--tinta-3); letter-spacing: -.01em; margin-left: 2px; }
.nivel-premium { font-size: 1.3rem; letter-spacing: -.02em; color: var(--ouro); }
.prova-vazia { font-size: 1.3rem; letter-spacing: -.02em; color: var(--acento); }
#tela-inicio .nivel-barra { width: 100%; height: 6px !important; margin: 12px 0 0 !important; border-radius: 6px; background: var(--linha) !important; }
#tela-inicio .nivel-barra span { background: linear-gradient(90deg, var(--acento), var(--faisca)) !important; }
.nivel-nome { font-size: .8rem; color: var(--tinta-2); margin-top: 8px; line-height: 1.35; }
.prova-materia { margin-top: auto; padding-top: 8px; font-size: .82rem; color: var(--tinta-2); line-height: 1.35; }
/* emblema do nível: selo redondo com anel na cor da marca, no canto do cartão */
#tela-inicio .nivel-card .nivel-emoji { position: absolute; right: 12px; top: -18px; }
#tela-inicio .nivel-card .nivel-emoji .foca-nivel { width: 58px !important; height: 58px !important; }
#tela-inicio .nivel-card.apagado { opacity: 1; }
#tela-inicio .nivel-card.apagado .nivel-emoji { filter: grayscale(.4); }

/* continuar de onde parou */
#tela-inicio .continuar-card { display: flex; align-items: center; gap: 14px; padding: 20px !important; border-radius: 28px !important; text-align: left; color: var(--tinta); font: inherit; width: 100%; }
.continuar-icone { width: 48px; height: 48px; flex: none; border-radius: 16px; display: grid; place-items: center; background: var(--acento-claro); color: var(--acento); }
.continuar-icone svg { width: 24px; height: 24px; }
.continuar-meio { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.continuar-meio .t2 { font-size: .98rem; font-weight: 650; letter-spacing: -.01em; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.continuar-meio .t3 { font-size: .8rem; color: var(--tinta-3); margin-top: 2px; }
.continuar-botao { flex: none; height: 40px; padding: 0 16px !important; display: inline-flex; align-items: center; border-radius: 999px; font-size: .88rem; }

/* ferramentas: quadradinhos em 3 colunas */
#tela-inicio .inicio-ferramentas-cabeca { display: flex !important; align-items: baseline; justify-content: space-between; margin: 10px 4px 0 !important; }
#tela-inicio .inicio-ferramentas-cabeca h2 { font-size: 1.05rem !important; font-weight: 650 !important; letter-spacing: -.015em; }
#tela-inicio .inicio-ferramentas-cabeca .dica { display: inline !important; font-size: .8rem; color: var(--tinta-3); }
#tela-inicio .acoes { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px !important; }
#tela-inicio .acao { display: flex !important; flex-direction: column; align-items: flex-start; gap: 10px !important; padding: 14px 12px 12px !important; border-radius: 22px !important; min-height: 104px; text-align: left; }
#tela-inicio .acao .acao-icone { width: 24px !important; height: 24px !important; }
#tela-inicio .acao .acao-icone svg { width: 24px !important; height: 24px !important; }
#tela-inicio .acao > strong { font-size: .86rem !important; font-weight: 600 !important; letter-spacing: -.01em; line-height: 1.2; }
#tela-inicio .acao > small:not(.uso-ferramenta) { display: none !important; }
#tela-inicio .acao .uso-ferramenta { margin-top: auto !important; padding: 0 !important; border: 0 !important; font-size: .74rem !important; color: var(--tinta-3) !important; }
/* mapas e trabalhos já estão nos quadradinhos: saem da lista de baixo */
#tela-inicio #banner-mapas, #tela-inicio #banner-trabalhos { display: none !important; }
@media (min-width: 921px) { #tela-inicio .acoes { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; } }
@media (min-width: 921px) and (max-width: 1199px) { #tela-inicio .acoes { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }

/* ícones das ferramentas na cor de ação */
[data-visual="limpo"] .acao .acao-icone, [data-visual="limpo"] .banner-osce .acao-icone { color: var(--acento) !important; }
.avatar.avatar-foca img { transform: translateY(4%); }

/* emblema de nível em todo lugar (Início, tela de Nível, festa de subir de nível): selo com anel na cor da marca */
.foca-nivel { border-radius: 50% !important; border: 3px solid transparent !important;
  background: linear-gradient(#fff, #fff) padding-box, conic-gradient(from 210deg, #2356f6, #14bfae, #6a92ff, #2356f6) border-box !important;
  box-shadow: 0 8px 20px -8px rgb(35 86 246 / .55) !important; object-fit: cover !important; }
.nivel-medalha .foca-nivel, .nivel-festa-emoji .foca-nivel { border-width: 4px !important; box-shadow: 0 14px 34px -10px rgb(35 86 246 / .6), 0 0 0 8px var(--acento-claro) !important; }

/* ---------- o que flutua por cima do conteúdo: vidro quase sólido (dá para ler sem o fundo atrapalhar) ---------- */
:root { --folha-flutua: rgb(255 255 255 / .97); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --folha-flutua: rgb(21 29 41 / .98); } }
:root[data-theme="dark"] { --folha-flutua: rgb(21 29 41 / .98); }
.folha, .resultados, .notificacao, .mm-painel, .paleta, .linha-menu, .cronometro, .tour-card, .ck-janela {
  background: var(--folha-flutua) !important;
}
.folha { border-radius: 28px 28px 0 0; border: 1px solid var(--vidro-borda); border-bottom: 0; box-shadow: 0 -20px 50px -20px rgb(0 0 0 / .35), inset 0 1px 0 var(--brilho); }
@media (min-width: 921px) { .folha { border-radius: 26px; border-bottom: 1px solid var(--vidro-borda); } }
.folha-fundo, .paleta-fundo, .ck-fundo { background: rgb(5 9 18 / .5) !important; }
/* campo dentro de uma caixa que já tem fundo e borda (busca com lupa, compositor do chat): sem segunda caixa */
.busca input, .compositor textarea, .compositor input, .paleta input, .campo-botao input { background: none !important; border: 0 !important; box-shadow: none !important; }
.busca { border-radius: var(--raio-p); border-color: var(--linha-forte); }

/* ---------- a Foca nas telas: poses oficiais, sem círculo branco ---------- */
.resposta-avatar { border-radius: 50% !important; background: linear-gradient(160deg, #cfdcff, #9fb8ff) !important; object-fit: cover; object-position: center 20%; box-shadow: 0 0 0 1px var(--vidro-borda); }
.ck-marca { border-radius: 50% !important; background: linear-gradient(160deg, #cfdcff, #9fb8ff) !important; object-fit: cover; }
.convite img, .resumo-intro img { width: 132px !important; height: auto !important; border-radius: 0 !important; box-shadow: none !important; background: none !important; filter: drop-shadow(0 14px 18px rgb(13 26 51 / .18)); }
.vazio-mascote { width: 120px !important; height: auto !important; border-radius: 0 !important; background: none !important; }
.dica-mascote img { border-radius: 0 !important; background: none !important; object-fit: contain; }

/* ---------- chat ---------- */
.pergunta { background: var(--acento-claro) !important; border: 0 !important; border-radius: 20px 20px 6px 20px !important; color: var(--tinta); box-shadow: none; }
.chip-materia, .chip-assuntos, .atalho, .sugestao, .chip { border-radius: 999px !important; background: var(--folha) !important; border: 1px solid var(--vidro-borda) !important;
  box-shadow: 0 1px 2px rgb(13 26 51 / .05), inset 0 1px 0 var(--brilho); -webkit-backdrop-filter: var(--desfoque); backdrop-filter: var(--desfoque); }
.compositor { border-radius: 24px !important; background: var(--folha-flutua) !important; border: 1px solid var(--vidro-borda) !important; box-shadow: var(--sombra), inset 0 1px 0 var(--brilho); }
.btn-enviar { border-radius: 50% !important; background: var(--botao-gradiente) !important; color: #fff !important; box-shadow: 0 6px 14px -6px var(--botao), inset 0 1px 0 rgb(255 255 255 / .3); }
.texto table { border-radius: 14px; overflow: hidden; }
.ferramentas { background: var(--folha-2) !important; border: 0 !important; border-radius: 999px !important; padding: 4px !important; }
.ferramentas button { border-radius: 999px !important; }
.ferramentas button[aria-current="true"] { background: var(--seg-ativo) !important; color: var(--tinta) !important; box-shadow: 0 1px 3px rgb(0 0 0 / .12), inset 0 1px 0 var(--brilho) !important; }

/* ---------- tutorial e novidades ---------- */
.tour-foco { border-radius: 22px !important; box-shadow: 0 0 0 2px rgb(255 255 255 / .9), 0 0 0 5px var(--acento), 0 0 0 9999px rgb(5 9 18 / .6) !important;
  transition: left .45s cubic-bezier(.22, 1, .36, 1), top .45s cubic-bezier(.22, 1, .36, 1), width .45s cubic-bezier(.22, 1, .36, 1), height .45s cubic-bezier(.22, 1, .36, 1) !important; }
.tour-card { border-radius: 24px !important; padding: 20px 20px 16px !important; transition: left .45s cubic-bezier(.22, 1, .36, 1), top .45s cubic-bezier(.22, 1, .36, 1) !important; }
.tour-foca { display: block; width: 120px; height: auto; margin: -6px auto 6px; filter: drop-shadow(0 12px 16px rgb(13 26 51 / .2)); animation: ab-foca .6s cubic-bezier(.16, 1, .3, 1) both; }
.tour-titulo { font-size: 1.15rem !important; letter-spacing: -.02em; }
.tour-contagem { font-variant-numeric: tabular-nums; color: var(--tinta-3) !important; }
.tour-itens li span[aria-hidden="true"]:empty { display: none; }
.tour-botoes .btn-primario, .tour-botoes .btn-secundario { border-radius: 999px; }

/* ---------- presente da equipe ---------- */
.presente { padding-top: 26px !important; }
.presente-caixa { width: 150px; height: 150px; font-size: 0 !important; display: grid; place-items: center; overflow: visible; position: relative; isolation: isolate; }
.presente-caixa::after { display: none !important; }
.presente-svg { width: 150px !important; height: 150px !important; overflow: visible; fill: initial; stroke: none; filter: drop-shadow(0 16px 20px rgb(28 63 184 / .35)); }
.pg-tampa { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .55s cubic-bezier(.2, 1.3, .4, 1), opacity .4s; }
.presente-foca { position: absolute; left: 50%; bottom: 32px; width: 150px; translate: -50% 0; opacity: 0; transform: translateY(40px) scale(.5); pointer-events: none; z-index: -1;
  transition: transform .6s cubic-bezier(.2, 1.4, .4, 1) .12s, opacity .25s .12s; }
.presente.aberto .presente-caixa { animation: none !important; }
.presente.aberto .pg-tampa { transform: translate(34px, -46px) rotate(24deg); opacity: 0; }
.presente.aberto .presente-foca { opacity: 1; transform: translateY(-38px) scale(1); }
.presente.aberto .presente-caixa { margin-top: 40px; transition: margin .5s cubic-bezier(.22, 1, .36, 1); }
.presente-msg { border: 0 !important; background: var(--acento-claro) !important; border-radius: 16px !important; }
.presente-plano b { color: var(--acento); }

/* ---------- entrar / criar conta ---------- */
.entrada-marca { background: radial-gradient(60vmax 40vmax at 30% 20%, rgb(27 71 201 / .85), rgb(27 71 201 / 0) 65%), linear-gradient(180deg, #0d1626, #05070b) !important; }
.entrada-marca::before { display: none !important; }
.entrada-marca::after { display: none !important; }
.entrada-pitch h1 { font-weight: 700 !important; letter-spacing: -.04em !important; }
.entrada-lista svg { color: #5ee3d2; }
.entrada-rodape img { background: none !important; box-shadow: none !important; width: 110px !important; height: auto !important; object-fit: contain !important; filter: drop-shadow(0 12px 18px rgb(0 0 0 / .45)); }
.entrada-form { background: var(--folha-solida) !important; }
.form-login .campo input, .form-login .campo-botao { border-radius: var(--raio-p) !important; padding: 14px 15px !important; }
.form-login .btn-primario { padding: 14px 18px; font-size: 1rem; }
.entrada-titulo { font-weight: 700 !important; letter-spacing: -.03em !important; }
@media (max-width: 920px) {
  .entrada-marca { padding: 22px 20px 70px !important; }
  .entrada-lista li { border-radius: 999px !important; background: rgb(255 255 255 / .08) !important; border: 1px solid rgb(255 255 255 / .12) !important; }
  .entrada-mascote-cel { background: none !important; box-shadow: none !important; border-radius: 0 !important; width: 104px !important; height: auto !important; top: 46px !important; right: 12px !important; object-fit: contain !important; transform: rotate(0) !important; filter: drop-shadow(0 14px 18px rgb(0 0 0 / .45)); }
  .entrada-form { border-radius: 28px 28px 0 0 !important; margin-top: -40px !important; box-shadow: 0 -18px 40px -18px rgb(0 0 0 / .5) !important; }
  .tela.entrada { background: var(--folha-solida) !important; }
}
.marca-nome .ai { color: var(--acento); }
.entrada-marca .marca-nome .ai { color: #3ad9c6; }
.osce-avatar { display: grid !important; place-items: center; font-size: 0 !important; background: var(--folha-2) !important; color: var(--tinta-2); border-radius: 50% !important; }
.osce-avatar svg { width: 18px; height: 18px; }
img.ck-festa { display: block; width: 150px; height: auto; margin: 0 auto 4px; font-size: 0; animation: ab-foca .6s cubic-bezier(.16, 1, .3, 1) both; filter: drop-shadow(0 14px 18px rgb(13 26 51 / .2)); }

/* ---------- simulado e flashcards ---------- */
.alternativa { border-radius: 16px !important; }
.alternativa .letra { border-radius: 50% !important; }
.cartao-face { border-radius: 26px !important; }
.cartao-frente { background: var(--folha) !important; border: 1px solid var(--vidro-borda) !important; box-shadow: var(--sombra), inset 0 1px 0 var(--brilho) !important; }
.cartao-verso { background: linear-gradient(160deg, #2f5ae6, #1c3fb8) !important; color: #fff !important; border: 0 !important; }
.cartao-verso .rotulo { color: rgb(255 255 255 / .7) !important; }
.cartao-espiao { display: block !important; position: absolute; right: 18px; bottom: -4px; width: 92px !important; height: auto !important; border-radius: 0 !important; background: none !important; pointer-events: none; }
.progresso { border-radius: 6px; }
.progresso span { background: var(--gradiente-acento) !important; }

/* matéria: o botão do mapa mental não encosta nos cartões das ferramentas */
.mapa-atalho { margin-top: 12px !important; }

/* computador: o cartão "Próxima prova" já mostra a prova, a caixa vazia da lateral sai */
#tela-inicio #provas-vazio { display: none !important; }

/* ---------- igual ao protótipo: detalhes finais ---------- */
/* Foca do joinha espiando no canto do cartão de nível */
.foca-nivel-inicio { position: absolute; width: 74px; right: 6px; top: -22px; pointer-events: none; filter: drop-shadow(0 10px 12px rgb(13 26 51 / .18)); z-index: 1; }
/* foguinho de traço, na cor de ação */
#tela-inicio .sequencia::before { content: "" !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21a6 6 0 0 0 6-6c0-3.2-2-5.3-3.4-7-.4 1.9-1.4 3-2.6 3.6.4-2.6-.2-5.4-1.5-7.6-.6 3.6-5.5 6-5.5 11A6 6 0 0 0 12 21zM12 21a2.5 2.5 0 0 1-2.5-2.5c0-1.6 1.4-2.4 2.5-3.8 1.1 1.4 2.5 2.2 2.5 3.8A2.5 2.5 0 0 1 12 21z'/%3E%3C/svg%3E") center / contain no-repeat !important;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21a6 6 0 0 0 6-6c0-3.2-2-5.3-3.4-7-.4 1.9-1.4 3-2.6 3.6.4-2.6-.2-5.4-1.5-7.6-.6 3.6-5.5 6-5.5 11A6 6 0 0 0 12 21zM12 21a2.5 2.5 0 0 1-2.5-2.5c0-1.6 1.4-2.4 2.5-3.8 1.1 1.4 2.5 2.2 2.5 3.8A2.5 2.5 0 0 1 12 21z'/%3E%3C/svg%3E") center / contain no-repeat !important;
  background: var(--acento) !important; }
#tela-inicio .sequencia.ativa::before { background: #f97316 !important; }
/* barra de baixo do celular: as mesmas 5 abas e medidas do protótipo (Agenda segue no cartão "Próxima prova" e no menu do computador) */
@media (max-width: 920px) {
  .nav-item[data-ir="plano"] { display: none !important; }
  .nav { left: 16px !important; right: 16px !important; height: 66px; }
  .nav-item { gap: 3px !important; font-size: .68rem !important; font-weight: 600 !important; }
  .nav-item svg { width: 23px !important; height: 23px !important; stroke-width: 1.8 !important; }
}

/* celular: vidro de verdade nos cartões (desfoque + saturação, como no protótipo), para "puxar" a luz azul do fundo.
   No computador fica sem (placas de vídeo simples travavam). */
@media (max-width: 920px) {
  .cartao, .cartao-metas, .acao, .nivel-card, .prova-card, .continuar-card, .sequencia, .banners, .aviso-plano, .lista {
    -webkit-backdrop-filter: blur(26px) saturate(1.8); backdrop-filter: blur(26px) saturate(1.8);
  }
}

/* luzes do fundo: os mesmos 3 círculos do protótipo. Desenhados com degradê (e não com desfoque, que pesava no
   computador): mesma aparência, quase sem custo. Só a posição se mexe; no computador ficam paradas. */
.luzes { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; contain: strict; }
.luzes i { position: absolute; border-radius: 50%; animation: vagar 26s ease-in-out infinite alternate; }
.luzes i:nth-child(1) { width: 460px; height: 460px; left: -180px; top: -120px; background: radial-gradient(closest-side, var(--luz-1) 45%, transparent); }
.luzes i:nth-child(2) { width: 380px; height: 380px; right: -170px; top: 240px; background: radial-gradient(closest-side, var(--luz-2) 45%, transparent); animation-duration: 32s; }
.luzes i:nth-child(3) { width: 420px; height: 420px; left: -120px; bottom: -100px; background: radial-gradient(closest-side, var(--luz-3) 45%, transparent); animation-duration: 38s; }
@keyframes vagar { to { transform: translate3d(40px, 60px, 0); } }
@media (min-width: 921px) {
  .luzes i { animation: none; }
  .luzes i:nth-child(1) { width: 820px; height: 820px; left: -260px; top: -320px; }
  .luzes i:nth-child(2) { width: 600px; height: 600px; }
  .luzes i:nth-child(3) { width: 640px; height: 640px; }
}
@media (prefers-reduced-motion: reduce) { .luzes i { animation: none; } }

/* a animação de entrada das telas não pode "ficar valendo" depois de terminar: isso isolava os cartões
   e o vidro deixava de enxergar a luz do fundo (no protótipo não acontece) */
.tela { animation-fill-mode: backwards !important; }
.app-entrando .tela:not([hidden]) > * { animation-fill-mode: backwards !important; }

/* ---------- botões lisos (como nas referências): cor chapada, sem degradê, sem reflexo, sem sombra que brilha ---------- */
:root { --botao: #1f4fe0; --botao-hover: #1a43c4; --botao-gradiente: var(--botao); --sec-fundo: rgb(13 26 51 / .06); --sec-hover: rgb(13 26 51 / .1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --botao: #3d6cf2; --botao-hover: #5079f4; --botao-gradiente: var(--botao); --sec-fundo: rgb(255 255 255 / .08); --sec-hover: rgb(255 255 255 / .12); } }
:root[data-theme="dark"] { --botao: #3d6cf2; --botao-hover: #5079f4; --botao-gradiente: var(--botao); --sec-fundo: rgb(255 255 255 / .08); --sec-hover: rgb(255 255 255 / .12); }
.btn-primario, .btn-enviar, .continuar-botao, .btn-nova { background: var(--botao) !important; box-shadow: none !important; filter: none !important; border: 0 !important; }
@media (hover: hover) and (pointer: fine) { .btn-primario:hover:not(:disabled), .btn-enviar:hover:not(:disabled) { background: var(--botao-hover) !important; } }
.btn-secundario { background: var(--sec-fundo) !important; border: 0 !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
@media (hover: hover) and (pointer: fine) { .btn-secundario:hover:not(:disabled) { background: var(--sec-hover) !important; } }
.btn-primario:active, .btn-secundario:active, .btn-enviar:active { transform: scale(.97); }

/* números com largura natural: na Onest, a largura fixa deixava o "1" com um vão (10, 13, 1 de 3...).
   Largura fixa só onde o número muda no lugar (cronômetros). */
body, body * { font-variant-numeric: proportional-nums !important; }
.cronometro, .cronometro *, [class*="relogio"], [class*="relogio"] *, .tempo-restante, .osce-tempo { font-variant-numeric: tabular-nums !important; }

/* chat: o nome da matéria aparece inteiro (os botões de cima quebram linha em vez de cortar) */
.estudo-topo { flex-wrap: wrap !important; }
.estudo-topo .chip-materia { max-width: 100% !important; flex: 0 1 auto !important; }
.estudo-topo .chip-materia span { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; text-align: left; line-height: 1.3; }
.estudo-topo .chip-materia { height: auto !important; min-height: 36px; padding-block: 8px !important; border-radius: 18px !important; }

/* tutorial: os botões ficam sempre visíveis no pé do cartão; se o texto não couber, só ele rola */
.tour-card { display: flex !important; flex-direction: column; overscroll-behavior: contain; }
.tour-botoes { position: sticky; bottom: -16px; z-index: 2; margin: auto -20px -16px !important; padding: 12px 20px 16px !important;
  background: var(--folha-flutua); border-top: 1px solid var(--linha); border-radius: 0 0 24px 24px; }
.tour-card { background: var(--folha-solida) !important; }
.tour-botoes { background: var(--folha-solida); }

/* área do relógio/bateria (iPhone): a página começa na cor do topo do app (antes o Safari pintava de quase preto)
   e uma faixa fixa do tamanho dessa área cobre o conteúdo que sobe por trás do relógio */
html { background: var(--barra-navegador); }
body::after { content: ""; position: fixed; left: 0; right: 0; top: 0; height: env(safe-area-inset-top, 0px); z-index: 60; pointer-events: none;
  background: color-mix(in srgb, var(--barra-navegador) 88%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.tour-botoes button { white-space: nowrap; }

/* fim do teste de 7 dias */
.fim-teste .cartao { max-width: 380px; width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; background: var(--folha-solida); }
.fim-teste-foca { width: 130px; height: auto; filter: drop-shadow(0 12px 16px rgb(13 26 51 / .18)); }
.fim-teste h2 { font-size: 1.3rem; }
.fim-teste p { margin: 0; color: var(--tinta-2); line-height: 1.5; }
.fim-teste-botoes { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 6px; }
.fim-teste-botoes .btn-primario { width: 100%; padding: 13px 18px; }
/* checkout de quem não tem Free: a coluna "Free" some da comparação */
.ck-sem-free .ck-comparativo th:nth-child(2), .ck-sem-free .ck-comparativo td:nth-child(2) { display: none; }
.ck-sem-free .ck-comparativo .ck-grupo th { display: table-cell; }

/* selo "Oferta de primeiro mês": fundo azul chapado e texto branco, no claro e no escuro (antes o texto escuro sumia no azul) */
.oferta-selo, :root[data-theme="dark"] .oferta-selo { background: #2356f6; color: #fff; }

/* ---------- chat no celular: nada passa por trás da barra de digitar nem da barra de baixo ---------- */
@media (max-width: 920px) {
  /* faixa por baixo da barra flutuante: o texto não aparece nas laterais nem embaixo da pílula */
  html::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: calc(86px + env(safe-area-inset-bottom)); z-index: 39; pointer-events: none;
    background: linear-gradient(to top, color-mix(in srgb, var(--papel) 96%, transparent) 62%, transparent); }
  .barra { background: color-mix(in srgb, var(--barra-navegador) 88%, transparent); }

  /* a área de digitar vira um bloco só, com fundo de verdade, que desce até a barra de baixo (sem ficar transparente) */
  .compositor-area {
    bottom: 0; margin-top: 8px; padding: 14px 0 calc(84px + env(safe-area-inset-bottom)); margin-bottom: calc(-100px - env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--papel) 96%, transparent) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  }
  .compositor-area::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 22px; pointer-events: none;
    background: linear-gradient(to top, color-mix(in srgb, var(--papel) 96%, transparent), transparent); }

  /* atalhos (Mais simples, Me testa...): respiro, sem cortar, sem emoji */
  .atalhos { gap: 8px; padding: 0 0 10px; margin: 0 -16px; padding-inline: 16px; scroll-padding-inline: 16px; -webkit-overflow-scrolling: touch; }
  .atalho { padding: 8px 14px; font-size: .84rem; white-space: nowrap; }

  /* rodapé do compositor: contador e aviso viram duas linhas curtas, em vez de um bloco que come a tela */
  .compositor-rodape { padding: 8px 6px 0; }
  .compositor-rodape .restante { font-size: .76rem; }
  .aviso-dados { font-size: .68rem; line-height: 1.35; margin: 2px 6px 0; text-align: left; opacity: .85; }
}

/* chat no computador: a área de digitar também tem fundo (o texto da conversa não passa por trás dos atalhos nem da caixa) */
@media (min-width: 921px) {
  .compositor-area { padding: 30px 0 12px; margin-top: 0;
    background: linear-gradient(to bottom, transparent 0, color-mix(in srgb, var(--papel) 97%, transparent) 26px) !important; }
  .atalhos { padding-bottom: 12px; }
  .atalho { white-space: nowrap; }
  .aviso-dados { font-size: .72rem; line-height: 1.35; margin: 4px 6px 0; }
}

/* Perfil: mudar o próprio nome */
.perfil-editar { padding: 0; margin-top: 6px; font-size: .84rem; font-weight: 600; color: var(--acento); }
.escolha-nome .cartao { max-width: 400px; width: 100%; display: flex; flex-direction: column; gap: 12px; background: var(--folha-solida); }
.escolha-nome h2 { font-size: 1.2rem; }
.escolha-nome .dica { margin: 0; }
.escolha-nome .erro { margin: 0; color: var(--erro, #d64545); font-size: .86rem; }
.escolha-nome .avatar-botoes { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }

/* barra de baixo do celular: pílula que desliza entre as abas e acompanha o dedo ao arrastar */
.nav-ind { display: none; }
@media (max-width: 920px) {
  .nav { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  .nav-ind { display: block; position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; border-radius: 27px; opacity: 0;
    background: var(--ind-fundo); box-shadow: inset 0 1px 1px var(--brilho), 0 4px 12px -6px rgb(0 0 0 / .3);
    transition: transform .55s cubic-bezier(.3, 1.3, .45, 1), width .4s cubic-bezier(.22, 1, .36, 1), height .4s, opacity .2s; will-change: transform; }
  .nav-item { position: relative; z-index: 1; }
  .nav-item[aria-current="page"] { background: none !important; box-shadow: none !important; }
  .nav-item[data-previa] { color: var(--acento); }
  .nav-item[data-previa] svg { color: var(--acento); }
  @media (prefers-reduced-motion: reduce) { .nav-ind { transition: none; } }
}

/* computador: a barra de cima não é mais uma faixa chapada; fica transparente e só ganha vidro quando a página rola por baixo dela */
@media (min-width: 921px) {
  .barra { background: transparent !important; -webkit-backdrop-filter: none; backdrop-filter: none; transition: background .25s, box-shadow .25s; }
  html.rolou .barra { background: color-mix(in srgb, var(--barra-navegador) 62%, transparent) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 1px 0 var(--vidro-borda); }
}

/* ---------- questão com figura (imagem livre do Wikimedia Commons) ---------- */
.questao-figura { margin: 14px 0 16px; }
.questao-figura .figura-abrir {
  display: block; width: 100%; padding: 0; border: 1px solid var(--linha-forte); border-radius: 14px; overflow: hidden;
  background: #0a0d14; cursor: zoom-in; -webkit-tap-highlight-color: transparent;
}
.questao-figura img { display: block; width: 100%; max-height: 340px; object-fit: contain; }
.questao-figura figcaption { margin-top: 8px; font-size: .72rem; line-height: 1.4; color: var(--tinta-3); overflow-wrap: anywhere; }
.questao-figura figcaption a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.figura-ampliada {
  position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px 16px 76px;
  background: rgb(5 8 14 / .92); cursor: zoom-out;
}
.figura-ampliada img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.figura-fechar {
  position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  min-height: 44px; padding: 0 22px; border: 1px solid rgb(255 255 255 / .25); border-radius: 999px;
  background: rgb(255 255 255 / .12); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}

/* tempo de estudo de hoje, à vista no cartão de metas */
.metas-tempo { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 12px 0 2px; font-size: .84rem; color: var(--tinta-3); }
.metas-tempo b { color: var(--tinta); font-weight: 600; font-variant-numeric: tabular-nums; }
.metas-dica { margin: 10px 0 0; font-size: .78rem; line-height: 1.4; color: var(--tinta-3); }
.metas-dica[hidden] { display: none; }

/* ---------- destaque "Enviar material" (Início e Matérias) ---------- */
.destaque-material {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; border: 0; border-radius: 20px;
  background: var(--botao-gradiente); color: #fff; text-align: left; font: inherit; cursor: pointer;
  box-shadow: 0 10px 26px -12px rgb(35 86 246 / .65); -webkit-tap-highlight-color: transparent;
}
#tela-inicio .destaque-material { margin: 0; }
.destaque-material-icone { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgb(255 255 255 / .18); }
.destaque-material-icone svg { width: 22px; height: 22px; color: #fff; stroke: #fff; }
.destaque-material-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.destaque-material-texto strong { font-size: 1rem; font-weight: 700; }
.destaque-material-texto small { font-size: .8rem; line-height: 1.35; opacity: .9; }
.destaque-material-seta svg { width: 18px; height: 18px; color: #fff; stroke: #fff; }
@media (hover: hover) and (pointer: fine) { .destaque-material:hover { filter: brightness(1.06); } }
.materias-atalhos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.atalho-meus-materiais {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--linha-forte); border-radius: 20px;
  background: var(--folha); color: var(--tinta); text-align: left; font: inherit; cursor: pointer;
}
.atalho-meus-materiais .destaque-material-texto small { color: var(--tinta-3); opacity: 1; }
@media (max-width: 520px) { .materias-atalhos { grid-template-columns: 1fr; } }

/* ---------- pastas, matérias criadas e "criar matéria" ---------- */
.organizacao { margin: 4px 0 14px; }
.organizacao .secao-cabeca { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.organizacao-vazio { margin: 0 0 6px; font-size: .84rem; color: var(--tinta-3); }
.pasta-acoes { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 4px 16px 12px; }
.btn-texto.perigo { color: #d64545; }
.opcao-criar-materia {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 12px 0 0; padding: 14px 16px; border: 1px dashed var(--acento);
  border-radius: 16px; background: var(--acento-claro); color: var(--tinta); text-align: left; font: inherit; cursor: pointer;
}
.opcao-criar-materia span:last-child { display: flex; flex-direction: column; gap: 2px; }
.opcao-criar-materia small { color: var(--tinta-3); font-size: .8rem; }

/* ---------- cartões próprios ---------- */
.baralho-inicio #meus-cartoes { margin-top: 10px; }
.meus-cartoes { display: flex; flex-direction: column; gap: 14px; }
.meus-cartoes .secao-cabeca { display: flex; align-items: center; justify-content: space-between; margin: 0; }
.mc-form { display: flex; flex-direction: column; gap: 10px; }
.mc-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--linha-forte); border-radius: 12px; background: var(--folha-solida); color: var(--tinta); font: inherit; resize: vertical; }
.mc-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mc-lista li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--linha); border-radius: 14px; }
.mc-lista li > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.mc-lista small { color: var(--tinta-3); font-size: .82rem; }
