:root{color-scheme:light;--paper:#f4f2ea;--ink:#283e33;--muted:#667268;--line:#d9ddd2;--green:#315544;--pink:#b37683;--app-height:100dvh;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--paper)}*{box-sizing:border-box}body{margin:0}button,textarea,select{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}button,a,select,textarea{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #9b6678;outline-offset:4px}[hidden]{display:none!important}.app{width:min(100%,1060px);height:var(--app-height);margin:auto;display:flex;flex-direction:column;padding:0 42px}.header{min-height:91px;display:flex;align-items:center;gap:22px;border-bottom:1px solid var(--line);flex-shrink:0}.brand{display:flex;align-items:center;gap:9px;text-decoration:none;color:var(--ink);font-family:Georgia,serif;font-size:27px;letter-spacing:-1px}.brand svg{width:38px;height:38px}.brand small{font:12px ui-sans-serif,system-ui;letter-spacing:0;border:1px solid var(--line);border-radius:5px;padding:4px 5px;margin-left:4px;color:var(--muted)}.local-badge{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:6px}.local-badge span{width:6px;height:6px;background:#709776;border-radius:50%}.header>.button{margin-left:auto}.button{min-height:44px;border:1px solid transparent;border-radius:8px;padding:10px 17px;display:inline-flex;justify-content:center;align-items:center;gap:22px;font-size:14px;font-weight:550;transition:background .2s}.primary{background:var(--green);color:#fff}.primary:hover:enabled{background:#234332}.quiet{background:transparent;color:var(--ink);border-color:var(--line)}.quiet:hover:enabled{background:#e8ebdf}.settings{display:flex;gap:26px;padding:19px 0 15px;align-items:center;flex-shrink:0}.context-field{flex-shrink:0}.context-field label{display:block;font-size:11px;text-transform:uppercase;letter-spacing:1.4px;color:var(--muted);margin-bottom:7px}select{min-width:0;width:270px;max-width:100%;min-height:44px;border:1px solid var(--line);border-radius:7px;background:#fcfcf7;color:var(--ink);padding:10px;font-size:13px}.settings-copy p{font-size:12px;line-height:1.55;margin:0 0 4px;color:var(--muted)}.settings-copy #memory-help{font-size:11px}.settings-copy .memory-warning{color:#80504e}.privacy{margin:0 0 10px;font-size:11px;display:flex;align-items:center;gap:8px;color:#657561;flex-shrink:0}.privacy svg{width:17px;height:17px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.5}.notice{border:1px solid var(--line);border-radius:7px;padding:10px 14px;font-size:12px;margin:5px 0 10px}.error{background:#f2e5df;border:1px solid #d9b5a4;border-radius:9px;padding:16px 18px;margin:12px 0;flex-shrink:0}.error h2{font-size:15px;margin:0 0 6px}.error p{font-size:13px;line-height:1.55;margin:0 0 13px;overflow-wrap:anywhere}.error-actions{display:flex;gap:8px;flex-wrap:wrap}.messages{overflow:auto;flex:1;min-height:0;overscroll-behavior:contain;padding:15px 0;scrollbar-width:thin}.welcome{margin:auto;max-width:680px;padding:38px 0 34px;text-align:center}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--muted);font-weight:550}.welcome h1{font-family:Georgia,"Times New Roman",serif;font-size:clamp(34px,4.6vw,57px);font-weight:400;line-height:1.15;letter-spacing:-1.6px;margin:22px 0 20px}.welcome h1 em{font-weight:400;color:#65806b}.welcome>p{font-size:14px;line-height:1.7;color:var(--muted)}.setup{margin-top:28px}.setup>.button{min-width:222px;min-height:49px}.setup p{font-size:11px;line-height:1.65;margin-top:13px;color:var(--muted)}.suggestions{display:flex;gap:10px;margin-top:32px}.suggestions button{background:transparent;border:1px solid var(--line);border-radius:8px;min-height:56px;padding:12px 14px;flex:1;text-align:left;color:var(--ink);font-size:12px;display:flex;justify-content:space-between;gap:12px}.suggestions button:hover{background:#e8ebdf}.message{padding:22px 4px;max-width:850px;margin:auto;border-bottom:1px solid var(--line)}.message .speaker{font-size:11px;font-weight:650;text-transform:uppercase;letter-spacing:1.3px;margin-bottom:10px}.message.user .speaker{color:#987078}.message.assistant .speaker{color:#40624b}.message .content{white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.75}.message.user .content{color:#526255}.message.pending .speaker::after{content:' · отвечает';text-transform:none;letter-spacing:0;font-weight:400;color:var(--muted)}.message.pending .content:empty::before{content:'Думаю…';color:var(--muted);font-size:13px}.message .reply-info{font-size:11px;color:var(--muted);margin-top:10px}.composer-wrap{flex-shrink:0;padding:15px 0 max(13px,env(safe-area-inset-bottom))}#composer{position:relative;display:flex;align-items:flex-end;border:1px solid #c7d0c1;border-radius:12px;background:#fcfcf7;padding:8px;gap:8px}textarea{background:none;border:0;padding:9px 8px;resize:vertical;width:100%;min-height:56px;max-height:180px;line-height:1.55;color:var(--ink);font-size:14px}textarea:focus{outline:0}#composer:focus-within{outline:2px solid #8d9f81;outline-offset:2px}.send{width:44px;min-width:44px;padding:0;font-size:23px}.stop{color:#754e55;background:#eddbe0;white-space:nowrap}.composer-meta{display:flex;justify-content:space-between;gap:10px;font-size:10px;color:var(--muted);margin-top:9px}.disclaimer{text-align:center;font-size:10px;color:#879086;margin:12px 0 0}.sr-only{position:absolute;width:1px;height:1px;padding:0;clip:rect(0,0,0,0);overflow:hidden;white-space:nowrap;border:0}.loader{position:fixed;inset:0;z-index:20;background:var(--paper);display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:auto;padding:30px 20px}.loader-brand{font-family:Georgia,serif;font-size:24px;position:absolute;top:30px;left:35px;letter-spacing:-.7px}.loader-brand span{font:11px system-ui;color:var(--muted);margin-left:4px}.tree-wrap{width:min(520px,90vw);flex-shrink:0}.tree-wrap svg{width:100%;height:auto;overflow:visible;--progress:0;--trunk:0;--branches:0;--leaves:0;--blossoms:0}.earth{opacity:var(--trunk)}.trunk{stroke-dasharray:1;stroke-dashoffset:calc(1 - var(--trunk));transition:stroke-dashoffset .45s}.branches{stroke-dasharray:1;stroke-dashoffset:calc(1 - var(--branches));transition:stroke-dashoffset .45s}.twigs{opacity:var(--branches)}.leaves{opacity:calc(var(--leaves)*.6)}.blossoms,.flowers{opacity:var(--blossoms)}.leaves,.blossoms,.flowers,.earth,.twigs{transition:opacity .4s}.falling{opacity:0}.complete .falling{animation:petals 900ms ease-in both}.complete .falling ellipse:nth-child(2){animation:petals 800ms ease-in 80ms both}.complete .falling ellipse:nth-child(3){animation:petals 850ms ease-in 140ms both}.complete .leaves{animation:leaf-fall 1000ms ease-in both}@keyframes petals{0%{opacity:1;transform:translate(0,0) rotate(0)}100%{opacity:0;transform:translate(28px,110px) rotate(15deg)}}@keyframes leaf-fall{0%{opacity:.6}100%{opacity:.25;transform:translateY(5px)}}.load-copy{text-align:center;width:min(440px,100%)}.load-copy h2{font-family:Georgia,serif;font-weight:400;font-size:27px;line-height:1.25;margin:16px 0 12px}.load-copy>p{font-size:13px;color:var(--muted)}.load-copy>.eyebrow{font-size:10px}.progress-track{height:3px;width:min(310px,100%);background:#d9ddd2;border-radius:4px;margin:24px auto 0;overflow:hidden}.progress-track>span{display:block;background:var(--pink);height:100%;width:0;transition:width .2s}#load-percent{font-variant-numeric:tabular-nums;font-size:11px}.load-copy .load-note{margin-top:27px;font-size:11px}.load-copy>.button{margin-top:13px;font-size:12px}.noscript{position:fixed;bottom:0;background:#f2e5df;padding:20px;width:100%;text-align:center}@media(max-width:700px){.app{padding:0 20px}.header{min-height:76px;gap:8px}.brand{font-size:23px}.brand svg{width:30px}.local-badge{display:none}.header>.button{font-size:12px;padding:9px 11px}.settings{display:block;padding:15px 0 10px}.context-field{display:flex;align-items:center;gap:12px}.context-field label{margin:0}.context-field select{flex:1;max-width:300px}.settings-copy{margin-top:9px}.settings-copy p{font-size:11px;line-height:1.45}.privacy{font-size:10px;line-height:1.5}.welcome{padding:25px 0}.welcome h1{margin:18px 0;font-size:39px}.welcome>p{font-size:12px}.suggestions{flex-direction:column;gap:7px}.suggestions button{min-height:44px}.composer-meta #composer-help{display:none}.message{padding:18px 2px}.message .content{font-size:14px}.composer-wrap{padding-top:10px}.loader-brand{top:22px;left:24px}.loader{padding-top:75px;justify-content:flex-start}.tree-wrap{width:min(460px,95vw)}.load-copy h2{font-size:24px}.load-copy .load-note{margin-top:20px}.error-actions .button{font-size:12px}.stop{padding:10px;font-size:12px}}@media(max-height:700px) and (min-width:701px){.welcome{padding:15px 0}.welcome h1{font-size:40px;margin:14px 0}.tree-wrap{width:380px}.loader-brand{top:20px}.settings{padding:12px 0}.header{min-height:70px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* VisualViewport can shrink under the keyboard while CSS layout-viewport height stays tall. */
:root[data-compact="true"] .header{min-height:48px;gap:8px}
:root[data-compact="true"] .brand{font-size:20px}
:root[data-compact="true"] .brand svg{width:28px;height:28px}
:root[data-compact="true"] .header>.button{min-height:44px;padding:9px 11px;font-size:12px}
:root[data-compact="true"] .settings{display:none}
:root[data-compact="true"] .privacy{font-size:10px;line-height:1.4;padding-top:7px;margin-bottom:5px}
:root[data-compact="true"] .messages{padding:4px 0}
:root[data-compact="true"] .composer-wrap{padding-top:6px}
:root[data-compact="true"] .disclaimer{display:none}
:root[data-compact="true"] .welcome{padding:10px 0}
:root[data-compact="true"] .welcome h1{font-size:28px;margin:10px 0}
:root[data-compact="true"] .error{max-height:90px;overflow:auto;padding:8px 12px;margin:4px 0}
:root[data-compact="true"] .error h2{font-size:12px}
:root[data-compact="true"] .error p{font-size:11px;margin-bottom:6px}
:root[data-compact="true"] .notice{max-height:45px;overflow:auto;margin:4px 0;padding:5px 10px;font-size:11px}
