/* Loaded after every legacy theme stylesheet. */
body.cherry-home .headerBox .box .navs { position: relative !important; overflow: visible !important; }
body.cherry-home .headerBox .navs > .nav-home-link,
body.cherry-home .headerBox .navs > .nav-contact-link,
body.cherry-home .headerBox .navs > a,
body.cherry-home .headerBox .navs > .nav-more-resources { display: inline-flex !important; visibility: visible !important; }
body.cherry-home .headerBox .navs .nav-more-menu { display: grid !important; z-index: 9999 !important; }
body.cherry-home .headerBox .navs .nav-more-menu a { display: flex !important; visibility: visible !important; }
body.cherry-home .headerBox .navs .nav-more-menu.is-open { opacity: 1 !important; visibility: visible !important; transform: translateY(0) !important; }
@media (min-width: 601px) {
  body.cherry-home .headerBox .navs .nav-more-resources { position: relative !important; overflow: visible !important; }
  body.cherry-home .headerBox .navs .nav-more-menu { position: fixed !important; top: 72px !important; right: max(24px, calc((100vw - 820px) / 2)) !important; left: auto !important; width: 190px !important; min-width: 190px !important; max-height: none !important; overflow: visible !important; padding: 8px !important; background: #fff !important; border: 1px solid #e7edf8 !important; border-radius: 10px !important; box-shadow: 0 12px 28px rgba(42,68,120,.2) !important; }
  body:is(.cherry-home, .cherry-list, .cherry-detail) .nav-more-trigger span { display:none !important; }
  /* 「更多资源」下拉箭头：原来用 11px 的字符 ▾ 渲染，笔画又细又淡，几乎看不见。
     改成 CSS 画的实心三角（宽 10px、高 6px），用 currentColor 跟随文字颜色，
     鼠标悬停变蓝时自动同步；三个页面（首页/列表页/详情页）统一。 */
  body:is(.cherry-home, .cherry-list, .cherry-detail) .nav-more-trigger::after {
    content: '' !important;
    display: block !important;
    width: 0 !important;
    height: 0 !important;
    margin-left: 0 !important;
    border-left: 5px solid transparent !important;
    border-right: 5px solid transparent !important;
    border-top: 6px solid currentColor !important;
  }
  body.cherry-home .headerBox .navs .nav-more-menu a { height: auto !important; min-height: 38px !important; box-sizing: border-box !important; }
}
body.cherry-home .mobile-resource-links { display: none !important; }

@media (min-width: 601px) {
  body.cherry-home .headerBox .navs .nav-more-menu { opacity: 0; visibility: hidden; }
  body.cherry-home .headerBox .navs .nav-more-resources:hover .nav-more-menu,
  body.cherry-home .headerBox .navs .nav-more-resources:focus-within .nav-more-menu { opacity: 1; visibility: visible; }
}

@media (max-width: 600px) {
  /* 重要：这里不能写 display:block !important。
     遮罩层的显示/隐藏必须交给 Element Plus 自己的 v-show 控制；
     用 !important 强行 display:block 会覆盖 v-show 的 display:none，
     导致菜单关闭后遮罩仍然盖在页面上 —— 表现为「菜单关不掉、点哪里都没反应」。 */
  body.cherry-home .el-overlay:has(.menu-dialog-wrapper) { pointer-events:auto !important; }
  /* Element Plus centers dialogs through the overlay flex wrapper. Override
     every centering mechanism so the drawer can own the viewport origin. */
  body.cherry-home .el-overlay:has(.menu-dialog-wrapper) .el-overlay-dialog { display:block !important; position:fixed !important; inset:0 !important; width:100vw !important; height:100vh !important; overflow:hidden !important; pointer-events:auto !important; padding:0 !important; margin:0 !important; align-items:flex-start !important; justify-content:flex-start !important; }
  body.cherry-home .el-overlay:has(.menu-dialog-wrapper) .el-overlay-dialog > .menu-dialog-wrapper { position:fixed !important; inset:0 auto auto 0 !important; transform:none !important; }
  body.cherry-home .el-overlay:has(.menu-dialog-wrapper) .el-overlay-dialog .menu-dialog-wrapper { margin:0 !important; top:0 !important; left:0 !important; transform:none !important; }
  body.cherry-home .headerBox .box .navs { position: absolute !important; left: 12px !important; right: auto !important; width: 40px !important; min-width: 40px !important; }
  body.cherry-home .headerBox .navs > .nav-home-link,
  body.cherry-home .headerBox .navs > .nav-contact-link,
  body.cherry-home .headerBox .navs > a,
  body.cherry-home .headerBox .navs > .nav-more-resources { display: none !important; }
  body.cherry-home .menu-dialog-wrapper { pointer-events:auto !important; width: min(280px, calc(100vw - 24px)) !important; max-width: none !important; margin: 68px auto 0 12px !important; }
  body.cherry-home .menu-dialog-wrapper.el-dialog { position: fixed !important; top: 0 !important; left: 0 !important; margin: 0 !important; width: min(180px, 82vw) !important; height: 100vh !important; max-height: 100vh !important; border-radius: 0 8px 8px 0 !important; transform: none !important; }
  body.cherry-home .menu-dialog-wrapper .el-dialog__body { height: 100vh !important; max-height: none !important; box-sizing: border-box !important; overflow-y: auto !important; overflow-x: hidden !important; padding: 14px 18px 28px !important; }
  body.cherry-home .menu-dialog-wrapper .el-dialog__body > .drawer { min-height: max-content !important; padding-bottom: 12px !important; }
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .drawer { width: 100% !important; font-family: 'Segoe UI', -apple-system, "Microsoft YaHei", sans-serif !important; }
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .drawer { position: relative !important; }
  /* 侧栏视觉改为左对齐通栏（对齐参考站 ti75.com 移动端菜单）：
     文字左对齐 → 每条通栏块级 + 左侧 3px 红条，悬停浅红底红字。 */
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .drawer { text-align:left !important; }
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .mobile-drawer-brand { display:block !important; width:100% !important; box-sizing:border-box !important; padding: 4px 13px 12px !important; color:#e50914 !important; font-size:17.6px !important; line-height:1.35 !important; font-weight:700 !important; text-align:left !important; border-bottom:1px solid #f0f0f0 !important; }
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .drawer > .item,
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .drawer > a,
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .drawer .mobile-resource-links a { display: block !important; box-sizing: border-box !important; width: 100% !important; min-height: 0 !important; padding: 13px !important; border-bottom: none !important; border-left: 3px solid transparent !important; color: #333 !important; font-size: 15.2px !important; line-height: 1.4 !important; font-weight:400 !important; text-decoration: none !important; text-align: left !important; background: transparent !important; transition: background .15s !important; cursor: pointer !important; }
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .drawer > .item span { width:auto !important; display:inline !important; text-align:left !important; }
  /* 悬停 / 选中：浅红底 + 左侧红条 + 红字（参考站同款） */
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .drawer > .item:hover,
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .drawer > a:hover,
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .drawer .mobile-resource-links a:hover { background: #fef0ef !important; color: #e50914 !important; border-left-color: #e50914 !important; }
  /* 「首页」项：与上方标题之间留 8px 空隙 */
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .drawer > .mobile-drawer-home { margin-top: 8px !important; }
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .drawer .mobile-resource-links { display: grid !important; visibility: visible !important; }
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .drawer .mobile-resource-links a,
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .drawer > a { display: block !important; visibility: visible !important; }
}

/* Match ti75 mobile navigation proportions and preserve backdrop dismissal. */
@media (max-width:600px) { body.cherry-home .menu-dialog-wrapper .el-dialog__body { width:100% !important; } body.cherry-home .el-overlay:has(.menu-dialog-wrapper) { cursor:pointer !important; } body.cherry-home .menu-dialog-wrapper { cursor:default !important; } }

/* Dialog click handler closes the mobile menu reliably across Element Plus versions. */

@media (max-width:600px) { body.cherry-home .menu-dialog-wrapper .drawer > .item, body.cherry-home .menu-dialog-wrapper .drawer > a { font-weight:400 !important; } }

/* 结果页和详情页也使用同一套公共头部；不能只让首页拥有导航修复。 */
body:is(.cherry-home, .cherry-list, .cherry-detail) .headerBox .box .navs {
  position: relative !important;
  overflow: visible !important;
}
body:is(.cherry-home, .cherry-list, .cherry-detail) .headerBox .navs .nav-more-menu.is-open {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}
@media (min-width:601px) {
  body:is(.cherry-home, .cherry-list, .cherry-detail) .headerBox .navs .nav-more-resources {
    position: relative !important;
    overflow: visible !important;
  }
  body:is(.cherry-home, .cherry-list, .cherry-detail) .headerBox .navs .nav-more-menu {
    position: fixed !important;
    top: 72px !important;
    right: max(24px, calc((100vw - 820px) / 2)) !important;
    left: auto !important;
    width: 190px !important;
    min-width: 190px !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 8px !important;
    background: #fff !important;
    border: 1px solid #e7edf8 !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 28px rgba(42,68,120,.2) !important;
  }
  body:is(.cherry-home, .cherry-list, .cherry-detail) .headerBox .navs .nav-more-menu a {
    display: flex !important;
    visibility: visible !important;
    height: auto !important;
    min-height: 38px !important;
    box-sizing: border-box !important;
  }
}
@media (max-width:600px) {
  body:is(.cherry-home, .cherry-list, .cherry-detail) .el-overlay:has(.menu-dialog-wrapper) {
    pointer-events: auto !important;
  }
  body:is(.cherry-home, .cherry-list, .cherry-detail) .el-overlay:has(.menu-dialog-wrapper) .el-overlay-dialog {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
  }
  body:is(.cherry-home, .cherry-list, .cherry-detail) .el-overlay:has(.menu-dialog-wrapper) .menu-dialog-wrapper.el-dialog {
    position: fixed !important;
    inset: 0 auto auto 0 !important;
    width: min(180px, 82vw) !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 8px 8px 0 !important;
    transform: none !important;
  }
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .el-dialog__body {
    width: 100% !important;
    height: 100vh !important;
    max-height: none !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 14px 18px 28px !important;
  }
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .drawer {
    width: 100% !important;
    margin: 0 !important;
    pointer-events: auto !important;
    text-align: left !important;
  }
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .drawer > .item,
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .drawer > a,
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .drawer .mobile-resource-links a {
    justify-content: flex-start !important;
    text-align: left !important;
  }
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .drawer > .item span {
    width: auto !important;
    text-align: left !important;
  }
  /* 右上角 × 关闭按钮：按用户要求移除（关闭菜单统一走点击遮罩）。 */
  body:is(.cherry-home, .cherry-list, .cherry-detail) .menu-dialog-wrapper .mobile-drawer-close {
    display: none !important;
  }
}
/* 桌面宽度下也彻底隐藏 × 按钮，防止任何场景下残留。 */
body:is(.cherry-home, .cherry-list, .cherry-detail) .mobile-drawer-close { display: none !important; }

/* 移动端最终兜底：菜单从导航栏下方展开，避免遮住搜索框。 */
@media (max-width:600px) {
  body.cherry-home .el-overlay .menu-dialog-wrapper.el-dialog,
  body.cherry-list .el-overlay .menu-dialog-wrapper.el-dialog,
  body.cherry-detail .el-overlay .menu-dialog-wrapper.el-dialog {
    position: fixed !important;
    top: 58px !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    width: min(180px, 82vw) !important;
    height: calc(100vh - 58px) !important;
    max-height: calc(100vh - 58px) !important;
    margin: 0 !important;
    border-radius: 0 8px 8px 0 !important;
    transform: none !important;
  }
  body.cherry-home .el-overlay:has(.menu-dialog-wrapper),
  body.cherry-list .el-overlay:has(.menu-dialog-wrapper),
  body.cherry-detail .el-overlay:has(.menu-dialog-wrapper) {
    position: fixed !important;
    inset: 58px 0 0 !important;
    width: 100vw !important;
    height: calc(100vh - 58px) !important;
  }
  body.cherry-home .el-overlay .menu-dialog-wrapper .el-dialog__body,
  body.cherry-list .el-overlay .menu-dialog-wrapper .el-dialog__body,
  body.cherry-detail .el-overlay .menu-dialog-wrapper .el-dialog__body {
    width: 100% !important;
    height: calc(100vh - 58px) !important;
    max-height: none !important;
    overflow-y: auto !important;
    padding: 14px 18px 28px !important;
    box-sizing: border-box !important;
  }
}

/* ============================================================
   移动端最终方案：三个页面（首页/列表页/详情页）统一把汉堡按钮
   固定到屏幕左上角 (12px, 9px)，覆盖上文第 69 行的 relative 定位。
   说明：本文件前面针对首页的绝对定位规则（第 36 行）被第 69 行的
   三页通用 relative 规则覆盖（选择器特异性相同、后写者胜出），
   因此这里在文件末尾再写一次三页通用的绝对定位，确保生效。
   ============================================================ */
@media (max-width: 600px) {
  body:is(.cherry-home, .cherry-list, .cherry-detail) .headerBox .box .navs {
    position: absolute !important;
    left: 12px !important;
    top: 9px !important;
    right: auto !important;
    bottom: auto !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    z-index: 100 !important;
    overflow: visible !important;
  }
  /* 列表页/详情页与首页保持一致：≤600px 时隐藏头部导航链接，
     只保留左上角的汉堡按钮（导航入口统一收进抽屉菜单）。 */
  body:is(.cherry-home, .cherry-list, .cherry-detail) .headerBox .navs > .nav-home-link,
  body:is(.cherry-home, .cherry-list, .cherry-detail) .headerBox .navs > .nav-contact-link,
  body:is(.cherry-home, .cherry-list, .cherry-detail) .headerBox .navs > a,
  body:is(.cherry-home, .cherry-list, .cherry-detail) .headerBox .navs > .item,
  body:is(.cherry-home, .cherry-list, .cherry-detail) .headerBox .navs > .nav-more-resources {
    display: none !important;
  }
  /* 列表页/详情页顶部搜索条左侧留出按钮的位置：
     否则按钮移到左上角后会压住「夸克」网盘类型选择器（列表页）
     或吃掉搜索框开头（详情页）。整条搜索栏右移 26px，
     形成「[☰] [类型▾ | 输入框 | 搜索]」的工具栏布局。
     26px 的由来：汉堡图标墨迹右缘在 39px；夸克选择器（92px 宽）里
     文字是居中的，自带约 22px 左留白，所以 padding-left = 26px 时
     实测「☰」与「夸克」的视觉间距约 22px。
     （历次：56px→间距 52px 偏松；48px→间距 44px；26px→22px，用户要求再近一点。） */
  body:is(.cherry-list, .cherry-detail) .searchBox .search {
    padding-left: 26px !important;
    box-sizing: border-box !important;
  }
  /* 放大镜搜索按钮贴右：cherry-theme.css 的响应式定稿块给
     .search .btn 设了 margin-right: 46px（把按钮推离右边缘约 47px），
     这里用同特异性选择器覆盖成 6px，让按钮靠向搜索条右端。 */
  body.cherry-list .searchBox.searchList .search .btn,
  body.cherry-detail .searchBox.searchDetail .search .btn {
    margin-right: 6px !important;
  }
}

/* ===== 桌面端导航：「加入群聊 / 提交需求」与其它导航项完全一致 =====
   根因：这两个是 <div class="item">，而其余导航项是 <a>。
   cherry-theme.css 定稿块 body.cherry-home .headerBox .navs > .item {...}
   只打中 div，把它们的字重压到 400、margin 清零、盒宽撑到 80px：
     · 字重 400（<a> 是 500）        → 看起来「没有加粗」
     · 左外边距 0、盒宽 80px（<a> 是 25px / 56px）
       → 实测「提交需求↔联系站长」空隙 48px，其它项之间只有 34px，明显不平均
   这里用更高特异性（多一个 .box）把它们扳回与 <a> 相同的盒模型与字重。
   仅在桌面（≥601px）生效，移动端抽屉里的 .item 不受影响。 */
@media (min-width: 601px) {
  body:is(.cherry-home, .cherry-list, .cherry-detail) .headerBox .box .navs > .item {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
    margin: 0 0 0 25px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border-radius: 9px !important;
    color: #35445d !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 22px !important;
    text-align: center !important;
    white-space: nowrap !important;
  }
  /* 「更多资源」是 div+button 组合，按钮自带 padding:11px 18px，
     导致它前面的文字空隙只有 27px、比其它项（34px）小。这里对齐成同一节奏：
     左边距 25px（与 <a>/<div class="item"> 一致）+ 水平内边距归零。
     菜单是 position:fixed 定位，不受此改动影响。 */
  body:is(.cherry-home, .cherry-list, .cherry-detail) .headerBox .box .navs > .nav-more-resources {
    margin: 0 0 0 25px !important;
  }
  body:is(.cherry-home, .cherry-list, .cherry-detail) .headerBox .box .navs .nav-more-trigger {
    padding: 11px 0 !important;
  }
}

/* ===== 首页公告弹窗：字体调小 + 弹窗加宽 + 内容全部显示 =====
   弹窗内容来自后台配置（内联样式 font-size:14px / padding:8px 12px 等），
   壳子样式在 app.css（.ios-announcement-*）。
   原问题：内容有 6 段，在 320px 窄弹窗里高度超过 is-scrollable 的
   max-height(400px/移动300px)，内容被截断成滚动小窗。
   方案（!important 可压过内联样式，后台改文案不用重发文件）：
     · 弹窗加宽：桌面 320→400px、移动 280→88%视宽(min 300px)
     · 字体缩小：正文/条目 14→12px、标题 17→15px、按钮 17→15px
     · 放开高度：is-scrollable 的 max-height 改 none，内容不再截断 */
.ios-announcement-dialog {
  max-width: 400px !important;
  border-radius: 12px !important;
}
.ios-announcement-title {
  font-size: 15px !important;
  padding: 14px 14px 6px !important;
}
.ios-announcement-content {
  font-size: 12px !important;
  padding: 6px 12px 14px !important;
  line-height: 1.5 !important;
  max-height: none !important;
  overflow: visible !important;
}
/* is-scrollable 是 JS 检测到溢出时加的，配合上面放开高度后不再生效；
   这里再兜底压一次，保证任何情况下内容都完整展示 */
.ios-announcement-content.is-scrollable {
  max-height: none !important;
  overflow: visible !important;
}
/* 后台配置的条目段落（粉色底圆角块），字号与内边距同步缩小 */
.ios-announcement-content p {
  font-size: 12px !important;
  margin: 5px 0 !important;
  padding: 5px 9px !important;
  border-radius: 6px !important;
  line-height: 1.5 !important;
}
/* 顶部"收藏本站"横幅段 */
.ios-announcement-content p:first-child {
  padding: 8px 9px !important;
  font-size: 12px !important;
}
.ios-announcement-content p strong,
.ios-announcement-content strong {
  font-size: inherit !important;
}
.ios-announcement-buttons {
  min-height: 40px !important;
}
.ios-announcement-button {
  font-size: 15px !important;
  padding: 9px !important;
  min-height: 40px !important;
}
/* 移动端：弹窗加宽到接近全宽，内容同样完整显示 */
@media (max-width: 768px) {
  .ios-announcement-dialog {
    width: 88% !important;
    max-width: 400px !important;
  }
  .ios-announcement-content,
  .ios-announcement-content.is-scrollable {
    max-height: none !important;
    overflow: visible !important;
  }
}






