/* ============================================================
   REINO CONCURSOS — RESPONSIVIDADE GLOBAL v3
   Mobile-first override aplicado APÓS os estilos das páginas.
   Objetivo: preservar desktop/tablet e adaptar todo o portal para celular.
   Breakpoints principais: 1024 / 767 / 430 / 360.
   ============================================================ */

/* ---------- BASE SEGURA ---------- */
html{max-width:100%;overflow-x:hidden;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{max-width:100%;overflow-x:hidden}
*,*::before,*::after{box-sizing:border-box}
img,svg,video,canvas,iframe{max-width:100%;height:auto}
input,select,textarea,button{max-width:100%;font-family:inherit}
pre,code{max-width:100%;overflow-wrap:anywhere;word-break:break-word}

/* ---------- MENU MOBILE GLOBAL ---------- */
.rc-mobile-menu-btn{
  display:none;align-items:center;justify-content:center;flex:0 0 auto;
  width:42px;height:42px;border:1px solid #e8e1d5;border-radius:10px;
  background:#fff;color:#1a1a1a;font-size:23px;line-height:1;cursor:pointer;
  box-shadow:0 2px 8px rgba(0,0,0,.06);z-index:9997;
}
.rc-mobile-menu-btn:hover{background:#f7f3eb}
.rc-mobile-menu-btn.rc-floating{
  position:fixed;top:10px;left:10px;z-index:9997;
  box-shadow:0 5px 20px rgba(0,0,0,.16)
}
.rc-sidebar-overlay{
  display:none;position:fixed;inset:0;background:rgba(0,0,0,.52);
  opacity:0;pointer-events:none;transition:opacity .22s ease;z-index:9990;
  -webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px)
}
.rc-sidebar-overlay.rc-show{opacity:1;pointer-events:auto}
.rc-sidebar-close{
  display:none;position:absolute;right:10px;top:10px;width:34px;height:34px;
  align-items:center;justify-content:center;border:0;border-radius:9px;
  background:rgba(255,255,255,.08);color:#fff;font-size:22px;cursor:pointer;z-index:3
}

/* ---------- TABLET ---------- */
@media (min-width:768px) and (max-width:1024px){
  .conteudo-admin,.conteudo-aluno{padding:24px 20px!important}
  .main{padding-left:24px!important;padding-right:24px!important}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .admin-grid-2,.row-2,.row-3{grid-template-columns:1fr!important}
  .modulos-grid,.materias-grid,.portal-grid,.issue-grid,.subject-grid,
  .choice-grid,.area-grid,.materia-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .card-header,.admin-header,.aluno-header,.page-header{flex-wrap:wrap!important;gap:12px!important}
}

/* ============================================================
   MOBILE — 767px ou menos
   ============================================================ */
@media (max-width:767px){
  html,body{width:100%!important;min-width:0!important;overflow-x:hidden!important}
  body{font-size:15px}

  /* Drawer global: NÃO se aplica ao leitor especial de leis */
  body:not(.rc-law-reader) .sidebar,
  body:not(.rc-law-reader) aside.sidebar{
    display:flex!important;
    position:fixed!important;
    top:0!important;left:0!important;bottom:0!important;
    width:min(86vw,290px)!important;
    min-width:0!important;max-width:290px!important;
    height:100dvh!important;min-height:100dvh!important;
    transform:translate3d(-105%,0,0)!important;
    transition:transform .25s ease!important;
    z-index:9995!important;
    overflow-y:auto!important;overflow-x:hidden!important;
    box-shadow:8px 0 30px rgba(0,0,0,.20)!important;
  }
  body:not(.rc-law-reader) .sidebar.rc-open,
  body:not(.rc-law-reader) .sidebar.aberta{
    transform:translate3d(0,0,0)!important;
  }
  .rc-sidebar-overlay{display:block}
  .rc-sidebar-close{display:flex}
  .sidebar-logo{position:relative;padding-right:52px!important}

  .rc-mobile-menu-btn{display:inline-flex}

  /* Conteúdos principais ocupam a tela inteira */
  .conteudo-admin,.conteudo-aluno,
  .main,.main-content,main.conteudo,
  .sim-page,.fc-shell,.wrap,.container{
    width:100%!important;max-width:100%!important;min-width:0!important;
    margin-left:0!important;margin-right:0!important;
  }
  .conteudo-admin,.conteudo-aluno{padding:16px 14px 84px!important}
  .main{padding:18px 14px 84px!important}
  .sim-page,.fc-shell{padding:18px 14px 84px!important}
  .wrap,.container{padding-left:14px!important;padding-right:14px!important}

  /* Cabeçalhos */
  .admin-header,.aluno-header,.page-header,.page-top,.top-row,.sim-head,.fc-head,.questoes-head{
    display:flex!important;align-items:flex-start!important;justify-content:flex-start!important;
    flex-wrap:wrap!important;gap:10px!important;width:100%!important;min-width:0!important;
  }
  .admin-header>*,.aluno-header>*,.page-header>*,.page-top>*,.top-row>*{min-width:0}
  .page-title,.admin-header h2,.aluno-header h2{font-size:21px!important;line-height:1.25!important;overflow-wrap:anywhere}
  .page-sub,.text-muted{font-size:13px!important;line-height:1.5!important}
  .header-actions,.actions,.btn-group,.hist-actions,.card-right{
    display:flex!important;flex-wrap:wrap!important;gap:8px!important;max-width:100%!important
  }

  /* Grids */
  .modulos-grid,.materias-grid,.materia-grid,.portal-grid,.tribunal-grid,
  .issue-grid,.subject-grid,.choice-grid,.area-grid,.admin-grid-2,
  .row-2,.row-3,.grid,.sim-area-grid,.escolha-grid,.dashboard-grid,
  .plano-grid,.cards-grid,.content-grid,.form-grid,.filters-grid{
    grid-template-columns:1fr!important;
  }
  .stats-grid,.stats-row,.metrics{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important
  }
  .actions{grid-template-columns:1fr!important}

  /* Cards */
  .card,.stat-card,.modulo-card,.materia-card,.portal-card,.tribunal-card,
  .issue-card,.subject-card,.choice-card,.area-card,.fich-card,.questao-card,
  .hist-item,.mat,.list-card,.filter-card,.plano-hoje-card{
    max-width:100%!important;min-width:0!important
  }
  .card-header,.card-body{max-width:100%!important}
  .card-header{padding:14px!important;flex-wrap:wrap!important;gap:9px!important}
  .card-body{padding:14px!important}
  .boas-vindas .card-body{padding:20px!important;flex-direction:column!important;align-items:flex-start!important}
  .bv-icone{font-size:42px!important}

  /* Formulários */
  input[type="text"],input[type="email"],input[type="password"],input[type="number"],
  input[type="search"],input[type="url"],input[type="tel"],input[type="date"],input[type="time"],
  select,textarea{
    width:100%;min-width:0!important;font-size:16px!important
  }
  .form-row,.filter-row,.filters,.campo-row,.fields-row,[class*="form-row"]{
    flex-direction:column!important;align-items:stretch!important;gap:10px!important
  }
  .ff,.form-grupo,.form-group,.campo{min-width:0!important;width:100%!important}
  form[style*="display:flex"],form[style*="display: flex"]{flex-wrap:wrap!important}

  /* Botões e targets de toque */
  button,.btn,a.btn{min-height:40px}
  .btn{white-space:normal!important;text-align:center}
  .btn-sm{min-height:36px}

  /* Tabelas */
  .tabela-wrapper,.table-wrap,.table-responsive,.overflow-table,.rc-auto-table{
    width:100%!important;max-width:100%!important;overflow-x:auto!important;
    -webkit-overflow-scrolling:touch!important
  }
  table{
    max-width:100%;overflow-x:auto
  }
  .tabela-wrapper table,.table-wrap table,.table-responsive table,.rc-auto-table table{min-width:640px}
  td,th{font-size:12.5px}

  /* Tabs/filtros horizontais */
  .tabs,.tabs-nav,[role="tablist"],.filter-chips,.chips,.review-bar,.tribunal-tabs,.subject-tabs{
    display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;
    -webkit-overflow-scrolling:touch!important;scrollbar-width:none
  }
  .tabs::-webkit-scrollbar,.tabs-nav::-webkit-scrollbar,.filter-chips::-webkit-scrollbar,
  .review-bar::-webkit-scrollbar{display:none}
  .tab-btn,.chip,.chip-tipo,.review-btn{flex:0 0 auto!important;white-space:nowrap!important}

  /* Modais */
  .modal-bg,.vf-overlay{padding:10px!important}
  .modal,.modal-content,.vf-box{
    width:calc(100vw - 20px)!important;max-width:calc(100vw - 20px)!important;
    max-height:92dvh!important;overflow-y:auto!important;border-radius:14px!important
  }

  /* Flashcards */
  .flashcard,.flashcard-card,.fc-card{max-width:100%!important;min-height:180px}
  .rating-buttons,.resposta-botoes,.flashcard-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
  .mat{grid-template-columns:24px minmax(0,1fr)!important}
  .mat>*{min-width:0}

  /* Simulados / questões */
  .questao-row{grid-template-columns:1fr!important;padding:14px!important}
  .questao-main,.hist-main{min-width:0!important}
  .alternativa,.questao-opcoes label{max-width:100%!important;white-space:normal!important}
  .hist-item{flex-direction:column!important;align-items:stretch!important;gap:12px!important}
  .hist-actions{justify-content:flex-start!important}

  /* Jurisprudências */
  .juri-card,.juris-card,.issue-card{padding-left:14px!important;padding-right:14px!important}
  .tese-box,.resumo-box{max-width:100%!important;overflow-wrap:anywhere}

  /* 2ª fase / Oral / Fichamentos */
  .fich-viewer{padding:20px 16px!important;margin-left:0!important;margin-right:0!important}
  .rich-view,.conteudo-livre{overflow-wrap:anywhere!important;word-break:normal!important}
  .questao-card .card-header{align-items:flex-start!important}
  .card-left,.card-right{width:100%!important}
  .oral-controles,.oral-actions,.gravacao-controles{flex-wrap:wrap!important}

  /* Desempenho */
  .streak-box{max-width:100%!important}

  /* Relógio flutuante */
  #foco-widget-btn,.foco-widget-fab,[class*="foco-widget"]{
    max-width:calc(100vw - 24px)!important;right:12px!important;bottom:12px!important
  }

  /* Evita textos/elementos rígidos estourando */
  [style*="max-width:"]{max-width:100%}
}

/* ============================================================
   LEITOR DE LEIS — MOBILE ESPECÍFICO
   ============================================================ */
@media (max-width:767px){
  body.rc-law-reader .layout{width:100vw!important;height:100dvh!important;overflow:hidden!important}
  body.rc-law-reader .reader{width:100vw!important;min-width:0!important;flex:1!important}
  body.rc-law-reader .sidebar{
    display:flex!important;position:fixed!important;top:0!important;left:calc(-1 * min(86vw,290px))!important;
    width:min(86vw,290px)!important;min-width:0!important;height:100dvh!important;
    z-index:9995!important;transition:left .22s ease!important;box-shadow:8px 0 30px rgba(0,0,0,.25)!important
  }
  body.rc-law-reader .sidebar.mob-open{left:0!important}
  body.rc-law-reader .sb-inner{width:100%!important;height:100dvh!important}
  body.rc-law-reader .tb{
    height:48px!important;min-height:48px!important;padding:0 8px!important;gap:3px!important;
    overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch!important;
    scrollbar-width:none!important
  }
  body.rc-law-reader .tb::-webkit-scrollbar{display:none}
  body.rc-law-reader .tb-btn{height:36px!important;padding:0 9px!important;font-size:11px!important;flex:0 0 auto!important}
  body.rc-law-reader .tb-title{display:none!important}
  body.rc-law-reader .tb-sep{flex:0 0 1px!important}
  body.rc-law-reader .review-bar{padding:8px 10px!important;gap:6px!important}
  body.rc-law-reader .review-label{display:none!important}
  body.rc-law-reader .review-btn{padding:7px 10px!important;font-size:10.5px!important}
  body.rc-law-reader .reader-body{padding:12px 8px 76px!important}
  body.rc-law-reader .reader-inner{width:100%!important;max-width:100%!important;margin:0!important}
  body.rc-law-reader .section-hdr{border-radius:10px!important;padding:13px 14px!important;font-size:17px!important}
  body.rc-law-reader .art{border-radius:11px!important;margin-bottom:9px!important}
  body.rc-law-reader .art-top{padding:10px 11px!important;gap:9px!important}
  body.rc-law-reader .art-badge{width:38px!important;height:38px!important}
  body.rc-law-reader .art-label{font-size:13px!important;min-width:0!important}
  body.rc-law-reader .art-chips{max-width:44%;flex-wrap:wrap!important;justify-content:flex-end!important}
  body.rc-law-reader .art-body{padding:0 11px 12px!important}
  body.rc-law-reader .art-txt{font-size:max(16px,var(--fs))!important;line-height:1.75!important;overflow-wrap:anywhere!important}
  body.rc-law-reader .art-acoes{gap:6px!important}
  body.rc-law-reader .art-acoes button{min-height:38px!important}
  body.rc-law-reader .grife-bar{gap:7px!important;padding-top:10px!important}
  body.rc-law-reader .grife-tip{left:10px!important;right:10px!important;bottom:12px!important;top:auto!important;min-width:0!important;width:auto!important}
  body.rc-law-reader .voz-panel{position:fixed!important;left:12px!important;right:12px!important;top:58px!important;width:auto!important}
  body.rc-law-reader .tts-bar{padding:9px 10px!important;gap:8px!important;flex-wrap:wrap!important}
  body.rc-law-reader .tts-info{width:100%!important;flex-basis:100%!important}
  body.rc-law-reader .tts-ctrl{width:100%!important;justify-content:center!important}
  body.rc-law-reader .vf-setup,body.rc-law-reader .vf-q,body.rc-law-reader .vf-result{padding:20px 14px!important}
  body.rc-law-reader .vf-qty-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  body.rc-law-reader .vf-btns{gap:8px!important}
  body.rc-law-reader .vf-v,body.rc-law-reader .vf-f{font-size:14px!important;padding:12px 8px!important}
}

/* ============================================================
   MOBILE PEQUENO — 430px / 360px
   ============================================================ */
@media (max-width:430px){
  .stats-grid,.stats-row,.metrics{grid-template-columns:1fr 1fr!important}
  .stat-card{padding:12px 10px!important}
  .stat-numero,.stat-val{font-size:20px!important}
  .header-actions .btn,.admin-header>.btn,.page-header>.btn{width:100%!important}
}
@media (max-width:360px){
  .conteudo-admin,.conteudo-aluno,.main,.sim-page,.fc-shell{padding-left:10px!important;padding-right:10px!important}
  .stats-grid,.stats-row,.metrics{grid-template-columns:1fr!important}
  .rc-mobile-menu-btn.rc-floating{top:8px;left:8px}
  body.rc-law-reader .tb-btn{padding:0 7px!important}
}

/* ---------- IMPRESSÃO ---------- */
@media print{
  .sidebar,.rc-mobile-menu-btn,.rc-sidebar-overlay,#foco-widget-btn,.foco-widget-fab{display:none!important}
  .conteudo-admin,.conteudo-aluno,.main{margin:0!important;padding:0!important}
}

/* REINO_MOBILE_AJUSTES_V2_START
   Ajustes finos solicitados em 13/08/2026:
   - sem barra inferior mobile
   - hamburger maior
   - flashcards: badges separados
   - tipografia sans no mobile
   - leitor de leis compacto
   - relógio sem disputar espaço com bottom nav
*/
@media (max-width: 767px){

  /* ==========================================================
     1. NAVEGAÇÃO MOBILE
     ========================================================== */

  /* Remove definitivamente as barras inferiores antigas.
     O acesso passa a ser pelo menu ☰ global. */
  .mob-nav,
  nav.mob-nav,
  .mobile-bottom-nav,
  .bottom-nav{
    display:none !important;
  }

  /* Hamburger maior e mais visível */
  .rc-mobile-menu-btn{
    width:54px !important;
    height:54px !important;
    min-width:54px !important;
    min-height:54px !important;
    border-radius:13px !important;
    font-size:29px !important;
    background:#fff !important;
    color:#1A1A1A !important;
    border:1px solid #DED8CC !important;
    box-shadow:0 6px 20px rgba(0,0,0,.13) !important;
  }

  .rc-mobile-menu-btn.rc-floating{
    top:16px !important;
    left:16px !important;
  }

  /* Quando o menu precisou ficar flutuante, reserva espaço no topo
     para ele não ficar em cima do título. */
  body.rc-has-floating-menu .conteudo-admin,
  body.rc-has-floating-menu .conteudo-aluno,
  body.rc-has-floating-menu .main,
  body.rc-has-floating-menu .fc-shell,
  body.rc-has-floating-menu .sim-page,
  body.rc-has-floating-menu .container{
    padding-top:82px !important;
  }

  /* ==========================================================
     2. TIPOGRAFIA — SOMENTE SANS-SERIF NO MOBILE
     ========================================================== */
  body:not(.rc-law-reader),
  body:not(.rc-law-reader) h1,
  body:not(.rc-law-reader) h2,
  body:not(.rc-law-reader) h3,
  body:not(.rc-law-reader) h4,
  body:not(.rc-law-reader) h5,
  body:not(.rc-law-reader) h6,
  body:not(.rc-law-reader) .page-title,
  body:not(.rc-law-reader) .section-intro h2,
  body:not(.rc-law-reader) .sec-title,
  body:not(.rc-law-reader) .materia-nome,
  body:not(.rc-law-reader) .mat-name{
    font-family:Inter,Arial,Helvetica,sans-serif !important;
  }

  /* Página de Leis / escolha das matérias */
  .main .section-intro h2{
    font-family:Inter,Arial,Helvetica,sans-serif !important;
    font-size:18px !important;
    font-weight:800 !important;
    letter-spacing:-.02em !important;
  }

  .main .materia-nome{
    font-family:Inter,Arial,Helvetica,sans-serif !important;
  }

  /* ==========================================================
     3. FLASHCARDS — DEVIDOS E ERROS SEM FICAREM GRUDADOS
     ========================================================== */
  .fc-shell{
    font-family:Inter,Arial,Helvetica,sans-serif !important;
  }

  .fc-shell .mat{
    display:grid !important;
    grid-template-columns:28px auto auto minmax(0,1fr) !important;
    grid-template-areas:
      "check name name name"
      ". due err ." !important;
    column-gap:10px !important;
    row-gap:12px !important;
    align-items:center !important;
    padding:16px 15px !important;
  }

  .fc-shell .mat > input.chk-materia,
  .fc-shell .mat > input[type="checkbox"]{
    grid-area:check !important;
    width:18px !important;
    height:18px !important;
    margin:0 !important;
  }

  .fc-shell .mat .mat-name{
    grid-area:name !important;
    font-family:Inter,Arial,Helvetica,sans-serif !important;
    font-size:14px !important;
    font-weight:750 !important;
    line-height:1.35 !important;
  }

  .fc-shell .mat .badge.due{
    grid-area:due !important;
    justify-self:start !important;
    margin:0 !important;
  }

  .fc-shell .mat .badge.err{
    grid-area:err !important;
    justify-self:start !important;
    margin:0 !important;
  }

  .fc-shell .mat .badge{
    font-size:10.5px !important;
    line-height:1 !important;
    padding:7px 10px !important;
    min-height:0 !important;
  }

  /* ==========================================================
     4. LEITOR DE LEIS — COMPACTO E PROPORCIONAL
     ========================================================== */

  body.rc-law-reader{
    font-family:Inter,Arial,Helvetica,sans-serif !important;
  }

  /* Toolbar superior mais baixa */
  body.rc-law-reader .tb{
    height:43px !important;
    min-height:43px !important;
    padding:0 7px !important;
    gap:2px !important;
  }

  body.rc-law-reader .tb-btn{
    height:30px !important;
    min-height:30px !important;
    padding:0 8px !important;
    font-size:10.5px !important;
    border-radius:6px !important;
  }

  /* Botão do índice ☰ no leitor um pouco mais evidente */
  body.rc-law-reader .tb-btn[title="Índice"]{
    font-size:17px !important;
    min-width:34px !important;
    padding:0 8px !important;
  }

  /* Barra Todos / Revisar / Essenciais... */
  body.rc-law-reader .review-bar{
    min-height:43px !important;
    padding:6px 8px !important;
    gap:6px !important;
  }

  body.rc-law-reader .review-btn{
    padding:6px 9px !important;
    font-size:10px !important;
    min-height:30px !important;
  }

  /* Bloco CAPÍTULO / SEÇÃO — bem menor */
  body.rc-law-reader .sec-head{
    border-radius:10px !important;
    padding:11px 13px !important;
    margin:14px 0 10px !important;
    gap:8px !important;
    align-items:baseline !important;
  }

  body.rc-law-reader .sec-head:first-child{
    margin-top:4px !important;
  }

  body.rc-law-reader .sec-tipo{
    font-family:Inter,Arial,Helvetica,sans-serif !important;
    font-size:14px !important;
    line-height:1.2 !important;
    letter-spacing:.7px !important;
    font-weight:850 !important;
  }

  body.rc-law-reader .sec-tipo.secao-menor{
    font-size:12px !important;
    letter-spacing:.6px !important;
  }

  body.rc-law-reader .sec-nome{
    font-family:Inter,Arial,Helvetica,sans-serif !important;
    font-size:17px !important;
    line-height:1.25 !important;
    font-weight:800 !important;
  }

  body.rc-law-reader .reader-body{
    padding:10px 8px 92px !important;
  }

  body.rc-law-reader .art-top{
    padding:9px 10px !important;
  }

  body.rc-law-reader .art-badge{
    width:36px !important;
    height:36px !important;
  }

  body.rc-law-reader .art-label{
    font-size:13px !important;
  }

  body.rc-law-reader .art-body{
    padding:0 10px 11px !important;
  }

  body.rc-law-reader .art-txt{
    font-size:16px !important;
    line-height:1.68 !important;
    padding:8px 0 12px !important;
  }

  /* Ações do artigo mais compactas */
  body.rc-law-reader .art-acoes{
    gap:5px !important;
    padding-top:8px !important;
  }

  body.rc-law-reader .btn-lido,
  body.rc-law-reader .btn-audio,
  body.rc-law-reader .btn-nota{
    min-height:34px !important;
    height:34px !important;
    padding-top:0 !important;
    padding-bottom:0 !important;
    font-size:11px !important;
  }

  /* Círculos Essencial / Atenção / Já sei:
     o CSS global de botões estava fazendo eles virarem gigantes. */
  body.rc-law-reader button.circ{
    width:24px !important;
    min-width:24px !important;
    height:24px !important;
    min-height:24px !important;
    max-width:24px !important;
    max-height:24px !important;
    padding:0 !important;
    border-radius:50% !important;
    flex:0 0 24px !important;
  }

  body.rc-law-reader .vsep{
    height:18px !important;
    flex:0 0 1px !important;
  }

  /* Barra de grifo */
  body.rc-law-reader .grife-bar{
    gap:5px !important;
    padding:8px 0 2px !important;
    margin-top:7px !important;
  }

  body.rc-law-reader .gcs{
    width:19px !important;
    height:19px !important;
    min-width:19px !important;
    min-height:19px !important;
    flex:0 0 19px !important;
  }

  body.rc-law-reader button.gfs{
    height:29px !important;
    min-height:29px !important;
    min-width:34px !important;
    padding:0 8px !important;
    font-size:11px !important;
  }

  body.rc-law-reader .grife-bar-lbl{
    font-size:9px !important;
  }

  /* ==========================================================
     5. RELÓGIO INTELIGENTE
     ========================================================== */

  /* Sem bottom-nav, ele pode ficar no canto inferior.
     Reservamos espaço nos conteúdos para sempre ser possível
     rolar o conteúdo acima dele. */
  #fw{
    right:12px !important;
    bottom:14px !important;
    max-width:calc(100vw - 24px) !important;
  }

  #fw-pill{
    padding:10px 15px !important;
    gap:8px !important;
    max-width:calc(100vw - 24px) !important;
  }

  #fw-pill-txt{
    font-size:11.5px !important;
  }

  #fw-panel{
    width:calc(100vw - 24px) !important;
    max-width:360px !important;
    max-height:calc(100dvh - 90px) !important;
    overflow-y:auto !important;
  }

  /* Mais espaço no fim das páginas para o relógio não esconder
     o último card/conteúdo. */
  body:not(.rc-law-reader) .conteudo-admin,
  body:not(.rc-law-reader) .conteudo-aluno,
  body:not(.rc-law-reader) .main,
  body:not(.rc-law-reader) .fc-shell,
  body:not(.rc-law-reader) .sim-page,
  body:not(.rc-law-reader) .container{
    padding-bottom:96px !important;
  }
}

@media (max-width: 380px){
  .fc-shell .mat{
    grid-template-columns:26px auto auto minmax(0,1fr) !important;
    column-gap:7px !important;
  }
  .fc-shell .mat .badge{
    font-size:9.5px !important;
    padding:6px 8px !important;
  }

  body.rc-law-reader .sec-tipo{font-size:12.5px !important}
  body.rc-law-reader .sec-nome{font-size:15.5px !important}
  body.rc-law-reader .art-txt{font-size:15.5px !important}
}
/* REINO_MOBILE_AJUSTES_V2_END */

/* REINO_MOBILE_AJUSTES_V3_START
   Refinos mobile 13/08/2026:
   - menu inferior removido
   - hamburger sem sobrepor conteúdo
   - tipografia sans consistente
   - leitor de leis sem rolagem horizontal nas ferramentas
   - círculos de revisão proporcionais
   - relógio compacto
*/
@media (max-width: 767px){

  /* NAVEGAÇÃO: somente menu ☰ */
  .mob-nav,
  nav.mob-nav,
  .mobile-bottom-nav,
  .bottom-nav{
    display:none !important;
    visibility:hidden !important;
    height:0 !important;
    min-height:0 !important;
    overflow:hidden !important;
    pointer-events:none !important;
  }

  body.rc-has-floating-menu .main,
  body.rc-has-floating-menu main.conteudo-admin,
  body.rc-has-floating-menu main.conteudo-aluno,
  body.rc-has-floating-menu .page,
  body.rc-has-floating-menu .fc-shell,
  body.rc-has-floating-menu .sim-page,
  body.rc-has-floating-menu .container{
    padding-top:84px !important;
  }

  .rc-mobile-menu-btn{
    width:54px !important;
    height:54px !important;
    min-width:54px !important;
    min-height:54px !important;
    border-radius:13px !important;
    font-size:28px !important;
    line-height:1 !important;
  }

  /* TIPOGRAFIA SANS */
  body,
  h1,h2,h3,h4,h5,h6,
  .page-title,
  .section-intro h2,
  .materia-nome,
  .sec-title,
  .card-title,
  .juri-titulo{
    font-family:Inter,Arial,Helvetica,sans-serif !important;
  }

  /* LEIS: títulos explicitamente sans */
  .page-title,
  .section-intro h2{
    font-family:Inter,Arial,Helvetica,sans-serif !important;
    font-style:normal !important;
  }

  /* JURISPRUDÊNCIA: botão de menu não cobre as abas */
  .juris-shell,
  .juris-page,
  .juri-page{
    min-width:0 !important;
  }
  .juri-header{
    touch-action:manipulation !important;
  }

  /* RELÓGIO INTELIGENTE — botão compacto, sem esconder cards */
  #fw{
    right:14px !important;
    bottom:14px !important;
    width:auto !important;
    max-width:none !important;
  }
  #fw-pill{
    width:52px !important;
    height:52px !important;
    min-width:52px !important;
    min-height:52px !important;
    padding:0 !important;
    border-radius:50% !important;
    justify-content:center !important;
    gap:0 !important;
  }
  #fw-pill-ico{
    font-size:21px !important;
  }
  #fw-pill-txt,
  #fw-pill-dot{
    display:none !important;
  }
  #fw-panel{
    right:0 !important;
    bottom:62px !important;
    width:min(360px,calc(100vw - 28px)) !important;
    max-height:calc(100dvh - 100px) !important;
  }

  /* ==========================================================
     LEITOR DE LEIS
     ========================================================== */
  body.rc-law-reader .reader{
    min-width:0 !important;
  }

  /* Todas as ferramentas ficam visíveis: sem scroll horizontal */
  body.rc-law-reader .tb{
    height:auto !important;
    min-height:0 !important;
    padding:6px 7px !important;
    display:flex !important;
    flex-wrap:wrap !important;
    align-items:center !important;
    gap:4px !important;
    overflow:visible !important;
    white-space:normal !important;
  }

  body.rc-law-reader .tb-title,
  body.rc-law-reader .tb-sep{
    display:none !important;
  }

  body.rc-law-reader .tb-btn{
    flex:0 0 auto !important;
    height:30px !important;
    min-height:30px !important;
    padding:0 7px !important;
    font-size:10px !important;
    border:1px solid #eee8de !important;
    background:#fff !important;
    border-radius:7px !important;
  }

  body.rc-law-reader .tb-btn.on{
    background:#1A1A1A !important;
    color:#C9A84C !important;
  }

  body.rc-law-reader .tb-timer,
  body.rc-law-reader .tb-pct{
    flex:0 0 auto !important;
    min-height:30px !important;
    display:inline-flex !important;
    align-items:center !important;
    padding:0 7px !important;
    font-size:10px !important;
    border-radius:7px !important;
    background:#faf8f4 !important;
  }

  body.rc-law-reader .voz-wrap{
    flex:0 0 auto !important;
  }

  /* Filtros também ficam todos visíveis em 2 linhas, se necessário */
  body.rc-law-reader .review-bar{
    height:auto !important;
    min-height:0 !important;
    padding:7px 8px !important;
    display:flex !important;
    flex-wrap:wrap !important;
    gap:6px !important;
    overflow:visible !important;
  }

  body.rc-law-reader .review-label{
    display:none !important;
  }

  body.rc-law-reader .review-btn{
    flex:0 0 auto !important;
    min-height:30px !important;
    padding:6px 9px !important;
    font-size:10px !important;
  }

  /* Cabeçalhos CAPÍTULO/SEÇÃO compactos */
  body.rc-law-reader .sec-head{
    padding:10px 12px !important;
    margin:12px 0 9px !important;
    gap:7px !important;
    border-radius:10px !important;
  }
  body.rc-law-reader .sec-tipo{
    font-size:12px !important;
    line-height:1.15 !important;
    letter-spacing:.7px !important;
  }
  body.rc-law-reader .sec-tipo.secao-menor{
    font-size:11px !important;
  }
  body.rc-law-reader .sec-nome{
    font-size:15px !important;
    line-height:1.25 !important;
  }

  /* Ações do artigo: botões numa linha e marcações organizadas abaixo */
  body.rc-law-reader .art-acoes{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:7px !important;
    padding-top:8px !important;
  }

  body.rc-law-reader .art-acoes-main{
    display:flex !important;
    align-items:center !important;
    flex-wrap:wrap !important;
    gap:6px !important;
  }

  body.rc-law-reader .art-marcacoes{
    display:flex !important;
    align-items:center !important;
    flex-wrap:nowrap !important;
    gap:9px !important;
    width:max-content !important;
    max-width:100% !important;
    padding:4px 1px 2px !important;
  }

  body.rc-law-reader .marc-label{
    font-size:9px !important;
    color:#aaa !important;
    margin-right:2px !important;
  }

  /* Reset completo dos círculos — evita formato oval no Safari/iPhone */
  body.rc-law-reader .circ{
    -webkit-appearance:none !important;
    appearance:none !important;
    display:block !important;
    box-sizing:border-box !important;
    width:22px !important;
    height:22px !important;
    min-width:22px !important;
    min-height:22px !important;
    max-width:22px !important;
    max-height:22px !important;
    aspect-ratio:1 / 1 !important;
    flex:0 0 22px !important;
    padding:0 !important;
    margin:0 !important;
    border-radius:999px !important;
    line-height:0 !important;
  }

  body.rc-law-reader .circ.on{
    transform:none !important;
    border:3px solid #1A1A1A !important;
    box-shadow:0 0 0 2px #fff !important;
  }

  body.rc-law-reader .circ:hover{
    transform:none !important;
  }

  /* Grifos igualmente circulares */
  body.rc-law-reader .gcs{
    display:block !important;
    box-sizing:border-box !important;
    width:19px !important;
    height:19px !important;
    min-width:19px !important;
    min-height:19px !important;
    max-width:19px !important;
    max-height:19px !important;
    aspect-ratio:1 / 1 !important;
    flex:0 0 19px !important;
    border-radius:999px !important;
    margin:0 !important;
  }

  body.rc-law-reader .grife-bar{
    display:flex !important;
    align-items:center !important;
    flex-wrap:wrap !important;
    gap:7px !important;
    padding-top:9px !important;
  }

  body.rc-law-reader button.gfs{
    height:28px !important;
    min-height:28px !important;
    min-width:32px !important;
    padding:0 7px !important;
  }

  body.rc-law-reader .btn-lido,
  body.rc-law-reader .btn-audio,
  body.rc-law-reader .btn-nota{
    min-height:34px !important;
    height:34px !important;
    font-size:10.5px !important;
    padding:0 11px !important;
  }

  body.rc-law-reader .reader-body{
    padding-bottom:86px !important;
  }
}
/* REINO_MOBILE_AJUSTES_V3_END */


/* ============================================================
   REINO MOBILE FINAL V1 — 2026-10-03
   Camada aditiva. Desktop permanece intacto.
   ============================================================ */




@media (max-width:767px){




  /* ---------- Base / prevenção de overflow ---------- */
  html,body{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow-x:clip !important;
    -webkit-text-size-adjust:100%;
    text-size-adjust:100%;
  }




  *,*::before,*::after{box-sizing:border-box}




  img,svg,video,canvas,iframe{
    max-width:100% !important;
    height:auto;
  }




  .layout,
  .conteudo-admin,.conteudo-aluno,
  .main,.main-content,main.conteudo,
  .wrap,.container,.plano-wrap,
  .sim-page,.fc-shell,
  .juris-page,.juri-page,
  .codigo-content,
  .reader,.reader-body,.reader-inner{
    min-width:0 !important;
    max-width:100% !important;
  }




  .card,.panel,.box,.modal,.modal-content,
  .art,.law,.editorial,.hero,.hero-shell,
  .edital-opcao,.filter-card,.questao-card,
  .hist-item,.plano-hoje-card{
    min-width:0 !important;
    max-width:100% !important;
  }




  input,select,textarea,button{
    max-width:100% !important;
    font-family:inherit;
  }




  input[type="text"],input[type="number"],input[type="search"],
  input[type="email"],input[type="url"],input[type="tel"],
  input[type="date"],input[type="time"],select,textarea{
    min-width:0 !important;
  }




  button,.btn,a.btn,
  .tool-btn,.hero-action,.retomar-btn{
    white-space:normal !important;
    overflow-wrap:anywhere;
    word-break:normal;
  }




  /* ---------- Cabeçalhos, ações e filtros ---------- */
  .admin-header,.aluno-header,.page-header,.page-top,.top-row,
  .sim-head,.fc-head,.questoes-head,
  .header-actions,.actions,.btn-group,.hist-actions,
  .filter-row,.filters,.campo-row,.fields-row,
  .form-row,[class*="form-row"]{
    min-width:0 !important;
    max-width:100% !important;
    flex-wrap:wrap !important;
  }




  .page-title,.admin-header h2,.aluno-header h2{
    overflow-wrap:anywhere !important;
  }




  /* ---------- Plano de Estudos: matérias legíveis ---------- */
  .plano-wrap .mat-lista{
    width:100% !important;
    min-width:0 !important;
  }




  .plano-wrap .mat-row{
    width:100% !important;
    min-width:0 !important;
    display:grid !important;
    grid-template-columns:auto minmax(0,1fr) auto !important;
    grid-template-areas:
      "ord nome remover"
      ". qtd dificil"
      ". meta meta" !important;
    align-items:center !important;
    gap:8px 10px !important;
    padding:12px !important;
  }




  .plano-wrap .mat-row > span:first-child{
    grid-area:ord !important;
    align-self:start;
    padding-top:9px;
  }




  .plano-wrap .mat-row input[name="mat_nome[]"]{
    grid-area:nome !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    flex:none !important;
    display:block !important;
    padding:9px 10px !important;
    border:1px solid #ddd6ca !important;
    border-radius:8px !important;
    background:#fff !important;
    text-overflow:clip !important;
  }




  .plano-wrap .mat-row .qtd-q{
    grid-area:qtd !important;
    min-width:0 !important;
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    gap:7px !important;
    justify-self:start !important;
  }




  .plano-wrap .mat-row .qtd-q > span{
    white-space:nowrap !important;
  }




  .plano-wrap .mat-row .qtd-q input{
    width:82px !important;
    min-width:72px !important;
    max-width:82px !important;
    flex:0 0 82px !important;
  }




  .plano-wrap .mat-row .mat-meta{
    grid-area:meta !important;
    min-width:0 !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
  }




  .plano-wrap .mat-row .dif-label{
    grid-area:dificil !important;
    justify-self:end !important;
    white-space:nowrap !important;
  }




  .plano-wrap .mat-row .remover{
    grid-area:remover !important;
    justify-self:end !important;
  }




  .plano-wrap .card{
    padding:18px 14px !important;
  }




  .plano-wrap .dias-grid{
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  }




  /* ---------- CNN/CNJ + CNNR/RS ---------- */
  .hero-main{
    grid-template-columns:1fr !important;
    min-width:0 !important;
  }




  .hero-copy,.hero-study-panel{
    min-width:0 !important;
    max-width:100% !important;
  }




  .hero-actions{
    grid-template-columns:1fr !important;
    width:100% !important;
  }




  .hero-action{
    width:100% !important;
    min-width:0 !important;
  }




  .hero-audio-options{
    display:flex !important;
    flex-wrap:wrap !important;
    align-items:center !important;
    gap:8px !important;
    min-width:0 !important;
  }




  .hero-audio-options small{
    flex:1 0 100% !important;
    width:100% !important;
  }




  .art-tools{
    width:100% !important;
    min-width:0 !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 76px !important;
    gap:8px !important;
    align-items:stretch !important;
  }




  .art-tools > .tool-btn,
  .art-tools > a.tool-btn{
    min-width:0 !important;
    width:100% !important;
    flex:none !important;
    justify-content:center !important;
    text-align:center !important;
  }




  .art-tools .audio{
    grid-column:1 / 2 !important;
  }




  .art-tools .tool-speed,
  .art-tools select.tool-speed{
    grid-column:2 / 3 !important;
    width:76px !important;
    min-width:0 !important;
    max-width:76px !important;
  }




  .art-tools .quiz,
  .art-tools .article-quiz-direct-link{
    grid-column:1 / -1 !important;
  }




  .art-tools > .tool-btn:not(.audio):not(.quiz),
  .art-tools > a.tool-btn:not(.audio):not(.quiz){
    grid-column:1 / -1 !important;
  }




  .texto,.coment,.key,.extra,.article-native-enun{
    overflow-wrap:anywhere !important;
    word-break:normal !important;
  }




  /* ---------- "Continuar de onde parou" / retomada ---------- */
  .retomar-leitura{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:10px !important;
  }




  .retomar-leitura-texto{
    width:100% !important;
    min-width:0 !important;
  }




  .retomar-leitura-texto span{
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    overflow-wrap:anywhere !important;
  }




  .retomar-leitura-acoes{
    width:100% !important;
    min-width:0 !important;
    display:flex !important;
    flex-wrap:wrap !important;
    gap:7px !important;
  }




  .retomar-btn{
    flex:1 1 130px !important;
    min-width:0 !important;
  }




  /* ---------- Tabelas / gráficos ---------- */
  .tabela-wrapper,.table-wrap,.table-responsive,
  .overflow-table,.rc-auto-table{
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch !important;
  }




  .tabela-wrapper table,.table-wrap table,
  .table-responsive table,.rc-auto-table table{
    width:max-content !important;
    min-width:600px !important;
    max-width:none !important;
  }




  canvas{
    max-width:100% !important;
  }




  /* ---------- Tabs / chips ---------- */
  .tabs,.tabs-nav,[role="tablist"],
  .filter-chips,.chips,.review-bar,
  .tribunal-tabs,.subject-tabs{
    max-width:100% !important;
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch !important;
    scrollbar-width:none;
  }




  .tabs::-webkit-scrollbar,.tabs-nav::-webkit-scrollbar,
  .filter-chips::-webkit-scrollbar,.review-bar::-webkit-scrollbar{
    display:none;
  }




  /* ---------- Modais ---------- */
  .modal-bg,.vf-overlay{
    padding:10px !important;
  }




  .modal,.modal-content,.vf-box,
  [role="dialog"]{
    width:min(100%,calc(100vw - 20px)) !important;
    max-width:calc(100vw - 20px) !important;
    max-height:calc(100dvh - 20px) !important;
    overflow:auto !important;
  }




  /* ---------- Barras e elementos flutuantes ---------- */
  .audio-toast,.personal-toast,
  .audio-all-bar,.foco-widget,
  #foco-widget-btn,.foco-widget-fab{
    max-width:calc(100vw - 24px) !important;
  }




  .audio-toast,.personal-toast{
    bottom:calc(12px + env(safe-area-inset-bottom)) !important;
  }




  /* ---------- Prova oral / mídia ---------- */
  audio,video{
    width:100% !important;
    max-width:100% !important;
  }




  /* ---------- Conteúdo longo ---------- */
  pre,code{
    max-width:100% !important;
    overflow-wrap:anywhere !important;
    word-break:break-word !important;
  }
}




@media (max-width:430px){
  .plano-wrap .mat-row{
    grid-template-columns:auto minmax(0,1fr) auto !important;
    grid-template-areas:
      "ord nome remover"
      ". qtd qtd"
      ". dificil dificil"
      ". meta meta" !important;
  }




  .plano-wrap .mat-row .dif-label{
    justify-self:start !important;
  }




  .art-tools{
    grid-template-columns:minmax(0,1fr) 72px !important;
  }




  .art-tools .tool-speed,
  .art-tools select.tool-speed{
    width:72px !important;
    max-width:72px !important;
  }




  .retomar-leitura-acoes{
    flex-direction:column !important;
  }




  .retomar-btn{
    width:100% !important;
    flex:0 0 auto !important;
  }
}
