/* Fear Mail v9: iOS performance and reader usability */
/* Separate stacking order for search: popover must rise ABOVE inbox/read panels. */
.mail-topbar{position:relative;z-index:70;overflow:visible}
.mail-columns{position:relative;z-index:1}
.search-wrap{position:relative;z-index:71}
.search-suggestions:not([hidden]){z-index:100;isolation:isolate;box-shadow:0 16px 40px #000e;background:#141417}
.search-suggestions .suggestion span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-suggestions[hidden]{display:none!important}
/* The outer reader stays still while the isolated HTML document gets a
   real, scrollable region. JavaScript inside the sender document is blocked. */
.read-content.has-html{display:flex;flex-direction:column;overflow:hidden;min-height:0}
.read-content.has-html .email-html-frame{flex:1 1 auto;height:auto;min-height:120px;max-height:none;overflow:auto;touch-action:pan-y;-webkit-overflow-scrolling:touch}
.email-html-frame{scrollbar-gutter:stable}
.email-html-frame:focus-visible{outline:1px solid #fff9}
/* Brand artwork keeps native proportions; Gmail's M needs more breathing room. */
.row-avatar:has(img[src$="gmail.svg"]) img,.sender-avatar:has(img[src$="gmail.svg"]) img{width:70%;height:70%;object-fit:contain}
/* Real-world iPhones: disable enormous repaints, filters, backdrop effects and
   hover motion. Appearance settings can still opt into lightweight snow. */
@media (max-width:760px), (pointer:coarse){
  .ambient{display:none!important}
  .fm-app-body::before,.fm-auth::before,.fm-app-body::after,.fm-auth::after{display:none!important}
  .auth-card::before,.auth-card::after,.inbox-panel::before,.inbox-panel::after,.read-panel::before,.read-panel::after,.mail-topbar::after{display:none!important}
  .mail-row,.mail-row:hover,.mail-row.selected,.rail,.rail:hover,.rail:focus-within,
  .read-panel,.read-panel.is-open,.auth-card,.mail-topbar,.inbox-panel{
    box-shadow:none!important;filter:none!important;
  }
  .mail-row,.mail-row:hover,.rail,.rail:hover,.rail:focus-within,.icon-button,.icon-button:hover,
  .search-wrap,.sort-menu,.search-suggestions,.read-content,.filter-pill,.auth-submit{
    animation:none!important;transition:none!important;transform:none!important;
  }
  .mail-row:hover,.filter-pill:hover,.icon-button:hover:not(:disabled){transform:none!important}
  .rail .ico,.rail-brand .ico,.auth-icon svg{filter:none!important}
  .mail-columns{min-height:0}
  .mail-topbar{z-index:70}
  .search-suggestions:not([hidden]){z-index:100}
  .read-panel.is-open{z-index:200!important;inset:0!important;border:0;border-radius:0!important;height:100dvh;height:100svh}
  .read-panel.is-open .read-content{min-height:0;overscroll-behavior:contain}
  .read-panel.is-open .read-content.has-html{padding-bottom:8px}
  .read-panel.is-open .read-content.has-html .email-html-frame{min-height:90px;flex:1 1 auto;height:auto;max-height:none}
  .standalone-html-frame{height:calc(100svh - 180px);min-height:200px}
  .row-avatar,.sender-avatar{box-shadow:none!important}
}
