/* QG V6.8.19DH — camada responsiva de estudo. Preserva arquitetura; amplia legibilidade/navegação. */
:root{--qg-study-font:17px;--qg-study-leading:1.65;--qg-study-max:920px}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
/* Navegação: alvo tátil e rótulos legíveis */
html body #QG_BOTTOM_NAV,html body .bottom-nav,html body .nav-bottom{height:calc(78px + env(safe-area-inset-bottom))!important;min-height:calc(78px + env(safe-area-inset-bottom))!important;padding:5px 8px calc(8px + env(safe-area-inset-bottom))!important}
html body #QG_BOTTOM_NAV>button,html body #QG_BOTTOM_NAV>a{height:62px!important;min-height:62px!important;gap:4px!important}
html body #QG_BOTTOM_NAV .nav-icon{width:31px!important;height:31px!important}
html body #QG_BOTTOM_NAV .nav-icon svg{width:29px!important;height:29px!important}
html body #QG_BOTTOM_NAV small,html body #QG_BOTTOM_NAV .nav-label{font-size:9px!important;line-height:1.05!important;letter-spacing:.035em!important}
html body:has(#QG_BOTTOM_NAV){padding-bottom:calc(82px + env(safe-area-inset-bottom))!important}
/* Controles essenciais */
button,.action,.cta,.resource,.back,[role="button"]{min-height:46px}
/* Telas de estudo: leitura real, sem alterar Home */
body[data-qg-route="missoes"],body[data-qg-route="evolucao"]{--qg-study-font:16px}
body:not([data-qg-route="qg"]) .muted,body:not([data-qg-route="qg"]) .brief p,body:not([data-qg-route="qg"]) .card p,body:not([data-qg-route="qg"]) .alert{font-size:max(14px,.92rem)!important;line-height:1.6!important}
body:not([data-qg-route="qg"]) .card h3,body:not([data-qg-route="qg"]) .brief h3{font-size:clamp(18px,2.2vw,23px)!important;line-height:1.25!important}
body:not([data-qg-route="qg"]) .chip,body:not([data-qg-route="qg"]) .eyebrow,body:not([data-qg-route="qg"]) .cardhead b,body:not([data-qg-route="qg"]) .cardhead span,body:not([data-qg-route="qg"]) .resource small,body:not([data-qg-route="qg"]) .resource b{font-size:max(11px,.72rem)!important;line-height:1.3!important}
/* Central de instrução tem HTML legado sem data-route: usa título/estrutura específica */
body .brief p,body .card p{font-size:15px!important;line-height:1.65!important}
body .alert{font-size:14px!important;line-height:1.6!important}
body .resource small{font-size:10px!important}body .resource b{font-size:13px!important}
body .cta{min-height:58px!important;font-size:14px!important}
/* Tablet: aproveitar a tela sem criar linhas excessivamente longas */
@media (min-width:700px){
  :root{--qg-study-font:18px}
  body:not([data-qg-route="qg"]) .app,body:not([data-qg-route="qg"]) .wrap,body:not([data-qg-route="qg"]) main{max-width:var(--qg-study-max)!important;margin-left:auto!important;margin-right:auto!important}
  body:not([data-qg-route="qg"]) .app,body:not([data-qg-route="qg"]) .wrap{padding-left:32px!important;padding-right:32px!important}
  body .brief p,body .card p,body:not([data-qg-route="qg"]) .muted{font-size:17px!important;line-height:1.7!important}
  body .card,body .brief{padding:20px!important}
  body .cta{min-height:64px!important;font-size:15px!important}
  html body #QG_BOTTOM_NAV small,html body #QG_BOTTOM_NAV .nav-label{font-size:10px!important}
  html body #QG_BOTTOM_NAV .nav-icon svg{width:31px!important;height:31px!important}
}
@media (min-width:1100px){
  :root{--qg-study-max:980px}
  body .brief p,body .card p,body:not([data-qg-route="qg"]) .muted{font-size:18px!important}
}

/* V6.8.19DI — escala manual de leitura. Atua na camada de estudo, sem redimensionar Home/rodapé. */
html[data-qg-text-size="grande"]{--qg-reading-scale:1.12}
html[data-qg-text-size="extra"]{--qg-reading-scale:1.25}
html:not([data-qg-text-size]),html[data-qg-text-size="padrao"]{--qg-reading-scale:1}
body:not([data-qg-route="qg"]) .brief p,
body:not([data-qg-route="qg"]) .card p,
body:not([data-qg-route="qg"]) .alert,
body:not([data-qg-route="qg"]) .muted{font-size:calc(15px * var(--qg-reading-scale))!important}
body:not([data-qg-route="qg"]) .question,
body:not([data-qg-route="qg"]) .question-text,
body:not([data-qg-route="qg"]) .enunciado,
body:not([data-qg-route="qg"]) .debriefing,
body:not([data-qg-route="qg"]) .fixacao,
body:not([data-qg-route="qg"]) .flashcard,
body:not([data-qg-route="qg"]) .flashcard-front,
body:not([data-qg-route="qg"]) .flashcard-back{font-size:calc(17px * var(--qg-reading-scale))!important;line-height:1.65!important}
@media (min-width:700px){
 body:not([data-qg-route="qg"]) .brief p,body:not([data-qg-route="qg"]) .card p,body:not([data-qg-route="qg"]) .alert,body:not([data-qg-route="qg"]) .muted{font-size:calc(17px * var(--qg-reading-scale))!important}
 body:not([data-qg-route="qg"]) .question,body:not([data-qg-route="qg"]) .question-text,body:not([data-qg-route="qg"]) .enunciado,body:not([data-qg-route="qg"]) .debriefing,body:not([data-qg-route="qg"]) .fixacao,body:not([data-qg-route="qg"]) .flashcard,body:not([data-qg-route="qg"]) .flashcard-front,body:not([data-qg-route="qg"]) .flashcard-back{font-size:calc(19px * var(--qg-reading-scale))!important}
}

/* V6.8.19DJ — UX RESPONSIVA REAL: leitura vence compactação. */
@media (max-width:699px){
  /* Navegação global legível */
  html body #QG_BOTTOM_NAV,html body .bottom{--nav:78px!important;min-height:calc(78px + env(safe-area-inset-bottom))!important}
  html body .bottom .nav,html body #QG_BOTTOM_NAV .nav{font-size:9px!important;letter-spacing:.055em!important;gap:5px!important;min-height:58px!important}
  html body .bottom .nav svg,html body #QG_BOTTOM_NAV .nav svg{width:29px!important;height:29px!important}
  /* Missões: tipografia e cards respiram */
  body .page{width:100%!important;max-width:560px!important;padding-left:16px!important;padding-right:16px!important}
  body .header h1{font-size:30px!important;line-height:1.05!important}
  body .header p{font-size:10px!important;line-height:1.35!important;letter-spacing:.10em!important}
  body .section-kicker{font-size:10px!important}
  body .track-top span,body .track-top b,body .track-hint{font-size:10px!important;line-height:1.4!important}
  body .knowledge button{min-height:54px!important;font-size:10px!important;padding:8px 5px!important}
  body .knowledge strong{font-size:12px!important}
  body .summary{grid-template-columns:repeat(2,1fr)!important;gap:9px!important}
  body .sum{padding:12px 7px!important;min-height:72px!important;display:flex!important;flex-direction:column!important;justify-content:center!important}
  body .sum small{font-size:9px!important}.sum strong{font-size:20px!important}
  body .tab{height:48px!important;font-size:9.5px!important}
  body .card-body{padding:16px!important}
  body .mission-no{font-size:9px!important}.qg-knowledge-badge{font-size:8.5px!important;padding:6px 9px!important}
  body .disc{font-size:10px!important}.card h2{font-size:21px!important;line-height:1.15!important}.card p{font-size:14px!important;line-height:1.45!important}
  body .card .progress span{font-size:10px!important}
  body .m{padding:10px 5px!important;min-height:64px!important}.m small{font-size:8px!important}.m strong{font-size:12px!important}
  body .btn{min-height:52px!important;height:auto!important;font-size:10px!important;padding:10px 7px!important}
  body .qg-training-title{font-size:10px!important}.qg-train-card b{font-size:11px!important}.qg-train-card small{font-size:10px!important;line-height:1.4!important}
}
@media (min-width:700px){
  body .page{width:min(100%,900px)!important;max-width:900px!important}
}
\n\n/* V6.8.19DJ.1 — acabamento de legibilidade + microtexto. */
@media (max-width:699px){
  body .bottom .nav,body #QG_BOTTOM_NAV .nav{font-size:10px!important;letter-spacing:.04em!important}
  body .bottom .nav span,body #QG_BOTTOM_NAV .nav-label,body #QG_BOTTOM_NAV small{font-size:10px!important;line-height:1.1!important}
  body .metric small,body .metric span,body .stat span,body .sum small,body .m small{font-size:10px!important;line-height:1.3!important;letter-spacing:.04em!important}
  body .row span,body .identity-row span,body .profile-row span,body .track-hint,body .module p{font-size:12px!important;line-height:1.45!important}
  body .module .code,body .eyebrow,body .kicker{font-size:10px!important;line-height:1.3!important}
  body .module b{font-size:10px!important;line-height:1.3!important}
  body .discipline small,body .subject small,body .empty{font-size:12px!important;line-height:1.45!important}
}

/* V6.8.19DL — acabamento final de navegação/legibilidade. */
@media (max-width:699px){
  body:not([data-qg-route="qg"]) small, body:not([data-qg-route="qg"]) .label{font-size:max(10px,.68rem);line-height:1.35}
  body:not([data-qg-route="qg"]) .ey,body:not([data-qg-route="qg"]) .eyebrow,body:not([data-qg-route="qg"]) .kicker{font-size:max(10px,.66rem)!important;letter-spacing:.08em!important}
  body:not([data-qg-route="qg"]) .muted{color:#aaa69b!important}
  #QG_BOTTOM_NAV small{font-size:10px!important;font-weight:800!important;letter-spacing:.025em!important}
}
.qg-pressed{transform:scale(.985)!important;filter:brightness(1.08);transition:transform .06s ease,filter .06s ease!important}
.qg-ux-loading{position:relative!important;color:transparent!important;pointer-events:none!important;overflow:hidden!important}
.qg-ux-loading:after{content:"";position:absolute;inset:18% 8%;border-radius:8px;background:linear-gradient(90deg,rgba(255,255,255,.04),rgba(255,255,255,.11),rgba(255,255,255,.04));animation:qgUxPulse 1.15s ease-in-out infinite}
@keyframes qgUxPulse{0%,100%{opacity:.45}50%{opacity:1}}
#qgResumeStudy{position:fixed;left:12px;right:12px;bottom:calc(88px + env(safe-area-inset-bottom));z-index:9000;max-width:560px;margin:auto;border:1px solid rgba(208,166,43,.55);background:rgba(9,10,7,.97);border-radius:14px;padding:11px 12px;box-shadow:0 12px 30px rgba(0,0,0,.45);display:flex;align-items:center;gap:10px}
#qgResumeStudy .qg-resume-copy{min-width:0;flex:1}#qgResumeStudy small{display:block;color:#d0a62b;font-size:9px;font-weight:900;letter-spacing:.08em}#qgResumeStudy b{display:block;color:#eee9dc;font-size:12px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#qgResumeStudy button{min-height:40px;border-radius:9px;border:1px solid #5b491d;background:#d0a62b;color:#080806;font-size:9px;font-weight:900;padding:0 11px}#qgResumeStudy .qg-resume-x{background:transparent;color:#aaa;border-color:#343128;padding:0 8px}
