.switcher {
  --sw-bg: #ffffff;
  --sw-ink: #17151c;
  --sw-soft: #6b6676;
  --sw-line: rgba(23, 21, 28, 0.1);
  --sw-hover: #f4f1f8;
  --sw-tick: #d66699;
  position: relative;
  border: 0 !important; padding: 0 !important; margin: 0;
}
@media (prefers-color-scheme: dark) {
  .switcher:not(.light) {
    --sw-bg: #1d1a24;
    --sw-ink: #f3f1f7;
    --sw-soft: #a9a4b5;
    --sw-line: rgba(255, 255, 255, 0.12);
    --sw-hover: #27232f;
  }
  .switcher:not(.light) .switcher-mark { background: #f3f1f7; color: #17151c; }
}
.switcher > summary, .switcher[open] > summary {
  font: inherit; font-weight: inherit; color: inherit !important; background: none; border: 0;
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer; list-style: none;
  padding: 6px 8px; margin: -6px -8px; border-radius: 12px;
  color: inherit; -webkit-tap-highlight-color: transparent; user-select: none;
}
.switcher > summary::-webkit-details-marker { display: none; }
.switcher > summary:hover { background: rgba(127, 110, 160, 0.1); }
.switcher > summary:focus-visible { outline: 3px solid #8e6fd4; outline-offset: 2px; }
.switcher-name { display: flex; flex-direction: column; line-height: 1; }
.switcher-name small {
  margin-top: 4px; font-size: 12px; font-weight: 600; letter-spacing: 0; opacity: 0.7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.switcher-chevron { width: 12px; height: 12px; flex: none; opacity: 0.7; transition: transform 0.25s ease; }
.switcher[open] .switcher-chevron { transform: rotate(180deg); }
.switcher-menu {
  position: absolute; left: -8px; top: calc(100% + 12px); z-index: 30;
  width: min(300px, calc(100vw - 32px)); padding: 8px; border-radius: 18px;
  background: var(--sw-bg); color: var(--sw-ink); border: 1px solid var(--sw-line);
  box-shadow: 0 24px 50px -20px rgba(30, 20, 60, 0.45);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px; line-height: 1.3; letter-spacing: 0;
  animation: switcher-in 0.18s ease-out;
}
@keyframes switcher-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.switcher-menu hr { border: 0; border-top: 1px solid var(--sw-line); margin: 6px 4px; }
.switcher-item {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px;
  color: var(--sw-ink) !important; text-decoration: none !important;
}
.switcher-item:hover { background: var(--sw-hover); }
.switcher-item:focus-visible { outline: 3px solid #8e6fd4; outline-offset: -3px; }
.switcher-item b { display: block; font-weight: 700; font-size: 15px; }
.switcher-item small { display: block; margin-top: 2px; color: var(--sw-soft); font-size: 13px; }
.switcher-item > span:not(.switcher-mark) { flex: 1; min-width: 0; }
.switcher-item img, .switcher-mark {
  width: 38px; height: 38px; flex: none; border-radius: 10px;
}
.switcher-mark {
  display: grid; place-items: center; background: #17151c; color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 0.02em;
}
.switcher-item[aria-current]::after {
  content: "✓"; color: var(--sw-tick); font-weight: 800; font-size: 16px; margin-left: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .switcher-menu { animation: none; }
  .switcher-chevron { transition: none; }
}
