/* 全站响应式断点与减少动画偏好 */
/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .intro-hero { gap: 26px; }
  .detail-hero { grid-template-columns: minmax(200px, 240px) minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell, .nav-shell, .page-main, .site-footer { width: min(100% - 28px, 680px); }
  .nav-links { display: none; }
  .intro-hero { grid-template-columns: 1fr; padding-top: 18px; gap: 20px; }
  .intro-stage { min-height: 0; }
  .intro-copy h1 { max-width: 600px; }
  .intro-flow { flex-wrap: wrap; gap: 9px 12px; }
  .flow-step { flex: 1 1 190px; }
  .flow-arrow { display: none; }
  .home-hero { grid-template-columns: 1fr; padding: 22px; gap: 16px; }
  .home-hub { display: none; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intro-cta { flex-direction: column; align-items: flex-start; gap: 12px; }
  .category-layout { grid-template-columns: 1fr; }
  .sidebar-toggle { display: inline-flex; }
  .category-sidebar {
    position: fixed; top: max(10px, env(safe-area-inset-top)); left: max(10px, env(safe-area-inset-left)); bottom: max(10px, env(safe-area-inset-bottom));
    width: min(306px, calc(100vw - 40px)); z-index: 70;
    max-height: none; overflow: hidden;
    transform: translateX(calc(-100% - 24px));
    transition: transform .27s cubic-bezier(.2, .8, .2, 1);
  }
  .category-sidebar.is-open { transform: none; }
  .sidebar-panel { height: 100%; max-height: none; display: flex; flex-direction: column; min-height: 0; border-radius: 18px; padding: 12px; box-shadow: 0 18px 50px rgba(23, 32, 51, .2); }
  .sidebar-head { padding: 4px 4px 10px; }
  .sidebar-close { display: grid; }
  .sidebar-groups { flex: 1; max-height: none; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .sidebar-link { padding: 8px; }
  .sidebar-caret { width: 30px; min-height: 34px; }
  .sidebar-caret .rh-icon { width: 12px; height: 12px; }
  .sidebar-switch select { min-height: 38px; font-size: 11.5px; }
  .sidebar-scrim {
    display: block; position: fixed; inset: 0; z-index: 65;
    background: rgba(15, 23, 42, .34); opacity: 0; pointer-events: none;
    transition: opacity .22s ease;
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  }
  body.is-sidebar-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
  body.is-sidebar-open { overflow: hidden; }
  .detail-hero { grid-template-columns: 1fr; gap: 12px; }
  .detail-cover-col { display: block; }
  .detail-cover { height: 200px; min-height: 170px; max-height: 230px; }
  .detail-info { padding: 2px 4px 2px; }
  .detail-desc { -webkit-line-clamp: 4; }
  .detail-bottom { grid-template-columns: 1fr 1fr; gap: 12px; }
  .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-hero-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .hero-number { display: flex; align-items: baseline; gap: 7px; text-align: left; }
  .hero-number strong { font-size: 22px; }
  .hero-number span { font-size: 8px; }
  .browse-screen { padding-left: 14px; padding-right: 14px; }
  .browse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .browse-lead { flex-direction: column; align-items: flex-start; gap: 8px; padding: 11px 0 12px; margin-bottom: 10px; }
  .browse-lead h1 { font-size: 22px; }
}
@media (max-width: 600px) {
  body { font-size: 13.5px; }
  .desktop-only { display: none; }
  .shell, .nav-shell, .page-main, .site-footer { width: calc(100% - 22px); }
  .site-header { padding-top: max(8px, env(safe-area-inset-top)); }
  .nav-shell { min-height: 52px; padding: 6px 8px 6px 10px; border-radius: 14px; gap: 9px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
  .brand-mark .rh-icon { width: 17px; height: 17px; }
  .brand-text strong { font-size: 13px; }
  .brand-text small { font-size: 6.5px; }
  .nav-icon-btn { width: 31px; height: 31px; border-radius: 9px; }
  .page-main { padding: 14px 0 28px; }
  .home-hero { padding: 16px; border-radius: 17px; gap: 14px; }
  .home-hero h1 { font-size: 25px; }
  .home-hero .page-lead { font-size: 10.8px; }
  .home-hero .search-wrap { margin-top: 13px; }
  .home-hero .search-box { min-height: 46px; border-radius: 12px; }
  .home-hero-actions { margin-top: 12px; gap: 7px; }
  .home-hero-actions .btn { flex: 1 1 auto; }
  .home-hero-stats { margin-top: 14px; padding-top: 12px; gap: 6px 14px; }
  .home-hero-stats strong { font-size: 14px; }
  .home-search-panel { padding: 13px; border-radius: 14px; }
  .home-search-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .home-flow { margin-top: 12px; }
  .intro-hero { padding: 12px 0 22px; }
  .intro-copy h1 { font-size: clamp(26px, 8vw, 34px); }
  .intro-copy p.lead { font-size: 12px; line-height: 1.75; margin-bottom: 16px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .stage-panel { width: 100%; padding: 12px; border-radius: 17px; }
  .intro-flow { padding: 10px 12px; border-radius: 13px; }
  .flow-step { flex: 1 1 100%; }
  .intro-features { padding-top: 22px; margin-top: 20px; }
  .feature-grid { gap: 8px; }
  .feature-card { padding: 13px; border-radius: 13px; }
  .feature-ic { width: 34px; height: 34px; border-radius: 10px; margin-bottom: 9px; }
  .intro-cta { padding: 16px; border-radius: 15px; }
  .section-head { align-items: flex-start; }
  .section-head h2 { font-size: 19px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .category-card { min-height: 0; padding: 11px; border-radius: 12px; }
  .cat-identity { gap: 7px; margin-bottom: 7px; }
  .cat-identity .icon-orb { width: 32px; height: 32px; border-radius: 9px; }
  .cat-identity .icon-orb .rh-icon { width: 15px; height: 15px; }
  .category-card h3 { font-size: 12.5px; }
  .category-card .cat-desc { font-size: 9px; line-height: 1.5; min-height: 0; -webkit-line-clamp: 2; }
  .subchips { display: none; }
  .cat-foot { padding-top: 6px; font-size: 8px; }
  .cat-arrow { width: 19px; height: 19px; }
  .search-box { min-height: 40px; border-radius: 10px; }
  .search-box .rh-icon { width: 15px; height: 15px; }
  .search-box input { font-size: 12px; }
  .section-block { margin-top: 18px; }
  .section-block-head { margin-bottom: 9px; }
  .section-block-head h2 { font-size: 14.5px; }
  .resource-row { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 8px; min-height: 52px; padding: 6px 8px 6px 6px; }
  .res-cover { width: 38px; height: 38px; border-radius: 9px; }
  .res-cover .rh-icon { width: 16px; height: 16px; }
  .res-title-row h3 { font-size: 11.5px; }
  .res-package { font-size: 8.5px; }
  .res-tail { gap: 5px; }
  .res-dl { display: none; }
  .view-pill { width: 26px; height: 26px; padding: 0; border-radius: 7px; justify-content: center; }
  .view-pill .vp-text { display: none; }
  .view-pill .rh-icon { width: 11px; height: 11px; }
  .category-toolbar { margin-bottom: 7px; }
  .category-headline { padding: 7px 9px; border-radius: 11px; gap: 8px; }
  .category-headline .icon-orb { width: 32px; height: 32px; border-radius: 9px; }
  .category-headline-text h1 { font-size: 16px; }
  .category-headline-text p { display: none; }
  .category-count { padding: 3px 7px; font-size: 8px; }
  .category-layout { gap: 8px; margin-top: 8px; }
  .detail-screen { padding-left: 11px; padding-right: 11px; padding-bottom: max(18px, env(safe-area-inset-bottom)); gap: 7px; }
  .detail-brand-text strong { font-size: 10.5px; }
  .detail-crumbs { font-size: 8.5px; }
  .detail-hero { border-radius: 13px; padding: 8px; gap: 10px; }
  .detail-cover { height: 170px; min-height: 155px; max-height: 190px; border-radius: 9px; }
  .detail-info h1 { font-size: 20px; }
  .detail-desc { font-size: 11px; line-height: 1.65; margin-bottom: 10px; }
  .detail-actions { gap: 5px; }
  .detail-actions .btn-download { flex: 1 1 auto; }
  .detail-actions .btn-icon { flex-basis: 34px; width: 34px; min-height: 34px; }
  .detail-actions .btn { min-height: 34px; padding: 0 10px; font-size: 11px; }
  .detail-about { margin-top: 8px; padding: 13px; }
  .detail-bottom { grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
  .glass-card { padding: 12px; border-radius: 12px; }
  .update-form-foot .hint { order: 2; width: 100%; }
  .update-form-foot .btn { width: 100%; }
  .result-grid { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 9.5px; }
  .browse-bar { padding: 1px 0 3px; gap: 8px; }
  .browse-search-link { width: 32px; min-height: 32px; padding: 0; border-radius: 9px; justify-content: center; }
  .browse-search-link span { display: none; }
  .browse-lead { padding: 9px 0 10px; margin-bottom: 9px; gap: 7px; }
  .browse-lead h1 { font-size: 20px; }
  .browse-lead p { font-size: 9.5px; }
  .browse-lead-stats { gap: 4px; }
  .browse-lead-stats span { padding: 3px 7px; font-size: 8px; }
  .browse-lead-stats strong { font-size: 10px; }
  .browse-body-head p { display: none; }
  .browse-grid { grid-template-columns: 1fr; gap: 7px; }
  .browse-card { min-height: 66px; padding: 8px 9px; gap: 9px; border-radius: 11px; }
  .browse-card > .icon-orb { width: 36px; height: 36px; border-radius: 9px; }
  .browse-card h2 { font-size: 13px; }
  .browse-card-count { display: none; }
  .browse-arrow { width: 22px; height: 22px; }
}
@media (max-width: 860px), (pointer: coarse) {
  :root { --blur-sm: 6px; --blur-md: 9px; --blur-lg: 12px; }
  .stage-aura { display: none; }
  /* 移动端也保留毛玻璃，只把模糊半径调小一点，避免性能压力。 */
  body.has-custom-bg .nav-shell,
  body.has-custom-bg .home-hero,
  body.has-custom-bg .home-hub,
  body.has-custom-bg .home-search-panel,
  body.has-custom-bg .resource-row,
  body.has-custom-bg .category-card,
  body.has-custom-bg .browse-card,
  body.has-custom-bg .browse-tile,
  body.has-custom-bg .category-headline,
  body.has-custom-bg .sidebar-panel,
  body.has-custom-bg .glass-card,
  body.has-custom-bg .detail-hero,
  body.has-custom-bg .empty-state,
  body.has-custom-bg .search-box,
  body.has-custom-bg .feature-card,
  body.has-custom-bg .intro-flow,
  body.has-custom-bg .stage-panel,
  body.has-custom-bg .intro-cta {
    background: rgba(255, 255, 255, .56);
    -webkit-backdrop-filter: blur(16px) saturate(155%);
    backdrop-filter: blur(16px) saturate(155%);
  }
  body::before { filter: blur(4px) saturate(1.05); }
  body.has-custom-bg .intro-copy::before,
  body.has-custom-bg .page-hero::before,
  body.has-custom-bg .browse-hero::before {
    inset: -12px;
    background: rgba(255, 255, 255, .44);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    backdrop-filter: blur(12px) saturate(145%);
  }
}
@media (max-width: 420px) {
  .view-pill .vp-text { display: none; }
  .res-version { display: none; }
  .category-count { white-space: normal; text-align: right; }
  .browse-stats > div { padding: 0 10px; }
}
@media (max-width: 600px) {
  .browse-body-head { align-items: flex-start; flex-wrap: wrap; gap: 4px 10px; }
  .browse-body-head .muted-text { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}

