/* smooth.css v1 - buttery scroll, iOS/Mac polish, battery savings.
   Loaded after page styles so it wins specificity ties. */

/* ---- Instant tap response everywhere ---- */
*{-webkit-tap-highlight-color:transparent}
body{
  touch-action:manipulation; /* no 300ms tap delay */
  -webkit-font-smoothing:antialiased; /* crisp text on macOS */
  -moz-osx-font-smoothing:grayscale;
}

/* ---- iOS spring easing for panels, drawers, menus ---- */
:root{--ease-ios:cubic-bezier(0.32,0.72,0,1)}
#drawer{transition:transform .3s var(--ease-ios)}
.chat-menu{transition:opacity .18s var(--ease-ios),transform .18s var(--ease-ios)}
#scrim{transition:opacity .25s ease}
#scrim.show{opacity:1}
/* gentle press feedback on icon buttons, very iOS */
header button:active{transform:scale(.93)}
header button{transition:transform .12s var(--ease-ios),background-color .15s ease}

/* ---- Scroll containers: momentum + no scroll chaining ---- */
#thread,#chatList,#list,#readerBody,#folderPane,.sheet,.sched-body,.csvrev,.chat-menu{
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:rgba(127,140,155,.4) transparent;
}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:rgba(127,140,155,.35);border-radius:8px}
::-webkit-scrollbar-thumb:hover{background:rgba(127,140,155,.55)}

/* ---- Skip rendering offscreen rows: faster scroll, less battery ----
   Browsers that do not understand these properties ignore them. */
#thread .msg,#list .msg,#chatList .chat-item,#folderPane .fitem,.ev{
  content-visibility:auto;
  contain-intrinsic-size:auto 96px;
}
#chatList .chat-item{contain-intrinsic-size:auto 52px}
.ev{contain-intrinsic-size:auto 44px}

/* ---- Battery: honor the OS Reduce Motion setting ---- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.001s !important;
    animation-iteration-count:1 !important;
    transition-duration:.001s !important;
  }
}

/* ---- Image search grid: keep action links inside their cell ---- */
.imgcell{min-width:0}
.revlinks{flex-wrap:wrap;gap:3px 10px}
.revlinks a{white-space:nowrap}
