/* joobmail in the mobile app (docs/MOBILE-APP.md, 1 Nov 2026). Every rule waits for <html data-app> (theme-boot.js sets it
   only inside the app), except the app's own elements, so the website is unchanged. The Expo shell (mobile/App.js) keeps the
   page clear of the status bar, the notch and the home indicator itself and paints them in the page's colours
   (app-shell.js "bars"), so no safe-area padding is needed here. */

/* The app opens on sign-in: no landing page, no "back to the home page". Printing is for the website (phase 2). */
html[data-app] #landing,
html[data-app] #auth-back,
html[data-app] [data-track="reader-print"] { display:none !important }

/* A short line at the bottom while a file is made ready for the share sheet, or when it could not be. */
#app-notice { position:fixed; z-index:80; left:16px; right:16px; bottom:calc(var(--tabbar-h,0px) + 16px); width:fit-content; max-width:min(calc(100vw - 32px),480px); margin:0 auto; padding:12px 18px; border-radius:var(--radius,12px); background:var(--text); color:var(--bg); font-size:14px; line-height:1.5; box-shadow:var(--shadow-lg,0 8px 24px rgba(0,0,0,.2)) }
#app-notice.is-error { background:var(--danger,#b42318); color:var(--bg) }
#app-notice[hidden] { display:none }

/* Android's WebView shows no PDF: the preview offers another app instead (app-shell.js). */
.app-pdf-note { display:grid; justify-items:center; gap:12px; padding:32px 16px; text-align:center; color:var(--muted) }
.app-pdf-note .btn { min-height:44px }

/* New-mail notifications (docs/MOBILE-APP.md §5a): the account page shows the app's own switch (app-shell.js #app-push) in
   place of the website's desktop notifications box, and the first time the mailbox shows a sheet offers them. */
html[data-app] .info-card label:has(> #pref-notifications) { display:none }
html[data-app] #app-push .hint { display:block; margin:2px 0 10px }
html[data-app] #app-push-settings { margin:0 0 12px }
html[data-app] #app-push-ask { max-width:min(94vw,460px) }
html[data-app] #app-push-ask .app-push-title { margin:0; font-size:18px; line-height:1.4; color:var(--text) }

/* Microsoft sign-in comes back to the phone's browser, not the app (phase 2): the choice is hidden and the note
   (app-shell.js #app-oauth-note) shows where app.js would have shown it. */
html[data-app] #microsoft-connect { display:none !important }
html[data-app] #app-oauth-note { display:none; margin:0 0 12px }
html[data-app] #microsoft-connect:not([hidden]) + #app-oauth-note { display:block }
