/* Shared visual vocabulary. Existing components retain their DOM and behavior. */
html[data-writer-ui]{--ui-bg:#f6f8fc;--ui-surface:#fff;--ui-text:#202b40;--ui-muted:#738097;--ui-line:#e5eaf3;--ui-primary:#6350dc;--ui-primary-soft:#eeeafb;--ui-radius:20px;--ui-shadow:0 5px 24px #25355b05;--primary-color:#6350dc;--primary-hover:#5040c3}
html[data-writer-ui] body{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:var(--ui-text);background:var(--ui-bg);font-synthesis:none}
html[data-writer-ui] *,html[data-writer-ui] *::before,html[data-writer-ui] *::after{box-sizing:border-box}
html[data-writer-ui] :is(button,input,select,textarea){font:inherit}
html[data-writer-ui] :is(button,a,input,select,textarea,[tabindex]):focus-visible{outline:3px solid #b8a9f2;outline-offset:3px}
html[data-writer-ui] button:disabled{cursor:not-allowed;opacity:.55}
html[data-writer-ui] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]),select,textarea){border-color:var(--ui-line);border-radius:11px;background-color:#fbfcfe;color:var(--ui-text);transition:border-color .15s,box-shadow .15s;max-width:100%}
html[data-writer-ui] :is(input,select,textarea):focus{border-color:#b3a5ee;box-shadow:0 0 0 3px #ad9be914}
html[data-writer-ui] :is(input[type=checkbox],input[type=radio]){accent-color:var(--ui-primary)}
html[data-writer-ui] :is(h1,h2,h3){letter-spacing:-.35px;color:var(--ui-text)}
html[data-writer-ui] :is(.main-content,.content-area,.dashboard-main,.admin-content){min-width:0;background:var(--ui-bg)}
html[data-writer-ui] :is(.sidebar,.dashboard-sidebar){background:#f6f8fc;border-right:1px solid var(--ui-line)}
html[data-writer-ui] .sidebar{width:218px;flex-shrink:0;padding:22px 12px 16px}
html[data-writer-ui] .sidebar-header{padding:0 8px 20px;border-bottom:1px solid var(--ui-line);margin-bottom:18px}
html[data-writer-ui] .sidebar-logo{color:var(--ui-text);font-weight:750;font-size:20px;gap:4px}
html[data-writer-ui] .sidebar-logo img{width:34px;height:34px;object-fit:contain;border-radius:9px}
html[data-writer-ui] .sidebar-search{padding:0 3px;margin-bottom:12px}
html[data-writer-ui] .sidebar-search .search-input{background:white;border:1px solid var(--ui-line);border-radius:12px}
html[data-writer-ui] .sidebar-item{margin:3px 0;border-radius:11px;color:#738098;padding:12px 14px;transition:background .15s,color .15s}
html[data-writer-ui] .sidebar-item:hover{background:#eeeefa;color:#5e4acb}
html[data-writer-ui] .sidebar-item.active{background:var(--ui-primary-soft);color:#5a43d0;border-color:transparent;box-shadow:inset 3px 0 #7d65df;font-weight:650}
html[data-writer-ui] .sidebar-item i{color:inherit}
html[data-writer-ui] .recents-header{color:#8995aa;font-size:11px;letter-spacing:.3px;padding:17px 12px 8px}
html[data-writer-ui] .recent-chat-item{border-radius:9px;color:#738097;margin:2px 0}
html[data-writer-ui] .recent-chat-item:hover{background:#eceef8}
html[data-writer-ui] .sidebar-user-info{background:transparent;border-top:1px solid var(--ui-line);border-radius:0;padding:14px 8px 0}
html[data-writer-ui] :is(.user-greeting,.user-vip-badge){overflow-wrap:anywhere}
html[data-writer-ui] .word-limit-progress{background:#e8eaf3;border-radius:20px;height:5px;overflow:hidden}
html[data-writer-ui] .word-limit-bar{background:#a391da;border-radius:20px}
html[data-writer-ui] .module-links{display:flex;gap:6px;flex-wrap:wrap;margin:0 2px 14px;padding-bottom:14px;border-bottom:1px solid var(--ui-line)}
html[data-writer-ui] .module-links a{display:flex;align-items:center;justify-content:center;gap:5px;flex:1;min-width:75px;padding:9px 7px;border-radius:10px;border:1px solid #e7e8f3;background:white;color:#796a9f;font-size:12px;text-decoration:none}
html[data-writer-ui] .module-links a:hover,html[data-writer-ui] .module-links a[aria-current]{background:var(--ui-primary-soft);border-color:#d9d1f2;color:var(--ui-primary)}
.ui-skip-link{position:fixed;left:18px;top:-80px;z-index:100000;padding:12px 18px;background:#6350dc;color:white;border-radius:10px;text-decoration:none}
.ui-skip-link:focus{top:12px}
html[data-writer-ui] :is(.page-header,.history-header,.statistics-header){border:1px solid #e7e8f6;background:linear-gradient(110deg,#eff2ff,#f7f3ff 65%,#eff8ff);border-radius:var(--ui-radius);padding:24px 26px;margin-bottom:22px;gap:16px;flex-wrap:wrap;box-shadow:none}
html[data-writer-ui] :is(.history-title,.statistics-title,.page-title){color:#282945;font-weight:750;font-size:26px}
html[data-writer-ui] :is(.history-title,.statistics-title,.page-title)>i{color:#8573c1}
html[data-writer-ui] :is(.info-card,.stats-card,.profile-card,.admin-card,.user-sessions,.restricted-card,.component-card){background:white;border:1px solid var(--ui-line);border-radius:var(--ui-radius);box-shadow:var(--ui-shadow);overflow-wrap:anywhere}
html[data-writer-ui] :is(.card-header,.admin-card-header){border-bottom:1px solid #edf0f6;background:transparent;padding:20px 22px;gap:14px;flex-wrap:wrap}
html[data-writer-ui] :is(.card-content,.admin-card-body){padding:22px}
html[data-writer-ui] :is(.card-title,.admin-card-title,.stats-card-title){color:var(--ui-text);font-size:17px;font-weight:650}
html[data-writer-ui] :is(.notification-item,.update-item){border-color:#edf0f6;padding-top:16px;padding-bottom:16px}
html[data-writer-ui] :is(.notification-card,.quick-actions-card,.update-card,.dashboard-main){border-color:var(--ui-line)}
html[data-writer-ui] :is(.quick-action-button,.mode-option,.tier-option){border:1px solid var(--ui-line);background:white;border-radius:16px;box-shadow:none;transition:border-color .16s,box-shadow .16s,transform .16s}
html[data-writer-ui] :is(.quick-action-button,.mode-option,.tier-option):hover{border-color:#c0b2ef;box-shadow:0 4px 17px #6452d00b;transform:translateY(-1px)}
html[data-writer-ui] :is(.mode-option,.tier-option).selected{border-color:#9c87e4;background:#f5f2ff;box-shadow:0 0 0 2px #b6a5ef12}
html[data-writer-ui] .mode-selection-area{background:var(--ui-bg)}
html[data-writer-ui] .mode-content-wrapper{width:100%;max-width:1180px;margin-inline:auto}
html[data-writer-ui] :is(.mode-icon,.tier-icon){border-radius:13px}
html[data-writer-ui] :is(.mode-info h3,.tier-info h3){color:#2c3450}
html[data-writer-ui] :is(.mode-info p,.tier-info p,.tier-description,.ai-slogan){color:var(--ui-muted);line-height:1.8}
html[data-writer-ui] .slogan-highlight{color:#7760c3}
html[data-writer-ui] :is(.header,.mobile-page-header){background:#fffffff0;border-bottom:1px solid var(--ui-line);box-shadow:none}
html[data-writer-ui] :is(.filter-container,.search-container){background:white;border:1px solid var(--ui-line);border-radius:16px;padding:18px 20px}
html[data-writer-ui] .filter-form{gap:16px;align-items:flex-end;flex-wrap:wrap}
html[data-writer-ui] .filter-label{color:#6e7b91;font-size:12px}
html[data-writer-ui] :is(.filter-input,.filter-select){min-height:40px;padding:8px 12px}
html[data-writer-ui] :is(.filter-submit,.admin-btn-primary,.submit-button,.force-login-button,.send-button,.btn-primary,.upload-btn){background:linear-gradient(115deg,#7057df,#5845d6);border-color:transparent;color:white;border-radius:11px;box-shadow:0 4px 12px #6452d015}
html[data-writer-ui] :is(.filter-button,.admin-btn,.back-button,.update-stats-button,.quick-action-button,.history-action-btn,.remove-btn,.back-btn,.btn-back){border-radius:10px;font-weight:550;transition:filter .15s,box-shadow .15s}
html[data-writer-ui] :is(.filter-reset,.back-button,.btn-back,.back-btn){background:white;border:1px solid var(--ui-line);color:#7b6b9e}
html[data-writer-ui] :is(.history-item,.session-item){background:white;border:1px solid var(--ui-line);border-radius:16px;box-shadow:none;transition:border-color .15s,box-shadow .15s}
html[data-writer-ui] .history-item:hover{border-color:#cbbdee;box-shadow:0 4px 15px #7760c808}
html[data-writer-ui] :is(.history-title-text,.user-name){color:#28344b;font-weight:650}
html[data-writer-ui] :is(.history-meta,.session-details,.detail-label){color:#8290a5}
html[data-writer-ui] :is(.no-history,.no-data,.no-sessions){background:#fafbfe;border:1px dashed #dfe4ef;border-radius:16px;padding:35px 20px;color:#8a97ae;line-height:1.8}
html[data-writer-ui] :is(.modal-content,.admin-modal-content,.qrcode-modal-content){border:1px solid #e8eaf4;border-radius:20px;box-shadow:0 22px 90px #27314d25}
html[data-writer-ui] :is(.modal-title,.admin-modal-title){font-size:19px;color:var(--ui-text)}
html[data-writer-ui] :is(.admin-alert,.error-message,.verification-notice,.session-limit-info,.notice){border-radius:12px;line-height:1.7}
html[data-writer-ui] .admin-container{min-height:100dvh;height:100dvh;background:var(--ui-bg)}
html[data-writer-ui] .admin-topbar{background:white;color:#546179;border-bottom:1px solid var(--ui-line);box-shadow:0 3px 17px #263a6504;flex-wrap:wrap;padding:9px 18px;gap:5px 14px;flex-shrink:0;z-index:20}
html[data-writer-ui] .admin-topbar-header{border:0;padding:10px 12px}
html[data-writer-ui] .admin-topbar-title{color:#26314a;font-size:18px;font-weight:750}
html[data-writer-ui] .admin-menu-items{gap:3px;scrollbar-width:thin;scrollbar-color:#dcd8eb transparent;padding:4px 0;min-width:0}
html[data-writer-ui] .admin-menu-item{padding:10px 13px;border:0;border-radius:10px;font-size:13px;color:#7f8aa0}
html[data-writer-ui] .admin-menu-item:hover{background:#f5f3fc;color:#6552be}
html[data-writer-ui] .admin-menu-item.active{background:var(--ui-primary-soft);color:#5e49cf;font-weight:650}
html[data-writer-ui] .admin-content{padding:28px clamp(16px,3vw,42px);overflow-y:auto;overflow-x:hidden;flex:1}
html[data-writer-ui] .admin-header{margin-bottom:24px;align-items:center;gap:14px;flex-wrap:wrap}
html[data-writer-ui] .admin-title{font-size:27px;font-weight:750;color:#2a2d49}
html[data-writer-ui] .admin-header-actions{gap:10px;flex-wrap:wrap}
html[data-writer-ui] .admin-card{margin-bottom:24px;overflow:hidden}
html[data-writer-ui] .admin-card-header>div{gap:10px;flex-wrap:wrap}
html[data-writer-ui] .admin-card-header input{min-height:38px}
html[data-writer-ui] :is(.admin-table-container,.stats-table-container){overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#d3cde8 #f6f8fc;border-radius:0 0 16px 16px;touch-action:pan-x pan-y}
html[data-writer-ui] :is(.admin-table,.stats-table){width:100%;border-collapse:separate;border-spacing:0;font-size:13px}
html[data-writer-ui] :is(.admin-table,.stats-table) th{background:#f8f9fd;color:#7d879b;font-weight:600;padding:14px 16px;border-bottom:1px solid var(--ui-line);text-align:left;white-space:nowrap}
html[data-writer-ui] :is(.admin-table,.stats-table) td{padding:15px 16px;border-bottom:1px solid #edf0f6;color:#526078;vertical-align:middle}
html[data-writer-ui] .admin-table tbody tr:hover{background:#faf9ff}
html[data-writer-ui] .admin-table .admin-btn{white-space:nowrap;padding:7px 11px;font-size:12px}
html[data-writer-ui] .admin-pagination-item{border-radius:9px;border-color:var(--ui-line);color:#7e729f}
html[data-writer-ui] .admin-pagination-item.active{background:var(--ui-primary);border-color:var(--ui-primary);color:white}
html[data-writer-ui] .user-stats{border:1px solid #e7e2f7;border-radius:13px;background:#f4f1fe;color:#78639e;box-shadow:none;min-width:0;max-width:100%;padding:10px 16px}
html[data-writer-ui] .user-stats .stats-number{color:#6553b7}
html[data-writer-ui] :is(.stats-item,.stats-summary,.dashboard-container,.dashboard-sidebar,.sessions-grid,.vip-info){gap:18px}
html[data-writer-ui] :is(.login-container,.vip-container,.restricted-container){border-radius:24px;border-color:var(--ui-line);box-shadow:0 10px 45px #31406908;background:white}
html[data-writer-ui] .login-container{border:1px solid var(--ui-line);padding:38px;width:min(440px,100%)}
html[data-writer-ui] .login-title{color:#2c2c47;font-size:26px}
html[data-writer-ui] .login-form input{min-height:47px}
html[data-writer-ui] .login-form .submit-button{min-height:46px;border-radius:12px;font-weight:600}
html[data-writer-ui] .vip-header{background:linear-gradient(110deg,#eef1ff,#f7f2ff);border-radius:20px;padding:24px;border:1px solid #e9e6f7}
html[data-writer-ui] .vip-header h1{color:#3b355e}
html[data-writer-ui] .profile-card{padding:30px}
html[data-writer-ui] .profile-avatar{background:#eee9fc;color:#8063c7}
html[data-writer-ui][data-writer-page^="mobile_verify"] body,html[data-writer-ui][data-writer-page="maintenance"] body{margin:0;padding:48px 22px;min-height:100dvh;text-align:center;height:auto;display:block;background:linear-gradient(130deg,#f0f2ff,#f9fbff)}
html[data-writer-ui][data-writer-page^="mobile_verify"] :is(h2,form,#msg),html[data-writer-ui][data-writer-page="maintenance"] h1{max-width:620px;margin:20px auto;line-height:1.7}
html[data-writer-ui][data-writer-page^="mobile_verify"] form{background:white;padding:24px;border:1px solid var(--ui-line);border-radius:20px}
html[data-writer-ui][data-writer-page^="mobile_verify"] button{border:0;border-radius:11px;background:var(--ui-primary);color:white;padding:11px 24px}
@media(max-width:1150px){html[data-writer-ui] .sidebar{width:194px;padding-inline:10px}html[data-writer-ui] .admin-topbar{padding-inline:12px}html[data-writer-ui] .admin-menu-item{padding:9px 11px}html[data-writer-ui] .admin-table{min-width:850px}}
@media(max-width:768px){html[data-writer-ui] .admin-topbar{display:block;padding:10px 14px}html[data-writer-ui] .admin-topbar-header{padding:5px 3px 10px}html[data-writer-ui] .admin-menu-items{display:flex;flex-wrap:nowrap;overflow-x:auto;width:100%;padding-bottom:6px;touch-action:pan-x pan-y}html[data-writer-ui] .admin-menu-item{width:auto;min-width:0;flex:0 0 auto;font-size:12px;padding:9px 11px}html[data-writer-ui] .admin-content{padding:20px 14px}html[data-writer-ui] .admin-title{font-size:23px}html[data-writer-ui] .admin-card-header{padding:17px}html[data-writer-ui] .admin-card-header>div{flex-direction:row;align-items:center;max-width:100%}html[data-writer-ui] .admin-header-actions{width:100%}html[data-writer-ui] .admin-table td .admin-btn{display:inline-flex;width:auto;margin:2px;align-items:center}html[data-writer-ui] :is(.page-header,.history-header,.statistics-header){padding:20px;border-radius:17px}html[data-writer-ui] :is(.history-title,.statistics-title,.page-title){font-size:23px}html[data-writer-ui] .filter-container{padding:16px}html[data-writer-ui] .filter-group{min-width:min(180px,100%);flex:1}html[data-writer-ui] .login-container{padding:28px 24px}html[data-writer-ui] .module-links{margin:8px 10px 13px}html[data-writer-ui] :is(.admin-modal-content,.modal-content){max-width:calc(100vw - 24px);max-height:calc(100dvh - 36px);overflow-y:auto}}@media(prefers-reduced-motion:reduce){html[data-writer-ui] *,html[data-writer-ui] *::before,html[data-writer-ui] *::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
/* Reading and composition retain Markdown, file previews, editor sizing and stop controls. */
html[data-writer-ui] .chat-container{background:#f8faff;padding:24px clamp(16px,3vw,42px)}
html[data-writer-ui] .message{border-radius:15px;line-height:1.85;padding:20px 24px;box-shadow:0 3px 14px #25355b03}
html[data-writer-ui] .message.user{background:#ede9fa;color:#4c4768;border:1px solid #e3ddf3}
html[data-writer-ui] .message.assistant{background:white;border:1px solid #e6eaf3;border-left:3px solid #b1a0dc;color:#445168;padding-right:46px}
html[data-writer-ui] .message.assistant a{color:#6b55b6}
html[data-writer-ui] .input-area{background:white;border-top:1px solid var(--ui-line);padding:18px 24px}
html[data-writer-ui] #send-button{background:linear-gradient(115deg,#7057df,#5845d6);border-radius:12px;box-shadow:0 4px 12px #6452d015}
html[data-writer-ui] :is(.session-mode-display,.mode-info-compact){border-color:var(--ui-line);border-radius:11px}
html[data-writer-ui] .mode-icon-small{background:#a18ace}
html[data-writer-ui] .assistant :is(pre,code){font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
html[data-writer-ui] .ui-metric-card{background:linear-gradient(110deg,#f3f0fd,#faf9ff)!important;color:#766598!important;border-color:#e8e2f5;padding:20px!important;text-align:left!important;margin-bottom:0}
html[data-writer-ui] .ui-metric-card>div:last-child{color:#514173;font-size:26px!important;margin-top:7px}
@media(max-width:768px){html[data-writer-ui] .chat-container{padding:16px 12px}html[data-writer-ui] .message{padding:16px;max-width:96%}html[data-writer-ui] .message.assistant{padding-right:42px}html[data-writer-ui] .input-area{padding:12px}html[data-writer-ui] .ui-metric-card{padding:15px!important}}
html[data-writer-ui] .module-links a{white-space:nowrap}
html[data-writer-ui] .ai-slogan{background:linear-gradient(110deg,#eef1ff,#f6f2ff);-webkit-background-clip:border-box;background-clip:border-box;-webkit-text-fill-color:currentColor;border:1px solid #e7e5f6;border-radius:20px;padding:25px 28px;font-size:22px;line-height:1.65;font-weight:700;letter-spacing:0;color:#494065;width:100%;margin-bottom:25px}
html[data-writer-ui] .slogan-highlight{font-size:inherit;font-weight:750;-webkit-text-fill-color:currentColor;color:#7860bc}
html[data-writer-ui] .mode-option{padding:24px;min-height:142px}
html[data-writer-ui] .mode-option.mode-ppt{grid-column:1/-1}
html[data-writer-ui] .mode-info p{font-size:13px}
html[data-writer-ui] .mode-content-wrapper{justify-content:flex-start}
@media(max-width:1150px){html[data-writer-ui] .module-links{flex-direction:column}html[data-writer-ui] .module-links a{justify-content:flex-start;padding:10px 12px;min-width:0}html[data-writer-ui] .ai-slogan{font-size:19px;padding:22px}}
@media(max-width:768px){html[data-writer-ui] .ai-slogan{font-size:17px;padding:20px;margin-bottom:18px}html[data-writer-ui] .mode-option{padding:21px;min-height:130px}}
/* Keep the complete management menu in one scrollable row at every width. */
html[data-writer-ui] .admin-topbar{display:flex;flex-direction:column;align-items:stretch;gap:0;padding:10px 22px}
html[data-writer-ui] .admin-topbar-header{display:flex;padding:7px 5px 11px}
html[data-writer-ui] .admin-menu-items{display:flex;flex-wrap:nowrap;width:100%;flex:0 0 auto;overflow-x:auto}
html[data-writer-ui] .admin-menu-item{display:flex;flex:0 0 auto;width:auto;min-width:0}
html[data-writer-ui] .admin-header{display:flex;flex-direction:row;justify-content:space-between;text-align:left;align-items:center}
html[data-writer-ui] .admin-card-header div{flex-direction:row;align-items:center}
html[data-writer-ui] .user-stats :is(.stats-label,.stats-separator){color:#8b7a9e}
html[data-writer-ui] .admin-table{display:table}
@media(max-width:768px){html[data-writer-ui] .admin-topbar{padding:10px 14px}html[data-writer-ui] .admin-card-header>div{gap:14px}html[data-writer-ui] .admin-card-header>div>div:last-child{flex-wrap:wrap;flex:1}html[data-writer-ui] .admin-card-header input{max-width:100%}}
html[data-writer-ui] .mobile-module-nav{flex-shrink:0;padding:8px 14px 0;background:var(--ui-bg)}
html[data-writer-ui] .mobile-module-nav .module-links{flex-direction:row;margin:0;padding:0;border:0;gap:8px}
html[data-writer-ui] .mobile-module-nav .module-links a{justify-content:center;padding:8px 12px;border-radius:10px;font-size:11px}

.history-nav{display:flex;flex-wrap:wrap;gap:5px;padding:5px;border:1px solid #e6e7f1;border-radius:13px;background:#f3f4fa;align-items:center;width:fit-content;margin:0 0 18px}.history-nav a{display:block;padding:9px 16px;border-radius:10px;color:#8791a4;font-size:12px;text-decoration:none}.history-nav a:hover{background:#ebe7fa;color:#6d56c4}.history-nav a[aria-current]{color:#6550bc;background:white;box-shadow:0 2px 8px #52427e09;font-weight:600}.intro>.history-nav{margin-bottom:0}@media(max-width:680px){.history-nav{width:100%}.history-nav a{flex:1;text-align:center;padding:9px 11px;font-size:11px}}

.history-search{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:20px}.history-search input,.history-search select{padding:12px 14px;border:1px solid #e5eaf3;border-radius:12px;background:white;color:#202b40;font:inherit}.history-search input{flex:1;min-width:180px}.history-search button{padding:10px 20px}.history-body{overflow-wrap:anywhere}

/* One site shell for writing, loaded conversations, account and admin pages. */
.writer-shell-header{height:76px;padding:0 32px;display:flex;align-items:center;gap:22px;background:#fff;border-bottom:1px solid #e5eaf3;flex-shrink:0;position:relative;z-index:30;width:100%;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}
.writer-shell-brand{display:flex;align-items:center;gap:10px;color:#202b40;text-decoration:none;font-size:23px;font-weight:750;white-space:nowrap}.writer-shell-brand img{width:38px;height:38px;object-fit:contain}.writer-shell-tagline{font-size:15px;white-space:nowrap;color:#202b40}.writer-shell-tagline strong{color:#7057df}.writer-shell-header nav{display:flex;gap:5px;margin-left:auto;overflow-x:auto;white-space:nowrap;scrollbar-width:thin}.writer-shell-header nav a{padding:10px 12px;color:#738097;border-radius:10px;text-decoration:none;font-size:14px}.writer-shell-header nav a:hover,.writer-shell-header nav a[aria-current]{color:#6350dc;background:#eeeafb}
html[data-writer-ui] body:has(>.writer-shell-header){min-height:100dvh;height:auto;display:flex;flex-direction:column;overflow:auto;margin:0;padding:0;align-items:stretch;justify-content:flex-start}
html[data-writer-ui] body>.writer-shell-header~.container,html[data-writer-ui] body>.writer-shell-header~.admin-container{height:calc(100dvh - 76px);min-height:0;flex:1;width:100%;overflow:hidden}
html[data-writer-ui] body>.writer-shell-header~.main-content-mobile-profile{overflow:auto;flex:1;min-height:0;width:100%}
html[data-writer-ui] .message.assistant .message-content{border:1px solid #e5eaf3;border-radius:18px;background:white;padding:24px;box-shadow:0 5px 24px #25355b05}
html[data-writer-ui] .message.user .message-content{border:1px solid #e2daf7;border-radius:18px;background:#f3effd;color:#37324f;padding:20px 24px}
html[data-writer-ui] .input-area{background:white;border-top:1px solid #e5eaf3;padding:16px 24px}html[data-writer-ui] .input-area textarea{border-radius:14px;background:#fafbfe}
@media(max-width:1100px){.writer-shell-tagline{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.writer-shell-header{padding:0 20px;gap:14px}.writer-shell-header nav a{padding:10px;font-size:13px}}
@media(max-width:640px){.writer-shell-header{height:auto;min-height:108px;flex-wrap:wrap;gap:8px;padding:12px 16px}.writer-shell-brand{font-size:21px}.writer-shell-brand img{width:31px;height:31px}.writer-shell-header nav{width:100%;margin:0;gap:4px;flex-shrink:0;padding-bottom:2px}.writer-shell-header nav a{padding:9px 10px}html[data-writer-ui] body>.writer-shell-header~.container,html[data-writer-ui] body>.writer-shell-header~.admin-container{height:calc(100dvh - 108px)}html[data-writer-ui] .message.assistant .message-content,html[data-writer-ui] .message.user .message-content{padding:16px}html[data-writer-ui] .input-area{padding:12px}}

html[data-writer-page="admin_sessions"] body>.container{overflow:auto;padding:24px;max-width:1200px;margin:0 auto}html[data-writer-page="vip"] .vip-container{margin:28px auto;max-height:none;overflow:visible}html[data-writer-page="ppt_history"] body>.container{overflow:auto}

.simulation-banner{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:10px 24px;background:#fff7e7;border-bottom:1px solid #f0dfb7;color:#86652e;font-size:13px}.simulation-banner button{border:1px solid #e6cea0;border-radius:9px;background:white;color:#86652e;padding:6px 12px;cursor:pointer}

html[data-writer-page="create_chat"] .mode-selection-area{padding-top:28px}
html[data-writer-page="create_chat"] .writer-workspace-intro{width:100%;padding:28px 30px;background:linear-gradient(110deg,#eff2ff,#f7f3ff 65%,#eff8ff);border:1px solid #e7e8f6;border-radius:22px;margin-bottom:24px;text-align:left}
html[data-writer-page="create_chat"] .writer-eyebrow{font-size:12px;color:#9a8ac3;letter-spacing:1px;margin:0 0 12px}
html[data-writer-page="create_chat"] .writer-workspace-intro h1{font-size:30px;font-weight:750;color:#252c43;margin:0 0 12px}
html[data-writer-page="create_chat"] .writer-workspace-intro .ai-slogan{border:0;background:transparent;padding:0;margin:0 0 8px;text-align:left;font-size:14px;line-height:1.8;font-weight:500;color:#7b849a}
html[data-writer-page="create_chat"] .writer-intro-hint{font-size:13px;color:#8c96a9;margin:0}
html[data-writer-page="create_chat"] .writer-section-title{display:flex;align-items:center;justify-content:space-between;width:100%;margin:0 0 14px}
html[data-writer-page="create_chat"] .writer-section-title h2{font-size:18px;margin:0;color:#30394e}.writer-section-title>span{font-size:12px;color:#9aa3b5}
html[data-writer-page="create_chat"] .mode-option{position:relative;min-height:132px;padding:23px;gap:18px;padding-right:46px}
html[data-writer-page="create_chat"] .mode-option::after{content:'→';position:absolute;right:21px;top:50%;transform:translateY(-50%);font-size:22px;color:#a899cd}
html[data-writer-page="create_chat"] .mode-writer-advanced{border-color:#cfc3f0;background:linear-gradient(120deg,#fff,#f8f5ff)}
html[data-writer-page="create_chat"] .mode-ppt{grid-column:auto}
html[data-writer-page="create_chat"] .mode-info h3{font-size:18px;line-height:1.6;margin:0 0 7px}
html[data-writer-page="create_chat"] .mode-info p{font-size:13px;line-height:1.8}
html[data-writer-ui] .admin-table td:nth-child(n+2):nth-child(-n+8){white-space:nowrap}

/* Desktop writing workspace: keep quota in the account dock and let the
   recent-chat list shrink inside the sidebar instead of pushing its footer. */
@media(min-width:641px){
html[data-writer-page="create_chat"]{height:100dvh;overflow:hidden}
html[data-writer-page="create_chat"] body{height:100dvh!important;min-height:0!important;overflow:hidden!important}
html[data-writer-page="create_chat"] .container{height:calc(100dvh - 76px)!important;min-height:0;flex:1 1 0;overflow:hidden}
html[data-writer-page="create_chat"] .sidebar{height:100%!important;min-height:0;padding-bottom:12px}
html[data-writer-page="create_chat"] .sidebar-header{display:none}
html[data-writer-page="create_chat"] .main-content{height:100%;min-height:0}
html[data-writer-page="create_chat"] .sidebar-menu{flex:1;min-height:0;overflow:hidden}
html[data-writer-page="create_chat"] .recent-chats-container{flex:1 1 0;height:auto;min-height:72px;max-width:100%;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#d5dbea transparent}
html[data-writer-page="create_chat"] #recent-chats-list{min-width:0;width:100%;padding:0 4px}
html[data-writer-page="create_chat"] .recent-chat-item{width:100%;max-width:100%;min-width:0;gap:8px;padding:9px 10px}
html[data-writer-page="create_chat"] .recent-chat-item i{margin:0}
html[data-writer-page="create_chat"] .recent-chat-title{flex:1;min-width:0;max-width:none}
html[data-writer-page="create_chat"] .sidebar-user-info .logout-button{flex:0 0 auto}
html[data-writer-page="create_chat"] .sidebar-user-info{display:grid;grid-template-columns:minmax(0,1fr) auto;flex:0 0 auto;min-width:0;gap:5px 8px;padding:10px 8px 0}
html[data-writer-page="create_chat"] .sidebar-user-info .user-info-container{display:contents;margin:0}
html[data-writer-page="create_chat"] .sidebar-user-info .user-greeting{grid-column:1;align-self:center;margin:0;line-height:1.4}
html[data-writer-page="create_chat"] .sidebar-user-info .user-vip-badge{display:inline-flex;flex-wrap:nowrap;max-width:100%;white-space:nowrap;font-size:11px;padding:4px 8px}
html[data-writer-page="create_chat"] .sidebar-user-info .user-vip-badge{grid-column:1/-1;justify-self:start}
html[data-writer-page="create_chat"] .sidebar-user-info .writer-shell-quota{display:flex;grid-column:1/-1;flex-direction:column;align-items:stretch;gap:5px;width:100%;padding:9px 10px;border:1px solid var(--ui-line);border-radius:13px;background:#fff;color:var(--ui-muted);font:12px/1.45 Inter,-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;box-shadow:0 3px 14px #25355b06}
html[data-writer-page="create_chat"] .sidebar-user-info .quota-title{justify-content:space-between;gap:8px;color:#758199;font-size:12px}
html[data-writer-page="create_chat"] .sidebar-user-info .quota-title button{width:24px;height:24px;border-radius:8px;background:#f5f3fc;color:var(--ui-primary);font-size:16px}
html[data-writer-page="create_chat"] .sidebar-user-info .quota-values{justify-content:space-between;gap:6px;flex-wrap:wrap}
html[data-writer-page="create_chat"] .sidebar-user-info .writer-shell-quota strong{color:#4f5d76;font-size:13px}
html[data-writer-page="create_chat"] .sidebar-user-info .writer-shell-quota small{color:#929db0;font-size:11px}
html[data-writer-page="create_chat"] .sidebar-user-info .writer-shell-quota progress:not([hidden]){display:block;width:100%;margin:0}
html[data-writer-page="create_chat"] .sidebar-user-info .quota-details{align-self:flex-start;justify-self:auto;font-size:11px}
html[data-writer-page="create_chat"] .sidebar-user-info .quota-details summary{padding:0;color:#8793a8}
html[data-writer-page="create_chat"] .sidebar-user-info .quota-details #quotaExact{left:0;right:auto;top:auto;bottom:28px;max-width:min(260px,calc(100vw - 32px));}
html[data-writer-page="create_chat"] .sidebar-user-info .logout-button{grid-column:2;grid-row:1;align-self:center;justify-self:end;margin:0;padding:4px 0;white-space:nowrap;font-size:12px}
}
html[data-writer-page="create_chat"] .recent-chat-item:focus-visible{outline-offset:1px}
html[data-writer-page="create_chat"] .recent-chat-title{line-height:1.55}
@media(max-height:850px) and (min-width:641px){
html[data-writer-page="create_chat"] .sidebar{padding-top:14px;padding-bottom:8px}
html[data-writer-page="create_chat"] .sidebar-header{padding-bottom:12px;margin-bottom:10px}
html[data-writer-page="create_chat"] .sidebar-search{margin-top:8px;margin-bottom:8px}
html[data-writer-page="create_chat"] .module-links{margin-bottom:8px;padding-bottom:8px}
html[data-writer-page="create_chat"] .sidebar-menu{padding-top:5px}
html[data-writer-page="create_chat"] .sidebar-item{padding-top:9px;padding-bottom:9px;margin-top:2px;margin-bottom:2px}
html[data-writer-page="create_chat"] .recents-header{padding-top:10px;padding-bottom:5px}
html[data-writer-page="create_chat"] .sidebar-user-info{padding-top:7px}
html[data-writer-page="create_chat"] .sidebar-user-info .writer-shell-quota{gap:4px;padding:7px 9px}
}
@media(max-width:640px){html[data-writer-page="create_chat"] .mode-selection-area{padding:20px 16px}html[data-writer-page="create_chat"] .writer-workspace-intro{padding:24px 22px}html[data-writer-page="create_chat"] .mode-option{min-height:122px;padding:20px 42px 20px 20px}html[data-writer-page="create_chat"] .mode-options{gap:14px}html[data-writer-page="create_chat"] .mode-info h3{font-size:17px}}
@media(max-width:640px){html[data-writer-page="create_chat"] .main-content{padding:0}html[data-writer-page="create_chat"] .mode-selection-area{padding-top:20px!important;padding-inline:16px}}

/* One quota component and one data source across all account workflows. */
.writer-shell-quota{display:grid;grid-template-columns:95px 205px minmax(80px,1fr) 90px;align-items:center;gap:18px;width:100%;padding:10px 32px;background:#fcfcff;border-bottom:1px solid #e9eaf2;color:#81759d;font:12px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;flex-shrink:0}
.writer-shell-quota .quota-title{display:flex;align-items:center;gap:10px;color:#9487ae}.writer-shell-quota .quota-title button{border:0;background:transparent;color:#9281bc;font-size:17px;cursor:pointer;padding:0 3px}.writer-shell-quota .quota-title button:disabled{opacity:.45}
.writer-shell-quota .quota-values{display:flex;align-items:center;justify-content:space-between;gap:12px}.writer-shell-quota strong{font-size:13px;font-weight:650;color:#73618f}.writer-shell-quota small{font-size:11px;color:#a095b4}
.writer-shell-quota progress{appearance:none;width:100%;height:5px;border:0;border-radius:99px;background:#ebe8f1;overflow:hidden}.writer-shell-quota progress::-webkit-progress-bar{background:#ebe8f1;border-radius:99px}.writer-shell-quota progress::-webkit-progress-value{background:#b5a2d8;border-radius:99px}.writer-shell-quota progress::-moz-progress-bar{background:#b5a2d8}
.writer-shell-quota .quota-details{position:relative;font-size:11px;color:#a095b4;justify-self:end}.writer-shell-quota summary{cursor:pointer}.writer-shell-quota #quotaExact{position:absolute;right:0;top:28px;z-index:80;background:#fff;border:1px solid #e6e3ef;border-radius:12px;padding:14px 18px;min-width:220px;box-shadow:0 8px 30px #5b497b12;white-space:pre-line;line-height:1.9;color:#7a6d92}
html[data-writer-ui] .sidebar-user-info .word-limit-container{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
html[data-writer-ui] body>.writer-shell-quota~.container,html[data-writer-ui] body>.writer-shell-quota~.admin-container{height:calc(100dvh - 118px)}
@media(max-width:640px){.writer-shell-quota{grid-template-columns:85px minmax(90px,1fr) 65px;gap:7px 8px;padding:10px 16px}.writer-shell-quota .quota-title{grid-column:1;grid-row:1}.writer-shell-quota .quota-values{grid-column:2;grid-row:1;font-size:11px}.writer-shell-quota .quota-details{grid-column:3;grid-row:1}.writer-shell-quota progress{grid-column:1/-1;grid-row:2}.writer-shell-quota strong{font-size:12px}.writer-shell-quota small{font-size:10px}html[data-writer-ui] body>.writer-shell-quota~.container,html[data-writer-ui] body>.writer-shell-quota~.admin-container{height:calc(100dvh - 210px)}}

.writer-shell-account{display:flex;align-items:center;gap:12px;white-space:nowrap;font-size:12px;color:#9186a5}.writer-shell-account>a:first-of-type{border:1px solid #e8e5f0;border-radius:99px;padding:7px 13px;color:#766787;background:white}.writer-shell-account #nav-vip-badge{font-size:11px;color:#9b88bc}
body[data-area] .site-layout{max-width:1720px;width:100%;min-height:calc(100dvh - 118px)}body[data-area] .site-layout main{width:100%;padding:28px 32px;margin:0 auto}
@media(max-width:1300px){.writer-shell-tagline{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.writer-shell-account #nav-vip-badge{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}}
@media(max-width:640px){.writer-shell-header{position:relative;padding-top:11px}.writer-shell-header nav{order:3}.writer-shell-account{margin-left:auto;font-size:11px;gap:10px}.writer-shell-account>a:first-of-type{padding:5px 11px}body[data-area] .site-layout main{padding:20px 16px}.writer-shell-account #nav-vip-badge{position:static;width:auto;height:auto;clip-path:none;font-size:10px}}

/* Mobile uses the same seven destinations; old navigation handlers remain intact. */
@media(max-width:640px){
.writer-shell-header nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:visible;gap:4px;padding:4px 0 0}
.writer-shell-header nav a{text-align:center;padding:9px 4px;font-size:12px;line-height:1.4}
.writer-shell-quota .quota-title{white-space:nowrap;gap:5px;flex-shrink:0}
html[data-writer-ui] .main-content{padding-top:0!important}
html[data-writer-ui] .main-content>.header{position:relative!important;top:auto!important;left:auto!important;height:auto!important;min-height:64px;width:100%;padding:16px 20px!important;flex-shrink:0}
html[data-writer-ui] .conversation-context-header .mobile-top-nav[hidden]{display:none!important}
html[data-writer-ui] .conversation-context-header .session-mode-display{display:flex!important}
html[data-writer-ui] .conversation-context-header .header-buttons{width:100%;padding:0;min-height:0}
html[data-writer-page="dashboard"] .dashboard-container{padding:16px!important}
html[data-writer-page="dashboard"] .main-content>.header .header-left{justify-content:flex-start;gap:12px}
html[data-writer-page="dashboard"] .page-title{font-size:22px}
}

/* Keep account controls and quota together in one shared bottom dock. */
html[data-writer-ui] body{padding-bottom:68px}
.writer-shell-bottom-dock{position:fixed;inset:auto 0 0;z-index:1000;display:grid;grid-template-columns:minmax(220px,270px) minmax(0,1fr);align-items:center;gap:12px;min-height:68px;padding:5px 24px;background:#fcfcfff5;border-top:1px solid #e9eaf2;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
.writer-shell-account{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;height:100%;padding-right:14px;border-right:1px solid #e9eaf2;color:#738097;font-size:12px}
.writer-shell-account-summary{display:flex;flex-direction:column;gap:4px;min-width:0}
.writer-shell-user{overflow:hidden;color:#59657c;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:600}
.writer-shell-user span{color:#e27951;font-size:11px;font-weight:500}
.writer-shell-vip{display:flex;align-items:center;gap:5px;overflow:hidden;color:#8d68cf;font-size:11px;white-space:nowrap;text-overflow:ellipsis}
.writer-shell-logout{flex:0 0 auto;color:#e05249;text-decoration:none;font-size:12px}
.writer-shell-bottom-dock .writer-shell-quota{position:static;inset:auto;z-index:auto;min-height:52px;height:100%;grid-template-columns:88px 190px minmax(80px,1fr) 82px;gap:14px;padding:6px 8px;background:transparent;border:0;backdrop-filter:none;-webkit-backdrop-filter:none}
html[data-writer-page="create_chat"] .sidebar-menu{display:flex;flex-direction:column;min-height:0;overflow:hidden}
html[data-writer-page="create_chat"] .sidebar-menu>.sidebar-item{flex:0 0 auto}
html[data-writer-page="create_chat"] .sidebar-section-label{flex:0 0 auto;padding:12px 12px 6px;color:#8995aa;font-size:11px;font-weight:600;letter-spacing:.3px}
html[data-writer-page="create_chat"] .sidebar-mode-list{flex:0 0 auto;display:flex;flex-direction:column;gap:3px;padding:0 3px 8px}
html[data-writer-page="create_chat"] .sidebar-mode-list .mode-option{min-height:42px;padding:6px 8px;gap:9px;border-radius:10px;box-shadow:none}
html[data-writer-page="create_chat"] .sidebar-mode-list .mode-option:hover{transform:none;box-shadow:0 3px 10px #6452d00c}
html[data-writer-page="create_chat"] .sidebar-mode-list .mode-icon{width:28px;height:28px;min-width:28px;border-radius:8px}
html[data-writer-page="create_chat"] .sidebar-mode-list .mode-icon i{font-size:15px}
html[data-writer-page="create_chat"] .sidebar-mode-list .mode-info{min-width:0}
html[data-writer-page="create_chat"] .sidebar-mode-list .mode-info h3{margin:0;font-size:12px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html[data-writer-page="create_chat"] .sidebar-mode-list .mode-info p,html[data-writer-page="create_chat"] .sidebar-mode-list .mode-option::after,html[data-writer-page="create_chat"] .sidebar-mode-list .tier-badge{display:none}
html[data-writer-page="create_chat"] .sidebar-mode-list .mode-writer-advanced{border-color:#d5c9f4;background:#f7f4ff}
html[data-writer-page="create_chat"] .sidebar-mode-list .mode-ppt .mode-info h3{font-size:11px}
html[data-writer-page="create_chat"] .workspace-side-hint{display:flex;align-items:center;gap:10px;max-width:460px;margin:24px auto 0;padding:18px 20px;border:1px solid #e7eaf2;border-radius:14px;background:#ffffffbd;color:#8290a5;font-size:13px;line-height:1.6}
html[data-writer-page="create_chat"] .workspace-side-hint i{color:#8b78c7;font-size:17px}
html[data-writer-ui] body>.writer-shell-header~.container,html[data-writer-ui] body>.writer-shell-header~.admin-container{height:calc(100dvh - 144px)}
html[data-writer-page="create_chat"] .container{height:calc(100dvh - 144px)!important}
html[data-writer-page="create_chat"] .sidebar-user-info{display:none!important}
html[data-writer-ui] body:has(>.writer-shell-header){padding-bottom:68px}
@media(max-width:640px){
html[data-writer-ui] body:has(>.writer-shell-header){padding-bottom:110px}
.writer-shell-bottom-dock{grid-template-columns:minmax(0,1fr);gap:2px;min-height:108px;padding:5px 12px 7px}
.writer-shell-account{min-height:34px;height:auto;justify-content:space-between;padding:0 3px 4px;border-right:0;border-bottom:1px solid #e9eaf2}
.writer-shell-account-summary{flex-direction:row;align-items:center;gap:10px;min-width:0}
.writer-shell-user{font-size:12px}
.writer-shell-vip{font-size:10px}
.writer-shell-bottom-dock .writer-shell-quota{min-height:58px;height:auto;grid-template-columns:80px minmax(80px,1fr) 65px;gap:5px 8px;padding:5px 2px}
html[data-writer-ui] body>.writer-shell-header~.container,html[data-writer-ui] body>.writer-shell-header~.admin-container{height:calc(100dvh - 240px)}
html[data-writer-page="create_chat"] .container{height:calc(100dvh - 240px)!important}
html[data-writer-page="create_chat"] .sidebar-mode-list{display:none}
html[data-writer-page="create_chat"] .workspace-side-hint{display:none}
}

/* ChatGPT-inspired create sidebar: tools, searchable conversation titles and compact actions. */
@media(min-width:641px){
html[data-writer-page="create_chat"] .sidebar{width:280px;flex:0 0 280px;padding:16px 12px 12px;background:#f9f9f8;border-right:1px solid #ececf0}
html[data-writer-page="create_chat"] .sidebar-menu{padding-top:4px}
html[data-writer-page="create_chat"] .sidebar-menu>.sidebar-item{margin:2px 0;padding:10px 12px;border-radius:10px;background:transparent;box-shadow:none;color:#35363a}
html[data-writer-page="create_chat"] .sidebar-menu>.sidebar-item:hover{background:#eeeeec}
html[data-writer-page="create_chat"] .sidebar-menu>.sidebar-item.active{background:#ececea;color:#26272a;box-shadow:none;font-weight:600}
html[data-writer-page="create_chat"] .sidebar-menu>.sidebar-item i{font-size:17px}
html[data-writer-page="create_chat"] .sidebar-menu .sidebar-search{flex:0 0 auto;margin:6px 0 10px;padding:0 2px}
html[data-writer-page="create_chat"] .sidebar-menu .sidebar-search .search-input{height:38px;padding:8px 34px 8px 11px;font-size:12px;background:#fff;border-color:#e7e7e5}
html[data-writer-page="create_chat"] .sidebar-section-label{padding-top:9px;color:#8c8d90;font-weight:550}
html[data-writer-page="create_chat"] .sidebar-mode-list .mode-option{background:transparent;border-color:transparent;color:#35363a}
html[data-writer-page="create_chat"] .sidebar-mode-list .mode-option:hover{background:#eeeeec;border-color:transparent}
html[data-writer-page="create_chat"] .sidebar-mode-list .mode-icon{background:transparent!important;color:#4b4c50!important}
html[data-writer-page="create_chat"] .sidebar-mode-list .mode-icon i{color:inherit!important}
html[data-writer-page="create_chat"] .sidebar-mode-list .mode-writer-advanced{background:#eeecea;border-color:transparent}
html[data-writer-page="create_chat"] .sidebar-mode-list .mode-writer-advanced .mode-icon{color:#6350dc!important}
html[data-writer-page="create_chat"] .recents-header{padding-top:12px;border-top:1px solid #e8e8e6}
}
.writer-shell-bottom-dock{grid-template-columns:280px minmax(0,1fr);padding-left:0;padding-right:20px;background:#f9f9f8}
.writer-shell-account{padding:0 12px;border-right:1px solid #e5e5e3}
.writer-shell-bottom-dock .writer-shell-quota{background:transparent}
html[data-writer-page="create_chat"] #recent-chats-list{gap:2px;padding:0 2px}
html[data-writer-page="create_chat"] .recent-chat-row{position:relative;display:flex;align-items:center;min-width:0;width:100%;border-radius:10px}
html[data-writer-page="create_chat"] .recent-chat-row .recent-chat-item{width:100%;max-width:100%;min-width:0;min-height:42px;gap:0;padding:7px 38px 7px 12px;border-radius:10px;color:#414247}
html[data-writer-page="create_chat"] .recent-chat-row .recent-chat-item:hover{background:#eeeeec;color:#27282b}
html[data-writer-page="create_chat"] .recent-chat-row .recent-chat-item.active{background:#ececea;color:#252629}
html[data-writer-page="create_chat"] .recent-chat-row .recent-chat-item>i{display:none}
html[data-writer-page="create_chat"] .recent-chat-row .recent-chat-title{display:-webkit-box;min-width:0;max-width:none;overflow:hidden;text-overflow:ellipsis;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1.4}
html[data-writer-page="create_chat"] .recent-chat-actions{position:absolute;top:50%;right:5px;z-index:2;transform:translateY(-50%)}
html[data-writer-page="create_chat"] .recent-chat-more{display:grid;place-items:center;width:28px;height:28px;padding:0;border:0;border-radius:8px;background:#eeeeec;color:#505157;font-size:21px;line-height:1;opacity:0;cursor:pointer}
html[data-writer-page="create_chat"] .recent-chat-row:hover .recent-chat-more,html[data-writer-page="create_chat"] .recent-chat-row:focus-within .recent-chat-more,html[data-writer-page="create_chat"] .recent-chat-more[aria-expanded="true"]{opacity:1}
html[data-writer-page="create_chat"] .recent-chat-menu{position:absolute;top:32px;right:0;min-width:148px;padding:5px;border:1px solid #e7e7e5;border-radius:11px;background:#fff;box-shadow:0 10px 28px #20242d1c}
html[data-writer-page="create_chat"] .recent-chat-menu[hidden]{display:none!important}
html[data-writer-page="create_chat"] .recent-chat-menu button{display:flex;align-items:center;gap:9px;width:100%;padding:9px 10px;border:0;border-radius:7px;background:transparent;color:#3d3e42;text-align:left;font-size:13px;cursor:pointer}
html[data-writer-page="create_chat"] .recent-chat-menu button:hover{background:#f2f2f0}
.rename-chat-dialog{width:min(420px,calc(100vw - 32px));padding:0;border:1px solid #e6e7ec;border-radius:18px;background:#fff;color:#292c35;box-shadow:0 24px 80px #1f293733}
.rename-chat-dialog::backdrop{background:#1b22304d;backdrop-filter:blur(2px)}
.rename-chat-dialog form{padding:22px}
.rename-chat-dialog h2{margin:0 0 18px;font-size:18px}
.rename-chat-dialog label{display:block;margin-bottom:7px;color:#717989;font-size:12px}
.rename-chat-dialog input{width:100%;height:42px;padding:9px 12px;border:1px solid #dfe3eb;border-radius:10px;background:#fff}
.rename-chat-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}
.rename-chat-actions button{padding:8px 14px;border:1px solid #e1e3e9;border-radius:9px;background:white;color:#515867;cursor:pointer}
.rename-chat-actions button[type="submit"]{border-color:#6350dc;background:#6350dc;color:white}
@media(min-width:641px) and (max-width:980px){
.writer-shell-bottom-dock{grid-template-columns:280px minmax(0,1fr);padding-right:10px}
.writer-shell-bottom-dock .writer-shell-quota{grid-template-columns:72px 150px minmax(55px,1fr) 75px;gap:8px}
}
@media(max-width:640px){
.writer-shell-bottom-dock{padding-left:12px;padding-right:12px}
html[data-writer-page="create_chat"] .recent-chat-more{opacity:1}
}

/* Keep account and quota controls in normal flow at the top of every page. */
html[data-writer-ui] body:has(>.writer-shell-header){height:100dvh!important;min-height:0!important;overflow:hidden!important;padding-bottom:0!important}
html[data-writer-ui] .writer-shell-account-bar{position:relative;inset:auto;z-index:5;display:flex;flex:0 0 auto;align-items:center;justify-content:flex-end;gap:18px;min-height:62px;padding:5px 24px;background:#fbfbfd;border-bottom:1px solid #e9eaf2;backdrop-filter:none;-webkit-backdrop-filter:none}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-account{order:1;flex:0 0 auto;min-width:180px;height:auto;justify-content:flex-end;gap:12px;padding:0;border:0}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-account-summary{align-items:flex-end;text-align:right}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-quota{order:2;display:grid;flex:0 1 900px;width:min(900px,calc(100vw - 330px));min-width:480px;min-height:48px;height:auto;grid-template-columns:82px 180px minmax(100px,1fr) 74px;gap:10px;padding:4px 0;border:0;background:transparent;backdrop-filter:none}
html[data-writer-ui] .writer-shell-account-bar .quota-title{gap:7px;white-space:nowrap}
html[data-writer-ui] .writer-shell-account-bar .quota-values{gap:10px;white-space:nowrap}
html[data-writer-ui] .writer-shell-account-bar .quota-details{white-space:nowrap}
html[data-writer-ui] body>.writer-shell-header~.container,html[data-writer-ui] body>.writer-shell-header~.admin-container{height:auto!important;min-height:0;flex:1 1 0;overflow:hidden}
html[data-writer-ui] body>.writer-shell-header~.container>.main-content{height:100%!important;min-height:0;flex:1 1 auto}
html[data-writer-ui][data-writer-page="history_session"] .main-content>.content-area,html[data-writer-ui][data-writer-page="history_content"] .main-content>.content-area{height:auto!important;min-height:0;flex:1 1 auto;overflow:hidden}
html[data-writer-ui][data-writer-page="history_session"] #chat-content-area>.input-area,html[data-writer-ui][data-writer-page="history_content"] #chat-content-area>.input-area{position:relative;inset:auto;flex:0 0 auto}
@media(max-width:760px){
html[data-writer-ui] .writer-shell-account-bar{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:2px;min-height:98px;padding:5px 12px}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-account{order:1;min-height:31px;justify-content:space-between;padding:0 2px;border:0}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-account-summary{flex-direction:row;align-items:center;gap:9px;text-align:left}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-quota{order:2;flex:0 0 auto;width:100%;min-width:0;min-height:48px;grid-template-columns:74px minmax(110px,auto) minmax(0,1fr) 66px;gap:4px 8px;padding:2px 0}
html[data-writer-ui] .writer-shell-account-bar .quota-title{grid-column:1;grid-row:1}
html[data-writer-ui] .writer-shell-account-bar .quota-values{grid-column:2;grid-row:1;font-size:11px}
html[data-writer-ui] .writer-shell-account-bar .quota-details{grid-column:4;grid-row:1}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-quota progress:not([hidden]){grid-column:1/-1;grid-row:2;margin:0}
}
@media(max-width:520px){
html[data-writer-ui] .writer-shell-header{flex-shrink:0}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-account{min-width:0}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-quota{grid-template-columns:66px minmax(100px,auto) minmax(0,1fr) 58px;gap:4px 6px}
html[data-writer-ui] .writer-shell-account-bar .quota-values{flex-wrap:wrap;gap:0 6px}
}

/* Keep every desktop page on the same compact, searchable conversation sidebar. */
@media(min-width:769px){
html[data-writer-ui] .sidebar{display:flex;flex:0 0 280px;flex-direction:column;width:280px;min-width:280px;min-height:0;height:100%;padding:16px 12px 12px;background:#f9f9f8;border-right:1px solid #ececf0}
html[data-writer-ui] .sidebar>.sidebar-header,html[data-writer-ui] .sidebar .sidebar-user-info{display:none!important}
html[data-writer-ui] .sidebar-search{position:relative;display:flex;flex:0 0 auto;align-items:center;gap:9px;width:100%;margin:0 0 12px;padding:0 2px}
html[data-writer-ui] .sidebar-search .search-input{flex:1;min-width:0;width:100%;height:44px;margin:0;padding:10px 13px;border:1px solid #e2e6ee;border-radius:12px;background:#fff;font-size:14px}
html[data-writer-ui] .sidebar-search .search-icon{position:static;flex:0 0 auto;transform:none;color:#85878c;font-size:20px}
html[data-writer-ui] .sidebar-menu{position:relative;display:flex;flex:1 1 auto;flex-direction:column;min-height:0;overflow:hidden;padding:0}
html[data-writer-ui] .sidebar-menu>.sidebar-item,html[data-writer-ui] .sidebar-section-label,html[data-writer-ui] .sidebar-mode-list{display:none!important}
html[data-writer-ui] .recents-header{flex:0 0 auto;margin:0;padding:12px 12px 8px;border-top:1px solid #e8e8e6;color:#858a91;font-size:13px;font-weight:600}
html[data-writer-ui] .recent-chats-container{flex:1 1 0;width:100%;height:auto;min-height:0;margin:0;overflow-x:hidden;overflow-y:auto;border-top:1px solid #e8e8e6;padding:4px 0 0;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#d5dbea transparent}
html[data-writer-ui] #recent-chats-list{display:flex;flex-direction:column;gap:2px;width:100%;min-width:0;padding:0 2px}
html[data-writer-ui] .recent-chat-item{display:flex;align-items:center;min-width:0;width:100%;min-height:42px;margin:0;padding:7px 10px;border-radius:9px;background:transparent;color:#414247;font-size:13px;white-space:normal;text-decoration:none}
html[data-writer-ui] .recent-chat-item:hover,html[data-writer-ui] .recent-chat-item.active{background:#ececea;color:#27282b}
html[data-writer-ui] .recent-chat-item>i{flex:0 0 auto;margin-right:8px;color:inherit}
html[data-writer-ui] .recent-chat-title{display:-webkit-box;flex:1;min-width:0;max-width:none;overflow:hidden;text-overflow:ellipsis;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1.4}
html[data-writer-ui] .sidebar>.search-results-container{position:absolute;z-index:50;top:70px;left:12px;right:12px;width:auto;max-width:none;margin:0;border:1px solid #e7e7e5;border-radius:12px;background:#fff;box-shadow:0 10px 28px #20242d1c}
html[data-writer-ui] .sidebar>.module-links,html[data-writer-ui] .sidebar-menu>.module-links{display:flex;flex:0 0 auto;flex-direction:column;gap:3px;width:100%;margin:0 0 10px;padding:4px 0 10px;border-bottom:1px solid #e8e8e6}
html[data-writer-ui] .sidebar>.module-links a,html[data-writer-ui] .sidebar-menu>.module-links a{display:flex;flex:0 0 auto;align-items:center;justify-content:flex-start;gap:12px;min-width:0;min-height:42px;padding:9px 12px;border:0;border-radius:10px;background:transparent;color:#35363a;font-size:13px;text-decoration:none;white-space:nowrap}
html[data-writer-ui] .sidebar>.module-links a i,html[data-writer-ui] .sidebar-menu>.module-links a i{width:20px;flex:0 0 20px;color:#595b62;font-size:17px;text-align:center}
html[data-writer-ui] .sidebar>.module-links a:hover,html[data-writer-ui] .sidebar-menu>.module-links a:hover{background:#eeeeec;color:#252629}
html[data-writer-ui] .sidebar>.module-links a[aria-current],html[data-writer-ui] .sidebar-menu>.module-links a[aria-current]{background:#eeecea;color:#5d49d2;font-weight:600}
html[data-writer-ui] .sidebar>.module-links a[aria-current] i,html[data-writer-ui] .sidebar-menu>.module-links a[aria-current] i{color:#6350dc}
}

/* Keep account and quota controls on the same top navigation row. */
html[data-writer-ui] .writer-shell-header{height:76px;min-height:76px;flex:0 0 auto;gap:12px;padding:0 clamp(12px,1.5vw,28px);overflow:visible}
html[data-writer-ui] .writer-shell-brand{flex:0 0 auto;gap:8px;font-size:21px}
html[data-writer-ui] .writer-shell-brand img{width:35px;height:35px}
html[data-writer-ui] .writer-shell-header nav{flex:1 1 auto;min-width:0;justify-content:flex-end;gap:2px;margin-left:auto;overflow-x:auto}
html[data-writer-ui] .writer-shell-header nav a{flex:0 0 auto;padding:9px 9px;font-size:13px}
html[data-writer-ui] .writer-shell-account-bar{position:static;inset:auto;z-index:5;display:flex;flex:0 0 auto;align-items:center;justify-content:flex-end;gap:10px;width:auto;min-width:0;min-height:0;height:auto;margin:0 0 0 4px;padding:0 0 0 12px;border:0;border-left:1px solid #e9eaf2;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-account{display:flex;flex:0 0 auto;align-items:center;justify-content:flex-end;gap:8px;min-width:0;height:auto;padding:0;border:0;white-space:nowrap;font-size:11px}
html[data-writer-ui] .writer-shell-account-summary{display:flex;flex-direction:column;align-items:flex-end;gap:1px;min-width:0}
html[data-writer-ui] .writer-shell-user{display:block;max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#66738b;text-decoration:none;font-size:11px}
html[data-writer-ui] .writer-shell-vip{display:block;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#9b88bc;font-size:10px}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-logout{flex:0 0 auto;padding:5px 8px;border:1px solid #e8e5f0;border-radius:99px;background:#fff;color:#766787;text-decoration:none;font-size:10px}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-quota{position:static;inset:auto;z-index:auto;display:grid;flex:0 1 330px;grid-template-columns:auto auto minmax(48px,92px) auto;align-items:center;gap:5px;width:auto;min-width:260px;min-height:38px;height:auto;margin:0;padding:0;border:0;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}
html[data-writer-ui] .writer-shell-account-bar .quota-title{display:flex;align-items:center;gap:4px;white-space:nowrap;color:#8b7ba6;font-size:10px}
html[data-writer-ui] .writer-shell-account-bar .quota-title button{padding:0 2px;font-size:15px}
html[data-writer-ui] .writer-shell-account-bar .quota-values{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:0;white-space:nowrap;line-height:1.25}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-quota strong{font-size:11px}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-quota small{font-size:9px}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-quota progress:not([hidden]){display:block;width:100%;height:4px;margin:0}
html[data-writer-ui] .writer-shell-account-bar .quota-details{justify-self:end;white-space:nowrap;font-size:10px}
html[data-writer-ui] .writer-shell-account-bar .quota-details summary{white-space:nowrap}
@media(max-width:1500px){
html[data-writer-ui] .writer-shell-tagline{display:none}
html[data-writer-ui] .writer-shell-header{gap:8px;padding-inline:14px}
html[data-writer-ui] .writer-shell-header nav a{padding-inline:6px;font-size:12px}
html[data-writer-ui] .writer-shell-account-bar{gap:7px;margin-left:2px;padding-left:8px}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-quota{min-width:235px;grid-template-columns:auto auto minmax(35px,70px) auto;gap:4px}
}
@media(max-width:1150px){
html[data-writer-ui] .writer-shell-brand{font-size:19px}
html[data-writer-ui] .writer-shell-brand img{width:31px;height:31px}
html[data-writer-ui] .writer-shell-header nav{flex:1 1 0;justify-content:flex-start}
html[data-writer-ui] .writer-shell-header nav a{padding-inline:5px;font-size:11px}
html[data-writer-ui] .writer-shell-vip,html[data-writer-ui] .writer-shell-account-bar .quota-title span,html[data-writer-ui] .writer-shell-account-bar .quota-values small,html[data-writer-ui] .writer-shell-account-bar .quota-details{display:none}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-quota{display:flex;flex:0 0 auto;min-width:0;width:auto}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-quota progress:not([hidden]){display:none}
}
@media(max-width:760px){
html[data-writer-ui] .writer-shell-header{height:auto;min-height:0;flex-wrap:wrap;gap:6px 10px;padding:8px 12px}
html[data-writer-ui] .writer-shell-brand{order:1;font-size:19px}
html[data-writer-ui] .writer-shell-tagline{display:none}
html[data-writer-ui] .writer-shell-account-bar{order:2;display:flex;flex:0 0 auto;flex-direction:row;align-items:center;justify-content:flex-end;gap:6px;width:auto;min-height:0;margin:0 0 0 auto;padding:0;border:0}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-account{gap:6px}
html[data-writer-ui] .writer-shell-user{max-width:76px;font-size:10px}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-logout{padding:4px 7px;font-size:10px}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-quota{order:0;display:flex;flex:0 0 auto;width:auto;min-width:0;min-height:28px;height:auto;grid-template-columns:none;padding:0}
html[data-writer-ui] .writer-shell-account-bar .quota-title button{width:24px;height:24px;border-radius:8px;background:#f5f3fc}
html[data-writer-ui] .writer-shell-header nav{order:3;flex:0 0 100%;width:100%;margin:0;justify-content:flex-start;overflow-x:auto}
html[data-writer-ui] body>.writer-shell-header~.container,html[data-writer-ui] body>.writer-shell-header~.admin-container{height:auto!important;min-height:0;flex:1 1 0;overflow:hidden}
}
@media(max-width:420px){
html[data-writer-ui] .writer-shell-header{gap:5px;padding-inline:8px}
html[data-writer-ui] .writer-shell-account-bar{gap:4px}
html[data-writer-ui] .writer-shell-account-summary{display:none}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-quota{gap:2px}
html[data-writer-ui] .writer-shell-account-bar .writer-shell-logout{padding:4px 6px}
html[data-writer-ui] .writer-shell-header nav a{padding:8px 5px;font-size:10px}
}

/* ChatGPT-inspired writing workspace: AI writing is selected by default. */
@media(min-width:769px){
html[data-writer-page="history_session"] .main-content,html[data-writer-page="history_content"] .main-content{height:100%!important;min-width:0;min-height:0;flex:1 1 auto;background:#fff}
html[data-writer-page="history_session"] .conversation-context-header,html[data-writer-page="history_content"] .conversation-context-header{position:relative;display:flex;flex:0 0 64px;align-items:center;justify-content:center;height:64px;padding:8px 20px;border-bottom:1px solid #f0f0f0;background:#fff;box-shadow:none;z-index:5}
html[data-writer-page="history_session"] .conversation-context-header .header-buttons,html[data-writer-page="history_content"] .conversation-context-header .header-buttons{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%}
html[data-writer-page="history_session"] .session-mode-display,html[data-writer-page="history_content"] .session-mode-display{position:absolute;left:50%;top:50%;display:flex;align-items:center;justify-content:center;gap:0;transform:translate(-50%,-50%)}
html[data-writer-page="history_session"] .writer-workspace-tabs,html[data-writer-page="history_content"] .writer-workspace-tabs{display:flex;align-items:center;gap:2px;padding:3px;border:1px solid #eeeeee;border-radius:999px;background:#f4f4f4;box-shadow:0 2px 8px #00000008}
html[data-writer-page="history_session"] .workspace-tab,html[data-writer-page="history_content"] .workspace-tab{display:flex;align-items:center;justify-content:center;gap:8px;min-width:118px;height:42px;padding:0 18px;border:0;border-radius:999px;background:transparent;color:#686868;font-family:inherit;font-size:14px;font-weight:500;line-height:1.2;cursor:pointer;white-space:nowrap}
html[data-writer-page="history_session"] .workspace-tab.active,html[data-writer-page="history_content"] .workspace-tab.active{background:#fff;color:#222;box-shadow:0 2px 8px #00000012}
html[data-writer-page="history_session"] .mode-icon-small,html[data-writer-page="history_content"] .mode-icon-small{display:none}
html[data-writer-page="history_session"] .mode-text,html[data-writer-page="history_content"] .mode-text{display:flex;flex-direction:row;align-items:center;gap:8px}
html[data-writer-page="history_session"] .mode-name,html[data-writer-page="history_content"] .mode-name{font-size:14px;font-weight:600;color:inherit}
html[data-writer-page="history_session"] .writing-tier-text,html[data-writer-page="history_content"] .writing-tier-text{font-size:11px;color:#929292}
html[data-writer-page="history_session"] .mode-lock-indicator,html[data-writer-page="history_content"] .mode-lock-indicator{display:none}
html[data-writer-page="history_session"] .conversation-title-container,html[data-writer-page="history_content"] .conversation-title-container{position:absolute;right:20px;top:50%;display:flex;align-items:center;gap:8px;max-width:230px;transform:translateY(-50%)}
html[data-writer-page="history_session"] .conversation-title,html[data-writer-page="history_content"] .conversation-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#666;font-size:12px}
html[data-writer-page="history_session"] #chat-content-area,html[data-writer-page="history_content"] #chat-content-area{display:flex;flex:1 1 0;flex-direction:column;min-width:0;min-height:0;height:auto!important;overflow:hidden;background:#fff}
html[data-writer-page="history_session"] #chat-container,html[data-writer-page="history_content"] #chat-container{position:relative;flex:1 1 0;width:min(100%,1040px);max-width:1040px;min-height:0;margin:0 auto;padding:30px 34px 14px;overflow-y:auto;border-radius:0;background:#fff;box-shadow:none}
html[data-writer-page="history_session"] #chat-container:empty::before,html[data-writer-page="history_content"] #chat-container:empty::before{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);content:"随时可以开始。";color:#252525;font-size:23px;font-weight:450;white-space:nowrap;pointer-events:none}
html[data-writer-page="history_session"] #chat-content-area>.input-area,html[data-writer-page="history_content"] #chat-content-area>.input-area{position:relative;inset:auto;display:flex;flex:0 0 auto;align-items:center;width:100%;margin:0;padding:14px 24px 24px;border:0;background:transparent;box-shadow:none;z-index:10}
html[data-writer-page="history_session"] .file-preview-container,html[data-writer-page="history_content"] .file-preview-container{width:min(920px,100%);margin:0 auto}
html[data-writer-page="history_session"] .text-input-area,html[data-writer-page="history_content"] .text-input-area{position:relative;display:flex;align-items:center;gap:8px;width:min(920px,100%);min-height:66px;margin:0 auto;padding:8px 10px;border:1px solid #e7e7e7;border-radius:36px;background:#fff;box-shadow:0 5px 20px #0000000a;transition:border-color .16s,box-shadow .16s}
html[data-writer-page="history_session"] .text-input-area:focus-within,html[data-writer-page="history_content"] .text-input-area:focus-within{border-color:#d4d4d8;box-shadow:0 6px 24px #00000012}
html[data-writer-page="history_session"] .file-upload-area,html[data-writer-page="history_content"] .file-upload-area{display:flex;flex:0 0 auto;align-items:center;justify-content:center;width:42px;height:42px}
html[data-writer-page="history_session"] .file-upload-button,html[data-writer-page="history_content"] .file-upload-button{display:flex;align-items:center;justify-content:center;width:40px;height:40px;margin:0;padding:0;border:0;border-radius:50%;background:transparent;color:#333;font-size:23px;cursor:pointer}
html[data-writer-page="history_session"] .file-upload-button:hover,html[data-writer-page="history_content"] .file-upload-button:hover{background:#f3f3f3}
html[data-writer-page="history_session"] #user-input,html[data-writer-page="history_content"] #user-input{flex:1;min-width:0;min-height:44px;max-height:150px;margin:0;padding:11px 8px;border:0!important;border-radius:0!important;outline:0;background:transparent!important;box-shadow:none!important;color:#252525;font-size:15px;line-height:1.5;resize:none}
html[data-writer-page="history_session"] #user-input::placeholder,html[data-writer-page="history_content"] #user-input::placeholder{color:#888}
html[data-writer-page="history_session"] .send-shortcut-hint,html[data-writer-page="history_content"] .send-shortcut-hint{display:none!important}
html[data-writer-page="history_session"] #send-button,html[data-writer-page="history_content"] #send-button,html[data-writer-page="history_session"] #stop-button,html[data-writer-page="history_content"] #stop-button{position:static;top:auto;right:auto;flex:0 0 auto;transform:none;width:44px;height:44px;margin:0;border:0;border-radius:50%;background:#3b82f6;color:#fff;box-shadow:none}
html[data-writer-page="history_session"] #send-button:hover,html[data-writer-page="history_content"] #send-button:hover{background:#2873e6}
html[data-writer-page="history_session"] #send-button i,html[data-writer-page="history_content"] #send-button i{font-size:20px}
html[data-writer-page="history_session"] .knowledge-panel,html[data-writer-page="history_content"] .knowledge-panel{flex:0 0 300px;width:300px;min-width:280px;height:100%;max-height:100%;margin:0;border-left:1px solid #eee;border-radius:0;background:#fff;box-shadow:none}
}
@media(max-width:768px){
html[data-writer-page="history_session"] .writer-workspace-tabs,html[data-writer-page="history_content"] .writer-workspace-tabs{display:flex}
html[data-writer-page="history_session"] .workspace-tab,html[data-writer-page="history_content"] .workspace-tab{min-width:84px;height:36px;padding:0 12px;font-size:12px}
html[data-writer-page="history_session"] #chat-container:empty::before,html[data-writer-page="history_content"] #chat-container:empty::before{font-size:20px}
html[data-writer-page="history_session"] .text-input-area,html[data-writer-page="history_content"] .text-input-area{width:100%;min-height:58px}
html[data-writer-page="history_session"] #chat-content-area>.input-area,html[data-writer-page="history_content"] #chat-content-area>.input-area{padding:10px 12px 14px}
}

/* ChatGPT-style conversation: right-aligned user bubbles and open assistant text. */
html[data-writer-page="history_session"] #chat-container,html[data-writer-page="history_content"] #chat-container{display:flex;flex-direction:column;align-items:stretch;gap:26px}
html[data-writer-page="history_session"] #chat-container>.message,html[data-writer-page="history_content"] #chat-container>.message{position:relative;flex:0 0 auto;width:100%;max-width:100%;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;color:#292929;line-height:1.8;overflow:visible}
html[data-writer-page="history_session"] #chat-container>.message.user,html[data-writer-page="history_content"] #chat-container>.message.user{display:flex;justify-content:flex-end;align-self:stretch}
html[data-writer-page="history_session"] #chat-container>.message.user>.message-content,html[data-writer-page="history_content"] #chat-container>.message.user>.message-content{flex:0 1 auto;width:auto;max-width:min(78%,760px);padding:12px 17px;border:0;border-radius:22px;background:#f4f4f4;color:#292929;box-shadow:none;line-height:1.65}
html[data-writer-page="history_session"] #chat-container>.message.user>.document-files,html[data-writer-page="history_content"] #chat-container>.message.user>.document-files{max-width:min(78%,760px);margin-left:auto}
html[data-writer-page="history_session"] #chat-container>.message.assistant,html[data-writer-page="history_content"] #chat-container>.message.assistant{display:block;align-self:stretch;color:#292929}
html[data-writer-page="history_session"] #chat-container>.message.assistant>.message-content,html[data-writer-page="history_content"] #chat-container>.message.assistant>.message-content{width:100%;max-width:100%;padding:0 48px 0 0;border:0;border-radius:0;background:transparent;color:#292929;box-shadow:none;line-height:1.85}
html[data-writer-page="history_session"] #chat-container>.message.assistant .copy-button,html[data-writer-page="history_content"] #chat-container>.message.assistant .copy-button{top:0;right:0;width:30px;height:30px;border-color:#e8e8e8;background:#fff;opacity:.55}
html[data-writer-page="history_session"] #chat-container>.message.assistant:hover .copy-button,html[data-writer-page="history_content"] #chat-container>.message.assistant:hover .copy-button{opacity:1}
html[data-writer-page="history_session"] #chat-container>.message.assistant .word-button,html[data-writer-page="history_content"] #chat-container>.message.assistant .word-button{display:inline-flex;width:auto!important;margin:12px 0 0;padding:8px 12px;border:1px solid #d9e2f3;border-radius:9px;background:#f5f8ff;color:#315f9e;font-size:13px}
@media(max-width:768px){
html[data-writer-page="history_session"] #chat-container,html[data-writer-page="history_content"] #chat-container{gap:21px;padding:20px 16px 12px}
html[data-writer-page="history_session"] #chat-container>.message.user>.message-content,html[data-writer-page="history_content"] #chat-container>.message.user>.message-content{max-width:88%;padding:10px 14px;border-radius:19px}
html[data-writer-page="history_session"] #chat-container>.message.assistant>.message-content,html[data-writer-page="history_content"] #chat-container>.message.assistant>.message-content{padding-right:38px}
}

/* Dashboard: use one predictable scroll area and let every card show its full content. */
@media(min-width:769px){
html[data-writer-page="dashboard"] body>.writer-shell-header~.container{display:flex;height:calc(100dvh - 76px)!important;min-height:0;overflow:hidden}
html[data-writer-page="dashboard"] .main-content{display:flex;flex:1 1 auto;flex-direction:column;min-width:0;min-height:0;height:100%;overflow:hidden}
html[data-writer-page="dashboard"] .main-content>.header{position:relative!important;inset:auto!important;display:flex;flex:0 0 64px;align-items:center;height:64px!important;min-height:64px!important;padding:12px 24px!important}
html[data-writer-page="dashboard"] .dashboard-container{display:grid;flex:1 1 0;grid-template-columns:minmax(0,1fr) minmax(300px,360px);align-items:start;gap:18px;width:100%;height:auto;min-height:0;padding:20px 22px!important;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
html[data-writer-page="dashboard"] .dashboard-main,html[data-writer-page="dashboard"] .dashboard-sidebar{display:flex;flex-direction:column;gap:18px;align-self:start;width:auto;min-width:0;max-width:none;max-height:none;margin:0;padding:0;overflow:visible;border:0}
html[data-writer-page="dashboard"] .info-card{flex:0 0 auto;min-width:0;overflow:hidden;border:1px solid #e5eaf3;border-radius:20px;box-shadow:0 4px 18px #25355b06}
html[data-writer-page="dashboard"] .info-card>.card-header{flex:0 0 auto;min-height:64px;padding:18px 22px;border-bottom:1px solid #edf0f6}
html[data-writer-page="dashboard"] .info-card>.card-content,html[data-writer-page="dashboard"] .notification-card .card-content,html[data-writer-page="dashboard"] .update-card .card-content,html[data-writer-page="dashboard"] .quick-actions-card .card-content,html[data-writer-page="dashboard"] .vip-stats-card .card-content,html[data-writer-page="dashboard"] .admin-panel-card .card-content{flex:0 0 auto;max-height:none!important;min-height:0;overflow:visible!important;padding:20px 22px}
html[data-writer-page="dashboard"] .quick-actions-card .card-content{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
html[data-writer-page="dashboard"] .quick-action-button{min-width:0;min-height:112px;border-radius:15px}
html[data-writer-page="dashboard"] .notification-item,html[data-writer-page="dashboard"] .update-item{min-width:0}
html[data-writer-page="dashboard"] .notification-content,html[data-writer-page="dashboard"] .update-content,html[data-writer-page="dashboard"] .stats-info{min-width:0;overflow-wrap:anywhere}
html[data-writer-page="dashboard"] .writer-shell-header{min-width:0;gap:10px;padding-inline:clamp(14px,2vw,32px)}
html[data-writer-page="dashboard"] .writer-shell-header nav{flex:1 1 auto;min-width:0;justify-content:flex-end;gap:2px}
html[data-writer-page="dashboard"] .writer-shell-header nav a{flex:0 0 auto;padding-inline:9px}
html[data-writer-page="dashboard"] .writer-shell-account-bar{flex:0 1 auto;min-width:0;max-width:760px;gap:10px;margin-left:4px;padding-left:12px}
html[data-writer-page="dashboard"] .writer-shell-account{gap:10px}
html[data-writer-page="dashboard"] .writer-shell-account-bar .writer-shell-quota{flex:1 1 360px;min-width:310px;max-width:470px;grid-template-columns:auto auto minmax(64px,1fr) auto;gap:8px}
html[data-writer-page="dashboard"] .writer-shell-account-bar .quota-values{flex-direction:row;align-items:center;gap:8px}
}
@media(min-width:769px) and (max-width:1450px){
html[data-writer-page="dashboard"] .writer-shell-brand{font-size:19px}
html[data-writer-page="dashboard"] .writer-shell-brand img{width:32px;height:32px}
html[data-writer-page="dashboard"] .writer-shell-header nav a{padding-inline:6px;font-size:12px}
html[data-writer-page="dashboard"] .writer-shell-account-bar .writer-shell-quota{min-width:250px;grid-template-columns:auto auto minmax(40px,1fr) auto}
html[data-writer-page="dashboard"] .writer-shell-account-bar .quota-values{flex-direction:column;align-items:flex-start;gap:0}
}
@media(min-width:769px) and (max-width:1100px){
html[data-writer-page="dashboard"] .dashboard-container{grid-template-columns:minmax(0,1fr)}
html[data-writer-page="dashboard"] .dashboard-sidebar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
html[data-writer-page="dashboard"] .admin-panel-card{grid-column:1/-1}
}
@media(max-width:768px){
html[data-writer-page="dashboard"] .dashboard-container{height:auto;min-height:0;overflow:visible;padding:16px!important}
html[data-writer-page="dashboard"] .dashboard-main,html[data-writer-page="dashboard"] .dashboard-sidebar{max-height:none;overflow:visible}
html[data-writer-page="dashboard"] .dashboard-sidebar{border:0}
html[data-writer-page="dashboard"] .info-card>.card-content,html[data-writer-page="dashboard"] .notification-card .card-content,html[data-writer-page="dashboard"] .update-card .card-content,html[data-writer-page="dashboard"] .quick-actions-card .card-content{max-height:none!important;overflow:visible!important}
}

/* A single divider separates the sidebar tools from recent conversations. */
html[data-writer-ui] .sidebar>.module-links,html[data-writer-ui] .sidebar-menu>.module-links{margin-bottom:0;padding-bottom:0;border-bottom:0}
html[data-writer-page="create_chat"] .sidebar-menu>.recents-header{padding-top:12px}

/* Compact the rewrite and detector intro so the working panels start higher. */
body[data-area="rewrite"] .site-layout main,body[data-area="detection"] .site-layout main{padding-top:18px}
body[data-area="rewrite"] .intro.rewrite-hero,body[data-area="detection"] .intro{width:min(100%,1420px);min-height:0;gap:18px;padding:15px 22px;margin-bottom:14px}
body[data-area="rewrite"] .intro.rewrite-hero h1,body[data-area="detection"] .intro h1{margin:4px 0;font-size:28px}
body[data-area="rewrite"] .intro.rewrite-hero p,body[data-area="detection"] .intro p{margin:5px 0;line-height:1.55}
body[data-area="rewrite"] .hero-features{gap:6px 14px;margin-top:8px}
body[data-area="rewrite"] .hero-guide{flex-direction:row;flex-wrap:wrap;gap:6px 12px;padding:2px 0 2px 18px;font-size:11px}
body[data-area="rewrite"] .hero-guide b{width:20px;height:20px;margin-right:5px}
@media(max-width:680px){
body[data-area="rewrite"] .site-layout main,body[data-area="detection"] .site-layout main{padding-top:14px}
body[data-area="rewrite"] .intro.rewrite-hero,body[data-area="detection"] .intro{width:100%;padding:14px 16px;margin-bottom:14px}
body[data-area="rewrite"] .intro.rewrite-hero h1,body[data-area="detection"] .intro h1{font-size:24px}
body[data-area="rewrite"] .hero-guide{display:none}
}

/* Single, calm literature search panel. */
html[data-writer-page="history_session"] .container>.knowledge-panel,
html[data-writer-page="history_content"] .container>.knowledge-panel{flex:0 0 360px;width:360px;min-width:300px;max-width:420px;height:100%;max-height:100%;margin:0;border:0;border-left:1px solid #e8eaf1;border-radius:0;background:#fff;box-shadow:-8px 0 24px #1e2a4409;overflow:hidden}
html[data-writer-page="history_session"] .knowledge-panel .literature-section,
html[data-writer-page="history_content"] .knowledge-panel .literature-section{display:flex;flex:1 1 auto;flex-direction:column;min-width:0;min-height:0;max-height:none;border:0}
html[data-writer-page="history_session"] .knowledge-panel .literature-header,
html[data-writer-page="history_content"] .knowledge-panel .literature-header{justify-content:flex-start;gap:12px;padding:20px 18px;background:#fff;border-bottom:1px solid #edf0f5}
html[data-writer-page="history_session"] .knowledge-panel .literature-heading-icon,
html[data-writer-page="history_content"] .knowledge-panel .literature-heading-icon{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:12px;background:#f1edff;color:#6854d8;font-size:20px}
html[data-writer-page="history_session"] .knowledge-panel .literature-heading-copy,
html[data-writer-page="history_content"] .knowledge-panel .literature-heading-copy{min-width:0}
html[data-writer-page="history_session"] .knowledge-panel .literature-title,
html[data-writer-page="history_content"] .knowledge-panel .literature-title{color:#273149;font-size:16px;font-weight:700;text-align:left}
html[data-writer-page="history_session"] .knowledge-panel .literature-description,
html[data-writer-page="history_content"] .knowledge-panel .literature-description{margin:4px 0 0;color:#8490a4;font-size:11px;line-height:1.5}
html[data-writer-page="history_session"] .knowledge-panel .literature-search-container,
html[data-writer-page="history_content"] .knowledge-panel .literature-search-container{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;padding:18px 16px;overflow:hidden;background:#f8f9fc}
html[data-writer-page="history_session"] .knowledge-panel .literature-search-label,
html[data-writer-page="history_content"] .knowledge-panel .literature-search-label{margin:0 0 7px;color:#738097;font-size:11px;font-weight:600}
html[data-writer-page="history_session"] .knowledge-panel .literature-search-input-area,
html[data-writer-page="history_content"] .knowledge-panel .literature-search-input-area{display:flex;flex:0 0 auto;gap:8px;margin:0;overflow:visible;border-radius:0;box-shadow:none;background:transparent}
html[data-writer-page="history_session"] .knowledge-panel .literature-search-input,
html[data-writer-page="history_content"] .knowledge-panel .literature-search-input{min-width:0;height:42px;padding:9px 12px;border:1px solid #e1e5ee!important;border-radius:11px!important;background:#fff!important;font-size:12px;box-shadow:none}
html[data-writer-page="history_session"] .knowledge-panel .literature-search-input:focus,
html[data-writer-page="history_content"] .knowledge-panel .literature-search-input:focus{border-color:#b9adee!important;box-shadow:0 0 0 3px #6854d81a!important}
html[data-writer-page="history_session"] .knowledge-panel .literature-search-btn,
html[data-writer-page="history_content"] .knowledge-panel .literature-search-btn{flex:0 0 42px;width:42px;min-width:42px;height:42px;border:0;border-radius:11px;background:#6854d8;color:#fff}
html[data-writer-page="history_session"] .knowledge-panel .literature-search-btn:hover,
html[data-writer-page="history_content"] .knowledge-panel .literature-search-btn:hover{background:#5744c3}
html[data-writer-page="history_session"] .knowledge-panel .literature-search-results,
html[data-writer-page="history_content"] .knowledge-panel .literature-search-results{flex:1 1 auto;min-height:0;margin:12px 0 0;padding:0 3px 0 0;overflow-y:auto}
html[data-writer-page="history_session"] .knowledge-panel .literature-empty-state,
html[data-writer-page="history_content"] .knowledge-panel .literature-empty-state{display:flex;min-height:210px;flex-direction:column;align-items:center;justify-content:center;padding:24px 16px;color:#8490a4;text-align:center}
html[data-writer-page="history_session"] .knowledge-panel .literature-empty-state>i,
html[data-writer-page="history_content"] .knowledge-panel .literature-empty-state>i{display:grid;place-items:center;width:44px;height:44px;margin-bottom:12px;border-radius:14px;background:#eeebfb;color:#7a68ca;font-size:21px}
html[data-writer-page="history_session"] .knowledge-panel .literature-empty-state strong,
html[data-writer-page="history_content"] .knowledge-panel .literature-empty-state strong{color:#566178;font-size:12px;font-weight:650}
html[data-writer-page="history_session"] .knowledge-panel .literature-empty-state p,
html[data-writer-page="history_content"] .knowledge-panel .literature-empty-state p{max-width:220px;margin:6px 0 0;font-size:11px;line-height:1.7}
html[data-writer-page="history_session"] .knowledge-panel .literature-result-item,
html[data-writer-page="history_content"] .knowledge-panel .literature-result-item{padding:13px;border:1px solid #e7eaf2;border-radius:12px;margin:0 0 10px;background:#fff;box-shadow:none}
html[data-writer-page="history_session"] .knowledge-panel .literature-result-item:hover,
html[data-writer-page="history_content"] .knowledge-panel .literature-result-item:hover{transform:none;border-color:#d6cef3;box-shadow:0 3px 12px #2a304e0d}
html[data-writer-page="history_session"] .knowledge-panel .literature-result-title,
html[data-writer-page="history_content"] .knowledge-panel .literature-result-title{margin:0 0 8px;color:#33405a;font-size:12px;line-height:1.6}
html[data-writer-page="history_session"] .knowledge-panel .literature-result-abstract,
html[data-writer-page="history_content"] .knowledge-panel .literature-result-abstract{margin-bottom:10px;color:#6f7b90;font-size:11px;line-height:1.7}
html[data-writer-page="history_session"] .knowledge-panel .literature-copy-btn,
html[data-writer-page="history_content"] .knowledge-panel .literature-copy-btn{padding:7px 10px;border:1px solid #e3def5;border-radius:9px;background:#f5f2ff;color:#6652c6;font-size:11px;box-shadow:none}
html[data-writer-page="history_session"] .knowledge-panel .literature-loading,
html[data-writer-page="history_content"] .knowledge-panel .literature-loading{flex:0 0 auto;gap:8px;padding:10px 0 0;color:#77839a;font-size:11px}
html[data-writer-page="history_session"] .knowledge-panel .literature-loading-spinner,
html[data-writer-page="history_content"] .knowledge-panel .literature-loading-spinner{width:16px;height:16px;border-color:#e4e0f3;border-top-color:#6854d8}
@media(max-width:900px) and (min-width:769px){html[data-writer-page="history_session"] .container>.knowledge-panel,html[data-writer-page="history_content"] .container>.knowledge-panel{flex-basis:320px;width:320px;min-width:280px}}

/* Mode-specific conversation history lives beside the current workspace. */
html[data-writer-page="history_session"] .session-history-panel,
html[data-writer-page="history_content"] .session-history-panel{flex:0 0 360px;width:360px;min-width:300px;max-width:420px;height:100%;max-height:100%;margin:0;border:0;border-left:1px solid #e8eaf1;background:#fff;box-shadow:-8px 0 24px #1e2a4409;overflow:hidden;display:flex;flex-direction:column}
html[data-writer-page="history_session"] .session-history-panel.hidden,
html[data-writer-page="history_content"] .session-history-panel.hidden{display:none!important}
.session-history-header{padding:22px 20px 14px;border-bottom:1px solid #edf0f5;flex:0 0 auto}
.session-history-header h2{margin:0;color:#27324a;font-size:16px;font-weight:700}
.session-history-header p{margin:6px 0 0;color:#929db0;font-size:11px;line-height:1.6}
#session-history-search-form{display:flex;align-items:center;gap:6px;margin:14px 16px 10px;padding:5px;border:1px solid #e4e8f0;border-radius:12px;background:#fafbfe;flex:0 0 auto}
#session-history-search-form:focus-within{border-color:#b9acef;box-shadow:0 0 0 3px #9a83df12}
#session-history-search{min-width:0;flex:1;border:0;outline:0;padding:8px 9px;background:transparent;color:#27324a;font:inherit;font-size:12px}
#session-history-search-form button{display:grid;place-items:center;width:34px;height:32px;border:0;border-radius:9px;background:#f0edfb;color:#735fce}
.session-history-list{min-height:0;flex:1;overflow:auto;padding:2px 12px 16px;scrollbar-width:thin;scrollbar-color:#d9deea transparent}
.session-history-item{display:block;padding:13px 12px;margin:4px 0;border:1px solid transparent;border-radius:12px;color:#44516a;text-decoration:none;transition:background .15s,border-color .15s}
.session-history-item:hover,.session-history-item:focus-visible{background:#f6f5fc;border-color:#e8e3fa}
.session-history-item strong{display:block;overflow:hidden;color:#303c53;font-size:12px;font-weight:600;line-height:1.6;text-overflow:ellipsis;white-space:nowrap}
.session-history-item time{display:block;margin-top:4px;color:#99a3b4;font-size:10px}
.session-history-snippet{display:-webkit-box;overflow:hidden;margin:7px 0 0;color:#7c879a;font-size:11px;line-height:1.6;white-space:pre-wrap;-webkit-box-orient:vertical;-webkit-line-clamp:3}
.session-history-loading,.session-history-error{padding:14px;color:#8d98ab;font-size:12px;line-height:1.7}
.session-history-error{color:#bd626b}
.session-history-empty{display:flex;min-height:180px;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:22px;text-align:center;color:#a0a9b8}
.session-history-empty i{font-size:24px;color:#a698d9}
.session-history-empty strong{color:#67738b;font-size:12px}
.session-history-empty span{font-size:11px;line-height:1.6}
.session-history-status{padding:0 16px 10px;color:#ad6370;font-size:11px;flex:0 0 auto}
@media(max-width:900px){html[data-writer-page="history_session"] .session-history-panel,html[data-writer-page="history_content"] .session-history-panel{position:absolute;z-index:12;top:0;right:0;width:min(88vw,360px);height:100%;box-shadow:-12px 0 36px #17203326}}

/* Compact inbox for announcements, software releases, and account reminders. */
.writer-notification-center{position:relative;z-index:40;display:flex;flex:0 0 auto;align-items:center}
.writer-notification-toggle{position:relative;display:flex;align-items:center;gap:5px;padding:8px 9px;border:0;border-radius:10px;background:transparent;color:#7a8498;font:inherit;font-size:12px;white-space:nowrap;cursor:pointer}
.writer-notification-toggle:hover,.writer-notification-toggle[aria-expanded="true"]{background:#f4f2fb;color:#6651ce}
.writer-notification-toggle i{font-size:17px}
.writer-notification-toggle b{position:absolute;top:1px;right:0;min-width:15px;height:15px;padding:0 4px;border-radius:10px;background:#eb5b6b;color:#fff;font-size:9px;line-height:15px;text-align:center}
.writer-notification-popover{position:absolute;top:calc(100% + 10px);right:0;display:flex;width:min(390px,calc(100vw - 24px));max-height:min(72vh,620px);flex-direction:column;overflow:hidden;border:1px solid #e7e9f0;border-radius:16px;background:#fff;box-shadow:0 18px 48px #1e2a4426}
.writer-notification-popover[hidden]{display:none!important}
.writer-notification-popover>header{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px 17px;border-bottom:1px solid #edf0f5}
.writer-notification-popover>header>div{display:flex;align-items:baseline;gap:9px}
.writer-notification-popover>header strong{font-size:15px;color:#26324a}
.writer-notification-popover>header span{color:#929db0;font-size:11px}
.writer-notification-popover>header button{width:28px;height:28px;border:0;border-radius:8px;background:#f5f6fa;color:#778299;font-size:20px;line-height:1}
.writer-notification-popover>header .writer-notification-actions{align-items:center;gap:7px;flex-shrink:0}
.writer-notification-popover>header #writerNotificationReadAll{width:auto;height:32px;padding:0 9px;color:#6651ce;font:inherit;font-size:12px;white-space:nowrap;cursor:pointer}
.writer-notification-popover>header #writerNotificationReadAll:disabled{opacity:.45;cursor:default}
.writer-notification-list{min-height:90px;overflow:auto;padding:7px 10px 11px;scrollbar-width:thin;scrollbar-color:#d9deea transparent}
.writer-notification-item{position:relative;display:block;width:100%;padding:11px 12px;margin:3px 0;text-align:left;border:1px solid transparent;border-radius:11px;background:#fff;color:#45516a;cursor:pointer}
.writer-notification-item:hover{background:#f8f8fc;border-color:#efedf6}
.writer-notification-item.is-unread{background:#f8f7ff}
.writer-notification-item-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:5px}
.writer-notification-label{color:#7261c5;font-size:10px;font-weight:650}
.writer-notification-date{color:#a0a8b7;font-size:9px}
.writer-notification-item strong{display:block;padding-right:12px;color:#303c53;font-size:12px;line-height:1.6}
.writer-notification-content{display:-webkit-box;overflow:hidden;margin-top:4px;color:#7d889a;font-size:11px;line-height:1.65;white-space:pre-wrap;-webkit-box-orient:vertical;-webkit-line-clamp:3}
.writer-notification-unread-dot{position:absolute;top:16px;right:11px;width:7px;height:7px;border-radius:50%;background:#7058db}
.writer-notification-loading,.writer-notification-empty,.writer-notification-error{padding:14px;color:#8f9aab;font-size:11px;line-height:1.7}
.writer-notification-error{color:#b85d68}
@media(max-width:1500px){body[data-area] .writer-notification-toggle span{display:none}body[data-area] .writer-notification-toggle{padding-inline:7px}}
@media(max-width:680px){.writer-notification-center{order:2}.writer-notification-popover{position:fixed;top:112px;right:12px;width:min(390px,calc(100vw - 24px));max-height:calc(100dvh - 130px)}body[data-area] .writer-notification-toggle span{display:none}}

/* Phone layout for the writing workspace: keep tool switching and the composer in reach. */
.mobile-tool-switcher{display:none}
.workspace-panel-close{display:none}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:768px){
html[data-writer-page="history_session"] body>.writer-shell-header~.container,
html[data-writer-page="history_content"] body>.writer-shell-header~.container{display:flex;flex-direction:row;height:auto!important;min-height:0;flex:1 1 0;overflow:hidden}
html[data-writer-page="history_session"] .container>.sidebar,
html[data-writer-page="history_content"] .container>.sidebar{display:none!important}
html[data-writer-page="history_session"] .main-content,
html[data-writer-page="history_content"] .main-content{position:relative;display:flex;flex:1 1 0;flex-direction:column;width:100%;height:100%!important;min-width:0;min-height:0;overflow:hidden;background:#fff}
html[data-writer-page="history_session"] .main-content>.conversation-context-header,
html[data-writer-page="history_content"] .main-content>.conversation-context-header{display:flex;flex:0 0 54px;min-height:54px!important;height:54px!important;padding:6px 8px!important;justify-content:center;background:#fff}
html[data-writer-page="history_session"] .conversation-context-header .header-buttons,
html[data-writer-page="history_content"] .conversation-context-header .header-buttons{justify-content:center;min-width:0}
html[data-writer-page="history_session"] .session-mode-display,
html[data-writer-page="history_content"] .session-mode-display{width:100%;min-width:0;justify-content:center}
html[data-writer-page="history_session"] .writer-workspace-tabs,
html[data-writer-page="history_content"] .writer-workspace-tabs{max-width:100%;gap:2px;padding:3px}
html[data-writer-page="history_session"] .workspace-tab,
html[data-writer-page="history_content"] .workspace-tab{flex:1 1 auto;min-width:0;height:38px;padding:0 10px;font-size:12px}
html[data-writer-page="history_session"] .mode-text,
html[data-writer-page="history_content"] .mode-text{gap:0}
html[data-writer-page="history_session"] .writing-tier-text,
html[data-writer-page="history_content"] .writing-tier-text{display:none}
html[data-writer-page="history_session"] .mobile-tool-switcher,
html[data-writer-page="history_content"] .mobile-tool-switcher{display:flex;flex:0 0 auto;min-width:0;align-items:center;border-bottom:1px solid #eceef3;background:#fff}
html[data-writer-page="history_session"] .mobile-tool-switcher .module-links,
html[data-writer-page="history_content"] .mobile-tool-switcher .module-links{display:flex;flex-direction:row;gap:6px;width:100%;margin:0;padding:7px 10px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}
html[data-writer-page="history_session"] .mobile-tool-switcher .module-links::-webkit-scrollbar,
html[data-writer-page="history_content"] .mobile-tool-switcher .module-links::-webkit-scrollbar{display:none}
html[data-writer-page="history_session"] .mobile-tool-switcher .module-links a,
html[data-writer-page="history_content"] .mobile-tool-switcher .module-links a{display:flex;flex:1 0 auto;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:7px 10px;border:1px solid #e8e9ef;border-radius:10px;background:#fff;color:#535965;font-size:11px;text-decoration:none;white-space:nowrap}
html[data-writer-page="history_session"] .mobile-tool-switcher .module-links a[aria-current],
html[data-writer-page="history_content"] .mobile-tool-switcher .module-links a[aria-current]{border-color:#e4def8;background:#f3f0fd;color:#634fcd;font-weight:650}
html[data-writer-page="history_session"] #chat-content-area,
html[data-writer-page="history_content"] #chat-content-area{display:flex;flex:1 1 0;width:100%;height:auto!important;min-width:0;min-height:0;flex-direction:column;overflow:hidden;background:#fff}
html[data-writer-page="history_session"] #chat-container,
html[data-writer-page="history_content"] #chat-container{flex:1 1 0;min-width:0;min-height:0;width:100%;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
html[data-writer-page="history_session"] #chat-content-area>.input-area,
html[data-writer-page="history_content"] #chat-content-area>.input-area{flex:0 0 auto;width:100%;padding:8px 10px calc(10px + env(safe-area-inset-bottom));background:#fff}
html[data-writer-page="history_session"] .text-input-area,
html[data-writer-page="history_content"] .text-input-area{gap:4px;min-height:54px;padding:5px 7px;border-radius:28px}
html[data-writer-page="history_session"] .file-upload-area,
html[data-writer-page="history_content"] .file-upload-area{width:34px;height:38px}
html[data-writer-page="history_session"] .file-upload-button,
html[data-writer-page="history_content"] .file-upload-button{width:34px;height:36px;font-size:21px}
html[data-writer-page="history_session"] #user-input,
html[data-writer-page="history_content"] #user-input{min-height:40px;max-height:120px;padding:9px 5px;font-size:14px}
html[data-writer-page="history_session"] #send-button,
html[data-writer-page="history_content"] #send-button,
html[data-writer-page="history_session"] #stop-button,
html[data-writer-page="history_content"] #stop-button{width:38px;height:38px}
html[data-writer-page="history_session"] .knowledge-panel:not(.hidden),
html[data-writer-page="history_content"] .knowledge-panel:not(.hidden),
html[data-writer-page="history_session"] .session-history-panel:not(.hidden),
html[data-writer-page="history_content"] .session-history-panel:not(.hidden){position:fixed!important;inset:0!important;z-index:100!important;display:flex!important;flex-direction:column;width:100vw!important;min-width:0!important;max-width:none!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;padding-bottom:env(safe-area-inset-bottom);border:0!important;border-radius:0!important;background:#fff!important;box-shadow:none!important;overflow:hidden!important}
html[data-writer-page="history_session"] .knowledge-panel .literature-section,
html[data-writer-page="history_content"] .knowledge-panel .literature-section{display:flex;flex:1 1 0;min-width:0;min-height:0;height:100%;flex-direction:column}
html[data-writer-page="history_session"] .knowledge-panel .literature-header,
html[data-writer-page="history_content"] .knowledge-panel .literature-header{flex:0 0 auto;gap:10px;padding:calc(12px + env(safe-area-inset-top)) 14px 12px}
html[data-writer-page="history_session"] .knowledge-panel .literature-heading-icon,
html[data-writer-page="history_content"] .knowledge-panel .literature-heading-icon{flex-basis:36px;width:36px;height:36px}
html[data-writer-page="history_session"] .knowledge-panel .literature-search-container,
html[data-writer-page="history_content"] .knowledge-panel .literature-search-container{flex:1 1 0;min-height:0;padding:14px 14px calc(14px + env(safe-area-inset-bottom));overflow:hidden}
html[data-writer-page="history_session"] .session-history-header,
html[data-writer-page="history_content"] .session-history-header{display:flex;flex:0 0 auto;align-items:center;justify-content:space-between;gap:12px;padding:calc(14px + env(safe-area-inset-top)) 16px 13px}
.workspace-panel-close{display:none}
html[data-writer-page="history_session"] .workspace-panel-close,
html[data-writer-page="history_content"] .workspace-panel-close{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;min-height:36px;padding:0 12px;border:1px solid #e6e7ed;border-radius:10px;background:#fff;color:#5d55a1;font:inherit;font-size:12px;cursor:pointer}
html[data-writer-page="history_session"] #session-history-search-form,
html[data-writer-page="history_content"] #session-history-search-form{margin:12px 14px;padding:6px}
html[data-writer-page="history_session"] #session-history-search,
html[data-writer-page="history_content"] #session-history-search{min-height:38px;font-size:14px}
html[data-writer-page="history_session"] .session-history-list,
html[data-writer-page="history_content"] .session-history-list{padding:2px 10px calc(18px + env(safe-area-inset-bottom))}
}
@media(max-width:380px){
html[data-writer-page="history_session"] .workspace-tab,
html[data-writer-page="history_content"] .workspace-tab{padding-inline:7px;font-size:11px}
html[data-writer-page="history_session"] .mobile-tool-switcher .module-links,
html[data-writer-page="history_content"] .mobile-tool-switcher .module-links{gap:4px;padding-inline:7px}
html[data-writer-page="history_session"] .mobile-tool-switcher .module-links a,
html[data-writer-page="history_content"] .mobile-tool-switcher .module-links a{padding-inline:8px;font-size:10px}
}

/* Literature tools share the conversation panel hierarchy, including sibling side panels. */
html[data-writer-ui] .knowledge-panel .literature-header{align-items:center;gap:10px;padding:18px 16px;background:#fff}
html[data-writer-ui] .knowledge-panel .literature-heading-icon{flex:0 0 36px;width:36px;height:36px;font-size:19px;border-radius:11px}
html[data-writer-ui] .knowledge-panel .literature-heading-copy{flex:1;min-width:0}
html[data-writer-ui] .knowledge-panel .literature-title{font-size:17px;line-height:1.4;color:#253047;text-align:left}
html[data-writer-ui] .knowledge-panel .literature-description{margin-top:4px;font-size:11px;line-height:1.6;color:#8490a2}
html[data-writer-ui] .knowledge-panel .literature-panel-dismiss{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-height:32px;padding:0 8px;border:1px solid #e5e7ef;border-radius:8px;background:#fafbfe;color:#657088;font-size:11px;cursor:pointer}
html[data-writer-ui] .knowledge-panel .literature-search-container{padding:18px 16px;background:#fafbfe;gap:0}
html[data-writer-ui] .knowledge-panel #literature-search-form{width:100%;margin:0;flex:0 0 auto}
html[data-writer-ui] .knowledge-panel .literature-search-label{display:block;margin:0 0 9px;color:#46536b;font-size:13px;font-weight:600}
html[data-writer-ui] .knowledge-panel .literature-search-input-area{gap:8px;align-items:center}
html[data-writer-ui] .knowledge-panel .literature-search-input{flex:1;width:100%;min-width:0;height:44px;padding:10px 12px;font-size:14px}
html[data-writer-ui] .knowledge-panel .literature-search-btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex:0 0 76px;width:76px;min-width:76px;height:44px;padding:0 10px;background:#6854d8;font-size:13px;font-weight:600;box-shadow:none}
html[data-writer-ui] .knowledge-panel .literature-search-btn i{font-size:16px}
html[data-writer-ui] .knowledge-panel .literature-search-btn:disabled{opacity:.6;cursor:wait}
html[data-writer-ui] .knowledge-panel .literature-search-hint{margin:9px 0 0;font-size:11px;color:#929bad;line-height:1.6}
html[data-writer-ui] .knowledge-panel .literature-examples{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:center;gap:6px;margin:15px 0 8px;font-size:11px;color:#8b95a7}
html[data-writer-ui] .knowledge-panel .literature-examples button{padding:6px 9px;border:1px solid #e5e7ef;border-radius:99px;background:#fff;color:#68758c;font:inherit;cursor:pointer}
html[data-writer-ui] .knowledge-panel .literature-examples button:hover{border-color:#cdc3ef;background:#f4f0ff;color:#6854d8}
html[data-writer-ui] .knowledge-panel .literature-status{flex:0 0 auto;min-height:18px;margin:7px 0 0;color:#7b6bb0;font-size:11px;line-height:1.7}
html[data-writer-ui] .knowledge-panel .literature-search-results{flex:1 1 0;min-height:0;margin-top:10px;padding:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
html[data-writer-ui] .knowledge-panel .literature-empty-state{min-height:220px;padding:24px 14px;gap:0}
html[data-writer-ui] .knowledge-panel .literature-empty-state strong{font-size:14px;font-weight:600;color:#58657a}
html[data-writer-ui] .knowledge-panel .literature-empty-state p{max-width:260px;margin-top:8px;font-size:12px;line-height:1.8;color:#929bad}
html[data-writer-ui] .knowledge-panel .literature-result-item{padding:15px;margin-bottom:12px;border-radius:13px;background:#fff}
html[data-writer-ui] .knowledge-panel .literature-result-number{display:block;margin-bottom:7px;color:#9b91ba;font-size:10px;font-weight:600}
html[data-writer-ui] .knowledge-panel .literature-result-title{margin:0;color:#354158;font-size:13px;font-weight:600;line-height:1.8;overflow-wrap:anywhere}
html[data-writer-ui] .knowledge-panel .literature-abstract-details{margin-top:10px;color:#7b6caf;font-size:12px}
html[data-writer-ui] .knowledge-panel .literature-abstract-details summary{padding:3px 0;cursor:pointer}
html[data-writer-ui] .knowledge-panel .literature-result-abstract{display:block;margin:8px 0 0;padding:10px;border-radius:8px;background:#f8f9fc;color:#7a8596;font-size:12px;line-height:1.8;overflow-wrap:anywhere}
html[data-writer-ui] .knowledge-panel .literature-copy-btn,html[data-writer-ui] .knowledge-panel .literature-retry-btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;width:auto;min-height:34px;margin:12px 0 0;padding:7px 11px;border:1px solid #e4ddf6;border-radius:9px;background:#f5f1ff;color:#6b55bc;font-family:inherit;font-size:12px;line-height:1.4;cursor:pointer;box-shadow:none}
html[data-writer-ui] .knowledge-panel .literature-copy-btn:disabled{background:#f2f5f4;border-color:#e4ebe7;color:#779081;cursor:default}
@media(min-width:769px){
html[data-writer-ui] .container>.knowledge-panel{flex:0 0 380px;width:380px;min-width:320px}
html[data-writer-ui] .writer-shell-header nav,body[data-area] .writer-shell-header nav{justify-content:flex-start;margin-left:clamp(20px,3vw,56px);gap:5px}
html[data-writer-ui] .writer-shell-header nav a,body[data-area] .writer-shell-header nav a{padding:11px 12px;color:#556279;font-size:14px;font-weight:500;border-radius:11px}
html[data-writer-ui] .writer-shell-header nav a[aria-current],body[data-area] .writer-shell-header nav a[aria-current]{background:#eee8ff;color:#6047cb;font-weight:650}
html[data-writer-ui] .writer-shell-account-bar,body[data-area] .writer-shell-account-bar{margin-left:auto}
}
@media(min-width:769px) and (max-width:1150px){
html[data-writer-ui] .container>.knowledge-panel{flex-basis:330px;width:330px;min-width:300px}
html[data-writer-ui] .writer-shell-header nav,body[data-area] .writer-shell-header nav{margin-left:12px;gap:2px}
html[data-writer-ui] .writer-shell-header nav a,body[data-area] .writer-shell-header nav a{padding:10px 8px;font-size:13px}
}
@media(max-width:768px){
html[data-writer-ui] .knowledge-panel .literature-header{padding-top:calc(14px + env(safe-area-inset-top))}
html[data-writer-ui] .knowledge-panel .literature-search-container{padding-bottom:calc(16px + env(safe-area-inset-bottom))}
html[data-writer-ui] .knowledge-panel .literature-search-input{font-size:16px}
html[data-writer-ui] .writer-shell-header nav a,body[data-area] .writer-shell-header nav a{padding:9px 10px;font-size:12px;font-weight:500}
html[data-writer-ui] .writer-shell-header nav a[aria-current],body[data-area] .writer-shell-header nav a[aria-current]{font-weight:650;background:#eee8ff;color:#6047cb}
}
html[data-writer-ui] .container>.knowledge-panel{padding:0}
@media(max-width:768px){html[data-writer-ui] body.mobile-device.page-history-content div#knowledge-panel:not(.hidden){display:flex!important}}
