.mo-dl-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.mo-dl-modal.is-open {
  display: flex;
}
.mo-dl-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}
.mo-dl-modal-panel {
  position: relative;
  width: min(360px, 100%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}
.mo-dl-modal-panel.mo-dl-login-panel {
  padding: 28px 28px 22px;
}
.mo-dl-modal-close {
  border: 0;
  background: transparent;
  color: #9ca3af;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.mo-dl-modal-close:hover { color: #374151; }
.mo-dl-modal-close--corner {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}
.mo-dl-modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}
.mo-dl-modal-body {
  padding: 20px 18px 18px;
}
.mo-dl-login-body {
  padding: 0;
}
.mo-dl-login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}
.mo-dl-login-logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
}
.mo-dl-login-logo strong {
  display: block;
  font-size: 18px;
  color: #111827;
  line-height: 1.2;
}
.mo-dl-login-logo span {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  font-weight: 400;
}
.mo-dl-login-qr-wrap {
  text-align: center;
  margin-bottom: 10px;
}
/* 与登录页一致：容器 190×190，码 180×180，官方 WxLogin 嵌入 */
.mo-dl-login-qr-box {
  position: relative;
  width: 190px;
  height: 190px;
  margin: 0 auto;
  padding: 5px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
  overflow: hidden;
}
.mo-dl-login-qr {
  display: block;
  width: 180px;
  height: 180px;
  margin: 0 auto;
  padding: 0;
  border: none;
  object-fit: contain;
  background: #fff;
}
.mo-dl-login-wx-embed {
  display: block !important;
  width: 180px;
  height: 180px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  position: relative;
  background: #fff;
  line-height: 0;
  box-sizing: border-box;
}
.mo-dl-login-wx-embed iframe {
  border: 0 !important;
  width: 300px !important;
  height: 400px !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  margin: 0 !important;
  transform: none !important;
  max-width: none !important;
}
.mo-dl-login-qr-placeholder {
  width: 180px;
  height: 180px;
  margin: 0 auto;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 13px;
}
.mo-dl-login-scan-hint {
  margin: 0 0 16px;
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.5;
  text-align: center;
}
.mo-dl-login-wx-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: #07c160;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.2s;
}
.mo-dl-login-wx-btn:hover { filter: brightness(1.05); }
.mo-dl-login-wx-btn .wx-icon {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.mo-dl-login-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #9ca3af;
  font-size: 13px;
}
.mo-dl-login-or::before,
.mo-dl-login-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}
.mo-dl-login-account-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.mo-dl-login-account-btn:hover {
  border-color: #91d5ff;
  background: #f0fbff;
  color: #1890ff;
}
.mo-dl-login-agree {
  margin: 16px 0 0;
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
  line-height: 1.6;
}
.mo-dl-login-agree a {
  color: #1890ff;
  text-decoration: none;
}
.mo-dl-login-agree a:hover { text-decoration: underline; }

.mo-dl-modal-panel.mo-dl-confirm-panel {
  width: min(480px, 100%);
  border-radius: 8px;
  overflow: hidden;
}
.mo-dl-confirm-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  height: 48px;
  background: #3d3d3d;
  color: #fff;
}
.mo-dl-confirm-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.mo-dl-confirm-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #fff;
}
.mo-dl-confirm-user-line {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mo-dl-modal-close--light {
  color: rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
}
.mo-dl-modal-close--light:hover {
  color: #fff;
}
.mo-dl-confirm-body {
  padding: 16px 20px 24px;
  background: #fff;
}
.mo-dl-confirm-file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  min-height: 24px;
}
.mo-dl-confirm-file-icon {
  flex-shrink: 0;
  color: #ef4444;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
}
.mo-dl-confirm-file-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: #374151;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mo-dl-confirm-file-origin {
  flex-shrink: 0;
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
}
.mo-dl-confirm-price-card {
  position: relative;
  margin: 0 auto 20px;
  padding: 28px 16px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  text-align: center;
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mo-dl-confirm-price-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 12px;
  border-radius: 0 0 6px 6px;
  background: #e6f4ff;
  color: #1890ff;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
}
.mo-dl-confirm-price-big {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: #1890ff;
}
.mo-dl-confirm-price-big.is-paid {
  color: #1890ff;
}
.mo-dl-confirm-price-big.is-free {
  color: #1890ff;
}
.mo-dl-confirm-price-big.is-vip-free {
  color: #d97706;
}
.mo-dl-confirm-price-badge:empty { display: none; }
.mo-dl-confirm-shell-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 12px;
  line-height: 1.55;
  color: #92400e;
}
.mo-dl-confirm-recharge-link {
  color: #c2410c;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mo-dl-confirm-recharge-link:hover {
  color: #9a3412;
}
.mo-dl-confirm-submit-wrap {
  display: flex;
  justify-content: center;
}
.mo-dl-confirm-submit-only {
  min-width: 168px;
  height: 40px;
  padding: 0 36px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb347 0%, #ffd56a 100%);
  color: #333;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 153, 0, 0.25);
  transition: filter 0.2s;
}
.mo-dl-confirm-submit-only:hover {
  filter: brightness(1.03);
}
.mo-dl-confirm-submit-only:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

button.mo-jiaocai-download-btn,
button.mo-slides-pay-btn,
button.mo-resource-dl-btn,
button.mo-d-tool-btn[data-mo-file-download] {
  font: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  margin: 0;
}
button.mo-jiaocai-download-btn:focus,
button.mo-slides-pay-btn:focus,
button.mo-resource-dl-btn:focus,
button.mo-d-tool-btn[data-mo-file-download]:focus {
  outline: none;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.24);
}
