:root {
  --brand: #a82b2b;
  --brand-dark: #8d2222;
  --bg: #f5f5f5;
  --text: #222;
  --muted: #888;
  --line: #ececec;
  --radius: 14px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px; line-height: 1.5;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: var(--text); }
button { cursor: pointer; }
a { color: #576b95; text-decoration: none; }
/* 全站矢量图标：尺寸由 svg 的 width/height 属性控制，颜色继承父级 currentColor */
.mz-icon { display: block; flex: none; }

#app { max-width: 520px; min-height: 100vh; margin: 0 auto; background: var(--bg); position: relative; }

/* 顶栏 */
#topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--brand); color: #fff;
  min-height: 52px; padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
#topbar .back {
  color: #fff; background: transparent; border: 0;
  padding: 4px 10px 4px 0; display: flex; align-items: center;
}
#topbar .logo { width: 38px; height: 38px; object-fit: contain; border-radius: 50%; flex: none; }
#topbar .titles { flex: 1; min-width: 0; }
#topbar .title { font-size: 17px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#topbar .subtitle { font-size: 11px; opacity: .85; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-chip {
  flex: none; color: #fff; font-size: 12px;
  border: 1px solid rgba(255,255,255,.7); border-radius: 20px;
  padding: 5px 11px; background: transparent; white-space: nowrap;
}

/* 主内容 */
#view { padding: 14px 14px calc(74px + env(safe-area-inset-bottom)); }
.card {
  background: #fff; border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.section-title { font-size: 16px; font-weight: 600; display: block; margin-bottom: 10px; }
.section-desc { font-size: 13px; color: #666; display: block; }
.muted { color: var(--muted); font-size: 13px; display: block; }
.title { font-size: 16px; font-weight: 600; display: block; }
.desc { font-size: 13px; color: #666; display: block; margin-top: 6px; }
.meta { font-size: 12px; color: var(--muted); display: block; margin-top: 6px; }
.line { font-size: 13px; color: #555; display: block; margin-top: 8px; word-break: break-all; }
.line.dot-line::before {
  content: ""; display: inline-block; width: 5px; height: 5px;
  border-radius: 50%; background: var(--brand); margin-right: 8px; vertical-align: middle;
}
.line.contact { color: var(--brand); }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

/* 首页四宫格 */
.hero { background: linear-gradient(135deg, #a82b2b, #c14747); color: #fff; }
.hero .section-title, .hero .section-desc { color: #fff; }
.hero .section-desc { opacity: .9; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.grid-item {
  background: rgba(255,255,255,.14); border-radius: 10px; padding: 12px;
  display: flex; flex-direction: column; gap: 4px; min-height: 104px;
}
.grid-item .icon {
  width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.9);
  color: var(--brand); display: flex; align-items: center; justify-content: center;
  margin-bottom: 2px;
}
.grid-title { color: #fff; font-size: 14px; font-weight: 600; }
.grid-sub { color: rgba(255,255,255,.82); font-size: 11px; line-height: 1.4; }

/* 按钮 */
.btn {
  border: 1px solid var(--brand); background: var(--brand); color: #fff;
  border-radius: 8px; padding: 10px 16px; font-size: 14px; font-weight: 500;
}
.btn:active { background: var(--brand-dark); }
.btn.block { display: block; width: 100%; margin-top: 14px; }
.btn.secondary { background: #fff; color: var(--brand); }
.btn.mini { padding: 6px 12px; font-size: 12px; border-radius: 6px; }
.btn.plain { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.btn:disabled { opacity: .5; }

/* 标签 */
.tag { background: #fdecec; color: var(--brand); font-size: 12px; padding: 3px 8px; border-radius: 5px; }
.pin { background: var(--brand); color: #fff; font-size: 11px; padding: 3px 7px; border-radius: 5px; }
.score { color: var(--brand); font-size: 12px; font-weight: 600; }
.mini-tag { display: inline-block; background: #f5f5f5; color: #777; font-size: 11px; padding: 3px 7px; border-radius: 4px; margin: 6px 6px 0 0; }

/* 分类 tabs */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; padding: 7px 13px; border-radius: 18px; font-size: 13px;
  background: #fff; color: #666; border: 1px solid var(--line); white-space: nowrap;
}
.tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 列表项 */
.item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; padding-bottom: 0; }
.item:first-child { padding-top: 0; }
.item.clickable { cursor: pointer; }
.item.clickable:active { background: #fafafa; }

/* 表单 */
.field { margin-top: 12px; }
.field .label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.field input[type=text], .field input[type=number], .field input[type=password], .field textarea, .field select,
.input, .search {
  width: 100%; border: 1px solid #e5e5e5; background: #f7f7f7;
  border-radius: 8px; padding: 10px 12px; outline: none; font-size: 14px;
}
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .input:focus, .search:focus { border-color: var(--brand); background: #fff; }
.field.switch-row { display: flex; align-items: center; justify-content: space-between; }
.field.switch-row .label { margin: 0; }
.field.switch-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); }
.filters { display: flex; gap: 8px; margin-top: 10px; }
.filters select { flex: 1; min-width: 0; border: 1px solid #e5e5e5; background: #f7f7f7; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.msg { display: block; color: var(--brand); font-size: 13px; margin-top: 10px; min-height: 18px; }

/* 名片 */
.head { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.info { flex: 1; min-width: 0; }
.name { font-size: 16px; font-weight: 600; display: block; }
.position { font-size: 12px; color: var(--muted); display: block; margin-top: 3px; }

/* 二维码 / 相册 */
.qr-block { text-align: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.qr { width: 180px; height: 180px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.album { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #f0f0f0; cursor: pointer; }

/* 会员权益表 */
.benefit { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.benefit-row { display: grid; grid-template-columns: 1.3fr .9fr .9fr 1fr .8fr; gap: 4px; padding: 8px 9px; font-size: 11px; border-top: 1px solid var(--line); align-items: center; }
.benefit-row:first-child { border-top: 0; }
.benefit-row.head { background: #fbf7f7; color: var(--brand); font-weight: 600; }

/* 底部导航 */
#tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 30;
  width: 100%; max-width: 520px; background: #fff; border-top: 1px solid var(--line);
  display: flex; padding-bottom: env(safe-area-inset-bottom);
}
#tabbar .tab-item {
  flex: 1; text-align: center; padding: 8px 0 7px; background: transparent; border: 0;
  color: #999; font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 3px;
}
#tabbar .tab-item.active { color: var(--brand); }
#tabbar .tab-item .ti { height: 24px; display: flex; align-items: center; justify-content: center; }
/* 商会介绍：直接使用圆形品牌 LOGO，不加任何底色、边框或容器 */
#tabbar .tab-item .ti .tab-logo {
  width: 24px; height: 24px; display: block; border-radius: 50%;
  object-fit: contain; background: none; border: 0; padding: 0;
  opacity: .5;
}
#tabbar .tab-item.active .ti .tab-logo { opacity: 1; }
#tabbar .tab-item > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 提示与弹层 */
#toast {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,.8); color: #fff; padding: 10px 16px; border-radius: 8px;
  font-size: 14px; z-index: 100; max-width: 80%; text-align: center; display: none;
}
#toast.show { display: block; }
.dialog-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.dialog-mask[hidden] { display: none; }
.dialog-mask img { max-width: 100%; max-height: 80vh; border-radius: 8px; }
.dialog-mask .dialog-close {
  position: absolute; top: 22px; right: 22px; color: #fff;
  background: transparent; border: 0; padding: 2px; display: flex;
}
.loading { text-align: center; color: var(--muted); font-size: 13px; padding: 20px 0; }

/* 安装到桌面 */
.install-card { border: 1px dashed rgba(168, 43, 43, .3); background: linear-gradient(180deg, #fff, #fdf7f7); }
.install-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.install-icon {
  width: 40px; height: 40px; flex: none; border-radius: 11px;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.install-text { flex: 1; min-width: 0; }
.install-text .section-title { margin-bottom: 4px; }
.install-text .section-desc { line-height: 1.45; }

.dialog-mask .install-guide {
  background: #fff; color: var(--text); border-radius: 14px;
  padding: 20px 18px; width: 100%; max-width: 360px; text-align: left;
}
.install-guide .section-title { margin-bottom: 6px; }
.install-guide .section-desc { margin-bottom: 14px; }
.guide-step { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #444; line-height: 1.45; margin-bottom: 10px; }
.step-no {
  flex: none; width: 20px; height: 20px; border-radius: 50%; margin-top: 1px;
  background: var(--brand); color: #fff; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.install-guide .btn { margin-top: 6px; }

/* ===== 会员单位经营信息（首页轮播 / 列表 / 详情 / 会员维护）===== */
.btn .mz-icon { display: inline-block; vertical-align: -4px; margin-right: 4px; }

/* 首页轮播窗口 */
.cp-carousel { padding: 0; overflow: hidden; cursor: pointer; }
.cp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 10px; }
.cp-head-title { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--brand); }
.cp-head-more { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.cp-viewport { position: relative; overflow: hidden; }
.cp-track { display: flex; transition: transform .5s ease; }
.cp-slide { flex: 0 0 100%; position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #8d2222, #c14747); overflow: hidden; }
.cp-slide-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.02) 0%, rgba(0,0,0,.12) 38%, rgba(0,0,0,.75) 100%); }
.cp-slide-text { position: absolute; left: 16px; right: 16px; bottom: 14px; color: #fff; display: flex; flex-direction: column; gap: 3px; }
.cp-slide-industry { font-size: 11px; opacity: .9; }
.cp-slide-name { font-size: 20px; font-weight: 700; line-height: 1.25; }
.cp-slide-intro { font-size: 12px; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px;
  border: 0; border-radius: 50%; background: rgba(0,0,0,.38); color: #fff; padding: 0;
  display: flex; align-items: center; justify-content: center; }
.cp-arrow.prev { left: 8px; } .cp-arrow.next { right: 8px; }
.cp-dots { display: flex; justify-content: center; gap: 5px; padding: 10px 0 12px; }
.cp-dot { width: 6px; height: 6px; border-radius: 50%; background: #ddd; transition: .25s; }
.cp-dot.active { width: 16px; border-radius: 3px; background: var(--brand); }
.cp-empty-body { padding: 20px 16px 26px; text-align: center; }

/* 列表页 */
.cp-notice { display: flex; align-items: center; gap: 5px; margin-top: 10px; font-size: 12px;
  color: var(--brand); background: #fdf5f5; border-radius: 8px; padding: 8px 10px; line-height: 1.45; }
.cp-notice .mz-icon { flex: none; }
.cp-filter { padding: 12px 14px; }
.cp-search { display: flex; align-items: center; gap: 8px; background: #f7f7f7;
  border: 1px solid #e5e5e5; border-radius: 8px; padding: 0 10px; color: #999; }
.cp-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 0; outline: none; font-size: 14px; }
.cp-search .mz-icon { flex: none; }
.cp-chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.cp-chips::-webkit-scrollbar { display: none; }
.cp-chip { flex: none; padding: 6px 12px; border-radius: 16px; border: 1px solid var(--line);
  background: #fff; color: #666; font-size: 12px; white-space: nowrap; }
.cp-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.cp-count { font-size: 12px; color: var(--muted); margin-top: 8px; }
.cp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cp-card { background: #fff; border-radius: 12px; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; box-shadow: 0 1px 3px rgba(0,0,0,.04); transition: transform .15s; }
.cp-card:active { transform: scale(.985); }
.cp-card-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: #f0f0f0; }
.cp-ph { display: flex; align-items: center; justify-content: center; color: #bbb;
  background: linear-gradient(135deg, #f3eaea, #e9e2e2); }
.cp-card-body { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 3px; }
.cp-card-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-card-industry { font-size: 11px; color: var(--brand); }
.cp-card-intro { font-size: 11px; color: #777; line-height: 1.45; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cp-card-tags { margin-top: 2px; }
.cp-card-tags .mini-tag { margin: 2px 4px 0 0; font-size: 10px; }
.cp-empty-box { text-align: center; padding: 22px 16px; }
.cp-empty-box .section-desc { margin-top: 6px; }
.cp-mine-entry { display: flex; align-items: center; gap: 8px; cursor: pointer;
  color: var(--brand); font-size: 14px; }
.cp-mine-entry span { flex: 1; }

/* 详情页 */
.cp-hero { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #8d2222, #c14747); margin-bottom: 12px; }
.cp-hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.78)); }
.cp-hero-text { position: absolute; left: 16px; right: 16px; bottom: 14px; color: #fff; display: flex; flex-direction: column; gap: 3px; }
.cp-hero-name { font-size: 22px; font-weight: 700; line-height: 1.25; }
.cp-hero-industry { font-size: 12px; opacity: .9; }
.cp-verified { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--brand); }
.cp-verified-note { flex-basis: 100%; font-size: 11px; color: #999; padding-left: 22px; line-height: 1.5; }
.cp-long { display: block; font-size: 13px; color: #555; line-height: 1.75; white-space: pre-wrap; }
.cp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cp-info-row { display: flex; gap: 10px; font-size: 13px; margin-top: 9px; }
.cp-info-k { color: #999; width: 84px; flex: none; }
.cp-info-v { color: #333; flex: 1; min-width: 0; word-break: break-all; }
.cp-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 13px; color: var(--brand); }
.cp-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.cp-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; cursor: zoom-in; background: #f0f0f0; }

/* 我的单位 */
.cp-mine-item { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cp-mine-item:last-child { border-bottom: 0; padding-bottom: 0; }
.cp-mine-thumb { width: 72px; height: 52px; border-radius: 8px; object-fit: cover; flex: none; }
.cp-mine-info { flex: 1; min-width: 0; }
.cp-mine-info .name { font-size: 14px; }
.cp-badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 10px; margin-top: 4px; }
.cp-badge.pending { background: #fff4e5; color: #b26a00; }
.cp-badge.approved { background: #e8f7ed; color: #218838; }
.cp-badge.rejected { background: #fdecea; color: #b02a2a; }
.cp-badge.offline { background: #f0f1f4; color: #888; }
.cp-mine-ops { flex-basis: 100%; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.cp-mine-ops .btn { margin-top: 0; }

/* 新增 / 编辑表单 */
.cp-edit-hint { display: flex; gap: 7px; align-items: flex-start; font-size: 12px; line-height: 1.6;
  color: #8a6a3a; background: #fff9ee; border: 1px solid #f3e3c4; }
.cp-edit-hint .mz-icon { flex: none; margin-top: 2px; }
.cp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.cp-form .field { margin-top: 12px; }
.cp-upload-zone { border: 1px dashed #d9c5c5; border-radius: 10px; padding: 12px; background: #fdfafa; }
.cp-upload-zone input[type=file] { width: 100%; font-size: 12px; }
.cp-upload-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.cp-upload-btns .btn { display: inline-flex; align-items: center; gap: 4px; margin-top: 0; }
.cp-cover-preview { margin-top: 10px; position: relative; min-height: 20px; }
.cp-cover-preview img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; }
.cp-remove { position: absolute; right: 8px; top: 8px; background: rgba(0,0,0,.62); color: #fff;
  border: 0; border-radius: 6px; padding: 4px 8px; font-size: 11px; }
.cp-gallery-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.cp-thumb { position: relative; }
.cp-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; }
.cp-thumb .cp-remove { right: 4px; top: 4px; padding: 2px 5px; font-size: 10px; }
.cp-form-actions { display: flex; gap: 8px; margin-top: 16px; }
.cp-form-actions .btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 0; }
.cp-preview { background: #fff; color: var(--text); border-radius: 14px; padding: 18px; width: 100%; max-width: 360px; }
.cp-preview-card { margin-top: 14px; }
.cp-preview-card .cp-card { box-shadow: none; border: 1px solid var(--line); cursor: default; }
