/* 张北诚信便民 - 朋友圈风格主样式 */
:root {
  --brand: #22a5f6;
  --link: #094dcc;
  --like: #36648b;
  --muted: #757575;
  --bg: #f5f5f5;
  --card: #fff;
  --border: #f2eeee;
  --tab-h: 49px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: #333;
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  max-width: 750px;
  margin: 0 auto;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { border: none; background: none; cursor: pointer; font: inherit; }
ul, ol { list-style: none; }
input, textarea { font: inherit; outline: none; border: none; }

#app { min-height: 100vh; padding-bottom: calc(var(--tab-h) + 20px); }

/* ===== 顶栏搜索 ===== */
.moments__top {
  height: 220px;
  margin-bottom: 2px;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.moments__top .banner-swiper {
  width: 100%;
  height: 100%;
  position: relative;
}
.moments__top .banner-slide {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: none;
}
.moments__top .banner-slide.active { display: block; }
.moments__searchbox {
  width: 95%;
  padding: 8px 0;
  font-size: 15px;
  color: #aaadbf;
  border-radius: 5px;
  position: absolute;
  background: #fff;
  box-shadow: 0 1px 4px 0 rgba(109,114,120,.5);
  left: 50%;
  top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  z-index: 5;
  gap: 6px;
}
.moments__searchbox .search-icon {
  width: 16px; height: 16px;
  opacity: .55;
}
.moments__searchbox span { line-height: 1; }

/* ===== 统计 + 广播 ===== */
.public-info {
  background: #fff;
  padding: 8px 16px 0;
  margin-bottom: 5px;
}
.summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
}
.summary-item {
  flex: 1;
  text-align: center;
  font-size: 13px;
  color: #666;
}
.summary-item strong {
  display: block;
  font-size: 18px;
  color: #222;
  font-weight: 600;
  margin-bottom: 2px;
}
.summary .sep {
  display: inline-block;
  width: 1px;
  height: 1.4rem;
  background: #f6f6f6;
}
.broadcast {
  border-bottom: 1px solid #ebebeb;
  display: flex;
  align-items: center;
  padding: 6px 0 8px;
  gap: 8px;
  overflow: hidden;
}
.broadcast .newIcon {
  flex-shrink: 0;
  background: #ff4d4f;
  color: #fff;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 3px;
  line-height: 1.2;
}
.broadcast .u-notice {
  flex: 1;
  height: 18px;
  overflow: hidden;
  position: relative;
}
.broadcast .u-notice__swiper {
  height: 18px;
}
.broadcast .notice-item {
  font-size: 12px;
  color: #f9ae3d;
  line-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== 分类 tabs ===== */
.moments__tabs {
  background: #fff;
  padding: 0 5px 5px;
  margin-bottom: 5px;
  box-shadow: 0 5px 7px 0 #dadcf2;
  height: 45px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}
.moments__tabs::-webkit-scrollbar { display: none; }
.tabBox { display: inline-flex; }
.tab-item {
  padding: 7.5px 10px;
  display: inline-block;
  text-align: center;
  font-size: 14px;
  color: #666;
  position: relative;
}
.tab-item.active {
  color: var(--brand);
  font-weight: 600;
}
.tab-item.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--brand);
  border-radius: 2px;
}

/* ===== 帖子卡片（朋友圈） ===== */
.moments__post {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 15px 10px 21px;
  display: flex;
  position: relative;
}
.moments__post .post-left {
  flex-shrink: 0;
  width: 42px;
}
.moments__post .post-left img,
.moments__post .avatar {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  background: #eee;
}
.moments__post .post_right {
  font-size: 16px;
  padding-left: 10px;
  width: 100%;
  min-width: 0;
}
.moments__post .post-username {
  color: var(--link);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.moments__post .post_header {
  word-wrap: break-word;
  word-break: break-all;
  white-space: pre-wrap;
  display: inline-block;
  max-width: calc(100vw - 75px);
  color: rgba(0,0,0,.9) !important;
  font-size: 15px;
  line-height: 1.55;
}
.moments__post .post_header a[phone],
.moments__post .post_header a[href^="tel:"] {
  color: var(--brand);
  margin-right: 5px;
}
.moments__post .post_header a[style*="22a5f6"] {
  display: inline-block;
  border-radius: 4px !important;
  padding: 0 6px !important;
  font-size: 13px !important;
  line-height: 1.6;
  vertical-align: middle;
}
.full_text {
  font-size: 15px;
  color: #037cd2;
  text-align: left;
  height: 20px;
  line-height: 20px;
  display: inline-block;
  padding-top: 4px;
  cursor: pointer;
}
.moments__post .thumbnails {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  margin-top: 8px;
}
.moments__post .thumbnails .thumbnail {
  width: 30%;
  height: 90px;
  margin: 2px;
  background: #757575;
  overflow: hidden;
  position: relative;
  border-radius: 2px;
}
.moments__post .thumbnails .thumbnail img,
.moments__post .thumbnails .thumbnail video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.moments__post .thumbnails .my-gallery {
  width: 60%;
  max-height: 280px;
  margin: 2px;
  overflow: hidden;
  border-radius: 2px;
  position: relative;
}
.moments__post .thumbnails .my-gallery img,
.moments__post .thumbnails .my-gallery video {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}
.play {
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  margin: auto;
  width: 35px; height: 35px;
  pointer-events: none;
}
.moments__post .toolbar {
  position: relative;
  top: 5px;
  display: flex;
  align-items: center;
  margin-top: 6px;
  gap: 4px;
}
.moments__post .toolbar .timestamp {
  color: var(--muted);
  font-size: 11px;
  flex: 1;
}
.moments__post .toolbar .id {
  font-size: 10px;
  color: #a9a9a9;
  margin-right: 8px;
}
.moments__post .like,
.moments__post .comment,
.moments__post .zhuanfa {
  display: flex;
  align-items: center;
  padding: 4px 6px;
  gap: 2px;
}
.moments__post .toolbar img.tool-icon {
  width: 20px;
  height: 20px;
}
.moments__post .post-footer {
  margin-top: 10px;
  background: #f7f7f7;
  border-radius: 3px;
  padding: 6px 8px;
}
.moments__post .footer_content {
  padding-left: 5px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 4px;
}
.liked {
  position: relative;
  margin-right: 5px;
  width: 17px;
  height: 17px;
}
.moments__post .footer_content .nickname {
  color: var(--like);
  font-size: 12px;
}
.moments__post .comment-line {
  font-size: 12px;
  line-height: 1.6;
  padding: 2px 0;
}
.moments__post .comment-nickname {
  color: var(--like);
  font-size: 12px;
}
.moments__post .comment-content {
  color: #000;
  font-size: 12px;
}
.topimage {
  position: absolute;
  right: 10px;
  top: 12px;
  width: 32px;
  height: auto;
}

/* ===== 底栏 ===== */
.tabBar {
  width: 100%;
  max-width: 750px;
  height: var(--tab-h);
  background: #fff;
  border-top: 1px solid #e5e5e5;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 201;
}
.tabBar .tabBar_list {
  width: 86%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.tabBar .tabBar_item,
.tabBar .tabBar_item2 {
  width: 34px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-size: 10px;
  color: #333;
}
.tabBar .tabBar_item img { width: 24px; height: 24px; margin-bottom: 1px; }
.tabBar .tabBar_item2 {
  margin-top: -20px;
  position: relative;
  z-index: 101;
}
.tabBar .tabBar_item2 img { width: 48px; height: 48px; }
.tabBar .nav_active { color: var(--brand); }

/* ===== 加载更多 ===== */
.loadmore {
  text-align: center;
  padding: 16px;
  color: #999;
  font-size: 13px;
}

/* ===== 图片预览 ===== */
.img-preview {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,.9);
  align-items: center;
  justify-content: center;
}
.img-preview.show { display: flex; }
.img-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ===== 评论弹层 ===== */
.comment-sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,.4);
}
.comment-sheet.show { display: block; }
.comment-sheet .footer {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  width: 100%;
  height: 48px;
  border-top: solid 1px #bbb;
  padding: 4px;
  background: #f4f5f6;
  align-items: center;
}
.comment-sheet .footer-center {
  flex: 1;
  padding: 0 10px;
}
.comment-sheet .input-text {
  width: 100%;
  height: 34px;
  background: #fff;
  border-radius: 4px;
  padding: 0 10px;
}
.comment-sheet .send-comment {
  background: #007aff;
  text-align: center;
  line-height: 30px;
  color: #fff;
  width: 48px;
  height: 30px;
  border-radius: 5px;
  font-size: 12px;
  margin-right: 6px;
}

/* ===== 客服弹窗 ===== */
.kefu-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0,0,0,.55);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.kefu-mask.show { display: flex; }
.kefu-box {
  background: #fff;
  border-radius: 10px;
  max-width: 320px;
  width: 100%;
  max-height: 80vh;
  overflow: auto;
  padding: 16px;
  position: relative;
}
.kefu-box .close-btn {
  position: absolute;
  right: 10px;
  top: 8px;
  font-size: 22px;
  color: #999;
}

/* ===== 搜索页 ===== */
.search-page { background: #fff; min-height: 100vh; }
.search-bar {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  gap: 10px;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}
.search-bar input {
  flex: 1;
  height: 34px;
  background: #f5f5f5;
  border-radius: 17px;
  padding: 0 14px;
  font-size: 14px;
}
.search-bar .btn-search { color: var(--brand); font-size: 15px; }
.search-bar .btn-back { font-size: 15px; color: #666; padding: 4px; }
.search-section { padding: 16px; }
.search-section h3 { font-size: 14px; color: #999; margin-bottom: 10px; font-weight: 500; }
.hot-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hot-tags span {
  background: #f5f5f5;
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 13px;
  color: #666;
}
.history-list li {
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
}
.history-list .del { color: #ccc; font-size: 12px; }

/* ===== 登录页 ===== */
.login-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #e8f6ff 0%, #fff 40%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px 40px;
}
.login-page .logo {
  width: 88px; height: 88px;
  border-radius: 18px;
  margin-bottom: 16px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(34,165,246,.25);
}
.login-page .ptitle {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  margin-bottom: 6px;
}
.login-page .txt { color: #888; font-size: 13px; margin-bottom: 40px; text-align: center; }
.auth_wrap { width: 100%; max-width: 340px; }
.auth_ul { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.04); }
.auth_li {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f5f5f5;
  gap: 12px;
}
.auth_li:last-child { border-bottom: none; }
.auth_li .tit { width: 64px; color: #666; font-size: 14px; flex-shrink: 0; }
.auth_li input { flex: 1; font-size: 15px; }
.avatar-pick {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #eee;
  object-fit: cover;
  cursor: pointer;
}
.confirm_btn {
  margin-top: 28px;
  width: 100%;
  height: 46px;
  background: var(--brand);
  color: #fff;
  border-radius: 23px;
  font-size: 16px;
  font-weight: 600;
}
.confirm_btn:disabled { opacity: .5; }

/* ===== 发布页 ===== */
.publish-page { background: #fff; min-height: 100vh; padding-bottom: 80px; }
.publish-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}
.publish-nav .title { font-weight: 600; }
.publish-nav .submit {
  color: var(--brand);
  font-weight: 600;
  font-size: 15px;
}
.publish-body { padding: 16px; }
.publish-body textarea {
  width: 100%;
  min-height: 140px;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
}
.cat-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}
.cat-pick label {
  padding: 6px 12px;
  background: #f5f5f5;
  border-radius: 14px;
  font-size: 13px;
  cursor: pointer;
}
.cat-pick input { display: none; }
.cat-pick input:checked + span {
  background: var(--brand);
  color: #fff;
  padding: 6px 12px;
  border-radius: 14px;
  display: inline-block;
}
.img-upload-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.img-upload-list .thumb-wrap {
  position: relative;
  width: 80px;
  height: 80px;
}
.img-upload-list .thumb {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  object-fit: cover;
  background: #f0f0f0;
  display: block;
}
.img-upload-list .thumb-del {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: 16px;
  line-height: 20px;
  text-align: center;
  border: none;
  padding: 0;
}
.img-upload-list .add-btn {
  width: 80px;
  height: 80px;
  border: 1px dashed #ccc;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 32px;
  background: #fafafa;
}
.img-upload-tip {
  margin-top: 8px;
  font-size: 12px;
  color: #999;
}

/* ===== 详情页微调 ===== */
.detail-nav {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 10;
  gap: 10px;
}
.detail-nav .back { font-size: 15px; color: #666; }
.detail-nav .title { font-weight: 600; font-size: 16px; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  background: rgba(17,17,17,.78);
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 13px;
  z-index: 1000;
  display: none;
  max-width: 80%;
  text-align: center;
}
.toast.show { display: block; }

.empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 14px;
}
