/* 星屿AI 注入层 */
.bz-thread{position:fixed;inset:0;z-index:80;display:flex;flex-direction:column;background:#F4F6F8;color:#1a1a20;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif}
.bz-thread[hidden]{display:none}
.bz-top{display:flex;align-items:center;gap:10px;padding:12px 18px;background:#F4F6F8;flex:0 0 auto}
.bz-top__back{display:inline-flex;align-items:center;gap:6px;border:0;background:#fff;border-radius:999px;padding:7px 13px;font-size:13px;color:#33333c;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.bz-top__back:hover{background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.08)}
.bz-top__title{font-size:13px;color:#8a8a93;margin-left:auto}
.bz-list{flex:1 1 auto;overflow-y:auto;padding:8px 20px 12px;scroll-behavior:smooth}
.bz-inner{max-width:760px;margin:0 auto;display:flex;flex-direction:column;gap:22px}
.bz-msg{display:flex;gap:10px;align-items:flex-start}
.bz-msg--user{justify-content:flex-end}
.bz-avatar{width:30px;height:30px;border-radius:9px;flex:0 0 auto;object-fit:cover}
.bz-main{display:flex;flex-direction:column;min-width:0;max-width:100%}
.bz-bubble{font-size:14.5px;line-height:1.75;white-space:pre-wrap;word-break:break-word;color:#1a1a20}
.bz-msg--user .bz-main{max-width:78%;align-items:flex-end}
.bz-msg--user .bz-bubble{background:#fff;border-radius:16px;padding:10px 15px;box-shadow:0 1px 2px rgba(0,0,0,.05);max-width:100%;width:fit-content;word-break:break-word;overflow-wrap:anywhere}
.bz-think{margin:0 0 10px;padding-left:12px;border-left:2px solid #e2e2e8}
.bz-think__btn{display:inline-flex;align-items:center;gap:6px;padding:2px 0;border:0;background:none;color:#8a8a93;font-size:12.5px;cursor:pointer}
.bz-think__btn:hover{color:#55555f}
.bz-think__body{margin-top:8px;max-height:220px;overflow-y:auto;color:#8a8a93;font-size:12.5px;line-height:1.7;white-space:pre-wrap}
.bz-think.is-live .bz-think__icon{animation:bzPulse 1.15s ease-in-out infinite}
@keyframes bzPulse{0%,100%{opacity:.35;transform:scale(.94)}50%{opacity:1;transform:scale(1)}}
.bz-acts{display:flex;gap:4px;margin-top:8px;opacity:0;transition:opacity .15s}
.bz-msg:hover .bz-acts,.bz-acts:focus-within{opacity:1}
.bz-act{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border:1px solid transparent;border-radius:8px;background:none;color:#8a8a93;font-size:12px;cursor:pointer}
.bz-act:hover{background:#fff;color:#1a1a20;border-color:#e8e8ec}
.bz-composer{flex:0 0 auto;padding:8px 20px max(16px,env(safe-area-inset-bottom))}
.bz-rule{max-width:760px;margin:0 auto 8px;padding:9px 13px;border-radius:12px;font-size:13px;line-height:1.55}
.bz-rule--warn{background:#fff5e8;color:#b55b12;border:1px solid #ffd9a8}
.bz-rule--ban{background:#fdecec;color:#c02828;border:1px solid #f6c2c2}
.bz-composer__ta:disabled{color:#9a9aa2;cursor:not-allowed}
.bz-composer__box{max-width:760px;margin:0 auto;background:#fff;border:1px solid #e6e6ea;border-radius:20px;box-shadow:0 4px 16px rgba(0,0,0,.05);padding:10px 12px 8px}
.bz-composer__ta{width:100%;border:0;outline:none;resize:none;font-size:15px;line-height:1.6;max-height:150px;min-height:44px;background:transparent;color:#1a1a20;font-family:inherit}
.bz-composer__row{display:flex;align-items:center;gap:16px;margin-top:4px}
.bz-model{margin-left:auto;display:inline-flex;align-items:center;gap:5px;border:0;background:none;font-size:12.5px;color:#55555f;cursor:pointer;padding:5px 7px;border-radius:8px}
.bz-model:hover{background:#f4f4f6}
.bz-send{width:32px;height:32px;border:0;border-radius:999px;background:#111116;color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.bz-send:disabled{background:#d7d7dd;cursor:not-allowed}
.bz-empty{color:#8a8a93;font-size:13px;text-align:center;padding:40px 0}
.bz-modal{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center}
.bz-modal[hidden]{display:none}
.bz-modal__mask{position:absolute;inset:0;background:rgba(17,17,22,.32)}
.bz-modal__panel{position:relative;width:min(680px,calc(100vw - 32px));max-height:calc(100vh - 80px);overflow:auto;background:#fff;border-radius:16px;box-shadow:0 24px 64px -12px rgba(20,20,28,.22);padding:20px 22px}
.bz-modal__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.bz-modal__title{margin:0;font-size:17px;font-weight:600}
.bz-modal__close{width:30px;height:30px;border:0;border-radius:8px;background:none;color:#8a8a93;cursor:pointer;font-size:16px}
.bz-row{display:flex;justify-content:space-between;padding:12px 0;border-bottom:1px solid #f0f0f2;font-size:13.5px}
.bz-row:last-child{border-bottom:0}
.bz-row__k{color:#6b6b74}
.bz-row__v{color:#1a1a20;font-weight:500}
.bz-btn{padding:9px 16px;border:0;border-radius:10px;background:#111116;color:#fff;font-size:13px;cursor:pointer}
.bz-btn--ghost{background:#fff;color:#1a1a20;border:1px solid #e6e6e9}
.bz-actions{display:flex;gap:8px;margin-top:16px;flex-wrap:wrap}
.bz-plan-grid{display:grid;gap:10px;grid-template-columns:repeat(3,1fr)}
@media(max-width:700px){.bz-plan-grid{grid-template-columns:1fr}}
.bz-plan{border:1px solid #ececf0;border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:7px}
.bz-plan__name{font-size:14.5px;font-weight:600}
.bz-plan__price{font-size:21px;font-weight:700}
.bz-plan__price small{font-size:12px;font-weight:400;color:#6b6b74}
.bz-plan ul{list-style:none;margin:0;padding:0;font-size:12.5px;color:#52525c}
.bz-plan li{padding:2px 0}
.bz-auth{position:fixed;inset:0;z-index:110;display:flex;justify-content:center;overflow-y:auto;overflow-x:hidden;padding:16px 8px}
.bz-auth[hidden]{display:none}
.bz-auth__mask{position:absolute;inset:0;background:rgba(17,17,22,.4)}
.bz-auth__panel{position:relative;margin:auto;width:min(380px,calc(100vw - 32px));background:#fff;border-radius:16px;padding:24px 22px;box-shadow:0 24px 64px -12px rgba(20,20,28,.24)}
.bz-auth__title{font-size:18px;font-weight:600;margin:0 0 4px}
.bz-auth__sub{font-size:12.5px;color:#8a8a93;margin:0 0 16px}
.bz-input{width:100%;padding:11px 13px;border:1px solid #e6e6e9;border-radius:10px;font-size:14px;outline:none;margin-bottom:10px;font-family:inherit}
.bz-input:focus{border-color:#111116}
.bz-auth__row{display:flex;gap:8px}
.bz-auth__code{flex:1}
.bz-auth__send{white-space:nowrap;padding:11px 14px;font-size:12.5px;border-radius:10px;border:1px solid #e6e6e9;background:#fff;cursor:pointer}
.bz-auth__send:disabled{color:#aaa;cursor:not-allowed}
.bz-auth__msg{font-size:12.5px;color:#c0392b;min-height:18px;margin:2px 0 10px}
.bz-auth__btn{width:100%;padding:11px;border:0;border-radius:10px;background:#111116;color:#fff;font-size:14px;cursor:pointer}
.bz-foot{font-size:11.5px;color:#a0a0a8;text-align:center;margin-top:12px}
.bz-md-code{background:#f6f6f8;border:1px solid #ececf0;border-radius:10px;padding:10px 12px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px;overflow-x:auto;white-space:pre;margin:8px 0}
.bz-md-table{border-collapse:collapse;width:100%;font-size:13px;margin:8px 0}
.bz-md-table th,.bz-md-table td{border:1px solid #ececf0;padding:6px 10px;text-align:left}
.bz-md-table th{background:#f7f7f9;font-weight:600}

/* ===== 窄屏适配 ===== */
.bz-top{overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.bz-top::-webkit-scrollbar{display:none}
.bz-top>*{flex:0 0 auto;white-space:nowrap}
@media(max-width:700px){
  .bz-top{padding:10px 12px;gap:8px}
  .bz-top__title{display:none}
  .bz-top__back{padding:6px 11px;font-size:12px;box-shadow:none;background:#fff}
  .bz-act{font-size:12px;padding:5px 8px}
  .bz-composer{padding:6px 10px max(10px,env(safe-area-inset-bottom))}
  .bz-composer__box{border-radius:16px;padding:8px 10px 6px}
  .bz-composer__ta{font-size:16px;max-height:110px}
  .bz-composer__row{gap:10px}
  .bz-empty{padding:24px 12px;font-size:13px}
  .bz-msg{padding:0}
  .bz-msg .bz-bubble{font-size:14px}
}

.bz-sec{margin-top:18px;padding-top:16px;border-top:1px solid #ececf0}
.bz-sec__t{font-size:13.5px;font-weight:600;color:#1a1a20;margin-bottom:6px}
.bz-sec__d{font-size:12.5px;color:#6b6b74;line-height:1.7}
.bz-key{word-break:break-all;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px;background:#f6f6f8;border:1px solid #ececf0;border-radius:10px;padding:10px 12px;margin-top:10px;color:#1a1a20;user-select:all}

/* ===== 人机验证 + 协议 ===== */
.bz-captcha{display:flex;gap:10px;align-items:center;margin-bottom:10px}
.bz-captcha__pic{flex:0 0 auto;height:44px;min-width:120px;border:1px solid #e6e6e9;border-radius:10px;overflow:hidden;display:flex;align-items:center;justify-content:center;font-size:12px;color:#8a8a93;cursor:pointer;background:#f6f6f8}
.bz-captcha__pic svg{display:block}
.bz-captcha__in{margin-bottom:0!important;flex:1;min-width:0;text-transform:uppercase}
.bz-agree{display:flex;gap:8px;align-items:flex-start;font-size:12.5px;color:#6b6b74;line-height:1.6;margin:2px 0 10px;cursor:pointer}
.bz-agree input{width:16px;height:16px;margin-top:1px;flex:0 0 auto;accent-color:#111116}
.bz-agree a{color:#111116;text-decoration:underline}

/* 极验容器 */
.bz-gt{margin:0 0 12px}
.bz-gt iframe{width:100%!important}

/* 模型列表滚动 */
#bzMB{max-height:min(62vh,520px);overflow:auto;-webkit-overflow-scrolling:touch}
#bzMB .bz-row{padding:2px 0;cursor:pointer}
#bzMB .bz-row>button.bz-act{min-height:40px;cursor:pointer;gap:10px;padding:2px 6px}
#bzMB .bz-row>button.bz-act:hover{background:#f6f6f8;border-radius:8px}
.bz-mic{width:20px;height:20px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 20px;overflow:hidden}
.bz-mic svg{display:block;width:14px;height:14px}
.bz-mic--t{font-size:11px;font-weight:700;line-height:1}
.bz-mname{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}

/* 输入框剩余额度环 */
.bz-quota{display:inline-flex;align-items:center;gap:5px;height:26px;padding:0 7px;border-radius:8px;color:#6a6a74;font-size:11.5px;cursor:pointer;font-variant-numeric:tabular-nums;-webkit-tap-highlight-color:transparent}
.bz-quota:hover{background:#f4f4f6;color:#3a3a42}
.bz-quota[hidden]{display:none}
.bz-quota__ring{display:block;flex:0 0 16px}
.bz-quota__txt{line-height:1}

/* 会员面板内的兑换码 */
.bz-redeem{display:flex;gap:8px;margin-top:10px;align-items:flex-start}
.bz-redeem .bz-input{margin-bottom:0;flex:1;min-width:0;text-transform:uppercase;letter-spacing:.5px;font-size:13px}
.bz-redeem .bz-btn{white-space:nowrap;padding:11px 16px;flex:0 0 auto}
.bz-redeem__msg{margin-top:8px;font-size:12.5px;line-height:1.5;min-height:0}
.bz-redeem__msg.is-err{color:#d0342c}
.bz-redeem__msg.is-ok{color:#0a7d43}

/* 会员套餐购买按钮 */
.bz-plan__buy{display:flex;gap:8px;margin-top:12px}
.bz-plan__buy .bz-btn{flex:1;padding:9px 10px;font-size:12.5px;text-align:center}
.bz-plan__buy .bz-btn--ghost{background:#fff}

/* ===== 移动端紧凑适配（覆盖桌面布局） ===== */
@media(max-width:700px){
  html,body{overflow-x:hidden!important;max-width:100vw}
  /* 左侧固定栏在手机上纯占地方，收起 */
  [class*="group/sidebar"]{display:none!important}
  /* 功能卡片改为两列自适应，不再固定 238px 横向溢出 */
  [class*="w-[238px]"]{width:calc(50vw - 26px)!important;min-width:0!important}
  /* 内容容器左右留白收紧 */
  [class*="max-w-[712px]"]{padding-left:12px!important;padding-right:12px!important}
  /* hero 装饰层禁止撑出视口 */
  [class*="agent-hero"]{max-width:100vw!important;overflow:hidden!important}
  /* 主容器纵向堆叠高度收紧 */
  [class*="h-screen"]{height:100dvh!important}
}

/* 移动端二次压缩 */
@media(max-width:700px){
  [class*="text-cn-title-2"]{font-size:22px!important;line-height:1.4!important}
  [class*="max-w-[712px]"]{gap:14px!important}
  [class*="agent-hero-cloud"]{opacity:.45!important}
  [class*="agent-home-scroll"]{padding-top:4px!important}
  [class*="px-3.5 py-3"]{padding:8px 10px!important}
  [class*="text-[10px]"]{font-size:10.5px!important;line-height:1.5!important}
}

/* 移动端三次微调 */
@media(max-width:700px){
  [class*="agent-home-scroll"]{padding-top:18px!important}
  [class~="flex-nowrap"][class~="text-nowrap"]{flex-wrap:wrap!important;white-space:normal!important;justify-content:center!important;text-align:center!important}
}

/* 移动端四次微调：避开固定头栏 + 页脚单行 */
@media(max-width:700px){
  [class*="agent-home-scroll"]{padding-top:84px!important}
  [class~="flex-nowrap"][class~="text-nowrap"]{flex-wrap:nowrap!important;white-space:nowrap!important;font-size:9px!important;gap:5px!important;transform:scale(.94);transform-origin:center bottom}
}

/* ===== 移动端真正的手机排版（与桌面版区分） ===== */
@media(max-width:700px){
  /* 首屏标题区收紧，别让 hero 吃掉半屏 */
  [class*="agent-home-scroll"]{padding-top:56px!important}
  h1{font-size:19px!important;line-height:1.35!important}
  /* 卡片网格更紧凑 */
  [class*="grid-cols-2"]{gap:9px!important}
  /* 卡片本身：图片压扁、间距减小 */
  [class*="cursor-pointer"][class*="items-center"][class*="rounded-2xl"]{gap:4px!important}
  [class*="cursor-pointer"] img{height:86px!important;object-fit:cover!important}
  [class*="cursor-pointer"] [class*="rounded-xl"]{border-radius:12px!important}
  /* 卡片标题字号 */
  [class*="cursor-pointer"] span,[class*="cursor-pointer"] p{font-size:13px!important;line-height:1.4!important}
  /* 输入区更矮 */
  .bz-composer{padding:6px 10px max(8px,env(safe-area-inset-bottom))!important}
  .bz-composer__box{padding:7px 10px 6px!important;border-radius:14px!important}
  .bz-composer__ta{min-height:40px!important;font-size:15px!important;line-height:1.5!important}
  .bz-composer__row{margin-top:2px!important;gap:10px!important}
  .bz-send{width:30px!important;height:30px!important}
  /* 页脚缩到一行极小 */
  .bz-foot{font-size:10px!important;margin-top:6px!important}
}

/* 移动端标题最终收敛 */
@media(max-width:700px){
  [class*="text-cn-title-2"]{font-size:19px!important;line-height:1.35!important}
  /* 顶部导航压低 */
  header,[class*="app"]>div:first-child{padding-top:0}
}

/* 手机端输入区横向归位：工具在左、模型紧随、发送独立靠右 */
@media(max-width:700px){
  .bz-composer__row{gap:8px!important}
  .bz-model{margin-left:0!important;margin-right:auto!important;max-width:62%;overflow:hidden}
  .bz-model #bzModelName{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}

/* ===== 移动端布局加固：关闭系统字体自动放大，防止内容被撑宽 ===== */
@media(max-width:700px){
  html{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important}
  body{-webkit-text-size-adjust:100%!important}
  /* 网格列宽强制收缩，内容再长也不撑破 */
  [class*="grid-cols-2"]{grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important}
  /* 输入区不越界 */
  [class*="overflow-hidden relative"][class*="px-3.5"]{max-width:100%!important;box-sizing:border-box!important}
  [class*="justify-between"][class*="p-3"]{max-width:100%!important;box-sizing:border-box!important;overflow:hidden!important}
  /* 卡片内图片不撑宽 */
  [class*="cursor-pointer"] img{max-width:100%!important}
}

/* ===== 320px 窄屏（华为/荣耀等 320 视口）适配 ===== */
@media(max-width:700px){
  /* 上游容器有 min-w-[334px]，320 屏会被硬撑出界 */
  [class*="min-w-[334px]"]{min-width:0!important}
  /* 输入区宽度跟随父容器 */
  [class*="overflow-hidden relative"][class*="px-3.5"]{width:100%!important}
}

/* 页脚在 320 窄屏允许换行，避免链接被裁 */
@media(max-width:700px){
  [class~="flex-nowrap"][class~="text-nowrap"]{
    flex-wrap:wrap!important;white-space:normal!important;
    justify-content:center!important;text-align:center!important;
    font-size:9.5px!important;line-height:1.55!important;gap:3px 8px!important;
    transform:none!important;padding:0 6px!important
  }
}

/* 页脚换行时保持每项完整 */
@media(max-width:700px){
  [class~="flex-nowrap"][class~="text-nowrap"] > *{white-space:nowrap!important}
  [class~="flex-nowrap"][class~="text-nowrap"] > div{gap:6px!important}
}

/* 页脚：窄屏按宽度分档，保证一行装得下 */
@media(max-width:340px){
  [class~="flex-nowrap"][class~="text-nowrap"]{
    flex-wrap:nowrap!important;white-space:nowrap!important;font-size:8px!important;
    gap:4px!important;transform:none!important;padding:0 2px!important;letter-spacing:-.2px
  }
}
@media(min-width:341px) and (max-width:700px){
  [class~="flex-nowrap"][class~="text-nowrap"]{
    flex-wrap:nowrap!important;white-space:nowrap!important;font-size:9px!important;
    gap:5px!important;transform:none!important
  }
}

.bz-skill{position:fixed;inset:0;z-index:120;display:flex;justify-content:center;overflow-y:auto;padding:16px 8px}
.bz-skill[hidden]{display:none}
.bz-skill__panel{margin:auto;width:min(440px,calc(100vw - 32px))}
.bz-skill__title{font-size:18px;font-weight:600;margin:0 0 4px}
.bz-skill__desc{font-size:12.5px;color:#8a8a93;margin:0 0 16px}
.bz-skill__list{display:flex;flex-direction:column;gap:8px;margin-bottom:14px}
.bz-skill__item{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 14px;border:1px solid #ececf0;border-radius:12px;background:#fff;font-size:13.5px;cursor:pointer;text-align:left}
.bz-skill__item:hover{border-color:#4B57FF;background:#f7f8ff}
.bz-skill__item svg{flex:none;opacity:.5}
.bz-skill__free{width:100%;padding:11px;border:1px solid #e6e6e9;border-radius:10px;background:#fff;font-size:13.5px;cursor:pointer}
