/* 作者：youwei。独立下载页面以安装包和大二维码为中心，筛选与队列保持紧凑。 */
:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif; color: #202e3d; background: #f5f6f8; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #5392d2; outline-offset: 3px; }
[hidden] { display: none !important; }
.download-header { height: 76px; padding: 0 max(24px, calc((100% - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid #e4e8ed; gap: 16px; }
.download-brand { font-weight: 750; font-size: 21px; white-space: nowrap; }
.download-brand span { font-size: 12px; font-weight: 400; margin-left: 15px; color: #677585; }
.manage-link { color: #53667a; font-size: 12px; white-space: nowrap; }
main { max-width: 1168px; margin: auto; padding: 40px 24px 28px; }
.download-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.eyebrow { color: #5b7492; letter-spacing: 2px; font-size: 10px; font-weight: 650; margin: 0 0 12px; }
h1 { font-size: 32px; letter-spacing: -1px; margin: 0; }
.intro { color: #647486; font-size: 14px; margin: 12px 0 0; }
#connection { font-size: 11px; color: #617488; }
.notice { background: #fff2e9; color: #864726; padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-size: 13px; }
.download-filters { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 160px; gap: 16px; padding: 22px; border: 1px solid #e1e5e8; border-radius: 12px; background: #fff; }
.download-filters label { display: grid; gap: 8px; min-width: 0; }
.download-filters label > span { color: #677687; font-size: 11px; }
input, select { width: 100%; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid #dce2e9; border-radius: 7px; color: #314358; background: #fff; font-size: 13px; }
.filter-bottom { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.configuration-filter { display: flex; gap: 5px; }
.configuration-filter button { background: #f2f4f7; color: #526476; border: 0; border-radius: 6px; padding: 9px 16px; font-size: 12px; }
.configuration-filter button.active { background: #243d5a; color: #fff; }
.clear-filters { background: none; border: 0; color: #526476; font-size: 12px; padding: 10px 0 10px 10px; white-space: nowrap; }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 16px; }
.results-heading h2 { font-size: 15px; margin: 0; }
#result-count { font-weight: 400; color: #738296; padding-left: 8px; }
.results-heading > span { font-size: 11px; color: #738296; }
#download-list { display: grid; gap: 18px; }
.download-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 330px); gap: 32px; padding: 26px; border-radius: 14px; background: #fff; border: 1px solid #e1e5e8; }
.package-info { min-width: 0; }
.package-labels { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.package-configuration, .latest-label { font-size: 10px; padding: 5px 9px; border-radius: 5px; background: #edf2f8; color: #365b81; }
.latest-label { background: #e8f5ed; color: #2c7650; }
.package-branch { margin: 17px 0 10px; font-size: 23px; line-height: 1.4; overflow-wrap: anywhere; }
.package-version { color: #445c76; font-size: 16px; margin: 0 0 16px; }
.package-meta { color: #687a8e; font-size: 12px; line-height: 1.8; margin: 4px 0; overflow-wrap: anywhere; }
.package-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.install-link, .ipa-link { display: inline-flex; padding: 12px 20px; border-radius: 7px; font-size: 13px; font-weight: 550; }
.install-link { background: #243d5a; color: white; }
.install-link:hover { background: #182d47; }
.ipa-link { border: 1px solid #dae1ea; color: #445c76; }
/* 扫码区集中呈现主安装方式和备用入口，减少卡片中重复的版本信息。 */
.package-qr { align-self: start; min-width: 0; background: #f5f8fc; border: 1px solid #e1e8f0; border-radius: 12px; padding: 14px; }
.package-primary-qr { display: grid; justify-items: center; gap: 7px; text-align: center; }
.package-primary-qr img { display: block; width: min(100%, 224px); height: auto; aspect-ratio: 1; background: #fff; border-radius: 8px; }
.package-qr strong { font-size: 13px; }
.package-qr span { font-size: 12px; color: #52677e; }
.package-commits { border-top: 1px solid #edf0f3; padding-top: 15px; font-size: 12px; }
.package-commits summary { cursor: pointer; color: #536a83; }
.package-commits ol { padding: 0; list-style: none; margin: 14px 0 0; }
.package-commits li { padding: 7px 0; color: #596e85; line-height: 1.6; overflow-wrap: anywhere; }
.package-commits code { font-size: 11px; color: #8894a4; padding-right: 10px; }
.empty { padding: 60px 20px; margin: 0; text-align: center; font-size: 14px; color: #667b91; background: #fff; border: 1px dashed #d8e0e8; border-radius: 12px; }
.load-more { display: block; margin: 24px auto 0; padding: 12px 28px; background: #fff; border: 1px solid #d8e0e8; border-radius: 8px; font-size: 12px; color: #465e78; }
footer { text-align: center; color: #738397; font-size: 11px; line-height: 1.9; padding-top: 32px; }
@media (max-width: 700px) { .download-header { height: 64px; padding: 0 20px; } .download-brand span { display: none; } main { padding: 28px 16px; } h1 { font-size: 28px; } .download-heading { align-items: flex-start; } #connection { max-width: 100px; line-height: 1.6; text-align: right; } .download-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 16px; gap: 14px; } .search-label { grid-column: 1 / -1; } input, select { font-size: 16px; } .configuration-filter button { padding: 9px 11px; } .download-card { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 22px; } .results-heading > span { max-width: 130px; text-align: right; line-height: 1.6; } .package-branch { font-size: 21px; } }

/* 编译配置使用高对比色加文字说明，标签单独突出，不能只靠颜色识别。 */
.package-configuration { font-size: 15px; font-weight: 750; padding: 9px 14px; border-radius: 7px; letter-spacing: .2px; }
.configuration-release { background: #164d99; color: #fff; border: 1px solid #164d99; }
.configuration-debug { background: #fff1d2; color: #784200; border: 2px solid #bd7300; }
.package-build-label { display: inline-block; padding: 9px 14px; background: #ede5ff; color: #512b88; border: 1px solid #c7afe8; font-size: 16px; font-weight: 700; border-radius: 7px; overflow-wrap: anywhere; }
.configuration-filter button[data-configuration="Release"].active { background: #164d99; color: #fff; }
.configuration-filter button[data-configuration="Debug"].active { background: #fff1d2; color: #784200; box-shadow: inset 0 0 0 2px #bd7300; }

/* 小码和文字组成一个可点击区域；在主码下面保持同一阅读顺序。 */
.package-backup-qr { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 8px; border: 1px solid #dfe7f0; border-radius: 9px; background: #fff; }
.package-backup-qr img { display: block; width: 104px; height: 104px; flex: none; }
.package-backup-caption { min-width: 0; display: grid; gap: 5px; }
.package-backup-qr:hover { border-color: #7295be; }
.ipa-link:hover { background: #f3f6fa; }
.install-link, .ipa-link { min-height: 44px; align-items: center; justify-content: center; }
@media (max-width: 700px) {
  .download-card { padding: 16px; gap: 16px; }
  .package-actions { margin: 16px 0; }
  .install-link { flex: 1 1 auto; }
  .package-backup-qr { gap: 8px; }
}
@media (max-width: 360px) {
  .filter-bottom { flex-wrap: wrap; }
  .download-filters { padding: 12px; gap: 10px; }
}

/* 下载页默认只显示队列计数，详情按需展开，手机首屏优先留给版本和安装操作。 */
.download-queue { padding: 0 16px; margin-bottom: 16px; }
.download-queue summary { min-height: 44px; cursor: pointer; list-style: none; }
.download-queue summary::-webkit-details-marker { display: none; }
.download-queue summary strong { font-size: 13px; }
.download-queue .queue-expand { margin-left: auto; }
.download-queue[open] .queue-expand { transform: rotate(180deg); }
.download-queue .queue-list { margin: 0 0 12px; }
@media (max-width: 700px) {
  main { padding-top: 22px; }
  .download-heading { margin-bottom: 16px; }
  .results-heading { margin-top: 20px; }
}
