.theme-toggle {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  place-items: center;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.theme-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

body,
.sample-paper,
.paper-back,
.media-button {
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease;
}

.theme-toggle:hover {
  border-color: color-mix(in srgb, currentColor 28%, transparent);
  background: color-mix(in srgb, currentColor 7%, transparent);
}

.theme-toggle svg {
  display: block;
  width: 16px;
  height: 16px;
  grid-area: 1 / 1;
}

.theme-toggle [hidden] {
  display: none;
}

@media (max-width: 740px) {
  .theme-toggle {
    width: 30px;
    height: 30px;
  }

  .nav-moments {
    font-size: 0;
  }

  .nav-moments::after {
    content: "Moments";
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle {
    transition: none;
  }

  body,
  .sample-paper,
  .paper-back,
  .media-button {
    transition: none;
  }
}
