@font-face{font-family:Inter;src:url('/assets/vendor/inter.woff2') format('woff2');font-display:swap;font-weight:400}
:root{
  --paper:#faf9f6;--panel:#eeeff8;--white:#fffefd;--ink:#23243b;--muted:#626478;
  --line:#ddddea;--accent:#414da6;--accent-hover:#303a86;--light:#e7eafa;
  --ochre:#8a4b0b;--blue:#426386;--focus:#727fc2;--shadow:0 10px 30px #30366c0c;
  color-scheme:light;font-family:Inter,"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",system-ui,sans-serif;
  color:var(--ink);background:var(--paper);font-size:15px;-webkit-text-size-adjust:100%;
}
*{box-sizing:border-box}
body{margin:0}
button,input,textarea,select{font:inherit}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button{cursor:pointer;color:inherit}
button{border:0;background:none}
button:disabled{opacity:.5;cursor:default}
button:focus-visible,a:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
button,a,input,textarea,select{touch-action:manipulation}
input,textarea,select{color:var(--ink)}
a{color:var(--accent);text-underline-offset:3px}
h1,h2,h3,p{margin-top:0}
h1,h2,h3{letter-spacing:-.035em}
h1{font-size:30px;line-height:1.3}
h2{font-size:20px}
h3{font-size:15px}
small,.muted{color:var(--muted)}
small{font-size:12px;line-height:1.6}
[hidden]{display:none!important}
.icon{width:19px;height:19px;display:inline-block;vertical-align:middle;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.icon-button,.icon-link{display:inline-grid;place-items:center;width:38px;height:38px;border-radius:10px;color:var(--muted);text-decoration:none;flex:none}
.icon-button:hover,.icon-link:hover,.quiet:hover{background:#e8eaf5;color:var(--ink)}
.row{display:flex;align-items:center;gap:10px;min-width:0}
.brand{display:flex;align-items:center;gap:11px;font-size:21px;font-weight:700;letter-spacing:.03em;white-space:nowrap}
.brand-mark{width:37px;height:37px;background:var(--accent);color:#fffdf8;border-radius:35% 35% 35% 10%;display:inline-grid;place-items:center;flex:none}
.brand-mark::before{content:"?";font:700 var(--mark-size,26px)/1 Inter,Arial,sans-serif;letter-spacing:-.04em;transform:rotate(-7deg)}
.primary,.secondary,.quiet,.danger,.toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:10px;padding:10px 15px;font-size:14px;line-height:1.4}
.primary{background:var(--accent);color:white;font-weight:600}
.primary:hover{background:var(--accent-hover)}
.secondary{background:var(--white);border:1px solid var(--line)}
.secondary:hover{border-color:#a6acd0}
.quiet{color:var(--muted)}
.danger{background:#9a4439;color:#fff}
.danger-text{color:#964638}
.loading{color:var(--muted);padding:32px}
#notice{position:fixed;z-index:12;left:50%;bottom:max(22px,env(safe-area-inset-bottom));max-width:min(92vw,560px);width:max-content;transform:translateX(-50%);padding:12px 18px;background:#343951;color:white;border-radius:12px;font-size:14px;box-shadow:0 5px 25px #0002}
.shell{display:grid;grid-template-columns:246px minmax(0,1fr);height:100vh;height:100dvh;overflow:hidden}
.sidebar{background:var(--panel);border-right:1px solid var(--line);display:flex;flex-direction:column;padding:29px 17px 15px;min-width:0;overflow:hidden}
.sidebar>.brand{margin:0 11px 32px}
.new-chat{width:100%;justify-content:flex-start;padding:12px 15px;gap:12px}
.side-title{margin:32px 10px 9px;color:var(--muted);font-size:12px;font-weight:600;letter-spacing:.05em}
.history{min-height:0;overflow:auto;flex:1}
.history-item,.nav-item{display:flex;gap:10px;align-items:center;width:100%;min-width:0;color:#555972;text-align:left;border-radius:9px;padding:11px 10px}
.history-item .icon{width:16px;height:16px}
.history-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.history-item:hover,.nav-item:hover,.history-item.selected,.nav-item.on{background:#e0e4f7;color:var(--accent)}
.history-empty{font-size:13px;color:var(--muted);line-height:1.7;margin:8px 10px}
.sidebar-bottom{margin-top:18px;display:grid;gap:7px}
.profile{border-top:1px solid #d6d8e7;padding:15px 5px 2px;display:flex;align-items:center;gap:10px}
.profile-name{flex:1;min-width:0}
.profile-name b{display:block;font-size:14px;overflow:hidden;text-overflow:ellipsis}
.profile-name small{font-size:11px}
.avatar{display:inline-grid;place-items:center;flex:none;width:34px;height:34px;border-radius:50%;background:#dee2f7;color:#384383;font-size:14px;font-weight:700}
.main{min-width:0;min-height:0;display:flex;flex-direction:column}
.topbar{height:70px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 clamp(18px,4vw,58px);gap:12px;flex:none}
.topbar-title{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:600;min-width:0}
.topbar-title>.icon{color:var(--accent);width:18px}
.topbar-title span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.model-picker{position:relative;display:flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:24px;color:var(--accent);padding:5px 10px;min-height:34px;background:var(--white);min-width:0;max-width:270px}
.model-picker .icon{width:15px;height:15px}
.model-name{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px;font-weight:600}
.model-picker select{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.model-picker select:disabled{cursor:default}
.model-picker:focus-within{outline:2px solid var(--focus);outline-offset:2px}
.strength-badge{display:inline-flex;align-items:center;flex:none;white-space:nowrap;border-radius:6px;padding:2px 6px;font-size:11px;font-weight:650;line-height:1.45;background:#fff0d7;color:#824207}
.strength-settings{min-width:0;margin:4px 0 18px;border:1px solid var(--line);border-radius:12px;padding:12px 14px}
.strength-settings legend{color:var(--ochre);font-size:13px;font-weight:650;padding:0 5px}
.strength-settings .field{margin:0 0 5px}
.model-picker .caret{pointer-events:none;font-size:11px}
.mobile-menu,.scrim,.mobile-brand{display:none}
.chat-area{display:flex;flex:1;min-height:0;flex-direction:column}
.scroll-area{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.inner{width:min(100% - 64px,790px);margin:0 auto}
.empty-wrap{min-height:100%;display:flex;align-items:center;padding:42px 0}
.welcome{max-width:790px;width:100%}
.welcome-art{width:75px;height:65px;display:block;position:relative;isolation:isolate;margin:0 0 19px 4px}
.welcome-art .brand-mark{--mark-size:41px;position:absolute;top:2px;left:1px;width:54px;height:53px;transform:rotate(-7deg);box-shadow:0 4px 10px #3536721b}
.welcome-art::after{content:"";position:absolute;z-index:-1;left:36px;top:27px;width:34px;height:31px;background:#f0b675;border-radius:11px 11px 4px 11px;transform:rotate(9deg)}
.welcome h1{font-family:"Songti SC","STSong","SimSun","Noto Serif CJK SC",serif;font-weight:650;font-size:clamp(38px,4.3vw,57px);letter-spacing:-.06em;margin-bottom:12px}
.welcome>p{color:var(--muted);line-height:1.75;font-size:15px;margin-bottom:29px}
.suggestions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.suggestion{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:7px;padding:18px 16px 17px;border:1px solid var(--line);border-radius:15px;background:var(--white);text-align:left;transition:transform .15s,border-color .15s}
.suggestion:hover{transform:translateY(-2px);border-color:#9fa9d6}
.suggestion strong{font-size:15px}
.suggestion small{font-size:12px}
.chip-icon{display:inline-grid;place-items:center;width:31px;height:31px;border-radius:10px;background:#e7e9fb;color:#4d55a0;margin-bottom:8px}
.chip-icon.blue{background:#e5edf8;color:var(--blue)}
.chip-icon.gold{background:#fcf0dd;color:var(--ochre)}
.suggestion>.icon{position:absolute;right:15px;top:20px;width:14px;height:14px;color:#87899d}
.composer-wrap{padding:12px 0 max(15px,env(safe-area-inset-bottom));flex:none}
.composer{background:var(--white);border:1px solid #c7c9df;border-radius:20px;padding:14px 15px 11px;box-shadow:var(--shadow)}
.composer:focus-within{border-color:var(--focus)}
.composer textarea{display:block;resize:none;border:0;outline:none;background:transparent;line-height:1.6;padding:2px 2px 10px;width:100%;height:54px;min-height:45px;max-height:150px;font-size:16px;color:var(--ink)}
.composer textarea::placeholder{color:#6d7084}
.compose-tools,.modes{display:flex;align-items:center;gap:4px}
.compose-tools{justify-content:space-between}
.mode{font-size:13px;line-height:1.6;display:flex;gap:5px;align-items:center;color:var(--muted);border-radius:8px;padding:5px 9px;white-space:nowrap}
.mode .icon{width:15px;height:15px}
.mode.active{background:var(--light);color:var(--accent);font-weight:600}
.mode:hover{background:#eeeef7}
.send{width:35px;height:35px;border-radius:50%;background:var(--accent);color:white;display:inline-grid;place-items:center;flex:none}
.send:disabled{background:#e2e4ef;color:#747a94;opacity:1}
.composer-footer{margin:8px 0 0;text-align:center;color:var(--muted);font-size:11px;line-height:1.5}
.composer-footer button,.text-action{color:var(--accent);font-size:inherit;text-decoration:underline;text-underline-offset:3px;padding:0 2px}
.attach-row{display:flex;align-items:center;gap:9px;margin-bottom:6px}
.attach-row img{width:43px;height:43px;border-radius:6px;object-fit:cover}
.attach-btn{padding:4px 8px;background:var(--panel);border-radius:7px;display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--muted)}
.attach-btn .icon{width:14px}
.messages{padding:27px 0 10px;display:grid;gap:24px}
.msg.user{justify-self:end;max-width:86%;background:#e9ecfc;border-radius:15px 15px 4px 15px;padding:12px 17px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;font-size:15px}
.msg.assistant{min-width:0;width:100%}
.byline{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px;margin-bottom:7px;flex-wrap:wrap}
.byline strong{font-size:13px;color:var(--accent)}
.byline .brand-mark{--mark-size:16px;width:23px;height:23px}
.prose{font-size:15px;line-height:1.8;overflow-wrap:anywhere}
.prose>*:last-child{margin-bottom:0}
.prose h1,.prose h2,.prose h3{font-family:inherit;font-size:1.13em;margin:14px 0 5px}
.prose p,.prose ul,.prose ol{margin:0 0 10px}
.prose pre{background:#efeff7;border:1px solid var(--line);border-radius:10px;overflow:auto;padding:12px}
.prose code{font-size:.9em;background:#eeeef7;padding:2px 4px;border-radius:4px}
.prose pre code{padding:0}
.prose blockquote{border-left:3px solid #a4abd4;margin:8px 0;padding:1px 12px;color:var(--muted)}
.prose table{display:block;overflow:auto;border-collapse:collapse}
.prose td,.prose th{border:1px solid var(--line);padding:4px 9px}
.stream-text{white-space:pre-wrap}
.wait-text{color:var(--muted);font-size:14px}
.thread-img{max-width:min(100%,300px);max-height:360px;display:block;border-radius:12px}
.image-open{padding:0;display:block;max-width:100%;margin-top:8px}
.img-actions,.source-list{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}
.img-actions a,.img-actions button,.source-list a,.pill{font-size:12px;text-decoration:none;border:1px solid var(--line);border-radius:8px;padding:5px 8px;display:inline-flex;align-items:center;gap:5px;color:var(--accent);background:var(--white)}
.img-actions .icon,.source-list .icon{width:14px;height:14px}
.source-list a{max-width:100%;overflow-wrap:anywhere}
.error{border-left:3px solid #bb6f4b;color:#85432f;font-size:14px;line-height:1.65;background:#faeee3;border-radius:3px 8px 8px 3px;padding:9px 12px;margin:8px 0}
.login-page{min-height:100vh;min-height:100dvh;display:grid;grid-template-columns:minmax(270px,45%) 1fr}
.login-aside{position:relative;overflow:hidden;background:linear-gradient(145deg,#292f68,#434d9a);color:#fffaf4;display:flex;flex-direction:column;justify-content:space-between;padding:clamp(30px,5vw,80px)}
.login-aside .brand-mark{background:#e8eaff;color:#323d86}
.login-illustration{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-7deg);opacity:.96}
.login-illustration .welcome-art{transform:scale(3.3);margin:0}
.login-aside p{max-width:290px;margin:0;font-size:17px;line-height:1.8;letter-spacing:.04em;color:#e5e7fb}
.login-pane{display:grid;place-items:center;padding:32px 22px}
.login-box{max-width:350px;width:100%}
.login-box>.brand{display:none}
.login-box h1{font-size:32px;margin-bottom:8px}
.login-box>p{color:var(--muted);line-height:1.75;margin-bottom:26px}
.field{display:grid;gap:7px;margin-bottom:16px;font-size:13px;font-weight:600}
.field input,.field select{height:43px;border-radius:9px;border:1px solid #c9ccde;background:var(--white);padding:8px 11px;min-width:0;width:100%;font-size:15px;font-weight:400}
.field input:focus,.field select:focus{border-color:var(--accent);outline:2px solid #cbd0ef}
.field small{font-weight:400}
.login-box .primary{width:100%;height:43px}
.admin-scroll{overflow:auto;flex:1}
.admin-content{max-width:1100px;margin:auto;padding:32px clamp(18px,4.5vw,55px) 55px}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.section-head h1,.section-head h2{margin:0}
.section-head small{display:block;margin-top:5px}
.tabs{display:flex;border-bottom:1px solid var(--line);gap:22px;margin:0 0 25px;overflow:auto}
.tabs button{font-size:14px;font-weight:600;white-space:nowrap;padding:11px 1px;color:var(--muted);border-bottom:2px solid transparent}
.tabs button.on{border-color:var(--accent);color:var(--accent)}
.kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin-bottom:18px}
.panel,.kpi{border:1px solid var(--line);border-radius:15px;background:var(--white);box-shadow:0 2px 7px #30366c07}
.kpi{padding:18px 20px}
.kpi .row{font-size:13px;color:var(--muted)}
.kpi .icon{width:16px;color:var(--accent)}
.number{display:block;font-weight:600;letter-spacing:-.045em;font-size:clamp(26px,3.2vw,36px);margin:12px 0 4px}
.number span{font-size:14px;letter-spacing:0;color:var(--muted);font-weight:400;margin-left:4px}
.panel{padding:22px;margin-bottom:16px}
.panel h2{margin:0 0 15px;font-size:18px}
.panel .section-head h2{margin:0}
.meter{display:flex;height:10px;overflow:hidden;border-radius:6px;background:#e7e8f0;margin:12px 0}
.meter i{display:block;height:100%;background:#5e67b5}
.meter i.gold,.dot.gold{background:#ce8c45}
.meter i.grey,.dot.grey{background:#b8bbcd}
.meter i.blue,.dot.blue{background:#839cc9}
.legend{display:flex;gap:7px 20px;flex-wrap:wrap}
.legend span{font-size:12px;color:var(--muted);display:inline-flex;gap:5px;align-items:center}
.dot{display:inline-block;width:8px;height:8px;background:#5e67b5;border-radius:50%}
.table-wrap{overflow-x:auto}
table.members{width:100%;border-collapse:collapse;white-space:nowrap;text-align:left}
.members td,.members th{padding:12px 9px;border-bottom:1px solid #e2e3ec;font-size:13px}
.members tr:last-child td{border-bottom:0}
.members th{color:var(--muted);font-size:12px;font-weight:500}
.members td:first-child,.members th:first-child{padding-left:0}
.members .avatar{width:27px;height:27px;font-size:12px}
.member-cell b{display:block;font-size:13px}
.member-cell small{font-size:11px}
.mini-meter{height:4px;max-width:90px;background:#e5e6f0;border-radius:5px;margin-top:6px;overflow:hidden}
.mini-meter i{display:block;height:100%;background:#7984c6}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}
.form-panel{max-width:780px}
.form-panel>p{font-size:13px;color:var(--muted);line-height:1.65}
.model-list{display:flex;gap:6px;flex-wrap:wrap;max-height:180px;overflow:auto}
.pill{font-size:12px;overflow-wrap:anywhere;max-width:100%}
dialog{border:1px solid var(--line);border-radius:17px;background:var(--white);color:var(--ink);padding:24px;width:min(440px,calc(100% - 30px));max-height:88dvh;box-shadow:0 18px 90px #24284d25}
dialog::backdrop{background:#23254270}
dialog .section-head{margin-bottom:16px}
dialog .section-head h2{font-size:20px}
dialog>p,dialog form>p{line-height:1.6;font-size:14px}
.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:21px}
.image-dialog{width:auto;max-width:min(920px,94vw)}
.image-dialog img{display:block;max-width:100%;max-height:66dvh;margin:auto;border-radius:8px}
.check{display:flex;align-items:center;gap:8px;font-size:14px}
@media(max-width:850px){.shell{grid-template-columns:196px minmax(0,1fr)}.sidebar{padding-left:12px;padding-right:12px}.inner{width:calc(100% - 40px)}.suggestion{padding:14px 11px}.suggestion>.icon{right:10px}.topbar{padding:0 21px}}
@media(max-width:720px){.shell{display:block}.main{height:100%}.mobile-menu{display:inline-grid}.sidebar{position:fixed;left:0;top:0;bottom:0;z-index:6;width:min(290px,85vw);transform:translateX(-102%);transition:transform .18s;padding-top:max(24px,env(safe-area-inset-top))}.shell.drawer .sidebar{transform:none}.shell.drawer .scrim{display:block;position:fixed;inset:0;background:#25274660;z-index:5}.topbar{height:54px;padding:0 12px}.topbar-title{gap:5px}.topbar-title>.icon{display:none}.topbar .row{gap:4px}.inner{width:calc(100% - 32px)}.empty-wrap{padding:24px 0}.welcome-art{transform:scale(.84);transform-origin:bottom left;margin-bottom:13px;height:56px}.welcome h1{font-size:39px}.welcome>p{font-size:14px;margin-bottom:20px}.suggestions{gap:7px}.suggestion{border-radius:12px;padding:12px 8px;gap:4px}.suggestion strong{font-size:13px}.suggestion small{font-size:11px;line-height:1.5}.suggestion>.icon{display:none}.chip-icon{width:27px;height:27px;margin-bottom:4px}.chip-icon .icon{width:16px}.composer-wrap{padding:7px 0 max(8px,env(safe-area-inset-bottom))}.composer{border-radius:16px;padding:10px}.compose-tools{gap:2px}.mode{padding:5px 7px;font-size:12px}.messages{padding-top:19px;gap:19px}.composer-footer{font-size:10px;margin-top:6px}.kpis{gap:7px}.kpi{padding:12px 9px}.kpi .row{font-size:11px;gap:4px}.kpi .icon{width:13px}.kpi small{font-size:10px}.number{font-size:23px}.number span{font-size:11px;margin-left:2px}.panel{padding:15px;border-radius:12px}.admin-content{padding:19px 13px 35px}.admin-content h1{font-size:25px}.section-head{gap:6px}.section-head .secondary,.section-head .primary{padding:8px 11px;font-size:12px}.section-head .icon{width:15px}.login-page{display:block}.login-aside{display:none}.login-pane{min-height:100dvh}.login-box>.brand{display:flex;margin-bottom:48px}.form-grid{grid-template-columns:1fr}.login-box h1{font-size:30px}}
@media(max-width:370px){.inner{width:calc(100% - 24px)}.mode{padding:5px}.suggestion small{display:none}.kpi .row>.icon{display:none}.kpi{padding:10px 7px}}
@media(max-width:720px){
  .topbar-title .mobile-brand{display:inline;color:var(--accent)}
  .mobile-brand + #page-title{display:none}
  .topbar>.row{max-width:70%;flex:none}
  .model-picker{max-width:min(49vw,240px);padding-inline:7px;gap:4px}
  .strength-settings .field:first-child{margin-bottom:10px}
  .sidebar{visibility:hidden}.shell.drawer .sidebar{visibility:visible}
  table.members,.members tbody{display:block}
  .members thead{position:absolute;clip-path:inset(100%);width:1px;height:1px;overflow:hidden}
  .members tr{position:relative;display:grid;grid-template-columns:1fr .8fr 1.45fr;gap:10px;padding:13px 0;border-bottom:1px solid var(--line)}
  .members tr:last-child{border-bottom:0}
  .members td{display:block;padding:0;border:0}
  .members td:first-child{grid-column:1/-1}
  .members td[data-label]::before{content:attr(data-label);display:block;color:var(--muted);font-size:10px;margin-bottom:3px}
  .members td[data-label]{font-size:12px}
  .members .member-cell>span:last-child{display:flex;align-items:center;gap:8px}
  .members .edit-cell{position:absolute;top:15px;right:2px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;scroll-behavior:auto!important}}
