/* ============ 米风格设计令牌（MIUI / HyperOS） ============ */
:root{
  --bg:#F7F7FA; --surface:#F2F2F6; --card:#FFFFFF;
  --brand:#FF6900; --brand-hover:#FF8124; --brand-soft:#FFF1E8; --brand-line:#FFD9BF;
  --text:#17181A; --text-2:#6B6F76; --text-3:#9AA0A6;
  --line:rgba(0,0,0,.06); --line-2:rgba(0,0,0,.1);
  --ok:#00B578; --warn:#FF9F0A; --danger:#FF3B30; --info:#3B82F6;
  --r-card:20px; --r-sm:12px; --r-pill:999px;
  --sh:0 2px 12px rgba(0,0,0,.05);
  --sh-hover:0 6px 20px rgba(0,0,0,.08);
  --ease:cubic-bezier(.2,0,0,1);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg); color:var(--text);
  font:14px/1.55 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Segoe UI",sans-serif;
  -webkit-font-smoothing:antialiased;
}
button,input,select,textarea{font-family:inherit;color:inherit}
.hidden{display:none !important}
.sprite{position:absolute;width:0;height:0;overflow:hidden}
svg.ico{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round}

/* ============ 登录页 ============ */
.login-wrap{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;overflow:hidden}
.login-bg{position:absolute;inset:0;background:
  radial-gradient(900px 480px at 15% 0%, #FFE8D6 0%, rgba(255,232,214,0) 62%),
  radial-gradient(760px 420px at 95% 25%, #FFD9BF 0%, rgba(255,217,191,0) 60%),
  linear-gradient(180deg,#FDFCFB 0%,#F7F7FA 100%);}
.login-card{position:relative;width:420px;max-width:calc(100vw - 40px);background:var(--card);
  border-radius:24px;box-shadow:0 18px 50px rgba(255,105,0,.10),0 2px 12px rgba(0,0,0,.06);padding:28px 26px 24px}
.login-brand{display:flex;gap:12px;align-items:center;margin-bottom:20px}
.brand-mark{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;color:#fff;font-weight:800;letter-spacing:.5px;
  background:linear-gradient(135deg,#FF8A3D,#FF6900);box-shadow:0 6px 16px rgba(255,105,0,.28)}
.brand-mark.sm{width:34px;height:34px;border-radius:11px;font-size:12px}
.brand-title{font-size:17px;font-weight:700;letter-spacing:.2px}
.brand-sub{font-size:12px;color:var(--text-3);margin-top:2px}
.tabs{display:flex;gap:6px;background:var(--surface);padding:4px;border-radius:var(--r-pill);margin-bottom:18px}
.tab{flex:1;border:0;background:transparent;height:36px;border-radius:var(--r-pill);font-size:13px;color:var(--text-2);cursor:pointer;
  transition:all .15s var(--ease)}
.tab.active{background:#fff;color:var(--text);font-weight:600;box-shadow:0 1px 4px rgba(0,0,0,.06)}
.login-form{display:flex;flex-direction:column;gap:14px}
.field{display:flex;flex-direction:column;gap:7px;font-size:13px;color:var(--text-2)}
.field input{height:48px;border:0;background:var(--surface);border-radius:var(--r-sm);padding:0 14px;font-size:14px;color:var(--text);
  transition:box-shadow .15s var(--ease),background .15s}
.field input:focus{outline:0;background:#fff;box-shadow:0 0 0 2px var(--brand) inset}
.field input::placeholder{color:#B4B9BF}
.code-row{display:flex;gap:10px;align-items:center}
.code-boxes{display:flex;gap:6px;flex:1}
.code-boxes input{width:100%;height:46px;text-align:center;font-size:18px;font-weight:600;background:var(--surface);border:0;border-radius:10px}
.code-boxes input:focus{outline:0;background:#fff;box-shadow:0 0 0 2px var(--brand) inset}
.row-between{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--text-2)}
.check{display:flex;gap:6px;align-items:center;cursor:pointer}
.link{color:var(--brand);cursor:pointer;font-size:12px}
.hint{font-size:12px;color:var(--text-3);line-height:1.6}
.banner{background:#FFF6E5;color:#8A5A00;border:1px solid #FFE0A3;border-radius:12px;padding:10px 12px;font-size:12px;line-height:1.6}
.login-foot{position:relative;margin-top:18px;font-size:12px;color:var(--text-3)}

/* ============ 按钮 / 标签 ============ */
.btn{height:40px;padding:0 18px;border-radius:var(--r-pill);border:0;cursor:pointer;font-size:13px;font-weight:600;
  transition:all .15s var(--ease);display:inline-flex;align-items:center;justify-content:center;gap:6px}
.btn:active{transform:scale(.985)}
.btn-primary{background:var(--brand);color:#fff;box-shadow:0 4px 14px rgba(255,105,0,.25)}
.btn-primary:hover{background:var(--brand-hover)}
.btn-ghost{background:var(--surface);color:var(--text)}
.btn-ghost:hover{background:#EAEAEF}
.btn-line{background:#fff;color:var(--text);border:1px solid var(--line-2)}
.btn-danger{background:#FFF0EF;color:var(--danger)}
.btn-sm{height:32px;padding:0 12px;font-size:12px}
.btn-block{width:100%;height:48px;font-size:14px}
.btn[disabled]{opacity:.4;cursor:not-allowed;box-shadow:none}
.pill{display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 9px;border-radius:var(--r-pill);font-size:11px;font-weight:600}
.pill-ok{background:rgba(0,181,120,.12);color:#00875C}
.pill-warn{background:rgba(255,159,10,.14);color:#9A5B00}
.pill-danger{background:rgba(255,59,48,.12);color:#C22620}
.pill-info{background:rgba(59,130,246,.12);color:#1D4ED8}
.pill-brand{background:var(--brand-soft);color:#C25100}
.pill-gray{background:var(--surface);color:var(--text-2)}
.chip{display:inline-flex;height:26px;padding:0 10px;border-radius:var(--r-pill);background:var(--surface);color:var(--text-2);font-size:12px;align-items:center;gap:5px}
.dot{width:7px;height:7px;border-radius:50%;background:var(--danger);display:inline-block}

/* ============ 应用外壳 ============ */
.app{display:flex;min-height:100vh}
.side{width:224px;flex:0 0 224px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;
  position:sticky;top:0;height:100vh}
.side-brand{display:flex;gap:10px;align-items:center;padding:18px 16px 14px}
.side-title{font-size:14px;font-weight:700}
.side-sub{font-size:11px;color:var(--text-3);margin-top:1px}
.nav{flex:1;overflow-y:auto;padding:4px 10px 12px}
.nav-group{font-size:11px;color:var(--text-3);padding:12px 8px 6px;letter-spacing:.4px}
.nav-item{display:flex;align-items:center;gap:10px;height:44px;padding:0 12px;border-radius:var(--r-sm);color:var(--text-2);
  cursor:pointer;font-size:13px;position:relative;transition:all .15s var(--ease)}
.nav-item:hover{background:#FAFAFB;color:var(--text)}
.nav-item.active{background:var(--brand-soft);color:#C25100;font-weight:600}
.nav-item.active::before{content:"";position:absolute;left:0;top:11px;bottom:11px;width:3px;border-radius:2px;background:var(--brand)}
.nav-item .badge{margin-left:auto;min-width:18px;height:18px;border-radius:9px;background:var(--brand);color:#fff;font-size:11px;
  display:grid;place-items:center;padding:0 5px;font-weight:600}
.nav-item.active .badge{background:#fff;color:var(--brand)}
.side-foot{border-top:1px solid var(--line);padding:10px;display:flex;gap:9px;align-items:center}
.avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:13px;font-weight:700;
  background:linear-gradient(135deg,#FF8A3D,#FF6900)}
.avatar.sm{width:28px;height:28px;font-size:12px}
.who{flex:1;min-width:0}
.who-name{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.who-role{font-size:11px;color:var(--text-3)}
.icon-btn{width:32px;height:32px;border-radius:10px;border:0;background:transparent;cursor:pointer;color:var(--text-2);
  display:grid;place-items:center;font-size:15px;position:relative}
.icon-btn:hover{background:var(--surface)}

.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{height:56px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;
  justify-content:space-between;padding:0 20px;position:sticky;top:0;z-index:20}
.crumb{font-size:15px;font-weight:600}
.top-actions{display:flex;align-items:center;gap:10px}
.search{height:34px;width:260px;border:0;background:var(--surface);border-radius:var(--r-pill);padding:0 14px;font-size:13px}
.search:focus{outline:0;background:#fff;box-shadow:0 0 0 2px var(--brand) inset}
.bell .dot{position:absolute;top:5px;right:5px;width:7px;height:7px}
.top-user{position:relative}
.top-menu{position:absolute;right:0;top:36px;background:#fff;border-radius:14px;box-shadow:var(--sh-hover);border:1px solid var(--line);
  padding:6px;min-width:150px;display:none;z-index:30}
.top-user.open .top-menu{display:block}
.top-menu-item{display:block;width:100%;text-align:left;border:0;background:transparent;padding:9px 10px;border-radius:9px;
  font-size:13px;cursor:pointer;color:var(--text-2)}
.top-menu-item:hover{background:var(--surface);color:var(--text)}

.view{padding:20px 22px 40px;max-width:1560px;width:100%}

/* ============ 页面通用 ============ */
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:16px}
.h1{font-size:26px;font-weight:700;margin:0;letter-spacing:.2px}
.sub{font-size:12px;color:var(--text-3);margin-top:4px}
.head-actions{display:flex;gap:8px;align-items:center}
.card{background:var(--card);border-radius:var(--r-card);box-shadow:var(--sh);padding:20px;transition:box-shadow .18s var(--ease)}
.card:hover{box-shadow:var(--sh-hover)}
.card-title{font-size:17px;font-weight:600;margin:0 0 4px}
.card-sub{font-size:12px;color:var(--text-3)}
.grid{display:grid;gap:14px}
.g4{grid-template-columns:repeat(4,minmax(0,1fr))}
.g3{grid-template-columns:repeat(3,minmax(0,1fr))}
.g2{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (max-width:1240px){.g4{grid-template-columns:repeat(2,minmax(0,1fr))}.g3{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:980px){.side{display:none}.g4,.g3,.g2{grid-template-columns:1fr}}

.kpi{display:flex;flex-direction:column;gap:10px}
.kpi-label{font-size:12px;color:var(--text-3);display:flex;justify-content:space-between;align-items:center}
.kpi-num{font-size:28px;font-weight:700;letter-spacing:-.5px}
.kpi-num small{font-size:13px;font-weight:600;color:var(--text-3);margin-left:4px}
.kpi-foot{font-size:12px;color:var(--text-3)}
.up{color:var(--ok);font-weight:600}.down{color:var(--danger);font-weight:600}

.toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:14px 0}
.toolbar .spacer{flex:1}
.seg{display:inline-flex;background:var(--surface);border-radius:var(--r-pill);padding:3px}
.seg button{border:0;background:transparent;height:30px;padding:0 12px;border-radius:var(--r-pill);font-size:12px;color:var(--text-2);cursor:pointer}
.seg button.on{background:#fff;color:var(--text);font-weight:600;box-shadow:0 1px 3px rgba(0,0,0,.06)}

table.tb{width:100%;border-collapse:collapse}
table.tb th{font-size:12px;color:var(--text-3);font-weight:500;text-align:left;padding:10px 12px;border-bottom:1px solid var(--line)}
table.tb td{padding:12px;border-bottom:1px solid var(--line);font-size:13px;vertical-align:middle}
table.tb tr:hover td{background:#FAFAFB}
table.tb tr:last-child td{border-bottom:0}
.tb-wrap{overflow-x:auto}
.empty{padding:40px 20px;text-align:center;color:var(--text-3);font-size:13px}
.empty .big{font-size:28px;margin-bottom:8px;color:#D9DCE1}
.skeleton{height:14px;border-radius:7px;background:linear-gradient(90deg,#F2F2F6,#FAFAFB,#F2F2F6);background-size:200% 100%;
  animation:sk 1.2s infinite}
@keyframes sk{0%{background-position:0 0}100%{background-position:-200% 0}}
.fade{animation:fade .18s var(--ease)}
@keyframes fade{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}

/* ============ 会话工作台 ============ */
.wb{display:grid;grid-template-columns:300px minmax(0,1fr) 320px;gap:14px;align-items:start}
@media (max-width:1240px){.wb{grid-template-columns:1fr}}
.sess-list{max-height:calc(100vh - 190px);overflow:auto}
.sess{padding:12px;border-radius:14px;cursor:pointer;display:flex;flex-direction:column;gap:5px;border:1px solid transparent}
.sess:hover{background:#FAFAFB}
.sess.on{background:var(--brand-soft);border-color:var(--brand-line)}
.sess-top{display:flex;justify-content:space-between;gap:8px;font-size:13px;font-weight:600}
.sess-sub{font-size:12px;color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sess-tags{display:flex;gap:5px;margin-top:2px}
.chat{display:flex;flex-direction:column;height:calc(100vh - 190px);min-height:520px}
.chat-head{display:flex;align-items:center;gap:10px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.chat-body{flex:1;overflow-y:auto;padding:14px 4px;display:flex;flex-direction:column;gap:10px}
.msg{max-width:76%;padding:10px 13px;border-radius:16px;font-size:13px;line-height:1.6;position:relative}
.msg.buyer{background:var(--surface);color:var(--text);border-bottom-left-radius:4px;align-self:flex-start}
.msg.ai,.msg.staff{background:var(--brand);color:#fff;border-bottom-right-radius:4px;align-self:flex-end}
.msg.system{align-self:center;background:#EEF6FF;color:#1D4ED8;font-size:12px;border-radius:var(--r-pill);padding:5px 12px}
.msg-meta{font-size:11px;color:var(--text-3);margin-top:2px}
.chat-foot{border-top:1px solid var(--line);padding-top:12px;display:flex;gap:8px}
.chat-foot input{flex:1;height:42px;border:0;background:var(--surface);border-radius:var(--r-pill);padding:0 16px;font-size:13px}
.chat-foot input:focus{outline:0;background:#fff;box-shadow:0 0 0 2px var(--brand) inset}
.kv{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px dashed var(--line);font-size:13px}
.kv:last-child{border-bottom:0}
.kv b{font-weight:600}
.offer-box{background:var(--surface);border-radius:14px;padding:12px;margin-top:10px;font-size:13px}
.offer-box .line{display:flex;justify-content:space-between;padding:3px 0}
.offer-box .line.strong{color:#C25100;font-weight:700}

/* ============ 报价卡片 ============ */
.qcard{border:1px solid var(--line);border-radius:16px;padding:16px;display:flex;flex-direction:column;gap:10px;background:#fff}
.qcard.urgent{border-color:#FFE0A3;background:#FFFBF2}
.q-head{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.q-model{font-size:15px;font-weight:700}
.q-meta{font-size:12px;color:var(--text-3)}
.q-price-input{display:flex;gap:8px;align-items:center}
.q-price-input input{flex:1;height:40px;border:1px solid var(--line-2);border-radius:12px;padding:0 12px;font-size:14px}
.q-price-input input:focus{outline:0;border-color:var(--brand);box-shadow:0 0 0 3px rgba(255,105,0,.12)}
.money{font-variant-numeric:tabular-nums}

/* ============ 弹窗 / 抽屉 / toast ============ */
.mask{position:fixed;inset:0;background:rgba(23,24,26,.38);display:grid;place-items:center;z-index:60;padding:20px}
.modal{width:520px;max-width:100%;background:#fff;border-radius:20px;box-shadow:0 20px 60px rgba(0,0,0,.18);padding:22px;max-height:88vh;overflow:auto}
.modal h3{margin:0 0 4px;font-size:17px}
.modal .m-sub{font-size:12px;color:var(--text-3);margin-bottom:14px}
.modal-foot{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
.drawer{position:fixed;top:0;right:0;bottom:0;width:560px;max-width:100vw;background:#fff;box-shadow:-12px 0 40px rgba(0,0,0,.12);
  z-index:60;padding:22px;overflow:auto;border-radius:20px 0 0 20px}
.toast-root{position:fixed;top:22px;left:50%;transform:translateX(-50%);z-index:99;display:flex;flex-direction:column;gap:8px;align-items:center}
.toast{background:#17181A;color:#fff;padding:10px 16px;border-radius:var(--r-pill);font-size:13px;box-shadow:0 8px 24px rgba(0,0,0,.18);
  animation:fade .18s var(--ease)}
.toast.ok{background:#0E7A57}.toast.warn{background:#8A5A00}.toast.err{background:#B3251F}

/* 二维码占位 */
.qr{width:168px;height:168px;border-radius:16px;background:
  repeating-conic-gradient(#17181A 0 25%, #fff 0 50%) 0 0/16px 16px;border:8px solid #fff;box-shadow:var(--sh);
  display:grid;place-items:center;position:relative}
.qr::after{content:"扫码";position:absolute;background:#fff;padding:4px 10px;border-radius:8px;font-size:12px;font-weight:600;color:var(--brand)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.form-grid .full{grid-column:1/-1}
.form-grid label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--text-2)}
.form-grid input,.form-grid select,.form-grid textarea{height:40px;border:1px solid var(--line-2);border-radius:12px;padding:0 12px;font-size:13px;background:#fff}
.form-grid textarea{height:auto;min-height:88px;padding:10px 12px;line-height:1.6;resize:vertical}
.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus{outline:0;border-color:var(--brand);box-shadow:0 0 0 3px rgba(255,105,0,.12)}
.switch{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 0;border-bottom:1px dashed var(--line)}
.switch:last-child{border-bottom:0}
.sw{width:44px;height:26px;border-radius:13px;background:#D9DCE1;position:relative;cursor:pointer;transition:background .15s var(--ease);flex:0 0 auto}
.sw::after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;transition:transform .15s var(--ease)}
.sw.on{background:var(--ok)}
.sw.on::after{transform:translateX(18px)}
.timeline{list-style:none;margin:0;padding:0}
.timeline li{position:relative;padding:0 0 14px 20px;font-size:13px}
.timeline li::before{content:"";position:absolute;left:0;top:5px;width:8px;height:8px;border-radius:50%;background:var(--brand)}
.timeline li::after{content:"";position:absolute;left:3px;top:14px;bottom:0;width:2px;background:var(--line)}
.timeline li:last-child::after{display:none}
.timeline .t{font-size:11px;color:var(--text-3);display:block}
/* ============ v4.1 修正：去掉卡通元素、窄屏也能切换页面 ============ */
.brand-mark{display:none !important}
.avatar{background:var(--surface) !important;color:var(--text-2) !important;border-radius:8px !important;
  box-shadow:none !important;font-weight:600 !important}
.avatar.sm{border-radius:7px !important;font-size:12px}
.login-brand{align-items:flex-start}
.menu-btn{display:none}
.top-user-btn{height:32px;padding:0 12px;border-radius:999px;border:1px solid var(--line-2);background:#fff;
  font-size:13px;color:var(--text);cursor:pointer}
.top-user-btn:hover{background:var(--surface)}
.side-mask{display:none}
.side-foot .btn{flex:0 0 auto}

@media (max-width:980px){
  .app{display:block}
  .side{display:flex !important;position:fixed;left:0;top:0;bottom:0;z-index:60;width:250px;flex-basis:250px;
    transform:translateX(-100%);transition:transform .22s var(--ease);box-shadow:none}
  .side.open{transform:none;box-shadow:0 12px 40px rgba(0,0,0,.18)}
  .side-mask.show{display:block;position:fixed;inset:0;background:rgba(17,18,20,.38);z-index:55}
  .menu-btn{display:grid}
  .topbar{gap:6px;padding:0 12px}
  .search{display:none}
  .view{padding:14px 12px 36px}
  .g4,.g3,.g2{grid-template-columns:1fr}
  .h1{font-size:21px}
  .page-head{flex-direction:column;align-items:flex-start;gap:10px}
}


/* ============ 对外对接页：代码块与事件选择 ============ */
.code{background:#F2F2F6;border:1px solid var(--line);border-radius:12px;padding:12px 14px;
  font:12px/1.7 ui-monospace,SFMono-Regular,Menlo,Consolas,'Courier New',monospace;
  color:#3A3D42;overflow-x:auto;white-space:pre;tab-size:2}
.code-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:12px 0 8px}
.ev-item{display:flex;align-items:flex-start;gap:8px;padding:10px 12px;border:1px solid var(--line-2);
  border-radius:12px;cursor:pointer;background:#fff;transition:all .15s var(--ease)}
.ev-item:hover{border-color:var(--brand-line)}
.ev-item.on{border-color:var(--brand-line);background:var(--brand-soft)}
.ev-item input{margin-top:3px}
code{background:var(--surface);border-radius:6px;padding:1px 5px;font-size:12px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}

/* ============ 角色导航、待办与真实发送状态 ============ */
.mobile-nav{display:none}
.todo-card{border:0;text-align:left;color:var(--text);cursor:pointer;width:100%;font:inherit}
.todo-card:hover{box-shadow:var(--sh-hover)}
.chat-compose{flex:0 0 auto;background:#fff}
.send-state{font-size:11px;color:var(--text-3);padding:8px 2px 0;line-height:1.5}
.msg-unknown{outline:2px solid var(--warn);outline-offset:2px}
.msg-warning{margin-top:6px;font-size:11px;line-height:1.55;color:#8A5A00;background:#FFF6E5;border-radius:8px;padding:6px 8px}
.msg.staff .msg-warning,.msg.ai .msg-warning{color:#5F3B00;background:#FFF6E5}
.msg-error{color:#B3251F !important}
.chat-unknown{margin:10px 0 0;border-color:#FFE0A3}
.mobile-chat-back{display:none}
.profile-card{max-width:680px}
.profile-user{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.profile-user .avatar{width:46px;height:46px;font-size:18px}

/* 离线只允许访问外壳，不用旧业务数据填充页面。 */
.network-offline{position:fixed;inset:0;z-index:200;background:var(--bg);display:grid;place-items:center;padding:calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom))}
.network-offline-card{width:420px;max-width:100%;text-align:center;background:#fff;border-radius:24px;padding:30px 24px;box-shadow:var(--sh-hover)}
.network-offline-title{font-size:22px;font-weight:700;margin-bottom:10px}
.network-offline-text{color:var(--text-2);font-size:13px;line-height:1.8;margin-bottom:20px}

@media (max-width:700px){
  .app{min-height:100dvh}
  .topbar{height:calc(56px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top)}
  .view{padding:14px 12px calc(84px + env(safe-area-inset-bottom))}
  .mobile-nav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:50;background:rgba(255,255,255,.98);border-top:1px solid var(--line);
    min-height:calc(62px + env(safe-area-inset-bottom));padding:4px 4px env(safe-area-inset-bottom);box-shadow:0 -4px 18px rgba(0,0,0,.05)}
  .mobile-nav-item{flex:1;min-width:0;min-height:52px;border:0;background:transparent;color:var(--text-3);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:11px;cursor:pointer}
  .mobile-nav-item.active{color:var(--brand);font-weight:600}
  .mobile-nav-item .ico{width:22px;height:22px}
  .mobile-nav-icon{position:relative;display:grid;place-items:center;height:26px}
  .mobile-nav-icon .badge{position:absolute;left:15px;top:-4px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--danger);color:#fff;font-size:9px;font-style:normal;display:grid;place-items:center}
  .server-tag{bottom:calc(72px + env(safe-area-inset-bottom)) !important}
  .toast-root{top:calc(14px + env(safe-area-inset-top));width:calc(100% - 24px)}
  .toast{max-width:100%;text-align:center;border-radius:14px}
  .drawer{padding-bottom:calc(22px + env(safe-area-inset-bottom))}
  .wb{display:block}
  .wb.mobile-list .chat,.wb.mobile-list .wb-side{display:none}
  .wb.mobile-list .sess-list{max-height:none;padding:12px;overflow:visible}
  .wb.mobile-list .seg{max-width:100%;overflow-x:auto}
  .wb.mobile-detail .sess-list,.wb.mobile-detail .wb-side{display:none}
  .mobile-chat-back{display:grid;flex:0 0 auto}
  .wb.mobile-detail .chat{height:calc(100dvh - 74px - env(safe-area-inset-top));min-height:360px;padding:12px 12px calc(82px + env(safe-area-inset-bottom));border-radius:14px}
  .wb.mobile-detail .chat-head{gap:6px;flex-wrap:wrap;padding-bottom:8px}
  .wb.mobile-detail .chat-head .avatar{display:none}
  .wb.mobile-detail .chat-head .btn{padding:0 10px;font-size:11px}
  .wb.mobile-detail .chat-body{min-height:0;padding:10px 2px}
  .wb.mobile-detail .chat-compose{position:fixed;left:0;right:0;bottom:0;z-index:45;padding:6px 12px calc(8px + env(safe-area-inset-bottom));box-shadow:0 -5px 20px rgba(0,0,0,.08);border-top:1px solid var(--line)}
  .wb.mobile-detail .chat-foot{border-top:0;padding-top:4px}
  .wb.mobile-detail .chat-foot input{height:44px;min-width:0}
  .wb.mobile-detail .chat-foot .btn{height:44px;flex:0 0 auto}
  .msg{max-width:88%}
  body.mobile-chat-open .mobile-nav{display:none}
  body.mobile-chat-open .view{padding:8px 8px calc(84px + env(safe-area-inset-bottom))}
  body.mobile-chat-open #view>.fade>.page-head{display:none}
  .modal{max-height:calc(88dvh - env(safe-area-inset-top));padding-bottom:calc(22px + env(safe-area-inset-bottom))}
}
