@media (prefers-reduced-motion: no-preference) {
  html.theme-transition-active::view-transition-group(root),
  html.theme-transition-active::view-transition-image-pair(root) {
    animation-duration: 720ms;
    animation-timing-function: cubic-bezier(.22, .75, .18, 1);
  }

  html.theme-transition-active::view-transition-old(root),
  html.theme-transition-active::view-transition-new(root) {
    animation-duration: 720ms;
    mix-blend-mode: normal;
  }

  html.theme-transition-active::view-transition-old(root) {
    animation-name: theme-transition-fade-out;
  }

  html.theme-transition-active::view-transition-new(root) {
    z-index: 1;
    animation-name: theme-transition-reveal;
  }

  @keyframes theme-transition-reveal {
    from { clip-path: circle(0 at var(--theme-transition-x) var(--theme-transition-y)); }
    to { clip-path: circle(var(--theme-transition-radius) at var(--theme-transition-x) var(--theme-transition-y)); }
  }

  @keyframes theme-transition-fade-out {
    to { opacity: .92; }
  }
}


/* Native liquid-glass selector motion for every shared light/dark control. */
.theme-switch{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:3px!important;
  overflow:hidden;
}
.theme-switch::before{
  content:"";position:absolute;z-index:0;top:4px;bottom:4px;left:4px;
  width:calc((100% - 11px)/2);border:1px solid rgba(255,255,255,.88);border-radius:999px;
  background:radial-gradient(ellipse at 30% 12%,rgba(255,255,255,.98),rgba(255,255,255,.68) 42%,rgba(232,218,181,.36));
  box-shadow:inset 0 1px 2px rgba(255,255,255,.98),inset 0 -1px 2px rgba(80,67,43,.10),0 2px 8px rgba(55,44,23,.14);
  transform:translateX(0);pointer-events:none;
}
.theme-switch > .theme-option{position:relative;z-index:1;width:auto!important;min-width:38px;justify-self:stretch;background:transparent!important;border-color:transparent!important;box-shadow:none!important;color:#62583f!important}
.theme-switch > .theme-option[aria-pressed="true"]{color:#725728!important}
/* The moving glass indicator is the single selected-state bubble. */
.theme-switch > .theme-option[aria-pressed="true"],
html[data-theme="dark"] .theme-switch > .theme-option[aria-pressed="true"]{background:transparent!important;border-color:transparent!important;box-shadow:none!important}
html[data-theme="dark"] .theme-switch::before{background:radial-gradient(ellipse at 30% 12%,rgba(230,226,211,.34),rgba(95,91,82,.25) 48%,rgba(12,14,16,.42));border-color:rgba(255,255,255,.29);box-shadow:inset 0 1px 2px rgba(255,255,255,.30),inset 0 -1px 2px rgba(0,0,0,.42),0 2px 9px rgba(0,0,0,.28)}
html[data-theme="dark"] .theme-switch > .theme-option{color:#d7d3c9!important}
html[data-theme="dark"] .theme-switch > .theme-option[aria-pressed="true"]{color:#f3d98c!important}
.theme-switch:has(>[data-theme-choice="dark"][aria-pressed="true"])::before{transform:translateX(calc(100% + 3px))}
html.theme-liquid-active .theme-switch::before{transition:transform 560ms cubic-bezier(.22,1.28,.36,1),background 400ms cubic-bezier(1,0,.4,1),border-color 400ms cubic-bezier(1,0,.4,1),box-shadow 400ms cubic-bezier(1,0,.4,1)}
.theme-switch:has(> .theme-option:focus-visible){outline:2px solid rgba(210,177,103,.72);outline-offset:3px}
@media(prefers-reduced-motion:reduce){.theme-switch::before{transition:none!important}}
