/* SELVO 1.14.1: the tab bar, 1:1 after Max's recording of the iOS 26 App Store bar (tabbar.js drives it).
   Black and white instead of the App Store blue. Only transform and opacity ever animate; the blur is static. */
@media not all and (min-width: 768px) and (min-height: 500px) {
  :root {
    --tb-fill: rgba(44, 44, 46, .74); --tb-rim: rgba(255, 255, 255, .11); --tb-top: rgba(255, 255, 255, .07);
    --tb-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .25);
    --tb-ink: rgba(235, 235, 245, .62); --tb-on: #ffffff;
    --tb-pill: rgba(0, 0, 0, .62); --tb-pill-rim: rgba(255, 255, 255, .05);
    --tb-lens: rgba(62, 62, 66, .9); --tb-lens-rim: rgba(255, 255, 255, .32); --tb-lens-rim2: rgba(255, 255, 255, .08);
    --tb-lens-shadow: 0 6px 18px rgba(0, 0, 0, .4);
  }
  [data-theme="light"] {
    --tb-fill: rgba(250, 250, 252, .8); --tb-rim: rgba(0, 0, 0, .06); --tb-top: rgba(255, 255, 255, .9);
    --tb-shadow: 0 8px 26px rgba(0, 0, 0, .11), 0 1px 4px rgba(0, 0, 0, .06);
    --tb-ink: rgba(60, 60, 67, .62); --tb-on: #000000;
    --tb-pill: rgba(118, 118, 128, .14); --tb-pill-rim: rgba(0, 0, 0, .02);
    --tb-lens: rgba(255, 255, 255, .94); --tb-lens-rim: rgba(255, 255, 255, 1); --tb-lens-rim2: rgba(0, 0, 0, .07);
    --tb-lens-shadow: 0 6px 20px rgba(0, 0, 0, .16), 0 1px 3px rgba(0, 0, 0, .08);
  }
  [data-glass="solid"] { --tb-fill: #1c1c1e; }
  [data-theme="light"][data-glass="solid"] { --tb-fill: #ffffff; }

  html #tabbar {
    --tabh: 62px;
    height: var(--tabh); padding: 4px; border-radius: 31px; max-width: 440px;
    background: var(--tb-fill);
    -webkit-backdrop-filter: blur(20px) saturate(1.7); backdrop-filter: blur(20px) saturate(1.7);
    box-shadow: inset 0 0 0 .5px var(--tb-rim), inset 0 1px 0 var(--tb-top), var(--tb-shadow);
    touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
    overflow: visible; isolation: isolate;
    transform-origin: 50% 70%; transition: scale .45s var(--m-ease);
  }
  html #tabbar::after, html #tabbar::before, html #tabbar > .ind::before { display: none; }
  html #tabbar.swell { scale: 1.035; }
  html #tabbar > button {
    position: relative; z-index: 1; flex: 1 1 0; min-width: 0; height: 100%; padding: 0; gap: 2px; border-radius: 27px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--tb-ink); font: 600 10.5px/1.1 var(--lgf, var(--sys)); letter-spacing: .01em;
    transition: color .25s var(--m-ease); opacity: 1;
  }
  html #tabbar > button .i { width: 25px; height: 25px; }
  html #tabbar > button.on { color: var(--tb-on); }
  html #tabbar > button:active, html #tabbar > button.hot, html #tabbar > button:hover { opacity: 1; }
  /* the pill at rest */
  html #tabbar > .ind {
    z-index: 0; top: 4px; bottom: 4px; height: auto; border-radius: 27px;
    background: var(--tb-pill); box-shadow: inset 0 0 0 .5px var(--tb-pill-rim);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    transition: transform .46s var(--m-ease), width .46s var(--m-ease), opacity .22s var(--m-ease);
    will-change: transform;
  }
  /* the lens: clear glass a little taller than the bar, the icons under it magnified */
  html #tabbar > .tb-lens {
    position: absolute; z-index: 2; left: 0; top: -6px; border-radius: 999px; overflow: hidden; pointer-events: none;
    background: var(--tb-lens);
    box-shadow: inset 0 0 0 1px var(--tb-lens-rim2), inset 0 1.5px 1px var(--tb-lens-rim), inset 0 -1px 1px var(--tb-lens-rim2), var(--tb-lens-shadow);
    opacity: 0; will-change: transform, opacity;
  }
  html #tabbar > .tb-lens .tb-mag { position: absolute; left: 0; top: 0; display: flex; padding: 0 4px; box-sizing: border-box; transform-origin: 0 0; will-change: transform; }
  html #tabbar > .tb-lens .tb-it { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--tb-on); font: 600 10.5px/1.1 var(--lgf, var(--sys)); letter-spacing: .01em; }
  html #tabbar > .tb-lens .tb-it .i { width: 25px; height: 25px; }
}
/* the sidebar on the iPad keeps its gliding pill; the lens is not used there */
@media (min-width: 768px) and (min-height: 500px) { #tabbar > .tb-lens { display: none; } }
@media (prefers-reduced-motion: reduce) { html #tabbar { transition: none; } html #tabbar.swell { scale: none; } }

/* 1.14.1: cards and chips no longer blur what is behind them. Over the calm ground the blur was invisible, but every
   card with a backdrop blur made sliding a whole tab or screen expensive on the phone. Bars and sheets keep theirs. */
:root { --lg-blur: none; --lg-blur-sel: none; }
.seg:not(.tabbar):not(.strip):not(.fc-seg) > .ind, .seg.strip > .ind { -webkit-backdrop-filter: none; backdrop-filter: none; }

/* 1.14.2: segmented switches (lens.js): the pill grows into a lighter glass lens while held and dragged */
.seg:not(.tabbar):not(.strip):not(.fc-seg) { touch-action: pan-y; }
.seg:not(.tabbar):not(.strip):not(.fc-seg) > .ind { will-change: transform; }
.seg.lensing:not(.tabbar):not(.strip):not(.fc-seg) > .ind { background: rgba(255, 255, 255, .22); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .28), inset 0 0 0 .5px rgba(255, 255, 255, .14), 0 6px 16px rgba(0, 0, 0, .3); }
[data-theme="light"] .seg.lensing:not(.tabbar):not(.strip):not(.fc-seg) > .ind { background: #ffffff; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .05), 0 6px 18px rgba(0, 0, 0, .16), 0 1px 3px rgba(0, 0, 0, .08); }
.seg.lensing:not(.tabbar):not(.strip):not(.fc-seg) > button.on:not(.hot) { color: var(--mute); }

/* 1.14.2: sliders move by transform and clip only (left and width re-laid out the page on every finger move) */
.ios-sl { container-type: inline-size; }
.ios-sl .sl-thumb { left: 0; transform: translate3d(calc(var(--slp) * (100cqw - 28px)), 0, 0); will-change: transform; }
.ios-sl .sl-fill { width: 100%; clip-path: inset(0 calc(14px + (1 - var(--slp)) * (100% - 28px)) 0 0 round 2px); }
/* 1.14.2: smoothness pass. Scroll views only scroll up and down (sideways swipes are ours, and can listen passively);
   no spring overshoot anywhere, things settle like a critically damped spring */
.view > .scroll, .screen > .scroll { touch-action: pan-y; }
:root { --m-spring: cubic-bezier(.2, .9, .25, 1); }
@supports (transition-timing-function: linear(0, 1)) { :root { --m-spring: linear(0, .25 5%, .58 11%, .82 18%, .93 26%, .975 36%, .992 50%, 1); } }

