.theme-switch {
  --theme-button-bg:var(--surface,var(--card,var(--control,#fff)));
  --theme-button-line:var(--line,var(--control-line,rgba(80,64,54,.2)));
  position:relative;
  width:42px !important;
  height:42px !important;
  min-width:42px;
  display:grid !important;
  place-items:center;
  padding:0 !important;
  overflow:hidden;
  border:1px solid var(--theme-button-line) !important;
  border-radius:12px !important;
  background:var(--theme-button-bg) !important;
  color:var(--ink,currentColor) !important;
  cursor:pointer;
}
.theme-switch [data-global-theme-symbol] {
  grid-area:1/1;
  font:19px/1 system-ui,sans-serif;
  opacity:0;
  transform:scale(.72) rotate(-16deg);
  transition:opacity .16s ease,transform .2s ease;
}
.theme-switch [data-global-theme-symbol]:first-child { opacity:1; transform:scale(1) rotate(0); }
:root[data-color-scheme="dark"] .theme-switch [data-global-theme-symbol]:first-child { opacity:0; transform:scale(.72) rotate(16deg); }
:root[data-color-scheme="dark"] .theme-switch [data-global-theme-symbol]:nth-child(2) { opacity:1; transform:scale(1) rotate(0); }
.global-theme-toggle.theme-switch { position:fixed; }
.topbar .global-theme-toggle.theme-switch { position:relative; top:auto; right:auto; }
.mobile-menu-action>.theme-switch {
  isolation:isolate;
  width:70px !important;
  min-width:70px;
  height:38px !important;
  grid-template-columns:1fr 1fr;
  place-items:center;
  padding:3px !important;
  border-radius:999px !important;
  background:var(--cream,var(--card,#f0ebe5)) !important;
  cursor:inherit;
}
.mobile-menu-action>.theme-switch::before {
  content:"";
  position:absolute;
  z-index:-1;
  top:3px;
  left:3px;
  width:30px;
  height:30px;
  border-radius:50%;
  background:var(--surface,var(--card,#fff));
  box-shadow:0 2px 9px rgba(31,22,17,.16);
  transition:transform .22s ease;
}
.mobile-menu-action>.theme-switch [data-global-theme-symbol],
.mobile-menu-action>.theme-switch [data-global-theme-symbol]:first-child {
  grid-area:auto;
  opacity:.46;
  transform:none;
}
.mobile-menu-action>.theme-switch [data-global-theme-symbol]:first-child { opacity:1; }
:root[data-color-scheme="dark"] .mobile-menu-action>.theme-switch::before { transform:translateX(32px); }
:root[data-color-scheme="dark"] .mobile-menu-action>.theme-switch [data-global-theme-symbol]:first-child { opacity:.46; transform:none; }
:root[data-color-scheme="dark"] .mobile-menu-action>.theme-switch [data-global-theme-symbol]:nth-child(2) { opacity:1; transform:none; }
