/* WAP 手机端：底栏 App 壳 + 对齐栅格 */
:root {
  --mt-bg: #f5f5f5;
  --mt-surface: #ffffff;
  --mt-ink: #1f1f1f;
  --mt-muted: #8a8a8a;
  --mt-line: #ebebeb;
  --mt-accent: #ff6a00;
  --mt-accent-hover: #e55f00;
  --mt-pad: 16px;
  --mt-gap: 12px;
  --mt-radius: 12px;
  --mt-top-h: 52px;
  --mt-tab-h: 56px;
  --mt-safe-b: env(safe-area-inset-bottom, 0px);
  --mt-safe-t: env(safe-area-inset-top, 0px);
  --bs-body-bg: var(--mt-bg);
  --bs-body-color: var(--mt-ink);
  --bs-border-color: var(--mt-line);
  --bs-primary: var(--mt-accent);
  --bs-primary-rgb: 255, 106, 0;
  --bs-font-sans-serif: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--mt-bg);
  color: var(--mt-ink);
  letter-spacing: 0.01em;
  -webkit-tap-highlight-color: transparent;
}

html:has(.mt-wap-shell),
body:has(.mt-wap-shell) {
  overflow: hidden;
  max-height: 100%;
  max-height: 100dvh;
}

/* —— Shell —— */
.mt-wap-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
}

.mt-wap-top {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--mt-top-h);
  padding: calc(8px + var(--mt-safe-t)) var(--mt-pad) 8px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--mt-line);
  z-index: 20;
}
.mt-wap-top h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mt-wap-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
html.mt-i18n-pending body { visibility: hidden; }
.mt-locale-menu { position: relative; }
.mt-locale-menu::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 0.5rem;
}
.mt-locale-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--mt-line);
  background: #fff;
  color: inherit;
  font-size: 13px;
  line-height: 1.2;
  padding: 0.28rem 0.55rem 0.28rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
}
.mt-locale-caret {
  display: block;
  opacity: 0.55;
  transition: transform 0.15s ease;
}
.mt-locale-menu:hover .mt-locale-caret,
.mt-locale-menu:focus-within .mt-locale-caret {
  transform: rotate(180deg);
}
.mt-locale-dropdown {
  min-width: 7.5rem;
  left: auto;
  right: 0;
  border: 1px solid var(--mt-line);
  border-radius: 0.65rem;
  box-shadow: 0 8px 24px rgba(30, 20, 10, 0.08);
  padding: 0.35rem;
  margin-top: 0.35rem !important;
}
.mt-locale-menu:hover > .dropdown-menu,
.mt-locale-menu:focus-within > .dropdown-menu {
  display: block;
}
.mt-locale-dropdown .dropdown-item {
  border-radius: 0.4rem;
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
}
.mt-locale-dropdown .dropdown-item.active {
  background: #fff7f0;
  color: var(--mt-accent);
}

.mt-balance-pill {
  font-size: 0.75rem;
  color: var(--mt-muted);
  padding: 0.3rem 0.65rem;
  background: #fff7f0;
  border: 1px solid #ffe0c2;
  border-radius: 999px;
  text-decoration: none;
  max-width: 5.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mt-quota-pill {
  background: #f7f7f7;
  border-color: var(--mt-line);
}
a.mt-balance-pill:hover { color: var(--mt-accent); }
.mt-balance-pill strong { color: var(--mt-accent); font-weight: 600; }

.mt-wap-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--mt-pad);
  padding-bottom: calc(var(--mt-pad) + var(--mt-tab-h) + var(--mt-safe-b) + 8px);
}

.mt-wap-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--mt-tab-h) + var(--mt-safe-b));
  padding-bottom: var(--mt-safe-b);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--mt-line);
}
.mt-wap-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--mt-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  min-width: 0;
}
.mt-wap-tabbar a svg {
  width: 22px;
  height: 22px;
  opacity: 0.85;
}
.mt-wap-tabbar a.active {
  color: var(--mt-accent);
}
.mt-wap-tabbar a.active svg { opacity: 1; }

/* —— Surfaces —— */
.mt-card {
  background: var(--mt-surface);
  border: 1px solid var(--mt-line);
  border-radius: var(--mt-radius);
  padding: 16px;
}

/* 充值页：方式 Tab */
.mt-recharge-tabs {
  margin: -16px -16px 14px;
  padding: 0 4px;
  border-bottom: 1px solid var(--mt-line);
  list-style: none;
}
.mt-recharge-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 12px 2px;
  margin-right: 18px;
  margin-bottom: -1px;
  color: var(--mt-muted);
  font-size: 1rem;
  font-weight: 700;
  background: transparent;
}
.mt-recharge-tabs .nav-link:hover {
  color: var(--mt-ink);
}
.mt-recharge-tabs .nav-link.active {
  color: var(--bs-success, #198754);
  border-bottom-color: var(--bs-success, #198754);
  background: transparent;
}
.mt-recharge-pane-title {
  display: none;
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--mt-ink);
}
#recharge-methods-tabs.d-none ~ .tab-content .mt-recharge-pane-title {
  display: block;
}
.mt-recharge-pane-subtitle {
  margin: 18px 0 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--mt-muted);
}
.mt-muted { color: var(--mt-muted); }
.mt-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--mt-muted);
  font-size: 0.9rem;
}
.mt-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mt-muted);
  margin: 0 0 10px;
  padding-left: 2px;
}
.mt-stack { display: flex; flex-direction: column; gap: var(--mt-gap); }
.mt-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.mt-cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mt-cta-grid .btn { width: 100%; }

.mt-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--mt-gap);
  margin-bottom: 16px;
}
.mt-stats-2 { margin-bottom: 0; }
.mt-stat {
  padding: 14px;
  background: var(--mt-surface);
  border: 1px solid var(--mt-line);
  border-radius: var(--mt-radius);
}
.mt-stat .label {
  color: var(--mt-muted);
  font-size: 0.75rem;
  margin-bottom: 6px;
}
.mt-stat .value {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  word-break: break-all;
}

.mt-list-card {
  background: var(--mt-surface);
  border: 1px solid var(--mt-line);
  border-radius: var(--mt-radius);
  padding: 14px 16px;
}
.mt-list-card.is-active {
  border-color: #ffc899;
  background: #fffaf5;
}
.mt-list-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.mt-list-card-title {
  font-weight: 600;
  font-size: 0.95rem;
  word-break: break-all;
}
.mt-list-card-meta {
  font-size: 0.78rem;
  color: var(--mt-muted);
  margin-bottom: 8px;
}
.mt-list-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.85rem;
  color: var(--mt-ink);
}
.mt-list-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  justify-content: flex-end;
}
.mt-plan-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--mt-accent);
  flex-shrink: 0;
}
.mt-plan-buy {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.mt-plan-buy .qty-input { width: 4.5rem; }

.mt-me-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}
.mt-me-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff7f0;
  border: 1px solid #ffe0c2;
  color: var(--mt-accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.mt-menu-list {
  padding: 4px 0;
  display: flex;
  flex-direction: column;
}
.mt-menu-list a,
.mt-menu-list button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: var(--mt-ink);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--mt-line);
}
.mt-menu-list a:last-child,
.mt-menu-list button:last-child { border-bottom: 0; }
.mt-menu-list a:active,
.mt-menu-list button:active { background: #fafafa; }

.mt-dl { margin: 0; }
.mt-dl > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--mt-line);
  font-size: 0.88rem;
}
.mt-dl > div:last-child { border-bottom: 0; }
.mt-dl dt { color: var(--mt-muted); margin: 0; font-weight: 400; }
.mt-dl dd { margin: 0; word-break: break-all; }

/* pager */
.mt-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}
.mt-pager-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.mt-pager-size {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}
.mt-pager-select {
  width: auto;
  min-width: 4.5rem;
  display: inline-block;
}

.mt-packages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.mt-package {
  border: 1px solid var(--mt-line);
  border-radius: var(--mt-radius);
  padding: 12px 8px;
  background: var(--mt-surface);
  cursor: pointer;
  text-align: center;
}
.mt-package.is-selected {
  border-color: var(--mt-accent);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.12);
}
.mt-package .amount {
  font-size: 1.15rem;
  font-weight: 700;
}
.mt-package .hint {
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--mt-muted);
}

/* docs */
.mt-docs pre,
.mt-docs code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}
.mt-docs pre {
  background: #1a1a1a;
  color: #f2f2f2;
  border-radius: 0.6rem;
  padding: 1rem;
  overflow-x: auto;
  margin: 0;
}
.mt-docs h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.35rem 0 0.55rem;
}
.mt-docs h2:first-child { margin-top: 0; }
.mt-docs-link {
  color: var(--mt-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mt-docs-link:hover { color: var(--mt-accent-hover); }
.mt-docs-url-row {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0.45rem 0;
  flex-wrap: wrap;
}
.mt-docs-url-label {
  flex: 0 0 4.5rem;
  font-size: 0.8rem;
  color: var(--mt-muted);
  padding-top: 0.15rem;
}
.mt-docs-url-row > code {
  flex: 1;
  min-width: 0;
  word-break: break-all;
}
.mt-docs-icon-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: 0.3rem;
  background: transparent;
  color: var(--mt-muted);
  cursor: pointer;
}
.mt-docs-icon-copy.is-copied { color: var(--mt-accent); }

/* 模型列表行：模型名 + 复制 + 问号说明气泡（WAP 无 hover，靠点击切换） */
.mt-docs-model-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0.35rem 0;
}
.mt-docs-model-row > code {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  color: var(--mt-ink);
  word-break: break-all;
}
.mt-model-copy { flex: 0 0 auto; }
.mt-model-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.3rem;
  color: var(--mt-muted);
  cursor: help;
  outline: none;
}
.mt-model-help:hover,
.mt-model-help:focus-visible,
.mt-model-help.is-open {
  color: var(--mt-ink);
  background: rgba(0, 0, 0, 0.05);
}
.mt-model-tip {
  position: absolute;
  bottom: calc(100% + 0.45rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1070;
  display: none;
  width: max-content;
  max-width: min(20rem, 78vw);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: #fff;
  color: var(--mt-ink);
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-line;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  text-align: left;
  pointer-events: none;
}
.mt-model-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 0.4rem solid transparent;
  border-top-color: #fff;
}
.mt-model-help:hover .mt-model-tip,
.mt-model-help:focus-visible .mt-model-tip,
.mt-model-help.is-open .mt-model-tip {
  display: block;
}
.mt-docs-pre-wrap { position: relative; }
/* 连续代码块之间留出间距，避免两块粘在一起 */
.mt-docs-pre-wrap + .mt-docs-pre-wrap { margin-top: 0.65rem; }
.mt-docs-step {
  margin: 1rem 0 0.45rem;
  font-size: 0.9rem;
  color: var(--mt-ink);
}
.mt-docs-note {
  margin: 0.55rem 0 0;
  font-size: 0.88rem;
  line-height: 1.55;
}
.mt-docs-icon-copy-pre {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 1;
  color: #bbb;
}
/* 教程文章代码块为浅底：复制图标用深色 hover，图示本身与「接入说明」页同一套 */
.mt-article-body .mt-docs-icon-copy-pre {
  color: #8a8a8a;
}
.mt-article-body .mt-docs-icon-copy-pre:hover {
  color: var(--mt-ink);
  background: rgba(0, 0, 0, 0.06);
}

.mt-toast {
  position: fixed;
  top: calc(1rem + var(--mt-safe-t));
  left: 50%;
  z-index: 1080;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.mt-toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal-content {
  border: 1px solid var(--mt-line);
  border-radius: 0.9rem;
}
.form-label {
  font-size: 0.85rem;
  color: var(--mt-muted);
  margin-bottom: 0.35rem;
}
.form-control,
.form-select {
  border-color: var(--mt-line);
  border-radius: 0.5rem;
  padding: 0.65rem 0.8rem;
}
.form-control:focus,
.form-select:focus {
  border-color: rgba(255, 106, 0, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(255, 106, 0, 0.12);
}
.btn-primary {
  --bs-btn-bg: var(--mt-accent);
  --bs-btn-border-color: var(--mt-accent);
  --bs-btn-hover-bg: var(--mt-accent-hover);
  --bs-btn-hover-border-color: var(--mt-accent-hover);
  --bs-btn-active-bg: var(--mt-accent-hover);
  --bs-btn-active-border-color: var(--mt-accent-hover);
}
/* 下架套餐「暂停销售」：真正蓝色，区别于站点橙主色 */
.btn-paused {
  --bs-btn-color: #fff;
  --bs-btn-bg: #2563eb;
  --bs-btn-border-color: #2563eb;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #1d4ed8;
  --bs-btn-hover-border-color: #1d4ed8;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #1e40af;
  --bs-btn-active-border-color: #1e40af;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #2563eb;
  --bs-btn-disabled-border-color: #2563eb;
}
.btn-outline-secondary {
  --bs-btn-color: #5c5c5c;
  --bs-btn-border-color: #dcdcdc;
  --bs-btn-hover-bg: #f7f7f7;
  --bs-btn-hover-border-color: #d0d0d0;
  --bs-btn-hover-color: #1f1f1f;
}
/* auth */
.mt-login {
  min-height: 100%;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--mt-pad);
  padding-top: calc(var(--mt-pad) + var(--mt-safe-t));
  padding-bottom: calc(var(--mt-pad) + var(--mt-safe-b));
  background:
    radial-gradient(circle at top right, rgba(255, 106, 0, 0.1), transparent 42%),
    var(--mt-bg);
}
.mt-login-card {
  width: min(400px, 100%);
  background: var(--mt-surface);
  border: 1px solid var(--mt-line);
  border-radius: 1rem;
  padding: 2rem 1.35rem;
}
.mt-login-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.mt-login-brand img {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  box-shadow: 0 1px 2px rgba(240, 107, 0, 0.22);
}
.mt-login-card h1 {
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  margin: 0;
}
.mt-login-card .mt-link {
  color: var(--mt-accent);
  text-decoration: none;
}
.mt-login-support {
  margin-top: 0.35rem !important;
  padding-top: 0.75rem;
  border-top: 1px solid var(--mt-line);
}
.mt-password { position: relative; }
.mt-password .form-control { padding-right: 2.75rem; }
.mt-password-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  color: var(--mt-muted);
  border-radius: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.mt-password-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.badge-soft { background: #f3f3f3; color: #5c5c5c; font-weight: 500; }
.badge-ok { background: #eaf7ef; color: #1f7a3f; }
.badge-err { background: #fdeeee; color: #b42318; }

/* captcha */
.mt-captcha { display: grid; gap: 0.5rem; }
.mt-captcha-panel {
  position: relative;
  width: 280px;
  height: 140px;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid var(--mt-line);
  background: #e8e8e8;
  user-select: none;
}
.mt-captcha-bg { display: block; width: 100%; height: 100%; pointer-events: none; }
.mt-captcha-piece {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}
.mt-captcha-track {
  position: relative;
  height: 40px;
  width: 280px;
  border-radius: 0.5rem;
  background: #f0f0f0;
  border: 1px solid var(--mt-line);
  overflow: hidden;
}
.mt-captcha-track-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.8125rem;
  color: var(--mt-muted);
  pointer-events: none;
}
.mt-captcha-knob {
  position: absolute;
  left: 0;
  top: 0;
  width: 42px;
  height: 38px;
  margin: 1px;
  border-radius: 0.4rem;
  background: #fff;
  border: 1px solid var(--mt-line);
  cursor: grab;
  touch-action: none;
}
.mt-captcha-knob::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin: 14px auto;
  border-right: 2px solid var(--mt-accent);
  border-bottom: 2px solid var(--mt-accent);
  transform: rotate(-45deg);
}
.mt-captcha-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 280px;
  font-size: 0.8125rem;
}
.mt-captcha-status.is-ok { color: #1f7a3f; }
.mt-captcha-status.is-err { color: #b42318; }
.mt-captcha-refresh {
  border: none;
  background: transparent;
  color: var(--mt-accent);
  padding: 0;
  cursor: pointer;
  font-size: 0.8125rem;
}
.mt-captcha-modal .modal-dialog { max-width: 360px; }
.mt-captcha-modal .modal-body {
  display: flex;
  justify-content: center;
  padding-top: 0.75rem;
  padding-bottom: 0.5rem;
}

.mt-switch-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.85rem;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--mt-line);
  border-radius: var(--mt-radius);
  background: var(--mt-surface);
}
.mt-switch-row.is-clickable { cursor: pointer; user-select: none; }
.mt-switch-row__body { min-width: 0; overflow: hidden; pointer-events: none; }
.mt-switch-control.form-switch {
  width: 2.5em;
  min-height: 1.5em;
  margin: 0;
  padding-left: 2.5em;
  pointer-events: none;
}
.mt-switch-control .form-check-input { pointer-events: none; }

/* landing */
html:has(body.mt-land),
body.mt-land {
  overflow: auto;
  max-height: none;
  height: auto;
}
body.mt-land {
  background: var(--mt-bg);
  color: var(--mt-ink);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.mt-land-wrap {
  width: min(640px, calc(100% - 2rem));
  margin: 0 auto;
}
.mt-land-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(0.75rem + var(--mt-safe-t)) 1rem 0.75rem;
  background: rgba(245, 245, 245, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.mt-land-nav.is-scrolled {
  border-bottom-color: var(--mt-line);
  background: rgba(255, 255, 255, 0.94);
}
.mt-land-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--mt-ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.mt-land-nav-brand img {
  border-radius: 9px;
  box-shadow: 0 1px 2px rgba(240, 107, 0, 0.22);
}
.mt-land-nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.mt-land-link {
  color: #5c5c5c;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.25rem 0.4rem;
}
.mt-land-hero {
  position: relative;
  padding: 2.5rem 1rem 3rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 90% 0%, rgba(255, 106, 0, 0.16), transparent 55%),
    var(--mt-bg);
}
.mt-land-hero-glow {
  position: absolute;
  inset: auto -20% 10% 30%;
  height: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 106, 0, 0.08), transparent 70%);
  pointer-events: none;
}
.mt-land-hero-inner { position: relative; z-index: 1; }
.mt-land-brand {
  margin: 0 0 0.85rem;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.05;
}
.mt-land-hero h1 {
  margin: 0 0 0.85rem;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.4;
}
.mt-land-lead {
  margin: 0 0 1.5rem;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--mt-muted);
}
.mt-land-promo {
  margin: -0.75rem 0 1.25rem;
  font-weight: 600;
  color: var(--mt-ink);
}
.mt-land-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
@keyframes mt-land-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.mt-land-fade { animation: mt-land-fade-up 0.65s ease both; }
.mt-land-fade-delay-1 { animation-delay: 0.08s; }
.mt-land-fade-delay-2 { animation-delay: 0.16s; }
.mt-land-fade-delay-3 { animation-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .mt-land-fade { animation: none; }
}
.mt-land-section { padding: 2.75rem 0; }
.mt-land-section-alt {
  background: var(--mt-surface);
  border-top: 1px solid var(--mt-line);
  border-bottom: 1px solid var(--mt-line);
}
.mt-land-section-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
}
.mt-land-section-lead {
  margin: 0 0 1.5rem;
  color: var(--mt-muted);
  line-height: 1.6;
}
.mt-land-product-label {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mt-accent);
}
.mt-land-product h3 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  font-weight: 650;
}
.mt-land-product p {
  margin: 0;
  color: #5c5c5c;
  line-height: 1.65;
  font-size: 0.95rem;
}
.mt-land-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1.25rem;
}
.mt-land-step-num {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--mt-accent);
}
.mt-land-steps h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.mt-land-steps p {
  margin: 0;
  color: var(--mt-muted);
  line-height: 1.6;
  font-size: 0.92rem;
}
.mt-land-cta-band {
  padding: 2.75rem 0;
  background:
    radial-gradient(ellipse 70% 80% at 50% 100%, rgba(255, 106, 0, 0.1), transparent 60%),
    var(--mt-bg);
  border-top: 1px solid var(--mt-line);
}
.mt-land-cta-band-inner { text-align: center; }
.mt-land-cta-band h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
}
.mt-land-cta-band p {
  margin: 0 auto 1.35rem;
  color: var(--mt-muted);
  max-width: 22em;
  line-height: 1.6;
}
.mt-land-cta-band .mt-land-cta { justify-content: center; }
.mt-land-footer {
  padding: 1.5rem 0 calc(1.75rem + var(--mt-safe-b));
  border-top: 1px solid var(--mt-line);
  background: var(--mt-surface);
}
.mt-land-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.mt-land-footer-copy {
  margin: 0;
  width: 100%;
  color: var(--mt-muted);
  font-size: 0.78rem;
}
.mt-land-footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.mt-land-footer-links a {
  color: var(--mt-muted);
  text-decoration: none;
  font-size: 0.88rem;
}

/* —— SEO articles (generated from content/articles) —— */
.mt-article-page {
  padding: 4.75rem 0 calc(2.5rem + var(--mt-safe-b, 0px));
  min-height: 0;
  flex: 1 0 auto;
}
.mt-article-wrap {
  /* WAP 屏本就窄，正文接近全宽 */
  width: calc(100% - 1.5rem);
  max-width: none;
}
.mt-article-crumb {
  margin: 0 0 1rem;
  font-size: 0.84rem;
  color: var(--mt-muted);
}
.mt-article-crumb a {
  color: var(--mt-muted);
  text-decoration: none;
}
.mt-article-header {
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--mt-line);
}
.mt-article-header h1 {
  margin: 0 0 0.45rem;
  font-size: 1.45rem;
  font-weight: 750;
  line-height: 1.3;
}
.mt-article-date {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--mt-muted);
  font-size: 0.82rem;
}
.mt-article-lead {
  margin: 0;
  color: var(--mt-muted);
  line-height: 1.6;
  font-size: 0.98rem;
}
.mt-article-body {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--mt-ink);
}
.mt-article-body h2 {
  margin: 1.75rem 0 0.65rem;
  font-size: 1.18rem;
  font-weight: 700;
}
.mt-article-body h3 {
  margin: 1.35rem 0 0.5rem;
  font-size: 1.04rem;
  font-weight: 650;
}
.mt-article-body p,
.mt-article-body ul,
.mt-article-body ol {
  margin: 0 0 0.9rem;
}
.mt-article-body a {
  color: var(--mt-accent, #ff6a00);
  word-break: break-all;
}
.mt-article-body code {
  font-size: 0.88em;
  padding: 0.1em 0.3em;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
}
.mt-article-body pre {
  margin: 0 0 1rem;
  padding: 0.8rem 0.85rem;
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--mt-line);
  background: var(--mt-surface, #f7f7f8);
  font-size: 0.82rem;
  line-height: 1.5;
}
.mt-article-body pre code {
  padding: 0;
  background: none;
}
.mt-article-cta {
  margin-top: 2rem;
  padding: 1.25rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--mt-line);
  background: var(--mt-surface, #f7f7f8);
}
.mt-article-cta h2 {
  margin: 0 0 0.4rem;
  font-size: 1.08rem;
  font-weight: 700;
}
.mt-article-cta p {
  margin: 0 0 0.9rem;
  color: var(--mt-muted);
  line-height: 1.55;
  font-size: 0.94rem;
}
.mt-article-list-header {
  margin-bottom: 1.35rem;
}
.mt-article-list-header h1 {
  margin: 0 0 0.4rem;
  font-size: 1.55rem;
  font-weight: 750;
}
.mt-article-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.mt-article-list-card {
  display: block;
  padding: 1rem 1.05rem;
  border-radius: 12px;
  border: 1px solid var(--mt-line);
  background: var(--mt-surface, #fff);
  text-decoration: none;
  color: inherit;
}
.mt-article-list-card h2 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
  font-weight: 650;
}
.mt-article-list-card time {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--mt-muted);
  font-size: 0.78rem;
}
.mt-article-list-card p {
  margin: 0;
  color: var(--mt-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.mt-login-locale { display: flex; justify-content: flex-end; margin: 0 0 12px; width: 100%; }

/* GitHub 链接（页脚） */
.mt-land-footer-links .mt-gh-link{display:inline-flex;align-items:center;opacity:.75;transition:opacity .15s ease}
.mt-land-footer-links .mt-gh-link:hover{opacity:1}
.mt-land-footer-links .mt-gh-link svg{display:block}
