/* ============================================================
   api58 skin  ·  served at /diu/login.css
   作用域：html.diu-auth（认证页） / html.diu-home（紧凑首页）
   不修改任何原有逻辑，纯视觉层覆盖。

   色板：冷钢墨黑 + 单一信号蓝 + 纯白高光
   工艺：所有渐变都是「垂直光照」（上亮下暗），高光用白色不用彩色，
        全站只保留一束彩色光（右上 accent 13%），避免多色廉价感。
   ============================================================ */

/* ---------- 0. 设计令牌（只挂在业务作用域上，不污染 :root / 后台） ---------- */
html.diu-auth,
html.diu-home {
  color-scheme: dark;
  --bg-0: #07080B;
  --bg-1: #0B0E13;
  --glow-key: rgba(76, 125, 255, .13);
  --glow-white: rgba(255, 255, 255, .045);
  --surface: rgba(19, 23, 32, .82);
  --surface-solid: #11141C;   /* = surface 叠在 bg-0 上的真实合成色，兜底不能有色差 */
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  /* 实体层次：卡片/输入框需要比 --line 更实一点，否则在 #07080B 上会"飘" */
  --line-card: rgba(255, 255, 255, .11);
  --line-card-hover: rgba(255, 255, 255, .16);
  /* 输入框描边 .24 + 凹槽内阴影，两条一起说明"这里可输入"。
     实测（DPR3 直采边框像素，不是公式推算）：.24 → #515359，对卡片底 2.37:1；
     hover .30 → #5F6167 2.95:1。比公式值（2.15 / 2.69）高，因为 border-box 下描边是叠在
     输入框自身 .035 白底（#1E212A）上的，不是叠在卡片底（#12151D）上——算术别再用卡片底。
     到 3:1 约需 .31；.34 以上合成后 channel ≈105，比卡片框（左/右 49–68、顶边含高光 74–84）
     亮一截，会层级倒挂，故停在 .24，记为已知偏差（见 README 9.1）。
     hover 必须跟着提：旧值 .22 比新 base 还低，会出现"鼠标一放上去反而变暗"。 */
  --line-input: rgba(255, 255, 255, .32);
  --line-input-hover: rgba(255, 255, 255, .38);
  /* 顶边 1px 高光：.12 实测只有 l≈65，压不过 .11 的外描边（l≈68），看着顶边并不更亮。
     提到 .20 后实测 l≈82 > 三边 68，才真正读作"光从上方来" */
  --hair-top: rgba(255, 255, 255, .20);
  --text-1: #EDF1F7;
  --text-2: #A8B3C4;
  --text-3: #798494;
  /* 空输入框获得焦点时 placeholder 仍要可见：#7E8A98 对 input 底 4.85 / focus 底 4.64；
     #7C8896 只有 0.02 余量、#78848F 直接 4.46 不达标 */
  --placeholder: #7E8A98;
  --foot: #8A95A5;
  --accent-700: #1F49B8;
  --accent-600: #2A5CD4;
  --accent-500: #3F7BF0;
  --accent-400: #7AA6FF;
  --accent-300: #A9C4FF;
  --accent-a12: rgba(63, 123, 240, .12);
  --accent-a28: rgba(63, 123, 240, .28);
  --ok: #3FCB8E;
  --warn: #E8B454;
  --danger: #F4685F;
  /* 按钮：白字 14.5px/600 不属于「大号文字」，必须 ≥4.5:1。
     不靠"变深"补对比度——那会把 S86% 的信号蓝压成 S67% 的皇家蓝。
     取白字可行区间(L≤.1833)的上沿并保住彩度：#3568E8 = 4.89、#2B5AD1 = 6.02，
     与 --accent-500 同色相族同彩度族，只深一阶。
     hover 不改填充：白字上方任何加亮都会掉对比度（+8% 白罩 → 3.7）。 */
  --btn: linear-gradient(180deg, #3568E8 0%, #2B5AD1 100%);
  /* hover 不改填充（= --btn）。白字按钮往上加亮一档就掉到 4.50 零余量，
     再亮即不达标，所以差异只交给 rim light + 外光晕 + translateY */
  --btn-hover: var(--btn);
  --btn-active: linear-gradient(180deg, #2B5AD1 0%, #2755C9 100%);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

html.diu-auth { background: var(--bg-0); }
html.diu-auth body { background: var(--bg-0); }

/* ---------- 1. 布局：根容器改为左右两栏 ---------- */
html.diu-auth .diu-shell {
  display: grid !important;
  grid-template-columns: minmax(300px, 520px) 448px;
  gap: 84px;
  justify-content: center;
  align-items: center;
  padding: 48px 32px !important;
  position: relative;
}

/* ---------- 2. 背景层：垂直光照 + 唯一彩色光斑 + 白网格 ---------- */
html.diu-auth .diu-grad {
  background:
    radial-gradient(1180px 700px at 78% -10%, var(--glow-key), transparent 62%),
    radial-gradient(900px 520px at 50% -16%, var(--glow-white), transparent 68%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%) !important;
}

/* 彩色光斑：单层，只动 transform/opacity（动效 #1）
   振幅收在 .72→.92：暗底大光斑的 opacity 振幅超过 .2 会看出"心跳" */
html.diu-auth .diu-blob {
  background-color: rgba(76, 125, 255, .10) !important;
  filter: blur(90px) !important;
  opacity: .72;
  transform-origin: 70% 30%;
  will-change: transform;
  animation: diu2-glow 9s ease-in-out infinite alternate;
}
/* 只保留一束光，另两层隐藏 */
html.diu-auth .diu-blob + .diu-blob { display: none !important; }

/* 白网格：入场淡入一次，之后完全静态（动效 #2） */
html.diu-auth .diu-grid {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .028) 1px, transparent 1px) !important;
  background-size: 64px 64px !important;
  -webkit-mask-image: radial-gradient(105% 80% at 50% 42%, #000 20%, transparent 76%);
  mask-image: radial-gradient(105% 80% at 50% 42%, #000 20%, transparent 76%);
  opacity: 1;
  animation: diu2-fadein 600ms ease-out 80ms 1 both;
}

@keyframes diu2-glow {
  from { transform: scale(1);    opacity: .72; }
  to   { transform: scale(1.05); opacity: .92; }
}
@keyframes diu2-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- 3. 左栏品牌区（逐条升起，动效 #3） ---------- */
.diu-brand {
  position: relative;
  z-index: 2;
  max-width: 520px;
  color: var(--text-1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
.diu-brand .diu-mesh {
  position: absolute;
  inset: -52px -40px -32px -48px;
  width: calc(100% + 88px);
  height: calc(100% + 84px);
  pointer-events: none;
  opacity: .55;
  z-index: 0;
}
.diu-brand > *:not(.diu-mesh) { position: relative; z-index: 1; }

/* 入场：统一走 --d 控制 delay，reduced-motion 里可整体半衰 */
.diu-lock,
.diu-h1,
.diu-lede,
.diu-points li,
.diu-status {
  animation: diu2-rise 380ms var(--ease) var(--d, 0ms) both;
}
.diu-lock { --d: 0ms; }
.diu-h1 { --d: 90ms; }
.diu-lede { --d: 170ms; }
.diu-points li:nth-child(1) { --d: 260ms; }
.diu-points li:nth-child(2) { --d: 340ms; }
.diu-points li:nth-child(3) { --d: 420ms; }
.diu-status { --d: 260ms; }

@keyframes diu2-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.diu-lock { display: flex; align-items: center; gap: 13px; margin-bottom: 40px; }
.diu-lock .diu-mark {
  width: 50px; height: 50px; border-radius: 14px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #131923 0%, #0B0F16 100%);
  box-shadow:
    0 10px 30px -12px rgba(63, 123, 240, .45),
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 0 0 1px var(--line);
  position: relative;
}
/* 品牌 mark halo（动效 #11） */
.diu-lock .diu-mark::after {
  content: ""; position: absolute; inset: -6px; border-radius: 19px;
  border: 1px solid var(--line-strong);
  opacity: .25;
  animation: diu2-halo 6s ease-in-out infinite;
}
@keyframes diu2-halo {
  0%, 100% { opacity: .25; transform: scale(1); }
  50%      { opacity: .45; transform: scale(1.05); }
}
.diu-lock .diu-mark svg { width: 29px; height: 29px; display: block; }
.diu-lock .diu-locktxt { display: flex; flex-direction: column; justify-content: center; }
.diu-lock .diu-name {
  font-size: 21px; font-weight: 600; letter-spacing: -.01em; line-height: 1.1;
  color: var(--text-1);
}
.diu-lock .diu-name em { font-style: normal; color: var(--accent-400); }
.diu-lock .diu-dom {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px; letter-spacing: .14em; color: var(--text-3);
  text-transform: none; margin-top: 5px;
}

.diu-h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 1.18;
  letter-spacing: -.02em;
  font-weight: 600;
  color: var(--text-1);
}
/* 实色高光，不再有渐变文字与循环动画 */
.diu-h1 span { color: var(--accent-400); }

.diu-lede {
  margin: 0 0 32px; max-width: 460px;
  color: var(--text-2); font-size: 14.5px; line-height: 1.85;
}

.diu-points { list-style: none; margin: 0 0 34px; padding: 0; display: grid; gap: 15px; max-width: 460px; }
.diu-points li { display: flex; gap: 12px; align-items: flex-start; }
.diu-points .diu-ic {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center; color: var(--accent-400);
  background: var(--accent-a12);
  border: 1px solid var(--line);
}
.diu-points .diu-ic svg { width: 15px; height: 15px; }
.diu-points .diu-pt { font-size: 13.5px; line-height: 1.7; font-weight: 500; color: var(--text-1); margin-bottom: 2px; }
.diu-points .diu-pd { font-size: 12.5px; line-height: 1.65; color: var(--text-3); }

.diu-status {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px; color: var(--text-2); letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
.diu-status b { color: var(--text-1); font-weight: 600; }
.diu-status .diu-sep { width: 1px; height: 11px; background: var(--line-strong); }
/* 状态灯：灯本体静止，外环呼吸（动效 #10）。--ok 只在这里出现 */
.diu-status .diu-led {
  position: relative;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok); flex: none;
}
.diu-status .diu-led::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--ok); opacity: .5;
  animation: diu2-led 2400ms ease-out infinite;
  will-change: transform, opacity;
}
@keyframes diu2-led {
  0%   { transform: scale(1);   opacity: .5; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* ---------- 4. 右侧卡片 ---------- */
html.diu-auth .diu-shell .card-glass {
  position: relative;
  overflow: hidden;
  background-color: var(--surface) !important;
  /* 「光从上方来」：顶光渐变 + 顶边 1px 高光。不占伪元素（::before/::after 给了扫光），
     也不能用 background 简写，否则会把 background-color 一起重置 */
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .07) 0, transparent 120px) !important;
  border-radius: 18px !important;
  /* pin 住应用自带的 border：它现在是浅色态 #fff3（白 .20），因为 <html> 没有 .dark class。
     若上游哪天启用 dark class，这层会变成石板蓝 #33415580，卡片框会突然发蓝且极难定位。
     固定到自有色后，渲染几乎等价（.20→.22 不可见），也顺手修掉这个隐患。 */
  border-color: rgba(255, 255, 255, .22) !important;
  box-shadow:
    0 0 0 1px var(--line-card),
    0 28px 64px -28px rgba(0, 0, 0, .92),
    inset 0 1px 0 var(--hair-top) !important;
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  backdrop-filter: blur(14px) saturate(115%);
  transition: box-shadow 240ms var(--ease), border-color 240ms var(--ease);
  animation: diu2-cardin 520ms var(--ease) 160ms both;  /* 动效 #4 */
}
/* 卡片 hover：描边与阴影加深（动效 #12），不做 3D 倾斜 */
html.diu-auth .diu-shell .card-glass:hover {
  box-shadow:
    0 0 0 1px var(--line-card-hover),
    0 34px 76px -30px rgba(0, 0, 0, .95),
    inset 0 1px 0 rgba(255, 255, 255, .16) !important;
}
@keyframes diu2-cardin {
  from { opacity: 0; transform: translateY(14px) scale(1.008); }
  to   { opacity: 1; transform: none; }
}

/* 卡片顶边 1px 高光：入场扫一次（#6），hover 再扫一次（#6） */
html.diu-auth .diu-shell .card-glass::after {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: translateX(-100%);
  animation: diu2-topbar 900ms var(--ease) 380ms 1 both;
  pointer-events: none;
}
@keyframes diu2-topbar {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}
html.diu-auth .diu-shell .card-glass::before {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .38), transparent);
  transform: translateX(-100%);
  pointer-events: none;
}
html.diu-auth .diu-shell .card-glass:hover::before {
  animation: diu2-topbar-hover 240ms linear 1;
}
@keyframes diu2-topbar-hover {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

html.diu-auth .diu-shell .card-glass h2 {
  color: var(--text-1) !important;
  font-size: 24px !important;
  line-height: 1.3 !important;
  font-weight: 600 !important;
  letter-spacing: -.01em;
}
html.diu-auth .diu-shell .card-glass h2 + p {
  color: var(--text-2) !important;
  font-size: 13px !important;
}

/* 卡片内 4 组逐条淡入（动效 #5） */
html.diu-auth .diu-shell .card-glass form > div:nth-child(1),
html.diu-auth .diu-shell .card-glass form > div:nth-child(2),
html.diu-auth .diu-shell .card-glass form > div:nth-child(2) > .mt-1,
html.diu-auth .diu-shell .card-glass form > button[type="submit"] {
  animation: diu2-rise6 200ms var(--ease) var(--d, 0ms) both;
}
/* 入场时序压到 0/40/80/120ms：原来 320ms 起步，密码管理器自动填充的内容
   在 opacity:0 期间是不可见的，Tab 进去也看不到光标 */
html.diu-auth .diu-shell .card-glass form > div:nth-child(1) { --d: 0ms; }
html.diu-auth .diu-shell .card-glass form > div:nth-child(2) { --d: 40ms; }
html.diu-auth .diu-shell .card-glass form > div:nth-child(2) > .mt-1 { --d: 80ms; }
html.diu-auth .diu-shell .card-glass form > button[type="submit"] { --d: 120ms; }
@keyframes diu2-rise6 {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 5. 表单控件（动效 #9：只换描边，不放大不位移） ---------- */
html.diu-auth .diu-shell .card-glass .input-label {
  color: var(--text-2) !important;
  font-size: 12.5px !important;
  line-height: 1.4 !important;
  font-weight: 500 !important;
  letter-spacing: .01em;
  transition: color 160ms ease-out;
}
html.diu-auth .diu-shell .card-glass div:has(.input:focus) > .input-label {
  color: var(--text-1) !important;
}
html.diu-auth .diu-shell .card-glass .input {
  background-color: rgba(255, 255, 255, .035) !important;
  border-color: var(--line-input) !important;
  color: var(--text-1) !important;
  border-radius: 11px !important;
  padding-top: .8rem !important;
  padding-bottom: .8rem !important;
  /* 凹槽内阴影：比继续调亮边框更能说明"这是可输入的" */
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .35);
  transition: border-color 140ms ease-out, box-shadow 140ms ease-out, background-color 140ms ease-out;
}
html.diu-auth .diu-shell .card-glass .input:hover:not(:focus) {
  border-color: var(--line-input-hover) !important;
}
html.diu-auth .diu-shell .card-glass .input::placeholder {
  color: var(--placeholder) !important;
  opacity: 1;
}
html.diu-auth .diu-shell .card-glass .input:focus {
  border-color: var(--accent-500) !important;
  background-color: rgba(255, 255, 255, .05) !important;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .35), 0 0 0 3px var(--accent-a28) !important;
  --tw-ring-shadow: 0 0 #0000 !important;
  transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
}
html.diu-auth .diu-shell .card-glass .input:-webkit-autofill,
html.diu-auth .diu-shell .card-glass .input:-webkit-autofill:hover,
html.diu-auth .diu-shell .card-glass .input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-1) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--surface-solid) inset !important;
  transition: background-color 9999s ease-out 0s;
}
html.diu-auth .diu-shell .card-glass .input-error { border-color: var(--danger) !important; }
/* 错误态要能压过 :focus 的蓝边（.input:focus 的 specificity 更高），focus 时环也转红 */
html.diu-auth .diu-shell .card-glass .input.input-error,
html.diu-auth .diu-shell .card-glass .input.input-error:hover,
html.diu-auth .diu-shell .card-glass .input.input-error:focus {
  border-color: var(--danger) !important;
}
html.diu-auth .diu-shell .card-glass .input.input-error:focus {
  box-shadow:
    inset 0 1px 1px rgba(0, 0, 0, .35),
    0 0 0 1px var(--danger),
    0 0 0 3px rgba(244, 104, 95, .22) !important;
}

/* 常驻错误行（login.js 注入，替代 3 秒后消失的 toast） */
html.diu-auth .diu-shell .card-glass .diu-err {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--danger);
}
html.diu-auth .diu-shell .card-glass .diu-err::before {
  content: "!";
  flex: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: var(--danger);
  border: 1px solid currentColor;
}

/* 表单内小图标 / 明文切换按钮（非文本 UI，3:1 标准即可，--text-3 只允许用在这里） */
html.diu-auth .diu-shell .card-glass svg.text-gray-400 { color: var(--text-3) !important; }
html.diu-auth .diu-shell .card-glass form button[type="button"] {
  color: var(--text-3) !important;
  transition: color 140ms ease-out;
  /* 热区 34×52 → ≥44：左扩 10px 仍落在 input 的 pr-11(44px) 里，不压已输入文本 */
  min-width: 44px;
  justify-content: center;
}
html.diu-auth .diu-shell .card-glass form button[type="button"]::before {
  content: "";
  position: absolute;
  inset: -6px -6px -6px -10px;
}
html.diu-auth .diu-shell .card-glass form button[type="button"]:hover { color: var(--accent-400) !important; }

/* ---------- 6. 主按钮（动效 #7 / #8） ---------- */
html.diu-auth .diu-shell .card-glass .btn-primary {
  position: relative;
  overflow: hidden;
  height: 46px;
  border-radius: 11px !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  letter-spacing: .01em;
  color: #FFFFFF !important;
  background: var(--btn) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    0 12px 26px -16px rgba(53, 104, 232, .75) !important;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease);
}
/* hover 只加 rim light + 外光晕 + 位移，填充色一分不动：白字上方任何加亮都会掉对比度 */
html.diu-auth .diu-shell .card-glass .btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .24),
    inset 0 1px 0 rgba(255, 255, 255, .22),
    0 16px 32px -16px rgba(53, 104, 232, .85) !important;
}
html.diu-auth .diu-shell .card-glass .btn-primary:active:not(:disabled) {
  background: var(--btn-active) !important;
  transform: scale(.985);
  transition-duration: 90ms;
}
html.diu-auth .diu-shell .card-glass .btn-primary::after {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 42%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .18), transparent);
  transform: translateX(-160%) skewX(-18deg);
  opacity: 0;                    /* 兜底：任何时候都不让扫光压在文字上 */
  pointer-events: none;
}
html.diu-auth .diu-shell .card-glass .btn-primary:hover::after {
  animation: diu2-btnsheen 260ms linear 1;
}
@keyframes diu2-btnsheen {
  0%   { transform: translateX(-160%) skewX(-18deg); opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateX(360%) skewX(-18deg); opacity: 0; }
}
html.diu-auth .diu-shell .card-glass .btn-primary:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

/* ---------- 7. 页脚 / 弱文本 ---------- */
/* 注意顺序：页脚元素自带 .text-gray-500，这条必须放在下面 .text-gray-* 之后同序号
   才能赢（同 specificity 0,3,1 的两个 !important，后者胜） */
html.diu-auth .diu-shell .text-gray-500,
html.diu-auth .diu-shell .text-gray-400 { color: var(--text-3) !important; }

html.diu-auth .diu-shell .diu-foot {
  /* 页脚单独一档：比 --text-3 再亮一点（--text-3 留给正文弱信息，不下调） */
  color: var(--foot) !important;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px !important;
  letter-spacing: .06em;
}
html.diu-auth .diu-shell .diu-foot b { color: var(--text-2); font-weight: 500; }

/* 键盘可达性。注意排除 .input：文本输入框的 :focus-visible 永远匹配，
   会把错误态的红色描边盖成蓝色 outline（.input 自己已有 3px 焦点环） */
html.diu-auth .diu-shell :focus-visible:not(.input),
html.diu-home :focus-visible:not(.input) {
  outline: 2px solid var(--accent-400);
  outline-offset: 2px;
}

/* 大屏隐藏卡片自带的 logo/站名（左栏已承载） */
@media (min-width: 1120px) {
  html.diu-auth .diu-shell .diu-head { display: none !important; }
}

/* ---------- 8. 响应式降级 ---------- */
@media (max-width: 1119px) {
  html.diu-auth .diu-shell {
    grid-template-columns: 1fr !important;
    gap: 0;
    padding: 64px 18px 40px !important;
    justify-items: center;
  }
  .diu-brand { display: none; }
  html.diu-auth .diu-shell .diu-head { display: block !important; }
  html.diu-auth .diu-shell .card-glass { width: 100%; max-width: 460px; }

  /* 移动端只留 200ms 入场 + focus 反馈 */
  html.diu-auth .diu-blob,
  html.diu-auth .diu-shell .card-glass::after,
  html.diu-auth .diu-shell .card-glass::before,
  .diu-lock .diu-mark::after,
  .diu-status .diu-led::after,
  html.diu-auth .diu-shell .card-glass .btn-primary::after {
    animation: none !important;
  }
  html.diu-auth .diu-shell .card-glass,
  .diu-lock, .diu-h1, .diu-lede, .diu-points li, .diu-status,
  html.diu-auth .diu-shell .card-glass form > div:nth-child(1),
  html.diu-auth .diu-shell .card-glass form > div:nth-child(2),
  html.diu-auth .diu-shell .card-glass form > div:nth-child(2) > .mt-1,
  html.diu-auth .diu-shell .card-glass form > button[type="submit"] {
    animation-duration: 200ms;
    animation-delay: 0ms;
  }
}
@media (min-width: 1120px) and (max-width: 1300px) {
  html.diu-auth .diu-shell { gap: 44px; grid-template-columns: minmax(280px, 1fr) 448px; padding: 40px 24px !important; }
}

/* 触屏设备没有 hover，关掉只靠 hover 的效果，避免"粘住"的假状态 */
@media (hover: none) {
  html.diu-auth .diu-shell .card-glass .btn-primary:hover::after,
  html.diu-auth .diu-shell .card-glass:hover::before {
    animation: none !important;
  }
  html.diu-auth .diu-shell .card-glass .btn-primary:hover:not(:disabled) {
    transform: none;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .18),
      0 12px 26px -16px rgba(53, 104, 232, .75) !important;
  }
}

/* 减弱动效：循环动画全关，入场退化为 120ms 淡入（delay 减半），交互过渡保留 */
@media (prefers-reduced-motion: reduce) {
  html.diu-auth .diu-blob,
  html.diu-auth .diu-grid,
  html.diu-auth .diu-shell .card-glass::after,
  html.diu-auth .diu-shell .card-glass::before,
  .diu-lock .diu-mark::after,
  .diu-status .diu-led::after,
  html.diu-auth .diu-shell .card-glass .btn-primary::after,
  html.diu-home main img {
    animation: none !important;
  }
  html.diu-auth .diu-grid { opacity: 1; }
  html.diu-auth .diu-shell .card-glass,
  .diu-lock, .diu-h1, .diu-lede, .diu-points li, .diu-status,
  html.diu-auth .diu-shell .card-glass form > div:nth-child(1),
  html.diu-auth .diu-shell .card-glass form > div:nth-child(2),
  html.diu-auth .diu-shell .card-glass form > div:nth-child(2) > .mt-1,
  html.diu-auth .diu-shell .card-glass form > button[type="submit"] {
    animation-name: diu2-fadein;
    animation-timing-function: linear;
    animation-duration: 120ms;
    animation-delay: calc(var(--d, 0ms) / 2);
  }
  html.diu-auth .diu-shell .card-glass .btn-primary,
  html.diu-auth .diu-shell .card-glass .input { transition-duration: 120ms; }
}
/* 无 backdrop-filter 兜底（保留顶光：用 background-color 而不是 background 简写） */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html.diu-auth .diu-shell .card-glass { background-color: var(--surface-solid) !important; }
}

/* ============================================================
   9. 紧凑首页（/home）同一套色板
   ============================================================ */
html.diu-home { background: var(--bg-0); }
html.diu-home body { background: var(--bg-0); }

html.diu-home [data-testid="compact-home"] {
  position: relative;
  background:
    radial-gradient(1100px 640px at 78% -8%, var(--glow-key), transparent 60%),
    radial-gradient(820px 480px at 50% -14%, var(--glow-white), transparent 66%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%) !important;
  color: var(--text-1) !important;
  overflow: hidden;
}
html.diu-home [data-testid="compact-home"]::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(110% 84% at 50% 40%, #000 20%, transparent 78%);
  mask-image: radial-gradient(110% 84% at 50% 40%, #000 20%, transparent 78%);
  pointer-events: none;
  z-index: 0;
}
html.diu-home [data-testid="compact-home"] > * { position: relative; z-index: 1; }

/* 头部 */
html.diu-home header {
  border-bottom-color: var(--line) !important;
  background: rgba(7, 8, 11, .45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
html.diu-home header span { color: var(--text-1) !important; }
html.diu-home header img {
  box-shadow: 0 0 0 1px var(--line-strong), 0 6px 20px -6px rgba(63, 123, 240, .25);
}
html.diu-home header button {
  color: var(--text-2) !important;
  border-radius: 9px;
  transition: background-color 140ms ease-out, color 140ms ease-out;
}
html.diu-home header button:hover {
  background: rgba(255, 255, 255, .06) !important;
  color: var(--text-1) !important;
}
html.diu-home header a[href="/login"],
html.diu-home header a[href*="login"] {
  background: var(--btn) !important;
  color: #FFFFFF !important;
  font-weight: 600 !important;
  border-radius: 9px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 10px 24px -16px rgba(63, 123, 240, .75);
}

/* 中央：只保留 logo 轻微浮动（6s）。
   img 是替换元素，inset box-shadow 不会绘制，顶部内高光做在 logo.svg 的描边渐变里 */
html.diu-home main img {
  /* 22.66% = logo.svg 里 rx 116/512，让外圈 1px 环与 SVG 转角完全重合 */
  border-radius: 22.66% !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .13),
    0 18px 40px -18px rgba(63, 123, 240, .55);
  animation: diu2-homefloat 6s ease-in-out infinite;
}
@keyframes diu2-homefloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
html.diu-home main h1 {
  color: var(--text-1) !important;
  letter-spacing: -.02em;
}
html.diu-home main p { color: var(--text-2) !important; letter-spacing: .02em; }
html.diu-home main a[href="/login"],
html.diu-home main a[href*="login"] {
  background: var(--btn) !important;
  color: #FFFFFF !important;
  font-weight: 600 !important;
  border-radius: 11px !important;
  padding: 12px 30px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 16px 34px -18px rgba(63, 123, 240, .8);
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease);
}
html.diu-home main a[href="/login"]:hover,
html.diu-home main a[href*="login"]:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 20px 40px -18px rgba(63, 123, 240, .9);
}

/* 页脚 */
html.diu-home footer {
  border-top-color: var(--line) !important;
  color: var(--text-3) !important;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px !important;
  letter-spacing: .08em;
}

/* ---------- 10. 中和应用自带的彩色工具类（emerald 系） ---------- */
/* .text-gradient 自带 background-clip:text + color:transparent，移动端卡片头会漏出来 */
html.diu-auth .text-gradient,
html.diu-home .text-gradient {
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  color: var(--text-1) !important;
  -webkit-text-fill-color: currentColor;
}
/* 卡片头 logo 容器（移动端可见）：shadow-primary-500/30 是青绿光。
   窄屏已关掉 blob/halo，这块静态光就是全页唯一的"光"，压到 .22 免得偏霓虹 */
html.diu-auth .diu-shell .diu-head > div:first-child {
  background: var(--surface-solid) !important;
  box-shadow:
    0 0 0 1px var(--line-strong),
    0 6px 18px -4px rgba(63, 123, 240, .22) !important;
}
html.diu-auth .diu-shell .diu-head h1 { color: var(--text-1) !important; }
/* 字标两段色：Diu = --text-1、Lia = --accent-400，和左栏 aside 的 Diu<em>Lia</em> 同一写法。
   （login.js 会在文本严格等于 DiuLia 时把 Lia 包成 <em class="diu-wm">） */
html.diu-auth .diu-shell .diu-head h1 .diu-wm {
  font-style: normal;
  color: var(--accent-400) !important;
  -webkit-text-fill-color: var(--accent-400);
}
/* 窄屏左栏整段隐藏，三卖点信息全丢，这里补一行极轻的中文概括。
   放在 .diu-head 内部 → 桌面端随 .diu-head 一起隐藏，不需要额外媒体查询 */
html.diu-auth .diu-shell .diu-head .diu-sub2 {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .02em;
  color: var(--text-3);
}
/* 路由切换顶部的 3px 进度条 */
html.diu-auth .navigation-progress-bar,
html.diu-home .navigation-progress-bar {
  background: linear-gradient(90deg, transparent 0%, var(--accent-600) 20%, var(--accent-500) 50%, var(--accent-600) 80%, transparent 100%) !important;
}

/* ---------- 11. 全局提示条（toast，teleport 到 body） ---------- */
html.diu-auth div[aria-live="polite"] > div,
html.diu-home div[aria-live="polite"] > div {
  background: rgba(12, 15, 21, .94) !important;
  border: 1px solid var(--line) !important;
  border-left: 4px solid var(--danger) !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 48px -18px rgba(0, 0, 0, .85) !important;
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  backdrop-filter: blur(14px) saturate(115%);
}
html.diu-auth div[aria-live="polite"] > div[class*="border-green"],
html.diu-home div[aria-live="polite"] > div[class*="border-green"] {
  border-left-color: var(--ok) !important;
}
html.diu-auth div[aria-live="polite"] p,
html.diu-home div[aria-live="polite"] p,
html.diu-auth div[aria-live="polite"] span,
html.diu-home div[aria-live="polite"] span { color: var(--text-1) !important; }
html.diu-auth div[aria-live="polite"] button,
html.diu-home div[aria-live="polite"] button { color: var(--text-3) !important; }
html.diu-auth div[aria-live="polite"] div[class*="bg-gray-1"],
html.diu-auth div[aria-live="polite"] div[class*="bg-gray-2"],
html.diu-home div[aria-live="polite"] div[class*="bg-gray-1"],
html.diu-home div[aria-live="polite"] div[class*="bg-gray-2"] { background-color: rgba(255, 255, 255, .10) !important; }
