:root {
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #000;
  background: #f5f5f7;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background-color: #f5f5f7;
  background-image: url("./assets/paper-texture.png");
  background-repeat: repeat;
  background-size: 512px 512px;
}

a {
  -webkit-tap-highlight-color: transparent;
}

.portal {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px 16px;
}

.nav-scroller {
  max-width: 100%;
  overflow-x: auto;
  border-radius: 999px;
  scrollbar-width: none;
}

.nav-scroller::-webkit-scrollbar {
  display: none;
}

.pill-nav {
  --indicator-left: 6px;
  --indicator-width: 220px;
  position: relative;
  display: inline-flex;
  width: max-content;
  padding: 6px;
  border-radius: 999px;
  background: #e8e8ed;
  user-select: none;
}

.pill-indicator {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: var(--indicator-width);
  border-radius: 999px;
  background: #1d1d1f;
  pointer-events: none;
  transform: translateX(var(--indicator-left));
  transition:
    width 220ms var(--ease-in-out),
    transform 220ms var(--ease-in-out);
}

.pill-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 999px;
  color: #000;
  font-size: 17px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease;
}

.pill-link.is-active {
  color: #fff;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 64px;
  padding: 10px 15px;
  border-radius: 999px;
  color: #fff;
  background: #1d1d1f;
  font-size: 13px;
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

.footer {
  position: fixed;
  right: 0;
  bottom: 24px;
  left: 0;
  color: #6e6e73;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (max-width: 720px) {
  .nav-scroller {
    width: 100%;
  }

  .pill-link {
    min-height: 42px;
    padding: 11px 17px;
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
