/* =====================================================================
   手机动线（工程 11-02 · 主理人 11:12 二号 bot #72748「解决手机板杂乱的动线设计」· 工程 S794 11:26 方案 OK）
   只在手机宽（≤720px）而且分页已经接手（body.jx-tabbed）才生效：电脑版一条都不碰，没有 JS 也照旧。
   原则：同一件事只出现一次、第一屏主钮最多 3 颗、中文字一个不改只搬位置（11-08 #6015 起不再收合：内容一律摊开）。
   直播页·下播：官方合约（含分红）→「狙姬下次开播」＋时间表一张卡（4 场直接摊开）→ 直播精华 → 她刚刚的判断（标上一场）
               → 她正在深入研究 → 她刚才扫了什么 → 她正在看（K 线不再盖休息遮罩）→ 直播留言（整串摊开）→ 猎杀2366 一行 → 精华全集
   直播页·开播：官方合约 → 直播画面＋字幕 → 开声音 → 直播留言 → 判断 → 研究 → 扫链 → K 线 → 时间表一行
   页首 ☰ 跟「上一场」由 juji-tabs.js 加，下播／开播由它抄到 body.jx-air-off；这里第一段先让它们在任何宽度都看不到。
   ===================================================================== */
#jx-m-menu,
#jx-m-last {
  display: none;
}

@media (max-width: 720px) {
  /* ---------- 1. 页首一行：头像＋状态＋站名（放不下就省略号）＋中文｜EN＋☰ ---------- */
  body.jx-tabbed .stream-header {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 10px;
    row-gap: 0;
    padding: 8px var(--juji-margin);
  }
  body.jx-tabbed .stream-header .header-left {
    order: 1;
    flex: 1 1 0;
    min-width: 0;
  }
  body.jx-tabbed .stream-header .brand-anchor,
  body.jx-tabbed .stream-header .brand-meta {
    min-width: 0;
  }
  body.jx-tabbed .stream-header .brand-logo {
    flex: none;
    width: 30px;
    height: 30px;
  }
  body.jx-tabbed .stream-header .brand-title-row {
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
  }
  body.jx-tabbed .stream-header .live-pill {
    flex: none;
  }
  body.jx-tabbed .stream-header .brand-wordmark,
  body.jx-tabbed .stream-header #brand-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.jx-tabbed:lang(en) .stream-header .brand-title-row {
    flex-wrap: wrap;
    row-gap: 1px;
    column-gap: 6px;
  }
  body.jx-tabbed:lang(en) .stream-header .live-pill {
    font-size: 12px;
    line-height: 1.15;
  }
  body.jx-tabbed:lang(en) .stream-header .brand-wordmark,
  body.jx-tabbed:lang(en) .stream-header #brand-title {
    flex: 1 1 100%;
    font-size: 13px;
    line-height: 1.2;
  }
  body.jx-tabbed .stream-header .header-right {
    display: contents;
  }
  body.jx-tabbed .stream-header:not(.is-m-menu-open) .header-right > :not(#btn-lang-toggle):not(#jx-m-menu) {
    display: none;
  }
  body.jx-tabbed .stream-header #btn-lang-toggle {
    order: 2;
    flex: none;
  }
  body.jx-tabbed .stream-header #jx-m-menu {
    order: 3;
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1.5px solid var(--juji-ink);
    border-radius: 6px;
    background: transparent;
    color: var(--juji-ink);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
  }
  body.jx-tabbed .stream-header.is-m-menu-open #jx-m-menu {
    background: var(--juji-ink);
    color: var(--juji-ground);
  }
  /* ☰ 打开：选单项一行一个，接在页首第一行下面（把下面推开、不盖住） */
  body.jx-tabbed .stream-header.is-m-menu-open .header-right > :not(#btn-lang-toggle):not(#jx-m-menu) {
    order: 4;
    display: flex;
    flex: 1 1 100%;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-height: 44px;
    margin: 0;
    padding: 0 2px;
    border: 0;
    border-top: 1px solid rgba(20, 17, 11, 0.18);
    border-radius: 0;
    background: transparent;
    text-align: left;
    white-space: normal;
  }

  /* ---------- 2. 直播页换顺序（只在直播页） ---------- */
  body.jx-tabbed[data-tab-active="live"] {
    display: flex;
    flex-direction: column;
  }
  body.jx-tabbed[data-tab-active="live"] > * {
    order: 90;
  }
  body.jx-tabbed[data-tab-active="live"] > #juji-ticker {
    order: 10;
  }
  body.jx-tabbed[data-tab-active="live"] > #jx-tabs {
    order: 20;
  }
  body.jx-tabbed[data-tab-active="live"] > #juji-ca {
    order: 30;
  }
  body.jx-tabbed[data-tab-active="live"] > #juji-offair {
    order: 40;
  }
  body.jx-tabbed[data-tab-active="live"] > #juji-schedule-card {
    order: 50;
  }
  body.jx-tabbed[data-tab-active="live"] > #juji-hero {
    order: 60;
  }
  /* 开播：时间表一行放到直播画面后面 */
  body.jx-tabbed[data-tab-active="live"]:not(.jx-air-off) > #juji-schedule-card {
    order: 65;
  }
  body.jx-tabbed[data-tab-active="live"] > #juji-ca-hunt {
    order: 70;
  }
  body.jx-tabbed[data-tab-active="live"] > #juji-clips {
    order: 80;
  }
  /* 猎杀2366 大块看板在直播页收掉：分页列「🎯 猎杀2366」跟页尾那一行都通专页（互动页的合约条照旧完整） */
  body.jx-tabbed[data-tab-active="live"] > #juji-hunt {
    display: none;
  }
  body.jx-tabbed[data-tab-active="live"] #juji-ca-hunt > :not(.juji-ca-hunt-name):not(#juji-ca-hunt-page) {
    display: none;
  }
  body.jx-tabbed[data-tab-active="live"] #juji-ca-hunt {
    flex-wrap: nowrap;
    justify-content: space-between;
    column-gap: 12px;
  }
  body.jx-tabbed[data-tab-active="live"] #juji-ca-hunt #juji-ca-hunt-page {
    flex: none;
  }

  /* ---------- 3. 官方合约：一行地址＋［复制］［PancakeSwap 买入］，分红数字／贴地址领／BscScan／推特接在下面一律摊开（11-08 #6015） ---------- */
  body.jx-tabbed #juji-ca #juji-ca-buy {
    order: 5;
  }
  body.jx-tabbed #juji-ca #juji-ca-scan,
  body.jx-tabbed #juji-ca #juji-ca-x {
    order: 7;
  }
  body.jx-tabbed #juji-ca #juji-dividend {
    order: 8;
  }

  /* ---------- 4.「狙姬下次开播」＋时间表＝同一张卡（下播时）；开播时时间表单独一行放在直播画面后面 ---------- */
  body.jx-tabbed[data-tab-active="live"] #juji-offair {
    margin: 12px var(--juji-margin) 0;
    padding: 12px 14px 4px;
    border-radius: 10px 10px 0 0;
    background: #14110b;
  }
  /* 停播改版中（班表 paused）：时间表那半张收起来了，这张卡自己收尾 */
  body.jx-tabbed.juji-live-paused[data-tab-active="live"] #juji-offair {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-radius: 10px;
  }
  body.jx-tabbed[data-tab-active="live"] #juji-schedule-card {
    margin: 12px var(--juji-margin);
    padding: 10px 14px;
    border: 0;
    border-radius: 10px;
  }
  body.jx-tabbed.jx-air-off[data-tab-active="live"] #juji-schedule-card {
    margin-top: 0;
    padding-top: 6px;
    border-top: 1px dashed rgba(245, 189, 79, 0.28);
    border-radius: 0 0 10px 10px;
  }
  body.jx-tabbed #juji-schedule-card .juji-schedule-title {
    font-size: 14px;
    white-space: normal;
  }
  /* 下播时「交易系统 24 小时照跑」上面那一行已经讲了 */
  body.jx-tabbed.jx-air-off #juji-schedule-card .juji-schedule-24h {
    display: none;
  }

  /* ---------- 5. 主画面拆开排：外框留着（底色＋涂鸦纹），里面三层包装拆掉，每一块自己排顺序 ---------- */
  body.jx-tabbed[data-tab-active="live"] #juji-hero {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    padding: 16px 0 24px;
  }
  body.jx-tabbed[data-tab-active="live"] #juji-hero .juji-hero-words,
  body.jx-tabbed[data-tab-active="live"] #juji-hero .juji-hero-stage,
  body.jx-tabbed[data-tab-active="live"] #juji-hero .juji-pip-cam {
    display: contents;
  }
  body.jx-tabbed[data-tab-active="live"] #juji-hero .juji-hero-words > *,
  body.jx-tabbed[data-tab-active="live"] #juji-hero .juji-hero-stage > *,
  body.jx-tabbed[data-tab-active="live"] #juji-hero > .juji-chat,
  body.jx-tabbed[data-tab-active="live"] #juji-hero .pip-video-stage,
  body.jx-tabbed[data-tab-active="live"] #juji-hero .juji-cam-caption {
    margin: 0 var(--juji-margin);
  }
  /* 「狙姬正在直播／狙姬现在没在直播」大标题：页首状态灯＋下面那张卡已经讲了；字留给读屏 */
  body.jx-tabbed[data-tab-active="live"] #juji-hero-title {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  /* 第二份时间表＝跟上面那张卡重复 */
  body.jx-tabbed[data-tab-active="live"] #juji-hero-timetable {
    display: none;
  }
  body.jx-tabbed[data-tab-active="live"] #juji-reel {
    order: 1;
  }
  body.jx-tabbed[data-tab-active="live"] #juji-hero .pip-video-stage {
    order: 2;
  }
  body.jx-tabbed[data-tab-active="live"] #juji-hero .juji-cam-caption {
    order: 3;
  }
  body.jx-tabbed[data-tab-active="live"] #btn-unlock-voice-director {
    order: 4;
    width: auto;
  }
  body.jx-tabbed[data-tab-active="live"] #juji-hero-sub {
    order: 5;
  }
  body.jx-tabbed[data-tab-active="live"] #juji-chat {
    order: 6;
  }
  body.jx-tabbed[data-tab-active="live"] #ws-juji-verdict-card {
    order: 7;
  }
  body.jx-tabbed[data-tab-active="live"] #juji-research {
    order: 8;
  }
  body.jx-tabbed[data-tab-active="live"] #juji-scan {
    order: 9;
  }
  body.jx-tabbed[data-tab-active="live"] #juji-stage-head {
    order: 10;
  }
  body.jx-tabbed[data-tab-active="live"] #ws-chart-stage {
    order: 11;
    margin-top: -8px;
  }

  /* ---------- 6. 下播：空椅子／下播字幕／开声音／「她还在扫链…下一场…」都跟上面那张卡重复，收掉；K 线不再盖休息遮罩 ---------- */
  body.jx-tabbed.jx-air-off[data-tab-active="live"] #juji-hero .pip-video-stage,
  body.jx-tabbed.jx-air-off[data-tab-active="live"] #juji-hero .juji-cam-caption,
  body.jx-tabbed.jx-air-off[data-tab-active="live"] #btn-unlock-voice-director,
  body.jx-tabbed.jx-air-off[data-tab-active="live"] #juji-hero-sub,
  body.jx-tabbed[data-tab-active="live"] #juji-hero .juji-stage-offair {
    display: none;
  }
  body.jx-tabbed.jx-air-off[data-tab-active="live"] #jx-m-last {
    display: inline-block;
    align-self: flex-start;
    margin: 0 0 6px;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--juji-ink);
    color: var(--juji-gold);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
  }
  /* 直播留言：下播时放到最后，整串摊开（11-08 #6015） */
  body.jx-tabbed.jx-air-off[data-tab-active="live"] #juji-chat {
    order: 12;
  }

  /* iPhone 点进字小于 16px 的框会整页自动放大（11-02 19:37 实量 390：贴 CA 框 13px、VIP 钱包／加速 tx 框 12px、领分红钱包框 12px） */
  body.jx-tabbed .juji-sleuth-input,
  body.jx-tabbed .juji-sleuth-field-input,
  body.jx-tabbed .juji-div-input,
  body.jx-tabbed #gang-search-input,
  body.jx-tabbed #chat-input {
    font-size: 16px;
    min-height: 44px;
    box-sizing: border-box;
  }

  /* 11-03 手机品管：收合区防横向溢出、全分页面可点击目标 >=44px、次要字级保底 >=12px */
  body.jx-tabbed .juji-more {
    max-width: 100%;
    overflow-x: hidden;
  }
  body.jx-tabbed .stream-header #btn-lang-toggle,
  body.jx-tabbed #juji-ca #btn-copy-official-ca,
  body.jx-tabbed #juji-ca #juji-ca-buy,
  body.jx-tabbed #juji-research-prev,
  body.jx-tabbed #juji-research-next,
  body.jx-tabbed #juji-reel-sound,
  body.jx-tabbed #juji-hold-sub,
  body.jx-tabbed .juji-pos-link,
  body.jx-tabbed .pos-token-link,
  body.jx-tabbed .pos-status-link,
  body.jx-tabbed .pos-sub-link,
  body.jx-tabbed #btn-copy-bullet-ca,
  body.jx-tabbed #juji-bullet-buy,
  body.jx-tabbed #juji-bullet-scan,
  body.jx-tabbed #juji-bullet-x,
  body.jx-tabbed #juji-bullet-summary,
  body.jx-tabbed .juji-agent-radar-link,
  body.jx-tabbed .juji-pos-small-summary {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
  }
  body.jx-tabbed #juji-research-prev,
  body.jx-tabbed #juji-research-next {
    justify-content: center;
  }
  body.jx-tabbed .juji-hold-table th,
  body.jx-tabbed .pos-sub,
  body.jx-tabbed .pos-status-link,
  body.jx-tabbed .juji-pos-ca {
    font-size: 12px;
  }
  body.jx-tabbed .pos-sub-link {
    overflow-wrap: normal;
    word-break: normal;
  }
  body.jx-tabbed .juji-pos-ca {
    max-width: 22ch;
    word-break: break-all;
  }
}
