/* =========================================================================
   子页亮色模式适配 subpage-day.css（2026-10-28）
   问题：subpage-home-bridge.css / huaxu-tool-ui.css 只写了暗色，
        亮色（body.day-mode）下卡片透点阵、文字过淡、输入框双边框、按钮变形。
   做法：把工具层所有硬编码的暗色值在 day-mode 下全部覆盖为宣纸浅色体系。
   加载顺序：... → huaxu.css → bridge → tool-ui → 本文件
   ========================================================================= */

/* ---------------- 1. 页面底色与点云 ---------------- */
body.day-mode {
  background: #f0efe8 !important;
  color: #1d2328;
}
/* 亮色下点云压低存在感，避免盖住文字 */
body.day-mode canvas#dotCanvas,
body.day-mode #dotCanvas {
  opacity: .42 !important;
  mix-blend-mode: multiply;
}

/* ---------------- 2. 顶栏控件：保持胶囊/圆形 ---------------- */
body.day-mode .nav-cta,
body.day-mode .lang-toggle {
  border-radius: 100px !important;
}
body.day-mode .theme-toggle { border-radius: 50% !important; }
body.day-mode .nav {
  background: rgba(255, 255, 255, .72) !important;
  border-color: rgba(0, 0, 0, .08) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .08) !important;
}
body.day-mode .nav-links a,
body.day-mode .dropdown-trigger { color: #3a4149 !important; }
body.day-mode .nav-links a:hover { color: #1d2328 !important; }
body.day-mode .beta-badge {
  background: rgba(61, 139, 110, .12) !important;
  border-color: rgba(61, 139, 110, .3) !important;
  color: #2d6b52 !important;
}

/* ---------------- 3. 卡片：实心宣纸玻璃 ---------------- */
body.day-mode .card,
body.day-mode .cv-panel,
body.day-mode .cv-dz-wrap,
body.day-mode .bw-panel {
  background: rgba(255, 255, 255, .82) !important;
  border-color: rgba(0, 0, 0, .08) !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .9),
    0 10px 30px rgba(0, 0, 0, .07) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.2) !important;
  backdrop-filter: blur(14px) saturate(1.2) !important;
}
body.day-mode .card:hover { border-color: rgba(61, 139, 110, .38) !important; }

body.day-mode .card-head,
body.day-mode .cv-panel-head {
  background: rgba(255, 255, 255, .92) !important;
  border-bottom-color: rgba(0, 0, 0, .07) !important;
}
body.day-mode .card-head h2,
body.day-mode .card-head .ico,
body.day-mode .section-title,
body.day-mode .cv-panel-head h2 { color: #1d2328 !important; }
body.day-mode .card-head .ico { color: #2d6b52 !important; }

/* ---------------- 4. 文字层级 ---------------- */
body.day-mode {
  --text-primary: #1d2328;
  --text-secondary: #4a535c;
  --text-muted: #6f7a85;
}
body.day-mode .card p,
body.day-mode .card-body,
body.day-mode .metric span,
body.day-mode .chart-note,
body.day-mode .cv-faq-item p,
body.day-mode .sub { color: #4a535c !important; }
body.day-mode .chip.dim,
body.day-mode .hint,
body.day-mode .empty { color: #6f7a85 !important; }
body.day-mode .metric b,
body.day-mode .metric .v,
body.day-mode .cv-stat b { color: #2d6b52 !important; }

/* ---------------- 5. 按钮：恢复正确形态 ---------------- */
body.day-mode .btn,
body.day-mode .cv-btn,
body.day-mode .mini-btn {
  border-radius: 100px !important;
  background: rgba(255, 255, 255, .85) !important;
  border: 1px solid rgba(0, 0, 0, .10) !important;
  color: #2b333b !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05) !important;
  width: auto !important;
  flex: none !important;
}
body.day-mode .btn.primary,
body.day-mode .btn-primary,
body.day-mode .btn.accent,
body.day-mode .cv-btn-primary,
body.day-mode button.primary {
  background: linear-gradient(180deg, #3d8b6e, #2f7a5e) !important;
  border-color: #2f7a5e !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(47, 122, 94, .25) !important;
}
body.day-mode .btn:disabled,
body.day-mode .btn[disabled] {
  background: rgba(0, 0, 0, .05) !important;
  color: #9aa4ae !important;
  box-shadow: none !important;
}
/* 卡片内按钮组不要被拉满整行 */
body.day-mode .card-body > .btn,
body.day-mode .card-body > .cv-btn { width: auto !important; }

/* ---------------- 6. 输入框：去掉双边框 ---------------- */
body.day-mode input[type="text"],
body.day-mode input[type="url"],
body.day-mode input[type="search"],
body.day-mode input[type="password"],
body.day-mode textarea,
body.day-mode select,
body.day-mode .inp-row input,
body.day-mode .cv-input {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, .12) !important;
  border-radius: 12px !important;
  color: #1d2328 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .04) !important;
}
body.day-mode input::placeholder,
body.day-mode textarea::placeholder { color: #98a2ad !important; }
body.day-mode .inp-row {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, .10) !important;
}
/* 输入框外层若自带描边，避免叠加 */
body.day-mode .inp-row input { box-shadow: none !important; }

/* ---------------- 7. 开关 / 芯片 / 徽章 ---------------- */
body.day-mode .switch .track,
body.day-mode .switch > i {
  background: rgba(0, 0, 0, .12) !important;
  border-color: rgba(0, 0, 0, .12) !important;
}
body.day-mode .switch .track::after,
body.day-mode .switch > i::after { background: #ffffff; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
body.day-mode .switch input:checked + .track,
body.day-mode .switch input:checked + i {
  background: rgba(61, 139, 110, .55) !important;
  border-color: #3d8b6e !important;
}
body.day-mode .switch { color: #3a4149 !important; }
body.day-mode .chip {
  background: rgba(0, 0, 0, .04) !important;
  border-color: rgba(0, 0, 0, .10) !important;
  color: #4a535c !important;
}
body.day-mode .chip.info {
  background: rgba(61, 139, 110, .12) !important;
  border-color: rgba(61, 139, 110, .35) !important;
  color: #2d6b52 !important;
}
body.day-mode .chip.dim { color: #6f7a85 !important; }
body.day-mode .status-badge { border-color: rgba(0,0,0,.1) !important; }

/* ---------------- 8. 指标/统计卡 ---------------- */
body.day-mode .metric {
  background: rgba(255, 255, 255, .9) !important;
  border-color: rgba(0, 0, 0, .08) !important;
}
body.day-mode .metrics .metric { box-shadow: none !important; }

/* ---------------- 9. 拖拽区 / 列表 / 空状态 ---------------- */
body.day-mode .cv-dz,
body.day-mode .dz,
body.day-mode .cv-dropzone {
  background: rgba(255, 255, 255, .7) !important;
  border-color: rgba(61, 139, 110, .45) !important;
}
body.day-mode .cv-item,
body.day-mode .list-row {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, .08) !important;
}
body.day-mode [class*="empty"],
body.day-mode .empty { color: #6f7a85 !important; }

/* ---------------- 10. 弹窗 ---------------- */
body.day-mode .cv-modal,
body.day-mode .match-overlay,
body.day-mode .bw-modal { background: rgba(240, 239, 232, .78) !important; }
body.day-mode .cv-modal > .cv-panel,
body.day-mode .bw-modal > div,
body.day-mode .match-panel {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, .08) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .18) !important;
}
body.day-mode .cv-panel-head {
  background: linear-gradient(180deg, #ffffff, #fbfaf5) !important;
}
body.day-mode .cv-matrix > * {
  background: #fbfaf5 !important;
  border-color: rgba(0, 0, 0, .08) !important;
}
body.day-mode .cv-faq-item { border-color: rgba(0, 0, 0, .08) !important; }

/* ---------------- 11. 底栏（新增的统一页脚） ---------------- */
body.day-mode .footer {
  background: rgba(255, 255, 255, .6) !important;
  border-top: 1px solid rgba(0, 0, 0, .07) !important;
  color: #4a535c !important;
}
body.day-mode .footer a { color: #3a4149 !important; }

/* ---------------- 12. 主内容与页脚间距 ---------------- */
main, .main { padding-bottom: 0 !important; }
main + .footer, .main + .footer { margin-top: 72px; }
/* ============ 追加修复（2026-10-28 第二轮）============ */

/* 13. 点云再压低，不盖文字 */
body.day-mode #dotCanvas,
body.day-mode canvas {
  opacity: .26 !important;
  z-index: 0 !important;
}
body.day-mode main, body.day-mode .main, body.day-mode .nav, body.day-mode .footer {
  position: relative;
  z-index: 2;
}

/* 14. 文本框/占位符对比度（此前几乎看不见） */
body.day-mode textarea,
body.day-mode input[type="text"],
body.day-mode input[type="search"],
body.day-mode input[type="url"] {
  color: #1d2328 !important;
  background: #ffffff !important;
  border-color: rgba(0,0,0,.16) !important;
}
body.day-mode textarea::placeholder,
body.day-mode input::placeholder { color: #8b95a1 !important; opacity: 1 !important; }
body.day-mode .card-body p,
body.day-mode .card p,
body.day-mode .hint,
body.day-mode .chart-note { color: #4a535c !important; opacity: 1 !important; }
body.day-mode .card-head .chip { opacity: 1 !important; }

/* 15. 拖拽区高度与文字排布 */
body.day-mode .cv-dz,
body.day-mode .cv-dropzone {
  min-height: 170px !important;
  padding: 30px 20px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}
body.day-mode .cv-dropzone h3 { font-size: 16px !important; margin: 6px 0 2px !important; color: #1d2328 !important; }
body.day-mode .cv-dropzone p { font-size: 12.5px !important; color: #6f7a85 !important; }

/* 16. 卡片内按钮不要被拉满/挤压 */
body.day-mode .card-body .btn,
body.day-mode .card-body .cv-btn {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
}
body.day-mode .card-body > div:has(> .btn) { display: flex; flex-wrap: wrap; gap: 8px; }
body.day-mode .btn:not(.primary) { background: #ffffff !important; color: #2b333b !important; border-color: rgba(0,0,0,.14) !important; }
body.day-mode .btn:not(.primary):disabled {
  background: #f5f4ee !important;
  color: #9aa4ae !important;
  border-color: rgba(0,0,0,.08) !important;
}

/* 17. 指标/统计小字对比度 */
body.day-mode .metric span,
body.day-mode .metric .k,
body.day-mode .cv-stat span,
body.day-mode .hero-pills .pill span { color: #5b6672 !important; opacity: 1 !important; text-shadow: none !important; }
body.day-mode .metric b, body.day-mode .metric .v { color: #2d6b52 !important; }

/* 18. 底部页脚上方小字 */
body.day-mode .footer, body.day-mode .footer a, body.day-mode .footer-copy { color: #4a535c !important; }

/* 19. 卡片阴影更轻，避免灰边 */
body.day-mode .card { box-shadow: 0 2px 10px rgba(0,0,0,.05), inset 0 1px 0 rgba(255,255,255,.9) !important; }

/* 20. 顶栏控件在亮色下保持圆形/胶囊且边框清晰 */
body.day-mode .nav-cta {
  border-radius: 999px !important;
  border: 1px solid rgba(0,0,0,.12) !important;
  background: #ffffff !important;
  color: #2b333b !important;
}
body.day-mode .lang-toggle {
  border-radius: 999px !important;
  border: 1px solid rgba(0,0,0,.12) !important;
  background: #ffffff !important;
}
body.day-mode .lang-toggle .lang-on { color: #2d6b52 !important; }
body.day-mode .lang-toggle .lang-off { color: #8b95a1 !important; }
body.day-mode .theme-toggle {
  border-radius: 50% !important;
  border: 1px solid rgba(0,0,0,.12) !important;
  background: #ffffff !important;
  width: 38px !important; height: 38px !important;
  display: grid !important; place-items: center;
}

/* ============ 追加修复（第三轮 · 提高优先级压过 align-home.css）============ */

/* 21. 点云：改压 .particle-field 容器（canvas 本身 0.42 是父层给的） */
body.day-mode .particle-field { opacity: .30 !important; }
body.day-mode .particle-field canvas { opacity: 1 !important; }

/* 22. textarea / input：压过 align-home 的 .85 半透明白 */
body.day-mode .card textarea,
body.day-mode .card input[type="text"],
body.day-mode .card input[type="search"],
body.day-mode .field textarea,
body.day-mode .field input,
body.day-mode .inp-row input,
body.day-mode textarea,
body.day-mode input[type="text"] {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #1d2328 !important;
  border: 1px solid rgba(0, 0, 0, .16) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .05) !important;
  -webkit-text-fill-color: #1d2328 !important;
}
body.day-mode .card textarea::placeholder,
body.day-mode .field textarea::placeholder,
body.day-mode textarea::placeholder {
  color: #8b95a1 !important;
  -webkit-text-fill-color: #8b95a1 !important;
  opacity: 1 !important;
}

/* 23. 按钮容器：`.inp-row` 里装按钮时不要当输入框渲染 */
body.day-mode .inp-row:has(> button),
body.day-mode .card-body .inp-row:has(button) {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  gap: 10px !important;
  display: flex !important;
  flex-wrap: wrap !important;
}
body.day-mode .inp-row button,
body.day-mode .card-body button {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 96px !important;
  border-radius: 999px !important;
}
body.day-mode button:disabled,
body.day-mode .btn:disabled {
  opacity: 1 !important;
  background: #f2f1ec !important;
  color: #97a1ab !important;
  border: 1px solid rgba(0, 0, 0, .08) !important;
  box-shadow: none !important;
}
body.day-mode button.btn.primary:disabled {
  background: #e7efec !important;
  color: #7d9a90 !important;
  border-color: rgba(61, 139, 110, .18) !important;
}

/* 24. 两列等高：最后一卡吸收剩余空间 */
body .col { align-items: stretch !important; }
body .col > .card:last-child { flex: 1 1 auto; }

/* 25. 卡片内竖向留白收紧 */
body.day-mode .card-body { padding: 16px 18px !important; }
body.day-mode .card-body > * + * { margin-top: 10px; }

/* 26. 底部与页脚小字对比度 */
body.day-mode .footer *,
body.day-mode [class*="last"],
body.day-mode small { color: #5b6672 !important; }

/* ============ 追加修复（第四轮 · 收尾）============ */

/* 27. 全站弱化文字再提一档（覆盖 JS 动态渲染的小字） */
body.day-mode {
  --text-muted: #55606b;
  --text-secondary: #3f4852;
}
body.day-mode .footer small,
body.day-mode [class*="foot"],
body.day-mode [class*="meta"] { color: #55606b !important; }

/* 28. 去掉卡片内的空占位 div（它们撑出了多余间距） */
body.day-mode .card-body > div:empty { display: none !important; }

/* 29. 加密恢复卡：提示块高度收紧 */
body.day-mode .card-body > div[style*="150"],
body.day-mode .card-body > div:last-child { margin-top: 6px !important; }

/* 30. 两列严格等高（grid 拉伸 + 列内最后一张卡吸收） */
body .grid {
  align-items: stretch !important;
}
body .grid > .col {
  height: 100% !important;
  align-self: stretch !important;
}
body .col > .card:last-child {
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

/* 31. 暗色模式回归保护：这轮新增的实心白/胶囊规则不得泄漏到暗色 */
body:not(.day-mode) .card textarea,
body:not(.day-mode) .card input[type="text"] {
  background: rgba(10, 14, 22, .55) !important;
  color: #e8eef6 !important;
  border-color: rgba(255, 255, 255, .10) !important;
}
body:not(.day-mode) button:disabled,
body:not(.day-mode) .btn:disabled {
  background: rgba(255, 255, 255, .05) !important;
  color: rgba(232, 238, 246, .45) !important;
  border-color: rgba(255, 255, 255, .08) !important;
}

/* ============ 第五轮：撤掉"拉伸空卡"，改用压缩高卡高度来平衡两列 ============ */
body .grid { align-items: start !important; }
body .grid > .col { height: auto !important; align-self: start !important; }
body .col > .card:last-child { flex: 0 0 auto !important; }

/* 拖拽区统一收紧（左右列各有一个，是高度差主因） */
body .card .dropzone,
body .card .cv-dz,
body .card .cv-dropzone {
  min-height: 132px !important;
  padding: 22px 18px !important;
}
body .card .dropzone svg,
body .card .cv-dz svg { width: 30px !important; height: 30px !important; }

/* 卡片内提示区（盾牌/文件夹 + 两行小字）压缩 */
body .card-body > div:has(> div:only-child):not(:has(button)) { min-height: 0 !important; }
body .card-body > div > svg[width], body .card-body > div > svg:only-child { display: none !important; }

/* 左右列间距略缩小，视觉更紧凑 */
body .grid { gap: 16px !important; }
body .col { gap: 16px !important; }
