/* H5 移动端样式 */
body.h5 {
  background: #f4f6fb;
  padding-bottom: 64px;
  padding-top: 52px;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

.h5-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  z-index: 70;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  max-width: 560px;
  margin: 0 auto;
}

.h5-topbar .brand {
  font-size: 15.5px;
  gap: 8px;
}

.h5-topbar .brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-size: 11px;
}

.h5-topbar .spacer {
  flex: 1;
}

.h5-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 58px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line-2);
  display: flex;
  z-index: 70;
  max-width: 560px;
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom);
}

.h5-tabbar button {
  flex: 1;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  color: var(--ink-3);
  padding: 0;
}

.h5-tabbar button i {
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  filter: grayscale(1);
  opacity: 0.55;
}

.h5-tabbar button.on {
  color: var(--brand);
  font-weight: 600;
}

.h5-tabbar button.on i {
  filter: none;
  opacity: 1;
}

.view {
  display: none;
  padding: 14px 14px 20px;
  animation: viewIn 0.18s ease;
}

.view.on {
  display: block;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 首页 ---------- */
.h5-hero {
  background: linear-gradient(135deg, #1e5eff, #4b7bff 55%, #6b46e5);
  border-radius: 18px;
  padding: 22px 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.h5-hero:after {
  content: "";
  position: absolute;
  right: -40px;
  top: -50px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.h5-hero h1 {
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.h5-hero p {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.86);
}

.h5-hero .row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.h5-hero .btn {
  background: #fff;
  color: var(--brand);
  border: 0;
  font-weight: 600;
  height: 36px;
  font-size: 13.5px;
  border-radius: 9px;
}

.h5-hero .btn.ghost {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.h5-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.h5-stat {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
}

.h5-stat b {
  display: block;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.h5-stat span {
  font-size: 11px;
  color: var(--ink-3);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.quick {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 12px 4px;
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
}

.quick i {
  display: block;
  font-style: normal;
  font-size: 19px;
  margin-bottom: 5px;
}

.block {
  margin-top: 18px;
}

.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.block-head h3 {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.block-head button {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 12.5px;
  padding: 0;
}

/* ---------- 列表卡片 ---------- */
.m-card {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  display: block;
}

.m-card:active {
  background: #fafbff;
}

.m-card .top {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.m-card .ttl {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.m-card .dsc {
  font-size: 12.8px;
  color: var(--ink-2);
  line-height: 1.7;
  margin-top: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.m-card .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-3);
}

.m-card .price {
  color: #d9480f;
  font-weight: 700;
  font-size: 14px;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 4px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12.8px;
}

.chip.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}

.search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.search-row input {
  height: 36px;
  font-size: 13.5px;
}

.post-item {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  gap: 10px;
}

.post-item .ttl {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
}

.post-item .bd {
  font-size: 12.8px;
  color: var(--ink-2);
  line-height: 1.7;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-item .ft {
  display: flex;
  gap: 10px;
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 8px;
}

/* ---------- 我的 ---------- */
.me-card {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.me-card .avatar {
  width: 48px;
  height: 48px;
  font-size: 19px;
}

.me-name {
  font-size: 16px;
  font-weight: 700;
}

.me-list {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  margin-top: 12px;
  overflow: hidden;
}

.me-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-2);
  font-size: 14px;
}

.me-row:last-child {
  border-bottom: 0;
}

.me-row .arrow {
  margin-left: auto;
  color: var(--ink-4);
  font-size: 15px;
}

.me-row .cnt {
  font-size: 12.5px;
  color: var(--ink-3);
}

/* ---------- 底部弹层 ---------- */
@media (max-width: 560px) {
  .mask {
    align-items: flex-end;
    padding: 0;
  }
  .dialog,
  .dialog.wide {
    max-width: 100%;
    border-radius: 18px 18px 0 0;
    max-height: 90vh;
    animation: sheetIn 0.24s cubic-bezier(0.2, 0.9, 0.3, 1);
  }
  @keyframes sheetIn {
    from {
      transform: translateY(100%);
    }
    to {
      transform: none;
    }
  }
  .dialog-body {
    padding: 16px 16px 12px;
  }
  .dialog-head {
    padding: 16px 16px 10px;
  }
  .dialog-foot {
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  }
  .dialog-foot .btn {
    flex: 1;
  }
  .kv-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.fab {
  position: fixed;
  right: 16px;
  bottom: 74px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 0;
  background: var(--brand);
  color: #fff;
  font-size: 22px;
  box-shadow: 0 10px 24px rgba(30, 94, 255, 0.4);
  z-index: 65;
  display: flex;
  align-items: center;
  justify-content: center;
}

.h5-foot {
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-4);
  padding: 22px 0 8px;
  line-height: 1.9;
}

.h5-foot a {
  color: var(--ink-3);
}

.loading-line {
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-4);
  padding: 18px 0;
}

/* ================= 视觉精修层 · H5（UI Polish v2） ================= */

/* 顶栏：底部渐变分隔 + 更通透毛玻璃 */
.h5-topbar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(231, 235, 243, 0.9), 0 4px 16px rgba(15, 23, 42, 0.03);
}

.h5-topbar .brand-mark {
  box-shadow: 0 4px 10px rgba(30, 94, 255, 0.24);
}

/* 底部导航：active 上浮 + 渐变顶条 */
.h5-tabbar {
  height: 62px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.05);
}

.h5-tabbar button {
  position: relative;
  transition: transform 0.18s ease, color 0.18s ease;
}

.h5-tabbar button.on {
  color: var(--brand);
}

.h5-tabbar button.on::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, #2f6bff, #6b46e5);
}

.h5-tabbar button.on i {
  transform: translateY(-1px) scale(1.08);
  transition: transform 0.18s ease;
}

.h5-tabbar button:active {
  transform: scale(0.94);
}

/* 卡片悬浮语言（触屏长按/滚动中不误触，仅 hover 设备生效） */
@media (hover: hover) {
  .h5-page .card {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  }

  .h5-page .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.09);
    border-color: #d9e2f2;
  }
}

/* FAB：渐变 + 光晕 */
.fab {
  background: linear-gradient(135deg, #2f6bff, #1e5eff 55%, #1246d4);
  border: none;
  box-shadow: 0 10px 24px rgba(30, 94, 255, 0.36);
}

.fab:active {
  transform: scale(0.94);
}

/* chips 横滑栏：渐隐收边 */
.chips {
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

/* ===== 我的页信息补全 ===== */
.me-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--brand);
  background: #eef3ff;
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 6px;
  vertical-align: 1px;
}

.me-contact {
  margin-top: 3px;
  font-size: 11.5px;
}

.me-complete {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}

.me-complete .bar {
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: #eef1f7;
  overflow: hidden;
}

.me-complete .bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #1e5eff, #7c4df0);
  transition: width 0.4s ease;
}

.me-complete span {
  flex: none;
  font-size: 11px;
  color: var(--ink-3);
}

.me-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.me-stat {
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: 13px;
  padding: 11px 4px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.me-stat b {
  font-size: 17px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.me-stat span {
  font-size: 11px;
  color: var(--ink-3);
}

.me-stat:active {
  transform: scale(0.97);
}

.me-sec {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 16px 4px 7px;
}

.me-txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.me-txt b {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
}

.me-txt em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.me-cnt {
  margin-left: auto;
  flex: none;
  font-size: 12px;
  color: var(--brand);
  background: #eef3ff;
  border-radius: 999px;
  padding: 1px 8px;
}

a.me-row {
  text-decoration: none;
  color: inherit;
}

.me-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.me-actions .btn,
.me-actions a {
  flex: 1;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

.me-ver {
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-4);
  line-height: 1.9;
  margin: 16px 0 6px;
}

.me-ver a {
  color: inherit;
  text-decoration: underline;
}

/* ===== H5 备案区 ===== */
.h5-beian {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 10px;
}

.h5-beian img {
  display: block;
  vertical-align: -2px;
}
