.ThemeSwitcher {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  background: var(--muted);
  border-bottom: 1px solid color-mix(in srgb, var(--dark) 14%, transparent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.ThemeSwitcher-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.5rem 0.75rem;
  min-height: 2.5rem;
}

.ThemeSwitcher-bar--home {
  justify-content: flex-end;
}

.ThemeSwitcher-barLead {
  flex: 1;
  min-width: 0;
}

.ThemeSwitcher-allRegions {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--dark);
  text-decoration: none;
  padding: 0.35rem 0.15rem;
  border-radius: 4px;
  border-bottom: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.ThemeSwitcher-allRegions:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background-color: color-mix(in srgb, var(--bg) 65%, transparent);
}

.ThemeSwitcher-allRegions:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ThemeSwitcher-gammaToggle {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--dark);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--dark) 18%, transparent);
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ThemeSwitcher-gammaToggle:hover {
  background: var(--bg);
  border-color: color-mix(in srgb, var(--dark) 28%, transparent);
  color: var(--accent);
}

.ThemeSwitcher-gammaToggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ThemeSwitcher-panel {
  padding: 0.5rem 0.75rem 0.65rem;
  border-top: 1px solid color-mix(in srgb, var(--dark) 10%, transparent);
  background: color-mix(in srgb, var(--bg) 40%, var(--muted));
}

.ThemeSwitcher-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
}

.ThemeSwitcher-btn {
  position: relative;
  width: 30px;
  height: 26px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.ThemeSwitcher-stripes,
.ThemeSwitcher-fallback {
  display: flex;
  width: 100%;
  height: 100%;
}

.ThemeSwitcher-stripe {
  flex: 1;
  min-width: 0;
}

.ThemeSwitcher-fallback {
  border-radius: inherit;
}

.ThemeSwitcher-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ThemeSwitcher-btn--active {
  border-color: var(--dark);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--dark);
}

.ThemeSwitcher-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
