/* 新主题只在明确标记的前台页面启用，避免影响旧表单与第三方组件。 */
body.syh-theme {
  --syh-blue: #2563eb;
  --syh-ink: #182b4d;
  --syh-muted: #78879d;
  --syh-surface: #f4f7fc;
  box-sizing: border-box;
  max-width: 540px;
  min-height: 100vh;
  height: auto;
  margin: 0 auto;
  padding: 0 0 calc(88px + env(safe-area-inset-bottom, 0px));
  background: var(--syh-surface);
  color: var(--syh-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.syh-theme *, body.syh-theme *::before, body.syh-theme *::after { box-sizing: border-box; }
body.syh-theme .f_number { font-family: "DP", -apple-system, BlinkMacSystemFont, sans-serif; font-variant-numeric: tabular-nums; }
body.syh-theme a { -webkit-tap-highlight-color: transparent; }
body.syh-theme button { cursor: pointer; }
body.syh-theme button:focus-visible, body.syh-theme a:focus-visible,
body.syh-theme [onclick]:focus-visible { outline: 3px solid #93baff !important; outline-offset: 3px; }
body.syh-theme button:disabled { opacity: .5; cursor: not-allowed; }

/* 固定导航只调整现有导航组件，表单页不会自动新增导航。 */
body.syh-theme #bm-nav {
  left: 50%;
  right: auto;
  bottom: 0;
  width: 100%;
  max-width: 540px;
  height: calc(68px + env(safe-area-inset-bottom, 0px));
  margin: 0;
  border: 0;
  border-top: 1px solid #e6edf7;
  background: #fff;
  box-shadow: 0 -4px 24px #182b4d06;
  transform: translateX(-50%);
  z-index: 1010;
}
body.syh-theme #bm-nav .am-navbar-nav {
  display: flex;
  height: 100%;
  padding: 5px 8px env(safe-area-inset-bottom, 0px);
  border-radius: 0;
  background: #fff !important;
}
body.syh-theme #bm-nav li { flex: 1; height: 60px; }
body.syh-theme #bm-nav a {
  display: flex;
  height: 60px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #8d9ab0;
  line-height: 1;
}
body.syh-theme #bm-nav a img { display: none; }
body.syh-theme #bm-nav .am-navbar-label { padding: 0; font-size: 11px; line-height: 16px; }
body.syh-theme #bm-nav a::before {
  content: "";
  display: block;
  width: 23px;
  height: 23px;
  background: currentColor;
  -webkit-mask: var(--syh-nav-icon) center / contain no-repeat;
  mask: var(--syh-nav-icon) center / contain no-repeat;
}
body.syh-theme #bm-nav .nva_sy { --syh-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'%3E%3Cpath d='M3 10 12 3l9 7v10a1 1 0 0 1-1 1h-5v-7H9v7H4a1 1 0 0 1-1-1Z'/%3E%3C/g%3E%3C/svg%3E"); }
body.syh-theme #bm-nav .nva_qb { --syh-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='15' rx='3'/%3E%3Cpath d='M16 11h5v5h-5a2.5 2.5 0 0 1 0-5Z'/%3E%3Cpath d='M4 5V3h13'/%3E%3C/g%3E%3C/svg%3E"); }
body.syh-theme #bm-nav .nva_kf { --syh-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'%3E%3Cpath d='M4 14v-3a8 8 0 0 1 16 0v3M20 16v2a3 3 0 0 1-3 3h-4'/%3E%3Crect x='2' y='10' width='4' height='7' rx='2'/%3E%3Crect x='18' y='10' width='4' height='7' rx='2'/%3E%3C/g%3E%3C/svg%3E"); }
body.syh-theme #bm-nav .nva_wd { --syh-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3Cpath d='M4 22v-2a8 8 0 0 1 16 0v2'/%3E%3C/g%3E%3C/svg%3E"); }
/* 理财入口使用同一套导航图标，不改变原有菜单的样式。 */
body.syh-theme #bm-nav .nva_lc { --syh-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h16M6 16v-5M12 16V7M18 16V4M5 8l6-4 5 1 4-3'/%3E%3C/g%3E%3C/svg%3E"); }
body.syh-theme.syh-page-home#sy #bm-nav .nva_sy a,
body.syh-theme.syh-page-wallet#qb #bm-nav .nva_qb a,
body.syh-theme.syh-page-mine#wd #bm-nav .nva_wd a { color: var(--syh-blue); font-weight: 600; }

/* 仅覆盖弹窗外观与宽度，保留原组件的显示状态、遮罩及事件。 */
body.syh-theme .am-modal-dialog { max-width: calc(100vw - 32px); border-radius: 18px; }
body.syh-theme .am-modal-prompt .am-modal-dialog { background: #fff; overflow: hidden; }
body.syh-theme .am-modal-prompt .am-modal-hd { padding: 24px 20px 10px; color: var(--syh-ink); font-size: 18px; font-weight: 600; }
body.syh-theme .am-modal-prompt .am-modal-bd { padding: 12px 20px 24px; color: var(--syh-muted); }
body.syh-theme .am-modal-prompt .am-modal-prompt-input { width: 100%; min-height: 48px; margin-top: 16px; padding: 10px 12px; border: 1px solid #dce5f3; border-radius: 10px; background: #f6f8fc; font-size: 16px; }
body.syh-theme .am-modal-prompt .am-modal-btn { height: 52px; color: var(--syh-blue); line-height: 52px; font-size: 15px; }
body.syh-theme .message { max-width: min(82%, 360px); top: 38vh; bottom: auto; }
body.syh-theme .message p { padding: 14px 20px; border-radius: 12px; font-size: 14px; }
