/* ===== 手机底部导航 ===== */
.mobile-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 220;
  height: 56px;
  padding-top: 10px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #fff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
  align-items: flex-end;
  justify-content: center;
  box-sizing: border-box;
}

.mobile-tabbar-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  text-decoration: none;
  color: #002b5c;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 400;
  padding: 0 2px 6px;
  transition: color 0.15s;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  height: 100%;
}

.mobile-tabbar-item.active {
  color: #fea619;
}

.mobile-tabbar-icon {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

/* 中间供需发布：圆形按钮上浮，文字与其他 Tab 底对齐 */
.mobile-tabbar-publish {
  position: relative;
  padding-bottom: 6px;
  overflow: visible;
}

.mobile-tabbar-publish-float {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
}

.mobile-tabbar-publish-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fea619 0%, #f59e0b 100%);
  color: #fff;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(254, 166, 25, 0.4);
}

.mobile-tabbar-publish.active .mobile-tabbar-publish-icon {
  box-shadow: 0 4px 14px rgba(254, 166, 25, 0.55);
}

.mobile-tabbar-publish-label {
  position: relative;
  z-index: 2;
  font-size: 11px;
  line-height: 1.2;
  margin-top: 0;
  white-space: nowrap;
}

/* 供需发布弹窗 */
.mobile-publish-sheet {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.mobile-publish-sheet[hidden] {
  display: none !important;
}

.mobile-publish-sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.mobile-publish-sheet-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  animation: mobile-sheet-up 0.25s ease;
}

@keyframes mobile-sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.mobile-publish-sheet-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: #002b5c;
  text-align: center;
}

.mobile-publish-sheet-desc {
  margin: 0 0 16px;
  font-size: 13px;
  color: #6b7280;
  text-align: center;
}

.mobile-publish-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-publish-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.mobile-publish-option:active,
.mobile-publish-option:hover {
  border-color: #fea619;
  background: #fffbeb;
}

.mobile-publish-option-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-publish-option-icon-equip {
  background: #eff6ff;
}

.mobile-publish-option-icon-purchase {
  background: #ecfdf5;
}

.mobile-publish-option-icon-merchant {
  background: #fef3c7;
}

.mobile-publish-option-text {
  flex: 1;
  min-width: 0;
}

.mobile-publish-option-text strong {
  display: block;
  font-size: 15px;
  color: #002b5c;
  margin-bottom: 2px;
}

.mobile-publish-option-text small {
  display: block;
  font-size: 12px;
  color: #6b7280;
}

.mobile-publish-option-arrow {
  flex-shrink: 0;
  font-size: 20px;
  color: #9ca3af;
}

.mobile-publish-option-join {
  border-style: dashed;
}

.mobile-publish-sheet-cancel {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #f3f4f6;
  color: #374151;
  font-size: 15px;
  cursor: pointer;
}

body.mobile-publish-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .mobile-tabbar {
    display: flex;
  }

  body.has-mobile-tabbar,
  body.mp-has-mobile-tabbar {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  }

  body.has-mobile-tabbar .footer {
    display: none;
  }

  body.has-mobile-tabbar .back-to-top {
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }
}
