#dw-theme-toggle {
  --toggle-line: #262d33;
  --toggle-muted: #9aa4ad;
  --toggle-ink: #e9edf0;
  --toggle-raised: #1a2024;
  --toggle-accent: #f7931a;
  --toggle-ring: #b96f16;
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--toggle-line);
  border-radius: 9px;
  background: transparent;
  color: var(--toggle-muted);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
html:is([data-theme="day"], [data-theme="light"]) #dw-theme-toggle {
  --toggle-line: #e4e2dc;
  --toggle-muted: #565b64;
  --toggle-ink: #171a20;
  --toggle-raised: #fcfbf9;
  --toggle-accent: #a9560a;
  --toggle-ring: #8f4a08;
}
#dw-theme-toggle:hover {
  color: var(--toggle-accent);
  border-color: var(--toggle-ring);
  background: rgba(247,147,26,.07);
}
#dw-theme-toggle:focus-visible {
  outline: 2px solid var(--toggle-ring);
  outline-offset: 2px;
}
#dw-theme-toggle svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#dw-theme-toggle .dw-theme-moon,
html:is([data-theme="day"], [data-theme="light"]) #dw-theme-toggle .dw-theme-sun {
  display: none;
}
html:is([data-theme="day"], [data-theme="light"]) #dw-theme-toggle .dw-theme-moon {
  display: block;
}
#dw-theme-toggle .dw-theme-flash {
  position: absolute;
  z-index: 60;
  top: calc(100% + 8px);
  right: 0;
  padding: 5px 9px;
  border: 1px solid var(--toggle-line);
  border-radius: 8px;
  background: var(--toggle-raised);
  color: var(--toggle-ink);
  font: 400 11.5px/1 ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  letter-spacing: .01em;
  text-transform: none;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease;
  pointer-events: none;
}
footer #dw-theme-toggle .dw-theme-flash {
  top: auto;
  bottom: calc(100% + 8px);
}
#dw-theme-toggle .dw-theme-flash.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  #dw-theme-toggle .dw-theme-flash { transition: opacity .16s ease; transform: none; }
}
