@media (max-width:700px){
  html,body{font-size:16px}

  .app{flex-direction:row;gap:0;padding:0;max-width:100%;border-radius:0}

  /* ===== 手机端侧栏 ===== */
  .sidebar{
    position:fixed;top:0;left:0;bottom:0;
    width:260px;max-height:100vh;
    border-radius:0;border:none;border-right:1px solid var(--border);
    transform:translateX(-100%);
    visibility:hidden;
    opacity:0;
    transition:transform .22s ease,opacity 0s linear .22s,visibility 0s linear .22s;
    z-index:300;
    box-shadow:none;
    pointer-events:none;
  }
  .sidebar.collapsed{
    transform:translateX(-100%);
    visibility:hidden;opacity:0;width:260px;
    pointer-events:none;
  }
  .sidebar.mobile-open{
    transform:translateX(0);
    visibility:visible;opacity:1;
    transition:transform .22s ease,opacity 0s,visibility 0s;
    pointer-events:auto;
  }
  .sidebar-toggle{display:flex}

  .mobile-mask{
    position:fixed;inset:0;background:rgba(0,0,0,.35);
    z-index:290;display:none;opacity:0;transition:opacity .22s;
  }
  .mobile-mask.show{display:block;opacity:1}

  .main{border-radius:0;border:none}

  /* ===== 顶栏 ===== */
  .header{padding:8px 12px;gap:6px;flex-wrap:nowrap}
  .header-left{gap:6px;flex:1 1 auto;min-width:0;overflow:hidden}
  .header-right{gap:4px;flex-shrink:0}
  .brand{font-size:14px;flex-shrink:0}
  .brand span{display:none}
  .made-by{
    display:inline-flex !important;
    font-size:10px;
    padding:2px 7px;
    border-radius:8px;
    margin-left:0;
    flex-shrink:1;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .sidebar-toggle{padding:6px 8px;font-size:14px}
  .toggle-btn{width:30px;height:30px}
  .toggle-btn .ic{width:14px;height:14px}

  .model-trigger{
    width:32px;height:32px;padding:0;
    display:inline-flex;align-items:center;justify-content:center;
    border-radius:8px;
  }
  .model-trigger .mt-label{display:none}
  .model-trigger .mt-arrow{
    width:14px;height:14px;
    display:inline-flex;align-items:center;justify-content:center;
  }

  .sidebar-header button{width:32px;height:32px}
  .sidebar-header button svg{width:20px;height:20px}

  .conv-titlebar{padding:6px 14px;font-size:13px;min-height:34px}

  /* 会话项 active 保持高亮 */
  .conv-item.active{
    background:#e0e0e0 !important;
    color:#1f1f1f !important;
    font-weight:600 !important;
  }

  /* ===== 消息区 ===== */
  .messages{padding:16px 14px;display:flex;flex-direction:column}
  .msg{margin-bottom:20px}
  .msg-user .bubble{max-width:88%;padding:10px 14px}

  .welcome{margin:auto 0;padding:0 16px;text-align:center;max-width:100%}
  .welcome h1{font-size:20px}
  .welcome p{font-size:13px}

  .input-area{
    padding:10px 12px 12px;
    padding-bottom:calc(12px + env(safe-area-inset-bottom,0px));
  }
  .input-box{padding:8px 8px 8px 12px;border-radius:12px;gap:6px 8px}
  .input-box textarea{font-size:16px;min-height:48px;max-height:200px}

  .tool-btn{height:30px;padding:0 10px;border-radius:15px;width:auto}
  .tool-btn .ic{width:14px;height:14px}
  .tool-btn .tool-text{display:inline !important;font-size:12px}
  .input-tools{gap:6px;flex-wrap:nowrap;overflow-x:auto}

  .attach-btn{width:34px;height:34px;border-radius:9px}
  .attach-btn .ic{width:16px;height:16px}
  .send-btn{width:34px;height:34px;border-radius:9px}

  .ai-content table{font-size:13px}
  .thinking-box{width:100%}
  .action-btn{width:26px;height:26px}
  .action-btn .ic{width:14px;height:14px}
  .variant-btn{width:20px;height:20px}
  .variant-btn .ic{width:12px;height:12px}
  .variant-label{font-size:11px;min-width:24px}
  .attachment-area{max-height:90px}
  .drop-mask{font-size:16px}
  .mermaid-viewport{height:300px;min-height:200px}
  .mermaid-canvas{padding:10px}

  /* ===== 代码块 ===== */
  .code-block-header{
    padding:4px 10px;
    font-size:11px;
    min-height:28px;
    box-shadow:
      -8px 0 0 0 var(--panel),
       8px 0 0 0 var(--panel),
       0 -24px 0 0 var(--panel);
  }
  .code-block pre{
    padding:12px 14px;
    font-size:12px;
  }
  .code-block-actions button{
    width:22px;height:22px;
  }
  .code-block-actions button .ic{
    width:13px;height:13px;
  }

  /* ===== 长按显示三个点 ===== */
  .conv-item.more-open .conv-more{
    opacity:1;pointer-events:auto;
    background:#ececec;color:#4a4a4a;
  }
}