.sands-theme-toggle {
  inline-size: 38px;
  block-size: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-inline-start: 12px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.sands-theme-toggle:hover {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .4);
  transform: translateY(-1px);
}

.sands-theme-toggle:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
}

.sands-theme-toggle__icon {
  inline-size: 18px;
  block-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sands-theme-toggle__icon svg {
  inline-size: 100%;
  block-size: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sands-theme-toggle__icon--moon {
  display: none;
}

body:not(.dark-scheme) .sands-theme-toggle {
  background: rgba(255, 255, 255, .9);
  border-color: rgba(27, 22, 99, .16);
  color: var(--bg-dark-1);
}

body:not(.dark-scheme) .sands-theme-toggle:hover {
  background: #fff;
  border-color: rgba(27, 22, 99, .3);
}

body:not(.dark-scheme) .sands-theme-toggle__icon--sun {
  display: none;
}

body:not(.dark-scheme) .sands-theme-toggle__icon--moon {
  display: inline-flex;
}

@media only screen and (max-width: 767px) {
  .sands-theme-toggle {
    inline-size: 34px;
    block-size: 34px;
    flex-basis: 34px;
    margin-inline-start: 10px;
  }

  .sands-theme-toggle__icon {
    inline-size: 16px;
    block-size: 16px;
  }
}
