/* dx_mobile_modmenu_v26112606 — 移动端「主题管理」操作条压缩为单行横滑
 *
 * 【问题】移动端帖子页 / 版块页顶部，管理操作（删除主题/升降/置顶/直播/高亮/精华/图章/
 * 图标/关闭/移动/分类/复制/合并/分割/修复/警告/屏蔽/标签…）被渲染成多行网格，
 * 18 个按钮占掉 ~170px 高度，首屏几乎全是按钮，正文被推到下面。
 *
 * 【处理】改成单行胶囊条 + 横向滚动，高度降到 ~44px，不删除任何功能，也不改 PC。
 * 只调整 #modmenu 的 display / 溢出与子项尺寸，不涉及其它布局。
 */
@media screen and (max-width: 720px) {
  html:root body:is(.pg_viewthread, .pg_forumdisplay) #ct #modmenu#modmenu {
    box-sizing: border-box !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    /* 站点原规则是 flex-end，配合 overflow 会把前面的按钮推到不可滚动的左侧 */
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 0 8px !important;
    padding: 6px 2px 10px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  html:root body:is(.pg_viewthread, .pg_forumdisplay) #ct #modmenu#modmenu::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  html:root body:is(.pg_viewthread, .pg_forumdisplay) #ct #modmenu#modmenu > a {
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 0 13px !important;
    white-space: nowrap !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    line-height: 1 !important;
  }
  html:root body:is(.pg_viewthread, .pg_forumdisplay) #ct #modmenu#modmenu > * {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  /* 删除主题等危险操作仍用红色，保持可辨识 */
  html:root body:is(.pg_viewthread, .pg_forumdisplay) #ct #modmenu#modmenu > a[href*="action=delete"],
  html:root body:is(.pg_viewthread, .pg_forumdisplay) #ct #modmenu#modmenu > a[onclick*="delete"] {
    color: #d64545 !important;
    -webkit-text-fill-color: #d64545 !important;
  }
}
