/* Keep layout height stable while the floating surface contracts. */
.bar {
  position: sticky;
  top: calc(12px + env(safe-area-inset-top));
  z-index: 10;
  align-self: start;
  height: var(--bar);
  min-width: 0;
  pointer-events: none;
}
.bar-surface {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  height: var(--bar);
  margin: 0 auto;
  padding: 0 6px;
  border-radius: 999px;
  pointer-events: auto;
  transition: width 480ms cubic-bezier(0.22, 1.2, 0.36, 1),
    height 400ms var(--spring), transform 400ms var(--spring),
    background-color 900ms ease, box-shadow 900ms ease;
}
.bar[data-compact] .bar-surface {
  width: min(420px, calc(100% - 24px));
  height: 48px;
  transform: translateY(4px);
}
.bar .nib-host {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.nib {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.nib img { width: 20px; height: 20px; display: block; }
.nib-night { display: none !important; }
:root[data-theme="dark"] .nib-day { display: none !important; }
:root[data-theme="dark"] .nib-night { display: block !important; }
@media (max-width: 720px) {
  .bar { top: calc(8px + env(safe-area-inset-top)); }
  .bar-surface { padding: 0 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .bar-surface { transition: none; }
}
