html,
body {
  margin: 0;
  height: 100%;
  background: #141414;
  color: #f2f2f2;
}

#empty {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  font:
    14px/1.4 system-ui,
    sans-serif;
  color: rgb(255 255 255 / 55%);
}

#empty[hidden] {
  display: none;
}

#app-frame {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

#app-frame[hidden] {
  display: none;
}

#scrim {
  position: fixed;
  z-index: 20;
  inset: 0;
  background: transparent;
}

#scrim[hidden] {
  display: none;
}

#ghost {
  position: fixed;
  z-index: 30;
  top: env(safe-area-inset-top, 0px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 88px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

#ghost[hidden] {
  display: none;
}

.ghost-nub {
  display: block;
  width: 36px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: rgb(255 255 255 / 50%);
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 45%),
    0 1px 2px rgb(0 0 0 / 35%);
}

#ghost:hover .ghost-nub,
#ghost:focus-visible .ghost-nub {
  width: 48px;
  height: 5px;
  background: rgb(255 255 255 / 92%);
}

#bar {
  position: fixed;
  z-index: 40;
  top: 0;
  right: 0;
  left: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 4px;
  height: calc(32px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 4px 0 6px;
  background: rgb(16 16 16 / 92%);
  color: inherit;
  border-bottom: 1px solid rgb(255 255 255 / 14%);
  backdrop-filter: blur(12px);
  pointer-events: none;
  transform: translateY(-110%);
}

@media (prefers-reduced-motion: no-preference) {
  #bar {
    transition: transform 160ms ease;
  }
}

#bar.is-open {
  pointer-events: auto;
  transform: none;
}

#apps {
  display: flex;
  flex: 1;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

#apps::-webkit-scrollbar {
  display: none;
}

.app-btn,
#hide {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font:
    500 13px/1 system-ui,
    sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}

.app-btn {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
}

.app-btn:hover,
#hide:hover {
  background: rgb(255 255 255 / 10%);
}

.app-btn:focus-visible,
#hide:focus-visible,
#ghost:focus-visible {
  outline: 2px solid rgb(255 255 255 / 80%);
  outline-offset: 1px;
}

.app-btn[aria-current='page'] {
  background: rgb(255 255 255 / 18%);
}

#hide {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
}

.chevron {
  display: block;
  width: 7px;
  height: 7px;
  margin-top: 3px;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: rotate(45deg);
}
