/* No celular, as interfaces se reorganizam sem miniaturizar os textos. */
@media (max-width: 600px) {
    #expedienteSection .exp-grade,
    #expedienteSection .exp-linha { gap: 20px; }
    #expedienteSection .exp-card { padding: 24px 20px; }
    #expedienteSection .exp-title { font-size: 18px; line-height: 1.4; margin-bottom: 12px; }
    #expedienteSection .exp-desc { font-size: 15px; line-height: 1.65; }
    #expedienteSection .exp-card > .exp-vao {
        container-type: inline-size;
        height: auto;
        min-height: 0;
        margin: 8px 0 40px;
        overflow: visible;
    }

    /* Conta: a lista usa a largura útil do card, com linhas confortáveis. */
    #expedienteSection .conta-composicao { width: 100%; font-size: 12px; }
    #expedienteSection .conta-painel { --conta-avatar: 40px; --conta-intervalo: 12px; height: auto; padding: 0; }
    #expedienteSection .conta-cabecalho { padding: 0 0 18px; gap: 12px; }
    #expedienteSection .conta-cabecalho strong { font-size: 18px; }
    #expedienteSection .conta-cabecalho p { font-size: 12px; }
    #expedienteSection .conta-lista-titulo { font-size: 12px; padding-top: 16px; }
    #expedienteSection .conta-papel { font-size: 11px; }
    #expedienteSection .conta-pessoa { min-height: 80px; gap: 12px; }
    #expedienteSection .conta-nome strong { font-size: 15px; }
    #expedienteSection .conta-nome > span { font-size: 11px; }
    #expedienteSection .conta-numero { font-size: 12px; }
    #expedienteSection .conta-convite { padding: 16px 0 0; }
    #expedienteSection .conta-convidar { min-height: 44px; }
    #expedienteSection .conta-convidar > span { font-size: 14px; }

    /* Conversa: texto em tamanho de mensagem, sem altura fixa. */
    #expedienteSection .recados-composicao,
    #expedienteSection .luna-composicao {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        height: auto;
        font-size: 12px;
    }
    #expedienteSection .recado-wa-cabecalho { padding: 0 0 16px; }
    #expedienteSection .recado-wa-cabecalho strong { font-size: 17px; }
    #expedienteSection .recado-wa-cabecalho > img { width: 36px; height: 36px; }
    #expedienteSection .recado-wa-mensagens { padding: 16px 8px; gap: 14px; }
    #expedienteSection .recado-wa-dia { font-size: 11px; }
    #expedienteSection .recado-wa-balao { width: 94%; padding: 12px 12px 8px; }
    #expedienteSection .recado-wa-balao p { font-size: 15px; line-height: 1.45; }
    #expedienteSection .recado-wa-assessora { gap: 6px; }
    #expedienteSection .recado-wa-assessora strong { font-size: 13px; }
    #expedienteSection .recado-wa-assessora > span { font-size: 11px; }
    #expedienteSection .recado-wa-hora { font-size: 10px; }
    #expedienteSection .recado-wa-compositor { height: 44px; margin-top: 4px; gap: 8px; }
    #expedienteSection .recado-wa-campo > span { font-size: 14px; }

    /* Luna: busca ampla, documento e resposta menores, com fontes próprias. */
    #expedienteSection .luna-composicao { padding: 0; gap: 14px; }
    #expedienteSection .luna-busca { width: 100%; height: 56px; padding: 0 16px; gap: 10px; }
    #expedienteSection .luna-busca span { font-size: 14px; white-space: normal; line-height: 1.35; }
    #expedienteSection .luna-arquivo,
    #expedienteSection .luna-notificacao { width: 94%; height: auto; }
    #expedienteSection .luna-arquivo-previa { height: 148px; padding: 14px 20px 0; }
    #expedienteSection .luna-arquivo-folha { padding: 20px 18px; }
    #expedienteSection .luna-arquivo-titulo { font-size: clamp(19px, 5.2vw, 23px); }
    #expedienteSection .luna-arquivo-meta { font-size: 11px; line-height: 1.4; }
    #expedienteSection .luna-arquivo-anexo { min-height: 72px; height: auto; padding: 14px 12px; gap: 10px; }
    #expedienteSection .luna-arquivo-dados strong { font-size: 15px; }
    #expedienteSection .luna-arquivo-dados > span { font-size: 11px; white-space: normal; }
    #expedienteSection .luna-arquivo-icone { width: 25px; height: 33px; }
    #expedienteSection .luna-arquivo-download { width: 32px; height: 32px; }
    #expedienteSection .luna-notificacao { padding: 14px; gap: 10px; min-height: 82px; }
    #expedienteSection .luna-notificacao > img { width: 38px; height: 38px; }
    #expedienteSection .luna-notificacao-cabecalho strong { font-size: 14px; }
    #expedienteSection .luna-notificacao-cabecalho > span { font-size: 11px; }
    #expedienteSection .luna-notificacao-conteudo p { font-size: 14px; line-height: 1.45; }

    /* Drive: pastas e arquivo continuam dentro da mesma janela. */
    #expedienteSection .drive-janela { width: 100%; font-size: 12px; }
    #expedienteSection .drive-janela .dv-palco { height: 366px; }
    #expedienteSection .drive-cabecalho { height: 58px; padding: 0 16px; }
    #expedienteSection .drive-cabecalho > strong { font-size: 18px; }
    #expedienteSection .drive-corpo { padding: 16px; }
    #expedienteSection .drive-rotulo { font-size: 15px; margin-bottom: 12px; }
    #expedienteSection .drive-pastas { gap: 9px; }
    #expedienteSection .drive-pasta { min-width: 0; height: 60px; padding: 10px; gap: 8px; }
    #expedienteSection .drive-pasta > svg { width: 22px; height: 22px; }
    #expedienteSection .drive-pasta > strong { font-size: 13px; }
    #expedienteSection .drive-recebido { padding: 14px 16px; }
    #expedienteSection .drive-arquivo { gap: 10px; }
    #expedienteSection .drive-arquivo strong { font-size: 15px; }
    #expedienteSection .drive-arquivo small { font-size: 11px; }
    #expedienteSection .drive-confirmacao { font-size: 11px; white-space: normal; display: block; line-height: 1.5; }
    #expedienteSection .drive-confirmacao > svg { vertical-align: middle; }
    #expedienteSection .drive-janela .dv-ato:not([data-tela="raiz"]) { font-size: 12px; padding: 16px; }
    #expedienteSection .drive-janela .dv-migalha { font-size: 14px; }
    #expedienteSection .drive-janela .dv-bt { width: 32px; height: 32px; }
    #expedienteSection .drive-janela .dv-txt b { font-size: 13px; }
    #expedienteSection .drive-janela .dv-meta,
    #expedienteSection .drive-janela .dv-sub,
    #expedienteSection .drive-janela .dv-rot,
    #expedienteSection .drive-janela .dv-pe,
    #expedienteSection .drive-janela .dv-desc { font-size: 11px; }
    #expedienteSection .drive-janela .dv-arq,
    #expedienteSection .drive-janela .dv-log { flex-basis: 54px; }
    #expedienteSection .drive-janela .dv-ato.is-grade .dv-lista { grid-auto-rows: 84px; }
    #expedienteSection .drive-janela .dv-tag,
    #expedienteSection .drive-janela .dv-carimbo { font-size: 10px; letter-spacing: .02em; }

    /* Dashboard: resumo vertical e rótulos legíveis nas quatro telas. */
    #expedienteSection #expAbrirPainel .pn-app { font-size: 12px; }
    #expAbrirPainel .pn-topo { padding: 0 0 16px; }
    #expAbrirPainel .pn-abas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 4px; }
    #expAbrirPainel .pn-aba { flex-direction: column; gap: 8px; min-height: 50px; }
    #expAbrirPainel .pn-aba-foto { width: 30px; height: 30px; }
    #expAbrirPainel .pn-aba-txt b { font-size: 10px; letter-spacing: .02em; }
    #expAbrirPainel .pn-corpo { padding-top: 20px; }
    #expAbrirPainel .pn-rotulo { margin-bottom: 18px; }
    #expAbrirPainel .pn-rotulo b { font-size: 10px; letter-spacing: .1em; }
    #expAbrirPainel .pn-pagina .pn-colunas { gap: 14px; }
    #expAbrirPainel .pn-mes b { font-size: 11px; letter-spacing: .07em; }
    #expAbrirPainel .pn-saldo strong,
    #expAbrirPainel .pn-num strong { font-size: 46px; }
    #expAbrirPainel .pn-saldo em { font-size: 15px; }
    #expAbrirPainel .pn-saldo i { font-size: 11px; margin-left: 8px; }
    #expAbrirPainel .pn-num em,
    #expAbrirPainel .pn-frase { font-size: 13px; }
    #expAbrirPainel .pn-graf { height: 132px; }
    #expAbrirPainel .pn-dia { height: 220px; margin-bottom: 6px; }
    #expAbrirPainel .pn-hora { font-size: 10px; }
    #expAbrirPainel .pn-ev { left: 34px; gap: 7px; }
    #expAbrirPainel .pn-ev-txt b { font-size: 12px; gap: 6px; }
    #expAbrirPainel .pn-ev-txt b span { white-space: normal; line-height: 1.35; }
    #expAbrirPainel .pn-tri,
    #expAbrirPainel .pn-par { font-size: 12px; gap: 16px; }
    #expAbrirPainel .pn-tri { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    #expAbrirPainel .pn-tri b,
    #expAbrirPainel .pn-par b { font-size: 10px; letter-spacing: .06em; }
    #expAbrirPainel .pn-tri i { font-size: 12px; }
    #expAbrirPainel .pn-par i { font-size: 22px; }
    #expAbrirPainel .pn-recado { gap: 8px; }
    #expAbrirPainel .pn-recado-foto { width: 28px; height: 28px; }
    #expAbrirPainel .pn-balao { padding: 12px; }
    #expAbrirPainel .pn-balao-quem { font-size: 11px; line-height: 1.4; }
    #expAbrirPainel .pn-balao-txt { font-size: 13px; line-height: 1.5; font-weight: 400; }
    #expAbrirPainel .pn-balao-sync { font-size: 10px; line-height: 1.4; }
    #expAbrirPainel .pn-tar { height: 216px; }
    #expAbrirPainel .pn-tar-txt b { font-size: 13px; }
    #expAbrirPainel .pn-tar-txt i { font-size: 10px; letter-spacing: .02em; }
    #expAbrirPainel .pn-abrir { font-size: 10px; }
    #expAbrirPainel .pn-selo { display: none; }
    #expAbrirPainel .pn-meses li { min-height: 32px; gap: 10px; }
    #expAbrirPainel .pn-meses b,
    #expAbrirPainel .pn-meses em { font-size: 12px; }
}
