:root{--bg:#f6f9ff;--panel:#fff;--ink:#182235;--muted:#8793a6;--line:#e5ecf6;--blue:#2d73ff;--blue2:#6aa8ff;--soft:#eef5ff;--side:#fbfdff;--shadow:0 14px 40px rgba(29,55,99,.08)}*{box-sizing:border-box}html,body{height:100%;overflow:hidden}body{margin:0;background:radial-gradient(circle at 56% 6%,#eef5ff 0,#f8fbff 34%,#f5f8fc 100%);color:var(--ink);font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif}button,input,textarea,select{font:inherit}button{cursor:pointer}.hidden{display:none!important}.shell{height:100vh;display:grid;grid-template-columns:360px minmax(0,1fr);background:var(--bg)}.sidebar{background:rgba(255,255,255,.86);border-right:1px solid var(--line);padding:28px 28px 22px;display:flex;flex-direction:column;min-width:0}.side-head{display:flex;gap:14px;align-items:center;margin-bottom:28px}.brand-logo{width:54px;height:54px;object-fit:contain;filter:drop-shadow(0 8px 16px rgba(45,115,255,.16))}.side-head h1{font-size:28px;line-height:1;margin:0;font-weight:800}.side-head p,.hint,#healthText,.conversation-list p,.ai-note{margin:5px 0 0;color:var(--muted);font-size:14px}.new-chat{height:56px;border:0;border-radius:12px;background:linear-gradient(135deg,#246dff,#3f84ff);color:#fff;font-size:17px;box-shadow:0 12px 24px rgba(45,115,255,.22);transition:transform .18s,box-shadow .18s}.new-chat:hover{transform:translateY(-2px);box-shadow:0 16px 28px rgba(45,115,255,.3)}.new-chat span{font-size:22px;vertical-align:-1px}.side-nav{display:grid;gap:8px;margin:24px 0 18px}.nav-item{height:52px;border:0;border-radius:12px;background:transparent;color:#66758b;text-align:left;padding:0 14px;font-size:16px;display:flex;align-items:center;gap:14px;transition:background .18s,color .18s,transform .18s}.nav-item span{width:24px;color:#7b8ca8}.nav-item:hover,.nav-item.active{background:#edf4ff;color:var(--blue);transform:translateX(3px)}.search-box{margin:0 0 14px}.search-box input{width:100%;height:44px;border:1px solid var(--line);border-radius:12px;padding:0 14px;background:#fff;outline:none}.search-box input:focus{border-color:#b9d1ff;box-shadow:0 0 0 3px rgba(45,115,255,.08)}.side-section{border-top:1px solid var(--line);padding-top:18px;display:flex;flex-direction:column;min-height:0}.grow{flex:1}.side-title{font-size:14px;font-weight:700;color:#8a96a8;margin-bottom:10px}.conversation-list{display:grid;gap:6px;overflow:auto;align-content:start;padding-right:3px}.conv-group{display:grid;gap:6px}.conv-date{font-size:13px;color:#98a4b5;padding:3px 0}.conv-item{border:0;background:transparent;text-align:left;border-radius:12px;padding:11px 10px;display:grid;grid-template-columns:1fr auto;gap:8px;color:#5a677c;transition:background .16s,color .16s,transform .16s}.conv-item:hover{background:#f0f6ff;color:var(--blue);transform:translateX(2px)}.conv-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conv-item em{font-size:12px;color:#9aa6b7;font-style:normal}.clear-btn{height:44px;border:1px solid var(--line);border-radius:12px;background:#fff;color:#8793a6;margin-top:16px}.main{position:relative;min-width:0;height:100vh;display:flex;flex-direction:column;overflow:hidden}.mobile-brand{display:none}.topbar{height:92px;display:flex;justify-content:space-between;align-items:center;padding:0 56px;flex-shrink:0}.top-title h2{font-size:20px;margin:0}.top-actions{display:flex;gap:12px;align-items:center}.ghost-btn,.primary-lite,.admin-entry,.modal-form button{border:1px solid var(--line);border-radius:12px;min-height:42px;padding:0 16px;background:#fff;color:#334257}.primary-lite,.modal-form button{background:var(--blue);border-color:var(--blue);color:#fff}.admin-entry{background:#f7fbff;color:#2d4e7b}.user-badge{height:42px;border:1px solid var(--line);background:#fff;border-radius:999px;display:flex;align-items:center;gap:9px;padding:0 13px;color:#334257}#topAvatar{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#e8f1ff;color:var(--blue);font-weight:800}.content-area{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.welcome{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px 20px 330px}.welcome-logo{width:64px;height:64px;object-fit:contain;margin-bottom:24px;filter:drop-shadow(0 10px 18px rgba(45,115,255,.16))}.welcome h3{font-size:42px;line-height:1.15;margin:0 0 18px;font-weight:800;letter-spacing:0}.welcome p{font-size:19px;color:#69778d;margin:0}.chat-stream{flex:1;overflow:auto;padding:28px 8vw 190px;display:grid;gap:22px;align-content:start}.chat-stream:empty{display:none}.bubble{display:grid;grid-template-columns:34px minmax(0,820px);gap:12px;align-items:start}.bubble.user{display:flex;justify-content:flex-end;gap:10px}.bubble.user .avatar{order:2;background:#2d73ff}.bubble.user .bubble-body{order:1;background:#eef5ff;border:0;box-shadow:none;border-radius:18px;max-width:min(560px,62%);padding:10px 18px;line-height:1.6;justify-self:end}.avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#2d73ff,#68a5ff);color:#fff;font-weight:800;font-size:13px}.bubble.assistant .avatar{margin-top:4px}.bubble-body{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px 20px;line-height:1.78;white-space:pre-wrap;box-shadow:0 10px 26px rgba(37,58,90,.05);font-size:16px}.bubble.assistant .bubble-body{max-width:860px}.answer-meta{display:inline-flex;align-items:center;gap:6px;border:1px solid #d9e8ff;background:#f5f9ff;color:#51709c;border-radius:999px;padding:5px 10px;font-size:13px;margin-bottom:10px}.bubble-body strong{font-weight:700;color:#111827}.bubble-body h2{font-size:19px;margin:14px 0 6px}.bubble-body h3{font-size:17px;margin:12px 0 5px}.bubble-actions{display:flex;justify-content:flex-end;border-top:1px solid var(--line);margin-top:14px;padding-top:10px}.inline-copy{border:1px solid var(--line);border-radius:9px;background:#fff;color:#66758b;min-height:32px;padding:0 11px}.composer-wrap{position:absolute;left:50%;bottom:22px;transform:translateX(-50%);width:min(1060px,calc(100% - 112px));margin:0;flex-shrink:0;transition:bottom .24s ease}.shell.idle .composer-wrap{bottom:28vh}.shell.chatting .composer-wrap{bottom:22px}.composer{background:#fff;border:1px solid #d8e4f6;border-radius:18px;padding:14px 16px;box-shadow:0 12px 34px rgba(45,115,255,.12)}.composer textarea{width:100%;border:0;outline:0;resize:none;line-height:1.7;padding:8px 10px;font-size:16px;background:transparent;color:var(--ink)}.composer-actions{display:flex;gap:10px;align-items:center;justify-content:flex-end}.mode-select{height:38px;border:1px solid var(--line);border-radius:10px;background:#fff;color:#32445d;padding:0 12px;outline:none}.mode-select:focus{border-color:#b9d1ff}.icon-btn,.send-btn{width:46px;height:46px;border:1px solid var(--line);border-radius:14px;background:#fff;color:#5b6b82;font-size:21px;display:grid;place-items:center}.send-btn{border:0;background:linear-gradient(135deg,#246dff,#3f84ff);color:#fff;font-size:22px;box-shadow:0 10px 20px rgba(45,115,255,.22)}.send-btn:disabled,.icon-btn:disabled{background:#c9d2df!important;color:#fff;box-shadow:none;cursor:not-allowed}.composer.busy{opacity:.82}.composer textarea:disabled{color:#8793a6}.file-chip{margin:0 0 9px;background:#eef5ff;border:1px solid #cfe0ff;color:#315a9d;border-radius:999px;padding:8px 13px;display:inline-flex;gap:10px;align-items:center}.file-chip button{border:0;background:transparent;color:#315a9d;font-size:18px}.ai-note{text-align:center;margin-top:10px}.example-panel{position:absolute;left:50%;bottom:5vh;transform:translateX(-50%);width:min(1060px,calc(100% - 112px));transition:opacity .2s}.shell.chatting .example-panel{display:none}.example-head{display:flex;justify-content:space-between;align-items:center;margin:0 0 12px;color:#1f2a3d}.example-head b{font-size:16px}.example-head button{border:0;background:transparent;color:#64748b;font-size:14px}.example-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.example-card{min-height:118px;border:1px solid var(--line);background:rgba(255,255,255,.88);border-radius:14px;text-align:left;padding:16px;box-shadow:0 10px 26px rgba(37,58,90,.05);display:grid;gap:7px;color:#213047;transition:transform .16s,box-shadow .16s,border-color .16s}.example-card:hover{transform:translateY(-3px);box-shadow:0 16px 30px rgba(37,58,90,.1);border-color:#c8dcff}.example-card i{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#eef5ff;color:var(--blue);font-style:normal;font-weight:800;font-size:13px}.example-card strong{font-size:16px}.example-card span{font-size:14px;color:#526078;line-height:1.45}.example-card em{font-style:normal;font-size:13px;color:#8a96a8}.modal{position:fixed;inset:0;background:rgba(15,23,42,.35);display:grid;place-items:center;z-index:20;padding:20px}.modal-card{width:min(560px,100%);background:#fff;border-radius:16px;border:1px solid var(--line);box-shadow:var(--shadow);padding:22px;position:relative}.auth-card{width:min(640px,100%)}.admin-card{width:min(1040px,100%);max-height:88vh;overflow:auto}.modal-card h3{margin:0 0 8px}.modal-close{position:absolute;right:14px;top:12px;border:0;background:transparent;font-size:24px;color:var(--muted)}.tab-row{display:flex;background:#f2f5fa;border-radius:10px;padding:4px;margin:14px 0}.tab{flex:1;border:0;background:transparent;border-radius:8px;min-height:34px}.tab.active{background:#fff;color:var(--blue);box-shadow:0 2px 8px rgba(0,0,0,.06)}.modal-form{display:grid;gap:10px}.modal-form input{width:100%;border:1px solid var(--line);border-radius:10px;min-height:42px;padding:0 12px}.code-row{display:grid;grid-template-columns:1fr 128px;gap:8px}.admin-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0}.stat{border:1px solid var(--line);border-radius:12px;background:#f8fbff;padding:14px}.stat b{font-size:28px;color:var(--blue)}.stat span{display:block;color:var(--muted);font-size:13px}.admin-list{grid-column:span 2;border:1px solid var(--line);border-radius:12px;padding:14px}.admin-list h4,.model-config h4{margin:0 0 10px}.admin-list ul{margin:0;padding-left:18px;color:#4a5870;line-height:1.8}.model-config{border-top:1px solid var(--line);padding-top:16px}.model-form{grid-template-columns:1fr 180px 1fr 140px}@media(max-width:1000px){body{overflow:auto}.shell{height:auto;min-height:100vh;grid-template-columns:1fr}.sidebar{min-height:auto;max-height:380px}.topbar{padding:0 18px}.welcome h3{font-size:34px}.composer-wrap,.shell.idle .composer-wrap,.shell.chatting .composer-wrap{position:sticky;left:auto;bottom:0;transform:none;width:calc(100% - 28px);margin:0 auto 14px}.chat-stream{padding:18px 14px 160px}.example-panel{position:static;transform:none;width:calc(100% - 28px);margin:10px auto 18px}.example-grid{grid-template-columns:1fr 1fr}.bubble,.bubble.user{grid-template-columns:38px 1fr}.bubble.user .avatar{grid-column:1}.bubble.user .bubble-body{grid-column:2}.admin-grid,.model-form{grid-template-columns:1fr}.admin-list{grid-column:span 1}}






@media(max-width:700px){
  html,body{height:100%;overflow:hidden;background:#f5f8ff}
  body{background:linear-gradient(180deg,#f7f9ff 0%,#f1f6ff 100%)}
  .shell{display:block;height:100dvh;min-height:100dvh;background:transparent}
  .sidebar{display:none!important}
  .main{height:100dvh;min-height:100dvh;background:transparent;overflow:hidden}
  .topbar{position:absolute;left:0;right:0;top:0;z-index:8;height:64px;border:0;background:transparent;padding:12px 14px;justify-content:space-between}
  .mobile-brand{display:flex;align-items:center;gap:10px;margin-right:auto;min-width:0}
  .mobile-brand img{width:38px;height:38px;object-fit:contain}
  .mobile-brand b{display:block;font-size:20px;line-height:1.05;color:#14213a;font-weight:800}
  .mobile-brand span{display:block;margin-top:3px;font-size:12px;color:#718096;white-space:nowrap}
  .top-title,#profileBtn,#userBadge{display:none!important}
  .top-actions{gap:8px}
  #authOpenBtn,#logoutBtn,#adminBtn{display:inline-flex;align-items:center;justify-content:center;min-height:34px;border-radius:999px;padding:0 12px;background:rgba(255,255,255,.94);border:1px solid #dce6f5;color:#2563eb;font-size:13px;white-space:nowrap;box-shadow:0 6px 18px rgba(37,99,235,.08)}#adminBtn{background:#edf4ff;border-color:#cfe0ff;color:#1f5fc9}
  .content-area{height:100dvh;padding-top:56px;overflow:hidden}
  .welcome{height:100%;flex:initial;justify-content:flex-start;padding:12vh 22px 35vh;text-align:center}
  .welcome-logo{width:76px;height:76px;margin-bottom:26px}
  .welcome h3{font-size:38px;line-height:1.15;margin-bottom:20px;white-space:nowrap}
  .welcome p{font-size:20px;line-height:1.55;color:#7b8798;max-width:340px}
  .example-panel{display:none!important}
  .composer-wrap,.shell.idle .composer-wrap,.shell.chatting .composer-wrap{position:absolute;left:16px;right:16px;bottom:calc(52px + env(safe-area-inset-bottom));transform:none;width:auto;margin:0;z-index:9}
  .composer{border-radius:18px;padding:16px;border-color:#d8e4f6;box-shadow:0 12px 32px rgba(45,115,255,.12)}
  .composer textarea{min-height:132px;font-size:18px;line-height:1.65;padding:10px 8px}
  .composer-actions{gap:12px}
  .mode-select{display:none!important}
  .icon-btn,.send-btn{width:56px;height:56px;border-radius:16px;font-size:24px}
  .send-btn{font-size:25px}
  .ai-note{font-size:15px;margin-top:12px;color:#9aa6b7;line-height:1.4}
  .chat-stream{height:100%;overflow:auto;padding:72px 14px calc(260px + env(safe-area-inset-bottom));gap:16px}
  .bubble{grid-template-columns:30px minmax(0,1fr);gap:8px}
  .bubble.user{display:flex;justify-content:flex-end;gap:8px}
  .bubble.user .avatar{display:none}
  .bubble.user .bubble-body{max-width:78%;border-radius:18px;padding:9px 15px;font-size:16px;line-height:1.55}
  .avatar{width:30px;height:30px;font-size:12px}
  .bubble-body{font-size:15px;line-height:1.72;padding:14px 15px;border-radius:13px;box-shadow:0 8px 22px rgba(37,58,90,.05)}
  .answer-meta{font-size:12px;white-space:normal;line-height:1.4}
  .modal{padding:16px;align-items:flex-start;padding-top:70px}
  .modal-card{border-radius:16px;max-height:calc(100dvh - 90px);overflow:auto}
}
.final-draft-card{width:min(900px,100%)}
.final-draft-title{width:100%;height:44px;border:1px solid var(--line);border-radius:10px;padding:0 12px;margin:12px 0 10px;outline:none}
.final-draft-card textarea{width:100%;min-height:360px;max-height:58vh;resize:vertical;border:1px solid var(--line);border-radius:12px;padding:14px;line-height:1.7;outline:none}
.final-draft-title:focus,.final-draft-card textarea:focus{border-color:#b9d1ff;box-shadow:0 0 0 3px rgba(45,115,255,.08)}
.final-draft-actions{display:flex;justify-content:space-between;align-items:center;margin-top:12px}
.final-draft-actions button{border:0;border-radius:10px;background:var(--blue);color:#fff;min-height:42px;padding:0 18px}
@media(max-width:700px){.final-draft-card textarea{min-height:45vh}.final-draft-actions{align-items:flex-end;gap:12px}.final-draft-actions button{flex:1}}

/* Mobile one-hand knowledge tools */
.mobile-quick-tools{display:none}
@media(max-width:700px){
  .mobile-quick-tools{position:fixed;left:0;top:46%;z-index:18;display:flex;align-items:center;gap:8px;transform:translateY(-50%);transition:transform .24s ease,opacity .2s ease}
  .mobile-quick-tools.answering{transform:translate(calc(-100% - 18px),-50%);opacity:0;pointer-events:none}
  .mobile-quick-toggle{width:44px;height:52px;border:1px solid #cfe0ff;border-left:0;border-radius:0 14px 14px 0;background:linear-gradient(145deg,#246dff,#4b8cff);color:#fff;box-shadow:0 10px 24px rgba(45,115,255,.24);display:grid;place-items:center;padding:0}
  .mobile-quick-toggle span{font-size:17px;font-weight:800}
  .mobile-quick-menu{display:flex;gap:7px;max-width:0;opacity:0;overflow:hidden;pointer-events:none;transform:translateX(-8px);transition:max-width .24s ease,opacity .18s ease,transform .24s ease}
  .mobile-quick-tools.expanded .mobile-quick-menu{max-width:250px;opacity:1;pointer-events:auto;transform:translateX(0)}
  .mobile-quick-menu button{height:44px;border:1px solid #d7e4f7;border-radius:12px;background:rgba(255,255,255,.98);color:#285a9f;box-shadow:0 9px 22px rgba(30,64,120,.12);padding:0 12px;display:flex;align-items:center;gap:6px;white-space:nowrap;font-size:14px}
  .mobile-quick-menu button span{width:23px;height:23px;border-radius:7px;background:#edf4ff;color:#2d73ff;display:grid;place-items:center;font-size:12px;font-weight:800}
}

/* Desktop chat alignment fixes */
@media(min-width:701px){
  .chat-stream{padding:28px 0 330px;display:block}
  .bubble{width:min(1060px,calc(100% - 112px));margin:0 auto 22px;display:grid;grid-template-columns:34px minmax(0,1fr);gap:12px}
  .bubble.assistant .bubble-body{width:100%;max-width:none}
  .bubble.user{width:min(1060px,calc(100% - 112px));margin:0 auto 22px;display:flex;justify-content:flex-end;align-items:flex-start}
  .bubble.user .bubble-body{max-width:min(560px,70%)}
  .bubble-actions{padding-bottom:2px}
  .composer-wrap{width:min(1060px,calc(100% - 112px))}
}


/* Answer typography normalization */
.bubble-body h2{display:block;font-size:18px;font-weight:800;color:#071426;margin:22px 0 12px;line-height:1.45}
.bubble-body h2:first-child{margin-top:4px}
.bubble-body h3{display:block;font-size:16px;font-weight:800;color:#071426;margin:18px 0 10px;line-height:1.45}
.answer-meta{display:flex;width:max-content;max-width:100%;margin-bottom:12px}
.bubble-body strong{font-weight:800;color:#061224}
@media(max-width:700px){.bubble-body h2{font-size:17px;margin:18px 0 10px}.answer-meta{width:auto}}

/* Admin review console */
.admin-list.wide{grid-column:1/-1}
.admin-users,.evolution-list{display:grid;gap:10px}
.admin-user,.evolution-item{border:1px solid var(--line);border-radius:12px;background:#fff;padding:12px}
.admin-user summary{cursor:pointer;display:flex;justify-content:space-between;gap:12px;align-items:center;color:#1f2a3d}
.admin-user summary b{font-size:15px}.admin-user summary span{color:#64748b;font-size:13px}.admin-user-body{border-top:1px solid var(--line);margin-top:10px;padding-top:10px;color:#45556d;line-height:1.7}.password-row{display:grid;grid-template-columns:minmax(180px,1fr) 100px;gap:8px;margin-top:8px}.password-row input{border:1px solid var(--line);border-radius:9px;min-height:36px;padding:0 10px}.password-row button,.evolution-actions button{border:1px solid #d8e4f6;background:#f8fbff;color:#2d5d9f;border-radius:9px;min-height:34px;padding:0 10px}.evolution-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:start}.evolution-item b{display:block;color:#162238;margin-bottom:4px}.evolution-item p{margin:0 0 6px;color:#64748b;font-size:13px}.evolution-item small{display:block;color:#46566f;line-height:1.55;max-height:70px;overflow:auto}.evolution-actions{display:grid;grid-template-columns:repeat(2,auto);gap:8px}.evolution-actions button:nth-child(3){background:#eef7ff;color:#1765aa}.evolution-actions button:nth-child(4){background:#f4f0ff;color:#6b3bbd}@media(max-width:700px){.evolution-item{grid-template-columns:1fr}.evolution-actions{grid-template-columns:1fr 1fr}.password-row{grid-template-columns:1fr}}

/* Admin knowledge ingestion and logo avatar */
.bubble.assistant .avatar{background:#fff;border:1px solid #d9e8ff;box-shadow:0 8px 18px rgba(45,115,255,.12);overflow:hidden}
.avatar img{width:28px;height:28px;object-fit:contain;display:block}
.admin-card{width:min(1180px,calc(100vw - 44px))}
.admin-experience-box{border:1px solid var(--line);border-radius:12px;background:#fbfdff;padding:16px;margin:16px 0}
.admin-experience-box h4{margin:0 0 8px;color:#162238;font-size:17px}
.admin-exp-form{display:grid;gap:10px;margin-top:12px}
.admin-exp-form input,.admin-exp-form textarea{width:100%;border:1px solid var(--line);border-radius:10px;background:#fff;padding:10px 12px;outline:none;color:#182235}
.admin-exp-form textarea{resize:vertical;min-height:128px;line-height:1.7}
.admin-exp-form input:focus,.admin-exp-form textarea:focus{border-color:#b9d1ff;box-shadow:0 0 0 3px rgba(45,115,255,.08)}
.admin-exp-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.admin-exp-actions button{border:1px solid #d8e4f6;background:#fff;color:#2d5d9f;border-radius:10px;min-height:38px;padding:0 12px}
.admin-exp-actions button:last-child{background:#2d73ff;border-color:#2d73ff;color:#fff}
.admin-questions{display:grid;gap:10px;max-height:260px;overflow:auto}
.admin-question{border:1px solid var(--line);border-radius:12px;background:#fff;padding:11px 12px}
.admin-question b{display:inline-block;color:#1c4f9c;margin-bottom:4px}
.admin-question p{margin:0 0 6px;color:#26364d;line-height:1.55}
.admin-question span{color:#7c889b;font-size:13px}
@media(max-width:700px){.admin-card{width:calc(100vw - 28px)}.admin-exp-actions{display:grid;grid-template-columns:1fr 1fr}.avatar img{width:25px;height:25px}}

/* Tighter answer heading spacing */
.bubble-body h2{font-size:18px;font-weight:800;line-height:1.35;margin:16px 0 8px;color:#071426}
.bubble-body h2:first-child{margin-top:2px}
.bubble-body h3{font-size:16px;font-weight:800;line-height:1.35;margin:12px 0 7px;color:#071426}
.answer-meta + h2{margin-top:4px}
.bubble-body p{margin:0 0 8px}
.bubble-body{line-height:1.72}
@media(max-width:700px){.bubble-body h2{font-size:17px;margin:13px 0 7px}.bubble-body h3{font-size:15px;margin:10px 0 6px}.bubble-body{line-height:1.68}}

/* Corrected answer spacing: keep paragraphs, reduce title-to-body gap only */
.bubble-body{line-height:1.78;white-space:pre-wrap}
.bubble-body p{margin:0}
.bubble-body h2{display:block;font-size:18px;font-weight:800;line-height:1.35;margin:14px 0 3px;color:#071426}
.bubble-body h2:first-child{margin-top:0}
.bubble-body h3{display:block;font-size:16px;font-weight:800;line-height:1.35;margin:10px 0 3px;color:#071426}
.answer-meta + h2{margin-top:2px}
@media(max-width:700px){.bubble-body{line-height:1.72}.bubble-body h2{font-size:17px;margin:11px 0 3px}.bubble-body h3{font-size:15px;margin:8px 0 3px}}

/* Sidebar history scroll and full profile form */
.sidebar{height:100vh;overflow:hidden}
.side-section.grow{flex:1 1 auto;min-height:0;overflow:hidden}
.conversation-list{height:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;padding-bottom:8px;scrollbar-width:thin}
.conversation-list::-webkit-scrollbar{width:6px}
.conversation-list::-webkit-scrollbar-thumb{background:#d4deee;border-radius:999px}
.side-user,.sidebar .user-card,.sidebar .account-card{display:none!important}
.profile-form{grid-template-columns:1fr 1fr;gap:10px}
.profile-form input[disabled]{background:#f6f8fc;color:#8a96a8;cursor:not-allowed}
.profile-form button{grid-column:1/-1}
.password-box{border-top:1px solid var(--line);margin-top:16px;padding-top:14px}
.password-box h4{margin:0 0 10px;color:#162238;font-size:16px}
.password-form{grid-template-columns:1fr 1fr 120px;gap:10px}
@media(max-width:700px){.profile-form,.password-form{grid-template-columns:1fr}.sidebar{height:auto}.conversation-list{max-height:260px}}

/* Chat button and favorite actions */
.new-chat{width:100%;min-height:56px;height:56px;display:flex;align-items:center;justify-content:center;gap:8px;flex:0 0 56px;font-size:17px;border-radius:12px}
.bubble-actions{gap:8px;align-items:center;justify-content:flex-end}
.inline-copy,.inline-fav{border:1px solid var(--line);border-radius:9px;background:#fff;color:#66758b;min-height:32px;padding:0 11px}
.inline-fav{color:#2d5d9f;background:#f7fbff;border-color:#d8e4f6}
.inline-fav:disabled{opacity:.72;cursor:default}

/* Mobile chat fullscreen and composer safe area */
@media(max-width:700px){
  html,body{height:100%;overflow:hidden}
  .main{height:100dvh;overflow:hidden}
  .content-area{height:100dvh;overflow:hidden;padding-top:64px}
  .chat-stream{height:100%;display:block;overflow-y:auto;overflow-x:hidden;padding:18px 18px calc(320px + env(safe-area-inset-bottom));scroll-padding-bottom:320px;background:transparent}
  .bubble,.bubble.user,.bubble.assistant{display:block;width:100%;margin:0 0 18px;max-width:none}
  .bubble .avatar,.bubble.user .avatar,.bubble.assistant .avatar{display:none!important}
  .bubble-body,.bubble.assistant .bubble-body,.bubble.user .bubble-body{width:100%;max-width:none;border:0;background:transparent;box-shadow:none;border-radius:0;padding:0;color:#101828;font-size:17px;line-height:1.78;white-space:pre-wrap}
  .bubble.user .bubble-body{display:inline-block;width:auto;max-width:86%;float:right;background:#eef5ff;border-radius:18px;padding:8px 14px;margin:0 0 8px;line-height:1.55}
  .bubble.user::after{content:"";display:block;clear:both}
  .answer-meta{margin:0 0 10px;font-size:12px}
  .bubble-actions{border-top:0;margin:12px 0 0;padding:0;justify-content:flex-start;gap:12px}
  .inline-copy,.inline-fav{min-height:34px;border-radius:10px;background:#fff}
  .composer-wrap,.shell.idle .composer-wrap,.shell.chatting .composer-wrap{position:fixed;left:14px;right:14px;bottom:calc(14px + env(safe-area-inset-bottom));width:auto;transform:none;margin:0;z-index:30}
  .composer{background:rgba(255,255,255,.96);border:1px solid #d8e4f6;border-radius:20px;padding:14px;box-shadow:0 -8px 28px rgba(37,58,90,.14);backdrop-filter:blur(12px)}
  .composer textarea{min-height:118px;max-height:160px;font-size:18px;line-height:1.55;padding:8px 6px}
  .composer-actions{margin-top:8px}
  .ai-note{font-size:14px;margin-top:8px;color:#9aa6b7;background:rgba(245,248,255,.78)}
}

/* Mobile composer blocks content underneath */
@media(max-width:700px){
  .chat-stream{padding-bottom:calc(330px + env(safe-area-inset-bottom));scroll-padding-bottom:330px}
  .composer-wrap,.shell.idle .composer-wrap,.shell.chatting .composer-wrap{left:0;right:0;bottom:0;width:auto;padding:12px 14px calc(12px + env(safe-area-inset-bottom));background:#f5f8ff;box-shadow:0 -18px 36px rgba(245,248,255,.98);z-index:40}
  .composer-wrap::before{content:"";position:absolute;left:0;right:0;top:-34px;height:34px;background:linear-gradient(180deg,rgba(245,248,255,0),#f5f8ff);pointer-events:none}
  .composer{position:relative;background:#fff;border-color:#d8e4f6;box-shadow:0 10px 28px rgba(45,115,255,.14);z-index:1}
  .ai-note{position:relative;z-index:1;background:#f5f8ff;margin-bottom:0;padding-top:2px}
}

/* Admin usability refinements */
.search-box{display:none!important}
.stat-btn{cursor:pointer;text-align:left;transition:transform .16s,box-shadow .16s,border-color .16s}
.stat-btn:hover{transform:translateY(-2px);border-color:#b9d1ff;box-shadow:0 10px 22px rgba(45,115,255,.12)}
.stat em{display:block;margin-top:6px;color:#8a96a8;font-size:12px;font-style:normal}
.admin-view-head{grid-column:1/-1;display:flex;gap:14px;align-items:center;border:1px solid var(--line);border-radius:12px;background:#f8fbff;padding:14px}
.admin-view-head button{border:1px solid #d8e4f6;background:#fff;color:#2d5d9f;border-radius:10px;min-height:36px;padding:0 12px}
.admin-view-head h4{margin:0 0 4px}.admin-view-head p{margin:0}
.admin-search{width:100%;border:1px solid var(--line);border-radius:10px;min-height:42px;padding:0 12px;margin:0 0 12px;outline:none}
.admin-search:focus{border-color:#b9d1ff;box-shadow:0 0 0 3px rgba(45,115,255,.08)}
.admin-users{max-height:56vh;overflow:auto;padding-right:4px}
@media(max-width:700px){.admin-view-head{display:grid}.admin-users{max-height:52vh}}

/* Admin module navigation */
.admin-overview-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.admin-entry-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.admin-module-card{min-height:132px;border:1px solid var(--line);border-radius:12px;background:#fff;padding:18px;text-align:left;display:grid;grid-template-columns:46px minmax(0,1fr) auto;gap:14px;align-items:start;color:#1d2b40;transition:transform .16s,box-shadow .16s,border-color .16s}
.admin-module-card:hover{transform:translateY(-2px);border-color:#b9d1ff;box-shadow:0 12px 26px rgba(45,115,255,.11)}
.admin-module-card i{width:46px;height:46px;border-radius:10px;background:#edf4ff;color:#2d73ff;display:grid;place-items:center;font-style:normal;font-weight:800}
.admin-module-card h4{font-size:17px;margin:1px 0 7px}.admin-module-card b{font-size:14px;color:#2d73ff}.admin-module-card p{font-size:13px;line-height:1.55;color:#748197;margin:7px 0 0}.admin-module-card>span{color:#2d73ff;font-size:13px;white-space:nowrap;margin-top:4px}
.admin-experience-box,.model-config{margin-top:12px}
@media(max-width:760px){.admin-overview-stats,.admin-entry-grid{grid-template-columns:1fr 1fr}.admin-module-card{grid-template-columns:40px minmax(0,1fr);padding:14px}.admin-module-card>span{grid-column:2}.admin-module-card i{width:40px;height:40px}}
@media(max-width:520px){.admin-overview-stats,.admin-entry-grid{grid-template-columns:1fr}.admin-module-card{min-height:auto}}
/* User experience submission and review */
.admin-overview-stats,.admin-entry-grid{grid-column:1/-1;width:100%}
.experience-submit-card{width:min(720px,100%)}
.user-exp-form textarea{width:100%;min-height:210px;border:1px solid var(--line);border-radius:10px;padding:12px;resize:vertical;line-height:1.7;outline:none}
.user-exp-form textarea:focus{border-color:#b9d1ff;box-shadow:0 0 0 3px rgba(45,115,255,.08)}
.user-exp-file-row{display:flex;align-items:center;gap:12px;min-height:42px;max-width:100%}
.user-exp-file-row .ghost-btn{flex:0 0 auto;word-break:keep-all}
.user-exp-file-row #userExpFileBtn,.user-exp-file-row #pasteMaterialBtn{min-width:102px;white-space:nowrap}
.user-exp-file-row #pasteWebLinkBtn{width:242px;min-height:52px;line-height:1;white-space:nowrap;word-break:keep-all;padding-top:0;padding-bottom:0}
.user-exp-file-row .hint{flex:1;min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.user-exp-file-row .hint:empty{display:none}
.user-exp-form>button:last-child{justify-self:end;min-width:120px}
.user-experience-list{display:grid;gap:10px}
.user-experience-item{border:1px solid var(--line);border-radius:12px;background:#fff;padding:0 14px}
.user-experience-item summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 0;list-style:none}
.user-experience-item summary::-webkit-details-marker{display:none}
.user-experience-item summary b{display:block;color:#162238;margin-bottom:5px}.user-experience-item summary span{display:block;color:#7a879a;font-size:13px}.user-experience-item summary em{color:#2d73ff;font-size:13px;font-style:normal;white-space:nowrap}
.user-experience-body{border-top:1px solid var(--line);padding:12px 0 14px}.user-experience-body>p{white-space:pre-wrap;line-height:1.7;color:#34445a;max-height:260px;overflow:auto;margin:0 0 12px}
@media(max-width:700px){#userExperienceBtn{display:none}.user-exp-file-row{align-items:flex-start;flex-direction:column}.user-exp-form>button:last-child{width:100%}.user-experience-item summary{align-items:flex-start}.user-experience-body .evolution-actions{grid-template-columns:1fr 1fr}}
#profileBtn{display:none!important}

/* Centered authentication dialog */
#authModal{place-items:center}
.auth-card{width:min(680px,100%);min-height:480px;max-height:calc(100vh - 40px);overflow-y:auto;padding:30px 34px 22px;display:flex;flex-direction:column}
.auth-card>h3{text-align:center;font-size:25px;line-height:1.3;margin:2px 36px 8px}
.auth-card>p.hint{text-align:center;font-size:14px;margin:0 20px 18px}
.auth-card .tab-row{margin:0 0 18px;min-height:48px;padding:5px}
.auth-card .tab{font-size:16px;min-height:38px}
.auth-card .modal-form{gap:14px}
.auth-card .modal-form input{min-height:52px;padding:0 15px;font-size:16px}
.auth-card .modal-form>button:not(.ghost-btn){min-height:52px;font-size:16px;margin-top:2px}
.auth-card #loginPane{padding-top:2px}
.auth-footer{margin-top:auto;padding-top:22px;display:flex;align-items:center;justify-content:center;gap:12px;color:#8995a8;font-size:13px}
.auth-footer i{width:1px;height:13px;background:#d7dfeb}
.answer-table-wrap{width:100%;overflow-x:auto;margin:8px 0 14px;border:1px solid #dce6f3;border-radius:8px}
.answer-table{width:100%;min-width:560px;border-collapse:collapse;background:#fff;font-size:14px;line-height:1.55}
.answer-table th,.answer-table td{padding:10px 12px;border-right:1px solid #e3eaf4;border-bottom:1px solid #e3eaf4;text-align:left;vertical-align:top}
.answer-table th{background:#f4f8ff;color:#233754;font-weight:700;white-space:nowrap}
.answer-table tr:last-child td{border-bottom:0}.answer-table th:last-child,.answer-table td:last-child{border-right:0}
@media(max-width:700px){
  #authModal{padding:16px;align-items:center}
  .auth-card{width:100%;min-height:min(520px,calc(100dvh - 32px));max-height:calc(100dvh - 32px);padding:26px 20px 20px}
  .auth-card>h3{font-size:22px;margin-left:30px;margin-right:30px}
  .auth-card>p.hint{line-height:1.55;margin-left:4px;margin-right:4px}
  .auth-card .modal-form input{min-height:50px}
  .auth-footer{padding-top:18px;gap:8px;font-size:12px;flex-wrap:wrap}
}
.four-layer-grid{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;width:100%}
.layer-card{min-height:132px;border:1px solid var(--line);background:#fff;border-radius:12px;padding:16px;display:flex;gap:12px;align-items:flex-start}
.layer-card i{width:34px;height:34px;flex:0 0 34px;border-radius:50%;background:#edf4ff;color:var(--blue);display:grid;place-items:center;font-style:normal;font-weight:800}
.layer-card b,.layer-card strong{display:block}.layer-card strong{color:#207358;margin:6px 0;font-size:14px}.layer-card p{margin:0;color:#748197;font-size:13px;line-height:1.55}
.evolution-job-list{display:grid;gap:10px}.evolution-job{border:1px solid var(--line);border-radius:12px;padding:14px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;background:#fff}
.evolution-job b{display:block;margin:7px 0 5px}.evolution-job p,.evolution-job small{margin:0;color:#718096;font-size:13px}.job-status{display:inline-block;border-radius:999px;padding:3px 9px;background:#edf4ff;color:#2d66b8;font-size:12px}
.job-status.published{background:#ebf8f1;color:#14764e}.job-status.rejected,.job-status.rejected_by_gate{background:#fff1f1;color:#a83d3d}
.job-actions,.detail-actions{display:flex;gap:8px;flex-wrap:wrap}.job-actions button,.detail-actions button{min-height:36px;border:1px solid #d8e4f6;background:#fff;color:#36577f;border-radius:9px;padding:0 12px}
.primary-job{background:#2d73ff!important;color:#fff!important;border-color:#2d73ff!important}
.job-actions .danger-job,.detail-actions .danger-job{color:#b42318;border-color:#f0b8b3;background:#fff7f6}.job-actions .danger-job:hover,.detail-actions .danger-job:hover{background:#fff0ee;border-color:#dc6b62}
.evolution-detail{display:grid;gap:12px}.detail-summary{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.detail-summary span{background:#f4f7fb;border-radius:999px;padding:5px 10px;color:#607089;font-size:13px}
.step-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.step-list span{padding:8px 10px;border-radius:8px;background:#f4f7fb;color:#66758b;font-size:13px}.step-list .completed{background:#eaf8f1;color:#176f50}.step-list .failed{background:#fff0f0;color:#a33d3d}
.evolution-detail details{border:1px solid var(--line);border-radius:10px;padding:10px 12px}.evolution-detail summary{cursor:pointer;font-weight:700}.artifact-preview{padding:10px 2px;line-height:1.7;color:#334257}
@media(max-width:900px){.four-layer-grid{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.four-layer-grid{grid-template-columns:1fr}.evolution-job{grid-template-columns:1fr}.step-list{grid-template-columns:1fr}}
.private-library-list{display:grid;gap:10px;max-height:58vh;overflow:auto;margin-top:16px}.private-library-item{border:1px solid var(--line);border-radius:8px;padding:0;background:#fff;overflow:hidden}.private-library-item summary{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 14px;cursor:pointer;list-style:none}.private-library-item summary::-webkit-details-marker{display:none}.private-library-item summary:hover{background:#f7faff}.private-library-item b{color:#17243a}.private-library-item p{margin:5px 0 0;color:#7a879a;font-size:13px}.private-library-editor{display:grid;gap:12px;padding:14px;border-top:1px solid var(--line);background:#f8faff}.private-library-editor label{display:grid;gap:6px;color:#52637a;font-size:13px}.private-library-editor input,.private-library-editor textarea{width:100%;box-sizing:border-box}.private-library-editor textarea{resize:vertical;line-height:1.65}.private-library-save{display:flex;align-items:center;justify-content:space-between;gap:12px}.private-library-save small{color:#7a879a}.private-library-save button{flex:0 0 auto}.scope-badge{flex:0 0 auto;border-radius:999px;padding:4px 10px;font-size:12px}.scope-badge.private{background:#eef4ff;color:#2d66b8}.scope-badge.public{background:#eaf8f1;color:#176f50}.private-library-empty{padding:28px;text-align:center;background:#f7f9fc;border-radius:8px}.private-library-empty p{color:#7a879a}

.welcome .welcome-status{margin-top:14px;font-size:14px;color:#6680a7;background:#edf4ff;border-radius:999px;padding:7px 13px;max-width:none}
@media(max-width:700px){.welcome .welcome-status{display:block;margin-top:22px;font-size:13px;line-height:1.5;max-width:92%;padding:8px 12px}}

.modal{z-index:100}
.agreement-row{display:flex;align-items:flex-start;gap:9px;color:#68768b;font-size:13px;line-height:1.55;padding:2px 2px 4px}
.agreement-row input{width:18px!important;height:18px;min-height:0!important;flex:0 0 18px;margin:1px 0 0}
.agreement-row a{color:#2d73ff;text-decoration:none}
.agreement-row a:hover{text-decoration:underline}
#registerBtn:disabled{background:#c9d2df;border-color:#c9d2df;cursor:not-allowed}
}
@media(max-width:700px){
  #authModal{z-index:120;height:100dvh;min-height:100dvh;padding:12px;overflow:hidden;align-items:stretch;place-items:stretch center}
  #authModal .auth-card{width:100%;height:calc(100dvh - 24px);min-height:0;max-height:calc(100dvh - 24px);overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:22px 18px calc(28px + env(safe-area-inset-bottom))}
  #registerPane{padding-bottom:12px}
  .auth-footer{flex:0 0 auto}
}
/* Desktop composer blocks scrolled answers underneath */
@media(min-width:701px){
  .shell.chatting .chat-stream{padding-bottom:360px;scroll-padding-bottom:360px}
  .shell.chatting .composer-wrap{bottom:0;padding:14px 0 18px;background:var(--bg);box-shadow:0 -22px 38px rgba(246,249,255,.98);z-index:20}
  .shell.chatting .composer-wrap::before{content:"";position:absolute;left:0;right:0;top:-38px;height:38px;background:linear-gradient(180deg,rgba(246,249,255,0),var(--bg));pointer-events:none}
  .shell.chatting .composer,.shell.chatting .ai-note{position:relative;z-index:1}
  .shell.chatting .ai-note{background:var(--bg);margin-bottom:0;padding-top:2px}
}
/* Daily distillation controls */
.daily-distill-panel{grid-column:1/-1;width:100%;min-width:0;display:flex;align-items:center;justify-content:space-between;gap:18px;border:1px solid #cfe0ff;border-radius:10px;background:#f5f9ff;padding:15px 16px}.daily-distill-panel>div{min-width:0;flex:1}
.daily-distill-panel b{display:block;color:#17335f;font-size:17px}.daily-distill-panel p{margin:5px 0 0;color:#64748b;line-height:1.55}
.daily-distill-panel button{flex:0 0 auto;min-height:42px;white-space:nowrap;border:0;border-radius:10px;padding:0 16px;background:#2d73ff;color:#fff}
.daily-distill-panel button:disabled{background:#cbd5e1;cursor:not-allowed}.admin-inline-notice{border:1px solid #bfe8d5;border-radius:10px;background:#effaf5;color:#176347;padding:11px 14px}
@media(max-width:700px){.daily-distill-panel{display:grid}.daily-distill-panel button{width:100%}}
/* Candidate semantics and private knowledge quota */
.knowledge-quota{border:1px solid #dce8f8;background:#f7faff;border-radius:10px;padding:12px 14px;margin-bottom:12px}
.knowledge-quota>div:first-child{display:flex;justify-content:space-between;gap:12px;align-items:center}.knowledge-quota span{color:#58708f;font-size:13px}
.quota-track{height:7px;background:#e7eef8;border-radius:999px;overflow:hidden;margin:9px 0}.quota-track i{display:block;height:100%;background:#2d73ff;border-radius:inherit}
.knowledge-quota p{margin:0;color:#7b8798;font-size:12px;line-height:1.55}
.candidate-kind{display:inline-block;border-radius:999px;padding:3px 9px;margin-bottom:7px;font-size:12px;font-weight:700}.candidate-kind.signal{background:#fff5df;color:#9a6200}.candidate-kind.experience{background:#eaf8ef;color:#237a43}
.candidate-value{display:block;margin-top:8px;color:#65758c;font-size:12px;font-style:normal;line-height:1.55}.evolution-actions.compact{grid-template-columns:1fr;min-width:150px}.evolution-actions.compact button{width:100%}
@media(max-width:700px){.evolution-actions.compact{grid-template-columns:1fr 1fr;min-width:0}.knowledge-quota>div:first-child{align-items:flex-start;flex-direction:column;gap:4px}}
.auto-tags{display:block;margin-top:7px;border:1px solid #dce8f8;background:#f5f9ff;color:#47658d;border-radius:9px;padding:9px 11px;font-size:13px}

/* Personal knowledge folders */
.folder-manager{border:1px solid #dce8f8;background:#fff;border-radius:10px;padding:12px 14px;margin-bottom:12px}.folder-create{display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:8px}.folder-create input,.private-library-editor select,.user-exp-form select{width:100%;min-height:40px;border:1px solid var(--line);border-radius:9px;background:#fff;padding:0 11px;color:#26364c}.folder-create button{border:0;border-radius:9px;background:var(--blue);color:#fff;padding:0 16px}.folder-chips{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:10px}.folder-chip-wrap{display:inline-flex;align-items:center;border:1px solid #dce6f4;border-radius:9px;overflow:hidden;background:#f8fbff}.folder-chip{min-height:34px;border:1px solid #dce6f4;border-radius:9px;background:#f8fbff;color:#526681;padding:0 11px}.folder-chip-wrap .folder-chip{border:0;border-radius:0}.folder-chip.active{background:#e9f2ff;color:#2468d8}.folder-icon{width:30px;min-height:34px;border:0;border-left:1px solid #e2eaf5;background:#fff;color:#718096}.folder-icon.danger{color:#a85555}.folder-manager>p{margin:9px 0 0;color:#7b8798;font-size:12px}.private-library-editor select:focus,.user-exp-form select:focus,.folder-create input:focus{outline:none;border-color:#b9d1ff;box-shadow:0 0 0 3px rgba(45,115,255,.08)}
@media(max-width:600px){.folder-create{grid-template-columns:1fr auto}.folder-chips{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}.folder-chip,.folder-chip-wrap{flex:none}}
.contribute-option{display:flex!important;align-items:flex-start;gap:8px;color:#617087;font-size:13px;line-height:1.55}.contribute-option input{width:16px!important;min-height:16px!important;margin-top:2px;flex:none}.private-library-save>div{display:flex;gap:8px}.danger-lite{background:#fff!important;color:#b64c4c!important;border:1px solid #f0cccc!important}
/* Answer workflow routing and feedback actions */
.answer-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.workflow-tag{display:inline-flex;align-items:center;border-left:1px solid #cfe0f6;padding-left:9px;color:#2e5f9d;font-weight:700}
.workflow-tag.specialized{color:#245fd1}
.workflow-tag.general{color:#68788e}
.bubble-actions{justify-content:flex-start;gap:6px}
.answer-icon{width:36px;height:34px;display:grid;place-items:center;border:0;border-radius:8px;background:transparent;color:#748196;font-size:17px;line-height:1;padding:0;transition:background .16s,color .16s,transform .16s}
.answer-icon:hover{background:#f0f5fc;color:#2769d5;transform:translateY(-1px)}
.answer-icon.selected{background:#e9f2ff;color:#1f66da}
.answer-icon:disabled{opacity:.45;cursor:default;transform:none}
.answer-icon.selected:disabled{opacity:1}
.quality-checking{color:#7b8aa3;font-size:12px;margin-left:4px;white-space:nowrap}
.bubble-actions .answer-icon:disabled{cursor:wait}
.continuation-notice{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;padding:10px 12px;border:1px solid #d7e6ff;border-radius:10px;background:#f5f9ff;color:#5f7089;font-size:13px}
.continuation-notice button{flex-shrink:0;border:1px solid #bcd4ff;border-radius:8px;background:#fff;color:#2769d5;padding:7px 12px}
.continuation-notice button:hover{background:#eaf2ff}
.inline-copy,.inline-fav{min-height:34px;padding:0;width:36px;border:0;background:transparent;color:#748196}
@media(max-width:700px){.answer-meta{display:flex;gap:6px}.workflow-tag{width:100%;border-left:0;border-top:1px solid #dce8f8;padding:5px 0 0}.bubble-actions{gap:4px}.answer-icon{width:38px;height:36px}.continuation-notice{align-items:flex-start;flex-direction:column}.continuation-notice button{width:100%}}
.welcome .welcome-guide{margin-top:10px;font-size:14px;line-height:1.55;color:#55719a;background:#f4f8ff;border:1px solid #dbe9ff;border-radius:8px;padding:8px 12px;max-width:680px}
.saved-page{width:min(980px,100%);margin:0 auto;display:grid;gap:22px}
.saved-section{background:#fff;border:1px solid var(--line);border-radius:12px;padding:18px}
.saved-section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.saved-section-head h3{margin:0 0 4px;font-size:18px}.saved-section-head p{margin:0;color:var(--muted);font-size:13px}
.saved-list{display:grid;gap:8px}.saved-item{border:1px solid var(--line);border-radius:10px;background:#fbfdff;overflow:hidden}
.saved-item summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 15px;cursor:pointer}
.saved-item summary::-webkit-details-marker{display:none}.saved-item summary div{min-width:0;display:grid;gap:4px}.saved-item summary b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}.saved-item summary span{color:var(--muted);font-size:12px}.saved-item summary em{font-style:normal;color:#4771ad;font-size:13px;white-space:nowrap}
.saved-item[open] summary{background:#f3f7fd;border-bottom:1px solid var(--line)}
.saved-detail{padding:16px 18px;line-height:1.75;white-space:pre-wrap}.saved-actions{display:flex;justify-content:flex-end;gap:8px;border-top:1px solid var(--line);margin-top:14px;padding-top:10px}
.saved-actions button{min-height:34px;border:1px solid var(--line);border-radius:8px;background:#fff;color:#53647b;padding:0 12px}.saved-actions .danger-lite{color:#b54747;border-color:#f0d5d5;background:#fffafa}
@media(max-width:700px){.saved-page{gap:14px}.saved-section{padding:12px}.saved-item summary{padding:12px}.saved-detail{padding:14px}.saved-item summary b{max-width:68vw}}
@media(max-width:700px){.welcome .welcome-guide{font-size:13px;max-width:92%;margin-top:12px}}


/* Usage guide */
.help-entry{display:flex;align-items:center;justify-content:center;gap:9px;color:#56677f;font-weight:600}
.help-entry span{width:22px;height:22px;border:1px solid #b9c7da;border-radius:50%;display:grid;place-items:center;font-size:13px}
.help-card{width:min(1060px,100%);height:min(760px,calc(100dvh - 48px));padding:0;overflow:hidden;display:flex;flex-direction:column}
.help-head{padding:24px 30px 18px;border-bottom:1px solid var(--line);flex:none}
.help-head h3{font-size:23px;margin:0 0 6px}
.help-head p{margin:0;color:var(--muted);font-size:14px}
.help-layout{display:grid;grid-template-columns:210px minmax(0,1fr);flex:1;min-height:0}
.help-menu{padding:18px 12px;border-right:1px solid var(--line);background:#f8fbff;display:flex;flex-direction:column;gap:5px;overflow:auto}
.help-menu button{border:0;background:transparent;border-radius:8px;min-height:43px;padding:0 15px;text-align:left;color:#596981;transition:background .16s,color .16s,transform .16s}
.help-menu button:hover,.help-menu button.active{background:#eaf3ff;color:var(--blue);transform:translateX(2px)}
.help-content{overflow:auto;padding:24px 32px 32px;line-height:1.75;color:#334155}
.help-panel{display:none;max-width:760px}
.help-panel.active{display:block}
.help-panel h4{font-size:18px;color:#172033;margin:0 0 8px}
.help-panel h4:not(:first-child){margin-top:24px}
.help-panel p{margin:0 0 12px}
.help-panel ul,.help-panel ol{margin:6px 0 14px;padding-left:24px}
.help-panel li{margin:7px 0}
.help-example{border-left:3px solid var(--blue);background:#f5f9ff;padding:13px 16px;margin:10px 0 16px;color:#314866}
.help-tip{background:#f4f8fe;padding:12px 15px;border-radius:8px;color:#46617e}
.help-footer{min-height:54px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:center;gap:12px;color:#7c899c;font-size:13px;flex:none;padding:10px 20px}
.help-footer i{width:1px;height:13px;background:#cbd5e1}
.help-footer b{color:#52657e}
@media(max-width:700px){
  .help-card{height:calc(100dvh - 20px);width:100%;border-radius:12px}
  .help-head{padding:20px 18px 14px}
  .help-head h3{font-size:20px}
  .help-layout{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr)}
  .help-menu{border-right:0;border-bottom:1px solid var(--line);padding:9px 12px;display:flex;flex-direction:row;overflow-x:auto;gap:6px}
  .help-menu button{flex:0 0 auto;min-height:36px;padding:0 12px;text-align:center}
  .help-menu button:hover,.help-menu button.active{transform:none}
  .help-content{padding:20px 18px 28px}
  .help-footer{flex-wrap:wrap;gap:8px;min-height:48px}
}
/* Explicit private-folder references in the chat composer */
.composer{position:relative}.mention-chips{display:flex;flex-wrap:wrap;gap:7px;padding:2px 8px 7px}.mention-chips>span{display:inline-flex;align-items:center;gap:6px;border:1px solid #cfe0ff;background:#eef5ff;color:#315a9d;border-radius:999px;padding:5px 9px;font-size:13px}.mention-chips button{border:0;background:transparent;color:#6482ad;padding:0;font-size:17px;line-height:1}.mention-menu{position:absolute;left:16px;right:16px;bottom:calc(100% - 12px);z-index:60;background:#fff;border:1px solid #d8e4f6;border-radius:10px;box-shadow:0 14px 34px rgba(37,58,90,.16);padding:7px;max-height:280px;overflow:auto}.mention-menu-title{padding:7px 10px;color:#8793a6;font-size:12px}.mention-menu button{width:100%;min-height:42px;border:0;border-radius:8px;background:#fff;color:#334257;padding:0 10px;display:flex;align-items:center;justify-content:space-between;text-align:left}.mention-menu button:hover,.mention-menu button.active{background:#eef5ff;color:#225fcb}.mention-menu em{font-style:normal;color:#8a96a8;font-size:12px}

/* Personal knowledge upload is part of the knowledge workspace */
.experience-submit-card{max-height:88vh;overflow-y:auto;overflow-x:hidden}.kb-upload-panel{min-width:0;border:1px solid #d9e7f8;background:#f8fbff;border-radius:8px;padding:12px 14px;margin:14px 0}.kb-upload-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.kb-upload-head b{font-size:16px}.kb-upload-head p{margin:4px 0 0;color:#7a879a;font-size:13px}.kb-upload-head .ghost-btn{flex:0 0 auto}.kb-upload-panel .user-exp-form{min-width:0;margin-top:12px;border-top:1px solid #e3ebf6;padding-top:12px}.upload-batch-list{display:grid;gap:7px}.upload-batch-list>div{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #dce7f5;border-radius:8px;background:#fff;padding:8px 10px}.upload-batch-list span{display:flex;min-width:0;align-items:center;gap:10px}.upload-batch-list b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;color:#334257}.upload-batch-list em{flex:0 0 auto;font-style:normal;font-size:12px;color:#8290a3}.upload-batch-list button{width:28px;height:28px;border:0;border-radius:7px;background:#f3f6fa;color:#8a96a8}.single-material-divider{display:flex;align-items:center;gap:10px;color:#8a96a8;font-size:12px}.single-material-divider::before,.single-material-divider::after{content:"";height:1px;background:#e2e9f3;flex:1}
@media(max-width:700px){.experience-submit-card{max-height:94vh}.kb-upload-head{align-items:flex-start}.kb-upload-head p{line-height:1.5}.kb-upload-panel{padding:12px}.upload-batch-list span{display:grid;gap:2px}.user-exp-file-row .ghost-btn{width:100%}}
.kb-upload-folder-label{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;color:#52637a;font-size:13px}.kb-upload-folder-label select{width:100%;min-height:42px;border:1px solid var(--line);border-radius:9px;background:#fff;padding:0 11px;color:#26364c}

.job-status.needs_admin_review{background:#fff4e5;color:#9a5b00}.auto-publish-badge{flex:0 0 auto;border:1px solid #b9dfc9;border-radius:999px;background:#eaf8f0;color:#197047;padding:8px 13px;font-size:13px;white-space:nowrap}@media(max-width:700px){.auto-publish-badge{justify-self:start}}

.auth-inline-tip{margin:-4px 2px 1px;color:#8793a6;font-size:13px;line-height:1.55}
.auth-feedback{margin:-7px 2px 12px;padding:10px 12px;border:1px solid #ffd4d4;border-radius:9px;background:#fff5f5;color:#c0392b;font-size:13px;line-height:1.55}.auth-feedback.success{border-color:#bfe8d5;background:#effaf5;color:#176347}
.site-meta{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:5px;color:#a0aabc;font-size:11px;line-height:1.45;white-space:nowrap}.site-meta i{width:1px;height:10px;background:#dbe2ec}.site-meta a{color:#8e9aaf;text-decoration:none}.site-meta a:hover{color:#2d73ff}
@media(max-width:700px){.site-meta{max-width:100%;gap:0;white-space:nowrap;flex-wrap:nowrap;text-align:center;font-size:9.5px;margin-top:4px}.site-meta i,.site-meta a{display:none}.site-meta span:first-child{flex-basis:auto}.site-meta span:first-child::after{content:" · "}}
/* Copyright placement: desktop sidebar, compact mobile footer */
.sidebar-copyright{margin:8px 0 0;text-align:left;color:#a0aabc;font-size:9.5px;line-height:1.65;letter-spacing:0}
.sidebar-copyright p{margin:0;white-space:nowrap}
.sidebar-copyright a{color:#929eb1;text-decoration:none}
.sidebar-copyright a:hover{color:#2d73ff}
.site-meta.mobile-copyright{display:none}
@media(max-width:700px){
  .sidebar-copyright{display:none}
  .site-meta.mobile-copyright{display:flex;align-items:center;justify-content:center;gap:0;max-width:100%;margin-top:4px;color:#a0aabc;font-size:9.5px;line-height:1.45;white-space:nowrap}
  .site-meta.mobile-copyright i{width:0}
  .site-meta.mobile-copyright span:first-child::after{content:" · "}
}
/* Responsive desktop and notebook layout */
@media (min-width:701px) and (max-width:1600px){
  html,body{height:100%;overflow:hidden}
  .shell{height:100vh;min-height:0;display:grid;grid-template-columns:280px minmax(0,1fr)}
  .sidebar{display:flex;height:100vh;min-height:0;max-height:none;padding:20px 20px 14px}
  .side-head{gap:11px;margin-bottom:20px}
  .brand-logo{width:46px;height:46px}
  .side-head h1{font-size:24px}
  .side-head p{font-size:12px;white-space:nowrap}
  .new-chat{height:52px;min-height:52px;flex-basis:52px;font-size:16px}
  .side-nav{gap:5px;margin:18px 0 14px}
  .nav-item{height:46px;font-size:15px;padding:0 12px;gap:11px}
  .side-section{padding-top:14px}
  .conv-item{padding:9px 8px}
  .clear-btn{height:38px;margin-top:10px}
  .sidebar-copyright{font-size:8px}
  .main{height:100vh;min-height:0;overflow:hidden}
  .topbar{height:78px;padding:0 28px;gap:18px}
  .top-title{min-width:0;overflow:hidden}
  .top-title h2{font-size:19px}
  #healthText{max-width:calc(100vw - 650px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .top-actions{display:flex;flex:none;flex-wrap:nowrap;gap:9px;align-items:center}
  .top-actions button,.top-actions .user-badge{flex:none;white-space:nowrap;writing-mode:horizontal-tb}
  .ghost-btn,.primary-lite,.admin-entry{min-height:38px;padding:0 13px;border-radius:11px}
  .user-badge{height:38px;padding:0 11px}
  .content-area{min-height:0;overflow:hidden}
  .composer-wrap,.shell.idle .composer-wrap,.shell.chatting .composer-wrap{position:absolute;left:50%;transform:translateX(-50%);width:min(920px,calc(100% - 64px));margin:0}
  .shell.idle .composer-wrap{bottom:27vh}
  .shell.chatting .composer-wrap{bottom:18px}
  .example-panel{position:absolute;left:50%;bottom:4vh;transform:translateX(-50%);width:min(920px,calc(100% - 64px));margin:0}
  .example-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
  .example-card{min-width:0;padding:14px}
  .example-card strong,.example-card span,.example-card em{overflow-wrap:anywhere}
  .bubble,.bubble.user{grid-template-columns:34px minmax(0,1fr)}
  .admin-grid,.model-form{grid-template-columns:repeat(4,1fr)}
  .admin-list{grid-column:span 2}
}
@media (min-width:701px) and (max-height:900px){
  .topbar{height:68px}
  .welcome{flex:initial;height:100%;justify-content:flex-start;padding:clamp(10px,3vh,28px) 18px 0}
  .welcome-logo{width:46px;height:46px;margin-bottom:8px}
  .welcome h3{font-size:32px;line-height:1.12;margin:0 0 8px}
  .welcome p{font-size:15px;line-height:1.45}
  .welcome .welcome-guide{margin-top:6px;font-size:12px;padding:5px 9px;line-height:1.4}
  .welcome .welcome-status{margin-top:7px;font-size:12px;padding:5px 10px}
  .shell.idle .composer-wrap{top:clamp(245px,34vh,300px);bottom:auto}
  .shell.idle .composer textarea{height:76px;min-height:76px}
  .shell.idle .example-panel{top:clamp(435px,65vh,585px);bottom:auto}
  .example-head{margin-bottom:8px}
  .example-card{min-height:104px;padding:12px;gap:5px}
  .example-card i{width:25px;height:25px}
  .example-card strong{font-size:15px}
  .example-card span{font-size:13px;line-height:1.35}
  .example-card em{font-size:12px}
}
/* Extra compact desktop height */
@media (min-width:701px) and (max-height:600px){
  .shell.idle .composer textarea{height:50px;min-height:50px}
  .shell.idle .example-panel{top:407px}
  .example-panel{overflow:hidden}
  .example-head{height:22px;margin-bottom:6px}
  .example-card{height:82px;min-height:82px;padding:8px;gap:3px;align-content:start}
  .example-card i{width:22px;height:22px;font-size:11px}
  .example-card strong{font-size:14px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .example-card span{font-size:12px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .example-card em{display:none}
}
/* Dedicated history view */
.history-page{width:min(920px,100%);margin:0 auto;background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px;box-shadow:0 10px 28px rgba(37,58,90,.05)}
.history-page-head{border-bottom:1px solid var(--line);padding-bottom:14px;margin-bottom:8px}.history-page-head h3{margin:0 0 5px;font-size:20px}.history-page-head p,.history-empty{margin:0;color:var(--muted);font-size:14px}
.history-page-list{display:grid}.history-page-item{width:100%;border:0;border-bottom:1px solid #edf1f7;background:#fff;padding:14px 10px;display:flex;align-items:center;justify-content:space-between;gap:16px;text-align:left;color:#26364c;transition:background .16s,color .16s}.history-page-item:last-child{border-bottom:0}.history-page-item:hover{background:#f5f9ff;color:var(--blue)}.history-page-item span{display:grid;gap:5px;min-width:0}.history-page-item b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}.history-page-item small{color:#8a96a8}.history-page-item em{font-style:normal;color:#6b7e98;font-size:13px;flex:0 0 auto}
@media(max-width:700px){.history-page{padding:14px;border-radius:10px}.history-page-item{padding:13px 6px}.history-page-item b{max-width:70vw}}
/* Web page and WeChat article extraction for knowledge distillation */
.web-link-panel{display:grid;gap:10px;border:1px solid #dce7f5;border-radius:8px;background:#fff;padding:12px}
.web-link-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
.web-link-row input{width:100%;min-height:42px;border:1px solid var(--line);border-radius:9px;padding:0 12px;outline:none}
.web-link-row input:focus{border-color:#b9d1ff;box-shadow:0 0 0 3px rgba(45,115,255,.08)}
.web-link-panel>.hint{margin:0;white-space:normal;line-height:1.55}
.web-link-preview{border:1px solid #cfe0ff;border-radius:8px;background:#f5f9ff;padding:10px 12px;color:#34445a}
.web-link-preview b,.web-link-preview span{display:block}.web-link-preview span{margin-top:4px;color:#617895;font-size:12px}
.web-link-preview p{margin:8px 0 0;line-height:1.55;color:#617087;font-size:13px}
.distill-progress{border:1px solid #cfe0ff;border-radius:10px;background:#f7faff;padding:16px}
.distill-progress>div{display:flex;align-items:center;justify-content:space-between;color:#24456f}
.distill-progress>i{display:block;height:8px;margin-top:12px;overflow:hidden;border-radius:99px;background:#e4edf9}
.distill-progress>i>em{display:block;height:100%;border-radius:inherit;background:#2d73ff;transition:width .45s ease}
.distill-progress p{margin:10px 0 0;color:#7a879a;font-size:13px}
@media(max-width:700px){.web-link-row{grid-template-columns:1fr}.web-link-row .ghost-btn{width:100%}}
/* Answer document title */
.bubble-body h1{display:block;font-size:23px;font-weight:800;line-height:1.35;margin:2px 0 10px;color:#071426;letter-spacing:0}
.answer-meta + h1{margin-top:2px}
@media(max-width:700px){.bubble-body h1{font-size:20px;line-height:1.4;margin:1px 0 8px}}
/* Distillation modal overflow guard */
.user-exp-file-row{min-width:0;flex-wrap:wrap}
.user-exp-file-row #pasteWebLinkBtn{width:auto;min-width:190px;max-width:260px;min-height:42px;height:42px;line-height:1.2;padding:0 16px;white-space:nowrap}
.web-link-preview{min-width:0;max-width:100%;overflow:hidden}
.web-link-preview b,.web-link-preview span,.web-link-preview p{max-width:100%;overflow-wrap:anywhere;word-break:break-word}
