/* Главный экран HomeEva — по утверждённому мобильному макету. */
:root{color:#272630;background:#faf7f4}
body{background:#faf7f4;color:#272630}
.topbar{height:82px;max-width:760px;margin:auto;padding:0 24px;border-bottom:0}
.brand{gap:12px;letter-spacing:0;font-size:25px;color:#272630}
.brand-mark{width:51px;height:51px;border-radius:15px;background:linear-gradient(145deg,#f8ddbc,#ad703f);color:white;font:700 42px Georgia,serif}
.brand-word{display:flex;align-items:baseline;flex-wrap:wrap;line-height:1;max-width:200px}
.brand-word>span{color:#b77b49}.brand-word small{display:block;flex-basis:100%;margin-top:6px;color:#777581;font-size:9px;letter-spacing:.18em}
.history-toggle{width:46px;height:46px;padding:10px;border-radius:50%;background:#fffaf6;box-shadow:0 4px 15px #7656391a}
.history-toggle span{display:none}
.history-toggle b{position:absolute;margin:-38px -37px 0 0;background:#b77b49;color:white}
main{width:min(100% - 40px,560px);padding:32px 0 40px}
.intro{position:relative}.intro:before{content:"";position:absolute;z-index:-1;inset:16px -30px auto;height:165px;background:radial-gradient(ellipse at center,#f7e7d7 0,transparent 70%)}
.eva-portrait{width:128px;height:128px;margin:0 auto 20px;border-radius:50%;border:4px solid #fff;background-color:#ead4c0;background-image:url('design/reference/Светлый интерфейс HomeEva_ дом под контролем.png');background-repeat:no-repeat;background-size:1008px 672px;background-position:-250px -110px;box-shadow:0 7px 24px #a1795633}
.intro h1{font-size:clamp(32px,6vw,46px);font-weight:750;letter-spacing:-.035em;line-height:1.1;color:#292831;margin:0 0 12px}.intro h1 span{color:#ae7446}
.lead{max-width:410px;font-size:16px;line-height:1.45;color:#55525a}.intro-title{font-size:23px;letter-spacing:-.025em;margin:25px 0 18px}
.start-actions{display:grid;grid-template-columns:1fr 1fr;gap:14px}.start-action{min-height:158px;border:1px solid #efe3d9;border-radius:26px;background:#fffaf7;color:#28252a;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;font-size:17px;font-weight:700;line-height:1.15;box-shadow:0 5px 16px #86644517}.start-action svg{width:52px;height:52px}.start-camera{background:linear-gradient(145deg,#f9dfbd,#ad7040);border-color:#ecc89e;color:#fff;box-shadow:0 7px 18px #ac754b40}.start-action:hover{filter:brightness(.97)}
.history-shortcut{width:100%;display:flex;align-items:center;gap:14px;margin:16px 0 0;padding:14px 18px;background:#fffaf7;border:1px solid #efe3d9;border-radius:22px;color:#302a2b;text-align:left;box-shadow:0 4px 14px #86644512}.history-shortcut>span:first-child{font-size:26px;color:#ae7446}.history-shortcut>span:nth-child(2){flex:1}.history-shortcut strong,.history-shortcut small{display:block}.history-shortcut small{font-size:12px;color:#827b79;margin-top:3px}.history-shortcut>span:last-child{font-size:27px;color:#ae7446}
.workspace{margin:18px auto 0}.composer{border-color:#eadfd6;border-radius:22px;box-shadow:0 6px 20px #80654f10}.composer-tools{color:#9a8a7e}.add-button,.eva-avatar{background:#f7eadc;color:#a96d3c}.send-button,.primary{background:#a96f41;border-color:#a96f41;color:#fff}.send-button:hover,.primary:hover{background:#88532d}.secondary{color:#805334;border-color:#e8d6c6}.bubble{color:#302b2b}.message.user{background:#f5e9df}.context-card,.history,.choice-dialog{border-color:#efe1d5;box-shadow:0 6px 25px #76563914}.eyebrow{color:#b0815c}.chip{border-color:#ead8c9;color:#805a40}.chip[aria-pressed=true]{background:#f6e5d4;border-color:#c8976c;color:#714323}.privacy-note{color:#9a8d84}.field input,.field select,.field textarea{border-color:#eadfd6}.history h2,.dialog-title h2{color:#302a2b}
@media(max-width:600px){.topbar{height:74px;padding:0 20px}.brand{font-size:23px}.brand-mark{width:47px;height:47px}.history-toggle span{display:none}main{width:calc(100% - 40px);padding-top:25px}.eva-portrait{width:112px;height:112px;background-size:880px 587px;background-position:-218px -96px}.intro h1{font-size:34px}.lead{font-size:15px}.start-action{min-height:140px;font-size:16px}.start-action svg{width:47px;height:47px}.intro-title{margin:21px 0 15px}.workspace{margin-top:16px}}

/* Светлый фон и контурные акценты. */
:root,body{background:#fdfcfb}
.intro:before{background:radial-gradient(ellipse at center,#faf8f6 0,transparent 70%)}
.header-actions{display:flex;align-items:center;gap:6px}
.header-icon,.history-toggle{width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center;position:relative;padding:9px;border:1px solid #f0ebe6;border-radius:50%;background:#fff;color:#564c47;box-shadow:0 3px 12px #76563910}
.header-icon svg,.history-toggle svg{width:21px;height:21px}.header-icon:disabled{opacity:1;cursor:default;color:#877d76}
.history-toggle b{position:absolute;top:-4px;right:-4px;margin:0;font-size:10px}
.start-camera{background:#fff;border:1.5px solid #bc8c63;color:#9c683f;box-shadow:0 5px 16px #86644517}
.start-gallery{background:#fff}
.send-button{background:#fff;border:1.5px solid #b27a4c;color:#a36b3e}
.send-button:hover{background:#faf4ee;color:#87522d}
@media(max-width:380px){.header-actions{gap:3px}.header-icon,.history-toggle{width:38px;height:38px}.topbar{padding:0 14px}.brand{font-size:20px}.brand-mark{width:43px;height:43px}}

/* Белый экран и навигация по утверждённому макету. */
:root,body{background:#fff}.intro:before{display:none}.brand-mark{position:relative;overflow:visible;width:51px;height:51px;flex:0 0 51px;border-radius:9px;font-family:Georgia,serif;line-height:1}.brand-mark .mark-e{font-size:39px;letter-spacing:-.06em}.brand-mark .mark-va{font-size:20px;letter-spacing:-.08em;align-self:center;margin:11px -13px 0 -2px;text-shadow:0 1px 2px #83563450}.brand{gap:18px}
.eva-portrait{width:148px;height:148px;background-size:1170px 780px;background-position:-290px -128px;margin-bottom:20px}
.quick-nav{display:grid;grid-template-columns:repeat(3,1fr);margin-top:16px;padding:9px 5px;background:#fff;border:1px solid #eee5df;border-radius:23px;box-shadow:0 4px 14px #86644512}.quick-nav button{min-width:0;display:flex;flex-direction:column;align-items:center;gap:5px;padding:3px 4px;border:0;border-right:1px solid #e9d9ca;background:transparent;color:#292831;font-size:13px;font-weight:600}.quick-nav button:last-child{border-right:0}.quick-nav svg{width:24px;height:24px;color:#9e714f}.quick-nav button:disabled{opacity:1;color:#847f7c;cursor:default}.quick-nav button:disabled svg{color:#a69688}
@media(max-width:600px){.brand-mark{width:47px;height:47px;flex-basis:47px;border-radius:8px}.brand-mark .mark-e{font-size:36px}.brand-mark .mark-va{font-size:18px}.eva-portrait{width:142px;height:142px;background-size:1120px 747px;background-position:-278px -122px}}
@media(max-width:380px){.brand-mark{width:43px;height:43px;flex-basis:43px}.brand{gap:15px}.brand-mark .mark-e{font-size:32px}.brand-mark .mark-va{font-size:16px}}
.brand-mark .mark-e{position:absolute;left:7px;top:4px}.brand-mark .mark-va{position:absolute;left:30px;top:23px;margin:0;color:white;white-space:nowrap;text-shadow:0 1px 3px #6d492d}
@media(max-width:380px){.brand-mark .mark-e{left:6px;top:4px}.brand-mark .mark-va{left:25px;top:20px}}

/* Единое пространство диалога и встроенные действия. */
main{width:min(100% - 40px,680px);padding:12px 0 40px}
.smart-chat{background:#fff;border:1px solid #eee9e5;border-radius:24px;box-shadow:0 12px 35px rgba(70,48,32,.055);overflow:hidden}
.chat-heading{display:flex;align-items:center;gap:10px;padding:16px 20px;border-bottom:1px solid #f1ece8;color:#302b2a}
.chat-heading-icon{width:32px;height:32px;display:grid;place-items:center;border:1px solid #e8d4c1;border-radius:11px;color:#a97145;font-size:20px}
.chat-heading strong,.chat-heading small{display:block}.chat-heading strong{font-size:14px}.chat-heading small{margin-top:2px;color:#958a83;font-size:11px}
.intro{text-align:left;padding:22px 20px 0}
.welcome-message{display:flex;align-items:flex-start;gap:12px}
.eva-portrait{flex:none;width:48px;height:48px;margin:0;border:2px solid #fff;background-size:380px 253px;background-position:-94px -42px;box-shadow:0 2px 9px #a1795628}
.welcome-content{flex:1;min-width:0;background:#faf8f6;border:1px solid #f0e9e3;border-radius:6px 21px 21px 21px;padding:20px}
.intro h1{font-size:23px;line-height:1.18;margin:0 0 8px}.lead{margin:0;max-width:none;font-size:14px;line-height:1.55}.intro-title{font-size:16px;margin:18px 0 10px}
.start-actions{gap:8px}.start-action{min-height:85px;border-radius:15px;flex-direction:row;gap:10px;padding:12px;font-size:14px;box-shadow:none;text-align:left}.start-action svg{width:31px;height:31px;flex:none}.start-action span br{display:none}
.quick-nav{margin:14px 0 0 60px;border-radius:16px;box-shadow:none}.quick-nav button{font-size:12px}.quick-nav svg{width:21px;height:21px}
.workspace{max-width:none;margin:0;padding:16px 20px 15px}.conversation{margin-bottom:16px}.composer{border-radius:17px;box-shadow:none}.privacy-note{margin:10px 0 0}
@media(max-width:600px){main{width:100%;padding:0}.smart-chat{min-height:calc(100dvh - 74px);border:0;border-top:1px solid #f0eae5;border-radius:0;box-shadow:none}.chat-heading{padding:14px 18px}.intro{padding:20px 16px 0}.eva-portrait{width:42px;height:42px;background-size:332px 221px;background-position:-82px -36px}.welcome-message{gap:9px}.welcome-content{padding:16px}.intro h1{font-size:21px}.lead{font-size:14px}.intro-title{font-size:15px;margin:16px 0 9px}.start-action{min-height:78px;font-size:13px}.start-action svg{width:27px;height:27px}.quick-nav{margin-left:51px}.workspace{padding:14px 16px}.history{z-index:5}}
@media(max-width:360px){.welcome-content{padding:13px}.start-action{flex-direction:column;gap:4px;text-align:center}.quick-nav{margin-left:0}}

/* Действия и ввод естественно продолжают беседу. */
button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid #bd916e;outline-offset:3px}
.intro{padding-top:26px}.welcome-content{text-align:left}.intro-title{text-align:center}.start-actions{width:100%;max-width:400px;margin:0 auto}.start-action{justify-content:center;text-align:center}.quick-nav{width:min(100%,440px);margin:16px auto 0}
.workspace{padding-top:24px}.composer{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:flex-end;gap:8px;width:min(100%,390px);margin-left:auto;padding:0;border:0;background:transparent;box-shadow:none}
.composer #photo-strip{width:100%;order:-1}.composer textarea{width:100%;min-height:54px;padding:13px 15px;border:1px solid #eee8e3;border-radius:18px 18px 5px 18px;background:#faf8f6;resize:vertical;color:#302b2b;caret-color:#a96f41;text-align:right}.composer textarea::placeholder{color:#a99e97}.composer textarea:focus{outline:2px solid #d9baa0;outline-offset:2px}
.composer-bottom{justify-content:flex-end;gap:8px;width:100%}.composer-tools{display:none}.composer:has(.photo-strip:not([hidden])) .composer-tools{display:flex;margin-right:auto}.composer:has(.photo-strip:not([hidden])) .composer-tools #attachment-hint{display:none}
.composer-actions{gap:7px}.mic{border:1px solid #eee4db;background:#fff;color:#a36b3e;width:40px;height:40px}.send-button{border-radius:50%}.privacy-note{margin-top:14px}
@media(max-width:600px){.intro{padding-top:22px}.quick-nav{width:min(100%,440px);margin:14px auto 0}.workspace{padding-top:20px}.composer{width:min(100%,350px)}.start-action{justify-content:center;text-align:center}}

.composer textarea{resize:none}

/* Действия располагаются под ответом Евы; навигация — поверх чата. */
.start-actions{margin:12px auto 0;max-width:400px}.smart-chat{position:relative;padding-bottom:78px}.quick-nav{position:fixed;z-index:4;left:50%;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(calc(100% - 40px),430px);margin:0;padding:6px 4px;background:rgba(255,255,255,.86);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:0 6px 22px #60463118}.quick-nav button{gap:2px;font-size:11px}.quick-nav svg{width:19px;height:19px}.workspace{padding-bottom:22px}.brand-mark{font-family:inherit}.brand-mark .mark-e{font-family:inherit;font-weight:750;letter-spacing:-.06em}.brand-mark .mark-va{font-family:inherit;font-weight:700;letter-spacing:-.05em}
.dialog-answer{margin:12px 0 12px auto;padding:11px 15px;background:#f5eee7;border-radius:17px 17px 4px 17px;width:fit-content;max-width:88%;white-space:pre-wrap;overflow-wrap:anywhere}.dialog-question{display:flex;gap:10px;margin:14px 0}.dialog-question .bubble{background:#faf8f6;border:1px solid #f0e9e3;padding:13px 15px;border-radius:5px 17px 17px 17px}.dialog-question .bubble p{margin:0;line-height:1.5}.dialog-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.dialog-reminder{font-size:12px;color:#776e68;line-height:1.4}.dialog-review{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:600px){.smart-chat{padding-bottom:80px}.quick-nav{width:calc(100% - 40px);margin:0}.start-actions{margin:12px auto 0}}

/* Компактная карточка дела и собственный элемент выбора файла. */
.case-section{border:1px solid #eee5dd;border-radius:16px;background:#fff;margin:10px 0;overflow:hidden}.case-section>summary{list-style:none;display:flex;align-items:center;gap:12px;padding:13px;cursor:pointer}.case-section>summary::-webkit-details-marker{display:none}.case-section>summary:after{content:"›";margin-left:auto;font-size:25px;color:#aa7953;line-height:1;transition:transform .15s}.case-section[open]>summary:after{transform:rotate(90deg)}.case-section>summary strong,.case-section>summary small{display:block}.case-section>summary strong{color:#302b2a;font-size:14px}.case-section>summary small{color:#91857d;font-size:11px;margin-top:3px}.section-icon{display:grid;place-items:center;flex:none;width:36px;height:36px;border:1px solid #efdfd1;border-radius:12px;color:#a66f45;font-size:20px}.case-section-body{padding:0 14px 14px}.inspection-section{border-top:1px solid #eee5dd;padding-top:0}.case-section .inspection-form{background:#faf8f6}.case-section .field>small{display:block;margin-top:7px}.file-picker{display:inline-flex;align-items:center;gap:7px;padding:9px 13px;margin:9px 0;border:1px solid #d9b99f;border-radius:11px;background:#fff;color:#8f5a35;font-weight:600;cursor:pointer}.file-picker span{font-size:20px;line-height:1}.file-input{position:absolute!important;width:1px!important;height:1px!important;opacity:0;padding:0!important;overflow:hidden}.file-input:focus-visible + .file-picker-status{outline:2px solid #bd916e;outline-offset:3px}.file-picker-status{display:block;font-size:12px;color:#7c7069}.case-footer{margin-top:16px}.context-card>h2{overflow-wrap:anywhere}.context-card details:not(.case-section){margin:14px 0}.context-card details:not(.case-section)>summary{color:#8f5a35;cursor:pointer}.context-card .draft-edit{min-height:240px}.smart-chat .bubble{min-width:0}

/* Дело — самостоятельный экран, а не сообщение Евы. */
.case-view{width:100%;max-width:100%;margin:0 auto}.case-back{display:inline-flex;align-items:center;gap:8px;border:0;background:transparent;color:#8d5e3f;padding:8px 2px;font-weight:650;font-size:14px}.case-back span{font-size:21px;line-height:1}.case-card{width:100%;margin:12px 0 0;background:#fff;padding:20px;border:1px solid #eee5dd;box-shadow:none}.case-card>h2{font-size:22px;line-height:1.25;margin:10px 0}.case-card>p.detail{line-height:1.5}.case-view .case-section{width:100%}@media(max-width:600px){.case-card{padding:15px;border-radius:18px}.case-card>h2{font-size:20px}.case-view .case-section>summary{padding:12px}.case-back{padding:8px 2px}}

/* Ввод сообщения расположен по центру, отправленные ответы остаются справа. */
.composer{margin-left:auto;margin-right:auto}.composer textarea{text-align:left}

/* Ответ пользователя и выбор масштаба. */
.scope-choices{display:flex;justify-content:center;align-items:center;gap:6px;flex-wrap:wrap;margin:12px auto 0}.scope-choices>span{flex-basis:100%;text-align:center;color:#80746c;font-size:11px}.scope-choices button{border:1px solid #e4cbbb;background:white;border-radius:18px;padding:6px 11px;color:#946746;font-size:12px}.scope-choices button[aria-pressed=true]{background:#f8eee5;border-color:#ae7954;color:#76472a}.composer textarea,.dialog-answer,.message.user{background:#fff;border:1px solid #d8bba4}.composer-actions{justify-content:center}.composer-bottom{justify-content:center}.composer:has(.photo-strip:not([hidden])) .composer-tools{margin-right:0}.composer textarea:focus{background:#fdfcfb}

/* Масштаб и действия ввода на одной панели. */
.composer-bottom{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}.scope-choices{display:flex;flex:1;justify-content:flex-start;align-items:center;gap:4px;min-width:0;margin:0}.scope-choices>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.scope-choices button{font-size:11px;padding:6px 8px;white-space:nowrap}.composer-actions{justify-content:flex-end;flex:none}.composer:has(.photo-strip:not([hidden])) .composer-tools{order:3;flex-basis:100%;margin:0}.composer:has(.photo-strip:not([hidden])) .composer-tools #attachment-hint{display:inline}
@media(max-width:360px){.scope-choices button{font-size:10px;padding:6px}.composer-bottom{gap:4px}.composer-actions{gap:4px}}

/* Фото на каждом этапе, итог на полную ширину. */
.smart-chat:has(#conversation:not([hidden])) .composer-tools{display:flex;order:3;flex-basis:100%;margin:0}.smart-chat:has(#conversation:not([hidden])) .composer-tools #attachment-hint{display:inline}.dialog-review-block{display:block;width:100%}.dialog-review-block>.eva-avatar{display:inline-grid;vertical-align:middle;margin:0 0 9px}.dialog-review-block>.bubble{display:block;width:100%;padding:16px;border-radius:18px}.review-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.review-actions .primary{grid-column:1 / -1}.review-actions button{min-width:0;text-align:center}.dialog-review-block [data-review-strip]{margin-top:10px}.brand-mark .mark-h{position:absolute;left:4px;top:3px;font-family:inherit;font-size:40px;font-weight:800;line-height:1;color:#694a33;opacity:.19;pointer-events:none}.brand-mark .mark-e,.brand-mark .mark-va{z-index:1}.brand-mark .mark-e{-webkit-text-stroke:.45px #76573c;text-shadow:0 1px 2px #60442e80}@media(max-width:380px){.brand-mark .mark-h{font-size:34px;left:3px;top:4px}}

.organizations-dialog{width:min(540px,calc(100% - 28px));max-height:min(82dvh,760px);overflow:auto}.organizations-dialog #organization-search{width:100%;border:1px solid #e8ddd4;border-radius:12px;padding:11px;font:inherit}.org-group h3{font-size:14px;margin:18px 0 9px;color:#8b6043}.org-card{padding:12px;margin-bottom:8px;border:1px solid #eee8e2;border-radius:13px;background:#fff}.org-card strong{font-size:14px;line-height:1.35}.org-card p{font-size:12px;line-height:1.45;color:#655d59;margin:6px 0 0;overflow-wrap:anywhere}

.profile-dialog{max-height:85dvh;overflow:auto}.profile-dialog .field{margin:10px 0}.profile-error{min-height:1em;color:#8d4e35;font-size:12px;line-height:1.4}.profile-dialog .primary{width:100%}
