/* Gabarito — app das lojas (Android/iOS) com o ESTILO DO SITE (Rafael, 9/11/2026: "estilo completo do site").
   A camada TS (limpo*.js/css, tema Papel e tinta) agora vale também no app; este arquivo, carregado por último e só com html.nativo,
   devolve o que é próprio do celular: a barra de baixo (Documentos · Notas · Iniciar Correção · Mais), as áreas seguras do aparelho,
   e tira o que só faz sentido no site (a linha de abas em texto na barra de cima, o botão "Corrigir pelo celular" e o rodapé). */

/* Barra de cima: logo e avatar, sem a segunda linha de abas (a navegação do app é a barra de baixo) */
html.nativo body.ts.ts .hdr .topnav, html.nativo body.ts.ts .hdr .lm-nav-ind, html.nativo body.ts.ts .hdr .lm-corrigir { display: none !important }
html.nativo body.ts.ts .hdr-in { flex-wrap: nowrap; padding-top: calc(8px + env(safe-area-inset-top, 0px)) }
html.nativo body.ts.ts .hdr { padding-top: 0 }

/* Rodapé do site (e-mail, Instagram) não existe no app */
html.nativo body.ts.ts .rodape { display: none !important }

/* Barra de baixo do app, no desenho do site: branca, faixa de quatro cores em cima, câmera em destaque */
html.nativo body.ts.ts .bnav { display: grid !important; position: fixed; inset: auto 0 0 0; z-index: 40; grid-template-columns: 1fr 1.3fr 1fr; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end;
  background: linear-gradient(90deg, #F0142F 0% 25%, #1D3557 25% 50%, #457B9D 50% 75%, #A8DADC 75% 100%) top / 100% 3px no-repeat, #FFFFFF;
  border-top: 0; padding: 7px 6px calc(6px + env(safe-area-inset-bottom, 0px)); height: auto }
html.nativo body.ts.ts .bnav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 48px; border: 0; background: none; color: #5E5D59; font: 500 11.5px/1.1 var(--f-sans, Inter, system-ui, sans-serif); letter-spacing: 0; text-transform: none; padding: 4px 0; border-radius: 8px }
html.nativo body.ts.ts .bnav button .ic, html.nativo body.ts.ts .bnav button svg { width: 22px; height: 22px; color: #5E5D59 !important; stroke: currentColor !important; opacity: 1 }
html.nativo body.ts.ts .bnav button[aria-current="page"], html.nativo body.ts.ts .bnav button[aria-current="page"] svg { color: #1D3557 !important; font-weight: 700 }
html.nativo body.ts.ts .bnav .cam-main { background: #F0142F; color: #fff !important; margin-top: -16px; padding: 7px 4px; border-radius: 14px; border: 3px solid #fff; box-shadow: 0 6px 16px rgba(240, 20, 47, .32); font-size: 11px; font-weight: 700; white-space: nowrap; min-height: 56px }
html.nativo body.ts.ts .bnav .cam-main .cam { width: auto; height: auto; background: none }
html.nativo body.ts.ts .bnav .cam-main svg, html.nativo body.ts.ts .bnav .cam-main .ic { color: #fff !important; width: 24px; height: 24px }

/* Conteúdo nunca fica embaixo da barra de baixo nem atrás do entalhe */
html.nativo body.ts.ts #main, html.nativo body.ts.ts #view { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) }
html.nativo body.ts.ts .toast, html.nativo body.ts.ts #toast { bottom: calc(92px + env(safe-area-inset-bottom, 0px)) }
html.nativo body.ts.ts .modal-bg .modal, html.nativo body.ts.ts #modal { max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) }

/* Toque: nada de alvo pequeno */
html.nativo body.ts.ts .ts-voltar { min-width: 40px; min-height: 40px }
html.nativo body.ts.ts .hdr .mebtn { width: 40px; height: 40px; min-width: 40px; min-height: 40px }
html.nativo body.ts.ts .lm-mini { min-height: 40px; min-width: 40px; justify-content: center }
html.nativo body.ts.ts .lm-acoes { gap: 6px }

/* App enxuto (10/11/2026): lista de provas com Ver · Notas · Corrigir, e a tela Ver a prova para discutir com a turma */
html.nativo .app-prova-v { flex-direction: column; align-items: stretch; gap: 10px }
html.nativo .app-prova-t { background: none; border: 0; padding: 0; text-align: left; font: inherit; color: var(--ink) }
html.nativo .app-prova-t b { display: block; font-size: 16px }
html.nativo .app-prova-a { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px }
html.nativo .app-prova-a .btn { justify-content: center; min-height: 40px }
html.nativo .app-ver .app-prova-a { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 4px 0 14px }
html.nativo .app-ver h2 { margin: 6px 0 2px }
html.nativo .av-q { background: var(--folha); border: 1px solid var(--suave); border-radius: 12px; padding: 14px; margin-bottom: 12px }
html.nativo .av-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px }
html.nativo .av-h b { font-size: 15px }
html.nativo .av-tag { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--mesa); color: var(--texto-2) }
html.nativo .av-ac { margin-left: auto; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; color: var(--branco) }
html.nativo .av-ac.ok { background: var(--ok) } html.nativo .av-ac.med { background: var(--azul) } html.nativo .av-ac.baixo { background: var(--erro) }
html.nativo .av-e { margin: 0 0 10px; text-align: justify; line-height: 1.5; color: var(--ink) }
html.nativo .av-img img { max-width: 100%; border-radius: 8px; margin-bottom: 8px }
html.nativo .av-o { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px }
html.nativo .av-o li { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border: 1px solid var(--fino); border-radius: 8px; overflow: hidden; background: var(--folha) }
html.nativo .av-o li .l { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--suave); font-weight: 700; font-size: 13px; position: relative; z-index: 1 }
html.nativo .av-o li .t { flex: 1; min-width: 0; position: relative; z-index: 1 }
html.nativo .av-o li .pc { flex: none; font-weight: 700; font-size: 13px; color: var(--texto-2); position: relative; z-index: 1 }
html.nativo .av-o li[style] { background: linear-gradient(to right, var(--mesa) var(--w), var(--folha) var(--w)) }
html.nativo .av-o li.certa { border-color: var(--ok); background: var(--ok-fundo) }
html.nativo .av-o li.certa[style] { background: linear-gradient(to right, var(--ok-traco) var(--w), var(--ok-fundo) var(--w)) }
html.nativo .av-o li.certa .l { background: var(--ok); border-color: var(--ok); color: var(--branco) }
html.nativo .av-o li.certa .pc { color: var(--ok) }
html.nativo .app-atalho-g { grid-column: 1 / -1 }

/* Início e Documentos do app (Rafael, 12/11/2026): Assinar em destaque, 4 botões (Criar prova · Banco de questões · Notas · Análises),
   e em Documentos o Banco de questões (Próprio · Biblioteca) acima das provas */
html.nativo .app-home .app-assinar { width: 100%; justify-content: center; min-height: 52px; margin-top: 12px; font-size: 16px; font-weight: 700 }
html.nativo .app-home .app-assinar svg, html.nativo .app-home .app-assinar svg * { color: #fff !important; stroke: #fff !important; fill: #fff !important }
html.nativo .app-home .app-cred-ok { margin-top: 12px }
html.nativo .app-home .app-atalhos-4, html.nativo .app-home .app-atalhos-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) }
html.nativo .app-home .app-atalhos-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) }
html.nativo .app-home .app-atalhos-3 .app-atalho { min-height: 108px; min-width: 0; padding-left: 8px; padding-right: 8px }
html.nativo .app-home .app-atalhos-4 .app-atalho, html.nativo .app-home .app-atalhos-2 .app-atalho { min-height: 108px; min-width: 0 }
html.nativo .app-tt-l { text-align: left; margin: 18px 0 8px }
html.nativo .app-tt-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 8px }
html.nativo .app-tt-row .app-tt-l { margin: 0 }
html.nativo .app-tt-row .btn { min-height: 40px }
html.nativo .app-bib-h { display: grid; justify-items: start; gap: 6px; margin-bottom: 12px }
html.nativo .app-bib-h .back { min-height: 40px; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; font: inherit; font-weight: 600 }
html.nativo body.ts.ts .bnav .cam-main { font-size: 10.5px }
/* Banco de questões no app: pastas em cartões brancos legíveis, duas por linha */
html.nativo .bq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px }
html.nativo .bq-tile { aspect-ratio: auto; min-height: 92px; padding: 14px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: none }
html.nativo .bq-tile svg { color: var(--brand); width: 24px; height: 24px }
html.nativo .bq-tile b { font-size: 15px; -webkit-line-clamp: 3 }
html.nativo .bq-tile small { font-size: 12.5px; color: var(--ink-2); margin-top: 0 }
/* Criar prova no app: nada passa da largura da tela; a barra de formatação rola de lado e a folha encolhe (appAjustaDoc em app.js) */
html.nativo .ed, html.nativo .ed-main, html.nativo .ed-folha, html.nativo .ed-blk, html.nativo .ed-vias { min-width: 0; max-width: 100% }
html.nativo .ed-fmt-fixa { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch }
html.nativo .ed-fmt-fixa .fmt-barra { flex-wrap: nowrap }

/* Aviso do site no app (13/11/2026): as provas se fazem em usegabarito.com */
html.nativo .app-home .app-site { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; padding: 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink-2); font-size: 15px; text-align: left }
html.nativo .app-home .app-site p { margin: 0; display: grid; gap: 2px }
html.nativo .app-home .app-site b { color: var(--ink); font-weight: 700 }
html.nativo .app-home .app-site small { color: var(--ink-2); font-size: 13px }
html.nativo .app-home .app-site .app-site-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 4px; background: var(--brand); color: #fff }
html.nativo .app-home .app-site .app-site-ic svg, html.nativo .app-home .app-site .app-site-ic svg * { color: #fff !important; stroke: #fff !important }
/* Boas-vindas na 1ª abertura do app (21/11/2026) */
html.nativo .bv { display: grid; gap: 10px; text-align: left }
html.nativo .bv-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: #fff }
html.nativo .bv-ic svg, html.nativo .bv-ic svg * { color: #fff !important; stroke: #fff !important }
html.nativo .bv h3 { margin: 4px 0 0 }
html.nativo .bv p { margin: 0; color: var(--ink-2); line-height: 1.45 }
html.nativo .bv p b { color: var(--ink) }
html.nativo #modal .bv p { text-align: left; hyphens: manual; -webkit-hyphens: manual } /* frases curtas: sem justificar, para não abrir vãos */
/* Detalhes em vidro (Rafael, 21/11/2026: "coloque alguma coisa relacionado ao padrão vidro, detalhes"): só no aviso do site e na boas-vindas, mesmos valores do vidro do site (limpo-elite.css); não mexe nos outros cartões do app */
html.nativo .app-home .app-site { position: relative; isolation: isolate; border-radius: 14px; border-color: rgba(255, 255, 255, .92);
  background: linear-gradient(160deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .6)); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 1px 0 #FFFFFF, 0 0 0 1px rgba(11, 31, 68, .06), 0 20px 40px -32px rgba(11, 31, 68, .45) }
html.nativo .app-home .app-site::before { content: ""; position: absolute; inset: -12px -6px; z-index: -1; border-radius: 22px; pointer-events: none;
  background: radial-gradient(60% 90% at 0% 0%, rgba(108, 143, 230, .22), transparent 72%), radial-gradient(50% 80% at 100% 10%, rgba(138, 44, 158, .13), transparent 72%), radial-gradient(60% 70% at 62% 100%, rgba(200, 30, 30, .09), transparent 72%) }
html.nativo .app-home .app-site .app-site-ic { border-radius: 12px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 8px 16px -10px rgba(11, 31, 68, .7) }
html.nativo .bv-ic { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 0 0 6px rgba(255, 255, 255, .7), 0 0 0 7px rgba(11, 31, 68, .07), 0 14px 24px -14px rgba(11, 31, 68, .6) }
/* Barra de cima do app no azul-marinho do site (Rafael, 21/11/2026: "coloque essa cor na barra superior", imagem da barra #0B1F44 do site): só a cor de fundo, no lugar do degradê; a faixa de quatro cores embaixo continua */
html.nativo body.ts.ts .hdr { background: linear-gradient(90deg, #F0142F 0% 25%, #1D3557 25% 50%, #457B9D 50% 75%, #A8DADC 75% 100%) bottom / 100% 10px no-repeat, #0B1F44 !important }
@media (prefers-reduced-transparency: reduce) { html.nativo .app-home .app-site { background: #FFFFFF; -webkit-backdrop-filter: none; backdrop-filter: none } html.nativo .app-home .app-site::before { display: none } }
@media (forced-colors: active) { html.nativo .app-home .app-site { border: 1px solid CanvasText } html.nativo .app-home .app-site::before { display: none } }
/* Avaliar o app (13/11/2026) */
html.nativo .app-home .app-avaliar { display: flex; align-items: center; gap: 12px; width: 100%; margin: 8px 0 4px; padding: 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); text-align: left; min-height: 56px }
html.nativo .app-home .app-avaliar .ic { color: #F0142F; flex: none }
html.nativo .app-home .app-avaliar span { display: flex; flex-direction: column; gap: 2px }
html.nativo .app-home .app-avaliar small { color: var(--ink-2) }
.av-ests { display: flex; justify-content: center; gap: 6px; margin: 6px 0 14px }
.av-est { width: 48px; height: 48px; border: 0; background: none; color: var(--line-2, #CDD5DB); display: grid; place-items: center; border-radius: 4px; cursor: pointer }
.av-est.on { color: #E9A100 }
.av-est.on svg { fill: currentColor }
/* Texto corrido justificado no app (Rafael, 13/11/2026: "pode justificar esse texto"): renovação da assinatura, autorização dos dados e parágrafos das janelas */
html.nativo .iap-letra, html.nativo #cd_ok + span, html.nativo #modal p:not(.formerr):not(.app-site) { text-align: justify; hyphens: auto; -webkit-hyphens: auto }
html.nativo #modal .mhead p.muted.small { text-align: left; hyphens: manual }
/* Plano anual em destaque na assinatura do app (Rafael, 13/11/2026: "coloque 49,90 em vermelho o botão") */
.iap-planos .plan-opt.plan-dest { background: #F0142F; border-color: #F0142F; color: #fff }
.iap-planos .plan-opt.plan-dest small, .iap-planos .plan-opt.plan-dest .num { color: #fff }
.iap-planos .plan-opt.plan-dest:active { background: #C92F3B; border-color: #C92F3B }
.iap-planos .plan-opt.plan-dest { position: relative; overflow: visible }
.iap-planos .plan-opt.plan-dest::before { content: 'MAIS ECONÔMICO'; position: absolute; top: -11px; right: 14px; background: #16181D; color: #fff; font: 700 11px/1 Inter, system-ui, sans-serif; letter-spacing: .06em; padding: 5px 8px; border-radius: 4px }
/* Compra dentro do app (18/11/2026): enquanto a loja abre, a mensagem fica em tom de aviso (não de erro) e o plano tocado fica marcado. */
#as_err.iap-ok { color: var(--ink-2) }
.iap-planos .plan-opt:disabled { opacity: .6; cursor: progress }
.iap-planos .plan-opt.iap-abrindo:disabled { opacity: 1; outline: 2px solid var(--ink); outline-offset: 2px }
/* Vidro suave também na saudação e nos três atalhos do Início do app (Rafael, 22/11/2026: "coloque o detalhe de vidro nesses 3 botões do meio… e onde está escrito Professor Teste, bem suave"): mesmos valores do aviso do site */
html.nativo .app-home .app-hello, html.nativo .app-home .app-atalhos-3 .app-atalho { position: relative; isolation: isolate; border-radius: 14px; border-color: rgba(255, 255, 255, .92);
  background: linear-gradient(160deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .6)); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 1px 0 #FFFFFF, 0 0 0 1px rgba(11, 31, 68, .06), 0 20px 40px -32px rgba(11, 31, 68, .45) }
html.nativo .app-home .app-hello::before, html.nativo .app-home .app-atalhos-3 .app-atalho::before { content: ""; position: absolute; inset: -8px -4px; z-index: -1; border-radius: 20px; pointer-events: none;
  background: radial-gradient(60% 90% at 0% 0%, rgba(108, 143, 230, .2), transparent 72%), radial-gradient(50% 80% at 100% 10%, rgba(138, 44, 158, .12), transparent 72%), radial-gradient(60% 70% at 62% 100%, rgba(200, 30, 30, .08), transparent 72%) }
html.nativo .app-home .app-atalhos-3 .app-atalho:active { transform: scale(.98) }
@media (prefers-reduced-transparency: reduce) { html.nativo .app-home .app-hello, html.nativo .app-home .app-atalhos-3 .app-atalho { background: #FFFFFF; -webkit-backdrop-filter: none; backdrop-filter: none } html.nativo .app-home .app-hello::before, html.nativo .app-home .app-atalhos-3 .app-atalho::before { display: none } }
