/* Gradient thumbs where supported; Firefox uses the solid brand-color fallback. */
html,
body * {
  scrollbar-width: thin;
  scrollbar-color: #7c5cff #09121f;
}

@supports selector(::-webkit-scrollbar) {
  html,
  body * {
    scrollbar-width: auto;
    scrollbar-color: auto;
  }
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
  background: #09121f;
}

::-webkit-scrollbar-thumb {
  border: 2px solid #09121f;
  border-radius: 999px;
  background: linear-gradient(180deg, #22d3ee, #34d399, #7c5cff, #e879f9);
}

::-webkit-scrollbar-thumb:horizontal {
  background: linear-gradient(90deg, #22d3ee, #34d399, #7c5cff, #e879f9);
}

.site-footer {
  position: fixed;
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  left: max(4.25rem, calc(env(safe-area-inset-left) + 4.25rem));
  right: max(1.5rem, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  z-index: 84;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #edf6ff;
  font-family: "Inter", sans-serif;
  pointer-events: none;
}

.site-footer:has(.site-footer__progress) {
  justify-content: space-between;
}

.site-footer__inner,
.site-footer__progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.48rem 1.1rem;
  border: 1px solid rgba(124, 92, 255, 0.45);
  border-radius: 999px;
  background: rgba(9, 18, 31, 0.92);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
}

.site-footer a,
.site-footer__start {
  display: inline-flex;
  align-items: center;
  color: #9eb2c9;
  font: 400 0.76rem/1.4 "Inter", sans-serif;
  text-decoration: none;
  white-space: nowrap;
}

.site-footer a:hover,
.site-footer__start:hover {
  color: #22d3ee;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.site-footer a:focus-visible,
.site-footer__start:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 4px;
  border-radius: 8px;
}

.site-footer__brand {
  gap: 0.5rem;
}

.site-footer__brand img {
  display: block;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.site-footer__copyright strong {
  color: #edf6ff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
}

.site-footer__copyright > span {
  color: #2dd4bf;
  font-size: 0.74rem;
}

.site-footer__copyright > span::before {
  content: " \00b7 ";
}

.site-footer__links {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.site-footer__links::before {
  content: "|";
  margin-right: 0.3rem;
  color: rgba(148, 163, 184, 0.35);
}

.site-footer__links a + a::before {
  content: "\00b7";
  margin-right: 0.45rem;
  color: rgba(148, 163, 184, 0.35);
}

.site-footer__progress {
  gap: 0.7rem;
  color: #9eb2c9;
  font: 400 0.72rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}

.site-footer__track {
  width: 160px;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.16);
}

.site-footer__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22d3ee, #34d399, #e879f9);
}

.site-footer__start {
  padding: 0;
  border: 0;
  background: none;
  color: #2dd4bf;
  font: 600 0.7rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: pointer;
}

body:has(> .site-footer):not(:has(> .viewport-lock)) {
  padding-bottom: var(--site-footer-space, 90px);
}

body:has(> .site-footer) > .viewport-lock {
  padding-bottom: var(--site-footer-space, 110px);
}

@media (max-width: 1040px) {
  .site-footer {
    bottom: max(0.6rem, env(safe-area-inset-bottom));
    left: max(4.15rem, calc(env(safe-area-inset-left) + 4.15rem));
    right: max(0.75rem, env(safe-area-inset-right));
    flex-direction: column;
    align-items: stretch;
    gap: 0.32rem;
  }

  .site-footer__inner,
  .site-footer__progress {
    justify-content: space-between;
    gap: 0.45rem;
    padding: 0.36rem 0.85rem;
    font-size: 0.66rem;
  }

  .site-footer__brand img {
    width: 18px;
    height: 18px;
  }

  .site-footer__copyright strong,
  .site-footer a {
    font-size: 0.7rem;
  }

  .site-footer__copyright > span,
  .site-footer__links::before {
    display: none;
  }

  .site-footer__track {
    flex: 1;
    min-width: 12px;
    max-width: 130px;
  }

  .site-footer__start {
    font-size: 0.66rem;
  }
}

@media (max-width: 420px) {
  .site-footer__progress {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .site-footer__start {
    justify-content: flex-end;
    width: 100%;
  }

  .site-footer__inner {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media print {
  .site-footer {
    display: none;
  }

  body:has(> .site-footer) {
    padding-bottom: 0;
  }
}
