:root {
  color-scheme: dark;
  --bg: #040407;
  --dock: rgba(12, 12, 16, .34);
  --dock-line: rgba(255, 255, 255, .075);
  --text: #f7f7fb;
  --muted: rgba(247, 247, 251, .42);
  --violet: #8a82d2;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Arial, sans-serif;
  background:
    linear-gradient(rgba(255, 255, 255, .024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .024) 1px, transparent 1px),
    #040407;
  background-size: 38px 38px, 38px 38px, 100% 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 4, 7, 0), rgba(4, 4, 7, .5) 74%, #040407);
}

button {
  border: 0;
  outline: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: #040407;
  transition: opacity .28s ease, visibility .28s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader span {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .1);
  border-top-color: var(--violet);
  animation: spin .7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.top-dock {
  position: fixed;
  z-index: 5;
  top: max(16px, calc(env(safe-area-inset-top) + 12px));
  left: 50%;
  transform: translateX(-50%);
  width: 168px;
  min-height: 54px;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  justify-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--dock-line);
  border-radius: 999px;
  background: var(--dock);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .055),
    0 10px 26px rgba(0, 0, 0, .12);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}

.top-action {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: transparent;
  opacity: .48;
  transition: opacity .2s ease, transform .2s ease;
}

.top-action:active {
  transform: scale(.96);
}

.top-action.active {
  opacity: 1;
}

.top-action img {
  width: 23px;
  height: 23px;
}

.top-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .07);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .14),
    inset 0 1px 0 rgba(255, 255, 255, .12);
  font-size: 13px;
  font-weight: 900;
}

.top-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-avatar.has-photo span {
  opacity: 0;
}

.bottom-dock {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: max(34px, calc(env(safe-area-inset-bottom) + 24px));
  transform: translateX(-50%);
  width: min(calc(100% - 34px), 390px);
  min-height: 74px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  overflow: hidden;
  padding: 7px;
  border: 1px solid var(--dock-line);
  border-radius: 999px;
  background: var(--dock);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .055),
    0 10px 26px rgba(0, 0, 0, .12);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}

.bottom-dock::before {
  content: "";
  position: absolute;
  top: 7px;
  left: var(--indicator-x, 25%);
  width: var(--indicator-width, 46px);
  height: 3px;
  border-radius: 999px;
  background: var(--violet);
  z-index: 2;
  transform: translateX(-50%);
  transition:
    left .32s cubic-bezier(.2, .8, .2, 1),
    width .22s ease;
}

.tab {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  user-select: none;
  transition: color .22s ease, transform .22s ease;
}

.tab:active {
  transform: scale(.98);
}

.tab:focus,
.tab:focus-visible {
  outline: 0;
  box-shadow: none;
}

.tab.active {
  color: #fff;
  text-shadow: none;
}

.tab-icon-img {
  width: 30px;
  height: 30px;
  opacity: .44;
  transition: opacity .22s ease;
}

.tab.active .tab-icon-img {
  opacity: 1;
  filter: none;
}

.tab b {
  line-height: 1;
  letter-spacing: 0;
}

@media (max-width: 360px) {
  .bottom-dock {
    width: calc(100% - 28px);
    bottom: max(28px, calc(env(safe-area-inset-bottom) + 20px));
  }
}
