/* ==========================================================
   base.css · 全局基础样式与响应式骨架
   ========================================================== */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--mh-font);
  color: var(--mh-text);
  background: var(--mh-bg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--mh-primary);
  text-decoration: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

/* ---------- 通用容器 ---------- */
.mh-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.mh-card {
  background: var(--mh-card);
  border: 1px solid var(--mh-border);
  border-radius: var(--mh-radius);
  box-shadow: var(--mh-shadow);
}

/* ---------- 顶部条 ---------- */
.mh-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--mh-card);
  border-bottom: 1px solid var(--mh-border);
  min-height: 54px;
}

.mh-topbar__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--mh-border);
  background: #fff;
  color: var(--mh-text-soft);
  font-size: 14px;
  white-space: nowrap;
}

.mh-topbar__back:hover {
  border-color: var(--mh-primary);
  color: var(--mh-primary);
}

.mh-topbar__title {
  font-size: 17px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mh-topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- 通用按钮 ---------- */
.mh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--mh-radius-sm);
  border: 1px solid var(--mh-border-strong);
  background: #fff;
  color: var(--mh-text);
  font-size: 15px;
  transition: all 0.15s ease;
}

.mh-btn:hover {
  border-color: var(--mh-primary);
  color: var(--mh-primary);
}

.mh-btn--primary {
  background: var(--mh-primary);
  border-color: var(--mh-primary);
  color: #fff;
}

.mh-btn--primary:hover {
  background: var(--mh-primary-dark);
  border-color: var(--mh-primary-dark);
  color: #fff;
}

.mh-btn--ghost {
  border-color: transparent;
  background: var(--mh-primary-soft);
  color: var(--mh-primary-dark);
}

/* ---------- 标签 ---------- */
.mh-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--mh-primary-soft);
  color: var(--mh-primary-dark);
}

.mh-tag--soft {
  background: #f3f4f6;
  color: var(--mh-text-soft);
}

/* ---------- 提示气泡（用于占位功能） ---------- */
.mh-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(31, 41, 55, 0.94);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 999;
}

.mh-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- 移动端 ---------- */
@media (max-width: 860px) {
  body {
    font-size: 15px;
  }
  .mh-container {
    padding: 0 14px;
  }
}
