/* Moyu download page */
.dl-hero {
  position: relative;
  overflow: hidden;
  background: var(--moyu-cream);
}

.dl-hero-bg {
  width: 100%;
  height: auto;
  aspect-ratio: 2172 / 724;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.dl-hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(248, 245, 239, 0.88) 0%,
    rgba(248, 245, 239, 0.55) 36%,
    rgba(248, 245, 239, 0.12) 58%,
    rgba(248, 245, 239, 0) 72%
  );
}

.dl-hero-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.dl-hero-inner .moyu-container { pointer-events: none; }

.dl-hero-copy {
  max-width: 520px;
  pointer-events: auto;
  padding: 28px 0;
}

.dl-hero-title {
  margin: 0 0 14px;
  font-family: var(--moyu-serif);
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.03em;
  color: var(--moyu-ink);
}

.dl-hero-desc {
  margin: 0 0 22px;
  color: var(--moyu-ink-soft);
  font-size: 14px;
  line-height: 1.85;
}

.dl-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dl-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(31, 30, 28, 0.14);
  background: rgba(255, 255, 255, 0.82);
  color: var(--moyu-ink-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.dl-filter-btn.is-active {
  background: var(--moyu-green);
  border-color: var(--moyu-green);
  color: #fff;
}

.dl-filter-btn:hover:not(.is-active) {
  border-color: var(--moyu-green);
  color: var(--moyu-green);
}

.dl-section {
  padding: 48px 0 24px;
}

.dl-platform-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.dl-platform-card {
  background: #fff;
  border: 1px solid rgba(31, 30, 28, 0.06);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(31, 30, 28, 0.06);
  padding: 22px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}

.dl-platform-card.is-hidden { display: none; }

.dl-platform-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dl-platform-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex: none;
}

.dl-platform-card--win .dl-platform-icon { background: rgba(37, 99, 235, 0.1); color: #1d4ed8; }
.dl-platform-card--mac .dl-platform-icon { background: rgba(15, 23, 42, 0.08); color: #111827; }
.dl-platform-card--ios .dl-platform-icon { background: rgba(15, 23, 42, 0.08); color: #111827; }
.dl-platform-card--android .dl-platform-icon { background: rgba(4, 120, 87, 0.1); color: #047857; }

.dl-platform-card h3 {
  margin: 0;
  font-size: 18px;
  font-family: var(--moyu-serif);
  font-weight: 700;
}

.dl-platform-card p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--moyu-muted);
  line-height: 1.5;
}

.dl-platform-actions { margin-top: auto; }

.download-picker { position: relative; width: 100%; }
.download-picker summary { list-style: none; cursor: pointer; }
.download-picker summary::-webkit-details-marker { display: none; }

.download-trigger,
.mobile-qr-btn,
.btn-disabled {
  width: 100%;
  min-height: 44px;
  border-radius: 999px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.download-trigger,
.mobile-qr-btn {
  background: var(--moyu-green);
  color: #fff;
  box-shadow: 0 10px 22px rgba(26, 64, 52, 0.2);
}

.download-trigger:hover,
.mobile-qr-btn:hover { background: var(--moyu-green-hover); color: #fff; }

.btn-disabled {
  background: #c5c9c2;
  color: #fff;
  cursor: not-allowed;
}

.download-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  padding: 6px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(31, 30, 28, 0.1);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
  display: grid;
  gap: 2px;
}

.download-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--moyu-ink);
  font-size: 13px;
  font-weight: 600;
}

.download-option:hover { background: rgba(26, 64, 52, 0.08); color: var(--moyu-green); }
.download-option small { color: var(--moyu-muted); font-weight: 500; }

.dl-platform-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--moyu-muted);
}

.dl-info-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
  padding: 8px 0 36px;
}

.dl-latest-card,
.dl-about-card {
  border-radius: 20px;
  overflow: hidden;
  min-height: 320px;
}

.dl-latest-card {
  background: #fff;
  border: 1px solid rgba(31, 30, 28, 0.06);
  box-shadow: 0 12px 28px rgba(31, 30, 28, 0.06);
  padding: 28px;
}

.dl-latest-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dl-latest-head h2 {
  margin: 0;
  font-family: var(--moyu-serif);
  font-size: 22px;
}

.dl-stable {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.dl-latest-version {
  margin: 0 0 8px;
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--moyu-ink);
  line-height: 1.1;
}

.dl-latest-date {
  margin: 0 0 14px;
  color: var(--moyu-muted);
  font-size: 13px;
}

.dl-latest-log {
  color: var(--moyu-ink-soft);
  font-size: 13px;
  line-height: 1.75;
  max-height: 120px;
  overflow: auto;
  margin-bottom: 18px;
}

.dl-latest-log.md-rendered p { margin: 0 0 8px; }
.dl-latest-log.md-rendered ul { margin: 0 0 8px; padding-left: 18px; }

.dl-latest-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.dl-latest-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #f3eee5;
  color: var(--moyu-green);
  font-size: 12px;
  font-weight: 700;
}

.dl-text-link {
  color: var(--moyu-green);
  font-size: 14px;
  font-weight: 600;
}
.dl-text-link:hover { color: var(--moyu-green-hover); }

.dl-about-card {
  position: relative;
  color: #fff;
  background: var(--moyu-green);
}

.dl-about-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right top;
}

.dl-about-inner {
  position: relative;
  z-index: 1;
  padding: 28px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(90deg, rgba(14, 40, 32, 0.55) 0%, rgba(14, 40, 32, 0.22) 70%, rgba(14, 40, 32, 0.08) 100%);
}

.dl-about-inner h2 {
  margin: 0 0 12px;
  font-family: var(--moyu-serif);
  font-size: 24px;
  font-weight: 700;
}

.dl-about-inner > p {
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
}

.dl-about-grid {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dl-about-item {
  border-radius: 12px;
  padding: 12px 12px 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.dl-about-item span {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
}

.dl-about-item strong {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.dl-req {
  background: transparent;
  border-top: 1px solid rgba(31, 30, 28, 0.04);
  border-bottom: 1px solid rgba(31, 30, 28, 0.04);
  padding: 48px 0;
}

.dl-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.dl-section-head h2 {
  margin: 0 0 6px;
  font-family: var(--moyu-serif);
  font-size: 26px;
}

.dl-section-head p {
  margin: 0;
  color: var(--moyu-muted);
  font-size: 13px;
}

.dl-req-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.dl-req-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  border: 1px solid rgba(31, 30, 28, 0.06);
  min-height: 220px;
}

.dl-req-card--win { background: linear-gradient(180deg, #fff 0%, #eef4ff 100%); }
.dl-req-card--mac { background: linear-gradient(180deg, #fff 0%, #f3f4f6 100%); }
.dl-req-card--ios { background: linear-gradient(180deg, #fff 0%, #f5f0ff 100%); }
.dl-req-card--android { background: linear-gradient(180deg, #fff 0%, #eefbf3 100%); }

.dl-req-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-family: var(--moyu-serif);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dl-req-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
  z-index: 1;
}

.dl-req-card li {
  font-size: 12px;
  color: var(--moyu-ink-soft);
  line-height: 1.65;
  margin-bottom: 8px;
}

.dl-req-card li strong { color: var(--moyu-ink); }

.dl-req-watermark {
  position: absolute;
  right: -8px;
  bottom: -12px;
  font-size: 88px;
  opacity: 0.08;
  pointer-events: none;
}

.dl-faq {
  padding: 48px 0;
}

.dl-faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 28px;
}

.dl-faq-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 0;
}

.dl-faq-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid rgba(26, 64, 52, 0.28);
  color: var(--moyu-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.dl-faq-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
}

.dl-faq-item p {
  margin: 0;
  font-size: 13px;
  color: var(--moyu-muted);
  line-height: 1.7;
}

.dl-history {
  padding: 0 0 40px;
}

.dl-history-card {
  background: #fff;
  border: 1px solid rgba(31, 30, 28, 0.06);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(31, 30, 28, 0.05);
  padding: 22px;
}

.dl-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dl-history-head h2 {
  margin: 0;
  font-family: var(--moyu-serif);
  font-size: 22px;
}

.dl-history-actions {
  display: flex;
  gap: 8px;
}

.dl-history-actions button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(31, 30, 28, 0.12);
  background: #fff;
  color: var(--moyu-ink-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.dl-release-list {
  max-height: 420px;
  overflow: auto;
  display: grid;
  gap: 10px;
}

.dl-release-item {
  border: 1px solid rgba(31, 30, 28, 0.08);
  border-radius: 14px;
  background: #fbf9f4;
  padding: 0 14px;
}

.dl-release-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}

.dl-release-item summary::-webkit-details-marker { display: none; }

.dl-release-item h3 {
  margin: 0;
  font-size: 15px;
}

.dl-release-item summary p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--moyu-muted);
}

.dl-pill {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(26, 64, 52, 0.1);
  color: var(--moyu-green);
  font-size: 11px;
  font-weight: 700;
}

.dl-release-content {
  padding: 0 0 14px;
  border-top: 1px dashed rgba(31, 30, 28, 0.1);
  margin-top: 4px;
  padding-top: 12px;
}

.dl-release-log {
  font-size: 13px;
  color: var(--moyu-ink-soft);
  line-height: 1.7;
  margin-bottom: 12px;
}

.dl-cta {
  position: relative;
  overflow: hidden;
  background: var(--moyu-green);
  height: 96px;
}

.dl-cta-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.dl-cta-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(18, 48, 40, 0.22), rgba(18, 48, 40, 0.1));
}

.dl-cta-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  width: min(100% - 48px, var(--moyu-max));
  margin: 0 auto;
  color: #fff;
}

.dl-cta-title {
  margin: 0 0 2px;
  font-family: var(--moyu-serif);
  font-size: clamp(18px, 1.7vw, 22px);
  font-weight: 700;
}

.dl-cta-sub {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.dl-cta-actions .moyu-btn {
  min-height: 36px;
  padding: 0 18px;
  font-size: 13px;
}

/* ����ԭ���ص���/��¼���֣��������� */
.login-mask,
.download-notice-mask,
.qr-mask {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.45);
}

.login-mask.is-open,
.download-notice-mask.is-open,
.qr-mask.is-open { display: flex; }

.login-card,
.download-notice-card,
.qr-card {
  position: relative;
  width: min(520px, 100%);
  background: #fffdf8;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  padding: 22px;
}

.login-close,
.download-notice-close,
.qr-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: #f3eee5;
  cursor: pointer;
}

.login-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 20px;
}
.login-title img { width: 28px; height: 28px; }
.login-subtitle { margin: 0 0 16px; color: var(--moyu-muted); font-size: 13px; line-height: 1.7; }
.login-field { margin-bottom: 12px; }
.login-field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.login-input {
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(31, 30, 28, 0.14);
  padding: 0 12px;
  background: #fff;
}
.login-captcha { display: flex; gap: 10px; }
.login-captcha img { height: 42px; border-radius: 10px; cursor: pointer; }
.login-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--moyu-muted); margin-bottom: 10px; }
.login-error { display: none; color: #b91c1c; font-size: 13px; margin-bottom: 10px; }
.login-submit {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--moyu-green);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.download-notice-title { margin: 0 0 10px; font-size: 18px; }
.download-notice-text { margin: 0 0 10px; font-size: 13px; color: var(--moyu-ink-soft); line-height: 1.75; }
.download-notice-images { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.download-notice-images img { width: 100%; border-radius: 12px; border: 1px solid rgba(31, 30, 28, 0.08); }

.qr-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3eee5;
  color: var(--moyu-green);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}
.qr-title { margin: 0 0 8px; font-size: 20px; }
.qr-text { margin: 0 0 14px; color: var(--moyu-muted); font-size: 13px; }
.qr-frame {
  width: min(220px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 12px;
  border-radius: 16px;
  border: 1px dashed rgba(31, 30, 28, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
}
.qr-frame img { width: 100%; height: 100%; object-fit: contain; }
.qr-frame.is-empty { background: #f7f4ed; }
.qr-empty { color: var(--moyu-muted); font-size: 13px; }
.is-hidden { display: none !important; }
.qr-hint { font-size: 12px; color: var(--moyu-ink-soft); line-height: 1.7; }

@media (max-width: 1100px) {
  .dl-platform-grid,
  .dl-req-grid { grid-template-columns: 1fr 1fr; }
  .dl-info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .dl-hero-bg {
    min-height: 420px;
    aspect-ratio: auto;
    height: 420px;
  }
  .dl-hero-shade {
    background: linear-gradient(180deg, rgba(248, 245, 239, 0.9) 0%, rgba(248, 245, 239, 0.7) 48%, rgba(248, 245, 239, 0.2) 100%);
  }
  .dl-platform-grid,
  .dl-req-grid,
  .dl-faq-grid,
  .dl-about-grid,
  .download-notice-images { grid-template-columns: 1fr; }
  .dl-cta { height: 110px; }
  .dl-cta-inner {
    flex-wrap: wrap;
    gap: 12px;
    text-align: center;
  }
}


/* package buttons (replace dropdown) */
.dl-pkg-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
}
.dl-pkg-row--history {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 4px;
}
.dl-pkg-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--moyu-green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(26, 64, 52, 0.16);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.dl-pkg-btn i { font-size: 14px; opacity: 0.92; }
.dl-pkg-btn span { flex: 1; text-align: left; }
.dl-pkg-btn small {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.72);
  letter-spacing: 0.02em;
}
.dl-pkg-btn:hover {
  background: var(--moyu-green-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(26, 64, 52, 0.22);
}
.dl-pkg-btn--ghost {
  background: #fff;
  color: var(--moyu-green);
  border: 1px solid rgba(26, 64, 52, 0.22);
  box-shadow: none;
}
.dl-pkg-btn--ghost small { color: var(--moyu-muted); }
.dl-pkg-btn--ghost:hover {
  background: rgba(26, 64, 52, 0.06);
  color: var(--moyu-green);
  border-color: var(--moyu-green);
  box-shadow: none;
}

/* format hover tip */
.dl-about-item--formats { position: relative; overflow: visible; }
.dl-format-trigger {
  cursor: help;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}
.dl-format-trigger em {
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.62);
}
.dl-format-tip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 5;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(12, 28, 22, 0.96);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 14px 28px rgba(0,0,0,0.28);
  color: #fff;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  pointer-events: none;
}
.dl-about-item--formats:hover .dl-format-tip,
.dl-about-item--formats:focus-within .dl-format-tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dl-history-empty {
  margin: 0;
  color: var(--moyu-muted);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .dl-pkg-row--history { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .dl-pkg-row--history { grid-template-columns: 1fr; }
}

/* 书房设置弹窗：只保留对应平台卡片，下载 / 扫码 / 安装说明仍用本页弹层 */
body.moyu-dl-embed {
  background: #f6f4ef;
  min-height: 100%;
}
body.moyu-dl-embed .moyu-header,
body.moyu-dl-embed footer,
body.moyu-dl-embed .dl-hero,
body.moyu-dl-embed .dl-filter,
body.moyu-dl-embed .dl-info-grid,
body.moyu-dl-embed .dl-req,
body.moyu-dl-embed .dl-faq,
body.moyu-dl-embed .dl-history,
body.moyu-dl-embed .dl-cta,
body.moyu-dl-embed .moyu-search-overlay,
body.moyu-dl-embed .moyu-atmos-bg {
  display: none !important;
}
body.moyu-dl-embed .moyu-atmos,
body.moyu-dl-embed .moyu-atmos-body {
  background: transparent;
  min-height: 0;
}
body.moyu-dl-embed .dl-section {
  padding: 16px 0 24px;
}
body.moyu-dl-embed .dl-platform-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 720px) {
  body.moyu-dl-embed .dl-platform-grid {
    grid-template-columns: 1fr;
  }
}
