.work-album-viewer{width:min(474px,calc(100vw - 24px))}
.work-album-originals>.work-message{width:100%;max-width:100%;box-sizing:border-box}
.work-chat-compose textarea{min-width:0}
/* Match the action column to the editor instead of leaving an empty strip above it. */
.work-chat-compose{align-items:stretch;container:chat-compose / inline-size}
.work-chat-compose .chat-compose-actions{display:grid;grid-template-rows:minmax(44px,1fr) minmax(44px,1fr);gap:6px}
.work-chat-compose .chat-compose-tools{gap:4px;align-items:stretch}
.work-chat-compose .chat-compose-tools .btn{align-self:stretch;min-width:40px;width:40px;min-height:44px;height:auto;display:flex;align-items:center;justify-content:center;padding:8px}
.work-chat-compose .chat-compose-tools svg{width:22px;height:22px}
.work-chat-compose [data-chat-send]{min-height:44px;font-size:13px}
@container chat-compose (max-width:440px){
 .work-chat-compose textarea{flex-basis:100%;width:100%}
 .work-chat-compose .chat-compose-actions{display:flex;flex-direction:row;align-items:stretch;justify-content:space-between;width:100%}
}
@media(max-width:980px){
 .work-chat-compose .chat-compose-actions{display:flex;align-items:stretch}
 .work-chat-compose .chat-compose-tools .btn{width:44px;min-width:44px;height:44px}
}
.work-person .work-field{margin:8px 0;gap:5px}
.work-person .work-save:empty{display:none}
.work-person-links:empty{display:none}
.work-person-links{margin:6px 0;display:flex;align-items:center;gap:6px;flex-wrap:nowrap;min-width:0}
.work-contact-chip{display:inline-flex;align-items:center;gap:5px;min-width:0;max-width:60%;padding:4px 5px;border:1px solid var(--line);border-radius:7px;background:var(--bg);color:var(--text);font:inherit;font-size:11px;white-space:nowrap;cursor:pointer;text-decoration:none;box-sizing:border-box}
.work-contact-chip span{overflow:hidden;text-overflow:ellipsis;min-width:0}.work-contact-chip svg{width:14px;height:14px;flex:none}.work-contact-chip:disabled{opacity:1;cursor:default}
.work-contact-chip[data-work-phone]{flex:0 0 auto;max-width:68%}.work-contact-chip:only-child{max-width:100%}.work-person-links>a{flex:1}
/* ⚠️ Галочка «сохранить имя» стоит СРАЗУ У ИМЕНИ (п. 186): в сетке
   она уезжала в правый угол шапки, и было не видно, к чему она. Поле
   занимает свободное место, галочка жмётся к нему, номер — следом. */
.work-title-block{display:flex;align-items:center;gap:6px;min-width:0;flex:1}
/* ⚠️ Поле НЕ растягиваем (п. 186): при `flex:1 1 auto` оно занимало всю
   шапку, и галочка «сохранить» оказывалась у конверта, в другом конце.
   Ширину задаёт `size` по длине имени; `field-sizing` подгоняет её
   точно по тексту там, где браузер его понимает. */
.work-title-block .work-title-input{flex:0 1 auto;min-width:0;width:auto;
  max-width:100%;field-sizing:content}
.work-title-block .work-title-save{flex:0 0 auto;margin:0}
.work-title-block .work-deal-number{flex:0 0 auto;margin-left:4px}
.screen:has(>.search-card-page),.screen:has(>.search-card-host){display:flex;flex-direction:column;overflow:hidden;padding:12px}
.search-card-host{display:flex;flex:1;min-height:0;min-width:0}
.search-card-page,.work-drawer.search-card-page{position:relative;inset:auto;transform:none;width:100%;height:100%;min-height:0;min-width:0;flex:1;display:flex;flex-direction:column;overflow:hidden;background:var(--page);border:1px solid var(--line);border-radius:12px;box-shadow:none;z-index:auto;animation:none;box-sizing:border-box}
.search-card-page .listing-editor-head h1{flex:1;min-width:0}
.search-object-read>.dlg__body{overflow:auto;flex:1;min-height:0}
.search-object-read>.lead__head{padding:12px;flex:none}
@media(max-width:980px){
  .screen:has(>.search-card-page),.screen:has(>.search-card-host){padding:8px 8px var(--mobile-dock-space)}
}
.work-contact-name-row{display:grid;grid-template-columns:minmax(0,1fr) 44px 44px;gap:8px;align-items:stretch}
.work-contact-phone{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:8px;align-items:stretch;margin:8px 0}
.work-contact-phone:has(>button:only-child){grid-template-columns:minmax(0,1fr)}
.work-contact-name-row input,.work-contact-phone input{width:100%;min-width:0;box-sizing:border-box;height:44px}
.work-contact-phone input{font:inherit;color:var(--text);background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:10px 12px}
.work-person .work-contact-action{display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;min-width:44px;height:44px;padding:10px;border-radius:8px}
.work-contact-action svg,.work-phone-value svg{width:18px;height:18px;flex:none}
.work-contact-phone .work-phone-value{display:flex;align-items:center;justify-content:flex-start;gap:8px;min-width:0;height:44px;text-align:left;padding:10px 12px;font-size:inherit;cursor:copy}
.work-phone-value span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.work-deal-number{font-family:var(--mono,ui-monospace,monospace);font-size:11px;line-height:14px;font-weight:500;color:var(--text2);padding-left:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dialogs-summary{padding:10px 12px}
.dialogs-summary .work-info-scroll{padding-top:0}
.chat-jump-row{height:0;flex:none;position:relative;z-index:2}
.chat-jump{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);width:44px;height:44px;padding:10px;border-radius:50%;background:var(--bg);box-shadow:0 2px 8px #0002;display:flex;align-items:center;justify-content:center}
.chat-jump[hidden]{display:none}.chat-jump svg{width:24px;height:24px;flex:none}
.dialogs-head .dialogs-back{display:inline-flex;align-items:center;justify-content:center}
.work-post-code{font:inherit;font-family:var(--mono,ui-monospace,monospace);font-weight:600;
  padding:1px 4px;border:0;border-radius:4px;background:color-mix(in srgb,currentColor 7%,transparent);cursor:pointer}
.work-message-text .work-post-code{color:inherit;text-decoration:underline;text-underline-offset:3px}
@media(max-width:980px){
  .chat-emoji-grid{grid-template-columns:repeat(auto-fit,minmax(44px,1fr));gap:7px}
  .chat-emoji-grid .btn{font-size:28px;line-height:1;min-width:44px;min-height:46px;padding:6px}
  .work-message-reaction{font-size:23px;min-width:40px;min-height:36px}
}
