/* JEWEL MONSTER · 顶栏 / 页脚统一配色（v1）
   目的：破除单色系——顶栏与页脚用深翡翠底 + 浅色字，与浅青瓷正文明显分层；
   引入香槟金作为 CTA / 强调点缀，形成多色层次。
   本文件作为每页最后一个样式表加载，确保覆盖页面自带 CSS。 */
:root {
  --jm-gold: #c9a24a;
  --jm-gold-2: #e3c573;
  --jm-deep: #123f2b;
  --jm-on-dark: #e9f4ee;
  --jm-on-dark-2: #bcd6c6;
}

/* ============ 顶栏 ============ */
.topbar {
  background: var(--jm-deep) !important;
  border-bottom: 1px solid rgba(0, 0, 0, .18);
  box-shadow: 0 2px 16px rgba(0, 0, 0, .14);
}
.topbar .brand-text,
.topbar .brand-text small { color: var(--jm-on-dark) !important; }
.topbar .nav a {
  color: var(--jm-on-dark-2) !important;
  background: transparent !important;
}
.topbar .nav a:hover {
  background: rgba(255, 255, 255, .12) !important;
  color: #fff !important;
}
.topbar .nav-i { color: var(--jm-gold-2) !important; }
.topbar .nav a:hover .nav-i { color: #fff !important; }

/* 语言切换下拉（#langSel）
   坑：Windows Chrome 展开下拉列表时会拿 <select> 自身的 background 去渲染列表，
   若底色是半透明（旧版 rgba(255,255,255,.08)）叠在默认白底上就变成白底，
   而 option 又继承 select 的浅色字 → 白底白字"底色字色一体"，完全看不见。
   修法：① select 底色必须不透明；② option 显式白底深字双重保险。 */
.topbar .lang-sel,
.topbar select.lang-sel,
.lang-sel {
  background: #1c4a35 !important;              /* 不透明深翡翠，禁半透明 */
  color: #e9f4ee !important;                   /* 浅色字，与深底强反差 */
  border-color: rgba(255, 255, 255, .30) !important;
}
.topbar .lang-sel:hover,
.topbar .lang-sel:focus,
.lang-sel:hover, .lang-sel:focus {
  background: #235a40 !important;
  color: #ffffff !important;
}
.topbar .lang-sel option,
.topbar select.lang-sel option,
.lang-sel option {
  background: #ffffff !important;              /* 展开列表：白底 */
  color: #12241a !important;                   /* 展开列表：深绿字 */
}
/* 主题为浅色时不透明兜底（避免任何半透明残留） */
.topbar .lang-sel optgroup { background: #ffffff !important; color: #12241a !important; }
.topbar .btn-cream {
  background: rgba(255, 255, 255, .94) !important;
  color: var(--jm-deep) !important;
  border: none !important;
}
.topbar .btn-cream:hover { background: #fff !important; }

.topbar .acct-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 9999px;
  background: #e8f2ea !important;          /* 与页面底色同款 */
  color: #0c3a29 !important;               /* 深绿字 */
  font-weight: 600; white-space: nowrap;
  text-decoration: none;
  font-size: 14px; transition: .15s;
  border: none !important;
}
.topbar .acct-btn:hover { background: #f4f9f5 !important; color: #07271b !important; }
.topbar .acct-btn svg { width: 18px; height: 18px; }

/* 顶部「下载APP」按钮：主题绿实心，突出 CTA */
.topbar .dl-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 9999px;
  background: linear-gradient(135deg, #3f8b63, #2a6b4a) !important;
  color: #fff !important;
  font-weight: 600; text-decoration: none; font-size: 14px; white-space: nowrap;
  box-shadow: 0 2px 10px rgba(63, 139, 99, .30);
  transition: .15s; border: none !important;
}
.topbar .dl-btn:hover { filter: brightness(1.08); box-shadow: 0 4px 14px rgba(63, 139, 99, .40); transform: translateY(-1px); }
.topbar .dl-btn svg { width: 16px; height: 16px; }

/* 中等宽度（笔记本 / 小窗口）：一级菜单全部 4 字后收紧，避免语言选择器被挤出屏幕 */
@media (min-width: 861px) and (max-width: 1180px) {
  .topbar .wrap { gap: 10px; }
  .topbar .nav { gap: 2px; }
  .topbar .nav a { padding: 8px 9px; font-size: 13.5px; gap: 5px; }
  .topbar .nav-i { width: 15px; height: 15px; }
  .topbar .acct-btn { padding: 7px 11px; font-size: 13px; gap: 5px; }
  .topbar .acct-btn svg { width: 16px; height: 16px; }
  .topbar .dl-btn { padding: 7px 11px; font-size: 13px; gap: 5px; }
  .topbar .lang-sel { padding: 6px 8px; font-size: 12px; margin-left: 2px; }
}

/* 手机端：下载按钮图标模式（与导航一致），避免顶栏拥挤 */
@media (max-width: 720px) {
  .topbar .dl-btn span { display: none; }
  .topbar .dl-btn { padding: 8px 10px; }
}


/* ============ 页脚 ============ */
.footer {
  background: var(--jm-deep) !important;
  color: var(--jm-on-dark-2) !important;
  border-top: 1px solid rgba(0, 0, 0, .18);
}
/* 页脚 LOGO：锁原始展示尺寸，禁止原图整幅铺出 */
.footer .logo,
.footer .footer-brand .logo {
  display: inline-flex; align-items: center; gap: 10px;
  max-width: 240px;
}
.footer .logo img,
.footer .footer-brand .logo img {
  height: 44px !important; width: auto !important;
  max-width: 200px !important; object-fit: contain !important;
  border-radius: 8px; display: block;
}

.footer .footer-brand p { color: var(--jm-on-dark-2) !important; }
.footer .footer-brand .brand-text,
.footer .footer-brand .brand-text small { color: var(--jm-on-dark) !important; }
.footer .footer-col h5 { color: var(--jm-gold-2) !important; }
.footer .footer-col a { color: var(--jm-on-dark) !important; }
.footer .footer-col a:hover { color: #fff !important; }
.footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12) !important;
  color: var(--jm-on-dark-2) !important;
}
.footer .foot-src { color: var(--jm-on-dark-2) !important; }
.footer .footer-social a { color: var(--jm-on-dark) !important; }
.footer .footer-social a:hover { color: #fff !important; }

/* 移动端：导航横向滚动，去掉白底 chip，保留描边 */
@media (max-width: 720px) {
  .topbar .nav a {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, .16) !important;
  }
  .topbar .btn-cream { display: none !important; }
}

/* ============ 商城页：选购分类 chips ============ */
.shop-chips {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  max-width: 1100px; margin: 0 auto 26px; padding: 0 16px;
}
.shop-chips a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 9999px; font-size: 14px; text-decoration: none;
  color: #2a6b4a; background: #fff; border: 1px solid rgba(42, 107, 74, .22);
  transition: .15s;
}
.shop-chips a:hover { border-color: #2a6b4a; transform: translateY(-1px); }
.shop-chips a.on { background: var(--jm-deep); color: var(--jm-on-dark); border-color: var(--jm-deep); }

/* ============ 通用对照表（匠人工坊 / 商家方案） ============ */
.jm-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 4px; }
.jm-table th, .jm-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid #e2efe7; vertical-align: top; }
.jm-table thead th { font-size: 12px; letter-spacing: .06em; color: #5b6b62; background: #f4f9f5; font-weight: 600; }
.jm-table tbody tr:hover { background: #f8fbf9; }
.jm-table td:first-child { font-weight: 600; color: #12241a; white-space: nowrap; }
.jm-table .num { font-variant-numeric: tabular-nums; }
.jm-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e2efe7; border-radius: 14px; background: #fff; }
.jm-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.jm-check li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #33544a; }
.jm-check li b { display: block; color: #12241a; font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.jm-check .ck { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 7px; background: #e8f2ea; color: #2a6b4a; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.jm-note { margin-top: 12px; font-size: 12.5px; color: #6b7d73; }

/* ============ 页脚「微信」联系弹窗（contact-modal.js） ============ */
.jm-ctmask {
  position: fixed; inset: 0; z-index: 9999; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(10, 26, 19, .48); backdrop-filter: blur(3px);
}
.jm-ctmask.on { display: flex; }
.jm-ctbox {
  position: relative; width: 100%; max-width: 420px; max-height: 88vh; overflow: auto;
  background: #fff; border-radius: 18px; padding: 26px 24px 22px;
  box-shadow: 0 18px 60px rgba(10, 40, 28, .28);
  font: 400 15px/1.6 system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #12241a;
}
.jm-ctclose {
  position: absolute; top: 10px; right: 12px; width: 34px; height: 34px;
  border: 0; background: transparent; font-size: 24px; line-height: 1;
  color: #6b7d73; cursor: pointer; border-radius: 8px;
}
.jm-ctclose:hover { background: #eef5f0; color: #12241a; }
.jm-cttitle { margin: 0 0 6px; font-size: 19px; font-weight: 600; color: #12241a; }
.jm-ctsub { margin: 0 0 18px; font-size: 13px; color: #5b6b62; }
.jm-ctrow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid #e6efe9; font-size: 14px; }
.jm-ctk { flex: 0 0 78px; color: #5b6b62; }
.jm-ctv { display: inline-flex; align-items: center; gap: 10px; }
.jm-ctwx { font-size: 15px; letter-spacing: .02em; color: #12241a; }
.jm-ctcopy {
  border: 1px solid rgba(42, 107, 74, .28); background: #fff; color: #2a6b4a;
  font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.jm-ctcopy:hover { border-color: #2a6b4a; }
.jm-ctcopy.ok { background: #e8f2ea; border-color: #2a6b4a; }
.jm-ctform { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.jm-ctform input, .jm-ctform textarea {
  width: 100%; box-sizing: border-box; padding: 11px 13px; border: 1px solid #cfe3d8;
  border-radius: 12px; font: inherit; font-size: 15px; background: #fff; color: #12241a;
}
.jm-ctform textarea { resize: vertical; min-height: 78px; }
.jm-ctfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.jm-ctnote { font-size: 13px; color: #5b6b62; }
.jm-ctnote.ok { color: #2a6b4a; }
.jm-ctnote.err { color: #b23b3b; }
.jm-ctsend {
  border: 0; border-radius: 999px; padding: 10px 22px; cursor: pointer;
  background: #2a6b4a; color: #fff; font-size: 14px; font-weight: 500;
}
.jm-ctsend:hover { background: #23573d; }
.jm-ctsend:disabled { opacity: .6; cursor: progress; }
