* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* 微信内置浏览器（X5）会按用户设置放大字体，导致排版错乱；锁定为不缩放 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img { max-width: 100%; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  margin: 0; background: #f6f7f9; color: #2c2c2a; font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
header {
  background: #fff; border-bottom: 1px solid #e5e7eb; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10;
}
header .brand { font-weight: 600; font-size: 16px; color: #185fa5; }
nav a { color: #5f5e5a; text-decoration: none; margin-left: 18px; font-size: 13px; }
nav a:hover { color: #185fa5; }
/* ---------- 首页轮播图 ---------- */
.hero-carousel { position: relative; max-width: 1080px; margin: 16px auto 0; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(20,40,80,.14); }
.hero-carousel .slide {
  display: none; height: 260px; position: relative; overflow: hidden; cursor: pointer;
}
.hero-carousel .slide.active { display: block; animation: herofade .5s ease; }
@keyframes herofade { from { opacity: 0; } to { opacity: 1; } }
.hero-carousel .slide { background-size: cover; background-position: center; }
.hero-carousel .slide-mask { position: absolute; inset: 0; background: rgba(0,0,0,.28); }
.hero-carousel .slide-text { position: absolute; left: 40px; top: 50%; transform: translateY(-50%); color: #fff; max-width: 70%; }
.hero-carousel .slide-title { font-size: 24px; font-weight: 700; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.hero-carousel .slide-sub { font-size: 14px; margin-top: 8px; opacity: .92; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.hero-carousel .hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: none;
  background: rgba(0,0,0,.3); color: #fff; font-size: 22px; line-height: 1; border-radius: 50%; cursor: pointer;
}
.hero-carousel .hero-arrow:hover { background: rgba(0,0,0,.5); }
.hero-carousel .hero-arrow.prev { left: 14px; }
.hero-carousel .hero-arrow.next { right: 14px; }
.hero-carousel .hero-dots { position: absolute; bottom: 14px; right: 24px; display: flex; gap: 8px; }
.hero-carousel .hero-dots .dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; }
.hero-carousel .hero-dots .dot.active { background: #fff; width: 22px; border-radius: 5px; }
.container { max-width: 1080px; margin: 0 auto; padding: 24px; }
.filters { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.filters input, .filters select {
  padding: 8px 12px; border: 1px solid #d3d1c7; border-radius: 8px; font-size: 13px; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.filters input { flex: 1; min-width: 240px; }
.filters button, .btn {
  padding: 8px 16px; border: 1px solid #185fa5; background: #185fa5; color: #fff;
  border-radius: 8px; cursor: pointer; font-size: 13px;
}
.btn.ghost { background: #fff; color: #185fa5; }
.btn.danger { background: #fff; color: #a32d2d; border-color: #a32d2d; }
.btn.ok { background: #fff; color: #3b6d11; border-color: #3b6d11; }
.merchant-map { height: 240px; border: 1px solid #d3d1c7; border-radius: 8px; margin-top: 6px; z-index: 1; }
.map-search { display: flex; gap: 8px; margin-top: 8px; }
.map-search input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid #d3d1c7; border-radius: 8px; font-size: 14px; font-family: inherit; }
.map-search .btn { flex-shrink: 0; }
.nav-btn { margin-top: 8px; }
/* ---------- 首页会员分布图 ---------- */
.dist-map { height: 380px; border: 1px solid #ececec; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 10px rgba(24,95,165,.08); z-index: 1; }
.miw { min-width: 160px; max-width: 240px; padding: 2px 2px 0; }
.miw-name { font-size: 14px; font-weight: 700; color: #185fa5; }
.miw-meta { font-size: 12px; color: #5f5e5a; margin-top: 4px; line-height: 1.5; }
.miw-acts { margin-top: 8px; display: flex; gap: 10px; font-size: 13px; }
.miw-acts a { color: #185fa5; text-decoration: none; }
.miw-acts a:hover { text-decoration: underline; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { background: #fff; border: 1px solid #ececec; border-radius: 12px; padding: 16px; transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.card:hover { box-shadow: 0 10px 26px rgba(20,40,80,.10); transform: translateY(-2px); border-color: #cfe2f7; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.logo { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.logo.ph { background: #e6f1fb; color: #0c447c; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; }
.name { font-weight: 600; font-size: 15px; }
.tag { display: inline-block; font-size: 12px; color: #185fa5; background: #e6f1fb; padding: 1px 8px; border-radius: 6px; margin-top: 2px; }
.minfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nav-link { margin-left: auto; font-size: 12px; color: #185fa5; text-decoration: none; white-space: nowrap; align-self: flex-start; }
.nav-link:hover { text-decoration: underline; }
.intro { color: #5f5e5a; margin: 8px 0 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.contact { font-size: 12px; color: #888780; }
.products { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.prod { width: 88px; text-align: center; }
.prod img { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; border: 1px solid #eee; }
.prod-name { font-size: 12px; margin-top: 4px; }
.prod-price { font-size: 12px; color: #a32d2d; }
.empty { color: #888780; text-align: center; padding: 40px; }
.auth { max-width: 380px; margin: 40px auto; background: #fff; border: 1px solid #ececec; border-radius: 12px; padding: 24px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs button { flex: 1; padding: 8px; border: 1px solid #d3d1c7; background: #fff; border-radius: 8px; cursor: pointer; }
.tabs button.active { border-color: #185fa5; color: #185fa5; }
.form { display: flex; flex-direction: column; gap: 10px; }
.form label { font-size: 12px; color: #5f5e5a; }
.form input, .form textarea, .form select {
  padding: 8px 10px; border: 1px solid #d3d1c7; border-radius: 8px; font-size: 13px; font-family: inherit;
}
/* 大号多行文本域（如企业简介），可手动拉伸高度 */
textarea.big { min-height: 150px; resize: vertical; line-height: 1.7; }
textarea.big:focus, .form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: #185fa5; box-shadow: 0 0 0 3px rgba(24,95,165,.12);
}
.region-row { display: flex; gap: 8px; }
.region-row select { flex: 1; min-width: 0; }
.section { background: #fff; border: 1px solid #ececec; border-radius: 12px; padding: 18px; margin-bottom: 18px; }
.section h3 { margin: 0 0 12px; font-size: 15px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 6px; }
.badge.pending { background: #faefda; color: #854f0b; }
.badge.ok { background: #eaf3de; color: #3b6d11; }
.badge.reject { background: #fcebeb; color: #a32d2d; }
.item { border: 1px solid #eee; border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.item .meta { font-size: 12px; color: #888780; margin: 6px 0; }
.item .meta.owner { color: #185fa5; font-weight: 600; }
.actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.muted { color: #888780; font-size: 12px; }
.err { color: #a32d2d; font-size: 13px; margin-top: 8px; }
.req { color: #a32d2d; font-weight: 700; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #2c2c2a; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.chip { padding: 6px 14px; border: 1px solid #d3d1c7; background: #fff; border-radius: 999px; cursor: pointer; font-size: 13px; color: #5f5e5a; }
.chip:hover { border-color: #185fa5; color: #185fa5; }
.chip.active { border-color: #185fa5; color: #185fa5; background: #e6f1fb; font-weight: 500; }
.section-title { font-size: 16px; font-weight: 600; margin: 36px 0 14px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ''; width: 4px; height: 16px; background: #185fa5; border-radius: 2px; display: inline-block; }
.section-title .count { font-size: 12px; color: #888780; font-weight: 400; }
.badge.new { background: #faefda; color: #854f0b; margin-left: 8px; }
.logo-wall { display: flex; gap: 16px; flex-wrap: wrap; }
.logo-tile { width: 88px; text-align: center; cursor: pointer; }
.logo-tile .logo { width: 64px; height: 64px; margin: 0 auto; transition: transform .15s; }
.logo-tile:hover .logo { transform: scale(1.06); }
.logo-tile .nm { font-size: 12px; color: #5f5e5a; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.prod-card { background: #fff; border: 1px solid #ececec; border-radius: 12px; padding: 12px; cursor: pointer; }
.prod-card:hover { border-color: #b5d4f4; }
.prod-card img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; background: #f3f4f6; }
.prod-card .pname { font-weight: 600; margin-top: 8px; font-size: 14px; }
.prod-card .pmeta { font-size: 12px; color: #888780; margin-top: 4px; }
.prod-card .pprice { color: #a32d2d; font-size: 13px; margin-top: 4px; }
/* 活动相册 */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.album-card { display: block; background: #fff; border: 1px solid #ececec; border-radius: 12px; overflow: hidden; color: inherit; text-decoration: none; transition: transform .15s, border-color .15s; }
.album-card:hover { border-color: #b5d4f4; transform: translateY(-2px); }
.album-card img { width: 100%; height: 140px; object-fit: cover; background: #f3f4f6; display: block; }
.album-card .cover-ph { width: 100%; height: 140px; background: linear-gradient(120deg,#185fa5,#0c447c); }
.album-card .ameta { padding: 10px 12px; }
.album-card .atitle { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-card .adate { color: #888780; font-size: 12px; margin-top: 4px; }
.storage-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #f1f5fb; color: #185fa5; }
.storage-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #185fa5; }
.storage-badge.cloud { background: #e8f7ee; color: #1f7d3a; }
.storage-badge.cloud .dot { background: #1f7d3a; }
.storage-badge.high { background: #fff3e0; color: #b95a06; }
.storage-badge.high .dot { background: #b95a06; }
/* 近期活动（展示端） */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.event-card { display: block; background: #fff; border: 1px solid #ececec; border-radius: 12px; overflow: hidden; color: inherit; text-decoration: none; transition: transform .15s, border-color .15s; }
.event-card:hover { border-color: #b5d4f4; transform: translateY(-2px); }
.event-card .ecover { width: 100%; height: 150px; overflow: hidden; }
.event-card .ecover img { width: 100%; height: 150px; object-fit: cover; display: block; background: #f3f4f6; }
.event-card .ecover.ph { background: linear-gradient(120deg,#185fa5,#0c447c); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 600; letter-spacing: 2px; }
.event-card .ebody { padding: 12px 14px 14px; }
.event-card .etitle { font-weight: 600; font-size: 15px; line-height: 1.4; }
.event-card .emeta { color: #888780; font-size: 12px; margin-top: 6px; }
.event-card.past { opacity: .72; }
.badge.past { background: #f0f0ee; color: #6f6e69; margin-left: 8px; }
/* 表单两列布局（管理端） */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* 管理端简易表格（如报名名单） */
table.simple { width: 100%; border-collapse: collapse; font-size: 13px; }
table.simple th, table.simple td { border: 1px solid #ececec; padding: 6px 10px; text-align: left; white-space: nowrap; }
table.simple th { background: #f7f8fa; font-weight: 600; color: #5f5e5a; }
table.simple tbody tr:hover { background: #fafbfc; }
/* ---------- 首页页脚 ---------- */
.site-footer { background: #fff; border-top: 1px solid #e5e7eb; margin-top: 40px; padding: 26px 24px; text-align: center; color: #888780; font-size: 12px; line-height: 1.9; }
.site-footer .ft-title { font-weight: 600; color: #2c2c2a; font-size: 14px; }
.site-footer a { color: #185fa5; text-decoration: none; margin: 0 6px; }
.site-footer a:hover { text-decoration: underline; }
/* ---------- 移动端 / 微信内置浏览器适配 ---------- */
@media (max-width: 720px) {
  header { padding: 12px 14px; }
  header .brand { font-size: 15px; }
  nav a { margin-left: 12px; }
  .container { padding: 14px; }
  .hero-carousel { margin-top: 10px; border-radius: 12px; }
  .hero-carousel .slide { height: 190px; }
  .hero-carousel .slide-text { left: 18px; max-width: 84%; }
  .hero-carousel .slide-title { font-size: 19px; }
  .hero-carousel .slide-sub { font-size: 12.5px; }
  .hero-carousel .hero-arrow { width: 32px; height: 32px; font-size: 18px; }
  .row, .grid2 { grid-template-columns: 1fr; }
  .section { padding: 14px; }
  .section-title { margin: 26px 0 12px; }
  .grid { grid-template-columns: 1fr; }
  .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .event-grid, .album-grid { grid-template-columns: 1fr; }
  .filters { gap: 8px; }
  .filters input, .filters select { min-width: 0; }
  .merchant-map { height: 200px; }
  .dist-map { height: 260px; }
  .prod-card img { height: 110px; }
  .prod { width: calc(50% - 5px); }
  .prod img { width: 100%; height: auto; aspect-ratio: 1 / 1; }
  .auth { margin: 20px auto; padding: 18px; }
  /* 输入框在微信键盘弹出时更易被遮挡，加大底部留白 */
  .form input, .form textarea, .form select { font-size: 16px; }
}
@media (max-width: 420px) {
  .hero-carousel .slide { height: 165px; }
  .hero-carousel .slide-title { font-size: 17px; }
  .logo-wall { gap: 12px; }
  .logo-tile { width: 72px; }
  .logo-tile .logo { width: 56px; height: 56px; }
  .region-row { flex-wrap: wrap; }
  .region-row select { flex: 1 1 46%; }
  .section-title { font-size: 15px; }
}
