/* 用户控制台：浅色侧栏 + 橙强调，参考开放平台控制台气质 */
:root {
  --mt-bg: #f5f5f5;
  --mt-surface: #ffffff;
  --mt-ink: #1f1f1f;
  --mt-muted: #8a8a8a;
  --mt-line: #ebebeb;
  --mt-accent: #ff6a00;
  --mt-accent-hover: #e55f00;
  --mt-sidebar: #ffffff;
  --mt-sidebar-text: #5c5c5c;
  --mt-sidebar-active: #1f1f1f;
  --mt-sidebar-border: #ebebeb;
  --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;
}
html:has(.mt-shell),
body:has(.mt-shell) {
  overflow: hidden;
  max-height: 100%;
  max-height: 100dvh;
}

.mt-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: 100%;
  max-height: 100%;
  max-height: 100dvh;
  overflow: hidden;
}

.mt-sidebar {
  background: var(--mt-sidebar);
  color: var(--mt-sidebar-text);
  border-right: 1px solid var(--mt-sidebar-border);
  padding: 1.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  min-height: 0;
  overflow-y: auto;
}

.mt-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--mt-sidebar-active);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0 0.35rem;
  line-height: 1.15;
}
.mt-brand:hover {
  color: var(--mt-sidebar-active);
}
.mt-brand-mark {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: 0 1px 2px rgba(240, 107, 0, 0.22);
}
.mt-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.mt-brand-copy > span {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mt-muted);
}
.mt-brand-copy > .mt-brand-name {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: none;
  color: inherit;
}

.mt-nav { display: flex; flex-direction: column; gap: 0.2rem; }
.mt-nav a {
  color: inherit;
  text-decoration: none;
  padding: 0.65rem 0.75rem;
  border-radius: 0.45rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.mt-nav a:hover {
  background: #f7f7f7;
  color: var(--mt-sidebar-active);
}
.mt-nav a.active {
  background: rgba(255, 106, 0, 0.08);
  color: var(--mt-accent);
  font-weight: 600;
}

.mt-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.mt-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.75rem;
  border-bottom: 1px solid var(--mt-line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}
.mt-topbar h1 { margin: 0; font-size: 1.1rem; font-weight: 600; }
.mt-topbar-actions { display: flex; gap: 0.5rem; align-items: center; }
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-user-menu { position: relative; }
.mt-user-menu::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 0.5rem;
}
.mt-user-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 1px solid var(--mt-line);
  border-radius: 999px;
  background: #fff;
  color: var(--mt-muted);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.mt-user-menu:hover .mt-user-menu-btn,
.mt-user-menu:focus-within .mt-user-menu-btn,
.mt-user-menu-btn:hover,
.mt-user-menu-btn:focus {
  background: #fff7f0;
  border-color: #ffd0a0;
  color: var(--mt-accent);
}
.mt-user-menu-icon { display: block; }
.mt-user-menu-dropdown {
  min-width: 10.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-user-menu:hover > .dropdown-menu,
.mt-user-menu:focus-within > .dropdown-menu {
  display: block;
}
.mt-user-menu-dropdown .dropdown-item {
  border-radius: 0.4rem;
  font-size: 0.9rem;
  padding: 0.45rem 0.75rem;
}
.mt-user-menu-dropdown .dropdown-divider {
  margin: 0.25rem 0;
}
.mt-user-menu-email {
  display: block;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  color: var(--mt-muted);
  word-break: break-all;
  white-space: normal;
  line-height: 1.3;
  user-select: text;
}
.mt-balance-pill {
  font-size: 0.85rem;
  color: var(--mt-muted);
  padding: 0.35rem 0.75rem;
  background: #fff7f0;
  border: 1px solid #ffe0c2;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
a.mt-balance-pill:hover {
  background: #ffefdf;
  border-color: #ffd0a0;
  color: var(--mt-muted);
}
.mt-balance-pill strong { color: var(--mt-accent); font-weight: 600; }
.mt-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.75rem;
}

.mt-card {
  background: var(--mt-surface);
  border: 1px solid var(--mt-line);
  border-radius: 0.75rem;
  padding: 1.35rem 1.5rem;
}

/* 充值页：方式 Tab */
.mt-recharge-tabs {
  margin: -1.35rem -1.5rem 1.25rem;
  padding: 0 1rem;
  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: 0.9rem 0.25rem;
  margin-right: 1.5rem;
  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 0.75rem;
  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: 1.5rem 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--mt-muted);
}

.mt-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.mt-stat {
  padding: 1.15rem 1.25rem;
  background: var(--mt-surface);
  border: 1px solid var(--mt-line);
  border-radius: 0.75rem;
}
.mt-stat .label { color: var(--mt-muted); font-size: 0.8rem; margin-bottom: 0.45rem; }
.mt-stat .value { font-size: 1.45rem; font-weight: 600; letter-spacing: -0.02em; }

.mt-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.mt-toolbar-compact {
  justify-content: flex-start;
}
.mt-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.mt-muted { color: var(--mt-muted); }
.mt-empty { padding: 3rem 1rem; text-align: center; color: var(--mt-muted); }

/* Keep .mt-pager* in sync with admin/css/app.css */
.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(5, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.mt-package {
  border: 1px solid var(--mt-line);
  border-radius: 0.75rem;
  padding: 1.25rem 1rem;
  background: var(--mt-surface);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mt-package:hover { border-color: #ffc899; }
.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.5rem;
  font-weight: 700;
  color: var(--mt-ink);
}
.mt-package .hint {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--mt-muted);
}

.mt-docs pre,
.mt-docs code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}
.mt-docs pre {
  background: #1a1a1a;
  color: #f2f2f2;
  border-radius: 0.6rem;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  margin: 0;
}
.mt-docs h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.65rem;
}
.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 h2 code {
  font-size: 0.85em;
  font-weight: 500;
  color: var(--mt-muted);
}
.mt-docs-url-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.45rem 0;
  flex-wrap: wrap;
}
.mt-docs-url-label {
  flex: 0 0 5.5rem;
  font-size: 0.85rem;
  color: var(--mt-muted);
}
.mt-docs-url-row > code {
  font-size: 0.9rem;
  color: var(--mt-ink);
  word-break: break-all;
}
.mt-docs-icon-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  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:hover {
  color: var(--mt-ink);
  background: rgba(0, 0, 0, 0.05);
}
.mt-docs-icon-copy.is-copied {
  color: var(--mt-accent);
}
.mt-docs-pre-wrap {
  position: relative;
}
/* 连续代码块之间留出间距，避免两块粘在一起 */
.mt-docs-pre-wrap + .mt-docs-pre-wrap {
  margin-top: 0.65rem;
}
.mt-docs-step {
  margin: 1.1rem 0 0.5rem;
  font-size: 0.92rem;
  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;
}
.mt-docs-icon-copy-pre:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.mt-docs-icon-copy-pre.is-copied {
  color: var(--mt-accent);
}

/* 模型列表行：模型名 + 复制 + 问号说明气泡 */
.mt-docs-model-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0.35rem 0;
}
.mt-docs-model-row > code {
  font-size: 0.9rem;
  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, 70vw);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: #fff;
  color: var(--mt-ink);
  font-size: 0.82rem;
  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;
}
/* 教程文章代码块为浅底：复制图标用深色 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: 1.25rem;
  left: 50%;
  z-index: 1080;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  background: #fff;
  color: var(--mt-ink);
  font-size: 0.9rem;
  line-height: 1.3;
  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);
}
.mt-toast-icon {
  display: inline-flex;
  color: #52c41a;
}

.modal-content {
  border: 1px solid var(--mt-line);
  border-radius: 0.9rem;
  box-shadow: 0 18px 48px rgba(18, 21, 26, 0.12);
}
.modal-header,
.modal-footer {
  border-color: var(--mt-line);
  padding: 1rem 1.35rem;
}
.modal-body { padding: 1.35rem; }
.modal-title { font-weight: 600; }

.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;
}

.mt-login {
  min-height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top right, rgba(255, 106, 0, 0.1), transparent 42%),
    var(--mt-bg);
}
.mt-login-card {
  width: min(420px, 92vw);
  background: var(--mt-surface);
  border: 1px solid var(--mt-line);
  border-radius: 1rem;
  padding: 2.5rem 2rem;
}
.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.65rem;
  letter-spacing: 0.04em;
  margin: 0;
}
.mt-login-card .mt-link {
  color: var(--mt-accent);
  text-decoration: none;
}
.mt-login-card .mt-link:hover { text-decoration: underline; }
.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:hover {
  color: var(--mt-ink);
  background: #f3f3f3;
}
.mt-password-toggle:focus-visible {
  outline: 2px solid rgba(255, 106, 0, 0.35);
  outline-offset: 1px;
}
.mt-password-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.table > :not(caption) > * > * {
  background: transparent;
  vertical-align: middle;
}
.badge-soft {
  background: #f3f3f3;
  color: #5c5c5c;
  font-weight: 500;
}
.badge-ok {
  background: #eaf7ef;
  color: #1f7a3f;
}
.badge-err {
  background: #fdeeee;
  color: #b42318;
}

.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);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  cursor: grab;
  touch-action: none;
}
.mt-captcha-knob:active { cursor: grabbing; }
.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-captcha-modal .mt-captcha,
.mt-captcha-modal .mt-captcha-panel,
.mt-captcha-modal .mt-captcha-track,
.mt-captcha-modal .mt-captcha-meta {
  max-width: 280px;
  width: 280px;
}

/* 开关行：整卡可点；左侧用原生 Bootstrap switch（仅展示，点击交给整卡） */
.mt-switch-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.85rem;
  align-items: center;
}
.mt-switch-row.is-clickable {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.mt-switch-row.is-clickable:hover {
  border-color: #d0d0d0;
}
.mt-switch-row.is-clickable:active {
  background: #fafafa;
}
.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;
  cursor: pointer;
}

@media (max-width: 960px) {
  .mt-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .mt-sidebar { padding: 1rem; }
  .mt-nav { flex-direction: row; flex-wrap: wrap; }
  .mt-stats,
  .mt-packages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .mt-stats,
  .mt-packages { grid-template-columns: 1fr; }
}

/* —— 公开落地页（可滚动，不使用 mt-shell） —— */
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(1080px, calc(100% - 2.5rem));
  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: 0.9rem clamp(1.1rem, 3vw, 2rem);
  background: rgba(245, 245, 245, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.mt-land-nav.is-scrolled {
  border-bottom-color: var(--mt-line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
  background: rgba(255, 255, 255, 0.92);
}
.mt-land-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--mt-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}
.mt-land-nav-brand img {
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(240, 107, 0, 0.22);
}
.mt-land-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.mt-land-link {
  color: var(--mt-sidebar-text);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.35rem 0.5rem;
}
.mt-land-link:hover { color: var(--mt-ink); }

.mt-land-hero {
  position: relative;
  min-height: calc(100dvh - 64px);
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.1rem, 3vw, 2rem) clamp(4rem, 10vw, 7rem);
  background:
    radial-gradient(ellipse 70% 55% at 85% 10%, rgba(255, 106, 0, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(255, 193, 74, 0.12), transparent 50%),
    var(--mt-bg);
}
.mt-land-hero-glow {
  position: absolute;
  inset: auto -10% 20% 40%;
  height: 55%;
  background: radial-gradient(ellipse at center, rgba(255, 106, 0, 0.09), transparent 70%);
  pointer-events: none;
}
.mt-land-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(31, 31, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 31, 31, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 85%);
  pointer-events: none;
}
.mt-land-hero-inner {
  position: relative;
  width: min(720px, 100%);
  z-index: 1;
}
.mt-land-brand {
  margin: 0 0 1.1rem;
  font-size: clamp(2.75rem, 7vw, 4.25rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.05;
  color: var(--mt-ink);
}
.mt-land-hero h1 {
  margin: 0 0 1.15rem;
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
  color: var(--mt-ink);
  max-width: 18em;
}
.mt-land-lead {
  margin: 0 0 2rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--mt-muted);
  max-width: 36em;
}
.mt-land-promo {
  margin: -1.1rem 0 1.75rem;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--mt-ink);
  max-width: 36em;
}
.mt-land-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.mt-land-cta .btn-lg {
  padding: 0.7rem 1.35rem;
  border-radius: 0.55rem;
  font-weight: 600;
}

@keyframes mt-land-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.mt-land-fade {
  animation: mt-land-fade-up 0.7s 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: clamp(3.5rem, 8vw, 5.5rem) 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.65rem;
  font-size: clamp(1.45rem, 2.8vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.mt-land-section-lead {
  margin: 0 0 2.25rem;
  color: var(--mt-muted);
  font-size: 1.02rem;
  line-height: 1.65;
  max-width: 36em;
}

.mt-land-products {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2.75rem);
}
.mt-land-product {
  padding: 0;
}
.mt-land-product-label {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mt-accent);
}
.mt-land-product h3 {
  margin: 0 0 0.85rem;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.mt-land-product p {
  margin: 0 0 1.1rem;
  color: var(--mt-sidebar-text);
  line-height: 1.7;
  font-size: 0.98rem;
}
.mt-land-product ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.mt-land-product li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.1rem;
  color: var(--mt-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.mt-land-product li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--mt-accent);
  opacity: 0.55;
}

.mt-land-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}
.mt-land-step-num {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--mt-accent);
}
.mt-land-steps h3 {
  margin: 0 0 0.55rem;
  font-size: 1.1rem;
  font-weight: 650;
}
.mt-land-steps p {
  margin: 0;
  color: var(--mt-muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

.mt-land-tools {
  margin: 0;
  padding: 1.35rem 1.5rem;
  background: var(--mt-surface);
  border: 1px solid var(--mt-line);
  border-radius: 0.85rem;
  color: var(--mt-sidebar-text);
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  line-height: 1.8;
}

.mt-land-cta-band {
  padding: clamp(3.5rem, 8vw, 5rem) 0;
  background:
    radial-gradient(ellipse 60% 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.65rem;
  font-size: clamp(1.45rem, 2.8vw, 1.85rem);
  font-weight: 700;
}
.mt-land-cta-band p {
  margin: 0 auto 1.75rem;
  color: var(--mt-muted);
  max-width: 28em;
  line-height: 1.65;
}
.mt-land-cta-band .mt-land-cta {
  justify-content: center;
}

.mt-land-footer {
  padding: 1.75rem 0 2.25rem;
  border-top: 1px solid var(--mt-line);
  background: var(--mt-surface);
}
.mt-land-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}
.mt-land-footer-links {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}
.mt-land-footer-links a {
  color: var(--mt-muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.mt-land-footer-links a:hover { color: var(--mt-ink); }
.mt-land-footer-copy {
  margin: 0;
  width: 100%;
  color: var(--mt-muted);
  font-size: 0.8rem;
}

@media (max-width: 800px) {
  .mt-land-products,
  .mt-land-steps {
    grid-template-columns: 1fr;
  }
  .mt-land-hero {
    min-height: auto;
    padding-top: 3.5rem;
  }
  .mt-land-footer-links {
    margin-left: 0;
  }
}
@media (max-width: 480px) {
  .mt-land-nav-actions .mt-land-link { display: none; }
}

/* —— SEO articles (generated from content/articles) —— */
.mt-article-page {
  padding: 5.5rem 0 3rem;
  min-height: 0;
  flex: 1 0 auto;
}
.mt-article-wrap {
  width: 60%;
  max-width: none;
}
.mt-article-crumb {
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  color: var(--mt-muted);
}
.mt-article-crumb a {
  color: var(--mt-muted);
  text-decoration: none;
}
.mt-article-crumb a:hover { color: var(--mt-ink); }
.mt-article-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--mt-line);
}
.mt-article-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.mt-article-date {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--mt-muted);
  font-size: 0.88rem;
}
.mt-article-lead {
  margin: 0;
  color: var(--mt-muted);
  line-height: 1.65;
  font-size: 1.02rem;
}
.mt-article-body {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--mt-ink);
}
.mt-article-body h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.28rem;
  font-weight: 700;
}
.mt-article-body h3 {
  margin: 1.5rem 0 0.55rem;
  font-size: 1.08rem;
  font-weight: 650;
}
.mt-article-body p,
.mt-article-body ul,
.mt-article-body ol {
  margin: 0 0 1rem;
}
.mt-article-body li { margin-bottom: 0.35rem; }
.mt-article-body a {
  color: var(--mt-accent, #ff6a00);
  word-break: break-all;
}
.mt-article-body code {
  font-size: 0.9em;
  padding: 0.12em 0.35em;
  border-radius: 4px;
  background: var(--mt-surface-2, rgba(0, 0, 0, 0.05));
}
.mt-article-body pre {
  margin: 0 0 1.15rem;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--mt-line);
  background: var(--mt-surface, #f7f7f8);
  font-size: 0.88rem;
  line-height: 1.55;
}
.mt-article-body pre code {
  padding: 0;
  background: none;
}
.mt-article-cta {
  margin-top: 2.5rem;
  padding: 1.5rem 1.35rem;
  border-radius: 14px;
  border: 1px solid var(--mt-line);
  background: var(--mt-surface, #f7f7f8);
}
.mt-article-cta h2 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  font-weight: 700;
}
.mt-article-cta p {
  margin: 0 0 1rem;
  color: var(--mt-muted);
  line-height: 1.6;
}
.mt-article-list-header {
  margin-bottom: 1.75rem;
}
.mt-article-list-header h1 {
  margin: 0 0 0.45rem;
  font-size: 1.85rem;
  font-weight: 750;
}
.mt-article-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.mt-article-list-card {
  display: block;
  padding: 1.15rem 1.2rem;
  border-radius: 12px;
  border: 1px solid var(--mt-line);
  background: var(--mt-surface, #fff);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mt-article-list-card:hover {
  border-color: rgba(255, 106, 0, 0.45);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  color: inherit;
}
.mt-article-list-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.12rem;
  font-weight: 650;
}
.mt-article-list-card time {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--mt-muted);
  font-size: 0.82rem;
}
.mt-article-list-card p {
  margin: 0;
  color: var(--mt-muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.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}
