/* ui-enhance.css —— 按钮灵动动效（位移+阴影，无缩放不模糊） */
button, [role="button"], a[class*="btn"], a[class*="rounded"] {
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s ease !important;
}
button:hover:not(:disabled), [role="button"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
}
button:active:not(:disabled), [role="button"]:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
  transition-duration: .04s !important;
}
button:disabled { opacity: .45; cursor: not-allowed; }

/* ===== 2026-11-17 注入模板页开关：修复 checked 状态不显示颜色 =====
   原因两层：
   1) data-[state=checked]:bg-primary 特异性太低被压掉；
   2) 亮色主题有规则 body[data-theme="light"] main .border{background:#fff!important}
      （特异性 0,2,2），开关 class 含 border，于是被刷白。
   这里用 html body main button[role=switch][data-state=...]（特异性 0,2,4）压过它。 */
html body main button[role="switch"] {
  background-color: #30363d !important;
  transition: background-color .15s ease !important;
}
html body main button[role="switch"][data-state="unchecked"] {
  background-color: #30363d !important;
}
html body main button[role="switch"][data-state="checked"] {
  background-color: #dc3545 !important;
}
html body main button[role="switch"] > span {
  background-color: #fff !important;
  display: block !important;
  width: 1rem !important;
  height: 1rem !important;
  border-radius: 9999px !important;
  transition: transform .15s ease !important;
  transform: translateX(0) !important;
}
html body main button[role="switch"][data-state="checked"] > span {
  transform: translateX(calc(100% - 2px)) !important;
}