/* Namespaced app installation UI; safe beside login, chat and document editors. */
[hidden].lex-app-notice, .lex-app-install-dialog [hidden] { display: none !important; }
.lex-app-install-trigger { cursor: pointer; }
button.lex-app-install-trigger { font: inherit; }
.lex-app-login-install { display: block; margin: 12px auto; padding: 7px 12px; border: 1px solid #b9ccc7; border-radius: 20px; background: #fff; color: #1a5e54; font-size: 12px !important; font-weight: 600 !important; }
.lex-app-notice { position: fixed; z-index: 10010; top: 60px; left: 50%; transform: translateX(-50%); width: max-content; max-width: min(620px, calc(100vw - 32px)); padding: 10px 16px; border: 1px solid #dcbf81; border-radius: 12px; background: #fff6df; color: #62460e; font: 13px/1.5 system-ui, sans-serif; box-shadow: 0 4px 18px #18242614; pointer-events: none; }
.lex-app-notice--update { top: auto; bottom: 24px; background: #edf9f5; border-color: #a3d9c9; color: #194e43; display: flex; gap: 12px; align-items: flex-start; pointer-events: auto; }
.lex-app-notice--update button { background: transparent; border: 0; font-size: 22px; line-height: 1; color: inherit; padding: 0 2px; }
.lex-app-install-dialog { box-sizing: border-box; width: min(580px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); margin: auto; padding: 28px; border: 1px solid #d4e3dd; border-radius: 24px; color: #183a33; background: #fff; box-shadow: 0 24px 80px #0d302b40; font: 14px/1.6 system-ui, sans-serif; text-align: left; }
.lex-app-install-dialog::backdrop { background: #102a236b; }
.lex-app-install-heading { display: flex; gap: 14px; align-items: center; }
.lex-app-install-heading img { flex: 0 0 56px; border-radius: 14px; }
.lex-app-install-dialog h2 { font: 650 23px/1.2 system-ui, sans-serif; letter-spacing: -.03em; margin: 4px 0 0; color: #183a33; }
.lex-app-eyebrow { color: #658178; font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.lex-app-close { align-self: flex-start; margin-left: auto; border: 0; border-radius: 50%; background: #f0f6f3; color: #315b4f; padding: 0; min-width: 30px; height: 30px; font: 23px/30px system-ui, sans-serif; }
.lex-app-intro { margin: 20px 0; color: #527065; }
.lex-app-primary { display: block; border: 0; border-radius: 12px; background: #15584f; color: white; padding: 12px 20px; width: 100%; font: 650 14px/1.4 system-ui, sans-serif; }
.lex-app-instructions { border-top: 1px solid #e2ece6; padding: 13px 0; }
.lex-app-instructions summary { cursor: pointer; font-weight: 650; }
.lex-app-instructions p { margin: 10px 0 0; color: #527065; }
.lex-app-install-footnote { background: #f3f7f5; border-radius: 12px; padding: 14px; font-size: 12px; color: #527065; }
.lex-app-install-dialog button { cursor: pointer; }
.lex-app-install-dialog button:focus-visible, .lex-app-install-dialog summary:focus-visible, .lex-app-install-trigger:focus-visible { outline: 3px solid #d8982a; outline-offset: 3px; }
@media (max-width: 480px) {
    .lex-app-install-dialog { padding: 20px; border-radius: 20px; }
    .lex-app-install-dialog h2 { font-size: 20px; }
    .lex-app-install-heading { gap: 10px; }
    .lex-app-install-heading img { width: 44px; height: 44px; flex-basis: 44px; }
    .lex-app-notice { top: 56px; font-size: 12px; }
    .lex-app-notice--update { top: auto; bottom: 16px; }
}
@media print { .lex-app-notice, .lex-app-install-trigger, .lex-app-install-dialog { display: none !important; } }

/* Telefono en ambas orientaciones; el pie del documento y el editor quedan intactos. */
@media screen and (max-width: 767px), screen and (pointer: coarse) and (max-device-width: 767px), screen and (pointer: coarse) and (max-device-height: 767px) {
    body footer.app-footer { display: none; }
    /* El skin reserva 24px al pie (108 = cabecera 84 + pie 24). Recuperar solo esa reserva. */
    body:has(> footer.app-footer) > #page > .main-container {
        min-height: calc(100vh - 84px);
        min-height: calc(100dvh - 84px);
    }
}
