:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:#1a2b40;background:#f6f8fb;font-synthesis:none}*{box-sizing:border-box}html,body{height:100%;margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #94baff;outline-offset:2px}a{color:#347bf6;text-decoration:none}a:hover{text-decoration:underline}[hidden]{display:none!important}
.app{height:100dvh;min-height:0;display:grid;grid-template-columns:78px minmax(350px,414px) minmax(400px,1fr) 410px;grid-template-rows:minmax(0,1fr);overflow:hidden}.rail{background:#142239;display:flex;align-items:center;flex-direction:column;padding:22px 10px;gap:15px}.rail-btn{border:0;background:transparent;color:#96a9c6;border-radius:13px;width:50px;height:50px;display:grid;place-items:center}.rail-btn.active,.rail-btn:hover{background:#273b57;color:white}.icon-inbox{display:block;width:24px;height:19px;border:2px solid currentColor;border-radius:4px;position:relative}.icon-inbox:after{content:"";position:absolute;left:2px;right:2px;bottom:2px;height:6px;border-bottom:2px solid currentColor;border-radius:0 0 5px 5px}.icon-gear{font-size:26px;line-height:1}.rail-spacer{flex:1}.rail-avatar{height:40px;width:40px;border-radius:50%;border:0;background:#607694;color:#fff;font-weight:700}
.inbox{background:white;border-right:1px solid #e4e9ef;display:flex;flex-direction:column;min-width:0}.inbox-top{padding:26px 26px 14px;flex:none}.heading-row{display:flex;align-items:center;gap:12px}.heading-row h1{font-size:29px;letter-spacing:-.8px;line-height:1.1;margin:0}.count-badge{background:#eaf2ff;color:#2e72ee;border-radius:18px;padding:7px 11px;font-size:13px;font-weight:700}.inbox-top p{margin:5px 0 20px;color:#8290a3;font-size:13px}.search-wrap{height:46px;border-radius:11px;background:#f3f5f8;display:flex;align-items:center;padding:0 15px;gap:14px}.search-wrap input{border:0;outline:0;background:transparent;min-width:0;width:100%;font-size:14px;color:#25364c}.search-wrap input::placeholder{color:#a0acbb}.magnify{width:14px;height:14px;border:2px solid #9cacbd;border-radius:50%;display:inline-block;position:relative;flex:none}.magnify:after{content:"";position:absolute;width:8px;height:2px;background:#9cacbd;transform:rotate(45deg);left:10px;top:11px}.filter-row{display:flex;gap:7px;margin-top:17px}.filter{background:#f3f5f8;border:0;border-radius:9px;color:#697a90;padding:10px 13px;font-size:14px;white-space:nowrap}.filter.active{background:#e8f1ff;color:#2b6feb;font-weight:700}.account-filter-row{display:flex;align-items:center;justify-content:space-between;margin-top:15px}.account-filter-row select{color:#7b8b9e;border:0;background:transparent;max-width:90%;font-size:13px;padding:0;cursor:pointer}.status-dot{height:8px;width:8px;border-radius:50%;background:#3dc58c;flex:none}.status-dot.error{background:#f2a743}.chat-list{flex:1;overflow:auto;overscroll-behavior:contain}.chat-row{position:relative;width:100%;min-height:102px;border:0;border-top:1px solid #eef1f4;background:white;text-align:left;padding:18px 25px 16px;display:flex;gap:13px;color:inherit}.chat-row:first-child{border-top:0}.chat-row:hover{background:#f6f9fd}.chat-row.active{background:#edf5ff}.chat-row.active:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:#347bf6}.avatar{width:44px;height:44px;border-radius:50%;background:#648ef0;color:white;display:grid;place-items:center;font-size:14px;font-weight:700;flex:none}.chat-row-main{min-width:0;flex:1}.chat-row-top{display:flex;align-items:center;justify-content:space-between;gap:7px}.chat-row-name{font-weight:700;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-row-time{color:#9ba8b7;font-size:12px;white-space:nowrap}.chat-row-meta{color:#8795a6;font-size:12px;margin:5px 0 9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-row-bottom{display:flex;align-items:center;justify-content:space-between;gap:6px}.chat-row-preview{color:#607187;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.unread-pill{border-radius:50%;background:#347bf6;color:white;font-size:11px;font-weight:700;width:21px;height:21px;display:grid;place-items:center;flex:none}.load-more{border:0;background:#fff;color:#347bf6;padding:13px;font-size:13px}.empty-list{padding:40px 25px;color:#8292a5;text-align:center;font-size:14px}.mobile-tabs{display:none}
.conversation{display:flex;flex-direction:column;min-width:0;background:#f8fafd;position:relative}.empty-chat{display:flex;align-items:center;justify-content:center;flex-direction:column;flex:1;text-align:center;color:#8c9cad}.empty-chat h2{margin:5px 0;color:#40526a;font-size:20px}.empty-chat p{margin:0;font-size:14px}.empty-icon{font-size:45px;color:#c1d0e2}.chat-content{display:flex;flex:1;min-height:0;flex-direction:column}.chat-header{height:92px;background:white;border-bottom:1px solid #e5eaf0;display:flex;align-items:center;gap:14px;padding:0 29px;flex:none}.chat-header-name{display:flex;flex-direction:column;min-width:0;flex:1;gap:4px}.chat-header-name strong{font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-header-name span{color:#8796a8;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.button{border:0;border-radius:10px;padding:12px 19px;font-weight:700;font-size:13px;white-space:nowrap}.button.primary{background:#347bf6;color:white}.button.primary:hover{background:#2469e4}.button.soft{background:#eaf2ff;color:#2e6fea}.button.soft:hover{background:#dfebff}.button.full{width:100%}.mobile-back,.mobile-info,.mobile-item{display:none}.presence-banner{background:#fff8e7;border-bottom:1px solid #f6e5b9;color:#926d1f;padding:9px 30px;font-size:13px;flex:none}.messages{flex:1;overflow:auto;display:flex;flex-direction:column;gap:16px;padding:25px 30px;overscroll-behavior:contain}.day-separator{text-align:center;color:#91a0b1;font-size:12px;align-self:center;background:#edf2f7;border-radius:12px;padding:6px 13px;margin-bottom:5px}.load-older{border:0;background:#edf3f9;color:#577392;padding:8px 15px;border-radius:10px;align-self:center}.bubble{position:relative;max-width:min(76%,490px);padding:15px 18px 22px;border-radius:15px;font-size:15px;line-height:1.5;white-space:pre-wrap;word-break:break-word}.bubble.incoming{align-self:flex-start;background:#fff;border:1px solid #e6ebf1}.bubble.outgoing{align-self:flex-end;background:#e8f2ff}.bubble-meta{position:absolute;right:14px;bottom:5px;color:#9cabba;font-size:10px;white-space:nowrap}.bubble.outgoing .bubble-meta{color:#6698db}.bubble-status{font-size:11px;color:#6b89aa;margin-top:4px;text-align:right;align-self:flex-end}.bubble-status.error{color:#d86464}.media-card{display:flex;align-items:center;gap:13px;border:1px solid #e0e7ef;background:#fff;border-radius:13px;padding:12px;max-width:min(76%,490px);min-width:270px;align-self:flex-start}.media-card.outgoing{align-self:flex-end}.media-symbol{width:65px;height:65px;background:#e1ecf6;border-radius:9px;display:grid;place-items:center;color:#4382ca;font-size:27px;flex:none}.media-description{min-width:0;flex:1}.media-description strong{font-size:14px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-description span{font-size:12px;color:#8795a6;display:block;margin-top:4px}.media-description a{font-size:12px;display:inline-block;margin-top:7px}.compose-placeholder{color:#718298;font-style:italic}.composer{flex:none;background:white;border-top:1px solid #e4eaf0;padding:15px 29px 20px}.quick-replies{display:flex;align-items:center;gap:12px;min-height:35px;margin-bottom:12px}.quick-replies>span{color:#93a0b0;font-size:12px;white-space:nowrap}.quick-replies>div{display:flex;gap:8px;overflow:auto}.template-chip{border:0;background:#f0f3f7;color:#52677e;padding:8px 13px;border-radius:9px;font-size:12px;white-space:nowrap}.template-chip:hover{background:#e6eef8}.compose-box{border:1px solid #cbd6e5;border-radius:13px;padding:12px 15px 10px}.compose-box:focus-within{border-color:#6ea3fb}.compose-box textarea{width:100%;border:0;outline:0;resize:none;min-height:49px;max-height:145px;font-size:15px;color:#1e3147}.compose-box textarea::placeholder{color:#a0adbb}.compose-actions{display:flex;align-items:center;justify-content:space-between}.attach-button{border:0;background:transparent;color:#70839a;font-size:22px;display:flex;align-items:center;gap:8px;padding:0}.attach-button span{font-size:12px}.send-arrow{display:none}
.details{background:white;border-left:1px solid #e3e8ef;overflow:auto}.details-content{padding:29px}.details h2{margin:0 0 18px;font-size:22px;letter-spacing:-.4px}.mobile-only{display:none}.active-banner{background:#eaf7f1;border-radius:10px;color:#348768;font-size:13px;padding:12px 15px}.active-banner:before{content:"";display:inline-block;background:#38c687;width:9px;height:9px;border-radius:50%;margin-right:8px}.section-title{color:#8291a4;font-size:13px;margin:27px 0 13px}.item-card{border:1px solid #e7edf2;border-radius:13px;background:#f6f8fa;padding:12px;display:flex;gap:13px;min-height:115px}.item-image{width:96px;height:96px;flex:none;border-radius:9px;background:#fff;color:#6e9abc;display:grid;place-items:center;font-size:28px;overflow:hidden}.item-image img{width:100%;height:100%;object-fit:contain;border-radius:9px}.item-body{min-width:0;padding:4px 0}.item-body strong{font-size:15px;line-height:1.4;display:block}.item-body span{display:block;color:#8b98a9;font-size:12px;margin:8px 0}.item-body a{font-size:12px}.details hr{border:0;border-top:1px solid #edf0f4;margin:26px 0}.assignee-row{display:flex;align-items:center;gap:10px}.assignee-row select,.details select{border:1px solid #e4eaf1;background:white;border-radius:8px;color:#23374e;padding:9px;max-width:100%}.status-buttons{display:flex;gap:7px;flex-wrap:wrap}.status-button{border:0;border-radius:9px;background:#f2f5f8;color:#73849a;padding:10px 13px;font-size:13px}.status-button.active{background:#e8f1ff;color:#2e6eea;font-weight:700}.detail-action{width:100%;border:0;border-radius:10px;background:#f5f7fa;color:#26384e;padding:13px 14px;text-align:left;margin-bottom:9px}.detail-action:hover{background:#edf2f8}.note-field{border:1px solid #e1e8ef;background:#fafbfd;border-radius:11px;width:100%;min-height:91px;resize:vertical;padding:13px;color:#2c4057;font-size:13px}.note-save{margin-top:8px}.muted{color:#8c9bac;font-size:12px}.warning-box{background:#fff5e5;color:#946d23;padding:11px;border-radius:9px;font-size:13px}.retry-button{border:0;background:transparent;color:#d86464;text-decoration:underline;padding:0 0 0 5px;font-size:11px}
.login-wrap{min-height:100dvh;display:grid;place-items:center;background:linear-gradient(145deg,#edf3fb,#f7f9fd)}.login-card{width:min(420px,calc(100% - 32px));background:#fff;border-radius:19px;box-shadow:0 24px 70px #1c365222;padding:34px}.login-card h1{margin:20px 0 5px;font-size:25px}.login-card p{color:#8090a2;margin:0 0 25px}.login-card label{display:block;font-size:13px;color:#55687f;margin-bottom:16px}.login-card input{display:block;width:100%;height:45px;border:1px solid #d4dfea;border-radius:9px;margin-top:7px;padding:0 12px}.form-error{color:#d85050;min-height:22px;font-size:13px;margin-top:10px}.demo-hint{display:block;color:#9aa7b6;text-align:center}.modal{border:0;border-radius:17px;box-shadow:0 20px 80px #10213640;padding:0;max-width:min(560px,calc(100vw - 24px));max-height:min(86dvh,850px);width:100%;color:#1a2b40}.modal::backdrop{background:#12233a73}.modal-inner{padding:25px;overflow:auto;max-height:86dvh}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px;gap:15px}.modal-head h2{font-size:22px;margin:0}.modal-close{border:0;background:#f1f4f7;border-radius:8px;width:32px;height:32px;font-size:21px;color:#62758b}.modal p{font-size:13px;color:#718299}.modal label{display:block;font-size:12px;color:#708197;margin:10px 0}.modal input,.modal select,.modal textarea{width:100%;border:1px solid #d4deea;border-radius:8px;padding:10px;margin-top:5px;color:#1d3046;background:#fff}.modal textarea{min-height:90px}.modal .button{margin-top:8px}.modal-list{display:flex;flex-direction:column;gap:9px;margin:13px 0}.modal-row{padding:11px;background:#f6f8fb;border-radius:9px;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px}.modal-row strong{display:block}.modal-row span{color:#8291a2;font-size:12px}.modal-row button{border:0;background:#e8f1ff;color:#2d6ee7;border-radius:7px;padding:7px 10px;font-size:12px}.modal-row-actions{display:flex;gap:5px}.modal-tabs{display:flex;gap:7px;margin-bottom:15px}.modal-tabs button{border:0;border-radius:8px;background:#f3f5f8;color:#6d7e93;padding:9px 13px}.modal-tabs button.active{background:#e8f1ff;color:#2e6eeb}.toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%) translateY(30px);background:#20344c;color:#fff;border-radius:10px;padding:11px 17px;opacity:0;pointer-events:none;transition:.2s;z-index:20;font-size:13px;max-width:calc(100vw - 30px)}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
@media(max-width:1250px){.app{grid-template-columns:70px minmax(315px,390px) minmax(350px,1fr) 340px}.details-content{padding:22px}.inbox-top{padding-left:20px;padding-right:20px}.chat-row{padding-left:20px;padding-right:20px}}
@media(max-width:1000px){.app{grid-template-columns:68px minmax(300px,360px) minmax(320px,1fr)}.details{display:none}.app.show-details .details{display:block;position:fixed;z-index:5;top:0;right:0;bottom:0;width:min(400px,100vw);box-shadow:-12px 0 35px #17233425}}
@media(max-width:700px){.app{display:block;min-height:0}.rail{display:none}.inbox{width:100%;height:100dvh;border:0}.inbox-top{padding:27px 23px 13px}.heading-row h1{font-size:27px}.chat-list{padding-bottom:0}.chat-row{min-height:101px;padding:16px 21px}.mobile-tabs{height:70px;border-top:1px solid #e8edf2;display:flex;align-items:center;justify-content:space-around;padding-bottom:env(safe-area-inset-bottom);flex:none}.mobile-tabs button{border:0;background:white;color:#8c9aad;font-size:11px;display:flex;flex-direction:column;align-items:center;gap:4px;min-width:75px}.mobile-tabs button.active{color:#347bf6;font-weight:700}.mobile-tabs span{font-size:20px;line-height:1}.conversation{display:none;height:100dvh;width:100%;background:#fff}.app.mobile-chat .inbox{display:none}.app.mobile-chat .conversation{display:flex}.chat-header{height:79px;padding:0 19px;gap:10px}.chat-header .avatar{width:42px;height:42px}.chat-header-name strong{font-size:16px}.chat-header-name span{font-size:11px}.mobile-back{display:block;border:0;background:transparent;color:#347bf6;font-size:32px;width:29px;padding:0}.mobile-info{display:block;border:0;background:#f2f6fb;color:#517bb6;width:36px;height:36px;border-radius:50%;font-size:17px;font-weight:700}.desktop-only{display:none}.mobile-item{display:block;background:#f4f7fa;color:#263b53;margin:12px 19px 0;padding:11px 13px;border-radius:9px;font-size:12px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.messages{padding:17px 20px;gap:14px;background:#fff}.bubble{font-size:14px;max-width:84%;padding:12px 14px 21px}.media-card{max-width:85%;min-width:0}.media-symbol{height:52px;width:52px}.composer{padding:10px 15px calc(13px + env(safe-area-inset-bottom))}.quick-replies{margin-bottom:8px}.quick-replies>span{display:none}.template-chip{font-size:11px}.compose-box{border:0;display:flex;align-items:center;padding:0;gap:8px}.compose-box textarea{background:#f3f6f9;border-radius:13px;min-height:45px;height:45px;padding:12px;resize:none;order:2;font-size:14px;flex:1}.compose-actions{display:contents}.attach-button{order:1;background:#f1f4f8;border-radius:50%;width:43px;height:43px;justify-content:center;flex:none}.attach-button span{display:none}.send-arrow{display:inline}.button.primary#send-button{order:3;border-radius:50%;width:43px;height:43px;padding:0;font-size:0;display:grid;place-items:center;flex:none}.button.primary#send-button span{font-size:18px}.details{display:none}.app.show-details .details{width:100vw}.mobile-only{display:block}.details-content{padding-top:22px}}

/* Напоминания */
.rail-btn.reminder-nav { position:relative; font-size:29px; }
.nav-badge { position:absolute; right:0; top:0; min-width:18px; height:18px; border-radius:9px; background:#f16f63; color:#fff; font-size:10px; display:grid; place-items:center; padding:0 4px; }
.mobile-tabs button { position:relative; }
.mobile-reminder-badge { position:absolute; right:4px; top:0; min-width:17px; height:17px; border-radius:9px; background:#f16f63; color:#fff; font-size:10px; display:grid; place-items:center; padding:0 4px; }
.chat-reminders { display:flex; flex-direction:column; gap:8px; }
.chat-reminder { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 11px; background:#f5f8fc; border-radius:9px; }
.chat-reminder.overdue { background:#fff1e8; }
.chat-reminder strong { display:block; font-size:13px; }
.chat-reminder span { display:block; margin-top:3px; color:#8190a3; font-size:11px; }
.chat-reminder.overdue span { color:#cb694b; }
.chat-reminder button { border:0; background:#dfeafe; color:#2c70e8; border-radius:7px; width:27px; height:27px; flex:none; }
.reminder-create { margin-top:10px; width:100%; }
.reminder-quick,.reminder-tabs { display:flex; gap:7px; flex-wrap:wrap; margin:9px 0; }
.reminder-quick button,.reminder-tabs button { border:0; border-radius:8px; padding:9px 11px; background:#f1f5fa; color:#58708b; font-size:12px; }
.reminder-date-control{display:flex;align-items:center;width:100%;min-width:0;height:44px;margin-top:6px;border:1px solid #d4deea;border-radius:8px;background:#fff;overflow:hidden}
.modal .reminder-date-control input{display:block;flex:1;width:100%;max-width:100%;min-width:0;height:100%;margin:0;padding:0 12px;border:0;border-radius:0;background:transparent;color:#1d3046;font-size:16px;font-variant-numeric:tabular-nums;text-align:left;box-shadow:none}
.modal .reminder-date-control input::-webkit-datetime-edit{padding:0;text-align:left}
.reminder-date-control:focus-within{border-color:#7dc4f7;box-shadow:0 0 0 3px #d9efff}
.modal .reminder-date-control input:focus-visible{outline:0;border:0;box-shadow:none}
.reminder-tabs button.active { background:#e7f0ff; color:#2b6fea; font-weight:700; }
.reminder-list { display:flex; flex-direction:column; gap:9px; max-height:55dvh; overflow:auto; }
.reminder-row { border:1px solid #e1e9f1; border-radius:11px; padding:13px; display:flex; flex-direction:column; gap:10px; }
.reminder-row.overdue { border-color:#f2c9b8; background:#fff8f4; }
.reminder-row-main strong { display:block; font-size:14px; }
.reminder-row-main span,.reminder-row-main small { display:block; margin-top:4px; color:#7c8ba0; font-size:12px; }
.reminder-row.overdue .reminder-row-main span { color:#c65e41; }
.reminder-actions { display:flex; gap:6px; flex-wrap:wrap; }
.reminder-actions button { border:0; border-radius:7px; background:#edf3fb; color:#3673cf; font-size:12px; padding:8px 10px; }
.reminder-actions button:last-child { background:#e7f5ec; color:#2c8d5d; }
.reminder-empty { padding:25px; text-align:center; color:#8595a8; font-size:13px; }
@media(max-width:700px) { .modal { max-width:calc(100vw - 20px); } .modal-inner { padding:20px; } .reminder-list { max-height:55dvh; } }

/* Высота окна: прокручиваются только список, история и карточка. Поле ответа остаётся на экране. */
.inbox,.conversation,.details { min-height:0; }
@media(max-height:620px) and (min-width:701px) {
  .chat-header { height:69px; }
  .composer { padding-top:8px; padding-bottom:10px; }
  .quick-replies { margin-bottom:6px; min-height:28px; }
  .compose-box textarea { min-height:35px; }
  .inbox-top { padding-top:15px; padding-bottom:9px; }
  .inbox-top p { margin-bottom:12px; }
  .filter-row { margin-top:10px; }
  .account-filter-row { margin-top:9px; }
}
.filter-row { overflow-x:auto; scrollbar-width:none; }
.filter-row::-webkit-scrollbar { display:none; }
.filter-row .filter { flex:none; }
.media-open { display:inline-block; border:0; background:transparent; color:#347bf6; font-size:12px; padding:7px 0 0; text-align:left; }
.media-preview { min-width:min(520px,calc(100vw - 24px)); }
.media-preview-image,.media-preview-video { display:block; max-width:100%; max-height:65dvh; margin:0 auto 14px; border-radius:9px; }
.media-preview-audio { width:100%; margin:12px 0; }
.media-preview-pdf { width:100%; height:62dvh; border:1px solid #dce5ef; border-radius:9px; }
.media-download { display:inline-block; margin-top:10px; }
.modal-row-actions { flex-wrap:wrap; justify-content:flex-end; }
.modal .checkbox-label { display:flex; align-items:center; gap:8px; font-size:13px; color:#344a64; }
.modal .checkbox-label input { width:auto; margin:0; accent-color:#347bf6; }

.media-thumbnail{width:100%;height:100%;object-fit:cover;border-radius:9px}.item-image.image-error:after{content:"▣";color:#6e9abc}.item-image.image-error img{display:none}.item-body a{display:inline-block;margin-top:3px;font-weight:600}
.chat-row.unread{background:#f0f6ff}.chat-row.unread:hover{background:#e8f2ff}.chat-row.unread .chat-row-name,.chat-row.unread .chat-row-preview{font-weight:700;color:#1c3555}.chat-row.unread.active{background:#e4f0ff}
.brand-lockup{display:block;width:min(300px,100%);aspect-ratio:300/190;margin:0 auto 10px;background:url('/malevich-crm-selected.png?v=2') center 62%/110% auto no-repeat}.login-card .brand-lockup+h1{margin-top:10px}.login-card h1,.login-card>p{text-align:center}.brand-icon{display:block;width:44px;height:44px;flex:none;margin-bottom:23px;border-radius:10px}
.item-image.has-image{height:auto;min-height:0;align-self:center;background:transparent;display:flex;align-items:center;justify-content:center}.item-image.has-image img{display:block;width:auto;height:auto;max-width:100%;max-height:96px;object-fit:contain;border-radius:9px}.item-image.image-error{height:96px;background:#e1ecf6}
.note-peek{position:absolute;z-index:2;top:104px;right:18px;width:min(214px,37%);border:1px solid #d9e7fa;border-radius:11px;background:#fff;box-shadow:0 4px 16px #233e6114;text-align:left;padding:9px 11px;color:#304763}.note-peek strong{display:block;font-size:11px;color:#3777d9;margin-bottom:3px}.note-peek span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;line-height:1.35;overflow-wrap:anywhere}.note-peek.empty{color:#8090a3;background:#f9fbfd}.note-peek:hover{background:#edf5ff}
@media(max-width:700px){.note-peek{top:133px;right:12px;width:min(175px,47%);padding:7px 9px}.note-peek strong{font-size:10px}.note-peek span{font-size:11px}}
.notification-settings{border:1px solid #e2eaf3;border-radius:11px;padding:14px;margin:16px 0}.notification-settings>strong{font-size:15px}.notification-settings p{margin:7px 0 11px}.notification-settings .button{display:block;width:100%;margin-top:8px;text-align:center}.notification-settings .notification-help{background:#edf5ff;border-radius:8px;padding:10px;color:#426992}

/* The listing line is a span: it must be a block to clip long titles inside a chat row. */
.chat-row-meta{display:block;width:100%;max-width:100%}
.chat-list{overflow-x:hidden}

/* Messenger-style message rows keep timestamps outside the bubbles. */
.message-row{display:flex;align-items:flex-end;gap:7px;width:100%;min-width:0}
.message-row.outgoing{justify-content:flex-end}
.message-surface{min-width:0;max-width:min(76%,490px)}
.message-row .bubble{display:block;width:fit-content;max-width:100%;padding:10px 14px;border:0;border-radius:18px;color:#17212b;line-height:1.42}
.message-row .bubble.incoming{background:#f2f2f2}
.message-row .bubble.outgoing{background:#e5f5fd}
.message-row .media-card{max-width:100%;min-width:0}
.message-row.outgoing .message-time{order:-1}
.message-time{flex:none;white-space:nowrap;font-size:11px;color:#84909c;padding-bottom:3px}
.message-avatar{width:32px;height:32px;flex:none;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:10px;font-weight:700}
.avatar,.message-avatar{position:relative;overflow:hidden}
.avatar img,.message-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.chat-header .avatar{position:relative;overflow:hidden}
.chat-header .avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.composer-icon{display:none}
.composer-icon svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.modal-close{display:grid;place-items:center;position:relative;flex:none;font-size:0;line-height:1}
.modal-close::before,.modal-close::after{content:"";position:absolute;width:16px;height:2.5px;border-radius:2px;background:currentColor;top:50%;left:50%}
.modal-close::before{transform:translate(-50%,-50%) rotate(45deg)}
.modal-close::after{transform:translate(-50%,-50%) rotate(-45deg)}

@media(max-width:700px){
  html,body{width:100%;overflow:hidden;overscroll-behavior:none}
  .app{width:100%;height:var(--mobile-app-height,100svh);overflow:hidden}
  .inbox,.conversation{height:100%;width:100%;overflow:hidden}
  .inbox-top{padding:19px 16px 11px}
  .inbox-top p{margin-bottom:15px}
  .filter-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;overflow:visible;margin-top:13px}
  .filter-row .filter{min-width:0;width:100%;padding:9px 7px;overflow:hidden;text-overflow:ellipsis;font-size:13px}
  .account-filter-row{margin-top:11px}
  .chat-list,.messages{min-height:0;overscroll-behavior:contain;touch-action:pan-y}
  .chat-row{min-height:88px;padding:12px 16px;overflow:hidden}
  .chat-row-main{overflow:hidden}
  .mobile-tabs{height:calc(62px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom)}
  .chat-header{height:70px;padding:0 13px;gap:9px}
  .chat-header .avatar{width:43px;height:43px;border-radius:12px}
  .chat-header-name strong{font-size:16px;color:#17212b}
  .chat-header-name span{font-size:12px;color:#727d89}
  .mobile-back{font-size:34px;font-weight:600;width:30px}
  .note-peek{position:relative;top:auto;right:auto;z-index:1;width:auto;min-height:32px;flex:none;display:flex;align-items:center;gap:7px;margin:7px 13px 0;padding:6px 10px;border:0;border-radius:9px;background:#f5f7f9;box-shadow:none}
  .note-peek.empty{background:#f5f7f9}
  .note-peek strong{display:inline;margin:0;white-space:nowrap;font-size:11px}
  .note-peek span{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:11px;min-width:0}
  .mobile-item{display:none}
  .messages{padding:13px 12px 11px;gap:7px;overflow-x:hidden}
  .day-separator{margin:9px auto 7px}
  .message-avatar{width:29px;height:29px;font-size:9px}
  .message-row.incoming .message-surface{max-width:calc(100% - 73px)}
  .message-row.outgoing .message-surface{max-width:calc(100% - 43px)}
  .message-row .bubble{font-size:15px;line-height:1.34;padding:9px 12px;border-radius:18px}
  .message-time{font-size:10px;padding-bottom:3px}
  .message-row .media-card{padding:9px;gap:8px;border-radius:15px}
  .media-symbol{width:46px;height:46px}
  .bubble-status{margin:0 0 2px;font-size:10px}
  .composer{padding:8px 11px calc(8px + env(safe-area-inset-bottom))}
  .quick-replies{display:none;margin:0 0 8px;min-height:0}
  .composer.show-quick .quick-replies{display:flex}
  .quick-replies>div{width:100%}
  .compose-box{gap:6px}
  .compose-box textarea{order:2;min-width:0;min-height:42px;height:42px;padding:10px 12px;border-radius:12px;font-size:16px;line-height:1.3}
  .attach-button{order:1;width:34px;height:40px;background:transparent;color:#17212b;font-size:30px;font-weight:300}
  .composer-icon{display:grid;place-items:center;flex:none;width:30px;height:40px;border:0;background:transparent;color:#17212b;font-size:26px;line-height:1;padding:0}
  #quick-button{order:3;font-size:30px}
  #camera-button{order:4;font-size:25px}
  .button.primary#send-button{order:5;display:none;width:38px;height:40px;background:transparent;border-radius:0;padding:0}
  .composer.has-text .button.primary#send-button{display:grid}
  .composer.has-text #camera-button{display:none}
  #send-button .send-arrow{display:block;width:34px;height:34px}
  .search-wrap input,.login-card input,.modal input,.modal select,.modal textarea{font-size:16px}
  .modal-close{width:40px;height:40px}
  .modal-close::before,.modal-close::after{width:19px;height:3px}
}

/* Keep the conversation canvas white, as in Avito, and dock notes above it. */
.conversation,.messages{background:#fff}
.note-peek{position:static;top:auto;right:auto;z-index:auto;display:flex;align-items:center;gap:8px;min-height:32px;width:auto;margin:8px 18px 0;padding:6px 10px;border:0;border-radius:9px;background:#f5f7f9;box-shadow:none;flex:none}
.note-peek.empty{background:#f5f7f9}
.note-peek strong{display:inline;margin:0;flex:none;white-space:nowrap;font-size:11px}
.note-peek span{display:block;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px;line-height:1.3}

/* A listing image and buyer badge mirror the two visual cues in Avito's chat list. */
.chat-thumbnail{width:48px;height:52px;position:relative;flex:none;border-radius:10px;background:#e9eef5;display:grid;place-items:center}
.chat-listing-photo{display:block;width:100%;height:100%;object-fit:cover;border-radius:10px}
.chat-customer-badge{position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:14px;font-weight:700;border-radius:50%;overflow:hidden}
.chat-thumbnail.with-listing .chat-customer-badge{width:25px;height:25px;inset:-5px auto auto -5px;border:2px solid #fff;font-size:8px}
.chat-customer-badge img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.chat-row-bottom{min-width:0;justify-content:flex-start}
.chat-row-preview{min-width:0;flex:1}
.chat-row-bottom .unread-pill{margin-left:auto}
.media-avito-link{display:inline-block;margin-left:9px;font-size:12px}
@media(max-width:700px){
  body.app-open{position:fixed;inset:0;width:100%;height:100%;overflow:hidden}
  body.app-open .app{position:absolute;top:var(--mobile-app-top,0px);right:0;bottom:auto;left:0;width:100%;height:var(--mobile-app-height,100svh)}
  .chat-list,.messages{-webkit-overflow-scrolling:touch;overscroll-behavior:contain;overflow-y:auto;overflow-x:hidden}
  .chat-thumbnail{width:44px;height:46px}
  .chat-thumbnail.with-listing .chat-customer-badge{width:23px;height:23px}
  .note-peek{margin:7px 13px 0}
  .media-avito-link{display:block;margin:6px 0 0}
}
.details-close{display:grid;place-items:center}
@media(min-width:701px){
  .app.details-collapsed .details{display:none}
  .app.details-collapsed .mobile-info{display:grid;place-items:center;flex:none;border:0;border-radius:50%;width:36px;height:36px;background:#edf3fa;color:#517bb6;font-size:17px;font-weight:700}
}
@media(min-width:1001px){.app.details-collapsed{grid-template-columns:78px minmax(350px,414px) minmax(400px,1fr)}}
@media(min-width:1001px) and (max-width:1250px){.app.details-collapsed{grid-template-columns:70px minmax(315px,390px) minmax(350px,1fr)}}
@media(min-width:701px) and (max-width:1000px){
  .chat-header .mobile-info{display:grid;place-items:center;flex:none;border:0;border-radius:50%;width:36px;height:36px;background:#edf3fa;color:#517bb6;font-size:17px;font-weight:700}
}

/* Photos are shown as photos in the thread, with a full-screen viewer on tap. */
.chat-photo-wrap{width:min(100%,360px);max-width:100%;min-width:0}
.chat-photo{display:block;width:100%;min-height:120px;padding:0;border:0;border-radius:15px;overflow:hidden;background:#f1f3f5;cursor:zoom-in}
.chat-photo img{display:block;width:100%;height:auto;max-height:min(56vh,480px);object-fit:contain}
.chat-photo-fallback{display:block;padding:13px;border:1px solid #dce5ee;border-radius:12px;background:#f6f8fb;font-size:13px}
.chat-photo-fallback[hidden]{display:none}
.chat-photo-caption{padding:6px 3px 0;font-size:14px;line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere}
.modal.photo-modal{width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;border-radius:0;background:#111418;color:#fff;box-shadow:none}
.photo-modal #modal-content,.photo-viewer{width:100%;height:100%;min-height:0}
.photo-viewer{position:relative;display:flex;flex-direction:column}
.photo-stage{min-height:0;flex:1;display:grid;place-items:center;overflow:hidden;padding:56px 12px 12px}
.photo-stage img{display:block;grid-area:1/1;max-width:100%;max-height:100%;object-fit:contain;cursor:zoom-in}
.photo-stage.zoomed{display:block;overflow:auto;touch-action:pan-x pan-y}
.photo-stage.zoomed img{max-width:none;max-height:none;width:160%;height:auto;cursor:zoom-out}
.photo-close{position:absolute;top:calc(7px + env(safe-area-inset-top));right:11px;z-index:2;width:44px;height:44px;display:grid;place-items:center;border:0;background:transparent;color:#fff;padding:0;cursor:pointer}
.photo-close::before{content:"";position:absolute;width:34px;height:34px;border-radius:50%;background:#ffffff24;transition:background-color var(--ui-fast) ease}
.photo-close svg{position:relative;display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round}
.photo-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 18px calc(14px + env(safe-area-inset-bottom));color:#d6dde5;font-size:13px}
.photo-toolbar a,.photo-error a{color:#fff;text-decoration:underline}
.photo-error{position:absolute;left:18px;right:18px;bottom:75px;padding:14px;border-radius:10px;background:#303a44;color:#fff;font-size:13px}
.photo-error[hidden]{display:none}
.photo-loading{color:#d6dde5;font-size:14px;grid-area:1/1}
.photo-loading[hidden]{display:none}
.photo-toolbar-actions{display:flex;align-items:center;gap:12px}
.photo-toolbar-actions button{border:0;border-radius:9px;background:#ffffff24;color:#fff;width:36px;height:36px;font-size:22px;line-height:1}
.photo-toolbar-actions button:disabled{opacity:.35}
.send-arrow{transform:none}

@media(min-width:701px){
  .composer{padding:13px 20px 18px}
  .quick-replies{margin-bottom:10px}
  .compose-box{display:flex;align-items:center;gap:10px;padding:0;border:0;border-radius:0}
  .compose-box:focus-within{border:0}
  .compose-box textarea{order:2;flex:1;min-width:0;min-height:46px;height:46px;max-height:120px;margin:0;padding:11px 14px;border:2px solid transparent;border-radius:11px;background:#f3f3f3;font-size:16px;line-height:1.3}
  .compose-box textarea:focus{border-color:#8bd9ff}
  .compose-actions{display:contents}
  .attach-button{order:1;flex:none;width:36px;height:46px;justify-content:center;color:#17212b;font-size:30px;font-weight:300}
  .attach-button span{display:none}
  .composer-icon{display:grid;place-items:center;order:3;flex:none;width:34px;height:46px;padding:0;border:0;background:transparent;color:#17212b}
  #camera-button{order:4}
  #send-button.button.primary{order:5;display:none;place-items:center;flex:none;width:34px;height:46px;padding:0;border:0;background:transparent;color:#17212b;font-size:0}
  .composer.has-text #send-button.button.primary{display:grid}
  .composer.has-text #camera-button{display:none}
  #send-button .send-arrow{display:block;width:25px;height:25px;transform:none}
}
@media(max-width:700px){
  .chat-photo-wrap{width:min(100%,310px)}
  .chat-photo img{max-height:42vh}
  .photo-stage{padding-top:calc(54px + env(safe-area-inset-top))}
  #send-button.button.primary{color:#17212b}
  #send-button .send-arrow{width:25px;height:25px}
  .mobile-back{display:grid;place-items:center;flex:none;width:32px;height:40px;color:#17212b}
  .mobile-back svg{display:block;width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
}
.message-checks,.chat-preview-check{display:inline-block;flex:none;height:9px;margin-right:3px;fill:none;stroke:#00aaff;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;vertical-align:0}

/* One unread indicator geometry for the desktop rail and mobile tab bar. */
.rail-btn[data-nav="inbox"],.mobile-tabs [data-mobile-nav="chats"]{position:relative}
.chat-nav-badge{position:absolute;z-index:1;top:3px;left:calc(50% - 1px);display:grid;place-items:center;min-width:16px;height:16px;padding:0 3px;border:1.5px solid #fff;border-radius:999px;background:#f31a47;color:#fff;font-size:10px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums}
.chat-nav-badge[hidden]{display:none}
@media(max-width:700px){.mobile-tabs .chat-nav-badge{top:5px;left:calc(50% - 4px)}}
.message-checks.single-check,.chat-preview-check.single-check{width:11px}
.message-checks.double-check,.chat-preview-check.double-check{width:16px}
.mobile-account-filter{display:none}
.chat-row-time{display:flex;align-items:center;gap:2px;flex:none}
.chat-row-time .chat-preview-check{margin-right:1px}
.chat-listing-title{color:inherit}
.tab-icon{display:block;width:24px;height:24px;flex:none;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.tab-icon.ion-icon{stroke:none}
.tab-icon.ion-icon .tab-icon-outline{fill:none;stroke:currentColor;stroke-width:32px;stroke-linecap:round;stroke-linejoin:round}
.tab-icon.ion-icon-profile .tab-icon-outline{fill:currentColor;stroke:none}
.tab-icon.ion-icon .tab-icon-solid{fill:currentColor;stroke:none}
.tab-icon-solid{display:none}
.rail-btn.active .tab-icon-outline,.mobile-tabs button.active .tab-icon-outline{display:none}
.rail-btn.active .tab-icon-solid,.mobile-tabs button.active .tab-icon-solid{display:block;fill:currentColor;stroke:none}
@media(max-width:700px){
  .mobile-tabs{background:#fff;border-top:1px solid #e9e9ed}
  .mobile-tabs button{min-width:0;min-height:49px;flex:1;gap:3px;padding:3px 0 0;color:#8e8e93;font-size:11px;line-height:1.15;font-weight:500;-webkit-tap-highlight-color:transparent}
  .mobile-tabs button.active{color:#007aff;font-weight:600}
  .mobile-tabs button>span{font-size:11px;line-height:1.15}
  .mobile-tabs .tab-icon{width:23px;height:23px}
}
.system-message{max-width:min(85%,520px);align-self:center;background:#f2f4f6;color:#607084;border-radius:12px;padding:9px 13px;font-size:12px;line-height:1.45;text-align:center;white-space:pre-wrap;word-break:break-word}
.message-item-photo{width:65px;height:65px;object-fit:cover;border-radius:9px;flex:none;background:#eef2f6}
@media(max-width:700px){.message-item-photo{width:46px;height:46px}}
.photo-retry{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 9px;padding:8px 10px;border-radius:9px;background:#fff2eb;color:#8b4b29;font-size:12px}
.photo-retry[hidden]{display:none}
.photo-retry span{flex:1;min-width:150px}
.photo-retry button{border:0;border-radius:7px;background:#fff;color:#a14f21;padding:6px 9px;font-weight:700}
.notification-settings .push-error{background:#fff2eb;color:#9f4b28;border-radius:8px;padding:10px;line-height:1.4}
.notification-settings .push-error[hidden]{display:none}

/* Brief compositor-only motion keeps navigation responsive and avoids moving the page. */
:root{--ease-out-ui:cubic-bezier(.2,.8,.2,1);--ui-fast:160ms;--ui-enter:210ms}
.modal[open]{animation:dialog-enter var(--ui-enter) var(--ease-out-ui) both}
.modal[open]::backdrop{animation:backdrop-enter var(--ui-enter) ease-out both}
.modal[open].closing{animation:dialog-exit var(--ui-fast) ease-in both;pointer-events:none}
.modal[open].closing::backdrop{animation:backdrop-exit var(--ui-fast) ease-in both}
.modal.photo-modal[open]{animation:viewer-enter var(--ui-enter) ease-out both}
.modal.photo-modal[open].closing{animation:viewer-exit var(--ui-fast) ease-in both}
@keyframes dialog-enter{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes dialog-exit{from{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(6px) scale(.99)}}
@keyframes backdrop-enter{from{opacity:0}to{opacity:1}}
@keyframes backdrop-exit{from{opacity:1}to{opacity:0}}
@keyframes viewer-enter{from{opacity:0}to{opacity:1}}
@keyframes viewer-exit{from{opacity:1}to{opacity:0}}
@keyframes panel-enter{from{opacity:.65;transform:translateX(12px)}to{opacity:1;transform:translateX(0)}}
@keyframes chat-enter{from{opacity:.72;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
.app.show-details .details{animation:panel-enter var(--ui-enter) var(--ease-out-ui) both}
.chat-row,.filter,.template-chip,.button,.rail-btn,.modal-row button{transition:background-color var(--ui-fast) ease,color var(--ui-fast) ease,box-shadow var(--ui-fast) ease}
.chat-row:active,.button:active,.template-chip:active{filter:brightness(.97)}
.photo-close,.modal-close,.photo-toolbar-actions button{transition:background-color var(--ui-fast) ease,opacity var(--ui-fast) ease}
.photo-close:hover::before,.photo-toolbar-actions button:hover{background:#ffffff38}
.modal-close:hover{background:#e6edf4}
.test-marker{color:#9a6c1e;font-weight:700}
.test-banner{background:#fff5df;color:#855d16}
.test-banner:before{background:#e7a72d}
.test-controls{margin-top:20px;padding:15px;border:1px solid #e7e1cd;border-radius:12px;background:#fffdf8;display:flex;gap:7px;flex-wrap:wrap}
.test-controls strong,.test-controls p{width:100%;margin:0}
.test-controls strong{font-size:14px}
.test-controls p{font-size:12px;color:#7d7780;line-height:1.45;margin-bottom:5px}
.test-controls .button{padding:9px 11px}
.test-controls .test-delete{background:#fff0ee;color:#a9483b}
@media(max-width:700px){.app.mobile-chat .conversation{animation:chat-enter var(--ui-enter) var(--ease-out-ui) both}}
@media(prefers-reduced-motion:reduce){.modal[open],.modal[open]::backdrop,.modal[open].closing,.modal[open].closing::backdrop,.modal.photo-modal[open],.modal.photo-modal[open].closing,.app.show-details .details,.app.mobile-chat .conversation{animation:none!important}.chat-row,.filter,.template-chip,.button,.rail-btn,.modal-row button,.photo-close,.modal-close,.photo-toolbar-actions button,.toast{transition:none!important}}
@media(max-width:700px){
  .inbox-top{padding:8px 13px 7px}
  .inbox-top .heading-row,.inbox-top>p,.account-filter-row{display:none}
  .search-wrap{height:44px;border-radius:11px;background:#f2f2f2;padding:0 14px}
  .search-wrap input{font-size:15px;color:#17212b}
  .filter-row{display:flex;grid-template-columns:none;gap:6px;margin-top:10px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-snap-type:x proximity;touch-action:pan-x;padding-bottom:2px}
  .filter-row .filter,.mobile-account-filter{flex:0 0 auto;width:auto;min-width:0;height:34px;border:0;border-radius:11px;background:#f2f2f2;color:#202832;font-size:13px;font-weight:500;padding:0 12px;scroll-snap-align:start}
  .filter-row .filter.active{background:#eaf2ff;color:#1670df;font-weight:700}
  .mobile-account-filter{display:block;max-width:170px;padding-right:8px;appearance:auto}
  .mobile-account-filter.error{color:#a66b1d}
  .chat-row{min-height:76px;padding:8px 12px;gap:11px;align-items:center}
  .chat-thumbnail,.chat-row>.avatar{width:60px;height:60px;border-radius:14px}
  .chat-listing-photo{border-radius:14px}
  .chat-thumbnail.with-listing .chat-customer-badge{width:27px;height:27px;inset:-4px auto auto -4px;font-size:9px}
  .chat-row-main{min-width:0}
  .chat-row-top{gap:6px}
  .chat-row-name{min-width:0;font-size:16px;font-weight:750;color:#111820}
  .chat-row-time{font-size:11px;color:#858c94}
  .chat-row-meta{font-size:13px;font-weight:500;color:#1f2a35;margin:2px 0 3px}
  .chat-account-label{color:#7b8794}
  .chat-row-preview{font-size:13px;color:#707985}
  .mobile-tabs{height:calc(50px + env(safe-area-inset-bottom))}
  .mobile-tabs button{min-height:48px;justify-content:center;padding:0 0 8px}
  .mobile-tabs button>span{display:none}
  .mobile-tabs .tab-icon{width:23px;height:23px}
}

/* Keep mobile detail forms within the visible viewport when iOS opens its keyboard. */
@media(max-width:700px){
  .app.show-details .details{width:100%;max-width:100vw;overflow-x:hidden;overscroll-behavior:contain;padding-bottom:env(safe-area-inset-bottom)}
  .app.show-details .details .details-content{width:100%;min-width:0;padding:16px 18px calc(24px + env(safe-area-inset-bottom))}
  .app.show-details .details .modal-head{position:sticky;top:0;z-index:3;margin:-16px -18px 16px;padding:16px 18px 12px;background:#fff;border-bottom:1px solid #eef1f4}
  .details .note-field{display:block;width:100%;max-width:100%;min-width:0;min-height:120px;resize:none;font-size:16px;line-height:1.4}
  .details .note-save{width:100%;min-height:44px}
  .modal:not(.photo-modal){max-width:calc(100vw - 20px);max-height:calc(var(--mobile-visible-height,100dvh) - 16px)}
  .modal:not(.photo-modal) .modal-inner{max-height:calc(var(--mobile-visible-height,100dvh) - 16px);overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}
  .modal label{display:block;width:100%;min-width:0}
  .modal label>input,.modal label>select,.modal label>textarea{display:block;width:100%;max-width:100%;min-width:0;margin-top:6px}
  #reminder-form{min-width:0}
  #reminder-form .reminder-quick{display:flex;flex-wrap:nowrap;gap:6px}
  #reminder-form .reminder-quick button{flex:1;min-width:0;min-height:38px;padding:8px 3px;white-space:nowrap;font-size:11px}
  #reminder-form .button.primary{min-height:44px}
  .details .note-field:focus-visible,.modal input:focus-visible,.modal select:focus-visible,.modal textarea:focus-visible{outline:none;border-color:#7dc4f7;box-shadow:0 0 0 3px #d9efff}
}
