/* Persistent conversations, with the existing editors available as secondary tools. */
.sidebar{position:fixed;width:270px;padding:24px 16px;gap:12px}.sidebar .brand{margin-bottom:10px}.sidebar #newChat{margin:0}.sidebar #chatFilter{font-size:13px;margin:0}.chat-list{flex:1;min-height:120px;overflow:auto;display:flex;flex-direction:column;gap:4px}.chat-list button{border:0;background:transparent;text-align:left;font-size:13px;font-weight:500;padding:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-shrink:0}.chat-list button.active{background:var(--soft);font-weight:700}.tools-menu{font-size:13px}.tools-menu summary{padding:10px;cursor:pointer}.sidebar .tools-menu nav{max-height:33vh;overflow:auto}.sidebar .sidebar-bottom{margin-top:0}.sidebar-bottom p{display:none}main{margin-left:270px}.topbar{padding:12px 0}#assistant{max-width:1050px;margin:auto}.chat-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap;position:sticky;top:0;background:var(--bg);padding:12px 0;z-index:2}.chat-heading h1{font-size:22px;line-height:1.3;flex:1;min-width:120px;margin:0}.chat-heading button{font-size:12px;padding:8px}.thread-messages{min-height:46vh;padding:20px 0}.thread-empty{max-width:700px;margin:8vh auto;text-align:center}.thread-empty h2{font-size:34px;line-height:1.25}.thread-empty .actions{justify-content:center;margin-top:22px}.thread-row{padding:20px 0;border-bottom:1px solid var(--line)}.thread-row.user{margin:12px 0 12px 15%;background:var(--soft);border:0;border-radius:16px;padding:18px 24px}.thread-row .speaker{font-size:11px;letter-spacing:.08em;color:var(--muted);margin-bottom:10px}.thread-row .body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.75;font-size:16px}.thread-row .report{margin-top:16px}.thread-row .source-card{margin-top:8px}.thread-composer{position:sticky;bottom:8px;z-index:2;background:var(--paper);border:1px solid var(--line);box-shadow:0 8px 30px #233c3810;border-radius:18px;padding:16px;margin-top:16px}.thread-composer textarea{border:0;box-shadow:none;resize:vertical;padding:8px;font-size:16px;min-height:85px;max-height:260px;background:transparent}.thread-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.thread-actions label{margin:0;font-size:10px;color:var(--muted)}.thread-actions select{margin:0;font-size:12px;padding:7px;width:auto;max-width:175px}.thread-actions button{font-size:12px}.thread-actions .primary{margin-left:auto}.thread-options{margin-top:10px;font-size:12px}.thread-options .grid2{max-height:35vh;overflow:auto}.attachment-list{display:flex;flex-wrap:wrap;gap:8px}.attachment-chip{display:inline-flex;align-items:center;gap:8px;font-size:12px;padding:6px 10px;background:var(--soft);border-radius:8px}.attachment-chip button{padding:2px 7px}.chat-photo{max-width:100%;height:auto;border-radius:12px;display:block;margin:16px 0}.thread-file{font-size:12px;color:var(--muted);margin:5px 0}.chat-progress{border-left:3px solid var(--green);padding-left:12px}dialog{border:1px solid var(--line);border-radius:18px;background:var(--paper);color:var(--ink);max-width:620px;width:calc(100% - 24px);max-height:90vh;overflow:auto;padding:26px}dialog::backdrop{background:#10191680}.dialog-close{text-align:right}#mobileChats{display:none}#images .settings-grid{grid-template-columns:1fr}#images .settings-grid>article:first-child,#imageResult{display:none}#legacyChat{display:none!important}.topbar{font-size:12px}.thread-row .report-discuss{display:none}.thread-row details pre{white-space:pre-wrap}#networkResult{margin-top:18px;overflow-wrap:anywhere}
@media(max-width:980px){main{margin-left:0;padding:16px}.sidebar{position:fixed;display:flex;transform:translateX(-100%);width:270px;height:100dvh;inset:0 auto 0 0;background:var(--paper);z-index:20;transition:transform .15s}.sidebar.mobile-open{transform:translateX(0);box-shadow:10px 0 100px #0008}.sidebar .chat-list{min-height:120px}.sidebar nav{display:grid}.sidebar-bottom{display:block}#mobileChats{display:inline-block}.chat-heading .actions button{padding:6px;font-size:11px}.chat-heading h1{font-size:18px}.thread-empty h2{font-size:28px}.thread-row.user{margin-left:5%}.thread-composer{bottom:3px;padding:10px}.thread-actions{gap:6px}.thread-actions button{padding:8px}.thread-options summary{padding:4px}.thread-row .body{font-size:15px}}

#userList .file-card{flex-wrap:wrap;gap:12px}#userList form{flex-basis:100%;max-width:560px}#users .settings-grid{align-items:start}#users li{margin-bottom:12px}

#photoEditDialog{max-width:1000px}.mask-stage{position:relative;max-width:100%;line-height:0}.mask-stage img{width:100%;height:auto}.mask-stage canvas{position:absolute;inset:0;width:100%;height:100%;opacity:.55;touch-action:none;cursor:crosshair}.source-links{font-size:13px;padding:12px 0;overflow-wrap:anywhere}.body code{background:var(--soft);padding:2px 4px;border-radius:4px}
@media(max-width:700px){main{padding:0 12px 24px;margin-left:0}.thread-actions{gap:6px}.thread-actions button{min-height:42px}.thread-row.user{margin-left:4%}.thread-composer{bottom:0}.chat-heading{position:static}.thread-row .body{font-size:16px}.mask-stage{max-height:65vh;overflow:hidden}dialog{padding:14px}.settings-grid{display:block}.settings-grid>article{margin-bottom:14px}}

#closeSidebar,#sidebarBackdrop{display:none}#registrationPanel{margin-top:20px}#registrationPanel summary{cursor:pointer;padding:12px 0}#registrationStatus{white-space:pre-wrap}
@media(max-width:980px){
 body.mobile-menu-open{overflow:hidden}
 .sidebar{z-index:101;width:min(320px,calc(100vw - 56px));height:100dvh;max-height:100dvh;overflow-y:auto;overscroll-behavior:contain;padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom))}
 #closeSidebar{display:block;align-self:flex-end;min-height:44px;flex-shrink:0}
 #sidebarBackdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:100;background:#0006;border:0;border-radius:0;width:100%;height:100dvh;padding:0}
 .sidebar .chat-list{min-height:60px}.sidebar .brand{flex-shrink:0}
 .sidebar input,.thread-composer input,.thread-composer select,.auth input{font-size:16px}
 .thread-options .grid2{grid-template-columns:1fr}.thread-actions button{min-height:44px}
}
/* 0.11: compact conversation controls */
.chat-heading{justify-content:space-between;flex-wrap:nowrap}.chat-heading h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:18px}.chat-more{position:relative}.chat-more>summary{list-style:none;font-size:26px;width:42px;height:42px;display:grid;place-items:center;cursor:pointer;border-radius:50%}.chat-more summary::-webkit-details-marker,.composer-tools summary::-webkit-details-marker{display:none}.chat-more .actions{position:absolute;right:0;top:46px;min-width:185px;background:var(--paper);border:1px solid var(--line);padding:8px;box-shadow:0 10px 35px #0002;border-radius:16px;display:flex;flex-direction:column;z-index:10}.chat-more .actions button{width:100%;text-align:left;padding:12px;border:0;background:transparent}.thread-composer{padding:10px 12px;border-radius:26px;margin:12px 0 0;bottom:10px}.thread-composer textarea{min-height:44px;max-height:150px;resize:none;margin:0;padding:10px 8px;line-height:1.5}.thread-actions{flex-wrap:nowrap;min-height:44px;gap:10px}.composer-tools{position:relative;flex-shrink:0}.composer-tools>summary{list-style:none;width:42px;height:42px;display:grid;place-items:center;font-size:29px;line-height:1;font-weight:400;cursor:pointer;border-radius:50%;color:var(--ink)}.composer-tools>summary:hover,.chat-more>summary:hover{background:var(--soft)}.composer-popover{position:absolute;left:0;bottom:52px;background:var(--paper);border:1px solid var(--line);border-radius:18px;box-shadow:0 12px 40px #0002;padding:10px;width:280px;max-width:calc(100vw - 48px);max-height:55dvh;overflow-y:auto;z-index:15;display:flex;flex-direction:column;gap:4px}.composer-popover button{border:0;text-align:left;background:transparent;padding:12px;font-size:14px}.composer-popover button:hover{background:var(--soft)}.composer-popover label{display:grid;grid-template-columns:1fr 160px;align-items:center;gap:8px;font-size:13px;padding:8px}.composer-popover select{max-width:160px;width:100%;font-size:14px;padding:8px}.composer-hint{font-size:12px;color:var(--muted);flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#threadSend{width:42px;height:42px;min-height:42px;flex-shrink:0;border-radius:50%;padding:0;font-size:24px;line-height:1;margin-left:auto}#threadStatus:empty{display:none}#threadStatus{font-size:12px;margin:6px 8px 0;line-height:1.4}.thread-options{border-top:1px solid var(--line);padding-top:10px;max-height:40dvh;overflow:auto}.attachment-list:empty{display:none}.attachment-chip{max-width:100%;padding:4px 8px}.attachment-chip button[data-preview]{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:0;background:transparent}.thread-empty{margin:5vh auto 2vh;max-width:580px}.thread-empty .eyebrow{display:none}.thread-empty h2{font-size:30px;margin:0 0 12px}.thread-empty .lead{font-size:16px;line-height:1.5;color:var(--muted)}.thread-empty .actions{gap:8px}.thread-empty .actions button{font-size:13px;padding:9px 12px}.chat-photo{cursor:zoom-in}.chat-photo:focus-visible,summary:focus-visible{outline:2px solid var(--green);outline-offset:3px}#photoViewer{max-width:1100px;padding:14px}#viewerImage{display:block;max-width:100%;max-height:70dvh;width:auto;height:auto;object-fit:contain;margin:auto;border-radius:10px}.viewer-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;font-size:14px}.viewer-header button{font-size:24px;padding:0;width:44px;height:44px;border:0}.viewer-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:12px}.viewer-actions button{min-height:44px;font-size:14px;padding:10px 14px}.mask-stage{max-height:none!important;overflow:visible!important}#toast{max-width:min(440px,calc(100vw - 24px));padding:10px 14px;font-size:13px;line-height:1.4}
@media(max-width:700px){main{padding:0 12px 12px}.topbar{min-height:46px;padding:6px 0}.chat-heading{padding:4px 0}.chat-heading h1{font-size:16px}.thread-messages{min-height:30dvh;padding:8px 0}.thread-empty{margin:5vh auto 3vh}.thread-empty h2{font-size:26px}.thread-empty .lead{font-size:14px}.thread-empty .actions{display:none}.thread-composer{bottom:0;padding:8px;border-radius:24px;margin-top:8px}.thread-composer textarea{font-size:16px;min-height:42px}.thread-actions{min-height:42px}.composer-popover label{font-size:13px}.composer-popover select{font-size:16px}.viewer-actions{gap:6px}.viewer-actions button{font-size:13px;padding:8px 10px}#photoViewer{padding:10px;width:calc(100% - 16px)}#viewerImage{max-height:65dvh}.thread-options .grid2{max-height:27dvh}.thread-row{padding:14px 0}}
.chat-result>.actions{display:none}.chat-result>.micro{font-size:11px;line-height:1.4;color:var(--muted)}.thread-row .speaker{font-size:10px}.thread-row.user{border-radius:20px}.thread-composer .attachment-chip button{min-height:32px}#previewChatReference{border:0;background:transparent}
/* 0.11.1 — viewport-height chat, independently scrolling messages */
body.chat-layout{overflow:hidden}body.chat-layout main{position:fixed;top:var(--chat-top,0px);left:270px;right:0;height:var(--chat-height,100dvh);margin:0;padding:0 28px 10px;display:flex;flex-direction:column;overflow:hidden;min-height:0}body.chat-layout .topbar{flex:0 0 auto;margin-bottom:0;padding:8px 0}body.chat-layout #assistant{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;margin:0 auto}body.chat-layout .chat-heading{flex:0 0 auto;position:relative;padding:6px 0}body.chat-layout .thread-messages{flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:12px 0;scroll-padding-bottom:16px;-webkit-overflow-scrolling:touch}body.chat-layout .thread-composer{position:relative;bottom:auto;flex:0 0 auto;margin:8px 0 0}body.chat-layout .thread-empty{margin:clamp(16px,6vh,60px) auto 16px}body.chat-layout .thread-options{max-height:25vh}body.chat-layout .thread-composer textarea{max-height:min(150px,22vh)}
.password-field{display:block;position:relative;width:100%}.password-field input{padding-right:52px!important}.password-eye{position:absolute;right:3px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;background:transparent;color:var(--muted);border-radius:8px}.password-eye:hover{background:var(--soft)}.password-eye .eye-slash{display:none}.password-eye[aria-pressed="true"] .eye-slash{display:block}
@media(max-width:980px){body.chat-layout main{left:0;padding:0 12px max(8px,env(safe-area-inset-bottom))}body.chat-layout .topbar{min-height:44px;padding:4px 0}body.chat-layout .chat-heading{padding:2px 0}body.chat-layout .thread-empty h2{font-size:25px}body.chat-layout .thread-messages{padding-top:8px}}
@media(max-height:500px){body.chat-layout .topbar{display:none}body.chat-layout .chat-heading{min-height:34px}body.chat-layout .thread-empty{margin:8px auto}body.chat-layout .thread-empty .lead{display:none}body.chat-layout .thread-composer{margin-top:4px}}

/* Progress visible next to composer and in current answer. No fictional percent. */
#threadStatus{color:var(--ink);font-size:13px;min-height:0}
#threadStatus.task-busy:before{content:"";display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--green);margin-right:8px;animation:aveon-status-pulse 1.2s ease-in-out infinite}
@keyframes aveon-status-pulse{50%{opacity:.3}}
@media(prefers-reduced-motion:reduce){#threadStatus.task-busy:before{animation:none}}
