:root {--paper:#262626;--surface:#30312c;--border:#ffffff14;--ink:#eeeee2;--muted:#a8ac9b;--accent:#FFE135;--soft:#ffe1350c;--danger:#eeb09f;}
body {background:#1e201c;}
input,textarea {background:#252722;border-color:#ffffff1c;color:#eeeee2;}
input::placeholder,textarea::placeholder {color:#7d8571;}
.button {border-radius:11px;min-height:44px;}
.button.primary {box-shadow:0 4px 18px #ffe13508;}
.button.primary:hover {box-shadow:0 5px 22px #ffe13518;}
.button.secondary {background:#ffffff07;border-color:#ffffff1a;}
.icon-button {border-radius:10px;}
.icon-button:hover {background:#ffe1350b;}
.brand {color:#ffe135;letter-spacing:-1px;}
.app-shell {max-width:1560px;margin:16px auto;height:calc(100svh - 32px);border-radius:20px;border-color:#ffffff12;box-shadow:0 16px 80px #0003;background:#252722;}
.sidebar {background:#20221e;border-color:#ffffff0d;padding:27px 16px 0;}
.sidebar .brand {font-size:24px;}
.sidebar .brand-mark {width:30px;height:30px;}
.sidebar-heading {padding:29px 10px 18px;}
.sidebar-heading .eyebrow {display:none;}
.sidebar-heading h2 {font-size:21px;color:#eeeee2;font-weight:550;}
.search-field {background:#2a2d25;border-color:#ffffff0e;border-radius:11px;margin-bottom:16px;}
.search-field input {font-size:12px;}
.chat-row {padding:14px 10px;border-radius:12px;gap:12px;margin-bottom:5px;transition:background .18s,transform .18s,border-color .18s;}
.chat-row:hover {background:#ffffff04;transform:translateX(2px);}
.chat-row.active {background:#ffe1350a;border-color:#ffe13524;}
.chat-row-heading strong {font-weight:550;font-size:13px;}
.chat-preview {font-size:11px;color:#969e86;}
.chat-row-heading time {font-size:9px;color:#929b84;}
.avatar {border-radius:13px;}
.profile {border-color:#ffffff0b;}
.profile-text strong {font-weight:500;color:#e4e6d6;}
.profile-text span {font-size:10px;color:#8b947d;}
#open-operations {display:flex;align-items:center;gap:10px;padding:12px 14px;border:1px solid #ffe13525;border-radius:11px;background:#ffe13509;color:#ffe135;font-size:12px;margin:12px 5px 0;}
#open-operations svg {width:17px;height:17px;fill:none;stroke:currentColor;}
#open-operations::after {content:'↗';margin-left:auto;opacity:.6;}
#open-operations:hover {background:#ffe13511;}
.sidebar-diagnostics:not(#open-operations) {font-size:10px;color:#7e896f;margin-bottom:4px;}
.workspace {background:#262823;}
.chat-header {background:#292c25;border-bottom-color:#ffffff0d;padding:18px 26px;min-height:82px;}
.chat-heading h2 {font-size:16px;color:#eeeee2;font-weight:550;}
.chat-heading span {font-size:10px;color:#8e9a7d;}
.message-scroll {background-color:#252722;background-image:url('/assets/pack/patterns/chat-tile.svg');background-size:300px 240px;padding:12px 28px 26px;}
.message-list {gap:13px;}
.message-bubble {background:#32362b;border:1px solid #ffffff0d;border-radius:15px 15px 15px 4px;padding:12px 15px 9px;box-shadow:0 3px 8px #0000000a;}
.message-text {font-size:14px;line-height:1.65;color:#e8ebdf;}
.mine .message-bubble {background:#d6c54f;border-color:#d6c54f;border-radius:15px 15px 4px 15px;}
.mine .message-text {color:#282c1e;}
.message-time {font-size:9px;color:#929d7f;}
.mine .message-time {color:#655e2d;}
.message-author {font-size:10px;color:#b2c397;}
.date-separator {background:#ffffff05;border-color:#ffffff0b;color:#8c9879;font-size:9px;padding:5px 11px;backdrop-filter:blur(8px);}
.composer {background:#292c25;border-color:#ffffff0d;padding:16px 24px 14px;}
.composer textarea {background:#22251e;border-color:#ffffff17;border-radius:12px;line-height:1.5;}
.composer textarea:focus {border-color:#b3a739;box-shadow:0 0 0 3px #ffe13507;}
.composer-note {font-size:9px;color:#929e81;}
.send-button {border-radius:12px;}
.send-button:disabled {background:#3b4130;color:#7d896b;}
#pick-file {border:1px solid #ffffff13;background:#ffffff03;border-radius:11px;}
.attachment-card {border-radius:12px;padding:5px;background:#00000006;}
.attachment-preview {border-radius:10px;}
.attachment-name {font-size:11px;}
.attachment-size {font-size:9px;}
.processing-link {font-size:10px;text-decoration:none;border:1px solid currentColor;border-radius:7px;padding:6px 8px;opacity:.7;}
.processing-link:hover {opacity:1;}
.reaction-button,.reaction-picker {background:#2a2e24;border-color:#454e37;border-radius:9px;font-size:11px;}
.reaction-button[aria-pressed=true] {border-color:#b6a43c;background:#ffe1350d;}
.welcome {background:radial-gradient(ellipse at 50% 45%,#ffe13506,transparent 65%);}
.welcome-illustration {width:300px;max-width:75%;filter:drop-shadow(0 18px 25px #0002);}
.welcome h1 {font-size:27px;font-weight:550;letter-spacing:-.8px;color:#eceee0;margin:12px 0;}
.welcome p {font-size:12px;color:#909a80;}
.empty-conversation img {width:180px!important;height:auto;filter:drop-shadow(0 12px 16px #0002);}
.empty-conversation p {font-size:14px;font-weight:500;color:#dce2cf;}
.empty-conversation span {font-size:11px;color:#8a9679;}
.auth-layout {max-width:1440px;}
.intro {background:radial-gradient(ellipse at 40% 60%,#ffe13507,transparent 65%),#242721;}
.intro::before {border-color:#ffe1350e;}
.intro-copy h1 {font-family:inherit;font-size:43px;font-weight:550;letter-spacing:-1.5px;line-height:1.2;color:#eaeede;}
.auth-side {background:#2a2d26;border-color:#ffffff0d;}
.auth-switch {background:#20231d;border-color:#ffffff12;border-radius:12px;margin-bottom:34px;}
.auth-switch button {transition:background .25s,color .25s;}
.auth-card h2 {font-size:31px;letter-spacing:-1px;font-weight:550;color:#ecefe1;}
.auth-card form {gap:19px;}
.auth-card label {font-size:11px;color:#b8c1a8;}
.auth-card input {padding:14px;background:#22251e;border-color:#ffffff19;border-radius:10px;}
.auth-card input:focus {border-color:#b7a940;}
.auth-bottom {color:#7f8b6f;}
dialog:not(.ops-panel):not(.image-viewer) {background:#292d24;border-color:#ffffff17;border-radius:18px;color:#e7ecda;box-shadow:0 25px 90px #0007;}
dialog::backdrop {background:#10130db3;}
.dialog-heading h2 {font-size:21px;font-weight:550;letter-spacing:-.5px;}
.dialog-heading {border-color:#ffffff10;}
.processing-panel {width:min(950px,94vw);}
.processing-panel section {padding:26px;}
.processing-panel header {padding-bottom:17px;border-bottom:1px solid #ffffff0d;}
.processing-panel h2 {font-size:19px;font-weight:550;}
.processing-panel h3 {color:#b8c5a4;font-weight:500;}
.processing-summary {padding:8px 0;}
.processing-summary strong {font-size:13px;}
.processing-badge {font-size:11px;padding:5px 9px;border:1px solid #ffe13525;border-radius:7px;background:#ffe13507;}
.processing-results article {background:#22261d;border-color:#ffffff0e;}
.processing-results img {height:170px;border-radius:9px;background:#1d2118;}
.processing-results strong {font-size:12px;}
.processing-results a {border-color:#ffffff15;transition:background .18s;}
.processing-results a:hover {background:#ffe1350a;}
.toast {border-radius:11px;box-shadow:0 10px 40px #0004;}
@media(min-width:721px){.app-shell{grid-template-columns:300px minmax(0,1fr);}}
@media(min-width:721px) and (max-width:1100px){.app-shell{margin:12px;height:calc(100svh - 24px);grid-template-columns:270px minmax(0,1fr);}}
@media(max-width:720px){.app-shell{margin:0;height:100svh;border:0;border-radius:0;}.sidebar{padding:24px 14px 0;}.sidebar-heading{padding-top:24px;}.chat-header{padding:14px 16px;min-height:74px;}.message-scroll{padding:8px 15px 20px;}.composer{padding:12px 14px max(12px,env(safe-area-inset-bottom));}.message{max-width:88%;}.message-text{font-size:14px;}.auth-card h2{font-size:28px;}.processing-panel section{padding:17px;}.processing-panel h2{font-size:17px;}.processing-results img{height:150px;}}
@media(prefers-reduced-motion:no-preference){dialog[open]:not(.ops-panel):not(.image-viewer){animation:dialog-appear .22s cubic-bezier(.2,.7,.3,1);} .welcome-illustration{animation:welcome-appear .55s ease-out;} .chat-row:active{transform:scale(.985);} .ops-panel[open] .ops-metrics{animation:welcome-appear .35s ease-out;} }
@keyframes dialog-appear{from{opacity:0;transform:translateY(8px) scale(.985);}to{opacity:1;transform:none;}}
@keyframes welcome-appear{from{opacity:0;transform:translateY(9px);}to{opacity:1;transform:none;}}
@media(prefers-reduced-motion:reduce){.chat-row,.button,.icon-button,.processing-results a,.auth-switch button{transition:none;}.chat-row:hover{transform:none;}}
.search-field {position:relative;}
.search-field input[type=search]::-webkit-search-cancel-button {-webkit-appearance:none;}
.search-clear {display:grid;place-items:center;width:24px;height:24px;padding:0;border:0;border-radius:7px;background:#ffffff0b;color:#aeb8a3;font-size:18px;line-height:1;flex-shrink:0;}
.search-clear:hover {background:#ffe13518;color:#ffe135;}
.message {position:relative;}
.message-copy {position:absolute;right:-34px;bottom:2px;display:grid;place-items:center;width:28px;height:28px;border:1px solid #ffffff10;border-radius:8px;background:#2b2e27;color:#b2bca5;opacity:0;pointer-events:none;transition:opacity .18s,background .18s;}
.message-copy svg {width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
.message.mine .message-copy {right:auto;left:-34px;}
.message:hover .message-copy,.message:focus-within .message-copy {opacity:1;pointer-events:auto;}
.message-copy:hover {color:#ffe135;background:#353a2d;}
.conversation {position:relative;}
.conversation.is-dragging-file::after {content:'Отпустите изображение';position:absolute;z-index:6;inset:12px;display:grid;place-items:center;border:2px dashed #ffe13599;border-radius:16px;background:#20231def;color:#ffe135;font-size:16px;font-weight:550;pointer-events:none;}
@media(hover:none) {.message-copy {opacity:.8;pointer-events:auto;} .reaction-picker {opacity:.75;}}
@media(max-width:720px) {.message {max-width:calc(100% - 36px);}.message-copy {opacity:.8;pointer-events:auto;}}
@media(prefers-reduced-motion:reduce) {.message-copy {transition:none;}}
.auth-card .wide > .button-label {font-size:13px;line-height:1.4;}
.message-copy.is-copied {color:#ffe135;border-color:#ffe13550;background:#ffe1350d;}
@media(prefers-reduced-motion:no-preference) {
  .messages-loading i {animation:message-loading 1.5s ease-in-out infinite alternate;}
  .messages-loading i:nth-child(2) {animation-delay:.18s;}
  .messages-loading i:nth-child(3) {animation-delay:.36s;}
  .attachment-preview img {transition:opacity .28s ease;}
  .draft-image {animation:dialog-appear .22s ease-out;}
}
@keyframes message-loading {from{opacity:.45}to{opacity:1}}
