/* ==========================================================================
   轻工具箱 - 全局样式（移动优先，自适应桌面）
   ========================================================================== */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --success: #16a34a;
  --danger: #dc2626;
  --bg: #f5f6fa;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 14px rgba(0, 0, 0, .05);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .15);
}
* { box-sizing: border-box; }
/* 保证 HTML hidden 属性永远生效（避免 display:flex 等样式覆盖导致弹窗关不掉） */
[hidden] { display: none !important; }
/* 通用隐藏类（表单步骤切换等） */
.hidden { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); font-size: .9em; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .85em; }

/* ---------------- 代码商城 ---------------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding-bottom: 60px; }
.product-card {
  display: flex; gap: 14px; background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px 16px; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pc-icon {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 15px;
  background: #eef0ff; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
}
.pc-body { flex: 1; min-width: 0; }
.pc-head { display: flex; align-items: center; gap: 8px; }
.pc-title { font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-version {
  flex-shrink: 0; background: #eef2ff; color: var(--primary); border-radius: 999px;
  padding: 1px 8px; font-size: .72rem; font-weight: 600;
}
.pc-desc { color: var(--muted); font-size: .84rem; margin: 7px 0 9px; line-height: 1.55;
           display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-meta { display: flex; align-items: center; gap: 10px; font-size: .76rem; color: var(--muted); }
.pc-cat { background: #f3f4f6; border-radius: 999px; padding: 1px 8px; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.pc-price { color: #e11d48; font-weight: 800; font-size: 1.05rem; }
.btn-sm { padding: 7px 14px; font-size: .88rem; border-radius: 10px; }
.store-tip { text-align: center; padding-bottom: 30px; }

/* ---------------- 商品管理 ---------------- */
.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px; box-shadow: var(--shadow);
}
.stat-card .sc-k { color: var(--muted); font-size: .8rem; margin-bottom: 4px; }
.stat-card .sc-v { font-weight: 800; font-size: 1.15rem; color: var(--text); }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.admin-tab {
  border: 1px solid var(--border); background: var(--card); border-radius: 999px;
  padding: 8px 20px; font-size: .92rem; font-weight: 600; color: var(--muted);
  cursor: pointer; transition: all .15s ease;
}
.admin-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.admin-tab-pane { padding-bottom: 60px; }
.admin-layout { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 900px) { .admin-layout { grid-template-columns: 4fr 6fr; align-items: start; } }
.admin-form .form-row { margin-bottom: 12px; }
.admin-form label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: 4px; }
.admin-form input[type=text], .admin-form input[type=number],
.admin-form select, .admin-form textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-size: .93rem; font-family: inherit; background: #fff;
}
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus {
  outline: none; border-color: var(--primary);
}
.admin-form .form-inline { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-form .form-inline > div { flex: 1; min-width: 90px; }
.admin-form .form-inline .form-col-2 { flex: 1.7; }
/* 文件选择器 */
.file-picker {
  display: flex; align-items: center; gap: 12px;
  border: 2px dashed #c7cbe0; border-radius: 12px;
  background: #fafbff; padding: 14px 16px; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.file-picker:hover { border-color: var(--primary); background: #eef0ff; }
.file-picker .fp-icon { font-size: 1.5rem; }
.file-picker .fp-text {
  flex: 1; font-size: .9rem; color: #374151;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-picker .fp-arrow {
  flex-shrink: 0; background: var(--primary); color: #fff;
  border-radius: 8px; padding: 6px 14px; font-size: .84rem; font-weight: 600;
}
.fp-hint { color: var(--muted); font-size: .76rem; margin: 6px 0 0; }
.product-row {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--border); border-radius: 14px; padding: 12px; margin-bottom: 10px;
  background: #fbfbfd;
}
.pr-icon { flex-shrink: 0; font-size: 1.5rem; }
.pr-main { flex: 1; min-width: 0; }
.pr-title { font-weight: 700; font-size: .95rem; }
.pr-desc { color: var(--muted); font-size: .8rem; margin: 3px 0; }
.pr-meta { color: var(--muted); font-size: .74rem; }
.pr-ops { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.pr-ops .price-input { width: 90px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; }
.btn-danger { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.btn-danger:hover { background: #fee2e2; }

/* ---------------- 个人中心 ---------------- */
.profile-grid { display: flex; flex-direction: column; gap: 8px; }
.pf-item { display: flex; gap: 12px; padding: 9px 12px; background: #f8f9fc; border: 1px solid var(--border); border-radius: 10px; font-size: .92rem; align-items: center; }
.pf-k { color: var(--muted); min-width: 78px; flex-shrink: 0; }
.pf-item b { word-break: break-all; }
.order-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* ---------------- 微信内置浏览器提示条 ---------------- */
.wx-banner {
  position: sticky; top: 0; z-index: 99;
  background: #fffbeb; color: #92400e; border-bottom: 1px solid #fde68a;
  padding: 9px 16px; text-align: center; font-size: .88rem;
}
.wx-banner b { font-weight: 700; }

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { font-weight: 700; font-size: 1.15rem; color: var(--primary); text-decoration: none; }
.nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--primary); }
.nav-register {
  background: var(--primary); color: #fff !important; border-radius: 999px;
  padding: 5px 16px; font-weight: 600;
}
.nav-register:hover { background: var(--primary-dark); }
.user-chip {
  background: #eef0ff; color: var(--primary); border-radius: 999px;
  padding: 4px 14px; font-size: .85rem; font-weight: 600;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------------- 登录/注册页 ---------------- */
.auth-wrap { display: flex; justify-content: center; padding: 40px 0 60px; }
.auth-card {
  width: 100%; max-width: 400px; background: var(--card);
  border: 1px solid var(--border); border-radius: 18px; padding: 28px 26px;
  box-shadow: var(--shadow);
}
.auth-title { margin: 0 0 4px; text-align: center; font-size: 1.4rem; }
.auth-sub { color: var(--muted); font-size: .88rem; text-align: center; margin: 4px 0 14px; }
.auth-card .tabs {
  display: flex; background: #f1f2f7; border-radius: 12px; padding: 4px; margin: 16px 0;
}
.auth-card .tab {
  flex: 1; text-align: center; padding: 8px 0; border-radius: 9px;
  color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 600;
}
.auth-card .tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }
.auth-card form label { display: block; font-size: .88rem; font-weight: 500; margin: 18px 0 7px; }
.auth-card form label:first-child { margin-top: 0; }
.auth-card form input[type=email],
.auth-card form input[type=password],
.auth-card form input[type=text] {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border);
  border-radius: 10px; font-size: .95rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-card form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
/* 按钮与上方输入框/内容之间留出呼吸空间 */
.auth-card form .btn-block { margin-top: 20px; }
.code-row { display: flex; gap: 8px; }
.code-row .code-input { flex: 1; letter-spacing: 4px; text-align: center; font-size: 1.1rem; }
.btn-outline {
  background: #fff; color: var(--primary); border: 1px solid var(--primary);
  padding: 8px 14px; border-radius: 10px; font-size: .88rem; white-space: nowrap;
}
.btn-outline:disabled { opacity: .5; cursor: not-allowed; }
.msg {
  margin-top: 14px; padding: 10px 12px; border-radius: 10px; font-size: .88rem;
  background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe;
}
.msg.error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.msg.ok { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }

/* ---------------- 首页 ---------------- */
.hero { text-align: center; padding: 48px 0 28px; }
.hero h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin: 0 0 10px; }
.hero-sub { color: var(--muted); margin: 0 0 16px; font-size: clamp(.95rem, 2vw, 1.05rem); }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hero-badges span {
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; font-size: .85rem; color: #374151;
}
.category { margin: 30px 0; }
.category-title { font-size: 1.2rem; margin: 0 0 14px; }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.tool-card {
  position: relative; display: flex; gap: 12px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px 14px; text-decoration: none; color: inherit;
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tool-card::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent 80%);
  opacity: 0; transition: opacity .18s ease;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.tool-card:hover::before { opacity: 1; }
.tool-card-icon {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px;
  background: var(--accent-soft); display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; line-height: 1;
}
.tool-card-body { flex: 1; min-width: 0; }
.tool-card-name {
  font-weight: 700; font-size: 1rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.go-chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: 4px 11px; font-size: .78rem; font-weight: 600;
  transition: color .18s ease, background .18s ease;
}
.go-chip i { font-style: normal; transition: transform .18s ease; }
.tool-card:hover .go-chip { color: #fff; background: var(--accent); }
.tool-card:hover .go-chip i { transform: translateX(3px); }
.tool-card-desc {
  color: var(--muted); font-size: .83rem; margin: 7px 0 11px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tool-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: nowrap; min-width: 0;
}
.price-tag {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  background: #fff5f5; border: 1px solid #ffe0e0; border-radius: 999px;
  padding: 3px 10px;
}
.price-tag b { color: #e11d48; font-weight: 800; font-size: .88rem; white-space: nowrap; }
.price-tag em { color: #9ca3af; font-style: normal; font-size: .72rem; white-space: nowrap; }

/* ---------------- 工具页 ---------------- */
.tool-head { padding: 26px 0 18px; position: relative; }
.tool-head h1 { margin: 0 0 6px; font-size: clamp(1.3rem, 3vw, 1.7rem); }
.tool-desc { color: var(--muted); margin: 0; max-width: 640px; }
.tool-price-tag {
  display: inline-flex; align-items: baseline; gap: 8px; margin-top: 10px;
  background: #fff5f5; border: 1px solid #ffe0e0; border-radius: 999px;
  padding: 5px 14px;
}
.tool-price-tag b { color: #e11d48; font-weight: 800; font-size: 1.05rem; }
.tool-price-tag em { color: #9ca3af; font-style: normal; font-size: .82rem; }
.tool-layout { display: grid; grid-template-columns: 1fr; gap: 16px; padding-bottom: 60px; }
@media (min-width: 900px) { .tool-layout { grid-template-columns: 5fr 7fr; align-items: start; } }

.panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.panel-title { font-size: 1rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: var(--primary);
  color: #fff; font-size: .8rem; font-weight: 600;
}

/* 上传区 */
.dropzone {
  border: 2px dashed #c7cbe0; border-radius: var(--radius);
  background: #fafbff; text-align: center; padding: 30px 14px; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--primary); background: #eef0ff; }
.dz-icon { font-size: 2.2rem; }
.dz-text { font-weight: 600; margin: 6px 0 2px; }
.dz-hint { color: var(--muted); font-size: .8rem; }
.file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.file-item {
  display: flex; align-items: center; gap: 8px;
  background: #f8f9fc; border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 10px; font-size: .85rem;
}
.file-item .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .fsize { color: var(--muted); font-size: .78rem; }
.file-item .fops { display: flex; gap: 4px; }
.file-item .fops button {
  border: none; background: #eef0f6; border-radius: 6px; cursor: pointer;
  width: 26px; height: 26px; font-size: .85rem; color: #374151;
}
.file-item .fops button:hover { background: #e0e4f0; }
.file-item .fops button.del:hover { background: #fee2e2; color: var(--danger); }

/* 选项表单 */
.options-form { display: flex; flex-direction: column; gap: 14px; }
.opt-row label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: 4px; }
.opt-row input[type=text], .opt-row input[type=number], .opt-row select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 10px; font-size: .95rem; background: #fff;
}
.opt-row input:focus, .opt-row select:focus { outline: none; border-color: var(--primary); }
.opt-row .range-row { display: flex; align-items: center; gap: 10px; }
.opt-row input[type=range] { flex: 1; accent-color: var(--primary); }
.opt-row .range-val { min-width: 38px; text-align: right; color: var(--primary); font-weight: 600; font-size: .9rem; }

/* 按钮 */
.btn {
  display: inline-block; border: none; border-radius: 12px; cursor: pointer;
  font-size: 1rem; font-weight: 600; padding: 12px 22px; text-decoration: none;
  transition: background .15s ease, transform .1s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .btn-spinner { font-size: .9rem; }

/* 结果区 */
.result-area { min-height: 260px; }
.placeholder { color: var(--muted); text-align: center; padding: 60px 10px; font-size: .92rem; }
.result-card { display: flex; flex-direction: column; gap: 14px; }
.result-preview {
  background: #f8f9fc; border-radius: 12px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; min-height: 200px; max-height: 420px;
}
.result-preview img { max-width: 100%; max-height: 420px; object-fit: contain; }
.result-info { display: flex; flex-direction: column; gap: 8px; font-size: .92rem; }
.result-info .row { display: flex; justify-content: space-between; gap: 10px; }
.result-info .row b { font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.stat-box { background: #f8f9fc; border: 1px solid var(--border); border-radius: 10px; padding: 10px; text-align: center; }
.stat-box .v { font-size: 1.05rem; font-weight: 700; color: var(--primary); }
.stat-box .k { font-size: .78rem; color: var(--muted); }
.pay-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.pay-bar .price { font-size: 1.15rem; }

/* ---------------- 支付弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; background: rgba(17, 24, 39, .55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  background: #fff; border-radius: 18px; width: 100%; max-width: 380px;
  padding: 22px; position: relative; box-shadow: var(--shadow-lg);
  max-height: 92vh; overflow-y: auto;
}
.modal-close {
  position: absolute; top: 10px; right: 12px; border: none; background: none;
  font-size: 1.5rem; color: var(--muted); cursor: pointer; line-height: 1;
}
.modal-title { margin: 0 0 6px; text-align: center; }
.pay-amount { text-align: center; font-size: 1.7rem; font-weight: 800; color: var(--danger); margin: 6px 0 12px; }
.pay-qr {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; margin: 10px 0;
}
.pay-qr canvas, .pay-qr img {
  width: 200px; height: 200px;
  border: 1px solid var(--border); border-radius: 12px; display: block;
}
.pay-qr .qr-caption {
  font-size: .72rem; color: var(--muted); text-align: center;
  max-width: 100%; word-break: break-all; line-height: 1.4;
}
.pay-note { text-align: center; color: var(--muted); font-size: .85rem; margin-bottom: 10px; }
.pay-mock { text-align: center; margin: 10px 0; }
.pay-status { text-align: center; font-weight: 600; min-height: 22px; margin: 6px 0; }
.pay-status.paid { color: var(--success); font-size: 1.05rem; }
.pay-status.pending { color: var(--muted); }
.pay-meta { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--muted);
            border-top: 1px dashed var(--border); margin-top: 12px; padding-top: 10px; word-break: break-all; }
.pay-download { margin-top: 12px; }

/* ---------------- 订单页 ---------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.table th { color: var(--muted); font-weight: 600; font-size: .8rem; }
.badge { padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-paid { background: #dcfce7; color: #15803d; }
.badge-pending { background: #fef9c3; color: #a16207; }
.badge-expired { background: #f3f4f6; color: var(--muted); }

/* ---------------- 常见问题 ---------------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-list details {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px;
}
.faq-list summary { font-weight: 600; cursor: pointer; }
.faq-list p { color: var(--muted); margin: 8px 0 0; font-size: .92rem; }
.guide-list li { margin-bottom: 8px; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  background: #111827; color: #fff; padding: 12px 22px; border-radius: 12px;
  font-size: .92rem; z-index: 200; box-shadow: var(--shadow-lg); max-width: 90vw;
}
.toast.error { background: var(--danger); }

/* ---------------- 页脚 ---------------- */
.site-footer { border-top: 1px solid var(--border); padding: 26px 0 40px; margin-top: 20px;
               text-align: center; color: var(--muted); font-size: .85rem; }
.site-footer p { margin: 4px 0; }

/* ---------------- 手机端底部导航（App 式） ---------------- */
.bottom-nav { display: none; }
@media (max-width: 640px) {
  .nav-desktop { display: none !important; }           /* 手机端隐藏桌面导航 */
  .header-inner { flex-direction: row; height: 54px; }  /* 顶部只留 Logo */
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: #fff; border-top: 1px solid var(--border);
    padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .05);
  }
  .bn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    color: var(--muted); text-decoration: none; font-size: .72rem; padding: 2px 0;
  }
  .bn-ico { font-size: 1.3rem; line-height: 1; }
  .bn-item.active, .bn-item:active { color: var(--primary); font-weight: 600; }
  main { padding-bottom: 70px; }                        /* 给底部导航留空间 */
}

/* ---------------- 手机端其他元素微调 ---------------- */
@media (max-width: 640px) {
  .container { padding: 0 14px; }
  .hero { padding: 32px 0 22px; }
  .hero h1 { font-size: 1.5rem; }
  .hero-badges span { font-size: .78rem; padding: 5px 10px; }
  .panel { padding: 14px; }
  .tool-card { padding: 14px 12px; gap: 10px; }
  .tool-card-icon { width: 44px; height: 44px; font-size: 1.3rem; }
  .tool-grid { grid-template-columns: 1fr; gap: 10px; }
  .product-grid { grid-template-columns: 1fr; gap: 10px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tool-card-foot { flex-wrap: wrap; gap: 6px; }
  .btn { padding: 11px 18px; }
  .modal { max-width: 92vw; padding: 18px; }
  .tool-layout { gap: 12px; }
  .auth-card { padding: 22px 18px; }
}
