/* OrbiGPU 流体层 (11-18 统帅令按 Apple 界面原则优化全部项目页面; 选注入不改 sub2api 源码)。
   由 deploy/nginx/orbigpu.conf 在 </body> 前注入, 源文件随 deploy/orbigpu-seo/ 同步到 /var/www/orbigpu-seo。
   只补不会改坏版面的部分; sub2api 是 Tailwind v3 (.dark 暗色), 升级后若类名变了这里跟着改。
   页面引用地址带内容哈希 ?v= (scripts/orbigpu_seo_deploy.sh 部署时按内容算): Cloudflare 边缘缓存 4 小时, 改了这里访客立即拿到新版。 */

/* 去手机点按灰闪; 去 300ms 点击延迟 */
html { -webkit-tap-highlight-color: transparent; }
a, button, summary, label, [role="button"] { touch-action: manipulation; }

/* 按下即响应: sub2api 的 .btn 自带按下 0.98, 但走 200ms 过渡 (按下有延迟感) → 按下 80ms 完成, 松手照原过渡回弹 */
.btn:active { transition-duration: 80ms; }
/* 其它按钮 (图标键 / 开关 / 标签) 原本按下无反馈: 用独立 scale 属性, 与 Tailwind 的 transform 叠加不覆盖 (不打乱定位) */
button:not(.btn):not(:disabled):active, [role="button"]:not(.btn):active { scale: 0.97; }

/* 减弱透明度: 磨砂改实底 (只动半透明白 / 深色底的磨砂面, 遮罩层 bg-black 不动) */
@media (prefers-reduced-transparency: reduce) {
  [class*="backdrop-blur"] { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  [class*="backdrop-blur"][class*="bg-white/"] { background-color: #ffffff !important; }
  .dark [class*="backdrop-blur"][class*="bg-dark-"] { background-color: #1e293b !important; }
}

/* 增强对比: 次要灰字加深, 细边加深 */
@media (prefers-contrast: more) {
  .text-gray-400, .text-gray-500 { color: #374151 !important; }
  .dark .text-gray-400, .dark .text-gray-500, .dark .dark\:text-gray-400, .dark .dark\:text-gray-500 { color: #e5e7eb !important; }
  .border-gray-100, .border-gray-200 { border-color: #6b7280 !important; }
}

/* 减弱动态: 过渡缩到瞬时 (加载转圈等动画保留, 否则看着像卡死), 按下不缩放 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  button:active, .btn:active, [role="button"]:active { scale: none; --tw-scale-x: 1; --tw-scale-y: 1; }
}

/* 11-24 界面质检 (scripts/tool_page_daily.py 官网质检, 上线闸 ui_qa) 查出的三类, 注入层补:
   ① 手机点按区 < 44px: 登录按钮 40 / 输入框 42 / 顶栏「Login」36 与 Logo 40 / 显示密码键 34 宽 */
@media (max-width: 640px) {
  .btn, .input, header a { min-height: 44px; }
  /* 显示密码键贴在输入框右侧 (输入框 pr-11 正好留 44px): 撑满这 44px 并居中图标, 不改位置 */
  .relative > button.absolute.inset-y-0.right-0 { min-width: 44px; justify-content: center; padding-right: 0 !important; }
  /* 同意条款勾选框 16px: 旁边的文字标签 (行内, 点它也勾选) 加上下内边距撑到 44 高; 行内元素的竖向内边距不挤动排版 */
  .flex > input[type="checkbox"] + div label[for] { padding-block: 14px; }
}
/* ② 对比度: 主色 teal-600 #0d9488 配白字 (顶栏 Login) 与白底 teal 链接 (法务页邮箱) 只有 3.7:1 → 加深到 teal-700 #0f766e (5.5:1);
   只动亮色 (暗色底上加深反而更暗), 悬停改 teal-800 保留按下前的反馈 */
html:not(.dark) .bg-primary-600 { background-color: #0f766e !important; }
html:not(.dark) .hover\:bg-primary-700:hover { background-color: #115e59 !important; }
html:not(.dark) .text-primary-600, html:not(.dark) a[href^="mailto:"] { color: #0f766e !important; }
