/* ============================================================
   小灵通商家宝 · 全局主题与组件样式
   换肤机制：CSS 变量（对应后台"主题风格"整站换肤）
   默认主题：浩创云橙金
   ============================================================ */

:root,
.theme-gold {
  --primary-color: #FF7A1A;
  --primary-color-light: #FFF0E0;
  --primary-color-light2: #FFB15C;
  --primary-help-color: #FFE7C2;
  --price-text-color: #FF4D1A;
  --page-bg-color: #FFF8F0;

  --text-main: #1F2329;
  --text-sub: #6B7280;
  --text-weak: #9CA3AF;
  --card-bg: #FFFFFF;
  --radius-lg: 16rpx;
  --radius-xl: 24rpx;
}

/* 各业务页主题（头部渐变 + 主按钮色） */
.theme-voice        { --biz-1:#C2410C; --biz-2:#F59E0B; --biz-btn:#F59E0B; --biz-bg:#FFF8F0; }
.theme-song         { --biz-1:#EA580C; --biz-2:#F97316; --biz-btn:#F97316; --biz-bg:#FFF7ED; }
.theme-image        { --biz-1:#BE185D; --biz-2:#9333EA; --biz-btn:#A855F7; --biz-bg:#FDF2F8; }
.theme-video        { --biz-1:#6D28D9; --biz-2:#7C3AED; --biz-btn:#7C3AED; --biz-bg:#F5F3FF; }
.theme-assistant    { --biz-1:#4F46E5; --biz-2:#6366F1; --biz-btn:#6366F1; --biz-bg:#EEF2FF; }
.theme-digital      { --biz-1:#4338CA; --biz-2:#6D28D9; --biz-btn:#4F46E5; --biz-bg:#EEF2FF; }
.theme-clone        { --biz-1:#7C3AED; --biz-2:#9333EA; --biz-btn:#9333EA; --biz-bg:#FAF5FF; }
.theme-marketing    { --biz-1:#0369A1; --biz-2:#0EA5E9; --biz-btn:#0284C7; --biz-bg:#F0F9FF; }
.theme-copywriting  { --biz-1:#0E7490; --biz-2:#0891B2; --biz-btn:#0891B2; --biz-bg:#ECFEFF; }
.theme-ringtone     { --biz-1:#DC2626; --biz-2:#EF4444; --biz-btn:#EF4444; --biz-bg:#FEF2F2; }
.theme-map          { --biz-1:#1D4ED8; --biz-2:#2563EB; --biz-btn:#2563EB; --biz-bg:#EFF6FF; }
.theme-card         { --biz-1:#059669; --biz-2:#10B981; --biz-btn:#10B981; --biz-bg:#ECFDF5; }
.theme-make         { --biz-1:#DC2626; --biz-2:#F0521F; --biz-btn:#F0521F; --biz-bg:#FFF7ED; }
.theme-work         { --biz-1:#EA580C; --biz-2:#F97316; --biz-btn:#F97316; --biz-bg:#FFF7ED; }
.theme-recharge     { --biz-1:#6D28D9; --biz-2:#8B5CF6; --biz-btn:#7C3AED; --biz-bg:#F5F3FF; }
.theme-order        { --biz-1:#DC2626; --biz-2:#EF4444; --biz-btn:#EF4444; --biz-bg:#F9FAFB; }

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: #e5e7eb;
  color: var(--text-main);
}

/* 手机容器：浏览器里以手机宽度呈现 */
.page {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--biz-bg, var(--page-bg-color));
  padding-bottom: 76px; /* 给 tabbar 留位 */
  position: relative;
  box-shadow: 0 0 24px rgba(0,0,0,.12);
}

/* ---------- 通用组件 ---------- */
.hero {
  background: linear-gradient(135deg, var(--biz-1), var(--biz-2));
  color: #fff;
  padding: 28px 20px 34px;
  border-radius: 0 0 20px 20px;
  position: relative;
  overflow: hidden;
}
.hero .badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.hero h1 { font-size: 21px; line-height: 1.35; margin-bottom: 8px; font-weight: 700; }
.hero p { font-size: 12.5px; opacity: .92; line-height: 1.7; }
.hero .toplink {
  position: absolute; top: 16px; right: 16px;
  font-size: 11px; background: rgba(255,255,255,.2);
  padding: 4px 10px; border-radius: 999px; color: #fff; text-decoration: none;
}

.statbar {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.14);
  border-radius: 12px; padding: 10px 14px; margin-top: 16px;
  font-size: 13px;
}
.statbar .num { font-size: 18px; font-weight: 700; }
.statbar .pill {
  background: #fff; color: var(--biz-btn);
  font-size: 12px; padding: 4px 12px; border-radius: 999px; font-weight: 600;
}

.card {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 16px;
  margin: 12px 14px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.card h3 { font-size: 15px; margin-bottom: 4px; }
.card .sub { font-size: 12px; color: var(--text-sub); }

.seg {
  display: flex; background: #F3F4F6; border-radius: 12px; padding: 4px;
  margin: 12px 14px 0;
}
.seg span {
  flex: 1; text-align: center; font-size: 13px; padding: 8px 0;
  border-radius: 9px; color: var(--text-sub); cursor: pointer;
}
.seg span.on { background: var(--biz-btn); color: #fff; font-weight: 600; }

.two-col { display: flex; gap: 10px; margin: 12px 14px 0; }
.two-col .opt {
  flex: 1; background: #fff; border: 1.5px solid #E5E7EB; border-radius: 12px;
  padding: 14px; font-size: 14px; font-weight: 600;
}
.two-col .opt small { display: block; font-size: 11px; color: var(--text-sub); font-weight: 400; margin-top: 4px; }
.two-col .opt.on { border-color: var(--biz-btn); color: var(--biz-btn); background: #fff; }

.textarea {
  width: 100%; min-height: 110px; border: none; resize: none;
  background: #F9FAFB; border-radius: 10px; padding: 12px;
  font-size: 13px; color: var(--text-main); line-height: 1.7; outline: none;
  font-family: inherit;
}
.input {
  width: 100%; border: none; background: #F9FAFB; border-radius: 10px;
  padding: 12px; font-size: 13px; outline: none; font-family: inherit;
}

.btn-primary {
  display: block; width: calc(100% - 28px); margin: 16px 14px 0;
  background: linear-gradient(90deg, var(--biz-1), var(--biz-2));
  color: #fff; border: none; border-radius: 999px;
  padding: 14px 0; font-size: 15px; font-weight: 600; cursor: pointer;
}
.cost-tip {
  display: flex; justify-content: space-between; align-items: center;
  margin: 14px 14px 0; font-size: 12.5px; color: var(--text-sub);
}
.cost-tip b { color: var(--biz-btn); font-size: 16px; }

.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 14px 0; }
.grid4 .g {
  background: #fff; border-radius: 12px; padding: 14px 4px; text-align: center;
  font-size: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.grid4 .g .ic {
  width: 34px; height: 34px; margin: 0 auto 6px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px;
}
.grid4 .g small { display: block; color: var(--text-weak); font-size: 10.5px; margin-top: 2px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 14px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips .chip {
  flex: none; padding: 6px 14px; border-radius: 999px; background: #fff;
  font-size: 12.5px; color: var(--text-sub); border: 1px solid #EEE;
}
.chips .chip.on { background: #1F2329; color: #fff; border-color: #1F2329; }

.empty {
  text-align: center; padding: 48px 20px; color: var(--text-weak); font-size: 13px;
}
.empty .icon { font-size: 34px; margin-bottom: 10px; }

/* 列表行（地图标注/创作中心用） */
.row-card {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 14px; padding: 16px; margin: 12px 14px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.row-card .ric {
  width: 42px; height: 42px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 19px;
}
.row-card .rt { flex: 1; }
.row-card .rt b { font-size: 15px; display: block; margin-bottom: 3px; }
.row-card .rt small { font-size: 11.5px; color: var(--text-sub); line-height: 1.5; }
.row-card .go {
  flex: none; background: var(--biz-btn); color: #fff; font-size: 12px;
  padding: 7px 14px; border-radius: 999px; text-decoration: none;
}
.tag { font-size: 10px; padding: 2px 7px; border-radius: 6px; margin-right: 5px; }

/* ---------- 底部 TabBar ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 420px;
  display: flex; background: #fff; border-top: 1px solid #F0F0F0;
  padding: 6px 0 10px; z-index: 50;
}
.tabbar a {
  flex: 1; text-align: center; text-decoration: none;
  color: #9CA3AF; font-size: 11px;
}
.tabbar a svg { display: block; margin: 0 auto 3px; }
.tabbar a.on { color: var(--primary-color); }

/* ---------- 导航头（非 tab 页） ---------- */
.navbar {
  display: flex; align-items: center; justify-content: center;
  height: 46px; font-size: 15px; font-weight: 600; position: relative;
  background: transparent;
}
.navbar .back { position: absolute; left: 14px; font-size: 20px; color: var(--text-main); text-decoration: none; }

/* ---------- 预览首页（桌面 Launcher） ---------- */
.launcher { max-width: 1200px; margin: 0 auto; padding: 30px 20px; }
.launcher h1 { font-size: 24px; margin-bottom: 6px; }
.launcher .desc { color: var(--text-sub); font-size: 13px; margin-bottom: 24px; }
.launcher .group { margin-bottom: 26px; }
.launcher .group h2 {
  font-size: 15px; margin-bottom: 12px; padding-left: 10px;
  border-left: 4px solid var(--primary-color);
}
.launcher .items { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.launcher .item {
  background: #fff; border-radius: 12px; padding: 14px 16px;
  text-decoration: none; color: var(--text-main);
  box-shadow: 0 1px 6px rgba(0,0,0,.06); transition: transform .15s;
}
.launcher .item:hover { transform: translateY(-2px); }
.launcher .item b { font-size: 14px; display: block; margin-bottom: 4px; }
.launcher .item small { color: var(--text-weak); font-size: 11.5px; }
