/* Вкладки и плавающая навигация в духе iOS 26: стеклянная пилюля, значок над подписью, «линза»
   под выбранной вкладкой. Единственное место с тенью: пилюля висит над содержимым, и без тени
   стекло сливается с карточками под ним. */
.pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pane[hidden] { display: none; }
.pane:not([hidden]) { animation: pane-in .2s ease; }
@keyframes pane-in { from { opacity: 0; transform: translateY(6px); } }

/* Место под пилюлей. Расписание прокручивается под стеклом, поэтому отступ у списка, а не у вкладки;
   журналу нужна видимая панель снизу, ему отступ у вкладки. Отступ не зависит от сжатия пилюли:
   иначе сжатие сдвигало бы прокрутку и само себя переключало. */
:root { --nav-space: calc(84px + env(safe-area-inset-bottom, 0px)); }
body.has-nav #pane-journal { padding-bottom: var(--nav-space); }
body.has-nav #pane-journal .bar-b { padding-bottom: 10px; }
body.has-nav .sch-list { padding-bottom: calc(var(--nav-space) + 12px); }

:root { --glass: color-mix(in srgb, var(--surface) 82%, transparent); --glass-hi: rgba(255, 255, 255, .7); --glass-shadow: 0 10px 30px rgba(20, 30, 35, .14), 0 1px 3px rgba(20, 30, 35, .08); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --glass: color-mix(in srgb, var(--surface) 80%, transparent); --glass-hi: rgba(255, 255, 255, .08); --glass-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .3); }
}
:root[data-theme="dark"] { --glass: color-mix(in srgb, var(--surface) 80%, transparent); --glass-hi: rgba(255, 255, 255, .08); --glass-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .3); }

/* Под шторками и экраном списка группы (z-index 15+): поверх них пилюля перекрывала их кнопки. */
.nav { --n: 2; --i: 0; position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 14;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--frame) 70%, transparent);
  background: var(--surface); background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--glass-shadow); }
/* Линза считается от ширины самой пилюли, а не замеряется скриптом: когда пилюля сжимается,
   линза сжимается с ней в том же кадре и не отстаёт от своей вкладки. */
.lens { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n)); border-radius: 999px;
  transform: translateX(calc(var(--i) * 100%)); background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: transform .38s cubic-bezier(.25, .9, .3, 1); }
.lens.jelly { animation: jelly .38s ease; }
@keyframes jelly { 45% { scale: 1.1 .9; } }
.tab { position: relative; z-index: 1; width: 92px; height: 54px; border-radius: 999px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font: 600 11px/1 var(--f-body); letter-spacing: .01em; white-space: nowrap;
  transition: width .3s ease, height .3s ease, color .2s; }
.tab svg { flex: none; width: 24px; height: 24px; }
.tab span { display: block; max-height: 12px; transition: max-height .3s ease, opacity .2s ease; }
.tab.on { color: var(--accent-ink); }
.tab:active svg { scale: .9; }

/* Прокрутка вниз оставляет одни значки: пилюля короче и уже, ничего не прыгает вбок. */
.nav.compact .tab { width: 64px; height: 42px; }
.nav.compact .tab span { max-height: 0; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .lens, .tab, .tab span { transition: none; }
}
