/* 邻里互助 H5 公共样式 */
:root {
  --c-primary: #407BFF;
  --c-primary-dark: #3A6FE5;
  --c-assist: #FF7D45;
  --c-help: #F56C6C;
  --c-idle: #67C23A;
  --c-convenience: #909399;
  --c-notice: #E6A23C;
  --c-bg: #F7F8FA;
  --c-card: #FFFFFF;
  --c-text-main: #1F2329;
  --c-text-sub: #646A73;
  --c-text-aux: #8F959E;
  --c-border: #EFEFEF;
  --shadow-card: 0 1px 8px rgba(0, 0, 0, 0.06);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: var(--c-bg);
  color: var(--c-text-main);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Helvetica, "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* 页面淡入上浮 */
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.page-in { animation: pageIn .28s ease-out; }

/* 卡片 */
.card {
  background: var(--c-card);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 14px;
}
.card:active { transform: scale(0.99); transition: transform .12s; }

/* 通用按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 12px;
  font-size: 15px; font-weight: 600;
  padding: 12px 16px; cursor: pointer;
  transition: transform .12s, opacity .12s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:disabled { opacity: .5; }
.btn-ghost { background: #F2F3F5; color: var(--c-text-sub); }
.btn-block { width: 100%; }

/* 标签 */
.tag {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 600;
  padding: 2px 8px; border-radius: 6px;
}

/* 输入框 */
.input, .textarea {
  width: 100%;
  background: #F7F8FA;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--c-text-main);
  outline: none;
  font-family: inherit;
}
.input:focus, .textarea:focus { border-color: var(--c-primary); background: #fff; }
.textarea { min-height: 110px; resize: none; }

/* 底部 Tab */
.tab-bar {
  position: fixed; left: 0; right: 0; bottom: 20px;
  height: 56px;
  background: #fff;
  box-shadow: 0 -1px 8px rgba(0,0,0,0.06);
  display: flex; align-items: stretch; z-index: 100;
}
.tab-bar .tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; color: var(--c-text-aux); gap: 3px; position: relative;
}
.tab-bar .tab-item i { font-size: 19px; }
.tab-bar .tab-item.tab-active { color: var(--c-primary); }
.tab-bar .tab-center {
  flex: 1; display: flex; align-items: center; justify-content: center;
}
.tab-bar .tab-center i {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-primary), #5B8CFF);
  color: #fff; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(64,123,255,.4);
  margin-top: -16px;
}
.tab-badge {
  position: absolute; top: 6px; right: 50%; margin-right: -18px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--c-help); color: #fff;
  border-radius: 8px; font-size: 10px; line-height: 16px;
  text-align: center;
}

/* 内容容器：底部留出 tab 高度 + 备案栏 */
.page-bottom-pad { padding-bottom: calc(90px + var(--safe-bottom)); }

/* 底部 ICP 备案 */
.icp-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: calc(20px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--c-primary);
  text-align: center;
  font-size: 10px;
  line-height: 20px;
  z-index: 99;
}
.icp-bar a { color: #fff; text-decoration: none; }
.icp-bar a:active { color: rgba(255,255,255,.75); }

/* 顶部安全区 */
.safe-top { padding-top: var(--safe-top); }

/* 空状态 */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; color: var(--c-text-aux); text-align: center;
}
.empty i { font-size: 48px; color: #C8CDD3; margin-bottom: 12px; }

/* 列表加载更多 */
.load-more {
  text-align: center; padding: 14px; color: var(--c-text-aux); font-size: 13px;
}

/* 标题文字 */
.title-18 { font-size: 18px; font-weight: 700; }
.text-sub { color: var(--c-text-sub); }
.text-aux { color: var(--c-text-aux); font-size: 12px; }

/* 头像 */
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: #E6EBF2; object-fit: cover; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #8F959E; font-size: 16px; overflow: hidden;
}

/* 图片九宫格 */
.img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.img-grid img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
