.liquid-nav {
  --nav-frost: #edf6f1c9;
  --nav-drop-highlight: #f1fff6;
  --nav-drop-fill: #bfebd5;
  --nav-drop-shadow: #115b3e18;
  --nav-droplet: #9adbbd;
  --nav-ripple: #399e737d;
  --nav-active: #075a45;
  isolation: isolate;
}

:root[data-theme='dark'] .liquid-nav {
  --nav-frost: #213c30d9;
  --nav-drop-highlight: #426957;
  --nav-drop-fill: #305846;
  --nav-drop-shadow: #050f0b50;
  --nav-droplet: #73b797;
  --nav-ripple: #9bdcbc91;
  --nav-active: #b4f1d5;
}

.desktop-nav.liquid-nav {
  position: relative;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: var(--nav-frost);
}

.liquid-nav > .nav-button {
  position: relative;
  z-index: 2;
  min-height: 44px;
  touch-action: manipulation;
}

:root .liquid-nav > .nav-button:is(:hover, [aria-current='page']),
:root[data-theme='dark'] .liquid-nav > .nav-button:is(:hover, [aria-current='page']) {
  background: transparent;
  color: var(--nav-active);
}

.desktop-nav.liquid-nav > .nav-button {
  min-width: 110px;
  padding: 8px 10px;
}

.liquid-nav [data-nav-badge] { display: contents; }

.desktop-nav.liquid-nav .nav-pill {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 15px;
  height: 15px;
}

.liquid-nav-drop,
.liquid-nav-effects {
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
}

.liquid-nav-drop {
  inset: 5px auto 5px 0;
  width: 0;
  background: linear-gradient(157deg, var(--nav-drop-highlight), var(--nav-drop-fill));
  box-shadow: 0 2px 8px var(--nav-drop-shadow);
  opacity: 0;
}

.liquid-nav-effects {
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.liquid-nav-ripple,
.liquid-nav-droplet {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.liquid-nav-ripple { border: 1px solid var(--nav-ripple); }
.liquid-nav-droplet { background: var(--nav-droplet); }

@media (min-width: 721px) {
  .mobile-nav .liquid-nav-drop,
  .mobile-nav .liquid-nav-effects { display: none; }
}

@media (max-width: 720px) {
  .mobile-nav.liquid-nav::before {
    content: '';
    position: absolute;
    inset: 4px 6px calc(4px + env(safe-area-inset-bottom));
    border-radius: 999px;
    background: var(--nav-frost);
    pointer-events: none;
  }

  .mobile-nav .liquid-nav-drop {
    top: 6px;
    bottom: calc(6px + env(safe-area-inset-bottom));
  }

  .mobile-nav .liquid-nav-effects {
    top: 0;
    bottom: env(safe-area-inset-bottom);
  }

  .mobile-nav.liquid-nav > .nav-button { font-size: 12px; }
}
