@font-face {
  font-display: swap;
  font-family: "Jinghua Laosong";
  src: url("./assets/fonts/jinghua-laosong.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

:root {
  --global-nav-ink: #111111;
  --global-nav-muted: rgba(0, 0, 0, 0.34);
  --global-nav-line: rgba(0, 0, 0, 0.12);
}

.global-bottom-switch,
.global-index-panel {
  position: fixed;
  border: 0;
  background: transparent;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

.global-bottom-switch::before,
.global-index-panel::before {
  position: absolute;
  inset: 0;
  border: 1px solid currentColor;
  border-radius: inherit;
  content: "";
  opacity: 0.13;
  pointer-events: none;
}

.global-bottom-switch::after,
.global-index-panel::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-color: currentColor;
  content: "";
  opacity: 0.03;
  pointer-events: none;
}

.global-bottom-switch {
  right: 0.25rem;
  bottom: 0.25rem;
  z-index: 200;
  display: flex;
  min-height: 2.2rem;
  gap: 0.85rem;
  align-items: center;
  padding: 0 0.75rem;
  border-radius: 0.375rem;
  background: rgba(250, 250, 250, 0.74);
  box-shadow:
    0 0.7rem 1.8rem rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  color: var(--global-nav-ink);
}

.global-switch-button {
  position: relative;
  z-index: 1;
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  line-height: 1;
  text-transform: uppercase;
}

.global-switch-button.active {
  color: var(--global-nav-ink);
}

.global-index-panel {
  right: 0.25rem;
  bottom: 2.8rem;
  z-index: 198;
  display: grid;
  width: min(18rem, calc(100vw - 0.5rem));
  border-radius: 0.375rem;
  background: rgba(250, 250, 250, 0.74);
  box-shadow:
    0 0.9rem 2.4rem rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  color: var(--global-nav-ink);
  opacity: 0;
  transform: translateY(0.75rem);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.global-index-panel.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.global-index-panel a {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.75rem;
  align-items: center;
  min-height: 2.45rem;
  padding: 0 0.8rem;
  border-bottom: 1px solid var(--global-nav-line);
  color: inherit;
  text-decoration: none;
}

.global-index-panel a:last-child {
  border-bottom: 0;
}

.global-index-panel span {
  color: rgba(0, 0, 0, 0.5);
  font-size: 0.66rem;
}

.global-index-panel strong {
  font-family: "Jinghua Laosong", "Songti SC", "SimSun", serif;
  font-size: 0.78rem;
  font-weight: 400;
}
